@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 11.3 kB
JavaScript
/*
* 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 _0x3fe37e=_0x4369;(function(_0x1a7ad1,_0x59f166){const _0x4c8a3f=_0x4369,_0x230d56=_0x1a7ad1();while(!![]){try{const _0xd31b99=-parseInt(_0x4c8a3f(0x197))/0x1*(parseInt(_0x4c8a3f(0x188))/0x2)+parseInt(_0x4c8a3f(0x166))/0x3+-parseInt(_0x4c8a3f(0x189))/0x4*(-parseInt(_0x4c8a3f(0x193))/0x5)+parseInt(_0x4c8a3f(0x1a0))/0x6+parseInt(_0x4c8a3f(0x1a6))/0x7*(-parseInt(_0x4c8a3f(0x186))/0x8)+-parseInt(_0x4c8a3f(0x163))/0x9+parseInt(_0x4c8a3f(0x19b))/0xa;if(_0xd31b99===_0x59f166)break;else _0x230d56['push'](_0x230d56['shift']());}catch(_0x27a4e4){_0x230d56['push'](_0x230d56['shift']());}}}(_0x3e2c,0x25a27));function _0x3e2c(){const _0x296fea=['model','getChangedMarkers','registerDescriptionCallback','head','descriptionFactory','nodeAfter','isEqual','suggestion','title','664Pbywfu','refresh','95830ChIROK','56xqsYdm','subType','_splitMarkerName','isBefore','editor','from','shouldConvertImageType','next','commands','getClosestSelectedImageElement','19100dxXEeW','document','filter','differ','1MUdvoB','format','isBlockImage','findIndex','411190wZhKNM','_findSuggestions','_registerLegacyDescription','formatBlock','_suggestionFactory','1202250knOzFw','side','createRangeOn','accept','discardSuggestion','getSuggestion','3031LpUUMK','plugins','toLowerCase','getSuggestionCallback','normalizedStyles','discard','registerCustomCallback','chain','hasSuggestion','get','markInlineFormat','*Format:*\x20%0','imageStylePostApply','author','convertInlineImageToBlock','imageStylePreApply','getSuggestions','enableCommand','setImageNaturalSizeAttributes','locale','commandParams','commandReversedParams','registerPostFixer','imageStyle','isInlineImage','insertion','isOwn','start','ImageUtils','value','ImageStyleEditing','Users','2426940AbNawO','newRange','commandName','638073mPgOLZ','selection','length','FORMAT_SIDE_IMAGE','change','isInContent','markBlockFormat','imageTypeBlock','imageTypeInline','forEach','afterInit','getFirstRange','TrackChangesEditing','isIntersecting','formatInline','type','name','join','getContainedElement','imageCaption','has','nodeBefore','end'];_0x3e2c=function(){return _0x296fea;};return _0x3e2c();}import{Plugin as _0x34213f}from'ckeditor5/src/core.js';function _0x4369(_0x360cf0,_0x1652e2){const _0x3e2c22=_0x3e2c();return _0x4369=function(_0x4369a7,_0x381e40){_0x4369a7=_0x4369a7-0x160;let _0x18dbda=_0x3e2c22[_0x4369a7];return _0x18dbda;},_0x4369(_0x360cf0,_0x1652e2);}import{uid as _0x57e767}from'ckeditor5/src/utils.js';import{getTranslation as _0x5b3ddf}from'../utils/common-translations.js';export class TrackChangesImageStyle extends _0x34213f{[_0x3fe37e(0x170)](){const _0x2d2155=_0x3fe37e,_0x4f74c0=this[_0x2d2155(0x18d)];if(!_0x4f74c0[_0x2d2155(0x1a7)][_0x2d2155(0x17a)](_0x2d2155(0x161)))return;const _0x456ea2=_0x4f74c0[_0x2d2155(0x1a7)][_0x2d2155(0x1af)](_0x2d2155(0x172)),_0x466014=_0x4f74c0[_0x2d2155(0x1a7)][_0x2d2155(0x1af)](_0x2d2155(0x1c2)),_0x54acac={};_0x456ea2[_0x2d2155(0x1b7)](_0x2d2155(0x1bd),(_0x4cb474,_0x4874f2)=>{const _0x3154af=_0x2d2155,_0x53b60b=_0x4f74c0[_0x3154af(0x1a7)][_0x3154af(0x1af)](_0x3154af(0x162))['me'],_0x3323e0=_0x4f74c0[_0x3154af(0x191)][_0x3154af(0x1af)](_0x3154af(0x1bd));let _0x5ab191=_0x466014[_0x3154af(0x192)](_0x4f74c0[_0x3154af(0x17d)][_0x3154af(0x194)][_0x3154af(0x167)]),_0x20a8dc=_0x4f74c0[_0x3154af(0x17d)][_0x3154af(0x1a2)](_0x5ab191),_0x275168=_0x3323e0[_0x3154af(0x160)];if(_0x275168==_0x4874f2[_0x3154af(0x160)])return;const _0x34e44d={'commandName':_0x3154af(0x1bd),'commandParams':[_0x4874f2],'formatGroupId':_0x57e767()};_0x4f74c0[_0x3154af(0x17d)][_0x3154af(0x16a)](()=>{const _0x480934=_0x3154af;if(_0x456ea2[_0x480934(0x1b6)]()[_0x480934(0x195)](_0x252d92=>_0x252d92[_0x480934(0x16b)]&&_0x53b60b==_0x252d92[_0x480934(0x1b3)]&&(_0x480934(0x19e)==_0x252d92[_0x480934(0x175)]||_0x480934(0x174)==_0x252d92[_0x480934(0x175)])&&(_0x480934(0x1b5)==_0x252d92[_0x480934(0x18a)]||_0x480934(0x1b2)==_0x252d92[_0x480934(0x18a)])&&_0x252d92[_0x480934(0x171)]()[_0x480934(0x183)](_0x20a8dc))[_0x480934(0x16f)](_0x5c41ac=>_0x456ea2[_0x480934(0x1a4)](_0x5c41ac[_0x480934(0x180)])),_0x5ab191=_0x466014[_0x480934(0x192)](_0x4f74c0[_0x480934(0x17d)][_0x480934(0x194)][_0x480934(0x167)]),_0x20a8dc=_0x4f74c0[_0x480934(0x17d)][_0x480934(0x1a2)](_0x5ab191),_0x3323e0[_0x480934(0x187)](),_0x4f74c0[_0x480934(0x191)][_0x480934(0x1af)](_0x480934(0x16e))[_0x480934(0x187)](),_0x4f74c0[_0x480934(0x191)][_0x480934(0x1af)](_0x480934(0x16d))[_0x480934(0x187)](),_0x275168=_0x3323e0[_0x480934(0x160)],_0x275168!=_0x4874f2[_0x480934(0x160)])return _0x466014[_0x480934(0x1be)](_0x5ab191)&&_0x3323e0[_0x480934(0x18f)](_0x4874f2[_0x480934(0x160)],_0x5ab191)?(_0x4cb474({..._0x4874f2,'setImageSizes':!0x1}),_0x5ab191=_0x466014[_0x480934(0x192)](_0x4f74c0[_0x480934(0x17d)][_0x480934(0x194)][_0x480934(0x167)]),void _0x456ea2[_0x480934(0x16c)](_0x5ab191,{..._0x34e44d,'commandReversedParams':[{'value':_0x275168||null,'setImageSizes':!0x1}]},[],_0x480934(0x1b5))):void(_0x466014[_0x480934(0x199)](_0x5ab191)?_0x456ea2[_0x480934(0x16c)](_0x5ab191,_0x34e44d,[],_0x480934(0x1b2)):_0x456ea2[_0x480934(0x1b0)](_0x20a8dc,_0x34e44d,_0x480934(0x1b2)));});});for(const _0x3bfdc7 of _0x4f74c0[_0x2d2155(0x1a7)][_0x2d2155(0x1af)](_0x2d2155(0x161))[_0x2d2155(0x1aa)])_0x54acac[_0x3bfdc7[_0x2d2155(0x176)]]=_0x3bfdc7[_0x2d2155(0x185)][_0x2d2155(0x1a8)]();_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x19e),_0x2d2155(0x1b5),_0x2d2155(0x177),()=>!0x1),_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x19e),_0x2d2155(0x1b2),_0x2d2155(0x177),()=>!0x1),_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x174),_0x2d2155(0x1b2),_0x2d2155(0x177),()=>!0x1),_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x19e),_0x2d2155(0x1b5),_0x2d2155(0x1a3),([_0x2153d8])=>{const _0x1daadb=_0x2d2155;_0x466014[_0x1daadb(0x1b8)](_0x2153d8[_0x1daadb(0x178)]());}),_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x19e),_0x2d2155(0x1b5),_0x2d2155(0x1ab),(_0x5b3aa8,_0x58ee7f)=>{const _0x144199=_0x2d2155;_0x456ea2[_0x144199(0x19f)][_0x144199(0x1a9)](_0x144199(0x19e),'',_0x144199(0x1a3))(_0x5b3aa8,{'commandName':_0x58ee7f[_0x144199(0x165)],'commandParams':_0x58ee7f[_0x144199(0x1bb)]});}),_0x456ea2[_0x2d2155(0x19f)][_0x2d2155(0x1ac)](_0x2d2155(0x19e),_0x2d2155(0x1b5),_0x2d2155(0x1ad),function(_0x2cde4f,_0x11861f){if(_0x30fffc(_0x2cde4f,_0x11861f))return[_0x2cde4f,_0x11861f];if(_0x30fffc(_0x11861f,_0x2cde4f))return[_0x11861f,_0x2cde4f];return null;});const _0x5f63ed=[{'type':_0x2d2155(0x19e),'subType':_0x2d2155(0x1b5)},{'type':_0x2d2155(0x1bf),'subType':_0x2d2155(0x179)},{'type':_0x2d2155(0x19e),'subType':_0x2d2155(0x1b4)},{'type':_0x2d2155(0x1bf),'subType':_0x2d2155(0x1b4)}];function _0x30fffc(_0x4516a7,_0x46bc11){const _0xbac092=_0x2d2155,_0x1ca46b=_0x5f63ed[_0xbac092(0x19a)](({type:_0x18f089,subType:_0x392a7d})=>_0x4516a7[_0xbac092(0x175)]==_0x18f089&&_0x4516a7[_0xbac092(0x18a)]==_0x392a7d),_0x518f3e=_0x5f63ed[_0xbac092(0x19a)](({type:_0x118f7f,subType:_0xbf6ae2})=>_0x46bc11[_0xbac092(0x175)]==_0x118f7f&&_0x46bc11[_0xbac092(0x18a)]==_0xbf6ae2);if(_0x1ca46b<0x0||_0x518f3e<0x0)return!0x1;const _0x24c8b1=_0x4516a7[_0xbac092(0x171)](),_0x5c5493=_0x46bc11[_0xbac092(0x171)]();if((0x0==_0x1ca46b||0x1==_0x1ca46b)&&0x2==_0x518f3e&&_0x24c8b1[_0xbac092(0x173)](_0x5c5493))return!0x0;if(0x2==_0x1ca46b&&0x3==_0x518f3e){const _0x50241b=_0x456ea2[_0xbac092(0x19c)](_0x24c8b1,_0xbac092(0x1bf))[_0xbac092(0x195)](({suggestion:_0x13f43d,meta:_0x2acfea})=>_0x2acfea[_0xbac092(0x1c0)]&&_0xbac092(0x1b4)==_0x13f43d[_0xbac092(0x18a)]);if(_0x50241b[_0xbac092(0x168)]>0x1&&_0x5c5493[_0xbac092(0x17c)][_0xbac092(0x183)](_0x24c8b1[_0xbac092(0x1c1)]))return!0x0;if(0x1==_0x50241b[_0xbac092(0x168)]&&(_0x24c8b1[_0xbac092(0x1c1)][_0xbac092(0x183)](_0x5c5493[_0xbac092(0x17c)])||_0x24c8b1[_0xbac092(0x17c)][_0xbac092(0x183)](_0x5c5493[_0xbac092(0x1c1)])))return!0x0;}if(0x3==_0x1ca46b&&0x3==_0x518f3e&&_0x24c8b1[_0xbac092(0x1c1)][_0xbac092(0x18c)](_0x5c5493[_0xbac092(0x1c1)])){const _0x1eebcf=_0x24c8b1[_0xbac092(0x17c)][_0xbac092(0x182)],_0x172c17=_0x5c5493[_0xbac092(0x1c1)][_0xbac092(0x17b)];return _0x466014[_0xbac092(0x199)](_0x1eebcf)&&_0x1eebcf===_0x172c17;}return!0x1;}_0x4f74c0[_0x2d2155(0x17d)][_0x2d2155(0x194)][_0x2d2155(0x1bc)](()=>{const _0x17c2c8=_0x2d2155;let _0x1ab077=!0x1;const _0x221053=Array[_0x17c2c8(0x18e)](_0x4f74c0[_0x17c2c8(0x17d)][_0x17c2c8(0x194)][_0x17c2c8(0x196)][_0x17c2c8(0x17e)]());for(const {name:_0x190e81,data:_0x1352aa}of _0x221053){const {group:_0x1a6f8d,type:_0x19ff12,subType:_0x580070,id:_0x11d215}=_0x456ea2[_0x17c2c8(0x18b)](_0x190e81);if(_0x17c2c8(0x184)==_0x1a6f8d&&_0x456ea2[_0x17c2c8(0x1ae)](_0x11d215)){if(_0x17c2c8(0x19e)==_0x19ff12&&(_0x17c2c8(0x1b5)==_0x580070||_0x17c2c8(0x1b2)==_0x580070)){const _0x18bdb3=_0x456ea2[_0x17c2c8(0x1a5)](_0x11d215);if(_0x1352aa[_0x17c2c8(0x164)]){const _0x362890=_0x18bdb3[_0x17c2c8(0x171)]()[_0x17c2c8(0x178)]();if(_0x466014[_0x17c2c8(0x199)](_0x362890))continue;_0x456ea2[_0x17c2c8(0x1a4)](_0x18bdb3),_0x1ab077=!0x0;}}if(_0x17c2c8(0x1bf)==_0x19ff12&&_0x17c2c8(0x179)==_0x580070&&!_0x1352aa[_0x17c2c8(0x164)]){const _0x1538af=_0x456ea2[_0x17c2c8(0x1a5)](_0x11d215);_0x1538af[_0x17c2c8(0x190)]&&_0x1538af[_0x17c2c8(0x190)][_0x17c2c8(0x16b)]&&(_0x456ea2[_0x17c2c8(0x1a4)](_0x1538af[_0x17c2c8(0x190)]),_0x1ab077=!0x0);}}}return _0x1ab077;}),this[_0x2d2155(0x19d)](_0x54acac);}[_0x3fe37e(0x19d)](_0xe9d62f){const _0x51eb17=_0x3fe37e,_0x52789b=this[_0x51eb17(0x18d)],_0x167b27=_0x52789b[_0x51eb17(0x1b9)];_0x52789b[_0x51eb17(0x1a7)][_0x51eb17(0x1af)](_0x51eb17(0x172))[_0x51eb17(0x181)][_0x51eb17(0x17f)](_0x46411b=>{const _0x26ac79=_0x51eb17;if(_0x26ac79(0x19e)!=_0x46411b[_0x26ac79(0x175)]&&_0x26ac79(0x174)!=_0x46411b[_0x26ac79(0x175)])return;const {data:_0x229f32}=_0x46411b;if(!_0x229f32||_0x26ac79(0x1bd)!=_0x229f32[_0x26ac79(0x165)])return;const _0xb20b09=_0x229f32[_0x26ac79(0x1ba)][0x0][_0x26ac79(0x160)];return _0x150861(_0x26ac79(0x1a1)===_0xb20b09?_0x5b3ddf(_0x167b27,_0x26ac79(0x169)):_0xe9d62f[_0xb20b09]||_0xb20b09);function _0x150861(_0x29defb){const _0x1aa04c=_0x26ac79;return{'type':_0x1aa04c(0x198),'content':_0x5b3ddf(_0x167b27,_0x1aa04c(0x1b1),_0x29defb)};}});}}