@ckeditor/ckeditor5-track-changes 38.1.1 → 38.2.0-alpha.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 (130) hide show
  1. package/build/track-changes.js +2 -2
  2. package/package.json +4 -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/index.js +1 -1
  16. package/src/integrations/alignment.d.ts +13 -13
  17. package/src/integrations/alignment.js +1 -1
  18. package/src/integrations/basicstyles.d.ts +13 -13
  19. package/src/integrations/basicstyles.js +1 -1
  20. package/src/integrations/blockquote.d.ts +13 -13
  21. package/src/integrations/blockquote.js +1 -1
  22. package/src/integrations/ckbox.d.ts +13 -13
  23. package/src/integrations/ckbox.js +1 -1
  24. package/src/integrations/codeblock.d.ts +13 -13
  25. package/src/integrations/codeblock.js +1 -1
  26. package/src/integrations/comments.d.ts +10 -10
  27. package/src/integrations/comments.js +1 -1
  28. package/src/integrations/deletecommand.d.ts +13 -13
  29. package/src/integrations/deletecommand.js +1 -1
  30. package/src/integrations/documentlist.d.ts +13 -13
  31. package/src/integrations/documentlist.js +1 -1
  32. package/src/integrations/documentlistproperties.d.ts +25 -25
  33. package/src/integrations/documentlistproperties.js +1 -1
  34. package/src/integrations/entercommand.d.ts +12 -12
  35. package/src/integrations/entercommand.js +1 -1
  36. package/src/integrations/findandreplace.d.ts +17 -17
  37. package/src/integrations/findandreplace.js +1 -1
  38. package/src/integrations/font.d.ts +13 -13
  39. package/src/integrations/font.js +1 -1
  40. package/src/integrations/formatpainter.d.ts +13 -13
  41. package/src/integrations/formatpainter.js +1 -1
  42. package/src/integrations/heading.d.ts +13 -13
  43. package/src/integrations/heading.js +1 -1
  44. package/src/integrations/highlight.d.ts +13 -13
  45. package/src/integrations/highlight.js +1 -1
  46. package/src/integrations/horizontalline.d.ts +13 -13
  47. package/src/integrations/horizontalline.js +1 -1
  48. package/src/integrations/htmlembed.d.ts +13 -13
  49. package/src/integrations/htmlembed.js +1 -1
  50. package/src/integrations/image.d.ts +13 -13
  51. package/src/integrations/image.js +1 -1
  52. package/src/integrations/imagereplace.d.ts +19 -19
  53. package/src/integrations/imagereplace.js +1 -1
  54. package/src/integrations/importword.d.ts +14 -14
  55. package/src/integrations/importword.js +1 -1
  56. package/src/integrations/indent.d.ts +13 -13
  57. package/src/integrations/indent.js +1 -1
  58. package/src/integrations/inputcommand.d.ts +12 -12
  59. package/src/integrations/inputcommand.js +1 -1
  60. package/src/integrations/link.d.ts +13 -13
  61. package/src/integrations/link.js +1 -1
  62. package/src/integrations/list.d.ts +13 -13
  63. package/src/integrations/list.js +1 -1
  64. package/src/integrations/listproperties.d.ts +25 -25
  65. package/src/integrations/listproperties.js +1 -1
  66. package/src/integrations/mediaembed.d.ts +13 -13
  67. package/src/integrations/mediaembed.js +1 -1
  68. package/src/integrations/mention.d.ts +13 -13
  69. package/src/integrations/mention.js +1 -1
  70. package/src/integrations/pagebreak.d.ts +13 -13
  71. package/src/integrations/pagebreak.js +1 -1
  72. package/src/integrations/paragraph.d.ts +13 -13
  73. package/src/integrations/paragraph.js +1 -1
  74. package/src/integrations/removeformat.d.ts +13 -13
  75. package/src/integrations/removeformat.js +1 -1
  76. package/src/integrations/restrictededitingmode.d.ts +13 -13
  77. package/src/integrations/restrictededitingmode.js +1 -1
  78. package/src/integrations/shiftentercommand.d.ts +12 -12
  79. package/src/integrations/shiftentercommand.js +1 -1
  80. package/src/integrations/standardeditingmode.d.ts +13 -13
  81. package/src/integrations/standardeditingmode.js +1 -1
  82. package/src/integrations/style.d.ts +14 -14
  83. package/src/integrations/style.js +1 -1
  84. package/src/integrations/table.d.ts +38 -38
  85. package/src/integrations/table.js +1 -1
  86. package/src/integrations/tablecaption.d.ts +18 -18
  87. package/src/integrations/tablecaption.js +1 -1
  88. package/src/integrations/tableclipboard.d.ts +18 -18
  89. package/src/integrations/tableclipboard.js +1 -1
  90. package/src/integrations/tablecolumnresize.d.ts +22 -22
  91. package/src/integrations/tablecolumnresize.js +1 -1
  92. package/src/integrations/tableheadings.d.ts +18 -18
  93. package/src/integrations/tableheadings.js +1 -1
  94. package/src/integrations/tablemergesplit.d.ts +18 -18
  95. package/src/integrations/tablemergesplit.js +1 -1
  96. package/src/integrations/tableofcontents.d.ts +13 -13
  97. package/src/integrations/tableofcontents.js +1 -1
  98. package/src/integrations/tableproperties.d.ts +23 -23
  99. package/src/integrations/tableproperties.js +1 -1
  100. package/src/integrations/template.d.ts +13 -13
  101. package/src/integrations/template.js +1 -1
  102. package/src/integrations/title.d.ts +13 -13
  103. package/src/integrations/title.js +1 -1
  104. package/src/integrations/undo.d.ts +13 -13
  105. package/src/integrations/undo.js +1 -1
  106. package/src/integrations/utils.d.ts +17 -17
  107. package/src/integrations/utils.js +1 -1
  108. package/src/suggestion.d.ts +266 -266
  109. package/src/suggestion.js +1 -1
  110. package/src/suggestiondescriptionfactory.d.ts +163 -151
  111. package/src/suggestiondescriptionfactory.js +1 -1
  112. package/src/trackchanges.d.ts +240 -240
  113. package/src/trackchanges.js +1 -1
  114. package/src/trackchangesconfig.d.ts +71 -71
  115. package/src/trackchangesdata.d.ts +37 -37
  116. package/src/trackchangesdata.js +1 -1
  117. package/src/trackchangesediting.d.ts +435 -435
  118. package/src/trackchangesediting.js +1 -1
  119. package/src/trackchangesui.d.ts +34 -34
  120. package/src/trackchangesui.js +1 -1
  121. package/src/ui/suggestioncontroller.d.ts +36 -36
  122. package/src/ui/suggestioncontroller.js +1 -1
  123. package/src/ui/view/basesuggestionthreadview.d.ts +166 -166
  124. package/src/ui/view/basesuggestionthreadview.js +1 -1
  125. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  126. package/src/ui/view/suggestionthreadview.js +1 -1
  127. package/src/utils/common-translations.d.ts +5 -5
  128. package/src/utils/common-translations.js +1 -1
  129. package/src/utils/utils.d.ts +26 -26
  130. package/src/utils/utils.js +1 -1
@@ -1,151 +1,163 @@
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.js';
6
+ import type { Schema, Element } from 'ckeditor5/src/engine.js';
7
+ import type Suggestion from './suggestion.js';
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 _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;}}
23
+ const _0x2029=['isObject','push','matchingCallback','softBreak','isEmpty','quantity','ELEMENT_SPACE','end','element','elementStart','name','Container','addContainer','get','item','text','start','EmptyContainer','getFirstRange','Object','_customCallbacks','_locale','checkChild','*Merge:*\x20%0','REPLACE_TEXT','add','_addDescriptionItems','match','remove','elementEnd','$textProxy','function','label','length','pop','$text','normal','addEmptyContainer','getDescriptions','_itemLabels','isInContent','registerDescriptionCallback','_schema','removeEmptyContainer','replace','deletion','indexOf','insertion','type','data','set','nextSibling','previousSibling','_itemLabelsCallbacks','_resolveDescriptionItems','*Insert:*\x20%0','getItemLabel','*Remove:*\x20%0','$1\x20$2','isEqual','registerElementLabel','*Split:*\x20%0'];(function(_0x2aecc6,_0x2029c8){const _0x234ad5=function(_0x41f45c){while(--_0x41f45c){_0x2aecc6['push'](_0x2aecc6['shift']());}};_0x234ad5(++_0x2029c8);}(_0x2029,0x118));const _0x234a=function(_0x2aecc6,_0x2029c8){_0x2aecc6=_0x2aecc6-0x0;let _0x234ad5=_0x2029[_0x2aecc6];return _0x234ad5;};import{getTranslation as _0x59b9cb}from'./utils/common-translations.js';import{priorities as _0x2d9b28,insertToPriorityArray as _0x2e03b2}from'ckeditor5/src/utils.js';export default class m{constructor(_0x2869b2,_0x5c8234){this[_0x234a('0x32')]=[],this[_0x234a('0x7')]=new Map(),this[_0x234a('0x15')]=[],this['_schema']=_0x2869b2,this[_0x234a('0x33')]=_0x5c8234;}[_0x234a('0x6')](_0x185f31){const _0x4d531f=[];for(let _0x20b203=0x0;_0x20b203<_0x185f31[_0x234a('0x1')];_0x20b203++){const _0x99f876=_0x185f31[_0x20b203];if(!_0x99f876[_0x234a('0x8')])continue;let _0x56e7fb=!0x1;for(const _0x1e5af5 of this[_0x234a('0x32')]){const _0x1b63de=_0x1e5af5(_0x99f876);if(_0x1b63de){_0x234a('0x10')in _0x1b63de&&_0x4d531f[_0x234a('0x1f')](_0x1b63de),_0x56e7fb=!0x0;break;}}if(!_0x56e7fb){this['_addDescriptionItems'](_0x4d531f,_0x99f876);const _0x50aa45=_0x185f31[_0x20b203+0x1];if(_0x50aa45&&!_0x99f876[_0x234a('0x30')]()[_0x234a('0x25')][_0x234a('0x1b')](_0x50aa45['getFirstRange']()[_0x234a('0x2e')])){const _0x149a6e=_0x4d531f[_0x4d531f['length']-0x1],_0x1a8394=_0x234a('0xf')==_0x99f876[_0x234a('0x10')]?_0x234a('0x37'):_0x234a('0x3a');_0x149a6e&&_0x234a('0x2d')==_0x149a6e[_0x234a('0x10')]&&(_0x149a6e[_0x1a8394]+='\x0a');}}}return this[_0x234a('0x16')](_0x4d531f);}[_0x234a('0x9')](_0x4369aa){this[_0x234a('0x32')]['push'](_0x4369aa);}[_0x234a('0x1c')](_0x475d30,_0x2cc39d,_0x2f272b=_0x2d9b28[_0x234a('0x4')]){_0x234a('0x3d')==typeof _0x475d30?_0x2e03b2(this['_itemLabelsCallbacks'],{'matchingCallback':_0x475d30,'label':_0x2cc39d,'priority':_0x2f272b}):this[_0x234a('0x7')][_0x234a('0x12')](_0x475d30,_0x2cc39d);}[_0x234a('0x18')](_0x5027e2,_0x120c00=0x1){let _0x4df7fd;for(const _0x19b3fc of this[_0x234a('0x15')])if(_0x19b3fc[_0x234a('0x20')](_0x5027e2)){_0x4df7fd=_0x19b3fc[_0x234a('0x0')];break;}return _0x4df7fd||(_0x4df7fd=this['_itemLabels'][_0x234a('0x2b')](_0x5027e2[_0x234a('0x28')])),_0x4df7fd?_0x4df7fd(_0x120c00):0x1!==_0x120c00?_0x120c00+'\x20'+_0x5027e2[_0x234a('0x28')]+'s':''+_0x5027e2[_0x234a('0x28')];}[_0x234a('0x38')](_0x4a6077,_0x30bf6b){const _0x42a18e=_0x30bf6b[_0x234a('0x30')]()['getWalker'](),_0x18896c=_0x234a('0xf')==_0x30bf6b[_0x234a('0x10')]?'add':_0x234a('0x3a');for(const _0x109020 of _0x42a18e){const _0x56d0af=_0x109020[_0x234a('0x2c')],_0x5916cd=_0x4a6077[_0x4a6077[_0x234a('0x1')]-0x1];if(_0x56d0af['is'](_0x234a('0x3c')))_0x5916cd&&_0x5916cd[_0x234a('0x10')][_0x234a('0xe')](_0x234a('0x29'))>-0x1&&_0x4a6077[_0x234a('0x2')](),_0x5916cd&&_0x234a('0x2d')==_0x5916cd[_0x234a('0x10')]?_0x5916cd[_0x18896c]+=_0x56d0af[_0x234a('0x11')]:_0x4a6077[_0x234a('0x1f')]({'type':_0x234a('0x2d'),'add':_0x234a('0x37')==_0x18896c?_0x56d0af[_0x234a('0x11')]:'','remove':_0x234a('0x3a')==_0x18896c?_0x56d0af[_0x234a('0x11')]:''});else{if(this[_0x234a('0xa')][_0x234a('0x1e')](_0x56d0af)){const _0x4fcd04=_0x56d0af;if(_0x5916cd&&_0x5916cd[_0x234a('0x10')][_0x234a('0xe')]('Container')>-0x1&&_0x4a6077[_0x234a('0x2')](),_0x234a('0x3b')==_0x109020[_0x234a('0x10')])continue;_0x5916cd&&_0x5916cd[_0x234a('0x10')]==_0x18896c+_0x234a('0x31')&&_0x5916cd['element'][_0x234a('0x28')]==_0x4fcd04[_0x234a('0x28')]?_0x5916cd['quantity']++:_0x4a6077[_0x234a('0x1f')]({'type':_0x18896c+_0x234a('0x31'),'element':_0x4fcd04,'quantity':0x1}),_0x42a18e['skip'](_0x1cdea7=>!(_0x234a('0x3b')==_0x1cdea7[_0x234a('0x10')]&&_0x1cdea7[_0x234a('0x2c')]==_0x56d0af));}else{if(this['_schema'][_0x234a('0x34')](_0x56d0af,_0x234a('0x3'))||_0x56d0af['is'](_0x234a('0x26'),_0x234a('0x21'))){const _0x462fb9=_0x56d0af;if(_0x234a('0x37')==_0x18896c&&_0x234a('0x27')==_0x109020['type']||_0x234a('0x3a')==_0x18896c&&_0x234a('0x3b')==_0x109020[_0x234a('0x10')])continue;if(_0x5916cd&&-0x1==_0x5916cd[_0x234a('0x10')][_0x234a('0xe')]('Container')){_0x234a('0x2d')==_0x5916cd[_0x234a('0x10')]&&(_0x5916cd[_0x18896c]+='\x0a');continue;}let _0x168ab4;if(_0x168ab4=_0x234a('0x37')==_0x18896c?_0x462fb9[_0x234a('0x13')]&&!this['_schema'][_0x234a('0x1e')](_0x462fb9[_0x234a('0x13')])?_0x462fb9['nextSibling']:null:_0x462fb9[_0x234a('0x14')]&&!this[_0x234a('0xa')][_0x234a('0x1e')](_0x462fb9[_0x234a('0x14')])?_0x462fb9[_0x234a('0x14')]:null,_0x462fb9[_0x234a('0x22')]||_0x168ab4&&_0x168ab4['isEmpty']){const _0x3cea1f=_0x168ab4&&_0x168ab4['isEmpty']?_0x168ab4:_0x462fb9;_0x5916cd&&_0x5916cd[_0x234a('0x10')]==_0x18896c+'EmptyContainer'&&_0x5916cd['element'][_0x234a('0x28')]==_0x3cea1f[_0x234a('0x28')]?_0x5916cd[_0x234a('0x23')]++:_0x4a6077['push']({'type':_0x18896c+_0x234a('0x2f'),'element':_0x3cea1f,'quantity':0x1});}else _0x4a6077[_0x234a('0x1f')]({'type':_0x18896c+_0x234a('0x29'),'element':_0x462fb9});}}}}}[_0x234a('0x16')](_0x455487){const _0x540aba=this[_0x234a('0x33')],_0x27a294=[];for(const _0x1b3533 of _0x455487){switch(_0x1b3533['type']){case _0x234a('0x2d'):if(_0x1b3533[_0x234a('0x37')]=_0x1b3533[_0x234a('0x37')][_0x234a('0xc')](/(\S)\u000A+(\S)/g,_0x234a('0x1a'))['replace'](/\u000A/g,''),_0x1b3533['remove']=_0x1b3533[_0x234a('0x3a')][_0x234a('0xc')](/(\S)\u000A+(\S)/g,'$1\x20$2')[_0x234a('0xc')](/\u000A/g,''),''!=_0x1b3533['add']&&''!=_0x1b3533[_0x234a('0x3a')]){_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xc'),'content':_0x59b9cb(_0x540aba,_0x234a('0x36'),['\x22'+_0x1b3533[_0x234a('0x3a')]+'\x22','\x22'+_0x1b3533['add']+'\x22'])});continue;}if(null!=_0x1b3533['add'][_0x234a('0x39')](/^ +$/)){_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xf'),'content':_0x59b9cb(_0x540aba,_0x234a('0x17'),_0x59b9cb(_0x540aba,'ELEMENT_SPACE',_0x1b3533[_0x234a('0x37')]['length']))});continue;}if(null!=_0x1b3533['remove'][_0x234a('0x39')](/^ +$/)){_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xd'),'content':_0x59b9cb(_0x540aba,'*Remove:*\x20%0',_0x59b9cb(_0x540aba,_0x234a('0x24'),_0x1b3533[_0x234a('0x3a')][_0x234a('0x1')]))});continue;}if(''!=_0x1b3533['add']){_0x27a294['push']({'type':'insertion','content':_0x59b9cb(_0x540aba,'*Insert:*\x20%0','\x22'+_0x1b3533[_0x234a('0x37')]+'\x22')});continue;}_0x27a294[_0x234a('0x1f')]({'type':'deletion','content':_0x59b9cb(_0x540aba,'*Remove:*\x20%0','\x22'+_0x1b3533['remove']+'\x22')});continue;case _0x234a('0x5'):case'addObject':_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xf'),'content':_0x59b9cb(_0x540aba,_0x234a('0x17'),this[_0x234a('0x18')](_0x1b3533['element'],_0x1b3533[_0x234a('0x23')]))});continue;case _0x234a('0xb'):case'removeObject':_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xd'),'content':_0x59b9cb(_0x540aba,_0x234a('0x19'),this[_0x234a('0x18')](_0x1b3533[_0x234a('0x26')],_0x1b3533[_0x234a('0x23')]))});continue;case _0x234a('0x2a'):_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xf'),'content':_0x59b9cb(_0x540aba,_0x234a('0x1d'),this[_0x234a('0x18')](_0x1b3533[_0x234a('0x26')],_0x1b3533[_0x234a('0x23')]))});continue;case'removeContainer':_0x27a294[_0x234a('0x1f')]({'type':_0x234a('0xd'),'content':_0x59b9cb(_0x540aba,_0x234a('0x35'),this[_0x234a('0x18')](_0x1b3533[_0x234a('0x26')],_0x1b3533['quantity']))});continue;}_0x27a294[_0x234a('0x1f')](_0x1b3533);}return _0x27a294;}}