@ckeditor/ckeditor5-track-changes 38.1.0 → 38.1.1

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 (129) hide show
  1. package/build/track-changes.js +1 -1
  2. package/package.json +3 -3
  3. package/src/augmentation.d.ts +36 -36
  4. package/src/commands/acceptsuggestioncommand.d.ts +20 -20
  5. package/src/commands/acceptsuggestioncommand.js +1 -1
  6. package/src/commands/discardsuggestioncommand.d.ts +20 -20
  7. package/src/commands/discardsuggestioncommand.js +1 -1
  8. package/src/commands/executeonallsuggestionscommand.d.ts +20 -20
  9. package/src/commands/executeonallsuggestionscommand.js +1 -1
  10. package/src/commands/executeonselectedsuggestionscommand.d.ts +20 -20
  11. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  12. package/src/commands/trackchangescommand.d.ts +22 -22
  13. package/src/commands/trackchangescommand.js +1 -1
  14. package/src/index.d.ts +12 -12
  15. package/src/integrations/alignment.d.ts +13 -13
  16. package/src/integrations/alignment.js +1 -1
  17. package/src/integrations/basicstyles.d.ts +13 -13
  18. package/src/integrations/basicstyles.js +1 -1
  19. package/src/integrations/blockquote.d.ts +13 -13
  20. package/src/integrations/blockquote.js +1 -1
  21. package/src/integrations/ckbox.d.ts +13 -13
  22. package/src/integrations/ckbox.js +1 -1
  23. package/src/integrations/codeblock.d.ts +13 -13
  24. package/src/integrations/codeblock.js +1 -1
  25. package/src/integrations/comments.d.ts +10 -10
  26. package/src/integrations/comments.js +1 -1
  27. package/src/integrations/deletecommand.d.ts +13 -13
  28. package/src/integrations/deletecommand.js +1 -1
  29. package/src/integrations/documentlist.d.ts +13 -13
  30. package/src/integrations/documentlist.js +1 -1
  31. package/src/integrations/documentlistproperties.d.ts +25 -25
  32. package/src/integrations/documentlistproperties.js +1 -1
  33. package/src/integrations/entercommand.d.ts +12 -12
  34. package/src/integrations/entercommand.js +1 -1
  35. package/src/integrations/findandreplace.d.ts +17 -17
  36. package/src/integrations/findandreplace.js +1 -1
  37. package/src/integrations/font.d.ts +13 -13
  38. package/src/integrations/font.js +1 -1
  39. package/src/integrations/formatpainter.d.ts +13 -13
  40. package/src/integrations/formatpainter.js +1 -1
  41. package/src/integrations/heading.d.ts +13 -13
  42. package/src/integrations/heading.js +1 -1
  43. package/src/integrations/highlight.d.ts +13 -13
  44. package/src/integrations/highlight.js +1 -1
  45. package/src/integrations/horizontalline.d.ts +13 -13
  46. package/src/integrations/horizontalline.js +1 -1
  47. package/src/integrations/htmlembed.d.ts +13 -13
  48. package/src/integrations/htmlembed.js +1 -1
  49. package/src/integrations/image.d.ts +13 -13
  50. package/src/integrations/image.js +1 -1
  51. package/src/integrations/imagereplace.d.ts +19 -19
  52. package/src/integrations/imagereplace.js +1 -1
  53. package/src/integrations/importword.d.ts +14 -14
  54. package/src/integrations/importword.js +1 -1
  55. package/src/integrations/indent.d.ts +13 -13
  56. package/src/integrations/indent.js +1 -1
  57. package/src/integrations/inputcommand.d.ts +12 -12
  58. package/src/integrations/inputcommand.js +1 -1
  59. package/src/integrations/link.d.ts +13 -13
  60. package/src/integrations/link.js +1 -1
  61. package/src/integrations/list.d.ts +13 -13
  62. package/src/integrations/list.js +1 -1
  63. package/src/integrations/listproperties.d.ts +25 -25
  64. package/src/integrations/listproperties.js +1 -1
  65. package/src/integrations/mediaembed.d.ts +13 -13
  66. package/src/integrations/mediaembed.js +1 -1
  67. package/src/integrations/mention.d.ts +13 -13
  68. package/src/integrations/mention.js +1 -1
  69. package/src/integrations/pagebreak.d.ts +13 -13
  70. package/src/integrations/pagebreak.js +1 -1
  71. package/src/integrations/paragraph.d.ts +13 -13
  72. package/src/integrations/paragraph.js +1 -1
  73. package/src/integrations/removeformat.d.ts +13 -13
  74. package/src/integrations/removeformat.js +1 -1
  75. package/src/integrations/restrictededitingmode.d.ts +13 -13
  76. package/src/integrations/restrictededitingmode.js +1 -1
  77. package/src/integrations/shiftentercommand.d.ts +12 -12
  78. package/src/integrations/shiftentercommand.js +1 -1
  79. package/src/integrations/standardeditingmode.d.ts +13 -13
  80. package/src/integrations/standardeditingmode.js +1 -1
  81. package/src/integrations/style.d.ts +14 -14
  82. package/src/integrations/style.js +1 -1
  83. package/src/integrations/table.d.ts +38 -38
  84. package/src/integrations/table.js +1 -1
  85. package/src/integrations/tablecaption.d.ts +18 -18
  86. package/src/integrations/tablecaption.js +1 -1
  87. package/src/integrations/tableclipboard.d.ts +18 -18
  88. package/src/integrations/tableclipboard.js +1 -1
  89. package/src/integrations/tablecolumnresize.d.ts +22 -22
  90. package/src/integrations/tablecolumnresize.js +1 -1
  91. package/src/integrations/tableheadings.d.ts +18 -18
  92. package/src/integrations/tableheadings.js +1 -1
  93. package/src/integrations/tablemergesplit.d.ts +18 -18
  94. package/src/integrations/tablemergesplit.js +1 -1
  95. package/src/integrations/tableofcontents.d.ts +13 -13
  96. package/src/integrations/tableofcontents.js +1 -1
  97. package/src/integrations/tableproperties.d.ts +23 -23
  98. package/src/integrations/tableproperties.js +1 -1
  99. package/src/integrations/template.d.ts +13 -13
  100. package/src/integrations/template.js +1 -1
  101. package/src/integrations/title.d.ts +13 -13
  102. package/src/integrations/title.js +1 -1
  103. package/src/integrations/undo.d.ts +13 -13
  104. package/src/integrations/undo.js +1 -1
  105. package/src/integrations/utils.d.ts +17 -17
  106. package/src/integrations/utils.js +1 -1
  107. package/src/suggestion.d.ts +266 -266
  108. package/src/suggestion.js +1 -1
  109. package/src/suggestiondescriptionfactory.d.ts +151 -151
  110. package/src/suggestiondescriptionfactory.js +1 -1
  111. package/src/trackchanges.d.ts +240 -240
  112. package/src/trackchanges.js +1 -1
  113. package/src/trackchangesconfig.d.ts +71 -71
  114. package/src/trackchangesdata.d.ts +37 -37
  115. package/src/trackchangesdata.js +1 -1
  116. package/src/trackchangesediting.d.ts +435 -435
  117. package/src/trackchangesediting.js +1 -1
  118. package/src/trackchangesui.d.ts +34 -34
  119. package/src/trackchangesui.js +1 -1
  120. package/src/ui/suggestioncontroller.d.ts +36 -36
  121. package/src/ui/suggestioncontroller.js +1 -1
  122. package/src/ui/view/basesuggestionthreadview.d.ts +166 -166
  123. package/src/ui/view/basesuggestionthreadview.js +1 -1
  124. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  125. package/src/ui/view/suggestionthreadview.js +1 -1
  126. package/src/utils/common-translations.d.ts +5 -5
  127. package/src/utils/common-translations.js +1 -1
  128. package/src/utils/utils.d.ts +26 -26
  129. package/src/utils/utils.js +1 -1
@@ -1,151 +1,151 @@
1
- /**
2
- * @module track-changes/suggestiondescriptionfactory
3
- * @publicApi
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
- }
1
+ /**
2
+ * @module track-changes/suggestiondescriptionfactory
3
+ * @publicApi
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
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2b68=['getWalker','isEqual','$textProxy','type','element','_customCallbacks','set','length','item','*Insert:*\x20%0','_itemLabelsCallbacks','_itemLabels','$text','softBreak','Container','pop','indexOf','elementEnd','EmptyContainer','match','removeEmptyContainer','quantity','getItemLabel','*Split:*\x20%0','nextSibling','_locale','isEmpty','removeContainer','deletion','*Remove:*\x20%0','_resolveDescriptionItems','previousSibling','registerElementLabel','remove','replace','addObject','isInContent','_schema','Object','label','push','add','getFirstRange','*Merge:*\x20%0','data','isObject','start','matchingCallback','addContainer','_addDescriptionItems','$1\x20$2','name','REPLACE_TEXT','text','insertion'];(function(_0x495793,_0x2b6802){const _0xb9987e=function(_0x43be8b){while(--_0x43be8b){_0x495793['push'](_0x495793['shift']());}};_0xb9987e(++_0x2b6802);}(_0x2b68,0x198));const _0xb998=function(_0x495793,_0x2b6802){_0x495793=_0x495793-0x0;let _0xb9987e=_0x2b68[_0x495793];return _0xb9987e;};import{getTranslation as _0x17b8df}from'./utils/common-translations';import{priorities as _0x425242,insertToPriorityArray as _0x1cc2af}from'ckeditor5/src/utils';export default class m{constructor(_0x2929c3,_0x48ba06){this[_0xb998('0x25')]=[],this[_0xb998('0x2b')]=new Map(),this[_0xb998('0x2a')]=[],this[_0xb998('0xe')]=_0x2929c3,this['_locale']=_0x48ba06;}['getDescriptions'](_0x2a4606){const _0x4aa8c0=[];for(let _0x48a8cc=0x0;_0x48a8cc<_0x2a4606[_0xb998('0x27')];_0x48a8cc++){const _0x1a48e3=_0x2a4606[_0x48a8cc];if(!_0x1a48e3[_0xb998('0xd')])continue;let _0x36bd5c=!0x1;for(const _0xba74c9 of this['_customCallbacks']){const _0x933817=_0xba74c9(_0x1a48e3);if(_0x933817){_0xb998('0x23')in _0x933817&&_0x4aa8c0[_0xb998('0x11')](_0x933817),_0x36bd5c=!0x0;break;}}if(!_0x36bd5c){this[_0xb998('0x1a')](_0x4aa8c0,_0x1a48e3);const _0x22f82c=_0x2a4606[_0x48a8cc+0x1];if(_0x22f82c&&!_0x1a48e3[_0xb998('0x13')]()['end'][_0xb998('0x21')](_0x22f82c['getFirstRange']()[_0xb998('0x17')])){const _0x49bd14=_0x4aa8c0[_0x4aa8c0[_0xb998('0x27')]-0x1],_0x53c11c=_0xb998('0x1f')==_0x1a48e3[_0xb998('0x23')]?'add':_0xb998('0xa');_0x49bd14&&'text'==_0x49bd14['type']&&(_0x49bd14[_0x53c11c]+='\x0a');}}}return this[_0xb998('0x7')](_0x4aa8c0);}['registerDescriptionCallback'](_0x3c5c89){this[_0xb998('0x25')]['push'](_0x3c5c89);}[_0xb998('0x9')](_0x3480c2,_0xa66cf1,_0x47544d=_0x425242['normal']){'function'==typeof _0x3480c2?_0x1cc2af(this[_0xb998('0x2a')],{'matchingCallback':_0x3480c2,'label':_0xa66cf1,'priority':_0x47544d}):this[_0xb998('0x2b')][_0xb998('0x26')](_0x3480c2,_0xa66cf1);}[_0xb998('0x36')](_0x36f62e,_0x29a86f=0x1){let _0x32a6f8;for(const _0x335223 of this[_0xb998('0x2a')])if(_0x335223[_0xb998('0x18')](_0x36f62e)){_0x32a6f8=_0x335223[_0xb998('0x10')];break;}return _0x32a6f8||(_0x32a6f8=this[_0xb998('0x2b')]['get'](_0x36f62e[_0xb998('0x1c')])),_0x32a6f8?_0x32a6f8(_0x29a86f):0x1!==_0x29a86f?_0x29a86f+'\x20'+_0x36f62e['name']+'s':''+_0x36f62e[_0xb998('0x1c')];}[_0xb998('0x1a')](_0x4072a0,_0x4ac3fe){const _0x3d3567=_0x4ac3fe[_0xb998('0x13')]()[_0xb998('0x20')](),_0x1ba207=_0xb998('0x1f')==_0x4ac3fe['type']?_0xb998('0x12'):_0xb998('0xa');for(const _0x56671d of _0x3d3567){const _0x589414=_0x56671d[_0xb998('0x28')],_0x4b8f24=_0x4072a0[_0x4072a0['length']-0x1];if(_0x589414['is'](_0xb998('0x22')))_0x4b8f24&&_0x4b8f24['type'][_0xb998('0x30')](_0xb998('0x2e'))>-0x1&&_0x4072a0[_0xb998('0x2f')](),_0x4b8f24&&'text'==_0x4b8f24['type']?_0x4b8f24[_0x1ba207]+=_0x589414['data']:_0x4072a0[_0xb998('0x11')]({'type':_0xb998('0x1e'),'add':'add'==_0x1ba207?_0x589414['data']:'','remove':'remove'==_0x1ba207?_0x589414[_0xb998('0x15')]:''});else{if(this[_0xb998('0xe')][_0xb998('0x16')](_0x589414)){const _0xb4cfb3=_0x589414;if(_0x4b8f24&&_0x4b8f24[_0xb998('0x23')][_0xb998('0x30')](_0xb998('0x2e'))>-0x1&&_0x4072a0[_0xb998('0x2f')](),_0xb998('0x31')==_0x56671d['type'])continue;_0x4b8f24&&_0x4b8f24['type']==_0x1ba207+_0xb998('0xf')&&_0x4b8f24[_0xb998('0x24')]['name']==_0xb4cfb3[_0xb998('0x1c')]?_0x4b8f24['quantity']++:_0x4072a0[_0xb998('0x11')]({'type':_0x1ba207+_0xb998('0xf'),'element':_0xb4cfb3,'quantity':0x1}),_0x3d3567['skip'](_0x343128=>!(_0xb998('0x31')==_0x343128['type']&&_0x343128[_0xb998('0x28')]==_0x589414));}else{if(this[_0xb998('0xe')]['checkChild'](_0x589414,_0xb998('0x2c'))||_0x589414['is'](_0xb998('0x24'),_0xb998('0x2d'))){const _0x59270c=_0x589414;if('add'==_0x1ba207&&'elementStart'==_0x56671d[_0xb998('0x23')]||_0xb998('0xa')==_0x1ba207&&_0xb998('0x31')==_0x56671d[_0xb998('0x23')])continue;if(_0x4b8f24&&-0x1==_0x4b8f24['type'][_0xb998('0x30')](_0xb998('0x2e'))){_0xb998('0x1e')==_0x4b8f24[_0xb998('0x23')]&&(_0x4b8f24[_0x1ba207]+='\x0a');continue;}let _0xf59867;if(_0xf59867=_0xb998('0x12')==_0x1ba207?_0x59270c[_0xb998('0x1')]&&!this[_0xb998('0xe')]['isObject'](_0x59270c[_0xb998('0x1')])?_0x59270c['nextSibling']:null:_0x59270c['previousSibling']&&!this[_0xb998('0xe')][_0xb998('0x16')](_0x59270c[_0xb998('0x8')])?_0x59270c[_0xb998('0x8')]:null,_0x59270c[_0xb998('0x3')]||_0xf59867&&_0xf59867[_0xb998('0x3')]){const _0x55d639=_0xf59867&&_0xf59867[_0xb998('0x3')]?_0xf59867:_0x59270c;_0x4b8f24&&_0x4b8f24[_0xb998('0x23')]==_0x1ba207+'EmptyContainer'&&_0x4b8f24['element'][_0xb998('0x1c')]==_0x55d639['name']?_0x4b8f24[_0xb998('0x35')]++:_0x4072a0[_0xb998('0x11')]({'type':_0x1ba207+_0xb998('0x32'),'element':_0x55d639,'quantity':0x1});}else _0x4072a0[_0xb998('0x11')]({'type':_0x1ba207+'Container','element':_0x59270c});}}}}}[_0xb998('0x7')](_0x27c030){const _0xbb7075=this[_0xb998('0x2')],_0x4dafc8=[];for(const _0x5dfcf2 of _0x27c030){switch(_0x5dfcf2['type']){case'text':if(_0x5dfcf2['add']=_0x5dfcf2[_0xb998('0x12')]['replace'](/(\S)\u000A+(\S)/g,_0xb998('0x1b'))[_0xb998('0xb')](/\u000A/g,''),_0x5dfcf2[_0xb998('0xa')]=_0x5dfcf2[_0xb998('0xa')]['replace'](/(\S)\u000A+(\S)/g,'$1\x20$2')[_0xb998('0xb')](/\u000A/g,''),''!=_0x5dfcf2[_0xb998('0x12')]&&''!=_0x5dfcf2[_0xb998('0xa')]){_0x4dafc8[_0xb998('0x11')]({'type':_0xb998('0xb'),'content':_0x17b8df(_0xbb7075,_0xb998('0x1d'),['\x22'+_0x5dfcf2[_0xb998('0xa')]+'\x22','\x22'+_0x5dfcf2[_0xb998('0x12')]+'\x22'])});continue;}if(null!=_0x5dfcf2['add']['match'](/^ +$/)){_0x4dafc8[_0xb998('0x11')]({'type':_0xb998('0x1f'),'content':_0x17b8df(_0xbb7075,_0xb998('0x29'),_0x17b8df(_0xbb7075,'ELEMENT_SPACE',_0x5dfcf2[_0xb998('0x12')][_0xb998('0x27')]))});continue;}if(null!=_0x5dfcf2['remove'][_0xb998('0x33')](/^ +$/)){_0x4dafc8[_0xb998('0x11')]({'type':'deletion','content':_0x17b8df(_0xbb7075,_0xb998('0x6'),_0x17b8df(_0xbb7075,'ELEMENT_SPACE',_0x5dfcf2[_0xb998('0xa')][_0xb998('0x27')]))});continue;}if(''!=_0x5dfcf2[_0xb998('0x12')]){_0x4dafc8['push']({'type':_0xb998('0x1f'),'content':_0x17b8df(_0xbb7075,_0xb998('0x29'),'\x22'+_0x5dfcf2[_0xb998('0x12')]+'\x22')});continue;}_0x4dafc8[_0xb998('0x11')]({'type':_0xb998('0x5'),'content':_0x17b8df(_0xbb7075,_0xb998('0x6'),'\x22'+_0x5dfcf2['remove']+'\x22')});continue;case'addEmptyContainer':case _0xb998('0xc'):_0x4dafc8[_0xb998('0x11')]({'type':'insertion','content':_0x17b8df(_0xbb7075,_0xb998('0x29'),this[_0xb998('0x36')](_0x5dfcf2['element'],_0x5dfcf2['quantity']))});continue;case _0xb998('0x34'):case'removeObject':_0x4dafc8[_0xb998('0x11')]({'type':_0xb998('0x5'),'content':_0x17b8df(_0xbb7075,_0xb998('0x6'),this[_0xb998('0x36')](_0x5dfcf2[_0xb998('0x24')],_0x5dfcf2[_0xb998('0x35')]))});continue;case _0xb998('0x19'):_0x4dafc8[_0xb998('0x11')]({'type':'insertion','content':_0x17b8df(_0xbb7075,_0xb998('0x0'),this[_0xb998('0x36')](_0x5dfcf2[_0xb998('0x24')],_0x5dfcf2[_0xb998('0x35')]))});continue;case _0xb998('0x4'):_0x4dafc8['push']({'type':_0xb998('0x5'),'content':_0x17b8df(_0xbb7075,_0xb998('0x14'),this[_0xb998('0x36')](_0x5dfcf2['element'],_0x5dfcf2[_0xb998('0x35')]))});continue;}_0x4dafc8[_0xb998('0x11')](_0x5dfcf2);}return _0x4dafc8;}}
23
+ const _0x5540=['getDescriptions','ELEMENT_SPACE','*Split:*\x20%0','getFirstRange','_customCallbacks','add','function','isObject','isInContent','name','set','_locale','EmptyContainer','softBreak','_resolveDescriptionItems','addContainer','_itemLabels','removeContainer','getWalker','_itemLabelsCallbacks','getItemLabel','indexOf','normal','$text','isEqual','type','elementEnd','_addDescriptionItems','addObject','*Merge:*\x20%0','REPLACE_TEXT','nextSibling','insertion','data','replace','*Remove:*\x20%0','text','$textProxy','pop','$1\x20$2','item','match','get','element','matchingCallback','deletion','skip','label','isEmpty','Container','quantity','remove','previousSibling','registerDescriptionCallback','addEmptyContainer','_schema','length','*Insert:*\x20%0','start','end','Object','push'];(function(_0x39763f,_0x554074){const _0x1adb38=function(_0x2f9367){while(--_0x2f9367){_0x39763f['push'](_0x39763f['shift']());}};_0x1adb38(++_0x554074);}(_0x5540,0x155));const _0x1adb=function(_0x39763f,_0x554074){_0x39763f=_0x39763f-0x0;let _0x1adb38=_0x5540[_0x39763f];return _0x1adb38;};import{getTranslation as _0x262fa7}from'./utils/common-translations';import{priorities as _0x2248b2,insertToPriorityArray as _0x130d79}from'ckeditor5/src/utils';export default class m{constructor(_0x4fdd42,_0x1329dd){this['_customCallbacks']=[],this[_0x1adb('0x2f')]=new Map(),this[_0x1adb('0x32')]=[],this[_0x1adb('0x18')]=_0x4fdd42,this[_0x1adb('0x2a')]=_0x1329dd;}[_0x1adb('0x1f')](_0x58dfae){const _0x1a1513=[];for(let _0x246473=0x0;_0x246473<_0x58dfae[_0x1adb('0x19')];_0x246473++){const _0x22b92e=_0x58dfae[_0x246473];if(!_0x22b92e[_0x1adb('0x27')])continue;let _0x1c7f49=!0x1;for(const _0x3b2be4 of this[_0x1adb('0x23')]){const _0x329d16=_0x3b2be4(_0x22b92e);if(_0x329d16){_0x1adb('0x38')in _0x329d16&&_0x1a1513[_0x1adb('0x1e')](_0x329d16),_0x1c7f49=!0x0;break;}}if(!_0x1c7f49){this['_addDescriptionItems'](_0x1a1513,_0x22b92e);const _0x57d2b9=_0x58dfae[_0x246473+0x1];if(_0x57d2b9&&!_0x22b92e['getFirstRange']()[_0x1adb('0x1c')][_0x1adb('0x37')](_0x57d2b9[_0x1adb('0x22')]()[_0x1adb('0x1b')])){const _0x4e6326=_0x1a1513[_0x1a1513[_0x1adb('0x19')]-0x1],_0x364759=_0x1adb('0x1')==_0x22b92e[_0x1adb('0x38')]?'add':_0x1adb('0x14');_0x4e6326&&_0x1adb('0x5')==_0x4e6326[_0x1adb('0x38')]&&(_0x4e6326[_0x364759]+='\x0a');}}}return this[_0x1adb('0x2d')](_0x1a1513);}[_0x1adb('0x16')](_0x141291){this['_customCallbacks'][_0x1adb('0x1e')](_0x141291);}['registerElementLabel'](_0x3b3aed,_0x101840,_0x1e820a=_0x2248b2[_0x1adb('0x35')]){_0x1adb('0x25')==typeof _0x3b3aed?_0x130d79(this['_itemLabelsCallbacks'],{'matchingCallback':_0x3b3aed,'label':_0x101840,'priority':_0x1e820a}):this['_itemLabels'][_0x1adb('0x29')](_0x3b3aed,_0x101840);}[_0x1adb('0x33')](_0x13147e,_0x53b3c6=0x1){let _0x3bd561;for(const _0x320ef1 of this['_itemLabelsCallbacks'])if(_0x320ef1[_0x1adb('0xd')](_0x13147e)){_0x3bd561=_0x320ef1[_0x1adb('0x10')];break;}return _0x3bd561||(_0x3bd561=this[_0x1adb('0x2f')][_0x1adb('0xb')](_0x13147e[_0x1adb('0x28')])),_0x3bd561?_0x3bd561(_0x53b3c6):0x1!==_0x53b3c6?_0x53b3c6+'\x20'+_0x13147e[_0x1adb('0x28')]+'s':''+_0x13147e['name'];}[_0x1adb('0x3a')](_0x36aa18,_0x1e2883){const _0x190e66=_0x1e2883[_0x1adb('0x22')]()[_0x1adb('0x31')](),_0x5c3088=_0x1adb('0x1')==_0x1e2883[_0x1adb('0x38')]?_0x1adb('0x24'):_0x1adb('0x14');for(const _0x2e06bb of _0x190e66){const _0x36b456=_0x2e06bb['item'],_0x393933=_0x36aa18[_0x36aa18[_0x1adb('0x19')]-0x1];if(_0x36b456['is'](_0x1adb('0x6')))_0x393933&&_0x393933[_0x1adb('0x38')][_0x1adb('0x34')](_0x1adb('0x12'))>-0x1&&_0x36aa18['pop'](),_0x393933&&_0x1adb('0x5')==_0x393933['type']?_0x393933[_0x5c3088]+=_0x36b456[_0x1adb('0x2')]:_0x36aa18['push']({'type':_0x1adb('0x5'),'add':_0x1adb('0x24')==_0x5c3088?_0x36b456['data']:'','remove':_0x1adb('0x14')==_0x5c3088?_0x36b456[_0x1adb('0x2')]:''});else{if(this['_schema'][_0x1adb('0x26')](_0x36b456)){const _0xe4435b=_0x36b456;if(_0x393933&&_0x393933['type'][_0x1adb('0x34')](_0x1adb('0x12'))>-0x1&&_0x36aa18[_0x1adb('0x7')](),_0x1adb('0x39')==_0x2e06bb['type'])continue;_0x393933&&_0x393933[_0x1adb('0x38')]==_0x5c3088+'Object'&&_0x393933['element'][_0x1adb('0x28')]==_0xe4435b[_0x1adb('0x28')]?_0x393933[_0x1adb('0x13')]++:_0x36aa18['push']({'type':_0x5c3088+_0x1adb('0x1d'),'element':_0xe4435b,'quantity':0x1}),_0x190e66[_0x1adb('0xf')](_0x313779=>!(_0x1adb('0x39')==_0x313779[_0x1adb('0x38')]&&_0x313779[_0x1adb('0x9')]==_0x36b456));}else{if(this[_0x1adb('0x18')]['checkChild'](_0x36b456,_0x1adb('0x36'))||_0x36b456['is'](_0x1adb('0xc'),_0x1adb('0x2c'))){const _0x2de86c=_0x36b456;if('add'==_0x5c3088&&'elementStart'==_0x2e06bb[_0x1adb('0x38')]||_0x1adb('0x14')==_0x5c3088&&_0x1adb('0x39')==_0x2e06bb[_0x1adb('0x38')])continue;if(_0x393933&&-0x1==_0x393933[_0x1adb('0x38')][_0x1adb('0x34')](_0x1adb('0x12'))){'text'==_0x393933[_0x1adb('0x38')]&&(_0x393933[_0x5c3088]+='\x0a');continue;}let _0x487c50;if(_0x487c50=_0x1adb('0x24')==_0x5c3088?_0x2de86c[_0x1adb('0x0')]&&!this[_0x1adb('0x18')][_0x1adb('0x26')](_0x2de86c[_0x1adb('0x0')])?_0x2de86c[_0x1adb('0x0')]:null:_0x2de86c['previousSibling']&&!this[_0x1adb('0x18')][_0x1adb('0x26')](_0x2de86c['previousSibling'])?_0x2de86c[_0x1adb('0x15')]:null,_0x2de86c['isEmpty']||_0x487c50&&_0x487c50[_0x1adb('0x11')]){const _0x5f165e=_0x487c50&&_0x487c50[_0x1adb('0x11')]?_0x487c50:_0x2de86c;_0x393933&&_0x393933[_0x1adb('0x38')]==_0x5c3088+_0x1adb('0x2b')&&_0x393933[_0x1adb('0xc')][_0x1adb('0x28')]==_0x5f165e['name']?_0x393933[_0x1adb('0x13')]++:_0x36aa18[_0x1adb('0x1e')]({'type':_0x5c3088+_0x1adb('0x2b'),'element':_0x5f165e,'quantity':0x1});}else _0x36aa18['push']({'type':_0x5c3088+_0x1adb('0x12'),'element':_0x2de86c});}}}}}[_0x1adb('0x2d')](_0x260f09){const _0x12ceab=this['_locale'],_0x49b323=[];for(const _0x4524ae of _0x260f09){switch(_0x4524ae[_0x1adb('0x38')]){case'text':if(_0x4524ae[_0x1adb('0x24')]=_0x4524ae[_0x1adb('0x24')][_0x1adb('0x3')](/(\S)\u000A+(\S)/g,'$1\x20$2')['replace'](/\u000A/g,''),_0x4524ae[_0x1adb('0x14')]=_0x4524ae[_0x1adb('0x14')]['replace'](/(\S)\u000A+(\S)/g,_0x1adb('0x8'))[_0x1adb('0x3')](/\u000A/g,''),''!=_0x4524ae[_0x1adb('0x24')]&&''!=_0x4524ae[_0x1adb('0x14')]){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x3'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x3d'),['\x22'+_0x4524ae[_0x1adb('0x14')]+'\x22','\x22'+_0x4524ae[_0x1adb('0x24')]+'\x22'])});continue;}if(null!=_0x4524ae[_0x1adb('0x24')][_0x1adb('0xa')](/^ +$/)){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x1a'),_0x262fa7(_0x12ceab,_0x1adb('0x20'),_0x4524ae[_0x1adb('0x24')][_0x1adb('0x19')]))});continue;}if(null!=_0x4524ae[_0x1adb('0x14')][_0x1adb('0xa')](/^ +$/)){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,'*Remove:*\x20%0',_0x262fa7(_0x12ceab,_0x1adb('0x20'),_0x4524ae[_0x1adb('0x14')][_0x1adb('0x19')]))});continue;}if(''!=_0x4524ae[_0x1adb('0x24')]){_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x1a'),'\x22'+_0x4524ae['add']+'\x22')});continue;}_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x4'),'\x22'+_0x4524ae['remove']+'\x22')});continue;case _0x1adb('0x17'):case _0x1adb('0x3b'):_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,'*Insert:*\x20%0',this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case'removeEmptyContainer':case'removeObject':_0x49b323[_0x1adb('0x1e')]({'type':'deletion','content':_0x262fa7(_0x12ceab,_0x1adb('0x4'),this['getItemLabel'](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case _0x1adb('0x2e'):_0x49b323[_0x1adb('0x1e')]({'type':_0x1adb('0x1'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x21'),this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;case _0x1adb('0x30'):_0x49b323['push']({'type':_0x1adb('0xe'),'content':_0x262fa7(_0x12ceab,_0x1adb('0x3c'),this[_0x1adb('0x33')](_0x4524ae[_0x1adb('0xc')],_0x4524ae[_0x1adb('0x13')]))});continue;}_0x49b323[_0x1adb('0x1e')](_0x4524ae);}return _0x49b323;}}