UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 9.8 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 _0x39132c=_0x15ec;(function(_0x54331b,_0x3bfd29){const _0x3285eb=_0x15ec,_0x148034=_0x54331b();while(!![]){try{const _0x5af4c9=parseInt(_0x3285eb(0x18e))/0x1*(-parseInt(_0x3285eb(0x1a0))/0x2)+-parseInt(_0x3285eb(0x15b))/0x3*(-parseInt(_0x3285eb(0x16c))/0x4)+-parseInt(_0x3285eb(0x166))/0x5*(-parseInt(_0x3285eb(0x199))/0x6)+parseInt(_0x3285eb(0x155))/0x7+parseInt(_0x3285eb(0x16a))/0x8*(-parseInt(_0x3285eb(0x149))/0x9)+-parseInt(_0x3285eb(0x181))/0xa+-parseInt(_0x3285eb(0x185))/0xb;if(_0x5af4c9===_0x3bfd29)break;else _0x148034['push'](_0x148034['shift']());}catch(_0x5102aa){_0x148034['push'](_0x148034['shift']());}}}(_0x2d35,0x27f81));import{Plugin as _0x10c22b}from'ckeditor5/src/core.js';import{getTranslation as _0x3d115f}from'../utils/common-translations.js';function _0x15ec(_0x300310,_0x31f7de){const _0x2d35db=_0x2d35();return _0x15ec=function(_0x15ecee,_0x1d4a61){_0x15ecee=_0x15ecee-0x149;let _0x33bc9f=_0x2d35db[_0x15ecee];return _0x33bc9f;},_0x15ec(_0x300310,_0x31f7de);}export class TrackChangesDocumentListProperties extends _0x10c22b{[_0x39132c(0x14b)](){const _0x1476cf=_0x39132c;if(!this[_0x1476cf(0x183)][_0x1476cf(0x15e)][_0x1476cf(0x18a)](_0x1476cf(0x17e)))return;const _0x4e9da9=this[_0x1476cf(0x183)][_0x1476cf(0x163)][_0x1476cf(0x19f)](_0x1476cf(0x187)),_0x5b805c=this[_0x1476cf(0x183)][_0x1476cf(0x15e)][_0x1476cf(0x19f)](_0x1476cf(0x14c));_0x4e9da9[_0x1476cf(0x170)]&&(_0x5b805c[_0x1476cf(0x17d)](_0x1476cf(0x164)),_0x5b805c[_0x1476cf(0x172)](_0x1476cf(0x164))),_0x4e9da9[_0x1476cf(0x171)]&&(_0x5b805c[_0x1476cf(0x17d)](_0x1476cf(0x1a5)),_0x5b805c[_0x1476cf(0x172)](_0x1476cf(0x1a5))),_0x4e9da9[_0x1476cf(0x1a1)]&&(_0x5b805c[_0x1476cf(0x17d)](_0x1476cf(0x188)),_0x5b805c[_0x1476cf(0x172)](_0x1476cf(0x188)));const _0x45ef66={'type':_0x1476cf(0x14f),'content':''};_0x5b805c[_0x1476cf(0x162)][_0x1476cf(0x194)](this[_0x1476cf(0x1a2)][_0x1476cf(0x189)](this));const _0x3fe504=this[_0x1476cf(0x183)][_0x1476cf(0x160)];_0x5b805c[_0x1476cf(0x162)][_0x1476cf(0x15f)](_0x1476cf(0x1a5),_0x3d115f(_0x3fe504,_0x1476cf(0x174))),_0x5b805c[_0x1476cf(0x162)][_0x1476cf(0x194)](_0x1582f8=>{const _0x1b8c63=_0x1476cf,{data:_0x2b4fd8}=_0x1582f8;if(_0x2b4fd8&&_0x1b8c63(0x1a5)==_0x2b4fd8[_0x1b8c63(0x157)])return null==_0x2b4fd8[_0x1b8c63(0x167)]||0x0==_0x2b4fd8[_0x1b8c63(0x167)]&&null==_0x2b4fd8[_0x1b8c63(0x186)]?_0x45ef66:void 0x0;}),_0x5b805c[_0x1476cf(0x162)][_0x1476cf(0x15f)](_0x1476cf(0x188),_0x3d115f(_0x3fe504,_0x1476cf(0x169))),_0x5b805c[_0x1476cf(0x162)][_0x1476cf(0x194)](_0x57ad75=>{const _0x7ede8=_0x1476cf,{data:_0x1753bc}=_0x57ad75;if(_0x1753bc&&_0x7ede8(0x188)==_0x1753bc[_0x7ede8(0x157)])return null==_0x1753bc[_0x7ede8(0x167)]||0x1==_0x1753bc[_0x7ede8(0x167)]&&null==_0x1753bc[_0x7ede8(0x186)]?_0x45ef66:void 0x0;}),this[_0x1476cf(0x183)][_0x1476cf(0x156)][_0x1476cf(0x14a)][_0x1476cf(0x173)](_0x429db7=>{const _0x4166e6=_0x1476cf;if(_0x429db7[_0x4166e6(0x152)][_0x4166e6(0x16f)])return!0x1;let _0x4b36f2=!0x1;const _0x3b3075=_0x5b805c[_0x4166e6(0x17b)]({'skipNotAttached':!0x0})[_0x4166e6(0x14e)](_0x4a242c=>{const _0x3a14bc=_0x4166e6,_0x2eb6a0=_0x5b805c[_0x3a14bc(0x18b)](_0x4a242c);return _0x3a14bc(0x188)==_0x2eb6a0||_0x3a14bc(0x1a5)==_0x2eb6a0;});for(const _0x53c236 of _0x3b3075){const _0x3f7a15=_0x53c236[_0x4166e6(0x15c)]()[_0x4166e6(0x16d)][_0x4166e6(0x195)][_0x4166e6(0x190)](_0x4166e6(0x159));if(_0x4166e6(0x18d)==_0x3f7a15||_0x4166e6(0x193)==_0x3f7a15)continue;_0x5b805c[_0x4166e6(0x17c)](_0x53c236[_0x4166e6(0x15c)](),_0x4166e6(0x165))[_0x4166e6(0x18f)](_0x1f9ca9=>_0x4166e6(0x159)==_0x5b805c[_0x4166e6(0x18b)](_0x1f9ca9[_0x4166e6(0x176)]))||(_0x429db7[_0x4166e6(0x158)](_0x53c236[_0x4166e6(0x182)]()),_0x4b36f2=!0x0);}return _0x4b36f2;}),this[_0x1476cf(0x14d)]();}[_0x39132c(0x1a2)](_0x10b5ad){const _0x1ff209=_0x39132c,_0x366da4=this[_0x1ff209(0x183)][_0x1ff209(0x160)],{data:_0x59962d}=_0x10b5ad,_0x4a59a6={'type':_0x1ff209(0x14f),'content':''};if(!_0x59962d||_0x1ff209(0x164)!=_0x59962d[_0x1ff209(0x157)])return;if(!_0x59962d[_0x1ff209(0x186)])return _0x1ff209(0x175)==_0x59962d[_0x1ff209(0x167)]?_0x4a59a6:{'type':_0x1ff209(0x14f),'content':''+_0x3d115f(_0x366da4,_0x1ff209(0x151),_0x3d115f(_0x366da4,this[_0x1ff209(0x16b)](_0x59962d[_0x1ff209(0x167)])))};if(!_0x59962d[_0x1ff209(0x167)]){if(_0x1ff209(0x175)==_0x59962d[_0x1ff209(0x186)])return _0x4a59a6;let _0x4580c4=_0x10b5ad[_0x1ff209(0x198)];for(;_0x4580c4;){if(_0x4580c4[_0x1ff209(0x180)]&&_0x1ff209(0x159)==_0x4580c4[_0x1ff209(0x180)][_0x1ff209(0x157)]&&_0x4580c4[_0x1ff209(0x180)][_0x1ff209(0x167)])return _0x4a59a6;_0x4580c4=_0x4580c4[_0x1ff209(0x154)];}return{'type':_0x1ff209(0x14f),'content':''+_0x3d115f(_0x366da4,_0x1ff209(0x19e),_0x3d115f(_0x366da4,this[_0x1ff209(0x16b)](_0x59962d[_0x1ff209(0x186)])))};}if(_0x1ff209(0x175)!=_0x59962d[_0x1ff209(0x167)])return{'type':_0x1ff209(0x14f),'content':''+_0x3d115f(_0x366da4,_0x1ff209(0x151),_0x3d115f(_0x366da4,this[_0x1ff209(0x16b)](_0x59962d[_0x1ff209(0x167)])))};let _0x5edbe2=_0x10b5ad[_0x1ff209(0x198)];for(;_0x5edbe2;){if(_0x5edbe2[_0x1ff209(0x180)]&&_0x1ff209(0x159)==_0x5edbe2[_0x1ff209(0x180)][_0x1ff209(0x157)]&&_0x5edbe2[_0x1ff209(0x180)][_0x1ff209(0x167)]&&_0x5edbe2[_0x1ff209(0x180)][_0x1ff209(0x186)])return _0x4a59a6;_0x5edbe2=_0x5edbe2[_0x1ff209(0x154)];}const _0x3a1ec5=_0x10b5ad[_0x1ff209(0x15c)]()[_0x1ff209(0x16d)][_0x1ff209(0x195)][_0x1ff209(0x190)](_0x1ff209(0x159));return{'type':_0x1ff209(0x14f),'content':_0x3d115f(_0x366da4,_0x1ff209(0x151),_0x3d115f(_0x366da4,_0x1ff209(0x19c)+_0x3a1ec5[_0x1ff209(0x179)]()+_0x1ff209(0x184)))};}[_0x39132c(0x14d)](){const _0xb27c3e=_0x39132c,_0x29cf8e=this[_0xb27c3e(0x183)],_0x2933bd=_0x29cf8e[_0xb27c3e(0x160)];_0x29cf8e[_0xb27c3e(0x15e)][_0xb27c3e(0x19f)](_0xb27c3e(0x14c))[_0xb27c3e(0x162)][_0xb27c3e(0x194)](_0x22ce49=>{const _0x32ad09=_0xb27c3e;if(_0x32ad09(0x161)!=_0x22ce49[_0x32ad09(0x19d)])return;const {data:_0x32a674}=_0x22ce49;if(!_0x32a674)return;let _0x297e24,_0x3a4267;switch(_0x32a674[_0x32ad09(0x192)]){case _0x32ad09(0x164):_0x297e24=_0x32ad09(0x1a3),_0x3a4267={'type':_0x32ad09(0x14f),'content':_0x3d115f(_0x2933bd,_0x297e24,_0x3d115f(_0x2933bd,this[_0x32ad09(0x16b)](_0x32a674[_0x32ad09(0x196)][0x0][_0x32ad09(0x19d)])))};break;case _0x32ad09(0x1a5):_0x297e24=_0x32a674[_0x32ad09(0x196)][0x0][_0x32ad09(0x171)]?_0x32ad09(0x17a):_0x32ad09(0x1a4),_0x3a4267={'type':_0x32ad09(0x14f),'content':_0x3d115f(_0x2933bd,_0x297e24)};break;case _0x32ad09(0x188):_0x297e24=_0x32ad09(0x16e),_0x3a4267={'type':_0x32ad09(0x14f),'content':_0x3d115f(_0x2933bd,_0x297e24,_0x32a674[_0x32ad09(0x196)][0x0][_0x32ad09(0x1a1)])};}return _0x3a4267;});}[_0x39132c(0x16b)](_0x26630f){const _0x4323ce=_0x39132c;return _0x4323ce(0x19c)+function(_0x65010c){const _0x59da48=_0x4323ce;if(Se[_0x59da48(0x150)](_0x65010c))return _0x59da48(0x15d);if(_e[_0x59da48(0x150)](_0x65010c))return _0x59da48(0x18d);return null;}(_0x26630f)[_0x4323ce(0x179)]()+_0x4323ce(0x153)+_0x26630f[_0x4323ce(0x179)]()[_0x4323ce(0x19a)](/-/g,'_');}}function _0x2d35(){const _0x55a292=['square','data','1593020bLlKrh','getFirstMarker','editor','_LIST_DEFAULT','2285272JngkRK','oldValue','list.properties','listStart','bind','has','_getAttributeKey','lower-latin','numbered','4joEVBk','find','getAttribute','upper-roman','commandName','customNumbered','registerDescriptionCallback','nodeAfter','commandParams','disc','head','78zhWKgM','replace','lower-roman','ELEMENT_','type','*Remove\x20format:*\x20%0','get','6748RJedRy','startIndex','handleDescriptions','*Change\x20to:*\x20%0','*Format:*\x20set\x20order\x20to\x20regular','listReversed','180xeikIO','document','afterInit','TrackChangesEditing','_registerLegacyDescription','filter','format','includes','*Set\x20format:*\x20%0','batch','_LIST_','next','1367443cFjWpZ','model','key','removeMarker','listType','decimal-leading-zero','3ajdEzM','getFirstRange','bulleted','plugins','registerAttributeLabel','locale','formatBlock','descriptionFactory','config','listStyle','attribute','118835fboUbz','newValue','upper-latin','FORMAT_LIST_START','92704zvFIfq','_getTranslationKeyForListStyle','1086812aupFrI','start','*Format:*\x20set\x20start\x20index\x20to\x20%0','isUndo','styles','reversed','registerBlockAttribute','registerPostFixer','FORMAT_LIST_REVERSED','default','suggestion','decimal','circle','toUpperCase','*Format:*\x20set\x20order\x20to\x20reversed','getSuggestions','_findSuggestions','enableDefaultAttributesIntegration','ListPropertiesEditing'];_0x2d35=function(){return _0x55a292;};return _0x2d35();}const Se=[_0x39132c(0x197),_0x39132c(0x178),_0x39132c(0x17f)],_e=[_0x39132c(0x177),_0x39132c(0x15a),_0x39132c(0x19b),_0x39132c(0x191),_0x39132c(0x18c),_0x39132c(0x168)];