@ckeditor/ckeditor5-track-changes 31.1.0 → 32.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 (81) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +2 -2
  3. package/lang/contexts.json +1 -1
  4. package/lang/translations/cs.po +3 -3
  5. package/lang/translations/da.po +3 -3
  6. package/lang/translations/de.po +3 -3
  7. package/lang/translations/en-au.po +3 -3
  8. package/lang/translations/en.po +2 -2
  9. package/lang/translations/es.po +2 -2
  10. package/lang/translations/et.po +2 -2
  11. package/lang/translations/fr.po +3 -3
  12. package/lang/translations/gl.po +3 -3
  13. package/lang/translations/hi.po +3 -3
  14. package/lang/translations/hr.po +3 -3
  15. package/lang/translations/it.po +5 -5
  16. package/lang/translations/nl.po +2 -2
  17. package/lang/translations/pl.po +3 -3
  18. package/lang/translations/pt-br.po +5 -5
  19. package/lang/translations/sk.po +3 -3
  20. package/lang/translations/sr-latn.po +3 -3
  21. package/lang/translations/sr.po +3 -3
  22. package/lang/translations/tk.po +3 -3
  23. package/lang/translations/tr.po +3 -3
  24. package/lang/translations/zh-cn.po +3 -3
  25. package/lang/translations/zh.po +2 -2
  26. package/package.json +7 -7
  27. package/src/commands/acceptallsuggestionscommand.js +2 -2
  28. package/src/commands/acceptselectedsuggestionscommand.js +2 -2
  29. package/src/commands/acceptsuggestioncommand.js +2 -2
  30. package/src/commands/discardallsuggestionscommand.js +2 -2
  31. package/src/commands/discardselectedsuggestionscommand.js +2 -2
  32. package/src/commands/discardsuggestioncommand.js +2 -2
  33. package/src/commands/trackchangescommand.js +2 -2
  34. package/src/integrations/alignment.js +2 -2
  35. package/src/integrations/basicstyles.js +2 -2
  36. package/src/integrations/blockquote.js +2 -2
  37. package/src/integrations/codeblock.js +2 -2
  38. package/src/integrations/comments.js +2 -2
  39. package/src/integrations/deletecommand.js +2 -2
  40. package/src/integrations/entercommand.js +2 -2
  41. package/src/integrations/font.js +2 -2
  42. package/src/integrations/heading.js +2 -2
  43. package/src/integrations/highlight.js +2 -2
  44. package/src/integrations/horizontalline.js +2 -2
  45. package/src/integrations/image.js +2 -2
  46. package/src/integrations/indent.js +2 -2
  47. package/src/integrations/inputcommand.js +2 -2
  48. package/src/integrations/link.js +2 -2
  49. package/src/integrations/list.js +2 -2
  50. package/src/integrations/mediaembed.js +2 -2
  51. package/src/integrations/mention.js +2 -2
  52. package/src/integrations/pagebreak.js +2 -2
  53. package/src/integrations/paragraph.js +2 -2
  54. package/src/integrations/removeformat.js +2 -2
  55. package/src/integrations/restrictededitingmode.js +2 -2
  56. package/src/integrations/shiftentercommand.js +2 -2
  57. package/src/integrations/standardeditingmode.js +2 -2
  58. package/src/integrations/table.js +2 -2
  59. package/src/integrations/tableclipboard.js +2 -2
  60. package/src/integrations/tableheadings.js +2 -2
  61. package/src/integrations/tablemergesplit.js +2 -2
  62. package/src/integrations/title.js +2 -2
  63. package/src/integrations/undo.js +2 -2
  64. package/src/integrations/utils.js +2 -2
  65. package/src/suggestion.js +2 -2
  66. package/src/suggestiondescriptionfactory.js +2 -2
  67. package/src/trackchanges.js +2 -2
  68. package/src/trackchangesdata.js +2 -2
  69. package/src/trackchangesediting.js +2 -2
  70. package/src/trackchangesui.js +2 -2
  71. package/src/ui/suggestioncontroller.js +2 -2
  72. package/src/ui/view/basesuggestionthreadview.js +2 -2
  73. package/src/ui/view/suggestionthreadview.js +2 -2
  74. package/src/utils/getselectedsuggestions.js +2 -2
  75. package/src/utils/hashobject.js +2 -2
  76. package/src/utils/normalizedescription.js +2 -2
  77. package/src/utils/sortsuggestions.js +2 -2
  78. package/theme/icons/track-changes-accept.svg +1 -1
  79. package/theme/icons/track-changes-discard.svg +1 -1
  80. package/theme/icons/track-changes.svg +1 -1
  81. package/theme/suggestionmarker.css +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x279550,PendingActions as _0x4d14bf}from'ckeditor5/src/core';import _0xc43de from'@ckeditor/ckeditor5-collaboration-core/src/users';import{LiveRange as _0x1b3715}from'ckeditor5/src/engine';import{CKEditorError as _0x44c973,uid as _0x3b1025,priorities as _0x3acfcb,EmitterMixin as _0x3d6fbb,mix as _0x2e9c45}from'ckeditor5/src/utils';import _0x144b4c from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x4d7753 from'./commands/trackchangescommand';import _0x59bf4d from'./commands/acceptsuggestioncommand';import _0x4ff08b from'./commands/discardsuggestioncommand';import _0x2bb79a from'./commands/acceptallsuggestionscommand';import _0xf8ea7f from'./commands/acceptselectedsuggestionscommand';import _0xfdc890 from'./commands/discardallsuggestionscommand';import _0x2d6ce7 from'./commands/discardselectedsuggestionscommand';import _0x2f7912 from'./suggestion';import _0x51a516 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x3b3f29 from'./integrations/alignment';import _0x34dc54 from'./integrations/basicstyles';import _0x4dd0a8 from'./integrations/blockquote';import _0x57bca1 from'./integrations/codeblock';import _0xd931b9 from'./integrations/comments';import _0x2d7637 from'./integrations/deletecommand';import _0x22f9fb from'./integrations/entercommand';import _0x5859e9 from'./integrations/font';import _0x33c466 from'./integrations/heading';import _0x2ef255 from'./integrations/highlight';import _0x5d1b81 from'./integrations/horizontalline';import _0x3ad48b from'./integrations/image';import _0x1d85d9 from'./integrations/indent';import _0xdcf1af from'./integrations/inputcommand';import _0x53d05d 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 _0x279550{static get['requires'](){return[_0xc43de,_0x4d14bf,_0x144b4c,_0x3b3f29,_0x34dc54,_0x4dd0a8,_0x57bca1,_0xd931b9,_0x2d7637,_0x22f9fb,_0x5859e9,_0x33c466,_0x2ef255,_0x5d1b81,_0x3ad48b,_0x1d85d9,_0xdcf1af,_0x53d05d,tt,it,st,nt,et,ot,rt,at,ct,ht,ut,ft,gt,lt,dt];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x5652b0){function _0x27d909(_0x2d48b7){return _0x2d48b7['map'](_0x39c505=>String['fromCharCode'](_0x39c505))['join']('');}super(_0x5652b0),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x1f4a1d,_0x118c3e,_0x5c0424,_0x28576f)=>{this['_model']['change'](_0x495d75=>{for(const _0x5c844f of[..._0x28576f,..._0x5c0424])this['_model']['markers']['has'](_0x5c844f)&&_0x495d75['updateMarker'](_0x5c844f);});}),this['_descriptionFactory']=new _0x51a516(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new kt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x5652b0['plugins']['get'](_0x144b4c),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x27d909([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x27d909([0x34,0x30,0x34,0x32,0x32,0x34,0x31,0x34]);}['init'](){const _0xa2f10b=this['editor'];_0xa2f10b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x7e0fe2=>{const {id:_0x25544a,type:_0x48f861}=this['_splitMarkerName'](_0x7e0fe2['markerName']),_0x40aac9=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48f861];let _0x42ac56=0xbb8;return this['activeMarkers']['includes'](_0x7e0fe2['markerName'])&&(_0x40aac9['push']('ck-suggestion-marker--active'),_0x42ac56=0xbc2),'deletion'==_0x48f861&&(_0x42ac56+=0x5),{'classes':_0x40aac9,'attributes':{'data-suggestion':_0x25544a},'priority':_0x42ac56};}}),_0xa2f10b['conversion']['for']('dataDowncast')['add'](_0x44a60f=>{_0x44a60f['on']('addMarker:suggestion',(_0x7b07e2,_0x307184,_0x53543b)=>{if(!_0x53543b['options']['showSuggestionHighlights'])return;const _0x408e9f=_0x307184['item'];if(!_0x408e9f)return;const _0x324ffc=_0x53543b['mapper']['toViewElement'](_0x408e9f);_0xa2f10b['model']['schema']['isObject'](_0x408e9f)&&_0x324ffc&&!_0x324ffc['getCustomProperty']('widget')&&_0x324ffc['is']('containerElement')&&pt(_0x324ffc,_0x53543b['writer']);},{'priority':'high'});}),_0xa2f10b['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x21fbd9,_0x252c2e)=>{if(!_0x252c2e['options']['showSuggestionHighlights'])return null;const {type:_0xb5c043}=this['_splitMarkerName'](_0x21fbd9['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0xb5c043],'priority':0xbb8};}});const _0x222c29=({showActiveMarkers:_0x2492df=!0x0}={})=>(_0x17fa41,_0x5736a8,_0x193d3e)=>{if(!_0x5736a8['item'])return;if(_0x5736a8['item']['is']('selection'))return void _0x193d3e['consumable']['consume'](_0x5736a8['item'],_0x17fa41['name']);const _0x1d2d2b=_0x193d3e['mapper']['toViewElement'](_0x5736a8['item']);if(!(_0x5736a8['item']['is']('element')&&_0xa2f10b['model']['schema']['isBlock'](_0x5736a8['item'])&&!_0x1d2d2b['getCustomProperty']('addHighlight')))return;const {id:_0x2020de}=this['_splitMarkerName'](_0x5736a8['markerName']);_0x193d3e['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x1d2d2b),_0x193d3e['writer']['setAttribute']('data-suggestion',_0x2020de,_0x1d2d2b),_0x193d3e['mapper']['bindElementToMarker'](_0x1d2d2b,_0x5736a8['markerName']),_0x2492df&&(this['activeMarkers']['includes'](_0x5736a8['markerName'])?_0x193d3e['writer']['addClass']('ck-suggestion-marker--active',_0x1d2d2b):_0x193d3e['writer']['removeClass']('ck-suggestion-marker--active',_0x1d2d2b));for(const _0x58ade1 of _0xa2f10b['model']['createRangeIn'](_0x5736a8['item'])['getItems']())_0x193d3e['consumable']['consume'](_0x58ade1,_0x17fa41['name']);_0x193d3e['consumable']['consume'](_0x5736a8['item'],_0x17fa41['name']);};_0xa2f10b['conversion']['for']('dataDowncast')['add'](_0x224521=>{_0x224521['on']('addMarker:suggestion:formatBlock',(_0x3d9d47,_0x370fbd,_0x853bcd)=>{_0x853bcd['options']['showSuggestionHighlights']&&_0x222c29({'showActiveMarkers':!0x1})(_0x3d9d47,_0x370fbd,_0x853bcd);},{'priority':'highest'});}),_0xa2f10b['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x33edb9,_0x133ae1)=>_0x133ae1['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x33edb9['substr']('suggestion'['length']+0x1)}}),_0xa2f10b['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x5c76fb,{writer:_0x53234a})=>{let _0x1337cf='suggestion:'+_0x5c76fb['getAttribute']('suggestion-type')+':'+_0x5c76fb['getAttribute']('id');return _0x5c76fb['getAttribute']('marker-count')&&(_0x1337cf+=':'+_0x5c76fb['getAttribute']('marker-count')),_0x53234a['createElement']('$marker',{'data-name':_0x1337cf});}}),_0xa2f10b['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0xa2f10b['conversion']['for']('editingDowncast')['add'](_0x2c9ad4=>{_0x2c9ad4['on']('addMarker:suggestion:formatBlock',_0x222c29(),{'priority':'high'});}),_0xa2f10b['conversion']['for']('editingDowncast')['add'](_0x5f0591=>{_0x5f0591['on']('removeMarker:suggestion:formatBlock',(_0x51a5bc,_0x2f05b7,_0x596584)=>{const _0x3db16e=_0x596584['mapper']['markerNameToElements'](_0x2f05b7['markerName']);if(_0x3db16e)for(const _0x45eb3f of _0x3db16e)_0x45eb3f['getCustomProperty']('addHighlight')||(_0x596584['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x45eb3f),_0x596584['writer']['removeAttribute']('data-suggestion',_0x45eb3f),_0x596584['mapper']['unbindElementFromMarkerName'](_0x45eb3f,_0x2f05b7['markerName']));},{'priority':'high'});}),_0xa2f10b['model']['document']['registerPostFixer'](_0x5af299=>{let _0x24c818=!0x1;const _0x5ba9a9=Array['from'](_0xa2f10b['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x208652,data:_0x4216eb}of _0x5ba9a9){const {group:_0x4418f8,type:_0x2df1a6,id:_0x28df0e}=this['_splitMarkerName'](_0x208652);if('suggestion'!==_0x4418f8)continue;const _0x2fdfb8=this['_suggestions']['get'](_0x28df0e);if(null!=_0x4216eb['newRange']){'formatInline'==_0x2df1a6&&(_0x24c818=_0x24c818||St(_0x4216eb['newRange'],_0x208652,_0x5af299,_0xa2f10b['model']['schema']));if(_0x4216eb['newRange']['isCollapsed']||'$graveyard'==_0x4216eb['newRange']['root']['rootName']||'formatBlock'==_0x2df1a6&&!It(_0x4216eb['newRange'])||'deletion'==_0x2df1a6&&!(!yt(_0x27d764=_0x4216eb['newRange'])&&!function(_0xd9093e){return _0xd9093e['start']['parent']==_0xd9093e['end']['nodeBefore']&&_0xd9093e['start']['isAtEnd'];}(_0x27d764)))_0x5af299['removeMarker'](_0x208652),_0x24c818=!0x0;else{if(!_0x2fdfb8||!_0x2fdfb8['isInContent'])continue;_0x24c818=!!this['_joinWithAdjacentSuggestions'](_0x2fdfb8)||_0x24c818;}}}var _0x27d764;return _0x24c818;}),_0xa2f10b['model']['document']['registerPostFixer'](_0x27af98=>{let _0x4b7e75=!0x1;for(const _0x1f4818 of _0xa2f10b['model']['document']['differ']['getChanges']()){if('insert'!=_0x1f4818['type'])continue;const _0x523b72=_0x1f4818['position']['getShiftedBy'](_0x1f4818['length']);if(_0x523b72['isAtEnd'])for(const _0x5bde73 of this['_suggestions']['values']()){if(_0x5bde73['isMultiRange']||!_0x5bde73['isInContent'])continue;if('formatBlock'!=_0x5bde73['type'])continue;const _0x25cd41=_0x5bde73['getFirstRange']();if(_0x25cd41['start']['parent']!=_0x25cd41['end']['parent']&&_0x25cd41['end']['isEqual'](_0x1f4818['position'])){const _0x1ee3ae=_0xa2f10b['model']['createRange'](_0x25cd41['start'],_0x523b72);_0x27af98['updateMarker'](_0x5bde73['getFirstMarker'](),{'range':_0x1ee3ae}),_0x4b7e75=!0x0;}}}return _0x4b7e75;}),_0xa2f10b['model']['markers']['on']('update:suggestion',(_0x285f93,_0x188ca2,_0x4aab93)=>{if(null==_0x4aab93){const {id:_0x4d5c39}=this['_splitMarkerName'](_0x188ca2['name']),_0x31e463=this['_suggestions']['get'](_0x4d5c39);_0x31e463&&_0x31e463['addMarkerName'](_0x188ca2['name']);}}),_0xa2f10b['model']['document']['on']('change:data',()=>{const _0x3ec672=Array['from'](_0xa2f10b['model']['document']['differ']['getChangedMarkers']());_0x3ec672['sort']((_0x2214d1,_0x564877)=>{const _0x5a3fd6=_0x2214d1['data']['oldRange'],_0x40ae88=_0x564877['data']['oldRange'];return null===_0x5a3fd6&&null===_0x40ae88?0x0:null===_0x5a3fd6&&null!==_0x40ae88?-0x1:null!==_0x5a3fd6&&null===_0x40ae88?0x1:_0x5a3fd6['start']['isBefore'](_0x40ae88['start'])?-0x1:0x1;});const _0x3aa73f=new Set();for(const {name:_0x5bd02c,data:_0x34e35f}of _0x3ec672){const {group:_0x1c0d60,id:_0x56be75}=this['_splitMarkerName'](_0x5bd02c);if('suggestion'===_0x1c0d60&&(null===_0x34e35f['oldRange']&&this['_handleNewSuggestionMarker'](_0x5bd02c),null===_0x34e35f['newRange'])){const _0x283b72=this['_suggestions']['get'](_0x56be75);_0x283b72['isInContent']?_0x3aa73f['add'](_0x283b72):this['_removeSuggestion'](_0x283b72);}}for(const {name:_0x492943,data:_0x4bdf3e}of _0x3ec672){const {group:_0x2843db,id:_0x501387}=this['_splitMarkerName'](_0x492943);if('suggestion'!==_0x2843db)continue;const _0x5b496d=this['_suggestions']['get'](_0x501387);null!=_0x4bdf3e['newRange']&&null!=_0x4bdf3e['oldRange']&&(this['_refreshSuggestionsChain'](_0x5b496d),_0x3aa73f['add'](_0x5b496d['head']));}for(const _0x2b052b of _0x3aa73f)this['fire']('suggestionChanged',_0x2b052b);_0x3aa73f['clear']();}),_0xa2f10b['model']['on']('applyOperation',(_0x204ccf,_0x35ef5b)=>{const _0x5df91f=_0x35ef5b[0x0];if(!this['_suggestions']['size'])return;if(!_0x5df91f['isDocumentOperation'])return;if('transparent'==_0x5df91f['batch']['type'])return;let _0x41e6a6,_0x32aa1a;switch(_0x5df91f['type']){case'insert':_0x41e6a6=_0xa2f10b['model']['createPositionAt'](_0x5df91f['position']),_0x32aa1a=_0x41e6a6['getShiftedBy'](_0x5df91f['howMany']);break;case'split':_0x41e6a6=_0xa2f10b['model']['createPositionAt'](_0x5df91f['splitPosition']),_0x32aa1a=_0xa2f10b['model']['createPositionAt'](_0x5df91f['moveTargetPosition']);break;case'move':_0x41e6a6=_0xa2f10b['model']['createPositionAt'](_0x5df91f['targetPosition']),_0x32aa1a=_0x41e6a6['getShiftedBy'](_0x5df91f['howMany']);break;default:return;}const _0x232bea=_0xa2f10b['model']['createRange'](_0x41e6a6,_0x32aa1a);_0xa2f10b['model']['change'](()=>{for(const {suggestion:_0xd380ff,meta:_0x3b1859}of this['_findSuggestions'](_0x232bea)){if(_0xd380ff['isMultiRange'])continue;if('formatInline'==_0xd380ff['type'])continue;const _0x13c8cc=_0xd380ff['data']&&_0xd380ff['data']['multipleBlocks'];('formatBlock'!=_0xd380ff['type']||'split'==_0x5df91f['type']&&!_0x13c8cc)&&(_0x3b1859['containsRangeInObject']||'insertion'==_0xd380ff['type']&&_0x3b1859['isOwn']||_0xd380ff['getFirstRange']()['containsRange'](_0x232bea)&&this['_breakSuggestionMarker'](_0xd380ff,_0x41e6a6,_0x32aa1a));}});},{'priority':'lowest'}),_0xa2f10b['model']['on']('deleteContent',(_0x23963b,_0x29616e)=>{const _0x11837f=_0x29616e[0x0],_0x2467e0=_0x29616e[0x1];if(_0x2467e0&&_0x2467e0['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x11837f['isCollapsed'])return;const _0x3d1700=_0xa2f10b['model']['schema'],{start:_0xb7ad32,end:_0x19509b}=_0x11837f['getFirstRange'](),_0x397d2c=_0xb7ad32['nodeAfter']&&_0x3d1700['isObject'](_0xb7ad32['nodeAfter'])?null:_0x3d1700['getNearestSelectionRange'](_0xb7ad32,'forward'),_0x2afdf7=_0x19509b['nodeBefore']&&_0x3d1700['isObject'](_0x19509b['nodeBefore'])?null:_0x3d1700['getNearestSelectionRange'](_0x19509b,'backward'),_0x32f83d=_0xa2f10b['model']['createRange'](_0x397d2c?_0x397d2c['start']:_0xb7ad32,_0x2afdf7?_0x2afdf7['end']:_0x19509b);_0xa2f10b['model']['change'](_0x2493c4=>{this['markDeletion'](_0x32f83d);const _0x34f516=_0xa2f10b['model']['schema']['getNearestSelectionRange'](_0x32f83d['start']);_0x11837f['is']('documentSelection')?_0x2493c4['setSelection'](_0x34f516):_0x11837f['setTo'](_0x34f516);}),_0x23963b['stop']();},{'priority':_0x3acfcb['normal']+0xa}),_0xa2f10b['model']['on']('insertContent',(_0x500ad0,_0x439b95)=>{const _0x1a84a5=_0x439b95[_0x439b95['length']-0x1];_0x1a84a5&&_0x1a84a5['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0xa2f10b['model']['change'](()=>{let _0x37bcdc=_0xa2f10b['model']['insertContent'](_0x439b95[0x0],_0x439b95[0x1],_0x439b95[0x2],_0x439b95[0x3],{'forceDefaultExecution':!0x0});if(!_0x37bcdc)return;_0x500ad0['return']=_0x37bcdc['clone']();const _0x834b0=_0x37bcdc['end']['nodeBefore'],_0x34d72a=_0xa2f10b['model']['schema'];_0x834b0&&_0x34d72a['isBlock'](_0x834b0)&&!_0x34d72a['isObject'](_0x834b0)&&(_0x37bcdc=_0xa2f10b['model']['createRange'](_0x37bcdc['start'],_0xa2f10b['model']['createPositionAt'](_0x834b0,'end'))),this['markInsertion'](_0x37bcdc);}),_0x500ad0['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x4d7753(_0xa2f10b,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x18fafc=new _0x59bf4d(_0xa2f10b,this['_suggestions']);_0xa2f10b['commands']['add']('acceptSuggestion',_0x18fafc),this['enableCommand']('acceptSuggestion');const _0x4eaae4=new _0x4ff08b(_0xa2f10b,this['_suggestions']);_0xa2f10b['commands']['add']('discardSuggestion',_0x4eaae4),this['enableCommand']('discardSuggestion'),_0xa2f10b['commands']['add']('acceptAllSuggestions',new _0x2bb79a(_0xa2f10b,_0x18fafc,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0xa2f10b['commands']['add']('discardAllSuggestions',new _0xfdc890(_0xa2f10b,_0x4eaae4,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0xa2f10b['commands']['add']('acceptSelectedSuggestions',new _0xf8ea7f(_0xa2f10b,_0x18fafc,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0xa2f10b['commands']['add']('discardSelectedSuggestions',new _0x2d6ce7(_0xa2f10b,_0x4eaae4,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x540052=_0xa2f10b['plugins']['get'](_0x144b4c);this['listenTo'](_0x540052,'addComment',(_0x1ac045,{threadId:_0x5c0f38})=>{const _0x498186=this['_suggestions']['get'](_0x5c0f38);_0x498186&&_0x498186['commentThread']&&0x1===_0x498186['commentThread']['length']&&this['_updateSuggestionData'](_0x5c0f38,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x540052,'removeComment',(_0x4d3752,{threadId:_0xe3fd76})=>{const _0x290128=this['_suggestions']['get'](_0xe3fd76);_0x290128&&_0x290128['commentThread']&&!_0x290128['commentThread']['length']&&this['_updateSuggestionData'](_0xe3fd76,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0xf7457a){if(this['_adapter'])throw new _0x44c973('track-changes-adapter-already-set',this);this['_adapter']=_0xf7457a;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x229153=!0x1,toJSON:_0x4abb28=!0x1}={}){const _0x5e908a=[];for(const _0x39d684 of this['_suggestions']['values']())_0x229153&&!_0x39d684['isInContent']||_0x5e908a['push'](_0x39d684);return _0x4abb28?_0x5e908a['map'](_0x4ad82a=>_0x4ad82a['toJSON']()):_0x5e908a;}['getSuggestion'](_0x2f2bae){const _0x17c4cf=this['_suggestions']['get'](_0x2f2bae);if(!_0x17c4cf)throw new _0x44c973('track-changes-suggestion-not-found',this);return _0x17c4cf;}['hasSuggestion'](_0x1a6aa){return this['_suggestions']['has'](_0x1a6aa);}['addSuggestionData'](_0x460782){const {id:_0x2ecea4,authorId:_0x38ee10}=_0x460782,[_0x154e27,_0x55e7e9]=_0x460782['type']['split'](':'),_0x4e18e7=this['_suggestions']['get'](_0x2ecea4)||this['_createSuggestion'](_0x154e27,_0x55e7e9,_0x2ecea4,_0x38ee10);switch(this['_addThreadToSuggestion'](_0x4e18e7),this['_checkSuggestionCorrectness'](_0x4e18e7,_0x154e27,_0x55e7e9||null,_0x38ee10),_0x4e18e7['createdAt']=_0x460782['createdAt'],_0x460782['data']&&(_0x4e18e7['data']=_0x460782['data']),_0x460782['attributes']&&(_0x4e18e7['attributes']=_0x460782['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x4e18e7['_saved']=!0x0),this['_suggestionState']['get'](_0x4e18e7)){case'notReady':this['_suggestionState']['set'](_0x4e18e7,'dataReady');break;case'markerReady':_0x4e18e7['isInContent']?(this['_suggestionState']['set'](_0x4e18e7,'ready'),this['fire']('suggestionLoaded',_0x4e18e7)):this['_suggestionState']['set'](_0x4e18e7,'removed');}return _0x4e18e7;}['acceptSuggestion'](_0x222fc5){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x1237d5 of _0x222fc5['getAllAdjacentSuggestions']())_0x1237d5['accept']();});});}['discardSuggestion'](_0x45e11d){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x1ba131 of _0x45e11d['getAllAdjacentSuggestions']())_0x1ba131['discard']();});});}['enableCommand'](_0x1a9bcb,_0x234ca9){const _0x1e0cda=this['editor']['commands']['get'](_0x1a9bcb);if(!_0x1e0cda)throw new _0x44c973('track-changes-command-not-found',this,{'commandName':_0x1a9bcb});this['_enabledCommands']['add'](_0x1e0cda),_0x234ca9&&_0x1e0cda['on']('execute',(_0x16d20e,_0x5a50f9)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x5a50f9['length']>0x0&&_0x5a50f9[_0x5a50f9['length']-0x1]&&_0x5a50f9[_0x5a50f9['length']-0x1]['forceDefaultExecution']||(_0x234ca9((..._0x3ba2c8)=>_0x1e0cda['execute'](..._0x3ba2c8,{'forceDefaultExecution':!0x0}),..._0x5a50f9),_0x16d20e['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x319334){let _0x211712,_0x30ab09;const _0x48222b=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x211712=_0x319334();}catch(_0x2729dc){_0x30ab09=_0x2729dc;}return _0x48222b||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x30ab09&&_0x44c973['rethrowUnexpectedError'](_0x30ab09,this),_0x211712;}['markInsertion'](_0x23c1ac,_0x5888a3=null,_0x5b503e={}){if(_0x23c1ac['isCollapsed'])return null;const _0x73ec8a=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x9c7be1,meta:_0x5894a3}of this['_findSuggestions'](_0x23c1ac,'insertion'))if(_0x5894a3['isOwn']){if(!_0x5894a3['isNextTo'])return _0x9c7be1;if(_0x5888a3==_0x9c7be1['subType']){const _0x306c67=_0x9c7be1['getFirstRange']();return _0x306c67['start']['isEqual'](_0x23c1ac['end'])?this['_setSuggestionRange'](_0x9c7be1,this['_model']['createRange'](_0x23c1ac['start'],_0x306c67['end'])):this['_setSuggestionRange'](_0x9c7be1,this['_model']['createRange'](_0x306c67['start'],_0x23c1ac['end'])),_0x9c7be1;}}const _0x49df40=_0x3b1025(),_0x391e8e=_0x73ec8a['id'],_0x4f292a=_0x5888a3?'insertion:'+_0x5888a3:'insertion',_0x4a5033=this['_setSuggestionData']({'id':_0x49df40,'type':_0x4f292a,'createdAt':new Date(),'authorId':_0x391e8e,'attributes':_0x5b503e});return this['_addSuggestionMarker'](_0x4f292a,_0x49df40,_0x391e8e,_0x23c1ac),_0x4a5033;}['markMultiRangeInsertion'](_0x2eccb1,_0x2f62f3='multi',_0x43bf2b={}){const _0x1b3e35=this['editor']['plugins']['get']('Users')['me'],_0x2e733e=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x2f62f3,'join');for(const _0x5c005d of this['getSuggestions']())if(_0x5c005d['author']['id']==_0x1b3e35['id']&&'insertion'==_0x5c005d['type']&&_0x5c005d['subType']==_0x2f62f3&&(_0x2e733e(_0x5c005d['getRanges'](),_0x2eccb1)||_0x2e733e(_0x2eccb1,_0x5c005d['getRanges']()))){for(const _0x116853 of _0x2eccb1)_0x5c005d['addRange'](_0x116853);return _0x5c005d;}for(const _0x4cc372 of _0x2eccb1)for(const {suggestion:_0x250907,meta:_0x587c02}of this['_findSuggestions'](_0x4cc372,'insertion')){if(!_0x587c02['isOwn'])continue;let _0x311f82=!0x0;for(const _0x45fc73 of _0x250907['getRanges']())for(const _0x5612a7 of _0x2eccb1)if(!_0x45fc73['containsRange'](_0x5612a7)){_0x311f82=!0x1;break;}if(_0x311f82)return _0x250907;}const _0x2135b1=_0x3b1025(),_0xceb8ae=_0x1b3e35['id'],_0x440c78='insertion:'+_0x2f62f3,_0xff62ba=this['_setSuggestionData']({'id':_0x2135b1,'type':_0x440c78,'createdAt':new Date(),'authorId':_0xceb8ae,'attributes':_0x43bf2b});for(const _0x2560f7 of _0x2eccb1)this['_addSuggestionMarker'](_0x440c78,_0x2135b1,_0xceb8ae,_0x2560f7,_0x2f7912['getMultiRangeId']());return _0xff62ba;}['markInlineFormat'](_0x474b41,_0x3f39fd,_0x34bc29=null,_0x221017={}){if(_0x34bc29=_0x34bc29||bt(_0x3f39fd),_0x474b41['isCollapsed'])return;const _0x34722d=this['editor']['plugins']['get']('Users')['me'],_0x2121c6=[];for(const {suggestion:_0x4f6887,meta:_0x49fa73}of this['_findSuggestions'](_0x474b41,'insertion'))_0x49fa73['isOwn']&&!_0x49fa73['isInsideObject']&&_0x2121c6['push'](..._0x4f6887['getRanges']());const _0x8b6ea2=function(_0x52a53b,_0x39195b){const _0x5cb644=[];for(const _0x4f439f of _0x39195b){const _0x12129c=_0x52a53b['getIntersection'](_0x4f439f);_0x12129c&&_0x5cb644['push'](_0x12129c);}return _0x5cb644;}(_0x474b41,_0x2121c6),_0x3cfa02=function(_0x37a7cf,_0x5a8e9d){const _0x319cd1=[_0x37a7cf];for(const _0x5b3856 of _0x5a8e9d){let _0x5027d1=0x0;for(;_0x5027d1<_0x319cd1['length'];){const _0xe281bc=_0x319cd1[_0x5027d1]['getDifference'](_0x5b3856);_0x319cd1['splice'](_0x5027d1,0x1,..._0xe281bc),_0x5027d1+=_0xe281bc['length'];}}return _0x319cd1;}(_0x474b41,_0x2121c6);_0x8b6ea2['length']&&this['_model']['change'](()=>{for(const _0x466547 of _0x8b6ea2){const _0x4ee688=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x34bc29,'accept');this['forceDefaultExecution'](()=>_0x4ee688([_0x466547],_0x3f39fd,_0x221017));}});for(const _0x33db73 of _0x3cfa02){let _0x656cfd=null,_0x54221f=_0x33db73['start'],_0x2518bb=_0x33db73['end'];for(const {suggestion:_0x46d306,meta:_0x2547c1}of this['_findSuggestions'](_0x33db73,'formatInline')){if(!_0x2547c1['isOwn'])continue;if(_0x46d306['subType']!=_0x34bc29)continue;const _0x1af520=_0x46d306['getFirstRange']();if(_0x1af520['containsRange'](_0x33db73,!0x0))return;_0x54221f=_0x54221f['isBefore'](_0x1af520['start'])?_0x54221f:_0x1af520['start'],_0x2518bb=_0x2518bb['isAfter'](_0x1af520['end'])?_0x2518bb:_0x1af520['end'],_0x656cfd?_0x1af520['start']['isBefore'](_0x656cfd['getFirstRange']()['start'])?(_0x656cfd['removeMarkers'](),_0x656cfd=_0x46d306):_0x46d306['removeMarkers']():_0x656cfd=_0x46d306;}const _0x51b1ca=this['_model']['createRange'](_0x54221f,_0x2518bb);if(_0x656cfd)this['_setSuggestionRange'](_0x656cfd,_0x51b1ca);else{const _0x2068a0=_0x3b1025(),_0x1aa1da=_0x34722d['id'];this['_setSuggestionData']({'id':_0x2068a0,'type':'formatInline:'+_0x34bc29,'data':_0x3f39fd,'createdAt':new Date(),'authorId':_0x1aa1da,'attributes':_0x221017}),this['_addSuggestionMarker']('formatInline:'+_0x34bc29,_0x2068a0,_0x1aa1da,_0x51b1ca);}}}['markBlockFormat'](_0x139717,_0x17a57c,_0x22e9b8=[],_0x2fb9b1=null,_0xe3e457={}){_0x17a57c['formatGroupId']||(_0x17a57c['formatGroupId']=_0x17a57c['commandName']),_0x17a57c['multipleBlocks']=_0x139717['is']('range'),_0x2fb9b1=_0x2fb9b1||bt(_0x17a57c);const _0x35ee79=_0x22e9b8['map'](_0xf6f065=>vt(_0xf6f065,this['_model'])),_0x238dec=_0x139717['is']('range')?_0x139717:vt(_0x139717,this['_model']);_0x35ee79['push'](_0x238dec);let _0x127624=!0x0;for(const _0x52a540 of _0x35ee79)if(!this['_rangeIsInLocalUserInsertion'](_0x52a540)){_0x127624=!0x1;break;}if(_0x127624){const _0x280f97=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2fb9b1,'accept');return void this['forceDefaultExecution'](()=>_0x280f97([_0x238dec],_0x17a57c,_0xe3e457));}let _0x351083=null,_0x25d170=_0x238dec['start'],_0x2c8329=_0x238dec['end'];for(const {suggestion:_0x203954,meta:_0x55e41b}of this['_findSuggestions'](_0x238dec,'formatBlock')){if(!_0x55e41b['isOwn']||_0x55e41b['isNextTo']||_0x55e41b['containsRangeInObject']||_0x55e41b['isInsideObject'])continue;if(_0x203954['data']['formatGroupId']!=_0x17a57c['formatGroupId'])continue;const _0x1737c4=_0x203954['getFirstRange']();if(_0x203954['subType']==_0x2fb9b1){if(_0x1737c4['containsRange'](_0x238dec,!0x0))return;_0x25d170=_0x25d170['isBefore'](_0x1737c4['start'])?_0x25d170:_0x1737c4['start'],_0x2c8329=_0x2c8329['isAfter'](_0x1737c4['end'])?_0x2c8329:_0x1737c4['end'],_0x351083?_0x1737c4['start']['isBefore'](_0x351083['getFirstRange']()['start'])?(_0x351083['removeMarkers'](),_0x351083=_0x203954):_0x203954['removeMarkers']():_0x351083=_0x203954;}else{const _0x37792d=_0x238dec['getIntersection'](_0x1737c4);this['_cutOutSuggestionMarker'](_0x203954,_0x37792d);}}const _0x1d536c=this['editor']['plugins']['get']('Users')['me'],_0x52643a=_0x3b1025(),_0x405537=_0x1d536c['id'];_0x351083?this['_setSuggestionRange'](_0x351083,this['_model']['createRange'](_0x25d170,_0x2c8329)):(this['_setSuggestionData']({'id':_0x52643a,'type':'formatBlock:'+_0x2fb9b1,'data':_0x17a57c,'createdAt':new Date(),'authorId':_0x405537,'attributes':_0xe3e457}),this['_addSuggestionMarker']('formatBlock:'+_0x2fb9b1,_0x52643a,_0x405537,this['_model']['createRange'](_0x25d170,_0x2c8329)));}['markMultiRangeBlockFormat'](_0x720209,_0x4a8d60,_0x6bba15=[],_0x5b890c=null,_0x31b494={}){_0x4a8d60['formatGroupId']||(_0x4a8d60['formatGroupId']=_0x4a8d60['commandName']),_0x4a8d60['multipleBlocks']=!0x1,_0x5b890c=_0x5b890c||bt(_0x4a8d60);const _0x4f7e8e=_0x6bba15['map'](_0x262ddc=>vt(_0x262ddc,this['_model'])),_0x5d98fb=_0x720209['map'](_0x2bed8a=>vt(_0x2bed8a,this['_model']));_0x4f7e8e['push'](..._0x5d98fb);let _0x36fd7e=!0x0;for(const _0x5e4ca3 of _0x4f7e8e)if(!this['_rangeIsInLocalUserInsertion'](_0x5e4ca3)){_0x36fd7e=!0x1;break;}if(_0x36fd7e){const _0x6d4691=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x5b890c,'accept');return void this['forceDefaultExecution'](()=>_0x6d4691(_0x5d98fb,_0x4a8d60,_0x31b494));}const _0x1c399b=this['editor']['plugins']['get']('Users')['me'];for(const _0x1ff3b3 of this['getSuggestions']()){if(_0x1ff3b3['author']['id']!=_0x1c399b['id'])continue;if('formatBlock'!=_0x1ff3b3['type']||_0x1ff3b3['data']['formatGroupId']!=_0x4a8d60['formatGroupId'])continue;const _0x44c49a=_0x1ff3b3['subType']==_0x5b890c;for(let _0x3f695e=0x0;_0x3f695e<_0x5d98fb['length'];_0x3f695e++){const _0x5e1384=_0x5d98fb[_0x3f695e];for(const _0x30abf9 of _0x1ff3b3['getMarkers']()){const _0x3ba42a=_0x30abf9['getRange']();if(_0x5e1384['isEqual'](_0x3ba42a)){_0x44c49a?(_0x5d98fb['splice'](_0x3f695e,0x1),_0x3f695e--):_0x1ff3b3['removeMarker'](_0x30abf9['name']);break;}}}}if(0x0==_0x5d98fb['length'])return;const _0xc108ab=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x5b890c,'join');for(const _0x109549 of this['getSuggestions']())if(_0x109549['author']['id']==_0x1c399b['id']&&'formatBlock'==_0x109549['type']&&_0x109549['data']['formatGroupId']==_0x4a8d60['formatGroupId']&&_0x109549['subType']==_0x5b890c&&(_0xc108ab(_0x109549['getRanges'](),_0x5d98fb)||_0xc108ab(_0x5d98fb,_0x109549['getRanges']()))){for(const _0x104f5a of _0x5d98fb)_0x109549['addRange'](_0x104f5a);return _0x109549;}const _0x14cd6d=_0x3b1025(),_0xc47fa6=_0x1c399b['id'],_0x36c634='formatBlock:'+_0x5b890c,_0x289a2e=this['_setSuggestionData']({'id':_0x14cd6d,'type':_0x36c634,'data':_0x4a8d60,'createdAt':new Date(),'authorId':_0xc47fa6,'attributes':_0x31b494});for(const _0x4be26e of _0x5d98fb)this['_addSuggestionMarker'](_0x36c634,_0x14cd6d,_0xc47fa6,_0x4be26e,_0x2f7912['getMultiRangeId']());return _0x289a2e;}['markDeletion'](_0x48455b,_0x36b522=null,_0x42a44c={}){if(_0x48455b['isCollapsed'])return null;const _0x2fb0bc=this['editor']['plugins']['get']('Users')['me'],_0x25b82d=new _0x1b3715(_0x48455b['start'],_0x48455b['end']);for(const {suggestion:_0x229f15,meta:_0x46b167}of this['_findSuggestions'](_0x25b82d,'insertion'))if(_0x46b167['isOwn']&&!_0x46b167['isNextTo']){if(_0x229f15['isMultiRange']){const _0x28e307=_0x229f15['getRanges']()['filter'](_0x5c3a64=>'$graveyard'!=_0x5c3a64['root']['rootName']);_0x28e307['every'](_0x3d27bb=>_0x25b82d['containsRange'](_0x3d27bb,!0x0))&&_0x229f15['discard']();if(_0x28e307['some'](_0x587407=>_0x587407['containsRange'](_0x25b82d,!0x0))){const _0x530e70=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x36b522,'accept');return this['forceDefaultExecution'](()=>_0x530e70([_0x25b82d],null,_0x42a44c)),null;}}else{const _0x217cf3=_0x25b82d['getIntersection'](_0x229f15['getFirstRange']());_0x229f15['_onDiscard']([_0x217cf3],null,_0x42a44c);}}if(_0x25b82d['detach'](),_0x25b82d['isCollapsed']||'$graveyard'==_0x25b82d['root']['rootName'])return null;let _0x101519=null,_0x1699e6=_0x25b82d['start'],_0x2601b2=_0x25b82d['end'];for(const {suggestion:_0xb614ac,meta:_0xe7c73d}of this['_findSuggestions'](_0x25b82d,'deletion'))if(_0xe7c73d['isOwn']){if(_0xb614ac['isMultiRange']){let _0x48859e=!0x0;for(const _0x4f1787 of _0xb614ac['getRanges']()){if(_0x4f1787['containsRange'](_0x25b82d,!0x0))return _0xb614ac;_0x25b82d['containsRange'](_0x4f1787)||(_0x48859e=!0x1);}_0x48859e&&_0xb614ac['discard']();}else{const _0x1a90e3=_0xb614ac['getFirstRange']();if(_0x1a90e3['containsRange'](_0x25b82d,!0x0))return _0xb614ac;_0x1699e6=_0x1699e6['isBefore'](_0x1a90e3['start'])?_0x1699e6:_0x1a90e3['start'],_0x2601b2=_0x2601b2['isAfter'](_0x1a90e3['end'])?_0x2601b2:_0x1a90e3['end'],_0x101519?_0x1a90e3['start']['isBefore'](_0x101519['getFirstRange']()['start'])?(_0x101519['removeMarkers'](),_0x101519=_0xb614ac):_0xb614ac['removeMarkers']():_0x101519=_0xb614ac;}}if(_0x101519)return this['_setSuggestionRange'](_0x101519,this['_model']['createRange'](_0x1699e6,_0x2601b2)),_0x101519;{const _0x35d033=_0x3b1025(),_0x11a238=this['_model']['createRange'](_0x1699e6,_0x2601b2),_0x281764=_0x2fb0bc['id'],_0x172520=_0x36b522?'deletion:'+_0x36b522:'deletion',_0xb2c4d8=this['_setSuggestionData']({'id':_0x35d033,'type':_0x172520,'createdAt':new Date(),'authorId':_0x281764,'attributes':_0x42a44c});return this['_addSuggestionMarker'](_0x172520,_0x35d033,_0x281764,_0x11a238),_0xb2c4d8;}}['markMultiRangeDeletion'](_0x20a1bb,_0x2f8ade='multi',_0x42de30={}){const _0x501d4c=this['editor']['plugins']['get']('Users')['me'],_0x42826b=_0x20a1bb['map'](_0x1b3ab2=>new _0x1b3715(_0x1b3ab2['start'],_0x1b3ab2['end'])),_0x5dd2d9=new Set();for(const _0x220ade of _0x42826b)for(const {suggestion:_0x1514ad,meta:_0x3b5d7c}of this['_findSuggestions'](_0x220ade,'insertion'))_0x3b5d7c['isOwn']&&!_0x3b5d7c['isNextTo']&&_0x5dd2d9['add'](_0x1514ad);for(const _0x4dfd79 of _0x5dd2d9)if(_0x4dfd79['isMultiRange']){const _0x5d749a=_0x4dfd79['getRanges']();(!_0x4dfd79['attributes']||!_0x4dfd79['attributes']['skipNestingCheck'])&&(_0x5d749a['every'](_0x2b8611=>_0x42826b['some'](_0x16046c=>_0x16046c['containsRange'](_0x2b8611,!0x0)))&&_0x4dfd79['discard']());if(_0x42826b['every'](_0x4297b0=>_0x5d749a['some'](_0x2d8c61=>_0x2d8c61['containsRange'](_0x4297b0,!0x0)))){const _0x4bb236=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x2f8ade,'accept');return this['forceDefaultExecution'](()=>_0x4bb236(_0x20a1bb,null,_0x42de30)),null;}}else{const _0x240eea=_0x4dfd79['getFirstRange']();_0x42826b['some'](_0x3d51fd=>_0x3d51fd['containsRange'](_0x240eea,!0x0))&&_0x4dfd79['discard']();if(_0x42826b['every'](_0x170913=>_0x240eea['containsRange'](_0x170913,!0x0))){const _0x29ae1e=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x2f8ade,'accept');return this['forceDefaultExecution'](()=>_0x29ae1e(_0x42826b,null,_0x42de30)),null;}}const _0x1d24ba=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x2f8ade,'join');let _0x408c49=null;for(const _0x3049af of this['getSuggestions']())if(_0x3049af['author']['id']==_0x501d4c['id']&&_0x3049af['isInContent']&&'deletion'==_0x3049af['type']&&_0x3049af['subType']==_0x2f8ade&&(_0x1d24ba(_0x3049af['getRanges'](),_0x42826b)||_0x1d24ba(_0x42826b,_0x3049af['getRanges']()))){if(_0x408c49){if(_0x3049af['commentThread']&&_0x3049af['commentThread']['length'])continue;for(const _0x119f46 of _0x3049af['getRanges']())_0x408c49['isIntersectingWithRange'](_0x119f46)||_0x408c49['addRange'](_0x119f46);_0x3049af['removeMarkers']();}else{_0x408c49=_0x3049af;for(const _0x4e3eed of _0x42826b)_0x3049af['isIntersectingWithRange'](_0x4e3eed)||_0x3049af['addRange'](_0x4e3eed);}}if(_0x408c49)return _0x408c49;_0x5dd2d9['clear']();for(const _0x52521f of _0x42826b)for(const {suggestion:_0x319db7,meta:_0x5abb8c}of this['_findSuggestions'](_0x52521f,'deletion'))_0x5abb8c['isOwn']&&_0x5dd2d9['add'](_0x319db7);for(const _0x420449 of _0x5dd2d9){const _0x5dc6d1=_0x420449['getRanges']();if(!_0x42de30||!_0x42de30['skipNestingCheck']){if(_0x42826b['every'](_0x3b8d8f=>_0x5dc6d1['some'](_0x352372=>_0x352372['containsRange'](_0x3b8d8f,!0x0))))return _0x420449;}(!_0x420449['attributes']||!_0x420449['attributes']['skipNestingCheck'])&&(_0x5dc6d1['every'](_0x482c75=>_0x42826b['some'](_0x2ce427=>_0x2ce427['containsRange'](_0x482c75,!0x0)))&&_0x420449['discard']());}const _0x29a790=_0x3b1025(),_0x51757d=_0x501d4c['id'],_0x22bc7c='deletion:'+_0x2f8ade,_0x3cc9c3=this['_setSuggestionData']({'id':_0x29a790,'type':_0x22bc7c,'createdAt':new Date(),'authorId':_0x51757d,'attributes':_0x42de30});for(const _0x4ab66e of _0x42826b)_0x4ab66e['detach'](),_0x4ab66e['isCollapsed']||'$graveyard'==_0x4ab66e['root']['rootName']||this['_addSuggestionMarker'](_0x22bc7c,_0x29a790,_0x51757d,_0x4ab66e,_0x2f7912['getMultiRangeId']());return _0x3cc9c3;}['_setSuggestionRange'](_0x5d912d,_0x361616){const _0x3cdd16=_0x5d912d['getFirstMarker']();this['_model']['change'](_0x4a3a27=>{_0x4a3a27['updateMarker'](_0x3cdd16,{'range':_0x361616});});}['_addThreadToSuggestion'](_0x47eb3f){const _0x47304f=_0x47eb3f['id'],_0x254df3=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x47304f)||this['_commentsRepository']['addCommentThread']({'channelId':_0x254df3,'threadId':_0x47304f});const _0x2626a1=this['_commentsRepository']['getCommentThread'](_0x47304f);_0x2626a1['unbind']('isRemovable'),_0x2626a1['isRemovable']=!0x1,_0x47eb3f['commentThread']=_0x2626a1;}['_checkSuggestionCorrectness'](_0x573451,_0x51029d,_0x5ca7a0,_0x32fb7f){if(_0x573451['type']!=_0x51029d||_0x573451['subType']!=_0x5ca7a0||_0x573451['author']['id']!=_0x32fb7f)throw this['editor']['isReadOnly']=!0x0,new _0x44c973('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x3442fa,_0x152eef){const _0x4ef672=_0x3442fa['getFirstRange']();if(_0x152eef['isEqual'](_0x4ef672))_0x3442fa['removeMarkers']();else{if(_0x4ef672['containsRange'](_0x152eef)){const _0x244840=this['_model']['createPositionAt'](_0x152eef['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x3442fa,this['_model']['createRange'](_0x4ef672['start'],_0x244840));const _0x596d6a=_0x3b1025(),_0x36885f=_0x3442fa['author']['id'],_0x55a1ae=_0x3442fa['type']+':'+_0x3442fa['subType'];this['_setSuggestionData']({'id':_0x596d6a,'type':_0x55a1ae,'createdAt':new Date(),'authorId':_0x36885f,'data':_0x3442fa['data'],'attributes':_0x3442fa['attributes']});const _0x478190=this['_model']['createPositionAt'](_0x152eef['end']['parent'],'after'),_0x21380c=this['_model']['createRange'](_0x478190,_0x4ef672['end']);this['_addSuggestionMarker'](_0x55a1ae,_0x596d6a,_0x36885f,_0x21380c);}else{if(_0x4ef672['containsPosition'](_0x152eef['start'])){const _0x4a6c5f=this['_model']['createPositionAt'](_0x152eef['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x3442fa,this['_model']['createRange'](_0x4ef672['start'],_0x4a6c5f));}else{const _0xfef596=this['_model']['createPositionAt'](_0x152eef['end']['parent'],'after');this['_setSuggestionRange'](_0x3442fa,this['_model']['createRange'](_0xfef596,_0x4ef672['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x28ea54){for(const {suggestion:_0x24f196,meta:_0x2fbd9e}of this['_findSuggestions'](_0x28ea54,'insertion')){if(!_0x2fbd9e['isOwn'])continue;const _0x2c7604=_0x24f196['getRanges']();for(const _0x5aaa3e of _0x2c7604)if(!_0x28ea54['getDifference'](_0x5aaa3e)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x2e1188){const _0x15ef46=this['editor']['plugins']['get']('Users')['getUser'](_0x2e1188);if(!_0x15ef46)throw new _0x44c973('track-changes-user-not-found',this);return _0x15ef46;}['_createSuggestion'](_0x4b84cf,_0x54a520,_0xfd6a2d,_0x148d70){const _0x27ca4d=this['_getAuthorFromId'](_0x148d70),_0x57301b=this['_suggestionFactory']['buildSuggestion'](_0x4b84cf,_0x54a520,_0xfd6a2d,_0x27ca4d,_0x3c941b=>this['_updateSuggestionData'](_0xfd6a2d,{'attributes':_0x3c941b}));return this['listenTo'](_0x57301b,'accept',()=>{this['_updateSuggestionData'](_0xfd6a2d,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x57301b,'discard',()=>{this['_updateSuggestionData'](_0xfd6a2d,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0xfd6a2d,_0x57301b),this['_suggestionState']['set'](_0x57301b,'notReady'),_0x57301b;}['_splitMarkerName'](_0x18f83d){const _0x53b106=_0x18f83d['split'](':');return{'group':_0x53b106[0x0],'type':_0x53b106[0x1],'subType':_0x53b106['length']>=0x5?_0x53b106[0x2]:null,'id':_0x53b106['length']<0x5?_0x53b106[0x2]:_0x53b106[0x3],'authorId':_0x53b106['length']<0x5?_0x53b106[0x3]:_0x53b106[0x4],'markerCount':0x6==_0x53b106['length']?_0x53b106[0x5]:null};}['_breakSuggestionMarker'](_0x578ab6,_0x3454d3,_0x53d6e2){const _0x13d979=_0x578ab6['getFirstRange'](),_0x14921d=_0x13d979['start'],_0x5bed8f=_0x13d979['end'];this['_setSuggestionRange'](_0x578ab6,this['_model']['createRange'](_0x14921d,_0x3454d3));const _0x521c20=_0x3b1025(),_0x5e15e8=_0x578ab6['author']['id'],_0x479259=_0x578ab6['type']+(_0x578ab6['subType']?':'+_0x578ab6['subType']:'');this['_setSuggestionData']({'id':_0x521c20,'type':_0x479259,'createdAt':new Date(),'authorId':_0x5e15e8,'originalSuggestionId':_0x578ab6['id'],'data':_0x578ab6['data']}),'formatBlock'==_0x578ab6['type']&&(_0x53d6e2=this['_model']['createPositionBefore'](_0x53d6e2['parent'])),this['_addSuggestionMarker'](_0x479259,_0x521c20,_0x5e15e8,this['_model']['createRange'](_0x53d6e2,_0x5bed8f));}['_findSuggestions'](_0x50bbe6,_0x4fcb75=null){const _0x1d9ac3=[],_0x1928f5=this['_model']['schema'],_0x33baa8=this['editor']['plugins']['get']('Users')['me'];for(const _0x2d1444 of this['getSuggestions']())if(_0x2d1444['isInContent']&&(!_0x4fcb75||_0x2d1444['type']==_0x4fcb75))for(const _0x5f56f3 of _0x2d1444['getRanges']()){const _0x54e25f=_0x50bbe6['start']['isEqual'](_0x5f56f3['end'])||_0x50bbe6['end']['isEqual'](_0x5f56f3['start']);if(_0x54e25f||_0x50bbe6['getIntersection'](_0x5f56f3)){const _0x57c35a=_0x50bbe6['containsRange'](_0x5f56f3)&&wt(_0x1928f5,_0x5f56f3['start'],_0x50bbe6),_0x58f352=_0x5f56f3['containsRange'](_0x50bbe6)&&wt(_0x1928f5,_0x50bbe6['start'],_0x5f56f3);_0x1d9ac3['push']({'suggestion':_0x2d1444,'meta':{'isOwn':_0x33baa8==_0x2d1444['author'],'isNextTo':_0x54e25f,'isInsideObject':_0x57c35a,'containsRangeInObject':_0x58f352}});break;}}return _0x1d9ac3;}['_addSuggestionMarker'](_0x5a2858,_0x1fa764,_0x2dda09,_0x4dccf1,_0x11e24f=null){this['_model']['change'](_0x37a700=>{let _0x50280d='suggestion:'+_0x5a2858+':'+_0x1fa764+':'+_0x2dda09;_0x11e24f&&(_0x50280d=_0x50280d+':'+_0x11e24f),_0x37a700['addMarker'](_0x50280d,{'range':_0x4dccf1,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x51a7eb){const _0x17a57f=_0x51a7eb['previous'],_0x490d5e=_0x51a7eb['next'];_0x51a7eb['previous']=null,null!=_0x17a57f&&(_0x17a57f['next']=null),_0x51a7eb['next']=null,null!=_0x490d5e&&(_0x490d5e['previous']=null),'ready'==this['_suggestionState']['get'](_0x51a7eb)&&(this['_suggestionState']['set'](_0x51a7eb,'removed'),this['fire']('suggestionUnloaded',_0x51a7eb,_0x17a57f,_0x490d5e));}['_setSuggestionData'](_0x3d5326){const _0x4eaffb=_0x3d5326['id'],_0x519f9c=this['addSuggestionData'](_0x3d5326);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x581ea4=this['editor']['plugins']['get']('PendingActions'),_0x4e010a=_0x519f9c['hasComments'],_0x14aeb0=_0x519f9c['subType']?_0x519f9c['type']+':'+_0x519f9c['subType']:_0x519f9c['type'],t=this['editor']['locale']['t'],_0xae1ceb=_0x581ea4['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x263ed9={'id':_0x4eaffb,'type':_0x14aeb0,'hasComments':_0x4e010a,'data':_0x3d5326['data']||null,'originalSuggestionId':_0x3d5326['originalSuggestionId']||null,'attributes':_0x519f9c['attributes']};this['_adapter']['addSuggestion'](_0x263ed9)['then'](_0x2305df=>{_0x519f9c['_saved']=!0x0,_0x581ea4['remove'](_0xae1ceb),_0x2305df&&_0x2305df['createdAt']&&(this['_suggestions']['get'](_0x4eaffb)['createdAt']=_0x2305df['createdAt']);});}return _0x519f9c;}['_updateSuggestionData'](_0x5ee911,_0x542261){const _0x54122e=this['editor']['plugins']['get']('PendingActions'),_0x4e12b3=this['_suggestions']['get'](_0x5ee911);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x4e12b3['_saved']){const t=this['editor']['locale']['t'],_0xda8374=_0x54122e['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x5ee911,_0x542261)['then'](()=>{_0x54122e['remove'](_0xda8374);});}else _0x4e12b3['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x5ee911,_0x542261);});}}['_getSuggestionData'](_0x5af2f9){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x44c973('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x5af2f9);}['_handleNewSuggestionMarker'](_0x141c18){const {id:_0x220360,type:_0x16901a,subType:_0x563cbd,authorId:_0x5cf0ed}=this['_splitMarkerName'](_0x141c18),_0x3778c3=this['_suggestions']['get'](_0x220360)||this['_createSuggestion'](_0x16901a,_0x563cbd,_0x220360,_0x5cf0ed);switch(this['_checkSuggestionCorrectness'](_0x3778c3,_0x16901a,_0x563cbd,_0x5cf0ed),this['_suggestionState']['get'](_0x3778c3)){case'notReady':this['_getSuggestionData'](_0x220360)['then'](_0x2b6590=>{let _0x3a636e=Promise['resolve']();_0x2b6590['hasComments']&&(_0x3a636e=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x220360})),_0x3a636e['then'](()=>{this['addSuggestionData'](_0x2b6590)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x3778c3,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x220360,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x3778c3,'ready'),this['fire']('suggestionLoaded',_0x3778c3);break;case'ready':this['fire']('suggestionChanged',_0x3778c3);}_0x3778c3['addMarkerName'](_0x141c18),this['_refreshSuggestionsChain'](_0x3778c3);}['_refreshSuggestionsChain'](_0x99f752){if(_0x99f752['isMultiRange'])return;let _0xb0a79f=!0x0,_0x204c10=!0x0;for(const _0x35395e of this['getSuggestions']()){if(_0x35395e['isMultiRange'])continue;if(_0x35395e==_0x99f752||!_0x35395e['isInContent'])continue;if(_0x35395e['author']['id']!=_0x99f752['author']['id'])continue;const _0x49ba77=this['_suggestionFactory']['getSuggestionCallback'](_0x99f752['type'],_0x99f752['subType'],'chain'),_0x273c6d=this['_suggestionFactory']['getSuggestionCallback'](_0x35395e['type'],_0x35395e['subType'],'chain'),_0x560b0a=_0x49ba77(_0x99f752,_0x35395e),_0x5a0bd9=_0x273c6d(_0x99f752,_0x35395e);_0x560b0a&&_0x5a0bd9&&(_0x560b0a[0x1]['commentThread']&&_0x560b0a[0x1]['commentThread']['length']||(_0x560b0a[0x0]['next']=_0x560b0a[0x1],_0x560b0a[0x1]['previous']=_0x560b0a[0x0],_0x560b0a[0x0]==_0x99f752?_0x204c10=!0x1:_0xb0a79f=!0x1));}_0x99f752['previous']&&_0xb0a79f&&(_0x99f752['previous']['next']=null,_0x99f752['previous']=null),_0x99f752['next']&&_0x204c10&&(_0x99f752['next']['previous']=null,_0x99f752['next']=null);}['_joinWithAdjacentSuggestions'](_0x5f135b){for(const _0x3ee192 of this['_suggestions']['values']()){if(_0x3ee192==_0x5f135b||!_0x3ee192['isInContent'])continue;if(_0x3ee192['type']!=_0x5f135b['type']||_0x3ee192['author']['id']!=_0x5f135b['author']['id']||_0x3ee192['subType']!=_0x5f135b['subType'])continue;const _0x47bb9c=this['_suggestionFactory']['getSuggestionCallback'](_0x5f135b['type'],_0x5f135b['subType'],'join');if(_0x47bb9c(_0x3ee192['getRanges'](),_0x5f135b['getRanges']())){if(_0x5f135b['commentThread']&&_0x5f135b['commentThread']['length'])continue;return this['_joinSuggestions'](_0x3ee192,_0x5f135b),!0x0;}if(_0x47bb9c(_0x5f135b['getRanges'](),_0x3ee192['getRanges']())){if(_0x3ee192['commentThread']&&_0x3ee192['commentThread']['length'])continue;return this['_joinSuggestions'](_0x5f135b,_0x3ee192),!0x0;}}return!0x1;}['_joinSuggestions'](_0x3040dc,_0x1c4a56){if(_0x3040dc['isMultiRange'])for(const _0x3c87bd of _0x1c4a56['getRanges']())_0x3040dc['addRange'](_0x3c87bd);else{const _0x3af3dd=_0x1c4a56['getFirstRange']()['end'];this['_setSuggestionRange'](_0x3040dc,this['_model']['createRange'](_0x3040dc['getFirstRange']()['start'],_0x3af3dd));}_0x1c4a56['removeMarkers']();}}_0x2e9c45(l,_0x3d6fbb);class kt{constructor(_0x230a37){this['_editor']=_0x230a37,this['_model']=_0x230a37['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x12eb8d,_0x3a9754,_0x48755b,_0x308ebe,_0x184873){return new _0x2f7912(this['_model'],{'type':_0x12eb8d,'subType':_0x3a9754,'id':_0x48755b,'author':_0x308ebe,'onAttributesChange':_0x184873,'onAccept':(..._0x26cb70)=>this['getSuggestionCallback'](_0x12eb8d,_0x3a9754,'accept')(..._0x26cb70),'onDiscard':(..._0x212e55)=>this['getSuggestionCallback'](_0x12eb8d,_0x3a9754,'discard')(..._0x212e55)});}['registerCustomCallback'](_0x2e9c8f,_0x45d110,_0x3e9b81,_0x44b4ee){const _0x5a0990=_0x2e9c8f+':'+_0x45d110+':'+_0x3e9b81;this['_customCallbacks']['set'](_0x5a0990,_0x44b4ee);}['getSuggestionCallback'](_0x5f5085,_0x152f27,_0x482a1b){const _0x15ddd3=_0x5f5085+':'+_0x152f27+':'+_0x482a1b;return this['_customCallbacks']['get'](_0x15ddd3)||this['_defaultCallbacks']['get'](_0x5f5085+':'+_0x482a1b);}['_registerDefaultCallbacks'](){const _0x4bf64a=()=>{},_0x66ec4=_0x4a2c19=>{_0x4a2c19['sort']((_0x25f5f8,_0xbc4eef)=>_0x25f5f8['start']['isBefore'](_0xbc4eef['start'])?0x1:-0x1),this['_model']['change'](_0xf95b17=>{for(const _0x192b95 of _0x4a2c19){let _0x372969;_0x372969=_0x192b95['end']['isAtEnd']&&_0x192b95['end']['parent']==_0x192b95['start']['nodeAfter']?_0xf95b17['createSelection'](_0x192b95['start']['nodeAfter'],'on'):_0xf95b17['createSelection'](_0x192b95),this['_model']['deleteContent'](_0x372969,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x23e427=(_0x956a5d,_0x15f768)=>{this['_model']['change'](_0x38ff0c=>{const {commandName:_0xd52767,commandParams:_0xacfba7=[]}=_0x15f768,_0x6c7099=_0x956a5d[0x0];if('$graveyard'==_0x6c7099['root']['rootName'])return;const _0x4e9c29=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x1f3c3f=>_0x1b3715['fromRange'](_0x1f3c3f));yt(_0x6c7099)?_0x38ff0c['setSelection'](this['_model']['createRange'](_0x6c7099['end'])):_0x38ff0c['setSelection'](_0x6c7099);for(const _0x230790 of this['_editor']['commands']['commands']())_0x230790['refresh']();_0xacfba7['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0xd52767,..._0xacfba7);const _0x243da9=_0x4e9c29['filter'](_0x29b77a=>'$graveyard'!=_0x29b77a['root']['rootName']);_0x243da9['length']>0x0&&_0x38ff0c['setSelection'](_0x243da9);for(const _0x441a9e of _0x4e9c29)_0x441a9e['detach']();});},_0x280c4f=(_0x2483a8,_0x45a88e)=>0x1==_0x2483a8['length']&&0x1==_0x45a88e['length']&&_0x2483a8[0x0]['end']['isEqual'](_0x45a88e[0x0]['start']),_0xd99dde=(_0xd21937,_0x51f15b)=>Dt(_0xd21937,_0x51f15b,this['_model'])?[_0xd21937,_0x51f15b]:Dt(_0x51f15b,_0xd21937,this['_model'])?[_0x51f15b,_0xd21937]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x4bf64a),this['_defaultCallbacks']['set']('insertion:discard',_0x66ec4),this['_defaultCallbacks']['set']('insertion:join',_0x280c4f),this['_defaultCallbacks']['set']('insertion:chain',_0xd99dde),this['_defaultCallbacks']['set']('deletion:accept',_0x66ec4),this['_defaultCallbacks']['set']('deletion:discard',_0x4bf64a),this['_defaultCallbacks']['set']('deletion:join',_0x280c4f),this['_defaultCallbacks']['set']('deletion:chain',_0xd99dde),this['_defaultCallbacks']['set']('formatInline:accept',_0x23e427),this['_defaultCallbacks']['set']('formatInline:discard',_0x4bf64a),this['_defaultCallbacks']['set']('formatInline:join',_0x280c4f),this['_defaultCallbacks']['set']('formatInline:chain',_0x4bf64a),this['_defaultCallbacks']['set']('formatBlock:accept',_0x23e427),this['_defaultCallbacks']['set']('formatBlock:discard',_0x4bf64a),this['_defaultCallbacks']['set']('formatBlock:join',_0x280c4f),this['_defaultCallbacks']['set']('formatBlock:chain',_0x4bf64a);}}function wt(_0x326493,_0x4c7cde,_0x791054){for(const _0xad1fae of _0x4c7cde['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0xad1fae['root']==_0xad1fae)return!0x1;if(!_0x791054['containsItem'](_0xad1fae))return!0x1;if(_0x326493['isObject'](_0xad1fae)||_0x326493['isLimit'](_0xad1fae))return!0x0;}}function yt(_0x229be7){return _0x229be7['end']['parent']==_0x229be7['start']['nodeAfter']&&_0x229be7['end']['isAtStart'];}function St(_0x53f817,_0x7ca2cc,_0x24dafa,_0x3a4943){const _0x1cf32d=_0x5ab100=>!_0x5ab100['item']['is']('textProxy')&&!_0x3a4943['isObject'](_0x5ab100['item']),_0xbc7d83=_0x53f817['start']['getLastMatchingPosition'](_0x1cf32d),_0x5ca6d2=_0x53f817['end']['getLastMatchingPosition'](_0x1cf32d,{'direction':'backward'});return(!_0x53f817['start']['isEqual'](_0xbc7d83)||!_0x53f817['end']['isEqual'](_0x5ca6d2))&&(_0xbc7d83['isBefore'](_0x5ca6d2)?_0x24dafa['updateMarker'](_0x7ca2cc,{'range':_0x24dafa['createRange'](_0xbc7d83,_0x5ca6d2)}):_0x24dafa['removeMarker'](_0x7ca2cc),!0x0);}function bt(_0x322d7f){return mt(_0x322d7f);}function It(_0x5cf9d5){const _0x14f6fe=_0x5cf9d5['start']['nodeAfter'];return _0x14f6fe&&_0x14f6fe['is']('element');}function vt(_0x164954,_0x3b98a2){const _0x23b210=_0x3b98a2['schema']['isObject'](_0x164954)||_0x3b98a2['schema']['isSelectable'](_0x164954);return _0x3b98a2['createRange'](_0x3b98a2['createPositionAt'](_0x164954,'before'),_0x23b210?_0x3b98a2['createPositionAfter'](_0x164954):_0x3b98a2['createPositionAt'](_0x164954,'end'));}function Dt(_0x3b7457,_0x5ba0bf,_0x627f27){const _0x3ad442=_0x3b7457['getFirstRange'](),_0x52f330=_0x5ba0bf['getFirstRange']();if(_0x3ad442['end']['isEqual'](_0x52f330['start']))return!0x0;if(_0x3b7457['type']!=_0x5ba0bf['type'])return!0x1;if(!_0x3ad442['end']['isTouching'](_0x52f330['start']))return!0x1;const _0x173a6d=_0x627f27['createRange'](_0x3ad442['end'],_0x52f330['start'])['getWalker']();for(const _0x54fdfc of _0x173a6d)if(['elementStart','elementEnd']['includes'](_0x54fdfc['type'])&&_0x627f27['schema']['isLimit'](_0x54fdfc['item']))return!0x1;return!0x0;}
23
+ import{Plugin as _0x2f8a06,PendingActions as _0x4b7d91}from'ckeditor5/src/core';import _0x463fa2 from'@ckeditor/ckeditor5-collaboration-core/src/users';import{LiveRange as _0x2dbd60}from'ckeditor5/src/engine';import{CKEditorError as _0x6684a1,uid as _0x17e38b,priorities as _0x8da7fc,EmitterMixin as _0x37c232,mix as _0x3e6840}from'ckeditor5/src/utils';import _0x2b993d from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x126243 from'./commands/trackchangescommand';import _0x506a57 from'./commands/acceptsuggestioncommand';import _0x4900ca from'./commands/discardsuggestioncommand';import _0x5535ee from'./commands/acceptallsuggestionscommand';import _0x2e6d55 from'./commands/acceptselectedsuggestionscommand';import _0x2a8010 from'./commands/discardallsuggestionscommand';import _0x49fbcd from'./commands/discardselectedsuggestionscommand';import _0xf23b9 from'./suggestion';import _0x23bbe5 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x35184d from'./integrations/alignment';import _0x24f559 from'./integrations/basicstyles';import _0x5cee8b from'./integrations/blockquote';import _0x5c67f5 from'./integrations/codeblock';import _0x37befb from'./integrations/comments';import _0x4df444 from'./integrations/deletecommand';import _0x49d216 from'./integrations/entercommand';import _0x5d06e6 from'./integrations/font';import _0x2bc64d from'./integrations/heading';import _0x2bc3f8 from'./integrations/highlight';import _0x133b11 from'./integrations/horizontalline';import _0x289993 from'./integrations/image';import _0x1bf309 from'./integrations/indent';import _0x1a5409 from'./integrations/inputcommand';import _0xe3e460 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 _0x2f8a06{static get['requires'](){return[_0x463fa2,_0x4b7d91,_0x2b993d,_0x35184d,_0x24f559,_0x5cee8b,_0x5c67f5,_0x37befb,_0x4df444,_0x49d216,_0x5d06e6,_0x2bc64d,_0x2bc3f8,_0x133b11,_0x289993,_0x1bf309,_0x1a5409,_0xe3e460,tt,it,st,nt,et,ot,rt,at,ct,ht,ut,ft,gt,lt,dt];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x58aae7){function _0x1f7655(_0x3992a6){return _0x3992a6['map'](_0x1c53ac=>String['fromCharCode'](_0x1c53ac))['join']('');}super(_0x58aae7),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x2959cf,_0x48b3d1,_0x1096f4,_0x5ee122)=>{this['_model']['change'](_0x1983e3=>{for(const _0x502847 of[..._0x5ee122,..._0x1096f4])this['_model']['markers']['has'](_0x502847)&&_0x1983e3['updateMarker'](_0x502847);});}),this['_descriptionFactory']=new _0x23bbe5(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new kt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x58aae7['plugins']['get'](_0x2b993d),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x1f7655([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x1f7655([0x34,0x30,0x34,0x34,0x30,0x32,0x36,0x32]);}['init'](){const _0x42fa62=this['editor'];_0x42fa62['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x4ddf01=>{const {id:_0x1e90d9,type:_0x3fcc3d}=this['_splitMarkerName'](_0x4ddf01['markerName']),_0x53c230=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3fcc3d];let _0x1815ad=0xbb8;return this['activeMarkers']['includes'](_0x4ddf01['markerName'])&&(_0x53c230['push']('ck-suggestion-marker--active'),_0x1815ad=0xbc2),'deletion'==_0x3fcc3d&&(_0x1815ad+=0x5),{'classes':_0x53c230,'attributes':{'data-suggestion':_0x1e90d9},'priority':_0x1815ad};}}),_0x42fa62['conversion']['for']('dataDowncast')['add'](_0x182082=>{_0x182082['on']('addMarker:suggestion',(_0x9e99d1,_0x241fa9,_0x38cc55)=>{if(!_0x38cc55['options']['showSuggestionHighlights'])return;const _0x3f09f5=_0x241fa9['item'];if(!_0x3f09f5)return;const _0x4ae082=_0x38cc55['mapper']['toViewElement'](_0x3f09f5);_0x42fa62['model']['schema']['isObject'](_0x3f09f5)&&_0x4ae082&&!_0x4ae082['getCustomProperty']('widget')&&_0x4ae082['is']('containerElement')&&pt(_0x4ae082,_0x38cc55['writer']);},{'priority':'high'});}),_0x42fa62['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x53cc57,_0x1b4798)=>{if(!_0x1b4798['options']['showSuggestionHighlights'])return null;const {type:_0x46ddb5}=this['_splitMarkerName'](_0x53cc57['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0x46ddb5],'priority':0xbb8};}});const _0x3bdd06=({showActiveMarkers:_0x59ff34=!0x0}={})=>(_0x24739e,_0x3231e1,_0x3f3f28)=>{if(!_0x3231e1['item'])return;if(_0x3231e1['item']['is']('selection'))return void _0x3f3f28['consumable']['consume'](_0x3231e1['item'],_0x24739e['name']);const _0xee5aa1=_0x3f3f28['mapper']['toViewElement'](_0x3231e1['item']);if(!(_0x3231e1['item']['is']('element')&&_0x42fa62['model']['schema']['isBlock'](_0x3231e1['item'])&&!_0xee5aa1['getCustomProperty']('addHighlight')))return;const {id:_0x2245e4}=this['_splitMarkerName'](_0x3231e1['markerName']);_0x3f3f28['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0xee5aa1),_0x3f3f28['writer']['setAttribute']('data-suggestion',_0x2245e4,_0xee5aa1),_0x3f3f28['mapper']['bindElementToMarker'](_0xee5aa1,_0x3231e1['markerName']),_0x59ff34&&(this['activeMarkers']['includes'](_0x3231e1['markerName'])?_0x3f3f28['writer']['addClass']('ck-suggestion-marker--active',_0xee5aa1):_0x3f3f28['writer']['removeClass']('ck-suggestion-marker--active',_0xee5aa1));for(const _0x2383ce of _0x42fa62['model']['createRangeIn'](_0x3231e1['item'])['getItems']())_0x3f3f28['consumable']['consume'](_0x2383ce,_0x24739e['name']);_0x3f3f28['consumable']['consume'](_0x3231e1['item'],_0x24739e['name']);};_0x42fa62['conversion']['for']('dataDowncast')['add'](_0x27b4a8=>{_0x27b4a8['on']('addMarker:suggestion:formatBlock',(_0x5041ab,_0x290fd7,_0x27fa13)=>{_0x27fa13['options']['showSuggestionHighlights']&&_0x3bdd06({'showActiveMarkers':!0x1})(_0x5041ab,_0x290fd7,_0x27fa13);},{'priority':'highest'});}),_0x42fa62['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x5b2b7d,_0x2f254d)=>_0x2f254d['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x5b2b7d['substr']('suggestion'['length']+0x1)}}),_0x42fa62['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x3a359f,{writer:_0x42d325})=>{let _0x27d6d3='suggestion:'+_0x3a359f['getAttribute']('suggestion-type')+':'+_0x3a359f['getAttribute']('id');return _0x3a359f['getAttribute']('marker-count')&&(_0x27d6d3+=':'+_0x3a359f['getAttribute']('marker-count')),_0x42d325['createElement']('$marker',{'data-name':_0x27d6d3});}}),_0x42fa62['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x42fa62['conversion']['for']('editingDowncast')['add'](_0x50e4f3=>{_0x50e4f3['on']('addMarker:suggestion:formatBlock',_0x3bdd06(),{'priority':'high'});}),_0x42fa62['conversion']['for']('editingDowncast')['add'](_0xb1b1eb=>{_0xb1b1eb['on']('removeMarker:suggestion:formatBlock',(_0x1905eb,_0x4c05b7,_0x319004)=>{const _0x332c0f=_0x319004['mapper']['markerNameToElements'](_0x4c05b7['markerName']);if(_0x332c0f)for(const _0x4a1b14 of _0x332c0f)_0x4a1b14['getCustomProperty']('addHighlight')||(_0x319004['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x4a1b14),_0x319004['writer']['removeAttribute']('data-suggestion',_0x4a1b14),_0x319004['mapper']['unbindElementFromMarkerName'](_0x4a1b14,_0x4c05b7['markerName']));},{'priority':'high'});}),_0x42fa62['model']['document']['registerPostFixer'](_0x2a085d=>{let _0x3718de=!0x1;const _0x30d924=Array['from'](_0x42fa62['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x4f28d7,data:_0x189727}of _0x30d924){const {group:_0xd7a53d,type:_0x40f83e,id:_0x2f8ab2}=this['_splitMarkerName'](_0x4f28d7);if('suggestion'!==_0xd7a53d)continue;const _0x159c60=this['_suggestions']['get'](_0x2f8ab2);if(null!=_0x189727['newRange']){'formatInline'==_0x40f83e&&(_0x3718de=_0x3718de||St(_0x189727['newRange'],_0x4f28d7,_0x2a085d,_0x42fa62['model']['schema']));if(_0x189727['newRange']['isCollapsed']||'$graveyard'==_0x189727['newRange']['root']['rootName']||'formatBlock'==_0x40f83e&&!It(_0x189727['newRange'])||'deletion'==_0x40f83e&&!(!yt(_0x247bf3=_0x189727['newRange'])&&!function(_0x2f05a7){return _0x2f05a7['start']['parent']==_0x2f05a7['end']['nodeBefore']&&_0x2f05a7['start']['isAtEnd'];}(_0x247bf3)))_0x2a085d['removeMarker'](_0x4f28d7),_0x3718de=!0x0;else{if(!_0x159c60||!_0x159c60['isInContent'])continue;_0x3718de=!!this['_joinWithAdjacentSuggestions'](_0x159c60)||_0x3718de;}}}var _0x247bf3;return _0x3718de;}),_0x42fa62['model']['document']['registerPostFixer'](_0x51e6d9=>{let _0x122d05=!0x1;for(const _0x2fc011 of _0x42fa62['model']['document']['differ']['getChanges']()){if('insert'!=_0x2fc011['type'])continue;const _0x9db5b0=_0x2fc011['position']['getShiftedBy'](_0x2fc011['length']);if(_0x9db5b0['isAtEnd'])for(const _0x11eba9 of this['_suggestions']['values']()){if(_0x11eba9['isMultiRange']||!_0x11eba9['isInContent'])continue;if('formatBlock'!=_0x11eba9['type'])continue;const _0x5e4f30=_0x11eba9['getFirstRange']();if(_0x5e4f30['start']['parent']!=_0x5e4f30['end']['parent']&&_0x5e4f30['end']['isEqual'](_0x2fc011['position'])){const _0x518327=_0x42fa62['model']['createRange'](_0x5e4f30['start'],_0x9db5b0);_0x51e6d9['updateMarker'](_0x11eba9['getFirstMarker'](),{'range':_0x518327}),_0x122d05=!0x0;}}}return _0x122d05;}),_0x42fa62['model']['markers']['on']('update:suggestion',(_0x4c6dd9,_0x5477d7,_0x35332e)=>{if(null==_0x35332e){const {id:_0x38ab35}=this['_splitMarkerName'](_0x5477d7['name']),_0x436a96=this['_suggestions']['get'](_0x38ab35);_0x436a96&&_0x436a96['addMarkerName'](_0x5477d7['name']);}}),_0x42fa62['model']['document']['on']('change:data',()=>{const _0x4be4d2=Array['from'](_0x42fa62['model']['document']['differ']['getChangedMarkers']());_0x4be4d2['sort']((_0x5dd3e0,_0xb9cb51)=>{const _0x9ee2df=_0x5dd3e0['data']['oldRange'],_0x195be8=_0xb9cb51['data']['oldRange'];return null===_0x9ee2df&&null===_0x195be8?0x0:null===_0x9ee2df&&null!==_0x195be8?-0x1:null!==_0x9ee2df&&null===_0x195be8?0x1:_0x9ee2df['start']['isBefore'](_0x195be8['start'])?-0x1:0x1;});const _0x40c04f=new Set();for(const {name:_0x4b7797,data:_0x2eea5d}of _0x4be4d2){const {group:_0x29cf6a,id:_0x12f46d}=this['_splitMarkerName'](_0x4b7797);if('suggestion'===_0x29cf6a&&(null===_0x2eea5d['oldRange']&&this['_handleNewSuggestionMarker'](_0x4b7797),null===_0x2eea5d['newRange'])){const _0x3ab62a=this['_suggestions']['get'](_0x12f46d);_0x3ab62a['isInContent']?_0x40c04f['add'](_0x3ab62a):this['_removeSuggestion'](_0x3ab62a);}}for(const {name:_0x15b152,data:_0x63b77d}of _0x4be4d2){const {group:_0x5edc6e,id:_0x1194f2}=this['_splitMarkerName'](_0x15b152);if('suggestion'!==_0x5edc6e)continue;const _0x5b4681=this['_suggestions']['get'](_0x1194f2);null!=_0x63b77d['newRange']&&null!=_0x63b77d['oldRange']&&(this['_refreshSuggestionsChain'](_0x5b4681),_0x40c04f['add'](_0x5b4681['head']));}for(const _0x2b9e16 of _0x40c04f)this['fire']('suggestionChanged',_0x2b9e16);_0x40c04f['clear']();}),_0x42fa62['model']['on']('applyOperation',(_0x4b773f,_0x21e4ac)=>{const _0x3a48cd=_0x21e4ac[0x0];if(!this['_suggestions']['size'])return;if(!_0x3a48cd['isDocumentOperation'])return;if(_0x3a48cd['batch']['isUndo']||!_0x3a48cd['batch']['isLocal'])return;let _0x2133f9,_0x3b4791;switch(_0x3a48cd['type']){case'insert':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['position']),_0x3b4791=_0x2133f9['getShiftedBy'](_0x3a48cd['howMany']);break;case'split':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['splitPosition']),_0x3b4791=_0x42fa62['model']['createPositionAt'](_0x3a48cd['moveTargetPosition']);break;case'move':_0x2133f9=_0x42fa62['model']['createPositionAt'](_0x3a48cd['targetPosition']),_0x3b4791=_0x2133f9['getShiftedBy'](_0x3a48cd['howMany']);break;default:return;}const _0xc4e2eb=_0x42fa62['model']['createRange'](_0x2133f9,_0x3b4791);_0x42fa62['model']['change'](()=>{for(const {suggestion:_0x1019f3,meta:_0x2676a9}of this['_findSuggestions'](_0xc4e2eb)){if(_0x1019f3['isMultiRange'])continue;if('formatInline'==_0x1019f3['type'])continue;const _0xd1fa6d=_0x1019f3['data']&&_0x1019f3['data']['multipleBlocks'];('formatBlock'!=_0x1019f3['type']||'split'==_0x3a48cd['type']&&!_0xd1fa6d)&&(_0x2676a9['containsRangeInObject']||'insertion'==_0x1019f3['type']&&_0x2676a9['isOwn']||_0x1019f3['getFirstRange']()['containsRange'](_0xc4e2eb)&&this['_breakSuggestionMarker'](_0x1019f3,_0x2133f9,_0x3b4791));}});},{'priority':'lowest'}),_0x42fa62['model']['on']('deleteContent',(_0x237ac1,_0xd84a44)=>{const _0x53ee51=_0xd84a44[0x0],_0x3a8e55=_0xd84a44[0x1];if(_0x3a8e55&&_0x3a8e55['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x53ee51['isCollapsed'])return;const _0x37f76e=_0x42fa62['model']['schema'],{start:_0x3d99f5,end:_0x53db90}=_0x53ee51['getFirstRange'](),_0x4bc695=_0x3d99f5['nodeAfter']&&_0x37f76e['isObject'](_0x3d99f5['nodeAfter'])?null:_0x37f76e['getNearestSelectionRange'](_0x3d99f5,'forward'),_0x3f4307=_0x53db90['nodeBefore']&&_0x37f76e['isObject'](_0x53db90['nodeBefore'])?null:_0x37f76e['getNearestSelectionRange'](_0x53db90,'backward'),_0x2a6674=_0x42fa62['model']['createRange'](_0x4bc695?_0x4bc695['start']:_0x3d99f5,_0x3f4307?_0x3f4307['end']:_0x53db90);_0x42fa62['model']['change'](_0x33bce3=>{this['markDeletion'](_0x2a6674);const _0x3bf743=_0x42fa62['model']['schema']['getNearestSelectionRange'](_0x2a6674['start']);_0x53ee51['is']('documentSelection')?_0x33bce3['setSelection'](_0x3bf743):_0x53ee51['setTo'](_0x3bf743);}),_0x237ac1['stop']();},{'priority':_0x8da7fc['normal']+0xa}),_0x42fa62['model']['on']('insertContent',(_0x10c195,_0x377067)=>{const _0x4aa63b=_0x377067[_0x377067['length']-0x1];_0x4aa63b&&_0x4aa63b['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x42fa62['model']['change'](()=>{let _0x4882f8=_0x42fa62['model']['insertContent'](_0x377067[0x0],_0x377067[0x1],_0x377067[0x2],_0x377067[0x3],{'forceDefaultExecution':!0x0});if(!_0x4882f8)return;_0x10c195['return']=_0x4882f8['clone']();const _0x38de2c=_0x4882f8['end']['nodeBefore'],_0x41f8c1=_0x42fa62['model']['schema'];_0x38de2c&&_0x41f8c1['isBlock'](_0x38de2c)&&!_0x41f8c1['isObject'](_0x38de2c)&&(_0x4882f8=_0x42fa62['model']['createRange'](_0x4882f8['start'],_0x42fa62['model']['createPositionAt'](_0x38de2c,'end'))),this['markInsertion'](_0x4882f8);}),_0x10c195['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x126243(_0x42fa62,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x21faf8=new _0x506a57(_0x42fa62,this['_suggestions']);_0x42fa62['commands']['add']('acceptSuggestion',_0x21faf8),this['enableCommand']('acceptSuggestion');const _0x24f027=new _0x4900ca(_0x42fa62,this['_suggestions']);_0x42fa62['commands']['add']('discardSuggestion',_0x24f027),this['enableCommand']('discardSuggestion'),_0x42fa62['commands']['add']('acceptAllSuggestions',new _0x5535ee(_0x42fa62,_0x21faf8,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x42fa62['commands']['add']('discardAllSuggestions',new _0x2a8010(_0x42fa62,_0x24f027,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x42fa62['commands']['add']('acceptSelectedSuggestions',new _0x2e6d55(_0x42fa62,_0x21faf8,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x42fa62['commands']['add']('discardSelectedSuggestions',new _0x49fbcd(_0x42fa62,_0x24f027,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x4bfc61=_0x42fa62['plugins']['get'](_0x2b993d);this['listenTo'](_0x4bfc61,'addComment',(_0x39d0df,{threadId:_0x29eea8})=>{const _0x4a7729=this['_suggestions']['get'](_0x29eea8);_0x4a7729&&_0x4a7729['commentThread']&&0x1===_0x4a7729['commentThread']['length']&&this['_updateSuggestionData'](_0x29eea8,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x4bfc61,'removeComment',(_0x594514,{threadId:_0x3b18b7})=>{const _0x41f2e1=this['_suggestions']['get'](_0x3b18b7);_0x41f2e1&&_0x41f2e1['commentThread']&&!_0x41f2e1['commentThread']['length']&&this['_updateSuggestionData'](_0x3b18b7,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x5d709d){if(this['_adapter'])throw new _0x6684a1('track-changes-adapter-already-set',this);this['_adapter']=_0x5d709d;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x1a1236=!0x1,toJSON:_0x2ed47e=!0x1}={}){const _0x466e4c=[];for(const _0x523cf1 of this['_suggestions']['values']())_0x1a1236&&!_0x523cf1['isInContent']||_0x466e4c['push'](_0x523cf1);return _0x2ed47e?_0x466e4c['map'](_0x37df42=>_0x37df42['toJSON']()):_0x466e4c;}['getSuggestion'](_0x36dd8c){const _0x516fbe=this['_suggestions']['get'](_0x36dd8c);if(!_0x516fbe)throw new _0x6684a1('track-changes-suggestion-not-found',this);return _0x516fbe;}['hasSuggestion'](_0x12dcf5){return this['_suggestions']['has'](_0x12dcf5);}['addSuggestionData'](_0x58dd29){const {id:_0x3a7e16,authorId:_0x2de73e}=_0x58dd29,[_0x8caa16,_0x4bac32]=_0x58dd29['type']['split'](':'),_0x1521a0=this['_suggestions']['get'](_0x3a7e16)||this['_createSuggestion'](_0x8caa16,_0x4bac32,_0x3a7e16,_0x2de73e);switch(this['_addThreadToSuggestion'](_0x1521a0),this['_checkSuggestionCorrectness'](_0x1521a0,_0x8caa16,_0x4bac32||null,_0x2de73e),_0x1521a0['createdAt']=_0x58dd29['createdAt'],_0x58dd29['data']&&(_0x1521a0['data']=_0x58dd29['data']),_0x58dd29['attributes']&&(_0x1521a0['attributes']=_0x58dd29['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x1521a0['_saved']=!0x0),this['_suggestionState']['get'](_0x1521a0)){case'notReady':this['_suggestionState']['set'](_0x1521a0,'dataReady');break;case'markerReady':_0x1521a0['isInContent']?(this['_suggestionState']['set'](_0x1521a0,'ready'),this['fire']('suggestionLoaded',_0x1521a0)):this['_suggestionState']['set'](_0x1521a0,'removed');}return _0x1521a0;}['acceptSuggestion'](_0x407621){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x5a6d15 of _0x407621['getAllAdjacentSuggestions']())_0x5a6d15['accept']();});});}['discardSuggestion'](_0x47fdbe){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0xbe55e2 of _0x47fdbe['getAllAdjacentSuggestions']())_0xbe55e2['discard']();});});}['enableCommand'](_0x40631a,_0x192cc8){const _0x39aa2b=this['editor']['commands']['get'](_0x40631a);if(!_0x39aa2b)throw new _0x6684a1('track-changes-command-not-found',this,{'commandName':_0x40631a});this['_enabledCommands']['add'](_0x39aa2b),_0x192cc8&&_0x39aa2b['on']('execute',(_0x4c361c,_0x2ff267)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x2ff267['length']>0x0&&_0x2ff267[_0x2ff267['length']-0x1]&&_0x2ff267[_0x2ff267['length']-0x1]['forceDefaultExecution']||(_0x192cc8((..._0x5ade1a)=>_0x39aa2b['execute'](..._0x5ade1a,{'forceDefaultExecution':!0x0}),..._0x2ff267),_0x4c361c['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x479767){let _0x55409f,_0x518c0c;const _0x4bb145=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x55409f=_0x479767();}catch(_0x7049a3){_0x518c0c=_0x7049a3;}return _0x4bb145||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x518c0c&&_0x6684a1['rethrowUnexpectedError'](_0x518c0c,this),_0x55409f;}['markInsertion'](_0x5a790e,_0x17208d=null,_0xfca3bc={}){if(_0x5a790e['isCollapsed'])return null;const _0x4b4331=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x30aae4,meta:_0x76902a}of this['_findSuggestions'](_0x5a790e,'insertion'))if(_0x76902a['isOwn']){if(!_0x76902a['isNextTo'])return _0x30aae4;if(_0x17208d==_0x30aae4['subType']){const _0x1d35d7=_0x30aae4['getFirstRange']();return _0x1d35d7['start']['isEqual'](_0x5a790e['end'])?this['_setSuggestionRange'](_0x30aae4,this['_model']['createRange'](_0x5a790e['start'],_0x1d35d7['end'])):this['_setSuggestionRange'](_0x30aae4,this['_model']['createRange'](_0x1d35d7['start'],_0x5a790e['end'])),_0x30aae4;}}const _0x552a9f=_0x17e38b(),_0x5f40ad=_0x4b4331['id'],_0xc0ddbd=_0x17208d?'insertion:'+_0x17208d:'insertion',_0x1021a9=this['_setSuggestionData']({'id':_0x552a9f,'type':_0xc0ddbd,'createdAt':new Date(),'authorId':_0x5f40ad,'attributes':_0xfca3bc});return this['_addSuggestionMarker'](_0xc0ddbd,_0x552a9f,_0x5f40ad,_0x5a790e),_0x1021a9;}['markMultiRangeInsertion'](_0x59e029,_0x34380b='multi',_0x8c0762={}){const _0x44448a=this['editor']['plugins']['get']('Users')['me'],_0x2d681a=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x34380b,'join');for(const _0x23df7f of this['getSuggestions']())if(_0x23df7f['author']['id']==_0x44448a['id']&&'insertion'==_0x23df7f['type']&&_0x23df7f['subType']==_0x34380b&&(_0x2d681a(_0x23df7f['getRanges'](),_0x59e029)||_0x2d681a(_0x59e029,_0x23df7f['getRanges']()))){for(const _0x32c6a of _0x59e029)_0x23df7f['addRange'](_0x32c6a);return _0x23df7f;}for(const _0x8cf6c2 of _0x59e029)for(const {suggestion:_0x26c12a,meta:_0x3671ae}of this['_findSuggestions'](_0x8cf6c2,'insertion')){if(!_0x3671ae['isOwn'])continue;let _0x2773b7=!0x0;for(const _0x4b1e4a of _0x26c12a['getRanges']())for(const _0x33cab0 of _0x59e029)if(!_0x4b1e4a['containsRange'](_0x33cab0)){_0x2773b7=!0x1;break;}if(_0x2773b7)return _0x26c12a;}const _0x123618=_0x17e38b(),_0x3c007e=_0x44448a['id'],_0x468956='insertion:'+_0x34380b,_0x280e99=this['_setSuggestionData']({'id':_0x123618,'type':_0x468956,'createdAt':new Date(),'authorId':_0x3c007e,'attributes':_0x8c0762});for(const _0x2c13a2 of _0x59e029)this['_addSuggestionMarker'](_0x468956,_0x123618,_0x3c007e,_0x2c13a2,_0xf23b9['getMultiRangeId']());return _0x280e99;}['markInlineFormat'](_0x23bf4f,_0x5c4c0e,_0x49c25d=null,_0x3f8b2d={}){if(_0x49c25d=_0x49c25d||bt(_0x5c4c0e),_0x23bf4f['isCollapsed'])return;const _0x333777=this['editor']['plugins']['get']('Users')['me'],_0x2cb0c3=[];for(const {suggestion:_0x23bc7a,meta:_0x527527}of this['_findSuggestions'](_0x23bf4f,'insertion'))_0x527527['isOwn']&&!_0x527527['isInsideObject']&&_0x2cb0c3['push'](..._0x23bc7a['getRanges']());const _0x3e33ab=function(_0x3253a0,_0x2943ea){const _0x53936e=[];for(const _0x301c0c of _0x2943ea){const _0x51642e=_0x3253a0['getIntersection'](_0x301c0c);_0x51642e&&_0x53936e['push'](_0x51642e);}return _0x53936e;}(_0x23bf4f,_0x2cb0c3),_0x20267b=function(_0x376b0f,_0x32c782){const _0x367be1=[_0x376b0f];for(const _0x2f4ba4 of _0x32c782){let _0x57f184=0x0;for(;_0x57f184<_0x367be1['length'];){const _0x2eb06f=_0x367be1[_0x57f184]['getDifference'](_0x2f4ba4);_0x367be1['splice'](_0x57f184,0x1,..._0x2eb06f),_0x57f184+=_0x2eb06f['length'];}}return _0x367be1;}(_0x23bf4f,_0x2cb0c3);_0x3e33ab['length']&&this['_model']['change'](()=>{for(const _0x42813c of _0x3e33ab){const _0xdf07c1=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x49c25d,'accept');this['forceDefaultExecution'](()=>_0xdf07c1([_0x42813c],_0x5c4c0e,_0x3f8b2d));}});for(const _0x39ac39 of _0x20267b){let _0x1d60fd=null,_0x92935c=_0x39ac39['start'],_0x449ff7=_0x39ac39['end'];for(const {suggestion:_0x4c298b,meta:_0xa8d47d}of this['_findSuggestions'](_0x39ac39,'formatInline')){if(!_0xa8d47d['isOwn'])continue;if(_0x4c298b['subType']!=_0x49c25d)continue;const _0x137dfd=_0x4c298b['getFirstRange']();if(_0x137dfd['containsRange'](_0x39ac39,!0x0))return;_0x92935c=_0x92935c['isBefore'](_0x137dfd['start'])?_0x92935c:_0x137dfd['start'],_0x449ff7=_0x449ff7['isAfter'](_0x137dfd['end'])?_0x449ff7:_0x137dfd['end'],_0x1d60fd?_0x137dfd['start']['isBefore'](_0x1d60fd['getFirstRange']()['start'])?(_0x1d60fd['removeMarkers'](),_0x1d60fd=_0x4c298b):_0x4c298b['removeMarkers']():_0x1d60fd=_0x4c298b;}const _0x287cc7=this['_model']['createRange'](_0x92935c,_0x449ff7);if(_0x1d60fd)this['_setSuggestionRange'](_0x1d60fd,_0x287cc7);else{const _0x1eb230=_0x17e38b(),_0x50cb2b=_0x333777['id'];this['_setSuggestionData']({'id':_0x1eb230,'type':'formatInline:'+_0x49c25d,'data':_0x5c4c0e,'createdAt':new Date(),'authorId':_0x50cb2b,'attributes':_0x3f8b2d}),this['_addSuggestionMarker']('formatInline:'+_0x49c25d,_0x1eb230,_0x50cb2b,_0x287cc7);}}}['markBlockFormat'](_0xb62f15,_0x1240d9,_0x15c34b=[],_0xde4303=null,_0x1cdb94={}){_0x1240d9['formatGroupId']||(_0x1240d9['formatGroupId']=_0x1240d9['commandName']),_0x1240d9['multipleBlocks']=_0xb62f15['is']('range'),_0xde4303=_0xde4303||bt(_0x1240d9);const _0x44e1fb=_0x15c34b['map'](_0x1ebb4e=>vt(_0x1ebb4e,this['_model'])),_0x5d6689=_0xb62f15['is']('range')?_0xb62f15:vt(_0xb62f15,this['_model']);_0x44e1fb['push'](_0x5d6689);let _0x4718c6=!0x0;for(const _0x2fa1aa of _0x44e1fb)if(!this['_rangeIsInLocalUserInsertion'](_0x2fa1aa)){_0x4718c6=!0x1;break;}if(_0x4718c6){const _0x52e5b6=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0xde4303,'accept');return void this['forceDefaultExecution'](()=>_0x52e5b6([_0x5d6689],_0x1240d9,_0x1cdb94));}let _0x56b8b1=null,_0x1832d1=_0x5d6689['start'],_0x24ab53=_0x5d6689['end'];for(const {suggestion:_0x1d2611,meta:_0x3ca441}of this['_findSuggestions'](_0x5d6689,'formatBlock')){if(!_0x3ca441['isOwn']||_0x3ca441['isNextTo']||_0x3ca441['containsRangeInObject']||_0x3ca441['isInsideObject'])continue;if(_0x1d2611['data']['formatGroupId']!=_0x1240d9['formatGroupId'])continue;const _0x293a80=_0x1d2611['getFirstRange']();if(_0x1d2611['subType']==_0xde4303){if(_0x293a80['containsRange'](_0x5d6689,!0x0))return;_0x1832d1=_0x1832d1['isBefore'](_0x293a80['start'])?_0x1832d1:_0x293a80['start'],_0x24ab53=_0x24ab53['isAfter'](_0x293a80['end'])?_0x24ab53:_0x293a80['end'],_0x56b8b1?_0x293a80['start']['isBefore'](_0x56b8b1['getFirstRange']()['start'])?(_0x56b8b1['removeMarkers'](),_0x56b8b1=_0x1d2611):_0x1d2611['removeMarkers']():_0x56b8b1=_0x1d2611;}else{const _0x24804c=_0x5d6689['getIntersection'](_0x293a80);this['_cutOutSuggestionMarker'](_0x1d2611,_0x24804c);}}const _0x222713=this['editor']['plugins']['get']('Users')['me'],_0x34fc9b=_0x17e38b(),_0x2feb2a=_0x222713['id'];_0x56b8b1?this['_setSuggestionRange'](_0x56b8b1,this['_model']['createRange'](_0x1832d1,_0x24ab53)):(this['_setSuggestionData']({'id':_0x34fc9b,'type':'formatBlock:'+_0xde4303,'data':_0x1240d9,'createdAt':new Date(),'authorId':_0x2feb2a,'attributes':_0x1cdb94}),this['_addSuggestionMarker']('formatBlock:'+_0xde4303,_0x34fc9b,_0x2feb2a,this['_model']['createRange'](_0x1832d1,_0x24ab53)));}['markMultiRangeBlockFormat'](_0x533f3c,_0xd40695,_0x587f9c=[],_0x104a8e=null,_0x39b7d5={}){_0xd40695['formatGroupId']||(_0xd40695['formatGroupId']=_0xd40695['commandName']),_0xd40695['multipleBlocks']=!0x1,_0x104a8e=_0x104a8e||bt(_0xd40695);const _0x54c478=_0x587f9c['map'](_0x17eb1c=>vt(_0x17eb1c,this['_model'])),_0x4dad25=_0x533f3c['map'](_0x5b7203=>vt(_0x5b7203,this['_model']));_0x54c478['push'](..._0x4dad25);let _0x4ff165=!0x0;for(const _0x4c5b58 of _0x54c478)if(!this['_rangeIsInLocalUserInsertion'](_0x4c5b58)){_0x4ff165=!0x1;break;}if(_0x4ff165){const _0x15e887=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x104a8e,'accept');return void this['forceDefaultExecution'](()=>_0x15e887(_0x4dad25,_0xd40695,_0x39b7d5));}const _0x5d4a32=this['editor']['plugins']['get']('Users')['me'];for(const _0x17a37a of this['getSuggestions']()){if(_0x17a37a['author']['id']!=_0x5d4a32['id'])continue;if('formatBlock'!=_0x17a37a['type']||_0x17a37a['data']['formatGroupId']!=_0xd40695['formatGroupId'])continue;const _0x48e720=_0x17a37a['subType']==_0x104a8e;for(let _0x344715=0x0;_0x344715<_0x4dad25['length'];_0x344715++){const _0x2303e1=_0x4dad25[_0x344715];for(const _0x4609a6 of _0x17a37a['getMarkers']()){const _0x48099d=_0x4609a6['getRange']();if(_0x2303e1['isEqual'](_0x48099d)){_0x48e720?(_0x4dad25['splice'](_0x344715,0x1),_0x344715--):_0x17a37a['removeMarker'](_0x4609a6['name']);break;}}}}if(0x0==_0x4dad25['length'])return;const _0x180430=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x104a8e,'join');for(const _0x4966d1 of this['getSuggestions']())if(_0x4966d1['author']['id']==_0x5d4a32['id']&&'formatBlock'==_0x4966d1['type']&&_0x4966d1['data']['formatGroupId']==_0xd40695['formatGroupId']&&_0x4966d1['subType']==_0x104a8e&&(_0x180430(_0x4966d1['getRanges'](),_0x4dad25)||_0x180430(_0x4dad25,_0x4966d1['getRanges']()))){for(const _0x2ebaa0 of _0x4dad25)_0x4966d1['addRange'](_0x2ebaa0);return _0x4966d1;}const _0x4f60a2=_0x17e38b(),_0x51598f=_0x5d4a32['id'],_0x51a8e2='formatBlock:'+_0x104a8e,_0x24e3cf=this['_setSuggestionData']({'id':_0x4f60a2,'type':_0x51a8e2,'data':_0xd40695,'createdAt':new Date(),'authorId':_0x51598f,'attributes':_0x39b7d5});for(const _0x3397fd of _0x4dad25)this['_addSuggestionMarker'](_0x51a8e2,_0x4f60a2,_0x51598f,_0x3397fd,_0xf23b9['getMultiRangeId']());return _0x24e3cf;}['markDeletion'](_0x232ba9,_0x45f6f2=null,_0x4b39f7={}){if(_0x232ba9['isCollapsed'])return null;const _0x1fd91e=this['editor']['plugins']['get']('Users')['me'],_0x363480=new _0x2dbd60(_0x232ba9['start'],_0x232ba9['end']);for(const {suggestion:_0x1183a1,meta:_0x440adc}of this['_findSuggestions'](_0x363480,'insertion'))if(_0x440adc['isOwn']&&!_0x440adc['isNextTo']){if(_0x1183a1['isMultiRange']){const _0x1e35c8=_0x1183a1['getRanges']()['filter'](_0x479d72=>'$graveyard'!=_0x479d72['root']['rootName']);_0x1e35c8['every'](_0x193912=>_0x363480['containsRange'](_0x193912,!0x0))&&_0x1183a1['discard']();if(_0x1e35c8['some'](_0x170a5d=>_0x170a5d['containsRange'](_0x363480,!0x0))){const _0x21c294=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x45f6f2,'accept');return this['forceDefaultExecution'](()=>_0x21c294([_0x363480],null,_0x4b39f7)),null;}}else{const _0x2fdf31=_0x363480['getIntersection'](_0x1183a1['getFirstRange']());_0x1183a1['_onDiscard']([_0x2fdf31],null,_0x4b39f7);}}if(_0x363480['detach'](),_0x363480['isCollapsed']||'$graveyard'==_0x363480['root']['rootName'])return null;let _0x170491=null,_0x39d46a=_0x363480['start'],_0x59ca7a=_0x363480['end'];for(const {suggestion:_0x2c268a,meta:_0x53eb9d}of this['_findSuggestions'](_0x363480,'deletion'))if(_0x53eb9d['isOwn']){if(_0x2c268a['isMultiRange']){let _0xcc17e2=!0x0;for(const _0x5ce8ff of _0x2c268a['getRanges']()){if(_0x5ce8ff['containsRange'](_0x363480,!0x0))return _0x2c268a;_0x363480['containsRange'](_0x5ce8ff)||(_0xcc17e2=!0x1);}_0xcc17e2&&_0x2c268a['discard']();}else{const _0x40092b=_0x2c268a['getFirstRange']();if(_0x40092b['containsRange'](_0x363480,!0x0))return _0x2c268a;_0x39d46a=_0x39d46a['isBefore'](_0x40092b['start'])?_0x39d46a:_0x40092b['start'],_0x59ca7a=_0x59ca7a['isAfter'](_0x40092b['end'])?_0x59ca7a:_0x40092b['end'],_0x170491?_0x40092b['start']['isBefore'](_0x170491['getFirstRange']()['start'])?(_0x170491['removeMarkers'](),_0x170491=_0x2c268a):_0x2c268a['removeMarkers']():_0x170491=_0x2c268a;}}if(_0x170491)return this['_setSuggestionRange'](_0x170491,this['_model']['createRange'](_0x39d46a,_0x59ca7a)),_0x170491;{const _0x242dd4=_0x17e38b(),_0x44aba6=this['_model']['createRange'](_0x39d46a,_0x59ca7a),_0x4c1797=_0x1fd91e['id'],_0x2abb58=_0x45f6f2?'deletion:'+_0x45f6f2:'deletion',_0x19fb77=this['_setSuggestionData']({'id':_0x242dd4,'type':_0x2abb58,'createdAt':new Date(),'authorId':_0x4c1797,'attributes':_0x4b39f7});return this['_addSuggestionMarker'](_0x2abb58,_0x242dd4,_0x4c1797,_0x44aba6),_0x19fb77;}}['markMultiRangeDeletion'](_0x44e7c5,_0x50b54a='multi',_0x173c9d={}){const _0x1e9a9c=this['editor']['plugins']['get']('Users')['me'],_0x1fec1c=_0x44e7c5['map'](_0x34e15f=>new _0x2dbd60(_0x34e15f['start'],_0x34e15f['end'])),_0x3e17bf=new Set();for(const _0x4f874a of _0x1fec1c)for(const {suggestion:_0x8aae87,meta:_0x281434}of this['_findSuggestions'](_0x4f874a,'insertion'))_0x281434['isOwn']&&!_0x281434['isNextTo']&&_0x3e17bf['add'](_0x8aae87);for(const _0xc8fba2 of _0x3e17bf)if(_0xc8fba2['isMultiRange']){const _0x3cc98c=_0xc8fba2['getRanges']();(!_0xc8fba2['attributes']||!_0xc8fba2['attributes']['skipNestingCheck'])&&(_0x3cc98c['every'](_0x4a1df0=>_0x1fec1c['some'](_0x4a1c61=>_0x4a1c61['containsRange'](_0x4a1df0,!0x0)))&&_0xc8fba2['discard']());if(_0x1fec1c['every'](_0x53509=>_0x3cc98c['some'](_0x2247f2=>_0x2247f2['containsRange'](_0x53509,!0x0)))){const _0x48cbf5=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'accept');return this['forceDefaultExecution'](()=>_0x48cbf5(_0x44e7c5,null,_0x173c9d)),null;}}else{const _0x5431c8=_0xc8fba2['getFirstRange']();_0x1fec1c['some'](_0x34cfcb=>_0x34cfcb['containsRange'](_0x5431c8,!0x0))&&_0xc8fba2['discard']();if(_0x1fec1c['every'](_0x340f1e=>_0x5431c8['containsRange'](_0x340f1e,!0x0))){const _0x47288b=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'accept');return this['forceDefaultExecution'](()=>_0x47288b(_0x1fec1c,null,_0x173c9d)),null;}}const _0x1f878b=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x50b54a,'join');let _0x1ce7db=null;for(const _0x2e6d5f of this['getSuggestions']())if(_0x2e6d5f['author']['id']==_0x1e9a9c['id']&&_0x2e6d5f['isInContent']&&'deletion'==_0x2e6d5f['type']&&_0x2e6d5f['subType']==_0x50b54a&&(_0x1f878b(_0x2e6d5f['getRanges'](),_0x1fec1c)||_0x1f878b(_0x1fec1c,_0x2e6d5f['getRanges']()))){if(_0x1ce7db){if(_0x2e6d5f['commentThread']&&_0x2e6d5f['commentThread']['length'])continue;for(const _0x5dbd8e of _0x2e6d5f['getRanges']())_0x1ce7db['isIntersectingWithRange'](_0x5dbd8e)||_0x1ce7db['addRange'](_0x5dbd8e);_0x2e6d5f['removeMarkers']();}else{_0x1ce7db=_0x2e6d5f;for(const _0x4bfdf6 of _0x1fec1c)_0x2e6d5f['isIntersectingWithRange'](_0x4bfdf6)||_0x2e6d5f['addRange'](_0x4bfdf6);}}if(_0x1ce7db)return _0x1ce7db;_0x3e17bf['clear']();for(const _0x1fb32e of _0x1fec1c)for(const {suggestion:_0x43e980,meta:_0x564e14}of this['_findSuggestions'](_0x1fb32e,'deletion'))_0x564e14['isOwn']&&_0x3e17bf['add'](_0x43e980);for(const _0x509dbc of _0x3e17bf){const _0x12b5c6=_0x509dbc['getRanges']();if(!_0x173c9d||!_0x173c9d['skipNestingCheck']){if(_0x1fec1c['every'](_0x4dabb0=>_0x12b5c6['some'](_0x24a394=>_0x24a394['containsRange'](_0x4dabb0,!0x0))))return _0x509dbc;}(!_0x509dbc['attributes']||!_0x509dbc['attributes']['skipNestingCheck'])&&(_0x12b5c6['every'](_0x58e6b1=>_0x1fec1c['some'](_0x10a87f=>_0x10a87f['containsRange'](_0x58e6b1,!0x0)))&&_0x509dbc['discard']());}const _0x2f7ddf=_0x17e38b(),_0x3c35d8=_0x1e9a9c['id'],_0x26aade='deletion:'+_0x50b54a,_0x46e89e=this['_setSuggestionData']({'id':_0x2f7ddf,'type':_0x26aade,'createdAt':new Date(),'authorId':_0x3c35d8,'attributes':_0x173c9d});for(const _0x43e9e4 of _0x1fec1c)_0x43e9e4['detach'](),_0x43e9e4['isCollapsed']||'$graveyard'==_0x43e9e4['root']['rootName']||this['_addSuggestionMarker'](_0x26aade,_0x2f7ddf,_0x3c35d8,_0x43e9e4,_0xf23b9['getMultiRangeId']());return _0x46e89e;}['_setSuggestionRange'](_0x71f8c7,_0x223ea){const _0x503cc8=_0x71f8c7['getFirstMarker']();this['_model']['change'](_0x39694b=>{_0x39694b['updateMarker'](_0x503cc8,{'range':_0x223ea});});}['_addThreadToSuggestion'](_0x4fa740){const _0x36cd90=_0x4fa740['id'],_0x6f68e2=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x36cd90)||this['_commentsRepository']['addCommentThread']({'channelId':_0x6f68e2,'threadId':_0x36cd90});const _0x2a1cde=this['_commentsRepository']['getCommentThread'](_0x36cd90);_0x2a1cde['unbind']('isRemovable'),_0x2a1cde['isRemovable']=!0x1,_0x4fa740['commentThread']=_0x2a1cde;}['_checkSuggestionCorrectness'](_0x5688fe,_0x101651,_0x2955d5,_0x1ba06b){if(_0x5688fe['type']!=_0x101651||_0x5688fe['subType']!=_0x2955d5||_0x5688fe['author']['id']!=_0x1ba06b)throw this['editor']['isReadOnly']=!0x0,new _0x6684a1('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x13d14f,_0x9222e1){const _0x11eabe=_0x13d14f['getFirstRange']();if(_0x9222e1['isEqual'](_0x11eabe))_0x13d14f['removeMarkers']();else{if(_0x11eabe['containsRange'](_0x9222e1)){const _0x2caf21=this['_model']['createPositionAt'](_0x9222e1['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x11eabe['start'],_0x2caf21));const _0x4442cf=_0x17e38b(),_0xd4b89=_0x13d14f['author']['id'],_0x32bb56=_0x13d14f['type']+':'+_0x13d14f['subType'];this['_setSuggestionData']({'id':_0x4442cf,'type':_0x32bb56,'createdAt':new Date(),'authorId':_0xd4b89,'data':_0x13d14f['data'],'attributes':_0x13d14f['attributes']});const _0x2db088=this['_model']['createPositionAt'](_0x9222e1['end']['parent'],'after'),_0x52fe5b=this['_model']['createRange'](_0x2db088,_0x11eabe['end']);this['_addSuggestionMarker'](_0x32bb56,_0x4442cf,_0xd4b89,_0x52fe5b);}else{if(_0x11eabe['containsPosition'](_0x9222e1['start'])){const _0x2d160b=this['_model']['createPositionAt'](_0x9222e1['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x11eabe['start'],_0x2d160b));}else{const _0x51dccc=this['_model']['createPositionAt'](_0x9222e1['end']['parent'],'after');this['_setSuggestionRange'](_0x13d14f,this['_model']['createRange'](_0x51dccc,_0x11eabe['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x586078){for(const {suggestion:_0x20b49a,meta:_0x4f00ad}of this['_findSuggestions'](_0x586078,'insertion')){if(!_0x4f00ad['isOwn'])continue;const _0x5691e5=_0x20b49a['getRanges']();for(const _0x8ef39d of _0x5691e5)if(!_0x586078['getDifference'](_0x8ef39d)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x4dc5b5){const _0x1023da=this['editor']['plugins']['get']('Users')['getUser'](_0x4dc5b5);if(!_0x1023da)throw new _0x6684a1('track-changes-user-not-found',this);return _0x1023da;}['_createSuggestion'](_0x538b07,_0x135111,_0x413e17,_0x141c9e){const _0x46c3c8=this['_getAuthorFromId'](_0x141c9e),_0x275ec3=this['_suggestionFactory']['buildSuggestion'](_0x538b07,_0x135111,_0x413e17,_0x46c3c8,_0x42754e=>this['_updateSuggestionData'](_0x413e17,{'attributes':_0x42754e}));return this['listenTo'](_0x275ec3,'accept',()=>{this['_updateSuggestionData'](_0x413e17,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x275ec3,'discard',()=>{this['_updateSuggestionData'](_0x413e17,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x413e17,_0x275ec3),this['_suggestionState']['set'](_0x275ec3,'notReady'),_0x275ec3;}['_splitMarkerName'](_0x11d171){const _0x3a9085=_0x11d171['split'](':');return{'group':_0x3a9085[0x0],'type':_0x3a9085[0x1],'subType':_0x3a9085['length']>=0x5?_0x3a9085[0x2]:null,'id':_0x3a9085['length']<0x5?_0x3a9085[0x2]:_0x3a9085[0x3],'authorId':_0x3a9085['length']<0x5?_0x3a9085[0x3]:_0x3a9085[0x4],'markerCount':0x6==_0x3a9085['length']?_0x3a9085[0x5]:null};}['_breakSuggestionMarker'](_0x35a922,_0x340f83,_0x1a3903){const _0x125753=_0x35a922['getFirstRange'](),_0x3a5ba9=_0x125753['start'],_0x4c359e=_0x125753['end'];this['_setSuggestionRange'](_0x35a922,this['_model']['createRange'](_0x3a5ba9,_0x340f83));const _0x432d1e=_0x17e38b(),_0x3643d8=_0x35a922['author']['id'],_0x2609da=_0x35a922['type']+(_0x35a922['subType']?':'+_0x35a922['subType']:'');this['_setSuggestionData']({'id':_0x432d1e,'type':_0x2609da,'createdAt':new Date(),'authorId':_0x3643d8,'originalSuggestionId':_0x35a922['id'],'data':_0x35a922['data']}),'formatBlock'==_0x35a922['type']&&(_0x1a3903=this['_model']['createPositionBefore'](_0x1a3903['parent'])),this['_addSuggestionMarker'](_0x2609da,_0x432d1e,_0x3643d8,this['_model']['createRange'](_0x1a3903,_0x4c359e));}['_findSuggestions'](_0x2b94b1,_0x3d1d74=null){const _0x3713c5=[],_0x4fd53e=this['_model']['schema'],_0x57dfbb=this['editor']['plugins']['get']('Users')['me'];for(const _0xcf2331 of this['getSuggestions']())if(_0xcf2331['isInContent']&&(!_0x3d1d74||_0xcf2331['type']==_0x3d1d74))for(const _0x3c5bb2 of _0xcf2331['getRanges']()){const _0x4b0392=_0x2b94b1['start']['isEqual'](_0x3c5bb2['end'])||_0x2b94b1['end']['isEqual'](_0x3c5bb2['start']);if(_0x4b0392||_0x2b94b1['getIntersection'](_0x3c5bb2)){const _0x28bf3c=_0x2b94b1['containsRange'](_0x3c5bb2)&&wt(_0x4fd53e,_0x3c5bb2['start'],_0x2b94b1),_0x1cbff0=_0x3c5bb2['containsRange'](_0x2b94b1)&&wt(_0x4fd53e,_0x2b94b1['start'],_0x3c5bb2);_0x3713c5['push']({'suggestion':_0xcf2331,'meta':{'isOwn':_0x57dfbb==_0xcf2331['author'],'isNextTo':_0x4b0392,'isInsideObject':_0x28bf3c,'containsRangeInObject':_0x1cbff0}});break;}}return _0x3713c5;}['_addSuggestionMarker'](_0x4f1f9e,_0xa46949,_0x33399f,_0x59a4e1,_0x288e24=null){this['_model']['change'](_0x69b90=>{let _0x13d422='suggestion:'+_0x4f1f9e+':'+_0xa46949+':'+_0x33399f;_0x288e24&&(_0x13d422=_0x13d422+':'+_0x288e24),_0x69b90['addMarker'](_0x13d422,{'range':_0x59a4e1,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x4d10f5){const _0x3c656f=_0x4d10f5['previous'],_0x39f93f=_0x4d10f5['next'];_0x4d10f5['previous']=null,null!=_0x3c656f&&(_0x3c656f['next']=null),_0x4d10f5['next']=null,null!=_0x39f93f&&(_0x39f93f['previous']=null),'ready'==this['_suggestionState']['get'](_0x4d10f5)&&(this['_suggestionState']['set'](_0x4d10f5,'removed'),this['fire']('suggestionUnloaded',_0x4d10f5,_0x3c656f,_0x39f93f));}['_setSuggestionData'](_0x96d786){const _0x34ce6e=_0x96d786['id'],_0x3512b6=this['addSuggestionData'](_0x96d786);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x129120=this['editor']['plugins']['get']('PendingActions'),_0x53ec1c=_0x3512b6['hasComments'],_0x1b8d40=_0x3512b6['subType']?_0x3512b6['type']+':'+_0x3512b6['subType']:_0x3512b6['type'],t=this['editor']['locale']['t'],_0x55c38a=_0x129120['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x405e78={'id':_0x34ce6e,'type':_0x1b8d40,'hasComments':_0x53ec1c,'data':_0x96d786['data']||null,'originalSuggestionId':_0x96d786['originalSuggestionId']||null,'attributes':_0x3512b6['attributes']};this['_adapter']['addSuggestion'](_0x405e78)['then'](_0x3f6209=>{_0x3512b6['_saved']=!0x0,_0x129120['remove'](_0x55c38a),_0x3f6209&&_0x3f6209['createdAt']&&(this['_suggestions']['get'](_0x34ce6e)['createdAt']=_0x3f6209['createdAt']);});}return _0x3512b6;}['_updateSuggestionData'](_0x16181b,_0x485dbd){const _0x28689a=this['editor']['plugins']['get']('PendingActions'),_0x4a2ec3=this['_suggestions']['get'](_0x16181b);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x4a2ec3['_saved']){const t=this['editor']['locale']['t'],_0x1fbbd7=_0x28689a['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x16181b,_0x485dbd)['then'](()=>{_0x28689a['remove'](_0x1fbbd7);});}else _0x4a2ec3['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x16181b,_0x485dbd);});}}['_getSuggestionData'](_0x4b911f){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x6684a1('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x4b911f);}['_handleNewSuggestionMarker'](_0x424044){const {id:_0x6090b4,type:_0x45bb78,subType:_0x550832,authorId:_0x161e46}=this['_splitMarkerName'](_0x424044),_0x21c565=this['_suggestions']['get'](_0x6090b4)||this['_createSuggestion'](_0x45bb78,_0x550832,_0x6090b4,_0x161e46);switch(this['_checkSuggestionCorrectness'](_0x21c565,_0x45bb78,_0x550832,_0x161e46),this['_suggestionState']['get'](_0x21c565)){case'notReady':this['_getSuggestionData'](_0x6090b4)['then'](_0x24bf35=>{let _0x1952b4=Promise['resolve']();_0x24bf35['hasComments']&&(_0x1952b4=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x6090b4})),_0x1952b4['then'](()=>{this['addSuggestionData'](_0x24bf35)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x21c565,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x6090b4,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x21c565,'ready'),this['fire']('suggestionLoaded',_0x21c565);break;case'ready':this['fire']('suggestionChanged',_0x21c565);}_0x21c565['addMarkerName'](_0x424044),this['_refreshSuggestionsChain'](_0x21c565);}['_refreshSuggestionsChain'](_0x25a272){if(_0x25a272['isMultiRange'])return;let _0x1fe28e=!0x0,_0x54ea95=!0x0;for(const _0x139afb of this['getSuggestions']()){if(_0x139afb['isMultiRange'])continue;if(_0x139afb==_0x25a272||!_0x139afb['isInContent'])continue;if(_0x139afb['author']['id']!=_0x25a272['author']['id'])continue;const _0x52e87f=this['_suggestionFactory']['getSuggestionCallback'](_0x25a272['type'],_0x25a272['subType'],'chain'),_0x3bc02b=this['_suggestionFactory']['getSuggestionCallback'](_0x139afb['type'],_0x139afb['subType'],'chain'),_0x2eaf40=_0x52e87f(_0x25a272,_0x139afb),_0x234d23=_0x3bc02b(_0x25a272,_0x139afb);_0x2eaf40&&_0x234d23&&(_0x2eaf40[0x1]['commentThread']&&_0x2eaf40[0x1]['commentThread']['length']||(_0x2eaf40[0x0]['next']=_0x2eaf40[0x1],_0x2eaf40[0x1]['previous']=_0x2eaf40[0x0],_0x2eaf40[0x0]==_0x25a272?_0x54ea95=!0x1:_0x1fe28e=!0x1));}_0x25a272['previous']&&_0x1fe28e&&(_0x25a272['previous']['next']=null,_0x25a272['previous']=null),_0x25a272['next']&&_0x54ea95&&(_0x25a272['next']['previous']=null,_0x25a272['next']=null);}['_joinWithAdjacentSuggestions'](_0x3e1e59){for(const _0x262297 of this['_suggestions']['values']()){if(_0x262297==_0x3e1e59||!_0x262297['isInContent'])continue;if(_0x262297['type']!=_0x3e1e59['type']||_0x262297['author']['id']!=_0x3e1e59['author']['id']||_0x262297['subType']!=_0x3e1e59['subType'])continue;const _0x1487a1=this['_suggestionFactory']['getSuggestionCallback'](_0x3e1e59['type'],_0x3e1e59['subType'],'join');if(_0x1487a1(_0x262297['getRanges'](),_0x3e1e59['getRanges']())){if(_0x3e1e59['commentThread']&&_0x3e1e59['commentThread']['length'])continue;return this['_joinSuggestions'](_0x262297,_0x3e1e59),!0x0;}if(_0x1487a1(_0x3e1e59['getRanges'](),_0x262297['getRanges']())){if(_0x262297['commentThread']&&_0x262297['commentThread']['length'])continue;return this['_joinSuggestions'](_0x3e1e59,_0x262297),!0x0;}}return!0x1;}['_joinSuggestions'](_0x23864a,_0x55d54a){if(_0x23864a['isMultiRange'])for(const _0x17012f of _0x55d54a['getRanges']())_0x23864a['addRange'](_0x17012f);else{const _0x246f8c=_0x55d54a['getFirstRange']()['end'];this['_setSuggestionRange'](_0x23864a,this['_model']['createRange'](_0x23864a['getFirstRange']()['start'],_0x246f8c));}_0x55d54a['removeMarkers']();}}_0x3e6840(l,_0x37c232);class kt{constructor(_0x3504b2){this['_editor']=_0x3504b2,this['_model']=_0x3504b2['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x2c1eaf,_0x586ebf,_0x2ef4f4,_0x29da36,_0x328f65){return new _0xf23b9(this['_model'],{'type':_0x2c1eaf,'subType':_0x586ebf,'id':_0x2ef4f4,'author':_0x29da36,'onAttributesChange':_0x328f65,'onAccept':(..._0x2e0eb6)=>this['getSuggestionCallback'](_0x2c1eaf,_0x586ebf,'accept')(..._0x2e0eb6),'onDiscard':(..._0xbc3a41)=>this['getSuggestionCallback'](_0x2c1eaf,_0x586ebf,'discard')(..._0xbc3a41)});}['registerCustomCallback'](_0x1f9d30,_0x48c22e,_0x4a37aa,_0x51861d){const _0x4262ff=_0x1f9d30+':'+_0x48c22e+':'+_0x4a37aa;this['_customCallbacks']['set'](_0x4262ff,_0x51861d);}['getSuggestionCallback'](_0x45b291,_0x2d26bc,_0x1e7129){const _0x1b7996=_0x45b291+':'+_0x2d26bc+':'+_0x1e7129;return this['_customCallbacks']['get'](_0x1b7996)||this['_defaultCallbacks']['get'](_0x45b291+':'+_0x1e7129);}['_registerDefaultCallbacks'](){const _0x328a70=()=>{},_0x1948ef=_0x23688=>{_0x23688['sort']((_0x5c5ffb,_0x41f69c)=>_0x5c5ffb['start']['isBefore'](_0x41f69c['start'])?0x1:-0x1),this['_model']['change'](_0x48487b=>{for(const _0x3047a6 of _0x23688){let _0x2cc38a;_0x2cc38a=_0x3047a6['end']['isAtEnd']&&_0x3047a6['end']['parent']==_0x3047a6['start']['nodeAfter']?_0x48487b['createSelection'](_0x3047a6['start']['nodeAfter'],'on'):_0x48487b['createSelection'](_0x3047a6),this['_model']['deleteContent'](_0x2cc38a,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0xf95ee6=(_0x17277e,_0x5bd8da)=>{this['_model']['change'](_0x37017f=>{const {commandName:_0x466d15,commandParams:_0x284632=[]}=_0x5bd8da,_0x173709=_0x17277e[0x0];if('$graveyard'==_0x173709['root']['rootName'])return;const _0x483514=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x5a08b7=>_0x2dbd60['fromRange'](_0x5a08b7));yt(_0x173709)?_0x37017f['setSelection'](this['_model']['createRange'](_0x173709['end'])):_0x37017f['setSelection'](_0x173709);for(const _0x2fdbe3 of this['_editor']['commands']['commands']())_0x2fdbe3['refresh']();_0x284632['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x466d15,..._0x284632);const _0x1f5e28=_0x483514['filter'](_0x30c1ec=>'$graveyard'!=_0x30c1ec['root']['rootName']);_0x1f5e28['length']>0x0&&_0x37017f['setSelection'](_0x1f5e28);for(const _0x52d29b of _0x483514)_0x52d29b['detach']();});},_0x3b0e7e=(_0x30f0b9,_0x2277f9)=>0x1==_0x30f0b9['length']&&0x1==_0x2277f9['length']&&_0x30f0b9[0x0]['end']['isEqual'](_0x2277f9[0x0]['start']),_0x42724c=(_0x4b1e48,_0x5cace1)=>Dt(_0x4b1e48,_0x5cace1,this['_model'])?[_0x4b1e48,_0x5cace1]:Dt(_0x5cace1,_0x4b1e48,this['_model'])?[_0x5cace1,_0x4b1e48]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x328a70),this['_defaultCallbacks']['set']('insertion:discard',_0x1948ef),this['_defaultCallbacks']['set']('insertion:join',_0x3b0e7e),this['_defaultCallbacks']['set']('insertion:chain',_0x42724c),this['_defaultCallbacks']['set']('deletion:accept',_0x1948ef),this['_defaultCallbacks']['set']('deletion:discard',_0x328a70),this['_defaultCallbacks']['set']('deletion:join',_0x3b0e7e),this['_defaultCallbacks']['set']('deletion:chain',_0x42724c),this['_defaultCallbacks']['set']('formatInline:accept',_0xf95ee6),this['_defaultCallbacks']['set']('formatInline:discard',_0x328a70),this['_defaultCallbacks']['set']('formatInline:join',_0x3b0e7e),this['_defaultCallbacks']['set']('formatInline:chain',_0x328a70),this['_defaultCallbacks']['set']('formatBlock:accept',_0xf95ee6),this['_defaultCallbacks']['set']('formatBlock:discard',_0x328a70),this['_defaultCallbacks']['set']('formatBlock:join',_0x3b0e7e),this['_defaultCallbacks']['set']('formatBlock:chain',_0x328a70);}}function wt(_0x4caf58,_0x119ed0,_0x11eea5){for(const _0x3ccffa of _0x119ed0['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x3ccffa['root']==_0x3ccffa)return!0x1;if(!_0x11eea5['containsItem'](_0x3ccffa))return!0x1;if(_0x4caf58['isObject'](_0x3ccffa)||_0x4caf58['isLimit'](_0x3ccffa))return!0x0;}}function yt(_0x746e09){return _0x746e09['end']['parent']==_0x746e09['start']['nodeAfter']&&_0x746e09['end']['isAtStart'];}function St(_0xc12e94,_0xdaedba,_0x17c7b3,_0x308c28){const _0x1de82f=_0x193961=>!_0x193961['item']['is']('textProxy')&&!_0x308c28['isObject'](_0x193961['item']),_0x4de93f=_0xc12e94['start']['getLastMatchingPosition'](_0x1de82f),_0x249edb=_0xc12e94['end']['getLastMatchingPosition'](_0x1de82f,{'direction':'backward'});return(!_0xc12e94['start']['isEqual'](_0x4de93f)||!_0xc12e94['end']['isEqual'](_0x249edb))&&(_0x4de93f['isBefore'](_0x249edb)?_0x17c7b3['updateMarker'](_0xdaedba,{'range':_0x17c7b3['createRange'](_0x4de93f,_0x249edb)}):_0x17c7b3['removeMarker'](_0xdaedba),!0x0);}function bt(_0x42234a){return mt(_0x42234a);}function It(_0x2539e5){const _0x3eea91=_0x2539e5['start']['nodeAfter'];return _0x3eea91&&_0x3eea91['is']('element');}function vt(_0x304e67,_0x6f7cf1){const _0x23c093=_0x6f7cf1['schema']['isObject'](_0x304e67)||_0x6f7cf1['schema']['isSelectable'](_0x304e67);return _0x6f7cf1['createRange'](_0x6f7cf1['createPositionAt'](_0x304e67,'before'),_0x23c093?_0x6f7cf1['createPositionAfter'](_0x304e67):_0x6f7cf1['createPositionAt'](_0x304e67,'end'));}function Dt(_0x1f0d78,_0x446244,_0x573da5){const _0x5f13ae=_0x1f0d78['getFirstRange'](),_0x1c8d9e=_0x446244['getFirstRange']();if(_0x5f13ae['end']['isEqual'](_0x1c8d9e['start']))return!0x0;if(_0x1f0d78['type']!=_0x446244['type'])return!0x1;if(!_0x5f13ae['end']['isTouching'](_0x1c8d9e['start']))return!0x1;const _0x451686=_0x573da5['createRange'](_0x5f13ae['end'],_0x1c8d9e['start'])['getWalker']();for(const _0x1bb75e of _0x451686)if(['elementStart','elementEnd']['includes'](_0x1bb75e['type'])&&_0x573da5['schema']['isLimit'](_0x1bb75e['item']))return!0x1;return!0x0;}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3c04e8}from'ckeditor5/src/core';import _0x18f2e1 from'./trackchangesediting';import _0x532981 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import Ct from'./ui/suggestioncontroller';import Tt from'./ui/view/suggestionthreadview';import _0xb52340 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 _0x3c04e8{static get['requires'](){return[qt,xt,_0x18f2e1,_0x532981,_0xb52340];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x5ef2dc){super(_0x5ef2dc),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x42a319=this['editor']['config'];_0x42a319['define']('trackChanges.SuggestionThreadView',Tt),_0x42a319['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x42a319['get']('trackChanges.disableComments');}['init'](){const _0x6f0e83=this['editor'],_0x2546a4=_0x6f0e83['plugins']['get'](_0x18f2e1),_0x18d9a2=_0x6f0e83['plugins']['get'](qt),_0x158a10=_0x6f0e83['plugins']['get'](xt),_0x50401b=_0x6f0e83['plugins']['get'](_0x532981);_0x6f0e83['ui']['componentFactory']['add']('trackChanges',_0x35eeb1=>this['_createUIButton'](_0x35eeb1)),_0x158a10['addSourceCollector'](()=>{const _0xc0277=[];for(const [_0x3a7c30,_0xa101c2]of Array['from'](this['_suggestionToController'])){const _0x57a982=_0x3a7c30['getAllAdjacentSuggestions'](),_0x112161=[];for(const _0x189242 of _0x57a982){if(!_0x189242['isInContent'])continue;if(_0x189242['isMultiRange']){_0x112161['push'](..._0x189242['getRanges']());continue;}const _0x80718c=_0x189242['getFirstRange']();if(_0x112161['length']>0x0){const _0x3233d8=_0x112161[0x0]['getJoined'](_0x80718c);if(_0x3233d8){_0x112161[0x0]=_0x3233d8;continue;}}_0x112161['push'](_0x80718c);}_0xc0277['push']([_0xa101c2['view'],_0x112161]);}return _0xc0277;}),this['listenTo'](_0x2546a4,'suggestionLoaded',(_0x19cb71,_0x19b437)=>{let _0x309be0=!0x1;const _0x8300ab=Mt(_0x1a38ba=>{_0x309be0||_0x1a38ba?_0x309be0&&_0x1a38ba&&(this['_destroyController'](_0x19b437),_0x158a10['refreshSelectedViews'](),_0x309be0=!0x1):(this['_initializeController'](_0x19b437),_0x158a10['refreshSelectedViews'](),_0x309be0=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x19b437,_0x8300ab),this['listenTo'](_0x19b437,'change:previous',(_0x35e312,_0x3ffd59,_0x336e80,_0x248d30)=>{_0x19b437['isInContent']&&(null==_0x336e80?(this['_updateController'](_0x248d30['head']),_0x8300ab(!0x1)):(this['_updateController'](_0x336e80['head']),_0x8300ab(!0x0)));}),null===_0x19b437['previous']?_0x8300ab(!0x1):this['_updateController'](_0x19b437['head']);}),this['listenTo'](_0x2546a4,'suggestionUnloaded',(_0x56a522,_0x3ba85a,_0x26ef90)=>{this['stopListening'](_0x3ba85a,'change:previous'),this['_debouncedHandlers']['get'](_0x3ba85a)['cancel'](),this['_debouncedHandlers']['delete'](_0x3ba85a);const _0x19904b=_0x26ef90?_0x26ef90['head']:_0x3ba85a,_0x37480c=this['_suggestionToController']['get'](_0x19904b);null!==_0x26ef90&&this['_updateController'](_0x19904b),null===_0x26ef90&&_0x37480c&&this['_destroyController'](_0x3ba85a);}),this['listenTo'](_0x2546a4,'suggestionChanged',(_0x551ab8,_0x2e4ec7)=>{this['_updateController'](_0x2e4ec7);}),this['listenTo'](_0x18d9a2,'change:activeAnnotations',(_0x1b3321,_0x2f7cb5,_0x2f5579)=>{const _0x38ceba=Array['from'](_0x2f5579,_0x212f65=>_0x212f65['innerView'])['filter'](_0x554693=>this['_viewToController']['has'](_0x554693)),_0x4288ea=[];for(const _0x469dcf of _0x38ceba){const _0x2ca81c=this['_viewToController']['get'](_0x469dcf)['model']['getAllAdjacentSuggestions']();_0x4288ea['push'](..._0x2ca81c['reduce']((_0x5b88a9,_0x8d3b76)=>[..._0x5b88a9,..._0x8d3b76['getMarkerNames']()],[]));}_0x2546a4['activeMarkers']=_0x4288ea;}),this['listenTo'](_0x50401b,'addComment',(_0x1929a,{threadId:_0x442e10,isFromAdapter:_0x3cbeaa})=>{if(_0x3cbeaa||!_0x2546a4['hasSuggestion'](_0x442e10))return;const _0x28cdee=_0x2546a4['getSuggestion'](_0x442e10);this['_suggestionToController']['get'](_0x28cdee)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x1df57d){const _0x2fdbcc=Ut(_0x1df57d,Nt),_0x36605f=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x2fdbcc['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':Gt}),_0x2fdbcc['buttonView']['bind']('isOn')['to'](_0x36605f,'value'),_0x2fdbcc['buttonView']['on']('execute',()=>_0x36605f['execute']());const _0x22e675=new Et(),_0x21de81=[{'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 _0x2f2b86 of _0x21de81){const _0x196c50={'type':_0x2f2b86['type']};if(_0x2f2b86['model']){const _0x431e1a=new At(_0x2f2b86['model']),_0x4b7a2f=this['editor']['commands']['get'](_0x431e1a['commandName']);_0x431e1a['bind']('isOn','isEnabled')['to'](_0x4b7a2f,'value','isEnabled'),_0x196c50['model']=_0x431e1a;}_0x22e675['add'](_0x196c50);}Wt(_0x2fdbcc,_0x22e675);const _0xc8f7e9=_0x21de81['filter'](_0x657c92=>null!=_0x657c92['model'])['map'](_0x5027b7=>this['editor']['commands']['get'](_0x5027b7['model']['commandName']));return _0x2fdbcc['buttonView']['actionView']['unbind']('isEnabled'),_0x2fdbcc['buttonView']['arrowView']['unbind']('isEnabled'),_0x2fdbcc['buttonView']['actionView']['bind']('isEnabled')['to'](_0x36605f,'isEnabled'),_0x2fdbcc['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0xc8f7e9,'isEnabled',(..._0x3fb4e1)=>_0x3fb4e1['some'](_0x51f3c1=>_0x51f3c1)),_0x2fdbcc['on']('execute',_0x53f9a9=>this['editor']['execute'](_0x53f9a9['source']['commandName'])),_0x2fdbcc;}['_initializeController'](_0x5d6e61){const _0x42f055=this['editor'],_0x968f43=_0x42f055['config'],_0x5ec3ad=_0x42f055['plugins']['get'](qt),_0x4c9f92=_0x5d6e61['getAllAdjacentSuggestions']()['filter'](_0x56218e=>_0x56218e['isInContent']),_0x5a749b=_0x42f055['plugins']['get']('Users')['me'],_0x3c17d0=_0x42f055['commands']['get']('acceptSuggestion'),_0xf851b=_0x42f055['commands']['get']('discardSuggestion'),_0x36eebc=new(0x0,(_0x968f43['get']('trackChanges'))['SuggestionThreadView'])(_0x42f055['locale'],_0x5d6e61,_0x5a749b,{'disableComments':this['_disableComments'],'editorConfig':_0x968f43['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x968f43['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x968f43['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x968f43['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_t(_0x968f43['get']('locale')),'CommentView':_0x968f43['get']('comments')['CommentView']}),_0x548a28=new Ct(_0x5d6e61,_0x36eebc,_0x3c17d0,_0xf851b);_0x36eebc['descriptionParts']=_0x42f055['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x4c9f92),this['_suggestionToController']['set'](_0x5d6e61,_0x548a28),this['_viewToController']['set'](_0x36eebc,_0x548a28);const _0x5db46b=new Pt(this['editor']['locale'],_0x36eebc);_0x5db46b['bind']('isDirty')['to'](_0x36eebc,'isDirty'),_0x5db46b['bind']('length')['to'](_0x36eebc),_0x5db46b['bind']('type')['to'](_0x36eebc,'type',_0x493900=>'suggestion-'+_0x493900);const _0x4cc596=new Vt({'view':_0x5db46b,'target':()=>{const _0x2a3bae=_0x4c9f92[0x0]['getFirstMarker']();if(!_0x2a3bae)return null;const _0x5a1581=_0x2a3bae['getRange']()['getContainedElement']();return _0x5a1581&&!_0x42f055['editing']['mapper']['toViewElement'](_0x5a1581)?null:Ot(_0x42f055['editing'],_0x2a3bae)||null;},'type':()=>'suggestion-'+_0x548a28['view']['type']});_0x5ec3ad['add'](_0x4cc596);const _0x35de61=_0x42f055['plugins']['get']('PendingActions');let _0x5c0ede;_0x36eebc['on']('change:isDirty',(_0x50fb78,_0xfa72d5,_0x100153)=>{if(_0x100153){const t=this['editor']['locale']['t'];_0x5c0ede=_0x35de61['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x35de61['remove'](_0x5c0ede),_0x5c0ede=null;});}['_destroyController'](_0x580ca){const _0x51a444=this['editor']['plugins']['get']('Annotations'),_0x1866cb=this['_suggestionToController']['get'](_0x580ca),_0x5ab667=_0x1866cb['view'],_0x4d9021=_0x51a444['getByInnerView'](_0x5ab667);_0x51a444['remove'](_0x4d9021),this['_suggestionToController']['delete'](_0x580ca),this['_viewToController']['delete'](_0x5ab667),_0x1866cb['destroy'](),_0x5ab667['destroy']();}['_updateController'](_0x2acd56){if(!_0x2acd56['isInContent']||!this['_suggestionToController']['has'](_0x2acd56))return;const _0x4163b6=this['editor']['plugins']['get']('TrackChangesEditing'),_0x16536b=this['_suggestionToController']['get'](_0x2acd56),_0x49e7d0=_0x2acd56['getAllAdjacentSuggestions']();_0x16536b['view']['descriptionParts']=_0x4163b6['_descriptionFactory']['getDescriptions'](_0x49e7d0);}['destroy'](){super['destroy']();for(const _0x426cf5 of this['_suggestionToController']['keys']())this['_destroyController'](_0x426cf5);for(const _0x4a24c1 of this['_debouncedHandlers']['values']())_0x4a24c1['cancel']();this['_debouncedHandlers']['clear']();}}
23
+ import{Plugin as _0x3a01cf}from'ckeditor5/src/core';import _0x202257 from'./trackchangesediting';import _0x173eac from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import Ct from'./ui/suggestioncontroller';import Tt from'./ui/view/suggestionthreadview';import _0xdd9095 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 _0x3a01cf{static get['requires'](){return[qt,xt,_0x202257,_0x173eac,_0xdd9095];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x7a1337){super(_0x7a1337),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x4096df=this['editor']['config'];_0x4096df['define']('trackChanges.SuggestionThreadView',Tt),_0x4096df['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x4096df['get']('trackChanges.disableComments');}['init'](){const _0x14b82b=this['editor'],_0x28231b=_0x14b82b['plugins']['get'](_0x202257),_0xf842a5=_0x14b82b['plugins']['get'](qt),_0x5c3fa0=_0x14b82b['plugins']['get'](xt),_0x2de147=_0x14b82b['plugins']['get'](_0x173eac);_0x14b82b['ui']['componentFactory']['add']('trackChanges',_0x637294=>this['_createUIButton'](_0x637294)),_0x5c3fa0['addSourceCollector'](()=>{const _0x1a98ff=[];for(const [_0x2335dc,_0x5aa22a]of Array['from'](this['_suggestionToController'])){const _0x1d62e2=_0x2335dc['getAllAdjacentSuggestions'](),_0x45ace0=[];for(const _0x3f3748 of _0x1d62e2){if(!_0x3f3748['isInContent'])continue;if(_0x3f3748['isMultiRange']){_0x45ace0['push'](..._0x3f3748['getRanges']());continue;}const _0x23f9c0=_0x3f3748['getFirstRange']();if(_0x45ace0['length']>0x0){const _0x5e0924=_0x45ace0[0x0]['getJoined'](_0x23f9c0);if(_0x5e0924){_0x45ace0[0x0]=_0x5e0924;continue;}}_0x45ace0['push'](_0x23f9c0);}_0x1a98ff['push']([_0x5aa22a['view'],_0x45ace0]);}return _0x1a98ff;}),this['listenTo'](_0x28231b,'suggestionLoaded',(_0x22ddd5,_0x2de540)=>{let _0x197cfb=!0x1;const _0x184916=Mt(_0x56402c=>{_0x197cfb||_0x56402c?_0x197cfb&&_0x56402c&&(this['_destroyController'](_0x2de540),_0x5c3fa0['refreshSelectedViews'](),_0x197cfb=!0x1):(this['_initializeController'](_0x2de540),_0x5c3fa0['refreshSelectedViews'](),_0x197cfb=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x2de540,_0x184916),this['listenTo'](_0x2de540,'change:previous',(_0xe1280f,_0xa70a3f,_0xd07789,_0x16220e)=>{_0x2de540['isInContent']&&(null==_0xd07789?(this['_updateController'](_0x16220e['head']),_0x184916(!0x1)):(this['_updateController'](_0xd07789['head']),_0x184916(!0x0)));}),null===_0x2de540['previous']?_0x184916(!0x1):this['_updateController'](_0x2de540['head']);}),this['listenTo'](_0x28231b,'suggestionUnloaded',(_0xb67bf4,_0x1bebb7,_0x491275)=>{this['stopListening'](_0x1bebb7,'change:previous'),this['_debouncedHandlers']['get'](_0x1bebb7)['cancel'](),this['_debouncedHandlers']['delete'](_0x1bebb7);const _0x53fb7c=_0x491275?_0x491275['head']:_0x1bebb7,_0x26c73f=this['_suggestionToController']['get'](_0x53fb7c);null!==_0x491275&&this['_updateController'](_0x53fb7c),null===_0x491275&&_0x26c73f&&this['_destroyController'](_0x1bebb7);}),this['listenTo'](_0x28231b,'suggestionChanged',(_0x3b30cd,_0x54ce96)=>{this['_updateController'](_0x54ce96);}),this['listenTo'](_0xf842a5,'change:activeAnnotations',(_0x38bcb6,_0x1ea370,_0x3048f6)=>{const _0x37fba8=Array['from'](_0x3048f6,_0x588ad9=>_0x588ad9['innerView'])['filter'](_0x20a78e=>this['_viewToController']['has'](_0x20a78e)),_0x468aac=[];for(const _0x359e7a of _0x37fba8){const _0x3042ec=this['_viewToController']['get'](_0x359e7a)['model']['getAllAdjacentSuggestions']();_0x468aac['push'](..._0x3042ec['reduce']((_0x3d2648,_0x4e7977)=>[..._0x3d2648,..._0x4e7977['getMarkerNames']()],[]));}_0x28231b['activeMarkers']=_0x468aac;}),this['listenTo'](_0x2de147,'addComment',(_0x3c1b2f,{threadId:_0x55240e,isFromAdapter:_0x2724d7})=>{if(_0x2724d7||!_0x28231b['hasSuggestion'](_0x55240e))return;const _0x1829b0=_0x28231b['getSuggestion'](_0x55240e);this['_suggestionToController']['get'](_0x1829b0)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x1f0171){const _0x13bed8=Ut(_0x1f0171,Nt),_0x1c0b7f=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x13bed8['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':Gt}),_0x13bed8['buttonView']['bind']('isOn')['to'](_0x1c0b7f,'value'),_0x13bed8['buttonView']['on']('execute',()=>_0x1c0b7f['execute']());const _0x9f77bd=new Et(),_0x39c2fa=[{'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 _0x10c7ba of _0x39c2fa){const _0x56e9c7={'type':_0x10c7ba['type']};if(_0x10c7ba['model']){const _0x231dd8=new At(_0x10c7ba['model']),_0x1745a3=this['editor']['commands']['get'](_0x231dd8['commandName']);_0x231dd8['bind']('isOn','isEnabled')['to'](_0x1745a3,'value','isEnabled'),_0x56e9c7['model']=_0x231dd8;}_0x9f77bd['add'](_0x56e9c7);}Wt(_0x13bed8,_0x9f77bd);const _0x5cfc9a=_0x39c2fa['filter'](_0x3a0d91=>null!=_0x3a0d91['model'])['map'](_0x23161a=>this['editor']['commands']['get'](_0x23161a['model']['commandName']));return _0x13bed8['buttonView']['actionView']['unbind']('isEnabled'),_0x13bed8['buttonView']['arrowView']['unbind']('isEnabled'),_0x13bed8['buttonView']['actionView']['bind']('isEnabled')['to'](_0x1c0b7f,'isEnabled'),_0x13bed8['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x5cfc9a,'isEnabled',(..._0x34ee32)=>_0x34ee32['some'](_0x5cb8b8=>_0x5cb8b8)),_0x13bed8['on']('execute',_0x3e7f4b=>this['editor']['execute'](_0x3e7f4b['source']['commandName'])),_0x13bed8;}['_initializeController'](_0x2ed806){const _0x25f2c2=this['editor'],_0x107698=_0x25f2c2['config'],_0x3f2783=_0x25f2c2['plugins']['get'](qt),_0x10d8f9=_0x2ed806['getAllAdjacentSuggestions']()['filter'](_0x58f54d=>_0x58f54d['isInContent']),_0x4abaf5=_0x25f2c2['plugins']['get']('Users')['me'],_0x50883d=_0x25f2c2['commands']['get']('acceptSuggestion'),_0x42060b=_0x25f2c2['commands']['get']('discardSuggestion'),_0x3e5e59=new(0x0,(_0x107698['get']('trackChanges'))['SuggestionThreadView'])(_0x25f2c2['locale'],_0x2ed806,_0x4abaf5,{'disableComments':this['_disableComments'],'editorConfig':_0x107698['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x107698['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x107698['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x107698['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_t(_0x107698['get']('locale')),'CommentView':_0x107698['get']('comments')['CommentView']}),_0x44f559=new Ct(_0x2ed806,_0x3e5e59,_0x50883d,_0x42060b);_0x3e5e59['descriptionParts']=_0x25f2c2['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x10d8f9),this['_suggestionToController']['set'](_0x2ed806,_0x44f559),this['_viewToController']['set'](_0x3e5e59,_0x44f559);const _0x314a75=new Pt(this['editor']['locale'],_0x3e5e59);_0x314a75['bind']('isDirty')['to'](_0x3e5e59,'isDirty'),_0x314a75['bind']('length')['to'](_0x3e5e59),_0x314a75['bind']('type')['to'](_0x3e5e59,'type',_0x320c73=>'suggestion-'+_0x320c73);const _0x51dfe1=new Vt({'view':_0x314a75,'target':()=>{const _0x42faa8=_0x10d8f9[0x0]['getFirstMarker']();if(!_0x42faa8)return null;const _0x24034b=_0x42faa8['getRange']()['getContainedElement']();return _0x24034b&&!_0x25f2c2['editing']['mapper']['toViewElement'](_0x24034b)?null:Ot(_0x25f2c2['editing'],_0x42faa8)||null;},'type':()=>'suggestion-'+_0x44f559['view']['type']});_0x3f2783['add'](_0x51dfe1);const _0x2d9605=_0x25f2c2['plugins']['get']('PendingActions');let _0x18c16a;_0x3e5e59['on']('change:isDirty',(_0x2c6be1,_0x351ef0,_0x4003ea)=>{if(_0x4003ea){const t=this['editor']['locale']['t'];_0x18c16a=_0x2d9605['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x2d9605['remove'](_0x18c16a),_0x18c16a=null;});}['_destroyController'](_0x10f2e3){const _0x317147=this['editor']['plugins']['get']('Annotations'),_0x696471=this['_suggestionToController']['get'](_0x10f2e3),_0x35f333=_0x696471['view'],_0x3e2e9d=_0x317147['getByInnerView'](_0x35f333);_0x3e2e9d&&_0x317147['remove'](_0x3e2e9d),this['_suggestionToController']['delete'](_0x10f2e3),this['_viewToController']['delete'](_0x35f333),_0x696471['destroy'](),_0x35f333['destroy']();}['_updateController'](_0x1e9026){if(!_0x1e9026['isInContent']||!this['_suggestionToController']['has'](_0x1e9026))return;const _0x45de29=this['editor']['plugins']['get']('TrackChangesEditing'),_0x57ee97=this['_suggestionToController']['get'](_0x1e9026),_0x13e839=_0x1e9026['getAllAdjacentSuggestions']();_0x57ee97['view']['descriptionParts']=_0x45de29['_descriptionFactory']['getDescriptions'](_0x13e839);}['destroy'](){super['destroy']();for(const _0x209643 of this['_suggestionToController']['keys']())this['_destroyController'](_0x209643);for(const _0x2e800d of this['_debouncedHandlers']['values']())_0x2e800d['cancel']();this['_debouncedHandlers']['clear']();}}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x380d=['listenTo','bind','stopListening','view','commentThread','isEnabled','discardSuggestion','acceptSuggestion','_discardCommand','model','_acceptCommand'];(function(_0x26f0ec,_0x380d4b){var _0x48b08f=function(_0x66ef03){while(--_0x66ef03){_0x26f0ec['push'](_0x26f0ec['shift']());}};_0x48b08f(++_0x380d4b);}(_0x380d,0x107));var _0x48b0=function(_0x26f0ec,_0x380d4b){_0x26f0ec=_0x26f0ec-0x0;var _0x48b08f=_0x380d[_0x26f0ec];return _0x48b08f;};import{ObservableMixin as _0x2ef0d1,mix as _0x53be8e}from'ckeditor5/src/utils';import _0x5657e5 from'@ckeditor/ckeditor5-comments/src/comments/ui/commentthreadcontroller';export default class Ct{constructor(_0x1ef0ea,_0x5104dd,_0x14bda9,_0x550730){this[_0x48b0('0xa')]=_0x1ef0ea,this[_0x48b0('0x4')]=_0x5104dd,this['commentThreadController']=new _0x5657e5(_0x1ef0ea[_0x48b0('0x5')],_0x5104dd),this[_0x48b0('0x0')]=_0x14bda9,this[_0x48b0('0x9')]=_0x550730,this['view'][_0x48b0('0x2')](_0x48b0('0x6'))['to'](this[_0x48b0('0x0')]),this[_0x48b0('0x1')](_0x5104dd,_0x48b0('0x8'),()=>this[_0x48b0('0x8')]()),this['listenTo'](_0x5104dd,_0x48b0('0x7'),()=>this[_0x48b0('0x7')]());}[_0x48b0('0x8')](){this[_0x48b0('0x0')]['execute'](this[_0x48b0('0xa')]['id']);}[_0x48b0('0x7')](){this[_0x48b0('0x9')]['execute'](this[_0x48b0('0xa')]['id']);}['destroy'](){this[_0x48b0('0x4')]['unbind']('isEnabled'),this[_0x48b0('0x3')](),this['commentThreadController']['destroy']();}}_0x53be8e(Ct,_0x2ef0d1);
23
+ var _0x17fd=['bind','view','destroy','discardSuggestion','commentThread','stopListening','acceptSuggestion','model','isEnabled','_acceptCommand','unbind','execute','_discardCommand','commentThreadController','listenTo'];(function(_0x1458cd,_0x17fd1a){var _0x58f556=function(_0x463e46){while(--_0x463e46){_0x1458cd['push'](_0x1458cd['shift']());}};_0x58f556(++_0x17fd1a);}(_0x17fd,0xb9));var _0x58f5=function(_0x1458cd,_0x17fd1a){_0x1458cd=_0x1458cd-0x0;var _0x58f556=_0x17fd[_0x1458cd];return _0x58f556;};import{ObservableMixin as _0x486f86,mix as _0x4558d8}from'ckeditor5/src/utils';import _0x555f11 from'@ckeditor/ckeditor5-comments/src/comments/ui/commentthreadcontroller';export default class Ct{constructor(_0x4b6600,_0x5dde1a,_0x154a33,_0x1249ad){this[_0x58f5('0x2')]=_0x4b6600,this[_0x58f5('0xb')]=_0x5dde1a,this[_0x58f5('0x8')]=new _0x555f11(_0x4b6600[_0x58f5('0xe')],_0x5dde1a),this[_0x58f5('0x4')]=_0x154a33,this[_0x58f5('0x7')]=_0x1249ad,this['view'][_0x58f5('0xa')]('isEnabled')['to'](this[_0x58f5('0x4')]),this['listenTo'](_0x5dde1a,'acceptSuggestion',()=>this[_0x58f5('0x1')]()),this[_0x58f5('0x9')](_0x5dde1a,'discardSuggestion',()=>this[_0x58f5('0xd')]());}[_0x58f5('0x1')](){this[_0x58f5('0x4')]['execute'](this[_0x58f5('0x2')]['id']);}[_0x58f5('0xd')](){this[_0x58f5('0x7')][_0x58f5('0x6')](this[_0x58f5('0x2')]['id']);}['destroy'](){this[_0x58f5('0xb')][_0x58f5('0x5')](_0x58f5('0x3')),this[_0x58f5('0x0')](),this['commentThreadController'][_0x58f5('0xc')]();}}_0x4558d8(Ct,_0x486f86);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2985=['CommentView','delegate','showInput','isActive','editorConfig','hasDirtyComment','submit','updateComment','commentThreadInputView','value','locale','disableComments','cancel','assign','destroy','removeComment','_config','addComment','commentInputView','set','fire','createdAt','descriptionParts','_createCommentViews','length','_model','isReadOnly','_createCommentThreadInputView','isDirty','setData','commentThread','bind','focus','editor','isEnabled','_localUser','commentsListView'];(function(_0x3500a5,_0x298591){const _0x7bbb77=function(_0x49cdcd){while(--_0x49cdcd){_0x3500a5['push'](_0x3500a5['shift']());}};_0x7bbb77(++_0x298591);}(_0x2985,0x142));const _0x7bbb=function(_0x3500a5,_0x298591){_0x3500a5=_0x3500a5-0x0;let _0x7bbb77=_0x2985[_0x3500a5];return _0x7bbb77;};import{View as _0x54dd2a}from'ckeditor5/src/ui';import _0x3afd37 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentslistview';import _0x435bea from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentthreadinputview';export default class ei extends _0x54dd2a{constructor(_0x5f5989,_0x2c4742,_0x5ab86f,_0x4657f8){super(_0x5f5989),this['commentsListView']=null,this[_0x7bbb('0x13')]=null,this[_0x7bbb('0x1e')](_0x7bbb('0xe'),!0x1),this[_0x7bbb('0x1e')](_0x7bbb('0x20'),_0x2c4742['createdAt']),this[_0x7bbb('0x5')](_0x7bbb('0x20'))['to'](_0x2c4742),this['set'](_0x7bbb('0x21'),[]),this[_0x7bbb('0x1e')](_0x7bbb('0x2'),!0x1),this[_0x7bbb('0x1e')](_0x7bbb('0x8'),!0x1),this[_0x7bbb('0x24')]=_0x2c4742,this[_0x7bbb('0x9')]=_0x5ab86f,this[_0x7bbb('0x1b')]=_0x4657f8,_0x4657f8[_0x7bbb('0x16')]?this['set'](_0x7bbb('0x23'),0x1):this[_0x7bbb('0x22')]();}['focus'](){this['element']['focus']();}[_0x7bbb('0x19')](){this[_0x7bbb('0x2')]=!0x1,this[_0x7bbb('0xa')]&&this[_0x7bbb('0xa')]['destroy'](),this[_0x7bbb('0x13')]&&this['commentThreadInputView'][_0x7bbb('0x19')](),super[_0x7bbb('0x19')]();}[_0x7bbb('0x22')](){this[_0x7bbb('0xa')]=new _0x3afd37(this[_0x7bbb('0x15')],this[_0x7bbb('0x24')][_0x7bbb('0x4')],Object[_0x7bbb('0x18')]({'CommentView':this[_0x7bbb('0x1b')][_0x7bbb('0xb')]},this['_config'])),this['commentsListView'][_0x7bbb('0xc')](_0x7bbb('0x1a'))['to'](this),this['commentsListView'][_0x7bbb('0xc')](_0x7bbb('0x12'))['to'](this),this[_0x7bbb('0xa')][_0x7bbb('0x5')]('isActive')['to'](this),this['set'](_0x7bbb('0x23'),this[_0x7bbb('0xa')][_0x7bbb('0x23')]+0x1),this[_0x7bbb('0x5')]('length')['to'](this[_0x7bbb('0xa')],_0x7bbb('0x23'),_0x3ddee2=>_0x3ddee2+0x1),this[_0x7bbb('0x13')]=this[_0x7bbb('0x1')](),this['on'](_0x7bbb('0x1a'),()=>this[_0x7bbb('0x6')]()),this[_0x7bbb('0x5')](_0x7bbb('0x2'))['to'](this[_0x7bbb('0xa')],_0x7bbb('0x10'),this[_0x7bbb('0x13')][_0x7bbb('0x1d')],_0x7bbb('0x14'),(_0x544f0b,_0x444a1c)=>_0x544f0b||!!_0x444a1c);}['_createCommentThreadInputView'](){const _0x4e4856=new _0x435bea(this[_0x7bbb('0x15')],this[_0x7bbb('0x9')],this[_0x7bbb('0x1b')][_0x7bbb('0xf')]),_0x20e0b2=_0x4e4856[_0x7bbb('0x1d')];return _0x4e4856[_0x7bbb('0x5')](_0x7bbb('0xd'))['to'](this,'isActive',this[_0x7bbb('0x24')]['commentThread'],_0x7bbb('0x0'),_0x20e0b2,_0x7bbb('0x14'),(_0x189999,_0x4cb541,_0x4475ef)=>!!_0x4475ef||_0x189999&&!_0x4cb541),_0x20e0b2['on'](_0x7bbb('0x11'),(_0x41968b,_0x286b4e)=>{this[_0x7bbb('0x1f')](_0x7bbb('0x1c'),_0x286b4e),_0x20e0b2[_0x7bbb('0x7')][_0x7bbb('0x3')]('');}),_0x20e0b2['on'](_0x7bbb('0x17'),()=>this[_0x7bbb('0x6')]()),_0x20e0b2[_0x7bbb('0x5')]('disabledSubmit')['to'](this[_0x7bbb('0x24')][_0x7bbb('0x4')],_0x7bbb('0x0')),_0x4e4856;}}
23
+ const _0x4159=['_localUser','hasDirtyComment','value','isActive','editorConfig','_createCommentThreadInputView','commentThreadInputView','isReadOnly','disableComments','commentsListView','_config','locale','cancel','bind','set','assign','fire','destroy','_model','element','commentThread','_createCommentViews','isEnabled','length','focus','delegate','addComment','isDirty','commentInputView','createdAt','removeComment'];(function(_0x4bdc4b,_0x4159e8){const _0x4172db=function(_0x3d11ab){while(--_0x3d11ab){_0x4bdc4b['push'](_0x4bdc4b['shift']());}};_0x4172db(++_0x4159e8);}(_0x4159,0x1a2));const _0x4172=function(_0x4bdc4b,_0x4159e8){_0x4bdc4b=_0x4bdc4b-0x0;let _0x4172db=_0x4159[_0x4bdc4b];return _0x4172db;};import{View as _0xfe8413}from'ckeditor5/src/ui';import _0x171e23 from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentslistview';import _0x4a81ba from'@ckeditor/ckeditor5-comments/src/comments/ui/view/commentthreadinputview';export default class ei extends _0xfe8413{constructor(_0x427268,_0x13bb28,_0x3be3fa,_0x3d1244){super(_0x427268),this['commentsListView']=null,this[_0x4172('0x16')]=null,this[_0x4172('0x1e')](_0x4172('0x13'),!0x1),this['set'](_0x4172('0xe'),_0x13bb28[_0x4172('0xe')]),this[_0x4172('0x1d')](_0x4172('0xe'))['to'](_0x13bb28),this[_0x4172('0x1e')]('descriptionParts',[]),this['set'](_0x4172('0xc'),!0x1),this[_0x4172('0x1e')](_0x4172('0x7'),!0x1),this[_0x4172('0x3')]=_0x13bb28,this[_0x4172('0x10')]=_0x3be3fa,this[_0x4172('0x1a')]=_0x3d1244,_0x3d1244[_0x4172('0x18')]?this[_0x4172('0x1e')](_0x4172('0x8'),0x1):this['_createCommentViews']();}[_0x4172('0x9')](){this[_0x4172('0x4')][_0x4172('0x9')]();}[_0x4172('0x2')](){this['isDirty']=!0x1,this['commentsListView']&&this['commentsListView'][_0x4172('0x2')](),this[_0x4172('0x16')]&&this['commentThreadInputView'][_0x4172('0x2')](),super['destroy']();}[_0x4172('0x6')](){this[_0x4172('0x19')]=new _0x171e23(this[_0x4172('0x1b')],this[_0x4172('0x3')][_0x4172('0x5')],Object[_0x4172('0x0')]({'CommentView':this[_0x4172('0x1a')]['CommentView']},this['_config'])),this['commentsListView'][_0x4172('0xa')](_0x4172('0xf'))['to'](this),this[_0x4172('0x19')][_0x4172('0xa')]('updateComment')['to'](this),this[_0x4172('0x19')][_0x4172('0x1d')]('isActive')['to'](this),this['set'](_0x4172('0x8'),this['commentsListView'][_0x4172('0x8')]+0x1),this['bind'](_0x4172('0x8'))['to'](this['commentsListView'],'length',_0x4ab2d4=>_0x4ab2d4+0x1),this[_0x4172('0x16')]=this[_0x4172('0x15')](),this['on'](_0x4172('0xf'),()=>this[_0x4172('0x9')]()),this['bind']('isDirty')['to'](this['commentsListView'],_0x4172('0x11'),this[_0x4172('0x16')][_0x4172('0xd')],_0x4172('0x12'),(_0x41c374,_0x2ff5ac)=>_0x41c374||!!_0x2ff5ac);}[_0x4172('0x15')](){const _0x5b6e99=new _0x4a81ba(this[_0x4172('0x1b')],this[_0x4172('0x10')],this['_config'][_0x4172('0x14')]),_0x130fba=_0x5b6e99[_0x4172('0xd')];return _0x5b6e99[_0x4172('0x1d')]('showInput')['to'](this,'isActive',this[_0x4172('0x3')][_0x4172('0x5')],_0x4172('0x17'),_0x130fba,_0x4172('0x12'),(_0x16c65c,_0xae5bdd,_0x26ee81)=>!!_0x26ee81||_0x16c65c&&!_0xae5bdd),_0x130fba['on']('submit',(_0x4c95e5,_0x48f994)=>{this[_0x4172('0x1')](_0x4172('0xb'),_0x48f994),_0x130fba['editor']['setData']('');}),_0x130fba['on'](_0x4172('0x1c'),()=>this[_0x4172('0x9')]()),_0x130fba['bind']('disabledSubmit')['to'](this[_0x4172('0x3')][_0x4172('0x5')],_0x4172('0x17')),_0x5b6e99;}}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import _0x1943b2 from'./basesuggestionthreadview';import _0x43aa18 from'@ckeditor/ckeditor5-collaboration-core/src/users/view/userview';import{ButtonView as _0x221443}from'ckeditor5/src/ui';import{icons as _0x5e726c}from'ckeditor5/src/core';import _0x475684 from'@ckeditor/ckeditor5-comments/src/utils/trim-html';export default class Tt extends _0x1943b2{constructor(_0x59a487,_0x50098b,_0x2530cb,_0x129cc7){super(_0x59a487,_0x50098b,_0x2530cb,_0x129cc7);const {t:t}=_0x59a487;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x586182=>_0x586182&&_0x586182[0x0]?_0x586182[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0x119a1f,_0x329ebb)=>{let _0x124667='';for(const _0x3b3c84 of _0x119a1f)_0x124667+='<p>'+as(_0x3b3c84['content'],_0x3b3c84['color'])+'</p>';return _0x329ebb?_0x124667:_0x475684(_0x124667,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),_0x5e726c['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),_0x5e726c['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new _0x43aa18(_0x59a487,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['_getTemplate']());}['_getTemplate'](){const _0x1f04f7=this['bindTemplate'],_0x41e3ee={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x1f04f7['if']('isActive','ck-suggestion-wrapper--active'),_0x1f04f7['to']('type',_0x32ca7c=>'ck-suggestion-'+_0x32ca7c),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':_0x1f04f7['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1f04f7['to']('createdAt',_0x3e9971=>this['_config']['formatDateTime'](_0x3e9971))}]}]},{'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']&&_0x41e3ee['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x41e3ee;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x1879d5,_0x3e6469,_0x27c2d1)=>{this['_descriptionElement']['innerHTML']=_0x27c2d1;});}['_createButton'](_0x39317f,_0x505bc5,_0xd2cedb,_0x4357a6){const _0x250e9d=new _0x221443(this['locale']);return _0x250e9d['set']({'label':_0x39317f,'icon':_0x505bc5,'tooltip':!0x0}),_0x250e9d['extendTemplate']({'attributes':{'class':_0xd2cedb}}),_0x250e9d['on']('execute',()=>{this['fire'](_0x4357a6,this['_model']['id']);}),_0x250e9d['bind']('isEnabled')['to'](this),_0x250e9d;}}function as(_0x415208,_0x5daadb){let _0x2f5020='';return _0x2f5020+=_0x415208['split']('*')['map']((_0x5aeec9,_0x4a2dc2)=>_0x4a2dc2%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+rs(_0x5aeec9)+'</span>':rs(_0x5aeec9))['join'](''),_0x5daadb&&(_0x2f5020+='<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20'+_0x5daadb['value']+'\x22\x20title=\x22'+_0x5daadb['title']+'\x22></span>'),_0x2f5020;}function rs(_0x464642){const _0x59ca4a=document['createElement']('span');return _0x59ca4a['innerText']=_0x464642,_0x59ca4a['innerHTML'];}
23
+ import _0x1d55b7 from'./basesuggestionthreadview';import _0x2071f3 from'@ckeditor/ckeditor5-collaboration-core/src/users/view/userview';import{ButtonView as _0x196e73}from'ckeditor5/src/ui';import{icons as _0x3ca3c6}from'ckeditor5/src/core';import _0x148c82 from'@ckeditor/ckeditor5-comments/src/utils/trim-html';export default class Tt extends _0x1d55b7{constructor(_0x12cb46,_0x55eed0,_0xa372cb,_0x20b3f8){super(_0x12cb46,_0x55eed0,_0xa372cb,_0x20b3f8);const {t:t}=_0x12cb46;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x29059d=>_0x29059d&&_0x29059d[0x0]?_0x29059d[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0xe7d2dc,_0x202855)=>{let _0xb91f0c='';for(const _0x3f5239 of _0xe7d2dc)_0xb91f0c+='<p>'+as(_0x3f5239['content'],_0x3f5239['color'])+'</p>';return _0x202855?_0xb91f0c:_0x148c82(_0xb91f0c,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),_0x3ca3c6['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),_0x3ca3c6['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new _0x2071f3(_0x12cb46,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x26554d=this['bindTemplate'],_0x3fbd2c={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x26554d['if']('isActive','ck-suggestion-wrapper--active'),_0x26554d['to']('type',_0x25b637=>'ck-suggestion-'+_0x25b637),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':_0x26554d['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x26554d['to']('createdAt',_0xb4c971=>this['_config']['formatDateTime'](_0xb4c971))}]}]},{'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']&&_0x3fbd2c['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x3fbd2c;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x4fb8b5,_0x579330,_0x3a67e4)=>{this['_descriptionElement']['innerHTML']=_0x3a67e4;});}['_createButton'](_0x5d8225,_0x4cbdc5,_0x41e9ec,_0x2c4d68){const _0x28762a=new _0x196e73(this['locale']);return _0x28762a['set']({'label':_0x5d8225,'icon':_0x4cbdc5,'tooltip':!0x0}),_0x28762a['extendTemplate']({'attributes':{'class':_0x41e9ec}}),_0x28762a['on']('execute',()=>{this['fire'](_0x2c4d68,this['_model']['id']);}),_0x28762a['bind']('isEnabled')['to'](this),_0x28762a;}}function as(_0x54cf37,_0x90e7f8){let _0x3cb14b='';return _0x3cb14b+=_0x54cf37['split']('*')['map']((_0xe95f3a,_0x1f635c)=>_0x1f635c%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+rs(_0xe95f3a)+'</span>':rs(_0xe95f3a))['join'](''),_0x90e7f8&&(_0x3cb14b+='<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20'+_0x90e7f8['value']+'\x22\x20title=\x22'+_0x90e7f8['title']+'\x22></span>'),_0x3cb14b;}function rs(_0x43d042){const _0x2bcf5b=document['createElement']('span');return _0x2bcf5b['innerText']=_0x43d042,_0x2bcf5b['innerHTML'];}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4608=['getRange','getMarkers','isTouching','isCollapsed','end','add','isInContent','isIntersecting','isMultiRange','from'];(function(_0x197bd8,_0x46081f){const _0x392186=function(_0x28825c){while(--_0x28825c){_0x197bd8['push'](_0x197bd8['shift']());}};_0x392186(++_0x46081f);}(_0x4608,0xcf));const _0x3921=function(_0x197bd8,_0x46081f){_0x197bd8=_0x197bd8-0x0;let _0x392186=_0x4608[_0x197bd8];return _0x392186;};export default function jt(_0x3cb2c5,_0x58d9f9){const _0x4cdb06=Array[_0x3921('0x2')](_0x3cb2c5['getRanges']()),_0x29463b=new Set();for(const _0x39b2a7 of _0x58d9f9)if(_0x39b2a7[_0x3921('0x9')])for(const _0x58c96c of _0x4cdb06)for(const _0x520202 of _0x39b2a7[_0x3921('0x4')]()){const _0x128871=_0x520202[_0x3921('0x3')]();(_0x58c96c[_0x3921('0x0')](_0x128871)||_0x3cb2c5[_0x3921('0x6')]&&!_0x39b2a7[_0x3921('0x1')]&&_0x39b2a7['next']&&_0x128871[_0x3921('0x7')][_0x3921('0x5')](_0x58c96c['start']))&&_0x29463b[_0x3921('0x8')](_0x39b2a7);}return _0x29463b;}
23
+ const _0x1354=['start','next','isIntersecting','isInContent','add','isCollapsed','getRanges','getRange','isMultiRange'];(function(_0x4c7608,_0x1354b0){const _0x53441c=function(_0x159587){while(--_0x159587){_0x4c7608['push'](_0x4c7608['shift']());}};_0x53441c(++_0x1354b0);}(_0x1354,0x1a5));const _0x5344=function(_0x4c7608,_0x1354b0){_0x4c7608=_0x4c7608-0x0;let _0x53441c=_0x1354[_0x4c7608];return _0x53441c;};export default function jt(_0x5b2ca0,_0x290b27){const _0x335af7=Array['from'](_0x5b2ca0[_0x5344('0x8')]()),_0x515d7e=new Set();for(const _0x55eae4 of _0x290b27)if(_0x55eae4[_0x5344('0x5')])for(const _0x5be2fb of _0x335af7)for(const _0x5fee11 of _0x55eae4['getMarkers']()){const _0x4cd447=_0x5fee11[_0x5344('0x0')]();(_0x5be2fb[_0x5344('0x4')](_0x4cd447)||_0x5b2ca0[_0x5344('0x7')]&&!_0x55eae4[_0x5344('0x1')]&&_0x55eae4[_0x5344('0x3')]&&_0x4cd447['end']['isTouching'](_0x5be2fb[_0x5344('0x2')]))&&_0x515d7e[_0x5344('0x6')](_0x55eae4);}return _0x515d7e;}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5af7=['sort','toString','sign','object','boolean','string','isArray','number'];(function(_0x3244cb,_0x5af7b6){const _0x156ec4=function(_0x1b72ce){while(--_0x1b72ce){_0x3244cb['push'](_0x3244cb['shift']());}};_0x156ec4(++_0x5af7b6);}(_0x5af7,0x137));const _0x156e=function(_0x3244cb,_0x5af7b6){_0x3244cb=_0x3244cb-0x0;let _0x156ec4=_0x5af7[_0x3244cb];return _0x156ec4;};export default function mt(_0x2eae94){let _0xb259f7=0x0,_0x1b09ca=0x0;for(const _0x5bae2a of pe(_0x2eae94))_0xb259f7=(_0xb259f7<<0x5)-_0xb259f7+_0x5bae2a,_0xb259f7&=_0xb259f7,[_0xb259f7,_0x1b09ca]=[_0x1b09ca,_0xb259f7];return xe(_0xb259f7)+xe(_0x1b09ca);}function*ye(_0x281e5c){_0x281e5c?_0x156e('0x5')==typeof _0x281e5c?yield 0x1:Array[_0x156e('0x7')](_0x281e5c)?yield*function*(_0x5cfd8f){for(const _0x349ed2 of _0x5cfd8f)yield*ye(_0x349ed2);}(_0x281e5c):_0x156e('0x4')==typeof _0x281e5c?yield*pe(_0x281e5c):_0x156e('0x6')==typeof _0x281e5c?yield*je(_0x281e5c):_0x156e('0x0')==typeof _0x281e5c&&(yield _0x281e5c):yield 0x0;}function*pe(_0x42374c){if(yield he('{'),_0x42374c){const _0x220dd3=Object['keys'](_0x42374c)[_0x156e('0x1')]();for(const _0x31c1e2 of _0x220dd3){yield*je(_0x31c1e2),yield he(':');const _0x55179f=_0x42374c[_0x31c1e2];yield*ye(_0x55179f);}}yield he('}');}function*je(_0x118543){yield he('\x22');for(const _0x4ba3ca of _0x118543)yield he(_0x4ba3ca);yield he('\x22');}function he(_0x3037a4){return _0x3037a4['charCodeAt'](0x0);}function xe(_0xdf20d0){return(_0xdf20d0*=Math[_0x156e('0x3')](_0xdf20d0))[_0x156e('0x2')](0x24);}
23
+ const _0xf334=['isArray','toString','string','boolean','sort','object','charCodeAt'];(function(_0x61a3b9,_0xf334ca){const _0x3bdf6f=function(_0x113550){while(--_0x113550){_0x61a3b9['push'](_0x61a3b9['shift']());}};_0x3bdf6f(++_0xf334ca);}(_0xf334,0x7d));const _0x3bdf=function(_0x61a3b9,_0xf334ca){_0x61a3b9=_0x61a3b9-0x0;let _0x3bdf6f=_0xf334[_0x61a3b9];return _0x3bdf6f;};export default function mt(_0x3e9c39){let _0x271537=0x0,_0x4a8f24=0x0;for(const _0xe80aa4 of pe(_0x3e9c39))_0x271537=(_0x271537<<0x5)-_0x271537+_0xe80aa4,_0x271537&=_0x271537,[_0x271537,_0x4a8f24]=[_0x4a8f24,_0x271537];return xe(_0x271537)+xe(_0x4a8f24);}function*ye(_0x4f8b29){_0x4f8b29?_0x3bdf('0x4')==typeof _0x4f8b29?yield 0x1:Array[_0x3bdf('0x1')](_0x4f8b29)?yield*function*(_0x522cfa){for(const _0x435b35 of _0x522cfa)yield*ye(_0x435b35);}(_0x4f8b29):_0x3bdf('0x6')==typeof _0x4f8b29?yield*pe(_0x4f8b29):_0x3bdf('0x3')==typeof _0x4f8b29?yield*je(_0x4f8b29):'number'==typeof _0x4f8b29&&(yield _0x4f8b29):yield 0x0;}function*pe(_0x1245ef){if(yield he('{'),_0x1245ef){const _0x29074d=Object['keys'](_0x1245ef)[_0x3bdf('0x5')]();for(const _0x4586a9 of _0x29074d){yield*je(_0x4586a9),yield he(':');const _0x54f515=_0x1245ef[_0x4586a9];yield*ye(_0x54f515);}}yield he('}');}function*je(_0x38ada8){yield he('\x22');for(const _0x3edf8f of _0x38ada8)yield he(_0x3edf8f);yield he('\x22');}function he(_0x4965fb){return _0x4965fb[_0x3bdf('0x0')](0x0);}function xe(_0xc29554){return(_0xc29554*=Math['sign'](_0xc29554))[_0x3bdf('0x2')](0x24);}