@ckeditor/ckeditor5-track-changes 40.0.0 → 40.2.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 (232) hide show
  1. package/CHANGELOG.md +15 -15
  2. package/LICENSE.md +3 -3
  3. package/README.md +1 -1
  4. package/build/track-changes.js +2 -2
  5. package/build/translations/ar.js +1 -1
  6. package/build/translations/az.js +1 -1
  7. package/build/translations/bg.js +1 -1
  8. package/build/translations/bn.js +1 -1
  9. package/build/translations/ca.js +1 -1
  10. package/build/translations/cs.js +1 -1
  11. package/build/translations/da.js +1 -1
  12. package/build/translations/de.js +1 -1
  13. package/build/translations/el.js +1 -1
  14. package/build/translations/en-au.js +1 -1
  15. package/build/translations/es.js +1 -1
  16. package/build/translations/et.js +1 -1
  17. package/build/translations/fi.js +1 -1
  18. package/build/translations/fr.js +1 -1
  19. package/build/translations/gl.js +1 -1
  20. package/build/translations/he.js +1 -1
  21. package/build/translations/hi.js +1 -1
  22. package/build/translations/hr.js +1 -1
  23. package/build/translations/hu.js +1 -1
  24. package/build/translations/id.js +1 -1
  25. package/build/translations/it.js +1 -1
  26. package/build/translations/ja.js +1 -1
  27. package/build/translations/ko.js +1 -1
  28. package/build/translations/lt.js +1 -1
  29. package/build/translations/lv.js +1 -1
  30. package/build/translations/ms.js +1 -1
  31. package/build/translations/nl.js +1 -1
  32. package/build/translations/no.js +1 -1
  33. package/build/translations/pl.js +1 -1
  34. package/build/translations/pt-br.js +1 -1
  35. package/build/translations/pt.js +1 -1
  36. package/build/translations/ro.js +1 -1
  37. package/build/translations/ru.js +1 -1
  38. package/build/translations/sk.js +1 -1
  39. package/build/translations/sq.js +1 -1
  40. package/build/translations/sr-latn.js +1 -1
  41. package/build/translations/sr.js +1 -1
  42. package/build/translations/sv.js +1 -1
  43. package/build/translations/th.js +1 -1
  44. package/build/translations/tk.js +1 -1
  45. package/build/translations/tr.js +1 -1
  46. package/build/translations/tt.js +1 -1
  47. package/build/translations/uk.js +1 -1
  48. package/build/translations/ur.js +1 -1
  49. package/build/translations/vi.js +1 -1
  50. package/build/translations/zh-cn.js +1 -1
  51. package/build/translations/zh.js +1 -1
  52. package/lang/contexts.json +20 -1
  53. package/lang/translations/ar.po +78 -2
  54. package/lang/translations/az.po +77 -1
  55. package/lang/translations/bg.po +78 -2
  56. package/lang/translations/bn.po +78 -2
  57. package/lang/translations/ca.po +78 -2
  58. package/lang/translations/cs.po +78 -2
  59. package/lang/translations/da.po +78 -2
  60. package/lang/translations/de.po +78 -2
  61. package/lang/translations/el.po +78 -2
  62. package/lang/translations/en-au.po +78 -2
  63. package/lang/translations/en.po +78 -2
  64. package/lang/translations/es.po +78 -2
  65. package/lang/translations/et.po +78 -2
  66. package/lang/translations/fi.po +78 -2
  67. package/lang/translations/fr.po +78 -2
  68. package/lang/translations/gl.po +90 -14
  69. package/lang/translations/he.po +78 -2
  70. package/lang/translations/hi.po +78 -2
  71. package/lang/translations/hr.po +78 -2
  72. package/lang/translations/hu.po +78 -2
  73. package/lang/translations/id.po +78 -2
  74. package/lang/translations/it.po +78 -2
  75. package/lang/translations/ja.po +78 -2
  76. package/lang/translations/ko.po +78 -2
  77. package/lang/translations/lt.po +78 -2
  78. package/lang/translations/lv.po +78 -2
  79. package/lang/translations/ms.po +78 -2
  80. package/lang/translations/nl.po +78 -2
  81. package/lang/translations/no.po +78 -2
  82. package/lang/translations/pl.po +78 -2
  83. package/lang/translations/pt-br.po +96 -20
  84. package/lang/translations/pt.po +78 -2
  85. package/lang/translations/ro.po +78 -2
  86. package/lang/translations/ru.po +78 -2
  87. package/lang/translations/sk.po +78 -2
  88. package/lang/translations/sq.po +77 -1
  89. package/lang/translations/sr-latn.po +78 -2
  90. package/lang/translations/sr.po +78 -2
  91. package/lang/translations/sv.po +78 -2
  92. package/lang/translations/th.po +78 -2
  93. package/lang/translations/tk.po +77 -1
  94. package/lang/translations/tr.po +78 -2
  95. package/lang/translations/tt.po +77 -1
  96. package/lang/translations/uk.po +78 -2
  97. package/lang/translations/ur.po +77 -1
  98. package/lang/translations/vi.po +78 -2
  99. package/lang/translations/zh-cn.po +78 -2
  100. package/lang/translations/zh.po +78 -2
  101. package/package.json +3 -3
  102. package/src/augmentation.d.ts +40 -40
  103. package/src/commands/acceptsuggestioncommand.d.ts +24 -24
  104. package/src/commands/acceptsuggestioncommand.js +1 -1
  105. package/src/commands/discardsuggestioncommand.d.ts +24 -24
  106. package/src/commands/discardsuggestioncommand.js +1 -1
  107. package/src/commands/executeonallsuggestionscommand.d.ts +24 -24
  108. package/src/commands/executeonallsuggestionscommand.js +1 -1
  109. package/src/commands/executeonselectedsuggestionscommand.d.ts +24 -24
  110. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  111. package/src/commands/trackchangescommand.d.ts +26 -26
  112. package/src/commands/trackchangescommand.js +1 -1
  113. package/src/index.d.ts +16 -16
  114. package/src/integrations/aiassistant.d.ts +17 -17
  115. package/src/integrations/aiassistant.js +1 -1
  116. package/src/integrations/alignment.d.ts +17 -17
  117. package/src/integrations/alignment.js +1 -1
  118. package/src/integrations/basicstyles.d.ts +17 -17
  119. package/src/integrations/basicstyles.js +1 -1
  120. package/src/integrations/blockquote.d.ts +17 -17
  121. package/src/integrations/blockquote.js +1 -1
  122. package/src/integrations/ckbox.d.ts +17 -17
  123. package/src/integrations/ckbox.js +1 -1
  124. package/src/integrations/codeblock.d.ts +17 -17
  125. package/src/integrations/codeblock.js +1 -1
  126. package/src/integrations/comments.d.ts +14 -14
  127. package/src/integrations/comments.js +1 -1
  128. package/src/integrations/deletecommand.d.ts +17 -17
  129. package/src/integrations/deletecommand.js +1 -1
  130. package/src/integrations/documentlist.d.ts +17 -17
  131. package/src/integrations/documentlist.js +1 -1
  132. package/src/integrations/documentlistproperties.d.ts +29 -29
  133. package/src/integrations/documentlistproperties.js +1 -1
  134. package/src/integrations/entercommand.d.ts +16 -16
  135. package/src/integrations/entercommand.js +1 -1
  136. package/src/integrations/findandreplace.d.ts +21 -21
  137. package/src/integrations/findandreplace.js +1 -1
  138. package/src/integrations/font.d.ts +17 -17
  139. package/src/integrations/font.js +1 -1
  140. package/src/integrations/formatpainter.d.ts +17 -17
  141. package/src/integrations/formatpainter.js +1 -1
  142. package/src/integrations/heading.d.ts +17 -17
  143. package/src/integrations/heading.js +1 -1
  144. package/src/integrations/highlight.d.ts +17 -17
  145. package/src/integrations/highlight.js +1 -1
  146. package/src/integrations/horizontalline.d.ts +17 -17
  147. package/src/integrations/horizontalline.js +1 -1
  148. package/src/integrations/htmlembed.d.ts +17 -17
  149. package/src/integrations/htmlembed.js +1 -1
  150. package/src/integrations/image.d.ts +17 -17
  151. package/src/integrations/image.js +1 -1
  152. package/src/integrations/imagereplace.d.ts +17 -23
  153. package/src/integrations/imagereplace.js +1 -1
  154. package/src/integrations/imagestyle.d.ts +17 -0
  155. package/src/integrations/imagestyle.js +23 -0
  156. package/src/integrations/importword.d.ts +18 -18
  157. package/src/integrations/importword.js +1 -1
  158. package/src/integrations/indent.d.ts +17 -17
  159. package/src/integrations/indent.js +1 -1
  160. package/src/integrations/inputcommand.d.ts +16 -16
  161. package/src/integrations/inputcommand.js +1 -1
  162. package/src/integrations/link.d.ts +17 -17
  163. package/src/integrations/link.js +1 -1
  164. package/src/integrations/list.d.ts +17 -17
  165. package/src/integrations/list.js +1 -1
  166. package/src/integrations/listproperties.d.ts +29 -29
  167. package/src/integrations/listproperties.js +1 -1
  168. package/src/integrations/mediaembed.d.ts +17 -17
  169. package/src/integrations/mediaembed.js +1 -1
  170. package/src/integrations/mention.d.ts +17 -17
  171. package/src/integrations/mention.js +1 -1
  172. package/src/integrations/pagebreak.d.ts +17 -17
  173. package/src/integrations/pagebreak.js +1 -1
  174. package/src/integrations/paragraph.d.ts +17 -17
  175. package/src/integrations/paragraph.js +1 -1
  176. package/src/integrations/removeformat.d.ts +17 -17
  177. package/src/integrations/removeformat.js +1 -1
  178. package/src/integrations/restrictededitingmode.d.ts +17 -17
  179. package/src/integrations/restrictededitingmode.js +1 -1
  180. package/src/integrations/shiftentercommand.d.ts +16 -16
  181. package/src/integrations/shiftentercommand.js +1 -1
  182. package/src/integrations/standardeditingmode.d.ts +17 -17
  183. package/src/integrations/standardeditingmode.js +1 -1
  184. package/src/integrations/style.d.ts +17 -18
  185. package/src/integrations/style.js +1 -1
  186. package/src/integrations/table.d.ts +42 -42
  187. package/src/integrations/table.js +1 -1
  188. package/src/integrations/tablecaption.d.ts +22 -22
  189. package/src/integrations/tablecaption.js +1 -1
  190. package/src/integrations/tableclipboard.d.ts +19 -19
  191. package/src/integrations/tableclipboard.js +1 -1
  192. package/src/integrations/tablecolumnresize.d.ts +26 -26
  193. package/src/integrations/tablecolumnresize.js +1 -1
  194. package/src/integrations/tableheadings.d.ts +22 -22
  195. package/src/integrations/tableheadings.js +1 -1
  196. package/src/integrations/tablemergesplit.d.ts +22 -22
  197. package/src/integrations/tablemergesplit.js +1 -1
  198. package/src/integrations/tableofcontents.d.ts +17 -17
  199. package/src/integrations/tableofcontents.js +1 -1
  200. package/src/integrations/tableproperties.d.ts +27 -27
  201. package/src/integrations/tableproperties.js +1 -1
  202. package/src/integrations/template.d.ts +17 -17
  203. package/src/integrations/template.js +1 -1
  204. package/src/integrations/title.d.ts +17 -17
  205. package/src/integrations/title.js +1 -1
  206. package/src/integrations/undo.d.ts +17 -17
  207. package/src/integrations/undo.js +1 -1
  208. package/src/integrations/utils.d.ts +21 -21
  209. package/src/integrations/utils.js +1 -1
  210. package/src/suggestion.d.ts +291 -276
  211. package/src/suggestion.js +1 -1
  212. package/src/suggestiondescriptionfactory.d.ts +183 -163
  213. package/src/suggestiondescriptionfactory.js +1 -1
  214. package/src/trackchanges.d.ts +180 -244
  215. package/src/trackchanges.js +1 -1
  216. package/src/trackchangesconfig.d.ts +78 -75
  217. package/src/trackchangesdata.d.ts +41 -41
  218. package/src/trackchangesdata.js +1 -1
  219. package/src/trackchangesediting.d.ts +524 -468
  220. package/src/trackchangesediting.js +1 -1
  221. package/src/trackchangesui.d.ts +38 -38
  222. package/src/trackchangesui.js +1 -1
  223. package/src/ui/suggestioncontroller.d.ts +37 -37
  224. package/src/ui/suggestioncontroller.js +1 -1
  225. package/src/ui/view/basesuggestionthreadview.d.ts +170 -170
  226. package/src/ui/view/basesuggestionthreadview.js +1 -1
  227. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  228. package/src/ui/view/suggestionthreadview.js +1 -1
  229. package/src/utils/common-translations.d.ts +9 -9
  230. package/src/utils/common-translations.js +1 -1
  231. package/src/utils/utils.d.ts +30 -30
  232. package/src/utils/utils.js +1 -1
package/src/suggestion.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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);}}
23
+ const _0x2b8d=['from','decorate','_model','getFirstMarker','markers','hasComments','@external','discard','subType','onAttributesChange','getMarkerNames','split','attributes','getMarkers','next','getItems','onAccept','getRanges','creator','reduce','type','_onAccept','clear','nodeAfter','isMultiRange','setAttribute','previous','filter','author','getFirstRange','commentThread','onDiscard','substr','_onAttributesChange','removeMarker','removeMarkers','addMarkerName','getRange','addMarker','authoredAt','get','getMultiRangeId','isExternal','suggestion:','getAllAdjacentSuggestions','size','head','set','length','accept','end','_isDataLoaded','nodeBefore','isIntersectingWithRange','data','_markerNames','removeAttribute','map','createdAt','_onDiscard','change','getContainedElement'];(function(_0x558eef,_0x2b8dfc){const _0x2e70b8=function(_0x536c3c){while(--_0x536c3c){_0x558eef['push'](_0x558eef['shift']());}};_0x2e70b8(++_0x2b8dfc);}(_0x2b8d,0x1cb));const _0x2e70=function(_0x558eef,_0x2b8dfc){_0x558eef=_0x558eef-0x0;let _0x2e70b8=_0x2b8d[_0x558eef];return _0x2e70b8;};import{Element as _0x675665}from'ckeditor5/src/engine';import{ObservableMixin as _0x224d26,uid as _0x4a2373}from'ckeditor5/src/utils';import{cloneDeep as _0x171b68,isEqual as _0x50d259,set as _0x2d51a1,unset as _0x3077bb}from'lodash-es';export default class u extends _0x224d26(){constructor(_0x34df69,_0x1f1fe7){super(),this[_0x2e70('0x1a')]=!0x1,this['id']=_0x1f1fe7['id'],this[_0x2e70('0x39')]=_0x1f1fe7['type'],this[_0x2e70('0x2d')]=_0x1f1fe7[_0x2e70('0x2d')]||null,this[_0x2e70('0x3')]=_0x1f1fe7[_0x2e70('0x3')],this[_0x2e70('0x37')]=_0x1f1fe7[_0x2e70('0x37')]||_0x1f1fe7[_0x2e70('0x3')],this[_0x2e70('0x11')]=Boolean(_0x1f1fe7[_0x2e70('0x31')]&&_0x1f1fe7['attributes'][_0x2e70('0x2b')]),this['data']=null,this[_0x2e70('0x27')]=_0x34df69,this[_0x2e70('0x3a')]=_0x1f1fe7[_0x2e70('0x35')],this[_0x2e70('0x22')]=_0x1f1fe7[_0x2e70('0x6')],this[_0x2e70('0x8')]=_0x1f1fe7[_0x2e70('0x2e')],this[_0x2e70('0x1e')]=new Set(),this[_0x2e70('0x21')]=null,this[_0x2e70('0x16')](_0x2e70('0xe'),null),this[_0x2e70('0x16')](_0x2e70('0x31'),_0x1f1fe7[_0x2e70('0x31')]||{}),this['set'](_0x2e70('0x1'),null),this[_0x2e70('0x16')]('next',null),this[_0x2e70('0x16')](_0x2e70('0x5'),null),this[_0x2e70('0x16')]('_saved',!0x1),this[_0x2e70('0x26')](_0x2e70('0x18')),this['decorate'](_0x2e70('0x2c'));}get['head'](){let _0x9e557d=this;for(;_0x9e557d[_0x2e70('0x1')];)_0x9e557d=_0x9e557d[_0x2e70('0x1')];return _0x9e557d;}get[_0x2e70('0x2a')](){return!!this[_0x2e70('0x5')]&&this[_0x2e70('0x5')]['length']>0x0;}get[_0x2e70('0x3d')](){if(0x0==this[_0x2e70('0x1e')][_0x2e70('0x14')])return!0x1;return 0x6==Array[_0x2e70('0x25')](this[_0x2e70('0x1e')])[0x0][_0x2e70('0x30')](':')[_0x2e70('0x17')];}get['isInContent'](){return null!==this[_0x2e70('0x28')]();}[_0x2e70('0xb')](_0x2c4670){this[_0x2e70('0x1e')]['add'](_0x2c4670);}[_0x2e70('0x2f')](){return Array[_0x2e70('0x25')](this[_0x2e70('0x1e')]);}[_0x2e70('0x32')](){return this[_0x2e70('0x2f')]()[_0x2e70('0x20')](_0x4619df=>this[_0x2e70('0x27')][_0x2e70('0x29')][_0x2e70('0xf')](_0x4619df))[_0x2e70('0x2')](_0x202893=>_0x202893);}[_0x2e70('0x28')](){return this[_0x2e70('0x32')]()[0x0]||null;}[_0x2e70('0xa')](){this['_model'][_0x2e70('0x23')](_0x34c74b=>{for(const _0x411e3f of this[_0x2e70('0x32')]())_0x34c74b[_0x2e70('0x9')](_0x411e3f);}),this['_markerNames'][_0x2e70('0x3b')]();}[_0x2e70('0x9')](_0x594663){this['_model'][_0x2e70('0x23')](_0x4d881b=>{_0x4d881b[_0x2e70('0x9')](_0x594663);}),this['_markerNames']['delete'](_0x594663);}['addRange'](_0x51888c){const _0x10d927=_0x2e70('0x12')+this[_0x2e70('0x39')]+':'+this[_0x2e70('0x2d')]+':'+this['id']+':'+this[_0x2e70('0x37')]['id']+':'+u[_0x2e70('0x10')]();this[_0x2e70('0xb')](_0x10d927),this[_0x2e70('0x27')][_0x2e70('0x23')](_0x391436=>{_0x391436[_0x2e70('0xd')](_0x10d927,{'range':_0x51888c,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x2e70('0x1c')](_0x301632){for(const _0x512aa1 of this['getRanges']())if(_0x512aa1['isIntersecting'](_0x301632))return!0x0;return!0x1;}[_0x2e70('0x36')](){return this['getMarkers']()['map'](_0x3b5c3f=>_0x3b5c3f[_0x2e70('0xc')]());}[_0x2e70('0x34')](){return this[_0x2e70('0x36')]()[_0x2e70('0x38')]((_0x14304e,_0x4c6ae2)=>[..._0x14304e,..._0x4c6ae2['getItems']()],[]);}[_0x2e70('0x4')](){var _0x18656f;return(null===(_0x18656f=this[_0x2e70('0x28')]())||void 0x0===_0x18656f?void 0x0:_0x18656f['getRange']())||null;}[_0x2e70('0x24')](){const _0x1fa947=this[_0x2e70('0x36')]();if(0x1!=_0x1fa947[_0x2e70('0x17')])return null;const _0xf741e2=_0x1fa947[0x0],_0x2bcf34=_0xf741e2['start'][_0x2e70('0x3c')],_0x252914=_0xf741e2[_0x2e70('0x19')][_0x2e70('0x1b')];return _0x2bcf34 instanceof _0x675665?_0x2bcf34!=_0x252914?null:_0x2bcf34:null;}['accept'](){this[_0x2e70('0x3a')](this['getRanges'](),this[_0x2e70('0x1d')],this[_0x2e70('0x31')]),this[_0x2e70('0xa')]();}[_0x2e70('0x2c')](){this[_0x2e70('0x22')](this[_0x2e70('0x36')](),this[_0x2e70('0x1d')],this[_0x2e70('0x31')]),this['removeMarkers']();}[_0x2e70('0x13')](){const _0x25f320=[];let _0x1dfe3b=this[_0x2e70('0x15')];for(;_0x1dfe3b;)_0x25f320['push'](_0x1dfe3b),_0x1dfe3b=_0x1dfe3b[_0x2e70('0x33')];return _0x25f320;}[_0x2e70('0x0')](_0x6994ab,_0x581a32){const _0x224af7=_0x171b68(this[_0x2e70('0x31')]);_0x2d51a1(_0x224af7,_0x6994ab,_0x581a32),_0x50d259(_0x224af7,this[_0x2e70('0x31')])||(this[_0x2e70('0x31')]=_0x224af7,this['_onAttributesChange'](_0x224af7));}[_0x2e70('0x1f')](_0x49dee7){const _0x42b6a0=_0x171b68(this['attributes']);_0x3077bb(_0x42b6a0,_0x49dee7),_0x50d259(_0x42b6a0,this['attributes'])||(this[_0x2e70('0x31')]=_0x42b6a0,this[_0x2e70('0x8')](this[_0x2e70('0x31')]));}['toJSON'](){return{'id':this['id'],'type':this['subType']?this['type']+':'+this[_0x2e70('0x2d')]:this[_0x2e70('0x39')],'authorId':this[_0x2e70('0x37')]['id'],'createdAt':this['createdAt'],'hasComments':this['hasComments'],'data':this['data'],'attributes':this[_0x2e70('0x31')]};}static[_0x2e70('0x10')](){return _0x4a2373()[_0x2e70('0x7')](0x1,0x5);}}
@@ -1,163 +1,183 @@
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 suggestions and suggestions chains.
10
+ *
11
+ * The class manages everything related to generating descriptions for suggestions. Here, you register labels for elements,
12
+ * attributes, or custom callback for non-regular cases.
13
+ *
14
+ * One or more suggestions that are grouped together (based ond various conditions) create "suggestion chain".
15
+ * In such chain one suggestion may impact other suggestion when it comes to the description of the whole chain.
16
+ * For example, insertion next to deletion results in "Replaced" description.
17
+ */
18
+ export default class SuggestionDescriptionFactory {
19
+ constructor(schema: Schema, locale: Locale);
20
+ /**
21
+ * Returns descriptions for given suggestion chain.
22
+ *
23
+ * The structure of the descriptions array is as follows (explained on an example):
24
+ *
25
+ * ```ts
26
+ * [
27
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
28
+ * { type: 'insertion', content: '*Insert:* image },
29
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
30
+ * ]
31
+ * ```
32
+ *
33
+ * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
34
+ * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
35
+ *
36
+ * ```html
37
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
38
+ * <p><strong>Insert:</strong> image</p>
39
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
40
+ * ```
41
+ */
42
+ getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
43
+ /**
44
+ * Registers a callback function that returns a custom description for a suggestion.
45
+ *
46
+ * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
47
+ *
48
+ * The callback takes the suggestion instance as a parameter and should return
49
+ * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
50
+ * if the suggestion was not handled by the callback.
51
+ *
52
+ * Example of a description callback for the bold style:
53
+ *
54
+ * ```ts
55
+ * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
56
+ * const { data } = suggestion;
57
+ *
58
+ * // Omit suggestions that are not bold style suggestions.
59
+ * if ( !data || data.commandName !== 'bold' ) {
60
+ * return;
61
+ * }
62
+ *
63
+ * const isSet = !!data.commandParams[ 0 ].forceValue;
64
+ * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
65
+ *
66
+ * return {
67
+ * type: 'format',
68
+ * content
69
+ * };
70
+ * } );
71
+ * ```
72
+ */
73
+ registerDescriptionCallback(callback: DescriptionCallback): void;
74
+ /**
75
+ * For given `elementName` registers how this element will be labeled in a description (for example when it is added
76
+ * or removed).
77
+ *
78
+ * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
79
+ * and should return boolean value.
80
+ *
81
+ * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
82
+ *
83
+ * A simple use case without using internationalization:
84
+ *
85
+ * ```ts
86
+ * suggestionDescriptionFactory.registerElementLabel(
87
+ * 'paragraph',
88
+ * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
89
+ * );
90
+ * ```
91
+ *
92
+ * If you want your feature to be localized to other languages, use localization service:
93
+ *
94
+ * ```ts
95
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
96
+ *
97
+ * suggestionDescriptionFactory.registerElementLabel(
98
+ * 'paragraph',
99
+ * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
100
+ * );
101
+ * ```
102
+ */
103
+ registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
104
+ /**
105
+ * For given `attributeName` registers how this attribute will be labeled in a description (for example when it is added
106
+ * or removed).
107
+ *
108
+ * Example usage with internationalization:
109
+ *
110
+ * ```ts
111
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
112
+ *
113
+ * suggestionDescriptionFactory.registerAttributeLabel(
114
+ * 'bold',
115
+ * t( 'bold' )
116
+ * );
117
+ * ```
118
+ */
119
+ registerAttributeLabel(attributeName: string, attributeLabel: string): void;
120
+ /**
121
+ * Returns label registered for given element or the element name if there is no label registered for it.
122
+ */
123
+ getItemLabel(element: Element, quantity?: number): string;
124
+ }
125
+ /**
126
+ * A description for the suggestion.
127
+ *
128
+ * ```ts
129
+ * {
130
+ * type: 'format',
131
+ * label: '*Set format:* bold'
132
+ * }
133
+ * ```
134
+ *
135
+ * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
136
+ * by displaying a color box next to the suggestion.
137
+ *
138
+ * ```ts
139
+ * {
140
+ * type: 'format',
141
+ * label: '*Set font color:*',
142
+ * color: {
143
+ * value: 'hsl( 60, 60%, 60% )',
144
+ * title: 'yellow'
145
+ * }
146
+ * }
147
+ * ```
148
+ */
149
+ export interface Description {
150
+ type: 'insertion' | 'deletion' | 'replace' | 'format';
151
+ /**
152
+ * Description label. You may use `*` to bold part of the label.
153
+ */
154
+ content: string;
155
+ /**
156
+ * The optional `color` property used for color-related suggestions.
157
+ * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
158
+ */
159
+ color?: {
160
+ value: string;
161
+ title: string;
162
+ };
163
+ }
164
+ export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
165
+ export type LabelCallback = (quantity: number) => string;
166
+ export interface LabelCallbackObject {
167
+ matchingCallback: (element: Element) => boolean;
168
+ label: LabelCallback;
169
+ priority: PriorityString;
170
+ }
171
+ /**
172
+ * An intermediate state which is easier to operate on when consecutive suggestion
173
+ * ranges are traversed.
174
+ */
175
+ interface DescriptionItem {
176
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer' | 'addFormat' | 'removeFormat';
177
+ add?: string;
178
+ remove?: string;
179
+ element?: Element;
180
+ quantity?: number;
181
+ key?: string;
182
+ }
183
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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;}}
23
+ const _0x27fc=['$text','quantity','_locale','get','_itemLabels','removeFormat','format','push','_attributeLabels','map','_handleAttributeSuggestionDescription','end','name','softBreak','match','type','*Remove:*\x20%0','has','*Change\x20to:*\x20%0','isInContent','$1\x20$2','*Merge:*\x20%0','Container','_handleCustomCallbackDescription','add','text','nextSibling','newValue','_handleRenameSuggestionDescription','addContainer','key','item','getItemLabel','remove','elementStart','getFirstRange','label','pop','registerAttributeLabel','_addDescriptionItems','element','subType','getWalker','start','insertion','_itemLabelsCallbacks','_customCallbacks','registerDescriptionCallback','getDescriptions','set','*Insert:*\x20%0','_handleInsertRemoveSuggestionDescription','*Remove\x20format:*\x20%0','matchingCallback','length','ELEMENT_SPACE','Object','removeEmptyContainer','data','addObject','skip','attribute','*Split:*\x20%0','previousSibling','registerElementLabel','isObject','indexOf','_schema','_resolveDescriptionItems','nodeAfter','elementEnd','removeContainer','EmptyContainer','deletion','replace','addFormat','isEqual','isEmpty','join'];(function(_0x896991,_0x27fc45){const _0x36688a=function(_0x15ca41){while(--_0x15ca41){_0x896991['push'](_0x896991['shift']());}};_0x36688a(++_0x27fc45);}(_0x27fc,0x88));const _0x3668=function(_0x896991,_0x27fc45){_0x896991=_0x896991-0x0;let _0x36688a=_0x27fc[_0x896991];return _0x36688a;};import{getTranslation as _0x373532}from'./utils/common-translations';import{priorities as _0x5b5709,insertToPriorityArray as _0xd71576}from'ckeditor5/src/utils';import{renameAttributeKey as _0x4d149a}from'./trackchangesediting';export default class f{constructor(_0x525239,_0x4c3bc3){this[_0x3668('0x44')]=[],this[_0x3668('0x1a')]=new Map(),this[_0x3668('0x43')]=[],this[_0x3668('0x1e')]=new Map(),this[_0x3668('0xa')]=_0x525239,this[_0x3668('0x18')]=_0x4c3bc3;}[_0x3668('0x46')](_0x59bee2){const _0x117029=[],_0x5c2010=new Set(),_0x12323c=new Set();for(let _0x108cc6=0x0;_0x108cc6<_0x59bee2[_0x3668('0x4c')];_0x108cc6++){const _0x1af494=_0x59bee2[_0x108cc6];if(!_0x1af494[_0x3668('0x29')])continue;const _0x1350fa=this['_handleCustomCallbackDescription'](_0x1af494);if(_0x1350fa){if(null!=_0x1af494[_0x3668('0x3f')]){if(_0x5c2010[_0x3668('0x27')](_0x1af494[_0x3668('0x3f')]))continue;_0x5c2010['add'](_0x1af494['subType']);}_0x117029[_0x3668('0x1d')](_0x1350fa);}else{if(_0x3668('0x4')!=_0x1af494[_0x3668('0x25')])_0x3668('0x42')!=_0x1af494[_0x3668('0x25')]&&_0x3668('0x10')!=_0x1af494['type']||this[_0x3668('0x49')](_0x117029,_0x1af494,_0x59bee2[_0x108cc6+0x1]);else{const _0x30b536=_0x1af494[_0x3668('0x1')][_0x3668('0x34')];if(_0x12323c[_0x3668('0x27')](_0x30b536))continue;_0x12323c[_0x3668('0x2e')](_0x1af494[_0x3668('0x1')][_0x3668('0x34')]),_0x30b536==_0x4d149a?this[_0x3668('0x32')](_0x117029,_0x1af494):this['_handleAttributeSuggestionDescription'](_0x117029,_0x1af494);}}}return this[_0x3668('0xb')](_0x117029);}[_0x3668('0x45')](_0x439ac1){this['_customCallbacks'][_0x3668('0x1d')](_0x439ac1);}[_0x3668('0x7')](_0x2773d7,_0x3c4bfd,_0x363867=_0x5b5709['normal']){'function'==typeof _0x2773d7?_0xd71576(this[_0x3668('0x43')],{'matchingCallback':_0x2773d7,'label':_0x3c4bfd,'priority':_0x363867}):this['_itemLabels']['set'](_0x2773d7,_0x3c4bfd);}[_0x3668('0x3c')](_0x1fa74d,_0xd21adb){this[_0x3668('0x1e')][_0x3668('0x47')](_0x1fa74d,_0xd21adb);}[_0x3668('0x36')](_0x490d5a,_0x4f96c2=0x1){let _0x534f1d;for(const _0x5bcfae of this[_0x3668('0x43')])if(_0x5bcfae[_0x3668('0x4b')](_0x490d5a)){_0x534f1d=_0x5bcfae[_0x3668('0x3a')];break;}return _0x534f1d||(_0x534f1d=this[_0x3668('0x1a')][_0x3668('0x19')](_0x490d5a[_0x3668('0x22')])),_0x534f1d?_0x534f1d(_0x4f96c2):0x1!==_0x4f96c2?_0x4f96c2+'\x20'+_0x490d5a['name']+'s':''+_0x490d5a[_0x3668('0x22')];}[_0x3668('0x3d')](_0x569a2a,_0x843b44){const _0x11dda8=_0x843b44[_0x3668('0x39')]()[_0x3668('0x40')](),_0x6b58c9=_0x3668('0x42')==_0x843b44['type']?_0x3668('0x2e'):_0x3668('0x37');for(const _0x4d8ff3 of _0x11dda8){const _0x122e68=_0x4d8ff3[_0x3668('0x35')],_0x44e7cb=_0x569a2a[_0x569a2a[_0x3668('0x4c')]-0x1];if(_0x122e68['is']('$textProxy'))_0x44e7cb&&_0x44e7cb[_0x3668('0x25')][_0x3668('0x9')](_0x3668('0x2c'))>-0x1&&_0x569a2a[_0x3668('0x3b')](),_0x44e7cb&&_0x3668('0x2f')==_0x44e7cb[_0x3668('0x25')]?_0x44e7cb[_0x6b58c9]+=_0x122e68['data']:_0x569a2a['push']({'type':_0x3668('0x2f'),'add':_0x3668('0x2e')==_0x6b58c9?_0x122e68['data']:'','remove':'remove'==_0x6b58c9?_0x122e68['data']:''});else{if(this['_schema']['isObject'](_0x122e68)){const _0x486b54=_0x122e68;if(_0x44e7cb&&_0x44e7cb[_0x3668('0x25')][_0x3668('0x9')](_0x3668('0x2c'))>-0x1&&_0x569a2a[_0x3668('0x3b')](),_0x3668('0xd')==_0x4d8ff3[_0x3668('0x25')])continue;_0x44e7cb&&_0x44e7cb[_0x3668('0x25')]==_0x6b58c9+_0x3668('0x4e')&&_0x44e7cb[_0x3668('0x3e')][_0x3668('0x22')]==_0x486b54[_0x3668('0x22')]?_0x44e7cb['quantity']++:_0x569a2a[_0x3668('0x1d')]({'type':_0x6b58c9+_0x3668('0x4e'),'element':_0x486b54,'quantity':0x1}),_0x11dda8[_0x3668('0x3')](_0x3871f6=>!('elementEnd'==_0x3871f6[_0x3668('0x25')]&&_0x3871f6['item']==_0x122e68));}else{if(this[_0x3668('0xa')]['checkChild'](_0x122e68,_0x3668('0x16'))||_0x122e68['is'](_0x3668('0x3e'),_0x3668('0x23'))){const _0x19b8a4=_0x122e68;if('add'==_0x6b58c9&&_0x3668('0x38')==_0x4d8ff3[_0x3668('0x25')]||_0x3668('0x37')==_0x6b58c9&&'elementEnd'==_0x4d8ff3[_0x3668('0x25')])continue;if(_0x44e7cb&&-0x1==_0x44e7cb[_0x3668('0x25')][_0x3668('0x9')](_0x3668('0x2c'))){_0x3668('0x2f')==_0x44e7cb[_0x3668('0x25')]&&(_0x44e7cb[_0x6b58c9]+='\x0a');continue;}let _0x285e37;if(_0x285e37=_0x3668('0x2e')==_0x6b58c9?_0x19b8a4[_0x3668('0x30')]&&!this[_0x3668('0xa')]['isObject'](_0x19b8a4[_0x3668('0x30')])?_0x19b8a4[_0x3668('0x30')]:null:_0x19b8a4[_0x3668('0x6')]&&!this['_schema'][_0x3668('0x8')](_0x19b8a4[_0x3668('0x6')])?_0x19b8a4[_0x3668('0x6')]:null,_0x19b8a4[_0x3668('0x14')]||_0x285e37&&_0x285e37['isEmpty']){const _0x2bb532=_0x285e37&&_0x285e37[_0x3668('0x14')]?_0x285e37:_0x19b8a4;_0x44e7cb&&_0x44e7cb[_0x3668('0x25')]==_0x6b58c9+_0x3668('0xf')&&_0x44e7cb[_0x3668('0x3e')][_0x3668('0x22')]==_0x2bb532['name']?_0x44e7cb['quantity']++:_0x569a2a[_0x3668('0x1d')]({'type':_0x6b58c9+_0x3668('0xf'),'element':_0x2bb532,'quantity':0x1});}else _0x569a2a[_0x3668('0x1d')]({'type':_0x6b58c9+_0x3668('0x2c'),'element':_0x19b8a4});}}}}}['_resolveDescriptionItems'](_0xd7c0ef){const _0x5088b0=this[_0x3668('0x18')],_0xa0c954=[],_0x1b09c7=[],_0x8ec6ed=[];for(const _0x1492ae of _0xd7c0ef)switch(_0x1492ae['type']){case _0x3668('0x2f'):if(_0x1492ae[_0x3668('0x2e')]=_0x1492ae[_0x3668('0x2e')][_0x3668('0x11')](/(\S)\u000A+(\S)/g,_0x3668('0x2a'))[_0x3668('0x11')](/\u000A/g,''),_0x1492ae['remove']=_0x1492ae[_0x3668('0x37')][_0x3668('0x11')](/(\S)\u000A+(\S)/g,_0x3668('0x2a'))[_0x3668('0x11')](/\u000A/g,''),''!=_0x1492ae[_0x3668('0x2e')]&&''!=_0x1492ae['remove']){_0xa0c954['push']({'type':_0x3668('0x11'),'content':_0x373532(_0x5088b0,'REPLACE_TEXT',['\x22'+_0x1492ae[_0x3668('0x37')]+'\x22','\x22'+_0x1492ae[_0x3668('0x2e')]+'\x22'])});continue;}if(null!=_0x1492ae[_0x3668('0x2e')]['match'](/^ +$/)){_0xa0c954[_0x3668('0x1d')]({'type':'insertion','content':_0x373532(_0x5088b0,_0x3668('0x48'),_0x373532(_0x5088b0,'ELEMENT_SPACE',_0x1492ae[_0x3668('0x2e')][_0x3668('0x4c')]))});continue;}if(null!=_0x1492ae['remove'][_0x3668('0x24')](/^ +$/)){_0xa0c954[_0x3668('0x1d')]({'type':'deletion','content':_0x373532(_0x5088b0,_0x3668('0x26'),_0x373532(_0x5088b0,_0x3668('0x4d'),_0x1492ae[_0x3668('0x37')][_0x3668('0x4c')]))});continue;}if(''!=_0x1492ae[_0x3668('0x2e')]){_0xa0c954[_0x3668('0x1d')]({'type':_0x3668('0x42'),'content':_0x373532(_0x5088b0,_0x3668('0x48'),'\x22'+_0x1492ae[_0x3668('0x2e')]+'\x22')});continue;}_0xa0c954[_0x3668('0x1d')]({'type':_0x3668('0x10'),'content':_0x373532(_0x5088b0,'*Remove:*\x20%0','\x22'+_0x1492ae[_0x3668('0x37')]+'\x22')});continue;case'addEmptyContainer':case _0x3668('0x2'):_0xa0c954[_0x3668('0x1d')]({'type':'insertion','content':_0x373532(_0x5088b0,_0x3668('0x48'),this[_0x3668('0x36')](_0x1492ae[_0x3668('0x3e')],_0x1492ae[_0x3668('0x17')]))});continue;case _0x3668('0x0'):case'removeObject':_0xa0c954[_0x3668('0x1d')]({'type':_0x3668('0x10'),'content':_0x373532(_0x5088b0,_0x3668('0x26'),this['getItemLabel'](_0x1492ae[_0x3668('0x3e')],_0x1492ae['quantity']))});continue;case _0x3668('0x33'):_0xa0c954['push']({'type':_0x3668('0x42'),'content':_0x373532(_0x5088b0,_0x3668('0x5'),this[_0x3668('0x36')](_0x1492ae[_0x3668('0x3e')],_0x1492ae[_0x3668('0x17')]))});continue;case _0x3668('0xe'):_0xa0c954[_0x3668('0x1d')]({'type':'deletion','content':_0x373532(_0x5088b0,_0x3668('0x2b'),this[_0x3668('0x36')](_0x1492ae[_0x3668('0x3e')],_0x1492ae[_0x3668('0x17')]))});continue;case _0x3668('0x12'):_0x1b09c7[_0x3668('0x1d')](_0x1492ae['key']);continue;case _0x3668('0x1b'):_0x8ec6ed['push'](_0x1492ae[_0x3668('0x34')]);continue;default:_0xa0c954[_0x3668('0x1d')](_0x1492ae);}if(_0x1b09c7[_0x3668('0x4c')]){const _0x43f39d=_0x1b09c7[_0x3668('0x1f')](_0x26a69a=>this['_attributeLabels']['has'](_0x26a69a)?this[_0x3668('0x1e')][_0x3668('0x19')](_0x26a69a):_0x26a69a)[_0x3668('0x15')](',\x20');_0xa0c954[_0x3668('0x1d')]({'type':'format','content':_0x373532(this[_0x3668('0x18')],'*Set\x20format:*\x20%0',_0x43f39d)});}if(_0x8ec6ed[_0x3668('0x4c')]){const _0x310a76=_0x8ec6ed['map'](_0x575210=>this[_0x3668('0x1e')][_0x3668('0x27')](_0x575210)?this[_0x3668('0x1e')][_0x3668('0x19')](_0x575210):_0x575210)['join'](',\x20');_0xa0c954[_0x3668('0x1d')]({'type':'format','content':_0x373532(this['_locale'],_0x3668('0x4a'),_0x310a76)});}return _0xa0c954;}[_0x3668('0x2d')](_0x19c62f){for(const _0x1705f8 of this[_0x3668('0x44')]){const _0x5e6ce5=_0x1705f8(_0x19c62f);if(_0x5e6ce5&&_0x3668('0x25')in _0x5e6ce5)return _0x5e6ce5;}}[_0x3668('0x20')](_0x3166cc,_0x2279f8){const _0x3e1eb3=_0x2279f8[_0x3668('0x1')],_0x4f2064=void 0x0===_0x3e1eb3[_0x3668('0x31')]?_0x3668('0x1b'):_0x3668('0x12');_0x3166cc[_0x3668('0x1d')]({'type':_0x4f2064,'key':_0x3e1eb3[_0x3668('0x34')]});}[_0x3668('0x32')](_0x1f4051,_0x962f9){_0x1f4051['push']({'type':_0x3668('0x1c'),'content':_0x373532(this[_0x3668('0x18')],_0x3668('0x28'),this[_0x3668('0x36')](_0x962f9['getFirstRange']()['start'][_0x3668('0xc')],0x1))});}[_0x3668('0x49')](_0x4a549f,_0x4ba6f9,_0x53d521){if(this[_0x3668('0x3d')](_0x4a549f,_0x4ba6f9),_0x53d521&&_0x53d521[_0x3668('0x39')]()&&!_0x4ba6f9[_0x3668('0x39')]()[_0x3668('0x21')][_0x3668('0x13')](_0x53d521[_0x3668('0x39')]()[_0x3668('0x41')])){const _0xea433b=_0x4a549f[_0x4a549f[_0x3668('0x4c')]-0x1],_0x501b17=_0x3668('0x42')==_0x4ba6f9[_0x3668('0x25')]?_0x3668('0x2e'):_0x3668('0x37');_0xea433b&&_0x3668('0x2f')==_0xea433b[_0x3668('0x25')]&&(_0xea433b[_0x501b17]+='\x0a');}}}