@ckeditor/ckeditor5-comments 47.7.1 → 47.7.2

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 (194) hide show
  1. package/build/comments.js +1 -1
  2. package/dist/index.js +11 -11
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +19 -19
  150. package/src/annotations/annotation.js +2 -2
  151. package/src/annotations/annotationcollection.js +1 -1
  152. package/src/annotations/annotations.js +1 -1
  153. package/src/annotations/annotationsuis.js +1 -1
  154. package/src/annotations/editorannotations.js +1 -1
  155. package/src/annotations/inlineannotations.js +1 -1
  156. package/src/annotations/narrowsidebar.js +1 -1
  157. package/src/annotations/sidebar.js +1 -1
  158. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  159. package/src/annotations/view/annotationview.js +1 -1
  160. package/src/annotations/view/sidebaritemview.js +2 -2
  161. package/src/annotations/view/sidebarview.js +2 -2
  162. package/src/annotations/widesidebar.js +1 -1
  163. package/src/comments/addcommentthreadcommand.js +1 -1
  164. package/src/comments/commentsarchive.js +1 -1
  165. package/src/comments/commentsarchiveui.js +1 -1
  166. package/src/comments/commentsediting.js +1 -1
  167. package/src/comments/commentsrepository.js +3 -3
  168. package/src/comments/commentsui.js +1 -1
  169. package/src/comments/integrations/clipboard.js +1 -1
  170. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  171. package/src/comments/integrations/importword.js +1 -1
  172. package/src/comments/integrations/showcommenthighlights.js +1 -1
  173. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  174. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  175. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  176. package/src/comments/ui/commentthreadcontroller.js +2 -2
  177. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  178. package/src/comments/ui/view/basecommentview.js +1 -1
  179. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  180. package/src/comments/ui/view/commentcontentview.js +1 -1
  181. package/src/comments/ui/view/commentinputview.js +1 -1
  182. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  183. package/src/comments/ui/view/commentslistview.js +1 -1
  184. package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
  185. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  186. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  187. package/src/comments/ui/view/commentthreadview.js +2 -2
  188. package/src/comments/ui/view/commentview.js +2 -2
  189. package/src/comments.js +1 -1
  190. package/src/commentsonly.js +1 -1
  191. package/src/index.js +1 -1
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/createmutationobserver.js +1 -1
  194. package/src/utils/splitmarkername.js +1 -1
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x45f233,ContextPlugin as _0x1570af,PendingActions as lt,Command as _0x3b02de,Plugin as _0x58c0a0,Context as _0xb1f4b9}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x412ccb,uid as _0x4a8c36,KeystrokeHandler as jt,FocusTracker as _0x58afd6,diff as _0x147a32,Collection as _0x262a30,Rect as _0x55e497,CKEditorError as _0x5425ea,first as _0x31fba4,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x320921,keyCodes as _0x22c2bb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2e6ce5,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1ffa79,trimHtml as ts,LateFocusDropdownButtonView as _0x282161,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1104be}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x20bca9}from'es-toolkit/compat';import{IconUndo as _0x24f814,IconCheck as _0x17a7cb,IconPencil as _0x40152c,IconRemoveComment as _0x4247e1,IconThreeVerticalDots as _0x43a357,IconAddComment as _0x919c1b,IconCommentsArchive as _0x2b2f1c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0xb5c97f,ButtonView as _0x3d87f0,ViewCollection as _0x165358,createDropdown as _0x1866dd,ListView as _0xf445f5,focusChildOnDropdownOpen as _0xa983dd,ListItemView as _0x1badf8,MenuBarMenuListItemButtonView as _0x293e2a,BodyCollection as _0x2798f0,BalloonPanelView as _0x211a1f,ContextualBalloon as _0x463d3d,Dialog as _0x44f883,DialogViewPosition as _0x3a90e0}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xe1ebf1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xdc497e}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x369070}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x412ccb(){['model'];['view'];constructor(_0x2a6d17,_0x383a70){super(),this['model']=_0x2a6d17,this['model']['_isAttached']=!0x0,this['view']=_0x383a70,this['listenTo'](_0x383a70,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x383a70,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x383a70,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x383a70,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x383a70,'addComment',(_0x15cc0a,_0x32acb6)=>this['addComment'](_0x32acb6)),this['listenTo'](_0x383a70,'updateComment',(_0x11ee6f,_0x5a733e,_0x27a262)=>this['updateComment'](_0x5a733e,_0x27a262)),this['listenTo'](_0x383a70,'removeComment',(_0x439df9,_0x284224)=>this['removeComment'](_0x284224));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x72d447){this['model']['addComment']({'content':_0x72d447,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4d30a8,_0x4a3c6a){this['model']['getComment'](_0x4d30a8)['update']({'content':_0x4a3c6a});}['removeComment'](_0x57f212){this['model']['getComment'](_0x57f212)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x4997f4,_0x414cc2,_0x1b6bcc){const t=_0x4997f4['t'];switch(_0x414cc2){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x1b6bcc);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1b6bcc);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x1b6bcc);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x1b6bcc);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1b6bcc);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x1b6bcc);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x1b6bcc);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x1b6bcc);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x15ab67,_0x64557b){super(_0x15ab67);const _0x27fc41=_0x4a8c36();this['main']=this['createCollection'](),this['editable']=new Vt(_0x15ab67,_0x64557b,void 0x0,{'label':()=>N(_0x15ab67,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x15ab67['uiLanguageDirection'],'lang':_0x15ab67['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x27fc41},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x341e9d){super(_0x341e9d),this['view']=new Rt(_0x341e9d['locale'],_0x341e9d['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x97ddd5=this['editor']['editing']['view'],_0x3b6b8d=this['view']['editable'],_0x3574ad=_0x97ddd5['document']['getRoot']();_0x3b6b8d['name']=_0x3574ad['rootName'],this['view']['render']();const _0x4f9003=_0x3b6b8d['element'];this['setEditableElement'](_0x3b6b8d['name'],_0x4f9003),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x97ddd5['attachDomRoot'](_0x4f9003),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x412ccb(_0x45f233){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x6d5b15={}){function _0xa7eb76(_0x51616f){return _0x51616f['map'](_0x357625=>String['fromCharCode'](_0x357625))['join']('');}(_0x6d5b15=Object['assign']({},_0x6d5b15))['plugins']||(_0x6d5b15['plugins']=hs['defaultPlugins']),super(_0x6d5b15),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xa7eb76([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa7eb76([0x76,0x69,0x65,0x77])][_0xa7eb76([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa7eb76([0x61,0x75,0x74,0x6f]),this[_0xa7eb76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xa7eb76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa7eb76([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xa7eb76([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xa7eb76([0x6f,0x6b])});}['create'](){const _0x50b977=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x50b977))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1b63dc=>{const _0x1ee96a=this['model']['document']['getRoot'](),_0x4316dc=_0x1ee96a&&_0x1ee96a['getChild'](_0x1ee96a['childCount']-0x1);_0x1b63dc['setSelection'](_0x4316dc,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x8c4793=this['editing']['view'],_0xf1e31b=_0x8c4793['document']['getRoot'](),_0x47af61=_0xf1e31b['getChild'](0x0);_0xf1e31b['childCount']>0x1||!_0x47af61||'p'!=_0x47af61['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x8c4793,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x47af61['placeholder']=this['placeholder']),Ft({'view':_0x8c4793,'element':_0x47af61,'keepOnFocus':!0x0}),this['placeholderElement']=_0x47af61);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x47bb20,_0x2bd64f={}){super(_0x47bb20),this['editor']=null,this['_editorConfig']=_0x2bd64f,this['set']('value',_0x2bd64f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x47bb20,'Reply...')),this['set']('submitLabel',N(_0x47bb20,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x58afd6(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x5c6ea6,_0x4b9e30)=>{this['cancelButtonView']['fire']('execute'),_0x4b9e30();}),this['keystrokes']['set']('Ctrl+Enter',(_0x20b5f0,_0x52d1db)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x52d1db());}),this['on']('submit',(_0x13ab49,_0x2b66d8)=>{_0x2b66d8['length']>0xfde8?(alert(N(_0x47bb20,'TOO_LONG_COMMENT_ALERT',[_0x2b66d8['length'],0xfde8])),_0x13ab49['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x338e98=this['editor'];this['element']['insertBefore'](_0x338e98['ui']['element'],this['element']['firstChild']),_0x338e98['model']['document']['on']('change',()=>this['value']=_0x338e98['getData']()),_0x338e98['bind']('placeholder')['to'](this),this['focusables']['add'](_0x338e98['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x51bd9a){-0x1===_0x51bd9a?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x38070d}=this,_0x171008=new _0x3d87f0(_0x38070d);return _0x171008['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x171008['withText']=!0x0,_0x171008['bind']('label')['to'](this,'submitLabel'),_0x171008['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x171008['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1cff82,_0x3f1fab)=>!_0x3f1fab&&!!_0x1cff82['trim']()),_0x171008;}['_createCancelButton'](){const {locale:_0x40a897}=this,_0x2e4b82=new _0x3d87f0(_0x40a897);return _0x2e4b82['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2e4b82['label']=N(_0x40a897,'Cancel'),_0x2e4b82['withText']=!0x0,_0x2e4b82['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2e4b82;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3d2e42=>{this['focusTracker']['add'](_0x3d2e42['element']);}),this['focusables']['on']('change',(_0x3b83e7,_0x117247)=>{for(const _0x59812e of Array['from'](_0x117247['added'])['reverse']())this['focusTracker']['add'](_0x59812e['element']);});}}class ie extends kt{constructor(_0x58ca17,_0x28d74b,_0x3ce878){super(_0x58ca17),this['commentInputView']=new es(_0x58ca17,_0x3ce878),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x245c69,_0x2f15f6)=>_0x245c69||!!_0x2f15f6),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x2e6ce5(_0x58ca17,_0x28d74b),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x51383a){this['commentInputView']['focus'](_0x51383a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4c3454,_0x42129e)=>{const {submitButtonView:_0x1005f5,cancelButtonView:_0x2a82f7,editor:_0x5964d8}=this['commentInputView'];[_0x1005f5['element'],_0x2a82f7['element'],_0x5964d8?_0x5964d8['editing']['view']['getDomRoot']():null]['filter'](_0x3c4188=>_0x3c4188)['some'](_0x18c63b=>_0x18c63b['contains'](_0x42129e['target']))||(this['focus'](),_0x42129e['preventDefault']());});}}class rs extends kt{constructor(_0x3d343d){super(_0x3d343d);const _0x10af6d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x10af6d['to']('count',_0x235e16=>N(_0x3d343d,'NUMBER_OF_COMMENTS',_0x235e16))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x45cfda,_0x542827,_0x1a47ec){super(_0x45cfda);const _0x254a33=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x542827['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x542827,this['_config']=_0x1a47ec,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22bb45=>this['commentViews']['map'](_0x40bae1=>_0x40bae1['element'])['includes'](_0x22bb45['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x45cfda),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3118a9=>_0x3118a9-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3c8d6e of _0x542827['comments'])this['_handleNewCommentModel'](_0x3c8d6e);this['_handleInfoComment'](),this['listenTo'](_0x542827['comments'],'add',(_0x100767,_0x55dd9c)=>{const _0x55af6d=this['_calculatePosition'](_0x55dd9c);this['length']++,this['_handleNewCommentModel'](_0x55dd9c,_0x55af6d),this['refreshVisibleViews']();}),this['listenTo'](_0x542827['comments'],'remove',(_0x32c07b,_0x12303c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12303c),this['refreshVisibleViews']();}),this['listenTo'](_0x542827,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x542827,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x254a33['if']('length','ck-hidden',_0x244332=>!_0x244332)],'aria-label':N(_0x45cfda,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0xe0af1a){-0x1===_0xe0af1a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xf03163 of this['commentViews'])_0xf03163['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3405d4,_0x134b6d){const _0x5780e4=new this['_config']['CommentView'](this['locale'],_0x3405d4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5780e4['viewUid']=_0x3405d4['id'],_0x5780e4['delegate']('removeComment')['to'](this),_0x5780e4['delegate']('updateComment')['to'](this),_0x5780e4['delegate']('resolveCommentThread')['to'](this),_0x5780e4['delegate']('editorReady')['to'](this),_0x5780e4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5780e4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5780e4,_0x134b6d);}['_calculatePosition'](_0x1495ad){const _0x2684e9=this['_model']['_findOptimalIndex'](_0x1495ad);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1495ad['authoredAt']?_0x2684e9-0x1:_0x2684e9:_0x2684e9-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x45161d={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x45161d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x45161d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x360f13){const _0x47b2a2=this['commentViews']['remove'](_0x360f13['id']);this['stopListening'](_0x47b2a2),_0x47b2a2['isEditMode']&&this['_updateHasDirtyComment'](),_0x47b2a2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3a60cd=>_0x3a60cd['isEditMode']);}['_rearrangeCollapse'](){const _0x45382f=function(_0x24d65d){const _0x491783=new _0x262a30();for(const _0x231d3e of _0x24d65d)_0x491783['add'](_0x231d3e);return _0x491783;}(this['commentViews']),_0x33ed9d=this['_collapsedCommentsView']['count'];for(let _0x2373a3=0x1;_0x2373a3<=_0x33ed9d;_0x2373a3++)_0x45382f['remove'](0x1);for(const _0x183c9e of _0x45382f)_0x183c9e['collapse']();_0x33ed9d>0x0&&_0x45382f['add'](this['_collapsedCommentsView'],0x1),ns(_0x147a32(Array['from'](this['visibleViews']),Array['from'](_0x45382f)),this['visibleViews'],_0x45382f);}['_rearrangeExpand'](){ns(_0x147a32(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x22eb9c of this['visibleViews'])_0x22eb9c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x50fc5c=>{this['focusTracker']['add'](_0x50fc5c['element']),this['keystrokes']['listenTo'](_0x50fc5c['element']);}),this['commentViews']['on']('change',(_0xcbb1a0,_0x209e8d)=>{for(const _0x3b2e82 of _0x209e8d['removed'])this['focusTracker']['remove'](_0x3b2e82['element']),this['keystrokes']['stopListening'](_0x3b2e82['element']);for(const _0x3aac7a of Array['from'](_0x209e8d['added'])['reverse']())this['focusTracker']['add'](_0x3aac7a['element']),this['keystrokes']['listenTo'](_0x3aac7a['element']);});}}function ns(_0x440ba4,_0x5249ac,_0xe38a18){let _0x100dd9=0x0;for(const _0x99146d of _0x440ba4)switch(_0x99146d){case'insert':_0x5249ac['add'](_0xe38a18['get'](_0x100dd9),_0x100dd9),_0x100dd9++;break;case'delete':_0x5249ac['remove'](_0x100dd9);break;case'equal':_0x100dd9++;}}class oe extends kt{constructor(_0x25e791){super(_0x25e791);const _0x11f82e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x11f82e['to']('contextValue',_0x4615bb=>N(_0x25e791,'THREAD_CONTEXT_LABEL',_0x4615bb)),'tabindex':-0x1},'children':[{'text':_0x11f82e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4ea1a9,_0x44953f){super(_0x4ea1a9);const _0x2f8714=this['bindTemplate'];this['_model']=_0x44953f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x32d1f6=>!!_0x32d1f6),this['bind']('contextValue')['to'](this['_model'],'context',_0x47875c=>_0x47875c&&_0x47875c['value']?this['_trimContextValue'](_0x47875c['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2f8714['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x44352b=new _0x3d87f0(this['locale']);return _0x44352b['label']=N(this['locale'],'Reopen'),_0x44352b['tooltip']=N(this['locale'],'Reopen'),_0x44352b['icon']=_0x24f814,_0x44352b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52c06f=>!_0x52c06f),_0x44352b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23031e,_0x4383ef)=>_0x23031e&&_0x4383ef),_0x44352b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x44352b;}['_trimContextValue'](_0x3e8f0c){if(_0x3e8f0c['length']<0x96)return _0x3e8f0c;const _0x5211be=_0x3e8f0c['lastIndexOf']('\x20',0x93);return _0x3e8f0c['substring'](0x0,_0x5211be>-0x1?_0x5211be:0x93)+'...';}['_attachContextActions'](){const _0x80efe1=this['element']['querySelector']('.ck-context'),_0x2e1e31=_0x80efe1['querySelector']('.ck-context__value');this['listenTo'](_0x80efe1,'mouseenter',()=>{_0x2e1e31['offsetWidth']<_0x2e1e31['scrollWidth']&&_0x80efe1['classList']['add']('overlay');}),this['listenTo'](_0x80efe1,'mouseleave',()=>{_0x80efe1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x47f34f of this['focusables'])this['focusTracker']['add'](_0x47f34f['element']),this['keystrokes']['listenTo'](_0x47f34f['element']);}['_createContextView'](){const _0x3cb51c=new oe(this['locale']);return _0x3cb51c['bind']('contextValue')['to'](this),_0x3cb51c;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c1a90,_0xdeb0a6,_0x504db6,_0x2a03fb){super(_0x3c1a90),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xdeb0a6,this['_localUser']=_0x504db6,this['_config']=_0x2a03fb,this['commentThreadHeaderView']=new Xt(_0x3c1a90,_0xdeb0a6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3c1a90,N(_0x3c1a90,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3c1a90,_0xdeb0a6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2a03fb)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x13791c,_0x23496b)=>_0x13791c||!!_0x23496b),this['bind']('isUnlinked')['to'](_0xdeb0a6,'unlinkedAt',_0x348d3e=>!!_0x348d3e),this['bind']('ariaLabel')['to'](this,'length',_0x6b2ad2=>{const _0x9e69d8=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x6b2ad2,_0x9e69d8]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x105078=>_0x105078['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x56e965=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2af050=_0x56e965['commentInputView'];return _0x56e965['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2af050,'value',(_0x304a5d,_0x371023,_0x1e22a8,_0x2f0c8a,_0x1ac497)=>!!_0x1ac497||!!_0x2f0c8a&&_0x1e22a8&&!_0x371023||_0x304a5d&&_0x1e22a8&&!_0x371023),_0x2af050['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15b585,_0x2d4376,_0x42bad0)=>{let _0xe4d123;return _0xe4d123=_0x42bad0&&_0x2d4376?'Reply\x20to\x20reopen\x20discussion...':_0x15b585?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xe4d123);}),_0x2af050['bind']('submitLabel')['to'](this,'length',_0x38e698=>N(this['locale'],_0x38e698?'Reply':'Comment')),_0x2af050['on']('submit',(_0x2d28c4,_0x24b0d3)=>{this['fire']('addComment',_0x24b0d3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2af050['on']('cancel',()=>{this['focus']();}),_0x2af050['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2af050['on']('cancel',_0x4f3e63=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4f3e63['stop']());}),this['on']('change:isActive',(_0x541840,_0x5561e7,_0x544c0d)=>{_0x544c0d||this['length']||_0x2af050['value']||this['fire']('removeCommentThread');}),_0x56e965;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xd91b1c,_0x221263,_0x5eb819,_0x7e6e7f){super(_0xd91b1c,_0x221263,_0x5eb819,_0x7e6e7f),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xd91b1c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5b96a0,_0x2803a8,_0xc94e24)=>{_0xc94e24||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x150612,_0x179a4f,_0x417a1b)=>{_0x417a1b&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5d72ff=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5d72ff['if']('isActive','ck-thread--active'),_0x5d72ff['if']('isUnlinked','ck-thread--unlinked'),_0x5d72ff['to']('actionIndicator',_0x279249=>_0x279249?'ck-thread--'+_0x279249:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5d72ff['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x5ece6f of this['commentsListView']['commentViews'])_0x5ece6f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1cad02}=this,_0x3839a2=this['commentsListView']['commentViews']['get'](0x0);_0x3839a2===this['_boundFirstCommentView']||_0x3839a2['isSystemComment']||(this['_boundFirstCommentView']=_0x3839a2,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3839a2,'actionIndicator',_0x352b3a=>'remove'===_0x352b3a?'remove':null),_0x3839a2['placeholder']=N(_0x1cad02,'Write\x20a\x20comment...'),_0x3839a2['removeButton']['on']('execute',_0x54b087=>{_0x54b087['stop'](),this['showConfirm'](N(_0x1cad02,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3839a2['focus']();}),_0x3839a2['actionBar']['add'](this['resolveButton'],0x0),_0x3839a2['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x47f0db=new _0x1ffa79(this['locale']);return _0x47f0db['label']=N(this['locale'],'Resolve'),_0x47f0db['tooltip']=N(this['locale'],'Resolve'),_0x47f0db['icon']=_0x17a7cb,_0x47f0db['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x47f0db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xb35cf6=>!_0xb35cf6),_0x47f0db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x20e6d7,_0x9ea865)=>_0x20e6d7&&!_0x9ea865),_0x47f0db['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x47f0db;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x1a5dae){super(_0x1a5dae),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5f4e53,_0x34920b,_0xfcdc63)=>{this['element']['innerHTML']=_0xfcdc63;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5a626a,_0x1be3ae,_0x424523){super(_0x5a626a),this['_model']=_0x1be3ae,this['_config']=_0x424523,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1be3ae,'content',_0x1be3ae,'authoredAt',(_0x1f2fdb,_0x3c1348)=>N(_0x5a626a,'COMMENT_ARIA_LABEL',[_0x1be3ae['author']['name'],_0x424523['formatDateTime'](_0x3c1348),new DOMParser()['parseFromString'](_0x1f2fdb,'text/html')['body']['textContent'],_0x1be3ae['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x5a626a,N(_0x5a626a,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x165358(),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3790df=>_0x3790df['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x54f501=new is(this['locale']);return _0x54f501['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x12080d,_0x169092)=>_0x169092?ts(_0x12080d,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x12080d),_0x54f501;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x98dcd9=new es(this['locale'],this['_config']['editorConfig']);return _0x98dcd9['value']=this['_model']['content'],_0x98dcd9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x98dcd9['submitLabel']=N(this['locale'],'Save'),_0x98dcd9['on']('submit',(_0x298bec,_0x3e6496)=>{this['fire']('updateComment',this['_model']['id'],_0x3e6496),this['switchToDisplayMode'](),this['focus']();}),_0x98dcd9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x98dcd9['once']('editorReady',()=>{_0x98dcd9['focus']();}),_0x98dcd9['createEditor'](),_0x98dcd9['delegate']('editorReady')['to'](this),_0x98dcd9['delegate']('editorDestroyed')['to'](this),_0x98dcd9;}['_setupKeyboardNavigation'](){const _0x104700=this['element'];this['keystrokes']['listenTo'](_0x104700);for(const _0x4b0f15 of this['focusables'])this['focusTracker']['add'](_0x4b0f15['element']),this['keystrokes']['listenTo'](_0x4b0f15['element']);this['focusables']['on']('change',(_0x1c3ccf,_0x3fc9fc)=>{for(const _0x3f239a of _0x3fc9fc['removed'])this['focusTracker']['remove'](_0x3f239a['element']),this['keystrokes']['stopListening'](_0x3f239a['element']);for(const _0x9914a1 of _0x3fc9fc['added'])this['focusTracker']['add'](_0x9914a1['element']),this['keystrokes']['listenTo'](_0x9914a1['element']);}),this['keystrokes']['set']('enter',(_0x358e52,_0x44f960)=>{_0x104700===_0x358e52['target']&&(this['focusCycler']['focusFirst'](),_0x44f960());}),this['keystrokes']['set']('esc',(_0x3b2396,_0x268f3b)=>{_0x104700!==_0x3b2396['target']&&(this['focus'](),_0x268f3b());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x3723e8,_0xa74899,_0x4218cd){super(_0x3723e8,_0xa74899,_0x4218cd),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x3723e8,'Reply...')),this['bind']('authoredAt')['to'](_0xa74899),this['bind']('resolvedAt')['to'](_0xa74899),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x2e6ce5(_0x3723e8,_0xa74899['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xa74899,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x109e03=this['bindTemplate'],_0x472215=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x109e03['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x109e03['to']('authoredAt',_0xab7f18=>this['_config']['formatDateTime'](_0xab7f18))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x109e03['if']('isEditMode','ck-comment__actions--hidden'),_0x109e03['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x472215['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x109e03['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x109e03['if']('isEditMode','ck-comment--edit'),_0x109e03['if']('isSystemComment','ck-comment--info'),_0x109e03['to']('actionIndicator',_0x305508=>_0x305508?'ck-comment--'+_0x305508:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x472215}]}]};}['_createEditButton'](){const _0x1cc7c5=new _0x3d87f0(this['locale']);return _0x1cc7c5['label']=N(this['locale'],'Edit'),_0x1cc7c5['icon']=_0x40152c,_0x1cc7c5['withText']=!0x0,_0x1cc7c5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1cc7c5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1010f5=>!_0x1010f5),_0x1cc7c5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1cc7c5['on']('execute',()=>this['switchToEditMode']()),_0x1cc7c5;}['_createRemoveButton'](){const _0x21fd4b=new _0x3d87f0(this['locale']);return _0x21fd4b['label']=N(this['locale'],'Remove'),_0x21fd4b['icon']=_0x4247e1,_0x21fd4b['withText']=!0x0,_0x21fd4b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x21fd4b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ff6e3=>!_0x3ff6e3),_0x21fd4b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x21fd4b['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x21fd4b;}['_createDropdown'](){const _0x448c67=_0x1866dd(this['locale'],_0x282161),_0x292724=_0x448c67['panelView']['children'],_0xd02d97=new _0xf445f5(this['locale']),_0x5745a3=_0x448c67['bindTemplate'];_0xa983dd(_0x448c67,()=>this['items']['find'](_0x119d58=>_0x119d58['isVisible'])),_0x448c67['extendTemplate']({'attributes':{'class':[_0x5745a3['if']('isVisible','ck-hidden',_0x159d16=>!_0x159d16)]}});const _0x37cce7=(_0x5f5852,_0x1ab7b4=-0x1)=>{const _0x408123=new _0x1badf8(this['locale']);_0x408123['children']['add'](_0x5f5852);const _0x4dfa98=_0x1ab7b4>-0x1?_0x1ab7b4:_0xd02d97['items']['length'];_0xd02d97['items']['add'](_0x408123,_0x4dfa98);const _0x25f195=Array['from'](this['items']);_0x448c67['unbind']('isEnabled','isVisible'),_0x448c67['bind']('isEnabled')['toMany'](_0x25f195,'isEnabled',(..._0x1bf748)=>_0x1bf748['some'](_0x25ce36=>_0x25ce36)),_0x448c67['bind']('isVisible')['toMany'](_0x25f195,'isVisible',(..._0x4c721b)=>_0x4c721b['some'](_0x2fdba5=>_0x2fdba5));};_0x448c67['panelPosition']='sw',_0x448c67['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x43a357});for(const _0x107fd5 of this['items'])_0x37cce7(_0x107fd5);return _0x292724['add'](_0xd02d97),_0x448c67['listenTo'](this['items'],'add',(_0x37d00b,_0x490e7e,_0x121048)=>{_0x37cce7(_0x490e7e,_0x121048);}),_0x448c67['listenTo'](this['items'],'remove',(_0x53b07d,_0x10e221,_0x145f8b)=>{_0xd02d97['items']['remove'](_0x145f8b);}),_0x448c67;}['_attachActions'](_0x1caaab,_0x1b646e){const _0x164c27=_0x1caaab&&_0x1caaab['element'];_0x164c27&&(this['listenTo'](_0x164c27,'mouseenter',()=>this['actionIndicator']=_0x1b646e),this['listenTo'](_0x164c27,'focus',()=>this['actionIndicator']=_0x1b646e),this['listenTo'](_0x164c27,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x164c27,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4b901d=super['_createCommentInputView']();return _0x4b901d['bind']('placeholder')['to'](this),_0x4b901d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x687e9d){const _0x1a4e39=Dt(_0x687e9d,0x1e),_0x2f2ae6=new MutationObserver(_0x27cf16=>{for(const _0x667a20 of _0x27cf16)('attributes'==_0x667a20['type']&&'class'==_0x667a20['attributeName']||'childList'==_0x667a20['type']||'characterData'==_0x667a20['type'])&&_0x1a4e39();});return{'attach'(_0x2f5f8f){_0x2f2ae6['observe'](_0x2f5f8f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2f2ae6['disconnect'](),_0x1a4e39['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2a702b,_0x23292c){super(_0x2a702b),this['id']=_0x4a8c36(),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4f4e38,_0x415d24)=>this['fire']('Esc',_0x415d24)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x23292c),this['mainView']=_0x23292c;const _0x4e3fd4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4e3fd4['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x14d4ac=this['element']['clientHeight'];_0x14d4ac&&(this['height']=_0x14d4ac);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x412ccb(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4f5ac9,target:_0x59a5ee,type:_0x42d494,isVisible:_0x83c921=!0x0}){super(),this['view']=_0x4f5ac9,this['view']['element']||this['view']['render'](),this['_type']=_0x42d494,this['_target']=_0x59a5ee,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x262a30([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x228c3a,_0x3735f5)=>{this['view']['focusTracker']['add'](_0x3735f5);}),this['focusableElements']['on']('remove',(_0x1ec312,_0x4b9722)=>{this['view']['focusTracker']['remove'](_0x4b9722);}),this['set']('isVisible',_0x83c921);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x31dcb5=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x31dcb5),_0x31dcb5;}get['targetRect'](){const _0x5c9cb4=this['target'];if(null===_0x5c9cb4)return null;if(_0x5c9cb4 instanceof _0x55e497)return _0x5c9cb4;const _0x259407=_0x5c9cb4['filter'](_0x5e59ac=>function(_0x5ac3c3){const _0x4cc821=_0x5ac3c3['offsetParent'];if(_0x4cc821)return!0x0;const _0xfc6bc=_0x5ac3c3['getClientRects']()['item'](0x0);return!!_0xfc6bc;}(_0x5e59ac));return 0x0===_0x259407['length']?null:new _0x55e497(_0x259407[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5dfe50){this['view']['isActive']=_0x5dfe50,this['view']['mainView']['isActive']=_0x5dfe50;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x22353e){if(!(null===_0x22353e||_0x22353e instanceof _0x55e497||Array['isArray'](_0x22353e)&&_0x22353e['every'](_0x29867c=>fi(_0x29867c))))throw new _0x5425ea('annotation-invalid-target',null,{'target':_0x22353e});}['_getNormalizedTarget'](){const _0x5771fe='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5771fe)?[_0x5771fe]:_0x5771fe;}}function fi(_0x347c70){return null!==_0x347c70&&'object'==typeof _0x347c70&&'nodeType'in _0x347c70&&0x1===_0x347c70['nodeType'];}class S extends _0x262a30{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x595f4a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x58afd6(),this['_focusTracker']['on']('change:isFocused',(_0x4984f1,_0x193d42,_0xa5e7a1)=>{_0xa5e7a1||this['fire']('blur');});for(const _0x6ef2ea of _0x595f4a)this['add'](_0x6ef2ea);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b6cf3){if(this['has'](_0x2b6cf3))throw new _0x5425ea('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b6cf3['innerView'],_0x2b6cf3),this['_viewToAnnotation']['set'](_0x2b6cf3['view'],_0x2b6cf3);for(const _0x518063 of _0x2b6cf3['focusableElements'])this['_focusTracker']['add'](_0x518063);this['listenTo'](_0x2b6cf3['focusableElements'],'add',(_0x53e39b,_0x441b41)=>{this['_focusTracker']['add'](_0x441b41);}),this['listenTo'](_0x2b6cf3['focusableElements'],'remove',(_0x2f8d13,_0x687836)=>{this['_focusTracker']['remove'](_0x687836);}),this['listenTo'](_0x2b6cf3['view']['focusTracker'],'change:isFocused',(_0x292943,_0x49607d,_0x46fec0)=>{_0x46fec0&&this['fire']('focus',_0x2b6cf3);}),_0x2b6cf3['updateTargetRect']();const _0x336b0c=this['_getOrderInContent'](_0x2b6cf3['view']['targetRect']);return super['add'](_0x2b6cf3,_0x336b0c);}['remove'](_0x3c39b4){if(!this['has'](_0x3c39b4))throw new _0x5425ea('annotationcollection-not-existing-item',null);this['stopListening'](_0x3c39b4['view']['focusTracker']),this['stopListening'](_0x3c39b4['focusableElements']);for(const _0x4f1fdd of _0x3c39b4['focusableElements'])this['_focusTracker']['remove'](_0x4f1fdd);return this['_viewToAnnotation']['delete'](_0x3c39b4['view']),this['_innerViewToAnnotation']['delete'](_0x3c39b4['innerView']),super['remove'](_0x3c39b4);}['getByInnerView'](_0x4792b9){return this['_innerViewToAnnotation']['get'](_0x4792b9);}['getByView'](_0x3f001e){return this['_viewToAnnotation']['get'](_0x3f001e);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4d5a89 of this)_0x4d5a89['updateTargetRect']();this['_sort']();}['_sort'](){const _0x21ef74=Array['from'](this)['sort']((_0x6ca5fc,_0x197016)=>w(_0x6ca5fc['view']['targetRect'],_0x197016['view']['targetRect']));for(let _0x5baf65=_0x21ef74['length']-0x1;_0x5baf65>0x0;_0x5baf65--){const _0x19a4b6=_0x21ef74[_0x5baf65];_0x5baf65!==this['getIndex'](_0x19a4b6)&&(this['remove'](_0x19a4b6),this['add'](_0x19a4b6));}}['_getOrderInContent'](_0x23fe3d){let _0x4316a2=0x0;if(!_0x23fe3d)return this['length'];for(const _0x24d4dd of this){const _0x36aeeb=_0x24d4dd['view']['targetRect'];if(_0x36aeeb){if(w(_0x23fe3d,_0x36aeeb)<0x0)return _0x4316a2;_0x4316a2++;}}return _0x4316a2;}}function v({source:_0xf49493,target:_0x36161b,filter:_0x300825}){for(const _0x471a78 of _0xf49493)_0x300825(_0x471a78)&&_0x36161b['add'](_0x471a78);_0x36161b['listenTo'](_0xf49493,'add',(_0x43edb3,_0x507cd1)=>{_0x300825(_0x507cd1)&&_0x36161b['add'](_0x507cd1);}),_0x36161b['listenTo'](_0xf49493,'remove',(_0x35c269,_0x514a50)=>{_0x36161b['has'](_0x514a50)&&_0x36161b['remove'](_0x514a50);});}function w(_0x762369,_0x369188){if(null===_0x762369&&null===_0x369188)return 0x0;if(null===_0x762369)return-0x1;if(null===_0x369188)return 0x1;const _0x4b5dae=_0x762369['top']-_0x369188['top'];return 0x0==_0x4b5dae?_0x762369['left']-_0x369188['left']:_0x4b5dae;}class y extends _0x1570af{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27a6e3){if(super(_0x27a6e3),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x27a6e3 instanceof _0x45f233){const _0x4ab0a1=_0x27a6e3['locale'];_0x27a6e3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4cd592){this['collection']['add'](_0x4cd592);}['remove'](_0x371323){this['collection']['remove'](_0x371323),_0x371323['destroy']();}['refreshVisibility'](){for(const _0x56d33f of this['collection'])_0x56d33f['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x56f256){return this['collection']['getByInnerView'](_0x56f256);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x24b542 of this['collection'])_0x24b542['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5f297c){this['fire']('_activateAnnotation',_0x5f297c);}['createAnnotation'](_0x505122){return new T(_0x505122);}['createAnnotationView'](_0x18e4ea,_0x5b8445){return new E(_0x18e4ea,_0x5b8445);}['_addActiveAnnotation'](_0x1a4ef4){const _0xccbbe1=new Set(this['activeAnnotations']);_0xccbbe1['add'](_0x1a4ef4),this['activeAnnotations']=_0xccbbe1;}['_removeActiveAnnotation'](_0x2c348c){const _0x716d9e=new Set(this['activeAnnotations']);_0x716d9e['delete'](_0x2c348c),this['activeAnnotations']=_0x716d9e;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2a8e73=this['collection'],_0x254e92=this['_visibleAnnotations'];function _0x5c5086(_0x139512){const _0x312865=_0x139512['source'];_0x312865['isVisible']&&!_0x254e92['has'](_0x312865)?_0x254e92['add'](_0x312865):!_0x312865['isVisible']&&_0x254e92['has'](_0x312865)&&_0x254e92['remove'](_0x312865),_0x312865['view']['focusTracker']['remove'](_0x312865['view']['element']),_0x312865['view']['focusTracker']['add'](_0x312865['view']['element']);}this['listenTo'](_0x2a8e73,'add',(_0x5bf50b,_0x56271e)=>{_0x56271e['isVisible']&&_0x254e92['add'](_0x56271e),this['listenTo'](_0x56271e,'change:isVisible',_0x5c5086);}),this['listenTo'](_0x2a8e73,'remove',(_0x2f2fb3,_0x15e52d)=>{_0x254e92['has'](_0x15e52d)&&_0x254e92['remove'](_0x15e52d),this['stopListening'](_0x15e52d,'change:isVisible',_0x5c5086);});}['_setupEnterAnnotationKeystroke'](){const _0x2912a3=_0x537904=>{_0x537904['on']('ready',()=>{_0x537904['keystrokes']['set'](_0xdc497e,(_0x36cdab,_0x7549df)=>{const _0x4f8da0=_0x31fba4(this['activeAnnotations']['values']());_0x4f8da0&&(_0x4f8da0['view']['focus'](),_0x7549df());});});};this['context']instanceof _0x45f233?_0x2912a3(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2306d6,_0x140ee6)=>{_0x2912a3(_0x140ee6);});}['_setupEscapeAnnotationHandling'](){const _0x237f81=_0x3c0f8c=>{const _0x1c8e4f=_0x3c0f8c['source'],_0x3bbca0=[];let _0x5b80dd;if(Array['isArray'](_0x1c8e4f['target'])){_0x5b80dd=_0x1c8e4f['target'][0x0],this['context']instanceof _0x45f233?_0x3bbca0['push'](this['context']):this['context']['editors']&&_0x3bbca0['push'](...this['context']['editors']);for(const _0x1b7146 of _0x3bbca0)for(const _0x1c5139 of _0x1b7146['editing']['view']['domRoots']['values']())if(_0x1c5139['contains'](_0x5b80dd))return void _0x1b7146['editing']['view']['focus']();_0x5b80dd['focus']();}};this['listenTo'](this['collection'],'add',(_0x5d19d7,_0x3df4d8)=>{this['listenTo'](_0x3df4d8,'escape',_0x237f81,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5cd1d1,_0x1fae6f)=>{this['stopListening'](_0x1fae6f,'escape',_0x237f81);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1570af{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x326ed2){super(_0x326ed2),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x15bf57=this['context']['config'];_0x15bf57['define']('comments.maxCommentsWhenCollapsed',0x2),_0x15bf57['define']('comments.maxThreadTotalWeight',0x1f4),_0x15bf57['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x15bf57['define']('comments.CommentThreadView',gt),_0x15bf57['define']('comments.CommentView',Tt),_0x15bf57['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x439079=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4f634e,_0x5ac5d9)=>this['_addCommentThread'](_0x5ac5d9)),this['on']('submitCommentThread',(_0x39e1a8,_0x48a88d)=>this['_submitCommentThread'](_0x48a88d)),this['on']('resolveCommentThread',(_0x35eda5,_0x46e613)=>this['_resolveCommentThread'](_0x46e613)),this['on']('resolveCommentThread',(_0x3a7df2,_0x3491e8)=>this['_updateActiveAnnotation'](_0x3491e8),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xdaa6d5,_0x20af98)=>this['_reopenCommentThread'](_0x20af98)),this['on']('reopenCommentThread',(_0x12221c,_0x3e5b7e)=>this['_updateActiveAnnotation'](_0x3e5b7e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4284b7,_0x45e5cd)=>this['_removeCommentThread'](_0x45e5cd)),this['on']('updateCommentThread',(_0x14ba4f,_0x16858b)=>this['_updateCommentThread'](_0x16858b)),this['on']('updateCommentThread',(_0x5e8a18,_0x4b8ec1)=>this['_updateActiveAnnotation'](_0x4b8ec1),{'priority':'lowest'}),this['on']('addComment',(_0x3db06d,_0x1d47da)=>this['_addComment'](_0x1d47da)),this['on']('updateComment',(_0x59828e,_0x2c77a7)=>this['_updateComment'](_0x2c77a7)),this['on']('removeComment',(_0x23b46f,_0x5ec6aa)=>this['_removeComment'](_0x5ec6aa)),this['on']('addComment',(_0x1df1d1,{threadId:_0x1bc6e3,isFromAdapter:_0x191478})=>{if(_0x191478)return;const _0x4579ca=this['getCommentThread'](_0x1bc6e3),_0x4d49bc=_0x4579ca&&this['_threadToController']['get'](_0x4579ca);_0x4d49bc&&_0x4d49bc['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x439079,'change:activeAnnotations',(_0x392dd1,_0x42c926,_0x52ca2f)=>{const _0x74aeaa=Array['from'](_0x52ca2f)['map'](_0x384c24=>this['_viewToController']['get'](_0x384c24['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x74aeaa?_0x74aeaa['model']:null;});}set['adapter'](_0x360193){if(this['_adapter'])throw new _0x5425ea('commentsrepository-adapter-already-set');this['_adapter']=_0x360193;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x216cd0=_t,threadId:_0x30e2bc=_0x4a8c36(),comments:_0x5ed0b2=[],unlinkedAt:_0x582c6a=null,resolvedAt:_0x11e14d=null,resolvedBy:_0x4a8b2a=null,target:_0x355075=null,context:_0x3b954c=null,attributes:_0x5d72a7={},isResolvable:_0x127984=!0x0,isSubmitted:_0x546e5c=!0x1,isFromAdapter:_0x4bb3e1=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x216cd0),{'channelId':_0x216cd0,'threadId':_0x30e2bc,'comments':_0x5ed0b2,'unlinkedAt':_0x582c6a,'resolvedAt':_0x11e14d,'resolvedBy':_0x4a8b2a,'target':_0x355075,'context':_0x3b954c,'attributes':_0x5d72a7,'isFromAdapter':_0x4bb3e1,'isResolvable':_0x127984,'isSubmitted':_0x546e5c}),this['getCommentThread'](_0x30e2bc);}['openNewCommentThread']({channelId:_0x16ef52=_t,threadId:_0x32e15c=_0x4a8c36(),target:_0x2993f2,context:_0x3a2754=null,isResolvable:_0x33cf6e=!0x0}){if(this['_readOnlyChannels']['has'](_0x16ef52)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2993f2)throw new _0x5425ea('commentsrepository-missing-target');const _0x273ff6=this['addCommentThread']({'channelId':_0x16ef52,'threadId':_0x32e15c,'target':_0x2993f2,'context':_0x3a2754,'isResolvable':_0x33cf6e});if(!_0x273ff6)return null;const _0x8d8a41=this['_threadToController']['get'](_0x273ff6),_0x1fbc81=_0x8d8a41['view']['commentThreadInputView']['commentInputView'],_0x2600b2=this['context']['plugins']['get'](y),_0x247798=_0x2600b2['getByInnerView'](_0x8d8a41['view']);return _0x2600b2['activate'](_0x247798),_0x1fbc81['once']('editorReady',()=>_0x1fbc81['focus']()),_0x273ff6;}['hasCommentThread'](_0xab00ea){if('string'!=typeof _0xab00ea)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xab00ea);}['updateCommentThread']({channelId:_0x323b50=_t,threadId:_0x7328ce,context:_0x579156,unlinkedAt:_0x57e737,attributes:_0x26267a,isFromAdapter:_0x23cdbd=!0x1}){return this['fire'](Nt('updateCommentThread',_0x323b50),{'channelId':_0x323b50,'threadId':_0x7328ce,'context':_0x579156,'unlinkedAt':_0x57e737,'attributes':_0x26267a,'isFromAdapter':_0x23cdbd}),this['getCommentThread'](_0x7328ce);}['getCommentThread'](_0x1cb197){if('string'!=typeof _0x1cb197)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1cb197);}['fetchCommentThread']({channelId:_0x3662b2,threadId:_0x4d7cde}={}){const _0x5ead9e=this['getCommentThread'](_0x4d7cde);if(_0x5ead9e)return Promise['resolve'](_0x5ead9e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5425ea('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3662b2,'threadId':_0x4d7cde})['then'](_0x25109b=>this['hasCommentThread'](_0x4d7cde)?this['getCommentThread'](_0x4d7cde):_0x25109b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3662b2},_0x25109b)):void 0x0)['catch'](_0x5d1033=>{throw console['error'](_0x5d1033),new _0x5425ea('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x380ced,skipNotAttached:_0x5ceda5=!0x1,skipEmpty:_0x562959=!0x1,toJSON:_0x11bbc7=!0x1}={}){const _0x1b3b27=[];for(const _0x50b47a of this['_threads']['values']())_0x380ced&&_0x50b47a['channelId']!==_0x380ced||_0x5ceda5&&!_0x50b47a['isAttached']||_0x562959&&0x0===_0x50b47a['length']||_0x1b3b27['push'](_0x50b47a);return _0x11bbc7?_0x1b3b27['map'](_0x4f2b4b=>_0x4f2b4b['toJSON']()):_0x1b3b27;}['getAnnotationForCommentThread'](_0x2cb871){const _0x1960ab=this['_threadToController']['get'](_0x2cb871);if(!_0x1960ab)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1960ab['view'])||null;}['getCommentThreadForAnnotation'](_0x566de4){const _0x293715=this['_viewToController']['get'](_0x566de4['innerView']);return _0x293715?_0x293715['model']:null;}['setActiveCommentThread'](_0x280d60){const _0x3dd258=this['context']['plugins']['get'](y);if(!_0x280d60)return void(this['activeCommentThread']&&_0x3dd258['deactivateAll']());const _0x1584bb=this['getCommentThread'](_0x280d60);if(!_0x1584bb)throw new _0x5425ea('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x280d60});if(!this['_threadToController']['has'](_0x1584bb))throw new _0x5425ea('commentsrepository-active-not-attached',null,{'threadId':_0x280d60});const _0x40c78e=_0x3dd258['getByInnerView'](this['_threadToController']['get'](_0x1584bb)['view']);_0x3dd258['activate'](_0x40c78e);}['switchReadOnly'](_0xd9b547,_0x269e74){_0xd9b547?this['_readOnlyChannels']['add'](_0x269e74):this['_readOnlyChannels']['delete'](_0x269e74),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x41bee6){return this['_readOnlyChannels']['has'](_0x41bee6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5bcbf2,_0x25122c){return new vt(_0x5bcbf2,_0x25122c);}['setPermissions'](_0x40d2f5,_0x34ad95=_t){this['_permissions']['set'](_0x34ad95,_0x40d2f5),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x529a2a=_t){return this['_permissions']['has'](_0x529a2a)?this['_permissions']['get'](_0x529a2a):bt;}['_addCommentThread']({channelId:_0x321af4,threadId:_0x7a0897,comments:_0x17c40b,unlinkedAt:_0x3bdf18,resolvedAt:_0xdaac32,resolvedBy:_0x5f6bea,target:_0x4410e1,context:_0x5ef978,attributes:_0x8c41c2,isFromAdapter:_0x3df1e1,isResolvable:_0x450844,isSubmitted:_0x44e512}){if('string'!=typeof _0x7a0897)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x7a0897});if(this['hasCommentThread'](_0x7a0897))throw new _0x5425ea('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x7a0897});const _0x3e3cd4=new pi(this,{'channelId':_0x321af4,'id':_0x7a0897,'context':_0x5ef978,'attributes':_0x8c41c2,'unlinkedAt':_0x3bdf18,'resolvedAt':_0xdaac32,'resolvedBy':_0x5f6bea?this['context']['plugins']['get'](it)['getUser'](_0x5f6bea):null,'isResolvable':_0x450844,'isSubmitted':_0x44e512||_0x3df1e1});this['_threads']['set'](_0x7a0897,_0x3e3cd4);for(const _0x10fe36 of _0x17c40b)_0x3e3cd4['_add'](this['_createNewComment']({'threadId':_0x7a0897,..._0x10fe36}));return _0x4410e1&&_0x3e3cd4['attachTo'](_0x4410e1),_0x3df1e1||!_0x3e3cd4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x321af4,'threadId':_0x7a0897});}['_submitCommentThread']({channelId:_0x14baae,threadId:_0x88b01e}){if(!this['hasCommentThread'](_0x88b01e))throw new _0x5425ea('commentsrepository-missing-comment-thread',this);const _0x1cde3f=this['getCommentThread'](_0x88b01e);if(_0x1cde3f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x321713,comments:_0x2d09d7,resolvedAt:_0x4282a7,resolvedBy:_0x22741a,context:_0x44cb33,attributes:_0x393884}=_0x1cde3f,_0x2974b4=this['context']['plugins']['get']('PendingActions'),_0x394bae=_0x2974b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x14baae,'threadId':_0x321713,'comments':_0x2d09d7['map'](_0x120a72=>_0x120a72['toJSON']()),'resolvedAt':_0x4282a7,'resolvedBy':_0x22741a?_0x22741a['id']:_0x22741a,'context':_0x44cb33,'attributes':_0x393884})['then'](({comments:_0x422f4a})=>{_0x2974b4['remove'](_0x394bae);for(const _0x1d83d2 of _0x422f4a)this['_updateComment']({'channelId':_0x14baae,'threadId':_0x88b01e,'commentId':_0x1d83d2['commentId'],'createdAt':_0x1d83d2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4e3c49=>{throw console['error'](_0x4e3c49),new _0x5425ea('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2bdd46,target:_0x4f212a}){const _0x3094f4=this['getCommentThread'](_0x2bdd46);if(!_0x3094f4)throw new _0x5425ea('commentsrepository-attach-missing-comment-thread',this);const _0x272814=this['context']['plugins']['get']('PendingActions'),_0x3b2423=this['context']['plugins']['get'](y),_0x4c2b72=this['_createCommentThreadView'](_0x3094f4),_0x403b47=new vt(_0x3094f4,_0x4c2b72);let _0xc8e065=null;_0x4c2b72['on']('change:isDirty',(_0x3ecd75,_0x3733b2,_0x2f5ea6)=>{_0x2f5ea6?_0xc8e065=_0x272814['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xc8e065&&(_0x272814['remove'](_0xc8e065),_0xc8e065=null);}),this['_threadToController']['set'](_0x3094f4,_0x403b47),this['_viewToController']['set'](_0x4c2b72,_0x403b47);const _0x82fb40=new E(this['context']['locale'],_0x4c2b72);_0x82fb40['bind']('length')['to'](_0x4c2b72),_0x82fb40['bind']('isDirty')['to'](_0x4c2b72,'isDirty',_0x4c2b72,'length',(_0x4640dc,_0x37602a)=>_0x4640dc||!_0x37602a),_0x82fb40['bind']('isActive')['to'](_0x4c2b72),_0x82fb40['type']='comment';const _0x3413ca=new T({'view':_0x82fb40,'target':_0x4f212a,'type':'comment','isVisible':!_0x3094f4['archivedAt']&&!!('function'==typeof _0x4f212a?_0x4f212a():_0x4f212a)});return _0x4c2b72['on']('escape',()=>{_0x3413ca['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c2b72,_0x3413ca),_0x3b2423['add'](_0x3413ca),_0x3413ca;}['_bindAnnotationToEditors'](_0x4f6bb7,_0x50d1ab){this['listenTo'](_0x4f6bb7,'editorReady',(_0x355fa7,_0x1e597b)=>{const _0x464436=_0x1e597b['ui']['view']['body']['bodyCollectionContainer'];_0x50d1ab['focusableElements']['add'](_0x464436),this['context']instanceof _0x45f233&&this['context']['ui']['focusTracker']['add'](_0x464436);},{'priority':'highest'}),this['listenTo'](_0x4f6bb7,'editorDestroyed',(_0x2a4bc3,_0x41866d)=>{const _0x2fa15e=_0x41866d['ui']['view']['body']['bodyCollectionContainer'];_0x50d1ab['focusableElements']['has'](_0x2fa15e)&&_0x50d1ab['focusableElements']['remove'](_0x2fa15e),this['context']instanceof _0x45f233&&this['context']['ui']['focusTracker']['remove'](_0x2fa15e);});}['_unbindEditors'](_0x2937eb){this['stopListening'](_0x2937eb,'editorReady'),this['stopListening'](_0x2937eb,'editorDestroyed');}['_createCommentThreadView'](_0x234c0c){const _0x5a5a0b=this['context']['plugins']['get'](it),{config:_0x23f400,locale:_0x5bc17b}=this['context'],_0x2e3ae9=pt(_0x23f400['get']('locale'),_0x5bc17b);return new(0x0,(_0x23f400['get']('comments'))['CommentThreadView'])(_0x5bc17b,_0x234c0c,_0x5a5a0b['me'],{'editorConfig':{..._0x23f400['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x23f400['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x23f400['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x23f400['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x23f400['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2e3ae9,'CommentView':_0x23f400['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x40388c,channelId:_0xd3db03,resolvedAt:_0x58d3f6,resolvedBy:_0x3f4b78,isFromAdapter:_0x2ed6b9}){if(!this['hasCommentThread'](_0x40388c))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x40388c});const _0x29ff30=this['getCommentThread'](_0x40388c);if(_0x29ff30['isResolved'])throw new _0x5425ea('commentsrepository-resolved-comment-thread',null,{'threadId':_0x40388c});const _0x1c5ef5=this['context']['plugins']['get'](it);if(_0x29ff30['resolvedBy']=_0x1c5ef5['getUser'](_0x3f4b78),_0x29ff30['resolvedAt']=_0x58d3f6,_0x2ed6b9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x47aa65=this['context']['plugins']['get']('PendingActions'),_0x53e843=_0x47aa65['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xd3db03,'threadId':_0x40388c})['then'](({resolvedAt:_0x213d75,resolvedBy:_0x30221d})=>{_0x47aa65['remove'](_0x53e843),_0x29ff30['resolvedBy']['id']!==_0x30221d&&(_0x29ff30['resolvedBy']=_0x1c5ef5['getUser'](_0x30221d)),_0x29ff30['resolvedAt']=_0x213d75;})['catch'](_0x1f4d64=>{throw console['error'](_0x1f4d64),new _0x5425ea('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x477278,channelId:_0x528752,isFromAdapter:_0x53bebc}){if(!this['hasCommentThread'](_0x477278))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x477278});const _0x40314b=this['getCommentThread'](_0x477278);if(!_0x40314b['isResolved'])throw new _0x5425ea('commentsrepository-reopen-comment-thread',null,{'threadId':_0x477278});if(_0x40314b['resolvedBy']=null,_0x40314b['resolvedAt']=null,_0x53bebc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x55bfea=this['context']['plugins']['get']('PendingActions'),_0x3b4d26=_0x55bfea['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x528752,'threadId':_0x477278})['then'](()=>_0x55bfea['remove'](_0x3b4d26))['catch'](_0xf2df86=>{throw console['error'](_0xf2df86),new _0x5425ea('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x26cdad,isFromAdapter:_0xaac431}){const _0x5f35e7=this['getCommentThread'](_0x26cdad);if(!_0x5f35e7)throw new _0x5425ea('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x26cdad),this['_threads']['delete'](_0x26cdad),!_0x5f35e7['isSubmitted']||_0xaac431||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1e48b0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x145427}=_0x5f35e7,_0x505dfb=_0x1e48b0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x145427,'threadId':_0x26cdad})['then'](()=>_0x1e48b0['remove'](_0x505dfb))['catch'](_0x46a0e4=>{throw console['error'](_0x46a0e4),new _0x5425ea('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x369507,unlinkedAt:_0x4d65e6,context:_0x4d993a,attributes:_0x47f3e8,isFromAdapter:_0x2e76cb}){if('string'!=typeof _0x369507)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x369507});if(!this['hasCommentThread'](_0x369507))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x369507});const _0x178b9e=this['getCommentThread'](_0x369507);let _0x41e810=!0x1;if(void 0x0!==_0x4d993a&&_0x178b9e['context']!==_0x4d993a&&(_0x178b9e['context']=_0x4d993a,_0x41e810=!0x0),void 0x0!==_0x4d65e6&&_0x178b9e['unlinkedAt']!==_0x4d65e6&&(_0x178b9e['unlinkedAt']=_0x4d65e6,_0x41e810=!0x0),_0x47f3e8&&!At(_0x47f3e8,_0x178b9e['attributes'])&&(_0x178b9e['attributes']=_0x47f3e8,_0x41e810=!0x0),!_0x41e810)return Promise['resolve']();if(!_0x178b9e['isSubmitted']||_0x2e76cb||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x587585=this['context']['plugins']['get']('PendingActions'),{channelId:_0x251509}=_0x178b9e,_0x35435c=_0x587585['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x251509,'threadId':_0x369507,'context':_0x4d993a,'unlinkedAt':_0x4d65e6,'attributes':_0x47f3e8})['then'](()=>_0x587585['remove'](_0x35435c))['catch'](_0x5d84d6=>{throw console['error'](_0x5d84d6),new _0x5425ea('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x10003b){const _0x38d991=this['context']['plugins']['get'](y),_0x4f8e67=this['getCommentThread'](_0x10003b);if(_0x4f8e67['_isAttached']=!0x1,this['_threadToController']['has'](_0x4f8e67)){const _0x10a6db=this['_threadToController']['get'](_0x4f8e67),_0x2ba785=_0x10a6db['view'],_0x250c55=_0x38d991['getByInnerView'](_0x2ba785);this['_threadToController']['delete'](_0x4f8e67),this['_viewToController']['delete'](_0x2ba785),_0x250c55&&_0x38d991['remove'](_0x250c55),_0x10a6db['destroy'](),_0x2ba785['destroy']()['then'](()=>{this['_unbindEditors'](_0x2ba785);});}}['_updateActiveAnnotation']({threadId:_0x3f77ed,resolvedAt:_0x261b69,unlinkedAt:_0x4cd02b}){const _0xa10da0=!!_0x261b69,_0x4a532e=this['context']['plugins']['get'](y),_0x11c7b2=this['getCommentThread'](_0x3f77ed);if(this['_threadToController']['has'](_0x11c7b2)){const _0x4a40ef=this['_threadToController']['get'](_0x11c7b2)['view'],_0x295f90=_0x4a532e['getByInnerView'](_0x4a40ef);_0x295f90&&(_0xa10da0&&_0x4a532e['_removeActiveAnnotation'](_0x295f90),_0x4cd02b?_0x295f90['isVisible']=!0x1:_0x295f90['refreshVisibility']());}}['_getExternalAuthor'](_0x530485){const _0x53653e=this['context']['plugins']['get'](it),_0x1a567b=It('external:'+_0x530485),_0x444c3c=_0x53653e['getUser'](_0x1a567b);return _0x444c3c||_0x53653e['addUser']({'id':_0x1a567b,'name':_0x530485});}['_createNewComment']({threadId:_0x39e939,commentId:_0x14c809=_0x4a8c36(),content:_0xd4a9f4,authorId:_0x2bd7c4,createdAt:_0x400213,attributes:_0x53a713}){if('string'!=typeof _0x14c809)throw new _0x5425ea('commentsrepository-invalid-commentid');if('string'!=typeof _0x2bd7c4)throw new _0x5425ea('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xd4a9f4||!_0xd4a9f4['trim']())throw new _0x5425ea('commentsrepository-invalid-comment-content');const _0x2f0185=this['context']['plugins']['get'](it)['getUser'](_0x2bd7c4);if(!_0x2f0185)throw new _0x5425ea('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2bd7c4});let _0x18615e=null,_0x6a11e7=_0x400213;return _0x53a713?.['@external']&&(_0x18615e=this['_getExternalAuthor'](_0x53a713['@external']['authorName']),_0x6a11e7=new Date(_0x53a713['@external']['createdAt'])),new wi(this,{'threadId':_0x39e939,'id':_0x14c809,'author':_0x18615e||_0x2f0185,'creator':_0x2f0185,'content':_0xd4a9f4,'createdAt':_0x400213,'authoredAt':_0x6a11e7,'attributes':_0x53a713});}['_addComment'](_0x35adcb){let {threadId:_0x1c8c6c,content:_0x56196f,attributes:_0x27f7b5,isFromAdapter:_0x269303}=_0x35adcb;const _0x2426d6=this['getCommentThread'](_0x35adcb['threadId']);if(!_0x2426d6)throw new _0x5425ea('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x7f3359=this['_createNewComment'](_0x35adcb),{id:_0x58b0a9}=_0x7f3359;if(_0x2426d6['_add'](_0x7f3359),_0x269303||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2426d6['isSubmitted'])return Promise['resolve']();const _0xc68325=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2258e2}=_0x2426d6,_0xf7d102=_0xc68325['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x27f7b5||(_0x27f7b5={}),this['adapter']['addComment']({'channelId':_0x2258e2,'threadId':_0x1c8c6c,'commentId':_0x58b0a9,'content':_0x56196f,'attributes':_0x27f7b5})['then'](_0x202d3f=>{_0xc68325['remove'](_0xf7d102),_0x202d3f&&this['_updateComment']({'channelId':_0x2258e2,'threadId':_0x1c8c6c,'commentId':_0x58b0a9,'createdAt':_0x202d3f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2903b1=>{throw console['error'](_0x2903b1),new _0x5425ea('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x41d324,commentId:_0x5ad130,content:_0x1b1aaf,createdAt:_0xf2cd14,attributes:_0x44a91d,isFromAdapter:_0x493c3f}){if(void 0x0!==_0x1b1aaf&&('string'!=typeof _0x1b1aaf||!_0x1b1aaf['trim']()['length']))throw new _0x5425ea('commentsrepository-update-comment-invalid-content');const _0x9299a6=this['getCommentThread'](_0x41d324),_0x2a81cb=_0x9299a6['getComment'](_0x5ad130);if(!_0x2a81cb)throw new _0x5425ea('commentsrepository-update-missing-comment',this);let _0xdce575=!0x1;if(_0x1b1aaf&&_0x1b1aaf!==_0x2a81cb['content']&&(_0x2a81cb['isEditable']||_0x493c3f)&&(_0x2a81cb['content']=_0x1b1aaf,_0xdce575=!0x0),_0xf2cd14&&_0xf2cd14!==_0x2a81cb['createdAt']&&(_0x2a81cb['createdAt']=_0xf2cd14,_0x2a81cb['attributes']&&_0x2a81cb['attributes']['@external']||(_0x2a81cb['authoredAt']=_0xf2cd14),_0xdce575=!0x0),_0x44a91d&&!At(_0x44a91d,_0x2a81cb['attributes'])&&(_0x2a81cb['attributes']=_0x44a91d,_0xdce575=!0x0),!_0xdce575)return Promise['resolve']();if(_0x9299a6['fire']('commentUpdated'),_0x493c3f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x28087a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2fe1cb}=this['getCommentThread'](_0x2a81cb['threadId']),_0x38faa8=_0x28087a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2fe1cb,'threadId':_0x41d324,'commentId':_0x5ad130,'content':_0x1b1aaf,'attributes':_0x44a91d})['then'](()=>_0x28087a['remove'](_0x38faa8))['catch'](_0x16df69=>{throw console['error'](_0x16df69),new _0x5425ea('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x9e4b1d,commentId:_0x53d23b,isFromAdapter:_0xb8e84b}){const _0x36279c=this['getCommentThread'](_0x9e4b1d),_0x1c971b=_0x36279c['getComment'](_0x53d23b);if(!_0x1c971b)throw new _0x5425ea('commentsrepository-remove-missing-comment',this);if(_0x36279c['_remove'](_0x1c971b),_0xb8e84b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x599cb8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16a13e}=_0x36279c,_0x2b419d=_0x599cb8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x16a13e,'threadId':_0x9e4b1d,'commentId':_0x53d23b})['then'](()=>_0x599cb8['remove'](_0x2b419d))['catch'](_0x2fc36b=>{throw console['error'](_0x2fc36b),new _0x5425ea('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x412ccb(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5efed3,_0x460a05){super();const _0x52cf60=_0x460a05['isResolvable'];this['channelId']=_0x460a05['channelId'],this['id']=_0x460a05['id'],this['comments']=new _0x262a30(),this['_repository']=_0x5efed3,this['_isAttached']=!0x1,this['_isSubmitted']=_0x460a05['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5efed3,'_permissions',_0x5efed3,'_readOnlyChannels',()=>_0x5efed3['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5efed3,'_permissions',()=>_0x5efed3['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5efed3,'_permissions',()=>{const _0x4f7343=_0x5efed3['getPermissions'](this['channelId']);return _0x4f7343['write']||_0x4f7343['admin'];}),this['bind']('isResolvable')['to'](_0x5efed3,'_permissions',()=>_0x52cf60&&_0x5efed3['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x460a05['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5d93e4,_0xc8ec8f)=>_0x5d93e4?_0xc8ec8f?_0x5d93e4<_0xc8ec8f?_0x5d93e4:_0xc8ec8f:_0x5d93e4:_0xc8ec8f),this['set']('unlinkedAt',_0x460a05['unlinkedAt']||null),this['set']('resolvedAt',_0x460a05['resolvedAt']||null),this['set']('resolvedBy',_0x460a05['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4a26d2=>!!_0x4a26d2),this['set']('attributes',_0x460a05['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2796fb,_0x3f0c91)=>_0x2796fb+_0x3f0c91['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x32e66e,id:_0x5dc921}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x32e66e),{'channelId':_0x32e66e,'threadId':_0x5dc921});}['setUnlinkedAt'](_0x1b5a29){this['_update']({'unlinkedAt':_0x1b5a29});}['resolve']({resolvedAt:_0x1b22ca=new Date(),resolvedBy:_0x10c4c5='',isFromAdapter:_0xc5f1e3=!0x1}={}){const _0x12e171=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x414eeb,id:_0xb8074c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x414eeb),{'channelId':_0x414eeb,'threadId':_0xb8074c,'resolvedAt':_0x1b22ca,'resolvedBy':_0x10c4c5||_0x12e171['id'],'isFromAdapter':_0xc5f1e3});}['reopen']({isFromAdapter:_0x3d354f=!0x1}={}){const {channelId:_0x58d33e,id:_0x3d4eff}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x58d33e),{'channelId':_0x58d33e,'threadId':_0x3d4eff,'isFromAdapter':_0x3d354f});}['setContext'](_0x492e1a){this['context']||this['_update']({'context':_0x492e1a});}['setAttribute'](_0x1bcca1,_0xd992e7){const _0x1b615a=wt(this['attributes']);yt(_0x1b615a,_0x1bcca1,_0xd992e7),this['_update']({'attributes':_0x1b615a});}['removeAttribute'](_0x5d7d41){const _0x2ea094=wt(this['attributes']);Ct(_0x2ea094,_0x5d7d41),this['_update']({'attributes':_0x2ea094});}['remove']({isFromAdapter:_0xce5a05=!0x1}={}){const {channelId:_0x10b717,id:_0x4a0461}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x10b717),{'channelId':_0x10b717,'threadId':_0x4a0461,'isFromAdapter':_0xce5a05});}['attachTo'](_0x1ee629){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1ee629});}['addComment'](_0x219635){const {channelId:_0x4e338e,id:_0x2512e3}=this;this['_repository']['fire'](Nt('addComment',_0x4e338e,_0x2512e3),Object['assign']({'channelId':_0x4e338e,'threadId':_0x2512e3},_0x219635));}['getComment'](_0x5e6aa1){if('string'!=typeof _0x5e6aa1)throw new _0x5425ea('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5e6aa1});return this['comments']['get'](_0x5e6aa1);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x1825ca=>_0x1825ca['toJSON']()),'attributes':this['attributes']};}['_add'](_0xb31f61){return this['listenTo'](_0xb31f61,'change:authoredAt',()=>{const _0x2256b9=this['_findOptimalIndex'](_0xb31f61),_0x423432=this['comments'];_0x2256b9-0x1!=_0x423432['getIndex'](_0xb31f61)&&_0x2256b9+0x1!=_0x423432['getIndex'](_0xb31f61)&&(this['_remove'](_0xb31f61),this['_add'](_0xb31f61));}),this['comments']['add'](_0xb31f61,this['_findOptimalIndex'](_0xb31f61));}['_update'](_0x1ddd35){const {channelId:_0x5cf875,id:_0x3cf9cd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5cf875),{..._0x1ddd35,'channelId':_0x5cf875,'threadId':_0x3cf9cd});}['_remove'](_0x4ed7c4){return this['stopListening'](_0x4ed7c4),_0x4ed7c4['destroy'](),this['comments']['remove'](_0x4ed7c4);}['_findOptimalIndex'](_0x2644c5){const _0x25ad9a=this['comments']['find'](_0x8c0373=>new Date(_0x8c0373['authoredAt'])['getTime']()>new Date(_0x2644c5['authoredAt'])['getTime']());return _0x25ad9a?this['comments']['getIndex'](_0x25ad9a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x412ccb(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x361c51,_0x14a819){super();const _0xd01de2=_0x361c51['context']['plugins']['get'](it)['me'],_0x15a481=_0x361c51['getCommentThread'](_0x14a819['threadId']),_0x318242=0x0===_0x15a481['comments']['length'],_0x485f8d=_0xd01de2===_0x14a819['author'];this['id']=_0x14a819['id'],this['threadId']=_0x14a819['threadId'],this['author']=_0x14a819['author'],this['creator']=_0x14a819['creator'],this['isExternal']=Boolean(_0x14a819['attributes']&&_0x14a819['attributes']['@external']),this['set']('content',_0x14a819['content']),this['createdAt']=_0x14a819['createdAt']||new Date(),this['set']('authoredAt',_0x14a819['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x15a481,'resolvedAt'),this['set']('attributes',_0x14a819['attributes']||{}),this['bind']('isEditable')['to'](_0x361c51,'_permissions',()=>{const _0x1d6968=_0x361c51['getPermissions'](_0x15a481['channelId'])['write'],_0x4d6916=_0x361c51['getPermissions'](_0x15a481['channelId'])['modifyAll'];return _0x485f8d&&_0x1d6968||!_0x485f8d&&_0x4d6916;}),this['bind']('isRemovable')['to'](_0x15a481,'isRemovable',_0x361c51,'_permissions',_0x32e300=>{const _0x21188b=_0x361c51['getPermissions'](_0x15a481['channelId'])['write'],_0x58d800=_0x361c51['getPermissions'](_0x15a481['channelId'])['modifyAll'];return _0x485f8d&&_0x21188b||_0x32e300&&_0x318242||!_0x485f8d&&_0x58d800&&!_0x318242;}),this['bind']('isReadOnly')['to'](_0x15a481,'isReadOnly'),this['_repository']=_0x361c51;}get['weight'](){return Math['max'](function(_0x5ebec6){const _0x3a8966=document['createElement']('div');return _0x3a8966['innerHTML']=_0x5ebec6,_0x3a8966['textContent']['length'];}(this['content']),0xc8);}['update'](_0x55b7fb){const {threadId:_0x23755e,id:_0x130594}=this;if(!this['_repository']['hasCommentThread'](_0x23755e))throw new _0x5425ea('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4dbdfb}=this['_repository']['getCommentThread'](_0x23755e);this['_repository']['fire'](Nt('updateComment',_0x4dbdfb,_0x23755e),{'channelId':_0x4dbdfb,'threadId':_0x23755e,'commentId':_0x130594,..._0x55b7fb});}['setAttribute'](_0x430f98,_0x29f7e5){const _0x35aa7c=wt(this['attributes']);yt(_0x35aa7c,_0x430f98,_0x29f7e5),this['update']({'attributes':_0x35aa7c});}['removeAttribute'](_0x37775f){const _0x19fa75=wt(this['attributes']);Ct(_0x19fa75,_0x37775f),this['update']({'attributes':_0x19fa75});}['remove'](_0x1e20d9={}){if(!_0x1e20d9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xe8b2c7,id:_0x30e405}=this;if(!this['_repository']['hasCommentThread'](_0xe8b2c7))throw new _0x5425ea('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x12e2a1}=this['_repository']['getCommentThread'](_0xe8b2c7);this['_repository']['fire'](Nt('removeComment',_0x12e2a1,_0xe8b2c7),{'channelId':_0x12e2a1,'threadId':_0xe8b2c7,'commentId':_0x30e405,..._0x1e20d9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x12d06f,..._0x337643){for(const _0x5d8205 of _0x337643)void 0x0!==_0x5d8205&&(_0x12d06f+=':'+String(_0x5d8205));return _0x12d06f;}class ot extends _0x3b02de{constructor(_0x43b432){super(_0x43b432),this['set']('hasContent',!0x1);}['refresh'](){const _0x581fad=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xd9eb92 of _0x581fad['getRanges']())if(this['_hasContent'](_0xd9eb92))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x447ec7=_0x4a8c36(),ranges:_0x46c5eb,comment:_0x2820b1}={}){const _0x276401=this['editor']['model'],_0x2d12a7=_0x46c5eb??Array['from'](_0x276401['document']['selection']['getRanges']()),_0x208745=[];for(const _0x2f278d of _0x2d12a7)this['_hasContent'](_0x2f278d)&&_0x208745['push'](this['_trimToContent'](_0x2f278d));if(!_0x208745['length'])throw new _0x5425ea('addcommentthreadcommand-incorrect-ranges',null);_0x2820b1&&this['_createCommentThread'](_0x447ec7,_0x2820b1),this['_createMarkersFromRanges'](_0x447ec7,_0x208745,!!_0x2820b1);}['_createMarkersFromRanges'](_0xfcd9,_0x56fa3f,_0x493cff){this['editor']['model']['change'](_0x5865d0=>{for(const _0xe12ef2 of _0x56fa3f){const _0x3df5e0=_0x4a8c36()['substr'](0x1,0x5),_0x2e2649='comment:'+_0xfcd9+':'+_0x3df5e0;_0x5865d0['addMarker'](_0x2e2649,{'range':_0xe12ef2,'usingOperation':_0x493cff,'affectsData':_0x493cff});}});}['_createCommentThread'](_0x42c7dc,_0x3f3802){const _0x27996f=this['editor']['plugins']['get']('CommentsRepository'),_0x2158d3=this['editor']['config']['get']('collaboration.channelId'),_0x29c76c=this['editor']['plugins']['get']('Users')['me'];if(!_0x29c76c)throw new _0x5425ea('addcommentthreadcommand-user-not-found',null);_0x27996f['addCommentThread']({'threadId':_0x42c7dc,'channelId':_0x2158d3,'comments':[{'authorId':_0x29c76c['id'],'content':_0x3f3802,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4f2171){for(const _0x47bd3e of _0x4f2171['getItems']())if(this['_itemIsContent'](_0x47bd3e))return!0x0;return!0x1;}['_itemIsContent'](_0x851ebc){return _0x851ebc['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x851ebc)&&!_0x851ebc['is']('element','tableCell');}['_trimToContent'](_0x5a6538){const _0x533e76=_0xe1a4e7=>!this['_itemIsContent'](_0xe1a4e7['item']),_0xe43c91=_0x5a6538['start']['getLastMatchingPosition'](_0x533e76),_0x388bff=_0x5a6538['end']['getLastMatchingPosition'](_0x533e76,{'direction':'backward'});return this['editor']['model']['createRange'](_0xe43c91,_0x388bff);}}class b extends _0x58c0a0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d76eb){super(_0x3d76eb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x240072=this['editor'],_0x59b036=_0x240072['model']['document']['selection'],_0x583ed6=_0x20bca9(()=>this['refreshSelectedViews'](),0xa);_0x59b036['on']('change:range',(_0x13325e,_0x264f14)=>{_0x264f14['directChange']&&(_0x583ed6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x240072['editing']['view']['document'],'change:isFocused',(_0x23a1b8,_0x1d321e,_0x42bc2a)=>{_0x42bc2a&&_0x583ed6();}),this['listenTo'](_0x240072['ui']['focusTracker'],'change:isFocused',(_0x3d6475,_0x4f0d53,_0x39739e)=>{_0x39739e||this['fire']('blur',{'isAnnotationTracked':_0x3609d6=>this['_editorAnnotationsData']['has'](_0x3609d6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x440b52){if(this['_editorAnnotations']['has'](_0x440b52['view']))return;this['_editorAnnotations']['add'](_0x440b52['view']),this['editor']['ui']['focusTracker']['add'](_0x440b52['view']['element']);const _0x1031bf=this['editor']['plugins']['get'](y);this['listenTo'](_0x1031bf['collection'],'remove',(_0x5131f0,_0x5cbaf6)=>{this['editor']['ui']['focusTracker']['remove'](_0x5cbaf6['view']['element']),this['_editorAnnotations']['delete'](_0x5cbaf6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x258865){if('function'!=typeof _0x258865)throw new _0x5425ea('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x258865);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x12685c,annotations:_0x5984dc}){const _0x51265d=[],_0x1ae182=this['editor']['model']['document']['selection'],_0x4c5720=Array['from'](_0x1ae182['getRanges']());for(const [_0x81c87d,_0x4d8ba9]of this['_editorAnnotationsData']){const _0x4646a6=_0x246473(_0x4d8ba9),_0xd04369=_0x5984dc['getByInnerView'](_0x81c87d);_0x4646a6&&_0xd04369&&_0x51265d['push']({'annotation':_0xd04369,'range':_0x4646a6});}function _0x246473(_0x302dfe){for(const _0x22aa77 of _0x302dfe)for(const _0x426da6 of _0x4c5720)if(_0x22aa77['containsRange'](_0x426da6,!_0x1ae182['isCollapsed']))return _0x22aa77;return null;}return _0x51265d['sort']((_0xd39b9e,_0x14d70d)=>{const _0x296e7f=_0xd39b9e['range'],_0x58f6de=_0x14d70d['range'];if(!_0x296e7f['isEqual'](_0x58f6de)){if(_0x296e7f['containsRange'](_0x58f6de,!0x0))return 0x1;if(_0x58f6de['containsRange'](_0x296e7f,!0x0))return-0x1;}return _0xd39b9e['annotation']==_0x12685c?-0x1:_0x14d70d['annotation']==_0x12685c?0x1:0x0;})['map'](_0x615a15=>_0x615a15['annotation']);}get['_editorAnnotationsData'](){const _0x4e01d4=new Map();for(const _0x56aaab of Array['from'](this['_dataCollectors']))for(const [_0x4ad390,_0x4bcadb]of _0x56aaab())_0x4e01d4['set'](_0x4ad390,_0x4bcadb);return _0x4e01d4;}}class st extends _0x58c0a0{['afterInit'](){const _0x58e6cc=this['editor'];if(!_0x58e6cc['plugins']['has']('RestrictedEditingModeEditing'))return;_0x58e6cc['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x58c0a0{constructor(_0x4c36be){super(_0x4c36be),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x31010e=this['editor'],_0x432856=_0x31010e['commands']['get']('importWord'),_0x4253c1=_0x31010e['plugins']['get'](it);_0x432856&&(_0x432856['on']('execute',(_0x3da225,[,_0x4f82e2])=>{_0x4f82e2['collaboration_features']={'comments':!0x0,'user_id':_0x4253c1['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x432856,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x6e3313,_0x1d3d4e){const {comment_threads:_0x16e530}=_0x1d3d4e;_0x16e530&&_0x16e530['forEach'](({thread_id:_0x5d63f1,comments:_0x30b746,is_resolved:_0x108681})=>{const _0x31fe9f=new Date(),_0x471a45=_0x30b746['map'](({author:_0x2b0ace,content:_0x3108c5,created_at:_0x101f37})=>({'content':_0x3108c5,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x31fe9f,'attributes':{'@external':{'authorName':_0x2b0ace,'createdAt':_0x101f37?new Date(_0x101f37):new Date(),'source':'importWord'}}})),_0xad1423=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xad1423,'threadId':_0x5d63f1,'comments':_0x471a45,'resolvedAt':_0x108681?_0x31fe9f:null});});}}class at extends _0x58c0a0{constructor(_0x2fa5d6){super(_0x2fa5d6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x14b843=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x14b843,'contentInsertion',(_0x435a50,_0x3b6c4d)=>this['_removeMarkersWithoutThreads'](_0x3b6c4d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x16c231){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x16c231;const _0x1c0783=this['editor']['plugins']['get']('CommentsRepository');for(const _0xb6fc8b of _0x16c231['keys']()){const [_0xd4955e,_0x30dddc]=_0xb6fc8b['split'](':');'comment'!=_0xd4955e||_0x1c0783['hasCommentThread'](_0x30dddc)||_0x16c231['delete'](_0xb6fc8b);}return _0x16c231;}['_registerMarkerInClipboardPipeline'](){const _0x42215f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x16f6b4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x16f6b4&&_0x42215f['_registerMarkerToCopy']('comment',_0x16f6b4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x38edb6){switch(_0x38edb6){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x43400f){const _0x52b10b=_0x43400f['split'](':');return{'group':_0x52b10b[0x0],'id':_0x52b10b[0x1],'part':_0x52b10b[0x2]};}class ut extends _0x58c0a0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x30b9af,_0x9928ae)=>{if(!_0x9928ae['options']['showCommentHighlights'])return null;if(_0x9928ae['options']['ignoreResolvedComments']){const {id:_0x288940}=ft(_0x30b9af['markerName']),_0xe6e6cd=this['editor']['plugins']['get'](o);if(_0xe6e6cd['getCommentThread'](_0x288940)?.['isResolved']&&_0x30b9af['item'])return _0x9928ae['consumable']['consume'](_0x30b9af['item'],'addMarker:'+_0x30b9af['markerName']),_0x9928ae['consumable']['consume'](_0x30b9af['item'],'removeMarker:'+_0x30b9af['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x323697=>{_0x323697['on']('addMarker:comment',(_0x175a30,_0x384330,_0x46011a)=>{if(!_0x46011a['options']['showCommentHighlights'])return;const _0x2a725a=_0x384330['item'];if(!_0x2a725a)return;const _0x312331=_0x46011a['mapper']['toViewElement'](_0x2a725a);this['editor']['model']['schema']['isObject'](_0x2a725a)&&_0x312331&&!_0x312331['getCustomProperty']('widget')&&_0x312331['is']('containerElement')&&_0x369070(_0x312331,_0x46011a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x335b04,{writer:_0x1fdcf3,options:_0x516a4d})=>{if(!_0x516a4d['showCommentHighlights'])return null;const _0x16b1e7=_0x1fdcf3['createContainerElement']('div'),_0x515405=_0x1fdcf3['createEmptyElement']('hr');return _0x1fdcf3['addClass']('ck-horizontal-line',_0x16b1e7),_0x1fdcf3['insert'](_0x1fdcf3['createPositionAt'](_0x16b1e7,0x0),_0x515405),_0x16b1e7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x26e3de,{writer:_0x5a73f2,options:_0x58d168})=>{if(!_0x58d168['showCommentHighlights'])return null;const _0x50e516=_0x5a73f2['createContainerElement']('span'),_0xade260=_0x5a73f2['createEmptyElement']('img');return _0x5a73f2['addClass']('image-inline',_0x50e516),_0x5a73f2['insert'](_0x5a73f2['createPositionAt'](_0x50e516,0x0),_0xade260),_0x50e516;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3b5fd0,{writer:_0x382ece,options:_0x940541})=>{if(_0x940541['showCommentHighlights'])return _0x382ece['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xc98d98,_0xf91148,_0x2ea3ff)=>{_0x2ea3ff['options']['showCommentHighlights']&&_0xc98d98['stop']();},{'priority':'high'});}}class r extends _0x58c0a0{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ea26a){super(_0x2ea26a),this['set']('isThreadsLoadingPaused',!0x0),_0x2ea26a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xeaa444,_0x327291,_0x418ed3,_0x23e993)=>{const _0x93e8d1=_0x2ea26a['plugins']['get'](o),_0x334b88=_0x418ed3?ft(_0x418ed3)['id']:null;_0x2ea26a['model']['change'](()=>{if(_0x334b88){const _0xbae9ef=this['getAllMarkersForId'](_0x334b88);for(const _0x1f299c of _0xbae9ef)_0x2ea26a['editing']['reconvertMarker'](_0x1f299c);}if(_0x23e993){const {id:_0x25548d}=ft(_0x23e993),_0x5ae6e8=_0x93e8d1['getCommentThread'](_0x25548d);if(_0x5ae6e8&&_0x5ae6e8['unlinkedAt'])return;if(_0x5ae6e8&&!_0x5ae6e8['isAttached'])return;const _0x33fda1=this['getAllMarkersForId'](_0x25548d);for(const _0x40ced7 of _0x33fda1)_0x2ea26a['editing']['reconvertMarker'](_0x40ced7);}}),_0x334b88&&this['scrollToThreadMarker'](_0x334b88);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2e3001=this['editor'],_0x23629f=_0x2e3001['plugins']['get'](o),_0x2f5937=_0x2e3001['config']['get']('collaboration.channelId'),_0x29a3e1=_0x23629f['getCommentThreads']()['filter'](_0x307367=>_0x307367['channelId']!==_0x2f5937);_0x2e3001['commands']['add']('addCommentThread',new ot(_0x2e3001)),this['listenTo'](_0x2e3001,'change:isReadOnly',(_0x79da73,_0x428c15,_0xe0d0d5)=>{_0x23629f['switchReadOnly'](_0xe0d0d5,_0x2e3001['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x23629f,dt('addCommentThread',_0x2f5937),(_0x5d72b8,{threadId:_0x4cba34})=>{const _0x35baa0=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4cba34);_0x35baa0?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4cba34);}),this['listenTo'](_0x23629f,dt('removeCommentThread',_0x2f5937),(_0x2b2b9f,{threadId:_0x49b424})=>{_0x2e3001['model']['enqueueChange']({'isUndoable':!0x1},_0x3664fc=>{const _0x5f000d=this['getAllMarkersForId'](_0x49b424);for(const _0x31eae2 of _0x5f000d)_0x3664fc['removeMarker'](_0x31eae2);});}),this['listenTo'](_0x23629f,dt('resolveCommentThread',_0x2f5937),(_0xc94242,{threadId:_0x1b78f3})=>{(this['_reconvertMarkers'](_0x1b78f3),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1b78f3)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x23629f,dt('reopenCommentThread',_0x2f5937),(_0x558076,{threadId:_0x100a4b})=>{this['_reconvertMarkers'](_0x100a4b);},{'priority':'low'}),this['listenTo'](_0x23629f,dt('addComment',_0x2f5937),(_0x4d4964,{threadId:_0x3c83d8,isFromAdapter:_0x4910f3})=>{const _0x404581=this['getAllMarkersForId'](_0x3c83d8);if(_0x4910f3||0x0==_0x404581['length']||!_0x23629f['hasCommentThread'](_0x3c83d8))return;0x1===_0x23629f['getCommentThread'](_0x3c83d8)['length']&&_0x2e3001['model']['enqueueChange']({'isUndoable':!0x1},_0x2c2061=>{for(const _0x1744d7 of _0x404581)_0x2c2061['updateMarker'](_0x1744d7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x29a3e1);}['afterInit'](){!async function(_0x1c5d65){const _0x24b13b=_0x5a73e8([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1e1109=0x73460ab3,_0x51a53c=0x734182a3^_0x1e1109,_0x5ba57a=window[_0x5a73e8([0x44,0x61,0x74,0x65])][_0x5a73e8([0x6e,0x6f,0x77])](),_0x39028f=_0x1c5d65[_0x5a73e8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a7994=new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1766e5=>{_0x39028f[_0x5a73e8([0x6f,0x6e,0x63,0x65])](_0x5a73e8([0x72,0x65,0x61,0x64,0x79]),_0x1766e5);}),_0x27bba2={[_0x5a73e8([0x6b,0x74,0x79])]:_0x5a73e8([0x45,0x43]),[_0x5a73e8([0x75,0x73,0x65])]:_0x5a73e8([0x73,0x69,0x67]),[_0x5a73e8([0x63,0x72,0x76])]:_0x5a73e8([0x50,0x2d,0x32,0x35,0x36]),[_0x5a73e8([0x78])]:_0x5a73e8([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x5a73e8([0x79])]:_0x5a73e8([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x5a73e8([0x61,0x6c,0x67])]:_0x5a73e8([0x45,0x53,0x32,0x35,0x36])},_0x197b51=_0x39028f[_0x5a73e8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5a73e8([0x67,0x65,0x74])](_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2e872e(){let _0xf5b03b,_0x4569ae=null,_0x42280f=null;try{if(_0x197b51==_0x5a73e8([0x47,0x50,0x4c]))return _0x5a73e8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xf5b03b=_0x154681(),!_0xf5b03b)return _0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xf5b03b[_0x5a73e8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x42280f=_0x385664(_0xf5b03b[_0x5a73e8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xf5b03b[_0x5a73e8([0x6a,0x74,0x69])])),await _0x534ad4()?_0x157ea8()?_0xd19c32()?_0x5a73e8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x400e66()?(_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5a73e8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4569ae=_0x3e92f3(_0x5a73e8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x380a52()):_0x5a73e8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5a73e8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd19c32(){const _0x521015=[_0x5a73e8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5a73e8([0x74,0x72,0x69,0x61,0x6c])][_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5ba57a/0x3e8:0xe10*_0x51a53c;return _0xf5b03b[_0x5a73e8([0x65,0x78,0x70])]<_0x521015;}function _0x157ea8(){const _0x2a7bd6=_0xf5b03b[_0x5a73e8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a7bd6)return!0x1;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x2a])))return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x43,0x4d,0x54])))return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2d7fbc())return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x52,0x43,0x4d,0x54]))){if(_0x4fa509())return!0x0;if(_0x43c32a()||_0x39c830())return!0x0;}return!0x1;}function _0x400e66(){const _0x300794=_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x300794||0x0==_0x300794[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x45c090}=new URL(window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x300794[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c090))return!0x0;const _0x52a12e=_0x45c090[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e]));return _0x300794[_0x5a73e8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x422d2c=>_0x422d2c[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x2a])))[_0x5a73e8([0x6d,0x61,0x70])](_0x58861d=>_0x58861d[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e])))[_0x5a73e8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x108d9e=>_0x108d9e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x52a12e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a73e8([0x6d,0x61,0x70])](_0x6bde96=>Array(_0x52a12e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6bde96[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a73e8([0x66,0x69,0x6c,0x6c])](_0x6bde96[0x0]===_0x5a73e8([0x2a])?_0x5a73e8([0x2a]):'')[_0x5a73e8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6bde96))[_0x5a73e8([0x73,0x6f,0x6d,0x65])](_0x346dc0=>_0x52a12e[_0x5a73e8([0x65,0x76,0x65,0x72,0x79])]((_0xde90fa,_0x49447e)=>_0x346dc0[_0x49447e]===_0xde90fa||_0x346dc0[_0x49447e]===_0x5a73e8([0x2a])));}function _0x380a52(){return _0x4569ae&&_0x42280f?new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a2f1a,_0x1b9759)=>{_0x4569ae[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x3a2f1a,_0x1b9759),_0x42280f[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x572a56=>{_0x572a56!=_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])&&_0x3a2f1a(_0x572a56);},_0x1b9759);}):_0x4569ae||_0x42280f||_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x385664(_0x16cafe,_0x24efff){return new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b0bae=>{if(_0x4d177f())return _0x4b0bae(_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]));_0x3dad99(),_0x39028f[_0x5a73e8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x169795=!0x1;const _0x407392=_0x4a8c36();function _0x56bc13(_0x1899dd){return!!_0x1899dd&&(typeof _0x1899dd===_0x5a73e8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1899dd===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1899dd[_0x5a73e8([0x74,0x68,0x65,0x6e])]===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1899dd[_0x5a73e8([0x63,0x61,0x74,0x63,0x68])]===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2dd7b6(_0x1b6d5b){_0x2be0fa(_0x1b6d5b)[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x42a0c8=>{if(!_0x42a0c8||_0x42a0c8[_0x5a73e8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5a73e8([0x6f,0x6b]))return _0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xc05821(_0x5eafe5(_0x407392+_0x24efff))!=_0x42a0c8[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]);})[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x503347=>(_0x5bdfec(),_0x503347),()=>{const _0x197e03=_0x56d438();return null==_0x197e03?(_0x5bdfec(),_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])):_0x5a73e8(_0x5ba57a-_0x197e03>(0x574a8eb3^_0x1e1109)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x4b0bae)[_0x5a73e8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x31a9e2=0x7370e433^_0x1e1109;function _0x5bdfec(){const _0x4d0ef1=_0x5a73e8([0x6c,0x6c,0x63,0x74,0x2d])+_0xc05821(_0x5eafe5(_0x16cafe)),_0x2b1b24=_0xb178ab(_0xc05821(window[_0x5a73e8([0x4d,0x61,0x74,0x68])][_0x5a73e8([0x63,0x65,0x69,0x6c])](_0x5ba57a/_0x31a9e2)));window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a73e8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d0ef1,_0x2b1b24);}function _0x56d438(){const _0x2beb0f=_0x5a73e8([0x6c,0x6c,0x63,0x74,0x2d])+_0xc05821(_0x5eafe5(_0x16cafe)),_0x365af2=window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a73e8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2beb0f);return _0x365af2?window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb178ab(_0x365af2),0x10)*_0x31a9e2:null;}function _0x2be0fa(_0x34d50b){return new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x52ee56,_0x48a28a)=>{_0x34d50b[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x52ee56,_0x48a28a),window[_0x5a73e8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x48a28a,0x7347de73^_0x1e1109);});}}_0x39028f[_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5bbad5,_0xef5f98)=>{if(_0xef5f98[0x0]!=_0x16cafe)return _0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xef5f98[0x1]={..._0xef5f98[0x1],[_0x5a73e8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x407392};},{[_0x5a73e8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a73e8([0x68,0x69,0x67,0x68])}),_0x39028f[_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2f0e13=>{_0x56bc13(_0x2f0e13[_0x5a73e8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x169795=!0x0,_0x2dd7b6(_0x2f0e13[_0x5a73e8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5a73e8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a73e8([0x6c,0x6f,0x77])}),_0x3a7994[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>{_0x169795||_0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4d177f(){return _0x39028f[_0x5a73e8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a73e8([0x76,0x69,0x65,0x77])][_0x5a73e8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5a73e8([0x61,0x75,0x74,0x6f]);}function _0x3dad99(){_0x39028f[_0x5a73e8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a73e8([0x76,0x69,0x65,0x77])][_0x5a73e8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5a73e8([0x61,0x75,0x74,0x6f]);}}function _0x3e92f3(_0x2b5706){const _0x4bd914=[new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18feaa=>setTimeout(_0x18feaa,0x734f347f^_0x1e1109)),_0x3a7994[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36c4ca=>{let _0x58e0a8=0x0;_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5eea03,_0x3d4a9a)=>{_0x3d4a9a[0x0][_0x5a73e8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x58e0a8++,_0x58e0a8==(0x73460f5b^_0x1e1109)&&(_0x36c4ca(),_0x5eea03[_0x5a73e8([0x6f,0x66,0x66])]());});}))];return window[_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5a73e8([0x72,0x61,0x63,0x65])](_0x4bd914)[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>_0x2b5706);}async function _0x22098a(){await _0x3a7994,_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x24de94,_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x24de94,_0x39028f[_0x5a73e8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2d7fbc(){return window[_0x5a73e8([0x67,0x6c,0x6f,0x62])]&&window[_0x5a73e8([0x67,0x6c,0x6f,0x62])][_0x5a73e8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4fa509(){return _0x4877b4(_0x5a73e8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x27e849(_0x5a73e8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5a73e8([0x73,0x74,0x61,0x74,0x65])]==_0x5a73e8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x43c32a(){return _0x4877b4(_0x5a73e8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x39c830(){return _0x4877b4(_0x5a73e8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2862ab(_0x1f321e){const _0xa9e15b=_0x521bc1();_0x39028f[_0xa9e15b]=_0x5a73e8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1f321e,_0x1f321e!=_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])&&_0x22098a();}function _0x521bc1(){const _0x5b4b75=window[_0x5a73e8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5a73e8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5a73e8([0x6e,0x6f,0x77])]())[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5a73e8([0x2e]),'');let _0xa418f3=_0x5a73e8([0x4b]);for(let _0x3a2897=0x0;_0x3a2897<_0x5b4b75[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3a2897+=0x2){let _0x3b7fd5=window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b4b75[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a2897,_0x3a2897+0x2));_0x3b7fd5>=_0x24b13b[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3b7fd5-=_0x24b13b[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xa418f3+=_0x24b13b[_0x3b7fd5];}return _0xa418f3;}function _0x154681(){const _0x351271=_0x197b51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e]));if(0x3!=_0x351271[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbd6be8(_0x351271[0x1]);function _0xbd6be8(_0x1c8fc4){const _0x298e9e=_0x28328b(_0x1c8fc4);return _0x298e9e&&_0x53adc4()?_0x298e9e:null;function _0x53adc4(){const _0x1122ee=_0x298e9e[_0x5a73e8([0x6a,0x74,0x69])],_0x4c4bfb=window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1122ee[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1122ee[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x40d534={..._0x298e9e,[_0x5a73e8([0x6a,0x74,0x69])]:_0x1122ee[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1122ee[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x40d534[_0x5a73e8([0x76,0x63])],_0x5eafe5(_0x40d534)==_0x4c4bfb;}}}async function _0x534ad4(){let _0x2458f6=!0x0;try{const _0x251da8=_0x197b51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e])),[_0x562480,_0x1f60e5,_0x11df04]=_0x251da8;return _0x335054(_0x562480),await _0x48c66f(_0x562480,_0x1f60e5,_0x11df04),_0x2458f6;}catch{return!0x1;}function _0x335054(_0x4facd1){const _0x22bd93=_0x28328b(_0x4facd1);_0x22bd93&&_0x22bd93[_0x5a73e8([0x61,0x6c,0x67])]==_0x5a73e8([0x45,0x53,0x32,0x35,0x36])||(_0x2458f6=!0x1);}async function _0x48c66f(_0x1344e1,_0x17ff40,_0x2ab7af){const _0x5777af=window[_0x5a73e8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5a73e8([0x66,0x72,0x6f,0x6d])](_0x405308(_0x2ab7af),_0x401b05=>_0x401b05[_0x5a73e8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x472918=new window[(_0x5a73e8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5a73e8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1344e1+_0x5a73e8([0x2e])+_0x17ff40),_0x2533c0=window[_0x5a73e8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5a73e8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2533c0)return;const _0x238347=await _0x2533c0[_0x5a73e8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5a73e8([0x6a,0x77,0x6b]),_0x27bba2,{[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x45,0x43,0x44,0x53,0x41]),[_0x5a73e8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5a73e8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2533c0[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x45,0x43,0x44,0x53,0x41]),[_0x5a73e8([0x68,0x61,0x73,0x68])]:{[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x238347,_0x5777af,_0x472918)||(_0x2458f6=!0x1);}}function _0x28328b(_0x1a9eb7){return _0x1a9eb7[_0x5a73e8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5a73e8([0x65,0x79]))?JSON[_0x5a73e8([0x70,0x61,0x72,0x73,0x65])](_0x405308(_0x1a9eb7)):null;}function _0x405308(_0xb3de00){return window[_0x5a73e8([0x61,0x74,0x6f,0x62])](_0xb3de00[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5a73e8([0x2b]))[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5a73e8([0x2f])));}function _0x5eafe5(_0x480dee){let _0x5bfc30=0x1505;function _0x5776bb(_0xe1fd86){for(let _0x3e734c=0x0;_0x3e734c<_0xe1fd86[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e734c++){const _0x36c1aa=_0xe1fd86[_0x5a73e8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e734c);_0x5bfc30=(_0x5bfc30<<0x5)+_0x5bfc30+_0x36c1aa,_0x5bfc30&=_0x5bfc30;}}function _0x5c5163(_0x196f39){Array[_0x5a73e8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x196f39)?_0x196f39[_0x5a73e8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c5163):_0x196f39&&typeof _0x196f39==_0x5a73e8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5a73e8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x196f39)[_0x5a73e8([0x73,0x6f,0x72,0x74])]()[_0x5a73e8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x273458,_0x46806d])=>{_0x5776bb(_0x273458),_0x5c5163(_0x46806d);}):_0x5776bb(window[_0x5a73e8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x196f39));}return _0x5c5163(_0x480dee),_0x5bfc30>>>0x0;}function _0xc05821(_0x5c7be2){return _0x5c7be2[_0x5a73e8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5a73e8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5a73e8([0x30]));}function _0xb178ab(_0xa12a51){return _0xa12a51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5a73e8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5a73e8([0x6a,0x6f,0x69,0x6e])]('');}function _0x4877b4(_0x1f7249){return _0x39028f[_0x5a73e8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5a73e8([0x68,0x61,0x73])](_0x1f7249);}function _0x27e849(_0x27897b){return _0x39028f[_0x5a73e8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5a73e8([0x67,0x65,0x74])](_0x27897b);}function _0x24de94(){}function _0x5a73e8(_0x5ac9df){return _0x5ac9df['map'](_0x39c5b1=>String['fromCharCode'](_0x39c5b1))['join']('');}_0x2862ab(await _0x2e872e());}(this);}['destroy'](){const _0x2ba143=this['editor']['plugins']['get'](o),_0x5cd24a=this['editor']['config']['get']('collaboration.channelId');for(const _0x1b0701 of _0x2ba143['getCommentThreads']({'channelId':_0x5cd24a}))_0x2ba143['_detachCommentThread'](_0x1b0701['id']),_0x2ba143['_threads']['delete'](_0x1b0701['id']);super['destroy']();}['hasMarkerForId'](_0x1dd801){return this['getAllMarkersForId'](_0x1dd801)['length']>0x0;}['getAllMarkersForId'](_0x4acd5b){const _0x449cb0=[];for(const _0x596707 of this['editor']['model']['markers'])_0x596707['name']['startsWith']('comment:'+_0x4acd5b)&&_0x449cb0['push'](_0x596707);return _0x449cb0;}['scrollToThreadMarker'](_0x51c5e9){setTimeout(()=>{const _0x26401e=this['_getTargetForId'](_0x51c5e9);if(!_0x26401e)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x51c5e9&&nt({'target':_0x26401e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5cae48){this['editor']['model']['change'](()=>{for(const _0x4c3300 of this['getAllMarkersForId'](_0x5cae48))this['editor']['editing']['reconvertMarker'](_0x4c3300);});}['_attachArchivedThread'](_0x485f33){const _0x42c573=this['editor']['plugins']['get'](o),_0x45a604=this['editor']['plugins']['get'](b),_0x29a978=_0x42c573['getCommentThread'](_0x485f33);if(!_0x29a978['isAttached']){const _0x53aedf=_0x29a978['attachTo'](()=>this['_getTargetForId'](_0x29a978['id']));_0x45a604['registerAnnotation'](_0x53aedf),_0x29a978['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x54cbc1=this['editor'],_0x4069f4=_0x54cbc1['plugins']['get'](it);_0x54cbc1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3851ff,_0x5db76a)=>{const {id:_0xc5646a}=ft(_0x3851ff['markerName']),_0x263b4d=_0x54cbc1['plugins']['get'](o)['getCommentThread'](_0xc5646a),_0x531e08=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xc5646a;let _0x2152b4;if(_0x263b4d&&_0x263b4d['isResolved']&&!_0x531e08&&_0x3851ff['item'])return _0x5db76a['consumable']['consume'](_0x3851ff['item'],'addMarker:'+_0x3851ff['markerName']),_0x5db76a['consumable']['consume'](_0x3851ff['item'],'removeMarker:'+_0x3851ff['markerName']),null;const _0x3cade9=['ck-comment-marker'];return _0x531e08&&_0x3cade9['push']('ck-comment-marker--active'),_0x2152b4=_0x263b4d?.['length']?_0x263b4d['comments']['first']['author']['id']:_0x4069f4['me']['id'],{'classes':_0x3cade9,'attributes':{'data-comment':_0xc5646a,'data-author-id':_0x2152b4}};}}),_0x54cbc1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x345c3a,{options:_0x4b1d54})=>{if(_0x4b1d54['showCommentHighlights'])return null;const _0x4f76dd=_0x54cbc1['plugins']['get'](o),_0x1bed41=_0x54cbc1['model']['markers']['get'](_0x345c3a),{id:_0xce7d6f,part:_0x101b7c}=ft(_0x345c3a);return _0x1bed41&&!_0x1bed41['affectsData']||_0x4b1d54['ignoreResolvedComments']&&_0x4f76dd['getCommentThread'](_0xce7d6f)?.['isResolved']?null:{'group':'comment','name':_0x101b7c?_0xce7d6f+':'+_0x101b7c:_0xce7d6f};}}),_0x54cbc1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3903c1,{writer:_0x1f571c})=>_0x1f571c['createElement']('$marker',{'data-name':'comment:'+_0x3903c1['getAttribute']('id')})}),_0x54cbc1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x268115=this['editor'],_0x33321b=_0x268115['plugins']['get'](o),_0x14fc2a=new Set(),_0x2c99b8=new Set();_0x268115['model']['document']['registerPostFixer'](_0x1897c0=>{let _0x5afe7a=!0x1;for(const {name:_0x4db264,data:_0x1e916b}of _0x268115['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3785de,id:_0x1b9948}=ft(_0x4db264);let _0x2809a0=_0x1e916b['newRange'];if('comment'!==_0x3785de||!_0x2809a0)continue;const _0x551d0d='$graveyard'===_0x2809a0['root']['rootName'];_0x551d0d||(_0x2809a0=ht(_0x2809a0,_0x268115['model']),!_0x2809a0||_0x2809a0['isCollapsed']||!_0x1e916b['newRange']||_0x2809a0['isEqual'](_0x1e916b['newRange']))?_0x268115['model']['hasContent'](_0x2809a0)&&!_0x551d0d?this['isThreadsLoadingPaused']?_0x14fc2a['add'](_0x4db264):this['_handleThreadMarker'](_0x4db264,_0x1b9948):(_0x2c99b8['add'](_0x4db264),_0x14fc2a['delete'](_0x4db264),_0x1897c0['removeMarker'](_0x4db264),_0x5afe7a=!0x0):(_0x1897c0['updateMarker'](_0x4db264,{'range':_0x2809a0}),_0x5afe7a=!0x0);}return _0x5afe7a;}),this['on']('change:isThreadsLoadingPaused',(_0x47c9a1,_0x1d9b6f,_0x5c897a)=>{if(!_0x5c897a&&_0x14fc2a['size'])for(const _0x4c555 of _0x14fc2a){const {id:_0x4d9df4}=ft(_0x4c555);_0x14fc2a['delete'](_0x4c555),_0x268115['model']['markers']['get'](_0x4c555)&&this['_handleThreadMarker'](_0x4c555,_0x4d9df4);}}),this['listenTo'](_0x268115['model']['document'],'change',()=>{for(const {name:_0x1fe05e,data:{newRange:_0x1d5e4b}}of _0x268115['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1ad701,id:_0x26c21c}=ft(_0x1fe05e);if('comment'!==_0x1ad701)continue;const _0x4e9748=_0x33321b['getCommentThread'](_0x26c21c),_0x1eb47b=this['hasMarkerForId'](_0x26c21c);_0x4e9748&&(!_0x4e9748['_hasTargetInContent']&&_0x1d5e4b&&_0x268115['editing']['view']['once']('render',()=>{const _0x4c7366=_0x268115['plugins']['get'](y),_0x6e6d27=_0x33321b['_threadToController']['get'](_0x4e9748)['view'];_0x4c7366['getByInnerView'](_0x6e6d27)['refreshVisibility']();},{'priority':'low'}),_0x4e9748['_hasTargetInContent']=_0x1eb47b||!!_0x1d5e4b),_0x1d5e4b||(_0x2c99b8['add'](_0x1fe05e),_0x14fc2a['delete'](_0x1fe05e));}for(const _0x29cd8f of _0x2c99b8){const {id:_0x51a177}=ft(_0x29cd8f),_0x5d5337=_0x33321b['getCommentThread'](_0x51a177);if(_0x14fc2a['delete'](_0x29cd8f),!_0x5d5337)continue;const _0x16e381=this['hasMarkerForId'](_0x51a177);_0x16e381||_0x5d5337['isSubmitted']?_0x16e381||_0x5d5337['unlinkedAt']||_0x5d5337['setUnlinkedAt'](new Date()):_0x5d5337['remove']();}_0x2c99b8['clear']();});}['_handleInitialThreads'](_0x5a3a6b){_0x5a3a6b['forEach'](_0x5c7fd2=>{_0x5c7fd2['unlinkedAt']&&this['_attachArchivedThread'](_0x5c7fd2['id']);});}['_getTargetForId'](_0x4a1469){const _0x391ba9=this['editor'],_0x5e240a=this['getAllMarkersForId'](_0x4a1469);return et(_0x391ba9['editing'],_0x5e240a);}['_getTextContext'](_0x38b242){const _0x73883=this['getAllMarkersForId'](_0x38b242);let _0x53ef39='',_0x41b853=!0x1;for(const _0x41db64 of _0x73883){const _0x35b12d=_0x41db64['getRange']();for(const _0x42f961 of Array['from'](_0x35b12d['getItems']()))_0x42f961['is']('$textProxy')?(_0x53ef39&&_0x41b853&&(_0x53ef39+='\x20',_0x41b853=!0x1),_0x53ef39+=_0x42f961['data']):_0x41b853=!0x0;_0x41b853=!0x0;}return _0x53ef39['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5012fa,_0xf457b4){const _0x13631b=this['editor'],_0x2fefb0=_0x13631b['plugins']['get'](o);let _0x4ed09d=_0x2fefb0['getCommentThread'](_0xf457b4);const _0x2710bf=_0x13631b['config']['get']('collaboration.channelId'),_0x353ba3=_0x13631b['plugins']['get'](b);if(_0x4ed09d&&(_0x4ed09d['unlinkedAt']&&_0x4ed09d['setUnlinkedAt'](null),_0x4ed09d['isAttached']))return _0x4ed09d;return!this['getAllMarkersForId'](_0xf457b4)[0x0]['managedUsingOperations']?_0x13631b['editing']['view']['once']('render',()=>{if(_0x2fefb0['getCommentThread'](_0xf457b4))return;const _0x4d8598=_0x13631b['plugins']['get'](y);_0x4ed09d=_0x2fefb0['openNewCommentThread']({'channelId':_0x2710bf,'threadId':_0xf457b4,'target':()=>this['_getTargetForId'](_0xf457b4),'context':{'type':'text','value':this['_getTextContext'](_0xf457b4)}});const _0x3f5116=_0x2fefb0['_threadToController']['get'](_0x4ed09d)['view'],_0x4ae1eb=_0x4d8598['getByInnerView'](_0x3f5116);_0x4ae1eb&&_0x353ba3['registerAnnotation'](_0x4ae1eb);},{'priority':'low'}):_0x2fefb0['fetchCommentThread']({'channelId':_0x2710bf,'threadId':_0xf457b4})['then'](_0x17f7e1=>{if('destroyed'!==_0x13631b['state']){if(_0x4ed09d=_0x17f7e1,_0x4ed09d&&!_0x4ed09d['isAttached']){const _0x49b5d3=_0x4ed09d['attachTo'](()=>this['_getTargetForId'](_0xf457b4));_0x353ba3['registerAnnotation'](_0x49b5d3),_0x4ed09d['isResolved']&&this['_reconvertMarkers'](_0xf457b4);}else{if(!_0x4ed09d){const _0x108b86=this['getAllMarkersForId'](_0xf457b4);_0x13631b['model']['change'](_0x2c60f3=>{for(const _0x42c683 of _0x108b86)_0x2c60f3['removeMarker'](_0x42c683);});}}}}),_0x4ed09d;}['_handleThreadMarker'](_0x63e7e9,_0x262c46){const _0x2f9de1=this['_attachMarkerToThread'](_0x63e7e9,_0x262c46);_0x2f9de1&&!_0x2f9de1['context']&&_0x2f9de1['setContext']({'type':'text','value':this['_getTextContext'](_0x262c46)});}['_initAriaMarkerChangeAnnouncements'](){const _0x360781=this['editor'];rt(_0x360781['model'],({left:_0x442178,entered:_0x973e48})=>{for(const _0x20dcc1 of _0x442178)if(mt(_0x20dcc1)){_0x360781['ui']['ariaLiveAnnouncer']['announce'](N(_0x360781['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50d0b8 of _0x973e48)if(mt(_0x50d0b8)){_0x360781['ui']['ariaLiveAnnouncer']['announce'](N(_0x360781['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1104be)));break;}});}}function dt(_0xbe2fae,_0x57df35){return _0x57df35?_0xbe2fae+':'+_0x57df35:_0xbe2fae;}function ht(_0x4a1691,_0x1cea43){const _0x4e1cc9=_0x1cea43['schema'],_0x3ec2f7=_0x1cea43['createRange'](_0x4a1691['start']);for(const _0x4149ca of _0x4a1691['getWalker']()){const {type:_0x5266b9,item:_0x302e0f,nextPosition:_0x362007}=_0x4149ca;if('text'===_0x5266b9||_0x4e1cc9['isObject'](_0x302e0f)){const _0x1d1ac8=_0x1cea43['createPositionBefore'](_0x302e0f);_0x3ec2f7['isCollapsed']&&(_0x3ec2f7['start']=_0x1d1ac8),_0x3ec2f7['end']=_0x362007;}}return _0x3ec2f7;}function mt(_0xe0aa8f){return'comment'===ft(_0xe0aa8f['name'])['group'];}class s extends _0x58c0a0{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x5285ba=this['editor'],_0xf1cfb9=_0x5285ba['plugins']['get'](o),_0x4cf0d3=_0x5285ba['plugins']['get'](r),_0x5c67d5=_0x5285ba['plugins']['get'](y),_0x31656d=_0x5285ba['plugins']['get'](b);_0x5285ba['ui']['componentFactory']['add']('comment',()=>{const _0x56fb4d=this['_createUIButton'](_0x3d87f0);return _0x56fb4d['tooltip']=!0x0,_0x56fb4d;}),_0x5285ba['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x293e2a)),_0x31656d['addSourceCollector'](()=>{const _0x2aa02a=[];for(const [_0xb22fc8,_0x3c0e14]of _0xf1cfb9['_threadToController']){const _0x20095e=_0x4cf0d3['getAllMarkersForId'](_0xb22fc8['id']),_0x2bf66d=_0x20095e['map'](_0x37c739=>_0x37c739['getRange']());_0x20095e['length']>0x0&&_0x2aa02a['push']([_0x3c0e14['view'],_0x2bf66d]);}return _0x2aa02a;}),this['listenTo'](_0x5c67d5,'change:activeAnnotations',(_0x194365,_0x1bded9,_0x581412)=>{const _0x2c1bbe=Array['from'](_0x581412)['map'](_0x4f30f6=>_0x4f30f6['innerView'])['find'](_0x50891b=>_0xf1cfb9['_viewToController']['has'](_0x50891b));if(!_0x2c1bbe)return void(_0x4cf0d3['activeMarker']=null);const _0x11467a=_0xf1cfb9['_viewToController']['get'](_0x2c1bbe)['model']['id'],_0x11c377='comment:'+_0x11467a;_0x11467a&&_0x4cf0d3['hasMarkerForId'](_0x11467a)?_0x4cf0d3['activeMarker']=_0x11c377:_0x4cf0d3['activeMarker']&&(_0x4cf0d3['activeMarker']=null);}),this['listenTo'](_0xf1cfb9,'removeCommentThread',(_0x3613de,{threadId:_0x4e5ded,isFromAdapter:_0x5a15a3})=>{!_0x5a15a3&&_0x5285ba['ui']['focusTracker']['isFocused']&&_0x4cf0d3['hasMarkerForId'](_0x4e5ded)&&_0x5285ba['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xf1cfb9,'addComment',(_0x396d77,{threadId:_0x5b27b3,isFromAdapter:_0x4c7152})=>{if(_0x4c7152||!_0x4cf0d3['hasMarkerForId'](_0x5b27b3)||!_0xf1cfb9['hasCommentThread'](_0x5b27b3))return;0x1===_0xf1cfb9['getCommentThread'](_0x5b27b3)['length']&&(_0x5285ba['editing']['view']['focus'](),_0x396d77['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2b7c39=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3cad8e;for(const _0x523dd0 in _0x2b7c39){const _0x5d92ec=_0x523dd0,_0x154090=_0x2b7c39[_0x5d92ec];if('commentsLicenseKeyValid'==_0x154090||'commentsLicenseKeyInvalid'==_0x154090||'commentsLicenseKeyExpired'==_0x154090||'commentsLicenseKeyDomainLimit'==_0x154090||'commentsLicenseKeyNotAllowed'==_0x154090||'commentsLicenseKeyEvaluationLimit'==_0x154090||'commentsLicenseKeyUsageLimit'==_0x154090){delete _0x2b7c39[_0x5d92ec],_0x3cad8e=_0x154090,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1dbad7){const _0x2f919b=this['editor'],_0x5c86a8=new _0x1dbad7(_0x2f919b['locale']),_0x4f8a3e=_0x2f919b['commands']['get']('addCommentThread');return _0x5c86a8['set']({'label':N(_0x2f919b['locale'],'Comment'),'icon':_0x919c1b}),_0x5c86a8['bind']('isEnabled')['to'](_0x4f8a3e,'isEnabled',_0x4f8a3e,'hasContent',(_0x4b92c9,_0x1d4827)=>_0x4b92c9&&_0x1d4827),this['listenTo'](_0x5c86a8,'execute',()=>{_0x4f8a3e['execute']();}),_0x5c86a8;}}class i extends _0x58c0a0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1c006d){super(_0x1c006d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x570b73,_0x506c66,_0x299e3d)=>{_0x299e3d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x59c98d,_0x22a0b1]of this['editor']['commands'])_0x22a0b1['affectsData']&&'addCommentThread'!==_0x59c98d&&_0x22a0b1['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1258c9=this['editor']['editing']['view']['document'];this['listenTo'](_0x1258c9,'cut',_0x8e8c4a=>_0x8e8c4a['stop'](),{'priority':'highest'}),this['listenTo'](_0x1258c9,'clipboardInput',_0x3fd72d=>_0x3fd72d['stop'](),{'priority':'highest'}),this['listenTo'](_0x1258c9,'delete',_0x57c8c3=>_0x57c8c3['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4c6cfa,_0x4a5ec0]of this['editor']['commands'])_0x4a5ec0['affectsData']&&'addCommentThread'!==_0x4c6cfa&&_0x4a5ec0['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1570af{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c5973){super(_0x1c5973),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3aa5c9=this['context']['plugins']['get'](y);this['listenTo'](_0x3aa5c9,'_activateAnnotation',(_0x410fc1,_0x1634b0)=>{for(const _0x49c29f of this['activeUIs']){const _0x4ef1c7=this['_uis']['get'](_0x49c29f);(0x0,this['uisData']['get'](_0x49c29f)['filter'])(_0x1634b0)&&_0x4ef1c7['setActiveAnnotation'](_0x1634b0);}}),this['listenTo'](_0x3aa5c9,'_deactivateAllAnnotations',()=>{for(const _0x1f9004 of this['activeUIs']){this['_uis']['get'](_0x1f9004)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3aa5c9['_visibleAnnotations'],'add',(_0x341bcf,_0x2e739c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e739c);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5a3852){return this['activeUIs']['has'](_0x5a3852);}['activate'](_0x58efd6,_0x3094c4=this['defaultFilter']){const _0x5ae441=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x58efd6))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x58efd6});this['isActive'](_0x58efd6)&&this['deactivate'](_0x58efd6),this['activeUIs']['add'](_0x58efd6);const _0x15c5cd=new S();v({'source':_0x5ae441['_visibleAnnotations'],'target':_0x15c5cd,'filter':_0x3094c4}),this['uisData']['set'](_0x58efd6,{'collection':_0x15c5cd,'filter':_0x3094c4});const _0x25b760=this['_uis']['get'](_0x58efd6);_0x25b760['attach'](_0x15c5cd),this['listenTo'](_0x25b760,'change:activeAnnotation',(_0x31da45,_0x41898d,_0x136c9,_0x5f4ff5)=>{_0x5f4ff5&&_0x5ae441['_removeActiveAnnotation'](_0x5f4ff5),_0x136c9&&_0x5ae441['_addActiveAnnotation'](_0x136c9);});}['deactivate'](_0x23dbc7){if(this['activeUIs']['delete'](_0x23dbc7),!this['_uis']['has'](_0x23dbc7))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x23dbc7});const _0x1f5723=this['_uis']['get'](_0x23dbc7);_0x1f5723['detach'](),this['stopListening'](_0x1f5723),this['uisData']['get'](_0x23dbc7)['collection']['destroy'](),this['uisData']['delete'](_0x23dbc7);}['switchTo'](_0x9557dd){if(!this['_uis']['has'](_0x9557dd))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x9557dd});const _0x3fb687=this['context']['plugins']['get'](y),_0x46eae1=Array['from'](_0x3fb687['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x9557dd);const _0x26dfa2=this['_uis']['get'](_0x9557dd);_0x26dfa2['setActiveAnnotation'](_0x46eae1),_0x26dfa2['_setSelectedAnnotations']&&_0x46eae1&&_0x26dfa2['_setSelectedAnnotations']([_0x46eae1]);}['deactivateAll'](){for(const _0x4cdec6 of this['activeUIs'])this['deactivate'](_0x4cdec6);}['register'](_0x84f2ac,_0xb3e5c1){if(this['_uis']['has'](_0x84f2ac))throw new _0x5425ea('annotationsuis-register-already-registered');if('function'!=typeof _0xb3e5c1['attach']||'function'!=typeof _0xb3e5c1['detach']||'function'!=typeof _0xb3e5c1['setActiveAnnotation'])throw new _0x5425ea('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x84f2ac,_0xb3e5c1);}['refilterAnnotations'](){const _0x3772fc=this['context']['plugins']['get'](y)['collection'],_0x376d84=new Map(),_0x4bc75b=Array['from'](this['activeUIs']);for(const _0x20ad1a of this['activeUIs']){const _0x390c1a=this['uisData']['get'](_0x20ad1a)['collection'];for(const _0x383d78 of _0x390c1a)_0x376d84['set'](_0x383d78,_0x20ad1a);}for(const _0xc19fad of _0x3772fc){const _0x7c4e23=_0x376d84['get'](_0xc19fad);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xc19fad);const _0x2e928b=_0x4bc75b['find'](_0x155260=>this['uisData']['get'](_0x155260)['filter'](_0xc19fad));_0x7c4e23!==_0x2e928b&&(_0x7c4e23&&this['uisData']['get'](_0x7c4e23)['collection']['remove'](_0xc19fad),_0x2e928b&&this['uisData']['get'](_0x2e928b)['collection']['add'](_0xc19fad));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xfcac47){const _0x53cee5=[];for(const _0x3d9c16 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d9c16)['filter'])(_0xfcac47)&&_0x53cee5['push'](_0x3d9c16);}if(_0x53cee5['length']>0x1)throw new _0x5425ea('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x53cee5,'annotationType':_0xfcac47['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x38d6a1){super(_0x38d6a1);const _0x28d8e3=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x58afd6(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x28d8e3['to']('class')],'style':{'minHeight':_0x28d8e3['to']('minHeight',_0x1b0d0b=>'number'==typeof _0x1b0d0b?_i(_0x1b0d0b+0xa):null)},'dir':_0x38d6a1['uiLanguageDirection'],'role':'application','aria-label':N(_0x38d6a1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x38d6a1,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x58c0a4=>{this['_updateItemPositionInFocusables'](_0x58c0a4['source']);}),this['list']['forEach'](_0x1c349c=>{this['focusTracker']['add'](_0x1c349c['element']),this['_updateItemPositionInFocusables'](_0x1c349c);}),this['list']['on']('change',(_0x12940c,_0x2ad8e3)=>{for(const _0x44d631 of _0x2ad8e3['removed'])this['focusTracker']['remove'](_0x44d631['element']),this['focusables']['remove'](_0x44d631);for(const _0x1cfe72 of _0x2ad8e3['added'])this['focusTracker']['add'](_0x1cfe72['element']),this['_updateItemPositionInFocusables'](_0x1cfe72);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xd17c93){const _0x373b90=this['focusables']['getIndex'](_0xd17c93);let _0x18ebb8,_0x443f03;for(const _0x14c413 of this['focusables'])if(_0xd17c93['top']<_0x14c413['top']){_0x18ebb8=_0x14c413;break;}if(_0x443f03=_0x18ebb8?this['focusables']['getIndex'](_0x18ebb8):this['focusables']['length'],-0x1!==_0x373b90){if(_0x373b90===_0x443f03-0x1)return;this['focusables']['remove'](_0xd17c93),_0x443f03=_0x18ebb8?this['focusables']['getIndex'](_0x18ebb8):this['focusables']['length'];}this['focusables']['add'](_0xd17c93,_0x443f03);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x367a53){super(_0x367a53),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5df441,_0x14e725)=>_0x5df441+_0x14e725),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x415a87=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x415a87['to']('isAnimationDisabled',_0x2f82d8=>_0x2f82d8?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x415a87['to']('top',_0x2b9d93=>Ot(_0x2b9d93))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4ed799=this['element']['clientHeight'];_0x4ed799&&(this['height']=_0x4ed799);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1570af{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x192e0c){super(_0x192e0c),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x171d7b=this['context']['config']['get']('sidebar.container');_0x171d7b&&this['setContainer'](_0x171d7b);}['setContainer'](_0x3e8a70){if(!g(_0x3e8a70))throw new _0x5425ea('sidebar-setcontainer-invalid-element');this['container']=_0x3e8a70;}['_attachToContainer']({viewClass:_0x409290='',spaceBetweenItems:_0x21252b=0x19}={}){if(!g(this['container']))throw new _0x5425ea('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x409290,this['_spaceBetweenItems']=_0x21252b;}['rearrange']({removedAnnotation:_0x33215a,previousAnnotation:_0x4e29c4,nextAnnotation:_0x4b1c72}){const _0x2913e3=this['getSidebarItemView'](_0x33215a);this['view']['list']['remove'](_0x2913e3),this['_destroySidebarItemView'](_0x33215a),_0x4e29c4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4e29c4)),_0x4b1c72&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b1c72)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9cefec,activatedAnnotation:_0x1054c1,disableAnimationOnActivatedAnnotation:_0x2e3897}){if(this['_activeAnnotation']=_0x1054c1,_0x9cefec){_0x9cefec['isActive']=!0x1;const _0x1e79d6=this['getSidebarItemView'](_0x9cefec);_0x1e79d6&&_0x2e3897&&(_0x1e79d6['isAnimationDisabled']=!0x1);}if(_0x1054c1){const _0xa988a7=this['getSidebarItemView'](_0x1054c1);_0xa988a7&&(_0x1054c1['isActive']=!0x0,_0x2e3897&&(_0xa988a7['isAnimationDisabled']=!0x0,_0xa988a7['top']+=0x1),this['_alignToTargetRect'](_0xa988a7));}}['_detachFromContainer'](_0x16ead8){if(this['view']['element']['remove'](),_0x16ead8){for(const _0xc03bde of _0x16ead8)this['_destroySidebarItemView'](_0xc03bde);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2a389c,_0x273ce7){_0x273ce7||(_0x273ce7=_0x2a389c['view']);const _0x242fe1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x242fe1,_0x2a389c),this['_annotationToSidebarItemView']['set'](_0x2a389c,_0x242fe1),_0x242fe1['content']['add'](_0x273ce7),this['listenTo'](_0x2a389c['view'],'change:targetRect',(_0x21ca0e,_0x171f60,_0xb7b0bc)=>{const _0x1b90b9=this['_getTargetTop'](_0x2a389c,_0xb7b0bc);_0x242fe1['_targetTop']!=_0x1b90b9&&(_0x242fe1['_targetTop']=_0x1b90b9,this['_setItemTop'](_0x242fe1,_0x1b90b9));}),this['listenTo'](_0x242fe1,'change:top',()=>{this['_recalculate'](_0x242fe1,'top');}),this['listenTo'](_0x242fe1,'change:bottom',()=>{this['_recalculate'](_0x242fe1,'bottom');}),this['_alignToTargetRect'](_0x242fe1);const _0x3d963c=this['_getItemBefore'](_0x242fe1);if(_0x3d963c)this['_alignAfterItem'](_0x3d963c,_0x242fe1)||this['_alignToTargetRect'](_0x242fe1);else this['_alignToTargetRect'](_0x242fe1);return this['_updateLastItem'](),this['view']['list']['add'](_0x242fe1),_0x242fe1;}['_alignForTopChange'](_0x507a28){if(!_0x507a28['content']['length'])return;const _0x3d5ab3=this['_getItemBefore'](_0x507a28);if(!_0x3d5ab3)return;const _0x2152a9=this['_sidebarItemViewToAnnotation']['get'](_0x3d5ab3),_0x4117e2=this['_activeAnnotation'];_0x4117e2&&_0x4117e2===_0x2152a9?this['_alignAfterItem'](_0x3d5ab3,_0x507a28):this['_alignBeforeItem'](_0x507a28,_0x3d5ab3);}['_alignForBottomChange'](_0x13506a){if(!_0x13506a['content']['length'])return;const _0x18dfc4=this['_getItemAfter'](_0x13506a);if(!_0x18dfc4)return;const _0xf47c52=this['_sidebarItemViewToAnnotation']['get'](_0x18dfc4),_0x39497a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1ede75=this['_activeAnnotation'];_0x1ede75&&_0x1ede75===_0xf47c52&&_0x39497a?(this['_alignBeforeItem'](_0x18dfc4,_0x13506a),this['_alignAfterItem'](_0x13506a,_0x18dfc4)):_0x1ede75&&_0x1ede75===_0xf47c52?this['_alignBeforeItem'](_0x18dfc4,_0x13506a):this['_alignAfterItem'](_0x13506a,_0x18dfc4);}['_recalculate'](_0x197ad2,_0x526950){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x49902a,changedProp:_0x10c9d2}of this['_recalculateBuffer'])'top'===_0x10c9d2?this['_alignForTopChange'](_0x49902a):this['_alignForBottomChange'](_0x49902a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x197ad2,'changedProp':_0x526950});}['getSidebarItemView'](_0x5d4879){return this['_annotationToSidebarItemView']['get'](_0x5d4879);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2ed356){const _0x3d1070=this['getSidebarItemView'](_0x2ed356);this['stopListening'](_0x3d1070),this['stopListening'](_0x2ed356['view']),_0x3d1070['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2ed356),this['_sidebarItemViewToAnnotation']['delete'](_0x3d1070);}['_createSidebarView'](){const _0x28e701=new H(this['context']['locale']);return _0x28e701['render'](),this['on']('change:_lastItem',(_0x3988eb,_0x541567,_0x17763e,_0x4053be)=>{_0x4053be&&_0x28e701['unbind']('minHeight'),_0x17763e?_0x28e701['bind']('minHeight')['to'](_0x17763e,'bottom'):_0x28e701['minHeight']=null;}),_0x28e701;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5926bd){const _0x380885=this['_sidebarItemViewToAnnotation']['get'](_0x5926bd),_0x5696c7=_0x380885&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x380885)-0x1);return _0x5696c7&&this['getSidebarItemView'](_0x5696c7)||null;}['_getItemAfter'](_0x248b56){const _0x46b2c5=this['_sidebarItemViewToAnnotation']['get'](_0x248b56),_0x1a8d7d=_0x46b2c5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x46b2c5)+0x1);return _0x1a8d7d&&this['getSidebarItemView'](_0x1a8d7d)||null;}['_alignBeforeItem'](_0x308d87,_0x4c3f13){_0x308d87['updateHeight']();const _0xe6aae=G(_0x4c3f13['bottom']+this['_spaceBetweenItems'],_0x308d87['top']);return!!_0xe6aae&&(this['_setItemTop'](_0x4c3f13,_0x4c3f13['top']-_0xe6aae),!0x0);}['_alignAfterItem'](_0x292dd1,_0x4fe0ca){_0x292dd1['updateHeight']();const _0x1a8bb0=G(_0x292dd1['bottom']+this['_spaceBetweenItems'],_0x4fe0ca['top']);return!!_0x1a8bb0&&(this['_setItemTop'](_0x4fe0ca,_0x4fe0ca['top']+_0x1a8bb0,!0x1),!0x0);}['_alignToTargetRect'](_0x548dfe){const _0x2c3bd2=this['_sidebarItemViewToAnnotation']['get'](_0x548dfe);if(!_0x2c3bd2||!_0x2c3bd2['target']||!_0x2c3bd2['targetRect'])return;const _0x436d0d=this['_getTargetTop'](_0x2c3bd2,_0x2c3bd2['targetRect']);this['_setItemTop'](_0x548dfe,_0x436d0d);}['_getTargetTop'](_0x161e6e,_0x588144){if(null===_0x588144)return 0x0;if(_0x161e6e['target']instanceof _0x55e497)return _0x588144['top'];{const _0x3d1da5=new _0x55e497(this['view']['element'])['top'];return _0x588144['top']-_0x3d1da5;}}['_setItemTop'](_0x1b1466,_0x1feeb1,_0x46f2d2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x46f2d2&&(_0x1feeb1=Math['max'](_0x1feeb1,this['_getMaxAvailableTop'](_0x1b1466))),_0x1b1466['top']=_0x1feeb1;}['_getMaxAvailableTop'](_0x4aba50){let _0x2792f1=this['_getItemBefore'](_0x4aba50),_0x147529=0x0;for(;_0x2792f1;)_0x2792f1['updateHeight'](),_0x147529+=this['_spaceBetweenItems']+_0x2792f1['height'],_0x2792f1=this['_getItemBefore'](_0x2792f1);return _0x147529;}}function G(_0x3a0694,_0x59c5dc){return Math['max'](_0x3a0694-_0x59c5dc,0x0);}function g(_0x3eb82c){return null!==_0x3eb82c&&'object'==typeof _0x3eb82c&&0x1===_0x3eb82c['nodeType'];}class e extends _0x1570af{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1776ed){super(_0x1776ed),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x262a30(),this['_refreshPositioningDebounced']=_0x20bca9(()=>{_0x1776ed['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1448e0=this['context']['plugins']['get'](j),_0x559277=this['context']['plugins']['get'](z);_0x1448e0['register']('wideSidebar',this),_0x559277['container']&&_0x1448e0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1b93f9){if(_0x1b93f9===this['activeAnnotation'])return;const _0xcf1f8f=this['context']['plugins']['get'](z);_0xcf1f8f['_activeAnnotation']=_0x1b93f9;const _0x2f9772=this['activeAnnotation'];_0xcf1f8f['refresh']({'blurredAnnotation':_0x2f9772,'activatedAnnotation':_0x1b93f9}),this['activeAnnotation']=_0x1b93f9;}['attach'](_0x1d43f9){this['annotations']=_0x1d43f9;const _0x58b848=this['context']['plugins']['get'](z);if(_0x58b848['_annotations']=_0x1d43f9,this['isAttached'])throw new _0x5425ea('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58b848,'set:container',()=>{this['detach'](),this['listenTo'](_0x58b848,'change:container',_0x3ccf31=>{_0x3ccf31['off'](),this['attach'](_0x1d43f9);});}),_0x58b848['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2f17ba=_0x3c8de9=>{_0x3c8de9['updateTargetRect'](),_0x58b848['addAnnotation'](_0x3c8de9);};for(const _0x1e43a2 of _0x1d43f9)_0x2f17ba(_0x1e43a2);this['listenTo'](_0x1d43f9,'add',(_0x3f6c8e,_0x303225)=>{_0x2f17ba(_0x303225);}),this['listenTo'](_0x1d43f9,'remove',(_0x2cfaff,_0x57552c,_0x2caf76)=>{_0x58b848['rearrange']({'removedAnnotation':_0x57552c,'previousAnnotation':_0x1d43f9['get'](_0x2caf76-0x1),'nextAnnotation':_0x1d43f9['get'](_0x2caf76+0x1)}),_0x57552c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1d43f9,'focus',(_0x3ed065,_0x8ceb46)=>{this['setActiveAnnotation'](_0x8ceb46);}),this['listenTo'](_0x1d43f9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3a0b1b=this['context']instanceof _0xb1f4b9?this['context']['editors']:new _0x262a30([this['context']]);for(const _0x4236f9 of _0x3a0b1b)this['_integrateWithEditorAnnotations'](_0x4236f9);this['listenTo'](_0x3a0b1b,'add',(_0x2a7090,_0x34d191)=>{this['listenTo'](_0x34d191,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x34d191);});}),this['listenTo'](_0x3a0b1b,'remove',(_0x58b328,_0x2c4793)=>{_0x2c4793['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2c4793['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5425ea('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x22cdfa=this['context']['plugins']['get'](z);_0x22cdfa['_detachFromContainer'](this['annotations']),this['stopListening'](_0x22cdfa),this['stopListening'](this['annotations']),this['context']instanceof _0xb1f4b9&&this['stopListening'](this['context']['editors']);for(const _0x1c1ac9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c1ac9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1a867f){if(!_0x1a867f['plugins']['has']('EditorAnnotations'))return;const _0x20f470=_0x1a867f['plugins']['get']('EditorAnnotations'),_0x4598cb=()=>{const _0x1b9979=_0x20f470['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1b9979[0x0]||null);};this['listenTo'](_0x20f470,'refresh',_0x4598cb),this['listenTo'](_0x20f470,'blur',(_0x51d06b,{isAnnotationTracked:_0x1712b2})=>{this['activeAnnotation']&&_0x1712b2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x20f470,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xdd7a0d=>{_0x20f470['hasDomSelection']()&&(_0x4598cb(),_0xdd7a0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x20f470);}['_destroyEditorAnnotationsIntegration'](_0x239485){this['stopListening'](_0x239485),this['_editorAnnotations']['remove'](_0x239485);}}class C extends _0x3d87f0{['counterView'];constructor(_0x4e378d){super(_0x4e378d);const _0xa882ad=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x29fbed,_0x1c2d8c)=>_0x29fbed?'...':_0x1c2d8c['toString']()),this['set']('annotationType',''),this['icon']=_0x919c1b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa882ad['to']('annotationType',_0x5599c7=>'ck-annotation-counter__badge--'+_0x5599c7),_0xa882ad['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa882ad['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1570af{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11a127){super(_0x11a127),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x320921())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x262a30(),this['_refreshPositioningDebounced']=_0x20bca9(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2798f0(this['context']['locale']),this['balloonPanelView']=new _0x211a1f(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x54e4f6){this['annotations']=_0x54e4f6;const _0x11232b=this['context']['plugins']['get'](z),_0x4ad25d=this['balloonPanelView'];if(_0x11232b['_annotations']=_0x54e4f6,this['isAttached'])throw new _0x5425ea('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11232b,'set:container',()=>{this['detach'](),this['listenTo'](_0x11232b,'change:container',_0xfc8e51=>{_0xfc8e51['off'](),this['attach'](_0x54e4f6);});}),_0x11232b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c9a08=_0x4c65b4=>{const _0xe9a700=new C(this['context']['locale']);_0x11232b['addAnnotation'](_0x4c65b4,_0xe9a700),this['_annotationToNarrowView']['set'](_0x4c65b4,_0xe9a700),_0xe9a700['bind']('isDirty','annotationType','number')['to'](_0x4c65b4['view'],'isDirty','type','length'),_0xe9a700['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4ad25d['content']['first']!==_0x4c65b4['view']?(this['_showBalloon'](_0x4c65b4),_0x4c65b4['view']['element']['focus'](),this['setActiveAnnotation'](_0x4c65b4)):this['setActiveAnnotation'](null);});};for(const _0x3180bd of _0x54e4f6)_0x5c9a08(_0x3180bd);this['listenTo'](_0x54e4f6,'add',(_0x47987a,_0x8ccbce)=>{_0x5c9a08(_0x8ccbce);}),this['listenTo'](_0x54e4f6,'remove',(_0x4ea26f,_0x41db93,_0x76513e)=>{this['_annotationToNarrowView']['get'](_0x41db93)['destroy'](),this['_annotationToNarrowView']['delete'](_0x41db93),_0x11232b['rearrange']({'removedAnnotation':_0x41db93,'previousAnnotation':_0x54e4f6['get'](_0x76513e-0x1),'nextAnnotation':_0x54e4f6['get'](_0x76513e+0x1)}),_0x41db93===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x54e4f6,'focus',(_0x5c109a,_0x3907bd)=>{this['setActiveAnnotation'](_0x3907bd);}),this['listenTo'](_0x54e4f6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x32283b,_0x225eed)=>{_0x225eed['keyCode']===_0x22c2bb['esc']&&_0x4ad25d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4ad25d['content']['first']),this['_hideBalloon'](),_0x225eed['stopPropagation'](),_0x225eed['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x422eec,_0xda50e)=>{const _0x1475e3=_0xda50e['target'];_0x4ad25d['isVisible']&&_0x4ad25d['element']['contains'](_0x1475e3)||_0x11232b['view']['element']['contains'](_0x1475e3)||_0x422eec['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x561b9c=>_0x561b9c['contains'](_0x1475e3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x15de78=this['context']instanceof _0xb1f4b9?this['context']['editors']:new _0x262a30([this['context']]);for(const _0x2da3e4 of _0x15de78)this['_integrateWithEditorAnnotations'](_0x2da3e4);this['listenTo'](_0x15de78,'add',(_0x4e2807,_0x1f811b)=>{this['listenTo'](_0x1f811b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1f811b);});}),this['listenTo'](_0x15de78,'remove',(_0x395097,_0x1e16c7)=>{_0x1e16c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1e16c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x35a9af){if(_0x35a9af===this['activeAnnotation'])return;const _0x22d6a5=this['context']['plugins']['get'](z);if(_0x22d6a5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x35a9af,'disableAnimationOnActivatedAnnotation':!0x0}),_0x35a9af)_0x22d6a5['getSidebarItemView'](_0x35a9af)?this['_showBalloon'](_0x35a9af):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x35a9af;}['detach'](){if(!this['isAttached'])throw new _0x5425ea('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5cf763=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x52b493=>_0x52b493['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5cf763['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xb1f4b9&&this['stopListening'](this['context']['editors']);for(const _0x498d2c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x498d2c);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x54ceca){if(!_0x54ceca['plugins']['has']('EditorAnnotations'))return;const _0x1e641c=_0x54ceca['plugins']['get']('EditorAnnotations'),_0x32f74e=this['context']['plugins']['get'](z),_0x176a6f=this['annotations'],_0x40f975=this['balloonPanelView'],_0x2f8a10=()=>{const _0x4a1b90=_0x1e641c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4a1b90),this['setActiveAnnotation'](_0x4a1b90[0x0]||null);};this['listenTo'](_0x1e641c,'refresh',_0x2f8a10),this['listenTo'](_0x1e641c,'blur',(_0x5b193d,{isAnnotationTracked:_0x3a9984})=>{this['activeAnnotation']&&_0x3a9984(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1e641c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x176a6f,'blur',_0x33f49e=>{_0x1e641c['hasDomSelection']()&&_0x33f49e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xb4882f,_0x35b238)=>{const _0x146b83=_0x35b238['target'];_0x40f975['isVisible']&&_0x40f975['element']['contains'](_0x146b83)||_0x32f74e['view']['element']['contains'](_0x146b83)||this['activeAnnotation']&&_0x1e641c['hasDomSelection']()&&(_0x2f8a10(),_0xb4882f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1e641c);}['_destroyEditorAnnotationsIntegration'](_0x1192be){_0x1192be&&(this['stopListening'](_0x1192be),this['_editorAnnotations']['remove'](_0x1192be));}['_setSelectedAnnotations'](_0x369bb3){for(const _0x28c2d4 of this['_selectedAnnotations'])_0x369bb3['includes'](_0x28c2d4)||this['_manuallyClosedAnnotationViews']['delete'](_0x28c2d4['view']);this['_selectedAnnotations']=_0x369bb3;}['_refreshPositioning'](){const _0x155b4c=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x155b4c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4a383a){if(this['_manuallyClosedAnnotationViews']['has'](_0x4a383a['view']))return;const _0x5f0fa5=this['balloonPanelView']['content']['first'];_0x5f0fa5!==_0x4a383a['view']?(_0x5f0fa5&&this['_detachListeners'](_0x5f0fa5),this['_attachListeners'](_0x4a383a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4a383a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x11fd5d=this['balloonPanelView']['content']['first'],_0x338d78=_0x11fd5d&&this['annotations']['getByView'](_0x11fd5d);if(!_0x338d78||!this['_annotationToNarrowView']['has'](_0x338d78))return;const _0x2bc15f=this['_annotationToNarrowView']['get'](_0x338d78)['element'],_0x2315c8=(function(){const _0x258d17=_0x211a1f['defaultPositions'];return[_0x258d17['southArrowNorthEast'],_0x258d17['northArrowSouthEast'],_0x258d17['southArrowNorth'],_0x258d17['northArrowSouth'],_0x258d17['southArrowNorthWest'],_0x258d17['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2bc15f,'positions':_0x2315c8});}['_hideBalloon'](){const _0x32d9f7=this['balloonPanelView'],_0x330bfc=_0x32d9f7['content']['first'];_0x330bfc&&(this['_detachListeners'](_0x330bfc),_0x32d9f7['unpin'](),_0x32d9f7['content']['clear']());}['_attachListeners'](_0x3565f8){this['listenTo'](_0x3565f8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3565f8,'Esc',(_0x46e272,_0x3ddbcd)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3565f8),this['_hideBalloon'](),_0x3ddbcd();});}['_detachListeners'](_0x21ffe1){this['stopListening'](_0x21ffe1);}}class c extends _0x58c0a0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x463d3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39a14a){super(_0x39a14a),_0x39a14a['editing']['view']['addObserver'](_0xe1ebf1),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x39a14a['plugins']['get'](_0x463d3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x20bca9(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2ccb67=this['editor']['plugins']['get'](j);_0x2ccb67['context']===this['editor']&&(_0x2ccb67['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3dce95,_0x1f1cae)=>{const _0x3b68ed=this['_balloon'];if(this['isAttached']&&_0x3b68ed['visibleView']){const _0xffefcc=this['annotations']['getByView'](_0x3b68ed['visibleView']);_0xffefcc&&this['_closeAnnotation'](_0xffefcc),_0x1f1cae();}}));}['afterInit'](){const _0x49ca31=this['editor']['plugins']['get'](j);_0x49ca31['context']===this['editor']&&(_0x49ca31['hasActive']()||_0x49ca31['switchTo']('inline'));}['setActiveAnnotation'](_0x2fcb59){_0x2fcb59!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2fcb59&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2fcb59)&&this['_addAnnotationToBalloon'](_0x2fcb59,!0x0),_0x2fcb59['isActive']=!0x0),_0x2fcb59||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2fcb59);}['attach'](_0x227f15){this['annotations']=_0x227f15;const _0x17c1ed=this['editor']['plugins']['get'](j),_0x441ae9=this['_balloon'];if(this['isAttached'])throw new _0x5425ea('inlineannotations-attach-already-attached',this);if(_0x17c1ed['context']!==this['editor'])throw new _0x5425ea('inlineannotations-not-allowed-with-context',this);const _0x5a1afa=this['editor']['plugins']['get'](b);this['listenTo'](_0x5a1afa,'refresh',()=>{const _0x34a34a=_0x5a1afa['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3ea176,_0x3c104c;!this['_forceRefresh']&&(_0x3ea176=_0x34a34a,_0x3c104c=this['_selectedAnnotations'],_0x3ea176['length']===_0x3c104c['length']&&_0x3ea176['every'](_0xde3b94=>_0x3c104c['includes'](_0xde3b94)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x34a34a),this['setActiveAnnotation'](_0x34a34a[0x0]||null));}),this['listenTo'](_0x5a1afa,'blur',(_0x2e8d4,{isAnnotationTracked:_0x286b5e})=>{this['activeAnnotation']&&_0x286b5e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5a1afa,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x52b20e,_0x114f4b,_0x26503a)=>{_0x26503a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x227f15,'remove',(_0x2f4612,_0x562203)=>{this['_removeAnnotationFromBalloon'](_0x562203),_0x562203===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x441ae9,'change:visibleView',(_0x8b00a6,_0x41db09,_0x549931,_0x166dff)=>{_0x166dff&&this['stopListening'](_0x166dff);const _0x5334b4=_0x227f15['getByView'](_0x549931);_0x549931&&_0x5334b4&&(this['listenTo'](_0x549931,'change:height',()=>{_0x441ae9['updatePosition']();}),this['listenTo'](_0x549931,'Esc',()=>{this['_closeAnnotation'](_0x5334b4),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5334b4&&this['setActiveAnnotation'](_0x5334b4));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x441ae9['visibleView']&&(_0x227f15['getByView'](_0x441ae9['visibleView'])&&_0x441ae9['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x5425ea('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x308ada of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x308ada);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x25cb0f){for(const _0x251c50 of this['_selectedAnnotations'])_0x25cb0f['includes'](_0x251c50)||this['_manuallyClosed']['delete'](_0x251c50);for(const _0x1cea2f of this['annotations'])_0x25cb0f['includes'](_0x1cea2f)||this['_removeAnnotationFromBalloon'](_0x1cea2f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f12dd of _0x25cb0f)this['_addAnnotationToBalloon'](_0x1f12dd);}this['_selectedAnnotations']=_0x25cb0f;}['_addAnnotationToBalloon'](_0x280e36,_0xde5717=!0x1){this['_manuallyClosed']['has'](_0x280e36)||(this['_addedAnnotations']['has'](_0x280e36)||this['_balloon']['hasView'](_0x280e36['view'])||(this['_addedAnnotations']['add'](_0x280e36),this['_balloon']['add']({'stackId':_0x280e36['view']['id'],'view':_0x280e36['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x280e36)}})),_0xde5717&&this['_balloon']['showStack'](_0x280e36['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1c0d45){const _0x15c71=_0x1c0d45['target'],_0x37419a=this['editor']['editing']['view'],_0xc9bdd6=_0x37419a['document']['selection']['getFirstRange'](),_0x404f61=_0x37419a['domConverter']['viewRangeToDom'](_0xc9bdd6);if(_0x404f61['collapse'](!0x0),_0x15c71){if(_0x15c71 instanceof _0x55e497)return _0x15c71;let _0x1a0ab8=[];for(const _0x582fda of _0x15c71)_0x1a0ab8['push'](...F(_0x582fda['getClientRects']()));_0x1a0ab8=function(_0x58dccf){const _0x12285f=[];let _0x14c3a1=_0x58dccf[0x0];for(let _0x11378c=0x1;_0x11378c<_0x58dccf['length'];_0x11378c++)P(_0x14c3a1,_0x58dccf[_0x11378c])?_0x14c3a1['width']+=_0x58dccf[_0x11378c]['width']:(_0x12285f['push'](_0x14c3a1),_0x14c3a1=_0x58dccf[_0x11378c]);return _0x12285f['push'](_0x14c3a1),_0x12285f;}(_0x1a0ab8);const _0x9f1d9=_0x404f61['getBoundingClientRect']();return _0x1a0ab8['find'](_0x5a4f65=>_0x5a4f65['top']<=_0x9f1d9['top']&&_0x5a4f65['bottom']>=_0x9f1d9['bottom']&&_0x5a4f65['left']<=_0x9f1d9['left']&&_0x5a4f65['right']>=_0x9f1d9['right'])||_0x1a0ab8[0x0];}return _0x1c0d45['targetRect']||_0x404f61;}['_removeAnnotationFromBalloon'](_0xb6f9b4){this['_addedAnnotations']['has'](_0xb6f9b4)&&this['_balloon']['hasView'](_0xb6f9b4['view'])&&(this['_addedAnnotations']['delete'](_0xb6f9b4),this['_balloon']['remove'](_0xb6f9b4['view']));}['_closeAnnotation'](_0xcc10cc){this['_manuallyClosed']['add'](_0xcc10cc),this['_removeAnnotationFromBalloon'](_0xcc10cc);}}function F(_0x584fdf){return Array['from'](_0x584fdf)['map'](DOMRect['fromRect']);}function P(_0x55325e,_0x2b7e1d){return _0x55325e['top']===_0x2b7e1d['top']&&_0x55325e['bottom']===_0x2b7e1d['bottom']&&_0x55325e['right']===_0x2b7e1d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x9f92c7,_0x5966b8){super(_0x9f92c7),this['set']('isEmpty',!_0x5966b8['length']),this['focusTracker']=new _0x58afd6(),this['_annotationViews']=_0x5966b8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xb5c97f({'focusables':_0x5966b8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5966b8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5966b8,'remove',(_0x7a294f,_0x4fa0e7)=>{_0x4fa0e7['isActive']&&this['focus'](),_0x5966b8['length']||(this['isEmpty']=!0x0);});const _0x2d2217=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x9f92c7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5966b8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2d2217['if']('isEmpty','ck-hidden',_0x27b717=>!_0x27b717)]},'children':[{'text':N(_0x9f92c7,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x1920d8 of this['_annotationViews'])this['focusTracker']['add'](_0x1920d8['element']);this['_annotationViews']['on']('change',(_0x246e0d,{added:_0xa37fde,removed:_0xc6457c})=>{for(const _0x41dd12 of _0xa37fde)this['focusTracker']['add'](_0x41dd12['element']);for(const _0x45ae15 of _0xc6457c)this['focusTracker']['remove'](_0x45ae15['element']);});}}class p extends _0x1570af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2fe1b9){super(_0x2fe1b9),this['archivedThreads']=new _0x262a30();}['init'](){const _0x3827cf=this['context'],_0x370544=_0x3827cf['plugins']['get'](o),_0xef1f68=_0x3827cf['plugins']['get'](y);this['listenTo'](_0x370544,'addCommentThread',(_0x10b81b,{threadId:_0x8aa8f5})=>{const _0x933453=_0x370544['getCommentThread'](_0x8aa8f5);_0x933453['archivedAt']&&this['archivedThreads']['add'](_0x933453,this['_calculatePosition'](_0x933453['archivedAt'])),this['listenTo'](_0x933453,'change:archivedAt',(_0x4c652f,_0x5559df,_0x2e7c1b)=>{_0x2e7c1b?this['archivedThreads']['has'](_0x933453)||this['archivedThreads']['add'](_0x933453,this['_calculatePosition'](_0x933453['archivedAt'])):this['archivedThreads']['has'](_0x933453)&&this['archivedThreads']['remove'](_0x933453);});}),this['listenTo'](_0x370544,'removeCommentThread',(_0x4d5c7e,{threadId:_0x51e404})=>{const _0x567a3f=_0x370544['getCommentThread'](_0x51e404);this['stopListening'](_0x567a3f),this['archivedThreads']['has'](_0x567a3f)&&this['archivedThreads']['remove'](_0x567a3f);},{'priority':'highest'}),this['listenTo'](_0xef1f68['collection'],'focus',(_0x570965,_0x3935ff)=>{_0x3935ff['isVisible']||(_0x3935ff['isActive']=!0x0,_0xef1f68['activate'](_0x3935ff));});}['_calculatePosition'](_0x469f4a){const _0x2ad40d=[...this['archivedThreads']]['findIndex'](_0x470c5e=>_0x470c5e['archivedAt']<_0x469f4a);return _0x2ad40d>-0x1?_0x2ad40d:this['archivedThreads']['length'];}}class a extends _0x58c0a0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x44f883];}constructor(_0x241f1d){super(_0x241f1d),this['annotationViews']=new _0x165358(),this['_pendingThreads']=[];}['init'](){const _0x3dff12=this['editor'],_0x1ec100=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3dff12['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3d87f0,!0x0)),_0x3dff12['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x42b05a=this['_createCommentsArchiveButton'](_0x293e2a);return _0x42b05a['set']({'role':'menuitemcheckbox'}),_0x42b05a;});const _0x5204c9=_0x3dff12['plugins']['get'](p),_0x539a2d=_0x3dff12['plugins']['get']('Annotations'),_0x8990b8=_0x3dff12['plugins']['get']('CommentsRepository');_0x5204c9['archivedThreads']['forEach'](_0x3be6c1=>{this['_handleNewThread'](_0x3be6c1);}),this['listenTo'](_0x5204c9['archivedThreads'],'add',(_0x195658,_0x11da33)=>{this['_handleNewThread'](_0x11da33);}),this['listenTo'](_0x539a2d['collection'],'add',(_0x31c378,_0x543805)=>{const _0x8ca193=this['_pendingThreads']['find'](_0x565efb=>{const _0x4e1271=_0x8990b8['_threadToController']['get'](_0x565efb);return _0x4e1271&&_0x543805['innerView']===_0x4e1271['view'];});if(_0x8ca193){const _0x24ea01=this['_calculatePosition'](_0x8ca193['archivedAt']);this['_addAnnotationToArchive'](_0x543805,_0x24ea01),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8ca193),0x1);}}),this['listenTo'](_0x5204c9['archivedThreads'],'remove',(_0x556dc8,_0x2625d5)=>{const _0x4cad7e=_0x3dff12['config']['get']('collaboration.channelId');if(!_0x4cad7e||_0x2625d5['channelId']===_0x4cad7e){if(this['_pendingThreads']['includes'](_0x2625d5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2625d5),0x1);else{const _0x4279fb=_0x8990b8['_threadToController']['get'](_0x2625d5),_0x3f9111=_0x539a2d['getByInnerView'](_0x4279fb['view']);this['annotationViews']['remove'](_0x3f9111['view']),this['stopListening'](_0x3f9111),this['stopListening'](_0x3f9111['focusableElements']);}}}),this['listenTo'](_0x539a2d['collection'],'add',(_0xfac763,_0x136f14)=>{this['listenTo'](_0x136f14,'escape',_0x1ec100);}),this['listenTo'](_0x539a2d['collection'],'remove',(_0x1ce51d,_0x3e8900)=>{this['stopListening'](_0x3e8900,'escape',_0x1ec100);});}['_addAnnotationToArchive'](_0x1ea32d,_0xb6990d){this['listenTo'](_0x1ea32d,'set:isVisible',_0x2b405c=>{_0x2b405c['return']=!0x1,_0x2b405c['stop']();}),this['annotationViews']['add'](_0x1ea32d['view'],_0xb6990d);}['_handleNewThread'](_0x402387){const _0x5cd050=this['editor']['plugins']['get']('CommentsRepository'),_0x227ae1=this['editor']['plugins']['get']('Annotations'),_0x5723e9=this['editor']['config']['get']('collaboration.channelId');if(!_0x5723e9||_0x402387['channelId']===_0x5723e9){const _0xde0226=_0x5cd050['_threadToController']['get'](_0x402387);if(!_0xde0226)return void this['_pendingThreads']['push'](_0x402387);const _0x3f2d0b=this['_calculatePosition'](_0x402387['archivedAt']),_0x242978=_0x227ae1['getByInnerView'](_0xde0226['view']);_0x242978['isVisible']&&_0x227ae1['_visibleAnnotations']['remove'](_0x242978),this['_addAnnotationToArchive'](_0x242978,_0x3f2d0b);}}['_calculatePosition'](_0x2b0319){const _0xa7381a=this['editor']['config']['get']('collaboration.channelId'),_0x325235=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x49be7c=>_0x49be7c['channelId']===_0xa7381a)['findIndex'](_0x5ca123=>_0x5ca123['archivedAt']<_0x2b0319);return _0x325235<0x0||_0x325235>this['annotationViews']['length']?this['annotationViews']['length']:_0x325235-0x1;}['_toggleDialog'](){const _0x303e1f=this['editor'],_0x34d3d6=_0x303e1f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x303e1f['locale'],this['annotationViews'])),'commentsArchive'===_0x34d3d6['id']?_0x34d3d6['hide']():_0x34d3d6['show']({'id':'commentsArchive','title':N(_0x303e1f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2b2f1c,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3a90e0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x32cb2a,_0x936351=!0x1){const _0x2c6b6c=this['editor']['locale'],_0x3862de=this['editor']['plugins']['get']('Dialog'),_0x3f4903=new _0x32cb2a(_0x2c6b6c);return _0x3f4903['bind']('isEnabled')['to'](this,'isEnabled'),_0x3f4903['bind']('isOn')['to'](_0x3862de,'id',_0x2ab563=>'commentsArchive'===_0x2ab563),_0x3f4903['set']({'label':N(_0x2c6b6c,'COMMENTS_ARCHIVE'),'icon':_0x2b2f1c,'isToggleable':!0x0}),_0x936351&&(_0x3f4903['tooltip']=!0x0),this['listenTo'](_0x3f4903,'execute',()=>this['_toggleDialog']()),_0x3f4903;}['_hideDialogOnAnnotationEscape']=_0x56e26e=>{const _0x1325ff=_0x56e26e['source'];if(!this['annotationViews']['has'](_0x1325ff['view']))return;const _0x3c2fea=this['editor']['plugins']['get']('Dialog');_0x3c2fea['isOpen']&&'commentsArchive'===_0x3c2fea['id']&&(_0x3c2fea['hide'](),_0x56e26e['stop']());};}class gi extends _0x58c0a0{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x2cad53,ContextPlugin as _0x6308a6,PendingActions as lt,Command as _0x44eb8f,Plugin as _0x383916,Context as _0x5e978f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xcf6f6c,uid as _0x5b65de,KeystrokeHandler as jt,FocusTracker as _0xf55ae0,diff as _0x2e7b3c,Collection as _0x5bbff0,Rect as _0x363cc5,CKEditorError as _0x37011e,first as _0x37513e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x429d9a,keyCodes as _0x5b6b88}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x454bc6,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0xd75c89,trimHtml as ts,LateFocusDropdownButtonView as _0x1ebbfb,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x577a1a}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x5ba633}from'es-toolkit/compat';import{IconUndo as _0x39b3c6,IconCheck as _0x5983e8,IconPencil as _0x4c66b7,IconRemoveComment as _0xb61c53,IconThreeVerticalDots as _0x5b1be3,IconAddComment as _0x422358,IconCommentsArchive as _0x6e7663}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x3f1de7,ButtonView as _0x6603e9,ViewCollection as _0x3555a7,createDropdown as _0x432a2c,ListView as _0x90e0e0,focusChildOnDropdownOpen as _0x139b89,ListItemView as _0x3e1f7e,MenuBarMenuListItemButtonView as _0x59d316,BodyCollection as _0x2fda56,BalloonPanelView as _0x25e11c,ContextualBalloon as _0x55de07,Dialog as _0x44fb97,DialogViewPosition as _0x249e56}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x40cd73}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x27b8a7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x456198}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0xcf6f6c(){['model'];['view'];constructor(_0x19d41c,_0x1e3fe7){super(),this['model']=_0x19d41c,this['model']['_isAttached']=!0x0,this['view']=_0x1e3fe7,this['listenTo'](_0x1e3fe7,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1e3fe7,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1e3fe7,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1e3fe7,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1e3fe7,'addComment',(_0x582a65,_0x565a47)=>this['addComment'](_0x565a47)),this['listenTo'](_0x1e3fe7,'updateComment',(_0x255e75,_0xbb2002,_0x2a29b3)=>this['updateComment'](_0xbb2002,_0x2a29b3)),this['listenTo'](_0x1e3fe7,'removeComment',(_0x4ce841,_0x118f13)=>this['removeComment'](_0x118f13));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x10c9e2){this['model']['addComment']({'content':_0x10c9e2,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x395c2e,_0x53f7b3){this['model']['getComment'](_0x395c2e)['update']({'content':_0x53f7b3});}['removeComment'](_0xe2fc4d){this['model']['getComment'](_0xe2fc4d)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x422811,_0x58b39c,_0x50e917){const t=_0x422811['t'];switch(_0x58b39c){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x50e917);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x50e917);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x50e917);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x50e917);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x50e917);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x50e917);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x50e917);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x50e917);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x4c8bc,_0x394ef6){super(_0x4c8bc);const _0x293f63=_0x5b65de();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4c8bc,_0x394ef6,void 0x0,{'label':()=>N(_0x4c8bc,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4c8bc['uiLanguageDirection'],'lang':_0x4c8bc['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x293f63},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x50b712){super(_0x50b712),this['view']=new Rt(_0x50b712['locale'],_0x50b712['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5a9c90=this['editor']['editing']['view'],_0x1d1ed8=this['view']['editable'],_0xf144ef=_0x5a9c90['document']['getRoot']();_0x1d1ed8['name']=_0xf144ef['rootName'],this['view']['render']();const _0x24d30e=_0x1d1ed8['element'];this['setEditableElement'](_0x1d1ed8['name'],_0x24d30e),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5a9c90['attachDomRoot'](_0x24d30e),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0xcf6f6c(_0x2cad53){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x212979={}){function _0x3971c1(_0x31349b){return _0x31349b['map'](_0x47cc8d=>String['fromCharCode'](_0x47cc8d))['join']('');}(_0x212979=Object['assign']({},_0x212979))['plugins']||(_0x212979['plugins']=hs['defaultPlugins']),super(_0x212979),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3971c1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3971c1([0x76,0x69,0x65,0x77])][_0x3971c1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3971c1([0x61,0x75,0x74,0x6f]),this[_0x3971c1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3971c1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3971c1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3971c1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3971c1([0x6f,0x6b])});}['create'](){const _0x578f56=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x578f56))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x278f8e=>{const _0x572e83=this['model']['document']['getRoot'](),_0x47b084=_0x572e83&&_0x572e83['getChild'](_0x572e83['childCount']-0x1);_0x278f8e['setSelection'](_0x47b084,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x27e457=this['editing']['view'],_0x2ad7f1=_0x27e457['document']['getRoot'](),_0x63e5ed=_0x2ad7f1['getChild'](0x0);_0x2ad7f1['childCount']>0x1||!_0x63e5ed||'p'!=_0x63e5ed['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x27e457,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x63e5ed['placeholder']=this['placeholder']),Ft({'view':_0x27e457,'element':_0x63e5ed,'keepOnFocus':!0x0}),this['placeholderElement']=_0x63e5ed);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x53cbd6,_0x5bbdf={}){super(_0x53cbd6),this['editor']=null,this['_editorConfig']=_0x5bbdf,this['set']('value',_0x5bbdf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x53cbd6,'Reply...')),this['set']('submitLabel',N(_0x53cbd6,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xf55ae0(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0xc7694a,_0x43aacd)=>{this['cancelButtonView']['fire']('execute'),_0x43aacd();}),this['keystrokes']['set']('Ctrl+Enter',(_0x43b201,_0x228768)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x228768());}),this['on']('submit',(_0x5957a4,_0x97f87f)=>{_0x97f87f['length']>0xfde8?(alert(N(_0x53cbd6,'TOO_LONG_COMMENT_ALERT',[_0x97f87f['length'],0xfde8])),_0x5957a4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4f98d1=this['editor'];this['element']['insertBefore'](_0x4f98d1['ui']['element'],this['element']['firstChild']),_0x4f98d1['model']['document']['on']('change',()=>this['value']=_0x4f98d1['getData']()),_0x4f98d1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4f98d1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x31335b){-0x1===_0x31335b?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x2da232}=this,_0x169048=new _0x6603e9(_0x2da232);return _0x169048['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x169048['withText']=!0x0,_0x169048['bind']('label')['to'](this,'submitLabel'),_0x169048['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x169048['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ab615,_0x1f7633)=>!_0x1f7633&&!!_0x2ab615['trim']()),_0x169048;}['_createCancelButton'](){const {locale:_0x46ddde}=this,_0xba69f0=new _0x6603e9(_0x46ddde);return _0xba69f0['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xba69f0['label']=N(_0x46ddde,'Cancel'),_0xba69f0['withText']=!0x0,_0xba69f0['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xba69f0;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3801d8=>{this['focusTracker']['add'](_0x3801d8['element']);}),this['focusables']['on']('change',(_0x2aa782,_0x2e3f4e)=>{for(const _0x17ab80 of Array['from'](_0x2e3f4e['added'])['reverse']())this['focusTracker']['add'](_0x17ab80['element']);});}}class ie extends kt{constructor(_0x4a27bb,_0x107988,_0x488713){super(_0x4a27bb),this['commentInputView']=new es(_0x4a27bb,_0x488713),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x152010,_0x2a0060)=>_0x152010||!!_0x2a0060),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x454bc6(_0x4a27bb,_0x107988),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x35efd1){this['commentInputView']['focus'](_0x35efd1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x24ebb6,_0x317549)=>{const {submitButtonView:_0x1899ee,cancelButtonView:_0xbbff7e,editor:_0x4ca8f8}=this['commentInputView'];[_0x1899ee['element'],_0xbbff7e['element'],_0x4ca8f8?_0x4ca8f8['editing']['view']['getDomRoot']():null]['filter'](_0x20000e=>_0x20000e)['some'](_0x5e1b16=>_0x5e1b16['contains'](_0x317549['target']))||(this['focus'](),_0x317549['preventDefault']());});}}class rs extends kt{constructor(_0x1a3fee){super(_0x1a3fee);const _0xb42687=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xb42687['to']('count',_0x1cc71e=>N(_0x1a3fee,'NUMBER_OF_COMMENTS',_0x1cc71e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x24c784,_0x4d96ec,_0xa8a728){super(_0x24c784);const _0x4d405c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4d96ec['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4d96ec,this['_config']=_0xa8a728,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23e9e9=>this['commentViews']['map'](_0x3af77b=>_0x3af77b['element'])['includes'](_0x23e9e9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x24c784),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x643588=>_0x643588-this['_config']['maxCommentsWhenCollapsed']);for(const _0x59bb96 of _0x4d96ec['comments'])this['_handleNewCommentModel'](_0x59bb96);this['_handleInfoComment'](),this['listenTo'](_0x4d96ec['comments'],'add',(_0x59e3bd,_0x546dc3)=>{const _0x1ad97e=this['_calculatePosition'](_0x546dc3);this['length']++,this['_handleNewCommentModel'](_0x546dc3,_0x1ad97e),this['refreshVisibleViews']();}),this['listenTo'](_0x4d96ec['comments'],'remove',(_0x46abce,_0x13c0e9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x13c0e9),this['refreshVisibleViews']();}),this['listenTo'](_0x4d96ec,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4d96ec,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x4d405c['if']('length','ck-hidden',_0x6def34=>!_0x6def34)],'aria-label':N(_0x24c784,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x4dc72b){-0x1===_0x4dc72b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x57bdd7 of this['commentViews'])_0x57bdd7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3aec50,_0x4cff08){const _0x3b7e56=new this['_config']['CommentView'](this['locale'],_0x3aec50,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3b7e56['viewUid']=_0x3aec50['id'],_0x3b7e56['delegate']('removeComment')['to'](this),_0x3b7e56['delegate']('updateComment')['to'](this),_0x3b7e56['delegate']('resolveCommentThread')['to'](this),_0x3b7e56['delegate']('editorReady')['to'](this),_0x3b7e56['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3b7e56,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3b7e56,_0x4cff08);}['_calculatePosition'](_0x44d7fa){const _0x45604f=this['_model']['_findOptimalIndex'](_0x44d7fa);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x44d7fa['authoredAt']?_0x45604f-0x1:_0x45604f:_0x45604f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40e679={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x40e679,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40e679));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x295c9a){const _0x32a897=this['commentViews']['remove'](_0x295c9a['id']);this['stopListening'](_0x32a897),_0x32a897['isEditMode']&&this['_updateHasDirtyComment'](),_0x32a897['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x377d6c=>_0x377d6c['isEditMode']);}['_rearrangeCollapse'](){const _0x1ee41c=function(_0x4aac75){const _0x4c4de2=new _0x5bbff0();for(const _0x2a5ad2 of _0x4aac75)_0x4c4de2['add'](_0x2a5ad2);return _0x4c4de2;}(this['commentViews']),_0x12f609=this['_collapsedCommentsView']['count'];for(let _0x548c03=0x1;_0x548c03<=_0x12f609;_0x548c03++)_0x1ee41c['remove'](0x1);for(const _0x2fae29 of _0x1ee41c)_0x2fae29['collapse']();_0x12f609>0x0&&_0x1ee41c['add'](this['_collapsedCommentsView'],0x1),ns(_0x2e7b3c(Array['from'](this['visibleViews']),Array['from'](_0x1ee41c)),this['visibleViews'],_0x1ee41c);}['_rearrangeExpand'](){ns(_0x2e7b3c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x11de67 of this['visibleViews'])_0x11de67['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x8a47c9=>{this['focusTracker']['add'](_0x8a47c9['element']),this['keystrokes']['listenTo'](_0x8a47c9['element']);}),this['commentViews']['on']('change',(_0x5664e4,_0x42d12a)=>{for(const _0x2ff8fd of _0x42d12a['removed'])this['focusTracker']['remove'](_0x2ff8fd['element']),this['keystrokes']['stopListening'](_0x2ff8fd['element']);for(const _0x683882 of Array['from'](_0x42d12a['added'])['reverse']())this['focusTracker']['add'](_0x683882['element']),this['keystrokes']['listenTo'](_0x683882['element']);});}}function ns(_0x25a98b,_0x16332f,_0x2e1069){let _0x385f12=0x0;for(const _0x2c2aef of _0x25a98b)switch(_0x2c2aef){case'insert':_0x16332f['add'](_0x2e1069['get'](_0x385f12),_0x385f12),_0x385f12++;break;case'delete':_0x16332f['remove'](_0x385f12);break;case'equal':_0x385f12++;}}class oe extends kt{constructor(_0x98cd63){super(_0x98cd63);const _0x271c62=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x271c62['to']('contextValue',_0x48a339=>N(_0x98cd63,'THREAD_CONTEXT_LABEL',_0x48a339)),'tabindex':-0x1},'children':[{'text':_0x271c62['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a043d,_0x14b79c){super(_0x5a043d);const _0xcd912f=this['bindTemplate'];this['_model']=_0x14b79c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8a9a9b=>!!_0x8a9a9b),this['bind']('contextValue')['to'](this['_model'],'context',_0x2aa241=>_0x2aa241&&_0x2aa241['value']?this['_trimContextValue'](_0x2aa241['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0xcd912f['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x2e0378=new _0x6603e9(this['locale']);return _0x2e0378['label']=N(this['locale'],'Reopen'),_0x2e0378['tooltip']=N(this['locale'],'Reopen'),_0x2e0378['icon']=_0x39b3c6,_0x2e0378['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42d1f4=>!_0x42d1f4),_0x2e0378['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3809de,_0x16f306)=>_0x3809de&&_0x16f306),_0x2e0378['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2e0378;}['_trimContextValue'](_0x41d9f3){if(_0x41d9f3['length']<0x96)return _0x41d9f3;const _0x4edd89=_0x41d9f3['lastIndexOf']('\x20',0x93);return _0x41d9f3['substring'](0x0,_0x4edd89>-0x1?_0x4edd89:0x93)+'...';}['_attachContextActions'](){const _0x3014b3=this['element']['querySelector']('.ck-context'),_0x38fff1=_0x3014b3['querySelector']('.ck-context__value');this['listenTo'](_0x3014b3,'mouseenter',()=>{_0x38fff1['offsetWidth']<_0x38fff1['scrollWidth']&&_0x3014b3['classList']['add']('overlay');}),this['listenTo'](_0x3014b3,'mouseleave',()=>{_0x3014b3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x48289c of this['focusables'])this['focusTracker']['add'](_0x48289c['element']),this['keystrokes']['listenTo'](_0x48289c['element']);}['_createContextView'](){const _0x4c4b33=new oe(this['locale']);return _0x4c4b33['bind']('contextValue')['to'](this),_0x4c4b33;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x360437,_0x9579f,_0xeafee7,_0x407639){super(_0x360437),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x9579f,this['_localUser']=_0xeafee7,this['_config']=_0x407639,this['commentThreadHeaderView']=new Xt(_0x360437,_0x9579f),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x360437,N(_0x360437,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x360437,_0x9579f,Object['assign']({'CommentView':this['_config']['CommentView']},_0x407639)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0xd522b5,_0x22bf3e)=>_0xd522b5||!!_0x22bf3e),this['bind']('isUnlinked')['to'](_0x9579f,'unlinkedAt',_0x27b325=>!!_0x27b325),this['bind']('ariaLabel')['to'](this,'length',_0xb17332=>{const _0x3becdb=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xb17332,_0x3becdb]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e724e=>_0x3e724e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1f3b32=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2559ff=_0x1f3b32['commentInputView'];return _0x1f3b32['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2559ff,'value',(_0x1a2776,_0x541ae9,_0x50c75a,_0x1517cd,_0x25073d)=>!!_0x25073d||!!_0x1517cd&&_0x50c75a&&!_0x541ae9||_0x1a2776&&_0x50c75a&&!_0x541ae9),_0x2559ff['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1f4196,_0x377563,_0x127a00)=>{let _0x3d4679;return _0x3d4679=_0x127a00&&_0x377563?'Reply\x20to\x20reopen\x20discussion...':_0x1f4196?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3d4679);}),_0x2559ff['bind']('submitLabel')['to'](this,'length',_0x45ca98=>N(this['locale'],_0x45ca98?'Reply':'Comment')),_0x2559ff['on']('submit',(_0x610975,_0x5f1874)=>{this['fire']('addComment',_0x5f1874),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2559ff['on']('cancel',()=>{this['focus']();}),_0x2559ff['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2559ff['on']('cancel',_0x12c2fe=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x12c2fe['stop']());}),this['on']('change:isActive',(_0x321abe,_0x3e7962,_0x446a2f)=>{_0x446a2f||this['length']||_0x2559ff['value']||this['fire']('removeCommentThread');}),_0x1f3b32;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x26c4fc,_0x679fef,_0x57327f,_0x4b88d3){super(_0x26c4fc,_0x679fef,_0x57327f,_0x4b88d3),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x26c4fc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x56383f,_0x44e51a,_0xb4b810)=>{_0xb4b810||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4e4c9f,_0x104a51,_0x32e4fd)=>{_0x32e4fd&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x596eae=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x596eae['if']('isActive','ck-thread--active'),_0x596eae['if']('isUnlinked','ck-thread--unlinked'),_0x596eae['to']('actionIndicator',_0x268d2a=>_0x268d2a?'ck-thread--'+_0x268d2a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x596eae['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x18bc00 of this['commentsListView']['commentViews'])_0x18bc00['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4b1831}=this,_0x59a18a=this['commentsListView']['commentViews']['get'](0x0);_0x59a18a===this['_boundFirstCommentView']||_0x59a18a['isSystemComment']||(this['_boundFirstCommentView']=_0x59a18a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x59a18a,'actionIndicator',_0x57c8e5=>'remove'===_0x57c8e5?'remove':null),_0x59a18a['placeholder']=N(_0x4b1831,'Write\x20a\x20comment...'),_0x59a18a['removeButton']['on']('execute',_0x8b7cbe=>{_0x8b7cbe['stop'](),this['showConfirm'](N(_0x4b1831,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x59a18a['focus']();}),_0x59a18a['actionBar']['add'](this['resolveButton'],0x0),_0x59a18a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x1c26f3=new _0xd75c89(this['locale']);return _0x1c26f3['label']=N(this['locale'],'Resolve'),_0x1c26f3['tooltip']=N(this['locale'],'Resolve'),_0x1c26f3['icon']=_0x5983e8,_0x1c26f3['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x1c26f3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4e0c32=>!_0x4e0c32),_0x1c26f3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x446455,_0xdde7ca)=>_0x446455&&!_0xdde7ca),_0x1c26f3['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x1c26f3;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x3218ef){super(_0x3218ef),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x549b88,_0x2b10ae,_0x2a2b28)=>{this['element']['innerHTML']=_0x2a2b28;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x7a6985,_0x35dd83,_0x2d64fa){super(_0x7a6985),this['_model']=_0x35dd83,this['_config']=_0x2d64fa,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x35dd83,'content',_0x35dd83,'authoredAt',(_0x5cbb90,_0x4a255e)=>N(_0x7a6985,'COMMENT_ARIA_LABEL',[_0x35dd83['author']['name'],_0x2d64fa['formatDateTime'](_0x4a255e),new DOMParser()['parseFromString'](_0x5cbb90,'text/html')['body']['textContent'],_0x35dd83['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x7a6985,N(_0x7a6985,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3555a7(),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7b2514=>_0x7b2514['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x181d07=new is(this['locale']);return _0x181d07['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2e1b20,_0x63ad7f)=>_0x63ad7f?ts(_0x2e1b20,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2e1b20),_0x181d07;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x40f86f=new es(this['locale'],this['_config']['editorConfig']);return _0x40f86f['value']=this['_model']['content'],_0x40f86f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40f86f['submitLabel']=N(this['locale'],'Save'),_0x40f86f['on']('submit',(_0x202de1,_0x56370a)=>{this['fire']('updateComment',this['_model']['id'],_0x56370a),this['switchToDisplayMode'](),this['focus']();}),_0x40f86f['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x40f86f['once']('editorReady',()=>{_0x40f86f['focus']();}),_0x40f86f['createEditor'](),_0x40f86f['delegate']('editorReady')['to'](this),_0x40f86f['delegate']('editorDestroyed')['to'](this),_0x40f86f;}['_setupKeyboardNavigation'](){const _0x9a0c6e=this['element'];this['keystrokes']['listenTo'](_0x9a0c6e);for(const _0x4126a5 of this['focusables'])this['focusTracker']['add'](_0x4126a5['element']),this['keystrokes']['listenTo'](_0x4126a5['element']);this['focusables']['on']('change',(_0x4b9c02,_0x21165a)=>{for(const _0x4b3e19 of _0x21165a['removed'])this['focusTracker']['remove'](_0x4b3e19['element']),this['keystrokes']['stopListening'](_0x4b3e19['element']);for(const _0x330b34 of _0x21165a['added'])this['focusTracker']['add'](_0x330b34['element']),this['keystrokes']['listenTo'](_0x330b34['element']);}),this['keystrokes']['set']('enter',(_0x48dce5,_0x1e8fce)=>{_0x9a0c6e===_0x48dce5['target']&&(this['focusCycler']['focusFirst'](),_0x1e8fce());}),this['keystrokes']['set']('esc',(_0x417e2d,_0x16c139)=>{_0x9a0c6e!==_0x417e2d['target']&&(this['focus'](),_0x16c139());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x3eda9b,_0x4cff86,_0xcadc10){super(_0x3eda9b,_0x4cff86,_0xcadc10),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x3eda9b,'Reply...')),this['bind']('authoredAt')['to'](_0x4cff86),this['bind']('resolvedAt')['to'](_0x4cff86),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x454bc6(_0x3eda9b,_0x4cff86['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4cff86,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2279b2=this['bindTemplate'],_0x5dc17f=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x2279b2['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2279b2['to']('authoredAt',_0x35e7c3=>this['_config']['formatDateTime'](_0x35e7c3))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2279b2['if']('isEditMode','ck-comment__actions--hidden'),_0x2279b2['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x5dc17f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x2279b2['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2279b2['if']('isEditMode','ck-comment--edit'),_0x2279b2['if']('isSystemComment','ck-comment--info'),_0x2279b2['to']('actionIndicator',_0x2c50a0=>_0x2c50a0?'ck-comment--'+_0x2c50a0:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x5dc17f}]}]};}['_createEditButton'](){const _0x408818=new _0x6603e9(this['locale']);return _0x408818['label']=N(this['locale'],'Edit'),_0x408818['icon']=_0x4c66b7,_0x408818['withText']=!0x0,_0x408818['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x408818['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x44c9c7=>!_0x44c9c7),_0x408818['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x408818['on']('execute',()=>this['switchToEditMode']()),_0x408818;}['_createRemoveButton'](){const _0xad18f=new _0x6603e9(this['locale']);return _0xad18f['label']=N(this['locale'],'Remove'),_0xad18f['icon']=_0xb61c53,_0xad18f['withText']=!0x0,_0xad18f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xad18f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3eae88=>!_0x3eae88),_0xad18f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xad18f['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xad18f;}['_createDropdown'](){const _0x2f3d9b=_0x432a2c(this['locale'],_0x1ebbfb),_0x4ed8d0=_0x2f3d9b['panelView']['children'],_0x3acc04=new _0x90e0e0(this['locale']),_0x191b43=_0x2f3d9b['bindTemplate'];_0x139b89(_0x2f3d9b,()=>this['items']['find'](_0x1e616d=>_0x1e616d['isVisible'])),_0x2f3d9b['extendTemplate']({'attributes':{'class':[_0x191b43['if']('isVisible','ck-hidden',_0x57f630=>!_0x57f630)]}});const _0x39979f=(_0x401272,_0x50e95e=-0x1)=>{const _0x2f67e4=new _0x3e1f7e(this['locale']);_0x2f67e4['children']['add'](_0x401272);const _0x5c6da9=_0x50e95e>-0x1?_0x50e95e:_0x3acc04['items']['length'];_0x3acc04['items']['add'](_0x2f67e4,_0x5c6da9);const _0x2784a9=Array['from'](this['items']);_0x2f3d9b['unbind']('isEnabled','isVisible'),_0x2f3d9b['bind']('isEnabled')['toMany'](_0x2784a9,'isEnabled',(..._0x41236e)=>_0x41236e['some'](_0x4c1e1b=>_0x4c1e1b)),_0x2f3d9b['bind']('isVisible')['toMany'](_0x2784a9,'isVisible',(..._0x18e42a)=>_0x18e42a['some'](_0x5ab4f1=>_0x5ab4f1));};_0x2f3d9b['panelPosition']='sw',_0x2f3d9b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5b1be3});for(const _0x34408a of this['items'])_0x39979f(_0x34408a);return _0x4ed8d0['add'](_0x3acc04),_0x2f3d9b['listenTo'](this['items'],'add',(_0x5c0d05,_0xcf5ff5,_0x3499c9)=>{_0x39979f(_0xcf5ff5,_0x3499c9);}),_0x2f3d9b['listenTo'](this['items'],'remove',(_0x3f4c1e,_0x1d528b,_0x28de57)=>{_0x3acc04['items']['remove'](_0x28de57);}),_0x2f3d9b;}['_attachActions'](_0x639f9f,_0x544f66){const _0x5694e0=_0x639f9f&&_0x639f9f['element'];_0x5694e0&&(this['listenTo'](_0x5694e0,'mouseenter',()=>this['actionIndicator']=_0x544f66),this['listenTo'](_0x5694e0,'focus',()=>this['actionIndicator']=_0x544f66),this['listenTo'](_0x5694e0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5694e0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x564114=super['_createCommentInputView']();return _0x564114['bind']('placeholder')['to'](this),_0x564114;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x327c1a){const _0x4f5e21=Dt(_0x327c1a,0x1e),_0x167acd=new MutationObserver(_0x1aa713=>{for(const _0x424e46 of _0x1aa713)('attributes'==_0x424e46['type']&&'class'==_0x424e46['attributeName']||'childList'==_0x424e46['type']||'characterData'==_0x424e46['type'])&&_0x4f5e21();});return{'attach'(_0x2c2087){_0x167acd['observe'](_0x2c2087,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x167acd['disconnect'](),_0x4f5e21['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4f00b8,_0x5672af){super(_0x4f00b8),this['id']=_0x5b65de(),this['focusTracker']=new _0xf55ae0(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x1cc724,_0x81974e)=>this['fire']('Esc',_0x81974e)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x5672af),this['mainView']=_0x5672af;const _0xf285d3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xf285d3['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x59f3ec=this['element']['clientHeight'];_0x59f3ec&&(this['height']=_0x59f3ec);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0xcf6f6c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e12b7,target:_0x2e26ee,type:_0x50bab1,isVisible:_0x6758ca=!0x0}){super(),this['view']=_0x1e12b7,this['view']['element']||this['view']['render'](),this['_type']=_0x50bab1,this['_target']=_0x2e26ee,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5bbff0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x75da49,_0x4005e1)=>{this['view']['focusTracker']['add'](_0x4005e1);}),this['focusableElements']['on']('remove',(_0x111599,_0x54ea1a)=>{this['view']['focusTracker']['remove'](_0x54ea1a);}),this['set']('isVisible',_0x6758ca);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x38c3e4=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x38c3e4),_0x38c3e4;}get['targetRect'](){const _0x27865d=this['target'];if(null===_0x27865d)return null;if(_0x27865d instanceof _0x363cc5)return _0x27865d;const _0x4eff6e=_0x27865d['filter'](_0xad5a1f=>function(_0x20c7f9){const _0x1b9960=_0x20c7f9['offsetParent'];if(_0x1b9960)return!0x0;const _0x23db9a=_0x20c7f9['getClientRects']()['item'](0x0);return!!_0x23db9a;}(_0xad5a1f));return 0x0===_0x4eff6e['length']?null:new _0x363cc5(_0x4eff6e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3eb8bb){this['view']['isActive']=_0x3eb8bb,this['view']['mainView']['isActive']=_0x3eb8bb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x80faab){if(!(null===_0x80faab||_0x80faab instanceof _0x363cc5||Array['isArray'](_0x80faab)&&_0x80faab['every'](_0x23d6fc=>re(_0x23d6fc))))throw new _0x37011e('annotation-invalid-target',null,{'target':_0x80faab});}['_getNormalizedTarget'](){const _0x2945a2='function'==typeof this['_target']?this['_target']():this['_target'];return re(_0x2945a2)?[_0x2945a2]:_0x2945a2;}}function re(_0x33a37b){return null!==_0x33a37b&&'object'==typeof _0x33a37b&&'nodeType'in _0x33a37b&&0x1===_0x33a37b['nodeType'];}class S extends _0x5bbff0{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xbc5117=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xf55ae0(),this['_focusTracker']['on']('change:isFocused',(_0x3a4b33,_0x321810,_0x46390b)=>{_0x46390b||this['fire']('blur');});for(const _0x30a1e3 of _0xbc5117)this['add'](_0x30a1e3);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x197320){if(this['has'](_0x197320))throw new _0x37011e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x197320['innerView'],_0x197320),this['_viewToAnnotation']['set'](_0x197320['view'],_0x197320);for(const _0x4e621f of _0x197320['focusableElements'])this['_focusTracker']['add'](_0x4e621f);this['listenTo'](_0x197320['focusableElements'],'add',(_0x50b1b6,_0xa3699a)=>{this['_focusTracker']['add'](_0xa3699a);}),this['listenTo'](_0x197320['focusableElements'],'remove',(_0x5cd26c,_0x333d73)=>{this['_focusTracker']['remove'](_0x333d73);}),this['listenTo'](_0x197320['view']['focusTracker'],'change:isFocused',(_0x4268cd,_0x3a570d,_0x8f0166)=>{_0x8f0166&&this['fire']('focus',_0x197320);}),_0x197320['updateTargetRect']();const _0x354cb9=this['_getOrderInContent'](_0x197320['view']['targetRect']);return super['add'](_0x197320,_0x354cb9);}['remove'](_0x2b2533){if(!this['has'](_0x2b2533))throw new _0x37011e('annotationcollection-not-existing-item',null);this['stopListening'](_0x2b2533['view']['focusTracker']),this['stopListening'](_0x2b2533['focusableElements']);for(const _0x458f52 of _0x2b2533['focusableElements'])this['_focusTracker']['remove'](_0x458f52);return this['_viewToAnnotation']['delete'](_0x2b2533['view']),this['_innerViewToAnnotation']['delete'](_0x2b2533['innerView']),super['remove'](_0x2b2533);}['getByInnerView'](_0x5bf688){return this['_innerViewToAnnotation']['get'](_0x5bf688);}['getByView'](_0x875824){return this['_viewToAnnotation']['get'](_0x875824);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5c4877 of this)_0x5c4877['updateTargetRect']();this['_sort']();}['_sort'](){const _0x104646=Array['from'](this)['sort']((_0x888a5c,_0x11c5d0)=>w(_0x888a5c['view']['targetRect'],_0x11c5d0['view']['targetRect']));for(let _0x1a07d3=_0x104646['length']-0x1;_0x1a07d3>0x0;_0x1a07d3--){const _0x5e45b9=_0x104646[_0x1a07d3];_0x1a07d3!==this['getIndex'](_0x5e45b9)&&(this['remove'](_0x5e45b9),this['add'](_0x5e45b9));}}['_getOrderInContent'](_0x5d916c){let _0x56d9ef=0x0;if(!_0x5d916c)return this['length'];for(const _0x37ccf6 of this){const _0x6deba=_0x37ccf6['view']['targetRect'];if(_0x6deba){if(w(_0x5d916c,_0x6deba)<0x0)return _0x56d9ef;_0x56d9ef++;}}return _0x56d9ef;}}function v({source:_0x4bb92e,target:_0x10c08e,filter:_0x43d072}){for(const _0x5e5d52 of _0x4bb92e)_0x43d072(_0x5e5d52)&&_0x10c08e['add'](_0x5e5d52);_0x10c08e['listenTo'](_0x4bb92e,'add',(_0x36dcd6,_0x48efd7)=>{_0x43d072(_0x48efd7)&&_0x10c08e['add'](_0x48efd7);}),_0x10c08e['listenTo'](_0x4bb92e,'remove',(_0x141d41,_0x433d0b)=>{_0x10c08e['has'](_0x433d0b)&&_0x10c08e['remove'](_0x433d0b);});}function w(_0x5c2a25,_0x10ed59){if(null===_0x5c2a25&&null===_0x10ed59)return 0x0;if(null===_0x5c2a25)return-0x1;if(null===_0x10ed59)return 0x1;const _0x32197d=_0x5c2a25['top']-_0x10ed59['top'];return 0x0==_0x32197d?_0x5c2a25['left']-_0x10ed59['left']:_0x32197d;}class y extends _0x6308a6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x568d66){if(super(_0x568d66),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x568d66 instanceof _0x2cad53){const _0x17740e=_0x568d66['locale'];_0x568d66['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x17740e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x37906b){this['collection']['add'](_0x37906b);}['remove'](_0x5b0449){this['collection']['remove'](_0x5b0449),_0x5b0449['destroy']();}['refreshVisibility'](){for(const _0x5d5a4d of this['collection'])_0x5d5a4d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2fec39){return this['collection']['getByInnerView'](_0x2fec39);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x366e52 of this['collection'])_0x366e52['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x23cd40){this['fire']('_activateAnnotation',_0x23cd40);}['createAnnotation'](_0x505d8a){return new T(_0x505d8a);}['createAnnotationView'](_0x3fe67d,_0x24ae77){return new E(_0x3fe67d,_0x24ae77);}['_addActiveAnnotation'](_0x5795cf){const _0x2cd5a4=new Set(this['activeAnnotations']);_0x2cd5a4['add'](_0x5795cf),this['activeAnnotations']=_0x2cd5a4;}['_removeActiveAnnotation'](_0x33700b){const _0x27ba54=new Set(this['activeAnnotations']);_0x27ba54['delete'](_0x33700b),this['activeAnnotations']=_0x27ba54;}['_bindAnnotationsToVisibleAnnotations'](){const _0xe5882f=this['collection'],_0x52f81d=this['_visibleAnnotations'];function _0x1f826c(_0x211ae7){const _0x52d13e=_0x211ae7['source'];_0x52d13e['isVisible']&&!_0x52f81d['has'](_0x52d13e)?_0x52f81d['add'](_0x52d13e):!_0x52d13e['isVisible']&&_0x52f81d['has'](_0x52d13e)&&_0x52f81d['remove'](_0x52d13e),_0x52d13e['view']['focusTracker']['remove'](_0x52d13e['view']['element']),_0x52d13e['view']['focusTracker']['add'](_0x52d13e['view']['element']);}this['listenTo'](_0xe5882f,'add',(_0x247195,_0x1c6ed9)=>{_0x1c6ed9['isVisible']&&_0x52f81d['add'](_0x1c6ed9),this['listenTo'](_0x1c6ed9,'change:isVisible',_0x1f826c);}),this['listenTo'](_0xe5882f,'remove',(_0x1f7a95,_0x5d2c60)=>{_0x52f81d['has'](_0x5d2c60)&&_0x52f81d['remove'](_0x5d2c60),this['stopListening'](_0x5d2c60,'change:isVisible',_0x1f826c);});}['_setupEnterAnnotationKeystroke'](){const _0x162825=_0x3f2f96=>{_0x3f2f96['on']('ready',()=>{_0x3f2f96['keystrokes']['set'](_0x27b8a7,(_0x3922d3,_0x141a6b)=>{const _0x50bb96=_0x37513e(this['activeAnnotations']['values']());_0x50bb96&&(_0x50bb96['view']['focus'](),_0x141a6b());});});};this['context']instanceof _0x2cad53?_0x162825(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x57114a,_0x50b040)=>{_0x162825(_0x50b040);});}['_setupEscapeAnnotationHandling'](){const _0x10ddfb=_0x49dfee=>{const _0x140c9f=_0x49dfee['source'],_0x43448a=[];let _0x35feb3;if(Array['isArray'](_0x140c9f['target'])){_0x35feb3=_0x140c9f['target'][0x0],this['context']instanceof _0x2cad53?_0x43448a['push'](this['context']):this['context']['editors']&&_0x43448a['push'](...this['context']['editors']);for(const _0x6a8696 of _0x43448a)for(const _0x34f5ae of _0x6a8696['editing']['view']['domRoots']['values']())if(_0x34f5ae['contains'](_0x35feb3))return void _0x6a8696['editing']['view']['focus']();_0x35feb3['focus']();}};this['listenTo'](this['collection'],'add',(_0x1173fe,_0x379073)=>{this['listenTo'](_0x379073,'escape',_0x10ddfb,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x326938,_0x51683b)=>{this['stopListening'](_0x51683b,'escape',_0x10ddfb);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x6308a6{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49b79f){super(_0x49b79f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x310f5c=this['context']['config'];_0x310f5c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x310f5c['define']('comments.maxThreadTotalWeight',0x1f4),_0x310f5c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x310f5c['define']('comments.CommentThreadView',gt),_0x310f5c['define']('comments.CommentView',Tt),_0x310f5c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2bcaf9=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5a8fa3,_0x4d229c)=>this['_addCommentThread'](_0x4d229c)),this['on']('submitCommentThread',(_0x3a7e02,_0x160a6b)=>this['_submitCommentThread'](_0x160a6b)),this['on']('resolveCommentThread',(_0x2eaad9,_0x22a117)=>this['_resolveCommentThread'](_0x22a117)),this['on']('resolveCommentThread',(_0x2107b8,_0x1dbd91)=>this['_updateActiveAnnotation'](_0x1dbd91),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x220dcb,_0x544cd6)=>this['_reopenCommentThread'](_0x544cd6)),this['on']('reopenCommentThread',(_0x1ca520,_0x459ee9)=>this['_updateActiveAnnotation'](_0x459ee9),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4dcc64,_0x152540)=>this['_removeCommentThread'](_0x152540)),this['on']('updateCommentThread',(_0x459014,_0x4781bd)=>this['_updateCommentThread'](_0x4781bd)),this['on']('updateCommentThread',(_0x4ce3e2,_0x175458)=>this['_updateActiveAnnotation'](_0x175458),{'priority':'lowest'}),this['on']('addComment',(_0x2f11e0,_0x4d73bd)=>this['_addComment'](_0x4d73bd)),this['on']('updateComment',(_0x84c3cc,_0x330e47)=>this['_updateComment'](_0x330e47)),this['on']('removeComment',(_0x1d5310,_0xaeb699)=>this['_removeComment'](_0xaeb699)),this['on']('addComment',(_0x5cf501,{threadId:_0x151771,isFromAdapter:_0x442cb0})=>{if(_0x442cb0)return;const _0x281277=this['getCommentThread'](_0x151771),_0x2ddf19=_0x281277&&this['_threadToController']['get'](_0x281277);_0x2ddf19&&_0x2ddf19['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2bcaf9,'change:activeAnnotations',(_0xff7071,_0x31b11d,_0x4ea034)=>{const _0x99b2a6=Array['from'](_0x4ea034)['map'](_0x58dc01=>this['_viewToController']['get'](_0x58dc01['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x99b2a6?_0x99b2a6['model']:null;});}set['adapter'](_0x45309f){if(this['_adapter'])throw new _0x37011e('commentsrepository-adapter-already-set');this['_adapter']=_0x45309f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x260860=_t,threadId:_0x1f4e45=_0x5b65de(),comments:_0x1967d0=[],unlinkedAt:_0x22288b=null,resolvedAt:_0x35d70a=null,resolvedBy:_0x150aa9=null,target:_0x229bdc=null,context:_0x4dbc09=null,attributes:_0x415fc5={},isResolvable:_0x5ab23a=!0x0,isSubmitted:_0x223fdc=!0x1,isFromAdapter:_0xcec4e1=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x260860),{'channelId':_0x260860,'threadId':_0x1f4e45,'comments':_0x1967d0,'unlinkedAt':_0x22288b,'resolvedAt':_0x35d70a,'resolvedBy':_0x150aa9,'target':_0x229bdc,'context':_0x4dbc09,'attributes':_0x415fc5,'isFromAdapter':_0xcec4e1,'isResolvable':_0x5ab23a,'isSubmitted':_0x223fdc}),this['getCommentThread'](_0x1f4e45);}['openNewCommentThread']({channelId:_0x107af1=_t,threadId:_0x451f37=_0x5b65de(),target:_0x343e99,context:_0x507bdf=null,isResolvable:_0x1a5e1c=!0x0}){if(this['_readOnlyChannels']['has'](_0x107af1)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x343e99)throw new _0x37011e('commentsrepository-missing-target');const _0x445092=this['addCommentThread']({'channelId':_0x107af1,'threadId':_0x451f37,'target':_0x343e99,'context':_0x507bdf,'isResolvable':_0x1a5e1c});if(!_0x445092)return null;const _0x2f1bf7=this['_threadToController']['get'](_0x445092),_0x518433=_0x2f1bf7['view']['commentThreadInputView']['commentInputView'],_0x51e97e=this['context']['plugins']['get'](y),_0xdc3fb6=_0x51e97e['getByInnerView'](_0x2f1bf7['view']);return _0x51e97e['activate'](_0xdc3fb6),_0x518433['once']('editorReady',()=>_0x518433['focus']()),_0x445092;}['hasCommentThread'](_0x1bdc3b){if('string'!=typeof _0x1bdc3b)throw new _0x37011e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1bdc3b);}['updateCommentThread']({channelId:_0x37a987=_t,threadId:_0x1ec89a,context:_0x223afb,unlinkedAt:_0x13682d,attributes:_0x2cff8b,isFromAdapter:_0x5a47f3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x37a987),{'channelId':_0x37a987,'threadId':_0x1ec89a,'context':_0x223afb,'unlinkedAt':_0x13682d,'attributes':_0x2cff8b,'isFromAdapter':_0x5a47f3}),this['getCommentThread'](_0x1ec89a);}['getCommentThread'](_0x314873){if('string'!=typeof _0x314873)throw new _0x37011e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x314873);}['fetchCommentThread']({channelId:_0x44975b,threadId:_0x5f256a}={}){const _0x57c9a7=this['getCommentThread'](_0x5f256a);if(_0x57c9a7)return Promise['resolve'](_0x57c9a7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x37011e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44975b,'threadId':_0x5f256a})['then'](_0x454f30=>this['hasCommentThread'](_0x5f256a)?this['getCommentThread'](_0x5f256a):_0x454f30?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44975b},_0x454f30)):void 0x0)['catch'](_0x154185=>{throw console['error'](_0x154185),new _0x37011e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5d32a0,skipNotAttached:_0x5ba118=!0x1,skipEmpty:_0x37834b=!0x1,toJSON:_0x18bc89=!0x1}={}){const _0x2bd96c=[];for(const _0x4b91bb of this['_threads']['values']())_0x5d32a0&&_0x4b91bb['channelId']!==_0x5d32a0||_0x5ba118&&!_0x4b91bb['isAttached']||_0x37834b&&0x0===_0x4b91bb['length']||_0x2bd96c['push'](_0x4b91bb);return _0x18bc89?_0x2bd96c['map'](_0x39648d=>_0x39648d['toJSON']()):_0x2bd96c;}['getAnnotationForCommentThread'](_0x2f4136){const _0x23e654=this['_threadToController']['get'](_0x2f4136);if(!_0x23e654)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x23e654['view'])||null;}['getCommentThreadForAnnotation'](_0x552ebe){const _0x54142b=this['_viewToController']['get'](_0x552ebe['innerView']);return _0x54142b?_0x54142b['model']:null;}['setActiveCommentThread'](_0xe64d3c){const _0x2b127c=this['context']['plugins']['get'](y);if(!_0xe64d3c)return void(this['activeCommentThread']&&_0x2b127c['deactivateAll']());const _0x2271ad=this['getCommentThread'](_0xe64d3c);if(!_0x2271ad)throw new _0x37011e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xe64d3c});if(!this['_threadToController']['has'](_0x2271ad))throw new _0x37011e('commentsrepository-active-not-attached',null,{'threadId':_0xe64d3c});const _0x2dabe3=_0x2b127c['getByInnerView'](this['_threadToController']['get'](_0x2271ad)['view']);_0x2b127c['activate'](_0x2dabe3);}['switchReadOnly'](_0x1ac161,_0x3d3434){_0x1ac161?this['_readOnlyChannels']['add'](_0x3d3434):this['_readOnlyChannels']['delete'](_0x3d3434),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5c2d47){return this['_readOnlyChannels']['has'](_0x5c2d47)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x46e492,_0x1ca8d9){return new vt(_0x46e492,_0x1ca8d9);}['setPermissions'](_0xee0b88,_0x1a47f7=_t){this['_permissions']['set'](_0x1a47f7,_0xee0b88),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x25edaa=_t){return this['_permissions']['has'](_0x25edaa)?this['_permissions']['get'](_0x25edaa):bt;}['_addCommentThread']({channelId:_0x3732d5,threadId:_0x19e0c9,comments:_0x2ee373,unlinkedAt:_0x4bcdb5,resolvedAt:_0x41ed06,resolvedBy:_0x3c3ca3,target:_0x3cad53,context:_0x4cea88,attributes:_0x13fe3a,isFromAdapter:_0x2e03ea,isResolvable:_0x2ca7c0,isSubmitted:_0x3cc7ac}){if('string'!=typeof _0x19e0c9)throw new _0x37011e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19e0c9});if(this['hasCommentThread'](_0x19e0c9))throw new _0x37011e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x19e0c9});const _0x46a847=new CommentThread(this,{'channelId':_0x3732d5,'id':_0x19e0c9,'context':_0x4cea88,'attributes':_0x13fe3a,'unlinkedAt':_0x4bcdb5,'resolvedAt':_0x41ed06,'resolvedBy':_0x3c3ca3?this['context']['plugins']['get'](it)['getUser'](_0x3c3ca3):null,'isResolvable':_0x2ca7c0,'isSubmitted':_0x3cc7ac||_0x2e03ea});this['_threads']['set'](_0x19e0c9,_0x46a847);for(const _0x12b47c of _0x2ee373)_0x46a847['_add'](this['_createNewComment']({'threadId':_0x19e0c9,..._0x12b47c}));return _0x3cad53&&_0x46a847['attachTo'](_0x3cad53),_0x2e03ea||!_0x46a847['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3732d5,'threadId':_0x19e0c9});}['_submitCommentThread']({channelId:_0x1954c5,threadId:_0x478586}){if(!this['hasCommentThread'](_0x478586))throw new _0x37011e('commentsrepository-missing-comment-thread',this);const _0x1210fa=this['getCommentThread'](_0x478586);if(_0x1210fa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x238384,comments:_0x16bd7f,resolvedAt:_0x2b3a8f,resolvedBy:_0x65afcd,context:_0x1dba0e,attributes:_0x4e59a6}=_0x1210fa,_0x48f62c=this['context']['plugins']['get']('PendingActions'),_0x2554ea=_0x48f62c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1954c5,'threadId':_0x238384,'comments':_0x16bd7f['map'](_0x1393ef=>_0x1393ef['toJSON']()),'resolvedAt':_0x2b3a8f,'resolvedBy':_0x65afcd?_0x65afcd['id']:_0x65afcd,'context':_0x1dba0e,'attributes':_0x4e59a6})['then'](({comments:_0x74c419})=>{_0x48f62c['remove'](_0x2554ea);for(const _0x5131cb of _0x74c419)this['_updateComment']({'channelId':_0x1954c5,'threadId':_0x478586,'commentId':_0x5131cb['commentId'],'createdAt':_0x5131cb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x552a55=>{throw console['error'](_0x552a55),new _0x37011e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13e0b0,target:_0xa8439a}){const _0x180b59=this['getCommentThread'](_0x13e0b0);if(!_0x180b59)throw new _0x37011e('commentsrepository-attach-missing-comment-thread',this);const _0x1e838a=this['context']['plugins']['get']('PendingActions'),_0x8bf9a7=this['context']['plugins']['get'](y),_0x5c598e=this['_createCommentThreadView'](_0x180b59),_0x4c4b27=new vt(_0x180b59,_0x5c598e);let _0x557f14=null;_0x5c598e['on']('change:isDirty',(_0x289c62,_0x3ef8a8,_0xecbcd4)=>{_0xecbcd4?_0x557f14=_0x1e838a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x557f14&&(_0x1e838a['remove'](_0x557f14),_0x557f14=null);}),this['_threadToController']['set'](_0x180b59,_0x4c4b27),this['_viewToController']['set'](_0x5c598e,_0x4c4b27);const _0x43e116=new E(this['context']['locale'],_0x5c598e);_0x43e116['bind']('length')['to'](_0x5c598e),_0x43e116['bind']('isDirty')['to'](_0x5c598e,'isDirty',_0x5c598e,'length',(_0x38d755,_0x26be4a)=>_0x38d755||!_0x26be4a),_0x43e116['bind']('isActive')['to'](_0x5c598e),_0x43e116['type']='comment';const _0x2df536=new T({'view':_0x43e116,'target':_0xa8439a,'type':'comment','isVisible':!_0x180b59['archivedAt']&&!!('function'==typeof _0xa8439a?_0xa8439a():_0xa8439a)});return _0x5c598e['on']('escape',()=>{_0x2df536['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5c598e,_0x2df536),_0x8bf9a7['add'](_0x2df536),_0x2df536;}['_bindAnnotationToEditors'](_0x249734,_0x1ae2f2){this['listenTo'](_0x249734,'editorReady',(_0x445d36,_0x5d49cb)=>{const _0x1a6127=_0x5d49cb['ui']['view']['body']['bodyCollectionContainer'];_0x1ae2f2['focusableElements']['add'](_0x1a6127),this['context']instanceof _0x2cad53&&this['context']['ui']['focusTracker']['add'](_0x1a6127);},{'priority':'highest'}),this['listenTo'](_0x249734,'editorDestroyed',(_0x40e6d7,_0x1f8bb0)=>{const _0x107c34=_0x1f8bb0['ui']['view']['body']['bodyCollectionContainer'];_0x1ae2f2['focusableElements']['has'](_0x107c34)&&_0x1ae2f2['focusableElements']['remove'](_0x107c34),this['context']instanceof _0x2cad53&&this['context']['ui']['focusTracker']['remove'](_0x107c34);});}['_unbindEditors'](_0x1459c1){this['stopListening'](_0x1459c1,'editorReady'),this['stopListening'](_0x1459c1,'editorDestroyed');}['_createCommentThreadView'](_0x1dfefb){const _0x2a0df2=this['context']['plugins']['get'](it),{config:_0x17362f,locale:_0x2d95fb}=this['context'],_0x43b3c9=pt(_0x17362f['get']('locale'),_0x2d95fb);return new(0x0,(_0x17362f['get']('comments'))['CommentThreadView'])(_0x2d95fb,_0x1dfefb,_0x2a0df2['me'],{'editorConfig':{..._0x17362f['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x17362f['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x17362f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x17362f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x17362f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x43b3c9,'CommentView':_0x17362f['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x21b3dc,channelId:_0x21223e,resolvedAt:_0x3481de,resolvedBy:_0x178676,isFromAdapter:_0x36b779}){if(!this['hasCommentThread'](_0x21b3dc))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x21b3dc});const _0x1f7b3c=this['getCommentThread'](_0x21b3dc);if(_0x1f7b3c['isResolved'])throw new _0x37011e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x21b3dc});const _0x2ee49c=this['context']['plugins']['get'](it);if(_0x1f7b3c['resolvedBy']=_0x2ee49c['getUser'](_0x178676),_0x1f7b3c['resolvedAt']=_0x3481de,_0x36b779||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x9a61c9=this['context']['plugins']['get']('PendingActions'),_0xf8c3b=_0x9a61c9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x21223e,'threadId':_0x21b3dc})['then'](({resolvedAt:_0x54bcd8,resolvedBy:_0xc68d0b})=>{_0x9a61c9['remove'](_0xf8c3b),_0x1f7b3c['resolvedBy']['id']!==_0xc68d0b&&(_0x1f7b3c['resolvedBy']=_0x2ee49c['getUser'](_0xc68d0b)),_0x1f7b3c['resolvedAt']=_0x54bcd8;})['catch'](_0x3fd2ea=>{throw console['error'](_0x3fd2ea),new _0x37011e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x32ddf5,channelId:_0x353980,isFromAdapter:_0x15e3b7}){if(!this['hasCommentThread'](_0x32ddf5))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x32ddf5});const _0x3251ef=this['getCommentThread'](_0x32ddf5);if(!_0x3251ef['isResolved'])throw new _0x37011e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x32ddf5});if(_0x3251ef['resolvedBy']=null,_0x3251ef['resolvedAt']=null,_0x15e3b7||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2197c3=this['context']['plugins']['get']('PendingActions'),_0x4033d3=_0x2197c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x353980,'threadId':_0x32ddf5})['then'](()=>_0x2197c3['remove'](_0x4033d3))['catch'](_0x71c4ed=>{throw console['error'](_0x71c4ed),new _0x37011e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4e00ec,isFromAdapter:_0x20720f}){const _0x102340=this['getCommentThread'](_0x4e00ec);if(!_0x102340)throw new _0x37011e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4e00ec),this['_threads']['delete'](_0x4e00ec),!_0x102340['isSubmitted']||_0x20720f||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x543bc8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2880f4}=_0x102340,_0x55f5cd=_0x543bc8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2880f4,'threadId':_0x4e00ec})['then'](()=>_0x543bc8['remove'](_0x55f5cd))['catch'](_0x106fad=>{throw console['error'](_0x106fad),new _0x37011e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x58f27d,unlinkedAt:_0x44a253,context:_0x484ec0,attributes:_0x276fbc,isFromAdapter:_0x256e49}){if('string'!=typeof _0x58f27d)throw new _0x37011e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x58f27d});if(!this['hasCommentThread'](_0x58f27d))throw new _0x37011e('commentsrepository-missing-comment-thread',null,{'threadId':_0x58f27d});const _0xd04185=this['getCommentThread'](_0x58f27d);let _0x322882=!0x1;if(void 0x0!==_0x484ec0&&_0xd04185['context']!==_0x484ec0&&(_0xd04185['context']=_0x484ec0,_0x322882=!0x0),void 0x0!==_0x44a253&&_0xd04185['unlinkedAt']!==_0x44a253&&(_0xd04185['unlinkedAt']=_0x44a253,_0x322882=!0x0),_0x276fbc&&!At(_0x276fbc,_0xd04185['attributes'])&&(_0xd04185['attributes']=_0x276fbc,_0x322882=!0x0),!_0x322882)return Promise['resolve']();if(!_0xd04185['isSubmitted']||_0x256e49||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xdadc57=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a3714}=_0xd04185,_0x253c76=_0xdadc57['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a3714,'threadId':_0x58f27d,'context':_0x484ec0,'unlinkedAt':_0x44a253,'attributes':_0x276fbc})['then'](()=>_0xdadc57['remove'](_0x253c76))['catch'](_0x23dc23=>{throw console['error'](_0x23dc23),new _0x37011e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4c8956){const _0x6b917=this['context']['plugins']['get'](y),_0x570321=this['getCommentThread'](_0x4c8956);if(_0x570321['_isAttached']=!0x1,this['_threadToController']['has'](_0x570321)){const _0x4871d1=this['_threadToController']['get'](_0x570321),_0xbf0aa5=_0x4871d1['view'],_0xe0e1a2=_0x6b917['getByInnerView'](_0xbf0aa5);this['_threadToController']['delete'](_0x570321),this['_viewToController']['delete'](_0xbf0aa5),_0xe0e1a2&&_0x6b917['remove'](_0xe0e1a2),_0x4871d1['destroy'](),_0xbf0aa5['destroy']()['then'](()=>{this['_unbindEditors'](_0xbf0aa5);});}}['_updateActiveAnnotation']({threadId:_0x41862f,resolvedAt:_0x123613,unlinkedAt:_0x36af9d}){const _0x3b29da=!!_0x123613,_0x1a31fa=this['context']['plugins']['get'](y),_0x9ee2b=this['getCommentThread'](_0x41862f);if(this['_threadToController']['has'](_0x9ee2b)){const _0x4fbef8=this['_threadToController']['get'](_0x9ee2b)['view'],_0x268853=_0x1a31fa['getByInnerView'](_0x4fbef8);_0x268853&&(_0x3b29da&&_0x1a31fa['_removeActiveAnnotation'](_0x268853),_0x36af9d?_0x268853['isVisible']=!0x1:_0x268853['refreshVisibility']());}}['_getExternalAuthor'](_0x403f05){const _0x2a9741=this['context']['plugins']['get'](it),_0x4f106e=It('external:'+_0x403f05),_0x36931b=_0x2a9741['getUser'](_0x4f106e);return _0x36931b||_0x2a9741['addUser']({'id':_0x4f106e,'name':_0x403f05});}['_createNewComment']({threadId:_0x2d0b49,commentId:_0x561923=_0x5b65de(),content:_0x5312cc,authorId:_0x38d44b,createdAt:_0x11c94a,attributes:_0x445c43}){if('string'!=typeof _0x561923)throw new _0x37011e('commentsrepository-invalid-commentid');if('string'!=typeof _0x38d44b)throw new _0x37011e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5312cc||!_0x5312cc['trim']())throw new _0x37011e('commentsrepository-invalid-comment-content');const _0x6adb15=this['context']['plugins']['get'](it)['getUser'](_0x38d44b);if(!_0x6adb15)throw new _0x37011e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x38d44b});let _0xa08650=null,_0x54ec9=_0x11c94a;return _0x445c43?.['@external']&&(_0xa08650=this['_getExternalAuthor'](_0x445c43['@external']['authorName']),_0x54ec9=new Date(_0x445c43['@external']['createdAt'])),new Comment(this,{'threadId':_0x2d0b49,'id':_0x561923,'author':_0xa08650||_0x6adb15,'creator':_0x6adb15,'content':_0x5312cc,'createdAt':_0x11c94a,'authoredAt':_0x54ec9,'attributes':_0x445c43});}['_addComment'](_0x44e7b4){let {threadId:_0x317ba7,content:_0x2a45b8,attributes:_0x3f3602,isFromAdapter:_0x432f3f}=_0x44e7b4;const _0x124e0f=this['getCommentThread'](_0x44e7b4['threadId']);if(!_0x124e0f)throw new _0x37011e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1aea91=this['_createNewComment'](_0x44e7b4),{id:_0x4c9195}=_0x1aea91;if(_0x124e0f['_add'](_0x1aea91),_0x432f3f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x124e0f['isSubmitted'])return Promise['resolve']();const _0x46b043=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55274d}=_0x124e0f,_0x36206c=_0x46b043['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3f3602||(_0x3f3602={}),this['adapter']['addComment']({'channelId':_0x55274d,'threadId':_0x317ba7,'commentId':_0x4c9195,'content':_0x2a45b8,'attributes':_0x3f3602})['then'](_0x548483=>{_0x46b043['remove'](_0x36206c),_0x548483&&this['_updateComment']({'channelId':_0x55274d,'threadId':_0x317ba7,'commentId':_0x4c9195,'createdAt':_0x548483['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x188adf=>{throw console['error'](_0x188adf),new _0x37011e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x34a6da,commentId:_0x29f86e,content:_0x36a74f,createdAt:_0x37198d,attributes:_0x68f757,isFromAdapter:_0x315225}){if(void 0x0!==_0x36a74f&&('string'!=typeof _0x36a74f||!_0x36a74f['trim']()['length']))throw new _0x37011e('commentsrepository-update-comment-invalid-content');const _0x4e0eee=this['getCommentThread'](_0x34a6da),_0x160d20=_0x4e0eee['getComment'](_0x29f86e);if(!_0x160d20)throw new _0x37011e('commentsrepository-update-missing-comment',this);let _0x1b279b=!0x1;if(_0x36a74f&&_0x36a74f!==_0x160d20['content']&&(_0x160d20['isEditable']||_0x315225)&&(_0x160d20['content']=_0x36a74f,_0x1b279b=!0x0),_0x37198d&&_0x37198d!==_0x160d20['createdAt']&&(_0x160d20['createdAt']=_0x37198d,_0x160d20['attributes']&&_0x160d20['attributes']['@external']||(_0x160d20['authoredAt']=_0x37198d),_0x1b279b=!0x0),_0x68f757&&!At(_0x68f757,_0x160d20['attributes'])&&(_0x160d20['attributes']=_0x68f757,_0x1b279b=!0x0),!_0x1b279b)return Promise['resolve']();if(_0x4e0eee['fire']('commentUpdated'),_0x315225||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4baa59=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3de379}=this['getCommentThread'](_0x160d20['threadId']),_0x30b29f=_0x4baa59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3de379,'threadId':_0x34a6da,'commentId':_0x29f86e,'content':_0x36a74f,'attributes':_0x68f757})['then'](()=>_0x4baa59['remove'](_0x30b29f))['catch'](_0x14a4c3=>{throw console['error'](_0x14a4c3),new _0x37011e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x8b9fea,commentId:_0x488f2e,isFromAdapter:_0x5bfb0a}){const _0x4ce3ae=this['getCommentThread'](_0x8b9fea),_0x13bb80=_0x4ce3ae['getComment'](_0x488f2e);if(!_0x13bb80)throw new _0x37011e('commentsrepository-remove-missing-comment',this);if(_0x4ce3ae['_remove'](_0x13bb80),_0x5bfb0a||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x58cd63=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5ea727}=_0x4ce3ae,_0x314d93=_0x58cd63['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5ea727,'threadId':_0x8b9fea,'commentId':_0x488f2e})['then'](()=>_0x58cd63['remove'](_0x314d93))['catch'](_0x10f1c3=>{throw console['error'](_0x10f1c3),new _0x37011e('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
30
+ _0xcf6f6c(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1ffe63,_0x574b79){super();const _0xede9f2=_0x574b79['isResolvable'];this['channelId']=_0x574b79['channelId'],this['id']=_0x574b79['id'],this['comments']=new _0x5bbff0(),this['_repository']=_0x1ffe63,this['_isAttached']=!0x1,this['_isSubmitted']=_0x574b79['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1ffe63,'_permissions',_0x1ffe63,'_readOnlyChannels',()=>_0x1ffe63['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1ffe63,'_permissions',()=>_0x1ffe63['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1ffe63,'_permissions',()=>{const _0xbb0c49=_0x1ffe63['getPermissions'](this['channelId']);return _0xbb0c49['write']||_0xbb0c49['admin'];}),this['bind']('isResolvable')['to'](_0x1ffe63,'_permissions',()=>_0xede9f2&&_0x1ffe63['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x574b79['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x975f31,_0x3de6a4)=>_0x975f31?_0x3de6a4?_0x975f31<_0x3de6a4?_0x975f31:_0x3de6a4:_0x975f31:_0x3de6a4),this['set']('unlinkedAt',_0x574b79['unlinkedAt']||null),this['set']('resolvedAt',_0x574b79['resolvedAt']||null),this['set']('resolvedBy',_0x574b79['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4cdea9=>!!_0x4cdea9),this['set']('attributes',_0x574b79['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x16bc05,_0x2b426d)=>_0x16bc05+_0x2b426d['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2a9eca,id:_0x3fc41d}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2a9eca),{'channelId':_0x2a9eca,'threadId':_0x3fc41d});}['setUnlinkedAt'](_0x2b8baf){this['_update']({'unlinkedAt':_0x2b8baf});}['resolve']({resolvedAt:_0x59469f=new Date(),resolvedBy:_0xba20aa='',isFromAdapter:_0x344738=!0x1}={}){const _0x201543=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5a535d,id:_0x5ec84c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5a535d),{'channelId':_0x5a535d,'threadId':_0x5ec84c,'resolvedAt':_0x59469f,'resolvedBy':_0xba20aa||_0x201543['id'],'isFromAdapter':_0x344738});}['reopen']({isFromAdapter:_0x3c47a5=!0x1}={}){const {channelId:_0x58487e,id:_0x305b7d}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x58487e),{'channelId':_0x58487e,'threadId':_0x305b7d,'isFromAdapter':_0x3c47a5});}['setContext'](_0x2e8123){this['context']||this['_update']({'context':_0x2e8123});}['setAttribute'](_0x1e7fde,_0x6750ba){const _0x4e5f1f=wt(this['attributes']);yt(_0x4e5f1f,_0x1e7fde,_0x6750ba),this['_update']({'attributes':_0x4e5f1f});}['removeAttribute'](_0x50fe4d){const _0x84f1ef=wt(this['attributes']);Ct(_0x84f1ef,_0x50fe4d),this['_update']({'attributes':_0x84f1ef});}['remove']({isFromAdapter:_0x30736e=!0x1}={}){const {channelId:_0x5e11ed,id:_0x2cbcff}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x5e11ed),{'channelId':_0x5e11ed,'threadId':_0x2cbcff,'isFromAdapter':_0x30736e});}['attachTo'](_0x446a9b){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x446a9b});}['addComment'](_0x215768){const {channelId:_0x10bd1e,id:_0x38e2d7}=this;this['_repository']['fire'](Nt('addComment',_0x10bd1e,_0x38e2d7),Object['assign']({'channelId':_0x10bd1e,'threadId':_0x38e2d7},_0x215768));}['getComment'](_0x331fb2){if('string'!=typeof _0x331fb2)throw new _0x37011e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x331fb2});return this['comments']['get'](_0x331fb2);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x5ad1ab=>_0x5ad1ab['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4f8f29){return this['listenTo'](_0x4f8f29,'change:authoredAt',()=>{const _0x1a7f1e=this['_findOptimalIndex'](_0x4f8f29),_0x371ad9=this['comments'];_0x1a7f1e-0x1!=_0x371ad9['getIndex'](_0x4f8f29)&&_0x1a7f1e+0x1!=_0x371ad9['getIndex'](_0x4f8f29)&&(this['_remove'](_0x4f8f29),this['_add'](_0x4f8f29));}),this['comments']['add'](_0x4f8f29,this['_findOptimalIndex'](_0x4f8f29));}['_update'](_0x4031da){const {channelId:_0x96aea0,id:_0x36d2a7}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x96aea0),{..._0x4031da,'channelId':_0x96aea0,'threadId':_0x36d2a7});}['_remove'](_0x28b9d7){return this['stopListening'](_0x28b9d7),_0x28b9d7['destroy'](),this['comments']['remove'](_0x28b9d7);}['_findOptimalIndex'](_0x592ee5){const _0x414b4e=this['comments']['find'](_0x1e99db=>new Date(_0x1e99db['authoredAt'])['getTime']()>new Date(_0x592ee5['authoredAt'])['getTime']());return _0x414b4e?this['comments']['getIndex'](_0x414b4e):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
31
+ _0xcf6f6c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x52fdba,_0x2ce014){super();const _0x3d3707=_0x52fdba['context']['plugins']['get'](it)['me'],_0x378bce=_0x52fdba['getCommentThread'](_0x2ce014['threadId']),_0x2a799c=0x0===_0x378bce['comments']['length'],_0xbc3145=_0x3d3707===_0x2ce014['author'];this['id']=_0x2ce014['id'],this['threadId']=_0x2ce014['threadId'],this['author']=_0x2ce014['author'],this['creator']=_0x2ce014['creator'],this['isExternal']=Boolean(_0x2ce014['attributes']&&_0x2ce014['attributes']['@external']),this['set']('content',_0x2ce014['content']),this['createdAt']=_0x2ce014['createdAt']||new Date(),this['set']('authoredAt',_0x2ce014['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x378bce,'resolvedAt'),this['set']('attributes',_0x2ce014['attributes']||{}),this['bind']('isEditable')['to'](_0x52fdba,'_permissions',()=>{const _0x48faba=_0x52fdba['getPermissions'](_0x378bce['channelId'])['write'],_0x266177=_0x52fdba['getPermissions'](_0x378bce['channelId'])['modifyAll'];return _0xbc3145&&_0x48faba||!_0xbc3145&&_0x266177;}),this['bind']('isRemovable')['to'](_0x378bce,'isRemovable',_0x52fdba,'_permissions',_0x373257=>{const _0x3ecca9=_0x52fdba['getPermissions'](_0x378bce['channelId'])['write'],_0xd3f8c4=_0x52fdba['getPermissions'](_0x378bce['channelId'])['modifyAll'];return _0xbc3145&&_0x3ecca9||_0x373257&&_0x2a799c||!_0xbc3145&&_0xd3f8c4&&!_0x2a799c;}),this['bind']('isReadOnly')['to'](_0x378bce,'isReadOnly'),this['_repository']=_0x52fdba;}get['weight'](){return Math['max'](function(_0x5264a4){const _0x31226a=document['createElement']('div');return _0x31226a['innerHTML']=_0x5264a4,_0x31226a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a8b0b){const {threadId:_0x18330f,id:_0x191b17}=this;if(!this['_repository']['hasCommentThread'](_0x18330f))throw new _0x37011e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x312040}=this['_repository']['getCommentThread'](_0x18330f);this['_repository']['fire'](Nt('updateComment',_0x312040,_0x18330f),{'channelId':_0x312040,'threadId':_0x18330f,'commentId':_0x191b17,..._0x1a8b0b});}['setAttribute'](_0x459242,_0x3279ab){const _0x429566=wt(this['attributes']);yt(_0x429566,_0x459242,_0x3279ab),this['update']({'attributes':_0x429566});}['removeAttribute'](_0x5d5009){const _0x3b8875=wt(this['attributes']);Ct(_0x3b8875,_0x5d5009),this['update']({'attributes':_0x3b8875});}['remove'](_0x483e74={}){if(!_0x483e74['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x60f910,id:_0x3b31d4}=this;if(!this['_repository']['hasCommentThread'](_0x60f910))throw new _0x37011e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5f128f}=this['_repository']['getCommentThread'](_0x60f910);this['_repository']['fire'](Nt('removeComment',_0x5f128f,_0x60f910),{'channelId':_0x5f128f,'threadId':_0x60f910,'commentId':_0x3b31d4,..._0x483e74});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x511181,..._0x5ab2ad){for(const _0x54eae4 of _0x5ab2ad)void 0x0!==_0x54eae4&&(_0x511181+=':'+String(_0x54eae4));return _0x511181;}class ot extends _0x44eb8f{constructor(_0x191785){super(_0x191785),this['set']('hasContent',!0x1);}['refresh'](){const _0x293738=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3746f4 of _0x293738['getRanges']())if(this['_hasContent'](_0x3746f4))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2f8fce=_0x5b65de(),ranges:_0x22ce58,comment:_0x357a23}={}){const _0x546f8f=this['editor']['model'],_0x45964e=_0x22ce58??Array['from'](_0x546f8f['document']['selection']['getRanges']()),_0x50e32e=[];for(const _0x459a08 of _0x45964e)this['_hasContent'](_0x459a08)&&_0x50e32e['push'](this['_trimToContent'](_0x459a08));if(!_0x50e32e['length'])throw new _0x37011e('addcommentthreadcommand-incorrect-ranges',null);_0x357a23&&this['_createCommentThread'](_0x2f8fce,_0x357a23),this['_createMarkersFromRanges'](_0x2f8fce,_0x50e32e,!!_0x357a23);}['_createMarkersFromRanges'](_0x1d4299,_0x34ad5e,_0x58b225){this['editor']['model']['change'](_0x56fde4=>{for(const _0x19ab67 of _0x34ad5e){const _0x3be2ce=_0x5b65de()['substr'](0x1,0x5),_0x25919f='comment:'+_0x1d4299+':'+_0x3be2ce;_0x56fde4['addMarker'](_0x25919f,{'range':_0x19ab67,'usingOperation':_0x58b225,'affectsData':_0x58b225});}});}['_createCommentThread'](_0x1f79b7,_0x500434){const _0x314e8a=this['editor']['plugins']['get']('CommentsRepository'),_0x132a14=this['editor']['config']['get']('collaboration.channelId'),_0x240307=this['editor']['plugins']['get']('Users')['me'];if(!_0x240307)throw new _0x37011e('addcommentthreadcommand-user-not-found',null);_0x314e8a['addCommentThread']({'threadId':_0x1f79b7,'channelId':_0x132a14,'comments':[{'authorId':_0x240307['id'],'content':_0x500434,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1bd404){for(const _0x20c133 of _0x1bd404['getItems']())if(this['_itemIsContent'](_0x20c133))return!0x0;return!0x1;}['_itemIsContent'](_0x59f92c){return _0x59f92c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59f92c)&&!_0x59f92c['is']('element','tableCell');}['_trimToContent'](_0x115d82){const _0x21cec2=_0x1c3959=>!this['_itemIsContent'](_0x1c3959['item']),_0x97d53e=_0x115d82['start']['getLastMatchingPosition'](_0x21cec2),_0x1deace=_0x115d82['end']['getLastMatchingPosition'](_0x21cec2,{'direction':'backward'});return this['editor']['model']['createRange'](_0x97d53e,_0x1deace);}}class b extends _0x383916{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1edf6d){super(_0x1edf6d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4f9520=this['editor'],_0x37cdd5=_0x4f9520['model']['document']['selection'],_0x9cb4cb=_0x5ba633(()=>this['refreshSelectedViews'](),0xa);_0x37cdd5['on']('change:range',(_0x227e94,_0x6e0704)=>{_0x6e0704['directChange']&&(_0x9cb4cb['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4f9520['editing']['view']['document'],'change:isFocused',(_0x550ce9,_0x52d835,_0x1d2ed9)=>{_0x1d2ed9&&_0x9cb4cb();}),this['listenTo'](_0x4f9520['ui']['focusTracker'],'change:isFocused',(_0x52cd23,_0xa5f002,_0x4d207c)=>{_0x4d207c||this['fire']('blur',{'isAnnotationTracked':_0x2592f7=>this['_editorAnnotationsData']['has'](_0x2592f7['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x210890){if(this['_editorAnnotations']['has'](_0x210890['view']))return;this['_editorAnnotations']['add'](_0x210890['view']),this['editor']['ui']['focusTracker']['add'](_0x210890['view']['element']);const _0x43cbea=this['editor']['plugins']['get'](y);this['listenTo'](_0x43cbea['collection'],'remove',(_0x5729cc,_0x157ef2)=>{this['editor']['ui']['focusTracker']['remove'](_0x157ef2['view']['element']),this['_editorAnnotations']['delete'](_0x157ef2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x71e74a){if('function'!=typeof _0x71e74a)throw new _0x37011e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x71e74a);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x42b810,annotations:_0x1409a3}){const _0x5ce903=[],_0x48f8bb=this['editor']['model']['document']['selection'],_0x5b861f=Array['from'](_0x48f8bb['getRanges']());for(const [_0x551c12,_0xb4e9c9]of this['_editorAnnotationsData']){const _0x281e5c=_0x394c02(_0xb4e9c9),_0x5eb438=_0x1409a3['getByInnerView'](_0x551c12);_0x281e5c&&_0x5eb438&&_0x5ce903['push']({'annotation':_0x5eb438,'range':_0x281e5c});}function _0x394c02(_0x2a8bb3){for(const _0x5acf29 of _0x2a8bb3)for(const _0x555d81 of _0x5b861f)if(_0x5acf29['containsRange'](_0x555d81,!_0x48f8bb['isCollapsed']))return _0x5acf29;return null;}return _0x5ce903['sort']((_0x2a5307,_0x24c9e7)=>{const _0x1d810b=_0x2a5307['range'],_0x56634a=_0x24c9e7['range'];if(!_0x1d810b['isEqual'](_0x56634a)){if(_0x1d810b['containsRange'](_0x56634a,!0x0))return 0x1;if(_0x56634a['containsRange'](_0x1d810b,!0x0))return-0x1;}return _0x2a5307['annotation']==_0x42b810?-0x1:_0x24c9e7['annotation']==_0x42b810?0x1:0x0;})['map'](_0x58d7b4=>_0x58d7b4['annotation']);}get['_editorAnnotationsData'](){const _0x42914f=new Map();for(const _0x116fcc of Array['from'](this['_dataCollectors']))for(const [_0x1516d2,_0x5625c4]of _0x116fcc())_0x42914f['set'](_0x1516d2,_0x5625c4);return _0x42914f;}}class st extends _0x383916{['afterInit'](){const _0x172eb9=this['editor'];if(!_0x172eb9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x172eb9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x383916{constructor(_0x1096bc){super(_0x1096bc),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3c6f7c=this['editor'],_0x3aa997=_0x3c6f7c['commands']['get']('importWord'),_0xe2b763=_0x3c6f7c['plugins']['get'](it);_0x3aa997&&(_0x3aa997['on']('execute',(_0x52b6b6,[,_0x261356])=>{_0x261356['collaboration_features']={'comments':!0x0,'user_id':_0xe2b763['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3aa997,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4ece92,_0x768e6c){const {comment_threads:_0x4d2b0b}=_0x768e6c;_0x4d2b0b&&_0x4d2b0b['forEach'](({thread_id:_0x2bd275,comments:_0x210b77,is_resolved:_0x39a9e7})=>{const _0x439831=new Date(),_0x4650cb=_0x210b77['map'](({author:_0x4ab059,content:_0x3f1da2,created_at:_0x51520c})=>({'content':_0x3f1da2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x439831,'attributes':{'@external':{'authorName':_0x4ab059,'createdAt':_0x51520c?new Date(_0x51520c):new Date(),'source':'importWord'}}})),_0x4dbbff=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4dbbff,'threadId':_0x2bd275,'comments':_0x4650cb,'resolvedAt':_0x39a9e7?_0x439831:null});});}}class at extends _0x383916{constructor(_0x158caf){super(_0x158caf),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x495d04=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x495d04,'contentInsertion',(_0x57370c,_0x2a9f9d)=>this['_removeMarkersWithoutThreads'](_0x2a9f9d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x178c80){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x178c80;const _0xcbb37b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x9f53d4 of _0x178c80['keys']()){const [_0x5da1ee,_0xac2074]=_0x9f53d4['split'](':');'comment'!=_0x5da1ee||_0xcbb37b['hasCommentThread'](_0xac2074)||_0x178c80['delete'](_0x9f53d4);}return _0x178c80;}['_registerMarkerInClipboardPipeline'](){const _0x15b928=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x20c2f7=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x20c2f7&&_0x15b928['_registerMarkerToCopy']('comment',_0x20c2f7);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xc2b448){switch(_0xc2b448){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x38e827){const _0x51f9a4=_0x38e827['split'](':');return{'group':_0x51f9a4[0x0],'id':_0x51f9a4[0x1],'part':_0x51f9a4[0x2]};}class ut extends _0x383916{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x57cf84,_0x406a9f)=>{if(!_0x406a9f['options']['showCommentHighlights'])return null;if(_0x406a9f['options']['ignoreResolvedComments']){const {id:_0x41e83d}=ft(_0x57cf84['markerName']),_0x192eff=this['editor']['plugins']['get'](o);if(_0x192eff['getCommentThread'](_0x41e83d)?.['isResolved']&&_0x57cf84['item'])return _0x406a9f['consumable']['consume'](_0x57cf84['item'],'addMarker:'+_0x57cf84['markerName']),_0x406a9f['consumable']['consume'](_0x57cf84['item'],'removeMarker:'+_0x57cf84['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x8f43e4=>{_0x8f43e4['on']('addMarker:comment',(_0x55a49e,_0x5571ca,_0x1a9ca9)=>{if(!_0x1a9ca9['options']['showCommentHighlights'])return;const _0x23baf4=_0x5571ca['item'];if(!_0x23baf4)return;const _0x3c94c8=_0x1a9ca9['mapper']['toViewElement'](_0x23baf4);this['editor']['model']['schema']['isObject'](_0x23baf4)&&_0x3c94c8&&!_0x3c94c8['getCustomProperty']('widget')&&_0x3c94c8['is']('containerElement')&&_0x456198(_0x3c94c8,_0x1a9ca9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3c0341,{writer:_0x4a362a,options:_0x168d25})=>{if(!_0x168d25['showCommentHighlights'])return null;const _0x4b7389=_0x4a362a['createContainerElement']('div'),_0x33dc1a=_0x4a362a['createEmptyElement']('hr');return _0x4a362a['addClass']('ck-horizontal-line',_0x4b7389),_0x4a362a['insert'](_0x4a362a['createPositionAt'](_0x4b7389,0x0),_0x33dc1a),_0x4b7389;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5b88b1,{writer:_0x243f78,options:_0x30ead6})=>{if(!_0x30ead6['showCommentHighlights'])return null;const _0x151ba9=_0x243f78['createContainerElement']('span'),_0x571f06=_0x243f78['createEmptyElement']('img');return _0x243f78['addClass']('image-inline',_0x151ba9),_0x243f78['insert'](_0x243f78['createPositionAt'](_0x151ba9,0x0),_0x571f06),_0x151ba9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2ead42,{writer:_0x2ba58f,options:_0x34c59f})=>{if(_0x34c59f['showCommentHighlights'])return _0x2ba58f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xb033ad,_0x4df1e7,_0x538efd)=>{_0x538efd['options']['showCommentHighlights']&&_0xb033ad['stop']();},{'priority':'high'});}}class r extends _0x383916{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fcdd9){super(_0x3fcdd9),this['set']('isThreadsLoadingPaused',!0x0),_0x3fcdd9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x358a51,_0x1040d,_0x18a47f,_0x27a133)=>{const _0x543b25=_0x3fcdd9['plugins']['get'](o),_0x1ff1c8=_0x18a47f?ft(_0x18a47f)['id']:null;_0x3fcdd9['model']['change'](()=>{if(_0x1ff1c8){const _0x8cf36a=this['getAllMarkersForId'](_0x1ff1c8);for(const _0x12de72 of _0x8cf36a)_0x3fcdd9['editing']['reconvertMarker'](_0x12de72);}if(_0x27a133){const {id:_0x544d70}=ft(_0x27a133),_0x2bc763=_0x543b25['getCommentThread'](_0x544d70);if(_0x2bc763&&_0x2bc763['unlinkedAt'])return;if(_0x2bc763&&!_0x2bc763['isAttached'])return;const _0x148a94=this['getAllMarkersForId'](_0x544d70);for(const _0x252f60 of _0x148a94)_0x3fcdd9['editing']['reconvertMarker'](_0x252f60);}}),_0x1ff1c8&&this['scrollToThreadMarker'](_0x1ff1c8);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x107926=this['editor'],_0x32fc28=_0x107926['plugins']['get'](o),_0x2d6a67=_0x107926['config']['get']('collaboration.channelId'),_0x1ac3d3=_0x32fc28['getCommentThreads']()['filter'](_0x35d0c8=>_0x35d0c8['channelId']!==_0x2d6a67);_0x107926['commands']['add']('addCommentThread',new ot(_0x107926)),this['listenTo'](_0x107926,'change:isReadOnly',(_0x2a91a5,_0x3c154e,_0x4ccf13)=>{_0x32fc28['switchReadOnly'](_0x4ccf13,_0x107926['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x32fc28,dt('addCommentThread',_0x2d6a67),(_0x8c4099,{threadId:_0x1bfd98})=>{const _0x3b0d0c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1bfd98);_0x3b0d0c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1bfd98);}),this['listenTo'](_0x32fc28,dt('removeCommentThread',_0x2d6a67),(_0x12d345,{threadId:_0x10d76e})=>{_0x107926['model']['enqueueChange']({'isUndoable':!0x1},_0x262f54=>{const _0x42c582=this['getAllMarkersForId'](_0x10d76e);for(const _0x2e3a44 of _0x42c582)_0x262f54['removeMarker'](_0x2e3a44);});}),this['listenTo'](_0x32fc28,dt('resolveCommentThread',_0x2d6a67),(_0x473c7f,{threadId:_0x490e44})=>{(this['_reconvertMarkers'](_0x490e44),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x490e44)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x32fc28,dt('reopenCommentThread',_0x2d6a67),(_0x5cf78b,{threadId:_0x3727a0})=>{this['_reconvertMarkers'](_0x3727a0);},{'priority':'low'}),this['listenTo'](_0x32fc28,dt('addComment',_0x2d6a67),(_0x43a1c4,{threadId:_0xe70c8b,isFromAdapter:_0x32d949})=>{const _0x3779c9=this['getAllMarkersForId'](_0xe70c8b);if(_0x32d949||0x0==_0x3779c9['length']||!_0x32fc28['hasCommentThread'](_0xe70c8b))return;0x1===_0x32fc28['getCommentThread'](_0xe70c8b)['length']&&_0x107926['model']['enqueueChange']({'isUndoable':!0x1},_0x2cec11=>{for(const _0x12e132 of _0x3779c9)_0x2cec11['updateMarker'](_0x12e132,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1ac3d3);}['afterInit'](){!async function(_0x11ac65){const _0x39e8a8=_0x329883([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x54fad9=0x73460ab3,_0x415150=0x734180db^_0x54fad9,_0x4a60ec=window[_0x329883([0x44,0x61,0x74,0x65])][_0x329883([0x6e,0x6f,0x77])](),_0x29a304=_0x11ac65[_0x329883([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x415322=new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x218680=>{_0x29a304[_0x329883([0x6f,0x6e,0x63,0x65])](_0x329883([0x72,0x65,0x61,0x64,0x79]),_0x218680);}),_0x50c481={[_0x329883([0x6b,0x74,0x79])]:_0x329883([0x45,0x43]),[_0x329883([0x75,0x73,0x65])]:_0x329883([0x73,0x69,0x67]),[_0x329883([0x63,0x72,0x76])]:_0x329883([0x50,0x2d,0x32,0x35,0x36]),[_0x329883([0x78])]:_0x329883([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x329883([0x79])]:_0x329883([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x329883([0x61,0x6c,0x67])]:_0x329883([0x45,0x53,0x32,0x35,0x36])},_0x6f47c3=_0x29a304[_0x329883([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x329883([0x67,0x65,0x74])](_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x254f58(){let _0x4b32ff,_0x476205=null,_0x2f9e72=null;try{if(_0x6f47c3==_0x329883([0x47,0x50,0x4c]))return _0x329883([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b32ff=_0x145501(),!_0x4b32ff)return _0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b32ff[_0x329883([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2f9e72=_0x279317(_0x4b32ff[_0x329883([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b32ff[_0x329883([0x6a,0x74,0x69])])),await _0x3c0f76()?_0x51fdcf()?_0x10ecbc()?_0x329883([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x41d606()?(_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x329883([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x476205=_0x391f68(_0x329883([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59afad()):_0x329883([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x329883([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x329883([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10ecbc(){const _0xacac09=[_0x329883([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x329883([0x74,0x72,0x69,0x61,0x6c])][_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4a60ec/0x3e8:0xe10*_0x415150;return _0x4b32ff[_0x329883([0x65,0x78,0x70])]<_0xacac09;}function _0x51fdcf(){const _0x3df47a=_0x4b32ff[_0x329883([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3df47a)return!0x1;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x2a])))return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x43,0x4d,0x54])))return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x8a60a3())return!0x0;if(_0x3df47a[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x52,0x43,0x4d,0x54]))){if(_0x7d59ed())return!0x0;if(_0x37f5ee()||_0x33b0a3())return!0x0;}return!0x1;}function _0x41d606(){const _0x1fe4a2=_0x4b32ff[_0x329883([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fe4a2||0x0==_0x1fe4a2[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3a0dd4}=new URL(window[_0x329883([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1fe4a2[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a0dd4))return!0x0;const _0xce6396=_0x3a0dd4[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e]));return _0x1fe4a2[_0x329883([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d5740=>_0x2d5740[_0x329883([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329883([0x2a])))[_0x329883([0x6d,0x61,0x70])](_0x1de8aa=>_0x1de8aa[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e])))[_0x329883([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fc4cf=>_0x1fc4cf[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xce6396[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329883([0x6d,0x61,0x70])](_0x26b707=>Array(_0xce6396[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x26b707[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329883([0x66,0x69,0x6c,0x6c])](_0x26b707[0x0]===_0x329883([0x2a])?_0x329883([0x2a]):'')[_0x329883([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x26b707))[_0x329883([0x73,0x6f,0x6d,0x65])](_0x1ae5c1=>_0xce6396[_0x329883([0x65,0x76,0x65,0x72,0x79])]((_0x4e1c39,_0xc91fcf)=>_0x1ae5c1[_0xc91fcf]===_0x4e1c39||_0x1ae5c1[_0xc91fcf]===_0x329883([0x2a])));}function _0x59afad(){return _0x476205&&_0x2f9e72?new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x145572,_0x45e453)=>{_0x476205[_0x329883([0x74,0x68,0x65,0x6e])](_0x145572,_0x45e453),_0x2f9e72[_0x329883([0x74,0x68,0x65,0x6e])](_0x21721b=>{_0x21721b!=_0x329883([0x56,0x61,0x6c,0x69,0x64])&&_0x145572(_0x21721b);},_0x45e453);}):_0x476205||_0x2f9e72||_0x329883([0x56,0x61,0x6c,0x69,0x64]);}}function _0x279317(_0x14b057,_0x493aaf){return new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4663f4=>{if(_0x582a97())return _0x4663f4(_0x329883([0x56,0x61,0x6c,0x69,0x64]));_0x2ed734(),_0x29a304[_0x329883([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2e8052=!0x1;const _0x454dfb=_0x5b65de();function _0xd521bd(_0x1ef75a){return!!_0x1ef75a&&(typeof _0x1ef75a===_0x329883([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ef75a===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ef75a[_0x329883([0x74,0x68,0x65,0x6e])]===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ef75a[_0x329883([0x63,0x61,0x74,0x63,0x68])]===_0x329883([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3b4cd5(_0x13ca87){_0x1abe42(_0x13ca87)[_0x329883([0x74,0x68,0x65,0x6e])](_0x2c5a9d=>{if(!_0x2c5a9d||_0x2c5a9d[_0x329883([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x329883([0x6f,0x6b]))return _0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5a27fd(_0x4be1b8(_0x454dfb+_0x493aaf))!=_0x2c5a9d[_0x329883([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x329883([0x56,0x61,0x6c,0x69,0x64]);})[_0x329883([0x74,0x68,0x65,0x6e])](_0x84ddff=>(_0xafaf95(),_0x84ddff),()=>{const _0x3a3940=_0x3af028();return null==_0x3a3940?(_0xafaf95(),_0x329883([0x56,0x61,0x6c,0x69,0x64])):_0x329883(_0x4a60ec-_0x3a3940>(0x574a8eb3^_0x54fad9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x329883([0x74,0x68,0x65,0x6e])](_0x4663f4)[_0x329883([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x11624a=0x7370e433^_0x54fad9;function _0xafaf95(){const _0x30446a=_0x329883([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a27fd(_0x4be1b8(_0x14b057)),_0x2910d5=_0x296a0a(_0x5a27fd(window[_0x329883([0x4d,0x61,0x74,0x68])][_0x329883([0x63,0x65,0x69,0x6c])](_0x4a60ec/_0x11624a)));window[_0x329883([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329883([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30446a,_0x2910d5);}function _0x3af028(){const _0x2fb1ea=_0x329883([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a27fd(_0x4be1b8(_0x14b057)),_0x3899db=window[_0x329883([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329883([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2fb1ea);return _0x3899db?window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x296a0a(_0x3899db),0x10)*_0x11624a:null;}function _0x1abe42(_0x208152){return new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x220520,_0x5a363f)=>{_0x208152[_0x329883([0x74,0x68,0x65,0x6e])](_0x220520,_0x5a363f),window[_0x329883([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5a363f,0x7347de73^_0x54fad9);});}}_0x29a304[_0x329883([0x6f,0x6e])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc02643,_0x4cdca2)=>{if(_0x4cdca2[0x0]!=_0x14b057)return _0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cdca2[0x1]={..._0x4cdca2[0x1],[_0x329883([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x454dfb};},{[_0x329883([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329883([0x68,0x69,0x67,0x68])}),_0x29a304[_0x329883([0x6f,0x6e])](_0x329883([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4cef1e=>{_0xd521bd(_0x4cef1e[_0x329883([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2e8052=!0x0,_0x3b4cd5(_0x4cef1e[_0x329883([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x329883([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329883([0x6c,0x6f,0x77])}),_0x415322[_0x329883([0x74,0x68,0x65,0x6e])](()=>{_0x2e8052||_0x4663f4(_0x329883([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x582a97(){return _0x29a304[_0x329883([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329883([0x76,0x69,0x65,0x77])][_0x329883([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x329883([0x61,0x75,0x74,0x6f]);}function _0x2ed734(){_0x29a304[_0x329883([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329883([0x76,0x69,0x65,0x77])][_0x329883([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x329883([0x61,0x75,0x74,0x6f]);}}function _0x391f68(_0x5b59a4){const _0x1d2dcd=[new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16c67b=>setTimeout(_0x16c67b,0x734f347f^_0x54fad9)),_0x415322[_0x329883([0x74,0x68,0x65,0x6e])](()=>new window[(_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16fa68=>{let _0x1f0d8e=0x0;_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x6f,0x6e])](_0x329883([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1823d3,_0x569ba5)=>{_0x569ba5[0x0][_0x329883([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1f0d8e++,_0x1f0d8e==(0x73460f5b^_0x54fad9)&&(_0x16fa68(),_0x1823d3[_0x329883([0x6f,0x66,0x66])]());});}))];return window[_0x329883([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x329883([0x72,0x61,0x63,0x65])](_0x1d2dcd)[_0x329883([0x74,0x68,0x65,0x6e])](()=>_0x5b59a4);}async function _0x42808f(){await _0x415322,_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x40b160,_0x29a304[_0x329883([0x6d,0x6f,0x64,0x65,0x6c])][_0x329883([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x40b160,_0x29a304[_0x329883([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x329883([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x8a60a3(){return window[_0x329883([0x67,0x6c,0x6f,0x62])]&&window[_0x329883([0x67,0x6c,0x6f,0x62])][_0x329883([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x7d59ed(){return _0x4e52d6(_0x329883([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x32d38b(_0x329883([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x329883([0x73,0x74,0x61,0x74,0x65])]==_0x329883([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x37f5ee(){return _0x4e52d6(_0x329883([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x33b0a3(){return _0x4e52d6(_0x329883([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x47ea84(_0x386174){const _0x26d461=_0x1b7be6();_0x29a304[_0x26d461]=_0x329883([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x386174,_0x386174!=_0x329883([0x56,0x61,0x6c,0x69,0x64])&&_0x42808f();}function _0x1b7be6(){const _0x1914f9=window[_0x329883([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x329883([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x329883([0x6e,0x6f,0x77])]())[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x329883([0x2e]),'');let _0x365e60=_0x329883([0x4b]);for(let _0x4680bb=0x0;_0x4680bb<_0x1914f9[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4680bb+=0x2){let _0x978470=window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1914f9[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4680bb,_0x4680bb+0x2));_0x978470>=_0x39e8a8[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x978470-=_0x39e8a8[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x365e60+=_0x39e8a8[_0x978470];}return _0x365e60;}function _0x145501(){const _0x2e3f5b=_0x6f47c3[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e]));if(0x3!=_0x2e3f5b[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3a2717(_0x2e3f5b[0x1]);function _0x3a2717(_0x5c2835){const _0x27f0c7=_0x403119(_0x5c2835);return _0x27f0c7&&_0x29e48c()?_0x27f0c7:null;function _0x29e48c(){const _0xfce925=_0x27f0c7[_0x329883([0x6a,0x74,0x69])],_0x2dcb07=window[_0x329883([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xfce925[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xfce925[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2199af={..._0x27f0c7,[_0x329883([0x6a,0x74,0x69])]:_0xfce925[_0x329883([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xfce925[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2199af[_0x329883([0x76,0x63])],_0x4be1b8(_0x2199af)==_0x2dcb07;}}}async function _0x3c0f76(){let _0x226b04=!0x0;try{const _0x14a757=_0x6f47c3[_0x329883([0x73,0x70,0x6c,0x69,0x74])](_0x329883([0x2e])),[_0x561da6,_0x58faef,_0x222ea8]=_0x14a757;return _0x2c2671(_0x561da6),await _0x404650(_0x561da6,_0x58faef,_0x222ea8),_0x226b04;}catch{return!0x1;}function _0x2c2671(_0x4f6d29){const _0x533404=_0x403119(_0x4f6d29);_0x533404&&_0x533404[_0x329883([0x61,0x6c,0x67])]==_0x329883([0x45,0x53,0x32,0x35,0x36])||(_0x226b04=!0x1);}async function _0x404650(_0x5d0e05,_0x574170,_0x5061d2){const _0x5b4a7f=window[_0x329883([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x329883([0x66,0x72,0x6f,0x6d])](_0x425d31(_0x5061d2),_0x24d767=>_0x24d767[_0x329883([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x550950=new window[(_0x329883([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x329883([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5d0e05+_0x329883([0x2e])+_0x574170),_0x4cee1a=window[_0x329883([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x329883([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4cee1a)return;const _0x1044af=await _0x4cee1a[_0x329883([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x329883([0x6a,0x77,0x6b]),_0x50c481,{[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x45,0x43,0x44,0x53,0x41]),[_0x329883([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x329883([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x329883([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4cee1a[_0x329883([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x45,0x43,0x44,0x53,0x41]),[_0x329883([0x68,0x61,0x73,0x68])]:{[_0x329883([0x6e,0x61,0x6d,0x65])]:_0x329883([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1044af,_0x5b4a7f,_0x550950)||(_0x226b04=!0x1);}}function _0x403119(_0x4b81a1){return _0x4b81a1[_0x329883([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x329883([0x65,0x79]))?JSON[_0x329883([0x70,0x61,0x72,0x73,0x65])](_0x425d31(_0x4b81a1)):null;}function _0x425d31(_0x22641e){return window[_0x329883([0x61,0x74,0x6f,0x62])](_0x22641e[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x329883([0x2b]))[_0x329883([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x329883([0x2f])));}function _0x4be1b8(_0x186dd9){let _0x236143=0x1505;function _0x526930(_0x3ed0c5){for(let _0x395ba0=0x0;_0x395ba0<_0x3ed0c5[_0x329883([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x395ba0++){const _0x19b266=_0x3ed0c5[_0x329883([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x395ba0);_0x236143=(_0x236143<<0x5)+_0x236143+_0x19b266,_0x236143&=_0x236143;}}function _0x467113(_0x543b5b){Array[_0x329883([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x543b5b)?_0x543b5b[_0x329883([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x467113):_0x543b5b&&typeof _0x543b5b==_0x329883([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x329883([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x543b5b)[_0x329883([0x73,0x6f,0x72,0x74])]()[_0x329883([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x29cd1e,_0xa12fb6])=>{_0x526930(_0x29cd1e),_0x467113(_0xa12fb6);}):_0x526930(window[_0x329883([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x543b5b));}return _0x467113(_0x186dd9),_0x236143>>>0x0;}function _0x5a27fd(_0x4dd8a6){return _0x4dd8a6[_0x329883([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x329883([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x329883([0x30]));}function _0x296a0a(_0x57ffeb){return _0x57ffeb[_0x329883([0x73,0x70,0x6c,0x69,0x74])]('')[_0x329883([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x329883([0x6a,0x6f,0x69,0x6e])]('');}function _0x4e52d6(_0x4a871c){return _0x29a304[_0x329883([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x329883([0x68,0x61,0x73])](_0x4a871c);}function _0x32d38b(_0x5f4f8e){return _0x29a304[_0x329883([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x329883([0x67,0x65,0x74])](_0x5f4f8e);}function _0x40b160(){}function _0x329883(_0x4c9636){return _0x4c9636['map'](_0x5d3725=>String['fromCharCode'](_0x5d3725))['join']('');}_0x47ea84(await _0x254f58());}(this);}['destroy'](){const _0x34a50f=this['editor']['plugins']['get'](o),_0xcd9d1c=this['editor']['config']['get']('collaboration.channelId');for(const _0x24bd58 of _0x34a50f['getCommentThreads']({'channelId':_0xcd9d1c}))_0x34a50f['_detachCommentThread'](_0x24bd58['id']),_0x34a50f['_threads']['delete'](_0x24bd58['id']);super['destroy']();}['hasMarkerForId'](_0x24b79d){return this['getAllMarkersForId'](_0x24b79d)['length']>0x0;}['getAllMarkersForId'](_0xe746ec){const _0x22a107=[];for(const _0x4635e9 of this['editor']['model']['markers'])_0x4635e9['name']['startsWith']('comment:'+_0xe746ec)&&_0x22a107['push'](_0x4635e9);return _0x22a107;}['scrollToThreadMarker'](_0x3fdab4){setTimeout(()=>{const _0x32553f=this['_getTargetForId'](_0x3fdab4);if(!_0x32553f)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3fdab4&&nt({'target':_0x32553f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3369b8){this['editor']['model']['change'](()=>{for(const _0x7c9987 of this['getAllMarkersForId'](_0x3369b8))this['editor']['editing']['reconvertMarker'](_0x7c9987);});}['_attachArchivedThread'](_0x396c95){const _0x23aaf4=this['editor']['plugins']['get'](o),_0x588c68=this['editor']['plugins']['get'](b),_0x3af373=_0x23aaf4['getCommentThread'](_0x396c95);if(!_0x3af373['isAttached']){const _0x2befc7=_0x3af373['attachTo'](()=>this['_getTargetForId'](_0x3af373['id']));_0x588c68['registerAnnotation'](_0x2befc7),_0x3af373['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4b7885=this['editor'],_0x276fc1=_0x4b7885['plugins']['get'](it);_0x4b7885['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5c9310,_0x4b30a9)=>{const {id:_0x174115}=ft(_0x5c9310['markerName']),_0x32affb=_0x4b7885['plugins']['get'](o)['getCommentThread'](_0x174115),_0x81e728=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x174115;let _0x27732b;if(_0x32affb&&_0x32affb['isResolved']&&!_0x81e728&&_0x5c9310['item'])return _0x4b30a9['consumable']['consume'](_0x5c9310['item'],'addMarker:'+_0x5c9310['markerName']),_0x4b30a9['consumable']['consume'](_0x5c9310['item'],'removeMarker:'+_0x5c9310['markerName']),null;const _0x123852=['ck-comment-marker'];return _0x81e728&&_0x123852['push']('ck-comment-marker--active'),_0x27732b=_0x32affb?.['length']?_0x32affb['comments']['first']['author']['id']:_0x276fc1['me']['id'],{'classes':_0x123852,'attributes':{'data-comment':_0x174115,'data-author-id':_0x27732b}};}}),_0x4b7885['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x18657b,{options:_0x310f95})=>{if(_0x310f95['showCommentHighlights'])return null;const _0x2f343d=_0x4b7885['plugins']['get'](o),_0x40c2e0=_0x4b7885['model']['markers']['get'](_0x18657b),{id:_0x1fc206,part:_0x55def5}=ft(_0x18657b);return _0x40c2e0&&!_0x40c2e0['affectsData']||_0x310f95['ignoreResolvedComments']&&_0x2f343d['getCommentThread'](_0x1fc206)?.['isResolved']?null:{'group':'comment','name':_0x55def5?_0x1fc206+':'+_0x55def5:_0x1fc206};}}),_0x4b7885['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1bb2c2,{writer:_0x315686})=>_0x315686['createElement']('$marker',{'data-name':'comment:'+_0x1bb2c2['getAttribute']('id')})}),_0x4b7885['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1125e8=this['editor'],_0x1fc39b=_0x1125e8['plugins']['get'](o),_0x55d754=new Set(),_0x3d8c02=new Set();_0x1125e8['model']['document']['registerPostFixer'](_0x8ef6bf=>{let _0x4bd550=!0x1;for(const {name:_0x309a38,data:_0x362c0e}of _0x1125e8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4e684d,id:_0x3bcaf7}=ft(_0x309a38);let _0x1a0c30=_0x362c0e['newRange'];if('comment'!==_0x4e684d||!_0x1a0c30)continue;const _0x5320fd='$graveyard'===_0x1a0c30['root']['rootName'];_0x5320fd||(_0x1a0c30=ht(_0x1a0c30,_0x1125e8['model']),!_0x1a0c30||_0x1a0c30['isCollapsed']||!_0x362c0e['newRange']||_0x1a0c30['isEqual'](_0x362c0e['newRange']))?_0x1125e8['model']['hasContent'](_0x1a0c30)&&!_0x5320fd?this['isThreadsLoadingPaused']?_0x55d754['add'](_0x309a38):this['_handleThreadMarker'](_0x309a38,_0x3bcaf7):(_0x3d8c02['add'](_0x309a38),_0x55d754['delete'](_0x309a38),_0x8ef6bf['removeMarker'](_0x309a38),_0x4bd550=!0x0):(_0x8ef6bf['updateMarker'](_0x309a38,{'range':_0x1a0c30}),_0x4bd550=!0x0);}return _0x4bd550;}),this['on']('change:isThreadsLoadingPaused',(_0x3e10c0,_0x141c23,_0x31b7f7)=>{if(!_0x31b7f7&&_0x55d754['size'])for(const _0xe8a4b1 of _0x55d754){const {id:_0x4a2456}=ft(_0xe8a4b1);_0x55d754['delete'](_0xe8a4b1),_0x1125e8['model']['markers']['get'](_0xe8a4b1)&&this['_handleThreadMarker'](_0xe8a4b1,_0x4a2456);}}),this['listenTo'](_0x1125e8['model']['document'],'change',()=>{for(const {name:_0x3ef3ee,data:{newRange:_0x430983}}of _0x1125e8['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21ec81,id:_0xf123b6}=ft(_0x3ef3ee);if('comment'!==_0x21ec81)continue;const _0x94d7af=_0x1fc39b['getCommentThread'](_0xf123b6),_0x54546d=this['hasMarkerForId'](_0xf123b6);_0x94d7af&&(!_0x94d7af['_hasTargetInContent']&&_0x430983&&_0x1125e8['editing']['view']['once']('render',()=>{const _0x18b1df=_0x1125e8['plugins']['get'](y),_0x509f63=_0x1fc39b['_threadToController']['get'](_0x94d7af)['view'];_0x18b1df['getByInnerView'](_0x509f63)['refreshVisibility']();},{'priority':'low'}),_0x94d7af['_hasTargetInContent']=_0x54546d||!!_0x430983),_0x430983||(_0x3d8c02['add'](_0x3ef3ee),_0x55d754['delete'](_0x3ef3ee));}for(const _0x31f179 of _0x3d8c02){const {id:_0x2b0743}=ft(_0x31f179),_0x25ac86=_0x1fc39b['getCommentThread'](_0x2b0743);if(_0x55d754['delete'](_0x31f179),!_0x25ac86)continue;const _0xfc4598=this['hasMarkerForId'](_0x2b0743);_0xfc4598||_0x25ac86['isSubmitted']?_0xfc4598||_0x25ac86['unlinkedAt']||_0x25ac86['setUnlinkedAt'](new Date()):_0x25ac86['remove']();}_0x3d8c02['clear']();});}['_handleInitialThreads'](_0x11bec0){_0x11bec0['forEach'](_0x16cdd9=>{_0x16cdd9['unlinkedAt']&&this['_attachArchivedThread'](_0x16cdd9['id']);});}['_getTargetForId'](_0xfa32cd){const _0x306bf4=this['editor'],_0x55754f=this['getAllMarkersForId'](_0xfa32cd);return et(_0x306bf4['editing'],_0x55754f);}['_getTextContext'](_0x2b4bf8){const _0x212690=this['getAllMarkersForId'](_0x2b4bf8);let _0x14cafc='',_0x525ecb=!0x1;for(const _0x3daa8d of _0x212690){const _0x4bfddc=_0x3daa8d['getRange']();for(const _0x4685c8 of Array['from'](_0x4bfddc['getItems']()))_0x4685c8['is']('$textProxy')?(_0x14cafc&&_0x525ecb&&(_0x14cafc+='\x20',_0x525ecb=!0x1),_0x14cafc+=_0x4685c8['data']):_0x525ecb=!0x0;_0x525ecb=!0x0;}return _0x14cafc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x173812,_0x1f3679){const _0x57ab6a=this['editor'],_0x5ad1fe=_0x57ab6a['plugins']['get'](o);let _0x40b88c=_0x5ad1fe['getCommentThread'](_0x1f3679);const _0x4d26e7=_0x57ab6a['config']['get']('collaboration.channelId'),_0x38fade=_0x57ab6a['plugins']['get'](b);if(_0x40b88c&&(_0x40b88c['unlinkedAt']&&_0x40b88c['setUnlinkedAt'](null),_0x40b88c['isAttached']))return _0x40b88c;return!this['getAllMarkersForId'](_0x1f3679)[0x0]['managedUsingOperations']?_0x57ab6a['editing']['view']['once']('render',()=>{if(_0x5ad1fe['getCommentThread'](_0x1f3679))return;const _0x173d9c=_0x57ab6a['plugins']['get'](y);_0x40b88c=_0x5ad1fe['openNewCommentThread']({'channelId':_0x4d26e7,'threadId':_0x1f3679,'target':()=>this['_getTargetForId'](_0x1f3679),'context':{'type':'text','value':this['_getTextContext'](_0x1f3679)}});const _0x3d549c=_0x5ad1fe['_threadToController']['get'](_0x40b88c)['view'],_0x1faaa8=_0x173d9c['getByInnerView'](_0x3d549c);_0x1faaa8&&_0x38fade['registerAnnotation'](_0x1faaa8);},{'priority':'low'}):_0x5ad1fe['fetchCommentThread']({'channelId':_0x4d26e7,'threadId':_0x1f3679})['then'](_0x8b8d8d=>{if('destroyed'!==_0x57ab6a['state']){if(_0x40b88c=_0x8b8d8d,_0x40b88c&&!_0x40b88c['isAttached']){const _0x572f0a=_0x40b88c['attachTo'](()=>this['_getTargetForId'](_0x1f3679));_0x38fade['registerAnnotation'](_0x572f0a),_0x40b88c['isResolved']&&this['_reconvertMarkers'](_0x1f3679);}else{if(!_0x40b88c){const _0x51de64=this['getAllMarkersForId'](_0x1f3679);_0x57ab6a['model']['change'](_0x44d6a3=>{for(const _0x341696 of _0x51de64)_0x44d6a3['removeMarker'](_0x341696);});}}}}),_0x40b88c;}['_handleThreadMarker'](_0x2240d8,_0xa21216){const _0x15280c=this['_attachMarkerToThread'](_0x2240d8,_0xa21216);_0x15280c&&!_0x15280c['context']&&_0x15280c['setContext']({'type':'text','value':this['_getTextContext'](_0xa21216)});}['_initAriaMarkerChangeAnnouncements'](){const _0x525197=this['editor'];rt(_0x525197['model'],({left:_0x38ba89,entered:_0x1cd767})=>{for(const _0x32b608 of _0x38ba89)if(mt(_0x32b608)){_0x525197['ui']['ariaLiveAnnouncer']['announce'](N(_0x525197['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4e854c of _0x1cd767)if(mt(_0x4e854c)){_0x525197['ui']['ariaLiveAnnouncer']['announce'](N(_0x525197['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x577a1a)));break;}});}}function dt(_0x33ed2e,_0x3a598d){return _0x3a598d?_0x33ed2e+':'+_0x3a598d:_0x33ed2e;}function ht(_0x26f77a,_0x40ec4a){const _0x56fbb2=_0x40ec4a['schema'],_0x55998f=_0x40ec4a['createRange'](_0x26f77a['start']);for(const _0x5f4d61 of _0x26f77a['getWalker']()){const {type:_0x1b61f9,item:_0x5f4720,nextPosition:_0x4c4533}=_0x5f4d61;if('text'===_0x1b61f9||_0x56fbb2['isObject'](_0x5f4720)){const _0x5b67d3=_0x40ec4a['createPositionBefore'](_0x5f4720);_0x55998f['isCollapsed']&&(_0x55998f['start']=_0x5b67d3),_0x55998f['end']=_0x4c4533;}}return _0x55998f;}function mt(_0x5deda2){return'comment'===ft(_0x5deda2['name'])['group'];}class s extends _0x383916{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x597da7=this['editor'],_0x272b36=_0x597da7['plugins']['get'](o),_0x35d64a=_0x597da7['plugins']['get'](r),_0x37fd7f=_0x597da7['plugins']['get'](y),_0x29d858=_0x597da7['plugins']['get'](b);_0x597da7['ui']['componentFactory']['add']('comment',()=>{const _0x28c7e4=this['_createUIButton'](_0x6603e9);return _0x28c7e4['tooltip']=!0x0,_0x28c7e4;}),_0x597da7['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x59d316)),_0x29d858['addSourceCollector'](()=>{const _0x41a8b9=[];for(const [_0x32b6c5,_0x468df4]of _0x272b36['_threadToController']){const _0x1e4c36=_0x35d64a['getAllMarkersForId'](_0x32b6c5['id']),_0x3a5890=_0x1e4c36['map'](_0x5668af=>_0x5668af['getRange']());_0x1e4c36['length']>0x0&&_0x41a8b9['push']([_0x468df4['view'],_0x3a5890]);}return _0x41a8b9;}),this['listenTo'](_0x37fd7f,'change:activeAnnotations',(_0x375664,_0x3fbf49,_0x171a81)=>{const _0x1c1efd=Array['from'](_0x171a81)['map'](_0x483697=>_0x483697['innerView'])['find'](_0x4166d3=>_0x272b36['_viewToController']['has'](_0x4166d3));if(!_0x1c1efd)return void(_0x35d64a['activeMarker']=null);const _0x2c3ceb=_0x272b36['_viewToController']['get'](_0x1c1efd)['model']['id'],_0x5e5248='comment:'+_0x2c3ceb;_0x2c3ceb&&_0x35d64a['hasMarkerForId'](_0x2c3ceb)?_0x35d64a['activeMarker']=_0x5e5248:_0x35d64a['activeMarker']&&(_0x35d64a['activeMarker']=null);}),this['listenTo'](_0x272b36,'removeCommentThread',(_0x49da52,{threadId:_0x2bbe25,isFromAdapter:_0x4ac8b0})=>{!_0x4ac8b0&&_0x597da7['ui']['focusTracker']['isFocused']&&_0x35d64a['hasMarkerForId'](_0x2bbe25)&&_0x597da7['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x272b36,'addComment',(_0x5b99f9,{threadId:_0x2f85da,isFromAdapter:_0x9716c3})=>{if(_0x9716c3||!_0x35d64a['hasMarkerForId'](_0x2f85da)||!_0x272b36['hasCommentThread'](_0x2f85da))return;0x1===_0x272b36['getCommentThread'](_0x2f85da)['length']&&(_0x597da7['editing']['view']['focus'](),_0x5b99f9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13c6ad=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1580e7;for(const _0x1e4e24 in _0x13c6ad){const _0xe207b6=_0x1e4e24,_0x194480=_0x13c6ad[_0xe207b6];if('commentsLicenseKeyValid'==_0x194480||'commentsLicenseKeyInvalid'==_0x194480||'commentsLicenseKeyExpired'==_0x194480||'commentsLicenseKeyDomainLimit'==_0x194480||'commentsLicenseKeyNotAllowed'==_0x194480||'commentsLicenseKeyEvaluationLimit'==_0x194480||'commentsLicenseKeyUsageLimit'==_0x194480){delete _0x13c6ad[_0xe207b6],_0x1580e7=_0x194480,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1580e7&&_0x13c6ad['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1580e7&&_0x13c6ad['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1580e7&&_0x13c6ad['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x1580e7&&_0x13c6ad['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1f995d){const _0x3bc923=this['editor'],_0x5a23fd=new _0x1f995d(_0x3bc923['locale']),_0x26ed0c=_0x3bc923['commands']['get']('addCommentThread');return _0x5a23fd['set']({'label':N(_0x3bc923['locale'],'Comment'),'icon':_0x422358}),_0x5a23fd['bind']('isEnabled')['to'](_0x26ed0c,'isEnabled',_0x26ed0c,'hasContent',(_0xb2b98b,_0x1baeca)=>_0xb2b98b&&_0x1baeca),this['listenTo'](_0x5a23fd,'execute',()=>{_0x26ed0c['execute']();}),_0x5a23fd;}}class i extends _0x383916{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5c3ab0){super(_0x5c3ab0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3129c3,_0x20c98f,_0x47ce95)=>{_0x47ce95?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1fb5c4,_0x2a6bda]of this['editor']['commands'])_0x2a6bda['affectsData']&&'addCommentThread'!==_0x1fb5c4&&_0x2a6bda['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3418a3=this['editor']['editing']['view']['document'];this['listenTo'](_0x3418a3,'cut',_0x25d02c=>_0x25d02c['stop'](),{'priority':'highest'}),this['listenTo'](_0x3418a3,'clipboardInput',_0x392715=>_0x392715['stop'](),{'priority':'highest'}),this['listenTo'](_0x3418a3,'delete',_0x56345f=>_0x56345f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x43b0b7,_0x5cda97]of this['editor']['commands'])_0x5cda97['affectsData']&&'addCommentThread'!==_0x43b0b7&&_0x5cda97['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x6308a6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a3afb){super(_0x2a3afb),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xa64d6a=this['context']['plugins']['get'](y);this['listenTo'](_0xa64d6a,'_activateAnnotation',(_0x4fefb8,_0x1dd7a1)=>{for(const _0x574353 of this['activeUIs']){const _0x59a925=this['_uis']['get'](_0x574353);(0x0,this['uisData']['get'](_0x574353)['filter'])(_0x1dd7a1)&&_0x59a925['setActiveAnnotation'](_0x1dd7a1);}}),this['listenTo'](_0xa64d6a,'_deactivateAllAnnotations',()=>{for(const _0x5af583 of this['activeUIs']){this['_uis']['get'](_0x5af583)['setActiveAnnotation'](null);}}),this['listenTo'](_0xa64d6a['_visibleAnnotations'],'add',(_0x8f93db,_0x4e14d8)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4e14d8);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5a9426){return this['activeUIs']['has'](_0x5a9426);}['activate'](_0x3ddda0,_0x5449a0=this['defaultFilter']){const _0x5cd1b1=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3ddda0))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x3ddda0});this['isActive'](_0x3ddda0)&&this['deactivate'](_0x3ddda0),this['activeUIs']['add'](_0x3ddda0);const _0x5b6ff9=new S();v({'source':_0x5cd1b1['_visibleAnnotations'],'target':_0x5b6ff9,'filter':_0x5449a0}),this['uisData']['set'](_0x3ddda0,{'collection':_0x5b6ff9,'filter':_0x5449a0});const _0x505ea4=this['_uis']['get'](_0x3ddda0);_0x505ea4['attach'](_0x5b6ff9),this['listenTo'](_0x505ea4,'change:activeAnnotation',(_0x20ffaf,_0x4abf08,_0x5ca29b,_0x5d590f)=>{_0x5d590f&&_0x5cd1b1['_removeActiveAnnotation'](_0x5d590f),_0x5ca29b&&_0x5cd1b1['_addActiveAnnotation'](_0x5ca29b);});}['deactivate'](_0x2cfd3a){if(this['activeUIs']['delete'](_0x2cfd3a),!this['_uis']['has'](_0x2cfd3a))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x2cfd3a});const _0x3b1dd5=this['_uis']['get'](_0x2cfd3a);_0x3b1dd5['detach'](),this['stopListening'](_0x3b1dd5),this['uisData']['get'](_0x2cfd3a)['collection']['destroy'](),this['uisData']['delete'](_0x2cfd3a);}['switchTo'](_0x4e820a){if(!this['_uis']['has'](_0x4e820a))throw new _0x37011e('annotationsuis-missing-ui',this,{'uiName':_0x4e820a});const _0x114a62=this['context']['plugins']['get'](y),_0x2ed54b=Array['from'](_0x114a62['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4e820a);const _0x46fb15=this['_uis']['get'](_0x4e820a);_0x46fb15['setActiveAnnotation'](_0x2ed54b),_0x46fb15['_setSelectedAnnotations']&&_0x2ed54b&&_0x46fb15['_setSelectedAnnotations']([_0x2ed54b]);}['deactivateAll'](){for(const _0xd6e96e of this['activeUIs'])this['deactivate'](_0xd6e96e);}['register'](_0x4ea8eb,_0x4a1de2){if(this['_uis']['has'](_0x4ea8eb))throw new _0x37011e('annotationsuis-register-already-registered');if('function'!=typeof _0x4a1de2['attach']||'function'!=typeof _0x4a1de2['detach']||'function'!=typeof _0x4a1de2['setActiveAnnotation'])throw new _0x37011e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4ea8eb,_0x4a1de2);}['refilterAnnotations'](){const _0x39a984=this['context']['plugins']['get'](y)['collection'],_0x1780de=new Map(),_0xdeada3=Array['from'](this['activeUIs']);for(const _0x5c7019 of this['activeUIs']){const _0x3bd524=this['uisData']['get'](_0x5c7019)['collection'];for(const _0x13e85b of _0x3bd524)_0x1780de['set'](_0x13e85b,_0x5c7019);}for(const _0x1eb535 of _0x39a984){const _0x2127ce=_0x1780de['get'](_0x1eb535);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1eb535);const _0x1c7b0a=_0xdeada3['find'](_0x59382b=>this['uisData']['get'](_0x59382b)['filter'](_0x1eb535));_0x2127ce!==_0x1c7b0a&&(_0x2127ce&&this['uisData']['get'](_0x2127ce)['collection']['remove'](_0x1eb535),_0x1c7b0a&&this['uisData']['get'](_0x1c7b0a)['collection']['add'](_0x1eb535));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1677ae){const _0x1261c0=[];for(const _0x3324b2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3324b2)['filter'])(_0x1677ae)&&_0x1261c0['push'](_0x3324b2);}if(_0x1261c0['length']>0x1)throw new _0x37011e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1261c0,'annotationType':_0x1677ae['type']});}}const he=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x298527){super(_0x298527);const _0x1aceb7=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0xf55ae0(),this['focusCycler']=new _0x3f1de7({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1aceb7['to']('class')],'style':{'minHeight':_0x1aceb7['to']('minHeight',_0x5b9d0f=>'number'==typeof _0x5b9d0f?he(_0x5b9d0f+0xa):null)},'dir':_0x298527['uiLanguageDirection'],'role':'application','aria-label':N(_0x298527,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x298527,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x883d49=>{this['_updateItemPositionInFocusables'](_0x883d49['source']);}),this['list']['forEach'](_0x54c1a2=>{this['focusTracker']['add'](_0x54c1a2['element']),this['_updateItemPositionInFocusables'](_0x54c1a2);}),this['list']['on']('change',(_0x834d80,_0x2993bc)=>{for(const _0x1fd332 of _0x2993bc['removed'])this['focusTracker']['remove'](_0x1fd332['element']),this['focusables']['remove'](_0x1fd332);for(const _0x1d02ed of _0x2993bc['added'])this['focusTracker']['add'](_0x1d02ed['element']),this['_updateItemPositionInFocusables'](_0x1d02ed);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2dbc36){const _0x214198=this['focusables']['getIndex'](_0x2dbc36);let _0x3eaf52,_0x212f83;for(const _0x4165a0 of this['focusables'])if(_0x2dbc36['top']<_0x4165a0['top']){_0x3eaf52=_0x4165a0;break;}if(_0x212f83=_0x3eaf52?this['focusables']['getIndex'](_0x3eaf52):this['focusables']['length'],-0x1!==_0x214198){if(_0x214198===_0x212f83-0x1)return;this['focusables']['remove'](_0x2dbc36),_0x212f83=_0x3eaf52?this['focusables']['getIndex'](_0x3eaf52):this['focusables']['length'];}this['focusables']['add'](_0x2dbc36,_0x212f83);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x485a66){super(_0x485a66),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2d5646,_0x3ff845)=>_0x2d5646+_0x3ff845),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x315254=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x315254['to']('isAnimationDisabled',_0x4d3f9e=>_0x4d3f9e?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x315254['to']('top',_0xb59ce4=>Ot(_0xb59ce4))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3e0deb=this['element']['clientHeight'];_0x3e0deb&&(this['height']=_0x3e0deb);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x6308a6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22ed93){super(_0x22ed93),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x468154=this['context']['config']['get']('sidebar.container');_0x468154&&this['setContainer'](_0x468154);}['setContainer'](_0x5c86d8){if(!g(_0x5c86d8))throw new _0x37011e('sidebar-setcontainer-invalid-element');this['container']=_0x5c86d8;}['_attachToContainer']({viewClass:_0x4d6df7='',spaceBetweenItems:_0x5ac4e1=0x19}={}){if(!g(this['container']))throw new _0x37011e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d6df7,this['_spaceBetweenItems']=_0x5ac4e1;}['rearrange']({removedAnnotation:_0xcd1369,previousAnnotation:_0x5c98ad,nextAnnotation:_0xe8d636}){const _0x90faad=this['getSidebarItemView'](_0xcd1369);this['view']['list']['remove'](_0x90faad),this['_destroySidebarItemView'](_0xcd1369),_0x5c98ad&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5c98ad)),_0xe8d636&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xe8d636)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xeef050,activatedAnnotation:_0xb3d3ba,disableAnimationOnActivatedAnnotation:_0x4fc044}){if(this['_activeAnnotation']=_0xb3d3ba,_0xeef050){_0xeef050['isActive']=!0x1;const _0x2dc31e=this['getSidebarItemView'](_0xeef050);_0x2dc31e&&_0x4fc044&&(_0x2dc31e['isAnimationDisabled']=!0x1);}if(_0xb3d3ba){const _0x2d3fda=this['getSidebarItemView'](_0xb3d3ba);_0x2d3fda&&(_0xb3d3ba['isActive']=!0x0,_0x4fc044&&(_0x2d3fda['isAnimationDisabled']=!0x0,_0x2d3fda['top']+=0x1),this['_alignToTargetRect'](_0x2d3fda));}}['_detachFromContainer'](_0x58b493){if(this['view']['element']['remove'](),_0x58b493){for(const _0x3f9538 of _0x58b493)this['_destroySidebarItemView'](_0x3f9538);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x580e5e,_0x4af986){_0x4af986||(_0x4af986=_0x580e5e['view']);const _0x417270=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x417270,_0x580e5e),this['_annotationToSidebarItemView']['set'](_0x580e5e,_0x417270),_0x417270['content']['add'](_0x4af986),this['listenTo'](_0x580e5e['view'],'change:targetRect',(_0x38a9ad,_0x3c34fa,_0x4fc745)=>{const _0x5e6467=this['_getTargetTop'](_0x580e5e,_0x4fc745);_0x417270['_targetTop']!=_0x5e6467&&(_0x417270['_targetTop']=_0x5e6467,this['_setItemTop'](_0x417270,_0x5e6467));}),this['listenTo'](_0x417270,'change:top',()=>{this['_recalculate'](_0x417270,'top');}),this['listenTo'](_0x417270,'change:bottom',()=>{this['_recalculate'](_0x417270,'bottom');}),this['_alignToTargetRect'](_0x417270);const _0x48f960=this['_getItemBefore'](_0x417270);if(_0x48f960)this['_alignAfterItem'](_0x48f960,_0x417270)||this['_alignToTargetRect'](_0x417270);else this['_alignToTargetRect'](_0x417270);return this['_updateLastItem'](),this['view']['list']['add'](_0x417270),_0x417270;}['_alignForTopChange'](_0x83beff){if(!_0x83beff['content']['length'])return;const _0xe0f7af=this['_getItemBefore'](_0x83beff);if(!_0xe0f7af)return;const _0x5c37be=this['_sidebarItemViewToAnnotation']['get'](_0xe0f7af),_0x12121=this['_activeAnnotation'];_0x12121&&_0x12121===_0x5c37be?this['_alignAfterItem'](_0xe0f7af,_0x83beff):this['_alignBeforeItem'](_0x83beff,_0xe0f7af);}['_alignForBottomChange'](_0x96e207){if(!_0x96e207['content']['length'])return;const _0x3352c8=this['_getItemAfter'](_0x96e207);if(!_0x3352c8)return;const _0xf1f6e6=this['_sidebarItemViewToAnnotation']['get'](_0x3352c8),_0x54e71a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2e2026=this['_activeAnnotation'];_0x2e2026&&_0x2e2026===_0xf1f6e6&&_0x54e71a?(this['_alignBeforeItem'](_0x3352c8,_0x96e207),this['_alignAfterItem'](_0x96e207,_0x3352c8)):_0x2e2026&&_0x2e2026===_0xf1f6e6?this['_alignBeforeItem'](_0x3352c8,_0x96e207):this['_alignAfterItem'](_0x96e207,_0x3352c8);}['_recalculate'](_0x3a41a0,_0x52a39a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3e9288,changedProp:_0xbef98e}of this['_recalculateBuffer'])'top'===_0xbef98e?this['_alignForTopChange'](_0x3e9288):this['_alignForBottomChange'](_0x3e9288);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a41a0,'changedProp':_0x52a39a});}['getSidebarItemView'](_0x1806da){return this['_annotationToSidebarItemView']['get'](_0x1806da);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xe5b361){const _0x2a1326=this['getSidebarItemView'](_0xe5b361);this['stopListening'](_0x2a1326),this['stopListening'](_0xe5b361['view']),_0x2a1326['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xe5b361),this['_sidebarItemViewToAnnotation']['delete'](_0x2a1326);}['_createSidebarView'](){const _0x4e5632=new H(this['context']['locale']);return _0x4e5632['render'](),this['on']('change:_lastItem',(_0x48941b,_0x554828,_0x15ff46,_0x40b187)=>{_0x40b187&&_0x4e5632['unbind']('minHeight'),_0x15ff46?_0x4e5632['bind']('minHeight')['to'](_0x15ff46,'bottom'):_0x4e5632['minHeight']=null;}),_0x4e5632;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5d5be5){const _0x256fa7=this['_sidebarItemViewToAnnotation']['get'](_0x5d5be5),_0x14a982=_0x256fa7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x256fa7)-0x1);return _0x14a982&&this['getSidebarItemView'](_0x14a982)||null;}['_getItemAfter'](_0x40a879){const _0x455fb1=this['_sidebarItemViewToAnnotation']['get'](_0x40a879),_0x3ae04d=_0x455fb1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x455fb1)+0x1);return _0x3ae04d&&this['getSidebarItemView'](_0x3ae04d)||null;}['_alignBeforeItem'](_0x124f93,_0x491395){_0x124f93['updateHeight']();const _0x1c112e=G(_0x491395['bottom']+this['_spaceBetweenItems'],_0x124f93['top']);return!!_0x1c112e&&(this['_setItemTop'](_0x491395,_0x491395['top']-_0x1c112e),!0x0);}['_alignAfterItem'](_0x2dbafb,_0xe4c472){_0x2dbafb['updateHeight']();const _0x3509ed=G(_0x2dbafb['bottom']+this['_spaceBetweenItems'],_0xe4c472['top']);return!!_0x3509ed&&(this['_setItemTop'](_0xe4c472,_0xe4c472['top']+_0x3509ed,!0x1),!0x0);}['_alignToTargetRect'](_0x2e2ca9){const _0x41f1e7=this['_sidebarItemViewToAnnotation']['get'](_0x2e2ca9);if(!_0x41f1e7||!_0x41f1e7['target']||!_0x41f1e7['targetRect'])return;const _0x4ceb1e=this['_getTargetTop'](_0x41f1e7,_0x41f1e7['targetRect']);this['_setItemTop'](_0x2e2ca9,_0x4ceb1e);}['_getTargetTop'](_0xc42f87,_0x28a7b3){if(null===_0x28a7b3)return 0x0;if(_0xc42f87['target']instanceof _0x363cc5)return _0x28a7b3['top'];{const _0x16fdd7=new _0x363cc5(this['view']['element'])['top'];return _0x28a7b3['top']-_0x16fdd7;}}['_setItemTop'](_0x503281,_0x5e76c5,_0xe7bbb2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xe7bbb2&&(_0x5e76c5=Math['max'](_0x5e76c5,this['_getMaxAvailableTop'](_0x503281))),_0x503281['top']=_0x5e76c5;}['_getMaxAvailableTop'](_0x406cfb){let _0x1924b6=this['_getItemBefore'](_0x406cfb),_0xdb5316=0x0;for(;_0x1924b6;)_0x1924b6['updateHeight'](),_0xdb5316+=this['_spaceBetweenItems']+_0x1924b6['height'],_0x1924b6=this['_getItemBefore'](_0x1924b6);return _0xdb5316;}}function G(_0x3acc11,_0x196c63){return Math['max'](_0x3acc11-_0x196c63,0x0);}function g(_0x15f29e){return null!==_0x15f29e&&'object'==typeof _0x15f29e&&0x1===_0x15f29e['nodeType'];}class e extends _0x6308a6{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x249dd4){super(_0x249dd4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5bbff0(),this['_refreshPositioningDebounced']=_0x5ba633(()=>{_0x249dd4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1084ad=this['context']['plugins']['get'](j),_0x232082=this['context']['plugins']['get'](z);_0x1084ad['register']('wideSidebar',this),_0x232082['container']&&_0x1084ad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x396b30){if(_0x396b30===this['activeAnnotation'])return;const _0x2a7e63=this['context']['plugins']['get'](z);_0x2a7e63['_activeAnnotation']=_0x396b30;const _0x137a00=this['activeAnnotation'];_0x2a7e63['refresh']({'blurredAnnotation':_0x137a00,'activatedAnnotation':_0x396b30}),this['activeAnnotation']=_0x396b30;}['attach'](_0x2f0250){this['annotations']=_0x2f0250;const _0x46fda3=this['context']['plugins']['get'](z);if(_0x46fda3['_annotations']=_0x2f0250,this['isAttached'])throw new _0x37011e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x46fda3,'set:container',()=>{this['detach'](),this['listenTo'](_0x46fda3,'change:container',_0x32bf8b=>{_0x32bf8b['off'](),this['attach'](_0x2f0250);});}),_0x46fda3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3f261b=_0x430056=>{_0x430056['updateTargetRect'](),_0x46fda3['addAnnotation'](_0x430056);};for(const _0x8c7db9 of _0x2f0250)_0x3f261b(_0x8c7db9);this['listenTo'](_0x2f0250,'add',(_0x43a6dd,_0x1fc465)=>{_0x3f261b(_0x1fc465);}),this['listenTo'](_0x2f0250,'remove',(_0x4ce95a,_0x1dcea7,_0x37ca44)=>{_0x46fda3['rearrange']({'removedAnnotation':_0x1dcea7,'previousAnnotation':_0x2f0250['get'](_0x37ca44-0x1),'nextAnnotation':_0x2f0250['get'](_0x37ca44+0x1)}),_0x1dcea7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2f0250,'focus',(_0x201419,_0x18bf97)=>{this['setActiveAnnotation'](_0x18bf97);}),this['listenTo'](_0x2f0250,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1d75c2=this['context']instanceof _0x5e978f?this['context']['editors']:new _0x5bbff0([this['context']]);for(const _0x204bea of _0x1d75c2)this['_integrateWithEditorAnnotations'](_0x204bea);this['listenTo'](_0x1d75c2,'add',(_0x37a44c,_0x47f280)=>{this['listenTo'](_0x47f280,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x47f280);});}),this['listenTo'](_0x1d75c2,'remove',(_0x16262b,_0x54adcf)=>{_0x54adcf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x54adcf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x37011e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x41cc7f=this['context']['plugins']['get'](z);_0x41cc7f['_detachFromContainer'](this['annotations']),this['stopListening'](_0x41cc7f),this['stopListening'](this['annotations']),this['context']instanceof _0x5e978f&&this['stopListening'](this['context']['editors']);for(const _0x42c0df of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x42c0df);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4c9efe){if(!_0x4c9efe['plugins']['has']('EditorAnnotations'))return;const _0x58250f=_0x4c9efe['plugins']['get']('EditorAnnotations'),_0x372aaf=()=>{const _0x545dd2=_0x58250f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x545dd2[0x0]||null);};this['listenTo'](_0x58250f,'refresh',_0x372aaf),this['listenTo'](_0x58250f,'blur',(_0x537817,{isAnnotationTracked:_0x331987})=>{this['activeAnnotation']&&_0x331987(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x58250f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2aa4f3=>{_0x58250f['hasDomSelection']()&&(_0x372aaf(),_0x2aa4f3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x58250f);}['_destroyEditorAnnotationsIntegration'](_0x2a7f0a){this['stopListening'](_0x2a7f0a),this['_editorAnnotations']['remove'](_0x2a7f0a);}}class C extends _0x6603e9{['counterView'];constructor(_0x428e5e){super(_0x428e5e);const _0x368b4f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2ee6b3,_0x59ded7)=>_0x2ee6b3?'...':_0x59ded7['toString']()),this['set']('annotationType',''),this['icon']=_0x422358,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x368b4f['to']('annotationType',_0x130774=>'ck-annotation-counter__badge--'+_0x130774),_0x368b4f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x368b4f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x6308a6{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3849a3){super(_0x3849a3),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x429d9a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5bbff0(),this['_refreshPositioningDebounced']=_0x5ba633(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2fda56(this['context']['locale']),this['balloonPanelView']=new _0x25e11c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xe8d2af){this['annotations']=_0xe8d2af;const _0x25284d=this['context']['plugins']['get'](z),_0x5a6c2b=this['balloonPanelView'];if(_0x25284d['_annotations']=_0xe8d2af,this['isAttached'])throw new _0x37011e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x25284d,'set:container',()=>{this['detach'](),this['listenTo'](_0x25284d,'change:container',_0x3c8a11=>{_0x3c8a11['off'](),this['attach'](_0xe8d2af);});}),_0x25284d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1411b0=_0x119829=>{const _0x29c46a=new C(this['context']['locale']);_0x25284d['addAnnotation'](_0x119829,_0x29c46a),this['_annotationToNarrowView']['set'](_0x119829,_0x29c46a),_0x29c46a['bind']('isDirty','annotationType','number')['to'](_0x119829['view'],'isDirty','type','length'),_0x29c46a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a6c2b['content']['first']!==_0x119829['view']?(this['_showBalloon'](_0x119829),_0x119829['view']['element']['focus'](),this['setActiveAnnotation'](_0x119829)):this['setActiveAnnotation'](null);});};for(const _0x42b2f3 of _0xe8d2af)_0x1411b0(_0x42b2f3);this['listenTo'](_0xe8d2af,'add',(_0x30e467,_0x302da6)=>{_0x1411b0(_0x302da6);}),this['listenTo'](_0xe8d2af,'remove',(_0x4e0302,_0x1c41e3,_0x2d242e)=>{this['_annotationToNarrowView']['get'](_0x1c41e3)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1c41e3),_0x25284d['rearrange']({'removedAnnotation':_0x1c41e3,'previousAnnotation':_0xe8d2af['get'](_0x2d242e-0x1),'nextAnnotation':_0xe8d2af['get'](_0x2d242e+0x1)}),_0x1c41e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xe8d2af,'focus',(_0x5d54fe,_0x281623)=>{this['setActiveAnnotation'](_0x281623);}),this['listenTo'](_0xe8d2af,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e31b7,_0x29edaa)=>{_0x29edaa['keyCode']===_0x5b6b88['esc']&&_0x5a6c2b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a6c2b['content']['first']),this['_hideBalloon'](),_0x29edaa['stopPropagation'](),_0x29edaa['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1687a2,_0x486cb7)=>{const _0x28135a=_0x486cb7['target'];_0x5a6c2b['isVisible']&&_0x5a6c2b['element']['contains'](_0x28135a)||_0x25284d['view']['element']['contains'](_0x28135a)||_0x1687a2['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4dbbef=>_0x4dbbef['contains'](_0x28135a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x7d186b=this['context']instanceof _0x5e978f?this['context']['editors']:new _0x5bbff0([this['context']]);for(const _0x5e16c4 of _0x7d186b)this['_integrateWithEditorAnnotations'](_0x5e16c4);this['listenTo'](_0x7d186b,'add',(_0x372327,_0x5e5752)=>{this['listenTo'](_0x5e5752,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5e5752);});}),this['listenTo'](_0x7d186b,'remove',(_0x2049c3,_0x132625)=>{_0x132625['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x132625['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x57d605){if(_0x57d605===this['activeAnnotation'])return;const _0x1692d5=this['context']['plugins']['get'](z);if(_0x1692d5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x57d605,'disableAnimationOnActivatedAnnotation':!0x0}),_0x57d605)_0x1692d5['getSidebarItemView'](_0x57d605)?this['_showBalloon'](_0x57d605):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x57d605;}['detach'](){if(!this['isAttached'])throw new _0x37011e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a3d65=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xeeb49f=>_0xeeb49f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3a3d65['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5e978f&&this['stopListening'](this['context']['editors']);for(const _0xd0de24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xd0de24);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0xd74f03){if(!_0xd74f03['plugins']['has']('EditorAnnotations'))return;const _0x318c29=_0xd74f03['plugins']['get']('EditorAnnotations'),_0x353a31=this['context']['plugins']['get'](z),_0x401329=this['annotations'],_0x41e622=this['balloonPanelView'],_0x587ff4=()=>{const _0x29f7eb=_0x318c29['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x29f7eb),this['setActiveAnnotation'](_0x29f7eb[0x0]||null);};this['listenTo'](_0x318c29,'refresh',_0x587ff4),this['listenTo'](_0x318c29,'blur',(_0x1bf84b,{isAnnotationTracked:_0x3dc968})=>{this['activeAnnotation']&&_0x3dc968(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x318c29,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x401329,'blur',_0x10410a=>{_0x318c29['hasDomSelection']()&&_0x10410a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x344250,_0x566257)=>{const _0x1d479c=_0x566257['target'];_0x41e622['isVisible']&&_0x41e622['element']['contains'](_0x1d479c)||_0x353a31['view']['element']['contains'](_0x1d479c)||this['activeAnnotation']&&_0x318c29['hasDomSelection']()&&(_0x587ff4(),_0x344250['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x318c29);}['_destroyEditorAnnotationsIntegration'](_0x1eaceb){_0x1eaceb&&(this['stopListening'](_0x1eaceb),this['_editorAnnotations']['remove'](_0x1eaceb));}['_setSelectedAnnotations'](_0x1f44b6){for(const _0x3ff856 of this['_selectedAnnotations'])_0x1f44b6['includes'](_0x3ff856)||this['_manuallyClosedAnnotationViews']['delete'](_0x3ff856['view']);this['_selectedAnnotations']=_0x1f44b6;}['_refreshPositioning'](){const _0x3284ae=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3284ae['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x134973){if(this['_manuallyClosedAnnotationViews']['has'](_0x134973['view']))return;const _0xf6b283=this['balloonPanelView']['content']['first'];_0xf6b283!==_0x134973['view']?(_0xf6b283&&this['_detachListeners'](_0xf6b283),this['_attachListeners'](_0x134973['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x134973['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x46636a=this['balloonPanelView']['content']['first'],_0x20e169=_0x46636a&&this['annotations']['getByView'](_0x46636a);if(!_0x20e169||!this['_annotationToNarrowView']['has'](_0x20e169))return;const _0x546317=this['_annotationToNarrowView']['get'](_0x20e169)['element'],_0x3d3783=(function(){const _0x515cdf=_0x25e11c['defaultPositions'];return[_0x515cdf['southArrowNorthEast'],_0x515cdf['northArrowSouthEast'],_0x515cdf['southArrowNorth'],_0x515cdf['northArrowSouth'],_0x515cdf['southArrowNorthWest'],_0x515cdf['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x546317,'positions':_0x3d3783});}['_hideBalloon'](){const _0x4baba2=this['balloonPanelView'],_0xe19dc3=_0x4baba2['content']['first'];_0xe19dc3&&(this['_detachListeners'](_0xe19dc3),_0x4baba2['unpin'](),_0x4baba2['content']['clear']());}['_attachListeners'](_0x5af357){this['listenTo'](_0x5af357,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5af357,'Esc',(_0x40045e,_0x3d14f1)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5af357),this['_hideBalloon'](),_0x3d14f1();});}['_detachListeners'](_0x2d6098){this['stopListening'](_0x2d6098);}}class c extends _0x383916{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x55de07,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x89a5a){super(_0x89a5a),_0x89a5a['editing']['view']['addObserver'](_0x40cd73),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x89a5a['plugins']['get'](_0x55de07),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5ba633(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x113c17=this['editor']['plugins']['get'](j);_0x113c17['context']===this['editor']&&(_0x113c17['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4752c3,_0x4f7bb2)=>{const _0x43db1b=this['_balloon'];if(this['isAttached']&&_0x43db1b['visibleView']){const _0x4c376d=this['annotations']['getByView'](_0x43db1b['visibleView']);_0x4c376d&&this['_closeAnnotation'](_0x4c376d),_0x4f7bb2();}}));}['afterInit'](){const _0x48b580=this['editor']['plugins']['get'](j);_0x48b580['context']===this['editor']&&(_0x48b580['hasActive']()||_0x48b580['switchTo']('inline'));}['setActiveAnnotation'](_0x4fbc6a){_0x4fbc6a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4fbc6a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4fbc6a)&&this['_addAnnotationToBalloon'](_0x4fbc6a,!0x0),_0x4fbc6a['isActive']=!0x0),_0x4fbc6a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4fbc6a);}['attach'](_0x4b2109){this['annotations']=_0x4b2109;const _0x40889b=this['editor']['plugins']['get'](j),_0x3e0b4e=this['_balloon'];if(this['isAttached'])throw new _0x37011e('inlineannotations-attach-already-attached',this);if(_0x40889b['context']!==this['editor'])throw new _0x37011e('inlineannotations-not-allowed-with-context',this);const _0x2ab3e9=this['editor']['plugins']['get'](b);this['listenTo'](_0x2ab3e9,'refresh',()=>{const _0x3f45f8=_0x2ab3e9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x49c4de,_0x1b63ba;!this['_forceRefresh']&&(_0x49c4de=_0x3f45f8,_0x1b63ba=this['_selectedAnnotations'],_0x49c4de['length']===_0x1b63ba['length']&&_0x49c4de['every'](_0x38f174=>_0x1b63ba['includes'](_0x38f174)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3f45f8),this['setActiveAnnotation'](_0x3f45f8[0x0]||null));}),this['listenTo'](_0x2ab3e9,'blur',(_0x593d0f,{isAnnotationTracked:_0x3e5ae9})=>{this['activeAnnotation']&&_0x3e5ae9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ab3e9,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x624b10,_0x50def5,_0x116e5f)=>{_0x116e5f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4b2109,'remove',(_0x4e97dc,_0x372eca)=>{this['_removeAnnotationFromBalloon'](_0x372eca),_0x372eca===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e0b4e,'change:visibleView',(_0x4c2b71,_0x344c71,_0x1bfc30,_0xb4a1df)=>{_0xb4a1df&&this['stopListening'](_0xb4a1df);const _0x14cfad=_0x4b2109['getByView'](_0x1bfc30);_0x1bfc30&&_0x14cfad&&(this['listenTo'](_0x1bfc30,'change:height',()=>{_0x3e0b4e['updatePosition']();}),this['listenTo'](_0x1bfc30,'Esc',()=>{this['_closeAnnotation'](_0x14cfad),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x14cfad&&this['setActiveAnnotation'](_0x14cfad));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3e0b4e['visibleView']&&(_0x4b2109['getByView'](_0x3e0b4e['visibleView'])&&_0x3e0b4e['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x37011e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x183192 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x183192);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x1442a1){for(const _0x145ada of this['_selectedAnnotations'])_0x1442a1['includes'](_0x145ada)||this['_manuallyClosed']['delete'](_0x145ada);for(const _0x4bd134 of this['annotations'])_0x1442a1['includes'](_0x4bd134)||this['_removeAnnotationFromBalloon'](_0x4bd134);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5a1c38 of _0x1442a1)this['_addAnnotationToBalloon'](_0x5a1c38);}this['_selectedAnnotations']=_0x1442a1;}['_addAnnotationToBalloon'](_0x1c2182,_0x4f7122=!0x1){this['_manuallyClosed']['has'](_0x1c2182)||(this['_addedAnnotations']['has'](_0x1c2182)||this['_balloon']['hasView'](_0x1c2182['view'])||(this['_addedAnnotations']['add'](_0x1c2182),this['_balloon']['add']({'stackId':_0x1c2182['view']['id'],'view':_0x1c2182['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1c2182)}})),_0x4f7122&&this['_balloon']['showStack'](_0x1c2182['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1f060f){const _0x4f90c8=_0x1f060f['target'],_0x6d2c0d=this['editor']['editing']['view'],_0x1739a1=_0x6d2c0d['document']['selection']['getFirstRange'](),_0x363663=_0x6d2c0d['domConverter']['viewRangeToDom'](_0x1739a1);if(_0x363663['collapse'](!0x0),_0x4f90c8){if(_0x4f90c8 instanceof _0x363cc5)return _0x4f90c8;let _0x37f05a=[];for(const _0x34fb8d of _0x4f90c8)_0x37f05a['push'](...F(_0x34fb8d['getClientRects']()));_0x37f05a=function(_0x4952ba){const _0x47558b=[];let _0x483be5=_0x4952ba[0x0];for(let _0x2d0169=0x1;_0x2d0169<_0x4952ba['length'];_0x2d0169++)P(_0x483be5,_0x4952ba[_0x2d0169])?_0x483be5['width']+=_0x4952ba[_0x2d0169]['width']:(_0x47558b['push'](_0x483be5),_0x483be5=_0x4952ba[_0x2d0169]);return _0x47558b['push'](_0x483be5),_0x47558b;}(_0x37f05a);const _0x1c73a4=_0x363663['getBoundingClientRect']();return _0x37f05a['find'](_0x3230af=>_0x3230af['top']<=_0x1c73a4['top']&&_0x3230af['bottom']>=_0x1c73a4['bottom']&&_0x3230af['left']<=_0x1c73a4['left']&&_0x3230af['right']>=_0x1c73a4['right'])||_0x37f05a[0x0];}return _0x1f060f['targetRect']||_0x363663;}['_removeAnnotationFromBalloon'](_0x3816ea){this['_addedAnnotations']['has'](_0x3816ea)&&this['_balloon']['hasView'](_0x3816ea['view'])&&(this['_addedAnnotations']['delete'](_0x3816ea),this['_balloon']['remove'](_0x3816ea['view']));}['_closeAnnotation'](_0x11415f){this['_manuallyClosed']['add'](_0x11415f),this['_removeAnnotationFromBalloon'](_0x11415f);}}function F(_0x3be14c){return Array['from'](_0x3be14c)['map'](DOMRect['fromRect']);}function P(_0x3f97ae,_0x173583){return _0x3f97ae['top']===_0x173583['top']&&_0x3f97ae['bottom']===_0x173583['bottom']&&_0x3f97ae['right']===_0x173583['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1a620a,_0x11fd59){super(_0x1a620a),this['set']('isEmpty',!_0x11fd59['length']),this['focusTracker']=new _0xf55ae0(),this['_annotationViews']=_0x11fd59,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3f1de7({'focusables':_0x11fd59,'focusTracker':this['focusTracker']}),this['listenTo'](_0x11fd59,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x11fd59,'remove',(_0x143d26,_0x5a9be8)=>{_0x5a9be8['isActive']&&this['focus'](),_0x11fd59['length']||(this['isEmpty']=!0x0);});const _0x5c9cb2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1a620a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x11fd59},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5c9cb2['if']('isEmpty','ck-hidden',_0x455497=>!_0x455497)]},'children':[{'text':N(_0x1a620a,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x181dc7 of this['_annotationViews'])this['focusTracker']['add'](_0x181dc7['element']);this['_annotationViews']['on']('change',(_0x7944bf,{added:_0x4eb9cc,removed:_0x3b3033})=>{for(const _0x1515fa of _0x4eb9cc)this['focusTracker']['add'](_0x1515fa['element']);for(const _0x523ceb of _0x3b3033)this['focusTracker']['remove'](_0x523ceb['element']);});}}class p extends _0x6308a6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4d3810){super(_0x4d3810),this['archivedThreads']=new _0x5bbff0();}['init'](){const _0x248725=this['context'],_0x22ee88=_0x248725['plugins']['get'](o),_0x1c765e=_0x248725['plugins']['get'](y);this['listenTo'](_0x22ee88,'addCommentThread',(_0x2c132a,{threadId:_0x45db4a})=>{const _0x2e6a98=_0x22ee88['getCommentThread'](_0x45db4a);_0x2e6a98['archivedAt']&&this['archivedThreads']['add'](_0x2e6a98,this['_calculatePosition'](_0x2e6a98['archivedAt'])),this['listenTo'](_0x2e6a98,'change:archivedAt',(_0x599736,_0x3b24ad,_0x21c7ee)=>{_0x21c7ee?this['archivedThreads']['has'](_0x2e6a98)||this['archivedThreads']['add'](_0x2e6a98,this['_calculatePosition'](_0x2e6a98['archivedAt'])):this['archivedThreads']['has'](_0x2e6a98)&&this['archivedThreads']['remove'](_0x2e6a98);});}),this['listenTo'](_0x22ee88,'removeCommentThread',(_0x4f210e,{threadId:_0x4c777e})=>{const _0x56d72a=_0x22ee88['getCommentThread'](_0x4c777e);this['stopListening'](_0x56d72a),this['archivedThreads']['has'](_0x56d72a)&&this['archivedThreads']['remove'](_0x56d72a);},{'priority':'highest'}),this['listenTo'](_0x1c765e['collection'],'focus',(_0x1bfaff,_0x4c3b56)=>{_0x4c3b56['isVisible']||(_0x4c3b56['isActive']=!0x0,_0x1c765e['activate'](_0x4c3b56));});}['_calculatePosition'](_0x2f5179){const _0x379c3b=[...this['archivedThreads']]['findIndex'](_0x495579=>_0x495579['archivedAt']<_0x2f5179);return _0x379c3b>-0x1?_0x379c3b:this['archivedThreads']['length'];}}class a extends _0x383916{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x44fb97];}constructor(_0x2d000c){super(_0x2d000c),this['annotationViews']=new _0x3555a7(),this['_pendingThreads']=[];}['init'](){const _0x3acc80=this['editor'],_0x4bb42e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3acc80['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x6603e9,!0x0)),_0x3acc80['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x224c12=this['_createCommentsArchiveButton'](_0x59d316);return _0x224c12['set']({'role':'menuitemcheckbox'}),_0x224c12;});const _0x184f22=_0x3acc80['plugins']['get'](p),_0xbab109=_0x3acc80['plugins']['get']('Annotations'),_0x35954b=_0x3acc80['plugins']['get']('CommentsRepository');_0x184f22['archivedThreads']['forEach'](_0x28bd96=>{this['_handleNewThread'](_0x28bd96);}),this['listenTo'](_0x184f22['archivedThreads'],'add',(_0x2b76ed,_0x241da8)=>{this['_handleNewThread'](_0x241da8);}),this['listenTo'](_0xbab109['collection'],'add',(_0x5a6fec,_0x21c630)=>{const _0x27c1b5=this['_pendingThreads']['find'](_0x30b5d3=>{const _0x13e7dd=_0x35954b['_threadToController']['get'](_0x30b5d3);return _0x13e7dd&&_0x21c630['innerView']===_0x13e7dd['view'];});if(_0x27c1b5){const _0x39f18c=this['_calculatePosition'](_0x27c1b5['archivedAt']);this['_addAnnotationToArchive'](_0x21c630,_0x39f18c),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x27c1b5),0x1);}}),this['listenTo'](_0x184f22['archivedThreads'],'remove',(_0x3dec15,_0x56933e)=>{const _0x4f50d7=_0x3acc80['config']['get']('collaboration.channelId');if(!_0x4f50d7||_0x56933e['channelId']===_0x4f50d7){if(this['_pendingThreads']['includes'](_0x56933e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x56933e),0x1);else{const _0x10b3fa=_0x35954b['_threadToController']['get'](_0x56933e),_0x3f6735=_0xbab109['getByInnerView'](_0x10b3fa['view']);this['annotationViews']['remove'](_0x3f6735['view']),this['stopListening'](_0x3f6735),this['stopListening'](_0x3f6735['focusableElements']);}}}),this['listenTo'](_0xbab109['collection'],'add',(_0x32004b,_0x15a209)=>{this['listenTo'](_0x15a209,'escape',_0x4bb42e);}),this['listenTo'](_0xbab109['collection'],'remove',(_0x57294e,_0x45f1dd)=>{this['stopListening'](_0x45f1dd,'escape',_0x4bb42e);});}['_addAnnotationToArchive'](_0x14eefe,_0x2326a2){this['listenTo'](_0x14eefe,'set:isVisible',_0x59f565=>{_0x59f565['return']=!0x1,_0x59f565['stop']();}),this['annotationViews']['add'](_0x14eefe['view'],_0x2326a2);}['_handleNewThread'](_0x235354){const _0x580202=this['editor']['plugins']['get']('CommentsRepository'),_0x5c9915=this['editor']['plugins']['get']('Annotations'),_0xe119c7=this['editor']['config']['get']('collaboration.channelId');if(!_0xe119c7||_0x235354['channelId']===_0xe119c7){const _0x17f823=_0x580202['_threadToController']['get'](_0x235354);if(!_0x17f823)return void this['_pendingThreads']['push'](_0x235354);const _0x262b77=this['_calculatePosition'](_0x235354['archivedAt']),_0x123dfc=_0x5c9915['getByInnerView'](_0x17f823['view']);_0x123dfc['isVisible']&&_0x5c9915['_visibleAnnotations']['remove'](_0x123dfc),this['_addAnnotationToArchive'](_0x123dfc,_0x262b77);}}['_calculatePosition'](_0x31a206){const _0x53fd65=this['editor']['config']['get']('collaboration.channelId'),_0x224c15=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x5f2529=>_0x5f2529['channelId']===_0x53fd65)['findIndex'](_0x1e11e5=>_0x1e11e5['archivedAt']<_0x31a206);return _0x224c15<0x0||_0x224c15>this['annotationViews']['length']?this['annotationViews']['length']:_0x224c15-0x1;}['_toggleDialog'](){const _0x1ea1f5=this['editor'],_0x4cd84a=_0x1ea1f5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x1ea1f5['locale'],this['annotationViews'])),'commentsArchive'===_0x4cd84a['id']?_0x4cd84a['hide']():_0x4cd84a['show']({'id':'commentsArchive','title':N(_0x1ea1f5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x6e7663,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x249e56['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2f5d29,_0x28265e=!0x1){const _0x534706=this['editor']['locale'],_0x312eb2=this['editor']['plugins']['get']('Dialog'),_0x3342f0=new _0x2f5d29(_0x534706);return _0x3342f0['bind']('isEnabled')['to'](this,'isEnabled'),_0x3342f0['bind']('isOn')['to'](_0x312eb2,'id',_0x4d2c1d=>'commentsArchive'===_0x4d2c1d),_0x3342f0['set']({'label':N(_0x534706,'COMMENTS_ARCHIVE'),'icon':_0x6e7663,'isToggleable':!0x0}),_0x28265e&&(_0x3342f0['tooltip']=!0x0),this['listenTo'](_0x3342f0,'execute',()=>this['_toggleDialog']()),_0x3342f0;}['_hideDialogOnAnnotationEscape']=_0x173ea9=>{const _0x3c31b8=_0x173ea9['source'];if(!this['annotationViews']['has'](_0x3c31b8['view']))return;const _0x33a16d=this['editor']['plugins']['get']('Dialog');_0x33a16d['isOpen']&&'commentsArchive'===_0x33a16d['id']&&(_0x33a16d['hide'](),_0x173ea9['stop']());};}class Comments extends _0x383916{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,Comment,CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};