@ckeditor/ckeditor5-comments 38.2.0-alpha.0 → 39.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/README.md +0 -1
  2. package/build/comments.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de.js +1 -1
  10. package/build/translations/el.js +1 -1
  11. package/build/translations/es.js +1 -1
  12. package/build/translations/et.js +1 -1
  13. package/build/translations/fi.js +1 -1
  14. package/build/translations/fr.js +1 -1
  15. package/build/translations/gl.js +1 -1
  16. package/build/translations/he.js +1 -1
  17. package/build/translations/hi.js +1 -1
  18. package/build/translations/hr.js +1 -1
  19. package/build/translations/hu.js +1 -1
  20. package/build/translations/id.js +1 -1
  21. package/build/translations/ja.js +1 -1
  22. package/build/translations/ko.js +1 -1
  23. package/build/translations/lt.js +1 -1
  24. package/build/translations/ms.js +1 -1
  25. package/build/translations/nl.js +1 -1
  26. package/build/translations/no.js +1 -1
  27. package/build/translations/pl.js +1 -1
  28. package/build/translations/pt.js +1 -1
  29. package/build/translations/ro.js +1 -1
  30. package/build/translations/ru.js +1 -1
  31. package/build/translations/sq.js +1 -1
  32. package/build/translations/sr.js +1 -1
  33. package/build/translations/sv.js +1 -1
  34. package/build/translations/th.js +1 -1
  35. package/build/translations/tr.js +1 -1
  36. package/build/translations/uk.js +1 -1
  37. package/build/translations/vi.js +1 -1
  38. package/build/translations/zh-cn.js +1 -1
  39. package/build/translations/zh.js +1 -1
  40. package/lang/translations/ar.po +1 -1
  41. package/lang/translations/bg.po +1 -1
  42. package/lang/translations/bn.po +1 -1
  43. package/lang/translations/ca.po +1 -1
  44. package/lang/translations/cs.po +1 -1
  45. package/lang/translations/da.po +1 -1
  46. package/lang/translations/de.po +1 -1
  47. package/lang/translations/el.po +1 -1
  48. package/lang/translations/es.po +1 -1
  49. package/lang/translations/et.po +1 -1
  50. package/lang/translations/fi.po +1 -1
  51. package/lang/translations/fr.po +1 -1
  52. package/lang/translations/gl.po +12 -12
  53. package/lang/translations/he.po +1 -1
  54. package/lang/translations/hi.po +1 -1
  55. package/lang/translations/hr.po +1 -1
  56. package/lang/translations/hu.po +1 -1
  57. package/lang/translations/id.po +1 -1
  58. package/lang/translations/ja.po +1 -1
  59. package/lang/translations/ko.po +1 -1
  60. package/lang/translations/lt.po +1 -1
  61. package/lang/translations/ms.po +1 -1
  62. package/lang/translations/nl.po +1 -1
  63. package/lang/translations/no.po +1 -1
  64. package/lang/translations/pl.po +1 -1
  65. package/lang/translations/pt.po +1 -1
  66. package/lang/translations/ro.po +1 -1
  67. package/lang/translations/ru.po +1 -1
  68. package/lang/translations/sq.po +2 -2
  69. package/lang/translations/sr.po +1 -1
  70. package/lang/translations/sv.po +1 -1
  71. package/lang/translations/th.po +1 -1
  72. package/lang/translations/tr.po +1 -1
  73. package/lang/translations/uk.po +1 -1
  74. package/lang/translations/vi.po +1 -1
  75. package/lang/translations/zh-cn.po +1 -1
  76. package/lang/translations/zh.po +1 -1
  77. package/package.json +4 -5
  78. package/src/annotations/annotation.d.ts +4 -0
  79. package/src/annotations/annotation.js +2 -2
  80. package/src/annotations/annotationcollection.d.ts +4 -0
  81. package/src/annotations/annotationcollection.js +2 -2
  82. package/src/annotations/annotations.d.ts +4 -0
  83. package/src/annotations/annotations.js +2 -2
  84. package/src/annotations/annotationsuis.d.ts +4 -0
  85. package/src/annotations/annotationsuis.js +2 -2
  86. package/src/annotations/editorannotations.d.ts +4 -0
  87. package/src/annotations/editorannotations.js +2 -2
  88. package/src/annotations/inlineannotations.d.ts +4 -0
  89. package/src/annotations/inlineannotations.js +2 -2
  90. package/src/annotations/narrowsidebar.d.ts +4 -0
  91. package/src/annotations/narrowsidebar.js +2 -2
  92. package/src/annotations/sidebar.d.ts +4 -0
  93. package/src/annotations/sidebar.js +2 -2
  94. package/src/annotations/view/annotationcounterbuttonview.d.ts +4 -0
  95. package/src/annotations/view/annotationcounterbuttonview.js +2 -2
  96. package/src/annotations/view/annotationview.d.ts +4 -0
  97. package/src/annotations/view/annotationview.js +2 -2
  98. package/src/annotations/view/sidebaritemview.d.ts +4 -0
  99. package/src/annotations/view/sidebaritemview.js +2 -2
  100. package/src/annotations/view/sidebarview.d.ts +4 -0
  101. package/src/annotations/view/sidebarview.js +2 -2
  102. package/src/annotations/widesidebar.d.ts +4 -0
  103. package/src/annotations/widesidebar.js +2 -2
  104. package/src/augmentation.d.ts +4 -0
  105. package/src/augmentation.js +1 -1
  106. package/src/comments/addcommentthreadcommand.d.ts +4 -0
  107. package/src/comments/addcommentthreadcommand.js +2 -2
  108. package/src/comments/commentsarchive.d.ts +4 -0
  109. package/src/comments/commentsarchive.js +2 -2
  110. package/src/comments/commentsarchiveui.d.ts +4 -0
  111. package/src/comments/commentsarchiveui.js +2 -2
  112. package/src/comments/commentsediting.d.ts +4 -0
  113. package/src/comments/commentsediting.js +2 -2
  114. package/src/comments/commentsrepository.d.ts +20 -3
  115. package/src/comments/commentsrepository.js +2 -2
  116. package/src/comments/commentsui.d.ts +4 -0
  117. package/src/comments/commentsui.js +2 -2
  118. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +4 -0
  119. package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
  120. package/src/comments/integrations/importword.d.ts +4 -0
  121. package/src/comments/integrations/importword.js +2 -2
  122. package/src/comments/ui/commenteditor/commenteditor.d.ts +6 -2
  123. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  124. package/src/comments/ui/commenteditor/commenteditorui.d.ts +4 -0
  125. package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
  126. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +4 -0
  127. package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
  128. package/src/comments/ui/commentthreadcontroller.d.ts +2 -2
  129. package/src/comments/ui/commentthreadcontroller.js +2 -2
  130. package/src/comments/ui/view/basecommentthreadview.d.ts +4 -0
  131. package/src/comments/ui/view/basecommentthreadview.js +2 -2
  132. package/src/comments/ui/view/basecommentview.d.ts +4 -0
  133. package/src/comments/ui/view/basecommentview.js +2 -2
  134. package/src/comments/ui/view/collapsedcommentsview.d.ts +4 -0
  135. package/src/comments/ui/view/collapsedcommentsview.js +2 -2
  136. package/src/comments/ui/view/commentcontentview.d.ts +4 -0
  137. package/src/comments/ui/view/commentcontentview.js +2 -2
  138. package/src/comments/ui/view/commentinputview.d.ts +4 -0
  139. package/src/comments/ui/view/commentinputview.js +2 -2
  140. package/src/comments/ui/view/commentsarchiveview.d.ts +4 -0
  141. package/src/comments/ui/view/commentsarchiveview.js +2 -2
  142. package/src/comments/ui/view/commentslistview.d.ts +4 -0
  143. package/src/comments/ui/view/commentslistview.js +2 -2
  144. package/src/comments/ui/view/commentthreadheaderview.d.ts +4 -0
  145. package/src/comments/ui/view/commentthreadheaderview.js +2 -2
  146. package/src/comments/ui/view/commentthreadinputview.d.ts +4 -0
  147. package/src/comments/ui/view/commentthreadinputview.js +2 -2
  148. package/src/comments/ui/view/commentthreadview.d.ts +4 -0
  149. package/src/comments/ui/view/commentthreadview.js +2 -2
  150. package/src/comments/ui/view/commentview.d.ts +4 -0
  151. package/src/comments/ui/view/commentview.js +2 -2
  152. package/src/comments.d.ts +4 -0
  153. package/src/comments.js +2 -2
  154. package/src/commentsonly.d.ts +4 -0
  155. package/src/commentsonly.js +2 -2
  156. package/src/config.d.ts +4 -0
  157. package/src/config.js +1 -1
  158. package/src/index.d.ts +5 -2
  159. package/src/index.js +1 -1
  160. package/src/utils/common-translations.d.ts +4 -0
  161. package/src/utils/common-translations.js +2 -2
  162. package/src/utils/createmutationobserver.d.ts +2 -1
  163. package/src/utils/createmutationobserver.js +2 -2
@@ -1,3 +1,7 @@
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
+ */
1
5
  import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index';
2
6
  declare module '@ckeditor/ckeditor5-core' {
3
7
  interface EditorConfig {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -1,3 +1,7 @@
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
+ */
1
5
  /**
2
6
  * @module comments/comments/addcommentthreadcommand
3
7
  * @publicApi
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4ba7=['_trimToContent','isObject','tableCell','$textProxy','execute','_hasContent','refresh','model','start','comment:','addMarker','selection','item','backward','change','isEnabled','editor','end','element','push','schema','getItems','getLastMatchingPosition','substr','getRanges','document','createRange'];(function(_0x182754,_0x4ba744){const _0x4b2b52=function(_0x10ee74){while(--_0x10ee74){_0x182754['push'](_0x182754['shift']());}};_0x4b2b52(++_0x4ba744);}(_0x4ba7,0xc9));const _0x4b2b=function(_0x182754,_0x4ba744){_0x182754=_0x182754-0x0;let _0x4b2b52=_0x4ba7[_0x182754];return _0x4b2b52;};import{Command as _0x563ddb}from'ckeditor5/src/core';import{uid as _0x56b557}from'ckeditor5/src/utils';export default class J extends _0x563ddb{[_0x4b2b('0x15')](){const _0x327d69=this[_0x4b2b('0x4')][_0x4b2b('0x16')]['document'][_0x4b2b('0x1a')];for(const _0x108725 of _0x327d69[_0x4b2b('0xc')]())if(this[_0x4b2b('0x14')](_0x108725))return void(this[_0x4b2b('0x3')]=!0x0);this[_0x4b2b('0x3')]=!0x1;}[_0x4b2b('0x13')]({threadId:_0x18c16d=_0x56b557()}={}){const _0x5791ef=this[_0x4b2b('0x4')]['model'],_0x3ecdb6=[];for(const _0x17869f of _0x5791ef[_0x4b2b('0xd')][_0x4b2b('0x1a')][_0x4b2b('0xc')]())this['_hasContent'](_0x17869f)&&_0x3ecdb6[_0x4b2b('0x7')](this[_0x4b2b('0xf')](_0x17869f));_0x5791ef[_0x4b2b('0x2')](_0x3a08db=>{for(const _0x249657 of _0x3ecdb6){const _0x42f038=_0x56b557()[_0x4b2b('0xb')](0x1,0x5),_0x4c5b0a=_0x4b2b('0x18')+_0x18c16d+':'+_0x42f038;_0x3a08db[_0x4b2b('0x19')](_0x4c5b0a,{'range':_0x249657,'usingOperation':!0x1,'affectsData':!0x1});}});}[_0x4b2b('0x14')](_0x5e610b){for(const _0x29717c of _0x5e610b[_0x4b2b('0x9')]())if(this['_itemIsContent'](_0x29717c))return!0x0;return!0x1;}['_itemIsContent'](_0x1de5c6){return _0x1de5c6['is'](_0x4b2b('0x12'))||this[_0x4b2b('0x4')][_0x4b2b('0x16')][_0x4b2b('0x8')][_0x4b2b('0x10')](_0x1de5c6)&&!_0x1de5c6['is'](_0x4b2b('0x6'),_0x4b2b('0x11'));}['_trimToContent'](_0x5c0afe){const _0x368aa9=_0x472da3=>!this['_itemIsContent'](_0x472da3[_0x4b2b('0x0')]),_0x3070d4=_0x5c0afe[_0x4b2b('0x17')][_0x4b2b('0xa')](_0x368aa9),_0x3ef402=_0x5c0afe[_0x4b2b('0x5')]['getLastMatchingPosition'](_0x368aa9,{'direction':_0x4b2b('0x1')});return this[_0x4b2b('0x4')]['model'][_0x4b2b('0xe')](_0x3070d4,_0x3ef402);}}
23
+ const _0x5d45=['substr','push','createRange','element','tableCell','_hasContent','schema','isEnabled','end','backward','item','selection','model','isObject','getRanges','$textProxy','_trimToContent','addMarker','editor','getItems','execute','comment:','_itemIsContent','change','document'];(function(_0x3fb008,_0x5d45a7){const _0x58fffe=function(_0x593f54){while(--_0x593f54){_0x3fb008['push'](_0x3fb008['shift']());}};_0x58fffe(++_0x5d45a7);}(_0x5d45,0x16f));const _0x58ff=function(_0x3fb008,_0x5d45a7){_0x3fb008=_0x3fb008-0x0;let _0x58fffe=_0x5d45[_0x3fb008];return _0x58fffe;};import{Command as _0x2766fe}from'ckeditor5/src/core';import{uid as _0x249438}from'ckeditor5/src/utils';export default class q extends _0x2766fe{['refresh'](){const _0x372130=this['editor']['model'][_0x58ff('0x7')][_0x58ff('0x13')];for(const _0x5c84b0 of _0x372130[_0x58ff('0x16')]())if(this[_0x58ff('0xd')](_0x5c84b0))return void(this[_0x58ff('0xf')]=!0x0);this['isEnabled']=!0x1;}[_0x58ff('0x3')]({threadId:_0x58b6e0=_0x249438()}={}){const _0x38c64=this[_0x58ff('0x1')][_0x58ff('0x14')],_0x427c89=[];for(const _0x10b986 of _0x38c64[_0x58ff('0x7')]['selection'][_0x58ff('0x16')]())this['_hasContent'](_0x10b986)&&_0x427c89[_0x58ff('0x9')](this[_0x58ff('0x18')](_0x10b986));_0x38c64[_0x58ff('0x6')](_0x14d4a8=>{for(const _0x109a76 of _0x427c89){const _0xa57faa=_0x249438()[_0x58ff('0x8')](0x1,0x5),_0x41c962=_0x58ff('0x4')+_0x58b6e0+':'+_0xa57faa;_0x14d4a8[_0x58ff('0x0')](_0x41c962,{'range':_0x109a76,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x3c48c6){for(const _0x5b4177 of _0x3c48c6[_0x58ff('0x2')]())if(this[_0x58ff('0x5')](_0x5b4177))return!0x0;return!0x1;}[_0x58ff('0x5')](_0x41f817){return _0x41f817['is'](_0x58ff('0x17'))||this['editor'][_0x58ff('0x14')][_0x58ff('0xe')][_0x58ff('0x15')](_0x41f817)&&!_0x41f817['is'](_0x58ff('0xb'),_0x58ff('0xc'));}['_trimToContent'](_0x385e45){const _0x43ef39=_0xc8d130=>!this[_0x58ff('0x5')](_0xc8d130[_0x58ff('0x12')]),_0x24dee5=_0x385e45['start']['getLastMatchingPosition'](_0x43ef39),_0x2a9f8e=_0x385e45[_0x58ff('0x10')]['getLastMatchingPosition'](_0x43ef39,{'direction':_0x58ff('0x11')});return this['editor'][_0x58ff('0x14')][_0x58ff('0xa')](_0x24dee5,_0x2a9f8e);}}
@@ -1,3 +1,7 @@
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
+ */
1
5
  /**
2
6
  * @module comments/comments/commentsarchive
3
7
  * @publicApi
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3ba9=['highest','pluginName','CommentsArchive','getCommentThread','_calculatePosition','add','reopenCommentThread','removeCommentThread','collection','has','context','plugins','isActive','remove','resolveCommentThread','activate','resolvedThreads','resolvedAt','listenTo','get','init'];(function(_0x49b5e6,_0x3ba96a){const _0x1838c0=function(_0x5b1e95){while(--_0x5b1e95){_0x49b5e6['push'](_0x49b5e6['shift']());}};_0x1838c0(++_0x3ba96a);}(_0x3ba9,0x199));const _0x1838=function(_0x49b5e6,_0x3ba96a){_0x49b5e6=_0x49b5e6-0x0;let _0x1838c0=_0x3ba9[_0x49b5e6];return _0x1838c0;};import{ContextPlugin as _0x55fd9d}from'ckeditor5/src/core';import{Collection as _0x4049e4}from'ckeditor5/src/utils';import _0x3587d3 from'./commentsrepository';import _0x806f95 from'../annotations/annotations';export default class p extends _0x55fd9d{static get[_0x1838('0xc')](){return _0x1838('0xd');}static get['requires'](){return[_0x3587d3,_0x806f95];}constructor(_0x174104){super(_0x174104),this[_0x1838('0x6')]=new _0x4049e4();}[_0x1838('0xa')](){const _0x3d59c0=this[_0x1838('0x0')],_0x542182=_0x3d59c0[_0x1838('0x1')][_0x1838('0x9')](_0x3587d3),_0x73e6dd=_0x3d59c0['plugins'][_0x1838('0x9')](_0x806f95);this[_0x1838('0x8')](_0x542182,'addCommentThread',(_0x5eb78c,{threadId:_0x529a9b,resolvedAt:_0x1a3ffb,deletedAt:_0x5041b5})=>{if(_0x1a3ffb&&!_0x5041b5){const _0x221463=_0x542182[_0x1838('0xe')](_0x529a9b);this['resolvedThreads'][_0x1838('0x10')](_0x221463,this[_0x1838('0xf')](_0x1a3ffb));}}),this[_0x1838('0x8')](_0x542182,_0x1838('0x4'),(_0x4c3efd,{threadId:_0x30b38b,resolvedAt:_0x1c5140})=>{const _0x3f16ca=_0x542182[_0x1838('0xe')](_0x30b38b);this['resolvedThreads']['add'](_0x3f16ca,this[_0x1838('0xf')](_0x1c5140));},{'priority':'highest'}),this['listenTo'](_0x542182,_0x1838('0x11'),(_0x316cfa,{threadId:_0x1b054f})=>{const _0x81fbfb=_0x542182[_0x1838('0xe')](_0x1b054f);this[_0x1838('0x6')][_0x1838('0x14')](_0x81fbfb)&&this['resolvedThreads'][_0x1838('0x3')](_0x81fbfb);},{'priority':_0x1838('0xb')}),this[_0x1838('0x8')](_0x542182,_0x1838('0x12'),(_0x23704f,{threadId:_0x5c5411})=>{const _0x27057e=_0x542182['getCommentThread'](_0x5c5411);this[_0x1838('0x6')][_0x1838('0x14')](_0x27057e)&&this['resolvedThreads'][_0x1838('0x3')](_0x27057e);},{'priority':_0x1838('0xb')}),this[_0x1838('0x8')](_0x73e6dd[_0x1838('0x13')],'focus',(_0x2384ea,_0xb0935b)=>{_0xb0935b[_0x1838('0x2')]=!0x0,_0x73e6dd[_0x1838('0x5')](_0xb0935b);});}[_0x1838('0xf')](_0x8d3b16){const _0x51848f=[...this[_0x1838('0x6')]]['findIndex'](_0x328083=>_0x328083[_0x1838('0x7')]<_0x8d3b16);return _0x51848f>-0x1?_0x51848f:this[_0x1838('0x6')]['length'];}}
23
+ const _0x2f6c=['CommentsArchive','addCommentThread','collection','plugins','activate','has','findIndex','context','resolvedAt','isActive','requires','length','get','add','focus','removeCommentThread','listenTo','getCommentThread','resolveCommentThread','resolvedThreads','reopenCommentThread','highest','_calculatePosition'];(function(_0x164cc5,_0x2f6c62){const _0x23d8e3=function(_0x17e2f2){while(--_0x17e2f2){_0x164cc5['push'](_0x164cc5['shift']());}};_0x23d8e3(++_0x2f6c62);}(_0x2f6c,0xc1));const _0x23d8=function(_0x164cc5,_0x2f6c62){_0x164cc5=_0x164cc5-0x0;let _0x23d8e3=_0x2f6c[_0x164cc5];return _0x23d8e3;};import{ContextPlugin as _0x13b01f}from'ckeditor5/src/core';import{Collection as _0x44f169}from'ckeditor5/src/utils';import _0x13d61e from'./commentsrepository';import _0x205c97 from'../annotations/annotations';export default class p extends _0x13b01f{static get['pluginName'](){return _0x23d8('0xe');}static get[_0x23d8('0x1')](){return[_0x13d61e,_0x205c97];}constructor(_0x32f2f9){super(_0x32f2f9),this[_0x23d8('0xa')]=new _0x44f169();}['init'](){const _0x528224=this[_0x23d8('0x15')],_0x21ca2c=_0x528224['plugins'][_0x23d8('0x3')](_0x13d61e),_0x5c48cf=_0x528224[_0x23d8('0x11')][_0x23d8('0x3')](_0x205c97);this[_0x23d8('0x7')](_0x21ca2c,_0x23d8('0xf'),(_0x3f7c7d,{threadId:_0x53e246,resolvedAt:_0x505110,deletedAt:_0x1f95ed})=>{if(_0x505110&&!_0x1f95ed){const _0x2d2a4c=_0x21ca2c[_0x23d8('0x8')](_0x53e246);this[_0x23d8('0xa')]['add'](_0x2d2a4c,this[_0x23d8('0xd')](_0x505110));}}),this['listenTo'](_0x21ca2c,_0x23d8('0x9'),(_0x22108a,{threadId:_0x3f2ee2,resolvedAt:_0x20bfcc})=>{const _0x3cce77=_0x21ca2c[_0x23d8('0x8')](_0x3f2ee2);this[_0x23d8('0xa')][_0x23d8('0x4')](_0x3cce77,this[_0x23d8('0xd')](_0x20bfcc));},{'priority':'highest'}),this[_0x23d8('0x7')](_0x21ca2c,_0x23d8('0xb'),(_0x22435e,{threadId:_0x1b2eaf})=>{const _0x17dc04=_0x21ca2c[_0x23d8('0x8')](_0x1b2eaf);this[_0x23d8('0xa')][_0x23d8('0x13')](_0x17dc04)&&this[_0x23d8('0xa')]['remove'](_0x17dc04);},{'priority':_0x23d8('0xc')}),this[_0x23d8('0x7')](_0x21ca2c,_0x23d8('0x6'),(_0x34dec4,{threadId:_0x5c1266})=>{const _0x2ead14=_0x21ca2c['getCommentThread'](_0x5c1266);this[_0x23d8('0xa')][_0x23d8('0x13')](_0x2ead14)&&this[_0x23d8('0xa')]['remove'](_0x2ead14);},{'priority':'highest'}),this['listenTo'](_0x5c48cf[_0x23d8('0x10')],_0x23d8('0x5'),(_0x5184ad,_0x256497)=>{_0x256497[_0x23d8('0x0')]=!0x0,_0x5c48cf[_0x23d8('0x12')](_0x256497);});}[_0x23d8('0xd')](_0x5c4e97){const _0x23085b=[...this[_0x23d8('0xa')]][_0x23d8('0x14')](_0x19c9ff=>_0x19c9ff[_0x23d8('0x16')]<_0x5c4e97);return _0x23085b>-0x1?_0x23085b:this[_0x23d8('0xa')][_0x23d8('0x2')];}}
@@ -1,3 +1,7 @@
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
+ */
1
5
  /**
2
6
  * @module comments/comments/commentsarchiveui
3
7
  * @publicApi
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4f4b=['resolvedAt','panelView','splice','mousedown','COMMENTS_ARCHIVE','commentsArchiveView','channelId','filter','editor','CommentsArchiveUI','render','querySelectorAll','_threadToController','change:isOpen','_createArchiveUIDropdown','length','resolvedThreads','listenTo','.ck.ck-body','remove','findIndex','plugins','innerView','isOpen','buttonView','pluginName','push','set','collaboration.channelId','collection','view','CommentsRepository','add','forEach','requires','change:isFocused','getByInnerView','focusTracker','extendTemplate','element','config','locale','annotationViews','isVisible','get','Annotations','stop','componentFactory','_pendingThreads'];(function(_0x578a0d,_0x4f4b51){const _0x20677=function(_0x649112){while(--_0x649112){_0x578a0d['push'](_0x578a0d['shift']());}};_0x20677(++_0x4f4b51);}(_0x4f4b,0x1d4));const _0x2067=function(_0x578a0d,_0x4f4b51){_0x578a0d=_0x578a0d-0x0;let _0x20677=_0x4f4b[_0x578a0d];return _0x20677;};import'../../theme/commentsarchive.css';import{Plugin as _0xa3c587}from'ckeditor5/src/core';import{createDropdown as _0x9236ad,clickOutsideHandler as _0x1437c3,ViewCollection as _0x15eb41}from'ckeditor5/src/ui';import _0x10e31e from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x96f395}from'../utils/common-translations';import _0x182c47 from'./ui/view/commentsarchiveview';import _0x4c23a1 from'./commentsarchive';export default class a extends _0xa3c587{static get[_0x2067('0x2f')](){return _0x2067('0x1f');}static get[_0x2067('0x7')](){return[_0x4c23a1];}constructor(_0x190c6a){super(_0x190c6a),this[_0x2067('0xf')]=new _0x15eb41(),this[_0x2067('0x15')]=[];}['init'](){this[_0x2067('0x1e')]['ui'][_0x2067('0x14')]['add']('commentsArchive',()=>this[_0x2067('0x24')]());const _0x1ac8e1=this[_0x2067('0x1e')][_0x2067('0x2b')][_0x2067('0x11')](_0x4c23a1),_0x420a3b=this[_0x2067('0x1e')]['plugins'][_0x2067('0x11')](_0x2067('0x12')),_0x5c7c90=this[_0x2067('0x1e')][_0x2067('0x2b')][_0x2067('0x11')](_0x2067('0x4'));this['listenTo'](_0x1ac8e1['resolvedThreads'],_0x2067('0x5'),(_0x1daaf8,_0x48fb7e)=>{const _0x57728c=this[_0x2067('0x1e')][_0x2067('0xd')][_0x2067('0x11')](_0x2067('0x1'));if(!_0x57728c||_0x48fb7e[_0x2067('0x1c')]===_0x57728c){const _0x5a8edb=this['_calculatePosition'](_0x48fb7e[_0x2067('0x16')]),_0x12fb79=_0x5c7c90[_0x2067('0x22')][_0x2067('0x11')](_0x48fb7e);if(!_0x12fb79)return void this[_0x2067('0x15')][_0x2067('0x30')]({'thread':_0x48fb7e,'position':_0x5a8edb});const _0x5f1eae=_0x420a3b['getByInnerView'](_0x12fb79[_0x2067('0x3')]);_0x5f1eae[_0x2067('0x10')]&&_0x420a3b['_visibleAnnotations']['remove'](_0x5f1eae),this['annotationViews'][_0x2067('0x5')](_0x5f1eae['view'],_0x5a8edb);}}),this[_0x2067('0x27')](_0x420a3b[_0x2067('0x2')],_0x2067('0x5'),(_0x16c714,_0x229972)=>{this['_pendingThreads'][_0x2067('0x6')](({thread:_0x172ff8,position:_0x17e4f9},_0x28073d)=>{const _0x1003e1=_0x5c7c90[_0x2067('0x22')][_0x2067('0x11')](_0x172ff8);_0x1003e1&&_0x229972[_0x2067('0x2c')]===_0x1003e1[_0x2067('0x3')]&&(this[_0x2067('0xf')][_0x2067('0x5')](_0x229972[_0x2067('0x3')],_0x17e4f9),this['_pendingThreads'][_0x2067('0x18')](_0x28073d,0x1));});}),this[_0x2067('0x27')](_0x1ac8e1[_0x2067('0x26')],_0x2067('0x29'),(_0x39c0e3,_0xf83469)=>{const _0x3c1a45=this[_0x2067('0x1e')][_0x2067('0xd')][_0x2067('0x11')](_0x2067('0x1'));if(!_0x3c1a45||_0xf83469['channelId']===_0x3c1a45){const _0x29d6eb=_0x5c7c90[_0x2067('0x22')][_0x2067('0x11')](_0xf83469),_0x4e7d8f=_0x420a3b[_0x2067('0x9')](_0x29d6eb[_0x2067('0x3')])[_0x2067('0x3')];this[_0x2067('0xf')][_0x2067('0x29')](_0x4e7d8f);}});}['_calculatePosition'](_0x5253a4){const _0x362da6=this[_0x2067('0x1e')][_0x2067('0xd')][_0x2067('0x11')]('collaboration.channelId'),_0x5aac02=[...this[_0x2067('0x1e')][_0x2067('0x2b')][_0x2067('0x11')](_0x4c23a1)[_0x2067('0x26')]][_0x2067('0x1d')](_0x4c5295=>_0x4c5295['channelId']!==_0x362da6)[_0x2067('0x2a')](_0x150a82=>_0x150a82[_0x2067('0x16')]<_0x5253a4);return _0x5aac02>-0x1?_0x5aac02:this['annotationViews'][_0x2067('0x25')];}[_0x2067('0x24')](){const _0x2d9377=this[_0x2067('0x1e')],_0x1da1bf=_0x9236ad(_0x2d9377[_0x2067('0xe')]);return _0x1da1bf['on'](_0x2067('0x20'),()=>{_0x1da1bf['stopListening'](document,_0x2067('0x19')),_0x1437c3({'emitter':_0x1da1bf,'activator':()=>_0x1da1bf[_0x2067('0x2d')],'callback':()=>{_0x1da1bf[_0x2067('0x2d')]=!0x1;},'contextElements':()=>[_0x1da1bf[_0x2067('0xc')],...document[_0x2067('0x21')](_0x2067('0x28'))]});}),_0x1da1bf[_0x2067('0xa')]['on'](_0x2067('0x8'),_0xfdcc92=>{_0xfdcc92[_0x2067('0x13')]();},{'priority':'high'}),_0x1da1bf[_0x2067('0x2e')][_0x2067('0x0')]({'icon':_0x10e31e,'label':_0x96f395(_0x2d9377[_0x2067('0xe')],_0x2067('0x1a')),'tooltip':!0x0}),_0x1da1bf[_0x2067('0x17')][_0x2067('0xb')]({'attributes':{'class':'ck-comments-archive-dropdown'}}),_0x1da1bf['on'](_0x2067('0x23'),(_0x3adcd2,_0x14c4cf,_0x39631f)=>{this[_0x2067('0x1b')]||(this[_0x2067('0x1b')]=new _0x182c47(_0x2d9377[_0x2067('0xe')],this['annotationViews'])),_0x39631f?_0x1da1bf[_0x2067('0x17')]['children']['add'](this[_0x2067('0x1b')]):_0x1da1bf[_0x2067('0x17')]['children'][_0x2067('0x29')](this['commentsArchiveView']);}),_0x1da1bf;}}
23
+ const _0x1ce1=['resolvedThreads','innerView','filter','ck-body','_handleAnnotationFocusableElements','config','resolvedAt','_visibleAnnotations','isVisible','componentFactory','getByInnerView','CommentsArchiveUI','plugins','panelView','set','COMMENTS_ARCHIVE','_calculatePosition','Annotations','annotationViews','locale','contains','remove','children','collection','position','length','init','stopListening','commentsArchiveView','add','focusTracker','listenTo','buttonView','channelId','findIndex','find','extendTemplate','focusableElements','view','_threadToController','push','_createArchiveUIDropdown','editor','mainView','_pendingThreads','change:isOpen','get','classList'];(function(_0x129e21,_0x1ce16d){const _0x1f50db=function(_0x1b5e1e){while(--_0x1b5e1e){_0x129e21['push'](_0x129e21['shift']());}};_0x1f50db(++_0x1ce16d);}(_0x1ce1,0xb2));const _0x1f50=function(_0x129e21,_0x1ce16d){_0x129e21=_0x129e21-0x0;let _0x1f50db=_0x1ce1[_0x129e21];return _0x1f50db;};import'../../theme/commentsarchive.css';import{Plugin as _0x3b37eb}from'ckeditor5/src/core';import{createDropdown as _0x45b13f,ViewCollection as _0x5b7682}from'ckeditor5/src/ui';import _0x1ece80 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x4d51ec}from'../utils/common-translations';import _0x960d2e from'./ui/view/commentsarchiveview';import _0x4eae01 from'./commentsarchive';export default class a extends _0x3b37eb{static get['pluginName'](){return _0x1f50('0x19');}static get['requires'](){return[_0x4eae01];}constructor(_0x17af3d){super(_0x17af3d),this[_0x1f50('0x20')]=new _0x5b7682(),this['_pendingThreads']=[];}[_0x1f50('0x28')](){this[_0x1f50('0x8')]['ui'][_0x1f50('0x17')][_0x1f50('0x2b')]('commentsArchive',()=>this[_0x1f50('0x7')]());const _0x1e5f15=this[_0x1f50('0x8')]['plugins'][_0x1f50('0xc')](_0x4eae01),_0x38f7b2=this['editor']['plugins']['get'](_0x1f50('0x1f')),_0x1c607d=this[_0x1f50('0x8')]['plugins'][_0x1f50('0xc')]('CommentsRepository');this[_0x1f50('0x2d')](_0x1e5f15[_0x1f50('0xe')],_0x1f50('0x2b'),(_0x58f2fa,_0x556295)=>{const _0x53f902=this[_0x1f50('0x8')][_0x1f50('0x13')]['get']('collaboration.channelId');if(!_0x53f902||_0x556295[_0x1f50('0x2f')]===_0x53f902){const _0x492a5d=this['_calculatePosition'](_0x556295[_0x1f50('0x14')]),_0x3fa748=_0x1c607d[_0x1f50('0x5')]['get'](_0x556295);if(!_0x3fa748)return void this['_pendingThreads'][_0x1f50('0x6')]({'thread':_0x556295,'position':_0x492a5d});const _0x3a0949=_0x38f7b2[_0x1f50('0x18')](_0x3fa748[_0x1f50('0x4')]);_0x3a0949[_0x1f50('0x16')]&&_0x38f7b2[_0x1f50('0x15')]['remove'](_0x3a0949),this[_0x1f50('0x20')][_0x1f50('0x2b')](_0x3a0949[_0x1f50('0x4')],_0x492a5d);}}),this[_0x1f50('0x2d')](_0x38f7b2[_0x1f50('0x25')],_0x1f50('0x2b'),(_0x3656f9,_0x2fa1d5)=>{const _0x47e659=this['_pendingThreads'][_0x1f50('0x1')](({thread:_0x343100})=>{const _0x4f0543=_0x1c607d[_0x1f50('0x5')][_0x1f50('0xc')](_0x343100);return _0x4f0543&&_0x2fa1d5[_0x1f50('0xf')]===_0x4f0543[_0x1f50('0x4')];});_0x47e659&&(this[_0x1f50('0x20')][_0x1f50('0x2b')](_0x2fa1d5[_0x1f50('0x4')],_0x47e659[_0x1f50('0x26')]),this[_0x1f50('0xa')]['splice'](this['_pendingThreads']['indexOf'](_0x47e659),0x1));}),this[_0x1f50('0x2d')](_0x1e5f15[_0x1f50('0xe')],_0x1f50('0x23'),(_0x424f8a,_0x39e1a7)=>{const _0x20d4c8=this[_0x1f50('0x8')]['config']['get']('collaboration.channelId');if(!_0x20d4c8||_0x39e1a7[_0x1f50('0x2f')]===_0x20d4c8){const _0x2c5f2c=_0x1c607d[_0x1f50('0x5')][_0x1f50('0xc')](_0x39e1a7),_0x14987a=_0x38f7b2['getByInnerView'](_0x2c5f2c[_0x1f50('0x4')]);this[_0x1f50('0x20')][_0x1f50('0x23')](_0x14987a[_0x1f50('0x4')]),this[_0x1f50('0x29')](_0x14987a[_0x1f50('0x3')]);}});}[_0x1f50('0x12')](_0x266022,_0xa90b26){for(const _0x2376d0 of _0xa90b26[_0x1f50('0x3')])_0x2376d0[_0x1f50('0xd')][_0x1f50('0x22')](_0x1f50('0x11'))&&_0x266022[_0x1f50('0x2c')][_0x1f50('0x2b')](_0x2376d0);this[_0x1f50('0x2d')](_0xa90b26[_0x1f50('0x3')],'add',(_0xc25a6c,_0x1f6358)=>{_0x1f6358[_0x1f50('0xd')][_0x1f50('0x22')](_0x1f50('0x11'))&&_0x266022[_0x1f50('0x2c')][_0x1f50('0x2b')](_0x1f6358);}),this['listenTo'](_0xa90b26[_0x1f50('0x3')],_0x1f50('0x23'),(_0x28c81d,_0x12d4dc)=>{_0x12d4dc['classList'][_0x1f50('0x22')](_0x1f50('0x11'))&&_0x266022[_0x1f50('0x2c')]['remove'](_0x12d4dc);});}[_0x1f50('0x1e')](_0x3514c7){const _0x103982=this['editor']['config'][_0x1f50('0xc')]('collaboration.channelId'),_0x1c0532=[...this['editor'][_0x1f50('0x1a')][_0x1f50('0xc')](_0x4eae01)[_0x1f50('0xe')]][_0x1f50('0x10')](_0x350adb=>_0x350adb[_0x1f50('0x2f')]!==_0x103982)[_0x1f50('0x0')](_0x3f8811=>_0x3f8811[_0x1f50('0x14')]<_0x3514c7);return _0x1c0532>-0x1?_0x1c0532:this[_0x1f50('0x20')][_0x1f50('0x27')];}[_0x1f50('0x7')](){const _0x3f6f4a=this[_0x1f50('0x8')],_0x1d0826=this[_0x1f50('0x8')]['plugins'][_0x1f50('0xc')](_0x1f50('0x1f')),_0x3635c0=_0x45b13f(_0x3f6f4a[_0x1f50('0x21')]);_0x3635c0[_0x1f50('0x2e')][_0x1f50('0x1c')]({'icon':_0x1ece80,'label':_0x4d51ec(_0x3f6f4a[_0x1f50('0x21')],_0x1f50('0x1d')),'tooltip':!0x0}),_0x3635c0['panelView'][_0x1f50('0x2')]({'attributes':{'class':'ck-comments-archive-dropdown'}}),_0x3635c0['on'](_0x1f50('0xb'),(_0x166887,_0x39defe,_0x1ba73c)=>{this[_0x1f50('0x2a')]||(this['commentsArchiveView']=new _0x960d2e(_0x3f6f4a[_0x1f50('0x21')],this[_0x1f50('0x20')])),_0x1ba73c?_0x3635c0[_0x1f50('0x1b')][_0x1f50('0x24')]['add'](this['commentsArchiveView']):_0x3635c0[_0x1f50('0x1b')][_0x1f50('0x24')][_0x1f50('0x23')](this[_0x1f50('0x2a')]);});for(const _0x1c5e19 of this['annotationViews']){const _0x15a8cd=_0x1d0826[_0x1f50('0x18')](_0x1c5e19[_0x1f50('0x9')]);this[_0x1f50('0x12')](_0x3635c0,_0x15a8cd);}return _0x3635c0[_0x1f50('0x2d')](this[_0x1f50('0x20')],_0x1f50('0x2b'),(_0x592efa,_0x5b4f9a)=>{const _0x4d8474=_0x1d0826[_0x1f50('0x18')](_0x5b4f9a['mainView']);this[_0x1f50('0x12')](_0x3635c0,_0x4d8474);}),_0x3635c0[_0x1f50('0x2d')](this[_0x1f50('0x20')],'remove',(_0x3c3fcd,_0x4080f3)=>{const _0x40f576=_0x1d0826[_0x1f50('0x18')](_0x4080f3['mainView']);for(const _0x35ee76 of _0x40f576['focusableElements'])_0x35ee76[_0x1f50('0xd')][_0x1f50('0x22')](_0x1f50('0x11'))&&_0x3635c0[_0x1f50('0x2c')]['remove'](_0x35ee76);}),_0x3635c0;}}
@@ -1,3 +1,7 @@
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
+ */
1
5
  /**
2
6
  * @module comments/comments/commentsediting
3
7
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x55c9=['newRange','reopenCommentThread','ready','change:activeMarker','addMarker:','add','has','dataDowncast','ck-comment-marker--active','for','_threads','includes','createElement','removeMarker','markerToHighlight','destroyed','addCommentThread','createPositionBefore','reconvertMarker','upcast','markers','resolve','ck-comment-marker','getCommentThread','comment:','_detachCommentThread','CommentsEditing','context','elementToElement','getByInnerView','_threadToController','isCollapsed','get','markerToData','comment','_handleMarkerAddAndRemove','editingDowncast','$marker','editor','isEqual','document','addComment','change','openNewCommentThread','switchReadOnly','editing','getWalker','render','text','end','destroy','split','rootName','conversion','commands','start','model','getRange','consumable','plugins','_getTextContext','consume','listenTo','_attachedThreads','setContext','managedUsingOperations','_reconvertMarkers','then','isThreadsLoadingPaused','low','markerName','once','isObject','_getTargetForId','focus','high','activeMarker','root','data','config','reopen','_handleThreadMarker','getItems','isLocal','createRange','getAllMarkersForId','removeCommentThread','registerPostFixer','collaboration.channelId','dataToMarker','scrollToThreadMarker','resolveCommentThread','set','from','isResolved','$textProxy','refreshVisibility','_hasTargetInContent','getAttribute','item','_attachMarkerToThread','affectsData','fetchCommentThread','view','registerAnnotation','differ','hasCommentThread','enqueueChange','getChangedMarkers','length','updateMarker','_initializeMarkerConverters','delete','schema','push'];(function(_0x58b27d,_0x55c9d6){const _0x58cdcb=function(_0x471fd6){while(--_0x471fd6){_0x58b27d['push'](_0x58b27d['shift']());}};_0x58cdcb(++_0x55c9d6);}(_0x55c9,0x1d8));const _0x58cd=function(_0x58b27d,_0x55c9d6){_0x58b27d=_0x58b27d-0x0;let _0x58cdcb=_0x55c9[_0x58b27d];return _0x58cdcb;};import{Plugin as _0x177c22}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x899b87}from'ckeditor5/src/utils';import _0x2db59e from'./commentsrepository';import _0x25bb80 from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0xf74d44}from'ckeditor5-collaboration/src/collaboration-core';import _0x15bde8 from'../annotations/editorannotations';import _0x159ff7 from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x502682 from'./integrations/importword';import _0x5bd54c from'../annotations/annotations';export default class r extends _0x177c22{static get['requires'](){return[_0x2db59e,_0x15bde8,_0x159ff7,_0x502682];}static get['pluginName'](){return _0x58cd('0xe');}constructor(_0x1218c4){super(_0x1218c4),this[_0x58cd('0x50')](_0x58cd('0x38'),!0x0),_0x1218c4[_0x58cd('0x42')][_0x58cd('0x3b')](_0x58cd('0x69'),()=>this['isThreadsLoadingPaused']=!0x1),this[_0x58cd('0x50')](_0x58cd('0x40'),null),this['on'](_0x58cd('0x6a'),(_0x434ac0,_0x506570,_0x20c194,_0x8306b3)=>{const _0x244470=_0x20c194?rt(_0x20c194)['id']:null;if(_0x1218c4[_0x58cd('0x2c')][_0x58cd('0x1e')](()=>{if(_0x244470){const _0x5be9f=this[_0x58cd('0x49')](_0x244470);for(const _0x52c711 of _0x5be9f)_0x1218c4[_0x58cd('0x21')][_0x58cd('0x6')](_0x52c711);}if(_0x8306b3){const {id:_0xb8ad35}=rt(_0x8306b3),_0x6620f9=this[_0x58cd('0x49')](_0xb8ad35);for(const _0x269533 of _0x6620f9)_0x1218c4[_0x58cd('0x21')][_0x58cd('0x6')](_0x269533);}}),_0x244470){const _0x1fc5e1=_0x1218c4[_0x58cd('0x2f')][_0x58cd('0x14')](_0x2db59e)[_0x58cd('0xb')](_0x244470);_0x1fc5e1&&_0x1fc5e1['isResolved']&&this[_0x58cd('0x4e')](_0x244470);}}),this[_0x58cd('0x33')]=new Map();}['init'](){const _0x5045f9=this[_0x58cd('0x1a')],_0x14de2e=_0x5045f9[_0x58cd('0x2f')][_0x58cd('0x14')](_0x2db59e),_0x48d7d6=_0x5045f9[_0x58cd('0x43')][_0x58cd('0x14')](_0x58cd('0x4c'));_0x5045f9[_0x58cd('0x2a')][_0x58cd('0x6c')](_0x58cd('0x4'),new _0x25bb80(_0x5045f9)),this['listenTo'](_0x5045f9,'change:isReadOnly',(_0x3bdc35,_0xba12ce,_0x22d369)=>{_0x14de2e[_0x58cd('0x20')](_0x22d369,_0x5045f9['config']['get']('collaboration.channelId'));}),this[_0x58cd('0x32')](_0x14de2e,et('addCommentThread',_0x48d7d6),(_0x2456d4,{threadId:_0x4445d3})=>{const _0x3eea82=_0x5045f9[_0x58cd('0x2f')][_0x58cd('0x14')](_0x15bde8),_0x19da02=this[_0x58cd('0x1a')][_0x58cd('0x2f')]['get'](_0x2db59e)[_0x58cd('0xb')](_0x4445d3);if(_0x19da02&&_0x19da02['isResolved']&&!this[_0x58cd('0x33')][_0x58cd('0x6d')](_0x4445d3)){const _0x2c2899=_0x19da02['attachTo'](()=>this[_0x58cd('0x3d')](_0x19da02['id']));_0x3eea82['registerAnnotation'](_0x2c2899),this[_0x58cd('0x33')][_0x58cd('0x50')](_0x4445d3,[]),0x0===this[_0x58cd('0x49')](_0x4445d3)[_0x58cd('0x61')]&&(_0x19da02['_hasTargetInContent']=!0x1);}}),this[_0x58cd('0x32')](_0x14de2e,et(_0x58cd('0x4a'),_0x48d7d6),(_0x45af0f,{threadId:_0x549dec})=>{_0x5045f9[_0x58cd('0x2c')][_0x58cd('0x5f')]({'isUndoable':!0x1},_0x8f1aa7=>{const _0x58c5e1=this[_0x58cd('0x49')](_0x549dec);this[_0x58cd('0x33')][_0x58cd('0x64')](_0x549dec);for(const _0x2d6928 of _0x58c5e1)_0x8f1aa7[_0x58cd('0x1')](_0x2d6928);});},{'priority':_0x58cd('0x3f')}),this[_0x58cd('0x32')](_0x14de2e,et(_0x58cd('0x4f'),_0x48d7d6),(_0x2fc10f,{threadId:_0x15fc1a})=>{this['_reconvertMarkers'](_0x15fc1a),this[_0x58cd('0x1a')][_0x58cd('0x21')]['view']['hasDomSelection']&&this[_0x58cd('0x1a')][_0x58cd('0x21')]['view'][_0x58cd('0x3e')]();},{'priority':'low'}),this['listenTo'](_0x14de2e,et(_0x58cd('0x68'),_0x48d7d6),(_0x49808a,{threadId:_0x56c52e})=>{this[_0x58cd('0x36')](_0x56c52e);},{'priority':'low'}),this[_0x58cd('0x32')](_0x14de2e,et(_0x58cd('0x1d'),_0x48d7d6),(_0x4b4e3e,{threadId:_0x36a7ed,isFromAdapter:_0x335801})=>{const _0x1605cc=this[_0x58cd('0x49')](_0x36a7ed);if(_0x335801||0x0==_0x1605cc[_0x58cd('0x61')]||!_0x14de2e[_0x58cd('0x5e')](_0x36a7ed))return;0x1===_0x14de2e[_0x58cd('0xb')](_0x36a7ed)[_0x58cd('0x61')]&&_0x5045f9['model'][_0x58cd('0x5f')]({'isUndoable':!0x1},_0x1531e9=>{for(const _0x5e4b7b of _0x1605cc)_0x1531e9[_0x58cd('0x62')](_0x5e4b7b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this[_0x58cd('0x63')](),this[_0x58cd('0x17')]();}[_0x58cd('0x26')](){const _0x30d726=this[_0x58cd('0x1a')]['plugins']['get'](_0x2db59e),_0x531095=this['editor']['config']['get'](_0x58cd('0x4c'));for(const _0x5aab27 of _0x30d726['getCommentThreads']({'channelId':_0x531095}))_0x30d726[_0x58cd('0xd')](_0x5aab27['id']),_0x30d726[_0x58cd('0x71')]['delete'](_0x5aab27['id']);super[_0x58cd('0x26')]();}['hasMarkerForId'](_0x3aec93){return this[_0x58cd('0x49')](_0x3aec93)['length']>0x0;}[_0x58cd('0x49')](_0x1259a4){return(this[_0x58cd('0x33')]['get'](_0x1259a4)||[])['map'](_0x4ae2c1=>this['editor']['model'][_0x58cd('0x8')][_0x58cd('0x14')](_0x4ae2c1))['filter'](_0x4e20c3=>_0x4e20c3);}[_0x58cd('0x4e')](_0x3385d2){const _0x3ff9c7=this[_0x58cd('0x3d')](_0x3385d2);_0x3ff9c7&&setTimeout(()=>{this[_0x58cd('0x40')]&&rt(this['activeMarker'])['id']===_0x3385d2&&_0x899b87({'target':_0x3ff9c7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}[_0x58cd('0x36')](_0x13c64d){this[_0x58cd('0x1a')][_0x58cd('0x2c')][_0x58cd('0x1e')](()=>{for(const _0x4182ff of this[_0x58cd('0x49')](_0x13c64d))this['editor'][_0x58cd('0x21')][_0x58cd('0x6')](_0x4182ff);});}[_0x58cd('0x63')](){const _0x14437f=this[_0x58cd('0x1a')];_0x14437f[_0x58cd('0x29')][_0x58cd('0x70')](_0x58cd('0x18'))[_0x58cd('0x2')]({'model':_0x58cd('0x16'),'view':(_0x4a2024,_0x5aec66)=>{const {id:_0x5ab757}=rt(_0x4a2024['markerName']),_0x4d4d8e=_0x14437f[_0x58cd('0x2f')][_0x58cd('0x14')](_0x2db59e)['getCommentThread'](_0x5ab757),_0x137d95=this[_0x58cd('0x40')]&&rt(this[_0x58cd('0x40')])['id']===_0x5ab757;if(_0x4d4d8e&&_0x4d4d8e[_0x58cd('0x52')]&&!_0x137d95&&_0x4a2024[_0x58cd('0x57')])return _0x5aec66[_0x58cd('0x2e')][_0x58cd('0x31')](_0x4a2024[_0x58cd('0x57')],_0x58cd('0x6b')+_0x4a2024['markerName']),_0x5aec66[_0x58cd('0x2e')][_0x58cd('0x31')](_0x4a2024['item'],'removeMarker:'+_0x4a2024[_0x58cd('0x3a')]),{'classes':[]};const _0x12b812=[_0x58cd('0xa')];return _0x137d95&&_0x12b812[_0x58cd('0x66')](_0x58cd('0x6f')),{'classes':_0x12b812,'attributes':{'data-comment':_0x5ab757}};}}),_0x14437f[_0x58cd('0x29')][_0x58cd('0x70')](_0x58cd('0x6e'))[_0x58cd('0x15')]({'model':_0x58cd('0x16'),'view':(_0x2dee76,{options:_0x23a137})=>{const _0x49751c=_0x14437f['plugins'][_0x58cd('0x14')](_0x2db59e),_0x34c3f7=_0x14437f[_0x58cd('0x2c')][_0x58cd('0x8')][_0x58cd('0x14')](_0x2dee76),{id:_0x438979,part:_0x313c80}=rt(_0x2dee76);if(_0x34c3f7&&!_0x34c3f7[_0x58cd('0x59')])return null;if(_0x23a137['ignoreResolvedComments']){const _0x4590d1=_0x49751c[_0x58cd('0xb')](_0x438979);if(_0x4590d1&&_0x4590d1[_0x58cd('0x52')])return null;}return{'group':_0x58cd('0x16'),'name':_0x313c80?_0x438979+':'+_0x313c80:_0x438979};}}),_0x14437f[_0x58cd('0x29')][_0x58cd('0x70')]('upcast')[_0x58cd('0x10')]({'view':{'name':_0x58cd('0x16'),'attributes':{'id':/^\w/}},'model':(_0x35fe09,{writer:_0x14ccf9})=>_0x14ccf9[_0x58cd('0x0')](_0x58cd('0x19'),{'data-name':_0x58cd('0xc')+_0x35fe09[_0x58cd('0x56')]('id')})}),_0x14437f[_0x58cd('0x29')][_0x58cd('0x70')](_0x58cd('0x7'))[_0x58cd('0x4d')]({'view':_0x58cd('0x16')});}[_0x58cd('0x17')](){const _0xbce1b8=this[_0x58cd('0x1a')],_0x582d32=_0xbce1b8['plugins']['get'](_0x2db59e),_0x1a2a03=new Set();_0xbce1b8[_0x58cd('0x2c')]['document'][_0x58cd('0x4b')](_0x4a6ea1=>{let _0x5af01d=!0x1;for(const {name:_0x2d3479,data:_0x53f2ca}of _0xbce1b8[_0x58cd('0x2c')][_0x58cd('0x1c')][_0x58cd('0x5d')][_0x58cd('0x60')]()){const {group:_0x40319f,id:_0x57645b}=rt(_0x2d3479);let _0x18f8d2=_0x53f2ca[_0x58cd('0x67')];if('comment'!==_0x40319f||!_0x18f8d2)continue;const _0x2dfaf8='$graveyard'===_0x18f8d2[_0x58cd('0x41')][_0x58cd('0x28')];_0x2dfaf8||(_0x18f8d2=nt(_0x18f8d2,_0xbce1b8['model']),!_0x18f8d2||!_0x53f2ca[_0x58cd('0x67')]||_0x18f8d2[_0x58cd('0x1b')](_0x53f2ca[_0x58cd('0x67')]))?!_0x18f8d2||!_0xbce1b8[_0x58cd('0x2c')]['hasContent'](_0x18f8d2)||this['_attachedThreads'][_0x58cd('0x6d')](_0x57645b)&&_0x2dfaf8?(_0x4a6ea1[_0x58cd('0x1')](_0x2d3479),_0x5af01d=!0x0):_0x2dfaf8||(this['isThreadsLoadingPaused']?_0x1a2a03[_0x58cd('0x6c')](_0x2d3479):this[_0x58cd('0x45')](_0x2d3479,_0x57645b)):(_0x4a6ea1[_0x58cd('0x62')](_0x2d3479,{'range':_0x18f8d2}),_0x5af01d=!0x0);}return _0x5af01d;}),this['on']('change:isThreadsLoadingPaused',(_0x2fd9f1,_0xb9753,_0x5130de)=>{if(!_0x5130de&&_0x1a2a03['size'])for(const _0x3771b0 of _0x1a2a03){const {id:_0x3ee234}=rt(_0x3771b0);_0x1a2a03['delete'](_0x3ee234),_0xbce1b8['model'][_0x58cd('0x8')][_0x58cd('0x14')](_0x3771b0)&&this[_0x58cd('0x45')](_0x3771b0,_0x3ee234);}}),this['listenTo'](_0xbce1b8[_0x58cd('0x2c')][_0x58cd('0x1c')],_0x58cd('0x1e'),(_0x38cbe1,_0x2c3fc1)=>{for(const {name:_0x59cc25,data:{newRange:_0x36f5c6}}of _0xbce1b8[_0x58cd('0x2c')][_0x58cd('0x1c')][_0x58cd('0x5d')][_0x58cd('0x60')]()){const {group:_0x333a7f,id:_0x4e860b}=rt(_0x59cc25);if(_0x58cd('0x16')!==_0x333a7f)continue;const _0x9bdab1=_0x582d32[_0x58cd('0xb')](_0x4e860b),_0x6da7c8=this['hasMarkerForId'](_0x4e860b);_0x9bdab1&&(_0x9bdab1[_0x58cd('0x55')]||_0xbce1b8[_0x58cd('0x21')]['view'][_0x58cd('0x3b')](_0x58cd('0x23'),()=>{const _0x1a6dbe=_0xbce1b8[_0x58cd('0x2f')]['get'](_0x5bd54c),_0x2c71c7=_0x582d32[_0x58cd('0x12')][_0x58cd('0x14')](_0x9bdab1)[_0x58cd('0x5b')];_0x1a6dbe['getByInnerView'](_0x2c71c7)[_0x58cd('0x54')]();},{'priority':_0x58cd('0x39')}),_0x9bdab1[_0x58cd('0x55')]=_0x6da7c8||!!_0x36f5c6),!_0x36f5c6&&_0x2c3fc1[_0x58cd('0x47')]&&(_0x1a2a03['delete'](_0x4e860b),_0x9bdab1&&!_0x9bdab1[_0x58cd('0x52')]&&!_0x6da7c8&&this[_0x58cd('0x33')][_0x58cd('0x6d')](_0x4e860b)&&(this[_0x58cd('0x33')]['delete'](_0x4e860b),_0x9bdab1[_0x58cd('0x9')]()));}});}[_0x58cd('0x3d')](_0x458d8b){const _0x20587a=this[_0x58cd('0x1a')],_0x28e725=this['getAllMarkersForId'](_0x458d8b);return _0xf74d44(_0x20587a['editing'],_0x28e725);}[_0x58cd('0x30')](_0x120164){const _0x12d3cb=this[_0x58cd('0x49')](_0x120164);let _0x2610e8='',_0x44fcdc=!0x1;for(const _0xe5e00e of _0x12d3cb){const _0x38683b=_0xe5e00e[_0x58cd('0x2d')]();for(const _0x1f48cd of Array[_0x58cd('0x51')](_0x38683b[_0x58cd('0x46')]()))_0x1f48cd['is'](_0x58cd('0x53'))?(_0x2610e8&&_0x44fcdc&&(_0x2610e8+='\x20',_0x44fcdc=!0x1),_0x2610e8+=_0x1f48cd[_0x58cd('0x42')]):_0x44fcdc=!0x0;_0x44fcdc=!0x0;}return _0x2610e8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x396fec,_0x387251){const _0x48ad5e=this[_0x58cd('0x1a')],_0x197584=_0x48ad5e[_0x58cd('0x2f')][_0x58cd('0x14')](_0x2db59e);let _0x2d3974=_0x197584['getCommentThread'](_0x387251);if(this[_0x58cd('0x33')]['has'](_0x387251)){const _0x424ec3=this[_0x58cd('0x33')][_0x58cd('0x14')](_0x387251);return _0x424ec3[_0x58cd('0x72')](_0x396fec)||_0x424ec3[_0x58cd('0x66')](_0x396fec),_0x2d3974;}this['_attachedThreads'][_0x58cd('0x50')](_0x387251,[_0x396fec]);const _0x3f25d1=_0x48ad5e[_0x58cd('0x43')]['get'](_0x58cd('0x4c')),_0x5d4e64=_0x48ad5e[_0x58cd('0x2f')][_0x58cd('0x14')](_0x15bde8);if(_0x2d3974&&_0x2d3974['isResolved'])return _0x2d3974[_0x58cd('0x44')](),_0x2d3974;return!this[_0x58cd('0x49')](_0x387251)[0x0][_0x58cd('0x35')]?_0x48ad5e[_0x58cd('0x21')][_0x58cd('0x5b')][_0x58cd('0x3b')](_0x58cd('0x23'),()=>{const _0x25cdee=_0x48ad5e['plugins'][_0x58cd('0x14')](_0x5bd54c);_0x2d3974=_0x197584[_0x58cd('0x1f')]({'channelId':_0x3f25d1,'threadId':_0x387251,'target':()=>this[_0x58cd('0x3d')](_0x387251),'context':{'type':_0x58cd('0x24'),'value':this[_0x58cd('0x30')](_0x387251)}});const _0x239339=_0x197584[_0x58cd('0x12')][_0x58cd('0x14')](_0x2d3974)['view'],_0x2b2b9f=_0x25cdee[_0x58cd('0x11')](_0x239339);_0x2b2b9f&&_0x5d4e64['registerAnnotation'](_0x2b2b9f);},{'priority':'low'}):_0x197584[_0x58cd('0x5a')]({'channelId':_0x3f25d1,'threadId':_0x387251})[_0x58cd('0x37')](_0x211457=>{if(_0x58cd('0x3')!==_0x48ad5e['state']){if(_0x2d3974=_0x211457,_0x2d3974){const _0x1f5745=_0x2d3974['attachTo'](()=>this[_0x58cd('0x3d')](_0x387251));_0x5d4e64[_0x58cd('0x5c')](_0x1f5745),_0x2d3974[_0x58cd('0x52')]&&this['_reconvertMarkers'](_0x387251);}else{const _0x5db364=this[_0x58cd('0x49')](_0x387251);_0x48ad5e[_0x58cd('0x2c')][_0x58cd('0x1e')](_0x2c0efd=>{for(const _0x4ea650 of _0x5db364)_0x2c0efd[_0x58cd('0x1')](_0x4ea650);});}}}),_0x2d3974;}[_0x58cd('0x45')](_0x3fad92,_0x55ea7c){const _0x91accd=this[_0x58cd('0x58')](_0x3fad92,_0x55ea7c);_0x91accd&&!_0x91accd[_0x58cd('0xf')]&&_0x91accd[_0x58cd('0x34')]({'type':_0x58cd('0x24'),'value':this[_0x58cd('0x30')](_0x55ea7c)});}}function et(_0x3284bf,_0x1daa96){return _0x1daa96?_0x3284bf+':'+_0x1daa96:_0x3284bf;}function rt(_0x47dcd5){const _0x31accf=_0x47dcd5[_0x58cd('0x27')](':');return{'group':_0x31accf[0x0],'id':_0x31accf[0x1],'part':_0x31accf[0x2]};}function nt(_0x3f63fc,_0x2baf0e){const _0xa2fdb7=_0x2baf0e[_0x58cd('0x65')],_0x1c436f=_0x2baf0e[_0x58cd('0x48')](_0x3f63fc[_0x58cd('0x2b')]);for(const _0xec7add of _0x3f63fc[_0x58cd('0x22')]()){const {type:_0x4cdecb,item:_0x1fff85,nextPosition:_0x5afb4c}=_0xec7add;if(_0x58cd('0x24')===_0x4cdecb||_0xa2fdb7[_0x58cd('0x3c')](_0x1fff85)){const _0x5c25bb=_0x2baf0e[_0x58cd('0x5')](_0x1fff85);_0x1c436f['isCollapsed']&&(_0x1c436f['start']=_0x5c25bb),_0x1c436f[_0x58cd('0x25')]=_0x5afb4c;}}return _0x1c436f[_0x58cd('0x13')]?null:_0x1c436f;}
23
+ const _0x3bba=['_hasTargetInContent','destroy','openNewCommentThread','editingDowncast','collaboration.channelId','hasContent','change:isThreadsLoadingPaused','_handleMarkerAddAndRemove','getChangedMarkers','_attachMarkerToThread','attachTo','registerPostFixer','change:isReadOnly','state','length','item','_autoResolvedThreads','substring','_attachResolvedThread','differ','_detachCommentThread','reconvertMarker','rootName','from','render','markerToData','split','scrollToThreadMarker','consume','low','_attachedThreads','isCollapsed','ck-comment-marker--active','editor','dataDowncast','createPositionBefore','config','requires','ignoreResolvedComments','comment:','removeMarker','markerName','_reconvertMarkers','_threads','resolveCommentThread','updateMarker','$graveyard','hasMarkerForId','createElement','isEqual','delete','ready','isResolved','isLocal','view','high','newRange','removeMarker:','destroyed','affectsData','init','isThreadsLoadingPaused','editing','set','$textProxy','reopen','ck-comment-marker','clear','getCommentThreads','_getTargetForId','text','markers','focus','getItems','has','getCommentThread','end','start','getAllMarkersForId','upcast','model','pluginName','CommentsEditing','comment','plugins','conversion','get','listenTo','once','change','_threadToController','setContext','resolve','addCommentThread','hasDomSelection','_removedThread','$marker','_initializeMarkerConverters','removeCommentThread','for','_handleThreadMarker','add','registerAnnotation','data','filter','fetchCommentThread','consumable','hasCommentThread','getByInnerView','refreshVisibility','dataToMarker','_getTextContext','map','push','isObject','getRange','getAttribute','activeMarker','reopenCommentThread'];(function(_0x2e3b4c,_0x3bba7e){const _0x3e7b3a=function(_0x285168){while(--_0x285168){_0x2e3b4c['push'](_0x2e3b4c['shift']());}};_0x3e7b3a(++_0x3bba7e);}(_0x3bba,0x126));const _0x3e7b=function(_0x2e3b4c,_0x3bba7e){_0x2e3b4c=_0x2e3b4c-0x0;let _0x3e7b3a=_0x3bba[_0x2e3b4c];return _0x3e7b3a;};import{Plugin as _0x18c9f0}from'ckeditor5/src/core';import{scrollViewportToShowTarget as _0x33c97f}from'ckeditor5/src/utils';import _0x536918 from'./commentsrepository';import _0x21db5e from'./addcommentthreadcommand';import{getAllMarkersDomElementsSorted as _0x22f157}from'ckeditor5-collaboration/src/collaboration-core';import _0x5e3bee from'../annotations/editorannotations';import _0x13a517 from'./integrations/commentsrestrictededitingmode';import'../../theme/commentmarker.css';import _0x1752af from'./integrations/importword';import _0x2c61ab from'../annotations/annotations';export default class r extends _0x18c9f0{static get[_0x3e7b('0x64')](){return[_0x536918,_0x5e3bee,_0x13a517,_0x1752af];}static get[_0x3e7b('0x19')](){return _0x3e7b('0x1a');}constructor(_0x2062db){super(_0x2062db),this['_removedThread']=null,this['_autoResolvedThreads']=new Set(),this['set'](_0x3e7b('0x5'),!0x0),_0x2062db[_0x3e7b('0x2f')]['once'](_0x3e7b('0x72'),()=>this[_0x3e7b('0x5')]=!0x1),this[_0x3e7b('0x7')]('activeMarker',null),this['on']('change:activeMarker',(_0x4cd105,_0xfffe3b,_0x3c18e7,_0x586739)=>{const _0x3ee0c0=_0x3c18e7?tt(_0x3c18e7)['id']:null;if(_0x2062db[_0x3e7b('0x18')][_0x3e7b('0x21')](()=>{if(_0x3ee0c0){const _0x19a63c=this[_0x3e7b('0x16')](_0x3ee0c0);for(const _0x9be131 of _0x19a63c)_0x2062db['editing']['reconvertMarker'](_0x9be131);}if(_0x586739){const {id:_0x2b0bd6}=tt(_0x586739),_0x3864a8=this[_0x3e7b('0x16')](_0x2b0bd6);for(const _0x16b733 of _0x3864a8)_0x2062db[_0x3e7b('0x6')][_0x3e7b('0x54')](_0x16b733);}}),_0x3ee0c0){const _0x2735dd=_0x2062db['plugins'][_0x3e7b('0x1e')](_0x536918)['getCommentThread'](_0x3ee0c0);_0x2735dd&&_0x2735dd[_0x3e7b('0x73')]&&this[_0x3e7b('0x5a')](_0x3ee0c0);}}),this['_attachedThreads']=new Map();}[_0x3e7b('0x4')](){const _0x4299fe=this['editor'],_0x13afed=_0x4299fe[_0x3e7b('0x1c')]['get'](_0x536918),_0x4a4bd0=_0x4299fe['config'][_0x3e7b('0x1e')](_0x3e7b('0x43'));_0x4299fe['commands'][_0x3e7b('0x2d')](_0x3e7b('0x25'),new _0x21db5e(_0x4299fe)),this[_0x3e7b('0x1f')](_0x4299fe,_0x3e7b('0x4b'),(_0x2b078b,_0x500d2b,_0x115625)=>{_0x13afed['switchReadOnly'](_0x115625,_0x4299fe[_0x3e7b('0x63')][_0x3e7b('0x1e')]('collaboration.channelId'));}),this['listenTo'](_0x13afed,Z(_0x3e7b('0x25'),_0x4a4bd0),(_0x12ffea,{threadId:_0xc9d253})=>{const _0x213acc=this['editor'][_0x3e7b('0x1c')][_0x3e7b('0x1e')](_0x536918)[_0x3e7b('0x13')](_0xc9d253);_0x213acc&&_0x213acc[_0x3e7b('0x73')]&&this[_0x3e7b('0x51')](_0xc9d253);}),this['listenTo'](_0x13afed,Z(_0x3e7b('0x2a'),_0x4a4bd0),(_0x33589b,{threadId:_0x2d1372})=>{_0x4299fe[_0x3e7b('0x18')]['enqueueChange']({'isUndoable':!0x1},_0x21e148=>{const _0x578b2e=this[_0x3e7b('0x16')](_0x2d1372);this[_0x3e7b('0x5d')]['delete'](_0x2d1372),this[_0x3e7b('0x27')]=_0x2d1372;for(const _0x3c8be7 of _0x578b2e)_0x21e148[_0x3e7b('0x67')](_0x3c8be7);}),this[_0x3e7b('0x27')]=null;},{'priority':_0x3e7b('0x76')}),this[_0x3e7b('0x1f')](_0x13afed,Z(_0x3e7b('0x6b'),_0x4a4bd0),(_0x533ca6,{threadId:_0x1df717})=>{this[_0x3e7b('0x51')](_0x1df717),this[_0x3e7b('0x69')](_0x1df717),this[_0x3e7b('0x60')]['editing'][_0x3e7b('0x75')][_0x3e7b('0x26')]&&this['editor'][_0x3e7b('0x6')][_0x3e7b('0x75')][_0x3e7b('0x10')]();},{'priority':_0x3e7b('0x5c')}),this[_0x3e7b('0x1f')](_0x13afed,Z(_0x3e7b('0x3e'),_0x4a4bd0),(_0x1b0bf2,{threadId:_0x49c5db})=>{this[_0x3e7b('0x69')](_0x49c5db);},{'priority':_0x3e7b('0x5c')}),this['listenTo'](_0x13afed,Z('addComment',_0x4a4bd0),(_0x12c436,{threadId:_0x139e4c,isFromAdapter:_0x587102})=>{const _0xe5254=this[_0x3e7b('0x16')](_0x139e4c);if(_0x587102||0x0==_0xe5254['length']||!_0x13afed[_0x3e7b('0x33')](_0x139e4c))return;0x1===_0x13afed[_0x3e7b('0x13')](_0x139e4c)[_0x3e7b('0x4d')]&&_0x4299fe['model']['enqueueChange']({'isUndoable':!0x1},_0x111708=>{for(const _0x4b78a2 of _0xe5254)_0x111708[_0x3e7b('0x6c')](_0x4b78a2,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this[_0x3e7b('0x29')](),this[_0x3e7b('0x46')]();}[_0x3e7b('0x40')](){const _0x8f9e5c=this['editor'][_0x3e7b('0x1c')][_0x3e7b('0x1e')](_0x536918),_0x1b5f81=this[_0x3e7b('0x60')]['config']['get'](_0x3e7b('0x43'));for(const _0x5d59d4 of _0x8f9e5c[_0x3e7b('0xc')]({'channelId':_0x1b5f81}))_0x8f9e5c[_0x3e7b('0x53')](_0x5d59d4['id']),_0x8f9e5c[_0x3e7b('0x6a')][_0x3e7b('0x71')](_0x5d59d4['id']);super[_0x3e7b('0x40')]();}[_0x3e7b('0x6e')](_0xabade9){return this[_0x3e7b('0x16')](_0xabade9)['length']>0x0;}[_0x3e7b('0x16')](_0x20b5a3){return Array[_0x3e7b('0x56')](this['_attachedThreads'][_0x3e7b('0x1e')](_0x20b5a3)||[])[_0x3e7b('0x38')](_0x22f930=>this['editor'][_0x3e7b('0x18')][_0x3e7b('0xf')][_0x3e7b('0x1e')](_0x22f930))[_0x3e7b('0x30')](_0x52f130=>_0x52f130);}['scrollToThreadMarker'](_0x41ba95){const _0x24854c=this['_getTargetForId'](_0x41ba95);_0x24854c&&setTimeout(()=>{this[_0x3e7b('0x3d')]&&tt(this[_0x3e7b('0x3d')])['id']===_0x41ba95&&_0x33c97f({'target':_0x24854c[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}[_0x3e7b('0x69')](_0x17f447){this[_0x3e7b('0x60')][_0x3e7b('0x18')][_0x3e7b('0x21')](()=>{for(const _0x3d54f1 of this['getAllMarkersForId'](_0x17f447))this[_0x3e7b('0x60')]['editing']['reconvertMarker'](_0x3d54f1);});}[_0x3e7b('0x51')](_0x256469){const _0xd4d5bc=this[_0x3e7b('0x60')]['plugins'][_0x3e7b('0x1e')](_0x536918),_0x2f6b5f=this[_0x3e7b('0x60')]['plugins'][_0x3e7b('0x1e')](_0x5e3bee),_0x258e76=_0xd4d5bc[_0x3e7b('0x13')](_0x256469);if(!this[_0x3e7b('0x5d')]['has'](_0x256469)){const _0x21bd12=_0x258e76[_0x3e7b('0x49')](()=>this[_0x3e7b('0xd')](_0x258e76['id']));_0x2f6b5f[_0x3e7b('0x2e')](_0x21bd12),this[_0x3e7b('0x5d')][_0x3e7b('0x7')](_0x256469,new Set()),_0x258e76[_0x3e7b('0x3f')]=!0x1;}}[_0x3e7b('0x29')](){const _0x559c48=this['editor'];_0x559c48['conversion'][_0x3e7b('0x2b')](_0x3e7b('0x42'))['markerToHighlight']({'model':_0x3e7b('0x1b'),'view':(_0x177bf7,_0x1825e0)=>{const {id:_0x1a4606}=tt(_0x177bf7[_0x3e7b('0x68')]),_0x449999=_0x559c48[_0x3e7b('0x1c')][_0x3e7b('0x1e')](_0x536918)[_0x3e7b('0x13')](_0x1a4606),_0xc41db2=this['activeMarker']&&tt(this['activeMarker'])['id']===_0x1a4606;if(_0x449999&&_0x449999[_0x3e7b('0x73')]&&!_0xc41db2&&_0x177bf7['item'])return _0x1825e0[_0x3e7b('0x32')][_0x3e7b('0x5b')](_0x177bf7['item'],'addMarker:'+_0x177bf7[_0x3e7b('0x68')]),_0x1825e0['consumable'][_0x3e7b('0x5b')](_0x177bf7[_0x3e7b('0x4e')],_0x3e7b('0x1')+_0x177bf7[_0x3e7b('0x68')]),{'classes':[]};const _0x15590d=[_0x3e7b('0xa')];return _0xc41db2&&_0x15590d[_0x3e7b('0x39')](_0x3e7b('0x5f')),{'classes':_0x15590d,'attributes':{'data-comment':_0x1a4606}};}}),_0x559c48[_0x3e7b('0x1d')][_0x3e7b('0x2b')](_0x3e7b('0x61'))[_0x3e7b('0x58')]({'model':_0x3e7b('0x1b'),'view':(_0x1afe64,{options:_0x26dabc})=>{const _0x15b060=_0x559c48[_0x3e7b('0x1c')]['get'](_0x536918),_0x5893bc=_0x559c48['model'][_0x3e7b('0xf')]['get'](_0x1afe64),{id:_0x4c7d50,part:_0x436b0e}=tt(_0x1afe64);if(_0x5893bc&&!_0x5893bc[_0x3e7b('0x3')])return null;if(_0x26dabc[_0x3e7b('0x65')]){const _0x4c66cf=_0x15b060[_0x3e7b('0x13')](_0x4c7d50);if(_0x4c66cf&&_0x4c66cf[_0x3e7b('0x73')])return null;}return{'group':'comment','name':_0x436b0e?_0x4c7d50+':'+_0x436b0e:_0x4c7d50};}}),_0x559c48['conversion'][_0x3e7b('0x2b')](_0x3e7b('0x17'))['elementToElement']({'view':{'name':_0x3e7b('0x1b'),'attributes':{'id':/^\w/}},'model':(_0x42e24c,{writer:_0x4664f8})=>_0x4664f8[_0x3e7b('0x6f')](_0x3e7b('0x28'),{'data-name':_0x3e7b('0x66')+_0x42e24c[_0x3e7b('0x3c')]('id')})}),_0x559c48[_0x3e7b('0x1d')][_0x3e7b('0x2b')](_0x3e7b('0x17'))[_0x3e7b('0x36')]({'view':_0x3e7b('0x1b')});}['_handleMarkerAddAndRemove'](){const _0x422ff4=this[_0x3e7b('0x60')],_0x36a581=_0x422ff4['plugins'][_0x3e7b('0x1e')](_0x536918),_0x51ba66=new Set(),_0x4fe00e=new Set();_0x422ff4[_0x3e7b('0x18')]['document'][_0x3e7b('0x4a')](_0x4ae758=>{let _0x5c3098=!0x1;for(const {name:_0x47bf65,data:_0x504e49}of _0x422ff4[_0x3e7b('0x18')]['document'][_0x3e7b('0x52')][_0x3e7b('0x47')]()){const {group:_0x319329,id:_0x54a9b5}=tt(_0x47bf65);let _0x5137a9=_0x504e49[_0x3e7b('0x0')];if('comment'!==_0x319329||!_0x5137a9)continue;const _0x543458=_0x3e7b('0x6d')===_0x5137a9['root'][_0x3e7b('0x55')];_0x543458||(_0x5137a9=ot(_0x5137a9,_0x422ff4[_0x3e7b('0x18')]),!_0x5137a9||_0x5137a9[_0x3e7b('0x5e')]||!_0x504e49['newRange']||_0x5137a9[_0x3e7b('0x70')](_0x504e49[_0x3e7b('0x0')]))?_0x422ff4[_0x3e7b('0x18')][_0x3e7b('0x44')](_0x5137a9)&&!_0x543458?this['isThreadsLoadingPaused']?_0x51ba66[_0x3e7b('0x2d')](_0x47bf65):this['_handleThreadMarker'](_0x47bf65,_0x54a9b5):(_0x4fe00e[_0x3e7b('0x2d')](_0x47bf65),_0x51ba66[_0x3e7b('0x71')](_0x47bf65),_0x4ae758[_0x3e7b('0x67')](_0x47bf65),_0x5c3098=!0x0):(_0x4ae758[_0x3e7b('0x6c')](_0x47bf65,{'range':_0x5137a9}),_0x5c3098=!0x0);}return _0x5c3098;}),this['on'](_0x3e7b('0x45'),(_0x17bc5f,_0x41ccad,_0x1f0e37)=>{if(!_0x1f0e37&&_0x51ba66['size'])for(const _0x1e0c16 of _0x51ba66){const {id:_0x5b5844}=tt(_0x1e0c16);_0x51ba66[_0x3e7b('0x71')](_0x1e0c16),_0x422ff4[_0x3e7b('0x18')][_0x3e7b('0xf')]['get'](_0x1e0c16)&&this[_0x3e7b('0x2c')](_0x1e0c16,_0x5b5844);}}),this['listenTo'](_0x422ff4['model']['document'],_0x3e7b('0x21'),(_0x1fcab5,_0x4e35e0)=>{for(const {name:_0x4a1072,data:{newRange:_0x3c9f96}}of _0x422ff4[_0x3e7b('0x18')]['document'][_0x3e7b('0x52')]['getChangedMarkers']()){const {group:_0x359f33,id:_0x1557d9}=tt(_0x4a1072);if(_0x3e7b('0x1b')!==_0x359f33)continue;const _0x41f4b8=_0x36a581[_0x3e7b('0x13')](_0x1557d9),_0x59ce36=this[_0x3e7b('0x6e')](_0x1557d9);_0x41f4b8&&(_0x41f4b8[_0x3e7b('0x3f')]||_0x422ff4[_0x3e7b('0x6')]['view']['once'](_0x3e7b('0x57'),()=>{const _0x1c4d3b=_0x422ff4[_0x3e7b('0x1c')][_0x3e7b('0x1e')](_0x2c61ab),_0x3a18d2=_0x36a581['_threadToController']['get'](_0x41f4b8)['view'];_0x1c4d3b[_0x3e7b('0x34')](_0x3a18d2)[_0x3e7b('0x35')]();},{'priority':_0x3e7b('0x5c')}),_0x41f4b8[_0x3e7b('0x3f')]=_0x59ce36||!!_0x3c9f96),_0x3c9f96||(_0x4fe00e[_0x3e7b('0x2d')](_0x4a1072),_0x51ba66['delete'](_0x4a1072),this[_0x3e7b('0x5d')][_0x3e7b('0x12')](_0x1557d9)&&this[_0x3e7b('0x5d')][_0x3e7b('0x1e')](_0x1557d9)['delete'](_0x4a1072));}if(_0x4e35e0[_0x3e7b('0x74')])for(const _0x1a9103 of _0x4fe00e){const {id:_0x537d75}=tt(_0x1a9103),_0x4889ea=_0x36a581[_0x3e7b('0x13')](_0x537d75),_0x1a4e67=this['hasMarkerForId'](_0x537d75);_0x51ba66[_0x3e7b('0x71')](_0x1a9103),!_0x4889ea||_0x1a4e67||_0x4889ea['isResolved']||this['_removedThread']===_0x537d75||(this['_autoResolvedThreads']['add'](_0x4889ea),_0x4889ea[_0x3e7b('0x24')]());}_0x4fe00e[_0x3e7b('0xb')]();});}['_getTargetForId'](_0x4e73f0){const _0x2756b9=this[_0x3e7b('0x60')],_0x29f4d2=this[_0x3e7b('0x16')](_0x4e73f0);return _0x22f157(_0x2756b9[_0x3e7b('0x6')],_0x29f4d2);}[_0x3e7b('0x37')](_0x40430b){const _0x4333f8=this[_0x3e7b('0x16')](_0x40430b);let _0x5f14f1='',_0x2fa7f3=!0x1;for(const _0x93354d of _0x4333f8){const _0x55ff9b=_0x93354d[_0x3e7b('0x3b')]();for(const _0x5d9019 of Array[_0x3e7b('0x56')](_0x55ff9b[_0x3e7b('0x11')]()))_0x5d9019['is'](_0x3e7b('0x8'))?(_0x5f14f1&&_0x2fa7f3&&(_0x5f14f1+='\x20',_0x2fa7f3=!0x1),_0x5f14f1+=_0x5d9019[_0x3e7b('0x2f')]):_0x2fa7f3=!0x0;_0x2fa7f3=!0x0;}return _0x5f14f1[_0x3e7b('0x50')](0x0,0x96);}[_0x3e7b('0x48')](_0x206b9a,_0x7cd6a5){const _0x4afcf4=this[_0x3e7b('0x60')],_0x5c18bc=_0x4afcf4['plugins'][_0x3e7b('0x1e')](_0x536918);let _0x78623=_0x5c18bc['getCommentThread'](_0x7cd6a5);if(this[_0x3e7b('0x5d')][_0x3e7b('0x12')](_0x7cd6a5)){const _0x504c98=this['_attachedThreads']['get'](_0x7cd6a5);_0x504c98[_0x3e7b('0x12')](_0x206b9a)||_0x504c98[_0x3e7b('0x2d')](_0x206b9a);}const _0x500740=_0x4afcf4[_0x3e7b('0x63')][_0x3e7b('0x1e')](_0x3e7b('0x43')),_0x2b3e27=_0x4afcf4[_0x3e7b('0x1c')]['get'](_0x5e3bee);if(_0x78623&&_0x78623[_0x3e7b('0x73')]&&this[_0x3e7b('0x4f')][_0x3e7b('0x12')](_0x78623)&&(this['_autoResolvedThreads'][_0x3e7b('0x71')](_0x78623),_0x78623[_0x3e7b('0x9')]()),this[_0x3e7b('0x5d')][_0x3e7b('0x12')](_0x7cd6a5))return _0x78623;return this[_0x3e7b('0x5d')][_0x3e7b('0x7')](_0x7cd6a5,new Set([_0x206b9a])),(!this[_0x3e7b('0x16')](_0x7cd6a5)[0x0]['managedUsingOperations']?_0x4afcf4[_0x3e7b('0x6')]['view'][_0x3e7b('0x20')](_0x3e7b('0x57'),()=>{const _0x5bc433=_0x4afcf4['plugins'][_0x3e7b('0x1e')](_0x2c61ab);_0x78623=_0x5c18bc[_0x3e7b('0x41')]({'channelId':_0x500740,'threadId':_0x7cd6a5,'target':()=>this[_0x3e7b('0xd')](_0x7cd6a5),'context':{'type':_0x3e7b('0xe'),'value':this[_0x3e7b('0x37')](_0x7cd6a5)}});const _0x2e0889=_0x5c18bc[_0x3e7b('0x22')][_0x3e7b('0x1e')](_0x78623)[_0x3e7b('0x75')],_0x1dcd80=_0x5bc433[_0x3e7b('0x34')](_0x2e0889);_0x1dcd80&&_0x2b3e27[_0x3e7b('0x2e')](_0x1dcd80);},{'priority':_0x3e7b('0x5c')}):_0x5c18bc[_0x3e7b('0x31')]({'channelId':_0x500740,'threadId':_0x7cd6a5})['then'](_0x1327b8=>{if(_0x3e7b('0x2')!==_0x4afcf4[_0x3e7b('0x4c')]){if(_0x78623=_0x1327b8,_0x78623){const _0x189f91=_0x78623['attachTo'](()=>this[_0x3e7b('0xd')](_0x7cd6a5));_0x2b3e27['registerAnnotation'](_0x189f91),_0x78623['isResolved']&&this[_0x3e7b('0x69')](_0x7cd6a5);}else{const _0x6a0eee=this[_0x3e7b('0x16')](_0x7cd6a5);_0x4afcf4[_0x3e7b('0x18')]['change'](_0x1ba31c=>{for(const _0x329f1b of _0x6a0eee)_0x1ba31c[_0x3e7b('0x67')](_0x329f1b);});}}}),_0x78623);}[_0x3e7b('0x2c')](_0x2cadc9,_0x2dcbea){const _0x572ea6=this[_0x3e7b('0x48')](_0x2cadc9,_0x2dcbea);_0x572ea6&&!_0x572ea6['context']&&_0x572ea6[_0x3e7b('0x23')]({'type':_0x3e7b('0xe'),'value':this[_0x3e7b('0x37')](_0x2dcbea)});}}function Z(_0x3554e4,_0x27dfbd){return _0x27dfbd?_0x3554e4+':'+_0x27dfbd:_0x3554e4;}function tt(_0x1f1f29){const _0x18be27=_0x1f1f29[_0x3e7b('0x59')](':');return{'group':_0x18be27[0x0],'id':_0x18be27[0x1],'part':_0x18be27[0x2]};}function ot(_0x4cb63d,_0x43a507){const _0x55357a=_0x43a507['schema'],_0x357ee9=_0x43a507['createRange'](_0x4cb63d[_0x3e7b('0x15')]);for(const _0x3f02a3 of _0x4cb63d['getWalker']()){const {type:_0x5a32f7,item:_0x3cbbcb,nextPosition:_0x46b9a4}=_0x3f02a3;if(_0x3e7b('0xe')===_0x5a32f7||_0x55357a[_0x3e7b('0x3a')](_0x3cbbcb)){const _0x42e903=_0x43a507[_0x3e7b('0x62')](_0x3cbbcb);_0x357ee9[_0x3e7b('0x5e')]&&(_0x357ee9[_0x3e7b('0x15')]=_0x42e903),_0x357ee9[_0x3e7b('0x14')]=_0x46b9a4;}}return _0x357ee9;}
@@ -1,8 +1,12 @@
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
+ */
1
5
  /**
2
6
  * @module comments/comments/commentsrepository
3
7
  * @publicApi
4
8
  */
5
- import { Context, PendingActions, ContextPlugin, type Editor } from 'ckeditor5/src/core';
9
+ import { Context, PendingActions, ContextPlugin, Editor } from 'ckeditor5/src/core';
6
10
  import { Collection } from 'ckeditor5/src/utils';
7
11
  import { Users, type User } from 'ckeditor5-collaboration/src/collaboration-core';
8
12
  import CommentThreadController from './ui/commentthreadcontroller';
@@ -245,11 +249,11 @@ interface CommentPermissionsConfig {
245
249
  */
246
250
  admin: boolean;
247
251
  /**
248
- * Allows for editing and removing any comments created by any user.
252
+ * Allows for editing and removing any comments created by other users.
249
253
  */
250
254
  modifyAll: boolean;
251
255
  /**
252
- * Allows for editing and removing comments created by this user.
256
+ * Allows for adding new comments as well as editing and removing comments created by this user.
253
257
  */
254
258
  write: boolean;
255
259
  /**
@@ -278,6 +282,12 @@ export declare class CommentThread extends CommentThread_base {
278
282
  * @observable
279
283
  */
280
284
  isRemovable: boolean;
285
+ /**
286
+ * Informs if a user has permission to add a new comment to the comment thread.
287
+ *
288
+ * @observable
289
+ */
290
+ canComment: boolean;
281
291
  /**
282
292
  * User id which resolved the comment thread.
283
293
  *
@@ -290,6 +300,12 @@ export declare class CommentThread extends CommentThread_base {
290
300
  * @observable
291
301
  */
292
302
  resolvedAt: Date | null;
303
+ /**
304
+ * Date when the comment thread has been removed.
305
+ *
306
+ * @observable
307
+ */
308
+ deletedAt: Date | null;
293
309
  /**
294
310
  * Informs if the comment thread is resolved.
295
311
  *
@@ -323,6 +339,7 @@ export declare class CommentThread extends CommentThread_base {
323
339
  attributes: Record<string, unknown>;
324
340
  resolvedAt: Date | null;
325
341
  resolvedBy: User | null;
342
+ deletedAt: Date | null;
326
343
  isResolvable: boolean;
327
344
  isSubmitted: boolean;
328
345
  });