@ckeditor/ckeditor5-track-changes 39.0.1 → 40.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 (185) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE.md +6 -6
  3. package/README.md +14 -14
  4. package/build/track-changes.js +1 -1
  5. package/lang/translations/ar.po +1 -0
  6. package/lang/translations/az.po +1 -0
  7. package/lang/translations/bg.po +1 -0
  8. package/lang/translations/bn.po +1 -0
  9. package/lang/translations/ca.po +1 -0
  10. package/lang/translations/cs.po +1 -0
  11. package/lang/translations/da.po +1 -0
  12. package/lang/translations/de.po +1 -0
  13. package/lang/translations/el.po +1 -0
  14. package/lang/translations/en-au.po +1 -0
  15. package/lang/translations/en.po +1 -0
  16. package/lang/translations/es.po +1 -0
  17. package/lang/translations/et.po +1 -0
  18. package/lang/translations/fi.po +1 -0
  19. package/lang/translations/fr.po +1 -0
  20. package/lang/translations/gl.po +1 -0
  21. package/lang/translations/he.po +1 -0
  22. package/lang/translations/hi.po +1 -0
  23. package/lang/translations/hr.po +1 -0
  24. package/lang/translations/hu.po +1 -0
  25. package/lang/translations/id.po +1 -0
  26. package/lang/translations/it.po +1 -0
  27. package/lang/translations/ja.po +1 -0
  28. package/lang/translations/ko.po +1 -0
  29. package/lang/translations/lt.po +1 -0
  30. package/lang/translations/lv.po +1 -0
  31. package/lang/translations/ms.po +1 -0
  32. package/lang/translations/nl.po +1 -0
  33. package/lang/translations/no.po +1 -0
  34. package/lang/translations/pl.po +1 -0
  35. package/lang/translations/pt-br.po +1 -0
  36. package/lang/translations/pt.po +1 -0
  37. package/lang/translations/ro.po +1 -0
  38. package/lang/translations/ru.po +1 -0
  39. package/lang/translations/sk.po +1 -0
  40. package/lang/translations/sq.po +1 -0
  41. package/lang/translations/sr-latn.po +1 -0
  42. package/lang/translations/sr.po +1 -0
  43. package/lang/translations/sv.po +1 -0
  44. package/lang/translations/th.po +1 -0
  45. package/lang/translations/tk.po +1 -0
  46. package/lang/translations/tr.po +1 -0
  47. package/lang/translations/tt.po +1 -0
  48. package/lang/translations/uk.po +1 -0
  49. package/lang/translations/ur.po +1 -0
  50. package/lang/translations/vi.po +1 -0
  51. package/lang/translations/zh-cn.po +1 -0
  52. package/lang/translations/zh.po +1 -0
  53. package/package.json +3 -7
  54. package/src/augmentation.d.ts +40 -40
  55. package/src/commands/acceptsuggestioncommand.d.ts +24 -24
  56. package/src/commands/acceptsuggestioncommand.js +1 -1
  57. package/src/commands/discardsuggestioncommand.d.ts +24 -24
  58. package/src/commands/discardsuggestioncommand.js +1 -1
  59. package/src/commands/executeonallsuggestionscommand.d.ts +24 -24
  60. package/src/commands/executeonallsuggestionscommand.js +1 -1
  61. package/src/commands/executeonselectedsuggestionscommand.d.ts +24 -24
  62. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  63. package/src/commands/trackchangescommand.d.ts +26 -26
  64. package/src/commands/trackchangescommand.js +1 -1
  65. package/src/index.d.ts +16 -16
  66. package/src/integrations/aiassistant.d.ts +17 -0
  67. package/src/integrations/aiassistant.js +23 -0
  68. package/src/integrations/alignment.d.ts +17 -17
  69. package/src/integrations/alignment.js +1 -1
  70. package/src/integrations/basicstyles.d.ts +17 -17
  71. package/src/integrations/basicstyles.js +1 -1
  72. package/src/integrations/blockquote.d.ts +17 -17
  73. package/src/integrations/blockquote.js +1 -1
  74. package/src/integrations/ckbox.d.ts +17 -17
  75. package/src/integrations/ckbox.js +1 -1
  76. package/src/integrations/codeblock.d.ts +17 -17
  77. package/src/integrations/codeblock.js +1 -1
  78. package/src/integrations/comments.d.ts +14 -14
  79. package/src/integrations/comments.js +1 -1
  80. package/src/integrations/deletecommand.d.ts +17 -17
  81. package/src/integrations/deletecommand.js +1 -1
  82. package/src/integrations/documentlist.d.ts +17 -17
  83. package/src/integrations/documentlist.js +1 -1
  84. package/src/integrations/documentlistproperties.d.ts +29 -29
  85. package/src/integrations/documentlistproperties.js +1 -1
  86. package/src/integrations/entercommand.d.ts +16 -16
  87. package/src/integrations/entercommand.js +1 -1
  88. package/src/integrations/findandreplace.d.ts +21 -21
  89. package/src/integrations/findandreplace.js +1 -1
  90. package/src/integrations/font.d.ts +17 -17
  91. package/src/integrations/font.js +1 -1
  92. package/src/integrations/formatpainter.d.ts +17 -17
  93. package/src/integrations/formatpainter.js +1 -1
  94. package/src/integrations/heading.d.ts +17 -17
  95. package/src/integrations/heading.js +1 -1
  96. package/src/integrations/highlight.d.ts +17 -17
  97. package/src/integrations/highlight.js +1 -1
  98. package/src/integrations/horizontalline.d.ts +17 -17
  99. package/src/integrations/horizontalline.js +1 -1
  100. package/src/integrations/htmlembed.d.ts +17 -17
  101. package/src/integrations/htmlembed.js +1 -1
  102. package/src/integrations/image.d.ts +17 -17
  103. package/src/integrations/image.js +1 -1
  104. package/src/integrations/imagereplace.d.ts +23 -23
  105. package/src/integrations/imagereplace.js +1 -1
  106. package/src/integrations/importword.d.ts +18 -18
  107. package/src/integrations/importword.js +1 -1
  108. package/src/integrations/indent.d.ts +17 -17
  109. package/src/integrations/indent.js +1 -1
  110. package/src/integrations/inputcommand.d.ts +16 -16
  111. package/src/integrations/inputcommand.js +1 -1
  112. package/src/integrations/link.d.ts +17 -17
  113. package/src/integrations/link.js +1 -1
  114. package/src/integrations/list.d.ts +17 -17
  115. package/src/integrations/list.js +1 -1
  116. package/src/integrations/listproperties.d.ts +29 -29
  117. package/src/integrations/listproperties.js +1 -1
  118. package/src/integrations/mediaembed.d.ts +17 -17
  119. package/src/integrations/mediaembed.js +1 -1
  120. package/src/integrations/mention.d.ts +17 -17
  121. package/src/integrations/mention.js +1 -1
  122. package/src/integrations/pagebreak.d.ts +17 -17
  123. package/src/integrations/pagebreak.js +1 -1
  124. package/src/integrations/paragraph.d.ts +17 -17
  125. package/src/integrations/paragraph.js +1 -1
  126. package/src/integrations/removeformat.d.ts +17 -17
  127. package/src/integrations/removeformat.js +1 -1
  128. package/src/integrations/restrictededitingmode.d.ts +17 -17
  129. package/src/integrations/restrictededitingmode.js +1 -1
  130. package/src/integrations/shiftentercommand.d.ts +16 -16
  131. package/src/integrations/shiftentercommand.js +1 -1
  132. package/src/integrations/standardeditingmode.d.ts +17 -17
  133. package/src/integrations/standardeditingmode.js +1 -1
  134. package/src/integrations/style.d.ts +18 -18
  135. package/src/integrations/style.js +1 -1
  136. package/src/integrations/table.d.ts +42 -42
  137. package/src/integrations/table.js +1 -1
  138. package/src/integrations/tablecaption.d.ts +22 -22
  139. package/src/integrations/tablecaption.js +1 -1
  140. package/src/integrations/tableclipboard.d.ts +19 -19
  141. package/src/integrations/tableclipboard.js +1 -1
  142. package/src/integrations/tablecolumnresize.d.ts +26 -26
  143. package/src/integrations/tablecolumnresize.js +1 -1
  144. package/src/integrations/tableheadings.d.ts +22 -22
  145. package/src/integrations/tableheadings.js +1 -1
  146. package/src/integrations/tablemergesplit.d.ts +22 -22
  147. package/src/integrations/tablemergesplit.js +1 -1
  148. package/src/integrations/tableofcontents.d.ts +17 -17
  149. package/src/integrations/tableofcontents.js +1 -1
  150. package/src/integrations/tableproperties.d.ts +27 -27
  151. package/src/integrations/tableproperties.js +1 -1
  152. package/src/integrations/template.d.ts +17 -17
  153. package/src/integrations/template.js +1 -1
  154. package/src/integrations/title.d.ts +17 -17
  155. package/src/integrations/title.js +1 -1
  156. package/src/integrations/undo.d.ts +17 -17
  157. package/src/integrations/undo.js +1 -1
  158. package/src/integrations/utils.d.ts +21 -21
  159. package/src/integrations/utils.js +1 -1
  160. package/src/suggestion.d.ts +276 -276
  161. package/src/suggestion.js +1 -1
  162. package/src/suggestiondescriptionfactory.d.ts +163 -163
  163. package/src/suggestiondescriptionfactory.js +1 -1
  164. package/src/trackchanges.d.ts +244 -244
  165. package/src/trackchanges.js +1 -1
  166. package/src/trackchangesconfig.d.ts +75 -75
  167. package/src/trackchangesdata.d.ts +41 -41
  168. package/src/trackchangesdata.js +1 -1
  169. package/src/trackchangesediting.d.ts +468 -439
  170. package/src/trackchangesediting.js +1 -1
  171. package/src/trackchangesui.d.ts +38 -38
  172. package/src/trackchangesui.js +1 -1
  173. package/src/ui/suggestioncontroller.d.ts +37 -37
  174. package/src/ui/suggestioncontroller.js +1 -1
  175. package/src/ui/view/basesuggestionthreadview.d.ts +170 -170
  176. package/src/ui/view/basesuggestionthreadview.js +1 -1
  177. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  178. package/src/ui/view/suggestionthreadview.js +1 -1
  179. package/src/utils/common-translations.d.ts +9 -9
  180. package/src/utils/common-translations.js +1 -1
  181. package/src/utils/utils.d.ts +30 -30
  182. package/src/utils/utils.js +1 -1
  183. package/theme/icons/track-changes-accept.svg +1 -1
  184. package/theme/icons/track-changes-discard.svg +1 -1
  185. package/theme/icons/track-changes.svg +1 -1
package/src/suggestion.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x9808=['_model','getRanges','discard','split','head','getItems','reduce','add','toJSON','nodeAfter','getMarkers','getRange','addRange','commentThread','_onDiscard','getMultiRangeId','createdAt','subType','getFirstMarker','onAttributesChange','accept','addMarker','push','get','getFirstRange','onAccept','getContainedElement','next','markers','attributes','decorate','data','author','start','_markerNames','clear','suggestion:','_onAttributesChange','nodeBefore','type','set','onDiscard','map','removeAttribute','isIntersecting','length','_onAccept','isMultiRange','end','hasComments','creator','@external','change','isIntersectingWithRange','isInContent','removeMarker','from','getMarkerNames','authoredAt','setAttribute','previous','removeMarkers'];(function(_0x3cae3e,_0x9808dc){const _0x4ec64f=function(_0x4c17b0){while(--_0x4c17b0){_0x3cae3e['push'](_0x3cae3e['shift']());}};_0x4ec64f(++_0x9808dc);}(_0x9808,0x163));const _0x4ec6=function(_0x3cae3e,_0x9808dc){_0x3cae3e=_0x3cae3e-0x0;let _0x4ec64f=_0x9808[_0x3cae3e];return _0x4ec64f;};import{Element as _0x20afd1}from'ckeditor5/src/engine';import{ObservableMixin as _0x1c9a60,uid as _0x4b2b9d}from'ckeditor5/src/utils';import{cloneDeep as _0x18cef9,isEqual as _0x163eab,set as _0x1c5797,unset as _0x42ca37}from'lodash-es';export default class u extends _0x1c9a60(){constructor(_0x32e0cb,_0xe666){super(),this['id']=_0xe666['id'],this[_0x4ec6('0x38')]=_0xe666[_0x4ec6('0x38')],this[_0x4ec6('0x22')]=_0xe666['subType']||null,this[_0x4ec6('0x31')]=_0xe666[_0x4ec6('0x31')],this[_0x4ec6('0x5')]=_0xe666[_0x4ec6('0x5')]||_0xe666[_0x4ec6('0x31')],this['isExternal']=Boolean(_0xe666['attributes']&&_0xe666[_0x4ec6('0x2e')][_0x4ec6('0x6')]),this[_0x4ec6('0x30')]=null,this[_0x4ec6('0x11')]=_0x32e0cb,this[_0x4ec6('0x1')]=_0xe666[_0x4ec6('0x2a')],this[_0x4ec6('0x1f')]=_0xe666[_0x4ec6('0x3a')],this['_onAttributesChange']=_0xe666[_0x4ec6('0x24')],this['_markerNames']=new Set(),this[_0x4ec6('0x21')]=null,this[_0x4ec6('0x39')](_0x4ec6('0xd'),null),this['set'](_0x4ec6('0x2e'),_0xe666[_0x4ec6('0x2e')]||{}),this['set'](_0x4ec6('0xf'),null),this['set'](_0x4ec6('0x2c'),null),this[_0x4ec6('0x39')](_0x4ec6('0x1e'),null),this[_0x4ec6('0x39')]('_saved',!0x1),this['decorate'](_0x4ec6('0x25')),this[_0x4ec6('0x2f')](_0x4ec6('0x13'));}get[_0x4ec6('0x15')](){let _0x4349c4=this;for(;_0x4349c4[_0x4ec6('0xf')];)_0x4349c4=_0x4349c4[_0x4ec6('0xf')];return _0x4349c4;}get[_0x4ec6('0x4')](){return!!this[_0x4ec6('0x1e')]&&this['commentThread'][_0x4ec6('0x0')]>0x0;}get[_0x4ec6('0x2')](){if(0x0==this[_0x4ec6('0x33')]['size'])return!0x1;return 0x6==Array[_0x4ec6('0xb')](this[_0x4ec6('0x33')])[0x0][_0x4ec6('0x14')](':')['length'];}get[_0x4ec6('0x9')](){return null!==this[_0x4ec6('0x23')]();}['addMarkerName'](_0x197dce){this['_markerNames'][_0x4ec6('0x18')](_0x197dce);}['getMarkerNames'](){return Array[_0x4ec6('0xb')](this[_0x4ec6('0x33')]);}[_0x4ec6('0x1b')](){return this[_0x4ec6('0xc')]()[_0x4ec6('0x3b')](_0x27f148=>this[_0x4ec6('0x11')][_0x4ec6('0x2d')][_0x4ec6('0x28')](_0x27f148))['filter'](_0x46be26=>_0x46be26);}[_0x4ec6('0x23')](){return this[_0x4ec6('0x1b')]()[0x0]||null;}[_0x4ec6('0x10')](){this[_0x4ec6('0x11')]['change'](_0x17d2c3=>{for(const _0x76b15 of this[_0x4ec6('0x1b')]())_0x17d2c3[_0x4ec6('0xa')](_0x76b15);}),this['_markerNames'][_0x4ec6('0x34')]();}[_0x4ec6('0xa')](_0x24707d){this[_0x4ec6('0x11')][_0x4ec6('0x7')](_0x4c5a1a=>{_0x4c5a1a[_0x4ec6('0xa')](_0x24707d);}),this[_0x4ec6('0x33')]['delete'](_0x24707d);}[_0x4ec6('0x1d')](_0x142056){const _0x17ea84=_0x4ec6('0x35')+this[_0x4ec6('0x38')]+':'+this[_0x4ec6('0x22')]+':'+this['id']+':'+this[_0x4ec6('0x5')]['id']+':'+u[_0x4ec6('0x20')]();this['addMarkerName'](_0x17ea84),this[_0x4ec6('0x11')][_0x4ec6('0x7')](_0xd7de07=>{_0xd7de07[_0x4ec6('0x26')](_0x17ea84,{'range':_0x142056,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x4ec6('0x8')](_0x43660c){for(const _0xc51c94 of this[_0x4ec6('0x12')]())if(_0xc51c94[_0x4ec6('0x3d')](_0x43660c))return!0x0;return!0x1;}[_0x4ec6('0x12')](){return this[_0x4ec6('0x1b')]()[_0x4ec6('0x3b')](_0x53412e=>_0x53412e[_0x4ec6('0x1c')]());}[_0x4ec6('0x16')](){return this[_0x4ec6('0x12')]()[_0x4ec6('0x17')]((_0x3fdbac,_0x48058b)=>[..._0x3fdbac,..._0x48058b['getItems']()],[]);}[_0x4ec6('0x29')](){var _0x25247b;return(null===(_0x25247b=this[_0x4ec6('0x23')]())||void 0x0===_0x25247b?void 0x0:_0x25247b[_0x4ec6('0x1c')]())||null;}[_0x4ec6('0x2b')](){const _0x872b8f=this[_0x4ec6('0x12')]();if(0x1!=_0x872b8f[_0x4ec6('0x0')])return null;const _0x5b2052=_0x872b8f[0x0],_0x42205e=_0x5b2052[_0x4ec6('0x32')][_0x4ec6('0x1a')],_0x4a3e22=_0x5b2052[_0x4ec6('0x3')][_0x4ec6('0x37')];return _0x42205e instanceof _0x20afd1?_0x42205e!=_0x4a3e22?null:_0x42205e:null;}[_0x4ec6('0x25')](){this[_0x4ec6('0x1')](this['getRanges'](),this['data'],this['attributes']),this[_0x4ec6('0x10')]();}[_0x4ec6('0x13')](){this['_onDiscard'](this[_0x4ec6('0x12')](),this['data'],this[_0x4ec6('0x2e')]),this[_0x4ec6('0x10')]();}['getAllAdjacentSuggestions'](){const _0x39afee=[];let _0x42c74f=this['head'];for(;_0x42c74f;)_0x39afee[_0x4ec6('0x27')](_0x42c74f),_0x42c74f=_0x42c74f[_0x4ec6('0x2c')];return _0x39afee;}[_0x4ec6('0xe')](_0x300ec6,_0x57e64f){const _0xae42ba=_0x18cef9(this[_0x4ec6('0x2e')]);_0x1c5797(_0xae42ba,_0x300ec6,_0x57e64f),_0x163eab(_0xae42ba,this['attributes'])||(this[_0x4ec6('0x2e')]=_0xae42ba,this['_onAttributesChange'](_0xae42ba));}[_0x4ec6('0x3c')](_0x4b1eb9){const _0x4f54a6=_0x18cef9(this['attributes']);_0x42ca37(_0x4f54a6,_0x4b1eb9),_0x163eab(_0x4f54a6,this[_0x4ec6('0x2e')])||(this[_0x4ec6('0x2e')]=_0x4f54a6,this[_0x4ec6('0x36')](this[_0x4ec6('0x2e')]));}[_0x4ec6('0x19')](){return{'id':this['id'],'type':this[_0x4ec6('0x22')]?this[_0x4ec6('0x38')]+':'+this[_0x4ec6('0x22')]:this['type'],'authorId':this['creator']['id'],'createdAt':this[_0x4ec6('0x21')],'hasComments':this[_0x4ec6('0x4')],'data':this[_0x4ec6('0x30')],'attributes':this['attributes']};}static[_0x4ec6('0x20')](){return _0x4b2b9d()['substr'](0x1,0x5);}}
23
+ const _0x2fe3=['hasComments','isExternal','addMarkerName','commentThread','end','toJSON','suggestion:','getMarkers','attributes','_saved','start','authoredAt','getMarkerNames','delete','substr','data','createdAt','head','clear','accept','getRange','onAttributesChange','type','from','decorate','addRange','change','getRanges','removeMarker','reduce','_isDataLoaded','previous','markers','setAttribute','add','_onAttributesChange','next','_onAccept','subType','removeMarkers','nodeBefore','isInContent','size','discard','length','isIntersecting','getMultiRangeId','creator','_onDiscard','@external','get','_markerNames','removeAttribute','set','getFirstRange','_model','map','getItems','getFirstMarker','onDiscard','author'];(function(_0x26f5d3,_0x2fe393){const _0x4885cd=function(_0x368919){while(--_0x368919){_0x26f5d3['push'](_0x26f5d3['shift']());}};_0x4885cd(++_0x2fe393);}(_0x2fe3,0x107));const _0x4885=function(_0x26f5d3,_0x2fe393){_0x26f5d3=_0x26f5d3-0x0;let _0x4885cd=_0x2fe3[_0x26f5d3];return _0x4885cd;};import{Element as _0x257e7c}from'ckeditor5/src/engine';import{ObservableMixin as _0x284ad1,uid as _0x4ecbcc}from'ckeditor5/src/utils';import{cloneDeep as _0x53905a,isEqual as _0x74b05f,set as _0x1142c2,unset as _0x5580dd}from'lodash-es';export default class u extends _0x284ad1(){constructor(_0x43c8c2,_0x513ed7){super(),this[_0x4885('0xb')]=!0x1,this['id']=_0x513ed7['id'],this['type']=_0x513ed7[_0x4885('0x3')],this[_0x4885('0x13')]=_0x513ed7['subType']||null,this[_0x4885('0x29')]=_0x513ed7[_0x4885('0x29')],this['creator']=_0x513ed7[_0x4885('0x1c')]||_0x513ed7[_0x4885('0x29')],this[_0x4885('0x2b')]=Boolean(_0x513ed7[_0x4885('0x32')]&&_0x513ed7[_0x4885('0x32')][_0x4885('0x1e')]),this[_0x4885('0x39')]=null,this['_model']=_0x43c8c2,this[_0x4885('0x12')]=_0x513ed7['onAccept'],this['_onDiscard']=_0x513ed7[_0x4885('0x28')],this[_0x4885('0x10')]=_0x513ed7[_0x4885('0x2')],this[_0x4885('0x20')]=new Set(),this[_0x4885('0x3a')]=null,this[_0x4885('0x22')](_0x4885('0x35'),null),this[_0x4885('0x22')](_0x4885('0x32'),_0x513ed7['attributes']||{}),this[_0x4885('0x22')](_0x4885('0xc'),null),this[_0x4885('0x22')](_0x4885('0x11'),null),this[_0x4885('0x22')](_0x4885('0x2d'),null),this[_0x4885('0x22')](_0x4885('0x33'),!0x1),this[_0x4885('0x5')]('accept'),this[_0x4885('0x5')](_0x4885('0x18'));}get['head'](){let _0xdaeb14=this;for(;_0xdaeb14['previous'];)_0xdaeb14=_0xdaeb14[_0x4885('0xc')];return _0xdaeb14;}get[_0x4885('0x2a')](){return!!this[_0x4885('0x2d')]&&this[_0x4885('0x2d')][_0x4885('0x19')]>0x0;}get['isMultiRange'](){if(0x0==this[_0x4885('0x20')][_0x4885('0x17')])return!0x1;return 0x6==Array[_0x4885('0x4')](this[_0x4885('0x20')])[0x0]['split'](':')['length'];}get[_0x4885('0x16')](){return null!==this[_0x4885('0x27')]();}[_0x4885('0x2c')](_0x1bc994){this[_0x4885('0x20')][_0x4885('0xf')](_0x1bc994);}[_0x4885('0x36')](){return Array[_0x4885('0x4')](this[_0x4885('0x20')]);}[_0x4885('0x31')](){return this[_0x4885('0x36')]()[_0x4885('0x25')](_0x1ab597=>this[_0x4885('0x24')][_0x4885('0xd')][_0x4885('0x1f')](_0x1ab597))['filter'](_0xb33cc1=>_0xb33cc1);}['getFirstMarker'](){return this[_0x4885('0x31')]()[0x0]||null;}[_0x4885('0x14')](){this[_0x4885('0x24')][_0x4885('0x7')](_0x47e935=>{for(const _0x5bb3b9 of this[_0x4885('0x31')]())_0x47e935[_0x4885('0x9')](_0x5bb3b9);}),this[_0x4885('0x20')][_0x4885('0x3c')]();}[_0x4885('0x9')](_0x421a8a){this[_0x4885('0x24')][_0x4885('0x7')](_0x35d133=>{_0x35d133[_0x4885('0x9')](_0x421a8a);}),this[_0x4885('0x20')][_0x4885('0x37')](_0x421a8a);}[_0x4885('0x6')](_0x230ecb){const _0x19e827=_0x4885('0x30')+this[_0x4885('0x3')]+':'+this[_0x4885('0x13')]+':'+this['id']+':'+this[_0x4885('0x1c')]['id']+':'+u[_0x4885('0x1b')]();this[_0x4885('0x2c')](_0x19e827),this['_model']['change'](_0x3d6000=>{_0x3d6000['addMarker'](_0x19e827,{'range':_0x230ecb,'usingOperation':!0x0,'affectsData':!0x0});});}['isIntersectingWithRange'](_0x1a0ed0){for(const _0x797ee of this[_0x4885('0x8')]())if(_0x797ee[_0x4885('0x1a')](_0x1a0ed0))return!0x0;return!0x1;}[_0x4885('0x8')](){return this[_0x4885('0x31')]()[_0x4885('0x25')](_0x24803d=>_0x24803d[_0x4885('0x1')]());}[_0x4885('0x26')](){return this[_0x4885('0x8')]()[_0x4885('0xa')]((_0x1a9264,_0xb5b328)=>[..._0x1a9264,..._0xb5b328['getItems']()],[]);}[_0x4885('0x23')](){var _0x3582d1;return(null===(_0x3582d1=this['getFirstMarker']())||void 0x0===_0x3582d1?void 0x0:_0x3582d1[_0x4885('0x1')]())||null;}['getContainedElement'](){const _0x4992fb=this[_0x4885('0x8')]();if(0x1!=_0x4992fb['length'])return null;const _0x509631=_0x4992fb[0x0],_0x37faf4=_0x509631[_0x4885('0x34')]['nodeAfter'],_0x441b1b=_0x509631[_0x4885('0x2e')][_0x4885('0x15')];return _0x37faf4 instanceof _0x257e7c?_0x37faf4!=_0x441b1b?null:_0x37faf4:null;}[_0x4885('0x0')](){this[_0x4885('0x12')](this[_0x4885('0x8')](),this['data'],this[_0x4885('0x32')]),this[_0x4885('0x14')]();}[_0x4885('0x18')](){this[_0x4885('0x1d')](this['getRanges'](),this[_0x4885('0x39')],this[_0x4885('0x32')]),this['removeMarkers']();}['getAllAdjacentSuggestions'](){const _0x3fc832=[];let _0x16a4fb=this[_0x4885('0x3b')];for(;_0x16a4fb;)_0x3fc832['push'](_0x16a4fb),_0x16a4fb=_0x16a4fb['next'];return _0x3fc832;}[_0x4885('0xe')](_0x5e58a2,_0x122759){const _0x40a839=_0x53905a(this[_0x4885('0x32')]);_0x1142c2(_0x40a839,_0x5e58a2,_0x122759),_0x74b05f(_0x40a839,this[_0x4885('0x32')])||(this[_0x4885('0x32')]=_0x40a839,this[_0x4885('0x10')](_0x40a839));}[_0x4885('0x21')](_0x54dfbc){const _0xcd3631=_0x53905a(this[_0x4885('0x32')]);_0x5580dd(_0xcd3631,_0x54dfbc),_0x74b05f(_0xcd3631,this[_0x4885('0x32')])||(this['attributes']=_0xcd3631,this[_0x4885('0x10')](this[_0x4885('0x32')]));}[_0x4885('0x2f')](){return{'id':this['id'],'type':this[_0x4885('0x13')]?this[_0x4885('0x3')]+':'+this[_0x4885('0x13')]:this[_0x4885('0x3')],'authorId':this[_0x4885('0x1c')]['id'],'createdAt':this['createdAt'],'hasComments':this[_0x4885('0x2a')],'data':this['data'],'attributes':this[_0x4885('0x32')]};}static['getMultiRangeId'](){return _0x4ecbcc()[_0x4885('0x38')](0x1,0x5);}}
@@ -1,163 +1,163 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
- import type { Schema, Element } from 'ckeditor5/src/engine';
7
- import type Suggestion from './suggestion';
8
- /**
9
- * Creates descriptions for suggestion chains.
10
- *
11
- * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
- * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
- * results in "Replaced" description.
14
- */
15
- export default class SuggestionDescriptionFactory {
16
- constructor(schema: Schema, locale: Locale);
17
- /**
18
- * Returns descriptions for given suggestion chain.
19
- *
20
- * The structure of the descriptions array is as follows (explained on an example):
21
- *
22
- * ```ts
23
- * [
24
- * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
25
- * { type: 'insertion', content: '*Insert:* image },
26
- * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
27
- * ]
28
- * ```
29
- *
30
- * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
31
- * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
32
- *
33
- * ```html
34
- * <p><strong>Insert:</strong> 2 paragraphs</p>
35
- * <p><strong>Insert:</strong> image</p>
36
- * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
37
- * ```
38
- */
39
- getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
40
- /**
41
- * Registers a callback function that returns a custom description for a suggestion.
42
- *
43
- * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
44
- *
45
- * The callback takes the suggestion instance as a parameter and should return
46
- * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
47
- * if the suggestion was not handled by the callback.
48
- *
49
- * Example of a description callback for the bold style:
50
- *
51
- * ```ts
52
- * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
53
- * const { data } = suggestion;
54
- *
55
- * // Omit suggestions that are not bold style suggestions.
56
- * if ( !data || data.commandName !== 'bold' ) {
57
- * return;
58
- * }
59
- *
60
- * const isSet = !!data.commandParams[ 0 ].forceValue;
61
- * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
62
- *
63
- * return {
64
- * type: 'format',
65
- * content
66
- * };
67
- * } );
68
- * ```
69
- */
70
- registerDescriptionCallback(callback: DescriptionCallback): void;
71
- /**
72
- * For given `elementName` registers how this element will be labeled in a description (for example when it is added
73
- * or removed).
74
- *
75
- * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
76
- * and should return boolean value.
77
- *
78
- * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
79
- *
80
- * A simple use case without using internationalization:
81
- *
82
- * ```ts
83
- * suggestionDescriptionFactory.registerElementLabel(
84
- * 'paragraph',
85
- * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
86
- * );
87
- * ```
88
- *
89
- * If you want your feature to be localized to other languages, use localization service:
90
- *
91
- * ```ts
92
- * const t = editor.locale.t; // Remember that you have to use function named `t`.
93
- *
94
- * suggestionDescriptionFactory.registerElementLabel(
95
- * 'paragraph',
96
- * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
97
- * );
98
- * ```
99
- */
100
- registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
101
- /**
102
- * Returns label registered for given element or the element name if there is no label registered for it.
103
- */
104
- getItemLabel(element: Element, quantity?: number): string;
105
- }
106
- /**
107
- * A description for the suggestion.
108
- *
109
- * ```ts
110
- * {
111
- * type: 'format',
112
- * label: '*Set format:* bold'
113
- * }
114
- * ```
115
- *
116
- * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
117
- * by displaying a color box next to the suggestion.
118
- *
119
- * ```ts
120
- * {
121
- * type: 'format',
122
- * label: '*Set font color:*',
123
- * color: {
124
- * value: 'hsl( 60, 60%, 60% )',
125
- * title: 'yellow'
126
- * }
127
- * }
128
- * ```
129
- */
130
- export interface Description {
131
- type: 'insertion' | 'deletion' | 'replace' | 'format';
132
- /**
133
- * Description label. You may use `*` to bold part of the label.
134
- */
135
- content: string;
136
- /**
137
- * The optional `color` property used for color-related suggestions.
138
- * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
139
- */
140
- color?: {
141
- value: string;
142
- title: string;
143
- };
144
- }
145
- export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
146
- export type LabelCallback = (quantity: number) => string;
147
- export interface LabelCallbackObject {
148
- matchingCallback: (element: Element) => boolean;
149
- label: LabelCallback;
150
- priority: PriorityString;
151
- }
152
- /**
153
- * An intermediate state which is easier to operate on when consecutive suggestion
154
- * ranges are traversed.
155
- */
156
- interface DescriptionItem {
157
- type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
158
- add?: string;
159
- remove?: string;
160
- element?: Element;
161
- quantity?: number;
162
- }
163
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
+ import type { Schema, Element } from 'ckeditor5/src/engine';
7
+ import type Suggestion from './suggestion';
8
+ /**
9
+ * Creates descriptions for suggestion chains.
10
+ *
11
+ * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
+ * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
+ * results in "Replaced" description.
14
+ */
15
+ export default class SuggestionDescriptionFactory {
16
+ constructor(schema: Schema, locale: Locale);
17
+ /**
18
+ * Returns descriptions for given suggestion chain.
19
+ *
20
+ * The structure of the descriptions array is as follows (explained on an example):
21
+ *
22
+ * ```ts
23
+ * [
24
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
25
+ * { type: 'insertion', content: '*Insert:* image },
26
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
27
+ * ]
28
+ * ```
29
+ *
30
+ * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
31
+ * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
32
+ *
33
+ * ```html
34
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
35
+ * <p><strong>Insert:</strong> image</p>
36
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
37
+ * ```
38
+ */
39
+ getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
40
+ /**
41
+ * Registers a callback function that returns a custom description for a suggestion.
42
+ *
43
+ * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
44
+ *
45
+ * The callback takes the suggestion instance as a parameter and should return
46
+ * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
47
+ * if the suggestion was not handled by the callback.
48
+ *
49
+ * Example of a description callback for the bold style:
50
+ *
51
+ * ```ts
52
+ * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
53
+ * const { data } = suggestion;
54
+ *
55
+ * // Omit suggestions that are not bold style suggestions.
56
+ * if ( !data || data.commandName !== 'bold' ) {
57
+ * return;
58
+ * }
59
+ *
60
+ * const isSet = !!data.commandParams[ 0 ].forceValue;
61
+ * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
62
+ *
63
+ * return {
64
+ * type: 'format',
65
+ * content
66
+ * };
67
+ * } );
68
+ * ```
69
+ */
70
+ registerDescriptionCallback(callback: DescriptionCallback): void;
71
+ /**
72
+ * For given `elementName` registers how this element will be labeled in a description (for example when it is added
73
+ * or removed).
74
+ *
75
+ * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
76
+ * and should return boolean value.
77
+ *
78
+ * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
79
+ *
80
+ * A simple use case without using internationalization:
81
+ *
82
+ * ```ts
83
+ * suggestionDescriptionFactory.registerElementLabel(
84
+ * 'paragraph',
85
+ * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
86
+ * );
87
+ * ```
88
+ *
89
+ * If you want your feature to be localized to other languages, use localization service:
90
+ *
91
+ * ```ts
92
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
93
+ *
94
+ * suggestionDescriptionFactory.registerElementLabel(
95
+ * 'paragraph',
96
+ * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
97
+ * );
98
+ * ```
99
+ */
100
+ registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
101
+ /**
102
+ * Returns label registered for given element or the element name if there is no label registered for it.
103
+ */
104
+ getItemLabel(element: Element, quantity?: number): string;
105
+ }
106
+ /**
107
+ * A description for the suggestion.
108
+ *
109
+ * ```ts
110
+ * {
111
+ * type: 'format',
112
+ * label: '*Set format:* bold'
113
+ * }
114
+ * ```
115
+ *
116
+ * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
117
+ * by displaying a color box next to the suggestion.
118
+ *
119
+ * ```ts
120
+ * {
121
+ * type: 'format',
122
+ * label: '*Set font color:*',
123
+ * color: {
124
+ * value: 'hsl( 60, 60%, 60% )',
125
+ * title: 'yellow'
126
+ * }
127
+ * }
128
+ * ```
129
+ */
130
+ export interface Description {
131
+ type: 'insertion' | 'deletion' | 'replace' | 'format';
132
+ /**
133
+ * Description label. You may use `*` to bold part of the label.
134
+ */
135
+ content: string;
136
+ /**
137
+ * The optional `color` property used for color-related suggestions.
138
+ * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
139
+ */
140
+ color?: {
141
+ value: string;
142
+ title: string;
143
+ };
144
+ }
145
+ export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
146
+ export type LabelCallback = (quantity: number) => string;
147
+ export interface LabelCallbackObject {
148
+ matchingCallback: (element: Element) => boolean;
149
+ label: LabelCallback;
150
+ priority: PriorityString;
151
+ }
152
+ /**
153
+ * An intermediate state which is easier to operate on when consecutive suggestion
154
+ * ranges are traversed.
155
+ */
156
+ interface DescriptionItem {
157
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
158
+ add?: string;
159
+ remove?: string;
160
+ element?: Element;
161
+ quantity?: number;
162
+ }
163
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2a6f=['getDescriptions','_itemLabels','start','match','Container','*Split:*\x20%0','registerDescriptionCallback','isObject','label','$1\x20$2','add','registerElementLabel','getWalker','isEmpty','isInContent','removeContainer','checkChild','end','data','removeEmptyContainer','*Remove:*\x20%0','*Insert:*\x20%0','addContainer','isEqual','function','removeObject','replace','EmptyContainer','skip','elementEnd','quantity','_resolveDescriptionItems','_customCallbacks','remove','indexOf','element','$text','deletion','getItemLabel','ELEMENT_SPACE','nextSibling','item','type','getFirstRange','name','addEmptyContainer','*Merge:*\x20%0','_itemLabelsCallbacks','_schema','pop','Object','normal','text','insertion','addObject','length','push','softBreak','elementStart'];(function(_0x251928,_0x2a6f21){const _0x485ff4=function(_0x24000a){while(--_0x24000a){_0x251928['push'](_0x251928['shift']());}};_0x485ff4(++_0x2a6f21);}(_0x2a6f,0xff));const _0x485f=function(_0x251928,_0x2a6f21){_0x251928=_0x251928-0x0;let _0x485ff4=_0x2a6f[_0x251928];return _0x485ff4;};import{getTranslation as _0x3b975c}from'./utils/common-translations';import{priorities as _0x5195fb,insertToPriorityArray as _0x28a632}from'ckeditor5/src/utils';export default class m{constructor(_0x5d7199,_0x247a9b){this['_customCallbacks']=[],this[_0x485f('0x29')]=new Map(),this[_0x485f('0x1c')]=[],this['_schema']=_0x5d7199,this['_locale']=_0x247a9b;}[_0x485f('0x28')](_0x2ac4bb){const _0x1f24f0=[];for(let _0x2d6688=0x0;_0x2d6688<_0x2ac4bb[_0x485f('0x24')];_0x2d6688++){const _0x379c2e=_0x2ac4bb[_0x2d6688];if(!_0x379c2e[_0x485f('0x36')])continue;let _0x17af96=!0x1;for(const _0x81e8bf of this['_customCallbacks']){const _0x30dcd8=_0x81e8bf(_0x379c2e);if(_0x30dcd8){_0x485f('0x17')in _0x30dcd8&&_0x1f24f0[_0x485f('0x25')](_0x30dcd8),_0x17af96=!0x0;break;}}if(!_0x17af96){this['_addDescriptionItems'](_0x1f24f0,_0x379c2e);const _0x47b28f=_0x2ac4bb[_0x2d6688+0x1];if(_0x47b28f&&!_0x379c2e[_0x485f('0x18')]()[_0x485f('0x39')][_0x485f('0x4')](_0x47b28f['getFirstRange']()[_0x485f('0x2a')])){const _0x1a8006=_0x1f24f0[_0x1f24f0[_0x485f('0x24')]-0x1],_0x3208b1='insertion'==_0x379c2e[_0x485f('0x17')]?_0x485f('0x32'):_0x485f('0xe');_0x1a8006&&'text'==_0x1a8006[_0x485f('0x17')]&&(_0x1a8006[_0x3208b1]+='\x0a');}}}return this[_0x485f('0xc')](_0x1f24f0);}[_0x485f('0x2e')](_0x2fb47b){this[_0x485f('0xd')]['push'](_0x2fb47b);}[_0x485f('0x33')](_0x4a02ec,_0x1b946b,_0x24e22b=_0x5195fb[_0x485f('0x20')]){_0x485f('0x5')==typeof _0x4a02ec?_0x28a632(this[_0x485f('0x1c')],{'matchingCallback':_0x4a02ec,'label':_0x1b946b,'priority':_0x24e22b}):this[_0x485f('0x29')]['set'](_0x4a02ec,_0x1b946b);}[_0x485f('0x13')](_0x5b836e,_0x302c98=0x1){let _0x164daf;for(const _0x3ae36c of this[_0x485f('0x1c')])if(_0x3ae36c['matchingCallback'](_0x5b836e)){_0x164daf=_0x3ae36c[_0x485f('0x30')];break;}return _0x164daf||(_0x164daf=this['_itemLabels']['get'](_0x5b836e[_0x485f('0x19')])),_0x164daf?_0x164daf(_0x302c98):0x1!==_0x302c98?_0x302c98+'\x20'+_0x5b836e['name']+'s':''+_0x5b836e[_0x485f('0x19')];}['_addDescriptionItems'](_0x1f6cbd,_0x430b9f){const _0x1d33c1=_0x430b9f['getFirstRange']()[_0x485f('0x34')](),_0x53ebe5=_0x485f('0x22')==_0x430b9f[_0x485f('0x17')]?_0x485f('0x32'):_0x485f('0xe');for(const _0x27c5ae of _0x1d33c1){const _0xd92007=_0x27c5ae[_0x485f('0x16')],_0x1ce816=_0x1f6cbd[_0x1f6cbd['length']-0x1];if(_0xd92007['is']('$textProxy'))_0x1ce816&&_0x1ce816[_0x485f('0x17')][_0x485f('0xf')](_0x485f('0x2c'))>-0x1&&_0x1f6cbd['pop'](),_0x1ce816&&'text'==_0x1ce816[_0x485f('0x17')]?_0x1ce816[_0x53ebe5]+=_0xd92007[_0x485f('0x3a')]:_0x1f6cbd[_0x485f('0x25')]({'type':_0x485f('0x21'),'add':_0x485f('0x32')==_0x53ebe5?_0xd92007['data']:'','remove':'remove'==_0x53ebe5?_0xd92007[_0x485f('0x3a')]:''});else{if(this[_0x485f('0x1d')][_0x485f('0x2f')](_0xd92007)){const _0x4a2506=_0xd92007;if(_0x1ce816&&_0x1ce816['type'][_0x485f('0xf')](_0x485f('0x2c'))>-0x1&&_0x1f6cbd[_0x485f('0x1e')](),_0x485f('0xa')==_0x27c5ae[_0x485f('0x17')])continue;_0x1ce816&&_0x1ce816['type']==_0x53ebe5+'Object'&&_0x1ce816[_0x485f('0x10')][_0x485f('0x19')]==_0x4a2506[_0x485f('0x19')]?_0x1ce816['quantity']++:_0x1f6cbd[_0x485f('0x25')]({'type':_0x53ebe5+_0x485f('0x1f'),'element':_0x4a2506,'quantity':0x1}),_0x1d33c1[_0x485f('0x9')](_0x5a8336=>!(_0x485f('0xa')==_0x5a8336['type']&&_0x5a8336[_0x485f('0x16')]==_0xd92007));}else{if(this[_0x485f('0x1d')][_0x485f('0x38')](_0xd92007,_0x485f('0x11'))||_0xd92007['is'](_0x485f('0x10'),_0x485f('0x26'))){const _0x41ec2a=_0xd92007;if(_0x485f('0x32')==_0x53ebe5&&_0x485f('0x27')==_0x27c5ae[_0x485f('0x17')]||_0x485f('0xe')==_0x53ebe5&&_0x485f('0xa')==_0x27c5ae[_0x485f('0x17')])continue;if(_0x1ce816&&-0x1==_0x1ce816[_0x485f('0x17')][_0x485f('0xf')]('Container')){_0x485f('0x21')==_0x1ce816[_0x485f('0x17')]&&(_0x1ce816[_0x53ebe5]+='\x0a');continue;}let _0x17cb12;if(_0x17cb12=_0x485f('0x32')==_0x53ebe5?_0x41ec2a[_0x485f('0x15')]&&!this[_0x485f('0x1d')][_0x485f('0x2f')](_0x41ec2a[_0x485f('0x15')])?_0x41ec2a['nextSibling']:null:_0x41ec2a['previousSibling']&&!this[_0x485f('0x1d')][_0x485f('0x2f')](_0x41ec2a['previousSibling'])?_0x41ec2a['previousSibling']:null,_0x41ec2a[_0x485f('0x35')]||_0x17cb12&&_0x17cb12[_0x485f('0x35')]){const _0x3895af=_0x17cb12&&_0x17cb12[_0x485f('0x35')]?_0x17cb12:_0x41ec2a;_0x1ce816&&_0x1ce816[_0x485f('0x17')]==_0x53ebe5+'EmptyContainer'&&_0x1ce816['element']['name']==_0x3895af[_0x485f('0x19')]?_0x1ce816[_0x485f('0xb')]++:_0x1f6cbd[_0x485f('0x25')]({'type':_0x53ebe5+_0x485f('0x8'),'element':_0x3895af,'quantity':0x1});}else _0x1f6cbd[_0x485f('0x25')]({'type':_0x53ebe5+_0x485f('0x2c'),'element':_0x41ec2a});}}}}}[_0x485f('0xc')](_0x223d43){const _0xc0c7b6=this['_locale'],_0x5b2f12=[];for(const _0x5cf436 of _0x223d43){switch(_0x5cf436['type']){case _0x485f('0x21'):if(_0x5cf436[_0x485f('0x32')]=_0x5cf436[_0x485f('0x32')]['replace'](/(\S)\u000A+(\S)/g,_0x485f('0x31'))[_0x485f('0x7')](/\u000A/g,''),_0x5cf436[_0x485f('0xe')]=_0x5cf436[_0x485f('0xe')][_0x485f('0x7')](/(\S)\u000A+(\S)/g,_0x485f('0x31'))[_0x485f('0x7')](/\u000A/g,''),''!=_0x5cf436['add']&&''!=_0x5cf436[_0x485f('0xe')]){_0x5b2f12[_0x485f('0x25')]({'type':_0x485f('0x7'),'content':_0x3b975c(_0xc0c7b6,'REPLACE_TEXT',['\x22'+_0x5cf436[_0x485f('0xe')]+'\x22','\x22'+_0x5cf436['add']+'\x22'])});continue;}if(null!=_0x5cf436[_0x485f('0x32')][_0x485f('0x2b')](/^ +$/)){_0x5b2f12['push']({'type':'insertion','content':_0x3b975c(_0xc0c7b6,_0x485f('0x2'),_0x3b975c(_0xc0c7b6,_0x485f('0x14'),_0x5cf436[_0x485f('0x32')][_0x485f('0x24')]))});continue;}if(null!=_0x5cf436[_0x485f('0xe')]['match'](/^ +$/)){_0x5b2f12['push']({'type':_0x485f('0x12'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x1'),_0x3b975c(_0xc0c7b6,_0x485f('0x14'),_0x5cf436[_0x485f('0xe')][_0x485f('0x24')]))});continue;}if(''!=_0x5cf436[_0x485f('0x32')]){_0x5b2f12[_0x485f('0x25')]({'type':_0x485f('0x22'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x2'),'\x22'+_0x5cf436['add']+'\x22')});continue;}_0x5b2f12[_0x485f('0x25')]({'type':_0x485f('0x12'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x1'),'\x22'+_0x5cf436[_0x485f('0xe')]+'\x22')});continue;case _0x485f('0x1a'):case _0x485f('0x23'):_0x5b2f12['push']({'type':_0x485f('0x22'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x2'),this[_0x485f('0x13')](_0x5cf436[_0x485f('0x10')],_0x5cf436[_0x485f('0xb')]))});continue;case _0x485f('0x0'):case _0x485f('0x6'):_0x5b2f12['push']({'type':_0x485f('0x12'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x1'),this[_0x485f('0x13')](_0x5cf436[_0x485f('0x10')],_0x5cf436[_0x485f('0xb')]))});continue;case _0x485f('0x3'):_0x5b2f12[_0x485f('0x25')]({'type':_0x485f('0x22'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x2d'),this['getItemLabel'](_0x5cf436[_0x485f('0x10')],_0x5cf436[_0x485f('0xb')]))});continue;case _0x485f('0x37'):_0x5b2f12['push']({'type':_0x485f('0x12'),'content':_0x3b975c(_0xc0c7b6,_0x485f('0x1b'),this[_0x485f('0x13')](_0x5cf436[_0x485f('0x10')],_0x5cf436['quantity']))});continue;}_0x5b2f12[_0x485f('0x25')](_0x5cf436);}return _0x5b2f12;}}
23
+ const _0x52cf=['skip','isEmpty','push','REPLACE_TEXT','deletion','insertion','get','getWalker','$textProxy','_customCallbacks','getDescriptions','*Split:*\x20%0','_resolveDescriptionItems','replace','getItemLabel','*Merge:*\x20%0','data','getFirstRange','_itemLabels','isEqual','element','*Insert:*\x20%0','nextSibling','pop','function','match','_locale','length','EmptyContainer','*Remove:*\x20%0','isInContent','matchingCallback','registerElementLabel','_addDescriptionItems','$1\x20$2','ELEMENT_SPACE','label','Object','remove','_schema','indexOf','name','Container','addEmptyContainer','quantity','addObject','add','addContainer','item','removeContainer','isObject','_itemLabelsCallbacks','elementEnd','type','text'];(function(_0xbd38bd,_0x52cf7b){const _0x451aa5=function(_0xa212c7){while(--_0xa212c7){_0xbd38bd['push'](_0xbd38bd['shift']());}};_0x451aa5(++_0x52cf7b);}(_0x52cf,0x95));const _0x451a=function(_0xbd38bd,_0x52cf7b){_0xbd38bd=_0xbd38bd-0x0;let _0x451aa5=_0x52cf[_0xbd38bd];return _0x451aa5;};import{getTranslation as _0x5cc6c9}from'./utils/common-translations';import{priorities as _0x4d1b72,insertToPriorityArray as _0x420501}from'ckeditor5/src/utils';export default class m{constructor(_0x487cea,_0x1534c7){this[_0x451a('0x19')]=[],this[_0x451a('0x22')]=new Map(),this[_0x451a('0xc')]=[],this[_0x451a('0x0')]=_0x487cea,this[_0x451a('0x2a')]=_0x1534c7;}[_0x451a('0x1a')](_0x582db9){const _0x39f847=[];for(let _0x46decc=0x0;_0x46decc<_0x582db9[_0x451a('0x2b')];_0x46decc++){const _0x2837ce=_0x582db9[_0x46decc];if(!_0x2837ce[_0x451a('0x2e')])continue;let _0x2e3021=!0x1;for(const _0xd83e8d of this['_customCallbacks']){const _0x3dccad=_0xd83e8d(_0x2837ce);if(_0x3dccad){_0x451a('0xe')in _0x3dccad&&_0x39f847[_0x451a('0x12')](_0x3dccad),_0x2e3021=!0x0;break;}}if(!_0x2e3021){this[_0x451a('0x31')](_0x39f847,_0x2837ce);const _0x3bfcf7=_0x582db9[_0x46decc+0x1];if(_0x3bfcf7&&!_0x2837ce['getFirstRange']()['end'][_0x451a('0x23')](_0x3bfcf7[_0x451a('0x21')]()['start'])){const _0x1b6bd1=_0x39f847[_0x39f847[_0x451a('0x2b')]-0x1],_0x1dbbe5=_0x451a('0x15')==_0x2837ce[_0x451a('0xe')]?'add':'remove';_0x1b6bd1&&'text'==_0x1b6bd1[_0x451a('0xe')]&&(_0x1b6bd1[_0x1dbbe5]+='\x0a');}}}return this['_resolveDescriptionItems'](_0x39f847);}['registerDescriptionCallback'](_0x554655){this['_customCallbacks']['push'](_0x554655);}[_0x451a('0x30')](_0x571229,_0x4b1067,_0x4cd2a3=_0x4d1b72['normal']){_0x451a('0x28')==typeof _0x571229?_0x420501(this['_itemLabelsCallbacks'],{'matchingCallback':_0x571229,'label':_0x4b1067,'priority':_0x4cd2a3}):this[_0x451a('0x22')]['set'](_0x571229,_0x4b1067);}[_0x451a('0x1e')](_0x49065e,_0x33641b=0x1){let _0x1545ea;for(const _0xdc1da5 of this[_0x451a('0xc')])if(_0xdc1da5[_0x451a('0x2f')](_0x49065e)){_0x1545ea=_0xdc1da5[_0x451a('0x34')];break;}return _0x1545ea||(_0x1545ea=this[_0x451a('0x22')][_0x451a('0x16')](_0x49065e[_0x451a('0x2')])),_0x1545ea?_0x1545ea(_0x33641b):0x1!==_0x33641b?_0x33641b+'\x20'+_0x49065e[_0x451a('0x2')]+'s':''+_0x49065e[_0x451a('0x2')];}[_0x451a('0x31')](_0x3f41ad,_0x52f81f){const _0x4e0ee8=_0x52f81f['getFirstRange']()[_0x451a('0x17')](),_0x189ece='insertion'==_0x52f81f[_0x451a('0xe')]?'add':'remove';for(const _0x1c86d3 of _0x4e0ee8){const _0x1f496d=_0x1c86d3[_0x451a('0x9')],_0x2d6a59=_0x3f41ad[_0x3f41ad[_0x451a('0x2b')]-0x1];if(_0x1f496d['is'](_0x451a('0x18')))_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')](_0x451a('0x3'))>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x2d6a59&&_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]?_0x2d6a59[_0x189ece]+=_0x1f496d[_0x451a('0x20')]:_0x3f41ad[_0x451a('0x12')]({'type':_0x451a('0xf'),'add':_0x451a('0x7')==_0x189ece?_0x1f496d[_0x451a('0x20')]:'','remove':'remove'==_0x189ece?_0x1f496d[_0x451a('0x20')]:''});else{if(this[_0x451a('0x0')][_0x451a('0xb')](_0x1f496d)){const _0x11357b=_0x1f496d;if(_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')]('Container')>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x451a('0xd')==_0x1c86d3['type'])continue;_0x2d6a59&&_0x2d6a59[_0x451a('0xe')]==_0x189ece+_0x451a('0x35')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x11357b['name']?_0x2d6a59[_0x451a('0x5')]++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x35'),'element':_0x11357b,'quantity':0x1}),_0x4e0ee8[_0x451a('0x10')](_0x2962a4=>!(_0x451a('0xd')==_0x2962a4[_0x451a('0xe')]&&_0x2962a4[_0x451a('0x9')]==_0x1f496d));}else{if(this[_0x451a('0x0')]['checkChild'](_0x1f496d,'$text')||_0x1f496d['is']('element','softBreak')){const _0x556edc=_0x1f496d;if(_0x451a('0x7')==_0x189ece&&'elementStart'==_0x1c86d3[_0x451a('0xe')]||'remove'==_0x189ece&&_0x451a('0xd')==_0x1c86d3[_0x451a('0xe')])continue;if(_0x2d6a59&&-0x1==_0x2d6a59['type'][_0x451a('0x1')](_0x451a('0x3'))){_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]&&(_0x2d6a59[_0x189ece]+='\x0a');continue;}let _0x10c473;if(_0x10c473=_0x451a('0x7')==_0x189ece?_0x556edc[_0x451a('0x26')]&&!this['_schema']['isObject'](_0x556edc[_0x451a('0x26')])?_0x556edc['nextSibling']:null:_0x556edc['previousSibling']&&!this['_schema'][_0x451a('0xb')](_0x556edc['previousSibling'])?_0x556edc['previousSibling']:null,_0x556edc[_0x451a('0x11')]||_0x10c473&&_0x10c473[_0x451a('0x11')]){const _0x5d6900=_0x10c473&&_0x10c473[_0x451a('0x11')]?_0x10c473:_0x556edc;_0x2d6a59&&_0x2d6a59['type']==_0x189ece+_0x451a('0x2c')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x5d6900['name']?_0x2d6a59['quantity']++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x2c'),'element':_0x5d6900,'quantity':0x1});}else _0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x3'),'element':_0x556edc});}}}}}[_0x451a('0x1c')](_0x49a9d7){const _0x1401e0=this[_0x451a('0x2a')],_0xeeea81=[];for(const _0x31cfbf of _0x49a9d7){switch(_0x31cfbf[_0x451a('0xe')]){case _0x451a('0xf'):if(_0x31cfbf[_0x451a('0x7')]=_0x31cfbf['add']['replace'](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),_0x31cfbf[_0x451a('0x36')]=_0x31cfbf[_0x451a('0x36')][_0x451a('0x1d')](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),''!=_0x31cfbf['add']&&''!=_0x31cfbf[_0x451a('0x36')]){_0xeeea81['push']({'type':'replace','content':_0x5cc6c9(_0x1401e0,_0x451a('0x13'),['\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22'])});continue;}if(null!=_0x31cfbf[_0x451a('0x7')]['match'](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x25'),_0x5cc6c9(_0x1401e0,_0x451a('0x33'),_0x31cfbf[_0x451a('0x7')][_0x451a('0x2b')]))});continue;}if(null!=_0x31cfbf[_0x451a('0x36')][_0x451a('0x29')](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':'deletion','content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),_0x5cc6c9(_0x1401e0,'ELEMENT_SPACE',_0x31cfbf[_0x451a('0x36')][_0x451a('0x2b')]))});continue;}if(''!=_0x31cfbf['add']){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22')});continue;}_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),'\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22')});continue;case _0x451a('0x4'):case _0x451a('0x6'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0',this['getItemLabel'](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case'removeEmptyContainer':case'removeObject':_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),this[_0x451a('0x1e')](_0x31cfbf['element'],_0x31cfbf['quantity']))});continue;case _0x451a('0x8'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1b'),this[_0x451a('0x1e')](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case _0x451a('0xa'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1f'),this['getItemLabel'](_0x31cfbf['element'],_0x31cfbf[_0x451a('0x5')]))});continue;}_0xeeea81[_0x451a('0x12')](_0x31cfbf);}return _0xeeea81;}}