UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 5.64 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x183e3a=_0x450a;(function(_0x932445,_0x31e101){const _0x38b115=_0x450a,_0x5ddde4=_0x932445();while(!![]){try{const _0x1dee12=parseInt(_0x38b115(0x172))/0x1*(-parseInt(_0x38b115(0x17a))/0x2)+-parseInt(_0x38b115(0x175))/0x3+parseInt(_0x38b115(0x194))/0x4*(-parseInt(_0x38b115(0x188))/0x5)+parseInt(_0x38b115(0x193))/0x6+-parseInt(_0x38b115(0x183))/0x7*(parseInt(_0x38b115(0x17f))/0x8)+-parseInt(_0x38b115(0x1a5))/0x9+parseInt(_0x38b115(0x1a2))/0xa*(parseInt(_0x38b115(0x184))/0xb);if(_0x1dee12===_0x31e101)break;else _0x5ddde4['push'](_0x5ddde4['shift']());}catch(_0x1c4024){_0x5ddde4['push'](_0x5ddde4['shift']());}}}(_0x3113,0x677f4));import{Plugin as _0xe07077}from'ckeditor5/src/core.js';import{normalizeColorOptions as _0x3588ca}from'ckeditor5/src/ui.js';function _0x450a(_0x1035c1,_0x367482){const _0x3113f4=_0x3113();return _0x450a=function(_0x450a0f,_0x1c34d0){_0x450a0f=_0x450a0f-0x172;let _0x29a119=_0x3113f4[_0x450a0f];return _0x29a119;},_0x450a(_0x1035c1,_0x367482);}import{getTranslation as _0x18f5af}from'../utils/common-translations.js';export class TrackChangesFormatPainter extends _0xe07077{[_0x183e3a(0x177)](){const _0xaddb01=_0x183e3a,_0x3e7624=this[_0xaddb01(0x18c)],_0x1e6e05=_0x3e7624[_0xaddb01(0x180)][_0xaddb01(0x179)](_0xaddb01(0x173)),_0x27cfec=_0x3e7624[_0xaddb01(0x17b)][_0xaddb01(0x179)](_0xaddb01(0x199)),_0x42764b=_0x3e7624[_0xaddb01(0x17b)][_0xaddb01(0x179)](_0xaddb01(0x186));_0x27cfec&&_0x42764b&&(_0x1e6e05[_0xaddb01(0x1a7)](_0xaddb01(0x186)),_0x1e6e05[_0xaddb01(0x174)](_0xaddb01(0x199)),this[_0xaddb01(0x191)]());}[_0x183e3a(0x191)](){const _0x4ab331=_0x183e3a,_0x4a19f4=this[_0x4ab331(0x18c)],_0x5955f6=_0x4a19f4[_0x4ab331(0x1a4)];_0x4a19f4[_0x4ab331(0x180)][_0x4ab331(0x179)](_0x4ab331(0x173))[_0x4ab331(0x19c)][_0x4ab331(0x18f)](_0xe79bb3=>{const _0x6216eb=_0x4ab331;if(_0x6216eb(0x1a8)!=_0xe79bb3[_0x6216eb(0x192)]&&_0x6216eb(0x197)!=_0xe79bb3[_0x6216eb(0x192)])return;const {data:_0x38e14e}=_0xe79bb3;if(_0x38e14e&&_0x6216eb(0x186)===_0x38e14e[_0x6216eb(0x19a)]){const _0x23bd1f=[],_0x11cfc3=_0x38e14e[_0x6216eb(0x18a)][0x0];for(const [_0x3893ab,_0x5ad979]of Object[_0x6216eb(0x187)](_0x11cfc3))_0x23bd1f[_0x6216eb(0x18d)](ro(_0x4a19f4,_0x3893ab,_0x5ad979));return _0x23bd1f[_0x6216eb(0x17e)]?{'type':_0x6216eb(0x18e),'content':_0x18f5af(_0x5955f6,_0x6216eb(0x195),_0x23bd1f[_0x6216eb(0x181)](',\x20'))}:{'type':_0x6216eb(0x18e),'content':_0x18f5af(_0x5955f6,_0x6216eb(0x185))};}});}}function ro(_0x4d0ce2,_0x38b8b8,_0x3ff673){const _0x23beba=_0x183e3a,_0x47ac28=_0x4d0ce2[_0x23beba(0x1a4)]['t'],_0x2014a2=_0x38b8b8[_0x23beba(0x176)](/(?=[A-Z])/)[_0x23beba(0x181)]('\x20'),_0x365377=_0x47ac28(_0x2014a2[_0x23beba(0x1a1)](0x0)[_0x23beba(0x198)]()+_0x2014a2[_0x23beba(0x1a6)](0x1))[_0x23beba(0x18b)]();if(_0x23beba(0x178)==typeof _0x3ff673)return _0x365377;if(_0x23beba(0x1a0)===_0x38b8b8||_0x23beba(0x17c)===_0x38b8b8){const _0x28c365=_0x3588ca(_0x4d0ce2[_0x23beba(0x1a3)][_0x23beba(0x179)](_0x23beba(0x19e)))[_0x23beba(0x19f)](_0x3d2a95=>_0x3d2a95[_0x23beba(0x182)]==_0x3ff673);return _0x365377+'\x20('+(_0x28c365?_0x47ac28(_0x28c365[_0x23beba(0x190)])[_0x23beba(0x18b)]():_0x3ff673)+')';}if(_0x23beba(0x19d)===_0x38b8b8&&isNaN(parseFloat(_0x3ff673))){const _0x27c353=_0x4d0ce2[_0x23beba(0x180)][_0x23beba(0x179)](_0x23beba(0x196))[_0x23beba(0x189)](_0x4d0ce2[_0x23beba(0x1a3)][_0x23beba(0x179)](_0x23beba(0x19b)))[_0x23beba(0x19f)](_0x194700=>_0x194700[_0x23beba(0x182)]==_0x3ff673);return _0x365377+'\x20('+(_0x27c353?_0x47ac28(_0x27c353[_0x23beba(0x17d)])[_0x23beba(0x18b)]():_0x3ff673)+')';}return _0x365377+'\x20('+_0x3ff673+')';}function _0x3113(){const _0x2bc30e=['formatBlock','2GTdBXk','TrackChangesEditing','enableCommand','649815EfCQAb','split','afterInit','boolean','get','833826KtQWFz','commands','fontBackgroundColor','title','length','8CdZSRT','plugins','join','model','4992134JFStxk','143idJJtD','*Remove\x20all\x20formatting*','pasteFormat','entries','573665SsPCKc','normalizeSizeOptions','commandParams','toLowerCase','editor','push','format','registerDescriptionCallback','label','_registerLegacyDescription','type','2995758kNreCM','28cgkMsf','*Set\x20format\x20to:*\x20%0','FontSize','formatInline','toUpperCase','copyFormat','commandName','fontSize.options','descriptionFactory','fontSize','fontColor.colors','find','fontColor','charAt','2213300UEWoYv','config','locale','3473415seFvre','slice','enableDefaultAttributesIntegration'];_0x3113=function(){return _0x2bc30e;};return _0x3113();}