@ckeditor/ckeditor5-font
Advanced tools
Comparing version 38.0.1 to 38.1.0
@@ -5,2 +5,2 @@ !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{Accept:"Accept",Big:"Big",Default:"Default","Document colors":"Document colors","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size",Huge:"Huge",Small:"Small",Tiny:"Tiny"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})), | ||
* For licensing, see LICENSE.md. | ||
*/(()=>{var e={159:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(609),i=o.n(r)()((function(e){return e[1]}));i.push([e.id,".ck .ck-button.ck-color-table__color-picker,.ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}[dir=rtl] .ck .ck-button.ck-color-table__color-picker,[dir=rtl] .ck .ck-button.ck-color-table__remove-color{justify-content:flex-start}.ck .ck-button.ck-color-table__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-picker{padding:8px}.ck.ck-color-picker .hex-color-picker{height:100px;margin:0 0 var(--ck-spacing-large) 0}.ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-table_action-bar{display:flex;flex-direction:row;justify-content:space-around;padding:0 8px 8px}.ck.ck-color-table_action-bar .ck-button-cancel,.ck.ck-color-table_action-bar .ck-button-save{flex:1}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}",""]);const s=i},222:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(609),i=o.n(r)()((function(e){return e[1]}));i.push([e.id,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}",""]);const s=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var s=0;s<this.length;s++){var n=this[s][0];null!=n&&(i[n]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);r&&i[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),t.push(c))}},t}},62:(e,t,o)=>{"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},s=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),n=[];function l(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function c(e,t){for(var o={},r=[],i=0;i<e.length;i++){var s=e[i],c=t.base?s[0]+t.base:s[0],a=o[c]||0,u="".concat(c," ").concat(a);o[c]=a+1;var d=l(u),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(n[d].references++,n[d].updater(h)):n.push({identifier:u,updater:g(h,t),references:1}),r.push(u)}return r}function a(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=o.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var n=s(e.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,o,r){var i=o?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var s=document.createTextNode(i),n=e.childNodes;n[t]&&e.removeChild(n[t]),n.length?e.insertBefore(s,n[t]):e.appendChild(s)}}function m(e,t,o){var r=o.css,i=o.media,s=o.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,f=0;function g(e,t){var o,r,i;if(t.singleton){var s=f++;o=p||(p=a(t)),r=h.bind(null,o,s,!1),i=h.bind(null,o,s,!0)}else o=a(t),r=m.bind(null,o,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var o=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<o.length;r++){var i=l(o[r]);n[i].references--}for(var s=c(e,t),a=0;a<o.length;a++){var u=l(o[a]);0===n[u].references&&(n[u].updater(),n.splice(u,1))}o=s}}}},704:(e,t,o)=>{e.exports=o(79)("./src/core.js")},492:(e,t,o)=>{e.exports=o(79)("./src/engine.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},209:(e,t,o)=>{e.exports=o(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var r={};(()=>{"use strict";o.r(r),o.d(r,{Font:()=>Z,FontBackgroundColor:()=>q,FontBackgroundColorEditing:()=>$,FontBackgroundColorUI:()=>U,FontColor:()=>M,FontColorEditing:()=>I,FontColorUI:()=>R,FontFamily:()=>T,FontFamilyEditing:()=>V,FontFamilyUI:()=>_,FontSize:()=>D,FontSizeEditing:()=>z,FontSizeUI:()=>O});var e=o(704);class t extends e.Command{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,o=t.document.selection,r=e.value,i=e.batch,s=e=>{if(o.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,r):e.removeSelectionAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of i)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}};i?t.enqueueChange(i,(e=>{s(e)})):t.change((e=>{s(e)}))}}var i=o(273),s=o(209);class n extends((0,s.ObservableMixin)(s.Collection)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}var l=o(62),c=o.n(l),a=o(159),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(a.Z,u);a.Z.locals;class d extends i.View{constructor(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:n,documentColorsCount:l,colorPickerLabel:c,colorPickerConfig:a}){super(e),this.items=this.createCollection(),this.focusTracker=new s.FocusTracker,this.keystrokes=new s.KeystrokeHandler,this._focusables=new i.ViewCollection,this._colorPickerConfig=a,this._focusCycler=new i.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsPageView=new h(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:n,documentColorsCount:l,colorPickerLabel:c,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerPageView=new m(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerConfig:a}),this.set("_isColorGridsPageVisible",!0),this.set("_isColorPickerPageVisible",!1),this.set("selectedColor",void 0),this.colorGridsPageView.bind("isVisible").to(this,"_isColorGridsPageVisible"),this.colorPickerPageView.bind("isVisible").to(this,"_isColorPickerPageVisible"),this.on("change:selectedColor",((e,t,o)=>{this.colorGridsPageView.set("selectedColor",o),this.colorPickerPageView.set("selectedColor",o)})),this.colorGridsPageView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.colorPickerPageView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){this.items.length||(this.items.add(this.colorGridsPageView),this.colorGridsPageView.delegate("execute").to(this),this.colorGridsPageView.delegate("showColorPicker").to(this))}appendUI(){this.appendGrids(),this._colorPickerConfig&&this._appendColorPicker()}showColorPicker(){this.colorPickerPageView.colorPickerView&&(this.set("_isColorPickerPageVisible",!0),this.colorPickerPageView.focus(),this.set("_isColorGridsPageVisible",!1))}showColorGrids(){this.set("_isColorGridsPageVisible",!0),this.set("_isColorPickerPageVisible",!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsPageView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsPageView.updateSelectedColors()}_appendColorPicker(){2!==this.items.length&&(this.items.add(this.colorPickerPageView),this.colorGridsPageView.colorPickerButtonView&&this.colorGridsPageView.colorPickerButtonView.on("execute",(()=>{this.showColorPicker()})),this.colorGridsPageView.addColorPickerButton(),this.colorPickerPageView.delegate("execute").to(this),this.colorPickerPageView.delegate("cancel").to(this))}}class h extends i.View{constructor(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:i,documentColorsCount:s,colorPickerLabel:l,focusTracker:c,focusables:a}){super(e);const u=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=c,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=o,this.documentColors=new n,this.documentColorsCount=s,this._focusables=a,this._removeButtonLabel=r,this._colorPickerLabel=l,this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-page-view",u.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const o=e.document,r=this.documentColorsCount;this.documentColors.clear();for(const i of o.getRootNames()){const s=o.getRoot(i),n=e.createRangeIn(s);for(const e of n.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=r))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,o=this.selectedColor;t.selectedColor=o,e&&(e.selectedColor=o)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=i.Template.bind(this.documentColors,this.documentColors),t=new i.LabelView(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorTablesElementsToFocusTracker(),this.focus()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorTablesElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new i.ButtonView,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:i.icons.colorPaletteIcon,class:"ck-color-table__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("showColorPicker")}))}_createRemoveColorButton(){const t=new i.ButtonView;return t.set({withText:!0,icon:e.icons.eraser,label:this._removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),t.render(),t}_createStaticColorsGrid(){const e=new i.ColorGridView(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=i.Template.bind(this.documentColors,this.documentColors),t=new i.ColorGridView(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new i.ColorTileView;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,o,r)=>{r&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class m extends i.View{constructor(e,{focusTracker:t,focusables:o,keystrokes:r,colorPickerConfig:i}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=r,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=o,this._pickerConfig=i;const s=this.bindTemplate,{saveButtonView:n,cancelButtonView:l}=this._createActionButtons();this.saveButtonView=n,this.cancelButtonView=l,this.actionBarView=this._createActionBarView({saveButtonView:n,cancelButtonView:l}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-page-view",s.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new i.ColorPickerView(this.locale,this._pickerConfig);this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,o,r)=>{e.color=r})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);this.focusTracker.add(this.colorPickerView.hexInputRow.children.get(1).element),this._focusables.add(this.colorPickerView.hexInputRow.children.get(1)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const o=new i.View,r=this.createCollection();return r.add(e),r.add(t),o.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table_action-bar"]},children:r}),o}_createActionButtons(){const t=this.locale,o=t.t,r=new i.ButtonView(t),s=new i.ButtonView(t);return r.set({icon:e.icons.check,class:"ck-button-save",withText:!1,label:o("Accept"),type:"submit"}),s.set({icon:e.icons.cancel,class:"ck-button-cancel",withText:!1,label:o("Cancel")}),r.on("execute",(()=>{this.fire("execute",{source:"saveButton",value:this.selectedColor})})),s.on("execute",(()=>{this.fire("cancel")})),{saveButtonView:r,cancelButtonView:s}}_executeUponColorChange(){this.colorPickerView.on("change:color",((e,t,o)=>{this.fire("execute",{value:o,source:"colorPicker"})}))}}const p="fontSize",f="fontFamily",g="fontColor",b="fontBackgroundColor";function k(e,t){const o={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)o.model.values.push(e.model),o.view[e.model]=e.view,e.upcastAlso&&(o.upcastAlso[e.model]=e.upcastAlso);return o}function w(e){return t=>t.getStyle(e).replace(/\s/g,"")}function v(e){return(t,{writer:o})=>o.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class C extends t{constructor(e){super(e,f)}}function y(e){return e.map(x).filter((e=>void 0!==e))}function x(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),o=t[0],r=t.map(P).join(", ");return{title:o,model:r,view:{name:"span",styles:{"font-family":r},priority:7}}}(e):void 0}function P(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class V extends e.Plugin{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(f,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:f}),e.model.schema.setAttributeProperties(f,{isFormatting:!0,copyOnEnter:!0});const t=y(e.config.get("fontFamily.options")).filter((e=>e.model)),o=k(f,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(o),e.commands.add(f,new C(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:f,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:f,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:f,value:e=>e.getAttribute("face")}})}}class _ extends e.Plugin{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),r=e.commands.get(f),n=t("Font Family");e.ui.componentFactory.add(f,(t=>{const l=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(l,(()=>function(e,t){const o=new s.Collection;for(const r of e){const e={type:"button",model:new i.Model({commandName:f,commandParam:r.model,label:r.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===r.model||!(!e||!r.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===r.model.toLowerCase())),r.view&&"string"!=typeof r.view&&r.view.styles&&e.model.set("labelStyle",`font-family: ${r.view.styles["font-family"]}`),o.add(e)}return o}(o,r)),{role:"menu",ariaLabel:n}),l.buttonView.set({label:n,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',tooltip:!0}),l.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),l}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return y(e.config.get(f).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class T extends e.Plugin{static get requires(){return[V,_]}static get pluginName(){return"FontFamily"}}var B=o(492);class L extends t{constructor(e){super(e,p)}}function F(e){return e.map((e=>function(e){"number"==typeof e&&(e=String(e));if("object"==typeof e&&(t=e,t.title&&t.model&&t.view))return A(e);var t;const o=function(e){return"string"==typeof e?S[e]:S[e.model]}(e);if(o)return A(o);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new s.CKEditorError("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e))return;return function(e){"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`});return e.view={name:"span",styles:{"font-size":e.model}},A(e)}(e)}(e))).filter((e=>void 0!==e))}const S={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function A(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const E=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class z extends e.Plugin{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(p,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:p}),e.model.schema.setAttributeProperties(p,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),o=F(this.editor.config.get("fontSize.options")).filter((e=>e.model)),r=k(p,o);t?(this._prepareAnyValueConverters(r),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(r),e.commands.add(p,new L(e))}_prepareAnyValueConverters(e){const t=this.editor,o=e.model.values.filter((e=>!(0,B.isLength)(String(e))&&!(0,B.isPercentage)(String(e))));if(o.length)throw new s.CKEditorError("font-size-invalid-use-of-named-presets",null,{presets:o});t.conversion.for("downcast").attributeToElement({model:p,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:p,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:p,value:e=>{const t=e.getAttribute("size"),o="-"===t[0]||"+"===t[0];let r=parseInt(t,10);o&&(r=3+r);const i=E.length-1,s=Math.min(Math.max(r,0),i);return E[s]}}})}}var G=o(222),N={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(G.Z,N);G.Z.locals;class O extends e.Plugin{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),r=e.commands.get(p),n=t("Font Size");e.ui.componentFactory.add(p,(t=>{const l=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(l,(()=>function(e,t){const o=new s.Collection;for(const r of e){const e={type:"button",model:new i.Model({commandName:p,commandParam:r.model,label:r.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};r.view&&"string"!=typeof r.view&&(r.view.styles&&e.model.set("labelStyle",`font-size:${r.view.styles["font-size"]}`),r.view.classes&&e.model.set("class",`${e.model.class} ${r.view.classes}`)),e.model.bind("isOn").to(t,"value",(e=>e===r.model)),o.add(e)}return o}(o,r)),{role:"menu",ariaLabel:n}),l.buttonView.set({label:n,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',tooltip:!0}),l.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),l}))}_getLocalizedOptions(){const e=this.editor,t=e.t,o={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return F(e.config.get(p).options).map((e=>{const t=o[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class D extends e.Plugin{static get requires(){return[z,O]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return F(e)}}class j extends t{constructor(e){super(e,g)}}class I extends e.Plugin{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(g,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:g,value:w("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:g,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:g,view:v("color")}),e.commands.add(g,new j(e)),e.model.schema.extend("$text",{allowAttributes:g}),e.model.schema.setAttributeProperties(g,{isFormatting:!0,copyOnEnter:!0})}}class H extends e.Plugin{constructor(e,{commandName:t,componentName:o,icon:r,dropdownLabel:i}){super(e),this.commandName=t,this.componentName=o,this.icon=r,this.dropdownLabel=i,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,o=t.t,r=e.commands.get(this.commandName),s=e.config.get(this.componentName),n=(0,i.normalizeColorOptions)(s.colors),l=(0,i.getLocalizedColorOptions)(t,n),c=s.documentColors,a=!1!==s.colorPicker;e.ui.componentFactory.add(this.componentName,(t=>{const n=(0,i.createDropdown)(t);let u=!1;return this.colorTableView=function({dropdownView:e,colors:t,columns:o,removeButtonLabel:r,colorPickerLabel:i,documentColorsLabel:s,documentColorsCount:n,colorPickerConfig:l}){const c=e.locale,a=new d(c,{colors:t,columns:o,removeButtonLabel:r,colorPickerLabel:i,documentColorsLabel:s,documentColorsCount:n,colorPickerConfig:l});return e.colorTableView=a,e.panelView.children.add(a),a}({dropdownView:n,colors:l.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:o("Remove color"),colorPickerLabel:o("Color picker"),documentColorsLabel:0!==c?o("Document colors"):"",documentColorsCount:void 0===c?this.columns:c,colorPickerConfig:!!a&&(s.colorPicker||{})}),this.colorTableView.bind("selectedColor").to(r,"value"),n.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),n.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),n.bind("isEnabled").to(r),this.colorTableView.on("execute",((t,o)=>{n.isOpen&&e.execute(this.commandName,{value:o.value,batch:this._undoStepBatch}),"colorPicker"!==o.source&&e.editing.view.focus()})),this.colorTableView.on("showColorPicker",(()=>{this._undoStepBatch=e.model.createBatch()})),this.colorTableView.on("cancel",(()=>{this._undoStepBatch.operations.length&&(n.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()})),n.on("change:isOpen",((t,o,r)=>{u||(u=!0,n.colorTableView.appendUI()),r?(0!==c&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors()):this.colorTableView.showColorGrids()})),(0,i.focusChildOnDropdownOpen)(n,(()=>n.colorTableView.colorGridsPageView.staticColorsGrid.items.find((e=>e.isOn)))),n}))}}class R extends H{constructor(e){const t=e.locale.t;super(e,{commandName:g,componentName:g,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.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 2z"/></svg>',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class M extends e.Plugin{static get requires(){return[I,R]}static get pluginName(){return"FontColor"}}class K extends t{constructor(e){super(e,b)}}class $ extends e.Plugin{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(b,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(B.addBackgroundRules),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:b,value:w("background-color")}}),e.conversion.for("downcast").attributeToElement({model:b,view:v("background-color")}),e.commands.add(b,new K(e)),e.model.schema.extend("$text",{allowAttributes:b}),e.model.schema.setAttributeProperties(b,{isFormatting:!0,copyOnEnter:!0})}}class U extends H{constructor(e){const t=e.locale.t;super(e,{commandName:b,componentName:b,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class q extends e.Plugin{static get requires(){return[$,U]}static get pluginName(){return"FontBackgroundColor"}}class Z extends e.Plugin{static get requires(){return[T,D,M,q]}static get pluginName(){return"Font"}}})(),(window.CKEditor5=window.CKEditor5||{}).font=r})(); | ||
*/(()=>{var e={159:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(609),i=o.n(r)()((function(e){return e[1]}));i.push([e.id,".ck .ck-button.ck-color-table__color-picker,.ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}[dir=rtl] .ck .ck-button.ck-color-table__color-picker,[dir=rtl] .ck .ck-button.ck-color-table__remove-color{justify-content:flex-start}.ck .ck-button.ck-color-table__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-picker{padding:8px}.ck.ck-color-picker .hex-color-picker{height:100px;margin:0 0 var(--ck-spacing-large) 0}.ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-table_action-bar{display:flex;flex-direction:row;justify-content:space-around;padding:0 8px 8px}.ck.ck-color-table_action-bar .ck-button-cancel,.ck.ck-color-table_action-bar .ck-button-save{flex:1}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}",""]);const s=i},222:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(609),i=o.n(r)()((function(e){return e[1]}));i.push([e.id,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}",""]);const s=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var s=0;s<this.length;s++){var n=this[s][0];null!=n&&(i[n]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);r&&i[c[0]]||(o&&(c[2]?c[2]="".concat(o," and ").concat(c[2]):c[2]=o),t.push(c))}},t}},62:(e,t,o)=>{"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},s=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),n=[];function l(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function c(e,t){for(var o={},r=[],i=0;i<e.length;i++){var s=e[i],c=t.base?s[0]+t.base:s[0],a=o[c]||0,u="".concat(c," ").concat(a);o[c]=a+1;var d=l(u),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(n[d].references++,n[d].updater(h)):n.push({identifier:u,updater:g(h,t),references:1}),r.push(u)}return r}function a(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=o.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var n=s(e.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,o,r){var i=o?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var s=document.createTextNode(i),n=e.childNodes;n[t]&&e.removeChild(n[t]),n.length?e.insertBefore(s,n[t]):e.appendChild(s)}}function m(e,t,o){var r=o.css,i=o.media,s=o.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,f=0;function g(e,t){var o,r,i;if(t.singleton){var s=f++;o=p||(p=a(t)),r=h.bind(null,o,s,!1),i=h.bind(null,o,s,!0)}else o=a(t),r=m.bind(null,o,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var o=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<o.length;r++){var i=l(o[r]);n[i].references--}for(var s=c(e,t),a=0;a<o.length;a++){var u=l(o[a]);0===n[u].references&&(n[u].updater(),n.splice(u,1))}o=s}}}},704:(e,t,o)=>{e.exports=o(79)("./src/core.js")},492:(e,t,o)=>{e.exports=o(79)("./src/engine.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},209:(e,t,o)=>{e.exports=o(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var r={};(()=>{"use strict";o.r(r),o.d(r,{Font:()=>Z,FontBackgroundColor:()=>q,FontBackgroundColorEditing:()=>$,FontBackgroundColorUI:()=>U,FontColor:()=>M,FontColorEditing:()=>I,FontColorUI:()=>R,FontFamily:()=>T,FontFamilyEditing:()=>V,FontFamilyUI:()=>_,FontSize:()=>D,FontSizeEditing:()=>z,FontSizeUI:()=>O});var e=o(704);class t extends e.Command{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,o=t.document.selection,r=e.value,i=e.batch,s=e=>{if(o.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,r):e.removeSelectionAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of i)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}};i?t.enqueueChange(i,(e=>{s(e)})):t.change((e=>{s(e)}))}}var i=o(273),s=o(209);class n extends((0,s.ObservableMixin)(s.Collection)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}var l=o(62),c=o.n(l),a=o(159),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(a.Z,u);a.Z.locals;class d extends i.View{constructor(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:n,documentColorsCount:l,colorPickerLabel:c,colorPickerConfig:a}){super(e),this.items=this.createCollection(),this.focusTracker=new s.FocusTracker,this.keystrokes=new s.KeystrokeHandler,this._focusables=new i.ViewCollection,this._colorPickerConfig=a,this._focusCycler=new i.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsPageView=new h(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:n,documentColorsCount:l,colorPickerLabel:c,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerPageView=new m(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerConfig:a}),this.set("_isColorGridsPageVisible",!0),this.set("_isColorPickerPageVisible",!1),this.set("selectedColor",void 0),this.colorGridsPageView.bind("isVisible").to(this,"_isColorGridsPageVisible"),this.colorPickerPageView.bind("isVisible").to(this,"_isColorPickerPageVisible"),this.on("change:selectedColor",((e,t,o)=>{this.colorGridsPageView.set("selectedColor",o),this.colorPickerPageView.set("selectedColor",o)})),this.colorGridsPageView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.colorPickerPageView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){this.items.length||(this.items.add(this.colorGridsPageView),this.colorGridsPageView.delegate("execute").to(this),this.colorGridsPageView.delegate("showColorPicker").to(this))}appendUI(){this.appendGrids(),this._colorPickerConfig&&this._appendColorPicker()}showColorPicker(){this.colorPickerPageView.colorPickerView&&(this.set("_isColorPickerPageVisible",!0),this.colorPickerPageView.focus(),this.set("_isColorGridsPageVisible",!1))}showColorGrids(){this.set("_isColorGridsPageVisible",!0),this.set("_isColorPickerPageVisible",!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsPageView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsPageView.updateSelectedColors()}_appendColorPicker(){2!==this.items.length&&(this.items.add(this.colorPickerPageView),this.colorGridsPageView.colorPickerButtonView&&this.colorGridsPageView.colorPickerButtonView.on("execute",(()=>{this.showColorPicker()})),this.colorGridsPageView.addColorPickerButton(),this.colorPickerPageView.delegate("execute").to(this),this.colorPickerPageView.delegate("cancel").to(this))}}class h extends i.View{constructor(e,{colors:t,columns:o,removeButtonLabel:r,documentColorsLabel:i,documentColorsCount:s,colorPickerLabel:l,focusTracker:c,focusables:a}){super(e);const u=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=c,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=o,this.documentColors=new n,this.documentColorsCount=s,this._focusables=a,this._removeButtonLabel=r,this._colorPickerLabel=l,this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-page-view",u.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const o=e.document,r=this.documentColorsCount;this.documentColors.clear();for(const i of o.getRootNames()){const s=o.getRoot(i),n=e.createRangeIn(s);for(const e of n.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=r))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,o=this.selectedColor;t.selectedColor=o,e&&(e.selectedColor=o)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=i.Template.bind(this.documentColors,this.documentColors),t=new i.LabelView(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorTablesElementsToFocusTracker(),this.focus()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorTablesElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new i.ButtonView,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:i.icons.colorPaletteIcon,class:"ck-color-table__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("showColorPicker")}))}_createRemoveColorButton(){const t=new i.ButtonView;return t.set({withText:!0,icon:e.icons.eraser,label:this._removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),t.render(),t}_createStaticColorsGrid(){const e=new i.ColorGridView(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=i.Template.bind(this.documentColors,this.documentColors),t=new i.ColorGridView(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new i.ColorTileView;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,o,r)=>{r&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class m extends i.View{constructor(e,{focusTracker:t,focusables:o,keystrokes:r,colorPickerConfig:i}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=r,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=o,this._pickerConfig=i;const s=this.bindTemplate,{saveButtonView:n,cancelButtonView:l}=this._createActionButtons();this.saveButtonView=n,this.cancelButtonView=l,this.actionBarView=this._createActionBarView({saveButtonView:n,cancelButtonView:l}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-page-view",s.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new i.ColorPickerView(this.locale,this._pickerConfig);this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,o,r)=>{e.color=r})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);this.focusTracker.add(this.colorPickerView.hexInputRow.children.get(1).element),this._focusables.add(this.colorPickerView.hexInputRow.children.get(1)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const o=new i.View,r=this.createCollection();return r.add(e),r.add(t),o.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table_action-bar"]},children:r}),o}_createActionButtons(){const t=this.locale,o=t.t,r=new i.ButtonView(t),s=new i.ButtonView(t);return r.set({icon:e.icons.check,class:"ck-button-save",withText:!1,label:o("Accept"),type:"button"}),s.set({icon:e.icons.cancel,class:"ck-button-cancel",withText:!1,label:o("Cancel")}),r.on("execute",(()=>{this.fire("execute",{source:"saveButton",value:this.selectedColor})})),s.on("execute",(()=>{this.fire("cancel")})),{saveButtonView:r,cancelButtonView:s}}_executeUponColorChange(){this.colorPickerView.on("change:color",((e,t,o)=>{this.fire("execute",{value:o,source:"colorPicker"})}))}}const p="fontSize",f="fontFamily",g="fontColor",b="fontBackgroundColor";function k(e,t){const o={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)o.model.values.push(e.model),o.view[e.model]=e.view,e.upcastAlso&&(o.upcastAlso[e.model]=e.upcastAlso);return o}function w(e){return t=>t.getStyle(e).replace(/\s/g,"")}function v(e){return(t,{writer:o})=>o.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class C extends t{constructor(e){super(e,f)}}function y(e){return e.map(x).filter((e=>void 0!==e))}function x(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),o=t[0],r=t.map(P).join(", ");return{title:o,model:r,view:{name:"span",styles:{"font-family":r},priority:7}}}(e):void 0}function P(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class V extends e.Plugin{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(f,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:f}),e.model.schema.setAttributeProperties(f,{isFormatting:!0,copyOnEnter:!0});const t=y(e.config.get("fontFamily.options")).filter((e=>e.model)),o=k(f,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(o),e.commands.add(f,new C(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:f,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:f,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:f,value:e=>e.getAttribute("face")}})}}class _ extends e.Plugin{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),r=e.commands.get(f),n=t("Font Family");e.ui.componentFactory.add(f,(t=>{const l=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(l,(()=>function(e,t){const o=new s.Collection;for(const r of e){const e={type:"button",model:new i.Model({commandName:f,commandParam:r.model,label:r.title,role:"menuitemradio",withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===r.model||!(!e||!r.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===r.model.toLowerCase())),r.view&&"string"!=typeof r.view&&r.view.styles&&e.model.set("labelStyle",`font-family: ${r.view.styles["font-family"]}`),o.add(e)}return o}(o,r)),{role:"menu",ariaLabel:n}),l.buttonView.set({label:n,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>',tooltip:!0}),l.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),l}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return y(e.config.get(f).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class T extends e.Plugin{static get requires(){return[V,_]}static get pluginName(){return"FontFamily"}}var B=o(492);class L extends t{constructor(e){super(e,p)}}function F(e){return e.map((e=>function(e){"number"==typeof e&&(e=String(e));if("object"==typeof e&&(t=e,t.title&&t.model&&t.view))return A(e);var t;const o=function(e){return"string"==typeof e?S[e]:S[e.model]}(e);if(o)return A(o);if("default"===e)return{model:void 0,title:"Default"};if(function(e){let t;if("object"==typeof e){if(!e.model)throw new s.CKEditorError("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e))return;return function(e){"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`});return e.view={name:"span",styles:{"font-size":e.model}},A(e)}(e)}(e))).filter((e=>void 0!==e))}const S={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function A(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const E=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class z extends e.Plugin{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(p,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:p}),e.model.schema.setAttributeProperties(p,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),o=F(this.editor.config.get("fontSize.options")).filter((e=>e.model)),r=k(p,o);t?(this._prepareAnyValueConverters(r),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(r),e.commands.add(p,new L(e))}_prepareAnyValueConverters(e){const t=this.editor,o=e.model.values.filter((e=>!(0,B.isLength)(String(e))&&!(0,B.isPercentage)(String(e))));if(o.length)throw new s.CKEditorError("font-size-invalid-use-of-named-presets",null,{presets:o});t.conversion.for("downcast").attributeToElement({model:p,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:p,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:p,value:e=>{const t=e.getAttribute("size"),o="-"===t[0]||"+"===t[0];let r=parseInt(t,10);o&&(r=3+r);const i=E.length-1,s=Math.min(Math.max(r,0),i);return E[s]}}})}}var G=o(222),N={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(G.Z,N);G.Z.locals;class O extends e.Plugin{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,o=this._getLocalizedOptions(),r=e.commands.get(p),n=t("Font Size");e.ui.componentFactory.add(p,(t=>{const l=(0,i.createDropdown)(t);return(0,i.addListToDropdown)(l,(()=>function(e,t){const o=new s.Collection;for(const r of e){const e={type:"button",model:new i.Model({commandName:p,commandParam:r.model,label:r.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};r.view&&"string"!=typeof r.view&&(r.view.styles&&e.model.set("labelStyle",`font-size:${r.view.styles["font-size"]}`),r.view.classes&&e.model.set("class",`${e.model.class} ${r.view.classes}`)),e.model.bind("isOn").to(t,"value",(e=>e===r.model)),o.add(e)}return o}(o,r)),{role:"menu",ariaLabel:n}),l.buttonView.set({label:n,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>',tooltip:!0}),l.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),l}))}_getLocalizedOptions(){const e=this.editor,t=e.t,o={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return F(e.config.get(p).options).map((e=>{const t=o[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class D extends e.Plugin{static get requires(){return[z,O]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return F(e)}}class j extends t{constructor(e){super(e,g)}}class I extends e.Plugin{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(g,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:g,value:w("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:g,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:g,view:v("color")}),e.commands.add(g,new j(e)),e.model.schema.extend("$text",{allowAttributes:g}),e.model.schema.setAttributeProperties(g,{isFormatting:!0,copyOnEnter:!0})}}class H extends e.Plugin{constructor(e,{commandName:t,componentName:o,icon:r,dropdownLabel:i}){super(e),this.commandName=t,this.componentName=o,this.icon=r,this.dropdownLabel=i,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,o=t.t,r=e.commands.get(this.commandName),s=e.config.get(this.componentName),n=(0,i.normalizeColorOptions)(s.colors),l=(0,i.getLocalizedColorOptions)(t,n),c=s.documentColors,a=!1!==s.colorPicker;e.ui.componentFactory.add(this.componentName,(t=>{const n=(0,i.createDropdown)(t);let u=!1;return this.colorTableView=function({dropdownView:e,colors:t,columns:o,removeButtonLabel:r,colorPickerLabel:i,documentColorsLabel:s,documentColorsCount:n,colorPickerConfig:l}){const c=e.locale,a=new d(c,{colors:t,columns:o,removeButtonLabel:r,colorPickerLabel:i,documentColorsLabel:s,documentColorsCount:n,colorPickerConfig:l});return e.colorTableView=a,e.panelView.children.add(a),a}({dropdownView:n,colors:l.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:o("Remove color"),colorPickerLabel:o("Color picker"),documentColorsLabel:0!==c?o("Document colors"):"",documentColorsCount:void 0===c?this.columns:c,colorPickerConfig:!!a&&(s.colorPicker||{})}),this.colorTableView.bind("selectedColor").to(r,"value"),n.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),n.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),n.bind("isEnabled").to(r),this.colorTableView.on("execute",((t,o)=>{n.isOpen&&e.execute(this.commandName,{value:o.value,batch:this._undoStepBatch}),"colorPicker"!==o.source&&e.editing.view.focus()})),this.colorTableView.on("showColorPicker",(()=>{this._undoStepBatch=e.model.createBatch()})),this.colorTableView.on("cancel",(()=>{this._undoStepBatch.operations.length&&(n.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()})),n.on("change:isOpen",((t,o,r)=>{u||(u=!0,n.colorTableView.appendUI()),r?(0!==c&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors()):this.colorTableView.showColorGrids()})),(0,i.focusChildOnDropdownOpen)(n,(()=>n.colorTableView.colorGridsPageView.staticColorsGrid.items.find((e=>e.isOn)))),n}))}}class R extends H{constructor(e){const t=e.locale.t;super(e,{commandName:g,componentName:g,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.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 2z"/></svg>',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class M extends e.Plugin{static get requires(){return[I,R]}static get pluginName(){return"FontColor"}}class K extends t{constructor(e){super(e,b)}}class $ extends e.Plugin{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(b,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(B.addBackgroundRules),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:b,value:w("background-color")}}),e.conversion.for("downcast").attributeToElement({model:b,view:v("background-color")}),e.commands.add(b,new K(e)),e.model.schema.extend("$text",{allowAttributes:b}),e.model.schema.setAttributeProperties(b,{isFormatting:!0,copyOnEnter:!0})}}class U extends H{constructor(e){const t=e.locale.t;super(e,{commandName:b,componentName:b,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class q extends e.Plugin{static get requires(){return[$,U]}static get pluginName(){return"FontBackgroundColor"}}class Z extends e.Plugin{static get requires(){return[T,D,M,q]}static get pluginName(){return"Font"}}})(),(window.CKEditor5=window.CKEditor5||{}).font=r})(); |
@@ -1,1 +0,1 @@ | ||
!function(i){const o=i.it=i.it||{};o.dictionary=Object.assign(o.dictionary||{},{Accept:"",Big:"Grandi",Default:"Predefinito","Document colors":"Colori del docmento","Font Background Color":"Colore di sfondo caratteri","Font Color":"Colore caratteri","Font Family":"Tipo di caratteri","Font Size":"Dimensione caratteri",Huge:"Grandissimi",Small:"Piccoli",Tiny:"Piccolissimi"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})); | ||
!function(i){const o=i.it=i.it||{};o.dictionary=Object.assign(o.dictionary||{},{Accept:"Accetta",Big:"Grandi",Default:"Predefinito","Document colors":"Colori del docmento","Font Background Color":"Colore di sfondo caratteri","Font Color":"Colore caratteri","Font Family":"Tipo di caratteri","Font Size":"Dimensione caratteri",Huge:"Grandissimi",Small:"Piccoli",Tiny:"Piccolissimi"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})); |
{ | ||
"name": "@ckeditor/ckeditor5-font", | ||
"version": "38.0.1", | ||
"version": "38.1.0", | ||
"description": "Font feature for CKEditor 5.", | ||
@@ -15,20 +15,5 @@ "keywords": [ | ||
"dependencies": { | ||
"ckeditor5": "^38.0.1", | ||
"@ckeditor/ckeditor5-ui": "^38.0.1" | ||
"ckeditor5": "38.1.0", | ||
"@ckeditor/ckeditor5-ui": "38.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-undo": "^38.0.1", | ||
"@ckeditor/ckeditor5-core": "^38.0.1", | ||
"@ckeditor/ckeditor5-dev-utils": "^37.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^38.0.1", | ||
"@ckeditor/ckeditor5-engine": "^38.0.1", | ||
"@ckeditor/ckeditor5-highlight": "^38.0.1", | ||
"@ckeditor/ckeditor5-paragraph": "^38.0.1", | ||
"@ckeditor/ckeditor5-table": "^38.0.1", | ||
"@ckeditor/ckeditor5-theme-lark": "^38.0.1", | ||
"@ckeditor/ckeditor5-utils": "^38.0.1", | ||
"typescript": "^4.8.4", | ||
"webpack": "^5.58.1", | ||
"webpack-cli": "^4.9.0" | ||
}, | ||
"engines": { | ||
@@ -56,8 +41,3 @@ "node": ">=16.0.0", | ||
], | ||
"scripts": { | ||
"dll:build": "webpack", | ||
"build": "tsc -p ./tsconfig.json", | ||
"postversion": "npm run build" | ||
}, | ||
"types": "src/index.d.ts" | ||
} |
@@ -32,3 +32,3 @@ /** | ||
*/ | ||
static get pluginName(): 'Font'; | ||
static get pluginName(): "Font"; | ||
} |
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontBackgroundColor'; | ||
static get pluginName(): "FontBackgroundColor"; | ||
} |
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontBackgroundColorEditing'; | ||
static get pluginName(): "FontBackgroundColorEditing"; | ||
/** | ||
@@ -24,0 +24,0 @@ * @inheritDoc |
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontBackgroundColorUI'; | ||
static get pluginName(): "FontBackgroundColorUI"; | ||
} |
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontColor'; | ||
static get pluginName(): "FontColor"; | ||
} |
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontColorEditing'; | ||
static get pluginName(): "FontColorEditing"; | ||
/** | ||
@@ -24,0 +24,0 @@ * @inheritDoc |
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontColorUI'; | ||
static get pluginName(): "FontColorUI"; | ||
} |
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontFamily'; | ||
static get pluginName(): "FontFamily"; | ||
} |
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontFamilyEditing'; | ||
static get pluginName(): "FontFamilyEditing"; | ||
/** | ||
@@ -24,0 +24,0 @@ * @inheritDoc |
@@ -16,3 +16,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontFamilyUI'; | ||
static get pluginName(): "FontFamilyUI"; | ||
/** | ||
@@ -19,0 +19,0 @@ * @inheritDoc |
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontSize'; | ||
static get pluginName(): "FontSize"; | ||
/** | ||
@@ -32,0 +32,0 @@ * Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options} |
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontSizeEditing'; | ||
static get pluginName(): "FontSizeEditing"; | ||
/** | ||
@@ -27,0 +27,0 @@ * @inheritDoc |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
static get pluginName(): 'FontSizeUI'; | ||
static get pluginName(): "FontSizeUI"; | ||
/** | ||
@@ -20,0 +20,0 @@ * @inheritDoc |
@@ -611,3 +611,3 @@ /** | ||
label: t('Accept'), | ||
type: 'submit' | ||
type: 'button' | ||
}); | ||
@@ -614,0 +614,0 @@ cancelButtonView.set({ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
337202
+ Added@ckeditor/ckeditor5-clipboard@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-core@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-engine@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-enter@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-paragraph@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-select-all@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-typing@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-ui@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-undo@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-upload@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-utils@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-watchdog@38.1.0(transitive)
+ Added@ckeditor/ckeditor5-widget@38.1.0(transitive)
+ Addedckeditor5@38.1.0(transitive)
- Removed@ckeditor/ckeditor5-clipboard@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-core@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-engine@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-enter@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-paragraph@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-select-all@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-typing@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-ui@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-undo@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-upload@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-utils@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-watchdog@38.1.1(transitive)
- Removed@ckeditor/ckeditor5-widget@38.1.1(transitive)
- Removedckeditor5@38.1.1(transitive)
Updatedckeditor5@38.1.0