@ckeditor/ckeditor5-track-changes 29.0.0 → 31.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/lang/translations/de.po +3 -3
  2. package/lang/translations/gl.po +3 -3
  3. package/lang/translations/it.po +3 -3
  4. package/lang/translations/sr-latn.po +1 -1
  5. package/lang/translations/sr.po +1 -1
  6. package/package.json +7 -7
  7. package/src/commands/acceptallsuggestionscommand.js +1 -1
  8. package/src/commands/acceptselectedsuggestionscommand.js +1 -1
  9. package/src/commands/acceptsuggestioncommand.js +1 -1
  10. package/src/commands/discardallsuggestionscommand.js +1 -1
  11. package/src/commands/discardselectedsuggestionscommand.js +1 -1
  12. package/src/commands/discardsuggestioncommand.js +1 -1
  13. package/src/commands/trackchangescommand.js +1 -1
  14. package/src/integrations/alignment.js +1 -1
  15. package/src/integrations/basicstyles.js +1 -1
  16. package/src/integrations/blockquote.js +1 -1
  17. package/src/integrations/codeblock.js +1 -1
  18. package/src/integrations/comments.js +1 -1
  19. package/src/integrations/deletecommand.js +1 -1
  20. package/src/integrations/entercommand.js +1 -1
  21. package/src/integrations/font.js +1 -1
  22. package/src/integrations/heading.js +1 -1
  23. package/src/integrations/highlight.js +1 -1
  24. package/src/integrations/horizontalline.js +1 -1
  25. package/src/integrations/image.js +1 -1
  26. package/src/integrations/indent.js +1 -1
  27. package/src/integrations/inputcommand.js +1 -1
  28. package/src/integrations/link.js +1 -1
  29. package/src/integrations/list.js +1 -1
  30. package/src/integrations/mediaembed.js +1 -1
  31. package/src/integrations/mention.js +1 -1
  32. package/src/integrations/pagebreak.js +1 -1
  33. package/src/integrations/paragraph.js +1 -1
  34. package/src/integrations/removeformat.js +1 -1
  35. package/src/integrations/restrictededitingmode.js +1 -1
  36. package/src/integrations/shiftentercommand.js +1 -1
  37. package/src/integrations/standardeditingmode.js +1 -1
  38. package/src/integrations/table.js +1 -1
  39. package/src/integrations/tableclipboard.js +1 -1
  40. package/src/integrations/tableheadings.js +1 -1
  41. package/src/integrations/tablemergesplit.js +1 -1
  42. package/src/integrations/title.js +1 -1
  43. package/src/integrations/undo.js +1 -1
  44. package/src/integrations/utils.js +1 -1
  45. package/src/suggestion.js +1 -1
  46. package/src/suggestiondescriptionfactory.js +1 -1
  47. package/src/trackchanges.js +1 -1
  48. package/src/trackchangesdata.js +1 -1
  49. package/src/trackchangesediting.js +1 -1
  50. package/src/trackchangesui.js +1 -1
  51. package/src/ui/suggestioncontroller.js +1 -1
  52. package/src/ui/view/basesuggestionthreadview.js +1 -1
  53. package/src/ui/view/suggestionthreadview.js +1 -1
  54. package/src/utils/getselectedsuggestions.js +1 -1
  55. package/src/utils/hashobject.js +1 -1
  56. package/src/utils/normalizedescription.js +1 -1
  57. package/src/utils/sortsuggestions.js +1 -1
  58. package/theme/integrations/table.css +57 -48
  59. package/theme/suggestionmarker.css +1 -0
  60. package/src/integrations/exportpdf.js +0 -23
  61. package/src/integrations/selectall.js +0 -23
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3b19c3,PendingActions as _0x8c5f91}from'ckeditor5/src/core';import _0x516b27 from'@ckeditor/ckeditor5-collaboration-core/src/users';import{LiveRange as _0x2cc107}from'ckeditor5/src/engine';import{CKEditorError as _0x55b5e4,uid as _0x546c50,priorities as _0xabdf2e,EmitterMixin as _0x541813,mix as _0x3125d1}from'ckeditor5/src/utils';import _0x277b09 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x2e3cb1 from'./commands/trackchangescommand';import _0x447f95 from'./commands/acceptsuggestioncommand';import _0x4426cf from'./commands/discardsuggestioncommand';import _0xadaca6 from'./commands/acceptallsuggestionscommand';import _0x1c5e88 from'./commands/acceptselectedsuggestionscommand';import _0x3b67f1 from'./commands/discardallsuggestionscommand';import _0x57bbff from'./commands/discardselectedsuggestionscommand';import _0x78f430 from'./suggestion';import _0x43752d from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0xd9a941 from'./integrations/alignment';import _0xf99c1c from'./integrations/basicstyles';import _0x5e91c7 from'./integrations/blockquote';import _0x25efae from'./integrations/codeblock';import _0x350323 from'./integrations/comments';import _0x1fc727 from'./integrations/deletecommand';import _0x52790b from'./integrations/entercommand';import _0x3ea68e from'./integrations/exportpdf';import _0x5cb154 from'./integrations/font';import _0x308409 from'./integrations/heading';import _0x493dc7 from'./integrations/highlight';import _0x37dce0 from'./integrations/horizontalline';import _0x379701 from'./integrations/image';import _0x3a6db5 from'./integrations/indent';import _0x342335 from'./integrations/inputcommand';import tt from'./integrations/link';import it from'./integrations/list';import st from'./integrations/mediaembed';import nt from'./integrations/mention';import et from'./integrations/pagebreak';import ot from'./integrations/paragraph';import rt from'./integrations/removeformat';import at from'./integrations/restrictededitingmode';import ct from'./integrations/selectall';import ht from'./integrations/shiftentercommand';import ut from'./integrations/standardeditingmode';import ft from'./integrations/table';import gt from'./integrations/tablemergesplit';import lt from'./integrations/tableheadings';import dt from'./integrations/tableclipboard';import mt from'./integrations/title';import pt from'./integrations/undo';import kt from'./utils/hashobject.js';import{toWidget as wt}from'ckeditor5/src/widget';export default class l extends _0x3b19c3{static get['requires'](){return[_0x516b27,_0x8c5f91,_0x277b09,_0xd9a941,_0xf99c1c,_0x5e91c7,_0x25efae,_0x350323,_0x1fc727,_0x52790b,_0x3ea68e,_0x5cb154,_0x308409,_0x493dc7,_0x37dce0,_0x379701,_0x3a6db5,_0x342335,tt,it,st,nt,et,ot,rt,at,ct,ht,ut,ft,gt,lt,dt,mt,pt];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x5d8785){function _0x36d1bd(_0x161984){return _0x161984['map'](_0x14e926=>String['fromCharCode'](_0x14e926))['join']('');}super(_0x5d8785),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x4b6001,_0x32afc9,_0x18d4b0,_0x2d3731)=>{this['_model']['change'](_0x1ad3e9=>{for(const _0x571232 of[..._0x2d3731,..._0x18d4b0])this['_model']['markers']['has'](_0x571232)&&_0x1ad3e9['updateMarker'](_0x571232);});}),this['_descriptionFactory']=new _0x43752d(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new yt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x5d8785['plugins']['get'](_0x277b09),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x36d1bd([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x36d1bd([0x34,0x30,0x34,0x32,0x31,0x34,0x31,0x34]);}['init'](){const _0x59489a=this['editor'];_0x59489a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x24d5d0=>{const {id:_0x56e10b,type:_0x40838e}=this['_splitMarkerName'](_0x24d5d0['markerName']),_0x48fe6f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x40838e];let _0x1522ba=0xbb8;return this['activeMarkers']['includes'](_0x24d5d0['markerName'])&&(_0x48fe6f['push']('ck-suggestion-marker--active'),_0x1522ba=0xbc2),'deletion'==_0x40838e&&(_0x1522ba+=0x5),{'classes':_0x48fe6f,'attributes':{'data-suggestion':_0x56e10b},'priority':_0x1522ba};}}),_0x59489a['conversion']['for']('dataDowncast')['add'](_0x473ce6=>{_0x473ce6['on']('addMarker:suggestion',(_0x485b1c,_0x4c24fe,_0x275249)=>{if(!_0x275249['options']['showSuggestionHighlights'])return;const _0x212f6c=_0x4c24fe['item'];if(!_0x212f6c)return;const _0x510817=_0x275249['mapper']['toViewElement'](_0x212f6c);_0x59489a['model']['schema']['isObject'](_0x212f6c)&&_0x510817&&!_0x510817['getCustomProperty']('widget')&&_0x510817['is']('containerElement')&&wt(_0x510817,_0x275249['writer']);},{'priority':'high'});}),_0x59489a['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x10f6ad,_0x59fe5f)=>{if(!_0x59fe5f['options']['showSuggestionHighlights'])return null;const {type:_0x2a32ca}=this['_splitMarkerName'](_0x10f6ad['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0x2a32ca],'priority':0xbb8};}});const _0x175a11=({showActiveMarkers:_0x4838f1=!0x0}={})=>(_0x30f160,_0x327761,_0x405968)=>{if(!_0x327761['item'])return;if(_0x327761['item']['is']('selection'))return void _0x405968['consumable']['consume'](_0x327761['item'],_0x30f160['name']);const _0x12ede3=_0x405968['mapper']['toViewElement'](_0x327761['item']);if(!(_0x327761['item']['is']('element')&&_0x59489a['model']['schema']['isBlock'](_0x327761['item'])&&!_0x12ede3['getCustomProperty']('addHighlight')))return;const {id:_0x3f9fba}=this['_splitMarkerName'](_0x327761['markerName']);_0x405968['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x12ede3),_0x405968['writer']['setAttribute']('data-suggestion',_0x3f9fba,_0x12ede3),_0x405968['mapper']['bindElementToMarker'](_0x12ede3,_0x327761['markerName']),_0x4838f1&&(this['activeMarkers']['includes'](_0x327761['markerName'])?_0x405968['writer']['addClass']('ck-suggestion-marker--active',_0x12ede3):_0x405968['writer']['removeClass']('ck-suggestion-marker--active',_0x12ede3));for(const _0x19c1cf of _0x59489a['model']['createRangeIn'](_0x327761['item'])['getItems']())_0x405968['consumable']['consume'](_0x19c1cf,_0x30f160['name']);_0x405968['consumable']['consume'](_0x327761['item'],_0x30f160['name']);};_0x59489a['conversion']['for']('dataDowncast')['add'](_0xeb7324=>{_0xeb7324['on']('addMarker:suggestion:formatBlock',(_0x59d3f9,_0x2ebd0d,_0x230488)=>{_0x230488['options']['showSuggestionHighlights']&&_0x175a11({'showActiveMarkers':!0x1})(_0x59d3f9,_0x2ebd0d,_0x230488);},{'priority':'highest'});}),_0x59489a['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0xc0c40f,_0x486680)=>_0x486680['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0xc0c40f['substr']('suggestion'['length']+0x1)}}),_0x59489a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x57917e,{writer:_0x5a7bb6})=>{let _0x3e775a='suggestion:'+_0x57917e['getAttribute']('suggestion-type')+':'+_0x57917e['getAttribute']('id');return _0x57917e['getAttribute']('marker-count')&&(_0x3e775a+=':'+_0x57917e['getAttribute']('marker-count')),_0x5a7bb6['createElement']('$marker',{'data-name':_0x3e775a});}}),_0x59489a['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x59489a['conversion']['for']('editingDowncast')['add'](_0x18d9e2=>{_0x18d9e2['on']('addMarker:suggestion:formatBlock',_0x175a11(),{'priority':'high'});}),_0x59489a['conversion']['for']('editingDowncast')['add'](_0x24cd51=>{_0x24cd51['on']('removeMarker:suggestion:formatBlock',(_0x28283a,_0x5832a0,_0x33c219)=>{const _0x1cf994=_0x33c219['mapper']['markerNameToElements'](_0x5832a0['markerName']);if(_0x1cf994)for(const _0x2a1637 of _0x1cf994)_0x2a1637['getCustomProperty']('addHighlight')||(_0x33c219['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x2a1637),_0x33c219['writer']['removeAttribute']('data-suggestion',_0x2a1637),_0x33c219['mapper']['unbindElementFromMarkerName'](_0x2a1637,_0x5832a0['markerName']));},{'priority':'high'});}),_0x59489a['model']['document']['registerPostFixer'](_0x5c6a2b=>{let _0x1aae22=!0x1;const _0x2a01a9=Array['from'](_0x59489a['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x149f58,data:_0x500efd}of _0x2a01a9){const {group:_0x545957,type:_0x3482d5,id:_0x5be573}=this['_splitMarkerName'](_0x149f58);if('suggestion'!==_0x545957)continue;const _0x46a0bd=this['_suggestions']['get'](_0x5be573);if(null!=_0x500efd['newRange']){'formatInline'==_0x3482d5&&(_0x1aae22=_0x1aae22||It(_0x500efd['newRange'],_0x149f58,_0x5c6a2b,_0x59489a['model']['schema']));if(_0x500efd['newRange']['isCollapsed']||'$graveyard'==_0x500efd['newRange']['root']['rootName']||'formatBlock'==_0x3482d5&&!Dt(_0x500efd['newRange'])||'deletion'==_0x3482d5&&!(!bt(_0x2d34ea=_0x500efd['newRange'])&&!function(_0xa2466){return _0xa2466['start']['parent']==_0xa2466['end']['nodeBefore']&&_0xa2466['start']['isAtEnd'];}(_0x2d34ea)))_0x5c6a2b['removeMarker'](_0x149f58),_0x1aae22=!0x0;else{if(!_0x46a0bd||!_0x46a0bd['isInContent'])continue;_0x1aae22=!!this['_joinWithAdjacentSuggestions'](_0x46a0bd)||_0x1aae22;}}}var _0x2d34ea;return _0x1aae22;}),_0x59489a['model']['document']['registerPostFixer'](_0xbf3793=>{let _0x2dcf5c=!0x1;for(const _0x2dc7e4 of _0x59489a['model']['document']['differ']['getChanges']()){if('insert'!=_0x2dc7e4['type'])continue;const _0x2aafb1=_0x2dc7e4['position']['getShiftedBy'](_0x2dc7e4['length']);if(_0x2aafb1['isAtEnd'])for(const _0x37790b of this['_suggestions']['values']()){if(_0x37790b['isMultiRange']||!_0x37790b['isInContent'])continue;if('formatBlock'!=_0x37790b['type'])continue;const _0x4755ec=_0x37790b['getFirstRange']();if(_0x4755ec['start']['parent']!=_0x4755ec['end']['parent']&&_0x4755ec['end']['isEqual'](_0x2dc7e4['position'])){const _0x224ca2=_0x59489a['model']['createRange'](_0x4755ec['start'],_0x2aafb1);_0xbf3793['updateMarker'](_0x37790b['getFirstMarker'](),{'range':_0x224ca2}),_0x2dcf5c=!0x0;}}}return _0x2dcf5c;}),_0x59489a['model']['markers']['on']('update:suggestion',(_0x123fa2,_0x439ba0,_0x4c0495)=>{if(null==_0x4c0495){const {id:_0x358dd5}=this['_splitMarkerName'](_0x439ba0['name']),_0x349c55=this['_suggestions']['get'](_0x358dd5);_0x349c55&&_0x349c55['addMarkerName'](_0x439ba0['name']);}}),_0x59489a['model']['document']['on']('change:data',()=>{const _0x4c250f=Array['from'](_0x59489a['model']['document']['differ']['getChangedMarkers']());_0x4c250f['sort']((_0x4f3c83,_0x353eee)=>{const _0x243449=_0x4f3c83['data']['oldRange'],_0x2fe821=_0x353eee['data']['oldRange'];return null===_0x243449&&null===_0x2fe821?0x0:null===_0x243449&&null!==_0x2fe821?-0x1:null!==_0x243449&&null===_0x2fe821?0x1:_0x243449['start']['isBefore'](_0x2fe821['start'])?-0x1:0x1;});const _0x33c5c6=new Set();for(const {name:_0x4126a3,data:_0x5dd1b9}of _0x4c250f){const {group:_0x266fda,id:_0x45063d}=this['_splitMarkerName'](_0x4126a3);if('suggestion'===_0x266fda&&(null===_0x5dd1b9['oldRange']&&this['_handleNewSuggestionMarker'](_0x4126a3),null===_0x5dd1b9['newRange'])){const _0x4b88ef=this['_suggestions']['get'](_0x45063d);_0x4b88ef['isInContent']?_0x33c5c6['add'](_0x4b88ef):this['_removeSuggestion'](_0x4b88ef);}}for(const {name:_0x31adb4,data:_0x5df0dc}of _0x4c250f){const {group:_0x2137cb,id:_0x4d96ed}=this['_splitMarkerName'](_0x31adb4);if('suggestion'!==_0x2137cb)continue;const _0x13386f=this['_suggestions']['get'](_0x4d96ed);null!=_0x5df0dc['newRange']&&null!=_0x5df0dc['oldRange']&&(this['_refreshSuggestionsChain'](_0x13386f),_0x33c5c6['add'](_0x13386f['head']));}for(const _0x558f7a of _0x33c5c6)this['fire']('suggestionChanged',_0x558f7a);_0x33c5c6['clear']();}),_0x59489a['model']['on']('applyOperation',(_0x548b2d,_0x5ed38d)=>{const _0x3c22a0=_0x5ed38d[0x0];if(!this['_suggestions']['size'])return;if(!_0x3c22a0['isDocumentOperation'])return;if('transparent'==_0x3c22a0['batch']['type'])return;let _0x59c290,_0x482039;switch(_0x3c22a0['type']){case'insert':_0x59c290=_0x59489a['model']['createPositionAt'](_0x3c22a0['position']),_0x482039=_0x59c290['getShiftedBy'](_0x3c22a0['howMany']);break;case'split':_0x59c290=_0x59489a['model']['createPositionAt'](_0x3c22a0['splitPosition']),_0x482039=_0x59489a['model']['createPositionAt'](_0x3c22a0['moveTargetPosition']);break;case'move':_0x59c290=_0x59489a['model']['createPositionAt'](_0x3c22a0['targetPosition']),_0x482039=_0x59c290['getShiftedBy'](_0x3c22a0['howMany']);break;default:return;}const _0x137f62=_0x59489a['model']['createRange'](_0x59c290,_0x482039);_0x59489a['model']['change'](()=>{for(const {suggestion:_0x4522dd,meta:_0x34075a}of this['_findSuggestions'](_0x137f62)){if(_0x4522dd['isMultiRange'])continue;if('formatInline'==_0x4522dd['type'])continue;const _0xb89721=_0x4522dd['data']&&_0x4522dd['data']['multipleBlocks'];('formatBlock'!=_0x4522dd['type']||'split'==_0x3c22a0['type']&&!_0xb89721)&&(_0x34075a['containsRangeInObject']||'insertion'==_0x4522dd['type']&&_0x34075a['isOwn']||_0x4522dd['getFirstRange']()['containsRange'](_0x137f62)&&this['_breakSuggestionMarker'](_0x4522dd,_0x59c290,_0x482039));}});},{'priority':'lowest'}),_0x59489a['model']['on']('deleteContent',(_0x363023,_0xf7b073)=>{const _0x20f100=_0xf7b073[0x0],_0x468db9=_0xf7b073[0x1];if(_0x468db9&&_0x468db9['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x20f100['isCollapsed'])return;const _0x1e2dc4=_0x59489a['model']['schema'],{start:_0x106b66,end:_0x1c1bf8}=_0x20f100['getFirstRange'](),_0x5268ad=_0x106b66['nodeAfter']&&_0x1e2dc4['isObject'](_0x106b66['nodeAfter'])?null:_0x1e2dc4['getNearestSelectionRange'](_0x106b66,'forward'),_0x26a65c=_0x1c1bf8['nodeBefore']&&_0x1e2dc4['isObject'](_0x1c1bf8['nodeBefore'])?null:_0x1e2dc4['getNearestSelectionRange'](_0x1c1bf8,'backward'),_0x2c227b=_0x59489a['model']['createRange'](_0x5268ad?_0x5268ad['start']:_0x106b66,_0x26a65c?_0x26a65c['end']:_0x1c1bf8);_0x59489a['model']['change'](_0x406ce2=>{this['markDeletion'](_0x2c227b);const _0x569cab=_0x59489a['model']['schema']['getNearestSelectionRange'](_0x2c227b['start']);_0x20f100['is']('documentSelection')?_0x406ce2['setSelection'](_0x569cab):_0x20f100['setTo'](_0x569cab);}),_0x363023['stop']();},{'priority':_0xabdf2e['normal']+0xa}),_0x59489a['model']['on']('insertContent',(_0x2c27ff,_0xb4b27d)=>{const _0x4d5717=_0xb4b27d[_0xb4b27d['length']-0x1];_0x4d5717&&_0x4d5717['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x59489a['model']['change'](()=>{let _0xad549d=_0x59489a['model']['insertContent'](_0xb4b27d[0x0],_0xb4b27d[0x1],_0xb4b27d[0x2],_0xb4b27d[0x3],{'forceDefaultExecution':!0x0});if(!_0xad549d)return;_0x2c27ff['return']=_0xad549d['clone']();const _0x198d2d=_0xad549d['end']['nodeBefore'],_0x246bf=_0x59489a['model']['schema'];_0x198d2d&&_0x246bf['isBlock'](_0x198d2d)&&!_0x246bf['isObject'](_0x198d2d)&&(_0xad549d=_0x59489a['model']['createRange'](_0xad549d['start'],_0x59489a['model']['createPositionAt'](_0x198d2d,'end'))),this['markInsertion'](_0xad549d);}),_0x2c27ff['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x2e3cb1(_0x59489a,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x4ce10c=new _0x447f95(_0x59489a,this['_suggestions']);_0x59489a['commands']['add']('acceptSuggestion',_0x4ce10c),this['enableCommand']('acceptSuggestion');const _0x271a9b=new _0x4426cf(_0x59489a,this['_suggestions']);_0x59489a['commands']['add']('discardSuggestion',_0x271a9b),this['enableCommand']('discardSuggestion'),_0x59489a['commands']['add']('acceptAllSuggestions',new _0xadaca6(_0x59489a,_0x4ce10c,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x59489a['commands']['add']('discardAllSuggestions',new _0x3b67f1(_0x59489a,_0x271a9b,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x59489a['commands']['add']('acceptSelectedSuggestions',new _0x1c5e88(_0x59489a,_0x4ce10c,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x59489a['commands']['add']('discardSelectedSuggestions',new _0x57bbff(_0x59489a,_0x271a9b,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x5f546a=_0x59489a['plugins']['get'](_0x277b09);this['listenTo'](_0x5f546a,'addComment',(_0x162bba,{threadId:_0x286832})=>{const _0x2af830=this['_suggestions']['get'](_0x286832);_0x2af830&&_0x2af830['commentThread']&&0x1===_0x2af830['commentThread']['length']&&this['_updateSuggestionData'](_0x286832,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x5f546a,'removeComment',(_0xef0c5e,{threadId:_0x351309})=>{const _0x3f8858=this['_suggestions']['get'](_0x351309);_0x3f8858&&_0x3f8858['commentThread']&&!_0x3f8858['commentThread']['length']&&this['_updateSuggestionData'](_0x351309,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x1b82e7){if(this['_adapter'])throw new _0x55b5e4('track-changes-adapter-already-set',this);this['_adapter']=_0x1b82e7;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x56db47=!0x1,toJSON:_0x526e95=!0x1}={}){const _0x52fbac=[];for(const _0x4259bb of this['_suggestions']['values']())_0x56db47&&!_0x4259bb['isInContent']||_0x52fbac['push'](_0x4259bb);return _0x526e95?_0x52fbac['map'](_0x758a70=>_0x758a70['toJSON']()):_0x52fbac;}['getSuggestion'](_0x65530b){const _0x403529=this['_suggestions']['get'](_0x65530b);if(!_0x403529)throw new _0x55b5e4('track-changes-suggestion-not-found',this);return _0x403529;}['hasSuggestion'](_0x30ccd4){return this['_suggestions']['has'](_0x30ccd4);}['addSuggestionData'](_0x341802){const {id:_0x19fb2e,authorId:_0x470a49}=_0x341802,[_0x36027c,_0x15d877]=_0x341802['type']['split'](':'),_0x5e4ec1=this['_suggestions']['get'](_0x19fb2e)||this['_createSuggestion'](_0x36027c,_0x15d877,_0x19fb2e,_0x470a49);switch(this['_addThreadToSuggestion'](_0x5e4ec1),this['_checkSuggestionCorrectness'](_0x5e4ec1,_0x36027c,_0x15d877||null,_0x470a49),_0x5e4ec1['createdAt']=_0x341802['createdAt'],_0x341802['data']&&(_0x5e4ec1['data']=_0x341802['data']),_0x341802['attributes']&&(_0x5e4ec1['attributes']=_0x341802['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x5e4ec1['_saved']=!0x0),this['_suggestionState']['get'](_0x5e4ec1)){case'notReady':this['_suggestionState']['set'](_0x5e4ec1,'dataReady');break;case'markerReady':_0x5e4ec1['isInContent']?(this['_suggestionState']['set'](_0x5e4ec1,'ready'),this['fire']('suggestionLoaded',_0x5e4ec1)):this['_suggestionState']['set'](_0x5e4ec1,'removed');}return _0x5e4ec1;}['acceptSuggestion'](_0x2e31cb){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x22d6c6 of _0x2e31cb['getAllAdjacentSuggestions']())_0x22d6c6['accept']();});});}['discardSuggestion'](_0x4f9389){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x28c18c of _0x4f9389['getAllAdjacentSuggestions']())_0x28c18c['discard']();});});}['enableCommand'](_0x2313ba,_0x5b1acb){const _0x445eb8=this['editor']['commands']['get'](_0x2313ba);if(!_0x445eb8)throw new _0x55b5e4('track-changes-command-not-found',this,{'commandName':_0x2313ba});this['_enabledCommands']['add'](_0x445eb8),_0x5b1acb&&_0x445eb8['on']('execute',(_0x5ed8e5,_0x502a1a)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x502a1a['length']>0x0&&_0x502a1a[_0x502a1a['length']-0x1]&&_0x502a1a[_0x502a1a['length']-0x1]['forceDefaultExecution']||(_0x5b1acb((..._0xd304e0)=>_0x445eb8['execute'](..._0xd304e0,{'forceDefaultExecution':!0x0}),..._0x502a1a),_0x5ed8e5['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x53023c){let _0x5c918e,_0x6228f3;const _0x42f824=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x5c918e=_0x53023c();}catch(_0x11a95c){_0x6228f3=_0x11a95c;}return _0x42f824||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x6228f3&&_0x55b5e4['rethrowUnexpectedError'](_0x6228f3,this),_0x5c918e;}['markInsertion'](_0x2ff5d2,_0x943421=null,_0x20dffe={}){if(_0x2ff5d2['isCollapsed'])return null;const _0x2d9231=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x509567,meta:_0x1fd42c}of this['_findSuggestions'](_0x2ff5d2,'insertion'))if(_0x1fd42c['isOwn']){if(!_0x1fd42c['isNextTo'])return _0x509567;if(_0x943421==_0x509567['subType']){const _0x44d2cb=_0x509567['getFirstRange']();return _0x44d2cb['start']['isEqual'](_0x2ff5d2['end'])?this['_setSuggestionRange'](_0x509567,this['_model']['createRange'](_0x2ff5d2['start'],_0x44d2cb['end'])):this['_setSuggestionRange'](_0x509567,this['_model']['createRange'](_0x44d2cb['start'],_0x2ff5d2['end'])),_0x509567;}}const _0xeea604=_0x546c50(),_0x190ee8=_0x2d9231['id'],_0x1415dc=_0x943421?'insertion:'+_0x943421:'insertion',_0x366440=this['_setSuggestionData']({'id':_0xeea604,'type':_0x1415dc,'createdAt':new Date(),'authorId':_0x190ee8,'attributes':_0x20dffe});return this['_addSuggestionMarker'](_0x1415dc,_0xeea604,_0x190ee8,_0x2ff5d2),_0x366440;}['markMultiRangeInsertion'](_0x3bc282,_0x2e4ebe='multi',_0x3caef2={}){const _0xb04376=this['editor']['plugins']['get']('Users')['me'],_0x2e39ef=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x2e4ebe,'join');for(const _0x3856b3 of this['getSuggestions']())if(_0x3856b3['author']['id']==_0xb04376['id']&&'insertion'==_0x3856b3['type']&&_0x3856b3['subType']==_0x2e4ebe&&(_0x2e39ef(_0x3856b3['getRanges'](),_0x3bc282)||_0x2e39ef(_0x3bc282,_0x3856b3['getRanges']()))){for(const _0x25b4a0 of _0x3bc282)_0x3856b3['addRange'](_0x25b4a0);return _0x3856b3;}for(const _0x4364e5 of _0x3bc282)for(const {suggestion:_0xf9aa78,meta:_0x391489}of this['_findSuggestions'](_0x4364e5,'insertion')){if(!_0x391489['isOwn'])continue;let _0xf9dc24=!0x0;for(const _0x253546 of _0xf9aa78['getRanges']())for(const _0x521733 of _0x3bc282)if(!_0x253546['containsRange'](_0x521733)){_0xf9dc24=!0x1;break;}if(_0xf9dc24)return _0xf9aa78;}const _0x10ba61=_0x546c50(),_0x1b20c6=_0xb04376['id'],_0x5a249d='insertion:'+_0x2e4ebe,_0x23ba83=this['_setSuggestionData']({'id':_0x10ba61,'type':_0x5a249d,'createdAt':new Date(),'authorId':_0x1b20c6,'attributes':_0x3caef2});for(const _0x5beeef of _0x3bc282)this['_addSuggestionMarker'](_0x5a249d,_0x10ba61,_0x1b20c6,_0x5beeef,_0x78f430['getMultiRangeId']());return _0x23ba83;}['markInlineFormat'](_0x30c1e1,_0x5e4175,_0x2230a9=null,_0x5e8a96={}){if(_0x2230a9=_0x2230a9||vt(_0x5e4175),_0x30c1e1['isCollapsed'])return;const _0x4dd27c=this['editor']['plugins']['get']('Users')['me'],_0x22db79=[];for(const {suggestion:_0x36fc51,meta:_0x4cad73}of this['_findSuggestions'](_0x30c1e1,'insertion'))_0x4cad73['isOwn']&&!_0x4cad73['isInsideObject']&&_0x22db79['push'](..._0x36fc51['getRanges']());const _0x3be1de=function(_0x57685d,_0x2cb4d5){const _0x4d6ec6=[];for(const _0x36b8c0 of _0x2cb4d5){const _0x1942a6=_0x57685d['getIntersection'](_0x36b8c0);_0x1942a6&&_0x4d6ec6['push'](_0x1942a6);}return _0x4d6ec6;}(_0x30c1e1,_0x22db79),_0x5e96d4=function(_0x5ba854,_0x4a0ecd){const _0x56b392=[_0x5ba854];for(const _0x2cccf5 of _0x4a0ecd){let _0x49c911=0x0;for(;_0x49c911<_0x56b392['length'];){const _0x594dc4=_0x56b392[_0x49c911]['getDifference'](_0x2cccf5);_0x56b392['splice'](_0x49c911,0x1,..._0x594dc4),_0x49c911+=_0x594dc4['length'];}}return _0x56b392;}(_0x30c1e1,_0x22db79);_0x3be1de['length']&&this['_model']['change'](()=>{for(const _0xeed89d of _0x3be1de){const _0x448950=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x2230a9,'accept');this['forceDefaultExecution'](()=>_0x448950([_0xeed89d],_0x5e4175,_0x5e8a96));}});for(const _0x3601c0 of _0x5e96d4){let _0x5172aa=null,_0x9f20cb=_0x3601c0['start'],_0x50fdc9=_0x3601c0['end'];for(const {suggestion:_0x5a401f,meta:_0x292d62}of this['_findSuggestions'](_0x3601c0,'formatInline')){if(!_0x292d62['isOwn'])continue;if(_0x5a401f['subType']!=_0x2230a9)continue;const _0x9a2488=_0x5a401f['getFirstRange']();if(_0x9a2488['containsRange'](_0x3601c0,!0x0))return;_0x9f20cb=_0x9f20cb['isBefore'](_0x9a2488['start'])?_0x9f20cb:_0x9a2488['start'],_0x50fdc9=_0x50fdc9['isAfter'](_0x9a2488['end'])?_0x50fdc9:_0x9a2488['end'],_0x5172aa?_0x9a2488['start']['isBefore'](_0x5172aa['getFirstRange']()['start'])?(_0x5172aa['removeMarkers'](),_0x5172aa=_0x5a401f):_0x5a401f['removeMarkers']():_0x5172aa=_0x5a401f;}const _0x109832=this['_model']['createRange'](_0x9f20cb,_0x50fdc9);if(_0x5172aa)this['_setSuggestionRange'](_0x5172aa,_0x109832);else{const _0x12828f=_0x546c50(),_0x30dc11=_0x4dd27c['id'];this['_setSuggestionData']({'id':_0x12828f,'type':'formatInline:'+_0x2230a9,'data':_0x5e4175,'createdAt':new Date(),'authorId':_0x30dc11,'attributes':_0x5e8a96}),this['_addSuggestionMarker']('formatInline:'+_0x2230a9,_0x12828f,_0x30dc11,_0x109832);}}}['markBlockFormat'](_0x173965,_0x439a01,_0x13f9f0=[],_0x2c2f6e=null,_0x46029f={}){_0x439a01['formatGroupId']||(_0x439a01['formatGroupId']=_0x439a01['commandName']),_0x439a01['multipleBlocks']=_0x173965['is']('range'),_0x2c2f6e=_0x2c2f6e||vt(_0x439a01);const _0x3950f8=_0x13f9f0['map'](_0x3328f0=>At(_0x3328f0,this['_model'])),_0x16a108=_0x173965['is']('range')?_0x173965:At(_0x173965,this['_model']);_0x3950f8['push'](_0x16a108);let _0x2bc4e3=!0x0;for(const _0x3cb455 of _0x3950f8)if(!this['_rangeIsInLocalUserInsertion'](_0x3cb455)){_0x2bc4e3=!0x1;break;}if(_0x2bc4e3){const _0x4fb834=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2c2f6e,'accept');return void this['forceDefaultExecution'](()=>_0x4fb834([_0x16a108],_0x439a01,_0x46029f));}let _0x46f181=null,_0x2ee78d=_0x16a108['start'],_0x81eac4=_0x16a108['end'];for(const {suggestion:_0x49474b,meta:_0x1c5311}of this['_findSuggestions'](_0x16a108,'formatBlock')){if(!_0x1c5311['isOwn']||_0x1c5311['isNextTo']||_0x1c5311['containsRangeInObject']||_0x1c5311['isInsideObject'])continue;if(_0x49474b['data']['formatGroupId']!=_0x439a01['formatGroupId'])continue;const _0x86aeb6=_0x49474b['getFirstRange']();if(_0x49474b['subType']==_0x2c2f6e){if(_0x86aeb6['containsRange'](_0x16a108,!0x0))return;_0x2ee78d=_0x2ee78d['isBefore'](_0x86aeb6['start'])?_0x2ee78d:_0x86aeb6['start'],_0x81eac4=_0x81eac4['isAfter'](_0x86aeb6['end'])?_0x81eac4:_0x86aeb6['end'],_0x46f181?_0x86aeb6['start']['isBefore'](_0x46f181['getFirstRange']()['start'])?(_0x46f181['removeMarkers'](),_0x46f181=_0x49474b):_0x49474b['removeMarkers']():_0x46f181=_0x49474b;}else{const _0x124639=_0x16a108['getIntersection'](_0x86aeb6);this['_cutOutSuggestionMarker'](_0x49474b,_0x124639);}}const _0x1d39f9=this['editor']['plugins']['get']('Users')['me'],_0x424da0=_0x546c50(),_0x3ac759=_0x1d39f9['id'];_0x46f181?this['_setSuggestionRange'](_0x46f181,this['_model']['createRange'](_0x2ee78d,_0x81eac4)):(this['_setSuggestionData']({'id':_0x424da0,'type':'formatBlock:'+_0x2c2f6e,'data':_0x439a01,'createdAt':new Date(),'authorId':_0x3ac759,'attributes':_0x46029f}),this['_addSuggestionMarker']('formatBlock:'+_0x2c2f6e,_0x424da0,_0x3ac759,this['_model']['createRange'](_0x2ee78d,_0x81eac4)));}['markMultiRangeBlockFormat'](_0x139215,_0x4e74d2,_0x10e5aa=[],_0xa280fc=null,_0xb32d1b={}){_0x4e74d2['formatGroupId']||(_0x4e74d2['formatGroupId']=_0x4e74d2['commandName']),_0x4e74d2['multipleBlocks']=!0x1,_0xa280fc=_0xa280fc||vt(_0x4e74d2);const _0x48c8c0=_0x10e5aa['map'](_0x531f24=>At(_0x531f24,this['_model'])),_0x3135fb=_0x139215['map'](_0x147a54=>At(_0x147a54,this['_model']));_0x48c8c0['push'](..._0x3135fb);let _0x2535a6=!0x0;for(const _0x670c62 of _0x48c8c0)if(!this['_rangeIsInLocalUserInsertion'](_0x670c62)){_0x2535a6=!0x1;break;}if(_0x2535a6){const _0x103f77=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0xa280fc,'accept');return void this['forceDefaultExecution'](()=>_0x103f77(_0x3135fb,_0x4e74d2,_0xb32d1b));}const _0x556172=this['editor']['plugins']['get']('Users')['me'];for(const _0x4111af of this['getSuggestions']()){if(_0x4111af['author']['id']!=_0x556172['id'])continue;if('formatBlock'!=_0x4111af['type']||_0x4111af['data']['formatGroupId']!=_0x4e74d2['formatGroupId'])continue;const _0x13ed42=_0x4111af['subType']==_0xa280fc;for(let _0x12e97b=0x0;_0x12e97b<_0x3135fb['length'];_0x12e97b++){const _0x65527e=_0x3135fb[_0x12e97b];for(const _0x2c6036 of _0x4111af['getMarkers']()){const _0x3ffe72=_0x2c6036['getRange']();if(_0x65527e['isEqual'](_0x3ffe72)){_0x13ed42?(_0x3135fb['splice'](_0x12e97b,0x1),_0x12e97b--):_0x4111af['removeMarker'](_0x2c6036['name']);break;}}}}if(0x0==_0x3135fb['length'])return;const _0x1d03a5=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0xa280fc,'join');for(const _0x3c199d of this['getSuggestions']())if(_0x3c199d['author']['id']==_0x556172['id']&&'formatBlock'==_0x3c199d['type']&&_0x3c199d['data']['formatGroupId']==_0x4e74d2['formatGroupId']&&_0x3c199d['subType']==_0xa280fc&&(_0x1d03a5(_0x3c199d['getRanges'](),_0x3135fb)||_0x1d03a5(_0x3135fb,_0x3c199d['getRanges']()))){for(const _0x1b9191 of _0x3135fb)_0x3c199d['addRange'](_0x1b9191);return _0x3c199d;}const _0x111ec0=_0x546c50(),_0x1140e9=_0x556172['id'],_0x55810e='formatBlock:'+_0xa280fc,_0x32bb64=this['_setSuggestionData']({'id':_0x111ec0,'type':_0x55810e,'data':_0x4e74d2,'createdAt':new Date(),'authorId':_0x1140e9,'attributes':_0xb32d1b});for(const _0x51935e of _0x3135fb)this['_addSuggestionMarker'](_0x55810e,_0x111ec0,_0x1140e9,_0x51935e,_0x78f430['getMultiRangeId']());return _0x32bb64;}['markDeletion'](_0x428985,_0x150581=null,_0x37474a={}){if(_0x428985['isCollapsed'])return null;const _0x213052=this['editor']['plugins']['get']('Users')['me'],_0x33a4c6=new _0x2cc107(_0x428985['start'],_0x428985['end']);for(const {suggestion:_0x155eaa,meta:_0x8d5773}of this['_findSuggestions'](_0x33a4c6,'insertion'))if(_0x8d5773['isOwn']&&!_0x8d5773['isNextTo']){if(_0x155eaa['isMultiRange']){const _0x5bf462=_0x155eaa['getRanges']()['filter'](_0x930f9d=>'$graveyard'!=_0x930f9d['root']['rootName']);_0x5bf462['every'](_0x364ed9=>_0x33a4c6['containsRange'](_0x364ed9,!0x0))&&_0x155eaa['discard']();if(_0x5bf462['some'](_0x5406d6=>_0x5406d6['containsRange'](_0x33a4c6,!0x0))){const _0x218c9f=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x150581,'accept');return this['forceDefaultExecution'](()=>_0x218c9f([_0x33a4c6],null,_0x37474a)),null;}}else{const _0x422077=_0x33a4c6['getIntersection'](_0x155eaa['getFirstRange']());_0x155eaa['_onDiscard']([_0x422077],null,_0x37474a);}}if(_0x33a4c6['detach'](),_0x33a4c6['isCollapsed']||'$graveyard'==_0x33a4c6['root']['rootName'])return null;let _0x1766fa=null,_0x2b58f8=_0x33a4c6['start'],_0x66aea1=_0x33a4c6['end'];for(const {suggestion:_0x2a1c9e,meta:_0x3ca04e}of this['_findSuggestions'](_0x33a4c6,'deletion'))if(_0x3ca04e['isOwn']){if(_0x2a1c9e['isMultiRange']){let _0x3d7d0a=!0x0;for(const _0x490385 of _0x2a1c9e['getRanges']()){if(_0x490385['containsRange'](_0x33a4c6,!0x0))return _0x2a1c9e;_0x33a4c6['containsRange'](_0x490385)||(_0x3d7d0a=!0x1);}_0x3d7d0a&&_0x2a1c9e['discard']();}else{const _0x29b72d=_0x2a1c9e['getFirstRange']();if(_0x29b72d['containsRange'](_0x33a4c6,!0x0))return _0x2a1c9e;_0x2b58f8=_0x2b58f8['isBefore'](_0x29b72d['start'])?_0x2b58f8:_0x29b72d['start'],_0x66aea1=_0x66aea1['isAfter'](_0x29b72d['end'])?_0x66aea1:_0x29b72d['end'],_0x1766fa?_0x29b72d['start']['isBefore'](_0x1766fa['getFirstRange']()['start'])?(_0x1766fa['removeMarkers'](),_0x1766fa=_0x2a1c9e):_0x2a1c9e['removeMarkers']():_0x1766fa=_0x2a1c9e;}}if(_0x1766fa)return this['_setSuggestionRange'](_0x1766fa,this['_model']['createRange'](_0x2b58f8,_0x66aea1)),_0x1766fa;{const _0x3ba61b=_0x546c50(),_0x18db37=this['_model']['createRange'](_0x2b58f8,_0x66aea1),_0x5678ec=_0x213052['id'],_0x1b279c=_0x150581?'deletion:'+_0x150581:'deletion',_0x1ee628=this['_setSuggestionData']({'id':_0x3ba61b,'type':_0x1b279c,'createdAt':new Date(),'authorId':_0x5678ec,'attributes':_0x37474a});return this['_addSuggestionMarker'](_0x1b279c,_0x3ba61b,_0x5678ec,_0x18db37),_0x1ee628;}}['markMultiRangeDeletion'](_0x4be5d9,_0x260879='multi',_0x40f296={}){const _0x5bdf62=this['editor']['plugins']['get']('Users')['me'],_0x444337=_0x4be5d9['map'](_0xa80228=>new _0x2cc107(_0xa80228['start'],_0xa80228['end'])),_0x1bc5cc=new Set();for(const _0x3e27d0 of _0x444337)for(const {suggestion:_0x3a6fe3,meta:_0x57f6d6}of this['_findSuggestions'](_0x3e27d0,'insertion'))_0x57f6d6['isOwn']&&!_0x57f6d6['isNextTo']&&_0x1bc5cc['add'](_0x3a6fe3);for(const _0x426981 of _0x1bc5cc)if(_0x426981['isMultiRange']){const _0x372e9d=_0x426981['getRanges']();(!_0x426981['attributes']||!_0x426981['attributes']['skipNestingCheck'])&&(_0x372e9d['every'](_0x4ef0ca=>_0x444337['some'](_0x1a3274=>_0x1a3274['containsRange'](_0x4ef0ca,!0x0)))&&_0x426981['discard']());if(_0x444337['every'](_0x4a3fdc=>_0x372e9d['some'](_0x28d6c8=>_0x28d6c8['containsRange'](_0x4a3fdc,!0x0)))){const _0x5e187d=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x260879,'accept');return this['forceDefaultExecution'](()=>_0x5e187d(_0x4be5d9,null,_0x40f296)),null;}}else{const _0x25588c=_0x426981['getFirstRange']();_0x444337['some'](_0x22f657=>_0x22f657['containsRange'](_0x25588c,!0x0))&&_0x426981['discard']();if(_0x444337['every'](_0x5bfdfd=>_0x25588c['containsRange'](_0x5bfdfd,!0x0))){const _0x55f58b=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x260879,'accept');return this['forceDefaultExecution'](()=>_0x55f58b(_0x444337,null,_0x40f296)),null;}}const _0x315b83=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x260879,'join');let _0x258585=null;for(const _0x4c17f0 of this['getSuggestions']())if(_0x4c17f0['author']['id']==_0x5bdf62['id']&&_0x4c17f0['isInContent']&&'deletion'==_0x4c17f0['type']&&_0x4c17f0['subType']==_0x260879&&(_0x315b83(_0x4c17f0['getRanges'](),_0x444337)||_0x315b83(_0x444337,_0x4c17f0['getRanges']()))){if(_0x258585){if(_0x4c17f0['commentThread']&&_0x4c17f0['commentThread']['length'])continue;for(const _0x4ed053 of _0x4c17f0['getRanges']())_0x258585['isIntersectingWithRange'](_0x4ed053)||_0x258585['addRange'](_0x4ed053);_0x4c17f0['removeMarkers']();}else{_0x258585=_0x4c17f0;for(const _0x1c25f5 of _0x444337)_0x4c17f0['isIntersectingWithRange'](_0x1c25f5)||_0x4c17f0['addRange'](_0x1c25f5);}}if(_0x258585)return _0x258585;_0x1bc5cc['clear']();for(const _0xb5dd8d of _0x444337)for(const {suggestion:_0xc9f3f0,meta:_0x35e0be}of this['_findSuggestions'](_0xb5dd8d,'deletion'))_0x35e0be['isOwn']&&_0x1bc5cc['add'](_0xc9f3f0);for(const _0x3d33 of _0x1bc5cc){const _0x569593=_0x3d33['getRanges']();if(!_0x40f296||!_0x40f296['skipNestingCheck']){if(_0x444337['every'](_0x1622ec=>_0x569593['some'](_0x46fe26=>_0x46fe26['containsRange'](_0x1622ec,!0x0))))return _0x3d33;}(!_0x3d33['attributes']||!_0x3d33['attributes']['skipNestingCheck'])&&(_0x569593['every'](_0x222955=>_0x444337['some'](_0x28c95f=>_0x28c95f['containsRange'](_0x222955,!0x0)))&&_0x3d33['discard']());}const _0x7103ce=_0x546c50(),_0x50a25d=_0x5bdf62['id'],_0x30a01a='deletion:'+_0x260879,_0x1d443a=this['_setSuggestionData']({'id':_0x7103ce,'type':_0x30a01a,'createdAt':new Date(),'authorId':_0x50a25d,'attributes':_0x40f296});for(const _0x569f58 of _0x444337)_0x569f58['detach'](),_0x569f58['isCollapsed']||'$graveyard'==_0x569f58['root']['rootName']||this['_addSuggestionMarker'](_0x30a01a,_0x7103ce,_0x50a25d,_0x569f58,_0x78f430['getMultiRangeId']());return _0x1d443a;}['_setSuggestionRange'](_0xa1b726,_0x123c6b){const _0x453096=_0xa1b726['getFirstMarker']();this['_model']['change'](_0x4b2643=>{_0x4b2643['updateMarker'](_0x453096,{'range':_0x123c6b});});}['_addThreadToSuggestion'](_0x3124f9){const _0xea5787=_0x3124f9['id'],_0x2d20fe=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0xea5787)||this['_commentsRepository']['addCommentThread']({'channelId':_0x2d20fe,'threadId':_0xea5787});const _0x105dfd=this['_commentsRepository']['getCommentThread'](_0xea5787);_0x105dfd['unbind']('isRemovable'),_0x105dfd['isRemovable']=!0x1,_0x3124f9['commentThread']=_0x105dfd;}['_checkSuggestionCorrectness'](_0x29d776,_0xd16aab,_0x4d8e7a,_0x2472d7){if(_0x29d776['type']!=_0xd16aab||_0x29d776['subType']!=_0x4d8e7a||_0x29d776['author']['id']!=_0x2472d7)throw this['editor']['isReadOnly']=!0x0,new _0x55b5e4('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x2078c3,_0x4989c4){const _0x44e0fc=_0x2078c3['getFirstRange']();if(_0x4989c4['isEqual'](_0x44e0fc))_0x2078c3['removeMarkers']();else{if(_0x44e0fc['containsRange'](_0x4989c4)){const _0x41e114=this['_model']['createPositionAt'](_0x4989c4['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x2078c3,this['_model']['createRange'](_0x44e0fc['start'],_0x41e114));const _0x3aeef9=_0x546c50(),_0x5dcc07=_0x2078c3['author']['id'],_0x4f557c=_0x2078c3['type']+':'+_0x2078c3['subType'];this['_setSuggestionData']({'id':_0x3aeef9,'type':_0x4f557c,'createdAt':new Date(),'authorId':_0x5dcc07,'data':_0x2078c3['data'],'attributes':_0x2078c3['attributes']});const _0x49a305=this['_model']['createPositionAt'](_0x4989c4['end']['parent'],'after'),_0x1150e7=this['_model']['createRange'](_0x49a305,_0x44e0fc['end']);this['_addSuggestionMarker'](_0x4f557c,_0x3aeef9,_0x5dcc07,_0x1150e7);}else{if(_0x44e0fc['containsPosition'](_0x4989c4['start'])){const _0x2dd3d2=this['_model']['createPositionAt'](_0x4989c4['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x2078c3,this['_model']['createRange'](_0x44e0fc['start'],_0x2dd3d2));}else{const _0xb7e5f2=this['_model']['createPositionAt'](_0x4989c4['end']['parent'],'after');this['_setSuggestionRange'](_0x2078c3,this['_model']['createRange'](_0xb7e5f2,_0x44e0fc['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x467d49){for(const {suggestion:_0x10dbca,meta:_0x39b164}of this['_findSuggestions'](_0x467d49,'insertion')){if(!_0x39b164['isOwn'])continue;const _0x2bf2cb=_0x10dbca['getRanges']();for(const _0xdc5dfd of _0x2bf2cb)if(!_0x467d49['getDifference'](_0xdc5dfd)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x19e436){const _0x18122a=this['editor']['plugins']['get']('Users')['getUser'](_0x19e436);if(!_0x18122a)throw new _0x55b5e4('track-changes-user-not-found',this);return _0x18122a;}['_createSuggestion'](_0x53b98b,_0x195da2,_0x24022f,_0x3d33db){const _0x14ad40=this['_getAuthorFromId'](_0x3d33db),_0x3ec9f2=this['_suggestionFactory']['buildSuggestion'](_0x53b98b,_0x195da2,_0x24022f,_0x14ad40,_0x320224=>this['_updateSuggestionData'](_0x24022f,{'attributes':_0x320224}));return this['listenTo'](_0x3ec9f2,'accept',()=>{this['_updateSuggestionData'](_0x24022f,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x3ec9f2,'discard',()=>{this['_updateSuggestionData'](_0x24022f,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x24022f,_0x3ec9f2),this['_suggestionState']['set'](_0x3ec9f2,'notReady'),_0x3ec9f2;}['_splitMarkerName'](_0x462e10){const _0x22440=_0x462e10['split'](':');return{'group':_0x22440[0x0],'type':_0x22440[0x1],'subType':_0x22440['length']>=0x5?_0x22440[0x2]:null,'id':_0x22440['length']<0x5?_0x22440[0x2]:_0x22440[0x3],'authorId':_0x22440['length']<0x5?_0x22440[0x3]:_0x22440[0x4],'markerCount':0x6==_0x22440['length']?_0x22440[0x5]:null};}['_breakSuggestionMarker'](_0x41a1ed,_0x4f7bd6,_0x4ae6cd){const _0x4673ea=_0x41a1ed['getFirstRange'](),_0x34c8d4=_0x4673ea['start'],_0x45a953=_0x4673ea['end'];this['_setSuggestionRange'](_0x41a1ed,this['_model']['createRange'](_0x34c8d4,_0x4f7bd6));const _0x327bee=_0x546c50(),_0xe3402=_0x41a1ed['author']['id'],_0x2036e6=_0x41a1ed['type']+(_0x41a1ed['subType']?':'+_0x41a1ed['subType']:'');this['_setSuggestionData']({'id':_0x327bee,'type':_0x2036e6,'createdAt':new Date(),'authorId':_0xe3402,'originalSuggestionId':_0x41a1ed['id'],'data':_0x41a1ed['data']}),'formatBlock'==_0x41a1ed['type']&&(_0x4ae6cd=this['_model']['createPositionBefore'](_0x4ae6cd['parent'])),this['_addSuggestionMarker'](_0x2036e6,_0x327bee,_0xe3402,this['_model']['createRange'](_0x4ae6cd,_0x45a953));}['_findSuggestions'](_0x211a0e,_0x39d460=null){const _0x442bef=[],_0x54a195=this['_model']['schema'],_0xd0741e=this['editor']['plugins']['get']('Users')['me'];for(const _0x1cf81d of this['getSuggestions']())if(_0x1cf81d['isInContent']&&(!_0x39d460||_0x1cf81d['type']==_0x39d460))for(const _0x18ef6d of _0x1cf81d['getRanges']()){const _0x571890=_0x211a0e['start']['isEqual'](_0x18ef6d['end'])||_0x211a0e['end']['isEqual'](_0x18ef6d['start']);if(_0x571890||_0x211a0e['getIntersection'](_0x18ef6d)){const _0x3b2232=_0x211a0e['containsRange'](_0x18ef6d)&&St(_0x54a195,_0x18ef6d['start'],_0x211a0e),_0x34c345=_0x18ef6d['containsRange'](_0x211a0e)&&St(_0x54a195,_0x211a0e['start'],_0x18ef6d);_0x442bef['push']({'suggestion':_0x1cf81d,'meta':{'isOwn':_0xd0741e==_0x1cf81d['author'],'isNextTo':_0x571890,'isInsideObject':_0x3b2232,'containsRangeInObject':_0x34c345}});break;}}return _0x442bef;}['_addSuggestionMarker'](_0x506c9f,_0x5c315d,_0x347623,_0x44f837,_0x4777d9=null){this['_model']['change'](_0x46f8c2=>{let _0x4365c6='suggestion:'+_0x506c9f+':'+_0x5c315d+':'+_0x347623;_0x4777d9&&(_0x4365c6=_0x4365c6+':'+_0x4777d9),_0x46f8c2['addMarker'](_0x4365c6,{'range':_0x44f837,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0xcf1213){const _0x3ebf1e=_0xcf1213['previous'],_0x27ab01=_0xcf1213['next'];_0xcf1213['previous']=null,null!=_0x3ebf1e&&(_0x3ebf1e['next']=null),_0xcf1213['next']=null,null!=_0x27ab01&&(_0x27ab01['previous']=null),'ready'==this['_suggestionState']['get'](_0xcf1213)&&(this['_suggestionState']['set'](_0xcf1213,'removed'),this['fire']('suggestionUnloaded',_0xcf1213,_0x3ebf1e,_0x27ab01));}['_setSuggestionData'](_0x312f67){const _0x3c7983=_0x312f67['id'],_0x3454aa=this['addSuggestionData'](_0x312f67);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x26c250=this['editor']['plugins']['get']('PendingActions'),_0x3acbbe=_0x3454aa['hasComments'],_0x3dd904=_0x3454aa['subType']?_0x3454aa['type']+':'+_0x3454aa['subType']:_0x3454aa['type'],t=this['editor']['locale']['t'],_0x5f3fea=_0x26c250['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x2e167b={'id':_0x3c7983,'type':_0x3dd904,'hasComments':_0x3acbbe,'data':_0x312f67['data']||null,'originalSuggestionId':_0x312f67['originalSuggestionId']||null,'attributes':_0x3454aa['attributes']};this['_adapter']['addSuggestion'](_0x2e167b)['then'](_0x38c5b9=>{_0x3454aa['_saved']=!0x0,_0x26c250['remove'](_0x5f3fea),_0x38c5b9&&_0x38c5b9['createdAt']&&(this['_suggestions']['get'](_0x3c7983)['createdAt']=_0x38c5b9['createdAt']);});}return _0x3454aa;}['_updateSuggestionData'](_0x482b13,_0x2c742b){const _0x94d9c1=this['editor']['plugins']['get']('PendingActions'),_0x339578=this['_suggestions']['get'](_0x482b13);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x339578['_saved']){const t=this['editor']['locale']['t'],_0x4a2796=_0x94d9c1['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x482b13,_0x2c742b)['then'](()=>{_0x94d9c1['remove'](_0x4a2796);});}else _0x339578['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x482b13,_0x2c742b);});}}['_getSuggestionData'](_0xb196da){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x55b5e4('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0xb196da);}['_handleNewSuggestionMarker'](_0x5ca876){const {id:_0x4fef6d,type:_0x2335bb,subType:_0x2b1cd4,authorId:_0x304e77}=this['_splitMarkerName'](_0x5ca876),_0x3a1865=this['_suggestions']['get'](_0x4fef6d)||this['_createSuggestion'](_0x2335bb,_0x2b1cd4,_0x4fef6d,_0x304e77);switch(this['_checkSuggestionCorrectness'](_0x3a1865,_0x2335bb,_0x2b1cd4,_0x304e77),this['_suggestionState']['get'](_0x3a1865)){case'notReady':this['_getSuggestionData'](_0x4fef6d)['then'](_0x2df37d=>{let _0x5ac452=Promise['resolve']();_0x2df37d['hasComments']&&(_0x5ac452=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x4fef6d})),_0x5ac452['then'](()=>{this['addSuggestionData'](_0x2df37d)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x3a1865,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x4fef6d,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x3a1865,'ready'),this['fire']('suggestionLoaded',_0x3a1865);break;case'ready':this['fire']('suggestionChanged',_0x3a1865);}_0x3a1865['addMarkerName'](_0x5ca876),this['_refreshSuggestionsChain'](_0x3a1865);}['_refreshSuggestionsChain'](_0x518ab6){if(_0x518ab6['isMultiRange'])return;let _0x3063a0=!0x0,_0x4c0c5c=!0x0;for(const _0x289841 of this['getSuggestions']()){if(_0x289841['isMultiRange'])continue;if(_0x289841==_0x518ab6||!_0x289841['isInContent'])continue;if(_0x289841['author']['id']!=_0x518ab6['author']['id'])continue;const _0x506b69=this['_suggestionFactory']['getSuggestionCallback'](_0x518ab6['type'],_0x518ab6['subType'],'chain'),_0x5d8b3d=this['_suggestionFactory']['getSuggestionCallback'](_0x289841['type'],_0x289841['subType'],'chain'),_0x2c18fa=_0x506b69(_0x518ab6,_0x289841),_0xa6005=_0x5d8b3d(_0x518ab6,_0x289841);_0x2c18fa&&_0xa6005&&(_0x2c18fa[0x1]['commentThread']&&_0x2c18fa[0x1]['commentThread']['length']||(_0x2c18fa[0x0]['next']=_0x2c18fa[0x1],_0x2c18fa[0x1]['previous']=_0x2c18fa[0x0],_0x2c18fa[0x0]==_0x518ab6?_0x4c0c5c=!0x1:_0x3063a0=!0x1));}_0x518ab6['previous']&&_0x3063a0&&(_0x518ab6['previous']['next']=null,_0x518ab6['previous']=null),_0x518ab6['next']&&_0x4c0c5c&&(_0x518ab6['next']['previous']=null,_0x518ab6['next']=null);}['_joinWithAdjacentSuggestions'](_0x353140){for(const _0x3df973 of this['_suggestions']['values']()){if(_0x3df973==_0x353140||!_0x3df973['isInContent'])continue;if(_0x3df973['type']!=_0x353140['type']||_0x3df973['author']['id']!=_0x353140['author']['id']||_0x3df973['subType']!=_0x353140['subType'])continue;const _0x3cc645=this['_suggestionFactory']['getSuggestionCallback'](_0x353140['type'],_0x353140['subType'],'join');if(_0x3cc645(_0x3df973['getRanges'](),_0x353140['getRanges']())){if(_0x353140['commentThread']&&_0x353140['commentThread']['length'])continue;return this['_joinSuggestions'](_0x3df973,_0x353140),!0x0;}if(_0x3cc645(_0x353140['getRanges'](),_0x3df973['getRanges']())){if(_0x3df973['commentThread']&&_0x3df973['commentThread']['length'])continue;return this['_joinSuggestions'](_0x353140,_0x3df973),!0x0;}}return!0x1;}['_joinSuggestions'](_0x3b290b,_0x2da451){if(_0x3b290b['isMultiRange'])for(const _0x29dc7a of _0x2da451['getRanges']())_0x3b290b['addRange'](_0x29dc7a);else{const _0x2f841c=_0x2da451['getFirstRange']()['end'];this['_setSuggestionRange'](_0x3b290b,this['_model']['createRange'](_0x3b290b['getFirstRange']()['start'],_0x2f841c));}_0x2da451['removeMarkers']();}}_0x3125d1(l,_0x541813);class yt{constructor(_0x482642){this['_editor']=_0x482642,this['_model']=_0x482642['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x1d58f8,_0x5cc0be,_0x334de9,_0x2d2480,_0x22cde6){return new _0x78f430(this['_model'],{'type':_0x1d58f8,'subType':_0x5cc0be,'id':_0x334de9,'author':_0x2d2480,'onAttributesChange':_0x22cde6,'onAccept':(..._0x2b64fe)=>this['getSuggestionCallback'](_0x1d58f8,_0x5cc0be,'accept')(..._0x2b64fe),'onDiscard':(..._0x5bc4a5)=>this['getSuggestionCallback'](_0x1d58f8,_0x5cc0be,'discard')(..._0x5bc4a5)});}['registerCustomCallback'](_0x472205,_0x84e287,_0x4ae0c8,_0x587c79){const _0x5d9423=_0x472205+':'+_0x84e287+':'+_0x4ae0c8;this['_customCallbacks']['set'](_0x5d9423,_0x587c79);}['getSuggestionCallback'](_0x3eea68,_0x291768,_0x364bd3){const _0x4b398d=_0x3eea68+':'+_0x291768+':'+_0x364bd3;return this['_customCallbacks']['get'](_0x4b398d)||this['_defaultCallbacks']['get'](_0x3eea68+':'+_0x364bd3);}['_registerDefaultCallbacks'](){const _0x53ad07=()=>{},_0x2a49b1=_0x4ef354=>{_0x4ef354['sort']((_0x4290bd,_0x4fee09)=>_0x4290bd['start']['isBefore'](_0x4fee09['start'])?0x1:-0x1),this['_model']['change'](_0x14a700=>{for(const _0x162113 of _0x4ef354){let _0x4000d6;_0x4000d6=_0x162113['end']['isAtEnd']&&_0x162113['end']['parent']==_0x162113['start']['nodeAfter']?_0x14a700['createSelection'](_0x162113['start']['nodeAfter'],'on'):_0x14a700['createSelection'](_0x162113),this['_model']['deleteContent'](_0x4000d6,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x44ed34=(_0x1dd0ef,_0xcaa78f)=>{this['_model']['change'](_0x53a4a0=>{const {commandName:_0x4c3a64,commandParams:_0x505e73=[]}=_0xcaa78f,_0x40c61c=_0x1dd0ef[0x0];if('$graveyard'==_0x40c61c['root']['rootName'])return;const _0xa87fa4=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x3ae844=>_0x2cc107['fromRange'](_0x3ae844));bt(_0x40c61c)?_0x53a4a0['setSelection'](this['_model']['createRange'](_0x40c61c['end'])):_0x53a4a0['setSelection'](_0x40c61c);for(const _0xa12f85 of this['_editor']['commands']['commands']())_0xa12f85['refresh']();_0x505e73['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x4c3a64,..._0x505e73);const _0xafbc9b=_0xa87fa4['filter'](_0x137e48=>'$graveyard'!=_0x137e48['root']['rootName']);_0xafbc9b['length']>0x0&&_0x53a4a0['setSelection'](_0xafbc9b);for(const _0x3b1376 of _0xa87fa4)_0x3b1376['detach']();});},_0x449634=(_0x406c1b,_0x287333)=>0x1==_0x406c1b['length']&&0x1==_0x287333['length']&&_0x406c1b[0x0]['end']['isEqual'](_0x287333[0x0]['start']),_0x8161ab=(_0x284e79,_0x16bf2a)=>_t(_0x284e79,_0x16bf2a,this['_model'])?[_0x284e79,_0x16bf2a]:_t(_0x16bf2a,_0x284e79,this['_model'])?[_0x16bf2a,_0x284e79]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x53ad07),this['_defaultCallbacks']['set']('insertion:discard',_0x2a49b1),this['_defaultCallbacks']['set']('insertion:join',_0x449634),this['_defaultCallbacks']['set']('insertion:chain',_0x8161ab),this['_defaultCallbacks']['set']('deletion:accept',_0x2a49b1),this['_defaultCallbacks']['set']('deletion:discard',_0x53ad07),this['_defaultCallbacks']['set']('deletion:join',_0x449634),this['_defaultCallbacks']['set']('deletion:chain',_0x8161ab),this['_defaultCallbacks']['set']('formatInline:accept',_0x44ed34),this['_defaultCallbacks']['set']('formatInline:discard',_0x53ad07),this['_defaultCallbacks']['set']('formatInline:join',_0x449634),this['_defaultCallbacks']['set']('formatInline:chain',_0x53ad07),this['_defaultCallbacks']['set']('formatBlock:accept',_0x44ed34),this['_defaultCallbacks']['set']('formatBlock:discard',_0x53ad07),this['_defaultCallbacks']['set']('formatBlock:join',_0x449634),this['_defaultCallbacks']['set']('formatBlock:chain',_0x53ad07);}}function St(_0x5df125,_0x2f3b3a,_0xda78ee){for(const _0x595dc9 of _0x2f3b3a['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x595dc9['root']==_0x595dc9)return!0x1;if(!_0xda78ee['containsItem'](_0x595dc9))return!0x1;if(_0x5df125['isObject'](_0x595dc9)||_0x5df125['isLimit'](_0x595dc9))return!0x0;}}function bt(_0x1f522c){return _0x1f522c['end']['parent']==_0x1f522c['start']['nodeAfter']&&_0x1f522c['end']['isAtStart'];}function It(_0x3b13bc,_0x4d6505,_0x31b2c5,_0x4a74be){const _0x404d38=_0x5cec96=>!_0x5cec96['item']['is']('textProxy')&&!_0x4a74be['isObject'](_0x5cec96['item']),_0x1837fb=_0x3b13bc['start']['getLastMatchingPosition'](_0x404d38),_0x3a1f3b=_0x3b13bc['end']['getLastMatchingPosition'](_0x404d38,{'direction':'backward'});return(!_0x3b13bc['start']['isEqual'](_0x1837fb)||!_0x3b13bc['end']['isEqual'](_0x3a1f3b))&&(_0x1837fb['isBefore'](_0x3a1f3b)?_0x31b2c5['updateMarker'](_0x4d6505,{'range':_0x31b2c5['createRange'](_0x1837fb,_0x3a1f3b)}):_0x31b2c5['removeMarker'](_0x4d6505),!0x0);}function vt(_0x2e6088){return kt(_0x2e6088);}function Dt(_0x1158af){const _0x33dcaf=_0x1158af['start']['nodeAfter'];return _0x33dcaf&&_0x33dcaf['is']('element');}function At(_0x66b8bd,_0x5c39c1){const _0x5b8747=_0x5c39c1['schema']['isObject'](_0x66b8bd)||_0x5c39c1['schema']['isSelectable'](_0x66b8bd);return _0x5c39c1['createRange'](_0x5c39c1['createPositionAt'](_0x66b8bd,'before'),_0x5b8747?_0x5c39c1['createPositionAfter'](_0x66b8bd):_0x5c39c1['createPositionAt'](_0x66b8bd,'end'));}function _t(_0x539fd1,_0x3b5bee,_0x389d7f){const _0x556a84=_0x539fd1['getFirstRange'](),_0xc67f33=_0x3b5bee['getFirstRange']();if(_0x556a84['end']['isEqual'](_0xc67f33['start']))return!0x0;if(_0x539fd1['type']!=_0x3b5bee['type'])return!0x1;if(!_0x556a84['end']['isTouching'](_0xc67f33['start']))return!0x1;const _0x4c09a4=_0x389d7f['createRange'](_0x556a84['end'],_0xc67f33['start'])['getWalker']();for(const _0x3215a6 of _0x4c09a4)if(['elementStart','elementEnd']['includes'](_0x3215a6['type'])&&_0x389d7f['schema']['isLimit'](_0x3215a6['item']))return!0x1;return!0x0;}
23
+ import{Plugin as _0x4e0000,PendingActions as _0x3c3602}from'ckeditor5/src/core';import _0x251daf from'@ckeditor/ckeditor5-collaboration-core/src/users';import{LiveRange as _0x154f74}from'ckeditor5/src/engine';import{CKEditorError as _0x1c5beb,uid as _0x4cceaa,priorities as _0x108da1,EmitterMixin as _0x33eb69,mix as _0x3dcd07}from'ckeditor5/src/utils';import _0x1a3358 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x236a8e from'./commands/trackchangescommand';import _0x466d11 from'./commands/acceptsuggestioncommand';import _0x204479 from'./commands/discardsuggestioncommand';import _0x3c9cb3 from'./commands/acceptallsuggestionscommand';import _0x52dc9c from'./commands/acceptselectedsuggestionscommand';import _0x16307a from'./commands/discardallsuggestionscommand';import _0x44e487 from'./commands/discardselectedsuggestionscommand';import _0x2d73ff from'./suggestion';import _0x5376c8 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x52d558 from'./integrations/alignment';import _0x588f2a from'./integrations/basicstyles';import _0x594ad6 from'./integrations/blockquote';import _0x1ef43d from'./integrations/codeblock';import _0x43c045 from'./integrations/comments';import _0x4b8eb2 from'./integrations/deletecommand';import _0x953e84 from'./integrations/entercommand';import _0x4ded0c from'./integrations/font';import _0x3b93aa from'./integrations/heading';import _0x3e5215 from'./integrations/highlight';import _0x24bba9 from'./integrations/horizontalline';import _0x4c912c from'./integrations/image';import _0x5b9871 from'./integrations/indent';import _0x5f421b from'./integrations/inputcommand';import _0x45376b from'./integrations/link';import tt from'./integrations/list';import it from'./integrations/mediaembed';import st from'./integrations/mention';import nt from'./integrations/pagebreak';import et from'./integrations/paragraph';import ot from'./integrations/removeformat';import rt from'./integrations/restrictededitingmode';import at from'./integrations/shiftentercommand';import ct from'./integrations/standardeditingmode';import ht from'./integrations/table';import ut from'./integrations/tablemergesplit';import ft from'./integrations/tableheadings';import gt from'./integrations/tableclipboard';import lt from'./integrations/title';import dt from'./integrations/undo';import mt from'./utils/hashobject.js';import{toWidget as pt}from'ckeditor5/src/widget';export default class l extends _0x4e0000{static get['requires'](){return[_0x251daf,_0x3c3602,_0x1a3358,_0x52d558,_0x588f2a,_0x594ad6,_0x1ef43d,_0x43c045,_0x4b8eb2,_0x953e84,_0x4ded0c,_0x3b93aa,_0x3e5215,_0x24bba9,_0x4c912c,_0x5b9871,_0x5f421b,_0x45376b,tt,it,st,nt,et,ot,rt,at,ct,ht,ut,ft,gt,lt,dt];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x2cfdad){function _0x53b160(_0x9cd7be){return _0x9cd7be['map'](_0x10249c=>String['fromCharCode'](_0x10249c))['join']('');}super(_0x2cfdad),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x20e97a,_0x37a8ba,_0x5733e9,_0x2a5492)=>{this['_model']['change'](_0x3a5e5a=>{for(const _0x14a535 of[..._0x2a5492,..._0x5733e9])this['_model']['markers']['has'](_0x14a535)&&_0x3a5e5a['updateMarker'](_0x14a535);});}),this['_descriptionFactory']=new _0x5376c8(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new kt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x2cfdad['plugins']['get'](_0x1a3358),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x53b160([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x53b160([0x34,0x30,0x34,0x32,0x32,0x30,0x35,0x32]);}['init'](){const _0x1b2646=this['editor'];_0x1b2646['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x48d773=>{const {id:_0x30aab4,type:_0x3ae6cd}=this['_splitMarkerName'](_0x48d773['markerName']),_0xcc82e5=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3ae6cd];let _0x156c1a=0xbb8;return this['activeMarkers']['includes'](_0x48d773['markerName'])&&(_0xcc82e5['push']('ck-suggestion-marker--active'),_0x156c1a=0xbc2),'deletion'==_0x3ae6cd&&(_0x156c1a+=0x5),{'classes':_0xcc82e5,'attributes':{'data-suggestion':_0x30aab4},'priority':_0x156c1a};}}),_0x1b2646['conversion']['for']('dataDowncast')['add'](_0x4ebbee=>{_0x4ebbee['on']('addMarker:suggestion',(_0x50d9b8,_0x4afd5a,_0x1f147c)=>{if(!_0x1f147c['options']['showSuggestionHighlights'])return;const _0x1a0515=_0x4afd5a['item'];if(!_0x1a0515)return;const _0x3ff260=_0x1f147c['mapper']['toViewElement'](_0x1a0515);_0x1b2646['model']['schema']['isObject'](_0x1a0515)&&_0x3ff260&&!_0x3ff260['getCustomProperty']('widget')&&_0x3ff260['is']('containerElement')&&pt(_0x3ff260,_0x1f147c['writer']);},{'priority':'high'});}),_0x1b2646['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x546c75,_0x1e4a0c)=>{if(!_0x1e4a0c['options']['showSuggestionHighlights'])return null;const {type:_0x103427}=this['_splitMarkerName'](_0x546c75['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0x103427],'priority':0xbb8};}});const _0x2393d2=({showActiveMarkers:_0xd7d9f5=!0x0}={})=>(_0x3c70bc,_0x2175b3,_0x399533)=>{if(!_0x2175b3['item'])return;if(_0x2175b3['item']['is']('selection'))return void _0x399533['consumable']['consume'](_0x2175b3['item'],_0x3c70bc['name']);const _0x323a48=_0x399533['mapper']['toViewElement'](_0x2175b3['item']);if(!(_0x2175b3['item']['is']('element')&&_0x1b2646['model']['schema']['isBlock'](_0x2175b3['item'])&&!_0x323a48['getCustomProperty']('addHighlight')))return;const {id:_0x16f944}=this['_splitMarkerName'](_0x2175b3['markerName']);_0x399533['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x323a48),_0x399533['writer']['setAttribute']('data-suggestion',_0x16f944,_0x323a48),_0x399533['mapper']['bindElementToMarker'](_0x323a48,_0x2175b3['markerName']),_0xd7d9f5&&(this['activeMarkers']['includes'](_0x2175b3['markerName'])?_0x399533['writer']['addClass']('ck-suggestion-marker--active',_0x323a48):_0x399533['writer']['removeClass']('ck-suggestion-marker--active',_0x323a48));for(const _0x3e7041 of _0x1b2646['model']['createRangeIn'](_0x2175b3['item'])['getItems']())_0x399533['consumable']['consume'](_0x3e7041,_0x3c70bc['name']);_0x399533['consumable']['consume'](_0x2175b3['item'],_0x3c70bc['name']);};_0x1b2646['conversion']['for']('dataDowncast')['add'](_0x3b6742=>{_0x3b6742['on']('addMarker:suggestion:formatBlock',(_0x11b07,_0x39560d,_0x4acab9)=>{_0x4acab9['options']['showSuggestionHighlights']&&_0x2393d2({'showActiveMarkers':!0x1})(_0x11b07,_0x39560d,_0x4acab9);},{'priority':'highest'});}),_0x1b2646['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x86f7e9,_0x501e47)=>_0x501e47['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x86f7e9['substr']('suggestion'['length']+0x1)}}),_0x1b2646['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x544b31,{writer:_0x4bb077})=>{let _0x20f08a='suggestion:'+_0x544b31['getAttribute']('suggestion-type')+':'+_0x544b31['getAttribute']('id');return _0x544b31['getAttribute']('marker-count')&&(_0x20f08a+=':'+_0x544b31['getAttribute']('marker-count')),_0x4bb077['createElement']('$marker',{'data-name':_0x20f08a});}}),_0x1b2646['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x1b2646['conversion']['for']('editingDowncast')['add'](_0x28fc9c=>{_0x28fc9c['on']('addMarker:suggestion:formatBlock',_0x2393d2(),{'priority':'high'});}),_0x1b2646['conversion']['for']('editingDowncast')['add'](_0x20daf5=>{_0x20daf5['on']('removeMarker:suggestion:formatBlock',(_0x37c127,_0x43c34d,_0x5df382)=>{const _0x580076=_0x5df382['mapper']['markerNameToElements'](_0x43c34d['markerName']);if(_0x580076)for(const _0x26ea53 of _0x580076)_0x26ea53['getCustomProperty']('addHighlight')||(_0x5df382['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x26ea53),_0x5df382['writer']['removeAttribute']('data-suggestion',_0x26ea53),_0x5df382['mapper']['unbindElementFromMarkerName'](_0x26ea53,_0x43c34d['markerName']));},{'priority':'high'});}),_0x1b2646['model']['document']['registerPostFixer'](_0x3992f6=>{let _0x4620d7=!0x1;const _0x46cc6b=Array['from'](_0x1b2646['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x3aa5aa,data:_0x156d14}of _0x46cc6b){const {group:_0x3953da,type:_0x5f145e,id:_0x425e12}=this['_splitMarkerName'](_0x3aa5aa);if('suggestion'!==_0x3953da)continue;const _0x1f11fb=this['_suggestions']['get'](_0x425e12);if(null!=_0x156d14['newRange']){'formatInline'==_0x5f145e&&(_0x4620d7=_0x4620d7||St(_0x156d14['newRange'],_0x3aa5aa,_0x3992f6,_0x1b2646['model']['schema']));if(_0x156d14['newRange']['isCollapsed']||'$graveyard'==_0x156d14['newRange']['root']['rootName']||'formatBlock'==_0x5f145e&&!It(_0x156d14['newRange'])||'deletion'==_0x5f145e&&!(!yt(_0xfdadd2=_0x156d14['newRange'])&&!function(_0x44ce72){return _0x44ce72['start']['parent']==_0x44ce72['end']['nodeBefore']&&_0x44ce72['start']['isAtEnd'];}(_0xfdadd2)))_0x3992f6['removeMarker'](_0x3aa5aa),_0x4620d7=!0x0;else{if(!_0x1f11fb||!_0x1f11fb['isInContent'])continue;_0x4620d7=!!this['_joinWithAdjacentSuggestions'](_0x1f11fb)||_0x4620d7;}}}var _0xfdadd2;return _0x4620d7;}),_0x1b2646['model']['document']['registerPostFixer'](_0x3b891e=>{let _0x598fd1=!0x1;for(const _0x3ddc1e of _0x1b2646['model']['document']['differ']['getChanges']()){if('insert'!=_0x3ddc1e['type'])continue;const _0x306726=_0x3ddc1e['position']['getShiftedBy'](_0x3ddc1e['length']);if(_0x306726['isAtEnd'])for(const _0x10e571 of this['_suggestions']['values']()){if(_0x10e571['isMultiRange']||!_0x10e571['isInContent'])continue;if('formatBlock'!=_0x10e571['type'])continue;const _0x802ec6=_0x10e571['getFirstRange']();if(_0x802ec6['start']['parent']!=_0x802ec6['end']['parent']&&_0x802ec6['end']['isEqual'](_0x3ddc1e['position'])){const _0x382c33=_0x1b2646['model']['createRange'](_0x802ec6['start'],_0x306726);_0x3b891e['updateMarker'](_0x10e571['getFirstMarker'](),{'range':_0x382c33}),_0x598fd1=!0x0;}}}return _0x598fd1;}),_0x1b2646['model']['markers']['on']('update:suggestion',(_0x40a0a5,_0x5cbf39,_0x40f481)=>{if(null==_0x40f481){const {id:_0x3b8da3}=this['_splitMarkerName'](_0x5cbf39['name']),_0x5ec7d3=this['_suggestions']['get'](_0x3b8da3);_0x5ec7d3&&_0x5ec7d3['addMarkerName'](_0x5cbf39['name']);}}),_0x1b2646['model']['document']['on']('change:data',()=>{const _0x2d46b6=Array['from'](_0x1b2646['model']['document']['differ']['getChangedMarkers']());_0x2d46b6['sort']((_0xe8e66a,_0x38b51f)=>{const _0xac8d49=_0xe8e66a['data']['oldRange'],_0x27533c=_0x38b51f['data']['oldRange'];return null===_0xac8d49&&null===_0x27533c?0x0:null===_0xac8d49&&null!==_0x27533c?-0x1:null!==_0xac8d49&&null===_0x27533c?0x1:_0xac8d49['start']['isBefore'](_0x27533c['start'])?-0x1:0x1;});const _0x4aee4a=new Set();for(const {name:_0x396ac9,data:_0x5f90fe}of _0x2d46b6){const {group:_0x5d028e,id:_0x95247f}=this['_splitMarkerName'](_0x396ac9);if('suggestion'===_0x5d028e&&(null===_0x5f90fe['oldRange']&&this['_handleNewSuggestionMarker'](_0x396ac9),null===_0x5f90fe['newRange'])){const _0x8ca4ea=this['_suggestions']['get'](_0x95247f);_0x8ca4ea['isInContent']?_0x4aee4a['add'](_0x8ca4ea):this['_removeSuggestion'](_0x8ca4ea);}}for(const {name:_0x4ffeec,data:_0x4c7e61}of _0x2d46b6){const {group:_0x1b0d41,id:_0x57fba3}=this['_splitMarkerName'](_0x4ffeec);if('suggestion'!==_0x1b0d41)continue;const _0x3ecb6e=this['_suggestions']['get'](_0x57fba3);null!=_0x4c7e61['newRange']&&null!=_0x4c7e61['oldRange']&&(this['_refreshSuggestionsChain'](_0x3ecb6e),_0x4aee4a['add'](_0x3ecb6e['head']));}for(const _0x1246dc of _0x4aee4a)this['fire']('suggestionChanged',_0x1246dc);_0x4aee4a['clear']();}),_0x1b2646['model']['on']('applyOperation',(_0x2082e5,_0x4c68d5)=>{const _0x3a4ba0=_0x4c68d5[0x0];if(!this['_suggestions']['size'])return;if(!_0x3a4ba0['isDocumentOperation'])return;if('transparent'==_0x3a4ba0['batch']['type'])return;let _0x1ae9db,_0x20ee82;switch(_0x3a4ba0['type']){case'insert':_0x1ae9db=_0x1b2646['model']['createPositionAt'](_0x3a4ba0['position']),_0x20ee82=_0x1ae9db['getShiftedBy'](_0x3a4ba0['howMany']);break;case'split':_0x1ae9db=_0x1b2646['model']['createPositionAt'](_0x3a4ba0['splitPosition']),_0x20ee82=_0x1b2646['model']['createPositionAt'](_0x3a4ba0['moveTargetPosition']);break;case'move':_0x1ae9db=_0x1b2646['model']['createPositionAt'](_0x3a4ba0['targetPosition']),_0x20ee82=_0x1ae9db['getShiftedBy'](_0x3a4ba0['howMany']);break;default:return;}const _0x6888e9=_0x1b2646['model']['createRange'](_0x1ae9db,_0x20ee82);_0x1b2646['model']['change'](()=>{for(const {suggestion:_0x395b9c,meta:_0x3357f6}of this['_findSuggestions'](_0x6888e9)){if(_0x395b9c['isMultiRange'])continue;if('formatInline'==_0x395b9c['type'])continue;const _0x176492=_0x395b9c['data']&&_0x395b9c['data']['multipleBlocks'];('formatBlock'!=_0x395b9c['type']||'split'==_0x3a4ba0['type']&&!_0x176492)&&(_0x3357f6['containsRangeInObject']||'insertion'==_0x395b9c['type']&&_0x3357f6['isOwn']||_0x395b9c['getFirstRange']()['containsRange'](_0x6888e9)&&this['_breakSuggestionMarker'](_0x395b9c,_0x1ae9db,_0x20ee82));}});},{'priority':'lowest'}),_0x1b2646['model']['on']('deleteContent',(_0x409d74,_0x3f6f31)=>{const _0x19d0b6=_0x3f6f31[0x0],_0x20ac64=_0x3f6f31[0x1];if(_0x20ac64&&_0x20ac64['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x19d0b6['isCollapsed'])return;const _0x131ea7=_0x1b2646['model']['schema'],{start:_0x38763d,end:_0x5ac5d7}=_0x19d0b6['getFirstRange'](),_0x3446a4=_0x38763d['nodeAfter']&&_0x131ea7['isObject'](_0x38763d['nodeAfter'])?null:_0x131ea7['getNearestSelectionRange'](_0x38763d,'forward'),_0x7fdf4=_0x5ac5d7['nodeBefore']&&_0x131ea7['isObject'](_0x5ac5d7['nodeBefore'])?null:_0x131ea7['getNearestSelectionRange'](_0x5ac5d7,'backward'),_0x18d8f1=_0x1b2646['model']['createRange'](_0x3446a4?_0x3446a4['start']:_0x38763d,_0x7fdf4?_0x7fdf4['end']:_0x5ac5d7);_0x1b2646['model']['change'](_0x53ee5d=>{this['markDeletion'](_0x18d8f1);const _0x53bca5=_0x1b2646['model']['schema']['getNearestSelectionRange'](_0x18d8f1['start']);_0x19d0b6['is']('documentSelection')?_0x53ee5d['setSelection'](_0x53bca5):_0x19d0b6['setTo'](_0x53bca5);}),_0x409d74['stop']();},{'priority':_0x108da1['normal']+0xa}),_0x1b2646['model']['on']('insertContent',(_0x287dd7,_0x32b8cb)=>{const _0x5e3422=_0x32b8cb[_0x32b8cb['length']-0x1];_0x5e3422&&_0x5e3422['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x1b2646['model']['change'](()=>{let _0x45f75e=_0x1b2646['model']['insertContent'](_0x32b8cb[0x0],_0x32b8cb[0x1],_0x32b8cb[0x2],_0x32b8cb[0x3],{'forceDefaultExecution':!0x0});if(!_0x45f75e)return;_0x287dd7['return']=_0x45f75e['clone']();const _0x2e2da9=_0x45f75e['end']['nodeBefore'],_0x1c6b23=_0x1b2646['model']['schema'];_0x2e2da9&&_0x1c6b23['isBlock'](_0x2e2da9)&&!_0x1c6b23['isObject'](_0x2e2da9)&&(_0x45f75e=_0x1b2646['model']['createRange'](_0x45f75e['start'],_0x1b2646['model']['createPositionAt'](_0x2e2da9,'end'))),this['markInsertion'](_0x45f75e);}),_0x287dd7['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x236a8e(_0x1b2646,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x4afe98=new _0x466d11(_0x1b2646,this['_suggestions']);_0x1b2646['commands']['add']('acceptSuggestion',_0x4afe98),this['enableCommand']('acceptSuggestion');const _0x56aff9=new _0x204479(_0x1b2646,this['_suggestions']);_0x1b2646['commands']['add']('discardSuggestion',_0x56aff9),this['enableCommand']('discardSuggestion'),_0x1b2646['commands']['add']('acceptAllSuggestions',new _0x3c9cb3(_0x1b2646,_0x4afe98,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x1b2646['commands']['add']('discardAllSuggestions',new _0x16307a(_0x1b2646,_0x56aff9,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x1b2646['commands']['add']('acceptSelectedSuggestions',new _0x52dc9c(_0x1b2646,_0x4afe98,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x1b2646['commands']['add']('discardSelectedSuggestions',new _0x44e487(_0x1b2646,_0x56aff9,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x11d731=_0x1b2646['plugins']['get'](_0x1a3358);this['listenTo'](_0x11d731,'addComment',(_0x305f97,{threadId:_0xf23708})=>{const _0x2acaa3=this['_suggestions']['get'](_0xf23708);_0x2acaa3&&_0x2acaa3['commentThread']&&0x1===_0x2acaa3['commentThread']['length']&&this['_updateSuggestionData'](_0xf23708,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x11d731,'removeComment',(_0xbccf3e,{threadId:_0x1dad13})=>{const _0x40192e=this['_suggestions']['get'](_0x1dad13);_0x40192e&&_0x40192e['commentThread']&&!_0x40192e['commentThread']['length']&&this['_updateSuggestionData'](_0x1dad13,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x36c2b4){if(this['_adapter'])throw new _0x1c5beb('track-changes-adapter-already-set',this);this['_adapter']=_0x36c2b4;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x39f337=!0x1,toJSON:_0x45306a=!0x1}={}){const _0x1cef69=[];for(const _0x2e6d70 of this['_suggestions']['values']())_0x39f337&&!_0x2e6d70['isInContent']||_0x1cef69['push'](_0x2e6d70);return _0x45306a?_0x1cef69['map'](_0x1caed7=>_0x1caed7['toJSON']()):_0x1cef69;}['getSuggestion'](_0x575752){const _0x47a7bd=this['_suggestions']['get'](_0x575752);if(!_0x47a7bd)throw new _0x1c5beb('track-changes-suggestion-not-found',this);return _0x47a7bd;}['hasSuggestion'](_0x42de79){return this['_suggestions']['has'](_0x42de79);}['addSuggestionData'](_0x587748){const {id:_0x4d86ad,authorId:_0x4e7ed8}=_0x587748,[_0x30290a,_0xa8e5b6]=_0x587748['type']['split'](':'),_0x4233a2=this['_suggestions']['get'](_0x4d86ad)||this['_createSuggestion'](_0x30290a,_0xa8e5b6,_0x4d86ad,_0x4e7ed8);switch(this['_addThreadToSuggestion'](_0x4233a2),this['_checkSuggestionCorrectness'](_0x4233a2,_0x30290a,_0xa8e5b6||null,_0x4e7ed8),_0x4233a2['createdAt']=_0x587748['createdAt'],_0x587748['data']&&(_0x4233a2['data']=_0x587748['data']),_0x587748['attributes']&&(_0x4233a2['attributes']=_0x587748['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x4233a2['_saved']=!0x0),this['_suggestionState']['get'](_0x4233a2)){case'notReady':this['_suggestionState']['set'](_0x4233a2,'dataReady');break;case'markerReady':_0x4233a2['isInContent']?(this['_suggestionState']['set'](_0x4233a2,'ready'),this['fire']('suggestionLoaded',_0x4233a2)):this['_suggestionState']['set'](_0x4233a2,'removed');}return _0x4233a2;}['acceptSuggestion'](_0xd1fb6){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x19daa3 of _0xd1fb6['getAllAdjacentSuggestions']())_0x19daa3['accept']();});});}['discardSuggestion'](_0x1bbb55){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x2e1192 of _0x1bbb55['getAllAdjacentSuggestions']())_0x2e1192['discard']();});});}['enableCommand'](_0x47ea69,_0x27d33d){const _0x1cccac=this['editor']['commands']['get'](_0x47ea69);if(!_0x1cccac)throw new _0x1c5beb('track-changes-command-not-found',this,{'commandName':_0x47ea69});this['_enabledCommands']['add'](_0x1cccac),_0x27d33d&&_0x1cccac['on']('execute',(_0x381e41,_0x2ce6ec)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x2ce6ec['length']>0x0&&_0x2ce6ec[_0x2ce6ec['length']-0x1]&&_0x2ce6ec[_0x2ce6ec['length']-0x1]['forceDefaultExecution']||(_0x27d33d((..._0x203b9a)=>_0x1cccac['execute'](..._0x203b9a,{'forceDefaultExecution':!0x0}),..._0x2ce6ec),_0x381e41['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x183af9){let _0x312f42,_0x56c5c5;const _0x46d474=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x312f42=_0x183af9();}catch(_0x4d2dfc){_0x56c5c5=_0x4d2dfc;}return _0x46d474||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x56c5c5&&_0x1c5beb['rethrowUnexpectedError'](_0x56c5c5,this),_0x312f42;}['markInsertion'](_0x54aec4,_0x5a94cd=null,_0x4f542f={}){if(_0x54aec4['isCollapsed'])return null;const _0x3c8581=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x1560e0,meta:_0x934bf9}of this['_findSuggestions'](_0x54aec4,'insertion'))if(_0x934bf9['isOwn']){if(!_0x934bf9['isNextTo'])return _0x1560e0;if(_0x5a94cd==_0x1560e0['subType']){const _0xdbffe6=_0x1560e0['getFirstRange']();return _0xdbffe6['start']['isEqual'](_0x54aec4['end'])?this['_setSuggestionRange'](_0x1560e0,this['_model']['createRange'](_0x54aec4['start'],_0xdbffe6['end'])):this['_setSuggestionRange'](_0x1560e0,this['_model']['createRange'](_0xdbffe6['start'],_0x54aec4['end'])),_0x1560e0;}}const _0x2345e6=_0x4cceaa(),_0x2d0dfe=_0x3c8581['id'],_0x28c33e=_0x5a94cd?'insertion:'+_0x5a94cd:'insertion',_0x4c9842=this['_setSuggestionData']({'id':_0x2345e6,'type':_0x28c33e,'createdAt':new Date(),'authorId':_0x2d0dfe,'attributes':_0x4f542f});return this['_addSuggestionMarker'](_0x28c33e,_0x2345e6,_0x2d0dfe,_0x54aec4),_0x4c9842;}['markMultiRangeInsertion'](_0x2f30cf,_0xeb8363='multi',_0x164adb={}){const _0x153efe=this['editor']['plugins']['get']('Users')['me'],_0x20d674=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0xeb8363,'join');for(const _0x1da406 of this['getSuggestions']())if(_0x1da406['author']['id']==_0x153efe['id']&&'insertion'==_0x1da406['type']&&_0x1da406['subType']==_0xeb8363&&(_0x20d674(_0x1da406['getRanges'](),_0x2f30cf)||_0x20d674(_0x2f30cf,_0x1da406['getRanges']()))){for(const _0x103687 of _0x2f30cf)_0x1da406['addRange'](_0x103687);return _0x1da406;}for(const _0x163b7d of _0x2f30cf)for(const {suggestion:_0x56f4df,meta:_0x167094}of this['_findSuggestions'](_0x163b7d,'insertion')){if(!_0x167094['isOwn'])continue;let _0x1aa86e=!0x0;for(const _0x38c98a of _0x56f4df['getRanges']())for(const _0x4a7513 of _0x2f30cf)if(!_0x38c98a['containsRange'](_0x4a7513)){_0x1aa86e=!0x1;break;}if(_0x1aa86e)return _0x56f4df;}const _0x4e012e=_0x4cceaa(),_0x9cf015=_0x153efe['id'],_0x20b999='insertion:'+_0xeb8363,_0x267f62=this['_setSuggestionData']({'id':_0x4e012e,'type':_0x20b999,'createdAt':new Date(),'authorId':_0x9cf015,'attributes':_0x164adb});for(const _0x171b12 of _0x2f30cf)this['_addSuggestionMarker'](_0x20b999,_0x4e012e,_0x9cf015,_0x171b12,_0x2d73ff['getMultiRangeId']());return _0x267f62;}['markInlineFormat'](_0x4f597b,_0x4ae963,_0x2de5e6=null,_0x2f49ad={}){if(_0x2de5e6=_0x2de5e6||bt(_0x4ae963),_0x4f597b['isCollapsed'])return;const _0x15006f=this['editor']['plugins']['get']('Users')['me'],_0x463864=[];for(const {suggestion:_0x376416,meta:_0x1f452b}of this['_findSuggestions'](_0x4f597b,'insertion'))_0x1f452b['isOwn']&&!_0x1f452b['isInsideObject']&&_0x463864['push'](..._0x376416['getRanges']());const _0x41ac26=function(_0x53f662,_0x2e7949){const _0x640210=[];for(const _0x309761 of _0x2e7949){const _0x157eb0=_0x53f662['getIntersection'](_0x309761);_0x157eb0&&_0x640210['push'](_0x157eb0);}return _0x640210;}(_0x4f597b,_0x463864),_0x256c7d=function(_0x10c9d9,_0x4caaf8){const _0x4f4f95=[_0x10c9d9];for(const _0x5f0056 of _0x4caaf8){let _0x5c96a3=0x0;for(;_0x5c96a3<_0x4f4f95['length'];){const _0x27f02f=_0x4f4f95[_0x5c96a3]['getDifference'](_0x5f0056);_0x4f4f95['splice'](_0x5c96a3,0x1,..._0x27f02f),_0x5c96a3+=_0x27f02f['length'];}}return _0x4f4f95;}(_0x4f597b,_0x463864);_0x41ac26['length']&&this['_model']['change'](()=>{for(const _0x54a6c2 of _0x41ac26){const _0x178643=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x2de5e6,'accept');this['forceDefaultExecution'](()=>_0x178643([_0x54a6c2],_0x4ae963,_0x2f49ad));}});for(const _0x7f2148 of _0x256c7d){let _0x2754c1=null,_0x5acce4=_0x7f2148['start'],_0x5f43e1=_0x7f2148['end'];for(const {suggestion:_0x516db0,meta:_0x5525ef}of this['_findSuggestions'](_0x7f2148,'formatInline')){if(!_0x5525ef['isOwn'])continue;if(_0x516db0['subType']!=_0x2de5e6)continue;const _0x1bb2d9=_0x516db0['getFirstRange']();if(_0x1bb2d9['containsRange'](_0x7f2148,!0x0))return;_0x5acce4=_0x5acce4['isBefore'](_0x1bb2d9['start'])?_0x5acce4:_0x1bb2d9['start'],_0x5f43e1=_0x5f43e1['isAfter'](_0x1bb2d9['end'])?_0x5f43e1:_0x1bb2d9['end'],_0x2754c1?_0x1bb2d9['start']['isBefore'](_0x2754c1['getFirstRange']()['start'])?(_0x2754c1['removeMarkers'](),_0x2754c1=_0x516db0):_0x516db0['removeMarkers']():_0x2754c1=_0x516db0;}const _0x5ba737=this['_model']['createRange'](_0x5acce4,_0x5f43e1);if(_0x2754c1)this['_setSuggestionRange'](_0x2754c1,_0x5ba737);else{const _0x1008dd=_0x4cceaa(),_0x5d9cda=_0x15006f['id'];this['_setSuggestionData']({'id':_0x1008dd,'type':'formatInline:'+_0x2de5e6,'data':_0x4ae963,'createdAt':new Date(),'authorId':_0x5d9cda,'attributes':_0x2f49ad}),this['_addSuggestionMarker']('formatInline:'+_0x2de5e6,_0x1008dd,_0x5d9cda,_0x5ba737);}}}['markBlockFormat'](_0x3fa4d6,_0x2621d8,_0x258734=[],_0x50fa86=null,_0x2e7114={}){_0x2621d8['formatGroupId']||(_0x2621d8['formatGroupId']=_0x2621d8['commandName']),_0x2621d8['multipleBlocks']=_0x3fa4d6['is']('range'),_0x50fa86=_0x50fa86||bt(_0x2621d8);const _0x4636d7=_0x258734['map'](_0x1d73b8=>vt(_0x1d73b8,this['_model'])),_0x1ff110=_0x3fa4d6['is']('range')?_0x3fa4d6:vt(_0x3fa4d6,this['_model']);_0x4636d7['push'](_0x1ff110);let _0x539b3c=!0x0;for(const _0x46662e of _0x4636d7)if(!this['_rangeIsInLocalUserInsertion'](_0x46662e)){_0x539b3c=!0x1;break;}if(_0x539b3c){const _0x500473=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x50fa86,'accept');return void this['forceDefaultExecution'](()=>_0x500473([_0x1ff110],_0x2621d8,_0x2e7114));}let _0x3079e5=null,_0x4a8e52=_0x1ff110['start'],_0x9a07=_0x1ff110['end'];for(const {suggestion:_0x37d16c,meta:_0x26a67d}of this['_findSuggestions'](_0x1ff110,'formatBlock')){if(!_0x26a67d['isOwn']||_0x26a67d['isNextTo']||_0x26a67d['containsRangeInObject']||_0x26a67d['isInsideObject'])continue;if(_0x37d16c['data']['formatGroupId']!=_0x2621d8['formatGroupId'])continue;const _0x338894=_0x37d16c['getFirstRange']();if(_0x37d16c['subType']==_0x50fa86){if(_0x338894['containsRange'](_0x1ff110,!0x0))return;_0x4a8e52=_0x4a8e52['isBefore'](_0x338894['start'])?_0x4a8e52:_0x338894['start'],_0x9a07=_0x9a07['isAfter'](_0x338894['end'])?_0x9a07:_0x338894['end'],_0x3079e5?_0x338894['start']['isBefore'](_0x3079e5['getFirstRange']()['start'])?(_0x3079e5['removeMarkers'](),_0x3079e5=_0x37d16c):_0x37d16c['removeMarkers']():_0x3079e5=_0x37d16c;}else{const _0xef1fa7=_0x1ff110['getIntersection'](_0x338894);this['_cutOutSuggestionMarker'](_0x37d16c,_0xef1fa7);}}const _0x474443=this['editor']['plugins']['get']('Users')['me'],_0x50ec92=_0x4cceaa(),_0x4da813=_0x474443['id'];_0x3079e5?this['_setSuggestionRange'](_0x3079e5,this['_model']['createRange'](_0x4a8e52,_0x9a07)):(this['_setSuggestionData']({'id':_0x50ec92,'type':'formatBlock:'+_0x50fa86,'data':_0x2621d8,'createdAt':new Date(),'authorId':_0x4da813,'attributes':_0x2e7114}),this['_addSuggestionMarker']('formatBlock:'+_0x50fa86,_0x50ec92,_0x4da813,this['_model']['createRange'](_0x4a8e52,_0x9a07)));}['markMultiRangeBlockFormat'](_0x4e1acf,_0x3d565f,_0xae8471=[],_0x393ada=null,_0xaf0288={}){_0x3d565f['formatGroupId']||(_0x3d565f['formatGroupId']=_0x3d565f['commandName']),_0x3d565f['multipleBlocks']=!0x1,_0x393ada=_0x393ada||bt(_0x3d565f);const _0x3c2951=_0xae8471['map'](_0x310cb4=>vt(_0x310cb4,this['_model'])),_0x2510ae=_0x4e1acf['map'](_0x336801=>vt(_0x336801,this['_model']));_0x3c2951['push'](..._0x2510ae);let _0x3c5259=!0x0;for(const _0x360e42 of _0x3c2951)if(!this['_rangeIsInLocalUserInsertion'](_0x360e42)){_0x3c5259=!0x1;break;}if(_0x3c5259){const _0xad1872=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x393ada,'accept');return void this['forceDefaultExecution'](()=>_0xad1872(_0x2510ae,_0x3d565f,_0xaf0288));}const _0x1a5020=this['editor']['plugins']['get']('Users')['me'];for(const _0x5ad75a of this['getSuggestions']()){if(_0x5ad75a['author']['id']!=_0x1a5020['id'])continue;if('formatBlock'!=_0x5ad75a['type']||_0x5ad75a['data']['formatGroupId']!=_0x3d565f['formatGroupId'])continue;const _0x1120f3=_0x5ad75a['subType']==_0x393ada;for(let _0x13a3d3=0x0;_0x13a3d3<_0x2510ae['length'];_0x13a3d3++){const _0x381e70=_0x2510ae[_0x13a3d3];for(const _0x54aede of _0x5ad75a['getMarkers']()){const _0x5bfac0=_0x54aede['getRange']();if(_0x381e70['isEqual'](_0x5bfac0)){_0x1120f3?(_0x2510ae['splice'](_0x13a3d3,0x1),_0x13a3d3--):_0x5ad75a['removeMarker'](_0x54aede['name']);break;}}}}if(0x0==_0x2510ae['length'])return;const _0x39dcdc=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x393ada,'join');for(const _0x5c05b of this['getSuggestions']())if(_0x5c05b['author']['id']==_0x1a5020['id']&&'formatBlock'==_0x5c05b['type']&&_0x5c05b['data']['formatGroupId']==_0x3d565f['formatGroupId']&&_0x5c05b['subType']==_0x393ada&&(_0x39dcdc(_0x5c05b['getRanges'](),_0x2510ae)||_0x39dcdc(_0x2510ae,_0x5c05b['getRanges']()))){for(const _0x17246c of _0x2510ae)_0x5c05b['addRange'](_0x17246c);return _0x5c05b;}const _0x3285d8=_0x4cceaa(),_0x332498=_0x1a5020['id'],_0x35bc23='formatBlock:'+_0x393ada,_0xc967d2=this['_setSuggestionData']({'id':_0x3285d8,'type':_0x35bc23,'data':_0x3d565f,'createdAt':new Date(),'authorId':_0x332498,'attributes':_0xaf0288});for(const _0x110641 of _0x2510ae)this['_addSuggestionMarker'](_0x35bc23,_0x3285d8,_0x332498,_0x110641,_0x2d73ff['getMultiRangeId']());return _0xc967d2;}['markDeletion'](_0x4de8d5,_0x491656=null,_0x30a6e1={}){if(_0x4de8d5['isCollapsed'])return null;const _0x5be3bb=this['editor']['plugins']['get']('Users')['me'],_0x4101fd=new _0x154f74(_0x4de8d5['start'],_0x4de8d5['end']);for(const {suggestion:_0x27d952,meta:_0xf37687}of this['_findSuggestions'](_0x4101fd,'insertion'))if(_0xf37687['isOwn']&&!_0xf37687['isNextTo']){if(_0x27d952['isMultiRange']){const _0x343595=_0x27d952['getRanges']()['filter'](_0x3de30a=>'$graveyard'!=_0x3de30a['root']['rootName']);_0x343595['every'](_0x4f2ad4=>_0x4101fd['containsRange'](_0x4f2ad4,!0x0))&&_0x27d952['discard']();if(_0x343595['some'](_0xf115a8=>_0xf115a8['containsRange'](_0x4101fd,!0x0))){const _0x452252=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x491656,'accept');return this['forceDefaultExecution'](()=>_0x452252([_0x4101fd],null,_0x30a6e1)),null;}}else{const _0x462b95=_0x4101fd['getIntersection'](_0x27d952['getFirstRange']());_0x27d952['_onDiscard']([_0x462b95],null,_0x30a6e1);}}if(_0x4101fd['detach'](),_0x4101fd['isCollapsed']||'$graveyard'==_0x4101fd['root']['rootName'])return null;let _0x3330b2=null,_0x28ced1=_0x4101fd['start'],_0x4de2f8=_0x4101fd['end'];for(const {suggestion:_0x33b7c3,meta:_0x5d2d33}of this['_findSuggestions'](_0x4101fd,'deletion'))if(_0x5d2d33['isOwn']){if(_0x33b7c3['isMultiRange']){let _0x1bfee5=!0x0;for(const _0x56a3cd of _0x33b7c3['getRanges']()){if(_0x56a3cd['containsRange'](_0x4101fd,!0x0))return _0x33b7c3;_0x4101fd['containsRange'](_0x56a3cd)||(_0x1bfee5=!0x1);}_0x1bfee5&&_0x33b7c3['discard']();}else{const _0x16b597=_0x33b7c3['getFirstRange']();if(_0x16b597['containsRange'](_0x4101fd,!0x0))return _0x33b7c3;_0x28ced1=_0x28ced1['isBefore'](_0x16b597['start'])?_0x28ced1:_0x16b597['start'],_0x4de2f8=_0x4de2f8['isAfter'](_0x16b597['end'])?_0x4de2f8:_0x16b597['end'],_0x3330b2?_0x16b597['start']['isBefore'](_0x3330b2['getFirstRange']()['start'])?(_0x3330b2['removeMarkers'](),_0x3330b2=_0x33b7c3):_0x33b7c3['removeMarkers']():_0x3330b2=_0x33b7c3;}}if(_0x3330b2)return this['_setSuggestionRange'](_0x3330b2,this['_model']['createRange'](_0x28ced1,_0x4de2f8)),_0x3330b2;{const _0x2a9946=_0x4cceaa(),_0x8b08ec=this['_model']['createRange'](_0x28ced1,_0x4de2f8),_0x3ea1de=_0x5be3bb['id'],_0x3724da=_0x491656?'deletion:'+_0x491656:'deletion',_0x164c43=this['_setSuggestionData']({'id':_0x2a9946,'type':_0x3724da,'createdAt':new Date(),'authorId':_0x3ea1de,'attributes':_0x30a6e1});return this['_addSuggestionMarker'](_0x3724da,_0x2a9946,_0x3ea1de,_0x8b08ec),_0x164c43;}}['markMultiRangeDeletion'](_0x3e643e,_0x214f38='multi',_0x25e22d={}){const _0x20ecd9=this['editor']['plugins']['get']('Users')['me'],_0x27007a=_0x3e643e['map'](_0x494646=>new _0x154f74(_0x494646['start'],_0x494646['end'])),_0x4c990e=new Set();for(const _0x38e826 of _0x27007a)for(const {suggestion:_0xd8404a,meta:_0x548704}of this['_findSuggestions'](_0x38e826,'insertion'))_0x548704['isOwn']&&!_0x548704['isNextTo']&&_0x4c990e['add'](_0xd8404a);for(const _0x5cb5d3 of _0x4c990e)if(_0x5cb5d3['isMultiRange']){const _0x100af7=_0x5cb5d3['getRanges']();(!_0x5cb5d3['attributes']||!_0x5cb5d3['attributes']['skipNestingCheck'])&&(_0x100af7['every'](_0x4aa2c9=>_0x27007a['some'](_0x49e8b6=>_0x49e8b6['containsRange'](_0x4aa2c9,!0x0)))&&_0x5cb5d3['discard']());if(_0x27007a['every'](_0x6ce88b=>_0x100af7['some'](_0x4646f8=>_0x4646f8['containsRange'](_0x6ce88b,!0x0)))){const _0x1e7b01=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x214f38,'accept');return this['forceDefaultExecution'](()=>_0x1e7b01(_0x3e643e,null,_0x25e22d)),null;}}else{const _0x38b6d3=_0x5cb5d3['getFirstRange']();_0x27007a['some'](_0x4f9697=>_0x4f9697['containsRange'](_0x38b6d3,!0x0))&&_0x5cb5d3['discard']();if(_0x27007a['every'](_0x3cdfed=>_0x38b6d3['containsRange'](_0x3cdfed,!0x0))){const _0x37a751=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x214f38,'accept');return this['forceDefaultExecution'](()=>_0x37a751(_0x27007a,null,_0x25e22d)),null;}}const _0x2bc7cb=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x214f38,'join');let _0x7f0568=null;for(const _0x28ceca of this['getSuggestions']())if(_0x28ceca['author']['id']==_0x20ecd9['id']&&_0x28ceca['isInContent']&&'deletion'==_0x28ceca['type']&&_0x28ceca['subType']==_0x214f38&&(_0x2bc7cb(_0x28ceca['getRanges'](),_0x27007a)||_0x2bc7cb(_0x27007a,_0x28ceca['getRanges']()))){if(_0x7f0568){if(_0x28ceca['commentThread']&&_0x28ceca['commentThread']['length'])continue;for(const _0x865ceb of _0x28ceca['getRanges']())_0x7f0568['isIntersectingWithRange'](_0x865ceb)||_0x7f0568['addRange'](_0x865ceb);_0x28ceca['removeMarkers']();}else{_0x7f0568=_0x28ceca;for(const _0x2ab50f of _0x27007a)_0x28ceca['isIntersectingWithRange'](_0x2ab50f)||_0x28ceca['addRange'](_0x2ab50f);}}if(_0x7f0568)return _0x7f0568;_0x4c990e['clear']();for(const _0x126f77 of _0x27007a)for(const {suggestion:_0x553c6a,meta:_0x234ba8}of this['_findSuggestions'](_0x126f77,'deletion'))_0x234ba8['isOwn']&&_0x4c990e['add'](_0x553c6a);for(const _0x30d247 of _0x4c990e){const _0x1e04bc=_0x30d247['getRanges']();if(!_0x25e22d||!_0x25e22d['skipNestingCheck']){if(_0x27007a['every'](_0x2b8e5f=>_0x1e04bc['some'](_0xe0a9dc=>_0xe0a9dc['containsRange'](_0x2b8e5f,!0x0))))return _0x30d247;}(!_0x30d247['attributes']||!_0x30d247['attributes']['skipNestingCheck'])&&(_0x1e04bc['every'](_0x4b9dd3=>_0x27007a['some'](_0x4d04e7=>_0x4d04e7['containsRange'](_0x4b9dd3,!0x0)))&&_0x30d247['discard']());}const _0x33514d=_0x4cceaa(),_0xeaf105=_0x20ecd9['id'],_0x39716c='deletion:'+_0x214f38,_0x1a643f=this['_setSuggestionData']({'id':_0x33514d,'type':_0x39716c,'createdAt':new Date(),'authorId':_0xeaf105,'attributes':_0x25e22d});for(const _0x516d69 of _0x27007a)_0x516d69['detach'](),_0x516d69['isCollapsed']||'$graveyard'==_0x516d69['root']['rootName']||this['_addSuggestionMarker'](_0x39716c,_0x33514d,_0xeaf105,_0x516d69,_0x2d73ff['getMultiRangeId']());return _0x1a643f;}['_setSuggestionRange'](_0x3a945b,_0x2eb889){const _0x362d1c=_0x3a945b['getFirstMarker']();this['_model']['change'](_0x354ef9=>{_0x354ef9['updateMarker'](_0x362d1c,{'range':_0x2eb889});});}['_addThreadToSuggestion'](_0x3e7edd){const _0x143a10=_0x3e7edd['id'],_0xe48aff=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x143a10)||this['_commentsRepository']['addCommentThread']({'channelId':_0xe48aff,'threadId':_0x143a10});const _0x460734=this['_commentsRepository']['getCommentThread'](_0x143a10);_0x460734['unbind']('isRemovable'),_0x460734['isRemovable']=!0x1,_0x3e7edd['commentThread']=_0x460734;}['_checkSuggestionCorrectness'](_0xdb9cc0,_0x449200,_0xb1ef31,_0x4aeb91){if(_0xdb9cc0['type']!=_0x449200||_0xdb9cc0['subType']!=_0xb1ef31||_0xdb9cc0['author']['id']!=_0x4aeb91)throw this['editor']['isReadOnly']=!0x0,new _0x1c5beb('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x278fbf,_0x2d620e){const _0x4955c0=_0x278fbf['getFirstRange']();if(_0x2d620e['isEqual'](_0x4955c0))_0x278fbf['removeMarkers']();else{if(_0x4955c0['containsRange'](_0x2d620e)){const _0x2b03eb=this['_model']['createPositionAt'](_0x2d620e['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x278fbf,this['_model']['createRange'](_0x4955c0['start'],_0x2b03eb));const _0x41a851=_0x4cceaa(),_0x6aedd6=_0x278fbf['author']['id'],_0x98ac89=_0x278fbf['type']+':'+_0x278fbf['subType'];this['_setSuggestionData']({'id':_0x41a851,'type':_0x98ac89,'createdAt':new Date(),'authorId':_0x6aedd6,'data':_0x278fbf['data'],'attributes':_0x278fbf['attributes']});const _0x1041f6=this['_model']['createPositionAt'](_0x2d620e['end']['parent'],'after'),_0x40e75f=this['_model']['createRange'](_0x1041f6,_0x4955c0['end']);this['_addSuggestionMarker'](_0x98ac89,_0x41a851,_0x6aedd6,_0x40e75f);}else{if(_0x4955c0['containsPosition'](_0x2d620e['start'])){const _0x454a63=this['_model']['createPositionAt'](_0x2d620e['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x278fbf,this['_model']['createRange'](_0x4955c0['start'],_0x454a63));}else{const _0x236091=this['_model']['createPositionAt'](_0x2d620e['end']['parent'],'after');this['_setSuggestionRange'](_0x278fbf,this['_model']['createRange'](_0x236091,_0x4955c0['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x27f5f4){for(const {suggestion:_0x2b3816,meta:_0xe5a748}of this['_findSuggestions'](_0x27f5f4,'insertion')){if(!_0xe5a748['isOwn'])continue;const _0x56f270=_0x2b3816['getRanges']();for(const _0x29292b of _0x56f270)if(!_0x27f5f4['getDifference'](_0x29292b)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x416d37){const _0x358c83=this['editor']['plugins']['get']('Users')['getUser'](_0x416d37);if(!_0x358c83)throw new _0x1c5beb('track-changes-user-not-found',this);return _0x358c83;}['_createSuggestion'](_0x5e6515,_0x3ffe37,_0x16a01d,_0x6fe8a9){const _0x47fcec=this['_getAuthorFromId'](_0x6fe8a9),_0x23e4f2=this['_suggestionFactory']['buildSuggestion'](_0x5e6515,_0x3ffe37,_0x16a01d,_0x47fcec,_0x199eaf=>this['_updateSuggestionData'](_0x16a01d,{'attributes':_0x199eaf}));return this['listenTo'](_0x23e4f2,'accept',()=>{this['_updateSuggestionData'](_0x16a01d,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x23e4f2,'discard',()=>{this['_updateSuggestionData'](_0x16a01d,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x16a01d,_0x23e4f2),this['_suggestionState']['set'](_0x23e4f2,'notReady'),_0x23e4f2;}['_splitMarkerName'](_0x46ccb0){const _0xc615d5=_0x46ccb0['split'](':');return{'group':_0xc615d5[0x0],'type':_0xc615d5[0x1],'subType':_0xc615d5['length']>=0x5?_0xc615d5[0x2]:null,'id':_0xc615d5['length']<0x5?_0xc615d5[0x2]:_0xc615d5[0x3],'authorId':_0xc615d5['length']<0x5?_0xc615d5[0x3]:_0xc615d5[0x4],'markerCount':0x6==_0xc615d5['length']?_0xc615d5[0x5]:null};}['_breakSuggestionMarker'](_0x58ee8d,_0x47fbd3,_0x9eae3f){const _0x3102b1=_0x58ee8d['getFirstRange'](),_0x5a80df=_0x3102b1['start'],_0x3087f5=_0x3102b1['end'];this['_setSuggestionRange'](_0x58ee8d,this['_model']['createRange'](_0x5a80df,_0x47fbd3));const _0x391cb0=_0x4cceaa(),_0x32014d=_0x58ee8d['author']['id'],_0x1ed493=_0x58ee8d['type']+(_0x58ee8d['subType']?':'+_0x58ee8d['subType']:'');this['_setSuggestionData']({'id':_0x391cb0,'type':_0x1ed493,'createdAt':new Date(),'authorId':_0x32014d,'originalSuggestionId':_0x58ee8d['id'],'data':_0x58ee8d['data']}),'formatBlock'==_0x58ee8d['type']&&(_0x9eae3f=this['_model']['createPositionBefore'](_0x9eae3f['parent'])),this['_addSuggestionMarker'](_0x1ed493,_0x391cb0,_0x32014d,this['_model']['createRange'](_0x9eae3f,_0x3087f5));}['_findSuggestions'](_0x4767f6,_0x9df353=null){const _0x3d36a8=[],_0x4cce7b=this['_model']['schema'],_0x42d793=this['editor']['plugins']['get']('Users')['me'];for(const _0xfcba8e of this['getSuggestions']())if(_0xfcba8e['isInContent']&&(!_0x9df353||_0xfcba8e['type']==_0x9df353))for(const _0x1585dc of _0xfcba8e['getRanges']()){const _0xf3bdb5=_0x4767f6['start']['isEqual'](_0x1585dc['end'])||_0x4767f6['end']['isEqual'](_0x1585dc['start']);if(_0xf3bdb5||_0x4767f6['getIntersection'](_0x1585dc)){const _0x481bc4=_0x4767f6['containsRange'](_0x1585dc)&&wt(_0x4cce7b,_0x1585dc['start'],_0x4767f6),_0x5ec433=_0x1585dc['containsRange'](_0x4767f6)&&wt(_0x4cce7b,_0x4767f6['start'],_0x1585dc);_0x3d36a8['push']({'suggestion':_0xfcba8e,'meta':{'isOwn':_0x42d793==_0xfcba8e['author'],'isNextTo':_0xf3bdb5,'isInsideObject':_0x481bc4,'containsRangeInObject':_0x5ec433}});break;}}return _0x3d36a8;}['_addSuggestionMarker'](_0x2a46b0,_0x4f982e,_0x2be4aa,_0x2f11dc,_0x3da6b8=null){this['_model']['change'](_0x56978a=>{let _0x1151d9='suggestion:'+_0x2a46b0+':'+_0x4f982e+':'+_0x2be4aa;_0x3da6b8&&(_0x1151d9=_0x1151d9+':'+_0x3da6b8),_0x56978a['addMarker'](_0x1151d9,{'range':_0x2f11dc,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x4e8021){const _0x459b1e=_0x4e8021['previous'],_0x4e862a=_0x4e8021['next'];_0x4e8021['previous']=null,null!=_0x459b1e&&(_0x459b1e['next']=null),_0x4e8021['next']=null,null!=_0x4e862a&&(_0x4e862a['previous']=null),'ready'==this['_suggestionState']['get'](_0x4e8021)&&(this['_suggestionState']['set'](_0x4e8021,'removed'),this['fire']('suggestionUnloaded',_0x4e8021,_0x459b1e,_0x4e862a));}['_setSuggestionData'](_0x3b88eb){const _0x4f77a5=_0x3b88eb['id'],_0x3a15d3=this['addSuggestionData'](_0x3b88eb);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x15254a=this['editor']['plugins']['get']('PendingActions'),_0x32cd6a=_0x3a15d3['hasComments'],_0x4e898d=_0x3a15d3['subType']?_0x3a15d3['type']+':'+_0x3a15d3['subType']:_0x3a15d3['type'],t=this['editor']['locale']['t'],_0x56057b=_0x15254a['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x4d0160={'id':_0x4f77a5,'type':_0x4e898d,'hasComments':_0x32cd6a,'data':_0x3b88eb['data']||null,'originalSuggestionId':_0x3b88eb['originalSuggestionId']||null,'attributes':_0x3a15d3['attributes']};this['_adapter']['addSuggestion'](_0x4d0160)['then'](_0x50e02e=>{_0x3a15d3['_saved']=!0x0,_0x15254a['remove'](_0x56057b),_0x50e02e&&_0x50e02e['createdAt']&&(this['_suggestions']['get'](_0x4f77a5)['createdAt']=_0x50e02e['createdAt']);});}return _0x3a15d3;}['_updateSuggestionData'](_0x11dc8b,_0x5ab5c4){const _0x4a0045=this['editor']['plugins']['get']('PendingActions'),_0x572bf3=this['_suggestions']['get'](_0x11dc8b);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x572bf3['_saved']){const t=this['editor']['locale']['t'],_0x11c291=_0x4a0045['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x11dc8b,_0x5ab5c4)['then'](()=>{_0x4a0045['remove'](_0x11c291);});}else _0x572bf3['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x11dc8b,_0x5ab5c4);});}}['_getSuggestionData'](_0x4165ea){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x1c5beb('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x4165ea);}['_handleNewSuggestionMarker'](_0x24fcd5){const {id:_0x121536,type:_0x2eee4c,subType:_0x5942ba,authorId:_0x12ca0c}=this['_splitMarkerName'](_0x24fcd5),_0x11119a=this['_suggestions']['get'](_0x121536)||this['_createSuggestion'](_0x2eee4c,_0x5942ba,_0x121536,_0x12ca0c);switch(this['_checkSuggestionCorrectness'](_0x11119a,_0x2eee4c,_0x5942ba,_0x12ca0c),this['_suggestionState']['get'](_0x11119a)){case'notReady':this['_getSuggestionData'](_0x121536)['then'](_0x175b8d=>{let _0x574897=Promise['resolve']();_0x175b8d['hasComments']&&(_0x574897=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x121536})),_0x574897['then'](()=>{this['addSuggestionData'](_0x175b8d)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x11119a,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x121536,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x11119a,'ready'),this['fire']('suggestionLoaded',_0x11119a);break;case'ready':this['fire']('suggestionChanged',_0x11119a);}_0x11119a['addMarkerName'](_0x24fcd5),this['_refreshSuggestionsChain'](_0x11119a);}['_refreshSuggestionsChain'](_0x12aa12){if(_0x12aa12['isMultiRange'])return;let _0x5a97e9=!0x0,_0x5838a1=!0x0;for(const _0x1ee1f8 of this['getSuggestions']()){if(_0x1ee1f8['isMultiRange'])continue;if(_0x1ee1f8==_0x12aa12||!_0x1ee1f8['isInContent'])continue;if(_0x1ee1f8['author']['id']!=_0x12aa12['author']['id'])continue;const _0x3b7547=this['_suggestionFactory']['getSuggestionCallback'](_0x12aa12['type'],_0x12aa12['subType'],'chain'),_0x2452c8=this['_suggestionFactory']['getSuggestionCallback'](_0x1ee1f8['type'],_0x1ee1f8['subType'],'chain'),_0x458e34=_0x3b7547(_0x12aa12,_0x1ee1f8),_0x4acd54=_0x2452c8(_0x12aa12,_0x1ee1f8);_0x458e34&&_0x4acd54&&(_0x458e34[0x1]['commentThread']&&_0x458e34[0x1]['commentThread']['length']||(_0x458e34[0x0]['next']=_0x458e34[0x1],_0x458e34[0x1]['previous']=_0x458e34[0x0],_0x458e34[0x0]==_0x12aa12?_0x5838a1=!0x1:_0x5a97e9=!0x1));}_0x12aa12['previous']&&_0x5a97e9&&(_0x12aa12['previous']['next']=null,_0x12aa12['previous']=null),_0x12aa12['next']&&_0x5838a1&&(_0x12aa12['next']['previous']=null,_0x12aa12['next']=null);}['_joinWithAdjacentSuggestions'](_0x40516e){for(const _0x4fdc90 of this['_suggestions']['values']()){if(_0x4fdc90==_0x40516e||!_0x4fdc90['isInContent'])continue;if(_0x4fdc90['type']!=_0x40516e['type']||_0x4fdc90['author']['id']!=_0x40516e['author']['id']||_0x4fdc90['subType']!=_0x40516e['subType'])continue;const _0x155d78=this['_suggestionFactory']['getSuggestionCallback'](_0x40516e['type'],_0x40516e['subType'],'join');if(_0x155d78(_0x4fdc90['getRanges'](),_0x40516e['getRanges']())){if(_0x40516e['commentThread']&&_0x40516e['commentThread']['length'])continue;return this['_joinSuggestions'](_0x4fdc90,_0x40516e),!0x0;}if(_0x155d78(_0x40516e['getRanges'](),_0x4fdc90['getRanges']())){if(_0x4fdc90['commentThread']&&_0x4fdc90['commentThread']['length'])continue;return this['_joinSuggestions'](_0x40516e,_0x4fdc90),!0x0;}}return!0x1;}['_joinSuggestions'](_0xe91685,_0x25b809){if(_0xe91685['isMultiRange'])for(const _0x4a2808 of _0x25b809['getRanges']())_0xe91685['addRange'](_0x4a2808);else{const _0x164bb4=_0x25b809['getFirstRange']()['end'];this['_setSuggestionRange'](_0xe91685,this['_model']['createRange'](_0xe91685['getFirstRange']()['start'],_0x164bb4));}_0x25b809['removeMarkers']();}}_0x3dcd07(l,_0x33eb69);class kt{constructor(_0x22bc7d){this['_editor']=_0x22bc7d,this['_model']=_0x22bc7d['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x25eaa5,_0x5084ae,_0x57e10a,_0x212eb6,_0x595f37){return new _0x2d73ff(this['_model'],{'type':_0x25eaa5,'subType':_0x5084ae,'id':_0x57e10a,'author':_0x212eb6,'onAttributesChange':_0x595f37,'onAccept':(..._0x2dfb10)=>this['getSuggestionCallback'](_0x25eaa5,_0x5084ae,'accept')(..._0x2dfb10),'onDiscard':(..._0x2f6951)=>this['getSuggestionCallback'](_0x25eaa5,_0x5084ae,'discard')(..._0x2f6951)});}['registerCustomCallback'](_0x2511ca,_0x1a1afa,_0x3a5ab2,_0x1d817a){const _0x4ea16b=_0x2511ca+':'+_0x1a1afa+':'+_0x3a5ab2;this['_customCallbacks']['set'](_0x4ea16b,_0x1d817a);}['getSuggestionCallback'](_0x3639fc,_0x1be8ca,_0x3483c1){const _0x5e8769=_0x3639fc+':'+_0x1be8ca+':'+_0x3483c1;return this['_customCallbacks']['get'](_0x5e8769)||this['_defaultCallbacks']['get'](_0x3639fc+':'+_0x3483c1);}['_registerDefaultCallbacks'](){const _0x1d6013=()=>{},_0x1a9fcf=_0x212f4a=>{_0x212f4a['sort']((_0x2b6692,_0x237610)=>_0x2b6692['start']['isBefore'](_0x237610['start'])?0x1:-0x1),this['_model']['change'](_0x45e8ed=>{for(const _0xf340fb of _0x212f4a){let _0x21a4d6;_0x21a4d6=_0xf340fb['end']['isAtEnd']&&_0xf340fb['end']['parent']==_0xf340fb['start']['nodeAfter']?_0x45e8ed['createSelection'](_0xf340fb['start']['nodeAfter'],'on'):_0x45e8ed['createSelection'](_0xf340fb),this['_model']['deleteContent'](_0x21a4d6,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x357175=(_0x51e04f,_0x2bdea3)=>{this['_model']['change'](_0x328453=>{const {commandName:_0xd204dc,commandParams:_0x324360=[]}=_0x2bdea3,_0x199e1d=_0x51e04f[0x0];if('$graveyard'==_0x199e1d['root']['rootName'])return;const _0x39fbd3=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x21b373=>_0x154f74['fromRange'](_0x21b373));yt(_0x199e1d)?_0x328453['setSelection'](this['_model']['createRange'](_0x199e1d['end'])):_0x328453['setSelection'](_0x199e1d);for(const _0x21d6a4 of this['_editor']['commands']['commands']())_0x21d6a4['refresh']();_0x324360['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0xd204dc,..._0x324360);const _0x2d38cc=_0x39fbd3['filter'](_0x18f912=>'$graveyard'!=_0x18f912['root']['rootName']);_0x2d38cc['length']>0x0&&_0x328453['setSelection'](_0x2d38cc);for(const _0x3eba59 of _0x39fbd3)_0x3eba59['detach']();});},_0x5eb076=(_0x4a687d,_0x5ca411)=>0x1==_0x4a687d['length']&&0x1==_0x5ca411['length']&&_0x4a687d[0x0]['end']['isEqual'](_0x5ca411[0x0]['start']),_0x2b34e0=(_0x1a47a4,_0xecd237)=>Dt(_0x1a47a4,_0xecd237,this['_model'])?[_0x1a47a4,_0xecd237]:Dt(_0xecd237,_0x1a47a4,this['_model'])?[_0xecd237,_0x1a47a4]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x1d6013),this['_defaultCallbacks']['set']('insertion:discard',_0x1a9fcf),this['_defaultCallbacks']['set']('insertion:join',_0x5eb076),this['_defaultCallbacks']['set']('insertion:chain',_0x2b34e0),this['_defaultCallbacks']['set']('deletion:accept',_0x1a9fcf),this['_defaultCallbacks']['set']('deletion:discard',_0x1d6013),this['_defaultCallbacks']['set']('deletion:join',_0x5eb076),this['_defaultCallbacks']['set']('deletion:chain',_0x2b34e0),this['_defaultCallbacks']['set']('formatInline:accept',_0x357175),this['_defaultCallbacks']['set']('formatInline:discard',_0x1d6013),this['_defaultCallbacks']['set']('formatInline:join',_0x5eb076),this['_defaultCallbacks']['set']('formatInline:chain',_0x1d6013),this['_defaultCallbacks']['set']('formatBlock:accept',_0x357175),this['_defaultCallbacks']['set']('formatBlock:discard',_0x1d6013),this['_defaultCallbacks']['set']('formatBlock:join',_0x5eb076),this['_defaultCallbacks']['set']('formatBlock:chain',_0x1d6013);}}function wt(_0x530c0e,_0x5acbca,_0x2f599c){for(const _0x2b70fe of _0x5acbca['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x2b70fe['root']==_0x2b70fe)return!0x1;if(!_0x2f599c['containsItem'](_0x2b70fe))return!0x1;if(_0x530c0e['isObject'](_0x2b70fe)||_0x530c0e['isLimit'](_0x2b70fe))return!0x0;}}function yt(_0x4b4189){return _0x4b4189['end']['parent']==_0x4b4189['start']['nodeAfter']&&_0x4b4189['end']['isAtStart'];}function St(_0x5ba9fc,_0x44c6c3,_0x1e9930,_0x1ae5bd){const _0x247e0a=_0x109009=>!_0x109009['item']['is']('textProxy')&&!_0x1ae5bd['isObject'](_0x109009['item']),_0x15356a=_0x5ba9fc['start']['getLastMatchingPosition'](_0x247e0a),_0x29758c=_0x5ba9fc['end']['getLastMatchingPosition'](_0x247e0a,{'direction':'backward'});return(!_0x5ba9fc['start']['isEqual'](_0x15356a)||!_0x5ba9fc['end']['isEqual'](_0x29758c))&&(_0x15356a['isBefore'](_0x29758c)?_0x1e9930['updateMarker'](_0x44c6c3,{'range':_0x1e9930['createRange'](_0x15356a,_0x29758c)}):_0x1e9930['removeMarker'](_0x44c6c3),!0x0);}function bt(_0x49f975){return mt(_0x49f975);}function It(_0xbd36cc){const _0x5bda1d=_0xbd36cc['start']['nodeAfter'];return _0x5bda1d&&_0x5bda1d['is']('element');}function vt(_0x421d10,_0x5a9d0c){const _0x286295=_0x5a9d0c['schema']['isObject'](_0x421d10)||_0x5a9d0c['schema']['isSelectable'](_0x421d10);return _0x5a9d0c['createRange'](_0x5a9d0c['createPositionAt'](_0x421d10,'before'),_0x286295?_0x5a9d0c['createPositionAfter'](_0x421d10):_0x5a9d0c['createPositionAt'](_0x421d10,'end'));}function Dt(_0x10a0a2,_0x2c6446,_0xb1e0b9){const _0xc48961=_0x10a0a2['getFirstRange'](),_0x4b0a92=_0x2c6446['getFirstRange']();if(_0xc48961['end']['isEqual'](_0x4b0a92['start']))return!0x0;if(_0x10a0a2['type']!=_0x2c6446['type'])return!0x1;if(!_0xc48961['end']['isTouching'](_0x4b0a92['start']))return!0x1;const _0x17ef16=_0xb1e0b9['createRange'](_0xc48961['end'],_0x4b0a92['start'])['getWalker']();for(const _0x5da010 of _0x17ef16)if(['elementStart','elementEnd']['includes'](_0x5da010['type'])&&_0xb1e0b9['schema']['isLimit'](_0x5da010['item']))return!0x1;return!0x0;}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x51a428}from'ckeditor5/src/core';import _0x37ccbf from'./trackchangesediting';import _0x5c7e8b from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import Ct from'./ui/suggestioncontroller';import Tt from'./ui/view/suggestionthreadview';import _0xdf60a9 from'@ckeditor/ckeditor5-collaboration-core/src/users';import xt from'@ckeditor/ckeditor5-comments/src/annotations/editorannotations';import{Collection as Et}from'ckeditor5/src/utils';import{Model as Nt,SplitButtonView as Ut,createDropdown as Wt,addListToDropdown as Ot}from'ckeditor5/src/ui';import Gt from'@ckeditor/ckeditor5-comments/src/utils/getdatetimeformatter';import Mt from'@ckeditor/ckeditor5-comments/src/utils/getmarkerdomelement';import Pt from'../theme/icons/track-changes.svg';import{debounce as Vt}from'lodash-es';import qt from'@ckeditor/ckeditor5-comments/src/annotations/view/annotationview';import zt from'@ckeditor/ckeditor5-comments/src/annotations/annotation';import Bt from'@ckeditor/ckeditor5-comments/src/annotations/annotations';export default class f extends _0x51a428{static get['requires'](){return[Bt,xt,_0x37ccbf,_0x5c7e8b,_0xdf60a9];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x3a3b7c){super(_0x3a3b7c),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x3ff3cd=this['editor']['config'];_0x3ff3cd['define']('trackChanges.SuggestionThreadView',Tt),_0x3ff3cd['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x3ff3cd['get']('trackChanges.disableComments');}['init'](){const _0x4ea4b0=this['editor'],_0x166eaf=_0x4ea4b0['plugins']['get'](_0x37ccbf),_0x56e042=_0x4ea4b0['plugins']['get'](Bt),_0x26b549=_0x4ea4b0['plugins']['get'](xt),_0x17456=_0x4ea4b0['plugins']['get'](_0x5c7e8b);_0x4ea4b0['ui']['componentFactory']['add']('trackChanges',_0x211a27=>this['_createUIButton'](_0x211a27)),_0x26b549['addSourceCollector'](()=>{const _0x22f16d=[];for(const [_0x1cf583,_0x1a634f]of Array['from'](this['_suggestionToController'])){const _0x3434bf=_0x1cf583['getAllAdjacentSuggestions'](),_0x1c26a6=[];for(const _0x339bf2 of _0x3434bf){if(!_0x339bf2['isInContent'])continue;if(_0x339bf2['isMultiRange']){_0x1c26a6['push'](..._0x339bf2['getRanges']());continue;}const _0x4f3f84=_0x339bf2['getFirstRange']();if(_0x1c26a6['length']>0x0){const _0x32b302=_0x1c26a6[0x0]['getJoined'](_0x4f3f84);if(_0x32b302){_0x1c26a6[0x0]=_0x32b302;continue;}}_0x1c26a6['push'](_0x4f3f84);}_0x22f16d['push']([_0x1a634f['view'],_0x1c26a6]);}return _0x22f16d;}),this['listenTo'](_0x166eaf,'suggestionLoaded',(_0xae8d21,_0x1e7e6f)=>{let _0x1fbbe1=!0x1;const _0x28875f=Vt(_0x2016f7=>{_0x1fbbe1||_0x2016f7?_0x1fbbe1&&_0x2016f7&&(this['_destroyController'](_0x1e7e6f),_0x26b549['refreshSelectedViews'](),_0x1fbbe1=!0x1):(this['_initializeController'](_0x1e7e6f),_0x26b549['refreshSelectedViews'](),_0x1fbbe1=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x1e7e6f,_0x28875f),this['listenTo'](_0x1e7e6f,'change:previous',(_0x569d43,_0x13b7d9,_0xd8d109,_0xa0a444)=>{_0x1e7e6f['isInContent']&&(null==_0xd8d109?(this['_updateController'](_0xa0a444['head']),_0x28875f(!0x1)):(this['_updateController'](_0xd8d109['head']),_0x28875f(!0x0)));}),null===_0x1e7e6f['previous']?_0x28875f(!0x1):this['_updateController'](_0x1e7e6f['head']);}),this['listenTo'](_0x166eaf,'suggestionUnloaded',(_0x4884f5,_0x43bb17,_0x58d614)=>{this['stopListening'](_0x43bb17,'change:previous'),this['_debouncedHandlers']['get'](_0x43bb17)['cancel'](),this['_debouncedHandlers']['delete'](_0x43bb17);const _0xc4d103=_0x58d614?_0x58d614['head']:_0x43bb17,_0x45d42f=this['_suggestionToController']['get'](_0xc4d103);null!==_0x58d614&&this['_updateController'](_0xc4d103),null===_0x58d614&&_0x45d42f&&this['_destroyController'](_0x43bb17);}),this['listenTo'](_0x166eaf,'suggestionChanged',(_0x248ab1,_0x3fadf2)=>{this['_updateController'](_0x3fadf2);}),this['listenTo'](_0x56e042,'change:activeAnnotations',(_0x407c68,_0x2e48d3,_0x38396f)=>{const _0x49e274=Array['from'](_0x38396f,_0x18a1f5=>_0x18a1f5['innerView'])['filter'](_0x39d239=>this['_viewToController']['has'](_0x39d239)),_0x88d0f8=[];for(const _0x34f98e of _0x49e274){const _0x74172b=this['_viewToController']['get'](_0x34f98e)['model']['getAllAdjacentSuggestions']();_0x88d0f8['push'](..._0x74172b['reduce']((_0x27cfd7,_0x576d92)=>[..._0x27cfd7,..._0x576d92['getMarkerNames']()],[]));}_0x166eaf['activeMarkers']=_0x88d0f8;}),this['listenTo'](_0x17456,'addComment',(_0x2c099f,{threadId:_0xa57acb,isFromAdapter:_0x114964})=>{if(_0x114964||!_0x166eaf['hasSuggestion'](_0xa57acb))return;const _0x5836be=_0x166eaf['getSuggestion'](_0xa57acb);this['_suggestionToController']['get'](_0x5836be)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x2199fa){const _0x55d681=Wt(_0x2199fa,Ut),_0x39bf85=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x55d681['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':Pt}),_0x55d681['buttonView']['bind']('isOn')['to'](_0x39bf85,'value'),_0x55d681['buttonView']['on']('execute',()=>_0x39bf85['execute']());const _0x402d9f=new Et(),_0x35eb15=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x651688 of _0x35eb15){const _0x1427df={'type':_0x651688['type']};if(_0x651688['model']){const _0x58648b=new Nt(_0x651688['model']),_0x3d08f3=this['editor']['commands']['get'](_0x58648b['commandName']);_0x58648b['bind']('isOn','isEnabled')['to'](_0x3d08f3,'value','isEnabled'),_0x1427df['model']=_0x58648b;}_0x402d9f['add'](_0x1427df);}Ot(_0x55d681,_0x402d9f);const _0x1a5a48=_0x35eb15['filter'](_0x5a3430=>null!=_0x5a3430['model'])['map'](_0x547521=>this['editor']['commands']['get'](_0x547521['model']['commandName']));return _0x55d681['buttonView']['actionView']['unbind']('isEnabled'),_0x55d681['buttonView']['arrowView']['unbind']('isEnabled'),_0x55d681['buttonView']['actionView']['bind']('isEnabled')['to'](_0x39bf85,'isEnabled'),_0x55d681['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x1a5a48,'isEnabled',(..._0x26c3cc)=>_0x26c3cc['some'](_0x473715=>_0x473715)),_0x55d681['on']('execute',_0x206e07=>this['editor']['execute'](_0x206e07['source']['commandName'])),_0x55d681;}['_initializeController'](_0x510458){const _0x4bea11=this['editor'],_0x5b5f88=_0x4bea11['config'],_0x53009e=_0x4bea11['plugins']['get'](Bt),_0x39a6e6=_0x510458['getAllAdjacentSuggestions']()['filter'](_0x5a3e38=>_0x5a3e38['isInContent']),_0x28eceb=_0x4bea11['plugins']['get']('Users')['me'],_0x9e4761=_0x4bea11['commands']['get']('acceptSuggestion'),_0x37d244=_0x4bea11['commands']['get']('discardSuggestion'),_0x1fe792=new(0x0,(_0x5b5f88['get']('trackChanges'))['SuggestionThreadView'])(_0x4bea11['locale'],_0x510458,_0x28eceb,{'disableComments':this['_disableComments'],'editorConfig':_0x5b5f88['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x5b5f88['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5b5f88['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5b5f88['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':Gt(_0x5b5f88['get']('locale')),'CommentView':_0x5b5f88['get']('comments')['CommentView']}),_0x38db60=new Ct(_0x510458,_0x1fe792,_0x9e4761,_0x37d244);_0x1fe792['descriptionParts']=_0x4bea11['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x39a6e6),this['_suggestionToController']['set'](_0x510458,_0x38db60),this['_viewToController']['set'](_0x1fe792,_0x38db60);const _0x1e7cda=new qt(this['editor']['locale'],_0x1fe792);_0x1e7cda['bind']('isDirty')['to'](_0x1fe792,'isDirty'),_0x1e7cda['bind']('length')['to'](_0x1fe792),_0x1e7cda['bind']('type')['to'](_0x1fe792,'type',_0x2ae47d=>'suggestion-'+_0x2ae47d);const _0x17b508=new zt({'view':_0x1e7cda,'target':()=>{const _0xa13f9c=_0x39a6e6[0x0]['getFirstMarker']();if(!_0xa13f9c)return null;const _0x2dbf37=_0xa13f9c['getRange']()['getContainedElement']();return _0x2dbf37&&!_0x4bea11['editing']['mapper']['toViewElement'](_0x2dbf37)?null:Mt(_0x4bea11['editing'],_0xa13f9c)||null;},'type':()=>'suggestion-'+_0x38db60['view']['type']});_0x53009e['add'](_0x17b508);const _0x21f515=_0x4bea11['plugins']['get']('PendingActions');let _0x4c38e7;_0x1fe792['on']('change:isDirty',(_0x3d3bd7,_0x4b97ca,_0x2cf8da)=>{if(_0x2cf8da){const t=this['editor']['locale']['t'];_0x4c38e7=_0x21f515['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x21f515['remove'](_0x4c38e7),_0x4c38e7=null;});}['_destroyController'](_0x36bccb){const _0x140ef4=this['editor']['plugins']['get']('Annotations'),_0x44b433=this['_suggestionToController']['get'](_0x36bccb),_0xb3c315=_0x44b433['view'],_0x59dad2=_0x140ef4['getByInnerView'](_0xb3c315);_0x140ef4['remove'](_0x59dad2),this['_suggestionToController']['delete'](_0x36bccb),this['_viewToController']['delete'](_0xb3c315),_0x44b433['destroy'](),_0xb3c315['destroy']();}['_updateController'](_0x571aed){if(!_0x571aed['isInContent']||!this['_suggestionToController']['has'](_0x571aed))return;const _0x5acc87=this['editor']['plugins']['get']('TrackChangesEditing'),_0x1c269a=this['_suggestionToController']['get'](_0x571aed),_0x10e4dc=_0x571aed['getAllAdjacentSuggestions']();_0x1c269a['view']['descriptionParts']=_0x5acc87['_descriptionFactory']['getDescriptions'](_0x10e4dc);}['destroy'](){super['destroy']();for(const _0x11c476 of this['_suggestionToController']['keys']())this['_destroyController'](_0x11c476);for(const _0x59af82 of this['_debouncedHandlers']['values']())_0x59af82['cancel']();this['_debouncedHandlers']['clear']();}}
23
+ import{Plugin as _0x92e352}from'ckeditor5/src/core';import _0x3369cf from'./trackchangesediting';import _0xf79522 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import Ct from'./ui/suggestioncontroller';import Tt from'./ui/view/suggestionthreadview';import _0x6e44f5 from'@ckeditor/ckeditor5-collaboration-core/src/users';import xt from'@ckeditor/ckeditor5-comments/src/annotations/editorannotations';import{Collection as Et}from'ckeditor5/src/utils';import{Model as At,SplitButtonView as Nt,createDropdown as Ut,addListToDropdown as Wt}from'ckeditor5/src/ui';import _t from'@ckeditor/ckeditor5-comments/src/utils/getdatetimeformatter';import Ot from'@ckeditor/ckeditor5-comments/src/utils/getmarkerdomelement';import Gt from'../theme/icons/track-changes.svg';import{debounce as Mt}from'lodash-es';import Pt from'@ckeditor/ckeditor5-comments/src/annotations/view/annotationview';import Vt from'@ckeditor/ckeditor5-comments/src/annotations/annotation';import qt from'@ckeditor/ckeditor5-comments/src/annotations/annotations';export default class f extends _0x92e352{static get['requires'](){return[qt,xt,_0x3369cf,_0xf79522,_0x6e44f5];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x528969){super(_0x528969),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x4e961e=this['editor']['config'];_0x4e961e['define']('trackChanges.SuggestionThreadView',Tt),_0x4e961e['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x4e961e['get']('trackChanges.disableComments');}['init'](){const _0x4be068=this['editor'],_0x1dd4e2=_0x4be068['plugins']['get'](_0x3369cf),_0x32c326=_0x4be068['plugins']['get'](qt),_0x117388=_0x4be068['plugins']['get'](xt),_0x5f4395=_0x4be068['plugins']['get'](_0xf79522);_0x4be068['ui']['componentFactory']['add']('trackChanges',_0x5a0e81=>this['_createUIButton'](_0x5a0e81)),_0x117388['addSourceCollector'](()=>{const _0x422631=[];for(const [_0x53d093,_0x2586f4]of Array['from'](this['_suggestionToController'])){const _0x492e72=_0x53d093['getAllAdjacentSuggestions'](),_0x146464=[];for(const _0x403eb5 of _0x492e72){if(!_0x403eb5['isInContent'])continue;if(_0x403eb5['isMultiRange']){_0x146464['push'](..._0x403eb5['getRanges']());continue;}const _0x20e1bb=_0x403eb5['getFirstRange']();if(_0x146464['length']>0x0){const _0x1a46e5=_0x146464[0x0]['getJoined'](_0x20e1bb);if(_0x1a46e5){_0x146464[0x0]=_0x1a46e5;continue;}}_0x146464['push'](_0x20e1bb);}_0x422631['push']([_0x2586f4['view'],_0x146464]);}return _0x422631;}),this['listenTo'](_0x1dd4e2,'suggestionLoaded',(_0x29a040,_0x78547f)=>{let _0x5b98ac=!0x1;const _0x448863=Mt(_0x4eb85c=>{_0x5b98ac||_0x4eb85c?_0x5b98ac&&_0x4eb85c&&(this['_destroyController'](_0x78547f),_0x117388['refreshSelectedViews'](),_0x5b98ac=!0x1):(this['_initializeController'](_0x78547f),_0x117388['refreshSelectedViews'](),_0x5b98ac=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x78547f,_0x448863),this['listenTo'](_0x78547f,'change:previous',(_0xb8a3f4,_0x5e6f22,_0x2d172b,_0xab7b81)=>{_0x78547f['isInContent']&&(null==_0x2d172b?(this['_updateController'](_0xab7b81['head']),_0x448863(!0x1)):(this['_updateController'](_0x2d172b['head']),_0x448863(!0x0)));}),null===_0x78547f['previous']?_0x448863(!0x1):this['_updateController'](_0x78547f['head']);}),this['listenTo'](_0x1dd4e2,'suggestionUnloaded',(_0x33a8f8,_0x2048b8,_0x1d3b57)=>{this['stopListening'](_0x2048b8,'change:previous'),this['_debouncedHandlers']['get'](_0x2048b8)['cancel'](),this['_debouncedHandlers']['delete'](_0x2048b8);const _0x47cf6f=_0x1d3b57?_0x1d3b57['head']:_0x2048b8,_0xc75bdf=this['_suggestionToController']['get'](_0x47cf6f);null!==_0x1d3b57&&this['_updateController'](_0x47cf6f),null===_0x1d3b57&&_0xc75bdf&&this['_destroyController'](_0x2048b8);}),this['listenTo'](_0x1dd4e2,'suggestionChanged',(_0x5a2b3e,_0x39ebb2)=>{this['_updateController'](_0x39ebb2);}),this['listenTo'](_0x32c326,'change:activeAnnotations',(_0x4315c8,_0x1e3e9d,_0x1a11ef)=>{const _0x321a16=Array['from'](_0x1a11ef,_0x35db69=>_0x35db69['innerView'])['filter'](_0x45d884=>this['_viewToController']['has'](_0x45d884)),_0x4cdec9=[];for(const _0x21628f of _0x321a16){const _0x31b564=this['_viewToController']['get'](_0x21628f)['model']['getAllAdjacentSuggestions']();_0x4cdec9['push'](..._0x31b564['reduce']((_0x397eb1,_0x371eb0)=>[..._0x397eb1,..._0x371eb0['getMarkerNames']()],[]));}_0x1dd4e2['activeMarkers']=_0x4cdec9;}),this['listenTo'](_0x5f4395,'addComment',(_0xe6daf6,{threadId:_0x57a03b,isFromAdapter:_0x127f70})=>{if(_0x127f70||!_0x1dd4e2['hasSuggestion'](_0x57a03b))return;const _0x373e7f=_0x1dd4e2['getSuggestion'](_0x57a03b);this['_suggestionToController']['get'](_0x373e7f)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x645247){const _0x2d6f5d=Ut(_0x645247,Nt),_0x1cbaea=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x2d6f5d['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':Gt}),_0x2d6f5d['buttonView']['bind']('isOn')['to'](_0x1cbaea,'value'),_0x2d6f5d['buttonView']['on']('execute',()=>_0x1cbaea['execute']());const _0x4d816b=new Et(),_0x57b81d=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x2bf6d6 of _0x57b81d){const _0x54bd2a={'type':_0x2bf6d6['type']};if(_0x2bf6d6['model']){const _0x423a3e=new At(_0x2bf6d6['model']),_0x1a4b53=this['editor']['commands']['get'](_0x423a3e['commandName']);_0x423a3e['bind']('isOn','isEnabled')['to'](_0x1a4b53,'value','isEnabled'),_0x54bd2a['model']=_0x423a3e;}_0x4d816b['add'](_0x54bd2a);}Wt(_0x2d6f5d,_0x4d816b);const _0x23fe5c=_0x57b81d['filter'](_0x41ccff=>null!=_0x41ccff['model'])['map'](_0x32f813=>this['editor']['commands']['get'](_0x32f813['model']['commandName']));return _0x2d6f5d['buttonView']['actionView']['unbind']('isEnabled'),_0x2d6f5d['buttonView']['arrowView']['unbind']('isEnabled'),_0x2d6f5d['buttonView']['actionView']['bind']('isEnabled')['to'](_0x1cbaea,'isEnabled'),_0x2d6f5d['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x23fe5c,'isEnabled',(..._0x2ec51c)=>_0x2ec51c['some'](_0x13d372=>_0x13d372)),_0x2d6f5d['on']('execute',_0x45cd7f=>this['editor']['execute'](_0x45cd7f['source']['commandName'])),_0x2d6f5d;}['_initializeController'](_0x1771c3){const _0x537f8c=this['editor'],_0x2f8ba3=_0x537f8c['config'],_0x11a606=_0x537f8c['plugins']['get'](qt),_0x127dbc=_0x1771c3['getAllAdjacentSuggestions']()['filter'](_0x51f8af=>_0x51f8af['isInContent']),_0x272f78=_0x537f8c['plugins']['get']('Users')['me'],_0x18f61e=_0x537f8c['commands']['get']('acceptSuggestion'),_0x4e6ce3=_0x537f8c['commands']['get']('discardSuggestion'),_0x30299b=new(0x0,(_0x2f8ba3['get']('trackChanges'))['SuggestionThreadView'])(_0x537f8c['locale'],_0x1771c3,_0x272f78,{'disableComments':this['_disableComments'],'editorConfig':_0x2f8ba3['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x2f8ba3['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2f8ba3['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2f8ba3['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_t(_0x2f8ba3['get']('locale')),'CommentView':_0x2f8ba3['get']('comments')['CommentView']}),_0x405b30=new Ct(_0x1771c3,_0x30299b,_0x18f61e,_0x4e6ce3);_0x30299b['descriptionParts']=_0x537f8c['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x127dbc),this['_suggestionToController']['set'](_0x1771c3,_0x405b30),this['_viewToController']['set'](_0x30299b,_0x405b30);const _0x4d5bee=new Pt(this['editor']['locale'],_0x30299b);_0x4d5bee['bind']('isDirty')['to'](_0x30299b,'isDirty'),_0x4d5bee['bind']('length')['to'](_0x30299b),_0x4d5bee['bind']('type')['to'](_0x30299b,'type',_0x2adc0a=>'suggestion-'+_0x2adc0a);const _0xc41d42=new Vt({'view':_0x4d5bee,'target':()=>{const _0x1228dc=_0x127dbc[0x0]['getFirstMarker']();if(!_0x1228dc)return null;const _0x35f176=_0x1228dc['getRange']()['getContainedElement']();return _0x35f176&&!_0x537f8c['editing']['mapper']['toViewElement'](_0x35f176)?null:Ot(_0x537f8c['editing'],_0x1228dc)||null;},'type':()=>'suggestion-'+_0x405b30['view']['type']});_0x11a606['add'](_0xc41d42);const _0x22f3a0=_0x537f8c['plugins']['get']('PendingActions');let _0x294ec9;_0x30299b['on']('change:isDirty',(_0x4e0780,_0x5d8373,_0x3c1f6b)=>{if(_0x3c1f6b){const t=this['editor']['locale']['t'];_0x294ec9=_0x22f3a0['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x22f3a0['remove'](_0x294ec9),_0x294ec9=null;});}['_destroyController'](_0x19212f){const _0x74a023=this['editor']['plugins']['get']('Annotations'),_0x36f552=this['_suggestionToController']['get'](_0x19212f),_0x599dcb=_0x36f552['view'],_0x201d29=_0x74a023['getByInnerView'](_0x599dcb);_0x74a023['remove'](_0x201d29),this['_suggestionToController']['delete'](_0x19212f),this['_viewToController']['delete'](_0x599dcb),_0x36f552['destroy'](),_0x599dcb['destroy']();}['_updateController'](_0x238b17){if(!_0x238b17['isInContent']||!this['_suggestionToController']['has'](_0x238b17))return;const _0x248b8b=this['editor']['plugins']['get']('TrackChangesEditing'),_0x16dd34=this['_suggestionToController']['get'](_0x238b17),_0x37a119=_0x238b17['getAllAdjacentSuggestions']();_0x16dd34['view']['descriptionParts']=_0x248b8b['_descriptionFactory']['getDescriptions'](_0x37a119);}['destroy'](){super['destroy']();for(const _0x6a8cf9 of this['_suggestionToController']['keys']())this['_destroyController'](_0x6a8cf9);for(const _0x4759ff of this['_debouncedHandlers']['values']())_0x4759ff['cancel']();this['_debouncedHandlers']['clear']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4b10=['listenTo','discardSuggestion','_acceptCommand','unbind','commentThread','view','_discardCommand','execute','isEnabled','stopListening','acceptSuggestion','model','commentThreadController'];(function(_0x5151ea,_0x4b1061){var _0x70d48e=function(_0x19c76d){while(--_0x19c76d){_0x5151ea['push'](_0x5151ea['shift']());}};_0x70d48e(++_0x4b1061);}(_0x4b10,0x1b9));var _0x70d4=function(_0x5151ea,_0x4b1061){_0x5151ea=_0x5151ea-0x0;var _0x70d48e=_0x4b10[_0x5151ea];return _0x70d48e;};import{ObservableMixin as _0x2df548,mix as _0x41769b}from'ckeditor5/src/utils';import _0xbf2e51 from'@ckeditor/ckeditor5-comments/src/comments/ui/commentthreadcontroller';export default class Ct{constructor(_0x2c8748,_0x45df41,_0x3be717,_0x367f69){this[_0x70d4('0xc')]=_0x2c8748,this['view']=_0x45df41,this[_0x70d4('0x0')]=new _0xbf2e51(_0x2c8748[_0x70d4('0x5')],_0x45df41),this[_0x70d4('0x3')]=_0x3be717,this[_0x70d4('0x7')]=_0x367f69,this[_0x70d4('0x6')]['bind'](_0x70d4('0x9'))['to'](this['_acceptCommand']),this[_0x70d4('0x1')](_0x45df41,_0x70d4('0xb'),()=>this[_0x70d4('0xb')]()),this[_0x70d4('0x1')](_0x45df41,_0x70d4('0x2'),()=>this[_0x70d4('0x2')]());}[_0x70d4('0xb')](){this[_0x70d4('0x3')][_0x70d4('0x8')](this[_0x70d4('0xc')]['id']);}[_0x70d4('0x2')](){this[_0x70d4('0x7')]['execute'](this[_0x70d4('0xc')]['id']);}['destroy'](){this[_0x70d4('0x6')][_0x70d4('0x4')](_0x70d4('0x9')),this[_0x70d4('0xa')](),this[_0x70d4('0x0')]['destroy']();}}_0x41769b(Ct,_0x2df548);
23
+ var _0xa4cf=['discardSuggestion','_discardCommand','bind','isEnabled','listenTo','acceptSuggestion','commentThread','model','view','_acceptCommand','execute','unbind','destroy'];(function(_0x55a720,_0xa4cf36){var _0x2eed4b=function(_0x57bf08){while(--_0x57bf08){_0x55a720['push'](_0x55a720['shift']());}};_0x2eed4b(++_0xa4cf36);}(_0xa4cf,0x1cc));var _0x2eed=function(_0x55a720,_0xa4cf36){_0x55a720=_0x55a720-0x0;var _0x2eed4b=_0xa4cf[_0x55a720];return _0x2eed4b;};import{ObservableMixin as _0x311cd6,mix as _0x31193f}from'ckeditor5/src/utils';import _0x2411c0 from'@ckeditor/ckeditor5-comments/src/comments/ui/commentthreadcontroller';export default class Ct{constructor(_0x3627ce,_0x19e154,_0x3e39fd,_0x914e4){this['model']=_0x3627ce,this[_0x2eed('0x3')]=_0x19e154,this['commentThreadController']=new _0x2411c0(_0x3627ce[_0x2eed('0x1')],_0x19e154),this[_0x2eed('0x4')]=_0x3e39fd,this[_0x2eed('0x9')]=_0x914e4,this[_0x2eed('0x3')][_0x2eed('0xa')](_0x2eed('0xb'))['to'](this[_0x2eed('0x4')]),this[_0x2eed('0xc')](_0x19e154,'acceptSuggestion',()=>this[_0x2eed('0x0')]()),this['listenTo'](_0x19e154,_0x2eed('0x8'),()=>this[_0x2eed('0x8')]());}[_0x2eed('0x0')](){this['_acceptCommand'][_0x2eed('0x5')](this[_0x2eed('0x2')]['id']);}[_0x2eed('0x8')](){this[_0x2eed('0x9')][_0x2eed('0x5')](this[_0x2eed('0x2')]['id']);}[_0x2eed('0x7')](){this['view'][_0x2eed('0x6')]('isEnabled'),this['stopListening'](),this['commentThreadController'][_0x2eed('0x7')]();}}_0x31193f(Ct,_0x311cd6);
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x7968=['commentThread','value','setData','showInput','editorConfig','fire','hasDirtyComment','isDirty','delegate','_createCommentViews','removeComment','editor','commentsListView','locale','cancel','focus','_model','bind','element','commentThreadInputView','CommentView','length','descriptionParts','isReadOnly','set','submit','createdAt','disabledSubmit','_createCommentThreadInputView','_config','commentInputView','isActive','_localUser','destroy'];(function(_0x11d50a,_0x7968d0){const _0x1bdc49=function(_0x772abb){while(--_0x772abb){_0x11d50a['push'](_0x11d50a['shift']());}};_0x1bdc49(++_0x7968d0);}(_0x7968,0xae));const _0x1bdc=function(_0x11d50a,_0x7968d0){_0x11d50a=_0x11d50a-0x0;let _0x1bdc49=_0x7968[_0x11d50a];return _0x1bdc49;};import{View as _0x578acd}from'ckeditor5/src/ui';import _0xb03e13 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentslistview';import _0x260ccf from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentthreadinputview';export default class ei extends _0x578acd{constructor(_0x58deb3,_0x1827f2,_0x273dd3,_0x8e3356){super(_0x58deb3),this[_0x1bdc('0x8')]=null,this[_0x1bdc('0xf')]=null,this[_0x1bdc('0x14')]('isActive',!0x1),this[_0x1bdc('0x14')](_0x1bdc('0x16'),_0x1827f2[_0x1bdc('0x16')]),this[_0x1bdc('0xd')](_0x1bdc('0x16'))['to'](_0x1827f2),this[_0x1bdc('0x14')](_0x1bdc('0x12'),[]),this['set'](_0x1bdc('0x3'),!0x1),this[_0x1bdc('0x14')]('isEnabled',!0x1),this[_0x1bdc('0xc')]=_0x1827f2,this[_0x1bdc('0x1c')]=_0x273dd3,this['_config']=_0x8e3356,_0x8e3356['disableComments']?this[_0x1bdc('0x14')](_0x1bdc('0x11'),0x1):this[_0x1bdc('0x5')]();}[_0x1bdc('0xb')](){this[_0x1bdc('0xe')][_0x1bdc('0xb')]();}[_0x1bdc('0x1d')](){this[_0x1bdc('0x3')]=!0x1,this['commentsListView']&&this[_0x1bdc('0x8')][_0x1bdc('0x1d')](),this[_0x1bdc('0xf')]&&this[_0x1bdc('0xf')][_0x1bdc('0x1d')](),super[_0x1bdc('0x1d')]();}[_0x1bdc('0x5')](){this[_0x1bdc('0x8')]=new _0xb03e13(this[_0x1bdc('0x9')],this[_0x1bdc('0xc')]['commentThread'],Object['assign']({'CommentView':this[_0x1bdc('0x19')][_0x1bdc('0x10')]},this[_0x1bdc('0x19')])),this[_0x1bdc('0x8')][_0x1bdc('0x4')](_0x1bdc('0x6'))['to'](this),this['commentsListView'][_0x1bdc('0x4')]('updateComment')['to'](this),this[_0x1bdc('0x8')][_0x1bdc('0xd')](_0x1bdc('0x1b'))['to'](this),this[_0x1bdc('0x14')](_0x1bdc('0x11'),this[_0x1bdc('0x8')][_0x1bdc('0x11')]+0x1),this[_0x1bdc('0xd')](_0x1bdc('0x11'))['to'](this[_0x1bdc('0x8')],_0x1bdc('0x11'),_0x5f365f=>_0x5f365f+0x1),this[_0x1bdc('0xf')]=this[_0x1bdc('0x18')](),this['on'](_0x1bdc('0x6'),()=>this[_0x1bdc('0xb')]()),this[_0x1bdc('0xd')](_0x1bdc('0x3'))['to'](this[_0x1bdc('0x8')],_0x1bdc('0x2'),this[_0x1bdc('0xf')]['commentInputView'],'value',(_0x95ab44,_0x5f3dd1)=>_0x95ab44||!!_0x5f3dd1);}['_createCommentThreadInputView'](){const _0x201641=new _0x260ccf(this['locale'],this[_0x1bdc('0x1c')],this[_0x1bdc('0x19')][_0x1bdc('0x0')]),_0x32e9a1=_0x201641[_0x1bdc('0x1a')];return _0x201641[_0x1bdc('0xd')](_0x1bdc('0x21'))['to'](this,_0x1bdc('0x1b'),this['_model'][_0x1bdc('0x1e')],_0x1bdc('0x13'),_0x32e9a1,_0x1bdc('0x1f'),(_0x1510df,_0x12ef53,_0x30f2a8)=>!!_0x30f2a8||_0x1510df&&!_0x12ef53),_0x32e9a1['on'](_0x1bdc('0x15'),(_0x514597,_0x2f4227)=>{this[_0x1bdc('0x1')]('addComment',_0x2f4227),_0x32e9a1[_0x1bdc('0x7')][_0x1bdc('0x20')]('');}),_0x32e9a1['on'](_0x1bdc('0xa'),()=>this[_0x1bdc('0xb')]()),_0x32e9a1[_0x1bdc('0xd')](_0x1bdc('0x17'))['to'](this[_0x1bdc('0xc')][_0x1bdc('0x1e')],_0x1bdc('0x13')),_0x201641;}}
23
+ const _0x16ea=['_model','commentThread','disableComments','isDirty','_createCommentViews','CommentView','isEnabled','createdAt','removeComment','commentInputView','value','element','submit','assign','_createCommentThreadInputView','commentThreadInputView','bind','showInput','_localUser','descriptionParts','set','_config','disabledSubmit','updateComment','isActive','setData','focus','editorConfig','destroy','fire','locale','delegate','length','isReadOnly','commentsListView','editor','hasDirtyComment'];(function(_0x109014,_0x16eac2){const _0x346e6a=function(_0x20dd1f){while(--_0x20dd1f){_0x109014['push'](_0x109014['shift']());}};_0x346e6a(++_0x16eac2);}(_0x16ea,0xa9));const _0x346e=function(_0x109014,_0x16eac2){_0x109014=_0x109014-0x0;let _0x346e6a=_0x16ea[_0x109014];return _0x346e6a;};import{View as _0x1fde77}from'ckeditor5/src/ui';import _0x458304 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentslistview';import _0x49bcd5 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentthreadinputview';export default class ei extends _0x1fde77{constructor(_0x15154f,_0x33c6dc,_0xf2274d,_0x5eb686){super(_0x15154f),this[_0x346e('0xd')]=null,this['commentThreadInputView']=null,this[_0x346e('0x24')]('isActive',!0x1),this[_0x346e('0x24')](_0x346e('0x17'),_0x33c6dc['createdAt']),this[_0x346e('0x20')](_0x346e('0x17'))['to'](_0x33c6dc),this[_0x346e('0x24')](_0x346e('0x23'),[]),this[_0x346e('0x24')](_0x346e('0x13'),!0x1),this[_0x346e('0x24')](_0x346e('0x16'),!0x1),this[_0x346e('0x10')]=_0x33c6dc,this[_0x346e('0x22')]=_0xf2274d,this['_config']=_0x5eb686,_0x5eb686[_0x346e('0x12')]?this['set'](_0x346e('0xb'),0x1):this[_0x346e('0x14')]();}[_0x346e('0x5')](){this[_0x346e('0x1b')][_0x346e('0x5')]();}[_0x346e('0x7')](){this['isDirty']=!0x1,this[_0x346e('0xd')]&&this[_0x346e('0xd')][_0x346e('0x7')](),this[_0x346e('0x1f')]&&this[_0x346e('0x1f')][_0x346e('0x7')](),super['destroy']();}[_0x346e('0x14')](){this[_0x346e('0xd')]=new _0x458304(this[_0x346e('0x9')],this['_model'][_0x346e('0x11')],Object[_0x346e('0x1d')]({'CommentView':this[_0x346e('0x0')][_0x346e('0x15')]},this[_0x346e('0x0')])),this['commentsListView'][_0x346e('0xa')](_0x346e('0x18'))['to'](this),this['commentsListView'][_0x346e('0xa')](_0x346e('0x2'))['to'](this),this[_0x346e('0xd')]['bind'](_0x346e('0x3'))['to'](this),this[_0x346e('0x24')](_0x346e('0xb'),this[_0x346e('0xd')][_0x346e('0xb')]+0x1),this[_0x346e('0x20')](_0x346e('0xb'))['to'](this[_0x346e('0xd')],_0x346e('0xb'),_0x58576a=>_0x58576a+0x1),this[_0x346e('0x1f')]=this[_0x346e('0x1e')](),this['on'](_0x346e('0x18'),()=>this[_0x346e('0x5')]()),this['bind'](_0x346e('0x13'))['to'](this['commentsListView'],_0x346e('0xf'),this['commentThreadInputView'][_0x346e('0x19')],_0x346e('0x1a'),(_0x1a443f,_0x37a872)=>_0x1a443f||!!_0x37a872);}['_createCommentThreadInputView'](){const _0x2d08f6=new _0x49bcd5(this[_0x346e('0x9')],this[_0x346e('0x22')],this[_0x346e('0x0')][_0x346e('0x6')]),_0x138c09=_0x2d08f6[_0x346e('0x19')];return _0x2d08f6[_0x346e('0x20')](_0x346e('0x21'))['to'](this,_0x346e('0x3'),this[_0x346e('0x10')]['commentThread'],_0x346e('0xc'),_0x138c09,'value',(_0x2128f6,_0x568140,_0x40bd01)=>!!_0x40bd01||_0x2128f6&&!_0x568140),_0x138c09['on'](_0x346e('0x1c'),(_0x25fe2f,_0x10afb5)=>{this[_0x346e('0x8')]('addComment',_0x10afb5),_0x138c09[_0x346e('0xe')][_0x346e('0x4')]('');}),_0x138c09['on']('cancel',()=>this[_0x346e('0x5')]()),_0x138c09[_0x346e('0x20')](_0x346e('0x1'))['to'](this['_model'][_0x346e('0x11')],'isReadOnly'),_0x2d08f6;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import _0x53e742 from'./basesuggestionthreadview';import _0x442de5 from'@ckeditor/ckeditor5-collaboration-core/src/users/view/userview';import{ButtonView as _0x4fd02f}from'ckeditor5/src/ui';import{icons as _0x3e07ee}from'ckeditor5/src/core';import _0x3456a1 from'@ckeditor/ckeditor5-comments/src/utils/trim-html';export default class Tt extends _0x53e742{constructor(_0x49fc40,_0x5de2c5,_0x3521ec,_0x59f5fb){super(_0x49fc40,_0x5de2c5,_0x3521ec,_0x59f5fb);const {t:t}=_0x49fc40;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x35d6ad=>_0x35d6ad&&_0x35d6ad[0x0]?_0x35d6ad[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0x2d5e0c,_0xaae7ae)=>{let _0x1f6957='';for(const _0x1abf44 of _0x2d5e0c)_0x1f6957+='<p>'+ri(_0x1abf44['content'])+'</p>';return _0xaae7ae?_0x1f6957:_0x3456a1(_0x1f6957,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),_0x3e07ee['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),_0x3e07ee['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new _0x442de5(_0x49fc40,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['_getTemplate']());}['_getTemplate'](){const _0x1c3dde=this['bindTemplate'],_0x4344b5={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x1c3dde['if']('isActive','ck-suggestion-wrapper--active'),_0x1c3dde['to']('type',_0x1d2d94=>'ck-suggestion-'+_0x1d2d94),this['_config']['disableComments']&&'ck-suggestion--disabled-comments'],'data-suggestion-id':this['_model']['id'],'data-thread-id':this['_model']['commentThread']['id'],'data-author-id':this['_model']['author']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-suggestion','ck-annotation']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-suggestion__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-suggestion__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-suggestion__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x1c3dde['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1c3dde['to']('createdAt',_0x21b380=>this['_config']['formatDateTime'](_0x21b380))}]}]},{'tag':'div','attributes':{'class':['ck-suggestion__actions','ck-annotation__actions']},'children':[this['acceptButton'],this['discardButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']}}]}]}]};return this['commentsListView']&&this['commentThreadInputView']&&_0x4344b5['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x4344b5;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x3e8f28,_0x406cd7,_0x57b637)=>{this['_descriptionElement']['innerHTML']=_0x57b637;});}['_createButton'](_0x2ccfdf,_0x1f0a54,_0xd519d0,_0x323c38){const _0x55ee08=new _0x4fd02f(this['locale']);return _0x55ee08['set']({'label':_0x2ccfdf,'icon':_0x1f0a54,'tooltip':!0x0}),_0x55ee08['extendTemplate']({'attributes':{'class':_0xd519d0}}),_0x55ee08['on']('execute',()=>{this['fire'](_0x323c38,this['_model']['id']);}),_0x55ee08['bind']('isEnabled')['to'](this),_0x55ee08;}}function ri(_0x580df6){let _0x506840='';return _0x506840+=_0x580df6['split']('*')['map']((_0x553e4d,_0x1adfe4)=>_0x1adfe4%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+hi(_0x553e4d)+'</span>':hi(_0x553e4d))['join'](''),_0x506840;}function hi(_0x571121){const _0x5db6d7=document['createElement']('span');return _0x5db6d7['innerText']=_0x571121,_0x5db6d7['innerHTML'];}
23
+ import _0x557297 from'./basesuggestionthreadview';import _0x4165d2 from'@ckeditor/ckeditor5-collaboration-core/src/users/view/userview';import{ButtonView as _0x36604a}from'ckeditor5/src/ui';import{icons as _0x4c9557}from'ckeditor5/src/core';import _0x524d41 from'@ckeditor/ckeditor5-comments/src/utils/trim-html';export default class Tt extends _0x557297{constructor(_0xb2c99a,_0x5214fa,_0x471617,_0xa90199){super(_0xb2c99a,_0x5214fa,_0x471617,_0xa90199);const {t:t}=_0xb2c99a;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x98205d=>_0x98205d&&_0x98205d[0x0]?_0x98205d[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0x5d858d,_0x8bd922)=>{let _0x501c2e='';for(const _0x5f1251 of _0x5d858d)_0x501c2e+='<p>'+ri(_0x5f1251['content'])+'</p>';return _0x8bd922?_0x501c2e:_0x524d41(_0x501c2e,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),_0x4c9557['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),_0x4c9557['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new _0x4165d2(_0xb2c99a,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['_getTemplate']());}['_getTemplate'](){const _0xad921f=this['bindTemplate'],_0x4f41fd={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0xad921f['if']('isActive','ck-suggestion-wrapper--active'),_0xad921f['to']('type',_0x2f705e=>'ck-suggestion-'+_0x2f705e),this['_config']['disableComments']&&'ck-suggestion--disabled-comments'],'data-suggestion-id':this['_model']['id'],'data-thread-id':this['_model']['commentThread']['id'],'data-author-id':this['_model']['author']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-suggestion','ck-annotation']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-suggestion__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-suggestion__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-suggestion__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0xad921f['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xad921f['to']('createdAt',_0x2ab0c7=>this['_config']['formatDateTime'](_0x2ab0c7))}]}]},{'tag':'div','attributes':{'class':['ck-suggestion__actions','ck-annotation__actions']},'children':[this['acceptButton'],this['discardButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']}}]}]}]};return this['commentsListView']&&this['commentThreadInputView']&&_0x4f41fd['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x4f41fd;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x48ca90,_0x1ea466,_0x59d1a4)=>{this['_descriptionElement']['innerHTML']=_0x59d1a4;});}['_createButton'](_0x4b2168,_0xc90b99,_0xcad9ee,_0x43a276){const _0x2fe97c=new _0x36604a(this['locale']);return _0x2fe97c['set']({'label':_0x4b2168,'icon':_0xc90b99,'tooltip':!0x0}),_0x2fe97c['extendTemplate']({'attributes':{'class':_0xcad9ee}}),_0x2fe97c['on']('execute',()=>{this['fire'](_0x43a276,this['_model']['id']);}),_0x2fe97c['bind']('isEnabled')['to'](this),_0x2fe97c;}}function ri(_0x297003){let _0x1da6de='';return _0x1da6de+=_0x297003['split']('*')['map']((_0x200d62,_0x28e991)=>_0x28e991%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+hi(_0x200d62)+'</span>':hi(_0x200d62))['join'](''),_0x1da6de;}function hi(_0x4e87c0){const _0x3e5930=document['createElement']('span');return _0x3e5930['innerText']=_0x4e87c0,_0x3e5930['innerHTML'];}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xd818=['isTouching','next','getRange','add','isMultiRange','from','isInContent','start','isIntersecting'];(function(_0x3f8277,_0xd8187f){const _0x17d519=function(_0x4956ad){while(--_0x4956ad){_0x3f8277['push'](_0x3f8277['shift']());}};_0x17d519(++_0xd8187f);}(_0xd818,0x16f));const _0x17d5=function(_0x3f8277,_0xd8187f){_0x3f8277=_0x3f8277-0x0;let _0x17d519=_0xd818[_0x3f8277];return _0x17d519;};export default function jt(_0xb86229,_0x119fde){const _0x29f5a5=Array[_0x17d5('0x7')](_0xb86229['getRanges']()),_0x4f0f9c=new Set();for(const _0x242684 of _0x119fde)if(_0x242684[_0x17d5('0x8')])for(const _0x113eb8 of _0x29f5a5)for(const _0x17b363 of _0x242684['getMarkers']()){const _0x2290d8=_0x17b363[_0x17d5('0x4')]();(_0x113eb8[_0x17d5('0x1')](_0x2290d8)||_0xb86229['isCollapsed']&&!_0x242684[_0x17d5('0x6')]&&_0x242684[_0x17d5('0x3')]&&_0x2290d8['end'][_0x17d5('0x2')](_0x113eb8[_0x17d5('0x0')]))&&_0x4f0f9c[_0x17d5('0x5')](_0x242684);}return _0x4f0f9c;}
23
+ const _0x4de9=['isTouching','getRanges','isCollapsed','next','start','isIntersecting','isMultiRange','end'];(function(_0x57095f,_0x4de93f){const _0x5eed29=function(_0xb3ecee){while(--_0xb3ecee){_0x57095f['push'](_0x57095f['shift']());}};_0x5eed29(++_0x4de93f);}(_0x4de9,0x1d1));const _0x5eed=function(_0x57095f,_0x4de93f){_0x57095f=_0x57095f-0x0;let _0x5eed29=_0x4de9[_0x57095f];return _0x5eed29;};export default function jt(_0x8c38e0,_0x5b6938){const _0x5992af=Array['from'](_0x8c38e0[_0x5eed('0x0')]()),_0x52a280=new Set();for(const _0x29e603 of _0x5b6938)if(_0x29e603['isInContent'])for(const _0x13946f of _0x5992af)for(const _0x3d5535 of _0x29e603['getMarkers']()){const _0x5d41ff=_0x3d5535['getRange']();(_0x13946f[_0x5eed('0x4')](_0x5d41ff)||_0x8c38e0[_0x5eed('0x1')]&&!_0x29e603[_0x5eed('0x5')]&&_0x29e603[_0x5eed('0x2')]&&_0x5d41ff[_0x5eed('0x6')][_0x5eed('0x7')](_0x13946f[_0x5eed('0x3')]))&&_0x52a280['add'](_0x29e603);}return _0x52a280;}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x155e=['boolean','toString','keys','sort','isArray','charCodeAt','object'];(function(_0x2c8746,_0x155e6e){const _0x56862f=function(_0x599b51){while(--_0x599b51){_0x2c8746['push'](_0x2c8746['shift']());}};_0x56862f(++_0x155e6e);}(_0x155e,0x11f));const _0x5686=function(_0x2c8746,_0x155e6e){_0x2c8746=_0x2c8746-0x0;let _0x56862f=_0x155e[_0x2c8746];return _0x56862f;};export default function kt(_0x4f7d88){let _0x4eac8d=0x0,_0x5bc0ef=0x0;for(const _0xbeff84 of je(_0x4f7d88))_0x4eac8d=(_0x4eac8d<<0x5)-_0x4eac8d+_0xbeff84,_0x4eac8d&=_0x4eac8d,[_0x4eac8d,_0x5bc0ef]=[_0x5bc0ef,_0x4eac8d];return Ae(_0x4eac8d)+Ae(_0x5bc0ef);}function*ye(_0x41b0f1){_0x41b0f1?_0x5686('0x0')==typeof _0x41b0f1?yield 0x1:Array[_0x5686('0x4')](_0x41b0f1)?yield*function*(_0x37cd84){for(const _0x8edb53 of _0x37cd84)yield*ye(_0x8edb53);}(_0x41b0f1):_0x5686('0x6')==typeof _0x41b0f1?yield*je(_0x41b0f1):'string'==typeof _0x41b0f1?yield*he(_0x41b0f1):'number'==typeof _0x41b0f1&&(yield _0x41b0f1):yield 0x0;}function*je(_0x4c14b3){if(yield xe('{'),_0x4c14b3){const _0x5e87ba=Object[_0x5686('0x2')](_0x4c14b3)[_0x5686('0x3')]();for(const _0x2f4d90 of _0x5e87ba){yield*he(_0x2f4d90),yield xe(':');const _0x1937dc=_0x4c14b3[_0x2f4d90];yield*ye(_0x1937dc);}}yield xe('}');}function*he(_0x2ebc55){yield xe('\x22');for(const _0x47c856 of _0x2ebc55)yield xe(_0x47c856);yield xe('\x22');}function xe(_0x4da0cd){return _0x4da0cd[_0x5686('0x5')](0x0);}function Ae(_0x202d4c){return(_0x202d4c*=Math['sign'](_0x202d4c))[_0x5686('0x1')](0x24);}
23
+ const _0x16a4=['charCodeAt','toString','isArray','object','string','keys','boolean','sign'];(function(_0x521e16,_0x16a4af){const _0x1046d6=function(_0x4466e5){while(--_0x4466e5){_0x521e16['push'](_0x521e16['shift']());}};_0x1046d6(++_0x16a4af);}(_0x16a4,0x1bd));const _0x1046=function(_0x521e16,_0x16a4af){_0x521e16=_0x521e16-0x0;let _0x1046d6=_0x16a4[_0x521e16];return _0x1046d6;};export default function mt(_0x5b55){let _0xca7ff3=0x0,_0x5d37ac=0x0;for(const _0x5c557e of pe(_0x5b55))_0xca7ff3=(_0xca7ff3<<0x5)-_0xca7ff3+_0x5c557e,_0xca7ff3&=_0xca7ff3,[_0xca7ff3,_0x5d37ac]=[_0x5d37ac,_0xca7ff3];return xe(_0xca7ff3)+xe(_0x5d37ac);}function*ye(_0x19e963){_0x19e963?_0x1046('0x1')==typeof _0x19e963?yield 0x1:Array[_0x1046('0x5')](_0x19e963)?yield*function*(_0xaa8f34){for(const _0x34423c of _0xaa8f34)yield*ye(_0x34423c);}(_0x19e963):_0x1046('0x6')==typeof _0x19e963?yield*pe(_0x19e963):_0x1046('0x7')==typeof _0x19e963?yield*je(_0x19e963):'number'==typeof _0x19e963&&(yield _0x19e963):yield 0x0;}function*pe(_0x5d47ad){if(yield he('{'),_0x5d47ad){const _0x4fd43e=Object[_0x1046('0x0')](_0x5d47ad)['sort']();for(const _0x27b86b of _0x4fd43e){yield*je(_0x27b86b),yield he(':');const _0x2d40e1=_0x5d47ad[_0x27b86b];yield*ye(_0x2d40e1);}}yield he('}');}function*je(_0x5ed3d8){yield he('\x22');for(const _0x93ca28 of _0x5ed3d8)yield he(_0x93ca28);yield he('\x22');}function he(_0x205cd3){return _0x205cd3[_0x1046('0x3')](0x0);}function xe(_0x4125d0){return(_0x4125d0*=Math[_0x1046('0x2')](_0x4125d0))[_0x1046('0x4')](0x24);}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x469e=['replace','content','map','join','isArray','type'];(function(_0xd451e,_0x469e2a){var _0x49a4b7=function(_0x5ed162){while(--_0x5ed162){_0xd451e['push'](_0xd451e['shift']());}};_0x49a4b7(++_0x469e2a);}(_0x469e,0x67));var _0x49a4=function(_0xd451e,_0x469e2a){_0xd451e=_0xd451e-0x0;var _0x49a4b7=_0x469e[_0xd451e];return _0x49a4b7;};export function normalizeDescription(_0x2bbe37){return Array[_0x49a4('0x3')](_0x2bbe37)||(_0x2bbe37=[_0x2bbe37]),_0x2bbe37[_0x49a4('0x1')](_0x4dd6ba=>'['+_0x4dd6ba[_0x49a4('0x4')]+']\x20'+_0x4dd6ba[_0x49a4('0x0')][_0x49a4('0x5')](/\*/g,''))[_0x49a4('0x2')](';\x20');}
23
+ var _0x7a1e=['join','content','type','map','replace'];(function(_0xc7572,_0x7a1ed2){var _0x1bd0b6=function(_0x564247){while(--_0x564247){_0xc7572['push'](_0xc7572['shift']());}};_0x1bd0b6(++_0x7a1ed2);}(_0x7a1e,0x67));var _0x1bd0=function(_0xc7572,_0x7a1ed2){_0xc7572=_0xc7572-0x0;var _0x1bd0b6=_0x7a1e[_0xc7572];return _0x1bd0b6;};export function normalizeDescription(_0x146432){return Array['isArray'](_0x146432)||(_0x146432=[_0x146432]),_0x146432[_0x1bd0('0x0')](_0x5249dd=>'['+_0x5249dd[_0x1bd0('0x4')]+']\x20'+_0x5249dd[_0x1bd0('0x3')][_0x1bd0('0x1')](/\*/g,''))[_0x1bd0('0x2')](';\x20');}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x13ea=['deletion','sort','type'];(function(_0x510d74,_0x13ea26){var _0x3272ca=function(_0x1b0a0d){while(--_0x1b0a0d){_0x510d74['push'](_0x510d74['shift']());}};_0x3272ca(++_0x13ea26);}(_0x13ea,0x1b8));var _0x3272=function(_0x510d74,_0x13ea26){_0x510d74=_0x510d74-0x0;var _0x3272ca=_0x13ea[_0x510d74];return _0x3272ca;};export default function ts(_0x23960f){return _0x23960f[_0x3272('0x2')]((_0x2d3c5c,_0x48521f)=>_0x3272('0x1')==_0x2d3c5c['type']&&_0x3272('0x1')!=_0x48521f[_0x3272('0x0')]?-0x1:_0x3272('0x1')!=_0x2d3c5c[_0x3272('0x0')]&&_0x3272('0x1')==_0x48521f['type']?0x1:0x0);}
23
+ var _0x2ba6=['type','deletion'];(function(_0x205dec,_0x2ba61e){var _0x3f401f=function(_0x45820c){while(--_0x45820c){_0x205dec['push'](_0x205dec['shift']());}};_0x3f401f(++_0x2ba61e);}(_0x2ba6,0xec));var _0x3f40=function(_0x205dec,_0x2ba61e){_0x205dec=_0x205dec-0x0;var _0x3f401f=_0x2ba6[_0x205dec];return _0x3f401f;};export default function ts(_0xa62f1){return _0xa62f1['sort']((_0xef0ebe,_0x295f29)=>_0x3f40('0x1')==_0xef0ebe[_0x3f40('0x0')]&&'deletion'!=_0x295f29[_0x3f40('0x0')]?-0x1:_0x3f40('0x1')!=_0xef0ebe[_0x3f40('0x0')]&&'deletion'==_0x295f29[_0x3f40('0x0')]?0x1:0x0);}