UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.67 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 _0x1e9f(){const _0x4cda34=['paragraph','editing','ck-suggestion-marker-split','insertParagraph','getFirstRange','registerElementLabel','getItemLabel','editor','199855MSLQAn','start','*Insert:*\x20%0','6189816DVuVLE','options','7OIzMDl','isTouching','10GqXTzb','_splitMarkerName','markerName','98019XshXQu','formatBlock','insertion','data','model','activeMarkers','$text','end','3812706NXhNcd','nodeAfter','span','bindElementToMarker','showSuggestionHighlights','Paragraph','addMarker:suggestion:insertion','locale','ELEMENT_PARAGRAPH','consume','_registerLegacyDescription','markerRange','downcastDispatcher','get','5038338iDizLI','plugins','toViewPosition','isLimit','name','type','highest','ck-suggestion-marker--active','TrackChangesEditing','createUIElement','1359147NkcxFV','enableCommand','writer','addClass','afterInit','registerDescriptionCallback','has','1127024dOLYQS','enableDefaultAttributesIntegration','consumable','descriptionFactory','format','commandName','isBlock','mapper','6iZqhGy','*Change\x20to:*\x20%0','schema','includes','checkChild','insert'];_0x1e9f=function(){return _0x4cda34;};return _0x1e9f();}const _0x5f2665=_0x49f5;(function(_0x6b0475,_0x4c08b2){const _0x390124=_0x49f5,_0x243af2=_0x6b0475();while(!![]){try{const _0x18e8b3=-parseInt(_0x390124(0xa2))/0x1+parseInt(_0x390124(0x6a))/0x2*(parseInt(_0x390124(0x82))/0x3)+parseInt(_0x390124(0x7b))/0x4+-parseInt(_0x390124(0x78))/0x5+-parseInt(_0x390124(0x98))/0x6*(-parseInt(_0x390124(0x7d))/0x7)+parseInt(_0x390124(0xa9))/0x8+parseInt(_0x390124(0x8a))/0x9*(-parseInt(_0x390124(0x7f))/0xa);if(_0x18e8b3===_0x4c08b2)break;else _0x243af2['push'](_0x243af2['shift']());}catch(_0x1fc6cb){_0x243af2['push'](_0x243af2['shift']());}}}(_0x1e9f,0xc41fa));import{Plugin as _0x3cd29d}from'ckeditor5/src/core.js';import{getTranslation as _0x503dfd}from'../utils/common-translations.js';function _0x49f5(_0x3c97cb,_0x33a6ff){const _0x1e9f42=_0x1e9f();return _0x49f5=function(_0x49f533,_0x598fa5){_0x49f533=_0x49f533-0x65;let _0x2333d4=_0x1e9f42[_0x49f533];return _0x2333d4;},_0x49f5(_0x3c97cb,_0x33a6ff);}export default class yt extends _0x3cd29d{[_0x5f2665(0xa6)](){const _0x4024e0=_0x5f2665,_0x551601=this[_0x4024e0(0x77)];if(!_0x551601[_0x4024e0(0x99)][_0x4024e0(0xa8)](_0x4024e0(0x8f)))return;const _0x22b247=_0x551601[_0x4024e0(0x91)],_0x4befc2=_0x551601[_0x4024e0(0x99)][_0x4024e0(0x97)](_0x4024e0(0xa0));_0x4befc2[_0x4024e0(0x65)][_0x4024e0(0x75)](_0x4024e0(0x70),_0x2700e6=>_0x503dfd(_0x22b247,_0x4024e0(0x92),_0x2700e6)),_0x4befc2[_0x4024e0(0xaa)](_0x4024e0(0x70)),_0x4befc2[_0x4024e0(0xa3)](_0x4024e0(0x73)),_0x551601[_0x4024e0(0x71)][_0x4024e0(0x96)]['on'](_0x4024e0(0x90),nr(_0x551601),{'priority':_0x4024e0(0x9e)}),_0x551601[_0x4024e0(0x85)][_0x4024e0(0x96)]['on'](_0x4024e0(0x90),(_0x577cd2,_0x5bc1cb,_0x5988fd)=>{const _0x5b8009=_0x4024e0;_0x5988fd[_0x5b8009(0x7c)][_0x5b8009(0x8e)]&&nr(_0x551601,{'showActiveMarker':!0x1})(_0x577cd2,_0x5bc1cb,_0x5988fd);},{'priority':_0x4024e0(0x9e)});const _0x3ee408=_0x4befc2[_0x4024e0(0x65)];_0x3ee408[_0x4024e0(0xa7)](_0x798e0=>{const _0x245cfa=_0x4024e0;if(_0x245cfa(0x84)!==_0x798e0[_0x245cfa(0x9d)])return;const {start:_0x1764ab,end:_0xe59412}=_0x798e0[_0x245cfa(0x74)]();if(!_0x1764ab[_0x245cfa(0x7e)](_0xe59412)||!_0x1764ab[_0x245cfa(0x8b)])return;const _0x127278=_0x551601[_0x245cfa(0x86)][_0x245cfa(0x6c)],_0x20a704=_0x1764ab[_0x245cfa(0x8b)];return _0x127278[_0x245cfa(0x68)](_0x20a704)&&!_0x127278[_0x245cfa(0x9b)](_0x20a704)&&_0x127278[_0x245cfa(0x6e)](_0x20a704,_0x245cfa(0x88))?{'type':_0x245cfa(0x84),'content':_0x503dfd(_0x22b247,_0x245cfa(0x7a),_0x3ee408[_0x245cfa(0x76)](_0x20a704,0x1))}:void 0x0;}),this[_0x4024e0(0x94)]();}[_0x5f2665(0x94)](){const _0x4021ad=_0x5f2665,_0x16836a=this[_0x4021ad(0x77)],_0x488345=_0x16836a[_0x4021ad(0x91)];_0x16836a[_0x4021ad(0x99)][_0x4021ad(0x97)](_0x4021ad(0xa0))[_0x4021ad(0x65)][_0x4021ad(0xa7)](_0x364fcd=>{const _0x4b7f34=_0x4021ad;if(_0x4b7f34(0x83)!=_0x364fcd[_0x4b7f34(0x9d)])return;const {data:_0x57d013}=_0x364fcd;return _0x57d013&&_0x4b7f34(0x70)==_0x57d013[_0x4b7f34(0x67)]?{'type':_0x4b7f34(0x66),'content':_0x503dfd(_0x488345,_0x4b7f34(0x6b),_0x503dfd(_0x488345,_0x4b7f34(0x92)))}:void 0x0;});}}function nr(_0x573753,{showActiveMarker:_0x265278=!0x0}={}){return(_0xaf531b,_0x4fcb53,_0x393140)=>{const _0x9f8082=_0x49f5,_0x21996a=_0x573753[_0x9f8082(0x99)][_0x9f8082(0x97)](_0x9f8082(0xa0)),_0x29fdcb=_0x4fcb53[_0x9f8082(0x95)][_0x9f8082(0x79)],_0x51cf6b=_0x4fcb53[_0x9f8082(0x95)][_0x9f8082(0x89)],_0x46f743=_0x573753[_0x9f8082(0x86)][_0x9f8082(0x6c)];if(!_0x29fdcb[_0x9f8082(0x7e)](_0x51cf6b)||!_0x29fdcb[_0x9f8082(0x8b)])return;const _0x30d4fe=_0x29fdcb[_0x9f8082(0x8b)];if(_0x46f743[_0x9f8082(0x68)](_0x30d4fe)&&!_0x46f743[_0x9f8082(0x9b)](_0x30d4fe)&&_0x46f743[_0x9f8082(0x6e)](_0x30d4fe,_0x9f8082(0x88))){if(!_0x393140[_0x9f8082(0xab)][_0x9f8082(0x93)](_0x4fcb53[_0x9f8082(0x95)],_0xaf531b[_0x9f8082(0x9c)]))return;const {authorId:_0x384d99}=_0x21996a[_0x9f8082(0x80)](_0x4fcb53[_0x9f8082(0x81)]),_0x1e72bb=_0x393140[_0x9f8082(0xa4)][_0x9f8082(0xa1)](_0x9f8082(0x8c),{'class':_0x9f8082(0x72),'data-author-id':_0x384d99}),_0x2659dd=_0x393140[_0x9f8082(0x69)][_0x9f8082(0x9a)](_0x51cf6b);_0x265278&&_0x21996a[_0x9f8082(0x87)][_0x9f8082(0x6d)](_0x4fcb53[_0x9f8082(0x81)])&&_0x393140[_0x9f8082(0xa4)][_0x9f8082(0xa5)](_0x9f8082(0x9f),_0x1e72bb),_0x393140[_0x9f8082(0xa4)][_0x9f8082(0x6f)](_0x2659dd,_0x1e72bb),_0x393140[_0x9f8082(0x69)][_0x9f8082(0x8d)](_0x1e72bb,_0x4fcb53[_0x9f8082(0x81)]);}};}