UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.13 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ (function(_0x6c1e61,_0x44e443){const _0x3c3178=_0x47df,_0x3ed37e=_0x6c1e61();while(!![]){try{const _0x7ad9c8=-parseInt(_0x3c3178(0x14c))/0x1*(-parseInt(_0x3c3178(0x127))/0x2)+parseInt(_0x3c3178(0x138))/0x3*(parseInt(_0x3c3178(0x14d))/0x4)+parseInt(_0x3c3178(0x155))/0x5+parseInt(_0x3c3178(0x15c))/0x6+-parseInt(_0x3c3178(0x132))/0x7*(parseInt(_0x3c3178(0x147))/0x8)+parseInt(_0x3c3178(0x15d))/0x9+-parseInt(_0x3c3178(0x134))/0xa*(parseInt(_0x3c3178(0x13e))/0xb);if(_0x7ad9c8===_0x44e443)break;else _0x3ed37e['push'](_0x3ed37e['shift']());}catch(_0x2bff2){_0x3ed37e['push'](_0x3ed37e['shift']());}}}(_0x4ab7,0xbfaa6));export function normalizeDescription(_0x2d2eec){const _0x18a16c=_0x47df;return Array[_0x18a16c(0x140)](_0x2d2eec)||(_0x2d2eec=[_0x2d2eec]),_0x2d2eec[_0x18a16c(0x139)](_0xb0969c=>{const _0x28b33e=_0x18a16c,_0xc64344=_0xb0969c[_0x28b33e(0x12a)][_0x28b33e(0x156)](/\*/g,''),_0x12e9c1=_0xb0969c[_0x28b33e(0x157)]?_0x28b33e(0x141)+_0xb0969c[_0x28b33e(0x157)][_0x28b33e(0x12b)]+']':'';return'['+_0xb0969c[_0x28b33e(0x143)]+']\x20'+_0xc64344+_0x12e9c1;})[_0x18a16c(0x158)](';\x20');}export function renderDescription(_0x45e303,_0x4fe25d){const _0x4f515e=_0x47df;let _0x5b6815='';return _0x5b6815+=_0x45e303[_0x4f515e(0x144)]('*')[_0x4f515e(0x139)]((_0x58d9ef,_0x4789d8)=>_0x4789d8%0x2!=0x0?_0x4f515e(0x12d)+nn(_0x58d9ef)+_0x4f515e(0x12f):nn(_0x58d9ef))[_0x4f515e(0x158)](''),_0x4fe25d&&(_0x5b6815+=_0x4f515e(0x14a)+_0x4fe25d[_0x4f515e(0x12b)]+_0x4f515e(0x150)+_0x4fe25d[_0x4f515e(0x13c)]+_0x4f515e(0x13d)),_0x5b6815;}function nn(_0x1c8824){const _0x72d33d=_0x47df,_0x1f4419=document[_0x72d33d(0x13a)](_0x72d33d(0x13f));return _0x1f4419[_0x72d33d(0x142)]=_0x1c8824,_0x1f4419[_0x72d33d(0x153)];}function _0x4ab7(){const _0x5e7a30=['innerText','type','split','push','isInContent','477328oRuGZo','from','getRanges','<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20','deletion','790701aziKzV','540lCeqfU','isObject','createPositionBefore','\x22\x20title=\x22','createRange','splice','innerHTML','add','4113560QFVARG','replace','color','join','sort','end','isCollapsed','4081548tFLKSm','203796wQBIiG','2iFoLjl','isIntersecting','createPositionAt','content','value','isMultiRange','<span\x20class=\x22ck-suggestion-type\x22>','isTouching','</span>','schema','start','105TzFLZX','change','10FTAkiH','length','createPositionAfter','execute','8871mVVBgZ','map','createElement','next','title','\x22></span>','11390038bohyis','span','isArray','\x20[color\x20'];_0x4ab7=function(){return _0x5e7a30;};return _0x4ab7();}export function sortSuggestions(_0x2539f4){const _0x34a514=_0x47df;return _0x2539f4[_0x34a514(0x159)]((_0x57834f,_0x564c9c)=>_0x34a514(0x14b)==_0x57834f[_0x34a514(0x143)]&&_0x34a514(0x14b)!=_0x564c9c[_0x34a514(0x143)]?-0x1:_0x34a514(0x14b)!=_0x57834f[_0x34a514(0x143)]&&_0x34a514(0x14b)==_0x564c9c[_0x34a514(0x143)]?0x1:0x0);}export function getSelectedSuggestions(_0x73bf65,_0x1dd8cd){const _0x590c3b=_0x47df,_0x17370a=Array[_0x590c3b(0x148)](_0x73bf65[_0x590c3b(0x149)]()),_0x1f774b=new Set();for(const _0x539a29 of _0x1dd8cd)if(_0x539a29[_0x590c3b(0x146)]){for(const _0x333e26 of _0x17370a)for(const _0x360bcf of _0x539a29[_0x590c3b(0x149)]())(_0x333e26[_0x590c3b(0x128)](_0x360bcf)||_0x73bf65[_0x590c3b(0x15b)]&&!_0x539a29[_0x590c3b(0x12c)]&&_0x539a29[_0x590c3b(0x13b)]&&_0x360bcf[_0x590c3b(0x15a)][_0x590c3b(0x12e)](_0x333e26[_0x590c3b(0x131)]))&&_0x1f774b[_0x590c3b(0x154)](_0x539a29);}return _0x1f774b;}function _0x47df(_0x50212d,_0x419472){const _0x4ab777=_0x4ab7();return _0x47df=function(_0x47dfd3,_0x3817fe){_0x47dfd3=_0x47dfd3-0x127;let _0x367695=_0x4ab777[_0x47dfd3];return _0x367695;},_0x47df(_0x50212d,_0x419472);}export function getRangesOfBlockGroups(_0x28a471,_0x548ad8){const _0x404509=_0x47df;let _0x461cd8,_0x304482=0x0;const _0x71e295=[],_0x596758=_0x548ad8[_0x404509(0x130)];for(;_0x304482<_0x28a471[_0x404509(0x135)];){const _0x1eddda=_0x28a471[_0x304482],_0x6442c1=_0x28a471[_0x304482+0x1];_0x461cd8||(_0x461cd8=_0x548ad8[_0x404509(0x14f)](_0x1eddda)),on(_0x548ad8,_0x1eddda,_0x6442c1)||(_0x71e295[_0x404509(0x145)](_0x548ad8[_0x404509(0x151)](_0x461cd8,_0x596758[_0x404509(0x14e)](_0x1eddda)?_0x548ad8[_0x404509(0x136)](_0x1eddda):_0x548ad8[_0x404509(0x129)](_0x1eddda,_0x404509(0x15a)))),_0x461cd8=null),_0x304482++;}return _0x71e295;}function on(_0x218dd8,_0x228c1f,_0x4305c1){const _0x14dbe7=_0x47df;if(!_0x4305c1)return!0x1;const _0x45c373=_0x218dd8[_0x14dbe7(0x136)](_0x228c1f),_0x59ce4f=_0x218dd8[_0x14dbe7(0x14f)](_0x4305c1);return _0x45c373[_0x14dbe7(0x12e)](_0x59ce4f);}export const MAX_SUGGESTION_ACTIONS_IN_BATCH=0x64;export function executeCommandForSuggestions(_0x392146,_0x54133b,_0x4b7396){const _0x42aa6a=_0x47df;for(;_0x4b7396[_0x42aa6a(0x135)];){const _0xcfb01c=_0x4b7396[_0x42aa6a(0x152)](0x0,0x64);_0x392146[_0x42aa6a(0x133)](()=>{const _0xc63bee=_0x42aa6a;for(const _0x2c9fc1 of _0xcfb01c)_0x2c9fc1[_0xc63bee(0x146)]&&_0x54133b[_0xc63bee(0x137)](_0x2c9fc1['id']);});}}