UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

24 lines • 9.21 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 _0x478e(_0x30044e,_0x239eac){const _0x1c216f=_0x1c21();return _0x478e=function(_0x478e65,_0x42adb7){_0x478e65=_0x478e65-0xaa;let _0x386b96=_0x1c216f[_0x478e65];return _0x386b96;},_0x478e(_0x30044e,_0x239eac);}const _0x2c4536=_0x478e;(function(_0x1f3e77,_0x34881a){const _0x554ea8=_0x478e,_0x3535f6=_0x1f3e77();while(!![]){try{const _0x76f0cb=parseInt(_0x554ea8(0xde))/0x1*(parseInt(_0x554ea8(0xf8))/0x2)+-parseInt(_0x554ea8(0xb5))/0x3*(parseInt(_0x554ea8(0xaa))/0x4)+parseInt(_0x554ea8(0xd4))/0x5+-parseInt(_0x554ea8(0xb7))/0x6+-parseInt(_0x554ea8(0xb3))/0x7+parseInt(_0x554ea8(0xd8))/0x8+-parseInt(_0x554ea8(0xcf))/0x9*(-parseInt(_0x554ea8(0xd6))/0xa);if(_0x76f0cb===_0x34881a)break;else _0x3535f6['push'](_0x3535f6['shift']());}catch(_0x10e1bc){_0x3535f6['push'](_0x3535f6['shift']());}}}(_0x1c21,0x2e62b));import{Element as _0x2e0c82}from'ckeditor5/src/engine.js';import{ObservableMixin as _0x55dd48,uid as _0x1366e1}from'ckeditor5/src/utils.js';function _0x1c21(){const _0xa5ad82=['createdAt','change','originalSuggestionId','author','addMarkerName','set','get','previous','_isDataLoaded','substr','removeMarker','creator','suggestion:','hasComments','@external','isExternal','onAttributesChange','length','8WUcLzM','next','isIntersectingWithRange','getRange','addMarker','414556TtWTjV','push','markers','split','commentThread','end','add','toJSON','reduce','2027025AmYakT','onAccept','6beqybQ','from','2016660XZVSkK','delete','authoredAt','size','getMarkerNames','getContainedElement','isIntersecting','_onAttributesChange','_onDiscard','head','setAttribute','_model','decorate','data','_markerNames','getMarkers','removeAttribute','type','accept','_onAccept','onDiscard','_saved','discard','getFirstMarker','17091oMLzgp','start','getRanges','filter','subType','1882005RRpLKY','nodeAfter','2930bdkcUL','getAllAdjacentSuggestions','274896tOWkrP','addRange','getFirstRange','removeMarkers','getItems','clear','13947XgNhRe','_originalSuggestionId','isInContent','isMultiRange','map','getMultiRangeId','nodeBefore','attributes'];_0x1c21=function(){return _0xa5ad82;};return _0x1c21();}import{cloneDeep as _0x89763c,isEqual as _0xf66059,set as _0x488219,unset as _0x3585ef}from'es-toolkit/compat';export default class o extends/* #__PURE__ -- @preserve */ _0x55dd48(){['id'];[_0x2c4536(0xc8)];[_0x2c4536(0xd3)];[_0x2c4536(0xe9)];[_0x2c4536(0xf1)];[_0x2c4536(0xf5)];[_0x2c4536(0xc4)];[_0x2c4536(0xe6)];[_0x2c4536(0xdf)];[_0x2c4536(0xee)]=!0x1;[_0x2c4536(0xc2)];[_0x2c4536(0xca)];[_0x2c4536(0xbf)];[_0x2c4536(0xbe)];[_0x2c4536(0xc5)];constructor(_0x2ff147,_0x5ec452){const _0x1ece2c=_0x2c4536;super(),this['id']=_0x5ec452['id'],this[_0x1ece2c(0xc8)]=_0x5ec452[_0x1ece2c(0xc8)],this[_0x1ece2c(0xd3)]=_0x5ec452[_0x1ece2c(0xd3)]||null,this[_0x1ece2c(0xe9)]=_0x5ec452[_0x1ece2c(0xe9)],this[_0x1ece2c(0xf1)]=_0x5ec452[_0x1ece2c(0xf1)]||_0x5ec452[_0x1ece2c(0xe9)],this[_0x1ece2c(0xf5)]=Boolean(_0x5ec452[_0x1ece2c(0xe5)]&&_0x5ec452[_0x1ece2c(0xe5)][_0x1ece2c(0xf4)]),this[_0x1ece2c(0xc4)]=null,this[_0x1ece2c(0xdf)]=_0x5ec452[_0x1ece2c(0xe8)]||null,this[_0x1ece2c(0xc2)]=_0x2ff147,this[_0x1ece2c(0xca)]=_0x5ec452[_0x1ece2c(0xb4)],this[_0x1ece2c(0xbf)]=_0x5ec452[_0x1ece2c(0xcb)],this[_0x1ece2c(0xbe)]=_0x5ec452[_0x1ece2c(0xf6)],this[_0x1ece2c(0xc5)]=new Set(),this[_0x1ece2c(0xe6)]=null,this[_0x1ece2c(0xeb)](_0x1ece2c(0xb9),null),this[_0x1ece2c(0xeb)](_0x1ece2c(0xe5),_0x5ec452[_0x1ece2c(0xe5)]||{}),this[_0x1ece2c(0xeb)](_0x1ece2c(0xed),null),this[_0x1ece2c(0xeb)](_0x1ece2c(0xf9),null),this[_0x1ece2c(0xeb)](_0x1ece2c(0xae),null),this[_0x1ece2c(0xeb)](_0x1ece2c(0xcc),!0x1),this[_0x1ece2c(0xc3)](_0x1ece2c(0xc9)),this[_0x1ece2c(0xc3)](_0x1ece2c(0xcd));}get[_0x2c4536(0xc0)](){const _0x45dc8d=_0x2c4536;let _0x20070d=this;for(;_0x20070d[_0x45dc8d(0xed)];)_0x20070d=_0x20070d[_0x45dc8d(0xed)];return _0x20070d;}get[_0x2c4536(0xf3)](){const _0x43a2ed=_0x2c4536;return!!this[_0x43a2ed(0xae)]&&this[_0x43a2ed(0xae)][_0x43a2ed(0xf7)]>0x0;}get[_0x2c4536(0xe1)](){const _0x5ea2d8=_0x2c4536;if(0x0==this[_0x5ea2d8(0xc5)][_0x5ea2d8(0xba)])return!0x1;return 0x6==Array[_0x5ea2d8(0xb6)](this[_0x5ea2d8(0xc5)])[0x0][_0x5ea2d8(0xad)](':')[_0x5ea2d8(0xf7)];}get[_0x2c4536(0xe0)](){const _0xb8844b=_0x2c4536;return null!==this[_0xb8844b(0xce)]();}[_0x2c4536(0xea)](_0x3487ce){const _0x12bd92=_0x2c4536;this[_0x12bd92(0xc5)][_0x12bd92(0xb0)](_0x3487ce);}[_0x2c4536(0xbb)](){const _0x3875e0=_0x2c4536;return Array[_0x3875e0(0xb6)](this[_0x3875e0(0xc5)]);}[_0x2c4536(0xc6)](){const _0x5723c0=_0x2c4536;return this[_0x5723c0(0xbb)]()[_0x5723c0(0xe2)](_0x4791b7=>this[_0x5723c0(0xc2)][_0x5723c0(0xac)][_0x5723c0(0xec)](_0x4791b7))[_0x5723c0(0xd2)](_0xec70b9=>_0xec70b9);}[_0x2c4536(0xce)](){const _0x57db6c=_0x2c4536;return this[_0x57db6c(0xc6)]()[0x0]||null;}[_0x2c4536(0xdb)](){const _0x2a398a=_0x2c4536;this[_0x2a398a(0xc2)][_0x2a398a(0xe7)](_0x19df06=>{const _0xc2bc95=_0x2a398a;for(const _0x4204f7 of this[_0xc2bc95(0xc6)]())_0x19df06[_0xc2bc95(0xf0)](_0x4204f7);}),this[_0x2a398a(0xc5)][_0x2a398a(0xdd)]();}[_0x2c4536(0xf0)](_0x574172){const _0x8da85b=_0x2c4536;this[_0x8da85b(0xc2)][_0x8da85b(0xe7)](_0x558afd=>{const _0x4dcdbe=_0x8da85b;_0x558afd[_0x4dcdbe(0xf0)](_0x574172);}),this[_0x8da85b(0xc5)][_0x8da85b(0xb8)](_0x574172);}[_0x2c4536(0xd9)](_0x59ff21){const _0x74bc52=_0x2c4536,_0x517970=_0x74bc52(0xf2)+this[_0x74bc52(0xc8)]+':'+this[_0x74bc52(0xd3)]+':'+this['id']+':'+this[_0x74bc52(0xf1)]['id']+':'+o[_0x74bc52(0xe3)]();this[_0x74bc52(0xea)](_0x517970),this[_0x74bc52(0xc2)][_0x74bc52(0xe7)](_0x2db0aa=>{const _0xaa3c5=_0x74bc52;_0x2db0aa[_0xaa3c5(0xfc)](_0x517970,{'range':_0x59ff21,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x2c4536(0xfa)](_0x538803){const _0x7540fd=_0x2c4536;for(const _0x39c794 of this[_0x7540fd(0xd1)]())if(_0x39c794[_0x7540fd(0xbd)](_0x538803))return!0x0;return!0x1;}[_0x2c4536(0xd1)](){const _0x479b38=_0x2c4536;return this[_0x479b38(0xc6)]()[_0x479b38(0xe2)](_0x14297c=>_0x14297c[_0x479b38(0xfb)]());}[_0x2c4536(0xdc)](){const _0x15cd38=_0x2c4536;return this[_0x15cd38(0xd1)]()[_0x15cd38(0xb2)]((_0x57659a,_0x3c7039)=>[..._0x57659a,..._0x3c7039[_0x15cd38(0xdc)]()],[]);}[_0x2c4536(0xda)](){const _0x409bad=_0x2c4536;return this[_0x409bad(0xce)]()?.[_0x409bad(0xfb)]()||null;}[_0x2c4536(0xbc)](){const _0xe40231=_0x2c4536,_0x3b33ca=this[_0xe40231(0xd1)]();if(0x1!=_0x3b33ca[_0xe40231(0xf7)])return null;const _0x255932=_0x3b33ca[0x0],_0xc5ef20=_0x255932[_0xe40231(0xd0)][_0xe40231(0xd5)],_0x1a78b8=_0x255932[_0xe40231(0xaf)][_0xe40231(0xe4)];return _0xc5ef20 instanceof _0x2e0c82?_0xc5ef20!=_0x1a78b8?null:_0xc5ef20:null;}[_0x2c4536(0xc9)](){const _0x3b67ab=_0x2c4536;this[_0x3b67ab(0xca)](this[_0x3b67ab(0xd1)](),this[_0x3b67ab(0xc4)],this[_0x3b67ab(0xe5)]),this[_0x3b67ab(0xdb)]();}[_0x2c4536(0xcd)](){const _0x52b0e2=_0x2c4536;this[_0x52b0e2(0xbf)](this[_0x52b0e2(0xd1)](),this[_0x52b0e2(0xc4)],this[_0x52b0e2(0xe5)]),this[_0x52b0e2(0xdb)]();}[_0x2c4536(0xd7)](){const _0x5bc238=_0x2c4536,_0x232e54=[];let _0x416228=this[_0x5bc238(0xc0)];for(;_0x416228;)_0x232e54[_0x5bc238(0xab)](_0x416228),_0x416228=_0x416228[_0x5bc238(0xf9)];return _0x232e54;}[_0x2c4536(0xc1)](_0x253218,_0x30886e){const _0x2bb1a5=_0x2c4536,_0x5cfff0=_0x89763c(this[_0x2bb1a5(0xe5)]);_0x488219(_0x5cfff0,_0x253218,_0x30886e),_0xf66059(_0x5cfff0,this[_0x2bb1a5(0xe5)])||(this[_0x2bb1a5(0xe5)]=_0x5cfff0,this[_0x2bb1a5(0xbe)](_0x5cfff0));}[_0x2c4536(0xc7)](_0x23d4a7){const _0x4ae772=_0x2c4536,_0x167a74=_0x89763c(this[_0x4ae772(0xe5)]);_0x3585ef(_0x167a74,_0x23d4a7),_0xf66059(_0x167a74,this[_0x4ae772(0xe5)])||(this[_0x4ae772(0xe5)]=_0x167a74,this[_0x4ae772(0xbe)](this[_0x4ae772(0xe5)]));}[_0x2c4536(0xb1)](){const _0x385623=_0x2c4536;return{'id':this['id'],'type':this[_0x385623(0xd3)]?this[_0x385623(0xc8)]+':'+this[_0x385623(0xd3)]:this[_0x385623(0xc8)],'authorId':this[_0x385623(0xf1)]['id'],'createdAt':this[_0x385623(0xe6)],'hasComments':this[_0x385623(0xf3)],'data':this[_0x385623(0xc4)],'attributes':this[_0x385623(0xe5)]};}static[_0x2c4536(0xe3)](){const _0x1d29bd=_0x2c4536;return _0x1366e1()[_0x1d29bd(0xef)](0x1,0x5);}}