UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 5.36 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 _0x48804f=_0x3ac8;(function(_0x33016e,_0x2ce874){const _0x1301e6=_0x3ac8,_0x2bc14b=_0x33016e();while(!![]){try{const _0x202e05=-parseInt(_0x1301e6(0x194))/0x1*(-parseInt(_0x1301e6(0x193))/0x2)+-parseInt(_0x1301e6(0x16a))/0x3+-parseInt(_0x1301e6(0x187))/0x4*(parseInt(_0x1301e6(0x18f))/0x5)+parseInt(_0x1301e6(0x15c))/0x6*(-parseInt(_0x1301e6(0x190))/0x7)+-parseInt(_0x1301e6(0x164))/0x8+-parseInt(_0x1301e6(0x165))/0x9*(-parseInt(_0x1301e6(0x16f))/0xa)+parseInt(_0x1301e6(0x16e))/0xb;if(_0x202e05===_0x2ce874)break;else _0x2bc14b['push'](_0x2bc14b['shift']());}catch(_0x5492de){_0x2bc14b['push'](_0x2bc14b['shift']());}}}(_0x55d4,0xc312c));function _0x55d4(){const _0x104edd=['addClass','high','ck-suggestion-marker-','9742458hPxqpC','10mfgayR','enableCommand','getItems','merge','mapper','element','options','ck-suggestion-marker--active','insert','shiftEnter','includes','bindElementToMarker','createPositionBefore','editing','has','createUIElement','consumable','registerElementLabel','markerRange','writer','toViewPosition','ELEMENT_LINE_BREAK','descriptionFactory','addMarker:suggestion','14544IlLWPP','test','downcastDispatcher','afterInit','markerName','showSuggestionHighlights','editor','data','560fwNzXH','1231958UDCeiP','addMarker:suggestion:insertion','ShiftEnter','45748YUBebV','39MgzfhR','deletion','locale','6qJpuzJ','_splitMarkerName','name','softBreak','split','model','activeMarkers','get','1569912FwdaWW','5495571HaGVVF','plugins','addMarker:suggestion:deletion','TrackChangesEditing','span','2429694KiYekT'];_0x55d4=function(){return _0x104edd;};return _0x55d4();}import{Plugin as _0x349866}from'ckeditor5/src/core.js';import{getTranslation as _0x279361}from'../utils/common-translations.js';function _0x3ac8(_0x7e53d4,_0x57978f){const _0x55d450=_0x55d4();return _0x3ac8=function(_0x3ac86f,_0x3cb967){_0x3ac86f=_0x3ac86f-0x15a;let _0x3dea39=_0x55d450[_0x3ac86f];return _0x3dea39;},_0x3ac8(_0x7e53d4,_0x57978f);}export class TrackChangesShiftEnterCommand extends _0x349866{[_0x48804f(0x18a)](){const _0x298b51=_0x48804f,_0x50f04d=this[_0x298b51(0x18d)];if(!_0x50f04d[_0x298b51(0x166)][_0x298b51(0x17d)](_0x298b51(0x192)))return;const _0xd6a379=_0x50f04d[_0x298b51(0x166)][_0x298b51(0x163)](_0x298b51(0x168));_0xd6a379[_0x298b51(0x170)](_0x298b51(0x178)),_0x50f04d[_0x298b51(0x17c)][_0x298b51(0x189)]['on'](_0x298b51(0x191),je(_0x50f04d),{'priority':_0x298b51(0x16c)}),_0x50f04d[_0x298b51(0x17c)][_0x298b51(0x189)]['on'](_0x298b51(0x167),je(_0x50f04d),{'priority':_0x298b51(0x16c)}),_0x50f04d[_0x298b51(0x18e)][_0x298b51(0x189)]['on'](_0x298b51(0x186),(_0x4eff51,_0x5b8a4,_0x306c4c)=>{const _0x1ac1d9=_0x298b51;_0x306c4c[_0x1ac1d9(0x175)][_0x1ac1d9(0x18c)]&&je(_0x50f04d,{'showActiveMarker':!0x1})(_0x4eff51,_0x5b8a4,_0x306c4c);}),_0xd6a379[_0x298b51(0x185)][_0x298b51(0x180)](_0x298b51(0x15f),_0x21be16=>_0x279361(_0x50f04d[_0x298b51(0x15b)],_0x298b51(0x184),_0x21be16));}}function je(_0x22fce8,{showActiveMarker:_0x2ac2a9=!0x0}={}){return(_0x140ff9,_0x5a47f3,_0x5ba70c)=>{const _0x2cb746=_0x3ac8,_0x4cfbf3=_0x22fce8[_0x2cb746(0x166)][_0x2cb746(0x163)](_0x2cb746(0x168));if(!_0x5ba70c[_0x2cb746(0x17f)][_0x2cb746(0x188)](_0x5a47f3[_0x2cb746(0x181)],_0x140ff9[_0x2cb746(0x15e)]))return;const _0x1a306d=_0x22fce8[_0x2cb746(0x161)];for(const _0x40f367 of _0x5a47f3[_0x2cb746(0x181)][_0x2cb746(0x171)]()){if(!_0x40f367['is'](_0x2cb746(0x174),_0x2cb746(0x15f)))continue;const _0x15119d=_0x2cb746(0x15a)==_0x5a47f3[_0x2cb746(0x18b)][_0x2cb746(0x160)](':')[0x1]?_0x2cb746(0x172):_0x2cb746(0x160),{id:_0x21f6f7,authorId:_0x190e13}=_0x4cfbf3[_0x2cb746(0x15d)](_0x5a47f3[_0x2cb746(0x18b)]),_0xd0ec9e=_0x5ba70c[_0x2cb746(0x182)][_0x2cb746(0x17e)](_0x2cb746(0x169),{'class':_0x2cb746(0x16d)+_0x15119d,'data-suggestion':_0x21f6f7,'data-author-id':_0x190e13}),_0xadaf27=_0x5ba70c[_0x2cb746(0x173)][_0x2cb746(0x183)](_0x1a306d[_0x2cb746(0x17b)](_0x40f367));_0x2ac2a9&&_0x4cfbf3[_0x2cb746(0x162)][_0x2cb746(0x179)](_0x5a47f3[_0x2cb746(0x18b)])&&_0x5ba70c[_0x2cb746(0x182)][_0x2cb746(0x16b)](_0x2cb746(0x176),_0xd0ec9e),_0x5ba70c[_0x2cb746(0x182)][_0x2cb746(0x177)](_0xadaf27,_0xd0ec9e),_0x5ba70c[_0x2cb746(0x173)][_0x2cb746(0x17a)](_0xd0ec9e,_0x5a47f3[_0x2cb746(0x18b)]);}};}