{"version":3,"sources":["webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/utils.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colorgridview.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/button/buttonview.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/button/switchbuttonview.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/bindings/submithandler.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/bindings/preventdefault.js","webpack:///./node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colortileview.js"],"names":["getLocalizedColorOptions","locale","options","t","localizedColorNames","Black","Dim grey","Grey","Light grey","White","Red","Orange","Yellow","Light green","Green","Aquamarine","Turquoise","Light blue","Blue","Purple","map","colorOption","label","normalizeColorOptions","normalizeSingleColorDefinition","filter","option","color","model","hasBorder","view","name","styles","undefined","concat","__webpack_require__","d","__webpack_exports__","ColorGridView","_this","Object","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_8__","this","_super","call","colorDefinitions","viewStyleAttribute","columns","gridTemplateColumns","set","items","createCollection","focusTracker","FocusTracker","keystrokes","KeystrokeHandler","_focusCycler","FocusCycler","focusables","keystrokeHandler","actions","focusPrevious","focusNext","on","evt","colorTile","isOn","selectedColor","forEach","ColorTileView","tooltip","fire","value","add","setTemplate","tag","children","attributes","class","style","_step","_iterator","_createForOfIteratorHelper","s","n","done","item","err","e","f","length","first","focus","last","_this2","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_10__","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_13__","prototype","_step2","_iterator2","element","remove","listenTo","View","ButtonView","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__","bind","bindTemplate","ariaLabelUid","uid","tooltipView","_createTooltipView","labelView","_createLabelView","iconView","IconView","extendTemplate","keystrokeView","_createKeystrokeView","to","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3__","_getTooltipString","if","type","tabindex","aria-labelledby","aria-disabled","aria-pressed","isToggleable","String","mousedown","preventDefault","click","isEnabled","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_4__","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_7__","icon","withKeystroke","TooltipView","id","text","getEnvKeystrokeText","keystroke","Function","injectCssTransitionDisabler","disableCssTransitions","_isCssTransitionsDisabled","enableCssTransitions","clickOutsideHandler","_ref","emitter","activator","callback","contextElements","document","domEvt","path","composedPath","contextElement","contains","target","includes","SwitchButtonView","toggleSwitchView","_createToggleView","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_3__","D_Projects_UA_repo_Source_Client_UA_User_Web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_6__","submitHandler","useCapture","checkIcon","backgroundColor","fillColor"],"mappings":";;;;;AAqBO,SAASA,EAA0BC,EAAQC,GACjD,IAAMC,EAAIF,EAAOE,EACXC,GACLC,MAAOF,EAAG,SACVG,WAAYH,EAAG,YACfI,KAAMJ,EAAG,QACTK,aAAcL,EAAG,cACjBM,MAAON,EAAG,SACVO,IAAKP,EAAG,OACRQ,OAAQR,EAAG,UACX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vBA,EAAIgG,SAAWlI,EAAKsE,SACxBpC,EAAImE,mBAlCPhG,EAAAC,EAAAC,EAAA,sBAAA8F;;;;OCiBqB9D,6CACpB,SAAAA,EAAapE,GAAS,IAAAsC,EAAAC,OAAAiE,EAAA,KAAAjE,CAAAE,KAAA2B,GACrB9B,EAAAI,EAAAC,KAAAF,KAAOzC,GAEP,IAAMyG,EAAOnE,EAAKoE,aAHG,OAUrBpE,EAAKU,IAAK,SAQVV,EAAKU,IAAK,aAEVV,EAAKiG,KAAOiC,IAEZlI,EAAK6E,gBACJvC,YACCE,OACC2F,gBAAiBhE,EAAKa,GAAI,UAE3BzC,OACC,KACA,sBACA4B,EAAKgB,GAAI,YAAa,2CA9BJnF,+CAuCtB,WACCC,OAAA6H,EAAA,KAAA7H,QAAA8H,EAAA,KAAA9H,CAAA6B,EAAA4B,WAAA,SAAAvD,MAAAE,KAAAF,MAEAA,KAAKwE,SAASyD,UAAY,0BA3CenE","file":"js/chunk-4c0d8e3a.e1a5673d.js","sourcesContent":["/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/colorgrid/utils\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 {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.\n * @param {Array.} options\n * @returns {Array.}.\n */\nexport function 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\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 *\n * @param {module:ui/colorgrid/colorgrid~ColorDefinition} options\n * @returns {Array.}\n */\nexport function normalizeColorOptions( options ) {\n\treturn options\n\t\t.map( normalizeSingleColorDefinition )\n\t\t.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/colorgrid~ColorDefinition `ColorDefinition-like`}\n// object for string values, and add a `view` property, for each definition.\n//\n// @param {String|module:ui/colorgrid/colorgrid~ColorDefinition}\n// @returns {module:ui/colorgrid/colorgrid~ColorDefinition}\nexport function normalizeSingleColorDefinition( color ) {\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-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/colorgrid/colorgrid\n */\n\nimport View from '../view';\nimport ColorTileView from './colortileview';\nimport FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';\nimport FocusCycler from '../focuscycler';\nimport KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler';\nimport '../../theme/components/colorgrid/colorgrid.css';\n\n/**\n * A grid of {@link module:ui/colorgrid/colortile~ColorTileView color tiles}.\n *\n * @extends module:ui/view~View\n */\nexport default class ColorGridView extends View {\n\t/**\n\t * Creates an instance of a color grid containing {@link module:ui/colorgrid/colortile~ColorTileView tiles}.\n\t *\n\t * @param {module:utils/locale~Locale} [locale] The localization services instance.\n\t * @param {Object} options Component configuration\n\t * @param {Array.} [options.colorDefinitions] Array with definitions\n\t * required to create the {@link module:ui/colorgrid/colortile~ColorTileView tiles}.\n\t * @param {Number} options.columns A number of columns to display the tiles.\n\t */\n\tconstructor( locale, options ) {\n\t\tsuper( locale );\n\n\t\tconst colorDefinitions = options && options.colorDefinitions || [];\n\t\tconst viewStyleAttribute = {};\n\n\t\tif ( options && options.columns ) {\n\t\t\tviewStyleAttribute.gridTemplateColumns = `repeat( ${ options.columns }, 1fr)`;\n\t\t}\n\n\t\t/**\n\t\t * The color of the currently selected color tile in {@link #items}.\n\t\t *\n\t\t * @observable\n\t\t * @type {String}\n\t\t */\n\t\tthis.set( 'selectedColor' );\n\n\t\t/**\n\t\t * Collection of the child tile views.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis.items = this.createCollection();\n\n\t\t/**\n\t\t * Tracks information about DOM focus in the grid.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/focustracker~FocusTracker}\n\t\t */\n\t\tthis.focusTracker = new FocusTracker();\n\n\t\t/**\n\t\t * Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/keystrokehandler~KeystrokeHandler}\n\t\t */\n\t\tthis.keystrokes = new KeystrokeHandler();\n\n\t\t/**\n\t\t * Helps cycling over focusable {@link #items} in the grid.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/focuscycler~FocusCycler}\n\t\t */\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this.items,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate grid items backwards using the arrowup key.\n\t\t\t\tfocusPrevious: 'arrowleft',\n\n\t\t\t\t// Navigate grid items forwards using the arrowdown key.\n\t\t\t\tfocusNext: 'arrowright'\n\t\t\t}\n\t\t} );\n\n\t\tthis.items.on( '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( '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\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( '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\tfocus() {\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\tfocusLast() {\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\trender() {\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( 'add', ( evt, item ) => {\n\t\t\tthis.focusTracker.add( item.element );\n\t\t} );\n\n\t\tthis.items.on( '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\t}\n\n\t/**\n\t * Fired when the `ColorTileView` for the picked item is executed.\n\t *\n\t * @event execute\n\t * @param {Object} data Additional information about the event.\n\t * @param {String} data.value The value of the selected color\n\t * ({@link module:ui/colorgrid/colorgrid~ColorDefinition#color `color.color`}).\n\t * @param {Boolean} data.hasBorder The `hasBorder` property of the selected color\n\t * ({@link module:ui/colorgrid/colorgrid~ColorDefinition#options `color.options.hasBorder`}).\n\t * @param {String} data.Label The label of the selected color\n\t * ({@link module:ui/colorgrid/colorgrid~ColorDefinition#label `color.label`})\n\t */\n}\n\n/**\n * A color definition used to create a {@link module:ui/colorgrid/colortile~ColorTileView}.\n *\n *\t\t{\n *\t\t\tcolor: 'hsl(0, 0%, 75%)',\n *\t\t\tlabel: 'Light Grey',\n *\t\t\toptions: {\n *\t\t\t\thasBorder: true\n *\t\t\t}\n *\t\t}\n *\n * @typedef {Object} module:ui/colorgrid/colorgrid~ColorDefinition\n * @type Object\n *\n * @property {String} color String representing a color.\n * It is used as value of background-color style in {@link module:ui/colorgrid/colortile~ColorTileView}.\n * @property {String} label String used as label for {@link module:ui/colorgrid/colortile~ColorTileView}.\n * @property {Object} options Additional options passed to create a {@link module:ui/colorgrid/colortile~ColorTileView}.\n * @property {Boolean} options.hasBorder A flag that indicates if special a CSS class should be added\n * to {@link module:ui/colorgrid/colortile~ColorTileView}, which renders a border around it.\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/button/buttonview\n */\n\nimport View from '../view';\nimport IconView from '../icon/iconview';\nimport TooltipView from '../tooltip/tooltipview';\n\nimport uid from '@ckeditor/ckeditor5-utils/src/uid';\nimport { getEnvKeystrokeText } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\nimport '../../theme/components/button/button.css';\n\n/**\n * The button view class.\n *\n *\t\tconst view = new ButtonView();\n *\n *\t\tview.set( {\n *\t\t\tlabel: 'A button',\n *\t\t\tkeystroke: 'Ctrl+B',\n *\t\t\ttooltip: true,\n *\t\t\twithText: true\n *\t\t} );\n *\n *\t\tview.render();\n *\n *\t\tdocument.body.append( view.element );\n *\n * @extends module:ui/view~View\n * @implements module:ui/button/button~Button\n */\nexport default class ButtonView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale ) {\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( 'class' );\n\t\tthis.set( 'labelStyle' );\n\t\tthis.set( 'icon' );\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' );\n\t\tthis.set( 'label' );\n\t\tthis.set( 'tabindex', -1 );\n\t\tthis.set( 'tooltip' );\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\t/**\n\t\t * Collection of the child views inside of the button {@link #element}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis.children = this.createCollection();\n\n\t\t/**\n\t\t * Tooltip of the button view. It is configurable using the {@link #tooltip tooltip attribute}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/tooltip/tooltipview~TooltipView} #tooltipView\n\t\t */\n\t\tthis.tooltipView = this._createTooltipView();\n\n\t\t/**\n\t\t * Label of the button view. It is configurable using the {@link #label label attribute}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/view~View} #labelView\n\t\t */\n\t\tthis.labelView = this._createLabelView( ariaLabelUid );\n\n\t\t/**\n\t\t * The icon view of the button. Will be added to {@link #children} when the\n\t\t * {@link #icon icon attribute} is defined.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/icon/iconview~IconView} #iconView\n\t\t */\n\t\tthis.iconView = new IconView();\n\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\n\t\t/**\n\t\t * A view displaying the keystroke of the button next to the {@link #labelView label}.\n\t\t * Added to {@link #children} when the {@link #withKeystroke `withKeystroke` attribute}\n\t\t * is defined.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/view/view~View} #keystrokeView\n\t\t */\n\t\tthis.keystrokeView = this._createKeystrokeView();\n\n\t\t/**\n\t\t * Tooltip of the button bound to the template.\n\t\t *\n\t\t * @see #tooltip\n\t\t * @see #_getTooltipString\n\t\t * @private\n\t\t * @observable\n\t\t * @member {Boolean} #_tooltipString\n\t\t */\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\tthis.setTemplate( {\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\ttype: bind.to( 'type', value => value ? value : 'button' ),\n\t\t\t\ttabindex: bind.to( 'tabindex' ),\n\t\t\t\t'aria-labelledby': `ck-editor__aria-label_${ ariaLabelUid }`,\n\t\t\t\t'aria-disabled': bind.if( 'isEnabled', true, value => !value ),\n\t\t\t\t'aria-pressed': bind.to( 'isOn', value => this.isToggleable ? String( value ) : false )\n\t\t\t},\n\n\t\t\tchildren: this.children,\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( 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( '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\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trender() {\n\t\tsuper.render();\n\n\t\tif ( this.icon ) {\n\t\t\tthis.iconView.bind( 'content' ).to( this, 'icon' );\n\t\t\tthis.children.add( this.iconView );\n\t\t}\n\n\t\tthis.children.add( this.tooltipView );\n\t\tthis.children.add( this.labelView );\n\n\t\tif ( this.withKeystroke ) {\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\tfocus() {\n\t\tthis.element.focus();\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/tooltip/tooltipview~TooltipView} instance and binds it with button\n\t * attributes.\n\t *\n\t * @private\n\t * @returns {module:ui/tooltip/tooltipview~TooltipView}\n\t */\n\t_createTooltipView() {\n\t\tconst tooltipView = new TooltipView();\n\n\t\ttooltipView.bind( 'text' ).to( this, '_tooltipString' );\n\t\ttooltipView.bind( 'position' ).to( this, 'tooltipPosition' );\n\n\t\treturn tooltipView;\n\t}\n\n\t/**\n\t * Creates a label view instance and binds it with button attributes.\n\t *\n\t * @private\n\t * @param {String} ariaLabelUid The aria label UID.\n\t * @returns {module:ui/view~View}\n\t */\n\t_createLabelView( ariaLabelUid ) {\n\t\tconst labelView = new View();\n\t\tconst bind = this.bindTemplate;\n\n\t\tlabelView.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( 'labelStyle' ),\n\t\t\t\tid: `ck-editor__aria-label_${ ariaLabelUid }`\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.bindTemplate.to( 'label' )\n\t\t\t\t}\n\t\t\t]\n\t\t} );\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\t * @private\n\t * @returns {module:ui/view~View}\n\t */\n\t_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 {@link #tooltipView} from the combination of\n\t * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t *\n\t * @private\n\t * @see #tooltip\n\t * @see #_tooltipString\n\t * @param {Boolean|String|Function} tooltip Button tooltip.\n\t * @param {String} label Button label.\n\t * @param {String} keystroke Button keystroke.\n\t * @returns {String}\n\t */\n\t_getTooltipString( tooltip, label, keystroke ) {\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 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/bindings/injectcsstransitiondisabler\n */\n\n/**\n * A decorator 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 * **Note**: This helper extends the {@link module:ui/view~View#template template} and must be used **after**\n * {@link module:ui/view~View#setTemplate} is called:\n *\n *\t\timport injectCssTransitionDisabler from '@ckeditor/ckeditor5-ui/src/bindings/injectcsstransitiondisabler';\n *\n *\t\tclass MyView extends View {\n *\t\t\tconstructor() {\n *\t\t\t\tsuper();\n *\n *\t\t\t\t// ...\n *\n *\t\t\t\tthis.setTemplate( { ... } );\n *\n *\t\t\t\t// ...\n *\n *\t\t\t\tinjectCssTransitionDisabler( this );\n *\n *\t\t\t\t// ...\n *\t\t\t}\n *\t\t}\n *\n * The usage comes down to:\n *\n *\t\tconst view = new MyView();\n *\n *\t\t// ...\n *\n *\t\tview.disableCssTransitions();\n *\t\tview.show();\n *\t\tview.enableCssTransitions();\n *\n * @param {module:ui/view~View} view View instance that should get this functionality.\n */\nexport default function injectCssTransitionDisabler( view ) {\n\tview.set( '_isCssTransitionsDisabled', false );\n\n\tview.disableCssTransitions = () => {\n\t\tview._isCssTransitionsDisabled = true;\n\t};\n\n\tview.enableCssTransitions = () => {\n\t\tview._isCssTransitionsDisabled = false;\n\t};\n\n\tview.extendTemplate( {\n\t\tattributes: {\n\t\t\tclass: [\n\t\t\t\tview.bindTemplate.if( '_isCssTransitionsDisabled', 'ck-transitions-disabled' )\n\t\t\t]\n\t\t}\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/bindings/clickoutsidehandler\n */\n\n/* global document */\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 {Object} options Configuration options.\n * @param {module:utils/dom/emittermixin~Emitter} options.emitter The emitter to which this behavior\n * should be added.\n * @param {Function} options.activator Function returning a `Boolean`, to determine whether the handler is active.\n * @param {Array.} options.contextElements HTML elements that determine the scope of the\n * handler. Clicking any of them or their descendants will **not** fire the callback.\n * @param {Function} options.callback An action executed by the handler.\n */\nexport default function clickOutsideHandler( { emitter, activator, callback, contextElements } ) {\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\tfor ( const contextElement of contextElements ) {\n\t\t\tif ( contextElement.contains( domEvt.target ) || path.includes( contextElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tcallback();\n\t} );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/button/switchbuttonview\n */\n\nimport View from '../view';\nimport ButtonView from './buttonview';\n\nimport '../../theme/components/button/switchbutton.css';\n\n/**\n * The switch button view class.\n *\n *\t\tconst view = new SwitchButtonView();\n *\n *\t\tview.set( {\n *\t\t\twithText: true,\n *\t\t\tlabel: 'Switch me!'\n *\t\t} );\n *\n *\t\tview.render();\n *\n *\t\tdocument.body.append( view.element );\n *\n * @extends module:ui/button/buttonview~ButtonView\n */\nexport default class SwitchButtonView extends ButtonView {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale ) {\n\t\tsuper( locale );\n\n\t\tthis.isToggleable = true;\n\n\t\t/**\n\t\t * The toggle switch of the button.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/view~View} #toggleSwitchView\n\t\t */\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\trender() {\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\t * @private\n\t * @returns {module:ui/view~View}\n\t */\n\t_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-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/bindings/submithandler\n */\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~Emitter emitter}, e.g. to serialize the form data.\n *\n *\t\timport submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';\n *\n *\t\t// ...\n *\n *\t\tclass AnyFormView extends View {\n *\t\t\tconstructor() {\n *\t\t\t\tsuper();\n *\n *\t\t\t\t// ...\n *\n *\t\t\t\tsubmitHandler( {\n *\t\t\t\t\tview: this\n *\t\t\t\t} );\n *\t\t\t}\n *\t\t}\n *\n *\t\t// ...\n *\n *\t\tconst view = new AnyFormView();\n *\n *\t\t// A sample listener attached by an emitter working with the view.\n *\t\tthis.listenTo( view, 'submit', () => {\n *\t\t\tsaveTheFormData();\n *\t\t\thideTheForm();\n *\t\t} );\n *\n * @param {Object} [options] Configuration options.\n * @param {module:ui/view~View} options.view The view which DOM `submit` events should be handled.\n */\nexport default function 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 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/bindings/preventdefault\n */\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 *\t\t// In a class extending View.\n *\t\timport preventDefault from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';\n *\n *\t\t// ...\n *\n *\t\tthis.setTemplate( {\n *\t\t\ttag: 'div',\n *\n *\t\t\ton: {\n *\t\t\t\t// Prevent the default mousedown action on this view.\n *\t\t\t\tmousedown: preventDefault( this )\n *\t\t\t}\n *\t\t} );\n *\n * @param {module:ui/view~View} view View instance that defines the template.\n * @returns {module:ui/template~TemplateToBinding}\n */\nexport default function preventDefault( view ) {\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-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ui/colorgrid/colortile\n */\n\nimport ButtonView from '../button/buttonview';\nimport checkIcon from '../../theme/icons/color-tile-check.svg';\n\n/**\n * This class represents a single color tile in the {@link module:ui/colorgrid/colorgrid~ColorGridView}.\n *\n * @extends module:ui/button/buttonview~ButtonView\n */\nexport default class ColorTileView extends ButtonView {\n\tconstructor( locale ) {\n\t\tsuper( locale );\n\n\t\tconst bind = this.bindTemplate;\n\n\t\t/**\n\t\t * String representing a color shown as tile's background.\n\t\t *\n\t\t * @type {String}\n\t\t */\n\t\tthis.set( 'color' );\n\n\t\t/**\n\t\t * A flag that toggles a special CSS class responsible for displaying\n\t\t * a border around the button.\n\t\t *\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.set( 'hasBorder' );\n\n\t\tthis.icon = checkIcon;\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tstyle: {\n\t\t\t\t\tbackgroundColor: bind.to( '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-table__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\trender() {\n\t\tsuper.render();\n\n\t\tthis.iconView.fillColor = 'hsl(0, 0%, 100%)';\n\t}\n}\n"],"sourceRoot":""}