UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.37 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(_0x5a07e1,_0x3f805f){const _0x29c215=_0x41b7,_0x60668=_0x5a07e1();while(!![]){try{const _0x204219=-parseInt(_0x29c215(0x122))/0x1+-parseInt(_0x29c215(0x132))/0x2*(-parseInt(_0x29c215(0x135))/0x3)+parseInt(_0x29c215(0x139))/0x4*(parseInt(_0x29c215(0x13b))/0x5)+-parseInt(_0x29c215(0x131))/0x6*(parseInt(_0x29c215(0x130))/0x7)+-parseInt(_0x29c215(0x14e))/0x8*(parseInt(_0x29c215(0x155))/0x9)+parseInt(_0x29c215(0x13d))/0xa+parseInt(_0x29c215(0x11f))/0xb*(parseInt(_0x29c215(0x123))/0xc);if(_0x204219===_0x3f805f)break;else _0x60668['push'](_0x60668['shift']());}catch(_0x443c4c){_0x60668['push'](_0x60668['shift']());}}}(_0x1ad2,0x87b7b));export function normalizeDescription(_0x106029){const _0x86ec6e=_0x41b7;return Array[_0x86ec6e(0x134)](_0x106029)||(_0x106029=[_0x106029]),_0x106029[_0x86ec6e(0x13c)](_0x2e87f2=>{const _0x488c28=_0x86ec6e,_0x56a1d2=_0x2e87f2[_0x488c28(0x129)][_0x488c28(0x148)](/\*/g,''),_0x302f49=_0x2e87f2[_0x488c28(0x11d)]?_0x488c28(0x14f)+_0x2e87f2[_0x488c28(0x11d)][_0x488c28(0x13e)]+']':'';return'['+_0x2e87f2[_0x488c28(0x121)]+']\x20'+_0x56a1d2+_0x302f49;})[_0x86ec6e(0x12f)](';\x20');}export function renderDescription(_0x1fe575,_0x37cdd4){const _0x3eea2f=_0x41b7;let _0xbe101='';return _0xbe101+=_0x1fe575[_0x3eea2f(0x154)]('*')[_0x3eea2f(0x13c)]((_0x94706b,_0xd63fb8)=>_0xd63fb8%0x2!=0x0?_0x3eea2f(0x126)+Yt(_0x94706b)+_0x3eea2f(0x12c):Yt(_0x94706b))[_0x3eea2f(0x12f)](''),_0x37cdd4&&(_0xbe101+=_0x3eea2f(0x14d)+_0x37cdd4[_0x3eea2f(0x13e)]+_0x3eea2f(0x14a)+_0x37cdd4[_0x3eea2f(0x125)]+_0x3eea2f(0x12d)),_0xbe101;}function _0x41b7(_0x5970cf,_0xadee40){const _0x1ad200=_0x1ad2();return _0x41b7=function(_0x41b7f1,_0x2f0451){_0x41b7f1=_0x41b7f1-0x11d;let _0x4988c0=_0x1ad200[_0x41b7f1];return _0x4988c0;},_0x41b7(_0x5970cf,_0xadee40);}function Yt(_0xd9dc9){const _0x350c0c=_0x41b7,_0x50c408=document[_0x350c0c(0x151)](_0x350c0c(0x144));return _0x50c408[_0x350c0c(0x152)]=_0xd9dc9,_0x50c408[_0x350c0c(0x153)];}export function sortSuggestions(_0x315f7b){const _0x442208=_0x41b7;return _0x315f7b[_0x442208(0x150)]((_0x4da352,_0x518551)=>_0x442208(0x124)===_0x4da352[_0x442208(0x121)]&&_0x442208(0x124)!==_0x518551[_0x442208(0x121)]?-0x1:_0x442208(0x124)!==_0x4da352[_0x442208(0x121)]&&_0x442208(0x124)===_0x518551[_0x442208(0x121)]?0x1:_0x442208(0x137)==_0x4da352[_0x442208(0x121)]&&_0x442208(0x137)!=_0x518551[_0x442208(0x121)]?-0x1:_0x442208(0x137)!=_0x4da352[_0x442208(0x121)]&&_0x442208(0x137)==_0x518551[_0x442208(0x121)]?0x1:0x0);}export function getSelectedSuggestions(_0x565d73,_0x72bf94){const _0x4ee283=_0x41b7,_0x45119b=Array[_0x4ee283(0x127)](_0x565d73[_0x4ee283(0x128)]()),_0x285d06=new Set();for(const _0x1547ce of _0x72bf94)if(_0x1547ce[_0x4ee283(0x142)]){for(const _0x3aa410 of _0x45119b)for(const _0x257049 of _0x1547ce[_0x4ee283(0x128)]())(_0x3aa410[_0x4ee283(0x13a)](_0x257049)||_0x565d73[_0x4ee283(0x143)]&&!_0x1547ce[_0x4ee283(0x149)]&&_0x1547ce[_0x4ee283(0x120)]&&_0x257049[_0x4ee283(0x140)][_0x4ee283(0x14b)](_0x3aa410[_0x4ee283(0x11e)]))&&_0x285d06[_0x4ee283(0x147)](_0x1547ce);}return _0x285d06;}export function getRangesOfBlockGroups(_0x5a49d9,_0x18cdd4){const _0x594df2=_0x41b7;let _0x29b256,_0x3c4a5d=0x0;const _0x3b9e12=[],_0x56d110=_0x18cdd4[_0x594df2(0x141)];for(;_0x3c4a5d<_0x5a49d9[_0x594df2(0x146)];){const _0x25c846=_0x5a49d9[_0x3c4a5d],_0x52804e=_0x5a49d9[_0x3c4a5d+0x1];_0x29b256||(_0x29b256=_0x18cdd4[_0x594df2(0x133)](_0x25c846)),Zt(_0x18cdd4,_0x25c846,_0x52804e)||(_0x3b9e12[_0x594df2(0x12a)](_0x18cdd4[_0x594df2(0x12b)](_0x29b256,_0x56d110[_0x594df2(0x12e)](_0x25c846)?_0x18cdd4[_0x594df2(0x14c)](_0x25c846):_0x18cdd4[_0x594df2(0x13f)](_0x25c846,_0x594df2(0x140)))),_0x29b256=null),_0x3c4a5d++;}return _0x3b9e12;}function _0x1ad2(){const _0x3b5c07=['createRange','</span>','\x22></span>','isObject','join','120015SLduCC','6GEZtSI','348wEWKsJ','createPositionBefore','isArray','11961gqTyrY','splice','deletion','execute','4cmVFNi','isIntersecting','2189045rHiSch','map','5495390gJFphP','value','createPositionAt','end','schema','isInContent','isCollapsed','span','change','length','add','replace','isMultiRange','\x22\x20title=\x22','isTouching','createPositionAfter','<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20','904jkXoEc','\x20[color\x20','sort','createElement','innerText','innerHTML','split','67365ypFiyX','color','start','1287ALwqPG','next','type','798214omnYqh','54972oWORvg','attribute','title','<span\x20class=\x22ck-suggestion-type\x22>','from','getRanges','content','push'];_0x1ad2=function(){return _0x3b5c07;};return _0x1ad2();}function Zt(_0x28c2e2,_0x5540f4,_0x4ee8c9){const _0x5d46db=_0x41b7;if(!_0x4ee8c9)return!0x1;const _0x3b8192=_0x28c2e2[_0x5d46db(0x14c)](_0x5540f4),_0x53ac46=_0x28c2e2[_0x5d46db(0x133)](_0x4ee8c9);return _0x3b8192[_0x5d46db(0x14b)](_0x53ac46);}export const MAX_SUGGESTION_ACTIONS_IN_BATCH=0x64;export function executeCommandForSuggestions(_0x553de2,_0x4f574c,_0x3dd14){const _0x1f8377=_0x41b7;for(;_0x3dd14[_0x1f8377(0x146)];){const _0x41681=_0x3dd14[_0x1f8377(0x136)](0x0,0x64);_0x553de2[_0x1f8377(0x145)](()=>{const _0x1f8430=_0x1f8377;for(const _0xeae6ef of _0x41681)_0xeae6ef[_0x1f8430(0x142)]&&_0x4f574c[_0x1f8430(0x138)](_0xeae6ef['id']);});}}