UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 8.53 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 _0x2be882=_0x1040;(function(_0xb0415b,_0x26b51d){const _0x6ea270=_0x1040,_0x6e9f4d=_0xb0415b();while(!![]){try{const _0x1f217b=-parseInt(_0x6ea270(0x18b))/0x1*(parseInt(_0x6ea270(0x18d))/0x2)+-parseInt(_0x6ea270(0x1b6))/0x3+parseInt(_0x6ea270(0x194))/0x4*(parseInt(_0x6ea270(0x1b9))/0x5)+parseInt(_0x6ea270(0x17f))/0x6*(parseInt(_0x6ea270(0x1a0))/0x7)+parseInt(_0x6ea270(0x186))/0x8+-parseInt(_0x6ea270(0x184))/0x9+parseInt(_0x6ea270(0x1b4))/0xa*(-parseInt(_0x6ea270(0x190))/0xb);if(_0x1f217b===_0x26b51d)break;else _0x6e9f4d['push'](_0x6e9f4d['shift']());}catch(_0x3b7771){_0x6e9f4d['push'](_0x6e9f4d['shift']());}}}(_0x2139,0x2490e));import{Plugin as _0xa9c2e4}from'ckeditor5/src/core.js';function _0x1040(_0x50d0c3,_0x38f47b){const _0x2139e5=_0x2139();return _0x1040=function(_0x1040bf,_0x111738){_0x1040bf=_0x1040bf-0x176;let _0x17b68f=_0x2139e5[_0x1040bf];return _0x17b68f;},_0x1040(_0x50d0c3,_0x38f47b);}import{CKEditorError as _0x272c18}from'ckeditor5/src/utils.js';import{TrackChangesEditing as _0x24297b}from'./trackchangesediting.js';function _0x2139(){const _0x549902=['init','function','isOfficialPlugin','2170881WsNIfJ','isPremiumPlugin','2343440ZgCuOp','reduce','plugins','remove','TrackChangesEditing','1tckVQx','end','117778aOBMgG','getDataWithAcceptedSuggestions','trackChangesData','11OEhHDI','addCommentThread','constructor','getUser','88316gEvlwZ','Users','getSuggestions','users','discardAllSuggestions','createElement','appendChild','set','createDocumentFragment','CommentsRepository','define','getCommentThreads','2023203jYfhCQ','_adapter','getRootsAttributes','editor','useAnonymousUser','getFullData','push','addUser','editorCreator','TrackChangesData','pluginName','get','div','Pagination','getRootNames','config','requires','acceptAllSuggestions','track-changes-data-invalid-editor-creator','name','1139190NPRieH','document','783111eNTZUE','addSuggestionData','rootsAttributes','55ktKWuP','result','trackChangesData.editorCreator','getDataWithDiscardedSuggestions','model','TrackChangesDataGetter','join','execute','fromCharCode','create','destroy','map','6tAGomK','data'];_0x2139=function(){return _0x549902;};return _0x2139();}import{sanitizeEditorConfig as _0x2f664b}from'ckeditor5-collaboration/src/collaboration-core.js';const p=[_0x2be882(0x1ad)];export class TrackChangesData extends _0xa9c2e4{static get[_0x2be882(0x1b0)](){return[_0x24297b];}static get[_0x2be882(0x1aa)](){const _0x40af4e=_0x2be882;return _0x40af4e(0x1a9);}static get[_0x2be882(0x183)](){return!0x0;}static get[_0x2be882(0x185)](){return!0x0;}[_0x2be882(0x181)](){const _0x3b27a0=_0x2be882,_0xcc841c=this[_0x3b27a0(0x1a3)];if(_0xcc841c[_0x3b27a0(0x1af)][_0x3b27a0(0x19e)](_0x3b27a0(0x1bb),_0x25326f=>{const _0x363108=_0x3b27a0,_0x4be73b=_0xcc841c[_0x363108(0x177)][_0x363108(0x1b5)][_0x363108(0x1ae)]()[_0x363108(0x187)]((_0x465a90,_0x11e73e)=>(_0x465a90[_0x11e73e]='',_0x465a90),{});return _0xcc841c[_0x363108(0x192)][_0x363108(0x17c)](_0x4be73b,_0x25326f);}),_0x3b27a0(0x182)!=typeof _0xcc841c[_0x3b27a0(0x1af)][_0x3b27a0(0x1ab)](_0x3b27a0(0x18f))[_0x3b27a0(0x1a8)])throw new _0x272c18(_0x3b27a0(0x1b2));}[_0x2be882(0x18e)](_0xbe3bb){const _0x5da5ab=_0x2be882;return P(this[_0x5da5ab(0x1a3)],!0x0,_0xbe3bb);}[_0x2be882(0x176)](_0x57d5a1){const _0x3dc949=_0x2be882;return P(this[_0x3dc949(0x1a3)],!0x1,_0x57d5a1);}}export class TrackChangesDataGetter extends _0xa9c2e4{[_0x2be882(0x1ba)];static get[_0x2be882(0x1aa)](){const _0xc869f=_0x2be882;return _0xc869f(0x178);}static get[_0x2be882(0x183)](){return!0x0;}static get[_0x2be882(0x185)](){return!0x0;}constructor(_0x9107d1){const _0x35b931=_0x2be882;function _0x15afbc(_0x39eead){const _0x34306d=_0x1040;return _0x39eead[_0x34306d(0x17e)](_0x358ae1=>String[_0x34306d(0x17b)](_0x358ae1))[_0x34306d(0x179)]('');}super(_0x9107d1),this[_0x35b931(0x1ba)]=_0x35b931(0x18c),_0x9107d1[_0x15afbc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15afbc([0x76,0x69,0x65,0x77])][_0x15afbc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x15afbc([0x61,0x75,0x74,0x6f]),_0x9107d1[_0x15afbc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x15afbc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x15afbc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x15afbc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x15afbc([0x6f,0x6b])});}[_0x2be882(0x181)](){const _0x412927=_0x2be882;this[_0x412927(0x1a3)][_0x412927(0x188)][_0x412927(0x1ab)](_0x412927(0x19d))[_0x412927(0x1a1)]={'addCommentThread':()=>new Promise(()=>{}),'getCommentThread':()=>new Promise(()=>{}),'updateCommentThread':()=>new Promise(()=>{}),'resolveCommentThread':()=>new Promise(()=>{}),'reopenCommentThread':()=>new Promise(()=>{}),'removeCommentThread':()=>new Promise(()=>{}),'addComment':()=>new Promise(()=>{}),'updateComment':()=>new Promise(()=>{}),'removeComment':()=>new Promise(()=>{})},this[_0x412927(0x1a3)][_0x412927(0x188)][_0x412927(0x1ab)](_0x412927(0x18a))[_0x412927(0x1a1)]=null;}}function k(_0x37875e){const _0x467a68=_0x2be882;return void 0x0!==_0x37875e[_0x467a68(0x1a2)];}async function P(_0x5d7d2d,_0x60404e,_0x4c13de){const _0x29354a=_0x2be882,_0x74fc4c=_0x2f664b(_0x5d7d2d,p);_0x74fc4c[_0x29354a(0x188)][_0x29354a(0x1a6)](_0x24297b,TrackChangesDataGetter),_0x74fc4c[_0x29354a(0x1b8)]=k(_0x5d7d2d)?_0x5d7d2d[_0x29354a(0x1a2)]():void 0x0;const _0x2b91ec=document[_0x29354a(0x19c)](),_0x426ba2=_0x5d7d2d[_0x29354a(0x1af)][_0x29354a(0x1ab)](_0x29354a(0x18f))[_0x29354a(0x1a8)],_0x348f33=await _0x426ba2(_0x74fc4c,()=>function(_0x5e4430){const _0x529ecb=_0x29354a,_0x321836=document[_0x529ecb(0x199)](_0x529ecb(0x1ac));return _0x5e4430[_0x529ecb(0x19a)](_0x321836),_0x321836;}(_0x2b91ec));!function(_0x556197,_0xdb3d2){const _0x4fe5e8=_0x29354a,_0x278ae1=_0x556197[_0x4fe5e8(0x177)][_0x4fe5e8(0x1b5)][_0x4fe5e8(0x1ae)]()[_0x4fe5e8(0x187)]((_0x1fc009,_0x809ee0)=>(_0x1fc009[_0x809ee0]=_0x556197[_0x4fe5e8(0x180)][_0x4fe5e8(0x1ab)]({'rootName':_0x809ee0}),_0x1fc009),{}),_0x40056f=_0x556197[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x195))[_0x4fe5e8(0x197)][_0x4fe5e8(0x17e)](_0x18b886=>({'id':_0x18b886['id'],'name':_0x18b886[_0x4fe5e8(0x1b3)]})),_0xd6bd1e=_0x556197[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x18a))[_0x4fe5e8(0x196)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x403990=_0x556197[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x19d))[_0x4fe5e8(0x19f)]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x26683d=_0xdb3d2[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x195)),_0x1d3cde=_0xdb3d2[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x18a)),_0x2215bc=_0xdb3d2[_0x4fe5e8(0x188)][_0x4fe5e8(0x1ab)](_0x4fe5e8(0x19d));for(const _0x271ebe of _0x2215bc[_0x4fe5e8(0x19f)]())_0x271ebe[_0x4fe5e8(0x189)]();for(const _0xf2619e of _0x40056f)_0x26683d[_0x4fe5e8(0x193)](_0xf2619e['id'])||_0x26683d[_0x4fe5e8(0x1a7)](_0xf2619e);_0x26683d['me']||_0x26683d[_0x4fe5e8(0x1a4)]();for(const _0x26ea3e of _0x403990)_0x2215bc[_0x4fe5e8(0x191)](_0x26ea3e);for(const _0xc7b945 of _0xd6bd1e)_0x1d3cde[_0x4fe5e8(0x1b7)](_0xc7b945);_0xdb3d2[_0x4fe5e8(0x180)][_0x4fe5e8(0x19b)](_0x278ae1);}(_0x5d7d2d,_0x348f33),_0x348f33[_0x29354a(0x17a)](_0x60404e?_0x29354a(0x1b1):_0x29354a(0x198));const _0x5ad545=k(_0x348f33)?_0x348f33[_0x29354a(0x1a5)](_0x4c13de):_0x348f33[_0x29354a(0x180)][_0x29354a(0x1ab)](_0x4c13de);return await _0x348f33[_0x29354a(0x17d)](),_0x5ad545;}