UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 5.79 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 _0x4fd1d7=_0x2bf5;(function(_0x185206,_0x462851){const _0xdfab81=_0x2bf5,_0x3b5916=_0x185206();while(!![]){try{const _0x29f142=parseInt(_0xdfab81(0xeb))/0x1*(-parseInt(_0xdfab81(0x110))/0x2)+parseInt(_0xdfab81(0x111))/0x3+parseInt(_0xdfab81(0x119))/0x4+-parseInt(_0xdfab81(0x114))/0x5+-parseInt(_0xdfab81(0xf9))/0x6+-parseInt(_0xdfab81(0x113))/0x7+parseInt(_0xdfab81(0x106))/0x8*(parseInt(_0xdfab81(0x10b))/0x9);if(_0x29f142===_0x462851)break;else _0x3b5916['push'](_0x3b5916['shift']());}catch(_0x48942c){_0x3b5916['push'](_0x3b5916['shift']());}}}(_0x2266,0xe7ebf));import{Plugin as _0x223a5e}from'ckeditor5/src/core.js';import{getTranslation as _0x56a0f9}from'../utils/common-translations.js';function _0x2bf5(_0x267a87,_0x43be49){const _0x2266f2=_0x2266();return _0x2bf5=function(_0x2bf56d,_0x2295de){_0x2bf56d=_0x2bf56d-0xe2;let _0x2d342c=_0x2266f2[_0x2bf56d];return _0x2d342c;},_0x2bf5(_0x267a87,_0x43be49);}import{getRangesOfBlockGroups as _0x2630fb}from'../utils/utils.js';export class TrackChangesCodeBlock extends _0x223a5e{[_0x4fd1d7(0xf0)](){const _0x36f59f=_0x4fd1d7,_0x67c94e=this[_0x36f59f(0xf2)];if(!_0x67c94e[_0x36f59f(0x100)][_0x36f59f(0x10c)](_0x36f59f(0x116)))return;const _0xc9f393=_0x67c94e[_0x36f59f(0x100)][_0x36f59f(0x101)](_0x36f59f(0xf7)),_0x3e302a=_0x67c94e[_0x36f59f(0x109)],_0x1767a8=_0x67c94e[_0x36f59f(0x102)][_0x36f59f(0x101)](_0x36f59f(0x108))[_0x36f59f(0x103)],_0x4a8846=_0x67c94e[_0x36f59f(0xe7)][_0x36f59f(0x101)](_0x36f59f(0x108));_0xc9f393[_0x36f59f(0xe6)](_0x36f59f(0x112)),_0xc9f393[_0x36f59f(0xe6)](_0x36f59f(0xfb)),_0xc9f393[_0x36f59f(0xe6)](_0x36f59f(0x108),(_0x613c84,_0x26610d={})=>{const _0x3bb4bd=_0x36f59f,_0x2b12cd=_0x67c94e[_0x3bb4bd(0xe2)],_0x55a1a4=_0x67c94e[_0x3bb4bd(0xe2)][_0x3bb4bd(0xea)][_0x3bb4bd(0xfa)],_0x124f61=_0x26610d&&void 0x0!==_0x26610d[_0x3bb4bd(0xf5)]?_0x26610d[_0x3bb4bd(0xf5)]:!_0x4a8846[_0x3bb4bd(0xec)];let _0x5b735c;_0x26610d[_0x3bb4bd(0xfd)]||(_0x26610d[_0x3bb4bd(0xfd)]=_0x1767a8[0x0][_0x3bb4bd(0xfd)]),_0x5b735c=_0x124f61?Array[_0x3bb4bd(0xfe)](_0x55a1a4[_0x3bb4bd(0xf6)]())[_0x3bb4bd(0xe8)](_0x4e4f98=>co(_0x4e4f98)||function(_0xbe0bf2,_0x349239){const _0x55d227=_0x3bb4bd;if(_0xbe0bf2['is'](_0x55d227(0x107))||_0x349239[_0x55d227(0x10f)](_0xbe0bf2))return!0x1;return _0x349239[_0x55d227(0xe5)](_0xbe0bf2[_0x55d227(0xef)],_0x55d227(0x108));}(_0x4e4f98,_0x2b12cd[_0x3bb4bd(0xf1)])):Array[_0x3bb4bd(0xfe)](_0x55a1a4[_0x3bb4bd(0xf6)]())[_0x3bb4bd(0xe8)](_0x52ee3b=>co(_0x52ee3b));const _0x29ddc8=_0x2630fb(_0x5b735c,_0x2b12cd);_0x2b12cd[_0x3bb4bd(0xfc)](()=>{const _0x3ed595=_0x3bb4bd;for(const _0x33a660 of _0x29ddc8)_0xc9f393[_0x3ed595(0xed)](_0x33a660,{'commandName':_0x3ed595(0x108),'commandParams':[{..._0x26610d,'forceValue':_0x124f61}],'formatGroupId':_0x3ed595(0x115)});});}),(_0xc9f393[_0x36f59f(0x105)][_0x36f59f(0x117)](_0x36f59f(0x108),_0x27e7b2=>_0x56a0f9(_0x3e302a,_0x36f59f(0x118),_0x27e7b2)),_0xc9f393[_0x36f59f(0x105)][_0x36f59f(0xe4)](_0x37c5da=>{const _0x17eae7=_0x36f59f;if(_0x17eae7(0xe3)!=_0x37c5da[_0x17eae7(0xff)])return;const _0x1b9c7a=_0x3e302a['t'],{data:_0x39085a}=_0x37c5da;if(!_0x39085a||_0x17eae7(0x108)!=_0x39085a[_0x17eae7(0xe9)])return;const _0x56178d=_0x39085a[_0x17eae7(0xf4)][0x0][_0x17eae7(0xfd)],_0x2992ad=_0x1b9c7a(_0x1767a8[_0x17eae7(0xf8)](_0xc8db67=>_0xc8db67[_0x17eae7(0xfd)]===_0x56178d)[_0x17eae7(0xf3)])[_0x17eae7(0xee)]();return _0x39085a[_0x17eae7(0xf4)][0x0][_0x17eae7(0xf5)]?{'type':_0x17eae7(0x104),'content':_0x56a0f9(_0x3e302a,_0x17eae7(0x10a),_0x56a0f9(_0x3e302a,_0x17eae7(0x118),0x1)+'\x20('+_0x2992ad+')')}:{'type':_0x17eae7(0x104),'content':_0x56a0f9(_0x3e302a,_0x17eae7(0x10d),_0x56a0f9(_0x3e302a,_0x17eae7(0x118),0x1))};}));}}function _0x2266(){const _0x422c4f=['registerElementLabel','ELEMENT_CODE_BLOCK','3164832lYdSDw','model','formatBlock','registerDescriptionCallback','checkChild','enableCommand','commands','filter','commandName','document','136xBPrmX','value','markBlockFormat','toLowerCase','parent','afterInit','schema','editor','label','commandParams','forceValue','getSelectedBlocks','TrackChangesEditing','find','3785748MIzbFJ','selection','outdentCodeBlock','change','language','from','type','plugins','get','config','languages','format','descriptionFactory','3218928HvIPLu','rootElement','codeBlock','locale','*Set\x20format:*\x20%0','54dyOWDG','has','*Remove\x20format:*\x20%0','name','isLimit','2866KBXgJT','595134FUlNDz','indentCodeBlock','4123553iTzmbP','5194530GaWBzV','blockName','CodeBlock'];_0x2266=function(){return _0x422c4f;};return _0x2266();}function co(_0x5a9a5d){const _0x362b9f=_0x4fd1d7;return _0x362b9f(0x108)==_0x5a9a5d[_0x362b9f(0x10e)];}