From 25f072257a0995495b456a091ef6f2ed8f78f855 Mon Sep 17 00:00:00 2001 From: Benjamin Klix Date: Mon, 10 Jan 2022 09:24:37 +0100 Subject: [PATCH 1/7] TASK: Add option to set other attributes (not only class) --- README.md | 47 +++++++++++++------ .../CkStyles/src/BlockStyleEditing.js | 13 ++--- .../CkStyles/src/InlineStylesEditing.js | 9 ++-- .../JavaScript/CkStyles/src/PresetType.js | 15 +++++- .../JavaScript/CkStyles/src/manifest.js | 2 +- .../Public/JavaScript/CkStyles/Plugin.js | 30 +++++++++--- .../Public/JavaScript/CkStyles/Plugin.js.map | 2 +- 7 files changed, 82 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 8505fc0..10c7a52 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # TechDivision.CkStyles -This package allows to add different styles based on your css-classes for the CkEditor in Neos. -You can define the classes in you yaml configuration. +This package allows to add different styles based on your css-classes for the CkEditor in Neos. +You can define the classes in you yaml configuration. Styles can be applied both on block- and element level. +It is also possible to set a different attribute (for usage with placeholders for example). + **Demo:** ![Applying inline style](Documentation/assets/InlineStyleDemo.gif "Inline style") @@ -15,19 +17,20 @@ Styles can be applied both on block- and element level. ```html

- This is an - awesome - inline editable - text with some custom + This is an + awesome + inline editable + text with some custom styling :)

``` -## Benefits +## Benefits -In most projects there are requirements that you cannot achieve with tags alone and you need classes under editorial control - +In most projects there are requirements that you cannot achieve with tags alone and you need classes under editorial control - e.g. if you want to highlight some text with font size but don't use a headline for SEO reasons -or want to add an icon, adjust the font color ... +or want to add an icon, adjust the font color ... +Or you want to add data-attributes to an element for use in combination with js ... ## Getting started @@ -62,6 +65,11 @@ TechDivision: 'big': label: 'Large' cssClass: 'my-class-size-large' + 'dataAttribute': + 'customValue': + label: 'Custom data attribute' + attribute: 'data-attribute' + attributeValue: 'my-custom-attribute-value' BlockStyles: presets: 'indent': @@ -73,15 +81,22 @@ TechDivision: 'secondary': label: '4 rem' cssClass: 'my-class-indent-4' + 'data': + label: 'Data attribute' + options: + 'data': + label: 'Block data' + attribute: 'data-attribute' + attributeValue: 'my-custom-attribute-value' ``` Example: [Configuration/Settings.yaml](Configuration/Settings.yaml) -**What values are allowed for cssClass?** +**What values are allowed for `cssClass` and/or `attributeValue`?** - **Not null** Using an empty class (cssClass: null) to unset the value might cause errors during rendering in the backend. The select boxes of this package contain an "x" button for resetting the value. - You can add **multiple classes** by separating them with a whitespace. e.g. "btn btn-primary" --- *Caution* There is a known issue for block styles when using two options when one contains the other. e.g. "color-red" and "color-red bold". Please try to avoid this for block styles. +-- *Caution* There is a known issue for block styles when using two options when one contains the other. e.g. "color-red" and "color-red bold". Please try to avoid this for block styles. **Activate the preset for your inline editable NodeType property:** @@ -94,10 +109,12 @@ Example: [Configuration/Settings.yaml](Configuration/Settings.yaml) inline: editorOptions: inlineStyling: + dataAttribute: true fontColor: true fontSize: true blockStyling: indent: true + data: true ``` Example: [Configuration/NodeTypes.Override.BaseMixins.yaml](Configuration/NodeTypes.Override.BaseMixins.yaml) @@ -126,16 +143,16 @@ Example: [Configuration/NodeTypes.Override.BaseMixins.yaml](Configuration/NodeTy ``` -## Development +## Development This project works with yarn. The build process given by the neos developers is not very -configurable, only the target dir for the buildprocess is adjustable by +configurable, only the target dir for the buildprocess is adjustable by package.json. ```shell nvm install ``` -If you don't have [yarn](https://yarnpkg.com/lang/en/docs/install/) already installed: +If you don't have [yarn](https://yarnpkg.com/lang/en/docs/install/) already installed: ```shell brew install yarn @@ -154,5 +171,5 @@ Build the app: You are very welcome to contribute by merge requests, adding issues etc. -**Thank you** 🤝 [Sebastian Kurfürst](https://twitter.com/skurfuerst) for the great workshop which helped us +**Thank you** 🤝 [Sebastian Kurfürst](https://twitter.com/skurfuerst) for the great workshop which helped us implementing this. diff --git a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js index c746bd2..a0c960b 100644 --- a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js @@ -30,13 +30,14 @@ export default (presetIdentifier, presetConfiguration) => // View configuration Object.keys(presetConfiguration.options).forEach(optionIdentifier => { - - const classes = presetConfiguration.options[optionIdentifier].cssClass.split(' '); + const options = presetConfiguration.options[optionIdentifier]; + const attribute = options.attribute || 'class'; + const attributeValues = (options.attributeValue || options.cssClass).split(' '); config.view[optionIdentifier] = { - key: 'class', - value: classes - } + key: attribute, + value: attributeValues, + }; }); // Convert the model to view correctly @@ -44,4 +45,4 @@ export default (presetIdentifier, presetConfiguration) => this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, `blockStyles-${presetIdentifier}`)); } - } + }; diff --git a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js index c5ae2d4..6cba1f9 100644 --- a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js @@ -30,12 +30,13 @@ export default (presetIdentifier, presetConfiguration) => // View configuration Object.keys(presetConfiguration.options).forEach(optionIdentifier => { - - const classes = presetConfiguration.options[optionIdentifier].cssClass; + const options = presetConfiguration.options[optionIdentifier]; + const { attribute } = options; + const classes = options.attributeValue || options.cssClass; config.view[optionIdentifier] = { name: 'span', - attributes: { 'class': classes } + attributes: { [attribute]: classes } } }); @@ -44,4 +45,4 @@ export default (presetIdentifier, presetConfiguration) => this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, `inlineStyles-${presetIdentifier}`)); } - } + }; diff --git a/Resources/Private/JavaScript/CkStyles/src/PresetType.js b/Resources/Private/JavaScript/CkStyles/src/PresetType.js index 12dcca7..31fc628 100644 --- a/Resources/Private/JavaScript/CkStyles/src/PresetType.js +++ b/Resources/Private/JavaScript/CkStyles/src/PresetType.js @@ -1,11 +1,22 @@ import PropTypes from 'prop-types'; +function attributeValueOrCssClass(props, propName, componentName) { + if (props[propName] && typeof props[propName] !== 'string') { + return new Error(`Prop '${propName}' must be a string.`); + } + if (!props.attributeValue && !props.cssClass) { + return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`); + } +} + export default PropTypes.shape({ label: PropTypes.string.isRequired, // keys are the option values options: PropTypes.objectOf(PropTypes.shape({ label: PropTypes.string.isRequired, - cssClass: PropTypes.string.isRequired - })) + attribute: PropTypes.string, + attributeValue: attributeValueOrCssClass, + cssClass: attributeValueOrCssClass, + })), }); \ No newline at end of file diff --git a/Resources/Private/JavaScript/CkStyles/src/manifest.js b/Resources/Private/JavaScript/CkStyles/src/manifest.js index 23c60f4..3fbacb8 100644 --- a/Resources/Private/JavaScript/CkStyles/src/manifest.js +++ b/Resources/Private/JavaScript/CkStyles/src/manifest.js @@ -73,6 +73,6 @@ manifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfigura presetIdentifier: presetIdentifier, presetConfiguration: inlineStylePresetConfiguration }); - }) + }); } }); diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js b/Resources/Public/JavaScript/CkStyles/Plugin.js index c86a199..5aa7be7 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js @@ -1324,12 +1324,13 @@ exports.default = function (presetIdentifier, presetConfiguration) { // View configuration Object.keys(presetConfiguration.options).forEach(function (optionIdentifier) { - - var classes = presetConfiguration.options[optionIdentifier].cssClass.split(' '); + var options = presetConfiguration.options[optionIdentifier]; + var attribute = options.attribute || 'class'; + var attributeValues = (options.attributeValue || options.cssClass).split(' '); config.view[optionIdentifier] = { - key: 'class', - value: classes + key: attribute, + value: attributeValues }; }); @@ -1589,6 +1590,8 @@ var _InlineStylesCommand2 = _interopRequireDefault(_InlineStylesCommand); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -1628,12 +1631,14 @@ exports.default = function (presetIdentifier, presetConfiguration) { // View configuration Object.keys(presetConfiguration.options).forEach(function (optionIdentifier) { + var options = presetConfiguration.options[optionIdentifier]; + var attribute = options.attribute; - var classes = presetConfiguration.options[optionIdentifier].cssClass; + var classes = options.attributeValue || options.cssClass; config.view[optionIdentifier] = { name: 'span', - attributes: { 'class': classes } + attributes: _defineProperty({}, attribute, classes) }; }); @@ -1670,13 +1675,24 @@ var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function attributeValueOrCssClass(props, propName, componentName) { + if (props[propName] && typeof props[propName] !== 'string') { + return new Error('Prop \'' + propName + '\' must be a string.'); + } + if (!props.attributeValue && !props.cssClass) { + return new Error('Either prop \'attributeValue\' or \'cssClass\' must be supplied to ' + componentName + '.'); + } +} + exports.default = _propTypes2.default.shape({ label: _propTypes2.default.string.isRequired, // keys are the option values options: _propTypes2.default.objectOf(_propTypes2.default.shape({ label: _propTypes2.default.string.isRequired, - cssClass: _propTypes2.default.string.isRequired + attribute: _propTypes2.default.string, + attributeValue: attributeValueOrCssClass, + cssClass: attributeValueOrCssClass })) }); diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js.map b/Resources/Public/JavaScript/CkStyles/Plugin.js.map index 97ecd41..f44a6f5 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js.map +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","classes","optionIdentifier","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","name","attributes","attributeToElement","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","props","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,WAAQ;AACjDA,eAAOA,KAD0C;AAEjDC,kBAAU,KAFuC;AAGjDC,oBAAY,KAHqC;AAIjDC,sBAAc;AAJmC,KAAR;AAKxC,CALL;AAMA,SAASC,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H,iBATmD;AAUpDpE,kCAAkBA,gBAVkC;AAWpDC,qCAAqBoE;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n this.value = this._getValueFromBlockNode();\n for ( const block of blocksToChange ) {\n if(model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from( selection.getSelectedBlocks() );\n model.change( writer => {\n for ( const block of blocksToChange ) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from( selection.getSelectedBlocks() );\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n this.editor.model.schema.extend(\n '$block',\n { allowAttributes: `blockStyles-${presetIdentifier}`}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n this.editor.model.schema.setAttributeProperties(\n `blockStyles-${presetIdentifier}`,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: `blockStyles-${presetIdentifier}`,\n values: Object.keys(presetConfiguration.options),\n },\n view: {}\n };\n\n // View configuration\n Object.keys(presetConfiguration.options).forEach(optionIdentifier => {\n\n const classes = presetConfiguration.options[optionIdentifier].cssClass.split(' ');\n\n config.view[optionIdentifier] = {\n key: 'class',\n value: classes\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, `blockStyles-${presetIdentifier}`));\n }\n }\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import { Plugin } from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n this.editor.model.schema.extend(\n '$text',\n { allowAttributes: `inlineStyles-${presetIdentifier}` }\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n this.editor.model.schema.setAttributeProperties(\n `inlineStyles-${presetIdentifier}`,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: `inlineStyles-${presetIdentifier}`,\n values: Object.keys(presetConfiguration.options),\n },\n view: {}\n };\n\n // View configuration\n Object.keys(presetConfiguration.options).forEach(optionIdentifier => {\n\n const classes = presetConfiguration.options[optionIdentifier].cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: { 'class': classes }\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, `inlineStyles-${presetIdentifier}`));\n }\n }\n","import PropTypes from 'prop-types';\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n cssClass: PropTypes.string.isRequired\n }))\n});","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport { connect } from 'react-redux';\nimport { $transform } from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if(blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if(inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n })\n }\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePres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AEpD;AACAc,2BAAW,mBAASJ,aAAT,EAAwBzB,qBAAxB,EAA+C;AACtD,wBAAI6B,YAAY,KAAhB;AACA,wBAAGJ,cAAc,eAAd,MAAmCxE,SAAnC,IAAgDwE,cAAc,eAAd,EAA+BtE,gBAA/B,MAAqDF,SAAxG,EAAmH;AAC/G4E,oCAAYJ,cAAc,eAAd,EAA+BtE,gBAA/B,CAAZ;AACH;AACD,2BAAO0E,SAAP;AACH,iBATmD;AAUpD1E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB0E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n this.value = this._getValueFromBlockNode();\n for ( const block of blocksToChange ) {\n if(model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from( selection.getSelectedBlocks() );\n model.change( writer => {\n for ( const block of blocksToChange ) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from( selection.getSelectedBlocks() );\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n this.editor.model.schema.extend(\n '$block',\n { allowAttributes: `blockStyles-${presetIdentifier}`}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n this.editor.model.schema.setAttributeProperties(\n `blockStyles-${presetIdentifier}`,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: `blockStyles-${presetIdentifier}`,\n values: Object.keys(presetConfiguration.options),\n },\n view: {}\n };\n\n // View configuration\n Object.keys(presetConfiguration.options).forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (options.attributeValue || options.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues,\n };\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, `blockStyles-${presetIdentifier}`));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import { Plugin } from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n this.editor.model.schema.extend(\n '$text',\n { allowAttributes: `inlineStyles-${presetIdentifier}` }\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n this.editor.model.schema.setAttributeProperties(\n `inlineStyles-${presetIdentifier}`,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: `inlineStyles-${presetIdentifier}`,\n values: Object.keys(presetConfiguration.options),\n },\n view: {}\n };\n\n // View configuration\n Object.keys(presetConfiguration.options).forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const { attribute } = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: { [attribute]: classes }\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, `inlineStyles-${presetIdentifier}`));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport { connect } from 'react-redux';\nimport { $transform } from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if(blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if(inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file From 588750cb8360114f1c13a2f9f8f434daba38df04 Mon Sep 17 00:00:00 2001 From: Simon Paidla Date: Fri, 18 Mar 2022 10:48:48 +0100 Subject: [PATCH 2/7] Update Getting started example --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 10c7a52..34946b7 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,10 @@ TechDivision: label: 'Large' cssClass: 'my-class-size-large' 'dataAttribute': - 'customValue': - label: 'Custom data attribute' + label: 'Inline data attribute' + options: + 'data': + label: 'Inline data' attribute: 'data-attribute' attributeValue: 'my-custom-attribute-value' BlockStyles: @@ -81,8 +83,8 @@ TechDivision: 'secondary': label: '4 rem' cssClass: 'my-class-indent-4' - 'data': - label: 'Data attribute' + 'dataAttribute': + label: 'Block data attribute' options: 'data': label: 'Block data' @@ -114,7 +116,7 @@ Example: [Configuration/Settings.yaml](Configuration/Settings.yaml) fontSize: true blockStyling: indent: true - data: true + dataAttribute: true ``` Example: [Configuration/NodeTypes.Override.BaseMixins.yaml](Configuration/NodeTypes.Override.BaseMixins.yaml) From f4e2cc8b4af9e3477c0078037352f58290ff4867 Mon Sep 17 00:00:00 2001 From: Simon Paidla Date: Fri, 18 Mar 2022 12:06:09 +0100 Subject: [PATCH 3/7] Reformat code and add data-attribute feature to inlineStyles --- .../JavaScript/CkStyles/src/BlockStyleCommand.js | 16 ++++++++-------- .../JavaScript/CkStyles/src/BlockStyleEditing.js | 4 ++-- .../CkStyles/src/InlineStylesCommand.js | 2 +- .../CkStyles/src/InlineStylesEditing.js | 10 +++++----- .../src/components/BlockStyleSelector.js | 10 +++++----- .../src/components/InlineStyleSelector.js | 6 +++--- .../Private/JavaScript/CkStyles/src/manifest.js | 12 ++++++------ Resources/Public/JavaScript/CkStyles/Plugin.js | 11 +++++++---- .../Public/JavaScript/CkStyles/Plugin.js.map | 2 +- 9 files changed, 38 insertions(+), 35 deletions(-) diff --git a/Resources/Private/JavaScript/CkStyles/src/BlockStyleCommand.js b/Resources/Private/JavaScript/CkStyles/src/BlockStyleCommand.js index f0a1123..0df80b9 100644 --- a/Resources/Private/JavaScript/CkStyles/src/BlockStyleCommand.js +++ b/Resources/Private/JavaScript/CkStyles/src/BlockStyleCommand.js @@ -1,5 +1,5 @@ // Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted -import { Command } from 'ckeditor5-exports'; +import {Command} from 'ckeditor5-exports'; /** * Set a key-value block style; e.g. "fontColor=red". @@ -37,11 +37,11 @@ export default class BlockStyleCommand extends Command { refresh() { const model = this.editor.model; const doc = model.document; - const blocksToChange = Array.from( doc.selection.getSelectedBlocks() ); + const blocksToChange = Array.from(doc.selection.getSelectedBlocks()); this.value = this._getValueFromBlockNode(); - for ( const block of blocksToChange ) { - if(model.schema.checkAttribute(block, this.attributeKey)) { + for (const block of blocksToChange) { + if (model.schema.checkAttribute(block, this.attributeKey)) { this.isEnabled = true; } } @@ -60,9 +60,9 @@ export default class BlockStyleCommand extends Command { const doc = model.document; const selection = doc.selection; const value = options.value; - const blocksToChange = Array.from( selection.getSelectedBlocks() ); - model.change( writer => { - for ( const block of blocksToChange ) { + const blocksToChange = Array.from(selection.getSelectedBlocks()); + model.change(writer => { + for (const block of blocksToChange) { if (value) { writer.setAttribute(this.attributeKey, value, block); } else { @@ -82,7 +82,7 @@ export default class BlockStyleCommand extends Command { const model = this.editor.model; const schema = model.schema; const selection = model.document.selection; - const blocks = Array.from( selection.getSelectedBlocks() ); + const blocks = Array.from(selection.getSelectedBlocks()); for (const block of blocks) { if (schema.checkAttribute(block, this.attributeKey)) { diff --git a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js index 72575d2..ca7a1c8 100644 --- a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js @@ -14,13 +14,13 @@ export default (presetIdentifier, presetConfiguration) => schema.extend( '$block', - { allowAttributes: modelAttributeKey} + {allowAttributes: modelAttributeKey} ); // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html schema.setAttributeProperties( modelAttributeKey, - { isFormatting: true } + {isFormatting: true} ); // Model configuration diff --git a/Resources/Private/JavaScript/CkStyles/src/InlineStylesCommand.js b/Resources/Private/JavaScript/CkStyles/src/InlineStylesCommand.js index 1adb1cf..9775174 100644 --- a/Resources/Private/JavaScript/CkStyles/src/InlineStylesCommand.js +++ b/Resources/Private/JavaScript/CkStyles/src/InlineStylesCommand.js @@ -1,5 +1,5 @@ // Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted -import { Command } from 'ckeditor5-exports'; +import {Command} from 'ckeditor5-exports'; /** * Set a key-value inline style; e.g. "fontColor=red". diff --git a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js index 44e42b4..335bbf3 100644 --- a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js @@ -1,4 +1,4 @@ -import { Plugin } from 'ckeditor5-exports'; +import {Plugin} from 'ckeditor5-exports'; import InlineStylesCommand from './InlineStylesCommand'; /** @@ -34,13 +34,13 @@ export default (presetIdentifier, presetConfiguration) => // View configuration optionIdentifiers.forEach(optionIdentifier => { - const option = presetConfiguration.options[optionIdentifier]; - // split the cssClass configuration to allow for multiple classes - const classes = option.cssClass.split(' '); + const options = presetConfiguration.options[optionIdentifier]; + const {attribute} = options; + const classes = options.attributeValue || options.cssClass; config.view[optionIdentifier] = { name: 'span', - classes: classes, + attributes: {[attribute]: classes} } }); diff --git a/Resources/Private/JavaScript/CkStyles/src/components/BlockStyleSelector.js b/Resources/Private/JavaScript/CkStyles/src/components/BlockStyleSelector.js index d485f9b..402c9dc 100644 --- a/Resources/Private/JavaScript/CkStyles/src/components/BlockStyleSelector.js +++ b/Resources/Private/JavaScript/CkStyles/src/components/BlockStyleSelector.js @@ -1,8 +1,8 @@ -import React, { PureComponent } from 'react'; +import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import { SelectBox } from '@neos-project/react-ui-components'; -import { connect } from 'react-redux'; -import { $transform } from 'plow-js'; +import {SelectBox} from '@neos-project/react-ui-components'; +import {connect} from 'react-redux'; +import {$transform} from 'plow-js'; import PresetType from '../PresetType'; import {selectors} from '@neos-project/neos-ui-redux-store'; @@ -54,7 +54,7 @@ export default class BlockStyleSelector extends PureComponent { handleOnSelect(optionIdentifier) { CkEditorApi.executeCommand( `blockStyles:${this.props.presetIdentifier}`, - { value: optionIdentifier } + {value: optionIdentifier} ); } } diff --git a/Resources/Private/JavaScript/CkStyles/src/components/InlineStyleSelector.js b/Resources/Private/JavaScript/CkStyles/src/components/InlineStyleSelector.js index 9f3b9eb..a952b59 100644 --- a/Resources/Private/JavaScript/CkStyles/src/components/InlineStyleSelector.js +++ b/Resources/Private/JavaScript/CkStyles/src/components/InlineStyleSelector.js @@ -1,6 +1,6 @@ -import React, { PureComponent } from 'react'; +import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import { SelectBox } from '@neos-project/react-ui-components'; +import {SelectBox} from '@neos-project/react-ui-components'; import {connect} from 'react-redux'; import {$transform} from 'plow-js'; import PresetType from '../PresetType'; @@ -54,7 +54,7 @@ export default class InlineStyleSelector extends PureComponent { handleOnSelect(optionIdentifier) { CkEditorApi.executeCommand( `inlineStyles:${this.props.presetIdentifier}`, - { value: optionIdentifier } + {value: optionIdentifier} ); } } diff --git a/Resources/Private/JavaScript/CkStyles/src/manifest.js b/Resources/Private/JavaScript/CkStyles/src/manifest.js index 3fbacb8..615b216 100644 --- a/Resources/Private/JavaScript/CkStyles/src/manifest.js +++ b/Resources/Private/JavaScript/CkStyles/src/manifest.js @@ -17,7 +17,7 @@ manifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfigura const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles']; // Block style - if(blockStyleConfiguration) { + if (blockStyleConfiguration) { Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => { @@ -33,9 +33,9 @@ manifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfigura richtextToolbar.set(`blockStyles_${presetIdentifier}`, { component: BlockStyleSelector, // Display only if the preset is activated in NodeType.yaml for this node property - isVisible: function(editorOptions, formattingUnderCursor) { + isVisible: function (editorOptions, formattingUnderCursor) { var isVisible = false; - if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) { + if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) { isVisible = editorOptions['blockStyling'][presetIdentifier]; } return isVisible; @@ -48,7 +48,7 @@ manifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfigura } //Inline Style - if(inlineStyleConfiguration) { + if (inlineStyleConfiguration) { Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => { @@ -63,9 +63,9 @@ manifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfigura richtextToolbar.set(`inlineStyles_${presetIdentifier}`, { component: InlineStyleSelector, // Display only if the preset is activated in NodeType.yaml for this node property - isVisible: function(editorOptions, formattingUnderCursor) { + isVisible: function (editorOptions, formattingUnderCursor) { var isVisible = false; - if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) { + if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) { isVisible = editorOptions['inlineStyling'][presetIdentifier]; } return isVisible; diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js b/Resources/Public/JavaScript/CkStyles/Plugin.js index 56ffc3c..58a78c6 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js @@ -1594,6 +1594,8 @@ var _InlineStylesCommand2 = _interopRequireDefault(_InlineStylesCommand); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -1637,13 +1639,14 @@ exports.default = function (presetIdentifier, presetConfiguration) { // View configuration optionIdentifiers.forEach(function (optionIdentifier) { - var option = presetConfiguration.options[optionIdentifier]; - // split the cssClass configuration to allow for multiple classes - var classes = option.cssClass.split(' '); + var options = presetConfiguration.options[optionIdentifier]; + var attribute = options.attribute; + + var classes = options.attributeValue || options.cssClass; config.view[optionIdentifier] = { name: 'span', - classes: classes + attributes: _defineProperty({}, attribute, classes) }; }); diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js.map b/Resources/Public/JavaScript/CkStyles/Plugin.js.map index 8b0e6b0..73be2f1 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js.map +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","option","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,WAAQ;AACjDA,eAAOA,KAD0C;AAEjDC,kBAAU,KAFuC;AAGjDC,oBAAY,KAHqC;AAIjDC,sBAAc;AAJmC,KAAR;AAKxC,CALL;AAMA,SAASC,iBAAT,CAA2BC,SAA3B,EAAsCC,WAAtC,EAAmD;AAC/C,QAAIC,MAAM,EAAV;AACAC,WAAOC,IAAP,CAAYH,WAAZ,EAAyBI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8BAAtC,CAAnC;AACA,uBAAON,qBAAP;AACH,aAJD;;AAMAL,4BAAgB1N,GAAhB,mBAAoCwJ,gBAApC,EAAwD;AACpD2E,2BAAWb,6BADyC;AAEpD;AACAc,2BAAW,mBAASJ,aAAT,EAAwBzB,qBAAxB,EAA+C;AACtD,wBAAI6B,YAAY,KAAhB;AACA,wBAAGJ,cAAc,eAAd,MAAmC1E,SAAnC,IAAgD0E,cAAc,eAAd,EAA+BxE,gBAA/B,MAAqDF,SAAxG,EAAmH;AAC/G8E,oCAAYJ,cAAc,eAAd,EAA+BxE,gBAA/B,CAAZ;AACH;AACD,2BAAO4E,SAAP;AACH,iBATmD;AAUpD5E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB4E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n this.value = this._getValueFromBlockNode();\n for ( const block of blocksToChange ) {\n if(model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from( selection.getSelectedBlocks() );\n model.change( writer => {\n for ( const block of blocksToChange ) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from( selection.getSelectedBlocks() );\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n { allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const option = presetConfiguration.options[optionIdentifier];\n const attribute = option.attribute || 'class';\n const attributeValues = (option.attributeValue || option.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import { Plugin } from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const option = presetConfiguration.options[optionIdentifier];\n // split the cssClass configuration to allow for multiple classes\n const classes = option.cssClass.split(' ');\n\n config.view[optionIdentifier] = {\n name: 'span',\n classes: classes,\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport { connect } from 'react-redux';\nimport { $transform } from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if(blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if(inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","option","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA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,cAAc,cAAd,EAA8BzE,gBAA9B,CAAZ;AACH;AACD,2BAAO6E,SAAP;AACH,iBATkD;AAUnD7E,kCAAkBA,gBAViC;AAWnDC,qCAAqBsE;AAX8B,aAAvD;AAcH,SAzBD;AA0BH;;AAED;AACA,QAAGH,wBAAH,EAA6B;;AAEzB3P,eAAOC,IAAP,CAAY0P,yBAAyBE,OAArC,EAA8C3P,OAA9C,CAAsD,UAACqL,gBAAD,EAAsB;;AAExE,gBAAM8E,iCAAiCV,yBAAyBE,OAAzB,CAAiCtE,gBAAjC,CAAvC;;AAEAQ,mBAAOhK,GAAP,wCAAgDwJ,gBAAhD,EAAoE,UAACwE,qBAAD,SAA4C;AAAA,oBAAnBC,aAAmB,SAAnBA,aAAmB;;AAC5GD,sCAAsBG,OAAtB,GAAgCH,sBAAsBG,OAAtB,IAAiC,EAAjE;AACAH,sCAAsBG,OAAtB,CAA8BlP,IAA9B,CAAmC,mCAAoBuK,gBAApB,EAAsC8E,8BAAtC,CAAnC;AACA,uBAAON,qBAAP;AACH,aAJD;;AAMAL,4BAAgB3N,GAAhB,mBAAoCwJ,gBAApC,EAAwD;AACpD4E,2BAAWb,6BADyC;AAEpD;AACAc,2BAAW,mBAASJ,aAAT,EAAwBzB,qBAAxB,EAA+C;AACtD,wBAAI6B,YAAY,KAAhB;AACA,wBAAGJ,cAAc,eAAd,MAAmC3E,SAAnC,IAAgD2E,cAAc,eAAd,EAA+BzE,gBAA/B,MAAqDF,SAAxG,EAAmH;AAC/G+E,oCAAYJ,cAAc,eAAd,EAA+BzE,gBAA/B,CAAZ;AACH;AACD,2BAAO6E,SAAP;AACH,iBATmD;AAUpD7E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB6E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n this.value = this._getValueFromBlockNode();\n for ( const block of blocksToChange ) {\n if(model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from( selection.getSelectedBlocks() );\n model.change( writer => {\n for ( const block of blocksToChange ) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from( selection.getSelectedBlocks() );\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n { allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const option = presetConfiguration.options[optionIdentifier];\n const attribute = option.attribute || 'class';\n const attributeValues = (option.attributeValue || option.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import { Plugin } from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const { attribute } = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: { [attribute]: classes }\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport { connect } from 'react-redux';\nimport { $transform } from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if(blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if(inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file From b2bad73a478cde4726cb40f623420df8010043d2 Mon Sep 17 00:00:00 2001 From: Simon Paidla Date: Fri, 18 Mar 2022 12:20:58 +0100 Subject: [PATCH 4/7] Fixed bug where block data attributes are missing after page reload --- .../Private/JavaScript/CkStyles/src/BlockStyleEditing.js | 8 +++++--- Resources/Public/JavaScript/CkStyles/Plugin.js | 8 +++++--- Resources/Public/JavaScript/CkStyles/Plugin.js.map | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js index ca7a1c8..bf74f31 100644 --- a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js @@ -34,9 +34,11 @@ export default (presetIdentifier, presetConfiguration) => // View configuration optionIdentifiers.forEach(optionIdentifier => { - const option = presetConfiguration.options[optionIdentifier]; - const attribute = option.attribute || 'class'; - const attributeValues = (option.attributeValue || option.cssClass).split(' '); + const options = presetConfiguration.options[optionIdentifier]; + const attribute = options.attribute || 'class'; + const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' '); + + console.log(attributeValues); config.view[optionIdentifier] = { key: attribute, diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js b/Resources/Public/JavaScript/CkStyles/Plugin.js index 58a78c6..3a8d7d6 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js @@ -1328,9 +1328,11 @@ exports.default = function (presetIdentifier, presetConfiguration) { // View configuration optionIdentifiers.forEach(function (optionIdentifier) { - var option = presetConfiguration.options[optionIdentifier]; - var attribute = option.attribute || 'class'; - var attributeValues = (option.attributeValue || option.cssClass).split(' '); + var options = presetConfiguration.options[optionIdentifier]; + var attribute = options.attribute || 'class'; + var attributeValues = attribute === options.attribute ? options.attributeValue : options.cssClass.split(' '); + + console.log(attributeValues); config.view[optionIdentifier] = { key: attribute, diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js.map b/Resources/Public/JavaScript/CkStyles/Plugin.js.map index 73be2f1..9d76103 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js.map +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","option","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,WAAQ;AACjDA,eAAOA,KAD0C;AAEjDC,kBAAU,KAFuC;AAGjDC,oBAAY,KAHqC;AAIjDC,sBAAc;AAJmC,KAAR;AAKxC,CALL;AAMA,SAASC,iBA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A4C;AAAA,oBAAnBC,aAAmB,SAAnBA,aAAmB;;AAC5GD,sCAAsBG,OAAtB,GAAgCH,sBAAsBG,OAAtB,IAAiC,EAAjE;AACAH,sCAAsBG,OAAtB,CAA8BlP,IAA9B,CAAmC,mCAAoBuK,gBAApB,EAAsC8E,8BAAtC,CAAnC;AACA,uBAAON,qBAAP;AACH,aAJD;;AAMAL,4BAAgB3N,GAAhB,mBAAoCwJ,gBAApC,EAAwD;AACpD4E,2BAAWb,6BADyC;AAEpD;AACAc,2BAAW,mBAASJ,aAAT,EAAwBzB,qBAAxB,EAA+C;AACtD,wBAAI6B,YAAY,KAAhB;AACA,wBAAGJ,cAAc,eAAd,MAAmC3E,SAAnC,IAAgD2E,cAAc,eAAd,EAA+BzE,gBAA/B,MAAqDF,SAAxG,EAAmH;AAC/G+E,oCAAYJ,cAAc,eAAd,EAA+BzE,gBAA/B,CAAZ;AACH;AACD,2BAAO6E,SAAP;AACH,iBATmD;AAUpD7E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB6E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from( doc.selection.getSelectedBlocks() );\n\n this.value = this._getValueFromBlockNode();\n for ( const block of blocksToChange ) {\n if(model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from( selection.getSelectedBlocks() );\n model.change( writer => {\n for ( const block of blocksToChange ) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from( selection.getSelectedBlocks() );\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n { allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n { isFormatting: true }\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const option = presetConfiguration.options[optionIdentifier];\n const attribute = option.attribute || 'class';\n const attributeValues = (option.attributeValue || option.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport { Command } from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import { Plugin } from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const { attribute } = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: { [attribute]: classes }\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport { connect } from 'react-redux';\nimport { $transform } from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport { SelectBox } from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n { value: optionIdentifier }\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if(blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if(inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function(editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if(editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","log","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QAC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CAAZ;AACH;AACD,2BAAO6E,SAAP;AACH,iBATmD;AAUpD7E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB6E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from(doc.selection.getSelectedBlocks());\n\n this.value = this._getValueFromBlockNode();\n for (const block of blocksToChange) {\n if (model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from(selection.getSelectedBlocks());\n model.change(writer => {\n for (const block of blocksToChange) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' ');\n\n console.log(attributeValues);\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin} from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const {attribute} = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: {[attribute]: classes}\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if (blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if (inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file From a61a7772d4524bf06571e29f800a4116d271fa67 Mon Sep 17 00:00:00 2001 From: Simon Paidla Date: Fri, 18 Mar 2022 12:24:34 +0100 Subject: [PATCH 5/7] Remove console.log statement --- Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js index bf74f31..bc45675 100644 --- a/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/BlockStyleEditing.js @@ -38,8 +38,6 @@ export default (presetIdentifier, presetConfiguration) => const attribute = options.attribute || 'class'; const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' '); - console.log(attributeValues); - config.view[optionIdentifier] = { key: attribute, value: attributeValues From 8586b987736fc7d8b024f8b616f1f9bc067805aa Mon Sep 17 00:00:00 2001 From: Simon Paidla Date: Fri, 18 Mar 2022 12:25:23 +0100 Subject: [PATCH 6/7] Build latest js --- Resources/Public/JavaScript/CkStyles/Plugin.js | 2 -- Resources/Public/JavaScript/CkStyles/Plugin.js.map | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js b/Resources/Public/JavaScript/CkStyles/Plugin.js index 3a8d7d6..10119cc 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js @@ -1332,8 +1332,6 @@ exports.default = function (presetIdentifier, presetConfiguration) { var attribute = options.attribute || 'class'; var attributeValues = attribute === options.attribute ? options.attributeValue : options.cssClass.split(' '); - console.log(attributeValues); - config.view[optionIdentifier] = { key: attribute, value: attributeValues diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js.map b/Resources/Public/JavaScript/CkStyles/Plugin.js.map index 9d76103..8ee89a9 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js.map +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","log","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,W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Y0P,yBAAyBE,OAArC,EAA8C3P,OAA9C,CAAsD,UAACqL,gBAAD,EAAsB;;AAExE,gBAAM8E,iCAAiCV,yBAAyBE,OAAzB,CAAiCtE,gBAAjC,CAAvC;;AAEAQ,mBAAOhK,GAAP,wCAAgDwJ,gBAAhD,EAAoE,UAACwE,qBAAD,SAA4C;AAAA,oBAAnBC,aAAmB,SAAnBA,aAAmB;;AAC5GD,sCAAsBG,OAAtB,GAAgCH,sBAAsBG,OAAtB,IAAiC,EAAjE;AACAH,sCAAsBG,OAAtB,CAA8BlP,IAA9B,CAAmC,mCAAoBuK,gBAApB,EAAsC8E,8BAAtC,CAAnC;AACA,uBAAON,qBAAP;AACH,aAJD;;AAMAL,4BAAgB3N,GAAhB,mBAAoCwJ,gBAApC,EAAwD;AACpD4E,2BAAWb,6BADyC;AAEpD;AACAc,2BAAW,mBAAUJ,aAAV,EAAyBzB,qBAAzB,EAAgD;AACvD,wBAAI6B,YAAY,KAAhB;AACA,wBAAIJ,cAAc,eAAd,MAAmC3E,SAAnC,IAAgD2E,cAAc,eAAd,EAA+BzE,gBAA/B,MAAqDF,SAAzG,EAAoH;AAChH+E,oCAAYJ,cAAc,eAAd,EAA+BzE,gBAA/B,CAAZ;AACH;AACD,2BAAO6E,SAAP;AACH,iBATmD;AAUpD7E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB6E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from(doc.selection.getSelectedBlocks());\n\n this.value = this._getValueFromBlockNode();\n for (const block of blocksToChange) {\n if (model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from(selection.getSelectedBlocks());\n model.change(writer => {\n for (const block of blocksToChange) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' ');\n\n console.log(attributeValues);\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin} from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const {attribute} = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: {[attribute]: classes}\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if (blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if (inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;Q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ACvD,wBAAI6B,YAAY,KAAhB;AACA,wBAAIJ,cAAc,eAAd,MAAmC1E,SAAnC,IAAgD0E,cAAc,eAAd,EAA+BxE,gBAA/B,MAAqDF,SAAzG,EAAoH;AAChH8E,oCAAYJ,cAAc,eAAd,EAA+BxE,gBAA/B,CAAZ;AACH;AACD,2BAAO4E,SAAP;AACH,iBATmD;AAUpD5E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB4E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from(doc.selection.getSelectedBlocks());\n\n this.value = this._getValueFromBlockNode();\n for (const block of blocksToChange) {\n if (model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from(selection.getSelectedBlocks());\n model.change(writer => {\n for (const block of blocksToChange) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin} from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const {attribute} = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: {[attribute]: classes}\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if (blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if (inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file From 1ec1789caa3bbbcedef0bdeb63f8be4fc6de8c63 Mon Sep 17 00:00:00 2001 From: Marcel Wieland Date: Mon, 21 Mar 2022 11:41:02 +0100 Subject: [PATCH 7/7] Fix inline classes --- .../Private/JavaScript/CkStyles/src/InlineStylesEditing.js | 2 +- Resources/Public/JavaScript/CkStyles/Plugin.js | 2 +- Resources/Public/JavaScript/CkStyles/Plugin.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js index 335bbf3..22dd402 100644 --- a/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js +++ b/Resources/Private/JavaScript/CkStyles/src/InlineStylesEditing.js @@ -40,7 +40,7 @@ export default (presetIdentifier, presetConfiguration) => config.view[optionIdentifier] = { name: 'span', - attributes: {[attribute]: classes} + attributes: {[attribute ? attribute : 'class']: classes} } }); diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js b/Resources/Public/JavaScript/CkStyles/Plugin.js index 10119cc..14e7cbe 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js @@ -1646,7 +1646,7 @@ exports.default = function (presetIdentifier, presetConfiguration) { config.view[optionIdentifier] = { name: 'span', - attributes: _defineProperty({}, attribute, classes) + attributes: _defineProperty({}, attribute ? attribute : 'class', classes) }; }); diff --git a/Resources/Public/JavaScript/CkStyles/Plugin.js.map b/Resources/Public/JavaScript/CkStyles/Plugin.js.map index 8ee89a9..1ebe8f2 100644 --- a/Resources/Public/JavaScript/CkStyles/Plugin.js.map +++ b/Resources/Public/JavaScript/CkStyles/Plugin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AACbA,QAAQC,UAAR,GAAqB,IAArB;AACA,IAAIC,UAAUC,mBAAOA,CAAC,gDAAR,CAAd;AACA,IAAIC,aAAaF,QAAQG,eAAR,CAAwBF,mBAAOA,CAAC,uFAAR,CAAxB,CAAjB;AACA,IAAIG,sBAAsB,SAAtBA,mBAAsB,CAAUC,KAAV,EAAiB;AAAE,WAAQ;AACjDA,eAAOA,KAD0C;AAEj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AM6E,iCAAiCV,yBAAyBE,OAAzB,CAAiCrE,gBAAjC,CAAvC;;AAEAQ,mBAAOhK,GAAP,wCAAgDwJ,gBAAhD,EAAoE,UAACuE,qBAAD,SAA4C;AAAA,oBAAnBC,aAAmB,SAAnBA,aAAmB;;AAC5GD,sCAAsBG,OAAtB,GAAgCH,sBAAsBG,OAAtB,IAAiC,EAAjE;AACAH,sCAAsBG,OAAtB,CAA8BjP,IAA9B,CAAmC,mCAAoBuK,gBAApB,EAAsC6E,8BAAtC,CAAnC;AACA,uBAAON,qBAAP;AACH,aAJD;;AAMAL,4BAAgB1N,GAAhB,mBAAoCwJ,gBAApC,EAAwD;AACpD2E,2BAAWb,6BADyC;AAEpD;AACAc,2BAAW,mBAAUJ,aAAV,EAAyBzB,qBAAzB,EAAgD;AACvD,wBAAI6B,YAAY,KAAhB;AACA,wBAAIJ,cAAc,eAAd,MAAmC1E,SAAnC,IAAgD0E,cAAc,eAAd,EAA+BxE,gBAA/B,MAAqDF,SAAzG,EAAoH;AAChH8E,oCAAYJ,cAAc,eAAd,EAA+BxE,gBAA/B,CAAZ;AACH;AACD,2BAAO4E,SAAP;AACH,iBATmD;AAUpD5E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB4E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from(doc.selection.getSelectedBlocks());\n\n this.value = this._getValueFromBlockNode();\n for (const block of blocksToChange) {\n if (model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from(selection.getSelectedBlocks());\n model.change(writer => {\n for (const block of blocksToChange) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin} from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const {attribute} = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: {[attribute]: classes}\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if (blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if (inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/createConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/manifest.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/readFromConsumerApi.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/AbstractRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousMetaRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/SynchronousRegistry.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/dist/registry/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-ckeditor5-bindings/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-redux-store/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/neosProjectPackages/react-ui-components/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/ckeditor5-exports/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/plow-js/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/prop-types/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react-redux/index.js","webpack:///./node_modules/@neos-project/neos-ui-extensibility/src/shims/vendor/react/index.js","webpack:///./node_modules/@neos-project/positional-array-sorter/dist/positionalArraySorter.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./src/BlockStyleCommand.js","webpack:///./src/BlockStyleEditing.js","webpack:///./src/InlineStylesCommand.js","webpack:///./src/InlineStylesEditing.js","webpack:///./src/PresetType.js","webpack:///./src/components/BlockStyleSelector.js","webpack:///./src/components/InlineStyleSelector.js","webpack:///./src/index.js","webpack:///./src/manifest.js"],"names":["exports","__esModule","tslib_1","require","manifest_1","__importDefault","createReadOnlyValue","value","writable","enumerable","configurable","createConsumerApi","manifests","exposureMap","api","Object","keys","forEach","key","defineProperty","window","createConsumerApi_1","readFromConsumerApi_1","readFromConsumerApi","index_1","SynchronousRegistry","SynchronousMetaRegistry","identifier","options","bootstrap","_a","push","args","_i","arguments","length","apply","__spread","Error","AbstractRegistry","description","SERIAL_VERSION_UID","SynchronousRegistry_1","_super","__extends","prototype","set","call","AbstractRegistry_1","positional_array_sorter_1","_this","_registry","position","entry","indexOfItemWithTheSameKey","findIndex","item","get","console","error","result","find","_getChildrenWrapped","searchKey","unsortedChildren","filter","indexOf","getChildrenAsObject","getChildren","map","has","Boolean","_getAllWrapped","getAllAsObject","getAllAsList","assign","id","SynchronousMetaRegistry_1","module","CkEditorApi","NeosUiReduxStore","ReactUiComponents","CkEditor5","plow","PropTypes","reactRedux","React","positionalArraySorter","subject","idKey","e_1","e_2","_b","e_3","_c","e_4","_d","e_5","_e","e_6","_f","e_7","_g","positionAccessor","indexMapping","middleKeys","startKeys","endKeys","beforeKeys","afterKeys","index","String","positionValue","invalid","startsWith","weightMatch","match","weight","Number","reference","numberPosition","parseFloat","isNaN","isFinite","resultStart","resultMiddle","resultEnd","processedKeys","sortedWeights","dict","asc","weights","x","sort","a","b","reverse","addToResults","e_8","e_9","beforeWeights","beforeWeights_1","__values","beforeWeights_1_1","next","done","i","e_8_1","afterWeights","afterWeights_1","afterWeights_1_1","e_9_1","_h","_j","e_1_1","_k","_l","e_2_1","_m","_o","e_3_1","_p","_q","_r","_s","e_5_1","e_4_1","_t","_u","_v","_w","e_7_1","e_6_1","sortedKeys","BlockStyleCommand","editor","attributeKey","model","doc","document","blocksToChange","Array","from","selection","getSelectedBlocks","_getValueFromBlockNode","block","schema","checkAttribute","isEnabled","change","writer","setAttribute","removeAttribute","blocks","getAttribute","undefined","Command","presetIdentifier","presetConfiguration","modelAttributeKey","optionIdentifiers","extend","allowAttributes","setAttributeProperties","isFormatting","config","values","view","optionIdentifier","attribute","attributeValues","attributeValue","cssClass","split","conversion","attributeToAttribute","commands","add","Plugin","InlineStylesCommand","_getValueFromFirstAllowedNode","checkAttributeInSelection","isCollapsed","setSelectionAttribute","removeSelectionAttribute","ranges","getValidRanges","getRanges","range","getItems","classes","name","attributes","attributeToElement","attributeValueOrCssClass","props","propName","componentName","shape","label","string","isRequired","objectOf","BlockStyleSelector","formattingUnderCursor","selectors","UI","ContentCanvas","handleOnSelect","bind","optionsForSelect","entries","optionConfiguration","currentValue","executeCommand","PureComponent","propTypes","PresetType","object","InlineStyleSelector","globalRegistry","frontendConfiguration","ckEditorRegistry","richtextToolbar","inlineStyleConfiguration","blockStyleConfiguration","presets","blockStylePresetConfiguration","ckEditorConfiguration","editorOptions","editing","plugins","component","isVisible","inlineStylePresetConfiguration"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QAC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IAAgD0E,cAAc,eAAd,EAA+BxE,gBAA/B,MAAqDF,SAAzG,EAAoH;AAChH8E,oCAAYJ,cAAc,eAAd,EAA+BxE,gBAA/B,CAAZ;AACH;AACD,2BAAO4E,SAAP;AACH,iBATmD;AAUpD5E,kCAAkBA,gBAVkC;AAWpDC,qCAAqB4E;AAX+B,aAAxD;AAaH,SAvBD;AAwBH;AACJ,CApED,E","file":"Plugin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar manifest_1 = tslib_1.__importDefault(require(\"./manifest\"));\nvar createReadOnlyValue = function (value) { return ({\n value: value,\n writable: false,\n enumerable: false,\n configurable: true\n}); };\nfunction createConsumerApi(manifests, exposureMap) {\n var api = {};\n Object.keys(exposureMap).forEach(function (key) {\n Object.defineProperty(api, key, createReadOnlyValue(exposureMap[key]));\n });\n Object.defineProperty(api, '@manifest', createReadOnlyValue(manifest_1[\"default\"](manifests)));\n Object.defineProperty(window, '@Neos:HostPluginAPI', createReadOnlyValue(api));\n}\nexports[\"default\"] = createConsumerApi;\n//# sourceMappingURL=createConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar createConsumerApi_1 = tslib_1.__importDefault(require(\"./createConsumerApi\"));\nexports.createConsumerApi = createConsumerApi_1[\"default\"];\nvar readFromConsumerApi_1 = tslib_1.__importDefault(require(\"./readFromConsumerApi\"));\nexports.readFromConsumerApi = readFromConsumerApi_1[\"default\"];\nvar index_1 = require(\"./registry/index\");\nexports.SynchronousRegistry = index_1.SynchronousRegistry;\nexports.SynchronousMetaRegistry = index_1.SynchronousMetaRegistry;\nexports[\"default\"] = readFromConsumerApi_1[\"default\"]('manifest');\n//# sourceMappingURL=index.js.map","\"use strict\";\nexports.__esModule = true;\nexports[\"default\"] = (function (manifests) {\n return function (identifier, options, bootstrap) {\n var _a;\n manifests.push((_a = {},\n _a[identifier] = {\n options: options,\n bootstrap: bootstrap\n },\n _a));\n };\n});\n//# sourceMappingURL=manifest.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nfunction readFromConsumerApi(key) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (window['@Neos:HostPluginAPI'] && window['@Neos:HostPluginAPI'][\"@\" + key]) {\n return (_a = window['@Neos:HostPluginAPI'])[\"@\" + key].apply(_a, tslib_1.__spread(args));\n }\n throw new Error(\"You are trying to read from a consumer api that hasn't been initialized yet!\");\n };\n}\nexports[\"default\"] = readFromConsumerApi;\n//# sourceMappingURL=readFromConsumerApi.js.map","\"use strict\";\nexports.__esModule = true;\nvar AbstractRegistry = (function () {\n function AbstractRegistry(description) {\n this.SERIAL_VERSION_UID = 'd8a5aa78-978e-11e6-ae22-56b6b6499611';\n this.description = description;\n }\n return AbstractRegistry;\n}());\nexports[\"default\"] = AbstractRegistry;\n//# sourceMappingURL=AbstractRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nvar SynchronousMetaRegistry = (function (_super) {\n tslib_1.__extends(SynchronousMetaRegistry, _super);\n function SynchronousMetaRegistry() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SynchronousMetaRegistry.prototype.set = function (key, value) {\n if (value.SERIAL_VERSION_UID !== 'd8a5aa78-978e-11e6-ae22-56b6b6499611') {\n throw new Error('You can only add registries to a meta registry');\n }\n return _super.prototype.set.call(this, key, value);\n };\n return SynchronousMetaRegistry;\n}(SynchronousRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousMetaRegistry;\n//# sourceMappingURL=SynchronousMetaRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AbstractRegistry_1 = tslib_1.__importDefault(require(\"./AbstractRegistry\"));\nvar positional_array_sorter_1 = tslib_1.__importDefault(require(\"@neos-project/positional-array-sorter\"));\nvar SynchronousRegistry = (function (_super) {\n tslib_1.__extends(SynchronousRegistry, _super);\n function SynchronousRegistry(description) {\n var _this = _super.call(this, description) || this;\n _this._registry = [];\n return _this;\n }\n SynchronousRegistry.prototype.set = function (key, value, position) {\n if (position === void 0) { position = 0; }\n if (typeof key !== 'string') {\n throw new Error('Key must be a string');\n }\n if (typeof position !== 'string' && typeof position !== 'number') {\n throw new Error('Position must be a string or a number');\n }\n var entry = { key: key, value: value };\n if (position) {\n entry.position = position;\n }\n var indexOfItemWithTheSameKey = this._registry.findIndex(function (item) { return item.key === key; });\n if (indexOfItemWithTheSameKey === -1) {\n this._registry.push(entry);\n }\n else {\n this._registry[indexOfItemWithTheSameKey] = entry;\n }\n return value;\n };\n SynchronousRegistry.prototype.get = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return null;\n }\n var result = this._registry.find(function (item) { return item.key === key; });\n return result ? result.value : null;\n };\n SynchronousRegistry.prototype._getChildrenWrapped = function (searchKey) {\n var unsortedChildren = this._registry.filter(function (item) { return item.key.indexOf(searchKey + '/') === 0; });\n return positional_array_sorter_1[\"default\"](unsortedChildren);\n };\n SynchronousRegistry.prototype.getChildrenAsObject = function (searchKey) {\n var result = {};\n this._getChildrenWrapped(searchKey).forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getChildren = function (searchKey) {\n return this._getChildrenWrapped(searchKey).map(function (item) { return item.value; });\n };\n SynchronousRegistry.prototype.has = function (key) {\n if (typeof key !== 'string') {\n console.error('Key must be a string');\n return false;\n }\n return Boolean(this._registry.find(function (item) { return item.key === key; }));\n };\n SynchronousRegistry.prototype._getAllWrapped = function () {\n return positional_array_sorter_1[\"default\"](this._registry);\n };\n SynchronousRegistry.prototype.getAllAsObject = function () {\n var result = {};\n this._getAllWrapped().forEach(function (item) {\n result[item.key] = item.value;\n });\n return result;\n };\n SynchronousRegistry.prototype.getAllAsList = function () {\n return this._getAllWrapped().map(function (item) { return Object.assign({ id: item.key }, item.value); });\n };\n return SynchronousRegistry;\n}(AbstractRegistry_1[\"default\"]));\nexports[\"default\"] = SynchronousRegistry;\n//# sourceMappingURL=SynchronousRegistry.js.map","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar SynchronousRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousRegistry\"));\nexports.SynchronousRegistry = SynchronousRegistry_1[\"default\"];\nvar SynchronousMetaRegistry_1 = tslib_1.__importDefault(require(\"./SynchronousMetaRegistry\"));\nexports.SynchronousMetaRegistry = SynchronousMetaRegistry_1[\"default\"];\n//# sourceMappingURL=index.js.map","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().CkEditorApi;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().NeosUiReduxStore;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('NeosProjectPackages')().ReactUiComponents;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().CkEditor5;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().plow;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().PropTypes;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().reactRedux;\n","import readFromConsumerApi from '../../../../dist/readFromConsumerApi';\n\nmodule.exports = readFromConsumerApi('vendor')().React;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar positionalArraySorter = function (subject, position, idKey) {\n var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e, e_6, _f, e_7, _g;\n if (position === void 0) { position = 'position'; }\n if (idKey === void 0) { idKey = 'key'; }\n var positionAccessor = typeof position === 'string' ? function (value) { return value[position]; } : position;\n var indexMapping = {};\n var middleKeys = {};\n var startKeys = {};\n var endKeys = {};\n var beforeKeys = {};\n var afterKeys = {};\n subject.forEach(function (item, index) {\n var key = item[idKey] ? item[idKey] : String(index);\n indexMapping[key] = index;\n var positionValue = positionAccessor(item);\n var position = String(positionValue ? positionValue : index);\n var invalid = false;\n if (position.startsWith('start')) {\n var weightMatch = position.match(/start\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!startKeys[weight]) {\n startKeys[weight] = [];\n }\n startKeys[weight].push(key);\n }\n else if (position.startsWith('end')) {\n var weightMatch = position.match(/end\\s+(\\d+)/);\n var weight = weightMatch && weightMatch[1] ? Number(weightMatch[1]) : 0;\n if (!endKeys[weight]) {\n endKeys[weight] = [];\n }\n endKeys[weight].push(key);\n }\n else if (position.startsWith('before')) {\n var match = position.match(/before\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!beforeKeys[reference]) {\n beforeKeys[reference] = {};\n }\n if (!beforeKeys[reference][weight]) {\n beforeKeys[reference][weight] = [];\n }\n beforeKeys[reference][weight].push(key);\n }\n }\n else if (position.startsWith('after')) {\n var match = position.match(/after\\s+(\\S+)(\\s+(\\d+))?/);\n if (!match) {\n invalid = true;\n }\n else {\n var reference = match[1];\n var weight = match[3] ? Number(match[3]) : 0;\n if (!afterKeys[reference]) {\n afterKeys[reference] = {};\n }\n if (!afterKeys[reference][weight]) {\n afterKeys[reference][weight] = [];\n }\n afterKeys[reference][weight].push(key);\n }\n }\n else {\n invalid = true;\n }\n if (invalid) {\n var numberPosition = parseFloat(position);\n if (isNaN(numberPosition) || !isFinite(numberPosition)) {\n numberPosition = index;\n }\n if (!middleKeys[numberPosition]) {\n middleKeys[numberPosition] = [];\n }\n middleKeys[numberPosition].push(key);\n }\n });\n var resultStart = [];\n var resultMiddle = [];\n var resultEnd = [];\n var processedKeys = [];\n var sortedWeights = function (dict, asc) {\n var weights = Object.keys(dict).map(function (x) { return Number(x); }).sort(function (a, b) { return a - b; });\n return asc ? weights : weights.reverse();\n };\n var addToResults = function (keys, result) {\n keys.forEach(function (key) {\n var e_8, _a, e_9, _b;\n if (processedKeys.indexOf(key) >= 0) {\n return;\n }\n processedKeys.push(key);\n if (beforeKeys[key]) {\n var beforeWeights = sortedWeights(beforeKeys[key], true);\n try {\n for (var beforeWeights_1 = tslib_1.__values(beforeWeights), beforeWeights_1_1 = beforeWeights_1.next(); !beforeWeights_1_1.done; beforeWeights_1_1 = beforeWeights_1.next()) {\n var i = beforeWeights_1_1.value;\n addToResults(beforeKeys[key][i], result);\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (beforeWeights_1_1 && !beforeWeights_1_1.done && (_a = beforeWeights_1[\"return\"])) _a.call(beforeWeights_1);\n }\n finally { if (e_8) throw e_8.error; }\n }\n }\n result.push(key);\n if (afterKeys[key]) {\n var afterWeights = sortedWeights(afterKeys[key], false);\n try {\n for (var afterWeights_1 = tslib_1.__values(afterWeights), afterWeights_1_1 = afterWeights_1.next(); !afterWeights_1_1.done; afterWeights_1_1 = afterWeights_1.next()) {\n var i = afterWeights_1_1.value;\n addToResults(afterKeys[key][i], result);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (afterWeights_1_1 && !afterWeights_1_1.done && (_b = afterWeights_1[\"return\"])) _b.call(afterWeights_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n }\n });\n };\n try {\n for (var _h = tslib_1.__values(sortedWeights(startKeys, false)), _j = _h.next(); !_j.done; _j = _h.next()) {\n var i = _j.value;\n addToResults(startKeys[i], resultStart);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_a = _h[\"return\"])) _a.call(_h);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _k = tslib_1.__values(sortedWeights(middleKeys, true)), _l = _k.next(); !_l.done; _l = _k.next()) {\n var i = _l.value;\n addToResults(middleKeys[i], resultMiddle);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_l && !_l.done && (_b = _k[\"return\"])) _b.call(_k);\n }\n finally { if (e_2) throw e_2.error; }\n }\n try {\n for (var _m = tslib_1.__values(sortedWeights(endKeys, true)), _o = _m.next(); !_o.done; _o = _m.next()) {\n var i = _o.value;\n addToResults(endKeys[i], resultEnd);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_o && !_o.done && (_c = _m[\"return\"])) _c.call(_m);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var _p = tslib_1.__values(Object.keys(beforeKeys)), _q = _p.next(); !_q.done; _q = _p.next()) {\n var key = _q.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _r = (e_5 = void 0, tslib_1.__values(sortedWeights(beforeKeys[key], false))), _s = _r.next(); !_s.done; _s = _r.next()) {\n var i = _s.value;\n addToResults(beforeKeys[key][i], resultStart);\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_s && !_s.done && (_e = _r[\"return\"])) _e.call(_r);\n }\n finally { if (e_5) throw e_5.error; }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_q && !_q.done && (_d = _p[\"return\"])) _d.call(_p);\n }\n finally { if (e_4) throw e_4.error; }\n }\n try {\n for (var _t = tslib_1.__values(Object.keys(afterKeys)), _u = _t.next(); !_u.done; _u = _t.next()) {\n var key = _u.value;\n if (processedKeys.indexOf(key) >= 0) {\n continue;\n }\n try {\n for (var _v = (e_7 = void 0, tslib_1.__values(sortedWeights(afterKeys[key], false))), _w = _v.next(); !_w.done; _w = _v.next()) {\n var i = _w.value;\n addToResults(afterKeys[key][i], resultMiddle);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_w && !_w.done && (_g = _v[\"return\"])) _g.call(_v);\n }\n finally { if (e_7) throw e_7.error; }\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_u && !_u.done && (_f = _t[\"return\"])) _f.call(_t);\n }\n finally { if (e_6) throw e_6.error; }\n }\n var sortedKeys = tslib_1.__spread(resultStart, resultMiddle, resultEnd);\n return sortedKeys.map(function (key) { return indexMapping[key]; }).map(function (i) { return subject[i]; });\n};\nexports[\"default\"] = positionalArraySorter;\n//# sourceMappingURL=positionalArraySorter.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value block style; e.g. \"fontColor=red\".\n */\n\nexport default class BlockStyleCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n *\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled}.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n const blocksToChange = Array.from(doc.selection.getSelectedBlocks());\n\n this.value = this._getValueFromBlockNode();\n for (const block of blocksToChange) {\n if (model.schema.checkAttribute(block, this.attributeKey)) {\n this.isEnabled = true;\n }\n }\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute on each block.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n const blocksToChange = Array.from(selection.getSelectedBlocks());\n model.change(writer => {\n for (const block of blocksToChange) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, block);\n } else {\n writer.removeAttribute(this.attributeKey, block);\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the parent block node(s)\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromBlockNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n\n for (const block of blocks) {\n if (schema.checkAttribute(block, this.attributeKey)) {\n return block.getAttribute(this.attributeKey);\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin, Paragraph} from 'ckeditor5-exports';\nimport BlockStyleCommand from \"./BlockStyleCommand\";\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class BlockStyleEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const modelAttributeKey = `blockStyles-${presetIdentifier}`;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n\n schema.extend(\n '$block',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers,\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const attribute = options.attribute || 'class';\n const attributeValues = (attribute === options.attribute) ? options.attributeValue : (options.cssClass).split(' ');\n\n config.view[optionIdentifier] = {\n key: attribute,\n value: attributeValues\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToAttribute(config);\n\n this.editor.commands.add(`blockStyles:${presetIdentifier}`, new BlockStyleCommand(this.editor, modelAttributeKey));\n }\n };\n","// Originally taken from https://raw.githubusercontent.com/ckeditor/ckeditor5/master/packages/ckeditor5-basic-styles/src/attributecommand.js and adjusted\nimport {Command} from 'ckeditor5-exports';\n\n/**\n * Set a key-value inline style; e.g. \"fontColor=red\".\n *\n */\nexport default class InlineStylesCommand extends Command {\n /**\n * @param {module:core/editor/editor~Editor} editor\n * @param {String} attributeKey Attribute that will be set by the command.\n */\n constructor(editor, attributeKey) {\n super(editor);\n\n /**\n * The attribute that will be set by the command.\n *\n * @readonly\n * @member {String}\n */\n this.attributeKey = attributeKey;\n\n /**\n * Flag indicating whether the command is active. The command is active when the\n * {@link module:engine/model/selection~Selection#hasAttribute selection has the attribute} which means that:\n **\n * @observable\n * @readonly\n * @member {Boolean} #value\n */\n }\n\n /**\n * Updates the command's {@link #value} and {@link #isEnabled} based on the current selection.\n */\n refresh() {\n const model = this.editor.model;\n const doc = model.document;\n\n this.value = this._getValueFromFirstAllowedNode();\n this.isEnabled = model.schema.checkAttributeInSelection(doc.selection, this.attributeKey);\n }\n\n /**\n * Executes the command — sets the attribute to the desired value. If there is no desired valued, removes the\n * attribute.\n *\n * @fires execute\n * @param {Object} [options] Command options.\n * @param {String} [options.value] The value to be set; if null or not existing, the attribute will be removed.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const doc = model.document;\n const selection = doc.selection;\n const value = options.value;\n\n model.change(writer => {\n if (selection.isCollapsed) {\n if (value) {\n // value is existing, we want to set the selection attribute to the value.\n writer.setSelectionAttribute(this.attributeKey, value);\n } else {\n writer.removeSelectionAttribute(this.attributeKey);\n }\n } else {\n const ranges = model.schema.getValidRanges(selection.getRanges(), this.attributeKey);\n\n for (const range of ranges) {\n if (value) {\n writer.setAttribute(this.attributeKey, value, range);\n } else {\n writer.removeAttribute(this.attributeKey, range);\n }\n }\n }\n });\n }\n\n /**\n * Checks the attribute value of the first node in the selection that allows the attribute.\n * For the collapsed selection returns the selection attribute.\n *\n * @private\n * @returns {String} The attribute value.\n */\n _getValueFromFirstAllowedNode() {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n\n if (selection.isCollapsed) {\n return selection.getAttribute(this.attributeKey);\n }\n\n for (const range of selection.getRanges()) {\n for (const item of range.getItems()) {\n if (schema.checkAttribute(item, this.attributeKey)) {\n return item.getAttribute(this.attributeKey);\n }\n }\n }\n\n return undefined;\n }\n}\n","import {Plugin} from 'ckeditor5-exports';\nimport InlineStylesCommand from './InlineStylesCommand';\n\n/**\n * FACTORY FUNCTION for the plugin\n * needs the current preset configuration as parameter.\n */\nexport default (presetIdentifier, presetConfiguration) =>\n class InlineStylesEditing extends Plugin {\n init() {\n const schema = this.editor.model.schema;\n const optionIdentifiers = Object.keys(presetConfiguration.options);\n const modelAttributeKey = `inlineStyles-${presetIdentifier}`;\n\n schema.extend(\n '$text',\n {allowAttributes: modelAttributeKey}\n );\n\n // https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html\n schema.setAttributeProperties(\n modelAttributeKey,\n {isFormatting: true}\n );\n\n // Model configuration\n const config = {\n model: {\n key: modelAttributeKey,\n values: optionIdentifiers\n },\n view: {}\n };\n\n // View configuration\n optionIdentifiers.forEach(optionIdentifier => {\n const options = presetConfiguration.options[optionIdentifier];\n const {attribute} = options;\n const classes = options.attributeValue || options.cssClass;\n\n config.view[optionIdentifier] = {\n name: 'span',\n attributes: {[attribute ? attribute : 'class']: classes}\n }\n });\n\n // Convert the model to view correctly\n this.editor.conversion.attributeToElement(config);\n\n this.editor.commands.add(`inlineStyles:${presetIdentifier}`, new InlineStylesCommand(this.editor, modelAttributeKey));\n }\n };\n","import PropTypes from 'prop-types';\n\nfunction attributeValueOrCssClass(props, propName, componentName) {\n if (props[propName] && typeof props[propName] !== 'string') {\n return new Error(`Prop '${propName}' must be a string.`);\n }\n if (!props.attributeValue && !props.cssClass) {\n return new Error(`Either prop 'attributeValue' or 'cssClass' must be supplied to ${componentName}.`);\n }\n}\n\nexport default PropTypes.shape({\n label: PropTypes.string.isRequired,\n\n // keys are the option values\n options: PropTypes.objectOf(PropTypes.shape({\n label: PropTypes.string.isRequired,\n attribute: PropTypes.string,\n attributeValue: attributeValueOrCssClass,\n cssClass: attributeValueOrCssClass,\n })),\n});","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class BlockStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`blockStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `blockStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","import React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport {SelectBox} from '@neos-project/react-ui-components';\nimport {connect} from 'react-redux';\nimport {$transform} from 'plow-js';\nimport PresetType from '../PresetType';\n\nimport {selectors} from '@neos-project/neos-ui-redux-store';\nimport * as CkEditorApi from '@neos-project/neos-ui-ckeditor5-bindings';\n\n@connect($transform({\n formattingUnderCursor: selectors.UI.ContentCanvas.formattingUnderCursor\n}))\nexport default class InlineStyleSelector extends PureComponent {\n static propTypes = {\n // from outside props\n presetIdentifier: PropTypes.string.isRequired,\n presetConfiguration: PresetType.isRequired,\n\n // from @connect\n formattingUnderCursor: PropTypes.object\n };\n\n constructor(...args) {\n super(...args);\n\n this.handleOnSelect = this.handleOnSelect.bind(this);\n }\n\n render() {\n const optionsForSelect = Object.entries(this.props.presetConfiguration.options)\n .map(([optionIdentifier, optionConfiguration]) => ({\n value: optionIdentifier,\n label: optionConfiguration.label\n }));\n\n if (optionsForSelect.length === 0) {\n return null;\n }\n\n const currentValue = this.props.formattingUnderCursor[`inlineStyles:${this.props.presetIdentifier}`];\n\n return (\n \n );\n }\n\n handleOnSelect(optionIdentifier) {\n CkEditorApi.executeCommand(\n `inlineStyles:${this.props.presetIdentifier}`,\n {value: optionIdentifier}\n );\n }\n}\n","require('./manifest');","import manifest from '@neos-project/neos-ui-extensibility';\nimport {$get} from 'plow-js';\n\nimport InlineStylesEditing from './InlineStylesEditing';\nimport InlineStyleSelector from './components/InlineStyleSelector';\n\nimport BlockStyleEditing from \"./BlockStyleEditing\";\nimport BlockStyleSelector from \"./components/BlockStyleSelector\";\n\nmanifest('TechDivision.CkStyles:Styles', {}, (globalRegistry, {frontendConfiguration}) => {\n\n const ckEditorRegistry = globalRegistry.get('ckEditor5');\n const richtextToolbar = ckEditorRegistry.get('richtextToolbar');\n const config = ckEditorRegistry.get('config');\n\n const inlineStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:InlineStyles'];\n const blockStyleConfiguration = frontendConfiguration['TechDivision.CkStyles:BlockStyles'];\n\n // Block style\n if (blockStyleConfiguration) {\n\n Object.keys(blockStyleConfiguration.presets).forEach(presetIdentifier => {\n\n const blockStylePresetConfiguration = blockStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyles:BlockStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n const editing = BlockStyleEditing(presetIdentifier, blockStylePresetConfiguration);\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(editing);\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`blockStyles_${presetIdentifier}`, {\n component: BlockStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['blockStyling'] !== undefined && editorOptions['blockStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['blockStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: blockStylePresetConfiguration\n });\n\n });\n }\n\n //Inline Style\n if (inlineStyleConfiguration) {\n\n Object.keys(inlineStyleConfiguration.presets).forEach((presetIdentifier) => {\n\n const inlineStylePresetConfiguration = inlineStyleConfiguration.presets[presetIdentifier];\n\n config.set(`TechDivision.CkStyle:InlineStyles_${presetIdentifier}`, (ckEditorConfiguration, {editorOptions}) => {\n ckEditorConfiguration.plugins = ckEditorConfiguration.plugins || [];\n ckEditorConfiguration.plugins.push(InlineStylesEditing(presetIdentifier, inlineStylePresetConfiguration));\n return ckEditorConfiguration;\n });\n\n richtextToolbar.set(`inlineStyles_${presetIdentifier}`, {\n component: InlineStyleSelector,\n // Display only if the preset is activated in NodeType.yaml for this node property\n isVisible: function (editorOptions, formattingUnderCursor) {\n var isVisible = false;\n if (editorOptions['inlineStyling'] !== undefined && editorOptions['inlineStyling'][presetIdentifier] !== undefined) {\n isVisible = editorOptions['inlineStyling'][presetIdentifier];\n }\n return isVisible;\n },\n presetIdentifier: presetIdentifier,\n presetConfiguration: inlineStylePresetConfiguration\n });\n });\n }\n});\n"],"sourceRoot":""} \ No newline at end of file