@ckeditor/ckeditor5-comments 48.3.0-alpha.1 → 48.3.0-alpha.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 (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x29bf2e,Context as _0x59fc06,ContextPlugin as _0x41d5ed,Editor as _0x2de2e0,PendingActions as _0x478dcf,Plugin as _0x3d6b36}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x6d6638,Collection as _0x4284a7,DomEmitterMixin as _0x3dfafb,FocusTracker as _0x16deef,KeystrokeHandler as _0x208d02,ObservableMixin as _0x21a2fd,Rect as _0x3d1cc4,diff as _0x37d636,first as _0x214eb1,getEnvKeystrokeText as _0x393c6e,keyCodes as _0xa09830,priorities as _0xa7cdbb,scrollViewportToShowTarget as _0x4c5b31,toUnit as _0x48a5c0,uid as _0x2ff495}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x51d2bf,ConfirmMixin as _0x506786,FOCUS_ANNOTATION_KEYSTROKE as _0x57653d,LateFocusButtonView as _0x1a76a3,LateFocusDropdownButtonView as _0x254c12,UserView as _0x286742,Users as _0x12e146,getAllMarkersDomElementsSorted as _0x4943c8,getDateTimeFormatter as _0x153da0,hashObject as _0xbb7f8f,setupThreadKeyboardNavigation as _0xfba6ca,surroundingMarkersDetector as _0x15978d,trimHtml as _0x588d00}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x25e46d,debounce as _0xb07f85,isEqual as _0x2d7453,set as _0x91f587,throttle as _0x4809c5,unset as _0x1f251b}from'es-toolkit/compat';import{IconAddComment as _0xf9075a,IconCheck as _0x2b117b,IconCommentsArchive as _0x36c51a,IconPencil as _0x2aa1a6,IconRemoveComment as _0x1886b6,IconThreeVerticalDots as _0x4394b5,IconUndo as _0x14b7c8}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x35dc9c,BodyCollection as _0x44c76b,ButtonView as _0x2d6eba,ContextualBalloon as _0x31f7b0,Dialog as _0x1e157e,DialogViewPosition as _0x5207c7,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x21a2fd();var bt=class extends It{['model'];['view'];constructor(_0x1fede1,_0x355e4f){super(),this['model']=_0x1fede1,this['model']['_isAttached']=!0x0,this['view']=_0x355e4f,this['listenTo'](_0x355e4f,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x355e4f,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x355e4f,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x355e4f,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x355e4f,'addComment',(_0x4a62d0,_0x2a472f)=>this['addComment'](_0x2a472f)),this['listenTo'](_0x355e4f,'updateComment',(_0x4b6daf,_0x536a86,_0x4d2be0)=>this['updateComment'](_0x536a86,_0x4d2be0)),this['listenTo'](_0x355e4f,'removeComment',(_0x545696,_0x38194b)=>this['removeComment'](_0x38194b));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3766fb){this['model']['addComment']({'content':_0x3766fb,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x437e14,_0x512c16){this['model']['getComment'](_0x437e14)['update']({'content':_0x512c16});}['removeComment'](_0x3f2593){this['model']['getComment'](_0x3f2593)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x18abb4,_0x33f03c,_0x38dce6){const t=_0x18abb4['t'];switch(_0x33f03c){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'},_0x38dce6);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);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'';}}var kt=class extends it{['main'];['editable'];constructor(_0x3c5d9b,_0xabcd1f){super(_0x3c5d9b);const _0x4b6451=_0x2ff495();this['main']=this['createCollection'](),this['editable']=new st(_0x3c5d9b,_0xabcd1f,void 0x0,{'label':()=>Et(_0x3c5d9b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3c5d9b['uiLanguageDirection'],'lang':_0x3c5d9b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4b6451},'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']();}},Nt=class extends tt{['view'];constructor(_0x24a163){super(_0x24a163),this['view']=new kt(_0x24a163['locale'],_0x24a163['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x428c7b=this['editor']['editing']['view'],_0x2cb1ce=this['view']['editable'];_0x2cb1ce['name']=_0x428c7b['document']['getRoot']()['rootName'],this['view']['render']();const _0x10526c=_0x2cb1ce['element'];this['setEditableElement'](_0x2cb1ce['name'],_0x10526c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x428c7b['attachDomRoot'](_0x10526c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x21a2fd(_0x2de2e0);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x2e8ef4={}){(_0x2e8ef4=Object['assign']({},_0x2e8ef4))['plugins']||(_0x2e8ef4['plugins']=CommentEditor['defaultPlugins']),super(_0x2e8ef4),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0xf3b062=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xf3b062))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x504f53=>{const _0x13c40a=this['model']['document']['getRoot'](),_0x161679=_0x13c40a&&_0x13c40a['getChild'](_0x13c40a['childCount']-0x1);_0x504f53['setSelection'](_0x161679,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e5402=this['editing']['view'],_0x46ab39=_0x3e5402['document']['getRoot'](),_0x1084bf=_0x46ab39['getChild'](0x0);_0x46ab39['childCount']>0x1||!_0x1084bf||'p'!=_0x1084bf['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3e5402,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1084bf['placeholder']=this['placeholder']),ut({'view':_0x3e5402,'element':_0x1084bf,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1084bf);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xe415ee,_0x32d1d4={}){super(_0xe415ee),this['editor']=null,this['_editorConfig']=_0x32d1d4,this['set']('value',_0x32d1d4['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0xe415ee,'Reply...')),this['set']('submitLabel',Et(_0xe415ee,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x208d02(),this['focusTracker']=new _0x16deef(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x222742=>!_0x222742['defaultPrevented']},'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',(_0xf2e8ca,_0x3ef594)=>{this['cancelButtonView']['fire']('execute'),_0x3ef594();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3e79c6,_0x474130)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x474130());}),this['on']('submit',(_0x390bbf,_0x714f53)=>{_0x714f53['length']>0xfde8?(alert(Et(_0xe415ee,'TOO_LONG_COMMENT_ALERT',[_0x714f53['length'],0xfde8])),_0x390bbf['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3b8717=this['editor'];this['element']['insertBefore'](_0x3b8717['ui']['element'],this['element']['firstChild']),_0x3b8717['model']['document']['on']('change',()=>this['value']=_0x3b8717['getData']()),_0x3b8717['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3b8717['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1b107a){-0x1===_0x1b107a?(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:_0x1baa22}=this,_0x3e4ce2=new _0x2d6eba(_0x1baa22);return _0x3e4ce2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3e4ce2['withText']=!0x0,_0x3e4ce2['bind']('label')['to'](this,'submitLabel'),_0x3e4ce2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3e4ce2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5797a4,_0x54b71c)=>!_0x54b71c&&!!_0x5797a4['trim']()),_0x3e4ce2;}['_createCancelButton'](){const {locale:_0xe1a513}=this,_0x2d42e5=new _0x2d6eba(_0xe1a513);return _0x2d42e5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2d42e5['label']=Et(_0xe1a513,'Cancel'),_0x2d42e5['withText']=!0x0,_0x2d42e5['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2d42e5;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x46bcf9=>{this['focusTracker']['add'](_0x46bcf9['element']);}),this['focusables']['on']('change',(_0x1a22b7,_0x3a2677)=>{for(const _0x125708 of Array['from'](_0x3a2677['added'])['reverse']())this['focusTracker']['add'](_0x125708['element']);});}},xt=class extends ht{constructor(_0x34bd44,_0x1c7320,_0x34b5a9){super(_0x34bd44),this['commentInputView']=new St(_0x34bd44,_0x34b5a9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x220359,_0x4344dd)=>_0x220359||!!_0x4344dd),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 _0x286742(_0x34bd44,_0x1c7320),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'](_0x426673){this['commentInputView']['focus'](_0x426673);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3e20fc,_0x2abecd)=>{const {submitButtonView:_0x3f9b69,cancelButtonView:_0x237f87,editor:_0x5db4b5}=this['commentInputView'];[_0x3f9b69['element'],_0x237f87['element'],_0x5db4b5?_0x5db4b5['editing']['view']['getDomRoot']():null]['filter'](_0x59778c=>_0x59778c)['some'](_0x9d9473=>_0x9d9473['contains'](_0x2abecd['target']))||(this['focus'](),_0x2abecd['preventDefault']());});}},Pt=class extends ht{constructor(_0x401e6b){super(_0x401e6b);const _0x2867e7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2867e7['to']('count',_0x2ccf9e=>Et(_0x401e6b,'NUMBER_OF_COMMENTS',_0x2ccf9e))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5e47be,_0x58095d,_0x3e35f4){super(_0x5e47be);const _0x838e26=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x58095d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x58095d,this['_config']=_0x3e35f4,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1fc4c7=>this['commentViews']['map'](_0x4fb36a=>_0x4fb36a['element'])['includes'](_0x1fc4c7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x5e47be),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xc2f989=>_0xc2f989-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1830ea of _0x58095d['comments'])this['_handleNewCommentModel'](_0x1830ea);this['_handleInfoComment'](),this['listenTo'](_0x58095d['comments'],'add',(_0x48c74a,_0x413587)=>{const _0x1b042d=this['_calculatePosition'](_0x413587);this['length']++,this['_handleNewCommentModel'](_0x413587,_0x1b042d),this['refreshVisibleViews']();}),this['listenTo'](_0x58095d['comments'],'remove',(_0x43ddca,_0x5d9909)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5d9909),this['refreshVisibleViews']();}),this['listenTo'](_0x58095d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x58095d,'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',_0x838e26['if']('length','ck-hidden',_0x4ee26a=>!_0x4ee26a)],'aria-label':Et(_0x5e47be,'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'](_0x826de9){-0x1===_0x826de9?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xa62839 of this['commentViews'])_0xa62839['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x13d42c,_0xc90196){const _0x46ab22=new this['_config']['CommentView'](this['locale'],_0x13d42c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x46ab22['viewUid']=_0x13d42c['id'],_0x46ab22['delegate']('removeComment')['to'](this),_0x46ab22['delegate']('updateComment')['to'](this),_0x46ab22['delegate']('resolveCommentThread')['to'](this),_0x46ab22['delegate']('editorReady')['to'](this),_0x46ab22['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x46ab22,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x46ab22,_0xc90196);}['_calculatePosition'](_0x1d85db){const _0x37fe62=this['_model']['_findOptimalIndex'](_0x1d85db);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1d85db['authoredAt']?_0x37fe62-0x1:_0x37fe62:_0x37fe62-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x8ef611={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x8ef611,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x8ef611));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x538feb){const _0x2ab9a4=this['commentViews']['remove'](_0x538feb['id']);this['stopListening'](_0x2ab9a4),_0x2ab9a4['isEditMode']&&this['_updateHasDirtyComment'](),_0x2ab9a4['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x537c85=>_0x537c85['isEditMode']);}['_rearrangeCollapse'](){const _0x1b2c3b=function(_0x3b3453){const _0x3ffdc2=new _0x4284a7();for(const _0x3b9f05 of _0x3b3453)_0x3ffdc2['add'](_0x3b9f05);return _0x3ffdc2;}(this['commentViews']),_0x270316=this['_collapsedCommentsView']['count'];for(let _0x262dfe=0x1;_0x262dfe<=_0x270316;_0x262dfe++)_0x1b2c3b['remove'](0x1);for(const _0xd0b1df of _0x1b2c3b)_0xd0b1df['collapse']();_0x270316>0x0&&_0x1b2c3b['add'](this['_collapsedCommentsView'],0x1),Dt(_0x37d636(Array['from'](this['visibleViews']),Array['from'](_0x1b2c3b)),this['visibleViews'],_0x1b2c3b);}['_rearrangeExpand'](){Dt(_0x37d636(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3ea755 of this['visibleViews'])_0x3ea755['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1c5760=>{this['focusTracker']['add'](_0x1c5760['element']),this['keystrokes']['listenTo'](_0x1c5760['element']);}),this['commentViews']['on']('change',(_0x35768e,_0x3793a4)=>{for(const _0x562d72 of _0x3793a4['removed'])this['focusTracker']['remove'](_0x562d72['element']),this['keystrokes']['stopListening'](_0x562d72['element']);for(const _0x215b27 of Array['from'](_0x3793a4['added'])['reverse']())this['focusTracker']['add'](_0x215b27['element']),this['keystrokes']['listenTo'](_0x215b27['element']);});}};function Dt(_0x3aad7d,_0xb8bb84,_0x24e78a){let _0x45c53e=0x0;for(const _0x44d964 of _0x3aad7d)switch(_0x44d964){case'insert':_0xb8bb84['add'](_0x24e78a['get'](_0x45c53e),_0x45c53e),_0x45c53e++;break;case'delete':_0xb8bb84['remove'](_0x45c53e);break;case'equal':_0x45c53e++;}}var Vt=class extends ht{constructor(_0x2cba1a){super(_0x2cba1a);const _0x38c717=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x38c717['to']('contextValue',_0x22ebe5=>Et(_0x2cba1a,'THREAD_CONTEXT_LABEL',_0x22ebe5)),'tabindex':-0x1},'children':[{'text':_0x38c717['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x533861,_0x5d77fb){super(_0x533861);const _0x2dcf9a=this['bindTemplate'];this['_model']=_0x5d77fb,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x52751c=>!!_0x52751c),this['bind']('contextValue')['to'](this['_model'],'context',_0x3ba309=>_0x3ba309&&_0x3ba309['value']?this['_trimContextValue'](_0x3ba309['value']):Et(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',_0x2dcf9a['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 _0x35bb03=new _0x2d6eba(this['locale']);return _0x35bb03['label']=Et(this['locale'],'Reopen'),_0x35bb03['tooltip']=Et(this['locale'],'Reopen'),_0x35bb03['icon']=_0x14b7c8,_0x35bb03['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5ec666=>!_0x5ec666),_0x35bb03['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3f9265,_0x393351)=>_0x3f9265&&_0x393351),_0x35bb03['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x35bb03;}['_trimContextValue'](_0x16d37e){if(_0x16d37e['length']<0x96)return _0x16d37e;const _0x1b4d2d=_0x16d37e['lastIndexOf']('\x20',0x93);return _0x16d37e['substring'](0x0,_0x1b4d2d>-0x1?_0x1b4d2d:0x93)+'...';}['_attachContextActions'](){const _0x3bd4ae=this['element']['querySelector']('.ck-context'),_0x3d89e1=_0x3bd4ae['querySelector']('.ck-context__value');this['listenTo'](_0x3bd4ae,'mouseenter',()=>{_0x3d89e1['offsetWidth']<_0x3d89e1['scrollWidth']&&_0x3bd4ae['classList']['add']('overlay');}),this['listenTo'](_0x3bd4ae,'mouseleave',()=>{_0x3bd4ae['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x466f96 of this['focusables'])this['focusTracker']['add'](_0x466f96['element']),this['keystrokes']['listenTo'](_0x466f96['element']);}['_createContextView'](){const _0x219a03=new Vt(this['locale']);return _0x219a03['bind']('contextValue')['to'](this),_0x219a03;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x582b9c,_0x2caab5,_0x4698c5,_0x6c1694){super(_0x582b9c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2caab5,this['_localUser']=_0x4698c5,this['_config']=_0x6c1694,this['commentThreadHeaderView']=new Bt(_0x582b9c,_0x2caab5),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x51d2bf(_0x582b9c,Et(_0x582b9c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x582b9c,_0x2caab5,Object['assign']({'CommentView':this['_config']['CommentView']},_0x6c1694)),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',(_0x263b43,_0x27b65e)=>_0x263b43||!!_0x27b65e),this['bind']('isUnlinked')['to'](_0x2caab5,'unlinkedAt',_0x26c139=>!!_0x26c139);let _0x4513b4=null;const _0x374d66=()=>{const _0x5a61a9=this['_model']['comments']['first']||null;_0x5a61a9!==_0x4513b4&&(_0x4513b4&&this['stopListening'](_0x4513b4,'change:content'),_0x4513b4=_0x5a61a9,_0x5a61a9&&this['listenTo'](_0x5a61a9,'change:content',_0x374d66));const _0x2f1d1e=_0x5a61a9?_0x5a61a9['author']['name']:this['_localUser']['name'],_0x45a7f7=_0x5a61a9?new DOMParser()['parseFromString'](_0x588d00(_0x5a61a9['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x4cef1d=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x2f1d1e]);this['set']('ariaLabel',_0x45a7f7?_0x4cef1d+'\x20'+_0x45a7f7:_0x4cef1d);};this['listenTo'](this['_model']['comments'],'change',_0x374d66),_0x374d66(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f85c7=>_0x4f85c7['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xfba6ca(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb3b944=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x103624=_0xb3b944['commentInputView'];return _0xb3b944['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x103624,'value',(_0x17c476,_0x560701,_0x4d4737,_0x470500,_0xf1208c)=>!!_0xf1208c||!!_0x470500&&_0x4d4737&&!_0x560701||_0x17c476&&_0x4d4737&&!_0x560701),_0x103624['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3b7db4,_0x4aa7af,_0x5d9844)=>{let _0x1a06ac;return _0x1a06ac=_0x5d9844&&_0x4aa7af?'Reply\x20to\x20reopen\x20discussion...':_0x3b7db4?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1a06ac);}),_0x103624['bind']('submitLabel')['to'](this,'length',_0x2c5620=>Et(this['locale'],_0x2c5620?'Reply':'Comment')),_0x103624['on']('submit',(_0x42b378,_0x4e9243)=>{this['fire']('addComment',_0x4e9243),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x103624['on']('cancel',()=>{this['focus']();}),_0x103624['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x103624['on']('cancel',_0xa247e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xa247e['stop']());}),this['on']('change:isActive',(_0x8e5619,_0x2214c4,_0x4c5bd8)=>{_0x4c5bd8||this['length']||_0x103624['value']||this['fire']('removeCommentThread');}),_0xb3b944;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x506786(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2a8e17,_0x19014f,_0x5ce1f6,_0x11927e){super(_0x2a8e17,_0x19014f,_0x5ce1f6,_0x11927e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2a8e17,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x54ad05,_0x347e80,_0x24e84b)=>{_0x24e84b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x120f06,_0x51a0b2,_0x18d594)=>{_0x18d594&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x44aef5=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x44aef5['if']('isActive','ck-thread--active'),_0x44aef5['if']('isUnlinked','ck-thread--unlinked'),_0x44aef5['to']('actionIndicator',_0x403db3=>_0x403db3?'ck-thread--'+_0x403db3:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x44aef5['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 _0x31e603 of this['commentsListView']['commentViews'])_0x31e603['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x397c8d}=this,_0x3d9efc=this['commentsListView']['commentViews']['get'](0x0);_0x3d9efc===this['_boundFirstCommentView']||_0x3d9efc['isSystemComment']||(this['_boundFirstCommentView']=_0x3d9efc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3d9efc,'actionIndicator',_0x3e170e=>'remove'===_0x3e170e?'remove':null),_0x3d9efc['placeholder']=Et(_0x397c8d,'Write\x20a\x20comment...'),_0x3d9efc['removeButton']['on']('execute',_0x28f439=>{_0x28f439['stop'](),this['showConfirm'](Et(_0x397c8d,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3d9efc['focus']();}),_0x3d9efc['actionBar']['add'](this['resolveButton'],0x0),_0x3d9efc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x327059=new _0x1a76a3(this['locale']);return _0x327059['label']=Et(this['locale'],'Resolve'),_0x327059['tooltip']=Et(this['locale'],'Resolve'),_0x327059['icon']=_0x2b117b,_0x327059['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x327059['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2f60fe=>!_0x2f60fe),_0x327059['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x275d58,_0x43ac32)=>_0x275d58&&!_0x43ac32),_0x327059['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x327059;}['_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']));}},Wt=class extends ht{constructor(_0x3ba9e8){super(_0x3ba9e8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1e1903,_0x3e13ae,_0x17263f)=>{this['element']['innerHTML']=_0x17263f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3750ae,_0x50385e,_0x48e0d9){super(_0x3750ae),this['_model']=_0x50385e,this['_config']=_0x48e0d9,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x50385e,'content',_0x50385e,'authoredAt',(_0x2a0ec5,_0x38fc0f)=>Et(_0x3750ae,'COMMENT_ARIA_LABEL',[_0x50385e['author']['name'],_0x48e0d9['formatDateTime'](_0x38fc0f),new DOMParser()['parseFromString'](_0x2a0ec5,'text/html')['body']['textContent'],_0x50385e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x51d2bf(_0x3750ae,Et(_0x3750ae,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x434e19=>_0x434e19['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5a3f1a=new Wt(this['locale']);return _0x5a3f1a['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x202296,_0x264b35)=>_0x264b35?_0x588d00(_0x202296,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x202296),_0x5a3f1a;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xc5da3a=new St(this['locale'],this['_config']['editorConfig']);return _0xc5da3a['value']=this['_model']['content'],_0xc5da3a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xc5da3a['submitLabel']=Et(this['locale'],'Save'),_0xc5da3a['on']('submit',(_0x16ef22,_0x341e39)=>{this['fire']('updateComment',this['_model']['id'],_0x341e39),this['switchToDisplayMode'](),this['focus']();}),_0xc5da3a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xc5da3a['once']('editorReady',()=>{_0xc5da3a['focus']();}),_0xc5da3a['createEditor'](),_0xc5da3a['delegate']('editorReady')['to'](this),_0xc5da3a['delegate']('editorDestroyed')['to'](this),_0xc5da3a;}['_setupKeyboardNavigation'](){const _0x1cdb24=this['element'];this['keystrokes']['listenTo'](_0x1cdb24);for(const _0x1dcdaf of this['focusables'])this['focusTracker']['add'](_0x1dcdaf['element']),this['keystrokes']['listenTo'](_0x1dcdaf['element']);this['focusables']['on']('change',(_0x110ff5,_0x922d5)=>{for(const _0x54f3da of _0x922d5['removed'])this['focusTracker']['remove'](_0x54f3da['element']),this['keystrokes']['stopListening'](_0x54f3da['element']);for(const _0x2b2e7c of _0x922d5['added'])this['focusTracker']['add'](_0x2b2e7c['element']),this['keystrokes']['listenTo'](_0x2b2e7c['element']);}),this['keystrokes']['set']('enter',(_0x14b1d2,_0x1b4dd5)=>{_0x1cdb24===_0x14b1d2['target']&&(this['focusCycler']['focusFirst'](),_0x1b4dd5());}),this['keystrokes']['set']('esc',(_0x24329b,_0x5b0a39)=>{_0x1cdb24!==_0x24329b['target']&&(this['focus'](),_0x5b0a39());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x506786(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x3bcc17,_0xf11fbf,_0xddbf9){super(_0x3bcc17,_0xf11fbf,_0xddbf9),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3bcc17,'Reply...')),this['bind']('authoredAt')['to'](_0xf11fbf),this['bind']('resolvedAt')['to'](_0xf11fbf),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 _0x286742(_0x3bcc17,_0xf11fbf['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xf11fbf,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1b9b01=this['bindTemplate'],_0x343d40=[{'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':_0x1b9b01['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1b9b01['to']('authoredAt',_0x4a176f=>this['_config']['formatDateTime'](_0x4a176f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1b9b01['if']('isEditMode','ck-comment__actions--hidden'),_0x1b9b01['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']&&_0x343d40['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1b9b01['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1b9b01['if']('isEditMode','ck-comment--edit'),_0x1b9b01['if']('isSystemComment','ck-comment--info'),_0x1b9b01['to']('actionIndicator',_0x3d57e3=>_0x3d57e3?'ck-comment--'+_0x3d57e3:'')],'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':_0x343d40}]}]};}['_createEditButton'](){const _0x4b8163=new _0x2d6eba(this['locale']);return _0x4b8163['label']=Et(this['locale'],'Edit'),_0x4b8163['icon']=_0x2aa1a6,_0x4b8163['withText']=!0x0,_0x4b8163['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4b8163['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ae587=>!_0x3ae587),_0x4b8163['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4b8163['on']('execute',()=>this['switchToEditMode']()),_0x4b8163;}['_createRemoveButton'](){const _0x47c45d=new _0x2d6eba(this['locale']);return _0x47c45d['label']=Et(this['locale'],'Remove'),_0x47c45d['icon']=_0x1886b6,_0x47c45d['withText']=!0x0,_0x47c45d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x47c45d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2de6d1=>!_0x2de6d1),_0x47c45d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x47c45d['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x47c45d;}['_createDropdown'](){const _0xea68de=ct(this['locale'],_0x254c12),_0x4784eb=_0xea68de['panelView']['children'],_0x322c96=new ot(this['locale']),_0x4ab01a=_0xea68de['bindTemplate'];dt(_0xea68de,()=>this['items']['find'](_0x3851f2=>_0x3851f2['isVisible'])),_0xea68de['extendTemplate']({'attributes':{'class':[_0x4ab01a['if']('isVisible','ck-hidden',_0x2bf4ee=>!_0x2bf4ee)]}});const _0x4eddcf=(_0x861f53,_0x31d2f2=-0x1)=>{const _0x15f6c7=new nt(this['locale']);_0x15f6c7['children']['add'](_0x861f53);const _0x47073c=_0x31d2f2>-0x1?_0x31d2f2:_0x322c96['items']['length'];_0x322c96['items']['add'](_0x15f6c7,_0x47073c);const _0x29f6a5=Array['from'](this['items']);_0xea68de['unbind']('isEnabled','isVisible'),_0xea68de['bind']('isEnabled')['toMany'](_0x29f6a5,'isEnabled',(..._0x16e6bc)=>_0x16e6bc['some'](_0x118743=>_0x118743)),_0xea68de['bind']('isVisible')['toMany'](_0x29f6a5,'isVisible',(..._0x4e8c9e)=>_0x4e8c9e['some'](_0x53e41b=>_0x53e41b));};_0xea68de['panelPosition']='sw',_0xea68de['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4394b5});for(const _0x4078ba of this['items'])_0x4eddcf(_0x4078ba);return _0x4784eb['add'](_0x322c96),_0xea68de['listenTo'](this['items'],'add',(_0x15cb58,_0x3bbe1f,_0x5d07c3)=>{_0x4eddcf(_0x3bbe1f,_0x5d07c3);}),_0xea68de['listenTo'](this['items'],'remove',(_0x30818e,_0x2b33dc,_0x4623da)=>{_0x322c96['items']['remove'](_0x4623da);}),_0xea68de;}['_attachActions'](_0x16a79c,_0x523f85){const _0x53d510=_0x16a79c&&_0x16a79c['element'];_0x53d510&&(this['listenTo'](_0x53d510,'mouseenter',()=>this['actionIndicator']=_0x523f85),this['listenTo'](_0x53d510,'focus',()=>this['actionIndicator']=_0x523f85),this['listenTo'](_0x53d510,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x53d510,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1c7ab6=super['_createCommentInputView']();return _0x1c7ab6['bind']('placeholder')['to'](this),_0x1c7ab6;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x477137){const _0x5542f0=_0x4809c5(_0x477137,0x1e),_0x37beb7=new MutationObserver(_0xb46eec=>{for(const _0xa7c77f of _0xb46eec)('attributes'==_0xa7c77f['type']&&'class'==_0xa7c77f['attributeName']||'childList'==_0xa7c77f['type']||'characterData'==_0xa7c77f['type'])&&_0x5542f0();});return{'attach'(_0x394e45){_0x37beb7['observe'](_0x394e45,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x37beb7['disconnect'](),_0x5542f0['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x525a7d,_0x81bc50){super(_0x525a7d),this['id']=_0x2ff495(),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['keystrokes']['set']('Esc',(_0x38b161,_0x179f48)=>this['fire']('Esc',_0x179f48)),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'](_0x81bc50),this['mainView']=_0x81bc50;const _0x1dc3c3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1dc3c3['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 _0x4a1cf2=this['element']['clientHeight'];_0x4a1cf2&&(this['height']=_0x4a1cf2);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x21a2fd();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x209a9e,target:_0x40a99c,type:_0x23405b,isVisible:_0x386024=!0x0}){super(),this['view']=_0x209a9e,this['view']['element']||this['view']['render'](),this['_type']=_0x23405b,this['_target']=_0x40a99c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4284a7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2e1581,_0x4eb506)=>{this['view']['focusTracker']['add'](_0x4eb506);}),this['focusableElements']['on']('remove',(_0x332b0c,_0x36b584)=>{this['view']['focusTracker']['remove'](_0x36b584);}),this['set']('isVisible',_0x386024);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d2801=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x2d2801),_0x2d2801;}get['targetRect'](){const _0x1db089=this['target'];if(null===_0x1db089)return null;if(_0x1db089 instanceof _0x3d1cc4)return _0x1db089;const _0x32d998=_0x1db089['filter'](_0x2514e=>function(_0x8f88e6){return!!_0x8f88e6['offsetParent']||!!_0x8f88e6['getClientRects']()['item'](0x0);}(_0x2514e));return 0x0===_0x32d998['length']?null:_0x3d1cc4['getDomElementRects'](_0x32d998[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x205542){this['view']['isActive']=_0x205542,this['view']['mainView']['isActive']=_0x205542;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x222ece){if(!(null===_0x222ece||_0x222ece instanceof _0x3d1cc4||Array['isArray'](_0x222ece)&&_0x222ece['every'](_0x57f55b=>zt(_0x57f55b))))throw new _0x6d6638('annotation-invalid-target',null,{'target':_0x222ece});}['_getNormalizedTarget'](){const _0x1d513a='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x1d513a)?[_0x1d513a]:_0x1d513a;}};function zt(_0x1a322e){return null!==_0x1a322e&&'object'==typeof _0x1a322e&&'nodeType'in _0x1a322e&&0x1===_0x1a322e['nodeType'];}var Jt=class extends _0x4284a7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x50544=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x16deef(),this['_focusTracker']['on']('change:isFocused',(_0x3b53db,_0x46be78,_0x2de3aa)=>{_0x2de3aa||this['fire']('blur');});for(const _0x48e177 of _0x50544)this['add'](_0x48e177);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x885df){if(this['has'](_0x885df))throw new _0x6d6638('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x885df['innerView'],_0x885df),this['_viewToAnnotation']['set'](_0x885df['view'],_0x885df);for(const _0x238a46 of _0x885df['focusableElements'])this['_focusTracker']['add'](_0x238a46);if(this['listenTo'](_0x885df['focusableElements'],'add',(_0x55aac5,_0x2ea8d7)=>{this['_focusTracker']['add'](_0x2ea8d7);}),this['listenTo'](_0x885df['focusableElements'],'remove',(_0x19ae73,_0x4b56d6)=>{this['_focusTracker']['remove'](_0x4b56d6);}),this['listenTo'](_0x885df['view']['focusTracker'],'change:isFocused',(_0x4bc9c8,_0x44f0de,_0x2fb88f)=>{_0x2fb88f&&this['fire']('focus',_0x885df);}),_0x885df['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x17a317 of this)_0x17a317['updateTargetRect']();}const _0x4adf05=this['_getOrderInContent'](_0x885df['view']['targetRect']);return super['add'](_0x885df,_0x4adf05);}['remove'](_0x663378){if(!this['has'](_0x663378))throw new _0x6d6638('annotationcollection-not-existing-item',null);this['stopListening'](_0x663378['view']['focusTracker']),this['stopListening'](_0x663378['focusableElements']);for(const _0x4e579d of _0x663378['focusableElements'])this['_focusTracker']['remove'](_0x4e579d);return this['_viewToAnnotation']['delete'](_0x663378['view']),this['_innerViewToAnnotation']['delete'](_0x663378['innerView']),super['remove'](_0x663378);}['getByInnerView'](_0x34cc00){return this['_innerViewToAnnotation']['get'](_0x34cc00);}['getByView'](_0x484754){return this['_viewToAnnotation']['get'](_0x484754);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x54f9c8 of this)_0x54f9c8['updateTargetRect']();this['_sort']();}['_sort'](){const _0x7047ad=Array['from'](this)['sort']((_0x3318ef,_0x593d39)=>Zt(_0x3318ef['view']['targetRect'],_0x593d39['view']['targetRect']));for(let _0x4d5869=_0x7047ad['length']-0x1;_0x4d5869>0x0;_0x4d5869--){const _0x2e02fb=_0x7047ad[_0x4d5869];_0x4d5869!==this['getIndex'](_0x2e02fb)&&(this['remove'](_0x2e02fb),this['add'](_0x2e02fb));}}['_getOrderInContent'](_0x4d6792){let _0x31843d=0x0;if(!_0x4d6792)return this['length'];for(const _0x2c7bf0 of this){const _0x1295e1=_0x2c7bf0['view']['targetRect'];if(_0x1295e1){if(Zt(_0x4d6792,_0x1295e1)<0x0)return _0x31843d;_0x31843d++;}}return _0x31843d;}['_areCachedRectsStale'](){const _0x4424d4=this['get'](0x0);if(!_0x4424d4)return!0x1;const _0x4b83e9=_0x4424d4['view']['targetRect'],_0x9f1402=_0x4424d4['targetRect'];return!(!_0x4b83e9||!_0x9f1402)&&(_0x4b83e9['top']!==_0x9f1402['top']||_0x4b83e9['left']!==_0x9f1402['left']);}};function Qt({source:_0x1a3f49,target:_0x3027a4,filter:_0x5be5f1}){for(const _0x5020ba of _0x1a3f49)_0x5be5f1(_0x5020ba)&&_0x3027a4['add'](_0x5020ba);_0x3027a4['listenTo'](_0x1a3f49,'add',(_0x2fc5ca,_0x3bebf5)=>{_0x5be5f1(_0x3bebf5)&&_0x3027a4['add'](_0x3bebf5);}),_0x3027a4['listenTo'](_0x1a3f49,'remove',(_0x4a6292,_0x27222d)=>{_0x3027a4['has'](_0x27222d)&&_0x3027a4['remove'](_0x27222d);});}function Zt(_0x30f443,_0x49842b){if(null===_0x30f443&&null===_0x49842b)return 0x0;if(null===_0x30f443)return-0x1;if(null===_0x49842b)return 0x1;const _0x1787a9=_0x30f443['top']-_0x49842b['top'];return 0x0==_0x1787a9?_0x30f443['left']-_0x49842b['left']:_0x1787a9;}var ti=class extends _0x41d5ed{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3843f6){if(super(_0x3843f6),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3843f6 instanceof _0x2de2e0){const _0x49d74c=_0x3843f6['locale'];_0x3843f6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3c18c7){this['collection']['add'](_0x3c18c7);}['remove'](_0x54d1d3){this['collection']['remove'](_0x54d1d3),_0x54d1d3['destroy']();}['refreshVisibility'](){for(const _0x39c334 of this['collection'])_0x39c334['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4b936e){return this['collection']['getByInnerView'](_0x4b936e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x38c2e8 of this['collection'])_0x38c2e8['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4d1cd0){this['fire']('_activateAnnotation',_0x4d1cd0);}['createAnnotation'](_0x3a87bb){return new $t(_0x3a87bb);}['createAnnotationView'](_0x11970f,_0x5e4897){return new qt(_0x11970f,_0x5e4897);}['_addActiveAnnotation'](_0x29ba48){const _0x482a26=new Set(this['activeAnnotations']);_0x482a26['add'](_0x29ba48),this['activeAnnotations']=_0x482a26;}['_removeActiveAnnotation'](_0x3da77b){const _0xb643ee=new Set(this['activeAnnotations']);_0xb643ee['delete'](_0x3da77b),this['activeAnnotations']=_0xb643ee;}['_bindAnnotationsToVisibleAnnotations'](){const _0xa8937c=this['collection'],_0x132f3d=this['_visibleAnnotations'];function _0x599dfb(_0x131940){const _0x57f091=_0x131940['source'];_0x57f091['isVisible']&&!_0x132f3d['has'](_0x57f091)?_0x132f3d['add'](_0x57f091):!_0x57f091['isVisible']&&_0x132f3d['has'](_0x57f091)&&_0x132f3d['remove'](_0x57f091),_0x57f091['view']['focusTracker']['remove'](_0x57f091['view']['element']),_0x57f091['view']['focusTracker']['add'](_0x57f091['view']['element']);}this['listenTo'](_0xa8937c,'add',(_0x25b0af,_0x53e8ab)=>{_0x53e8ab['isVisible']&&_0x132f3d['add'](_0x53e8ab),this['listenTo'](_0x53e8ab,'change:isVisible',_0x599dfb);}),this['listenTo'](_0xa8937c,'remove',(_0x5af4aa,_0x1b3167)=>{_0x132f3d['has'](_0x1b3167)&&_0x132f3d['remove'](_0x1b3167),this['stopListening'](_0x1b3167,'change:isVisible',_0x599dfb);});}['_setupEnterAnnotationKeystroke'](){const _0xda9326=_0x19fb3e=>{_0x19fb3e['on']('ready',()=>{_0x19fb3e['keystrokes']['set'](_0x57653d,(_0x377241,_0x464818)=>{const _0x2feca9=_0x214eb1(this['activeAnnotations']['values']());_0x2feca9&&(_0x2feca9['view']['focus'](),_0x464818());});});};this['context']instanceof _0x2de2e0?_0xda9326(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x26618f,_0xc782f8)=>{_0xda9326(_0xc782f8);});}['_setupEscapeAnnotationHandling'](){const _0x363a5b=_0x55ff22=>{const _0x55edee=_0x55ff22['source'],_0x64fc08=[];let _0xe2cf9b;if(Array['isArray'](_0x55edee['target'])){_0xe2cf9b=_0x55edee['target'][0x0],this['context']instanceof _0x2de2e0?_0x64fc08['push'](this['context']):this['context']['editors']&&_0x64fc08['push'](...this['context']['editors']);for(const _0x30dde7 of _0x64fc08)for(const _0x420fd6 of _0x30dde7['editing']['view']['domRoots']['values']())if(_0x420fd6['contains'](_0xe2cf9b))return void _0x30dde7['editing']['view']['focus']();_0xe2cf9b['focus']();}};this['listenTo'](this['collection'],'add',(_0x29694c,_0x370667)=>{this['listenTo'](_0x370667,'escape',_0x363a5b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x371e6b,_0x102bff)=>{this['stopListening'](_0x102bff,'escape',_0x363a5b);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x21a2fd(),ni=/* #__PURE__ -- @preserve */
31
- _0x21a2fd();var oi=class extends _0x41d5ed{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x478dcf,_0x12e146];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f3f4b){super(_0x1f3f4b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4ff595=this['context']['config'];_0x4ff595['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4ff595['define']('comments.maxThreadTotalWeight',0x1f4),_0x4ff595['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4ff595['define']('comments.CommentThreadView',Ut),_0x4ff595['define']('comments.CommentView',Yt),_0x4ff595['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xe6902b=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3bbbe0,_0xc5e4d0)=>this['_addCommentThread'](_0xc5e4d0)),this['on']('submitCommentThread',(_0x2c07e5,_0x564f2e)=>this['_submitCommentThread'](_0x564f2e)),this['on']('resolveCommentThread',(_0x505657,_0x22e9d8)=>this['_resolveCommentThread'](_0x22e9d8)),this['on']('resolveCommentThread',(_0x40b1bb,_0xee002d)=>this['_updateActiveAnnotation'](_0xee002d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x345091,_0xa4aaf9)=>this['_reopenCommentThread'](_0xa4aaf9)),this['on']('reopenCommentThread',(_0x4c6bbc,_0x477ec1)=>this['_updateActiveAnnotation'](_0x477ec1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3c8042,_0x3becf8)=>this['_removeCommentThread'](_0x3becf8)),this['on']('updateCommentThread',(_0x2da52e,_0x5bf207)=>this['_updateCommentThread'](_0x5bf207)),this['on']('updateCommentThread',(_0x18283d,_0x361fb5)=>this['_updateActiveAnnotation'](_0x361fb5),{'priority':'lowest'}),this['on']('addComment',(_0x429c85,_0x3e6d5a)=>this['_addComment'](_0x3e6d5a)),this['on']('updateComment',(_0x1c2100,_0x737013)=>this['_updateComment'](_0x737013)),this['on']('removeComment',(_0x3f66a7,_0x48a878)=>this['_removeComment'](_0x48a878)),this['on']('addComment',(_0x44a066,{threadId:_0x4edce5,isFromAdapter:_0x1baaa4})=>{if(_0x1baaa4)return;const _0xbf6fe9=this['getCommentThread'](_0x4edce5),_0x7b70b6=_0xbf6fe9&&this['_threadToController']['get'](_0xbf6fe9);_0x7b70b6&&_0x7b70b6['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xe6902b,'change:activeAnnotations',(_0x343e0a,_0x2a2020,_0x4db876)=>{const _0x5cef97=Array['from'](_0x4db876)['map'](_0x1107cf=>this['_viewToController']['get'](_0x1107cf['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5cef97?_0x5cef97['model']:null;});}set['adapter'](_0xecb3c2){if(this['_adapter'])throw new _0x6d6638('commentsrepository-adapter-already-set');this['_adapter']=_0xecb3c2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4d1f7e=ii,threadId:_0x21af34=_0x2ff495(),comments:_0x5216b6=[],unlinkedAt:_0x210d6e=null,resolvedAt:_0x1d8633=null,resolvedBy:_0x3d5135=null,target:_0x2e2c65=null,context:_0x428b53=null,attributes:_0x1d8608={},isResolvable:_0x32ecdb=!0x0,isSubmitted:_0xd34ff0=!0x1,isFromAdapter:_0x2abd51=!0x1}={}){return this['fire'](ai('addCommentThread',_0x4d1f7e),{'channelId':_0x4d1f7e,'threadId':_0x21af34,'comments':_0x5216b6,'unlinkedAt':_0x210d6e,'resolvedAt':_0x1d8633,'resolvedBy':_0x3d5135,'target':_0x2e2c65,'context':_0x428b53,'attributes':_0x1d8608,'isFromAdapter':_0x2abd51,'isResolvable':_0x32ecdb,'isSubmitted':_0xd34ff0}),this['getCommentThread'](_0x21af34);}['openNewCommentThread']({channelId:_0x454fea=ii,threadId:_0x27df12=_0x2ff495(),target:_0x204ac9,context:_0x2f5b72=null,isResolvable:_0x60f394=!0x0}){if(this['_readOnlyChannels']['has'](_0x454fea)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x204ac9)throw new _0x6d6638('commentsrepository-missing-target');const _0x5c9af9=this['addCommentThread']({'channelId':_0x454fea,'threadId':_0x27df12,'target':_0x204ac9,'context':_0x2f5b72,'isResolvable':_0x60f394});if(!_0x5c9af9)return null;const _0x598304=this['_threadToController']['get'](_0x5c9af9),_0x54c92c=_0x598304['view']['commentThreadInputView']['commentInputView'],_0x26e9a1=this['context']['plugins']['get'](ti),_0x36d825=_0x26e9a1['getByInnerView'](_0x598304['view']);return _0x26e9a1['activate'](_0x36d825),_0x54c92c['once']('editorReady',()=>_0x54c92c['focus']()),_0x5c9af9;}['hasCommentThread'](_0x328e25){if('string'!=typeof _0x328e25)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x328e25);}['updateCommentThread']({channelId:_0x347797=ii,threadId:_0x57c796,context:_0x3079e0,unlinkedAt:_0x2100e8,attributes:_0xfd2d71,isFromAdapter:_0x1af4fc=!0x1}){return this['fire'](ai('updateCommentThread',_0x347797),{'channelId':_0x347797,'threadId':_0x57c796,'context':_0x3079e0,'unlinkedAt':_0x2100e8,'attributes':_0xfd2d71,'isFromAdapter':_0x1af4fc}),this['getCommentThread'](_0x57c796);}['getCommentThread'](_0x51ed8c){if('string'!=typeof _0x51ed8c)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x51ed8c);}['fetchCommentThread']({channelId:_0x44f3b3,threadId:_0x1cd5b3}={}){const _0x16b93a=this['getCommentThread'](_0x1cd5b3);if(_0x16b93a)return Promise['resolve'](_0x16b93a);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x6d6638('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44f3b3,'threadId':_0x1cd5b3})['then'](_0x3e547d=>this['hasCommentThread'](_0x1cd5b3)?this['getCommentThread'](_0x1cd5b3):_0x3e547d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44f3b3},_0x3e547d)):void 0x0)['catch'](_0x51525c=>{throw console['error'](_0x51525c),new _0x6d6638('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1f0fd8,skipNotAttached:_0x57762f=!0x1,skipEmpty:_0x24f896=!0x1,toJSON:_0x107499=!0x1}={}){const _0x4e983b=[];for(const _0x152c15 of this['_threads']['values']())_0x1f0fd8&&_0x152c15['channelId']!==_0x1f0fd8||_0x57762f&&!_0x152c15['isAttached']||_0x24f896&&0x0===_0x152c15['length']||_0x4e983b['push'](_0x152c15);return _0x107499?_0x4e983b['map'](_0x573d9=>_0x573d9['toJSON']()):_0x4e983b;}['getAnnotationForCommentThread'](_0x2d1a9f){const _0x3459fe=this['_threadToController']['get'](_0x2d1a9f);return _0x3459fe&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x3459fe['view'])||null;}['getCommentThreadForAnnotation'](_0x51a82e){const _0x372daa=this['_viewToController']['get'](_0x51a82e['innerView']);return _0x372daa?_0x372daa['model']:null;}['setActiveCommentThread'](_0x7cdac9){const _0x5df463=this['context']['plugins']['get'](ti);if(!_0x7cdac9)return void(this['activeCommentThread']&&_0x5df463['deactivateAll']());const _0x4c5bb6=this['getCommentThread'](_0x7cdac9);if(!_0x4c5bb6)throw new _0x6d6638('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x7cdac9});if(!this['_threadToController']['has'](_0x4c5bb6))throw new _0x6d6638('commentsrepository-active-not-attached',null,{'threadId':_0x7cdac9});const _0x49b082=_0x5df463['getByInnerView'](this['_threadToController']['get'](_0x4c5bb6)['view']);_0x5df463['activate'](_0x49b082);}['switchReadOnly'](_0x65295,_0x3c870a){_0x65295?this['_readOnlyChannels']['add'](_0x3c870a):this['_readOnlyChannels']['delete'](_0x3c870a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x137f03){return this['_readOnlyChannels']['has'](_0x137f03)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3c215b,_0x108514){return new bt(_0x3c215b,_0x108514);}['setPermissions'](_0x2f6e00,_0x2c62d5=ii){this['_permissions']['set'](_0x2c62d5,_0x2f6e00),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x45c045=ii){return this['_permissions']['has'](_0x45c045)?this['_permissions']['get'](_0x45c045):ei;}['_addCommentThread']({channelId:_0x5ba530,threadId:_0x1df301,comments:_0x3469fc,unlinkedAt:_0x43ac6e,resolvedAt:_0x314f18,resolvedBy:_0x329394,target:_0x486cd9,context:_0x30c7f4,attributes:_0xa497bb,isFromAdapter:_0x31991e,isResolvable:_0x35d969,isSubmitted:_0x5413fc}){if('string'!=typeof _0x1df301)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1df301});if(this['hasCommentThread'](_0x1df301))throw new _0x6d6638('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1df301});const _0x25cd4e=new ri(this,{'channelId':_0x5ba530,'id':_0x1df301,'context':_0x30c7f4,'attributes':_0xa497bb,'unlinkedAt':_0x43ac6e,'resolvedAt':_0x314f18,'resolvedBy':_0x329394?this['context']['plugins']['get'](_0x12e146)['getUser'](_0x329394):null,'isResolvable':_0x35d969,'isSubmitted':_0x5413fc||_0x31991e});this['_threads']['set'](_0x1df301,_0x25cd4e);for(const _0x165946 of _0x3469fc)_0x25cd4e['_add'](this['_createNewComment']({'threadId':_0x1df301,..._0x165946}));return _0x486cd9&&_0x25cd4e['attachTo'](_0x486cd9),_0x31991e||!_0x25cd4e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5ba530,'threadId':_0x1df301});}['_submitCommentThread']({channelId:_0x1e9982,threadId:_0xe88623}){if(!this['hasCommentThread'](_0xe88623))throw new _0x6d6638('commentsrepository-missing-comment-thread',this);const _0x23e0e6=this['getCommentThread'](_0xe88623);if(_0x23e0e6['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3888a0,comments:_0x31e676,resolvedAt:_0xc26249,resolvedBy:_0x3bcfb7,context:_0x4a611c,attributes:_0x41f03e}=_0x23e0e6,_0x14a3b4=this['context']['plugins']['get']('PendingActions'),_0x4ba5ca=_0x14a3b4['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1e9982,'threadId':_0x3888a0,'comments':_0x31e676['map'](_0x18fdd8=>_0x18fdd8['toJSON']()),'resolvedAt':_0xc26249,'resolvedBy':_0x3bcfb7?_0x3bcfb7['id']:_0x3bcfb7,'context':_0x4a611c,'attributes':_0x41f03e})['then'](({comments:_0x4a360d})=>{_0x14a3b4['remove'](_0x4ba5ca);for(const _0x54a112 of _0x4a360d)this['_updateComment']({'channelId':_0x1e9982,'threadId':_0xe88623,'commentId':_0x54a112['commentId'],'createdAt':_0x54a112['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x538c71=>{throw console['error'](_0x538c71),new _0x6d6638('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xab2c51,target:_0x2854e3}){const _0x2631c1=this['getCommentThread'](_0xab2c51);if(!_0x2631c1)throw new _0x6d6638('commentsrepository-attach-missing-comment-thread',this);const _0x51be9b=this['context']['plugins']['get']('PendingActions'),_0x2bfc77=this['context']['plugins']['get'](ti),_0x21cfde=this['_createCommentThreadView'](_0x2631c1),_0x13fbf9=new bt(_0x2631c1,_0x21cfde);let _0x310f9a=null;_0x21cfde['on']('change:isDirty',(_0x71e756,_0x28dd62,_0x319fbb)=>{_0x319fbb?_0x310f9a=_0x51be9b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x310f9a&&(_0x51be9b['remove'](_0x310f9a),_0x310f9a=null);}),this['_threadToController']['set'](_0x2631c1,_0x13fbf9),this['_viewToController']['set'](_0x21cfde,_0x13fbf9);const _0x11dff9=new qt(this['context']['locale'],_0x21cfde);_0x11dff9['bind']('length')['to'](_0x21cfde),_0x11dff9['bind']('isDirty')['to'](_0x21cfde,'isDirty',_0x21cfde,'length',(_0x230232,_0x923283)=>_0x230232||!_0x923283),_0x11dff9['bind']('isActive')['to'](_0x21cfde),_0x11dff9['type']='comment';const _0x9b4bdf=new $t({'view':_0x11dff9,'target':_0x2854e3,'type':'comment','isVisible':!_0x2631c1['archivedAt']&&!!('function'==typeof _0x2854e3?_0x2854e3():_0x2854e3)});return _0x21cfde['on']('escape',()=>{_0x9b4bdf['fire']('escape');}),this['_bindAnnotationToEditors'](_0x21cfde,_0x9b4bdf),_0x2bfc77['add'](_0x9b4bdf),_0x9b4bdf;}['_bindAnnotationToEditors'](_0x48898a,_0xfbcbd8){this['listenTo'](_0x48898a,'editorReady',(_0x169397,_0x2e868d)=>{const _0x4f7dde=_0x2e868d['ui']['view']['body']['bodyCollectionContainer'];_0xfbcbd8['focusableElements']['add'](_0x4f7dde),this['context']instanceof _0x2de2e0&&this['context']['ui']['focusTracker']['add'](_0x4f7dde);},{'priority':'highest'}),this['listenTo'](_0x48898a,'editorDestroyed',(_0x209193,_0x125dab)=>{const _0x4e005c=_0x125dab['ui']['view']['body']['bodyCollectionContainer'];_0xfbcbd8['focusableElements']['has'](_0x4e005c)&&_0xfbcbd8['focusableElements']['remove'](_0x4e005c),this['context']instanceof _0x2de2e0&&this['context']['ui']['focusTracker']['remove'](_0x4e005c);});}['_unbindEditors'](_0x24db6c){this['stopListening'](_0x24db6c,'editorReady'),this['stopListening'](_0x24db6c,'editorDestroyed');}['_createCommentThreadView'](_0x577acf){const _0x3da2f8=this['context']['plugins']['get'](_0x12e146),{config:_0x2330d3,locale:_0x15f393}=this['context'],_0x142e3e=_0x153da0(_0x2330d3['get']('locale'),_0x15f393);return new(0x0,(_0x2330d3['get']('comments'))['CommentThreadView'])(_0x15f393,_0x577acf,_0x3da2f8['me'],{'editorConfig':{..._0x2330d3['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2330d3['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2330d3['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2330d3['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2330d3['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x142e3e,'CommentView':_0x2330d3['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2f891c,channelId:_0x40be4d,resolvedAt:_0x53bb4f,resolvedBy:_0x463c60,isFromAdapter:_0x2d7ed0}){if(!this['hasCommentThread'](_0x2f891c))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f891c});const _0x574ef9=this['getCommentThread'](_0x2f891c);if(_0x574ef9['isResolved'])throw new _0x6d6638('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2f891c});const _0x50848d=this['context']['plugins']['get'](_0x12e146);if(_0x574ef9['resolvedBy']=_0x50848d['getUser'](_0x463c60),_0x574ef9['resolvedAt']=_0x53bb4f,_0x2d7ed0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x83119e=this['context']['plugins']['get']('PendingActions'),_0x33189f=_0x83119e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x40be4d,'threadId':_0x2f891c})['then'](({resolvedAt:_0x55dee1,resolvedBy:_0x1b80d9})=>{_0x83119e['remove'](_0x33189f),_0x574ef9['resolvedBy']['id']!==_0x1b80d9&&(_0x574ef9['resolvedBy']=_0x50848d['getUser'](_0x1b80d9)),_0x574ef9['resolvedAt']=_0x55dee1;})['catch'](_0x310baa=>{throw console['error'](_0x310baa),new _0x6d6638('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1abbad,channelId:_0x319061,isFromAdapter:_0x48b851}){if(!this['hasCommentThread'](_0x1abbad))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x1abbad});const _0xf8a413=this['getCommentThread'](_0x1abbad);if(!_0xf8a413['isResolved'])throw new _0x6d6638('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1abbad});if(_0xf8a413['resolvedBy']=null,_0xf8a413['resolvedAt']=null,_0x48b851||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2d5f6f=this['context']['plugins']['get']('PendingActions'),_0x311f39=_0x2d5f6f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x319061,'threadId':_0x1abbad})['then'](()=>_0x2d5f6f['remove'](_0x311f39))['catch'](_0x13cf57=>{throw console['error'](_0x13cf57),new _0x6d6638('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x376dc6,isFromAdapter:_0x1bb60c}){const _0x53ea91=this['getCommentThread'](_0x376dc6);if(!_0x53ea91)throw new _0x6d6638('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x376dc6),this['_threads']['delete'](_0x376dc6),!_0x53ea91['isSubmitted']||_0x1bb60c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3888d6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b3d57}=_0x53ea91,_0x1154ae=_0x3888d6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3b3d57,'threadId':_0x376dc6})['then'](()=>_0x3888d6['remove'](_0x1154ae))['catch'](_0x3dd487=>{throw console['error'](_0x3dd487),new _0x6d6638('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4c1f4a,unlinkedAt:_0x373fd4,context:_0xa2657b,attributes:_0x2dfe07,isFromAdapter:_0x193bc1}){if('string'!=typeof _0x4c1f4a)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4c1f4a});if(!this['hasCommentThread'](_0x4c1f4a))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x4c1f4a});const _0x4ba10a=this['getCommentThread'](_0x4c1f4a);let _0x114d07=!0x1;if(void 0x0!==_0xa2657b&&_0x4ba10a['context']!==_0xa2657b&&(_0x4ba10a['context']=_0xa2657b,_0x114d07=!0x0),void 0x0!==_0x373fd4&&_0x4ba10a['unlinkedAt']!==_0x373fd4&&(_0x4ba10a['unlinkedAt']=_0x373fd4,_0x114d07=!0x0),_0x2dfe07&&!_0x2d7453(_0x2dfe07,_0x4ba10a['attributes'])&&(_0x4ba10a['attributes']=_0x2dfe07,_0x114d07=!0x0),!_0x114d07)return Promise['resolve']();if(!_0x4ba10a['isSubmitted']||_0x193bc1||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x388cf2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a494b}=_0x4ba10a,_0x1ad80a=_0x388cf2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a494b,'threadId':_0x4c1f4a,'context':_0xa2657b,'unlinkedAt':_0x373fd4,'attributes':_0x2dfe07})['then'](()=>_0x388cf2['remove'](_0x1ad80a))['catch'](_0x5f05af=>{throw console['error'](_0x5f05af),new _0x6d6638('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xd89b77){const _0xaac101=this['context']['plugins']['get'](ti),_0x59b836=this['getCommentThread'](_0xd89b77);if(_0x59b836['_isAttached']=!0x1,this['_threadToController']['has'](_0x59b836)){const _0x509455=this['_threadToController']['get'](_0x59b836),_0xd4eddd=_0x509455['view'],_0x33d97e=_0xaac101['getByInnerView'](_0xd4eddd);this['_threadToController']['delete'](_0x59b836),this['_viewToController']['delete'](_0xd4eddd),_0x33d97e&&_0xaac101['remove'](_0x33d97e),_0x509455['destroy'](),_0xd4eddd['destroy']()['then'](()=>{this['_unbindEditors'](_0xd4eddd);});}}['_updateActiveAnnotation']({threadId:_0x3ac34f,resolvedAt:_0xc7946d,unlinkedAt:_0x82b0d5}){const _0x4f0b69=!!_0xc7946d,_0x2b8c00=this['context']['plugins']['get'](ti),_0x1f6730=this['getCommentThread'](_0x3ac34f);if(this['_threadToController']['has'](_0x1f6730)){const _0x37ed9e=this['_threadToController']['get'](_0x1f6730)['view'],_0x368b2d=_0x2b8c00['getByInnerView'](_0x37ed9e);_0x368b2d&&(_0x4f0b69&&_0x2b8c00['_removeActiveAnnotation'](_0x368b2d),_0x82b0d5?_0x368b2d['isVisible']=!0x1:_0x368b2d['refreshVisibility']());}}['_getExternalAuthor'](_0xeb63f6){const _0x1220f7=this['context']['plugins']['get'](_0x12e146),_0x2ffd8f=_0xbb7f8f('external:'+_0xeb63f6),_0xe2c867=_0x1220f7['getUser'](_0x2ffd8f);return _0xe2c867||_0x1220f7['addUser']({'id':_0x2ffd8f,'name':_0xeb63f6});}['_createNewComment']({threadId:_0xcc0202,commentId:_0x36d4f4=_0x2ff495(),content:_0x1e2513,authorId:_0x1bc4a8,createdAt:_0x215164,attributes:_0xd981ad}){if('string'!=typeof _0x36d4f4)throw new _0x6d6638('commentsrepository-invalid-commentid');if('string'!=typeof _0x1bc4a8)throw new _0x6d6638('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1e2513||!_0x1e2513['trim']())throw new _0x6d6638('commentsrepository-invalid-comment-content');const _0x3cfd6b=this['context']['plugins']['get'](_0x12e146)['getUser'](_0x1bc4a8);if(!_0x3cfd6b)throw new _0x6d6638('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1bc4a8});let _0x50d8b7=null,_0x933385=_0x215164;return _0xd981ad?.['@external']&&(_0x50d8b7=this['_getExternalAuthor'](_0xd981ad['@external']['authorName']),_0x933385=new Date(_0xd981ad['@external']['createdAt'])),new hi(this,{'threadId':_0xcc0202,'id':_0x36d4f4,'author':_0x50d8b7||_0x3cfd6b,'creator':_0x3cfd6b,'content':_0x1e2513,'createdAt':_0x215164,'authoredAt':_0x933385,'attributes':_0xd981ad});}['_addComment'](_0x1fe5a8){let {threadId:_0xdbb63e,content:_0x30b444,attributes:_0x4f6b4e,isFromAdapter:_0x37fb6c}=_0x1fe5a8;const _0x16e23d=this['getCommentThread'](_0x1fe5a8['threadId']);if(!_0x16e23d)throw new _0x6d6638('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x56357a=this['_createNewComment'](_0x1fe5a8),{id:_0x4d9bf5}=_0x56357a;if(_0x16e23d['_add'](_0x56357a),_0x37fb6c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x16e23d['isSubmitted'])return Promise['resolve']();const _0x1bfeb2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7e2888}=_0x16e23d,_0x4ce675=_0x1bfeb2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4f6b4e||(_0x4f6b4e={}),this['adapter']['addComment']({'channelId':_0x7e2888,'threadId':_0xdbb63e,'commentId':_0x4d9bf5,'content':_0x30b444,'attributes':_0x4f6b4e})['then'](_0x436a51=>{_0x1bfeb2['remove'](_0x4ce675),_0x436a51&&this['_updateComment']({'channelId':_0x7e2888,'threadId':_0xdbb63e,'commentId':_0x4d9bf5,'createdAt':_0x436a51['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x78bf15=>{throw console['error'](_0x78bf15),new _0x6d6638('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x31a9df,commentId:_0x24cdb7,content:_0x11eaad,createdAt:_0x2a4954,attributes:_0x7acd41,isFromAdapter:_0x241128}){if(void 0x0!==_0x11eaad&&('string'!=typeof _0x11eaad||!_0x11eaad['trim']()['length']))throw new _0x6d6638('commentsrepository-update-comment-invalid-content');const _0x5178b7=this['getCommentThread'](_0x31a9df),_0x501f6d=_0x5178b7['getComment'](_0x24cdb7);if(!_0x501f6d)throw new _0x6d6638('commentsrepository-update-missing-comment',this);let _0x26fc6e=!0x1;if(_0x11eaad&&_0x11eaad!==_0x501f6d['content']&&(_0x501f6d['isEditable']||_0x241128)&&(_0x501f6d['content']=_0x11eaad,_0x26fc6e=!0x0),_0x2a4954&&_0x2a4954!==_0x501f6d['createdAt']&&(_0x501f6d['createdAt']=_0x2a4954,_0x501f6d['isExternal']||(_0x501f6d['authoredAt']=_0x2a4954),_0x26fc6e=!0x0),_0x7acd41&&!_0x2d7453(_0x7acd41,_0x501f6d['attributes'])&&(_0x501f6d['attributes']=_0x7acd41,_0x26fc6e=!0x0),!_0x26fc6e)return Promise['resolve']();if(_0x5178b7['fire']('commentUpdated'),_0x241128||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x931edd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2fb711}=this['getCommentThread'](_0x501f6d['threadId']),_0x5a8d95=_0x931edd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2fb711,'threadId':_0x31a9df,'commentId':_0x24cdb7,'content':_0x11eaad,'attributes':_0x7acd41})['then'](()=>_0x931edd['remove'](_0x5a8d95))['catch'](_0x49dce2=>{throw console['error'](_0x49dce2),new _0x6d6638('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2e43c1,commentId:_0x4bc08a,isFromAdapter:_0x119fd6}){const _0x4a74fd=this['getCommentThread'](_0x2e43c1),_0x489141=_0x4a74fd['getComment'](_0x4bc08a);if(!_0x489141)throw new _0x6d6638('commentsrepository-remove-missing-comment',this);if(_0x4a74fd['_remove'](_0x489141),_0x119fd6||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x468f40=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fce8}=_0x4a74fd,_0x58cf2a=_0x468f40['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4fce8,'threadId':_0x2e43c1,'commentId':_0x4bc08a})['then'](()=>_0x468f40['remove'](_0x58cf2a))['catch'](_0x3f0c3a=>{throw console['error'](_0x3f0c3a),new _0x6d6638('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x33ce08,_0x5eed8c){super();const _0x2b9b70=_0x5eed8c['isResolvable'];this['channelId']=_0x5eed8c['channelId'],this['id']=_0x5eed8c['id'],this['comments']=new _0x4284a7(),this['_repository']=_0x33ce08,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5eed8c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x33ce08,'_permissions',_0x33ce08,'_readOnlyChannels',()=>_0x33ce08['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x33ce08,'_permissions',()=>_0x33ce08['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x33ce08,'_permissions',()=>{const _0xc56f75=_0x33ce08['getPermissions'](this['channelId']);return _0xc56f75['write']||_0xc56f75['admin'];}),this['bind']('isResolvable')['to'](_0x33ce08,'_permissions',()=>_0x2b9b70&&_0x33ce08['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5eed8c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x567e09,_0x3de4d2)=>_0x567e09?_0x3de4d2?_0x567e09<_0x3de4d2?_0x567e09:_0x3de4d2:_0x567e09:_0x3de4d2),this['set']('unlinkedAt',_0x5eed8c['unlinkedAt']||null),this['set']('resolvedAt',_0x5eed8c['resolvedAt']||null),this['set']('resolvedBy',_0x5eed8c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5e82ef=>!!_0x5e82ef),this['set']('attributes',_0x5eed8c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x191d73,_0x22a513)=>_0x191d73+_0x22a513['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3570d8,id:_0xbd3f8e}=this;this['_repository']['fire'](ai('submitCommentThread',_0x3570d8),{'channelId':_0x3570d8,'threadId':_0xbd3f8e});}['setUnlinkedAt'](_0x58bd6a){this['_update']({'unlinkedAt':_0x58bd6a});}['resolve']({resolvedAt:_0x2d7036=new Date(),resolvedBy:_0x244ce0='',isFromAdapter:_0x358633=!0x1}={}){const _0x39fa4c=this['_repository']['context']['plugins']['get'](_0x12e146)['me'],{channelId:_0x1ecee9,id:_0x397ed6}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1ecee9),{'channelId':_0x1ecee9,'threadId':_0x397ed6,'resolvedAt':_0x2d7036,'resolvedBy':_0x244ce0||_0x39fa4c['id'],'isFromAdapter':_0x358633});}['reopen']({isFromAdapter:_0xd1d258=!0x1}={}){const {channelId:_0x13bd1d,id:_0x1ed821}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x13bd1d),{'channelId':_0x13bd1d,'threadId':_0x1ed821,'isFromAdapter':_0xd1d258});}['setContext'](_0x53e833){this['context']||this['_update']({'context':_0x53e833});}['setAttribute'](_0x803b69,_0x10fe56){const _0x5a2a8d=_0x25e46d(this['attributes']);_0x91f587(_0x5a2a8d,_0x803b69,_0x10fe56),this['_update']({'attributes':_0x5a2a8d});}['removeAttribute'](_0x2c6adf){const _0x441508=_0x25e46d(this['attributes']);_0x1f251b(_0x441508,_0x2c6adf),this['_update']({'attributes':_0x441508});}['remove']({isFromAdapter:_0x1b2fd3=!0x1}={}){const {channelId:_0x1e9420,id:_0x74c217}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1e9420),{'channelId':_0x1e9420,'threadId':_0x74c217,'isFromAdapter':_0x1b2fd3});}['attachTo'](_0x46df15){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x46df15});}['addComment'](_0x5bcb64){const {channelId:_0x1c8e3c,id:_0x5bbb35}=this;this['_repository']['fire'](ai('addComment',_0x1c8e3c,_0x5bbb35),Object['assign']({'channelId':_0x1c8e3c,'threadId':_0x5bbb35},_0x5bcb64));}['getComment'](_0x5bb9fd){if('string'!=typeof _0x5bb9fd)throw new _0x6d6638('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5bb9fd});return this['comments']['get'](_0x5bb9fd);}['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'](_0x5e2f40=>_0x5e2f40['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5a9f9d){return this['listenTo'](_0x5a9f9d,'change:authoredAt',()=>{const _0x47b8e5=this['_findOptimalIndex'](_0x5a9f9d),_0xa7dc06=this['comments'];_0x47b8e5-0x1!=_0xa7dc06['getIndex'](_0x5a9f9d)&&_0x47b8e5+0x1!=_0xa7dc06['getIndex'](_0x5a9f9d)&&(this['_remove'](_0x5a9f9d),this['_add'](_0x5a9f9d));}),this['comments']['add'](_0x5a9f9d,this['_findOptimalIndex'](_0x5a9f9d));}['_update'](_0x10ac9c){const {channelId:_0x1a05dd,id:_0x34e6c1}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1a05dd),{..._0x10ac9c,'channelId':_0x1a05dd,'threadId':_0x34e6c1});}['_remove'](_0x5357b8){return this['stopListening'](_0x5357b8),_0x5357b8['destroy'](),this['comments']['remove'](_0x5357b8);}['_findOptimalIndex'](_0x352117){const _0x5d0648=this['comments']['find'](_0x450148=>new Date(_0x450148['authoredAt'])['getTime']()>new Date(_0x352117['authoredAt'])['getTime']());return _0x5d0648?this['comments']['getIndex'](_0x5d0648):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0xed663d,_0x2339c7){super();const _0x11ce8c=_0xed663d['context']['plugins']['get'](_0x12e146)['me'],_0x59be1f=_0xed663d['getCommentThread'](_0x2339c7['threadId']),_0x2db6bc=0x0===_0x59be1f['comments']['length'],_0xccd7da=_0x11ce8c===_0x2339c7['author'];this['id']=_0x2339c7['id'],this['threadId']=_0x2339c7['threadId'],this['author']=_0x2339c7['author'],this['creator']=_0x2339c7['creator'],this['set']('content',_0x2339c7['content']),this['createdAt']=_0x2339c7['createdAt']||new Date(),this['set']('authoredAt',_0x2339c7['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x59be1f,'resolvedAt'),this['set']('attributes',_0x2339c7['attributes']||{}),this['bind']('isEditable')['to'](_0xed663d,'_permissions',()=>{const _0x198581=_0xed663d['getPermissions'](_0x59be1f['channelId'])['write'],_0x1016bd=_0xed663d['getPermissions'](_0x59be1f['channelId'])['modifyAll'];return _0xccd7da&&_0x198581||!_0xccd7da&&_0x1016bd;}),this['bind']('isRemovable')['to'](_0x59be1f,'isRemovable',_0xed663d,'_permissions',_0x37a01b=>{const _0x3e7204=_0xed663d['getPermissions'](_0x59be1f['channelId'])['write'],_0x30c6d0=_0xed663d['getPermissions'](_0x59be1f['channelId'])['modifyAll'];return _0xccd7da&&_0x3e7204||_0x37a01b&&_0x2db6bc||!_0xccd7da&&_0x30c6d0&&!_0x2db6bc;}),this['bind']('isReadOnly')['to'](_0x59be1f,'isReadOnly'),this['_repository']=_0xed663d;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x2b3d62){const _0x3c691a=document['createElement']('div');return _0x3c691a['innerHTML']=_0x2b3d62,_0x3c691a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x533b2d){const {threadId:_0x1d350f,id:_0x327207}=this;if(!this['_repository']['hasCommentThread'](_0x1d350f))throw new _0x6d6638('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xd2676d}=this['_repository']['getCommentThread'](_0x1d350f);this['_repository']['fire'](ai('updateComment',_0xd2676d,_0x1d350f),{'channelId':_0xd2676d,'threadId':_0x1d350f,'commentId':_0x327207,..._0x533b2d});}['setAttribute'](_0x44889c,_0x11f46b){const _0x39c5f4=_0x25e46d(this['attributes']);_0x91f587(_0x39c5f4,_0x44889c,_0x11f46b),this['update']({'attributes':_0x39c5f4});}['removeAttribute'](_0x5100b6){const _0x3a57bf=_0x25e46d(this['attributes']);_0x1f251b(_0x3a57bf,_0x5100b6),this['update']({'attributes':_0x3a57bf});}['remove'](_0x48ea5a={}){if(!_0x48ea5a['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2045d3,id:_0x1a2166}=this;if(!this['_repository']['hasCommentThread'](_0x2045d3))throw new _0x6d6638('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x146605}=this['_repository']['getCommentThread'](_0x2045d3);this['_repository']['fire'](ai('removeComment',_0x146605,_0x2045d3),{'channelId':_0x146605,'threadId':_0x2045d3,'commentId':_0x1a2166,..._0x48ea5a});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x3b5882,..._0x507c48){for(const _0x44f86b of _0x507c48)void 0x0!==_0x44f86b&&(_0x3b5882+=':'+String(_0x44f86b));return _0x3b5882;}var ci=class extends _0x29bf2e{constructor(_0x2cca5b){super(_0x2cca5b),this['set']('hasContent',!0x1);}['refresh'](){const _0x28e5be=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x39a496 of _0x28e5be['getRanges']())if(this['_hasContent'](_0x39a496))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xbb58d6=_0x2ff495(),ranges:_0x562d08,comment:_0x2e7e96}={}){const _0x3d0903=this['editor']['model'],_0x16767f=_0x562d08??Array['from'](_0x3d0903['document']['selection']['getRanges']()),_0x1033d6=[];for(const _0x375df3 of _0x16767f)this['_hasContent'](_0x375df3)&&_0x1033d6['push'](this['_trimToContent'](_0x375df3));if(!_0x1033d6['length'])throw new _0x6d6638('addcommentthreadcommand-incorrect-ranges',null);_0x2e7e96&&this['_createCommentThread'](_0xbb58d6,_0x2e7e96),this['_createMarkersFromRanges'](_0xbb58d6,_0x1033d6,!!_0x2e7e96);}['_createMarkersFromRanges'](_0x7d0eb4,_0xa02778,_0x453d97){this['editor']['model']['change'](_0x2ef80d=>{for(const _0x3e7069 of _0xa02778){const _0x396497='comment:'+_0x7d0eb4+':'+_0x2ff495()['substr'](0x1,0x5);_0x2ef80d['addMarker'](_0x396497,{'range':_0x3e7069,'usingOperation':_0x453d97,'affectsData':_0x453d97});}});}['_createCommentThread'](_0x3cab76,_0x2eed55){const _0x2a0d97=this['editor']['plugins']['get']('CommentsRepository'),_0x4bcabe=this['editor']['config']['get']('collaboration.channelId'),_0x261623=this['editor']['plugins']['get']('Users')['me'];if(!_0x261623)throw new _0x6d6638('addcommentthreadcommand-user-not-found',null);_0x2a0d97['addCommentThread']({'threadId':_0x3cab76,'channelId':_0x4bcabe,'comments':[{'authorId':_0x261623['id'],'content':_0x2eed55,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2b87eb){for(const _0x1a3981 of _0x2b87eb['getItems']())if(this['_itemIsContent'](_0x1a3981))return!0x0;return!0x1;}['_itemIsContent'](_0x1cc37f){return _0x1cc37f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1cc37f)&&!_0x1cc37f['is']('element','tableCell');}['_trimToContent'](_0xe8a1ae){const _0x2a53fd=_0x1f55a0=>!this['_itemIsContent'](_0x1f55a0['item']),_0x16681f=_0xe8a1ae['start']['getLastMatchingPosition'](_0x2a53fd),_0x1f8db0=_0xe8a1ae['end']['getLastMatchingPosition'](_0x2a53fd,{'direction':'backward'});return this['editor']['model']['createRange'](_0x16681f,_0x1f8db0);}},di=class extends _0x3d6b36{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29f5b3){super(_0x29f5b3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xaca3ab=this['editor'],_0x397f95=_0xaca3ab['model']['document']['selection'],_0x22915b=_0xb07f85(()=>this['refreshSelectedViews'](),0xa);_0x397f95['on']('change:range',(_0x4d00cb,_0x32f76d)=>{_0x32f76d['directChange']&&(_0x22915b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xaca3ab['editing']['view']['document'],'change:isFocused',(_0x39117b,_0x3ca784,_0x22ac6f)=>{_0x22ac6f&&_0x22915b();}),this['listenTo'](_0xaca3ab['ui']['focusTracker'],'change:isFocused',(_0x3a2350,_0x25c072,_0x330d9a)=>{_0x330d9a||this['fire']('blur',{'isAnnotationTracked':_0x309e4a=>this['_editorAnnotationsData']['has'](_0x309e4a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4ed691){if(this['_editorAnnotations']['has'](_0x4ed691['view']))return;this['_editorAnnotations']['add'](_0x4ed691['view']),this['editor']['ui']['focusTracker']['add'](_0x4ed691['view']['element']);const _0x5bd696=this['editor']['plugins']['get'](ti);this['listenTo'](_0x5bd696['collection'],'remove',(_0x439487,_0x1b0b39)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b0b39['view']['element']),this['_editorAnnotations']['delete'](_0x1b0b39['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3e9339){if('function'!=typeof _0x3e9339)throw new _0x6d6638('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3e9339);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3f446b,annotations:_0x10423d}){const _0x5c43fa=[],_0x33940a=this['editor']['model']['document']['selection'],_0x4f2c30=Array['from'](_0x33940a['getRanges']());for(const [_0x141672,_0x3b303a]of this['_editorAnnotationsData']){const _0x189fdc=_0x251b4c(_0x3b303a),_0x5bd711=_0x10423d['getByInnerView'](_0x141672);_0x189fdc&&_0x5bd711&&_0x5c43fa['push']({'annotation':_0x5bd711,'range':_0x189fdc});}function _0x251b4c(_0x16aa73){for(const _0x3d51f3 of _0x16aa73)for(const _0x289908 of _0x4f2c30)if(_0x3d51f3['containsRange'](_0x289908,!_0x33940a['isCollapsed']))return _0x3d51f3;return null;}return _0x5c43fa['sort']((_0x5abcd6,_0x4f1786)=>{const _0x322f14=_0x5abcd6['range'],_0xe127c0=_0x4f1786['range'];if(!_0x322f14['isEqual'](_0xe127c0)){if(_0x322f14['containsRange'](_0xe127c0,!0x0))return 0x1;if(_0xe127c0['containsRange'](_0x322f14,!0x0))return-0x1;}return _0x5abcd6['annotation']==_0x3f446b?-0x1:_0x4f1786['annotation']==_0x3f446b?0x1:0x0;})['map'](_0x3a0df0=>_0x3a0df0['annotation']);}get['_editorAnnotationsData'](){const _0x391dda=new Map();for(const _0x144f30 of Array['from'](this['_dataCollectors']))for(const [_0x2cc630,_0x418a8a]of _0x144f30())_0x391dda['set'](_0x2cc630,_0x418a8a);return _0x391dda;}},li=class extends _0x3d6b36{['afterInit'](){const _0x2312ea=this['editor'];_0x2312ea['plugins']['has']('RestrictedEditingModeEditing')&&_0x2312ea['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x3d6b36{constructor(_0x2bca10){super(_0x2bca10),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x233d8c=this['editor'],_0x583de0=_0x233d8c['commands']['get']('importWord'),_0x3e7bed=_0x233d8c['plugins']['get'](_0x12e146);_0x583de0&&(_0x583de0['on']('execute',(_0x96386f,[,_0x6edf66])=>{_0x6edf66['collaboration_features']={'comments':!0x0,'user_id':_0x3e7bed['me']['id']};},{'priority':_0xa7cdbb['high']+0xa}),this['listenTo'](_0x583de0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x585357,_0x4fcf07){const {comment_threads:_0x3537ef}=_0x4fcf07;_0x3537ef&&_0x3537ef['forEach'](({thread_id:_0x1438c5,comments:_0x19fe93,is_resolved:_0x51a0f4})=>{const _0x5042d9=new Date(),_0x181b06=_0x19fe93['map'](({author:_0x2fa1cd,content:_0x1e4d46,created_at:_0xa30612})=>({'content':_0x1e4d46,'authorId':this['editor']['plugins']['get'](_0x12e146)['me']['id'],'createdAt':_0x5042d9,'attributes':{'@external':{'authorName':_0x2fa1cd,'createdAt':_0xa30612?new Date(_0xa30612):new Date(),'source':'importWord'}}})),_0x1f7722=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1f7722,'threadId':_0x1438c5,'comments':_0x181b06,'resolvedAt':_0x51a0f4?_0x5042d9:null});});}},ui=class extends _0x3d6b36{constructor(_0x187b95){super(_0x187b95),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x53d534=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x53d534,'contentInsertion',(_0x27f569,_0x42c1e8)=>this['_removeMarkersWithoutThreads'](_0x42c1e8['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x47bd88){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x47bd88;const _0x380400=this['editor']['plugins']['get']('CommentsRepository');for(const _0x53b52c of _0x47bd88['keys']()){const [_0x508a5c,_0x3934a8]=_0x53b52c['split'](':');'comment'!=_0x508a5c||_0x380400['hasCommentThread'](_0x3934a8)||_0x47bd88['delete'](_0x53b52c);}return _0x47bd88;}['_registerMarkerInClipboardPipeline'](){const _0x459a8a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xd1d7ec=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xd1d7ec&&_0x459a8a['_registerMarkerToCopy']('comment',_0xd1d7ec);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xe1c352){switch(_0xe1c352){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xc5c969){const _0x1139a8=_0xc5c969['split'](':');return{'group':_0x1139a8[0x0],'id':_0x1139a8[0x1],'part':_0x1139a8[0x2]};}var pi=class extends _0x3d6b36{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x334d57,_0x289127)=>{if(!_0x289127['options']['showCommentHighlights'])return null;if(_0x289127['options']['ignoreResolvedComments']){const {id:_0x1e1b23}=fi(_0x334d57['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1e1b23)?.['isResolved']&&_0x334d57['item'])return _0x289127['consumable']['consume'](_0x334d57['item'],'addMarker:'+_0x334d57['markerName']),_0x289127['consumable']['consume'](_0x334d57['item'],'removeMarker:'+_0x334d57['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xb291fc=>{_0xb291fc['on']('addMarker:comment',(_0x49acf3,_0x30707d,_0x503970)=>{if(!_0x503970['options']['showCommentHighlights'])return;const _0x231826=_0x30707d['item'];if(!_0x231826)return;const _0x351270=_0x503970['mapper']['toViewElement'](_0x231826);this['editor']['model']['schema']['isObject'](_0x231826)&&_0x351270&&!_0x351270['getCustomProperty']('widget')&&_0x351270['is']('containerElement')&&Ct(_0x351270,_0x503970['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x58fca5,{writer:_0x9a9e5c,options:_0x17b671})=>{if(!_0x17b671['showCommentHighlights'])return null;const _0x52feb0=_0x9a9e5c['createContainerElement']('div'),_0x487a2f=_0x9a9e5c['createEmptyElement']('hr');return _0x9a9e5c['addClass']('ck-horizontal-line',_0x52feb0),_0x9a9e5c['insert'](_0x9a9e5c['createPositionAt'](_0x52feb0,0x0),_0x487a2f),_0x52feb0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x479b60,{writer:_0x1e0301,options:_0x58360f})=>{if(!_0x58360f['showCommentHighlights'])return null;const _0x4d3ca8=_0x1e0301['createContainerElement']('span'),_0x27aca3=_0x1e0301['createEmptyElement']('img');return _0x1e0301['addClass']('image-inline',_0x4d3ca8),_0x1e0301['insert'](_0x1e0301['createPositionAt'](_0x4d3ca8,0x0),_0x27aca3),_0x4d3ca8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32a43b,{writer:_0x1e74bb,options:_0x5d40cc})=>{if(_0x5d40cc['showCommentHighlights'])return _0x1e74bb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4a55ab,_0x1fe833,_0x38448b)=>{_0x38448b['options']['showCommentHighlights']&&_0x4a55ab['stop']();},{'priority':'high'});}},wi=class extends _0x3d6b36{static get['requires'](){return[oi,di,_0x12e146,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x289fde){super(_0x289fde),this['set']('isThreadsLoadingPaused',!0x0),_0x289fde['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5c9d74,_0x103cae,_0x48604d,_0x281cd4)=>{const _0x5fa890=_0x289fde['plugins']['get'](oi),_0x547dc6=_0x48604d?fi(_0x48604d)['id']:null;_0x289fde['model']['change'](()=>{if(_0x547dc6){const _0x4aa7d5=this['getAllMarkersForId'](_0x547dc6);for(const _0x2575ae of _0x4aa7d5)_0x289fde['editing']['reconvertMarker'](_0x2575ae);}if(_0x281cd4){const {id:_0x406092}=fi(_0x281cd4),_0x5193ed=_0x5fa890['getCommentThread'](_0x406092);if(_0x5193ed&&_0x5193ed['unlinkedAt'])return;if(_0x5193ed&&!_0x5193ed['isAttached'])return;const _0x45499b=this['getAllMarkersForId'](_0x406092);for(const _0x3f93b3 of _0x45499b)_0x289fde['editing']['reconvertMarker'](_0x3f93b3);}}),_0x547dc6&&this['scrollToThreadMarker'](_0x547dc6);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xb8ffec=this['editor'],_0x3a34eb=_0xb8ffec['plugins']['get'](oi),_0x4ce6f1=_0xb8ffec['config']['get']('collaboration.channelId'),_0xb9e579=_0x3a34eb['getCommentThreads']()['filter'](_0x5f1fcd=>_0x5f1fcd['channelId']!==_0x4ce6f1);_0xb8ffec['commands']['add']('addCommentThread',new ci(_0xb8ffec)),this['listenTo'](_0xb8ffec,'change:isReadOnly',(_0x1bee67,_0x415dbf,_0x3f42bf)=>{_0x3a34eb['switchReadOnly'](_0x3f42bf,_0xb8ffec['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3a34eb,gi('addCommentThread',_0x4ce6f1),(_0x56a74f,{threadId:_0x412699})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x412699)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x412699);}),this['listenTo'](_0x3a34eb,gi('removeCommentThread',_0x4ce6f1),(_0x572342,{threadId:_0x48826f})=>{_0xb8ffec['model']['enqueueChange']({'isUndoable':!0x1},_0x2fce84=>{const _0x470489=this['getAllMarkersForId'](_0x48826f);for(const _0x7bfa5d of _0x470489)_0x2fce84['removeMarker'](_0x7bfa5d);});}),this['listenTo'](_0x3a34eb,gi('resolveCommentThread',_0x4ce6f1),(_0x681c11,{threadId:_0x5712dc})=>{this['_reconvertMarkers'](_0x5712dc);const _0x1dce33=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x1dce33['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5712dc)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3a34eb,gi('reopenCommentThread',_0x4ce6f1),(_0x2388a9,{threadId:_0x5d6569})=>{this['_reconvertMarkers'](_0x5d6569);},{'priority':'low'}),this['listenTo'](_0x3a34eb,gi('addComment',_0x4ce6f1),(_0x5b3521,{threadId:_0x3f14cb,isFromAdapter:_0x1300ae})=>{const _0x2a9695=this['getAllMarkersForId'](_0x3f14cb);!_0x1300ae&&0x0!=_0x2a9695['length']&&_0x3a34eb['hasCommentThread'](_0x3f14cb)&&0x1===_0x3a34eb['getCommentThread'](_0x3f14cb)['length']&&_0xb8ffec['model']['enqueueChange']({'isUndoable':!0x1},_0x375293=>{for(const _0x45ab6f of _0x2a9695)_0x375293['updateMarker'](_0x45ab6f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xb9e579);}['afterInit'](){!async function(_0x341a66){const _0xbea766='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0xdb90a2=0x78df8,_0x50d608=window['Date']['now'](),_0x4a39db=_0x341a66['editor'],_0x478313=new window['Promise'](_0x10d325=>{_0x4a39db['once']('ready',_0x10d325);}),_0x555126={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x36c625=_0x4a39db['config']['get']('licenseKey');async function _0x3e55de(){let _0xd14ce3,_0x30c533=null,_0x3275c3=null;try{return'GPL'==_0x36c625?'NotAllowed':(_0xd14ce3=_0x300a56(),_0xd14ce3?(_0xd14ce3['usageEndpoint']&&(_0x3275c3=_0x34c272(_0xd14ce3['usageEndpoint'],_0xd14ce3['jti'])),await _0x342858()?_0x22b82d()?_0x2c5539()?'Expired':_0x230ef9()?('evaluation'==_0xd14ce3['licenseType']&&(_0x30c533=_0x9d6a1b('EvaluationLimit')),await _0x2db3d7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2c5539(){const _0x3659d9=['evaluation','trial']['includes'](_0xd14ce3['licenseType'])?_0x50d608/0x3e8:0xe10*_0xdb90a2;return _0xd14ce3['exp']<_0x3659d9;}function _0x22b82d(){const _0xfcb6c6=_0xd14ce3['features'];if(!_0xfcb6c6)return!0x1;if(_0xfcb6c6['includes']('*'))return!0x0;if(_0xfcb6c6['includes']('CMT'))return!0x0;if(_0xfcb6c6['includes']('TRILIUM')&&_0x34bbd3())return!0x0;if(_0xfcb6c6['includes']('RCMT')){if(_0x478b0b())return!0x0;if(_0x1a8ce4()||_0x54a746())return!0x0;}return!0x1;}function _0x230ef9(){const _0x48a4f4=_0xd14ce3['licensedHosts'];if(!_0x48a4f4||0x0==_0x48a4f4['length'])return!0x0;const {hostname:_0x8f93c1}=new URL(window['location']['href']);if(_0x48a4f4['includes'](_0x8f93c1))return!0x0;const _0xe2a5f2=_0x8f93c1['split']('.');return _0x48a4f4['filter'](_0x5a9b86=>_0x5a9b86['includes']('*'))['map'](_0x211c4b=>_0x211c4b['split']('.'))['filter'](_0x2b2e8c=>_0x2b2e8c['length']<=_0xe2a5f2['length'])['map'](_0x376093=>Array(_0xe2a5f2['length']-_0x376093['length'])['fill']('*'===_0x376093[0x0]?'*':'')['concat'](_0x376093))['some'](_0x8649ca=>_0xe2a5f2['every']((_0x4b4f07,_0x46294e)=>_0x8649ca[_0x46294e]===_0x4b4f07||'*'===_0x8649ca[_0x46294e]));}function _0x2db3d7(){return _0x30c533&&_0x3275c3?new window['Promise']((_0x32846d,_0xeca1e0)=>{_0x30c533['then'](_0x32846d,_0xeca1e0),_0x3275c3['then'](_0x2bab16=>{'Valid'!=_0x2bab16&&_0x32846d(_0x2bab16);},_0xeca1e0);}):_0x30c533||_0x3275c3||'Valid';}}function _0x34c272(_0x110140,_0x158913){return new window['Promise'](_0x24e99b=>{if(_0x213e5f())return _0x24e99b('Valid');_0x547736(),_0x4a39db['decorate']('_sendUsageRequest');let _0x57d377=!0x1;const _0x14c4da=_0x2ff495();function _0x152262(_0x2b7d73){return!!_0x2b7d73&&('object'==typeof _0x2b7d73||'function'==typeof _0x2b7d73)&&'function'==typeof _0x2b7d73['then']&&'function'==typeof _0x2b7d73['catch'];}function _0x2c1f6a(_0x49c289){_0x419a05(_0x49c289)['then'](_0x4e3188=>_0x4e3188&&'ok'==_0x4e3188['status']?_0x1b7e81(_0x1c8492(_0x14c4da+_0x158913))!=_0x4e3188['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4bf011=>(_0x2575a1(),_0x4bf011),()=>{const _0x173e4d=_0x563409();return null==_0x173e4d?(_0x2575a1(),'Valid'):_0x50d608-_0x173e4d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x24e99b)['catch'](()=>{_0x24e99b('UsageLimit');});const _0x3e8f6a=0x36ee80;function _0x2575a1(){const _0x3355cc='llct-'+_0x1b7e81(_0x1c8492(_0x110140)),_0x40acd7=_0x5dd94f(_0x1b7e81(window['Math']['ceil'](_0x50d608/_0x3e8f6a)));window['localStorage']['setItem'](_0x3355cc,_0x40acd7);}function _0x563409(){const _0x3ae38f='llct-'+_0x1b7e81(_0x1c8492(_0x110140)),_0x3effa9=window['localStorage']['getItem'](_0x3ae38f);return _0x3effa9?window['parseInt'](_0x5dd94f(_0x3effa9),0x10)*_0x3e8f6a:null;}function _0x419a05(_0x4b9bb7){return new window['Promise']((_0x38ce71,_0x39c1d3)=>{_0x4b9bb7['then'](_0x38ce71,_0x39c1d3),window['setTimeout'](_0x39c1d3,0x1d4c0);});}}_0x4a39db['on']('_sendUsageRequest',(_0x5f87be,_0x2710f9)=>{if(_0x2710f9[0x0]!=_0x110140)return _0x24e99b('UsageLimit');_0x2710f9[0x1]={..._0x2710f9[0x1],'requestId':_0x14c4da};},{'priority':'high'}),_0x4a39db['on']('_sendUsageRequest',_0x4969a9=>{_0x152262(_0x4969a9['return'])&&(_0x57d377=!0x0,_0x2c1f6a(_0x4969a9['return']));},{'priority':'low'}),_0x478313['then'](()=>{_0x57d377||_0x24e99b('UsageLimit');});});function _0x213e5f(){return'auto'==_0x4a39db['editing']['view']['_overlayModeHint'];}function _0x547736(){_0x4a39db['editing']['view']['_overlayModeHint']='auto';}}function _0x9d6a1b(_0x303932){const _0x1e97ba=[new window['Promise'](_0x45da31=>setTimeout(_0x45da31,0x93ecc)),_0x478313['then'](()=>new window['Promise'](_0x26283f=>{let _0x463909=0x0;_0x4a39db['model']['on']('applyOperation',(_0x5c170f,_0x5aefcd)=>{_0x5aefcd[0x0]['isDocumentOperation']&&_0x463909++,0x5e8==_0x463909&&(_0x26283f(),_0x5c170f['off']());});}))];return window['Promise']['race'](_0x1e97ba)['then'](()=>_0x303932);}async function _0x489527(){await _0x478313,_0x4a39db['model']['change']=_0x42b88a,_0x4a39db['model']['enqueueChange']=_0x42b88a,_0x4a39db['enableReadOnlyMode']('model');}function _0x34bbd3(){return window['glob']&&window['glob']['triliumVersion'];}function _0x478b0b(){return _0x3ce44c('WebSocketGateway')&&'connected'==_0x2f3a37('WebSocketGateway')['state'];}function _0x1a8ce4(){return _0x3ce44c('RevisionViewerIntegration');}function _0x54a746(){return _0x3ce44c('TrackChangesDataGetter');}function _0x24b9f0(_0x262ef8){const _0x1b0114=_0x2de3d7();_0x4a39db[_0x1b0114]='commentsLicenseKey'+_0x262ef8,'Valid'!=_0x262ef8&&_0x489527();}function _0x2de3d7(){const _0x1dc87b=window['String'](window['performance']['now']())['replace']('.','');let _0x5c5655='K';for(let _0x1964a1=0x0;_0x1964a1<_0x1dc87b['length'];_0x1964a1+=0x2){let _0x205aa1=window['parseInt'](_0x1dc87b['substring'](_0x1964a1,_0x1964a1+0x2));_0x205aa1>=0x3e&&(_0x205aa1-=0x3e),_0x5c5655+=_0xbea766[_0x205aa1];}return _0x5c5655;}function _0x300a56(){const _0xb9c5c3=_0x36c625['split']('.');if(0x3!=_0xb9c5c3['length'])return null;return _0x4da4c1(_0xb9c5c3[0x1]);function _0x4da4c1(_0x368441){const _0x2d9407=_0x4fb931(_0x368441);return _0x2d9407&&_0x35bb02()?_0x2d9407:null;function _0x35bb02(){const _0x52fd6f=_0x2d9407['jti'],_0x49f21b=window['parseInt'](_0x52fd6f['substring'](_0x52fd6f['length']-0x8),0x10),_0x431709={..._0x2d9407,'jti':_0x52fd6f['substring'](0x0,_0x52fd6f['length']-0x8)};return delete _0x431709['vc'],_0x1c8492(_0x431709)==_0x49f21b;}}}async function _0x342858(){let _0x503a83=!0x0;try{const [_0x5b45d0,_0x467464,_0x8b4805]=_0x36c625['split']('.');return _0x17a3f0(_0x5b45d0),await _0x4f54d5(_0x5b45d0,_0x467464,_0x8b4805),_0x503a83;}catch{return!0x1;}function _0x17a3f0(_0x327549){const _0x29be55=_0x4fb931(_0x327549);_0x29be55&&'ES256'==_0x29be55['alg']||(_0x503a83=!0x1);}async function _0x4f54d5(_0x203d37,_0x148a3c,_0x457358){const _0x155a5d=window['Uint8Array']['from'](_0x4b9da0(_0x457358),_0x276f4f=>_0x276f4f['charCodeAt'](0x0)),_0x47c9bf=new window['TextEncoder']()['encode'](_0x203d37+'.'+_0x148a3c),_0x1803c7=window['crypto']['subtle'];if(!_0x1803c7)return;const _0x3f37da=await _0x1803c7['importKey']('jwk',_0x555126,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1803c7['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3f37da,_0x155a5d,_0x47c9bf)||(_0x503a83=!0x1);}}function _0x4fb931(_0x51474a){return _0x51474a['startsWith']('ey')?JSON['parse'](_0x4b9da0(_0x51474a)):null;}function _0x4b9da0(_0x13abaf){return window['atob'](_0x13abaf['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1c8492(_0x5273da){let _0x5a693e=0x1505;function _0x1d89b1(_0x163da8){for(let _0x472ec6=0x0;_0x472ec6<_0x163da8['length'];_0x472ec6++){const _0x38a4c6=_0x163da8['charCodeAt'](_0x472ec6);_0x5a693e=(_0x5a693e<<0x5)+_0x5a693e+_0x38a4c6,_0x5a693e&=_0x5a693e;}}function _0x4de3a8(_0x31ee89){Array['isArray'](_0x31ee89)?_0x31ee89['forEach'](_0x4de3a8):_0x31ee89&&'object'==typeof _0x31ee89?Object['entries'](_0x31ee89)['sort']()['forEach'](([_0x5aeab5,_0x52cd64])=>{_0x1d89b1(_0x5aeab5),_0x4de3a8(_0x52cd64);}):_0x1d89b1(window['String'](_0x31ee89));}return _0x4de3a8(_0x5273da),_0x5a693e>>>0x0;}function _0x1b7e81(_0x38a345){return _0x38a345['toString'](0x10)['padStart'](0x8,'0');}function _0x5dd94f(_0x457d86){return _0x457d86['split']('')['reverse']()['join']('');}function _0x3ce44c(_0x4a915f){return _0x4a39db['plugins']['has'](_0x4a915f);}function _0x2f3a37(_0x23dbef){return _0x4a39db['plugins']['get'](_0x23dbef);}function _0x42b88a(){}_0x24b9f0(await _0x3e55de());}(this);}['destroy'](){const _0x89ac03=this['editor']['plugins']['get'](oi),_0x1a832b=this['editor']['config']['get']('collaboration.channelId');for(const _0x41c420 of _0x89ac03['getCommentThreads']({'channelId':_0x1a832b}))_0x89ac03['_detachCommentThread'](_0x41c420['id']),_0x89ac03['_threads']['delete'](_0x41c420['id']);super['destroy']();}['hasMarkerForId'](_0x1c3950){return this['getAllMarkersForId'](_0x1c3950)['length']>0x0;}['getAllMarkersForId'](_0x1656b2){const _0x53156b=[];for(const _0x474c99 of this['editor']['model']['markers'])_0x474c99['name']['startsWith']('comment:'+_0x1656b2)&&_0x53156b['push'](_0x474c99);return _0x53156b;}['scrollToThreadMarker'](_0x40c6e1){setTimeout(()=>{const _0x3202de=this['_getTargetForId'](_0x40c6e1);_0x3202de&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x40c6e1&&_0x4c5b31({'target':_0x3202de[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x50fe1d){this['editor']['model']['change'](()=>{for(const _0x101423 of this['getAllMarkersForId'](_0x50fe1d))this['editor']['editing']['reconvertMarker'](_0x101423);});}['_attachArchivedThread'](_0x515187){const _0x42c11f=this['editor']['plugins']['get'](oi),_0x8c4947=this['editor']['plugins']['get'](di),_0x1f8424=_0x42c11f['getCommentThread'](_0x515187);if(!_0x1f8424['isAttached']){const _0x2814ff=_0x1f8424['attachTo'](()=>this['_getTargetForId'](_0x1f8424['id']));_0x8c4947['registerAnnotation'](_0x2814ff),_0x1f8424['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x30c767=this['editor'],_0x32a335=_0x30c767['plugins']['get'](_0x12e146);_0x30c767['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1ef5e0,_0x34a36d)=>{const {id:_0xcaa3e6}=fi(_0x1ef5e0['markerName']),_0x4650a6=_0x30c767['plugins']['get'](oi)['getCommentThread'](_0xcaa3e6),_0xd893f8=this['activeMarker']&&fi(this['activeMarker'])['id']===_0xcaa3e6;let _0x37d530;if(_0x4650a6&&_0x4650a6['isResolved']&&!_0xd893f8&&_0x1ef5e0['item'])return _0x34a36d['consumable']['consume'](_0x1ef5e0['item'],'addMarker:'+_0x1ef5e0['markerName']),_0x34a36d['consumable']['consume'](_0x1ef5e0['item'],'removeMarker:'+_0x1ef5e0['markerName']),null;const _0x2df288=['ck-comment-marker'];return _0xd893f8&&_0x2df288['push']('ck-comment-marker--active'),_0x37d530=_0x4650a6?.['length']?_0x4650a6['comments']['first']['author']['id']:_0x32a335['me']['id'],{'classes':_0x2df288,'attributes':{'data-comment':_0xcaa3e6,'data-author-id':_0x37d530}};}}),_0x30c767['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x13a6a4,{options:_0x4d2406})=>{if(_0x4d2406['showCommentHighlights'])return null;const _0x23bf22=_0x30c767['plugins']['get'](oi),_0x5dbf4b=_0x30c767['model']['markers']['get'](_0x13a6a4),{id:_0x5dd302,part:_0x1775c2}=fi(_0x13a6a4);return _0x5dbf4b&&!_0x5dbf4b['affectsData']||_0x4d2406['ignoreResolvedComments']&&_0x23bf22['getCommentThread'](_0x5dd302)?.['isResolved']?null:{'group':'comment','name':_0x1775c2?_0x5dd302+':'+_0x1775c2:_0x5dd302};}}),_0x30c767['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x570201,{writer:_0x2fb5d5})=>_0x2fb5d5['createElement']('$marker',{'data-name':'comment:'+_0x570201['getAttribute']('id')})}),_0x30c767['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5df7f5=this['editor'],_0x41a5c0=_0x5df7f5['plugins']['get'](oi),_0x50340b=new Set(),_0x3b4e2e=new Set();_0x5df7f5['model']['document']['registerPostFixer'](_0x26c3c8=>{let _0x2c0655=!0x1;for(const {name:_0x4e3d79,data:_0x123d5a}of _0x5df7f5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x23c4df,id:_0x27a1c6}=fi(_0x4e3d79);let _0x394eed=_0x123d5a['newRange'];if('comment'!==_0x23c4df||!_0x394eed)continue;const _0x5555ed='$graveyard'===_0x394eed['root']['rootName'];_0x5555ed||(_0x394eed=_i(_0x394eed,_0x5df7f5['model']),!_0x394eed||_0x394eed['isCollapsed']||!_0x123d5a['newRange']||_0x394eed['isEqual'](_0x123d5a['newRange']))?_0x5df7f5['model']['hasContent'](_0x394eed)&&!_0x5555ed?this['isThreadsLoadingPaused']?_0x50340b['add'](_0x4e3d79):this['_handleThreadMarker'](_0x4e3d79,_0x27a1c6):(_0x3b4e2e['add'](_0x4e3d79),_0x50340b['delete'](_0x4e3d79),_0x26c3c8['removeMarker'](_0x4e3d79),_0x2c0655=!0x0):(_0x26c3c8['updateMarker'](_0x4e3d79,{'range':_0x394eed}),_0x2c0655=!0x0);}return _0x2c0655;}),this['on']('change:isThreadsLoadingPaused',(_0x461961,_0x2406f3,_0x3869fb)=>{if(!_0x3869fb&&_0x50340b['size'])for(const _0x37cd1a of _0x50340b){const {id:_0x539a5e}=fi(_0x37cd1a);_0x50340b['delete'](_0x37cd1a),_0x5df7f5['model']['markers']['get'](_0x37cd1a)&&this['_handleThreadMarker'](_0x37cd1a,_0x539a5e);}}),this['listenTo'](_0x5df7f5['model']['document'],'change',()=>{for(const {name:_0xb90bd7,data:{newRange:_0x41d8a7}}of _0x5df7f5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x101da5,id:_0x47342b}=fi(_0xb90bd7);if('comment'!==_0x101da5)continue;const _0x294b29=_0x41a5c0['getCommentThread'](_0x47342b),_0x345261=this['hasMarkerForId'](_0x47342b);_0x294b29&&(!_0x294b29['_hasTargetInContent']&&_0x41d8a7&&_0x5df7f5['editing']['view']['once']('render',()=>{const _0x1474a0=_0x5df7f5['plugins']['get'](ti),_0x4b3d63=_0x41a5c0['_threadToController']['get'](_0x294b29)['view'];_0x1474a0['getByInnerView'](_0x4b3d63)['refreshVisibility']();},{'priority':'low'}),_0x294b29['_hasTargetInContent']=_0x345261||!!_0x41d8a7),_0x41d8a7||(_0x3b4e2e['add'](_0xb90bd7),_0x50340b['delete'](_0xb90bd7));}for(const _0x214611 of _0x3b4e2e){const {id:_0x526351}=fi(_0x214611),_0x4c83bd=_0x41a5c0['getCommentThread'](_0x526351);if(_0x50340b['delete'](_0x214611),!_0x4c83bd)continue;const _0x298376=this['hasMarkerForId'](_0x526351);_0x298376||_0x4c83bd['isSubmitted']?_0x298376||_0x4c83bd['unlinkedAt']||_0x4c83bd['setUnlinkedAt'](new Date()):_0x4c83bd['remove']();}_0x3b4e2e['clear']();});}['_handleInitialThreads'](_0x1a8a13){_0x1a8a13['forEach'](_0x2bcef2=>{_0x2bcef2['unlinkedAt']&&this['_attachArchivedThread'](_0x2bcef2['id']);});}['_getTargetForId'](_0x5bd815){const _0x3123e2=this['editor'],_0x15d850=this['getAllMarkersForId'](_0x5bd815);return _0x4943c8(_0x3123e2['editing'],_0x15d850);}['_getTextContext'](_0x2ebb47){const _0x1fd9c1=this['getAllMarkersForId'](_0x2ebb47);let _0x56d03f='',_0x38f578=!0x1;for(const _0x41365f of _0x1fd9c1){const _0x1a698e=_0x41365f['getRange']();for(const _0x1a5932 of Array['from'](_0x1a698e['getItems']()))_0x1a5932['is']('$textProxy')?(_0x56d03f&&_0x38f578&&(_0x56d03f+='\x20',_0x38f578=!0x1),_0x56d03f+=_0x1a5932['data']):_0x38f578=!0x0;_0x38f578=!0x0;}return _0x56d03f['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x333503,_0x365a73){const _0x3d62ad=this['editor'],_0x6a7819=_0x3d62ad['plugins']['get'](oi);let _0x534b82=_0x6a7819['getCommentThread'](_0x365a73);const _0x2be662=_0x3d62ad['config']['get']('collaboration.channelId'),_0xbdcb4=_0x3d62ad['plugins']['get'](di);return _0x534b82&&(_0x534b82['unlinkedAt']&&_0x534b82['setUnlinkedAt'](null),_0x534b82['isAttached'])||(this['getAllMarkersForId'](_0x365a73)[0x0]['managedUsingOperations']?_0x6a7819['fetchCommentThread']({'channelId':_0x2be662,'threadId':_0x365a73})['then'](_0x33fc13=>{if('destroyed'!==_0x3d62ad['state']){if(_0x534b82=_0x33fc13,_0x534b82&&!_0x534b82['isAttached']){const _0xfe03c3=_0x534b82['attachTo'](()=>this['_getTargetForId'](_0x365a73));_0xbdcb4['registerAnnotation'](_0xfe03c3),_0x534b82['isResolved']&&this['_reconvertMarkers'](_0x365a73);}else{if(!_0x534b82){const _0x5735f0=this['getAllMarkersForId'](_0x365a73);_0x3d62ad['model']['change'](_0x3aab2d=>{for(const _0x1b6d07 of _0x5735f0)_0x3aab2d['removeMarker'](_0x1b6d07);});}}}}):_0x3d62ad['editing']['view']['once']('render',()=>{if(_0x6a7819['getCommentThread'](_0x365a73))return;const _0x5c4efc=_0x3d62ad['plugins']['get'](ti);_0x534b82=_0x6a7819['openNewCommentThread']({'channelId':_0x2be662,'threadId':_0x365a73,'target':()=>this['_getTargetForId'](_0x365a73),'context':{'type':'text','value':this['_getTextContext'](_0x365a73)}});const _0x165913=_0x6a7819['_threadToController']['get'](_0x534b82)['view'],_0x55a837=_0x5c4efc['getByInnerView'](_0x165913);_0x55a837&&_0xbdcb4['registerAnnotation'](_0x55a837);},{'priority':'low'})),_0x534b82;}['_handleThreadMarker'](_0x5ec930,_0xd81317){const _0x262e96=this['_attachMarkerToThread'](_0x5ec930,_0xd81317);_0x262e96&&!_0x262e96['context']&&_0x262e96['setContext']({'type':'text','value':this['_getTextContext'](_0xd81317)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1c6dea=this['editor'];_0x15978d(_0x1c6dea['model'],({left:_0x4782af,entered:_0x1d2fa0})=>{for(const _0x236c76 of _0x4782af)if(Ai(_0x236c76)){_0x1c6dea['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1c6dea['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x24eaeb of _0x1d2fa0)if(Ai(_0x24eaeb)){_0x1c6dea['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1c6dea['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x393c6e(_0x57653d)));break;}});}};function gi(_0x1b8704,_0x4e7de0){return _0x4e7de0?_0x1b8704+':'+_0x4e7de0:_0x1b8704;}function _i(_0x2b4f0f,_0x1ff514){const _0x448f57=_0x1ff514['schema'],_0x274db4=_0x1ff514['createRange'](_0x2b4f0f['start']);for(const _0x855aa7 of _0x2b4f0f['getWalker']()){const {type:_0x6b90f0,item:_0x175f5d,nextPosition:_0x34bcc7}=_0x855aa7;if('text'===_0x6b90f0||_0x448f57['isObject'](_0x175f5d)){const _0x5e8eca=_0x1ff514['createPositionBefore'](_0x175f5d);_0x274db4['isCollapsed']&&(_0x274db4['start']=_0x5e8eca),_0x274db4['end']=_0x34bcc7;}}return _0x274db4;}function Ai(_0x3990e7){return'comment'===fi(_0x3990e7['name'])['group'];}var vi=class extends _0x3d6b36{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x4b8f76=this['editor'],_0x389788=_0x4b8f76['plugins']['get'](oi),_0x26192f=_0x4b8f76['plugins']['get'](wi),_0x2904ed=_0x4b8f76['plugins']['get'](ti),_0x3a8049=_0x4b8f76['plugins']['get'](di);_0x4b8f76['ui']['componentFactory']['add']('comment',()=>{const _0x16620d=this['_createUIButton'](_0x2d6eba);return _0x16620d['tooltip']=!0x0,_0x16620d;}),_0x4b8f76['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x3a8049['addSourceCollector'](()=>{const _0x2004af=[];for(const [_0x25e1b9,_0x4fb74c]of _0x389788['_threadToController']){const _0x337c81=_0x26192f['getAllMarkersForId'](_0x25e1b9['id']),_0x4a2b2b=_0x337c81['map'](_0xda799d=>_0xda799d['getRange']());_0x337c81['length']>0x0&&_0x2004af['push']([_0x4fb74c['view'],_0x4a2b2b]);}return _0x2004af;}),this['listenTo'](_0x2904ed,'change:activeAnnotations',(_0x59a21f,_0x444c13,_0x283989)=>{const _0x7a944e=Array['from'](_0x283989)['map'](_0xcfb80f=>_0xcfb80f['innerView'])['find'](_0x5478b5=>_0x389788['_viewToController']['has'](_0x5478b5));if(!_0x7a944e)return void(_0x26192f['activeMarker']=null);const _0x2bd0be=_0x389788['_viewToController']['get'](_0x7a944e)['model']['id'],_0x59f646='comment:'+_0x2bd0be;_0x2bd0be&&_0x26192f['hasMarkerForId'](_0x2bd0be)?_0x26192f['activeMarker']=_0x59f646:_0x26192f['activeMarker']&&(_0x26192f['activeMarker']=null);}),this['listenTo'](_0x389788,'removeCommentThread',(_0x4a08be,{threadId:_0x25cdeb,isFromAdapter:_0x56a566})=>{!_0x56a566&&_0x4b8f76['ui']['focusTracker']['isFocused']&&_0x26192f['hasMarkerForId'](_0x25cdeb)&&_0x4b8f76['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x389788,'addComment',(_0x1bf3ff,{threadId:_0x4e997d,isFromAdapter:_0x20b105})=>{!_0x20b105&&_0x26192f['hasMarkerForId'](_0x4e997d)&&_0x389788['hasCommentThread'](_0x4e997d)&&0x1===_0x389788['getCommentThread'](_0x4e997d)['length']&&(_0x4b8f76['editing']['view']['focus'](),_0x1bf3ff['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x17b8cc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22b8b8;for(const _0x192ec9 in _0x17b8cc){const _0x5c5397=_0x192ec9,_0x13e14b=_0x17b8cc[_0x5c5397];if('commentsLicenseKeyValid'==_0x13e14b||'commentsLicenseKeyInvalid'==_0x13e14b||'commentsLicenseKeyExpired'==_0x13e14b||'commentsLicenseKeyDomainLimit'==_0x13e14b||'commentsLicenseKeyNotAllowed'==_0x13e14b||'commentsLicenseKeyEvaluationLimit'==_0x13e14b||'commentsLicenseKeyUsageLimit'==_0x13e14b){delete _0x17b8cc[_0x5c5397],_0x22b8b8=_0x13e14b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x160659){const _0x3cb776=this['editor'],_0x1e15b3=new _0x160659(_0x3cb776['locale']),_0x1fb318=_0x3cb776['commands']['get']('addCommentThread');return _0x1e15b3['set']({'label':Et(_0x3cb776['locale'],'Comment'),'icon':_0xf9075a}),_0x1e15b3['bind']('isEnabled')['to'](_0x1fb318,'isEnabled',_0x1fb318,'hasContent',(_0x23c633,_0x20aba6)=>_0x23c633&&_0x20aba6),this['listenTo'](_0x1e15b3,'execute',()=>{_0x1fb318['execute']();}),_0x1e15b3;}},yi=class extends _0x3d6b36{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x37b291){super(_0x37b291),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5813fb,_0x1cedec,_0x594988)=>{_0x594988?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x57e8bb,_0x27cd04]of this['editor']['commands'])_0x27cd04['affectsData']&&'addCommentThread'!==_0x57e8bb&&_0x27cd04['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 _0x22bced=this['editor']['editing']['view']['document'];this['listenTo'](_0x22bced,'cut',_0x2af4c9=>_0x2af4c9['stop'](),{'priority':'highest'}),this['listenTo'](_0x22bced,'clipboardInput',_0x1a1512=>_0x1a1512['stop'](),{'priority':'highest'}),this['listenTo'](_0x22bced,'delete',_0x4dee9a=>_0x4dee9a['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4b34d6,_0x291f77]of this['editor']['commands'])_0x291f77['affectsData']&&'addCommentThread'!==_0x4b34d6&&_0x291f77['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']);}},Ti=class extends _0x41d5ed{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xca429e){super(_0xca429e),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2c2fb6=this['context']['plugins']['get'](ti);this['listenTo'](_0x2c2fb6,'_activateAnnotation',(_0x578ee5,_0x162aaf)=>{for(const _0x7965f1 of this['activeUIs']){const _0x1b44a7=this['_uis']['get'](_0x7965f1);(0x0,this['uisData']['get'](_0x7965f1)['filter'])(_0x162aaf)&&_0x1b44a7['setActiveAnnotation'](_0x162aaf);}}),this['listenTo'](_0x2c2fb6,'_deactivateAllAnnotations',()=>{for(const _0x364029 of this['activeUIs'])this['_uis']['get'](_0x364029)['setActiveAnnotation'](null);}),this['listenTo'](_0x2c2fb6['_visibleAnnotations'],'add',(_0x53fc77,_0x1f5e59)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1f5e59);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ad181){return this['activeUIs']['has'](_0x4ad181);}['activate'](_0x4d6f83,_0x3a0c87=this['defaultFilter']){const _0x37e0b4=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x4d6f83))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x4d6f83});this['isActive'](_0x4d6f83)&&this['deactivate'](_0x4d6f83),this['activeUIs']['add'](_0x4d6f83);const _0x2749fb=new Jt();Qt({'source':_0x37e0b4['_visibleAnnotations'],'target':_0x2749fb,'filter':_0x3a0c87}),this['uisData']['set'](_0x4d6f83,{'collection':_0x2749fb,'filter':_0x3a0c87});const _0x1753a1=this['_uis']['get'](_0x4d6f83);_0x1753a1['attach'](_0x2749fb),this['listenTo'](_0x1753a1,'change:activeAnnotation',(_0x4e576a,_0x3b8e13,_0x5c79e2,_0x43b4fd)=>{_0x43b4fd&&_0x37e0b4['_removeActiveAnnotation'](_0x43b4fd),_0x5c79e2&&_0x37e0b4['_addActiveAnnotation'](_0x5c79e2);});}['deactivate'](_0x299fa3){if(this['activeUIs']['delete'](_0x299fa3),!this['_uis']['has'](_0x299fa3))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x299fa3});const _0xe38945=this['_uis']['get'](_0x299fa3);_0xe38945['detach'](),this['stopListening'](_0xe38945),this['uisData']['get'](_0x299fa3)['collection']['destroy'](),this['uisData']['delete'](_0x299fa3);}['switchTo'](_0x3ca5b2){if(!this['_uis']['has'](_0x3ca5b2))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x3ca5b2});const _0x340311=this['context']['plugins']['get'](ti),_0x533d1a=Array['from'](_0x340311['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3ca5b2);const _0x3c7d43=this['_uis']['get'](_0x3ca5b2);_0x3c7d43['setActiveAnnotation'](_0x533d1a),_0x3c7d43['_setSelectedAnnotations']&&_0x533d1a&&_0x3c7d43['_setSelectedAnnotations']([_0x533d1a]);}['deactivateAll'](){for(const _0x1ef4cf of this['activeUIs'])this['deactivate'](_0x1ef4cf);}['register'](_0x94ec66,_0x3bcf23){if(this['_uis']['has'](_0x94ec66))throw new _0x6d6638('annotationsuis-register-already-registered');if('function'!=typeof _0x3bcf23['attach']||'function'!=typeof _0x3bcf23['detach']||'function'!=typeof _0x3bcf23['setActiveAnnotation'])throw new _0x6d6638('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x94ec66,_0x3bcf23);}['refilterAnnotations'](){const _0x5e7764=this['context']['plugins']['get'](ti)['collection'],_0x1b3398=new Map(),_0x516711=Array['from'](this['activeUIs']);for(const _0x38b952 of this['activeUIs']){const _0x2acb2f=this['uisData']['get'](_0x38b952)['collection'];for(const _0x4bdb3c of _0x2acb2f)_0x1b3398['set'](_0x4bdb3c,_0x38b952);}for(const _0x4ce132 of _0x5e7764){const _0x409ef1=_0x1b3398['get'](_0x4ce132);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ce132);const _0x38fc5c=_0x516711['find'](_0x5531b9=>this['uisData']['get'](_0x5531b9)['filter'](_0x4ce132));_0x409ef1!==_0x38fc5c&&(_0x409ef1&&this['uisData']['get'](_0x409ef1)['collection']['remove'](_0x4ce132),_0x38fc5c&&this['uisData']['get'](_0x38fc5c)['collection']['add'](_0x4ce132));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x488c3c){const _0x103473=[];for(const _0x12dab of this['activeUIs']){(0x0,this['uisData']['get'](_0x12dab)['filter'])(_0x488c3c)&&_0x103473['push'](_0x12dab);}if(_0x103473['length']>0x1)throw new _0x6d6638('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x103473,'annotationType':_0x488c3c['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x48a5c0('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xcf7cb7){super(_0xcf7cb7);const _0x40cd25=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 _0x16deef(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x40cd25['to']('class')],'style':{'minHeight':_0x40cd25['to']('minHeight',_0x1698e4=>'number'==typeof _0x1698e4?Ci(_0x1698e4+0xa):null)},'dir':_0xcf7cb7['uiLanguageDirection'],'role':'application','aria-label':Et(_0xcf7cb7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0xcf7cb7,'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',_0x2f78a0=>{this['_updateItemPositionInFocusables'](_0x2f78a0['source']);}),this['list']['forEach'](_0x47f0e9=>{this['focusTracker']['add'](_0x47f0e9['element']),this['_updateItemPositionInFocusables'](_0x47f0e9);}),this['list']['on']('change',(_0x2fe90c,_0x1cbeb7)=>{for(const _0x4ee23a of _0x1cbeb7['removed'])this['focusTracker']['remove'](_0x4ee23a['element']),this['focusables']['remove'](_0x4ee23a);for(const _0x2b1419 of _0x1cbeb7['added'])this['focusTracker']['add'](_0x2b1419['element']),this['_updateItemPositionInFocusables'](_0x2b1419);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x422640){const _0x3f4928=this['focusables']['getIndex'](_0x422640);let _0x1de49a,_0x4d9e7a;for(const _0x1699c1 of this['focusables'])if(_0x422640['top']<_0x1699c1['top']){_0x1de49a=_0x1699c1;break;}if(_0x4d9e7a=_0x1de49a?this['focusables']['getIndex'](_0x1de49a):this['focusables']['length'],-0x1!==_0x3f4928){if(_0x3f4928===_0x4d9e7a-0x1)return;this['focusables']['remove'](_0x422640),_0x4d9e7a=_0x1de49a?this['focusables']['getIndex'](_0x1de49a):this['focusables']['length'];}this['focusables']['add'](_0x422640,_0x4d9e7a);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x48a5c0('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3ee364){super(_0x3ee364),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1a5289,_0x4567d9)=>_0x1a5289+_0x4567d9),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c088e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c088e['to']('isAnimationDisabled',_0x544fcb=>_0x544fcb?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c088e['to']('top',_0x50c2d4=>bi(_0x50c2d4))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xb07754=this['element']['clientHeight'];_0xb07754&&(this['height']=_0xb07754);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x41d5ed{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bc979){super(_0x5bc979),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 _0x1a594f=this['context']['config']['get']('sidebar.container');_0x1a594f&&this['setContainer'](_0x1a594f);}['setContainer'](_0x11254c){if(!Oi(_0x11254c))throw new _0x6d6638('sidebar-setcontainer-invalid-element');this['container']=_0x11254c;}['_attachToContainer']({viewClass:_0x28ce66='',spaceBetweenItems:_0x16c91c=0x19}={}){if(!Oi(this['container']))throw new _0x6d6638('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x28ce66,this['_spaceBetweenItems']=_0x16c91c;}['rearrange']({removedAnnotation:_0x380017,previousAnnotation:_0x4faefd,nextAnnotation:_0x243fc9}){const _0x208a0c=this['getSidebarItemView'](_0x380017);this['view']['list']['remove'](_0x208a0c),this['_destroySidebarItemView'](_0x380017),_0x4faefd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4faefd)),_0x243fc9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x243fc9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3005c2,activatedAnnotation:_0xb690d8,disableAnimationOnActivatedAnnotation:_0x893c7}){if(this['_activeAnnotation']=_0xb690d8,_0x3005c2){_0x3005c2['isActive']=!0x1;const _0x489dc=this['getSidebarItemView'](_0x3005c2);_0x489dc&&_0x893c7&&(_0x489dc['isAnimationDisabled']=!0x1);}if(_0xb690d8){const _0x56b645=this['getSidebarItemView'](_0xb690d8);_0x56b645&&(_0xb690d8['isActive']=!0x0,_0x893c7&&(_0x56b645['isAnimationDisabled']=!0x0,_0x56b645['top']+=0x1),this['_alignToTargetRect'](_0x56b645));}}['_detachFromContainer'](_0x207e19){if(this['view']['element']['remove'](),_0x207e19){for(const _0x1a3adf of _0x207e19)this['_destroySidebarItemView'](_0x1a3adf);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x390fd1,_0xefa00){_0xefa00||(_0xefa00=_0x390fd1['view']);const _0x3a7a3d=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3a7a3d,_0x390fd1),this['_annotationToSidebarItemView']['set'](_0x390fd1,_0x3a7a3d),_0x3a7a3d['content']['add'](_0xefa00),this['listenTo'](_0x390fd1['view'],'change:targetRect',(_0x2e710b,_0x577fff,_0x5b4db2)=>{const _0x515854=this['_getTargetTop'](_0x390fd1,_0x5b4db2);_0x3a7a3d['_targetTop']!=_0x515854&&(_0x3a7a3d['_targetTop']=_0x515854,this['_setItemTop'](_0x3a7a3d,_0x515854));}),this['listenTo'](_0x3a7a3d,'change:top',()=>{this['_recalculate'](_0x3a7a3d,'top');}),this['listenTo'](_0x3a7a3d,'change:bottom',()=>{this['_recalculate'](_0x3a7a3d,'bottom');}),this['_alignToTargetRect'](_0x3a7a3d);const _0x36ad83=this['_getItemBefore'](_0x3a7a3d);return _0x36ad83&&this['_alignAfterItem'](_0x36ad83,_0x3a7a3d)||this['_alignToTargetRect'](_0x3a7a3d),this['_updateLastItem'](),this['view']['list']['add'](_0x3a7a3d),_0x3a7a3d;}['_alignForTopChange'](_0x2675a7){if(!_0x2675a7['content']['length'])return;const _0x4b707e=this['_getItemBefore'](_0x2675a7);if(!_0x4b707e)return;const _0x3055bb=this['_sidebarItemViewToAnnotation']['get'](_0x4b707e),_0x1d068a=this['_activeAnnotation'];_0x1d068a&&_0x1d068a===_0x3055bb?this['_alignAfterItem'](_0x4b707e,_0x2675a7):this['_alignBeforeItem'](_0x2675a7,_0x4b707e);}['_alignForBottomChange'](_0x2bdf51){if(!_0x2bdf51['content']['length'])return;const _0x356ed0=this['_getItemAfter'](_0x2bdf51);if(!_0x356ed0)return;const _0x582219=this['_sidebarItemViewToAnnotation']['get'](_0x356ed0),_0x4d35a3=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x354c30=this['_activeAnnotation'];_0x354c30&&_0x354c30===_0x582219&&_0x4d35a3?(this['_alignBeforeItem'](_0x356ed0,_0x2bdf51),this['_alignAfterItem'](_0x2bdf51,_0x356ed0)):_0x354c30&&_0x354c30===_0x582219?this['_alignBeforeItem'](_0x356ed0,_0x2bdf51):this['_alignAfterItem'](_0x2bdf51,_0x356ed0);}['_recalculate'](_0x3ec7fd,_0x5d3d92){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3824dd,changedProp:_0x142c3a}of this['_recalculateBuffer'])'top'===_0x142c3a?this['_alignForTopChange'](_0x3824dd):this['_alignForBottomChange'](_0x3824dd);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3ec7fd,'changedProp':_0x5d3d92});}['getSidebarItemView'](_0x58e238){return this['_annotationToSidebarItemView']['get'](_0x58e238);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xd56d44){const _0x398645=this['getSidebarItemView'](_0xd56d44);this['stopListening'](_0x398645),this['stopListening'](_0xd56d44['view']),_0x398645['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xd56d44),this['_sidebarItemViewToAnnotation']['delete'](_0x398645);}['_createSidebarView'](){const _0x5b8489=new Ii(this['context']['locale']);return _0x5b8489['render'](),this['on']('change:_lastItem',(_0x357426,_0x1f979e,_0x2567a5,_0x4dc082)=>{_0x4dc082&&_0x5b8489['unbind']('minHeight'),_0x2567a5?_0x5b8489['bind']('minHeight')['to'](_0x2567a5,'bottom'):_0x5b8489['minHeight']=null;}),_0x5b8489;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x46caf0){const _0x1f3750=this['_sidebarItemViewToAnnotation']['get'](_0x46caf0),_0x48c2cf=_0x1f3750&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1f3750)-0x1);return _0x48c2cf&&this['getSidebarItemView'](_0x48c2cf)||null;}['_getItemAfter'](_0x39427d){const _0x579848=this['_sidebarItemViewToAnnotation']['get'](_0x39427d),_0x425f50=_0x579848&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x579848)+0x1);return _0x425f50&&this['getSidebarItemView'](_0x425f50)||null;}['_alignBeforeItem'](_0x5cb43e,_0x5db2ca){_0x5cb43e['updateHeight']();const _0x4542e4=Ni(_0x5db2ca['bottom']+this['_spaceBetweenItems'],_0x5cb43e['top']);return!!_0x4542e4&&(this['_setItemTop'](_0x5db2ca,_0x5db2ca['top']-_0x4542e4),!0x0);}['_alignAfterItem'](_0x32087b,_0x2868f5){_0x32087b['updateHeight']();const _0x4abbd6=Ni(_0x32087b['bottom']+this['_spaceBetweenItems'],_0x2868f5['top']);return!!_0x4abbd6&&(this['_setItemTop'](_0x2868f5,_0x2868f5['top']+_0x4abbd6,!0x1),!0x0);}['_alignToTargetRect'](_0xddee3c){const _0x38e844=this['_sidebarItemViewToAnnotation']['get'](_0xddee3c);if(!_0x38e844||!_0x38e844['target']||!_0x38e844['targetRect'])return;const _0x4ce71d=this['_getTargetTop'](_0x38e844,_0x38e844['targetRect']);this['_setItemTop'](_0xddee3c,_0x4ce71d);}['_getTargetTop'](_0x32bc9f,_0xca01db){if(null===_0xca01db)return 0x0;if(_0x32bc9f['target']instanceof _0x3d1cc4)return _0xca01db['top'];{const _0x17f06a=new _0x3d1cc4(this['view']['element'])['top'];return _0xca01db['top']-_0x17f06a;}}['_setItemTop'](_0x5e2a67,_0x169183,_0x224770=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x224770&&(_0x169183=Math['max'](_0x169183,this['_getMaxAvailableTop'](_0x5e2a67))),_0x5e2a67['top']=_0x169183;}['_getMaxAvailableTop'](_0x3c9fb1){let _0x4b9c0c=this['_getItemBefore'](_0x3c9fb1),_0x593b9d=0x0;for(;_0x4b9c0c;)_0x4b9c0c['updateHeight'](),_0x593b9d+=this['_spaceBetweenItems']+_0x4b9c0c['height'],_0x4b9c0c=this['_getItemBefore'](_0x4b9c0c);return _0x593b9d;}};function Ni(_0x1b95b0,_0x369ef3){return Math['max'](_0x1b95b0-_0x369ef3,0x0);}function Oi(_0x54fd2d){return null!==_0x54fd2d&&'object'==typeof _0x54fd2d&&0x1===_0x54fd2d['nodeType'];}var Mi=class extends _0x41d5ed{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x277c20){super(_0x277c20),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4284a7(),this['_refreshPositioningDebounced']=_0xb07f85(()=>{_0x277c20['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x413ff0=this['context']['plugins']['get'](Ti),_0xde9028=this['context']['plugins']['get'](ki);_0x413ff0['register']('wideSidebar',this),_0xde9028['container']&&_0x413ff0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x466489){if(_0x466489===this['activeAnnotation'])return;const _0x2e20e5=this['context']['plugins']['get'](ki);_0x2e20e5['_activeAnnotation']=_0x466489;const _0x3df33a=this['activeAnnotation'];_0x2e20e5['refresh']({'blurredAnnotation':_0x3df33a,'activatedAnnotation':_0x466489}),this['activeAnnotation']=_0x466489;}['attach'](_0x3f6f00){this['annotations']=_0x3f6f00;const _0x53ab51=this['context']['plugins']['get'](ki);if(_0x53ab51['_annotations']=_0x3f6f00,this['isAttached'])throw new _0x6d6638('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x53ab51,'set:container',()=>{this['detach'](),this['listenTo'](_0x53ab51,'change:container',_0x265b8a=>{_0x265b8a['off'](),this['attach'](_0x3f6f00);});}),_0x53ab51['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x49ba7b=_0x53f65b=>{_0x53f65b['updateTargetRect'](),_0x53ab51['addAnnotation'](_0x53f65b);};for(const _0x36187b of _0x3f6f00)_0x49ba7b(_0x36187b);this['listenTo'](_0x3f6f00,'add',(_0x5f4bd5,_0x36a5ff)=>{_0x49ba7b(_0x36a5ff);}),this['listenTo'](_0x3f6f00,'remove',(_0x323700,_0x1570df,_0x5ca55d)=>{_0x53ab51['rearrange']({'removedAnnotation':_0x1570df,'previousAnnotation':_0x3f6f00['get'](_0x5ca55d-0x1),'nextAnnotation':_0x3f6f00['get'](_0x5ca55d+0x1)}),_0x1570df===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3f6f00,'focus',(_0x56ef55,_0x1d814f)=>{this['setActiveAnnotation'](_0x1d814f);}),this['listenTo'](_0x3f6f00,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b09ad=this['context']instanceof _0x59fc06?this['context']['editors']:new _0x4284a7([this['context']]);for(const _0x23596f of _0x1b09ad)this['_integrateWithEditorAnnotations'](_0x23596f);this['listenTo'](_0x1b09ad,'add',(_0x2ad225,_0x1dafa9)=>{this['listenTo'](_0x1dafa9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1dafa9);});}),this['listenTo'](_0x1b09ad,'remove',(_0x494bdc,_0xfe041a)=>{_0xfe041a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xfe041a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x6d6638('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x557ec7=this['context']['plugins']['get'](ki);_0x557ec7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x557ec7),this['stopListening'](this['annotations']),this['context']instanceof _0x59fc06&&this['stopListening'](this['context']['editors']);for(const _0x364359 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x364359);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c818c){if(!_0x5c818c['plugins']['has']('EditorAnnotations'))return;const _0x17fed3=_0x5c818c['plugins']['get']('EditorAnnotations'),_0x5b78b5=()=>{const _0x45fdbf=_0x17fed3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x45fdbf[0x0]||null);};this['listenTo'](_0x17fed3,'refresh',_0x5b78b5),this['listenTo'](_0x17fed3,'blur',(_0x23433d,{isAnnotationTracked:_0x2d4fb8})=>{this['activeAnnotation']&&_0x2d4fb8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x17fed3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5c45b5=>{_0x17fed3['hasDomSelection']()&&(_0x5b78b5(),_0x5c45b5['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x17fed3);}['_destroyEditorAnnotationsIntegration'](_0x1fcfeb){this['stopListening'](_0x1fcfeb),this['_editorAnnotations']['remove'](_0x1fcfeb);}},Ri=class extends _0x2d6eba{['counterView'];constructor(_0x4bad61){super(_0x4bad61);const _0x53a17e=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x479669,_0x4cd65d)=>_0x479669?'...':_0x4cd65d['toString']()),this['set']('annotationType',''),this['icon']=_0xf9075a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x53a17e['to']('annotationType',_0x1e06b1=>'ck-annotation-counter__badge--'+_0x1e06b1),_0x53a17e['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x53a17e['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x41d5ed{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1af2dd){super(_0x1af2dd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3dfafb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4284a7(),this['_refreshPositioningDebounced']=_0xb07f85(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x44c76b(this['context']['locale']),this['balloonPanelView']=new _0x35dc9c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5258d5){this['annotations']=_0x5258d5;const _0x3af9bc=this['context']['plugins']['get'](ki),_0x5b33dd=this['balloonPanelView'];if(_0x3af9bc['_annotations']=_0x5258d5,this['isAttached'])throw new _0x6d6638('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3af9bc,'set:container',()=>{this['detach'](),this['listenTo'](_0x3af9bc,'change:container',_0x5325b8=>{_0x5325b8['off'](),this['attach'](_0x5258d5);});}),_0x3af9bc['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x443d9f=_0x149be4=>{const _0x33cb0b=new Ri(this['context']['locale']);_0x3af9bc['addAnnotation'](_0x149be4,_0x33cb0b),this['_annotationToNarrowView']['set'](_0x149be4,_0x33cb0b),_0x33cb0b['bind']('isDirty','annotationType','number')['to'](_0x149be4['view'],'isDirty','type','length'),_0x33cb0b['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5b33dd['content']['first']!==_0x149be4['view']?(this['_showBalloon'](_0x149be4),_0x149be4['view']['element']['focus'](),this['setActiveAnnotation'](_0x149be4)):this['setActiveAnnotation'](null);});};for(const _0x2a7b8c of _0x5258d5)_0x443d9f(_0x2a7b8c);this['listenTo'](_0x5258d5,'add',(_0x33bf24,_0x27473a)=>{_0x443d9f(_0x27473a);}),this['listenTo'](_0x5258d5,'remove',(_0x8390f7,_0x5f0e1d,_0x160ce3)=>{this['_annotationToNarrowView']['get'](_0x5f0e1d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5f0e1d),_0x3af9bc['rearrange']({'removedAnnotation':_0x5f0e1d,'previousAnnotation':_0x5258d5['get'](_0x160ce3-0x1),'nextAnnotation':_0x5258d5['get'](_0x160ce3+0x1)}),_0x5f0e1d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5258d5,'focus',(_0x177234,_0x261a0d)=>{this['setActiveAnnotation'](_0x261a0d);}),this['listenTo'](_0x5258d5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x50cad9,_0x5c3719)=>{_0x5c3719['keyCode']===_0xa09830['esc']&&_0x5b33dd['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5b33dd['content']['first']),this['_hideBalloon'](),_0x5c3719['stopPropagation'](),_0x5c3719['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x270bb5,_0x1dd60e)=>{const _0x7b7395=_0x1dd60e['target'];_0x5b33dd['isVisible']&&_0x5b33dd['element']['contains'](_0x7b7395)||_0x3af9bc['view']['element']['contains'](_0x7b7395)||_0x270bb5['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x495952=>_0x495952['contains'](_0x7b7395))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xc472db=this['context']instanceof _0x59fc06?this['context']['editors']:new _0x4284a7([this['context']]);for(const _0x417fbd of _0xc472db)this['_integrateWithEditorAnnotations'](_0x417fbd);this['listenTo'](_0xc472db,'add',(_0x35287c,_0x3bfe6a)=>{this['listenTo'](_0x3bfe6a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3bfe6a);});}),this['listenTo'](_0xc472db,'remove',(_0x433810,_0x4aa95f)=>{_0x4aa95f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4aa95f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x21695d){if(_0x21695d===this['activeAnnotation'])return;const _0x2f73fa=this['context']['plugins']['get'](ki);_0x2f73fa['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x21695d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x21695d&&_0x2f73fa['getSidebarItemView'](_0x21695d)?this['_showBalloon'](_0x21695d):this['_hideBalloon'](),this['activeAnnotation']=_0x21695d;}['detach'](){if(!this['isAttached'])throw new _0x6d6638('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf3d8fa=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5dfbc5=>_0x5dfbc5['destroy']()),this['_annotationToNarrowView']['clear'](),_0xf3d8fa['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x59fc06&&this['stopListening'](this['context']['editors']);for(const _0x568f8a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x568f8a);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'](_0x49a4b4){if(!_0x49a4b4['plugins']['has']('EditorAnnotations'))return;const _0xaf4c52=_0x49a4b4['plugins']['get']('EditorAnnotations'),_0x5667eb=this['context']['plugins']['get'](ki),_0x4c6fd6=this['annotations'],_0x2dc10d=this['balloonPanelView'],_0x5be6fd=()=>{const _0x4b0d6b=_0xaf4c52['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4b0d6b),this['setActiveAnnotation'](_0x4b0d6b[0x0]||null);};this['listenTo'](_0xaf4c52,'refresh',_0x5be6fd),this['listenTo'](_0xaf4c52,'blur',(_0x54bdc8,{isAnnotationTracked:_0x50b178})=>{this['activeAnnotation']&&_0x50b178(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xaf4c52,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4c6fd6,'blur',_0x4c2d9e=>{_0xaf4c52['hasDomSelection']()&&_0x4c2d9e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x210dbd,_0xe69d61)=>{const _0x2cff5f=_0xe69d61['target'];_0x2dc10d['isVisible']&&_0x2dc10d['element']['contains'](_0x2cff5f)||_0x5667eb['view']['element']['contains'](_0x2cff5f)||this['activeAnnotation']&&_0xaf4c52['hasDomSelection']()&&(_0x5be6fd(),_0x210dbd['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xaf4c52);}['_destroyEditorAnnotationsIntegration'](_0x1413fc){_0x1413fc&&(this['stopListening'](_0x1413fc),this['_editorAnnotations']['remove'](_0x1413fc));}['_setSelectedAnnotations'](_0x49d1c4){for(const _0x2ef7ba of this['_selectedAnnotations'])_0x49d1c4['includes'](_0x2ef7ba)||this['_manuallyClosedAnnotationViews']['delete'](_0x2ef7ba['view']);this['_selectedAnnotations']=_0x49d1c4;}['_refreshPositioning'](){const _0x4ae5f8=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4ae5f8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x101f05){if(this['_manuallyClosedAnnotationViews']['has'](_0x101f05['view']))return;const _0x56d7d2=this['balloonPanelView']['content']['first'];_0x56d7d2!==_0x101f05['view']?(_0x56d7d2&&this['_detachListeners'](_0x56d7d2),this['_attachListeners'](_0x101f05['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x101f05['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1ec94e=this['balloonPanelView']['content']['first'],_0x454dd4=_0x1ec94e&&this['annotations']['getByView'](_0x1ec94e);if(!_0x454dd4||!this['_annotationToNarrowView']['has'](_0x454dd4))return;const _0x25425b=this['_annotationToNarrowView']['get'](_0x454dd4)['element'],_0x193187=(function(){const _0x16e327=_0x35dc9c['defaultPositions'];return[_0x16e327['southArrowNorthEast'],_0x16e327['northArrowSouthEast'],_0x16e327['southArrowNorth'],_0x16e327['northArrowSouth'],_0x16e327['southArrowNorthWest'],_0x16e327['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x25425b,'positions':_0x193187});}['_hideBalloon'](){const _0x56a9b0=this['balloonPanelView'],_0x1df9b0=_0x56a9b0['content']['first'];_0x1df9b0&&(this['_detachListeners'](_0x1df9b0),_0x56a9b0['unpin'](),_0x56a9b0['content']['clear']());}['_attachListeners'](_0x2e92b4){this['listenTo'](_0x2e92b4,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2e92b4,'Esc',(_0x310c9e,_0x54c909)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2e92b4),this['_hideBalloon'](),_0x54c909();});}['_detachListeners'](_0x4cfeef){this['stopListening'](_0x4cfeef);}},xi=class extends _0x3d6b36{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x31f7b0,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59ade4){super(_0x59ade4),_0x59ade4['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x59ade4['plugins']['get'](_0x31f7b0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xb07f85(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x16ca91=this['editor']['plugins']['get'](Ti);_0x16ca91['context']===this['editor']&&(_0x16ca91['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xfb56a6,_0x1038af)=>{const _0x568e23=this['_balloon'];if(this['isAttached']&&_0x568e23['visibleView']){const _0x4e0467=this['annotations']['getByView'](_0x568e23['visibleView']);_0x4e0467&&this['_closeAnnotation'](_0x4e0467),_0x1038af();}}));}['afterInit'](){const _0x4aadac=this['editor']['plugins']['get'](Ti);_0x4aadac['context']===this['editor']&&(_0x4aadac['hasActive']()||_0x4aadac['switchTo']('inline'));}['setActiveAnnotation'](_0x5850cd){_0x5850cd!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5850cd&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5850cd)&&this['_addAnnotationToBalloon'](_0x5850cd,!0x0),_0x5850cd['isActive']=!0x0),_0x5850cd||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5850cd);}['attach'](_0x3db74b){this['annotations']=_0x3db74b;const _0x3f107e=this['editor']['plugins']['get'](Ti),_0x1b766f=this['_balloon'];if(this['isAttached'])throw new _0x6d6638('inlineannotations-attach-already-attached',this);if(_0x3f107e['context']!==this['editor'])throw new _0x6d6638('inlineannotations-not-allowed-with-context',this);const _0x3312a5=this['editor']['plugins']['get'](di);this['listenTo'](_0x3312a5,'refresh',()=>{const _0x469602=_0x3312a5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x19e4b6,_0x121405;!this['_forceRefresh']&&(_0x19e4b6=_0x469602,_0x121405=this['_selectedAnnotations'],_0x19e4b6['length']===_0x121405['length']&&_0x19e4b6['every'](_0x48d541=>_0x121405['includes'](_0x48d541)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x469602),this['setActiveAnnotation'](_0x469602[0x0]||null));}),this['listenTo'](_0x3312a5,'blur',(_0xb940e2,{isAnnotationTracked:_0x1770a9})=>{this['activeAnnotation']&&_0x1770a9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3312a5,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x533463,_0x204d96,_0xe68267)=>{_0xe68267||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3db74b,'remove',(_0x232f45,_0x23557e)=>{this['_removeAnnotationFromBalloon'](_0x23557e),_0x23557e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b766f,'change:visibleView',(_0x5416a7,_0x4613b9,_0x953dd3,_0x25dd32)=>{_0x25dd32&&this['stopListening'](_0x25dd32);const _0x46f5f4=_0x3db74b['getByView'](_0x953dd3);_0x953dd3&&_0x46f5f4&&(this['listenTo'](_0x953dd3,'change:height',()=>{_0x1b766f['updatePosition']();}),this['listenTo'](_0x953dd3,'Esc',()=>{this['_closeAnnotation'](_0x46f5f4),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x46f5f4&&this['setActiveAnnotation'](_0x46f5f4));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b766f['visibleView']&&_0x3db74b['getByView'](_0x1b766f['visibleView'])&&_0x1b766f['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 _0x6d6638('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a3257 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a3257);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3c9f32){for(const _0x4f53f7 of this['_selectedAnnotations'])_0x3c9f32['includes'](_0x4f53f7)||this['_manuallyClosed']['delete'](_0x4f53f7);for(const _0xf89822 of this['annotations'])_0x3c9f32['includes'](_0xf89822)||this['_removeAnnotationFromBalloon'](_0xf89822);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x46e30c of _0x3c9f32)this['_addAnnotationToBalloon'](_0x46e30c);}this['_selectedAnnotations']=_0x3c9f32;}['_addAnnotationToBalloon'](_0x56596f,_0x3d505e=!0x1){this['_manuallyClosed']['has'](_0x56596f)||(this['_addedAnnotations']['has'](_0x56596f)||this['_balloon']['hasView'](_0x56596f['view'])||(this['_addedAnnotations']['add'](_0x56596f),this['_balloon']['add']({'stackId':_0x56596f['view']['id'],'view':_0x56596f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x56596f)}})),_0x3d505e&&this['_balloon']['showStack'](_0x56596f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5153f0){const _0x235f18=_0x5153f0['target'],_0x1d9903=this['editor']['editing']['view'],_0x34c07b=_0x1d9903['document']['selection']['getFirstRange'](),_0x303802=_0x1d9903['domConverter']['viewRangeToDom'](_0x34c07b);if(_0x303802['collapse'](!0x0),_0x235f18){if(_0x235f18 instanceof _0x3d1cc4)return _0x235f18;let _0x4447e5=[];for(const _0x76714a of _0x235f18)_0x4447e5['push'](..._0x3d1cc4['getDomElementRects'](_0x76714a));_0x4447e5=function(_0x1be39a){const _0x433280=[];let _0x33e438=_0x1be39a[0x0];for(let _0x4653e=0x1;_0x4653e<_0x1be39a['length'];_0x4653e++)if(Pi(_0x33e438,_0x1be39a[_0x4653e])){const _0x4335c7=_0x1be39a[_0x4653e]['width'];_0x33e438['width']+=_0x4335c7,_0x33e438['right']+=_0x4335c7;}else _0x433280['push'](_0x33e438),_0x33e438=_0x1be39a[_0x4653e];return _0x433280['push'](_0x33e438),_0x433280;}(_0x4447e5);const _0x18c7f5=_0x303802['getBoundingClientRect']();return _0x4447e5['find'](_0x357168=>_0x357168['top']<=_0x18c7f5['top']&&_0x357168['bottom']>=_0x18c7f5['bottom']&&_0x357168['left']<=_0x18c7f5['left']&&_0x357168['right']>=_0x18c7f5['right'])||_0x4447e5[0x0];}return _0x5153f0['targetRect']||_0x303802;}['_removeAnnotationFromBalloon'](_0x4c3371){this['_addedAnnotations']['has'](_0x4c3371)&&this['_balloon']['hasView'](_0x4c3371['view'])&&(this['_addedAnnotations']['delete'](_0x4c3371),this['_balloon']['remove'](_0x4c3371['view']));}['_closeAnnotation'](_0x39a2e4){this['_manuallyClosed']['add'](_0x39a2e4),this['_removeAnnotationFromBalloon'](_0x39a2e4);}};function Pi(_0x4809bf,_0x3688a5){return _0x4809bf['top']===_0x3688a5['top']&&_0x4809bf['bottom']===_0x3688a5['bottom']&&_0x4809bf['right']===_0x3688a5['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x57ac1a,_0x897642){super(_0x57ac1a),this['set']('isEmpty',!_0x897642['length']),this['focusTracker']=new _0x16deef(),this['_annotationViews']=_0x897642,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x897642,'focusTracker':this['focusTracker']}),this['listenTo'](_0x897642,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x897642,'remove',(_0x368743,_0x2e8e03)=>{_0x2e8e03['isActive']&&this['focus'](),_0x897642['length']||(this['isEmpty']=!0x0);});const _0x38b314=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x57ac1a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x897642},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x38b314['if']('isEmpty','ck-hidden',_0x2d1216=>!_0x2d1216)]},'children':[{'text':Et(_0x57ac1a,'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 _0x45ed91 of this['_annotationViews'])this['focusTracker']['add'](_0x45ed91['element']);this['_annotationViews']['on']('change',(_0x163306,{added:_0x4eb8f0,removed:_0xb7ff98})=>{for(const _0x25876b of _0x4eb8f0)this['focusTracker']['add'](_0x25876b['element']);for(const _0xc86cd8 of _0xb7ff98)this['focusTracker']['remove'](_0xc86cd8['element']);});}},Di=class extends _0x41d5ed{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0xe72326){super(_0xe72326),this['archivedThreads']=new _0x4284a7();}['init'](){const _0xfadc75=this['context'],_0x7024a4=_0xfadc75['plugins']['get'](oi),_0x2292f4=_0xfadc75['plugins']['get'](ti);this['listenTo'](_0x7024a4,'addCommentThread',(_0x1bd7f6,{threadId:_0x3ca80a})=>{const _0x7c8aa5=_0x7024a4['getCommentThread'](_0x3ca80a);_0x7c8aa5['archivedAt']&&this['archivedThreads']['add'](_0x7c8aa5,this['_calculatePosition'](_0x7c8aa5['archivedAt'])),this['listenTo'](_0x7c8aa5,'change:archivedAt',(_0x2d0274,_0xe56e35,_0x5cbd58)=>{_0x5cbd58?this['archivedThreads']['has'](_0x7c8aa5)||this['archivedThreads']['add'](_0x7c8aa5,this['_calculatePosition'](_0x7c8aa5['archivedAt'])):this['archivedThreads']['has'](_0x7c8aa5)&&this['archivedThreads']['remove'](_0x7c8aa5);});}),this['listenTo'](_0x7024a4,'removeCommentThread',(_0x905751,{threadId:_0x52218f})=>{const _0x1752a5=_0x7024a4['getCommentThread'](_0x52218f);this['stopListening'](_0x1752a5),this['archivedThreads']['has'](_0x1752a5)&&this['archivedThreads']['remove'](_0x1752a5);},{'priority':'highest'}),this['listenTo'](_0x2292f4['collection'],'focus',(_0x31a1b7,_0x59e63a)=>{_0x59e63a['isVisible']||(_0x59e63a['isActive']=!0x0,_0x2292f4['activate'](_0x59e63a));});}['_calculatePosition'](_0xd4d60b){const _0x292717=[...this['archivedThreads']]['findIndex'](_0x5c6b0b=>_0x5c6b0b['archivedAt']<_0xd4d60b);return _0x292717>-0x1?_0x292717:this['archivedThreads']['length'];}},Vi=class extends _0x3d6b36{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x1e157e];}constructor(_0x207f8c){super(_0x207f8c),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x31ba32=this['editor'],_0xd90420=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x31ba32['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2d6eba,!0x0)),_0x31ba32['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b48e7=this['_createCommentsArchiveButton'](rt);return _0x4b48e7['set']({'role':'menuitemcheckbox'}),_0x4b48e7;});const _0x54c2af=_0x31ba32['plugins']['get'](Di),_0x4b71eb=_0x31ba32['plugins']['get']('Annotations'),_0x10aec2=_0x31ba32['plugins']['get']('CommentsRepository');_0x54c2af['archivedThreads']['forEach'](_0x3d7531=>{this['_handleNewThread'](_0x3d7531);}),this['listenTo'](_0x54c2af['archivedThreads'],'add',(_0x4993a5,_0x280481)=>{this['_handleNewThread'](_0x280481);}),this['listenTo'](_0x4b71eb['collection'],'add',(_0x2411ad,_0x85ebe2)=>{const _0x5164d2=this['_pendingThreads']['find'](_0x5a705b=>{const _0x165eda=_0x10aec2['_threadToController']['get'](_0x5a705b);return _0x165eda&&_0x85ebe2['innerView']===_0x165eda['view'];});if(_0x5164d2){const _0x5da8f4=this['_calculatePosition'](_0x5164d2['archivedAt']);this['_addAnnotationToArchive'](_0x85ebe2,_0x5da8f4),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5164d2),0x1);}}),this['listenTo'](_0x54c2af['archivedThreads'],'remove',(_0x3eba52,_0x31d169)=>{const _0x8e9505=_0x31ba32['config']['get']('collaboration.channelId');if(!_0x8e9505||_0x31d169['channelId']===_0x8e9505){if(this['_pendingThreads']['includes'](_0x31d169))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x31d169),0x1);else{const _0x2d1bde=_0x10aec2['_threadToController']['get'](_0x31d169),_0x87d312=_0x4b71eb['getByInnerView'](_0x2d1bde['view']);this['annotationViews']['remove'](_0x87d312['view']),this['stopListening'](_0x87d312),this['stopListening'](_0x87d312['focusableElements']);}}}),this['listenTo'](_0x4b71eb['collection'],'add',(_0x3b2bce,_0x302b25)=>{this['listenTo'](_0x302b25,'escape',_0xd90420);}),this['listenTo'](_0x4b71eb['collection'],'remove',(_0x24c828,_0x3af56e)=>{this['stopListening'](_0x3af56e,'escape',_0xd90420);});}['_addAnnotationToArchive'](_0x439404,_0x5c077d){this['listenTo'](_0x439404,'set:isVisible',_0x38fe02=>{_0x38fe02['return']=!0x1,_0x38fe02['stop']();}),this['annotationViews']['add'](_0x439404['view'],_0x5c077d);}['_handleNewThread'](_0xe21562){const _0x3f1122=this['editor']['plugins']['get']('CommentsRepository'),_0x1c7f96=this['editor']['plugins']['get']('Annotations'),_0x58d73b=this['editor']['config']['get']('collaboration.channelId');if(!_0x58d73b||_0xe21562['channelId']===_0x58d73b){const _0x1c8c75=_0x3f1122['_threadToController']['get'](_0xe21562);if(!_0x1c8c75)return void this['_pendingThreads']['push'](_0xe21562);const _0x3cc67b=this['_calculatePosition'](_0xe21562['archivedAt']),_0x5ed0ee=_0x1c7f96['getByInnerView'](_0x1c8c75['view']);_0x5ed0ee['isVisible']&&_0x1c7f96['_visibleAnnotations']['remove'](_0x5ed0ee),this['_addAnnotationToArchive'](_0x5ed0ee,_0x3cc67b);}}['_calculatePosition'](_0x3f8660){const _0x10dd39=this['editor']['config']['get']('collaboration.channelId'),_0x47f030=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x819684=>_0x819684['channelId']===_0x10dd39)['findIndex'](_0x378f49=>_0x378f49['archivedAt']<_0x3f8660);return _0x47f030<0x0||_0x47f030>this['annotationViews']['length']?this['annotationViews']['length']:_0x47f030-0x1;}['_toggleDialog'](){const _0x34a648=this['editor'],_0x515915=_0x34a648['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x34a648['locale'],this['annotationViews'])),'commentsArchive'===_0x515915['id']?_0x515915['hide']():_0x515915['show']({'id':'commentsArchive','title':Et(_0x34a648['locale'],'COMMENTS_ARCHIVE'),'icon':_0x36c51a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5207c7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x111213,_0x53db51=!0x1){const _0x237277=this['editor']['locale'],_0x40fb9e=this['editor']['plugins']['get']('Dialog'),_0x59500b=new _0x111213(_0x237277);return _0x59500b['bind']('isEnabled')['to'](this,'isEnabled'),_0x59500b['bind']('isOn')['to'](_0x40fb9e,'id',_0x5d1929=>'commentsArchive'===_0x5d1929),_0x59500b['set']({'label':Et(_0x237277,'COMMENTS_ARCHIVE'),'icon':_0x36c51a,'isToggleable':!0x0}),_0x53db51&&(_0x59500b['tooltip']=!0x0),this['listenTo'](_0x59500b,'execute',()=>this['_toggleDialog']()),_0x59500b;}['_hideDialogOnAnnotationEscape']=_0x3ba7fd=>{const _0x446312=_0x3ba7fd['source'];if(!this['annotationViews']['has'](_0x446312['view']))return;const _0x35123b=this['editor']['plugins']['get']('Dialog');_0x35123b['isOpen']&&'commentsArchive'===_0x35123b['id']&&(_0x35123b['hide'](),_0x3ba7fd['stop']());};},Bi=class extends _0x3d6b36{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0xb11cd5,Context as _0x49aa17,ContextPlugin as _0x5baefc,Editor as _0x5eeeec,PendingActions as _0x533e30,Plugin as _0x2eff03}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x8e9278,Collection as _0x3ec6c0,DomEmitterMixin as _0x36f6cb,FocusTracker as _0x471a49,KeystrokeHandler as _0x3b982e,ObservableMixin as _0x569430,Rect as _0x45be68,diff as _0x2ae3c9,first as _0x3d2c2a,getEnvKeystrokeText as _0x2e53ad,keyCodes as _0x1cd5dc,priorities as _0x1ba05e,scrollViewportToShowTarget as _0x2731af,toUnit as _0x4d1021,uid as _0x212bea}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x5861a2,ConfirmMixin as _0x4526c7,FOCUS_ANNOTATION_KEYSTROKE as _0x45cce3,LateFocusButtonView as _0x2a48ce,LateFocusDropdownButtonView as _0xd0a3eb,UserView as _0x2a9ab5,Users as _0x21dd23,getAllMarkersDomElementsSorted as _0x15e934,getDateTimeFormatter as _0x48369a,hashObject as _0x242918,setupThreadKeyboardNavigation as _0x388cd4,surroundingMarkersDetector as _0x40d59e,trimHtml as _0x1f7843}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x35fed6,debounce as _0x5b676f,isEqual as _0x169e3f,set as _0x21565c,throttle as _0x140704,unset as _0x1ee3b7}from'es-toolkit/compat';import{IconAddComment as _0x55d4e9,IconCheck as _0x5675d6,IconCommentsArchive as _0x33098a,IconPencil as _0xcba330,IconRemoveComment as _0x217a3b,IconThreeVerticalDots as _0x592131,IconUndo as _0x4acc71}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x385998,BodyCollection as _0x401149,ButtonView as _0x2340d9,ContextualBalloon as _0x10c02f,Dialog as _0x40184e,DialogViewPosition as _0x1b2f23,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0x569430();var bt=class extends It{['model'];['view'];constructor(_0x18bb4d,_0x5b2bf5){super(),this['model']=_0x18bb4d,this['model']['_isAttached']=!0x0,this['view']=_0x5b2bf5,this['listenTo'](_0x5b2bf5,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5b2bf5,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5b2bf5,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5b2bf5,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5b2bf5,'addComment',(_0xbf779e,_0x3b1f3d)=>this['addComment'](_0x3b1f3d)),this['listenTo'](_0x5b2bf5,'updateComment',(_0x318975,_0x29d5cb,_0x108efb)=>this['updateComment'](_0x29d5cb,_0x108efb)),this['listenTo'](_0x5b2bf5,'removeComment',(_0x11431b,_0x499c8d)=>this['removeComment'](_0x499c8d));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x502f65){this['model']['addComment']({'content':_0x502f65,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2d07d1,_0x240363){this['model']['getComment'](_0x2d07d1)['update']({'content':_0x240363});}['removeComment'](_0x1793e1){this['model']['getComment'](_0x1793e1)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x4ed0c9,_0x2dc9df,_0x1f9729){const t=_0x4ed0c9['t'];switch(_0x2dc9df){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'},_0x1f9729);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1f9729);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'},_0x1f9729);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'},_0x1f9729);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1f9729);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'},_0x1f9729);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'},_0x1f9729);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'},_0x1f9729);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'';}}var kt=class extends it{['main'];['editable'];constructor(_0x1d6c80,_0x564ba7){super(_0x1d6c80);const _0x198f00=_0x212bea();this['main']=this['createCollection'](),this['editable']=new st(_0x1d6c80,_0x564ba7,void 0x0,{'label':()=>Et(_0x1d6c80,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1d6c80['uiLanguageDirection'],'lang':_0x1d6c80['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x198f00},'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']();}},Nt=class extends tt{['view'];constructor(_0x566adb){super(_0x566adb),this['view']=new kt(_0x566adb['locale'],_0x566adb['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3ab651=this['editor']['editing']['view'],_0x155d97=this['view']['editable'];_0x155d97['name']=_0x3ab651['document']['getRoot']()['rootName'],this['view']['render']();const _0x5813b0=_0x155d97['element'];this['setEditableElement'](_0x155d97['name'],_0x5813b0),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3ab651['attachDomRoot'](_0x5813b0),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x569430(_0x5eeeec);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x1b33f0={}){(_0x1b33f0=Object['assign']({},_0x1b33f0))['plugins']||(_0x1b33f0['plugins']=CommentEditor['defaultPlugins']),super(_0x1b33f0),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x13d64c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x13d64c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x203993=>{const _0x126deb=this['model']['document']['getRoot'](),_0xd97b80=_0x126deb&&_0x126deb['getChild'](_0x126deb['childCount']-0x1);_0x203993['setSelection'](_0xd97b80,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3336c8=this['editing']['view'],_0x4749b4=_0x3336c8['document']['getRoot'](),_0x1e072a=_0x4749b4['getChild'](0x0);_0x4749b4['childCount']>0x1||!_0x1e072a||'p'!=_0x1e072a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3336c8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1e072a['placeholder']=this['placeholder']),ut({'view':_0x3336c8,'element':_0x1e072a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1e072a);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x55bd00,_0x308d71={}){super(_0x55bd00),this['editor']=null,this['_editorConfig']=_0x308d71,this['set']('value',_0x308d71['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x55bd00,'Reply...')),this['set']('submitLabel',Et(_0x55bd00,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3b982e(),this['focusTracker']=new _0x471a49(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3546f3=>!_0x3546f3['defaultPrevented']},'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',(_0x5c1260,_0x1564c7)=>{this['cancelButtonView']['fire']('execute'),_0x1564c7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2bf62b,_0x47e5db)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x47e5db());}),this['on']('submit',(_0x47ca7f,_0x63645e)=>{_0x63645e['length']>0xfde8?(alert(Et(_0x55bd00,'TOO_LONG_COMMENT_ALERT',[_0x63645e['length'],0xfde8])),_0x47ca7f['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1c6729=this['editor'];this['element']['insertBefore'](_0x1c6729['ui']['element'],this['element']['firstChild']),_0x1c6729['model']['document']['on']('change',()=>this['value']=_0x1c6729['getData']()),_0x1c6729['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1c6729['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3ae72e){-0x1===_0x3ae72e?(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:_0x306518}=this,_0x197842=new _0x2340d9(_0x306518);return _0x197842['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x197842['withText']=!0x0,_0x197842['bind']('label')['to'](this,'submitLabel'),_0x197842['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x197842['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4fcac4,_0x1d9f90)=>!_0x1d9f90&&!!_0x4fcac4['trim']()),_0x197842;}['_createCancelButton'](){const {locale:_0x2ca18d}=this,_0x33db66=new _0x2340d9(_0x2ca18d);return _0x33db66['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x33db66['label']=Et(_0x2ca18d,'Cancel'),_0x33db66['withText']=!0x0,_0x33db66['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x33db66;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4cc53a=>{this['focusTracker']['add'](_0x4cc53a['element']);}),this['focusables']['on']('change',(_0x591246,_0xf0fbad)=>{for(const _0x1471d0 of Array['from'](_0xf0fbad['added'])['reverse']())this['focusTracker']['add'](_0x1471d0['element']);});}},xt=class extends ht{constructor(_0x3b3443,_0x44fcb6,_0x1bc7d0){super(_0x3b3443),this['commentInputView']=new St(_0x3b3443,_0x1bc7d0),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x12c859,_0x17cb84)=>_0x12c859||!!_0x17cb84),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 _0x2a9ab5(_0x3b3443,_0x44fcb6),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'](_0x153907){this['commentInputView']['focus'](_0x153907);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x559bbb,_0x4686ec)=>{const {submitButtonView:_0x389be4,cancelButtonView:_0x3c762a,editor:_0x3aa2f7}=this['commentInputView'];[_0x389be4['element'],_0x3c762a['element'],_0x3aa2f7?_0x3aa2f7['editing']['view']['getDomRoot']():null]['filter'](_0x1621b5=>_0x1621b5)['some'](_0x293997=>_0x293997['contains'](_0x4686ec['target']))||(this['focus'](),_0x4686ec['preventDefault']());});}},Pt=class extends ht{constructor(_0x2bce5d){super(_0x2bce5d);const _0x8b241=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x8b241['to']('count',_0x476b2d=>Et(_0x2bce5d,'NUMBER_OF_COMMENTS',_0x476b2d))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xdcbd89,_0x25e3e3,_0x937d3d){super(_0xdcbd89);const _0xf438dd=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x25e3e3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x25e3e3,this['_config']=_0x937d3d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x471a49(),this['keystrokes']=new _0x3b982e(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4da2c4=>this['commentViews']['map'](_0x4c0729=>_0x4c0729['element'])['includes'](_0x4da2c4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0xdcbd89),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1d03c4=>_0x1d03c4-this['_config']['maxCommentsWhenCollapsed']);for(const _0xc255f3 of _0x25e3e3['comments'])this['_handleNewCommentModel'](_0xc255f3);this['_handleInfoComment'](),this['listenTo'](_0x25e3e3['comments'],'add',(_0x214452,_0x54f308)=>{const _0x4fe355=this['_calculatePosition'](_0x54f308);this['length']++,this['_handleNewCommentModel'](_0x54f308,_0x4fe355),this['refreshVisibleViews']();}),this['listenTo'](_0x25e3e3['comments'],'remove',(_0x293427,_0x3cbb94)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3cbb94),this['refreshVisibleViews']();}),this['listenTo'](_0x25e3e3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x25e3e3,'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',_0xf438dd['if']('length','ck-hidden',_0x1de4a0=>!_0x1de4a0)],'aria-label':Et(_0xdcbd89,'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'](_0x1cfcc1){-0x1===_0x1cfcc1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x248432 of this['commentViews'])_0x248432['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4564f8,_0x26a94b){const _0x43b929=new this['_config']['CommentView'](this['locale'],_0x4564f8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x43b929['viewUid']=_0x4564f8['id'],_0x43b929['delegate']('removeComment')['to'](this),_0x43b929['delegate']('updateComment')['to'](this),_0x43b929['delegate']('resolveCommentThread')['to'](this),_0x43b929['delegate']('editorReady')['to'](this),_0x43b929['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x43b929,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x43b929,_0x26a94b);}['_calculatePosition'](_0xc654e0){const _0x505938=this['_model']['_findOptimalIndex'](_0xc654e0);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xc654e0['authoredAt']?_0x505938-0x1:_0x505938:_0x505938-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3e6fc2={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3e6fc2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3e6fc2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x320547){const _0x5a92d1=this['commentViews']['remove'](_0x320547['id']);this['stopListening'](_0x5a92d1),_0x5a92d1['isEditMode']&&this['_updateHasDirtyComment'](),_0x5a92d1['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1541a2=>_0x1541a2['isEditMode']);}['_rearrangeCollapse'](){const _0x320063=function(_0x5a9a2f){const _0x41a5a1=new _0x3ec6c0();for(const _0xb0d94e of _0x5a9a2f)_0x41a5a1['add'](_0xb0d94e);return _0x41a5a1;}(this['commentViews']),_0x438e5b=this['_collapsedCommentsView']['count'];for(let _0x953851=0x1;_0x953851<=_0x438e5b;_0x953851++)_0x320063['remove'](0x1);for(const _0x3d68e9 of _0x320063)_0x3d68e9['collapse']();_0x438e5b>0x0&&_0x320063['add'](this['_collapsedCommentsView'],0x1),Dt(_0x2ae3c9(Array['from'](this['visibleViews']),Array['from'](_0x320063)),this['visibleViews'],_0x320063);}['_rearrangeExpand'](){Dt(_0x2ae3c9(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2d87ac of this['visibleViews'])_0x2d87ac['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0xed567c=>{this['focusTracker']['add'](_0xed567c['element']),this['keystrokes']['listenTo'](_0xed567c['element']);}),this['commentViews']['on']('change',(_0x18edcc,_0x295e6e)=>{for(const _0x252306 of _0x295e6e['removed'])this['focusTracker']['remove'](_0x252306['element']),this['keystrokes']['stopListening'](_0x252306['element']);for(const _0xc4d169 of Array['from'](_0x295e6e['added'])['reverse']())this['focusTracker']['add'](_0xc4d169['element']),this['keystrokes']['listenTo'](_0xc4d169['element']);});}};function Dt(_0x32f8bd,_0x5b9141,_0x4d4ed5){let _0x6c6467=0x0;for(const _0x18e47f of _0x32f8bd)switch(_0x18e47f){case'insert':_0x5b9141['add'](_0x4d4ed5['get'](_0x6c6467),_0x6c6467),_0x6c6467++;break;case'delete':_0x5b9141['remove'](_0x6c6467);break;case'equal':_0x6c6467++;}}var Vt=class extends ht{constructor(_0xa9f511){super(_0xa9f511);const _0x560c47=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x560c47['to']('contextValue',_0x1f5adf=>Et(_0xa9f511,'THREAD_CONTEXT_LABEL',_0x1f5adf)),'tabindex':-0x1},'children':[{'text':_0x560c47['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1eafff,_0x98e26){super(_0x1eafff);const _0x30547c=this['bindTemplate'];this['_model']=_0x98e26,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x471a49(),this['keystrokes']=new _0x3b982e(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4dff4d=>!!_0x4dff4d),this['bind']('contextValue')['to'](this['_model'],'context',_0x389554=>_0x389554&&_0x389554['value']?this['_trimContextValue'](_0x389554['value']):Et(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',_0x30547c['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 _0x59b5da=new _0x2340d9(this['locale']);return _0x59b5da['label']=Et(this['locale'],'Reopen'),_0x59b5da['tooltip']=Et(this['locale'],'Reopen'),_0x59b5da['icon']=_0x4acc71,_0x59b5da['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x10376f=>!_0x10376f),_0x59b5da['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1bf1d1,_0x5f5628)=>_0x1bf1d1&&_0x5f5628),_0x59b5da['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x59b5da;}['_trimContextValue'](_0x2aed0a){if(_0x2aed0a['length']<0x96)return _0x2aed0a;const _0x361768=_0x2aed0a['lastIndexOf']('\x20',0x93);return _0x2aed0a['substring'](0x0,_0x361768>-0x1?_0x361768:0x93)+'...';}['_attachContextActions'](){const _0x5243ab=this['element']['querySelector']('.ck-context'),_0x2f2dc9=_0x5243ab['querySelector']('.ck-context__value');this['listenTo'](_0x5243ab,'mouseenter',()=>{_0x2f2dc9['offsetWidth']<_0x2f2dc9['scrollWidth']&&_0x5243ab['classList']['add']('overlay');}),this['listenTo'](_0x5243ab,'mouseleave',()=>{_0x5243ab['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4df91c of this['focusables'])this['focusTracker']['add'](_0x4df91c['element']),this['keystrokes']['listenTo'](_0x4df91c['element']);}['_createContextView'](){const _0x1be9ca=new Vt(this['locale']);return _0x1be9ca['bind']('contextValue')['to'](this),_0x1be9ca;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5241ae,_0x2c6901,_0x910618,_0x13651f){super(_0x5241ae),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2c6901,this['_localUser']=_0x910618,this['_config']=_0x13651f,this['commentThreadHeaderView']=new Bt(_0x5241ae,_0x2c6901),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5861a2(_0x5241ae,Et(_0x5241ae,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x5241ae,_0x2c6901,Object['assign']({'CommentView':this['_config']['CommentView']},_0x13651f)),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',(_0x2005f2,_0x409792)=>_0x2005f2||!!_0x409792),this['bind']('isUnlinked')['to'](_0x2c6901,'unlinkedAt',_0x1d67fd=>!!_0x1d67fd);let _0x5a891a=null;const _0x3d01fc=()=>{const _0x51ba35=this['_model']['comments']['first']||null;_0x51ba35!==_0x5a891a&&(_0x5a891a&&this['stopListening'](_0x5a891a,'change:content'),_0x5a891a=_0x51ba35,_0x51ba35&&this['listenTo'](_0x51ba35,'change:content',_0x3d01fc));const _0x47497f=_0x51ba35?_0x51ba35['author']['name']:this['_localUser']['name'],_0x258480=_0x51ba35?new DOMParser()['parseFromString'](_0x1f7843(_0x51ba35['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x488d61=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x47497f]);this['set']('ariaLabel',_0x258480?_0x488d61+'\x20'+_0x258480:_0x488d61);};this['listenTo'](this['_model']['comments'],'change',_0x3d01fc),_0x3d01fc(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x471a49(),this['keystrokes']=new _0x3b982e(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22283d=>_0x22283d['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x388cd4(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5e9035=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x39e3eb=_0x5e9035['commentInputView'];return _0x5e9035['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x39e3eb,'value',(_0x4f929b,_0x2f09d8,_0x26792c,_0x4510c6,_0x2875cb)=>!!_0x2875cb||!!_0x4510c6&&_0x26792c&&!_0x2f09d8||_0x4f929b&&_0x26792c&&!_0x2f09d8),_0x39e3eb['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x437fde,_0x427d8f,_0x531d59)=>{let _0x28c6d5;return _0x28c6d5=_0x531d59&&_0x427d8f?'Reply\x20to\x20reopen\x20discussion...':_0x437fde?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x28c6d5);}),_0x39e3eb['bind']('submitLabel')['to'](this,'length',_0x19c9a1=>Et(this['locale'],_0x19c9a1?'Reply':'Comment')),_0x39e3eb['on']('submit',(_0x76ddc,_0x3c6208)=>{this['fire']('addComment',_0x3c6208),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x39e3eb['on']('cancel',()=>{this['focus']();}),_0x39e3eb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x39e3eb['on']('cancel',_0x3b7a9a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3b7a9a['stop']());}),this['on']('change:isActive',(_0x5f51ed,_0x3d9858,_0x1d8416)=>{_0x1d8416||this['length']||_0x39e3eb['value']||this['fire']('removeCommentThread');}),_0x5e9035;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x4526c7(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x8e75a2,_0x7a6ae8,_0x591544,_0x2d5dc7){super(_0x8e75a2,_0x7a6ae8,_0x591544,_0x2d5dc7),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x8e75a2,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x244443,_0x52286f,_0x47a6ac)=>{_0x47a6ac||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x25c448,_0x3f0e4e,_0x38a498)=>{_0x38a498&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x31b765=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x31b765['if']('isActive','ck-thread--active'),_0x31b765['if']('isUnlinked','ck-thread--unlinked'),_0x31b765['to']('actionIndicator',_0x22fdea=>_0x22fdea?'ck-thread--'+_0x22fdea:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x31b765['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 _0xd9e78a of this['commentsListView']['commentViews'])_0xd9e78a['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x104851}=this,_0x1e3f6c=this['commentsListView']['commentViews']['get'](0x0);_0x1e3f6c===this['_boundFirstCommentView']||_0x1e3f6c['isSystemComment']||(this['_boundFirstCommentView']=_0x1e3f6c,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1e3f6c,'actionIndicator',_0x24b2cb=>'remove'===_0x24b2cb?'remove':null),_0x1e3f6c['placeholder']=Et(_0x104851,'Write\x20a\x20comment...'),_0x1e3f6c['removeButton']['on']('execute',_0x2df057=>{_0x2df057['stop'](),this['showConfirm'](Et(_0x104851,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1e3f6c['focus']();}),_0x1e3f6c['actionBar']['add'](this['resolveButton'],0x0),_0x1e3f6c['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3cc56a=new _0x2a48ce(this['locale']);return _0x3cc56a['label']=Et(this['locale'],'Resolve'),_0x3cc56a['tooltip']=Et(this['locale'],'Resolve'),_0x3cc56a['icon']=_0x5675d6,_0x3cc56a['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3cc56a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3b5f50=>!_0x3b5f50),_0x3cc56a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2a08c9,_0x273a47)=>_0x2a08c9&&!_0x273a47),_0x3cc56a['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3cc56a;}['_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']));}},Wt=class extends ht{constructor(_0x1ffdc4){super(_0x1ffdc4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x522769,_0x367ac1,_0x494241)=>{this['element']['innerHTML']=_0x494241;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x14a659,_0x1cfcc3,_0x17f81f){super(_0x14a659),this['_model']=_0x1cfcc3,this['_config']=_0x17f81f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1cfcc3,'content',_0x1cfcc3,'authoredAt',(_0x1c91cb,_0x16fde8)=>Et(_0x14a659,'COMMENT_ARIA_LABEL',[_0x1cfcc3['author']['name'],_0x17f81f['formatDateTime'](_0x16fde8),new DOMParser()['parseFromString'](_0x1c91cb,'text/html')['body']['textContent'],_0x1cfcc3['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5861a2(_0x14a659,Et(_0x14a659,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x471a49(),this['keystrokes']=new _0x3b982e(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3ae050=>_0x3ae050['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x29f6ca=new Wt(this['locale']);return _0x29f6ca['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x22440a,_0x24f71a)=>_0x24f71a?_0x1f7843(_0x22440a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x22440a),_0x29f6ca;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x42edc6=new St(this['locale'],this['_config']['editorConfig']);return _0x42edc6['value']=this['_model']['content'],_0x42edc6['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x42edc6['submitLabel']=Et(this['locale'],'Save'),_0x42edc6['on']('submit',(_0x541197,_0xab898c)=>{this['fire']('updateComment',this['_model']['id'],_0xab898c),this['switchToDisplayMode'](),this['focus']();}),_0x42edc6['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x42edc6['once']('editorReady',()=>{_0x42edc6['focus']();}),_0x42edc6['createEditor'](),_0x42edc6['delegate']('editorReady')['to'](this),_0x42edc6['delegate']('editorDestroyed')['to'](this),_0x42edc6;}['_setupKeyboardNavigation'](){const _0x1e9111=this['element'];this['keystrokes']['listenTo'](_0x1e9111);for(const _0x2a8f14 of this['focusables'])this['focusTracker']['add'](_0x2a8f14['element']),this['keystrokes']['listenTo'](_0x2a8f14['element']);this['focusables']['on']('change',(_0x1eed02,_0x38890a)=>{for(const _0x5651fc of _0x38890a['removed'])this['focusTracker']['remove'](_0x5651fc['element']),this['keystrokes']['stopListening'](_0x5651fc['element']);for(const _0x4cb0be of _0x38890a['added'])this['focusTracker']['add'](_0x4cb0be['element']),this['keystrokes']['listenTo'](_0x4cb0be['element']);}),this['keystrokes']['set']('enter',(_0x13ec99,_0x467a66)=>{_0x1e9111===_0x13ec99['target']&&(this['focusCycler']['focusFirst'](),_0x467a66());}),this['keystrokes']['set']('esc',(_0x5bcce3,_0x21e12c)=>{_0x1e9111!==_0x5bcce3['target']&&(this['focus'](),_0x21e12c());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x4526c7(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x1e15f5,_0x5cf930,_0x326366){super(_0x1e15f5,_0x5cf930,_0x326366),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x1e15f5,'Reply...')),this['bind']('authoredAt')['to'](_0x5cf930),this['bind']('resolvedAt')['to'](_0x5cf930),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 _0x2a9ab5(_0x1e15f5,_0x5cf930['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5cf930,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x278fed=this['bindTemplate'],_0x3f06a3=[{'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':_0x278fed['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x278fed['to']('authoredAt',_0x7aa886=>this['_config']['formatDateTime'](_0x7aa886))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x278fed['if']('isEditMode','ck-comment__actions--hidden'),_0x278fed['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']&&_0x3f06a3['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x278fed['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x278fed['if']('isEditMode','ck-comment--edit'),_0x278fed['if']('isSystemComment','ck-comment--info'),_0x278fed['to']('actionIndicator',_0x377f81=>_0x377f81?'ck-comment--'+_0x377f81:'')],'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':_0x3f06a3}]}]};}['_createEditButton'](){const _0x590859=new _0x2340d9(this['locale']);return _0x590859['label']=Et(this['locale'],'Edit'),_0x590859['icon']=_0xcba330,_0x590859['withText']=!0x0,_0x590859['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x590859['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x508273=>!_0x508273),_0x590859['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x590859['on']('execute',()=>this['switchToEditMode']()),_0x590859;}['_createRemoveButton'](){const _0x2899eb=new _0x2340d9(this['locale']);return _0x2899eb['label']=Et(this['locale'],'Remove'),_0x2899eb['icon']=_0x217a3b,_0x2899eb['withText']=!0x0,_0x2899eb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2899eb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5ed002=>!_0x5ed002),_0x2899eb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2899eb['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2899eb;}['_createDropdown'](){const _0x42d4ae=ct(this['locale'],_0xd0a3eb),_0xcbd80b=_0x42d4ae['panelView']['children'],_0x2e7b7a=new ot(this['locale']),_0x7d890a=_0x42d4ae['bindTemplate'];dt(_0x42d4ae,()=>this['items']['find'](_0x308188=>_0x308188['isVisible'])),_0x42d4ae['extendTemplate']({'attributes':{'class':[_0x7d890a['if']('isVisible','ck-hidden',_0x4797a6=>!_0x4797a6)]}});const _0x22a2d5=(_0x4af01d,_0x266a26=-0x1)=>{const _0x4832b4=new nt(this['locale']);_0x4832b4['children']['add'](_0x4af01d);const _0x4c3155=_0x266a26>-0x1?_0x266a26:_0x2e7b7a['items']['length'];_0x2e7b7a['items']['add'](_0x4832b4,_0x4c3155);const _0x4b819c=Array['from'](this['items']);_0x42d4ae['unbind']('isEnabled','isVisible'),_0x42d4ae['bind']('isEnabled')['toMany'](_0x4b819c,'isEnabled',(..._0x38e4e2)=>_0x38e4e2['some'](_0x489c24=>_0x489c24)),_0x42d4ae['bind']('isVisible')['toMany'](_0x4b819c,'isVisible',(..._0x3a4690)=>_0x3a4690['some'](_0x272a7b=>_0x272a7b));};_0x42d4ae['panelPosition']='sw',_0x42d4ae['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x592131});for(const _0x5c2ebc of this['items'])_0x22a2d5(_0x5c2ebc);return _0xcbd80b['add'](_0x2e7b7a),_0x42d4ae['listenTo'](this['items'],'add',(_0x514c1f,_0x2d0b72,_0x3c7445)=>{_0x22a2d5(_0x2d0b72,_0x3c7445);}),_0x42d4ae['listenTo'](this['items'],'remove',(_0x2f86df,_0x122be4,_0x3fb0c6)=>{_0x2e7b7a['items']['remove'](_0x3fb0c6);}),_0x42d4ae;}['_attachActions'](_0x280509,_0x1346bd){const _0x5a31e1=_0x280509&&_0x280509['element'];_0x5a31e1&&(this['listenTo'](_0x5a31e1,'mouseenter',()=>this['actionIndicator']=_0x1346bd),this['listenTo'](_0x5a31e1,'focus',()=>this['actionIndicator']=_0x1346bd),this['listenTo'](_0x5a31e1,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5a31e1,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3f6529=super['_createCommentInputView']();return _0x3f6529['bind']('placeholder')['to'](this),_0x3f6529;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x525048){const _0x29212d=_0x140704(_0x525048,0x1e),_0x5b2312=new MutationObserver(_0x59a78f=>{for(const _0x556912 of _0x59a78f)('attributes'==_0x556912['type']&&'class'==_0x556912['attributeName']||'childList'==_0x556912['type']||'characterData'==_0x556912['type'])&&_0x29212d();});return{'attach'(_0x19d591){_0x5b2312['observe'](_0x19d591,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5b2312['disconnect'](),_0x29212d['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1c8945,_0x2cdb90){super(_0x1c8945),this['id']=_0x212bea(),this['focusTracker']=new _0x471a49(),this['keystrokes']=new _0x3b982e(),this['keystrokes']['set']('Esc',(_0x4f6934,_0x827e0b)=>this['fire']('Esc',_0x827e0b)),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'](_0x2cdb90),this['mainView']=_0x2cdb90;const _0x25f15c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x25f15c['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 _0x3771fb=this['element']['clientHeight'];_0x3771fb&&(this['height']=_0x3771fb);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x569430();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1a1220,target:_0xd5e080,type:_0x5a7c5b,isVisible:_0x4dfeab=!0x0}){super(),this['view']=_0x1a1220,this['view']['element']||this['view']['render'](),this['_type']=_0x5a7c5b,this['_target']=_0xd5e080,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3ec6c0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x223907,_0x25a72f)=>{this['view']['focusTracker']['add'](_0x25a72f);}),this['focusableElements']['on']('remove',(_0x3d8fd8,_0x4b75ad)=>{this['view']['focusTracker']['remove'](_0x4b75ad);}),this['set']('isVisible',_0x4dfeab);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x38fb4c=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x38fb4c),_0x38fb4c;}get['targetRect'](){const _0x3828a0=this['target'];if(null===_0x3828a0)return null;if(_0x3828a0 instanceof _0x45be68)return _0x3828a0;const _0x1853d7=_0x3828a0['filter'](_0x295da9=>function(_0x28312b){return!!_0x28312b['offsetParent']||!!_0x28312b['getClientRects']()['item'](0x0);}(_0x295da9));return 0x0===_0x1853d7['length']?null:_0x45be68['getDomElementRects'](_0x1853d7[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x46098a){this['view']['isActive']=_0x46098a,this['view']['mainView']['isActive']=_0x46098a;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2cff4f){if(!(null===_0x2cff4f||_0x2cff4f instanceof _0x45be68||Array['isArray'](_0x2cff4f)&&_0x2cff4f['every'](_0x29cf70=>zt(_0x29cf70))))throw new _0x8e9278('annotation-invalid-target',null,{'target':_0x2cff4f});}['_getNormalizedTarget'](){const _0x57f638='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x57f638)?[_0x57f638]:_0x57f638;}};function zt(_0x1d50fa){return null!==_0x1d50fa&&'object'==typeof _0x1d50fa&&'nodeType'in _0x1d50fa&&0x1===_0x1d50fa['nodeType'];}var Jt=class extends _0x3ec6c0{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3e1e0e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x471a49(),this['_focusTracker']['on']('change:isFocused',(_0x384c5b,_0x43670a,_0xd4bbd5)=>{_0xd4bbd5||this['fire']('blur');});for(const _0x5d4097 of _0x3e1e0e)this['add'](_0x5d4097);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2174ad){if(this['has'](_0x2174ad))throw new _0x8e9278('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2174ad['innerView'],_0x2174ad),this['_viewToAnnotation']['set'](_0x2174ad['view'],_0x2174ad);for(const _0x575d57 of _0x2174ad['focusableElements'])this['_focusTracker']['add'](_0x575d57);if(this['listenTo'](_0x2174ad['focusableElements'],'add',(_0x1f7e7a,_0x5618ab)=>{this['_focusTracker']['add'](_0x5618ab);}),this['listenTo'](_0x2174ad['focusableElements'],'remove',(_0x32f85c,_0x1f9d4b)=>{this['_focusTracker']['remove'](_0x1f9d4b);}),this['listenTo'](_0x2174ad['view']['focusTracker'],'change:isFocused',(_0x218543,_0xd01f99,_0x399cf2)=>{_0x399cf2&&this['fire']('focus',_0x2174ad);}),_0x2174ad['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x380a08 of this)_0x380a08['updateTargetRect']();}const _0x4315f2=this['_getOrderInContent'](_0x2174ad['view']['targetRect']);return super['add'](_0x2174ad,_0x4315f2);}['remove'](_0x207a52){if(!this['has'](_0x207a52))throw new _0x8e9278('annotationcollection-not-existing-item',null);this['stopListening'](_0x207a52['view']['focusTracker']),this['stopListening'](_0x207a52['focusableElements']);for(const _0x1e205a of _0x207a52['focusableElements'])this['_focusTracker']['remove'](_0x1e205a);return this['_viewToAnnotation']['delete'](_0x207a52['view']),this['_innerViewToAnnotation']['delete'](_0x207a52['innerView']),super['remove'](_0x207a52);}['getByInnerView'](_0x22fe1e){return this['_innerViewToAnnotation']['get'](_0x22fe1e);}['getByView'](_0x416dee){return this['_viewToAnnotation']['get'](_0x416dee);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x23e58c of this)_0x23e58c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5f025b=Array['from'](this)['sort']((_0x2a44e8,_0x566df)=>Zt(_0x2a44e8['view']['targetRect'],_0x566df['view']['targetRect']));for(let _0x1511e0=_0x5f025b['length']-0x1;_0x1511e0>0x0;_0x1511e0--){const _0x348930=_0x5f025b[_0x1511e0];_0x1511e0!==this['getIndex'](_0x348930)&&(this['remove'](_0x348930),this['add'](_0x348930));}}['_getOrderInContent'](_0x658c4a){let _0x13a2e8=0x0;if(!_0x658c4a)return this['length'];for(const _0x4b60ee of this){const _0x4c2903=_0x4b60ee['view']['targetRect'];if(_0x4c2903){if(Zt(_0x658c4a,_0x4c2903)<0x0)return _0x13a2e8;_0x13a2e8++;}}return _0x13a2e8;}['_areCachedRectsStale'](){const _0x56af6=this['get'](0x0);if(!_0x56af6)return!0x1;const _0x456e85=_0x56af6['view']['targetRect'],_0x6bd46d=_0x56af6['targetRect'];return!(!_0x456e85||!_0x6bd46d)&&(_0x456e85['top']!==_0x6bd46d['top']||_0x456e85['left']!==_0x6bd46d['left']);}};function Qt({source:_0x23dfbe,target:_0x3d126f,filter:_0x59008c}){for(const _0x4c8c45 of _0x23dfbe)_0x59008c(_0x4c8c45)&&_0x3d126f['add'](_0x4c8c45);_0x3d126f['listenTo'](_0x23dfbe,'add',(_0x14861d,_0x2f6fd3)=>{_0x59008c(_0x2f6fd3)&&_0x3d126f['add'](_0x2f6fd3);}),_0x3d126f['listenTo'](_0x23dfbe,'remove',(_0x45f535,_0x1b0219)=>{_0x3d126f['has'](_0x1b0219)&&_0x3d126f['remove'](_0x1b0219);});}function Zt(_0x2cd0fd,_0x15cfe7){if(null===_0x2cd0fd&&null===_0x15cfe7)return 0x0;if(null===_0x2cd0fd)return-0x1;if(null===_0x15cfe7)return 0x1;const _0x51c085=_0x2cd0fd['top']-_0x15cfe7['top'];return 0x0==_0x51c085?_0x2cd0fd['left']-_0x15cfe7['left']:_0x51c085;}var ti=class extends _0x5baefc{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f6b2d){if(super(_0x4f6b2d),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4f6b2d instanceof _0x5eeeec){const _0x235bcb=_0x4f6b2d['locale'];_0x4f6b2d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x235bcb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5d9c6e){this['collection']['add'](_0x5d9c6e);}['remove'](_0x52a2a7){this['collection']['remove'](_0x52a2a7),_0x52a2a7['destroy']();}['refreshVisibility'](){for(const _0xc9bded of this['collection'])_0xc9bded['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x533bbb){return this['collection']['getByInnerView'](_0x533bbb);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1f90c3 of this['collection'])_0x1f90c3['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xbe2f0b){this['fire']('_activateAnnotation',_0xbe2f0b);}['createAnnotation'](_0x55cdc0){return new $t(_0x55cdc0);}['createAnnotationView'](_0x22f4b2,_0x207522){return new qt(_0x22f4b2,_0x207522);}['_addActiveAnnotation'](_0x24e8f6){const _0x3960ae=new Set(this['activeAnnotations']);_0x3960ae['add'](_0x24e8f6),this['activeAnnotations']=_0x3960ae;}['_removeActiveAnnotation'](_0x35da6d){const _0xcfa173=new Set(this['activeAnnotations']);_0xcfa173['delete'](_0x35da6d),this['activeAnnotations']=_0xcfa173;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1dd828=this['collection'],_0x1f015b=this['_visibleAnnotations'];function _0x2e6c54(_0x30ef5e){const _0x603d04=_0x30ef5e['source'];_0x603d04['isVisible']&&!_0x1f015b['has'](_0x603d04)?_0x1f015b['add'](_0x603d04):!_0x603d04['isVisible']&&_0x1f015b['has'](_0x603d04)&&_0x1f015b['remove'](_0x603d04),_0x603d04['view']['focusTracker']['remove'](_0x603d04['view']['element']),_0x603d04['view']['focusTracker']['add'](_0x603d04['view']['element']);}this['listenTo'](_0x1dd828,'add',(_0x15a32e,_0x13b9ae)=>{_0x13b9ae['isVisible']&&_0x1f015b['add'](_0x13b9ae),this['listenTo'](_0x13b9ae,'change:isVisible',_0x2e6c54);}),this['listenTo'](_0x1dd828,'remove',(_0x2924d3,_0x166fc3)=>{_0x1f015b['has'](_0x166fc3)&&_0x1f015b['remove'](_0x166fc3),this['stopListening'](_0x166fc3,'change:isVisible',_0x2e6c54);});}['_setupEnterAnnotationKeystroke'](){const _0x35bd86=_0x4c3512=>{_0x4c3512['on']('ready',()=>{_0x4c3512['keystrokes']['set'](_0x45cce3,(_0x41d517,_0x423020)=>{const _0x427840=_0x3d2c2a(this['activeAnnotations']['values']());_0x427840&&(_0x427840['view']['focus'](),_0x423020());});});};this['context']instanceof _0x5eeeec?_0x35bd86(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4415dc,_0x3763a0)=>{_0x35bd86(_0x3763a0);});}['_setupEscapeAnnotationHandling'](){const _0x594cc0=_0x18cb80=>{const _0x256b44=_0x18cb80['source'],_0x1da92b=[];let _0x5ef2b6;if(Array['isArray'](_0x256b44['target'])){_0x5ef2b6=_0x256b44['target'][0x0],this['context']instanceof _0x5eeeec?_0x1da92b['push'](this['context']):this['context']['editors']&&_0x1da92b['push'](...this['context']['editors']);for(const _0xe268ec of _0x1da92b)for(const _0x4b2dd2 of _0xe268ec['editing']['view']['domRoots']['values']())if(_0x4b2dd2['contains'](_0x5ef2b6))return void _0xe268ec['editing']['view']['focus']();_0x5ef2b6['focus']();}};this['listenTo'](this['collection'],'add',(_0x388e40,_0x1dc39c)=>{this['listenTo'](_0x1dc39c,'escape',_0x594cc0,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x30e809,_0x54ffb2)=>{this['stopListening'](_0x54ffb2,'escape',_0x594cc0);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x569430(),ni=/* #__PURE__ -- @preserve */
31
+ _0x569430();var oi=class extends _0x5baefc{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x533e30,_0x21dd23];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ac6ca){super(_0x4ac6ca),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x56b24e=this['context']['config'];_0x56b24e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x56b24e['define']('comments.maxThreadTotalWeight',0x1f4),_0x56b24e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x56b24e['define']('comments.CommentThreadView',Ut),_0x56b24e['define']('comments.CommentView',Yt),_0x56b24e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3a70ca=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x74b28,_0x161a66)=>this['_addCommentThread'](_0x161a66)),this['on']('submitCommentThread',(_0x36cc8c,_0x11719f)=>this['_submitCommentThread'](_0x11719f)),this['on']('resolveCommentThread',(_0x460ee6,_0x2b190d)=>this['_resolveCommentThread'](_0x2b190d)),this['on']('resolveCommentThread',(_0xbecb51,_0x213f72)=>this['_updateActiveAnnotation'](_0x213f72),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x340c31,_0x57a135)=>this['_reopenCommentThread'](_0x57a135)),this['on']('reopenCommentThread',(_0x89d5ff,_0x5e08b8)=>this['_updateActiveAnnotation'](_0x5e08b8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5cfe24,_0x380355)=>this['_removeCommentThread'](_0x380355)),this['on']('updateCommentThread',(_0x16a7e0,_0x25a789)=>this['_updateCommentThread'](_0x25a789)),this['on']('updateCommentThread',(_0x1a4b30,_0x55c6c0)=>this['_updateActiveAnnotation'](_0x55c6c0),{'priority':'lowest'}),this['on']('addComment',(_0x137f3c,_0x4ddf74)=>this['_addComment'](_0x4ddf74)),this['on']('updateComment',(_0x3fb00f,_0x183f5b)=>this['_updateComment'](_0x183f5b)),this['on']('removeComment',(_0x5d9ddc,_0x10b803)=>this['_removeComment'](_0x10b803)),this['on']('addComment',(_0xf821a8,{threadId:_0xef4505,isFromAdapter:_0x3e4b19})=>{if(_0x3e4b19)return;const _0xd1e0d7=this['getCommentThread'](_0xef4505),_0x2dc190=_0xd1e0d7&&this['_threadToController']['get'](_0xd1e0d7);_0x2dc190&&_0x2dc190['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3a70ca,'change:activeAnnotations',(_0x55d156,_0x444f6a,_0x40f13e)=>{const _0x276553=Array['from'](_0x40f13e)['map'](_0x28a8b7=>this['_viewToController']['get'](_0x28a8b7['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x276553?_0x276553['model']:null;});}set['adapter'](_0x4a858b){if(this['_adapter'])throw new _0x8e9278('commentsrepository-adapter-already-set');this['_adapter']=_0x4a858b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x21d2c4=ii,threadId:_0x21295c=_0x212bea(),comments:_0x20b337=[],unlinkedAt:_0x2b8b4c=null,resolvedAt:_0x1a94a4=null,resolvedBy:_0x5b16be=null,target:_0x4b2c77=null,context:_0x24ade6=null,attributes:_0x57d75c={},isResolvable:_0xfd3112=!0x0,isSubmitted:_0x2b3d97=!0x1,isFromAdapter:_0x5a7595=!0x1}={}){return this['fire'](ai('addCommentThread',_0x21d2c4),{'channelId':_0x21d2c4,'threadId':_0x21295c,'comments':_0x20b337,'unlinkedAt':_0x2b8b4c,'resolvedAt':_0x1a94a4,'resolvedBy':_0x5b16be,'target':_0x4b2c77,'context':_0x24ade6,'attributes':_0x57d75c,'isFromAdapter':_0x5a7595,'isResolvable':_0xfd3112,'isSubmitted':_0x2b3d97}),this['getCommentThread'](_0x21295c);}['openNewCommentThread']({channelId:_0x428271=ii,threadId:_0x5da3a5=_0x212bea(),target:_0x31b118,context:_0x2cebe8=null,isResolvable:_0x1aa58d=!0x0}){if(this['_readOnlyChannels']['has'](_0x428271)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x31b118)throw new _0x8e9278('commentsrepository-missing-target');const _0x6dcc8c=this['addCommentThread']({'channelId':_0x428271,'threadId':_0x5da3a5,'target':_0x31b118,'context':_0x2cebe8,'isResolvable':_0x1aa58d});if(!_0x6dcc8c)return null;const _0x25a31e=this['_threadToController']['get'](_0x6dcc8c),_0x1f9bc4=_0x25a31e['view']['commentThreadInputView']['commentInputView'],_0x17de29=this['context']['plugins']['get'](ti),_0x59349a=_0x17de29['getByInnerView'](_0x25a31e['view']);return _0x17de29['activate'](_0x59349a),_0x1f9bc4['once']('editorReady',()=>_0x1f9bc4['focus']()),_0x6dcc8c;}['hasCommentThread'](_0x2a3cd6){if('string'!=typeof _0x2a3cd6)throw new _0x8e9278('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2a3cd6);}['updateCommentThread']({channelId:_0x11bd8f=ii,threadId:_0x63cc79,context:_0x4f55fd,unlinkedAt:_0x1d4c1d,attributes:_0x47caf9,isFromAdapter:_0x57409f=!0x1}){return this['fire'](ai('updateCommentThread',_0x11bd8f),{'channelId':_0x11bd8f,'threadId':_0x63cc79,'context':_0x4f55fd,'unlinkedAt':_0x1d4c1d,'attributes':_0x47caf9,'isFromAdapter':_0x57409f}),this['getCommentThread'](_0x63cc79);}['getCommentThread'](_0x4960e8){if('string'!=typeof _0x4960e8)throw new _0x8e9278('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4960e8);}['fetchCommentThread']({channelId:_0x2d24a7,threadId:_0x4ba6af}={}){const _0x15409f=this['getCommentThread'](_0x4ba6af);if(_0x15409f)return Promise['resolve'](_0x15409f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x8e9278('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2d24a7,'threadId':_0x4ba6af})['then'](_0x38f1fc=>this['hasCommentThread'](_0x4ba6af)?this['getCommentThread'](_0x4ba6af):_0x38f1fc?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2d24a7},_0x38f1fc)):void 0x0)['catch'](_0x4097a9=>{throw console['error'](_0x4097a9),new _0x8e9278('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x85fda5,skipNotAttached:_0x566976=!0x1,skipEmpty:_0x1a9e21=!0x1,toJSON:_0x37badd=!0x1}={}){const _0x3d1931=[];for(const _0x5f2a57 of this['_threads']['values']())_0x85fda5&&_0x5f2a57['channelId']!==_0x85fda5||_0x566976&&!_0x5f2a57['isAttached']||_0x1a9e21&&0x0===_0x5f2a57['length']||_0x3d1931['push'](_0x5f2a57);return _0x37badd?_0x3d1931['map'](_0xaa53=>_0xaa53['toJSON']()):_0x3d1931;}['getAnnotationForCommentThread'](_0x116c5e){const _0x44b2ad=this['_threadToController']['get'](_0x116c5e);return _0x44b2ad&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x44b2ad['view'])||null;}['getCommentThreadForAnnotation'](_0x248e35){const _0x541e91=this['_viewToController']['get'](_0x248e35['innerView']);return _0x541e91?_0x541e91['model']:null;}['setActiveCommentThread'](_0x414419){const _0x1ed017=this['context']['plugins']['get'](ti);if(!_0x414419)return void(this['activeCommentThread']&&_0x1ed017['deactivateAll']());const _0x3c0ff3=this['getCommentThread'](_0x414419);if(!_0x3c0ff3)throw new _0x8e9278('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x414419});if(!this['_threadToController']['has'](_0x3c0ff3))throw new _0x8e9278('commentsrepository-active-not-attached',null,{'threadId':_0x414419});const _0x2913fd=_0x1ed017['getByInnerView'](this['_threadToController']['get'](_0x3c0ff3)['view']);_0x1ed017['activate'](_0x2913fd);}['switchReadOnly'](_0x21f792,_0x5c2e3b){_0x21f792?this['_readOnlyChannels']['add'](_0x5c2e3b):this['_readOnlyChannels']['delete'](_0x5c2e3b),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1523ab){return this['_readOnlyChannels']['has'](_0x1523ab)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2c34e9,_0x416fa5){return new bt(_0x2c34e9,_0x416fa5);}['setPermissions'](_0x2e4b65,_0x54533d=ii){this['_permissions']['set'](_0x54533d,_0x2e4b65),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x52f318=ii){return this['_permissions']['has'](_0x52f318)?this['_permissions']['get'](_0x52f318):ei;}['_addCommentThread']({channelId:_0xcc5e65,threadId:_0x5d3dba,comments:_0x581ffc,unlinkedAt:_0x40356f,resolvedAt:_0x5484bd,resolvedBy:_0x30b562,target:_0x495e71,context:_0x2b714d,attributes:_0x1a6368,isFromAdapter:_0x50c4bb,isResolvable:_0x103e3d,isSubmitted:_0x373567}){if('string'!=typeof _0x5d3dba)throw new _0x8e9278('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5d3dba});if(this['hasCommentThread'](_0x5d3dba))throw new _0x8e9278('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5d3dba});const _0x418e27=new ri(this,{'channelId':_0xcc5e65,'id':_0x5d3dba,'context':_0x2b714d,'attributes':_0x1a6368,'unlinkedAt':_0x40356f,'resolvedAt':_0x5484bd,'resolvedBy':_0x30b562?this['context']['plugins']['get'](_0x21dd23)['getUser'](_0x30b562):null,'isResolvable':_0x103e3d,'isSubmitted':_0x373567||_0x50c4bb});this['_threads']['set'](_0x5d3dba,_0x418e27);for(const _0x1fb105 of _0x581ffc)_0x418e27['_add'](this['_createNewComment']({'threadId':_0x5d3dba,..._0x1fb105}));return _0x495e71&&_0x418e27['attachTo'](_0x495e71),_0x50c4bb||!_0x418e27['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xcc5e65,'threadId':_0x5d3dba});}['_submitCommentThread']({channelId:_0xa38f18,threadId:_0x44b0d8}){if(!this['hasCommentThread'](_0x44b0d8))throw new _0x8e9278('commentsrepository-missing-comment-thread',this);const _0x36204f=this['getCommentThread'](_0x44b0d8);if(_0x36204f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5b2e5c,comments:_0x3fac87,resolvedAt:_0xfb0196,resolvedBy:_0x5eedd4,context:_0x308ce9,attributes:_0x2ba076}=_0x36204f,_0x56b3c3=this['context']['plugins']['get']('PendingActions'),_0x524c73=_0x56b3c3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xa38f18,'threadId':_0x5b2e5c,'comments':_0x3fac87['map'](_0x2574b4=>_0x2574b4['toJSON']()),'resolvedAt':_0xfb0196,'resolvedBy':_0x5eedd4?_0x5eedd4['id']:_0x5eedd4,'context':_0x308ce9,'attributes':_0x2ba076})['then'](({comments:_0x4c32e3})=>{_0x56b3c3['remove'](_0x524c73);for(const _0x3b511d of _0x4c32e3)this['_updateComment']({'channelId':_0xa38f18,'threadId':_0x44b0d8,'commentId':_0x3b511d['commentId'],'createdAt':_0x3b511d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2b2abb=>{throw console['error'](_0x2b2abb),new _0x8e9278('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x197fc0,target:_0x5c2ba0}){const _0x4d6203=this['getCommentThread'](_0x197fc0);if(!_0x4d6203)throw new _0x8e9278('commentsrepository-attach-missing-comment-thread',this);const _0x5ac3fd=this['context']['plugins']['get']('PendingActions'),_0x546242=this['context']['plugins']['get'](ti),_0x437306=this['_createCommentThreadView'](_0x4d6203),_0x546697=new bt(_0x4d6203,_0x437306);let _0x31fc63=null;_0x437306['on']('change:isDirty',(_0x1eb456,_0xad7f1e,_0x1be720)=>{_0x1be720?_0x31fc63=_0x5ac3fd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x31fc63&&(_0x5ac3fd['remove'](_0x31fc63),_0x31fc63=null);}),this['_threadToController']['set'](_0x4d6203,_0x546697),this['_viewToController']['set'](_0x437306,_0x546697);const _0x48f04d=new qt(this['context']['locale'],_0x437306);_0x48f04d['bind']('length')['to'](_0x437306),_0x48f04d['bind']('isDirty')['to'](_0x437306,'isDirty',_0x437306,'length',(_0x52ad53,_0x5765fb)=>_0x52ad53||!_0x5765fb),_0x48f04d['bind']('isActive')['to'](_0x437306),_0x48f04d['type']='comment';const _0x6c36fb=new $t({'view':_0x48f04d,'target':_0x5c2ba0,'type':'comment','isVisible':!_0x4d6203['archivedAt']&&!!('function'==typeof _0x5c2ba0?_0x5c2ba0():_0x5c2ba0)});return _0x437306['on']('escape',()=>{_0x6c36fb['fire']('escape');}),this['_bindAnnotationToEditors'](_0x437306,_0x6c36fb),_0x546242['add'](_0x6c36fb),_0x6c36fb;}['_bindAnnotationToEditors'](_0x270be1,_0x55f561){this['listenTo'](_0x270be1,'editorReady',(_0x79d486,_0x3f2256)=>{const _0x2a1bb1=_0x3f2256['ui']['view']['body']['bodyCollectionContainer'];_0x55f561['focusableElements']['add'](_0x2a1bb1),this['context']instanceof _0x5eeeec&&this['context']['ui']['focusTracker']['add'](_0x2a1bb1);},{'priority':'highest'}),this['listenTo'](_0x270be1,'editorDestroyed',(_0x3c432b,_0x124524)=>{const _0x22ec9b=_0x124524['ui']['view']['body']['bodyCollectionContainer'];_0x55f561['focusableElements']['has'](_0x22ec9b)&&_0x55f561['focusableElements']['remove'](_0x22ec9b),this['context']instanceof _0x5eeeec&&this['context']['ui']['focusTracker']['remove'](_0x22ec9b);});}['_unbindEditors'](_0x747d08){this['stopListening'](_0x747d08,'editorReady'),this['stopListening'](_0x747d08,'editorDestroyed');}['_createCommentThreadView'](_0x22195a){const _0x462c30=this['context']['plugins']['get'](_0x21dd23),{config:_0x268bf0,locale:_0x25bcdd}=this['context'],_0x49d716=_0x48369a(_0x268bf0['get']('locale'),_0x25bcdd);return new(0x0,(_0x268bf0['get']('comments'))['CommentThreadView'])(_0x25bcdd,_0x22195a,_0x462c30['me'],{'editorConfig':{..._0x268bf0['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x268bf0['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x268bf0['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x268bf0['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x268bf0['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x49d716,'CommentView':_0x268bf0['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x30eb31,channelId:_0x58484e,resolvedAt:_0x3e0b12,resolvedBy:_0x181d15,isFromAdapter:_0x4eb9e0}){if(!this['hasCommentThread'](_0x30eb31))throw new _0x8e9278('commentsrepository-missing-comment-thread',null,{'threadId':_0x30eb31});const _0x3317f8=this['getCommentThread'](_0x30eb31);if(_0x3317f8['isResolved'])throw new _0x8e9278('commentsrepository-resolved-comment-thread',null,{'threadId':_0x30eb31});const _0x5469af=this['context']['plugins']['get'](_0x21dd23);if(_0x3317f8['resolvedBy']=_0x5469af['getUser'](_0x181d15),_0x3317f8['resolvedAt']=_0x3e0b12,_0x4eb9e0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x394e62=this['context']['plugins']['get']('PendingActions'),_0x2f1fa1=_0x394e62['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x58484e,'threadId':_0x30eb31})['then'](({resolvedAt:_0x48357d,resolvedBy:_0x15c84d})=>{_0x394e62['remove'](_0x2f1fa1),_0x3317f8['resolvedBy']['id']!==_0x15c84d&&(_0x3317f8['resolvedBy']=_0x5469af['getUser'](_0x15c84d)),_0x3317f8['resolvedAt']=_0x48357d;})['catch'](_0xf32e1c=>{throw console['error'](_0xf32e1c),new _0x8e9278('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2b2858,channelId:_0x3815cc,isFromAdapter:_0x65769}){if(!this['hasCommentThread'](_0x2b2858))throw new _0x8e9278('commentsrepository-missing-comment-thread',null,{'threadId':_0x2b2858});const _0x4125fe=this['getCommentThread'](_0x2b2858);if(!_0x4125fe['isResolved'])throw new _0x8e9278('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2b2858});if(_0x4125fe['resolvedBy']=null,_0x4125fe['resolvedAt']=null,_0x65769||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3d9e90=this['context']['plugins']['get']('PendingActions'),_0x34d43a=_0x3d9e90['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3815cc,'threadId':_0x2b2858})['then'](()=>_0x3d9e90['remove'](_0x34d43a))['catch'](_0x12cf3e=>{throw console['error'](_0x12cf3e),new _0x8e9278('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x17649a,isFromAdapter:_0x57cd59}){const _0x4d59a7=this['getCommentThread'](_0x17649a);if(!_0x4d59a7)throw new _0x8e9278('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x17649a),this['_threads']['delete'](_0x17649a),!_0x4d59a7['isSubmitted']||_0x57cd59||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x21be33=this['context']['plugins']['get']('PendingActions'),{channelId:_0x503a6f}=_0x4d59a7,_0x5ba531=_0x21be33['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x503a6f,'threadId':_0x17649a})['then'](()=>_0x21be33['remove'](_0x5ba531))['catch'](_0x8c786b=>{throw console['error'](_0x8c786b),new _0x8e9278('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x12830c,unlinkedAt:_0x463b9a,context:_0x5e002e,attributes:_0xf4c2ff,isFromAdapter:_0x5745d6}){if('string'!=typeof _0x12830c)throw new _0x8e9278('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x12830c});if(!this['hasCommentThread'](_0x12830c))throw new _0x8e9278('commentsrepository-missing-comment-thread',null,{'threadId':_0x12830c});const _0x20833b=this['getCommentThread'](_0x12830c);let _0x5224c7=!0x1;if(void 0x0!==_0x5e002e&&_0x20833b['context']!==_0x5e002e&&(_0x20833b['context']=_0x5e002e,_0x5224c7=!0x0),void 0x0!==_0x463b9a&&_0x20833b['unlinkedAt']!==_0x463b9a&&(_0x20833b['unlinkedAt']=_0x463b9a,_0x5224c7=!0x0),_0xf4c2ff&&!_0x169e3f(_0xf4c2ff,_0x20833b['attributes'])&&(_0x20833b['attributes']=_0xf4c2ff,_0x5224c7=!0x0),!_0x5224c7)return Promise['resolve']();if(!_0x20833b['isSubmitted']||_0x5745d6||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x30ab10=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5e6af2}=_0x20833b,_0x575aff=_0x30ab10['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5e6af2,'threadId':_0x12830c,'context':_0x5e002e,'unlinkedAt':_0x463b9a,'attributes':_0xf4c2ff})['then'](()=>_0x30ab10['remove'](_0x575aff))['catch'](_0x30ba7e=>{throw console['error'](_0x30ba7e),new _0x8e9278('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xb2bcaf){const _0x17ce3a=this['context']['plugins']['get'](ti),_0x1f5e33=this['getCommentThread'](_0xb2bcaf);if(_0x1f5e33['_isAttached']=!0x1,this['_threadToController']['has'](_0x1f5e33)){const _0x265ab5=this['_threadToController']['get'](_0x1f5e33),_0x5b8dd8=_0x265ab5['view'],_0x3e7f65=_0x17ce3a['getByInnerView'](_0x5b8dd8);this['_threadToController']['delete'](_0x1f5e33),this['_viewToController']['delete'](_0x5b8dd8),_0x3e7f65&&_0x17ce3a['remove'](_0x3e7f65),_0x265ab5['destroy'](),_0x5b8dd8['destroy']()['then'](()=>{this['_unbindEditors'](_0x5b8dd8);});}}['_updateActiveAnnotation']({threadId:_0x43ba2e,resolvedAt:_0x496419,unlinkedAt:_0x534aab}){const _0xa4cb57=!!_0x496419,_0x48653f=this['context']['plugins']['get'](ti),_0x257d14=this['getCommentThread'](_0x43ba2e);if(this['_threadToController']['has'](_0x257d14)){const _0xb0efe4=this['_threadToController']['get'](_0x257d14)['view'],_0x2d443b=_0x48653f['getByInnerView'](_0xb0efe4);_0x2d443b&&(_0xa4cb57&&_0x48653f['_removeActiveAnnotation'](_0x2d443b),_0x534aab?_0x2d443b['isVisible']=!0x1:_0x2d443b['refreshVisibility']());}}['_getExternalAuthor'](_0x166863){const _0x5c945e=this['context']['plugins']['get'](_0x21dd23),_0x507db0=_0x242918('external:'+_0x166863),_0x44cc52=_0x5c945e['getUser'](_0x507db0);return _0x44cc52||_0x5c945e['addUser']({'id':_0x507db0,'name':_0x166863});}['_createNewComment']({threadId:_0x5cf310,commentId:_0x3aef53=_0x212bea(),content:_0x54e30d,authorId:_0x9445ed,createdAt:_0x2ae232,attributes:_0x41ddd3}){if('string'!=typeof _0x3aef53)throw new _0x8e9278('commentsrepository-invalid-commentid');if('string'!=typeof _0x9445ed)throw new _0x8e9278('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x54e30d||!_0x54e30d['trim']())throw new _0x8e9278('commentsrepository-invalid-comment-content');const _0x20519e=this['context']['plugins']['get'](_0x21dd23)['getUser'](_0x9445ed);if(!_0x20519e)throw new _0x8e9278('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x9445ed});let _0x20a92e=null,_0x5e9265=_0x2ae232;return _0x41ddd3?.['@external']&&(_0x20a92e=this['_getExternalAuthor'](_0x41ddd3['@external']['authorName']),_0x5e9265=new Date(_0x41ddd3['@external']['createdAt'])),new hi(this,{'threadId':_0x5cf310,'id':_0x3aef53,'author':_0x20a92e||_0x20519e,'creator':_0x20519e,'content':_0x54e30d,'createdAt':_0x2ae232,'authoredAt':_0x5e9265,'attributes':_0x41ddd3});}['_addComment'](_0x7a01df){let {threadId:_0x303691,content:_0x11a3f1,attributes:_0x2192f4,isFromAdapter:_0x58f9a3}=_0x7a01df;const _0x24ee5c=this['getCommentThread'](_0x7a01df['threadId']);if(!_0x24ee5c)throw new _0x8e9278('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4cd940=this['_createNewComment'](_0x7a01df),{id:_0x459a9f}=_0x4cd940;if(_0x24ee5c['_add'](_0x4cd940),_0x58f9a3||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x24ee5c['isSubmitted'])return Promise['resolve']();const _0x189a5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13f318}=_0x24ee5c,_0x38ca7d=_0x189a5c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2192f4||(_0x2192f4={}),this['adapter']['addComment']({'channelId':_0x13f318,'threadId':_0x303691,'commentId':_0x459a9f,'content':_0x11a3f1,'attributes':_0x2192f4})['then'](_0x1da98=>{_0x189a5c['remove'](_0x38ca7d),_0x1da98&&this['_updateComment']({'channelId':_0x13f318,'threadId':_0x303691,'commentId':_0x459a9f,'createdAt':_0x1da98['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x57dbae=>{throw console['error'](_0x57dbae),new _0x8e9278('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5c3759,commentId:_0x3abb3a,content:_0x277b51,createdAt:_0x396eeb,attributes:_0x3cb4c0,isFromAdapter:_0x2656dd}){if(void 0x0!==_0x277b51&&('string'!=typeof _0x277b51||!_0x277b51['trim']()['length']))throw new _0x8e9278('commentsrepository-update-comment-invalid-content');const _0x25704f=this['getCommentThread'](_0x5c3759),_0x2241ab=_0x25704f['getComment'](_0x3abb3a);if(!_0x2241ab)throw new _0x8e9278('commentsrepository-update-missing-comment',this);let _0x5ed713=!0x1;if(_0x277b51&&_0x277b51!==_0x2241ab['content']&&(_0x2241ab['isEditable']||_0x2656dd)&&(_0x2241ab['content']=_0x277b51,_0x5ed713=!0x0),_0x396eeb&&_0x396eeb!==_0x2241ab['createdAt']&&(_0x2241ab['createdAt']=_0x396eeb,_0x2241ab['isExternal']||(_0x2241ab['authoredAt']=_0x396eeb),_0x5ed713=!0x0),_0x3cb4c0&&!_0x169e3f(_0x3cb4c0,_0x2241ab['attributes'])&&(_0x2241ab['attributes']=_0x3cb4c0,_0x5ed713=!0x0),!_0x5ed713)return Promise['resolve']();if(_0x25704f['fire']('commentUpdated'),_0x2656dd||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a0a8d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16b195}=this['getCommentThread'](_0x2241ab['threadId']),_0x584ba2=_0x5a0a8d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x16b195,'threadId':_0x5c3759,'commentId':_0x3abb3a,'content':_0x277b51,'attributes':_0x3cb4c0})['then'](()=>_0x5a0a8d['remove'](_0x584ba2))['catch'](_0x2cb8f6=>{throw console['error'](_0x2cb8f6),new _0x8e9278('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x84c67b,commentId:_0x4a48aa,isFromAdapter:_0x24791e}){const _0x312283=this['getCommentThread'](_0x84c67b),_0x3b0efd=_0x312283['getComment'](_0x4a48aa);if(!_0x3b0efd)throw new _0x8e9278('commentsrepository-remove-missing-comment',this);if(_0x312283['_remove'](_0x3b0efd),_0x24791e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x8a4f94=this['context']['plugins']['get']('PendingActions'),{channelId:_0x175d62}=_0x312283,_0x2c853a=_0x8a4f94['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x175d62,'threadId':_0x84c67b,'commentId':_0x4a48aa})['then'](()=>_0x8a4f94['remove'](_0x2c853a))['catch'](_0x4e5e82=>{throw console['error'](_0x4e5e82),new _0x8e9278('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x362802,_0x1630f4){super();const _0x2045be=_0x1630f4['isResolvable'];this['channelId']=_0x1630f4['channelId'],this['id']=_0x1630f4['id'],this['comments']=new _0x3ec6c0(),this['_repository']=_0x362802,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1630f4['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x362802,'_permissions',_0x362802,'_readOnlyChannels',()=>_0x362802['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x362802,'_permissions',()=>_0x362802['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x362802,'_permissions',()=>{const _0x3a35b9=_0x362802['getPermissions'](this['channelId']);return _0x3a35b9['write']||_0x3a35b9['admin'];}),this['bind']('isResolvable')['to'](_0x362802,'_permissions',()=>_0x2045be&&_0x362802['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1630f4['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4ebc2d,_0x3027c6)=>_0x4ebc2d?_0x3027c6?_0x4ebc2d<_0x3027c6?_0x4ebc2d:_0x3027c6:_0x4ebc2d:_0x3027c6),this['set']('unlinkedAt',_0x1630f4['unlinkedAt']||null),this['set']('resolvedAt',_0x1630f4['resolvedAt']||null),this['set']('resolvedBy',_0x1630f4['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5692eb=>!!_0x5692eb),this['set']('attributes',_0x1630f4['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2513c8,_0x6ed18f)=>_0x2513c8+_0x6ed18f['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5bbb57,id:_0x25d23c}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5bbb57),{'channelId':_0x5bbb57,'threadId':_0x25d23c});}['setUnlinkedAt'](_0x188a34){this['_update']({'unlinkedAt':_0x188a34});}['resolve']({resolvedAt:_0x8aa5fe=new Date(),resolvedBy:_0x15e636='',isFromAdapter:_0x38d78d=!0x1}={}){const _0x44d0df=this['_repository']['context']['plugins']['get'](_0x21dd23)['me'],{channelId:_0x28f5b8,id:_0x56e7d7}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x28f5b8),{'channelId':_0x28f5b8,'threadId':_0x56e7d7,'resolvedAt':_0x8aa5fe,'resolvedBy':_0x15e636||_0x44d0df['id'],'isFromAdapter':_0x38d78d});}['reopen']({isFromAdapter:_0x13d8d4=!0x1}={}){const {channelId:_0x150da9,id:_0x53468c}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x150da9),{'channelId':_0x150da9,'threadId':_0x53468c,'isFromAdapter':_0x13d8d4});}['setContext'](_0x2d94c4){this['context']||this['_update']({'context':_0x2d94c4});}['setAttribute'](_0x4cb785,_0x4dd521){const _0x285b9c=_0x35fed6(this['attributes']);_0x21565c(_0x285b9c,_0x4cb785,_0x4dd521),this['_update']({'attributes':_0x285b9c});}['removeAttribute'](_0x3db15c){const _0x521d2d=_0x35fed6(this['attributes']);_0x1ee3b7(_0x521d2d,_0x3db15c),this['_update']({'attributes':_0x521d2d});}['remove']({isFromAdapter:_0x1b136f=!0x1}={}){const {channelId:_0x4cbad6,id:_0x5e3080}=this;this['_repository']['fire'](ai('removeCommentThread',_0x4cbad6),{'channelId':_0x4cbad6,'threadId':_0x5e3080,'isFromAdapter':_0x1b136f});}['attachTo'](_0x31c6fb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x31c6fb});}['addComment'](_0x2329c7){const {channelId:_0x3adb91,id:_0x570aa2}=this;this['_repository']['fire'](ai('addComment',_0x3adb91,_0x570aa2),Object['assign']({'channelId':_0x3adb91,'threadId':_0x570aa2},_0x2329c7));}['getComment'](_0x19035b){if('string'!=typeof _0x19035b)throw new _0x8e9278('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x19035b});return this['comments']['get'](_0x19035b);}['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'](_0x14fd32=>_0x14fd32['toJSON']()),'attributes':this['attributes']};}['_add'](_0x163ad5){return this['listenTo'](_0x163ad5,'change:authoredAt',()=>{const _0x2d4250=this['_findOptimalIndex'](_0x163ad5),_0x540e31=this['comments'];_0x2d4250-0x1!=_0x540e31['getIndex'](_0x163ad5)&&_0x2d4250+0x1!=_0x540e31['getIndex'](_0x163ad5)&&(this['_remove'](_0x163ad5),this['_add'](_0x163ad5));}),this['comments']['add'](_0x163ad5,this['_findOptimalIndex'](_0x163ad5));}['_update'](_0x9fab2f){const {channelId:_0x425741,id:_0x3c8a36}=this;this['_repository']['fire'](ai('updateCommentThread',_0x425741),{..._0x9fab2f,'channelId':_0x425741,'threadId':_0x3c8a36});}['_remove'](_0x3497a0){return this['stopListening'](_0x3497a0),_0x3497a0['destroy'](),this['comments']['remove'](_0x3497a0);}['_findOptimalIndex'](_0xb8dca3){const _0x25935b=this['comments']['find'](_0x111268=>new Date(_0x111268['authoredAt'])['getTime']()>new Date(_0xb8dca3['authoredAt'])['getTime']());return _0x25935b?this['comments']['getIndex'](_0x25935b):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x25f4a3,_0x15b351){super();const _0xfb012a=_0x25f4a3['context']['plugins']['get'](_0x21dd23)['me'],_0x59e4f5=_0x25f4a3['getCommentThread'](_0x15b351['threadId']),_0x59964e=0x0===_0x59e4f5['comments']['length'],_0x486789=_0xfb012a===_0x15b351['author'];this['id']=_0x15b351['id'],this['threadId']=_0x15b351['threadId'],this['author']=_0x15b351['author'],this['creator']=_0x15b351['creator'],this['set']('content',_0x15b351['content']),this['createdAt']=_0x15b351['createdAt']||new Date(),this['set']('authoredAt',_0x15b351['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x59e4f5,'resolvedAt'),this['set']('attributes',_0x15b351['attributes']||{}),this['bind']('isEditable')['to'](_0x25f4a3,'_permissions',()=>{const _0x98bb5e=_0x25f4a3['getPermissions'](_0x59e4f5['channelId'])['write'],_0x3bd86e=_0x25f4a3['getPermissions'](_0x59e4f5['channelId'])['modifyAll'];return _0x486789&&_0x98bb5e||!_0x486789&&_0x3bd86e;}),this['bind']('isRemovable')['to'](_0x59e4f5,'isRemovable',_0x25f4a3,'_permissions',_0x178900=>{const _0x4fd589=_0x25f4a3['getPermissions'](_0x59e4f5['channelId'])['write'],_0x149a28=_0x25f4a3['getPermissions'](_0x59e4f5['channelId'])['modifyAll'];return _0x486789&&_0x4fd589||_0x178900&&_0x59964e||!_0x486789&&_0x149a28&&!_0x59964e;}),this['bind']('isReadOnly')['to'](_0x59e4f5,'isReadOnly'),this['_repository']=_0x25f4a3;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x4b2966){const _0x27ec4d=document['createElement']('div');return _0x27ec4d['innerHTML']=_0x4b2966,_0x27ec4d['textContent']['length'];}(this['content']),0xc8);}['update'](_0x33173e){const {threadId:_0x3e4ca2,id:_0x110365}=this;if(!this['_repository']['hasCommentThread'](_0x3e4ca2))throw new _0x8e9278('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xca3a4d}=this['_repository']['getCommentThread'](_0x3e4ca2);this['_repository']['fire'](ai('updateComment',_0xca3a4d,_0x3e4ca2),{'channelId':_0xca3a4d,'threadId':_0x3e4ca2,'commentId':_0x110365,..._0x33173e});}['setAttribute'](_0x92e77a,_0x7ab826){const _0x4898ae=_0x35fed6(this['attributes']);_0x21565c(_0x4898ae,_0x92e77a,_0x7ab826),this['update']({'attributes':_0x4898ae});}['removeAttribute'](_0x101ff2){const _0x308613=_0x35fed6(this['attributes']);_0x1ee3b7(_0x308613,_0x101ff2),this['update']({'attributes':_0x308613});}['remove'](_0x14ff02={}){if(!_0x14ff02['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x5c9596,id:_0x999c5a}=this;if(!this['_repository']['hasCommentThread'](_0x5c9596))throw new _0x8e9278('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x189bfc}=this['_repository']['getCommentThread'](_0x5c9596);this['_repository']['fire'](ai('removeComment',_0x189bfc,_0x5c9596),{'channelId':_0x189bfc,'threadId':_0x5c9596,'commentId':_0x999c5a,..._0x14ff02});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x532001,..._0x165c6b){for(const _0x14642d of _0x165c6b)void 0x0!==_0x14642d&&(_0x532001+=':'+String(_0x14642d));return _0x532001;}var ci=class extends _0xb11cd5{constructor(_0x4787a2){super(_0x4787a2),this['set']('hasContent',!0x1);}['refresh'](){const _0x3b5af0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x476359 of _0x3b5af0['getRanges']())if(this['_hasContent'](_0x476359))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x764215=_0x212bea(),ranges:_0x55b345,comment:_0xc1d617}={}){const _0x8f0b96=this['editor']['model'],_0x28362b=_0x55b345??Array['from'](_0x8f0b96['document']['selection']['getRanges']()),_0xb06fc6=[];for(const _0x180c0b of _0x28362b)this['_hasContent'](_0x180c0b)&&_0xb06fc6['push'](this['_trimToContent'](_0x180c0b));if(!_0xb06fc6['length'])throw new _0x8e9278('addcommentthreadcommand-incorrect-ranges',null);_0xc1d617&&this['_createCommentThread'](_0x764215,_0xc1d617),this['_createMarkersFromRanges'](_0x764215,_0xb06fc6,!!_0xc1d617);}['_createMarkersFromRanges'](_0x321267,_0x3263eb,_0x3c0b2a){this['editor']['model']['change'](_0x3e9bf6=>{for(const _0x12b35a of _0x3263eb){const _0x421064='comment:'+_0x321267+':'+_0x212bea()['substr'](0x1,0x5);_0x3e9bf6['addMarker'](_0x421064,{'range':_0x12b35a,'usingOperation':_0x3c0b2a,'affectsData':_0x3c0b2a});}});}['_createCommentThread'](_0x5bae72,_0x402cdf){const _0x4e9fc5=this['editor']['plugins']['get']('CommentsRepository'),_0x33c89f=this['editor']['config']['get']('collaboration.channelId'),_0x174207=this['editor']['plugins']['get']('Users')['me'];if(!_0x174207)throw new _0x8e9278('addcommentthreadcommand-user-not-found',null);_0x4e9fc5['addCommentThread']({'threadId':_0x5bae72,'channelId':_0x33c89f,'comments':[{'authorId':_0x174207['id'],'content':_0x402cdf,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5d024d){for(const _0x54dff6 of _0x5d024d['getItems']())if(this['_itemIsContent'](_0x54dff6))return!0x0;return!0x1;}['_itemIsContent'](_0x2a1313){return _0x2a1313['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2a1313)&&!_0x2a1313['is']('element','tableCell');}['_trimToContent'](_0xbc8f5a){const _0x2066e8=_0x424fdd=>!this['_itemIsContent'](_0x424fdd['item']),_0x970cc1=_0xbc8f5a['start']['getLastMatchingPosition'](_0x2066e8),_0x72031e=_0xbc8f5a['end']['getLastMatchingPosition'](_0x2066e8,{'direction':'backward'});return this['editor']['model']['createRange'](_0x970cc1,_0x72031e);}},di=class extends _0x2eff03{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad861){super(_0x3ad861),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x391665=this['editor'],_0x69d1ce=_0x391665['model']['document']['selection'],_0x5445c7=_0x5b676f(()=>this['refreshSelectedViews'](),0xa);_0x69d1ce['on']('change:range',(_0x25fff5,_0x7e9c93)=>{_0x7e9c93['directChange']&&(_0x5445c7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x391665['editing']['view']['document'],'change:isFocused',(_0x3e142c,_0x3ef617,_0x1e726c)=>{_0x1e726c&&_0x5445c7();}),this['listenTo'](_0x391665['ui']['focusTracker'],'change:isFocused',(_0x20df6a,_0x511efe,_0x214927)=>{_0x214927||this['fire']('blur',{'isAnnotationTracked':_0x574dc5=>this['_editorAnnotationsData']['has'](_0x574dc5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x24476d){if(this['_editorAnnotations']['has'](_0x24476d['view']))return;this['_editorAnnotations']['add'](_0x24476d['view']),this['editor']['ui']['focusTracker']['add'](_0x24476d['view']['element']);const _0x3db2da=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3db2da['collection'],'remove',(_0xc1f883,_0x1e430d)=>{this['editor']['ui']['focusTracker']['remove'](_0x1e430d['view']['element']),this['_editorAnnotations']['delete'](_0x1e430d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x51ae47){if('function'!=typeof _0x51ae47)throw new _0x8e9278('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x51ae47);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x52943d,annotations:_0x2b70de}){const _0x3eeb0c=[],_0x24f9c4=this['editor']['model']['document']['selection'],_0x4235ec=Array['from'](_0x24f9c4['getRanges']());for(const [_0x592b97,_0x485262]of this['_editorAnnotationsData']){const _0x47d14f=_0x5c8a03(_0x485262),_0x3fdda2=_0x2b70de['getByInnerView'](_0x592b97);_0x47d14f&&_0x3fdda2&&_0x3eeb0c['push']({'annotation':_0x3fdda2,'range':_0x47d14f});}function _0x5c8a03(_0x5228a0){for(const _0x235a4c of _0x5228a0)for(const _0x4222a1 of _0x4235ec)if(_0x235a4c['containsRange'](_0x4222a1,!_0x24f9c4['isCollapsed']))return _0x235a4c;return null;}return _0x3eeb0c['sort']((_0x4592c9,_0x478f7d)=>{const _0x3bbb6a=_0x4592c9['range'],_0x5c0881=_0x478f7d['range'];if(!_0x3bbb6a['isEqual'](_0x5c0881)){if(_0x3bbb6a['containsRange'](_0x5c0881,!0x0))return 0x1;if(_0x5c0881['containsRange'](_0x3bbb6a,!0x0))return-0x1;}return _0x4592c9['annotation']==_0x52943d?-0x1:_0x478f7d['annotation']==_0x52943d?0x1:0x0;})['map'](_0x5b1fe4=>_0x5b1fe4['annotation']);}get['_editorAnnotationsData'](){const _0x11f077=new Map();for(const _0xb947ac of Array['from'](this['_dataCollectors']))for(const [_0xb408d6,_0x9d9620]of _0xb947ac())_0x11f077['set'](_0xb408d6,_0x9d9620);return _0x11f077;}},li=class extends _0x2eff03{['afterInit'](){const _0x42c8e7=this['editor'];_0x42c8e7['plugins']['has']('RestrictedEditingModeEditing')&&_0x42c8e7['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x2eff03{constructor(_0x31054f){super(_0x31054f),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x28be30=this['editor'],_0x5196ce=_0x28be30['commands']['get']('importWord'),_0x529633=_0x28be30['plugins']['get'](_0x21dd23);_0x5196ce&&(_0x5196ce['on']('execute',(_0x2986f2,[,_0x3c3e9c])=>{_0x3c3e9c['collaboration_features']={'comments':!0x0,'user_id':_0x529633['me']['id']};},{'priority':_0x1ba05e['high']+0xa}),this['listenTo'](_0x5196ce,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x513142,_0x24a0bd){const {comment_threads:_0x197d97}=_0x24a0bd;_0x197d97&&_0x197d97['forEach'](({thread_id:_0x40199f,comments:_0x4a0b3f,is_resolved:_0x3afe2e})=>{const _0x4a95bd=new Date(),_0x38cdf5=_0x4a0b3f['map'](({author:_0x4c63ba,content:_0x7287be,created_at:_0x488c0b})=>({'content':_0x7287be,'authorId':this['editor']['plugins']['get'](_0x21dd23)['me']['id'],'createdAt':_0x4a95bd,'attributes':{'@external':{'authorName':_0x4c63ba,'createdAt':_0x488c0b?new Date(_0x488c0b):new Date(),'source':'importWord'}}})),_0x3c4183=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x3c4183,'threadId':_0x40199f,'comments':_0x38cdf5,'resolvedAt':_0x3afe2e?_0x4a95bd:null});});}},ui=class extends _0x2eff03{constructor(_0x6c3d42){super(_0x6c3d42),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0xcbd014=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xcbd014,'contentInsertion',(_0x534f53,_0xf69f69)=>this['_removeMarkersWithoutThreads'](_0xf69f69['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x36a2b3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x36a2b3;const _0x4e57fb=this['editor']['plugins']['get']('CommentsRepository');for(const _0x283e62 of _0x36a2b3['keys']()){const [_0x5ad82e,_0x43965d]=_0x283e62['split'](':');'comment'!=_0x5ad82e||_0x4e57fb['hasCommentThread'](_0x43965d)||_0x36a2b3['delete'](_0x283e62);}return _0x36a2b3;}['_registerMarkerInClipboardPipeline'](){const _0x4ff26c=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x33ff0d=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x33ff0d&&_0x4ff26c['_registerMarkerToCopy']('comment',_0x33ff0d);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2ba9b3){switch(_0x2ba9b3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x208d43){const _0x31def2=_0x208d43['split'](':');return{'group':_0x31def2[0x0],'id':_0x31def2[0x1],'part':_0x31def2[0x2]};}var pi=class extends _0x2eff03{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x84de6,_0x5b0745)=>{if(!_0x5b0745['options']['showCommentHighlights'])return null;if(_0x5b0745['options']['ignoreResolvedComments']){const {id:_0x194e24}=fi(_0x84de6['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x194e24)?.['isResolved']&&_0x84de6['item'])return _0x5b0745['consumable']['consume'](_0x84de6['item'],'addMarker:'+_0x84de6['markerName']),_0x5b0745['consumable']['consume'](_0x84de6['item'],'removeMarker:'+_0x84de6['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xdc6772=>{_0xdc6772['on']('addMarker:comment',(_0x1ee956,_0x43ffdd,_0x12152c)=>{if(!_0x12152c['options']['showCommentHighlights'])return;const _0x54d20d=_0x43ffdd['item'];if(!_0x54d20d)return;const _0x4e533f=_0x12152c['mapper']['toViewElement'](_0x54d20d);this['editor']['model']['schema']['isObject'](_0x54d20d)&&_0x4e533f&&!_0x4e533f['getCustomProperty']('widget')&&_0x4e533f['is']('containerElement')&&Ct(_0x4e533f,_0x12152c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x59ad81,{writer:_0x3f764a,options:_0x2a68d7})=>{if(!_0x2a68d7['showCommentHighlights'])return null;const _0x3bc11c=_0x3f764a['createContainerElement']('div'),_0x2382f0=_0x3f764a['createEmptyElement']('hr');return _0x3f764a['addClass']('ck-horizontal-line',_0x3bc11c),_0x3f764a['insert'](_0x3f764a['createPositionAt'](_0x3bc11c,0x0),_0x2382f0),_0x3bc11c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2f732d,{writer:_0x31049b,options:_0x8c7579})=>{if(!_0x8c7579['showCommentHighlights'])return null;const _0x5a4481=_0x31049b['createContainerElement']('span'),_0x204428=_0x31049b['createEmptyElement']('img');return _0x31049b['addClass']('image-inline',_0x5a4481),_0x31049b['insert'](_0x31049b['createPositionAt'](_0x5a4481,0x0),_0x204428),_0x5a4481;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5d044a,{writer:_0x114a25,options:_0x3ca577})=>{if(_0x3ca577['showCommentHighlights'])return _0x114a25['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x27667d,_0x454725,_0x3cb694)=>{_0x3cb694['options']['showCommentHighlights']&&_0x27667d['stop']();},{'priority':'high'});}},wi=class extends _0x2eff03{static get['requires'](){return[oi,di,_0x21dd23,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2de131){super(_0x2de131),this['set']('isThreadsLoadingPaused',!0x0),_0x2de131['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4212a8,_0x26c7b1,_0x11bb3d,_0xce1f60)=>{const _0x1b6bd7=_0x2de131['plugins']['get'](oi),_0x2e41d9=_0x11bb3d?fi(_0x11bb3d)['id']:null;_0x2de131['model']['change'](()=>{if(_0x2e41d9){const _0x4a5be2=this['getAllMarkersForId'](_0x2e41d9);for(const _0xc37f88 of _0x4a5be2)_0x2de131['editing']['reconvertMarker'](_0xc37f88);}if(_0xce1f60){const {id:_0xb0377f}=fi(_0xce1f60),_0x3681e5=_0x1b6bd7['getCommentThread'](_0xb0377f);if(_0x3681e5&&_0x3681e5['unlinkedAt'])return;if(_0x3681e5&&!_0x3681e5['isAttached'])return;const _0x3b7375=this['getAllMarkersForId'](_0xb0377f);for(const _0x6f7175 of _0x3b7375)_0x2de131['editing']['reconvertMarker'](_0x6f7175);}}),_0x2e41d9&&this['scrollToThreadMarker'](_0x2e41d9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3322e2=this['editor'],_0x27e55d=_0x3322e2['plugins']['get'](oi),_0x42c8e9=_0x3322e2['config']['get']('collaboration.channelId'),_0x3b8f50=_0x27e55d['getCommentThreads']()['filter'](_0x103e94=>_0x103e94['channelId']!==_0x42c8e9);_0x3322e2['commands']['add']('addCommentThread',new ci(_0x3322e2)),this['listenTo'](_0x3322e2,'change:isReadOnly',(_0x4a82c6,_0x4cd43b,_0x190d99)=>{_0x27e55d['switchReadOnly'](_0x190d99,_0x3322e2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x27e55d,gi('addCommentThread',_0x42c8e9),(_0x2bb456,{threadId:_0x3063f5})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3063f5)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3063f5);}),this['listenTo'](_0x27e55d,gi('removeCommentThread',_0x42c8e9),(_0x3dae16,{threadId:_0x219914})=>{_0x3322e2['model']['enqueueChange']({'isUndoable':!0x1},_0xbf000f=>{const _0x376ed1=this['getAllMarkersForId'](_0x219914);for(const _0x1d2beb of _0x376ed1)_0xbf000f['removeMarker'](_0x1d2beb);});}),this['listenTo'](_0x27e55d,gi('resolveCommentThread',_0x42c8e9),(_0x5ec8b0,{threadId:_0x117eb8})=>{this['_reconvertMarkers'](_0x117eb8);const _0x16acab=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x16acab['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x117eb8)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x27e55d,gi('reopenCommentThread',_0x42c8e9),(_0x4a3d5e,{threadId:_0x577292})=>{this['_reconvertMarkers'](_0x577292);},{'priority':'low'}),this['listenTo'](_0x27e55d,gi('addComment',_0x42c8e9),(_0x1727b6,{threadId:_0x4aa429,isFromAdapter:_0x278f01})=>{const _0x31bbc0=this['getAllMarkersForId'](_0x4aa429);!_0x278f01&&0x0!=_0x31bbc0['length']&&_0x27e55d['hasCommentThread'](_0x4aa429)&&0x1===_0x27e55d['getCommentThread'](_0x4aa429)['length']&&_0x3322e2['model']['enqueueChange']({'isUndoable':!0x1},_0x48c3d1=>{for(const _0x1fc2de of _0x31bbc0)_0x48c3d1['updateMarker'](_0x1fc2de,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3b8f50);}['afterInit'](){!async function(_0x2e56a1){const _0x2f7d0c='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x1ea63e=0x78e10,_0x3a9c9c=window['Date']['now'](),_0x2877b1=_0x2e56a1['editor'],_0x16240f=new window['Promise'](_0x45904b=>{_0x2877b1['once']('ready',_0x45904b);}),_0x2162ab={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x38404c=_0x2877b1['config']['get']('licenseKey');async function _0x11641f(){let _0x34845b,_0x387622=null,_0x46614b=null;try{return'GPL'==_0x38404c?'NotAllowed':(_0x34845b=_0x24f5e5(),_0x34845b?(_0x34845b['usageEndpoint']&&(_0x46614b=_0x187c15(_0x34845b['usageEndpoint'],_0x34845b['jti'])),await _0x5cdd32()?_0x5699ff()?_0x1a1247()?'Expired':_0x28d5dc()?('evaluation'==_0x34845b['licenseType']&&(_0x387622=_0xad842c('EvaluationLimit')),await _0x366e13()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1a1247(){const _0x15e564=['evaluation','trial']['includes'](_0x34845b['licenseType'])?_0x3a9c9c/0x3e8:0xe10*_0x1ea63e;return _0x34845b['exp']<_0x15e564;}function _0x5699ff(){const _0x2065df=_0x34845b['features'];if(!_0x2065df)return!0x1;if(_0x2065df['includes']('*'))return!0x0;if(_0x2065df['includes']('CMT'))return!0x0;if(_0x2065df['includes']('TRILIUM')&&_0x448373())return!0x0;if(_0x2065df['includes']('RCMT')){if(_0x21a3e7())return!0x0;if(_0x1634d0()||_0x24ed99())return!0x0;}return!0x1;}function _0x28d5dc(){const _0x381648=_0x34845b['licensedHosts'];if(!_0x381648||0x0==_0x381648['length'])return!0x0;const {hostname:_0x9382d5}=new URL(window['location']['href']);if(_0x381648['includes'](_0x9382d5))return!0x0;const _0x1ea80a=_0x9382d5['split']('.');return _0x381648['filter'](_0xb5c07d=>_0xb5c07d['includes']('*'))['map'](_0x485024=>_0x485024['split']('.'))['filter'](_0xe17d0f=>_0xe17d0f['length']<=_0x1ea80a['length'])['map'](_0x33e4df=>Array(_0x1ea80a['length']-_0x33e4df['length'])['fill']('*'===_0x33e4df[0x0]?'*':'')['concat'](_0x33e4df))['some'](_0x422f49=>_0x1ea80a['every']((_0x228052,_0x15abc9)=>_0x422f49[_0x15abc9]===_0x228052||'*'===_0x422f49[_0x15abc9]));}function _0x366e13(){return _0x387622&&_0x46614b?new window['Promise']((_0x5ba1bf,_0x21b154)=>{_0x387622['then'](_0x5ba1bf,_0x21b154),_0x46614b['then'](_0x40d1f2=>{'Valid'!=_0x40d1f2&&_0x5ba1bf(_0x40d1f2);},_0x21b154);}):_0x387622||_0x46614b||'Valid';}}function _0x187c15(_0x1992a3,_0x3d3d2b){return new window['Promise'](_0x27832d=>{if(_0x5c0c33())return _0x27832d('Valid');_0x386315(),_0x2877b1['decorate']('_sendUsageRequest');let _0x2c6dd3=!0x1;const _0x1d2f93=_0x212bea();function _0x1a3e21(_0x5c898e){return!!_0x5c898e&&('object'==typeof _0x5c898e||'function'==typeof _0x5c898e)&&'function'==typeof _0x5c898e['then']&&'function'==typeof _0x5c898e['catch'];}function _0xf3d219(_0x23c219){_0x25a01a(_0x23c219)['then'](_0x4ff267=>_0x4ff267&&'ok'==_0x4ff267['status']?_0x1598fc(_0x54f689(_0x1d2f93+_0x3d3d2b))!=_0x4ff267['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x35d2e5=>(_0x97f297(),_0x35d2e5),()=>{const _0x2faf6c=_0x240552();return null==_0x2faf6c?(_0x97f297(),'Valid'):_0x3a9c9c-_0x2faf6c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x27832d)['catch'](()=>{_0x27832d('UsageLimit');});const _0x405a7c=0x36ee80;function _0x97f297(){const _0x582b36='llct-'+_0x1598fc(_0x54f689(_0x1992a3)),_0x31774f=_0x1f0d73(_0x1598fc(window['Math']['ceil'](_0x3a9c9c/_0x405a7c)));window['localStorage']['setItem'](_0x582b36,_0x31774f);}function _0x240552(){const _0x418061='llct-'+_0x1598fc(_0x54f689(_0x1992a3)),_0x55b3cb=window['localStorage']['getItem'](_0x418061);return _0x55b3cb?window['parseInt'](_0x1f0d73(_0x55b3cb),0x10)*_0x405a7c:null;}function _0x25a01a(_0x41a623){return new window['Promise']((_0x18ae6c,_0x560cd4)=>{_0x41a623['then'](_0x18ae6c,_0x560cd4),window['setTimeout'](_0x560cd4,0x1d4c0);});}}_0x2877b1['on']('_sendUsageRequest',(_0xdb5e5b,_0x508521)=>{if(_0x508521[0x0]!=_0x1992a3)return _0x27832d('UsageLimit');_0x508521[0x1]={..._0x508521[0x1],'requestId':_0x1d2f93};},{'priority':'high'}),_0x2877b1['on']('_sendUsageRequest',_0x565a5d=>{_0x1a3e21(_0x565a5d['return'])&&(_0x2c6dd3=!0x0,_0xf3d219(_0x565a5d['return']));},{'priority':'low'}),_0x16240f['then'](()=>{_0x2c6dd3||_0x27832d('UsageLimit');});});function _0x5c0c33(){return'auto'==_0x2877b1['editing']['view']['_overlayModeHint'];}function _0x386315(){_0x2877b1['editing']['view']['_overlayModeHint']='auto';}}function _0xad842c(_0x3f8194){const _0x124022=[new window['Promise'](_0x47471c=>setTimeout(_0x47471c,0x93ecc)),_0x16240f['then'](()=>new window['Promise'](_0x4a6d59=>{let _0x484bee=0x0;_0x2877b1['model']['on']('applyOperation',(_0x2b9538,_0x5ca504)=>{_0x5ca504[0x0]['isDocumentOperation']&&_0x484bee++,0x5e8==_0x484bee&&(_0x4a6d59(),_0x2b9538['off']());});}))];return window['Promise']['race'](_0x124022)['then'](()=>_0x3f8194);}async function _0x570890(){await _0x16240f,_0x2877b1['model']['change']=_0x5af476,_0x2877b1['model']['enqueueChange']=_0x5af476,_0x2877b1['enableReadOnlyMode']('model');}function _0x448373(){return window['glob']&&window['glob']['triliumVersion'];}function _0x21a3e7(){return _0xd2f078('WebSocketGateway')&&'connected'==_0x58519d('WebSocketGateway')['state'];}function _0x1634d0(){return _0xd2f078('RevisionViewerIntegration');}function _0x24ed99(){return _0xd2f078('TrackChangesDataGetter');}function _0xf05e82(_0x1e6953){const _0x165ca3=_0x1da5aa();_0x2877b1[_0x165ca3]='commentsLicenseKey'+_0x1e6953,'Valid'!=_0x1e6953&&_0x570890();}function _0x1da5aa(){const _0x40c9a1=window['String'](window['performance']['now']())['replace']('.','');let _0x1afec8='K';for(let _0x45313f=0x0;_0x45313f<_0x40c9a1['length'];_0x45313f+=0x2){let _0x38dfa3=window['parseInt'](_0x40c9a1['substring'](_0x45313f,_0x45313f+0x2));_0x38dfa3>=0x3e&&(_0x38dfa3-=0x3e),_0x1afec8+=_0x2f7d0c[_0x38dfa3];}return _0x1afec8;}function _0x24f5e5(){const _0x2dee1b=_0x38404c['split']('.');if(0x3!=_0x2dee1b['length'])return null;return _0x29cd00(_0x2dee1b[0x1]);function _0x29cd00(_0x326219){const _0x2e0c9b=_0x4599ae(_0x326219);return _0x2e0c9b&&_0x11c13f()?_0x2e0c9b:null;function _0x11c13f(){const _0x55a889=_0x2e0c9b['jti'],_0x22db60=window['parseInt'](_0x55a889['substring'](_0x55a889['length']-0x8),0x10),_0x425a90={..._0x2e0c9b,'jti':_0x55a889['substring'](0x0,_0x55a889['length']-0x8)};return delete _0x425a90['vc'],_0x54f689(_0x425a90)==_0x22db60;}}}async function _0x5cdd32(){let _0x588aad=!0x0;try{const [_0x18c380,_0x320b36,_0x2e9d07]=_0x38404c['split']('.');return _0x11c47a(_0x18c380),await _0x211d97(_0x18c380,_0x320b36,_0x2e9d07),_0x588aad;}catch{return!0x1;}function _0x11c47a(_0x3bcdec){const _0x16edb4=_0x4599ae(_0x3bcdec);_0x16edb4&&'ES256'==_0x16edb4['alg']||(_0x588aad=!0x1);}async function _0x211d97(_0x22297a,_0xa5eaf1,_0x4644b5){const _0x1020a1=window['Uint8Array']['from'](_0xe3367(_0x4644b5),_0x417115=>_0x417115['charCodeAt'](0x0)),_0x378ffc=new window['TextEncoder']()['encode'](_0x22297a+'.'+_0xa5eaf1),_0x58e978=window['crypto']['subtle'];if(!_0x58e978)return;const _0x443cd2=await _0x58e978['importKey']('jwk',_0x2162ab,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x58e978['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x443cd2,_0x1020a1,_0x378ffc)||(_0x588aad=!0x1);}}function _0x4599ae(_0x1a5036){return _0x1a5036['startsWith']('ey')?JSON['parse'](_0xe3367(_0x1a5036)):null;}function _0xe3367(_0x5d30e0){return window['atob'](_0x5d30e0['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x54f689(_0x222a0d){let _0x2e009f=0x1505;function _0x170754(_0x5a7696){for(let _0x220a85=0x0;_0x220a85<_0x5a7696['length'];_0x220a85++){const _0x41fafb=_0x5a7696['charCodeAt'](_0x220a85);_0x2e009f=(_0x2e009f<<0x5)+_0x2e009f+_0x41fafb,_0x2e009f&=_0x2e009f;}}function _0x45158a(_0x445a9e){Array['isArray'](_0x445a9e)?_0x445a9e['forEach'](_0x45158a):_0x445a9e&&'object'==typeof _0x445a9e?Object['entries'](_0x445a9e)['sort']()['forEach'](([_0x562542,_0x528243])=>{_0x170754(_0x562542),_0x45158a(_0x528243);}):_0x170754(window['String'](_0x445a9e));}return _0x45158a(_0x222a0d),_0x2e009f>>>0x0;}function _0x1598fc(_0x42223b){return _0x42223b['toString'](0x10)['padStart'](0x8,'0');}function _0x1f0d73(_0x59a957){return _0x59a957['split']('')['reverse']()['join']('');}function _0xd2f078(_0x106999){return _0x2877b1['plugins']['has'](_0x106999);}function _0x58519d(_0x4de999){return _0x2877b1['plugins']['get'](_0x4de999);}function _0x5af476(){}_0xf05e82(await _0x11641f());}(this);}['destroy'](){const _0x8b33d1=this['editor']['plugins']['get'](oi),_0x4b1cd3=this['editor']['config']['get']('collaboration.channelId');for(const _0x460e7e of _0x8b33d1['getCommentThreads']({'channelId':_0x4b1cd3}))_0x8b33d1['_detachCommentThread'](_0x460e7e['id']),_0x8b33d1['_threads']['delete'](_0x460e7e['id']);super['destroy']();}['hasMarkerForId'](_0x422607){return this['getAllMarkersForId'](_0x422607)['length']>0x0;}['getAllMarkersForId'](_0x22677e){const _0x40bd28=[];for(const _0x5da36d of this['editor']['model']['markers'])_0x5da36d['name']['startsWith']('comment:'+_0x22677e)&&_0x40bd28['push'](_0x5da36d);return _0x40bd28;}['scrollToThreadMarker'](_0x1bee50){setTimeout(()=>{const _0x247824=this['_getTargetForId'](_0x1bee50);_0x247824&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x1bee50&&_0x2731af({'target':_0x247824[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4f8769){this['editor']['model']['change'](()=>{for(const _0x115961 of this['getAllMarkersForId'](_0x4f8769))this['editor']['editing']['reconvertMarker'](_0x115961);});}['_attachArchivedThread'](_0xfeafb9){const _0x35c5d9=this['editor']['plugins']['get'](oi),_0x441553=this['editor']['plugins']['get'](di),_0x19288d=_0x35c5d9['getCommentThread'](_0xfeafb9);if(!_0x19288d['isAttached']){const _0x713365=_0x19288d['attachTo'](()=>this['_getTargetForId'](_0x19288d['id']));_0x441553['registerAnnotation'](_0x713365),_0x19288d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x64789e=this['editor'],_0x102019=_0x64789e['plugins']['get'](_0x21dd23);_0x64789e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x10abde,_0x89184)=>{const {id:_0x8ae72b}=fi(_0x10abde['markerName']),_0x4a8441=_0x64789e['plugins']['get'](oi)['getCommentThread'](_0x8ae72b),_0x27891f=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x8ae72b;let _0x4ee20e;if(_0x4a8441&&_0x4a8441['isResolved']&&!_0x27891f&&_0x10abde['item'])return _0x89184['consumable']['consume'](_0x10abde['item'],'addMarker:'+_0x10abde['markerName']),_0x89184['consumable']['consume'](_0x10abde['item'],'removeMarker:'+_0x10abde['markerName']),null;const _0x341887=['ck-comment-marker'];return _0x27891f&&_0x341887['push']('ck-comment-marker--active'),_0x4ee20e=_0x4a8441?.['length']?_0x4a8441['comments']['first']['author']['id']:_0x102019['me']['id'],{'classes':_0x341887,'attributes':{'data-comment':_0x8ae72b,'data-author-id':_0x4ee20e}};}}),_0x64789e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1f7b52,{options:_0x200135})=>{if(_0x200135['showCommentHighlights'])return null;const _0x3e3766=_0x64789e['plugins']['get'](oi),_0x5061f7=_0x64789e['model']['markers']['get'](_0x1f7b52),{id:_0x1a8ea0,part:_0xc311fc}=fi(_0x1f7b52);return _0x5061f7&&!_0x5061f7['affectsData']||_0x200135['ignoreResolvedComments']&&_0x3e3766['getCommentThread'](_0x1a8ea0)?.['isResolved']?null:{'group':'comment','name':_0xc311fc?_0x1a8ea0+':'+_0xc311fc:_0x1a8ea0};}}),_0x64789e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x32977c,{writer:_0x643fd2})=>_0x643fd2['createElement']('$marker',{'data-name':'comment:'+_0x32977c['getAttribute']('id')})}),_0x64789e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2f23d5=this['editor'],_0x12fab8=_0x2f23d5['plugins']['get'](oi),_0xb7aeee=new Set(),_0x595ae0=new Set();_0x2f23d5['model']['document']['registerPostFixer'](_0x80c26=>{let _0x8b6374=!0x1;for(const {name:_0x4a00cb,data:_0x21be22}of _0x2f23d5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1bd19b,id:_0x1c9b74}=fi(_0x4a00cb);let _0xbe3eb6=_0x21be22['newRange'];if('comment'!==_0x1bd19b||!_0xbe3eb6)continue;const _0xd64ce5='$graveyard'===_0xbe3eb6['root']['rootName'];_0xd64ce5||(_0xbe3eb6=_i(_0xbe3eb6,_0x2f23d5['model']),!_0xbe3eb6||_0xbe3eb6['isCollapsed']||!_0x21be22['newRange']||_0xbe3eb6['isEqual'](_0x21be22['newRange']))?_0x2f23d5['model']['hasContent'](_0xbe3eb6)&&!_0xd64ce5?this['isThreadsLoadingPaused']?_0xb7aeee['add'](_0x4a00cb):this['_handleThreadMarker'](_0x4a00cb,_0x1c9b74):(_0x595ae0['add'](_0x4a00cb),_0xb7aeee['delete'](_0x4a00cb),_0x80c26['removeMarker'](_0x4a00cb),_0x8b6374=!0x0):(_0x80c26['updateMarker'](_0x4a00cb,{'range':_0xbe3eb6}),_0x8b6374=!0x0);}return _0x8b6374;}),this['on']('change:isThreadsLoadingPaused',(_0x434f3e,_0x21a17c,_0x34a802)=>{if(!_0x34a802&&_0xb7aeee['size'])for(const _0x219e26 of _0xb7aeee){const {id:_0x362770}=fi(_0x219e26);_0xb7aeee['delete'](_0x219e26),_0x2f23d5['model']['markers']['get'](_0x219e26)&&this['_handleThreadMarker'](_0x219e26,_0x362770);}}),this['listenTo'](_0x2f23d5['model']['document'],'change',()=>{for(const {name:_0x4b4257,data:{newRange:_0x40cda2}}of _0x2f23d5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21c074,id:_0x5dab42}=fi(_0x4b4257);if('comment'!==_0x21c074)continue;const _0x8f87ed=_0x12fab8['getCommentThread'](_0x5dab42),_0x139ae4=this['hasMarkerForId'](_0x5dab42);_0x8f87ed&&(!_0x8f87ed['_hasTargetInContent']&&_0x40cda2&&_0x2f23d5['editing']['view']['once']('render',()=>{const _0x561036=_0x2f23d5['plugins']['get'](ti),_0x3d3d41=_0x12fab8['_threadToController']['get'](_0x8f87ed)['view'];_0x561036['getByInnerView'](_0x3d3d41)['refreshVisibility']();},{'priority':'low'}),_0x8f87ed['_hasTargetInContent']=_0x139ae4||!!_0x40cda2),_0x40cda2||(_0x595ae0['add'](_0x4b4257),_0xb7aeee['delete'](_0x4b4257));}for(const _0x4affbd of _0x595ae0){const {id:_0x307e5f}=fi(_0x4affbd),_0x5b1c22=_0x12fab8['getCommentThread'](_0x307e5f);if(_0xb7aeee['delete'](_0x4affbd),!_0x5b1c22)continue;const _0x34dff8=this['hasMarkerForId'](_0x307e5f);_0x34dff8||_0x5b1c22['isSubmitted']?_0x34dff8||_0x5b1c22['unlinkedAt']||_0x5b1c22['setUnlinkedAt'](new Date()):_0x5b1c22['remove']();}_0x595ae0['clear']();});}['_handleInitialThreads'](_0x55441){_0x55441['forEach'](_0x21e21c=>{_0x21e21c['unlinkedAt']&&this['_attachArchivedThread'](_0x21e21c['id']);});}['_getTargetForId'](_0x5c1576){const _0x27d514=this['editor'],_0xeb1b03=this['getAllMarkersForId'](_0x5c1576);return _0x15e934(_0x27d514['editing'],_0xeb1b03);}['_getTextContext'](_0x5d7e7a){const _0x139cf0=this['getAllMarkersForId'](_0x5d7e7a);let _0x29ff39='',_0x524063=!0x1;for(const _0xdd6bcc of _0x139cf0){const _0x188dda=_0xdd6bcc['getRange']();for(const _0x279b94 of Array['from'](_0x188dda['getItems']()))_0x279b94['is']('$textProxy')?(_0x29ff39&&_0x524063&&(_0x29ff39+='\x20',_0x524063=!0x1),_0x29ff39+=_0x279b94['data']):_0x524063=!0x0;_0x524063=!0x0;}return _0x29ff39['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x32a0a4,_0x4303ef){const _0x1bec8c=this['editor'],_0x21eb5a=_0x1bec8c['plugins']['get'](oi);let _0x5485f3=_0x21eb5a['getCommentThread'](_0x4303ef);const _0x5dea18=_0x1bec8c['config']['get']('collaboration.channelId'),_0x94b7fa=_0x1bec8c['plugins']['get'](di);return _0x5485f3&&(_0x5485f3['unlinkedAt']&&_0x5485f3['setUnlinkedAt'](null),_0x5485f3['isAttached'])||(this['getAllMarkersForId'](_0x4303ef)[0x0]['managedUsingOperations']?_0x21eb5a['fetchCommentThread']({'channelId':_0x5dea18,'threadId':_0x4303ef})['then'](_0x5c6ab2=>{if('destroyed'!==_0x1bec8c['state']){if(_0x5485f3=_0x5c6ab2,_0x5485f3&&!_0x5485f3['isAttached']){const _0x225e9e=_0x5485f3['attachTo'](()=>this['_getTargetForId'](_0x4303ef));_0x94b7fa['registerAnnotation'](_0x225e9e),_0x5485f3['isResolved']&&this['_reconvertMarkers'](_0x4303ef);}else{if(!_0x5485f3){const _0x20efbd=this['getAllMarkersForId'](_0x4303ef);_0x1bec8c['model']['change'](_0x46621e=>{for(const _0x5d1787 of _0x20efbd)_0x46621e['removeMarker'](_0x5d1787);});}}}}):_0x1bec8c['editing']['view']['once']('render',()=>{if(_0x21eb5a['getCommentThread'](_0x4303ef))return;const _0x431c6d=_0x1bec8c['plugins']['get'](ti);_0x5485f3=_0x21eb5a['openNewCommentThread']({'channelId':_0x5dea18,'threadId':_0x4303ef,'target':()=>this['_getTargetForId'](_0x4303ef),'context':{'type':'text','value':this['_getTextContext'](_0x4303ef)}});const _0x4be552=_0x21eb5a['_threadToController']['get'](_0x5485f3)['view'],_0x5ab383=_0x431c6d['getByInnerView'](_0x4be552);_0x5ab383&&_0x94b7fa['registerAnnotation'](_0x5ab383);},{'priority':'low'})),_0x5485f3;}['_handleThreadMarker'](_0x311623,_0x2c5244){const _0x22ae0e=this['_attachMarkerToThread'](_0x311623,_0x2c5244);_0x22ae0e&&!_0x22ae0e['context']&&_0x22ae0e['setContext']({'type':'text','value':this['_getTextContext'](_0x2c5244)});}['_initAriaMarkerChangeAnnouncements'](){const _0x331175=this['editor'];_0x40d59e(_0x331175['model'],({left:_0x584f7c,entered:_0x21f0c9})=>{for(const _0x46e68c of _0x584f7c)if(Ai(_0x46e68c)){_0x331175['ui']['ariaLiveAnnouncer']['announce'](Et(_0x331175['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2036c8 of _0x21f0c9)if(Ai(_0x2036c8)){_0x331175['ui']['ariaLiveAnnouncer']['announce'](Et(_0x331175['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2e53ad(_0x45cce3)));break;}});}};function gi(_0x591dc6,_0x2bf3ca){return _0x2bf3ca?_0x591dc6+':'+_0x2bf3ca:_0x591dc6;}function _i(_0x1170b7,_0x559ab0){const _0x311f4d=_0x559ab0['schema'],_0x2a8154=_0x559ab0['createRange'](_0x1170b7['start']);for(const _0x1ef81f of _0x1170b7['getWalker']()){const {type:_0x4ab795,item:_0x23f691,nextPosition:_0x5463c8}=_0x1ef81f;if('text'===_0x4ab795||_0x311f4d['isObject'](_0x23f691)){const _0x280d45=_0x559ab0['createPositionBefore'](_0x23f691);_0x2a8154['isCollapsed']&&(_0x2a8154['start']=_0x280d45),_0x2a8154['end']=_0x5463c8;}}return _0x2a8154;}function Ai(_0xe12b68){return'comment'===fi(_0xe12b68['name'])['group'];}var vi=class extends _0x2eff03{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x457c12=this['editor'],_0x58ae3b=_0x457c12['plugins']['get'](oi),_0x558d55=_0x457c12['plugins']['get'](wi),_0x28d439=_0x457c12['plugins']['get'](ti),_0x3e5774=_0x457c12['plugins']['get'](di);_0x457c12['ui']['componentFactory']['add']('comment',()=>{const _0x3738ef=this['_createUIButton'](_0x2340d9);return _0x3738ef['tooltip']=!0x0,_0x3738ef;}),_0x457c12['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x3e5774['addSourceCollector'](()=>{const _0x28f619=[];for(const [_0x59875e,_0x4a9bdd]of _0x58ae3b['_threadToController']){const _0x85e842=_0x558d55['getAllMarkersForId'](_0x59875e['id']),_0x13d29b=_0x85e842['map'](_0x7954a=>_0x7954a['getRange']());_0x85e842['length']>0x0&&_0x28f619['push']([_0x4a9bdd['view'],_0x13d29b]);}return _0x28f619;}),this['listenTo'](_0x28d439,'change:activeAnnotations',(_0x17b5ad,_0x2b1021,_0x2ddfd1)=>{const _0x5529f3=Array['from'](_0x2ddfd1)['map'](_0x25c791=>_0x25c791['innerView'])['find'](_0x11f302=>_0x58ae3b['_viewToController']['has'](_0x11f302));if(!_0x5529f3)return void(_0x558d55['activeMarker']=null);const _0x6ee12e=_0x58ae3b['_viewToController']['get'](_0x5529f3)['model']['id'],_0x3cb59e='comment:'+_0x6ee12e;_0x6ee12e&&_0x558d55['hasMarkerForId'](_0x6ee12e)?_0x558d55['activeMarker']=_0x3cb59e:_0x558d55['activeMarker']&&(_0x558d55['activeMarker']=null);}),this['listenTo'](_0x58ae3b,'removeCommentThread',(_0x31cf4b,{threadId:_0x34037a,isFromAdapter:_0x53355f})=>{!_0x53355f&&_0x457c12['ui']['focusTracker']['isFocused']&&_0x558d55['hasMarkerForId'](_0x34037a)&&_0x457c12['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x58ae3b,'addComment',(_0x78e2e5,{threadId:_0xe7d81c,isFromAdapter:_0x144fcd})=>{!_0x144fcd&&_0x558d55['hasMarkerForId'](_0xe7d81c)&&_0x58ae3b['hasCommentThread'](_0xe7d81c)&&0x1===_0x58ae3b['getCommentThread'](_0xe7d81c)['length']&&(_0x457c12['editing']['view']['focus'](),_0x78e2e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4a18c6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x17cca5;for(const _0x4069ce in _0x4a18c6){const _0x45ee06=_0x4069ce,_0x37d0a7=_0x4a18c6[_0x45ee06];if('commentsLicenseKeyValid'==_0x37d0a7||'commentsLicenseKeyInvalid'==_0x37d0a7||'commentsLicenseKeyExpired'==_0x37d0a7||'commentsLicenseKeyDomainLimit'==_0x37d0a7||'commentsLicenseKeyNotAllowed'==_0x37d0a7||'commentsLicenseKeyEvaluationLimit'==_0x37d0a7||'commentsLicenseKeyUsageLimit'==_0x37d0a7){delete _0x4a18c6[_0x45ee06],_0x17cca5=_0x37d0a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x17cca5&&_0x4a18c6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x17cca5&&_0x4a18c6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x17cca5&&_0x4a18c6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x17cca5&&_0x4a18c6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x17cca5&&_0x4a18c6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x17cca5&&_0x4a18c6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x56e78f){const _0x58af7c=this['editor'],_0x42b546=new _0x56e78f(_0x58af7c['locale']),_0x1e0cbf=_0x58af7c['commands']['get']('addCommentThread');return _0x42b546['set']({'label':Et(_0x58af7c['locale'],'Comment'),'icon':_0x55d4e9}),_0x42b546['bind']('isEnabled')['to'](_0x1e0cbf,'isEnabled',_0x1e0cbf,'hasContent',(_0x1c187b,_0xd5a99)=>_0x1c187b&&_0xd5a99),this['listenTo'](_0x42b546,'execute',()=>{_0x1e0cbf['execute']();}),_0x42b546;}},yi=class extends _0x2eff03{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x1fdb77){super(_0x1fdb77),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x154180,_0x350b27,_0x5d7637)=>{_0x5d7637?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x457f95,_0x4aa52d]of this['editor']['commands'])_0x4aa52d['affectsData']&&'addCommentThread'!==_0x457f95&&_0x4aa52d['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 _0x3c96f3=this['editor']['editing']['view']['document'];this['listenTo'](_0x3c96f3,'cut',_0xa1b279=>_0xa1b279['stop'](),{'priority':'highest'}),this['listenTo'](_0x3c96f3,'clipboardInput',_0x40b617=>_0x40b617['stop'](),{'priority':'highest'}),this['listenTo'](_0x3c96f3,'delete',_0x252507=>_0x252507['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xbdce21,_0x137cf2]of this['editor']['commands'])_0x137cf2['affectsData']&&'addCommentThread'!==_0xbdce21&&_0x137cf2['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']);}},Ti=class extends _0x5baefc{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2df503){super(_0x2df503),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1b8ac2=this['context']['plugins']['get'](ti);this['listenTo'](_0x1b8ac2,'_activateAnnotation',(_0x358fdd,_0x5b5d8d)=>{for(const _0x3f9b21 of this['activeUIs']){const _0x4c217b=this['_uis']['get'](_0x3f9b21);(0x0,this['uisData']['get'](_0x3f9b21)['filter'])(_0x5b5d8d)&&_0x4c217b['setActiveAnnotation'](_0x5b5d8d);}}),this['listenTo'](_0x1b8ac2,'_deactivateAllAnnotations',()=>{for(const _0x32b113 of this['activeUIs'])this['_uis']['get'](_0x32b113)['setActiveAnnotation'](null);}),this['listenTo'](_0x1b8ac2['_visibleAnnotations'],'add',(_0x259ff3,_0x317299)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x317299);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1604a1){return this['activeUIs']['has'](_0x1604a1);}['activate'](_0xaca7c9,_0x2f6f22=this['defaultFilter']){const _0x410e1b=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0xaca7c9))throw new _0x8e9278('annotationsuis-missing-ui',this,{'uiName':_0xaca7c9});this['isActive'](_0xaca7c9)&&this['deactivate'](_0xaca7c9),this['activeUIs']['add'](_0xaca7c9);const _0x3c77ea=new Jt();Qt({'source':_0x410e1b['_visibleAnnotations'],'target':_0x3c77ea,'filter':_0x2f6f22}),this['uisData']['set'](_0xaca7c9,{'collection':_0x3c77ea,'filter':_0x2f6f22});const _0x11a7a4=this['_uis']['get'](_0xaca7c9);_0x11a7a4['attach'](_0x3c77ea),this['listenTo'](_0x11a7a4,'change:activeAnnotation',(_0x1875d5,_0xb652cf,_0x42e44e,_0x26b184)=>{_0x26b184&&_0x410e1b['_removeActiveAnnotation'](_0x26b184),_0x42e44e&&_0x410e1b['_addActiveAnnotation'](_0x42e44e);});}['deactivate'](_0x16072f){if(this['activeUIs']['delete'](_0x16072f),!this['_uis']['has'](_0x16072f))throw new _0x8e9278('annotationsuis-missing-ui',this,{'uiName':_0x16072f});const _0x5c4acc=this['_uis']['get'](_0x16072f);_0x5c4acc['detach'](),this['stopListening'](_0x5c4acc),this['uisData']['get'](_0x16072f)['collection']['destroy'](),this['uisData']['delete'](_0x16072f);}['switchTo'](_0x50e228){if(!this['_uis']['has'](_0x50e228))throw new _0x8e9278('annotationsuis-missing-ui',this,{'uiName':_0x50e228});const _0x7fdf4e=this['context']['plugins']['get'](ti),_0x20e69a=Array['from'](_0x7fdf4e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x50e228);const _0x56da18=this['_uis']['get'](_0x50e228);_0x56da18['setActiveAnnotation'](_0x20e69a),_0x56da18['_setSelectedAnnotations']&&_0x20e69a&&_0x56da18['_setSelectedAnnotations']([_0x20e69a]);}['deactivateAll'](){for(const _0x519b33 of this['activeUIs'])this['deactivate'](_0x519b33);}['register'](_0x54b2ce,_0x4d4d23){if(this['_uis']['has'](_0x54b2ce))throw new _0x8e9278('annotationsuis-register-already-registered');if('function'!=typeof _0x4d4d23['attach']||'function'!=typeof _0x4d4d23['detach']||'function'!=typeof _0x4d4d23['setActiveAnnotation'])throw new _0x8e9278('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x54b2ce,_0x4d4d23);}['refilterAnnotations'](){const _0x5927c5=this['context']['plugins']['get'](ti)['collection'],_0x2f5cf9=new Map(),_0x358c54=Array['from'](this['activeUIs']);for(const _0x46cf9e of this['activeUIs']){const _0x26b6d1=this['uisData']['get'](_0x46cf9e)['collection'];for(const _0x27ab13 of _0x26b6d1)_0x2f5cf9['set'](_0x27ab13,_0x46cf9e);}for(const _0xeadb16 of _0x5927c5){const _0x500626=_0x2f5cf9['get'](_0xeadb16);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xeadb16);const _0x16cdf1=_0x358c54['find'](_0x5554df=>this['uisData']['get'](_0x5554df)['filter'](_0xeadb16));_0x500626!==_0x16cdf1&&(_0x500626&&this['uisData']['get'](_0x500626)['collection']['remove'](_0xeadb16),_0x16cdf1&&this['uisData']['get'](_0x16cdf1)['collection']['add'](_0xeadb16));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x396acd){const _0x5a5180=[];for(const _0x55c444 of this['activeUIs']){(0x0,this['uisData']['get'](_0x55c444)['filter'])(_0x396acd)&&_0x5a5180['push'](_0x55c444);}if(_0x5a5180['length']>0x1)throw new _0x8e9278('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5a5180,'annotationType':_0x396acd['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x4d1021('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4bac6a){super(_0x4bac6a);const _0x389c43=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 _0x471a49(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x389c43['to']('class')],'style':{'minHeight':_0x389c43['to']('minHeight',_0x482a58=>'number'==typeof _0x482a58?Ci(_0x482a58+0xa):null)},'dir':_0x4bac6a['uiLanguageDirection'],'role':'application','aria-label':Et(_0x4bac6a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x4bac6a,'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',_0x33c142=>{this['_updateItemPositionInFocusables'](_0x33c142['source']);}),this['list']['forEach'](_0x4a2a89=>{this['focusTracker']['add'](_0x4a2a89['element']),this['_updateItemPositionInFocusables'](_0x4a2a89);}),this['list']['on']('change',(_0x31b4d3,_0x2e1cb6)=>{for(const _0x4ad002 of _0x2e1cb6['removed'])this['focusTracker']['remove'](_0x4ad002['element']),this['focusables']['remove'](_0x4ad002);for(const _0x31f00d of _0x2e1cb6['added'])this['focusTracker']['add'](_0x31f00d['element']),this['_updateItemPositionInFocusables'](_0x31f00d);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x364cf8){const _0x32bef1=this['focusables']['getIndex'](_0x364cf8);let _0x221955,_0x5305d9;for(const _0x35a16f of this['focusables'])if(_0x364cf8['top']<_0x35a16f['top']){_0x221955=_0x35a16f;break;}if(_0x5305d9=_0x221955?this['focusables']['getIndex'](_0x221955):this['focusables']['length'],-0x1!==_0x32bef1){if(_0x32bef1===_0x5305d9-0x1)return;this['focusables']['remove'](_0x364cf8),_0x5305d9=_0x221955?this['focusables']['getIndex'](_0x221955):this['focusables']['length'];}this['focusables']['add'](_0x364cf8,_0x5305d9);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x4d1021('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5d0ca2){super(_0x5d0ca2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x36ddee,_0x530652)=>_0x36ddee+_0x530652),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x301418=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x301418['to']('isAnimationDisabled',_0x598fe1=>_0x598fe1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x301418['to']('top',_0x33e6a2=>bi(_0x33e6a2))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x165f98=this['element']['clientHeight'];_0x165f98&&(this['height']=_0x165f98);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x5baefc{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x244a84){super(_0x244a84),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 _0x18564b=this['context']['config']['get']('sidebar.container');_0x18564b&&this['setContainer'](_0x18564b);}['setContainer'](_0x510c3a){if(!Oi(_0x510c3a))throw new _0x8e9278('sidebar-setcontainer-invalid-element');this['container']=_0x510c3a;}['_attachToContainer']({viewClass:_0x27ad94='',spaceBetweenItems:_0x862514=0x19}={}){if(!Oi(this['container']))throw new _0x8e9278('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x27ad94,this['_spaceBetweenItems']=_0x862514;}['rearrange']({removedAnnotation:_0x123c33,previousAnnotation:_0x44b8b6,nextAnnotation:_0x25c150}){const _0x2b52dc=this['getSidebarItemView'](_0x123c33);this['view']['list']['remove'](_0x2b52dc),this['_destroySidebarItemView'](_0x123c33),_0x44b8b6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x44b8b6)),_0x25c150&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x25c150)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3def4b,activatedAnnotation:_0x1300ad,disableAnimationOnActivatedAnnotation:_0x4bdb21}){if(this['_activeAnnotation']=_0x1300ad,_0x3def4b){_0x3def4b['isActive']=!0x1;const _0x2ccbdb=this['getSidebarItemView'](_0x3def4b);_0x2ccbdb&&_0x4bdb21&&(_0x2ccbdb['isAnimationDisabled']=!0x1);}if(_0x1300ad){const _0x2ca59c=this['getSidebarItemView'](_0x1300ad);_0x2ca59c&&(_0x1300ad['isActive']=!0x0,_0x4bdb21&&(_0x2ca59c['isAnimationDisabled']=!0x0,_0x2ca59c['top']+=0x1),this['_alignToTargetRect'](_0x2ca59c));}}['_detachFromContainer'](_0x3d4c1a){if(this['view']['element']['remove'](),_0x3d4c1a){for(const _0x1fdf81 of _0x3d4c1a)this['_destroySidebarItemView'](_0x1fdf81);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x283c8c,_0x13042b){_0x13042b||(_0x13042b=_0x283c8c['view']);const _0x313e27=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x313e27,_0x283c8c),this['_annotationToSidebarItemView']['set'](_0x283c8c,_0x313e27),_0x313e27['content']['add'](_0x13042b),this['listenTo'](_0x283c8c['view'],'change:targetRect',(_0x4f81e5,_0x7e49c5,_0x18ae0e)=>{const _0x5c5122=this['_getTargetTop'](_0x283c8c,_0x18ae0e);_0x313e27['_targetTop']!=_0x5c5122&&(_0x313e27['_targetTop']=_0x5c5122,this['_setItemTop'](_0x313e27,_0x5c5122));}),this['listenTo'](_0x313e27,'change:top',()=>{this['_recalculate'](_0x313e27,'top');}),this['listenTo'](_0x313e27,'change:bottom',()=>{this['_recalculate'](_0x313e27,'bottom');}),this['_alignToTargetRect'](_0x313e27);const _0x3fa851=this['_getItemBefore'](_0x313e27);return _0x3fa851&&this['_alignAfterItem'](_0x3fa851,_0x313e27)||this['_alignToTargetRect'](_0x313e27),this['_updateLastItem'](),this['view']['list']['add'](_0x313e27),_0x313e27;}['_alignForTopChange'](_0x1a1683){if(!_0x1a1683['content']['length'])return;const _0x5d7773=this['_getItemBefore'](_0x1a1683);if(!_0x5d7773)return;const _0x62a0c0=this['_sidebarItemViewToAnnotation']['get'](_0x5d7773),_0x30ba01=this['_activeAnnotation'];_0x30ba01&&_0x30ba01===_0x62a0c0?this['_alignAfterItem'](_0x5d7773,_0x1a1683):this['_alignBeforeItem'](_0x1a1683,_0x5d7773);}['_alignForBottomChange'](_0x1a97d0){if(!_0x1a97d0['content']['length'])return;const _0x329681=this['_getItemAfter'](_0x1a97d0);if(!_0x329681)return;const _0x85d100=this['_sidebarItemViewToAnnotation']['get'](_0x329681),_0x2abf1d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x306f83=this['_activeAnnotation'];_0x306f83&&_0x306f83===_0x85d100&&_0x2abf1d?(this['_alignBeforeItem'](_0x329681,_0x1a97d0),this['_alignAfterItem'](_0x1a97d0,_0x329681)):_0x306f83&&_0x306f83===_0x85d100?this['_alignBeforeItem'](_0x329681,_0x1a97d0):this['_alignAfterItem'](_0x1a97d0,_0x329681);}['_recalculate'](_0x8c5882,_0x288e7d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1f80d0,changedProp:_0xafb1d4}of this['_recalculateBuffer'])'top'===_0xafb1d4?this['_alignForTopChange'](_0x1f80d0):this['_alignForBottomChange'](_0x1f80d0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x8c5882,'changedProp':_0x288e7d});}['getSidebarItemView'](_0x5ed420){return this['_annotationToSidebarItemView']['get'](_0x5ed420);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x12316b){const _0x1957cf=this['getSidebarItemView'](_0x12316b);this['stopListening'](_0x1957cf),this['stopListening'](_0x12316b['view']),_0x1957cf['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x12316b),this['_sidebarItemViewToAnnotation']['delete'](_0x1957cf);}['_createSidebarView'](){const _0x3175cb=new Ii(this['context']['locale']);return _0x3175cb['render'](),this['on']('change:_lastItem',(_0x569413,_0x4b2e5e,_0x240774,_0x50cc68)=>{_0x50cc68&&_0x3175cb['unbind']('minHeight'),_0x240774?_0x3175cb['bind']('minHeight')['to'](_0x240774,'bottom'):_0x3175cb['minHeight']=null;}),_0x3175cb;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5e8d3f){const _0x4b4a78=this['_sidebarItemViewToAnnotation']['get'](_0x5e8d3f),_0x35192d=_0x4b4a78&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4b4a78)-0x1);return _0x35192d&&this['getSidebarItemView'](_0x35192d)||null;}['_getItemAfter'](_0x444e64){const _0x42e1a5=this['_sidebarItemViewToAnnotation']['get'](_0x444e64),_0x56daea=_0x42e1a5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x42e1a5)+0x1);return _0x56daea&&this['getSidebarItemView'](_0x56daea)||null;}['_alignBeforeItem'](_0x5c0ba8,_0xd2379c){_0x5c0ba8['updateHeight']();const _0x2b7a5f=Ni(_0xd2379c['bottom']+this['_spaceBetweenItems'],_0x5c0ba8['top']);return!!_0x2b7a5f&&(this['_setItemTop'](_0xd2379c,_0xd2379c['top']-_0x2b7a5f),!0x0);}['_alignAfterItem'](_0x22e9d7,_0x7b9639){_0x22e9d7['updateHeight']();const _0x335750=Ni(_0x22e9d7['bottom']+this['_spaceBetweenItems'],_0x7b9639['top']);return!!_0x335750&&(this['_setItemTop'](_0x7b9639,_0x7b9639['top']+_0x335750,!0x1),!0x0);}['_alignToTargetRect'](_0x333c23){const _0x326ee1=this['_sidebarItemViewToAnnotation']['get'](_0x333c23);if(!_0x326ee1||!_0x326ee1['target']||!_0x326ee1['targetRect'])return;const _0x85374a=this['_getTargetTop'](_0x326ee1,_0x326ee1['targetRect']);this['_setItemTop'](_0x333c23,_0x85374a);}['_getTargetTop'](_0x28565e,_0x2ba7a2){if(null===_0x2ba7a2)return 0x0;if(_0x28565e['target']instanceof _0x45be68)return _0x2ba7a2['top'];{const _0x343dca=new _0x45be68(this['view']['element'])['top'];return _0x2ba7a2['top']-_0x343dca;}}['_setItemTop'](_0x10c73d,_0x3c76d0,_0x513068=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x513068&&(_0x3c76d0=Math['max'](_0x3c76d0,this['_getMaxAvailableTop'](_0x10c73d))),_0x10c73d['top']=_0x3c76d0;}['_getMaxAvailableTop'](_0x14f635){let _0x4fad05=this['_getItemBefore'](_0x14f635),_0x1719ef=0x0;for(;_0x4fad05;)_0x4fad05['updateHeight'](),_0x1719ef+=this['_spaceBetweenItems']+_0x4fad05['height'],_0x4fad05=this['_getItemBefore'](_0x4fad05);return _0x1719ef;}};function Ni(_0x382dce,_0x3e2944){return Math['max'](_0x382dce-_0x3e2944,0x0);}function Oi(_0x348402){return null!==_0x348402&&'object'==typeof _0x348402&&0x1===_0x348402['nodeType'];}var Mi=class extends _0x5baefc{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46f77f){super(_0x46f77f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3ec6c0(),this['_refreshPositioningDebounced']=_0x5b676f(()=>{_0x46f77f['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4ad12b=this['context']['plugins']['get'](Ti),_0x10b150=this['context']['plugins']['get'](ki);_0x4ad12b['register']('wideSidebar',this),_0x10b150['container']&&_0x4ad12b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x21ac0b){if(_0x21ac0b===this['activeAnnotation'])return;const _0x9e2edc=this['context']['plugins']['get'](ki);_0x9e2edc['_activeAnnotation']=_0x21ac0b;const _0x14fe8a=this['activeAnnotation'];_0x9e2edc['refresh']({'blurredAnnotation':_0x14fe8a,'activatedAnnotation':_0x21ac0b}),this['activeAnnotation']=_0x21ac0b;}['attach'](_0x3f4411){this['annotations']=_0x3f4411;const _0x40932b=this['context']['plugins']['get'](ki);if(_0x40932b['_annotations']=_0x3f4411,this['isAttached'])throw new _0x8e9278('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40932b,'set:container',()=>{this['detach'](),this['listenTo'](_0x40932b,'change:container',_0x4251c7=>{_0x4251c7['off'](),this['attach'](_0x3f4411);});}),_0x40932b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2cf9d5=_0x4dd142=>{_0x4dd142['updateTargetRect'](),_0x40932b['addAnnotation'](_0x4dd142);};for(const _0x2dbf2e of _0x3f4411)_0x2cf9d5(_0x2dbf2e);this['listenTo'](_0x3f4411,'add',(_0x7ed2ab,_0x1dff04)=>{_0x2cf9d5(_0x1dff04);}),this['listenTo'](_0x3f4411,'remove',(_0x35712f,_0x285774,_0x5d61d9)=>{_0x40932b['rearrange']({'removedAnnotation':_0x285774,'previousAnnotation':_0x3f4411['get'](_0x5d61d9-0x1),'nextAnnotation':_0x3f4411['get'](_0x5d61d9+0x1)}),_0x285774===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3f4411,'focus',(_0x567cde,_0x2f2b10)=>{this['setActiveAnnotation'](_0x2f2b10);}),this['listenTo'](_0x3f4411,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4cf20a=this['context']instanceof _0x49aa17?this['context']['editors']:new _0x3ec6c0([this['context']]);for(const _0x289a93 of _0x4cf20a)this['_integrateWithEditorAnnotations'](_0x289a93);this['listenTo'](_0x4cf20a,'add',(_0xf9dfd3,_0x39d6c7)=>{this['listenTo'](_0x39d6c7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x39d6c7);});}),this['listenTo'](_0x4cf20a,'remove',(_0x3b2670,_0x2b30f6)=>{_0x2b30f6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2b30f6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x8e9278('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4fe657=this['context']['plugins']['get'](ki);_0x4fe657['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4fe657),this['stopListening'](this['annotations']),this['context']instanceof _0x49aa17&&this['stopListening'](this['context']['editors']);for(const _0x2f3e64 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2f3e64);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x51b6d8){if(!_0x51b6d8['plugins']['has']('EditorAnnotations'))return;const _0x1a86fb=_0x51b6d8['plugins']['get']('EditorAnnotations'),_0x14f72e=()=>{const _0xf17e44=_0x1a86fb['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xf17e44[0x0]||null);};this['listenTo'](_0x1a86fb,'refresh',_0x14f72e),this['listenTo'](_0x1a86fb,'blur',(_0x48811b,{isAnnotationTracked:_0x452695})=>{this['activeAnnotation']&&_0x452695(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1a86fb,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x299bde=>{_0x1a86fb['hasDomSelection']()&&(_0x14f72e(),_0x299bde['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1a86fb);}['_destroyEditorAnnotationsIntegration'](_0x46a84d){this['stopListening'](_0x46a84d),this['_editorAnnotations']['remove'](_0x46a84d);}},Ri=class extends _0x2340d9{['counterView'];constructor(_0x1b3ed2){super(_0x1b3ed2);const _0x4cbcfd=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x16ae5f,_0x1cb177)=>_0x16ae5f?'...':_0x1cb177['toString']()),this['set']('annotationType',''),this['icon']=_0x55d4e9,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4cbcfd['to']('annotationType',_0x5805e3=>'ck-annotation-counter__badge--'+_0x5805e3),_0x4cbcfd['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4cbcfd['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x5baefc{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x589c70){super(_0x589c70),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x36f6cb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3ec6c0(),this['_refreshPositioningDebounced']=_0x5b676f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x401149(this['context']['locale']),this['balloonPanelView']=new _0x385998(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xbde12b){this['annotations']=_0xbde12b;const _0x33a02d=this['context']['plugins']['get'](ki),_0x2ee241=this['balloonPanelView'];if(_0x33a02d['_annotations']=_0xbde12b,this['isAttached'])throw new _0x8e9278('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x33a02d,'set:container',()=>{this['detach'](),this['listenTo'](_0x33a02d,'change:container',_0x57c6b7=>{_0x57c6b7['off'](),this['attach'](_0xbde12b);});}),_0x33a02d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x52bee6=_0x3e0bbc=>{const _0x492398=new Ri(this['context']['locale']);_0x33a02d['addAnnotation'](_0x3e0bbc,_0x492398),this['_annotationToNarrowView']['set'](_0x3e0bbc,_0x492398),_0x492398['bind']('isDirty','annotationType','number')['to'](_0x3e0bbc['view'],'isDirty','type','length'),_0x492398['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2ee241['content']['first']!==_0x3e0bbc['view']?(this['_showBalloon'](_0x3e0bbc),_0x3e0bbc['view']['element']['focus'](),this['setActiveAnnotation'](_0x3e0bbc)):this['setActiveAnnotation'](null);});};for(const _0x250b7a of _0xbde12b)_0x52bee6(_0x250b7a);this['listenTo'](_0xbde12b,'add',(_0x5de2c7,_0x416b7d)=>{_0x52bee6(_0x416b7d);}),this['listenTo'](_0xbde12b,'remove',(_0x1d9a13,_0x234217,_0x557d83)=>{this['_annotationToNarrowView']['get'](_0x234217)['destroy'](),this['_annotationToNarrowView']['delete'](_0x234217),_0x33a02d['rearrange']({'removedAnnotation':_0x234217,'previousAnnotation':_0xbde12b['get'](_0x557d83-0x1),'nextAnnotation':_0xbde12b['get'](_0x557d83+0x1)}),_0x234217===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xbde12b,'focus',(_0x2d7e7c,_0x34b94b)=>{this['setActiveAnnotation'](_0x34b94b);}),this['listenTo'](_0xbde12b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2951ce,_0x1206ce)=>{_0x1206ce['keyCode']===_0x1cd5dc['esc']&&_0x2ee241['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2ee241['content']['first']),this['_hideBalloon'](),_0x1206ce['stopPropagation'](),_0x1206ce['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1bb18b,_0x594677)=>{const _0x1c08b7=_0x594677['target'];_0x2ee241['isVisible']&&_0x2ee241['element']['contains'](_0x1c08b7)||_0x33a02d['view']['element']['contains'](_0x1c08b7)||_0x1bb18b['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xf1feb4=>_0xf1feb4['contains'](_0x1c08b7))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x286bf4=this['context']instanceof _0x49aa17?this['context']['editors']:new _0x3ec6c0([this['context']]);for(const _0x52ed9f of _0x286bf4)this['_integrateWithEditorAnnotations'](_0x52ed9f);this['listenTo'](_0x286bf4,'add',(_0x31e4eb,_0x5b27cb)=>{this['listenTo'](_0x5b27cb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5b27cb);});}),this['listenTo'](_0x286bf4,'remove',(_0x1e7ae2,_0x198b9c)=>{_0x198b9c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x198b9c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x237b21){if(_0x237b21===this['activeAnnotation'])return;const _0x1c793f=this['context']['plugins']['get'](ki);_0x1c793f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x237b21,'disableAnimationOnActivatedAnnotation':!0x0}),_0x237b21&&_0x1c793f['getSidebarItemView'](_0x237b21)?this['_showBalloon'](_0x237b21):this['_hideBalloon'](),this['activeAnnotation']=_0x237b21;}['detach'](){if(!this['isAttached'])throw new _0x8e9278('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5f0285=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x188b70=>_0x188b70['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5f0285['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x49aa17&&this['stopListening'](this['context']['editors']);for(const _0x54ca56 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x54ca56);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'](_0x423688){if(!_0x423688['plugins']['has']('EditorAnnotations'))return;const _0x1f60c5=_0x423688['plugins']['get']('EditorAnnotations'),_0x38f098=this['context']['plugins']['get'](ki),_0xe9999c=this['annotations'],_0x466a8c=this['balloonPanelView'],_0x2c8299=()=>{const _0x4d657c=_0x1f60c5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4d657c),this['setActiveAnnotation'](_0x4d657c[0x0]||null);};this['listenTo'](_0x1f60c5,'refresh',_0x2c8299),this['listenTo'](_0x1f60c5,'blur',(_0x5b9d0a,{isAnnotationTracked:_0x188355})=>{this['activeAnnotation']&&_0x188355(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1f60c5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xe9999c,'blur',_0x508365=>{_0x1f60c5['hasDomSelection']()&&_0x508365['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5b1068,_0x306b08)=>{const _0x5371b3=_0x306b08['target'];_0x466a8c['isVisible']&&_0x466a8c['element']['contains'](_0x5371b3)||_0x38f098['view']['element']['contains'](_0x5371b3)||this['activeAnnotation']&&_0x1f60c5['hasDomSelection']()&&(_0x2c8299(),_0x5b1068['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1f60c5);}['_destroyEditorAnnotationsIntegration'](_0x26a0ff){_0x26a0ff&&(this['stopListening'](_0x26a0ff),this['_editorAnnotations']['remove'](_0x26a0ff));}['_setSelectedAnnotations'](_0x446d04){for(const _0x6646cd of this['_selectedAnnotations'])_0x446d04['includes'](_0x6646cd)||this['_manuallyClosedAnnotationViews']['delete'](_0x6646cd['view']);this['_selectedAnnotations']=_0x446d04;}['_refreshPositioning'](){const _0x3b385b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3b385b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x38f735){if(this['_manuallyClosedAnnotationViews']['has'](_0x38f735['view']))return;const _0x34b559=this['balloonPanelView']['content']['first'];_0x34b559!==_0x38f735['view']?(_0x34b559&&this['_detachListeners'](_0x34b559),this['_attachListeners'](_0x38f735['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x38f735['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1fb464=this['balloonPanelView']['content']['first'],_0x3affb3=_0x1fb464&&this['annotations']['getByView'](_0x1fb464);if(!_0x3affb3||!this['_annotationToNarrowView']['has'](_0x3affb3))return;const _0x5a7044=this['_annotationToNarrowView']['get'](_0x3affb3)['element'],_0x287c2d=(function(){const _0x56b3c2=_0x385998['defaultPositions'];return[_0x56b3c2['southArrowNorthEast'],_0x56b3c2['northArrowSouthEast'],_0x56b3c2['southArrowNorth'],_0x56b3c2['northArrowSouth'],_0x56b3c2['southArrowNorthWest'],_0x56b3c2['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5a7044,'positions':_0x287c2d});}['_hideBalloon'](){const _0x53ff95=this['balloonPanelView'],_0xcd692d=_0x53ff95['content']['first'];_0xcd692d&&(this['_detachListeners'](_0xcd692d),_0x53ff95['unpin'](),_0x53ff95['content']['clear']());}['_attachListeners'](_0x2af0f3){this['listenTo'](_0x2af0f3,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2af0f3,'Esc',(_0x1706a8,_0x170919)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2af0f3),this['_hideBalloon'](),_0x170919();});}['_detachListeners'](_0x5b9ec0){this['stopListening'](_0x5b9ec0);}},xi=class extends _0x2eff03{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x10c02f,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4afb03){super(_0x4afb03),_0x4afb03['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4afb03['plugins']['get'](_0x10c02f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5b676f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x30667=this['editor']['plugins']['get'](Ti);_0x30667['context']===this['editor']&&(_0x30667['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4ff3f3,_0x5c55f7)=>{const _0x5448b9=this['_balloon'];if(this['isAttached']&&_0x5448b9['visibleView']){const _0x4bdaf5=this['annotations']['getByView'](_0x5448b9['visibleView']);_0x4bdaf5&&this['_closeAnnotation'](_0x4bdaf5),_0x5c55f7();}}));}['afterInit'](){const _0x1e8090=this['editor']['plugins']['get'](Ti);_0x1e8090['context']===this['editor']&&(_0x1e8090['hasActive']()||_0x1e8090['switchTo']('inline'));}['setActiveAnnotation'](_0x386477){_0x386477!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x386477&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x386477)&&this['_addAnnotationToBalloon'](_0x386477,!0x0),_0x386477['isActive']=!0x0),_0x386477||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x386477);}['attach'](_0x5e6003){this['annotations']=_0x5e6003;const _0x44cae2=this['editor']['plugins']['get'](Ti),_0x3abda4=this['_balloon'];if(this['isAttached'])throw new _0x8e9278('inlineannotations-attach-already-attached',this);if(_0x44cae2['context']!==this['editor'])throw new _0x8e9278('inlineannotations-not-allowed-with-context',this);const _0x333859=this['editor']['plugins']['get'](di);this['listenTo'](_0x333859,'refresh',()=>{const _0x528715=_0x333859['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1b202d,_0x489320;!this['_forceRefresh']&&(_0x1b202d=_0x528715,_0x489320=this['_selectedAnnotations'],_0x1b202d['length']===_0x489320['length']&&_0x1b202d['every'](_0x178b45=>_0x489320['includes'](_0x178b45)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x528715),this['setActiveAnnotation'](_0x528715[0x0]||null));}),this['listenTo'](_0x333859,'blur',(_0x395731,{isAnnotationTracked:_0x1c350b})=>{this['activeAnnotation']&&_0x1c350b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x333859,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x48b729,_0x321034,_0x488917)=>{_0x488917||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e6003,'remove',(_0x346d6c,_0x1b11df)=>{this['_removeAnnotationFromBalloon'](_0x1b11df),_0x1b11df===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3abda4,'change:visibleView',(_0x3a1770,_0x193896,_0x174e08,_0x28cb03)=>{_0x28cb03&&this['stopListening'](_0x28cb03);const _0x5ade4a=_0x5e6003['getByView'](_0x174e08);_0x174e08&&_0x5ade4a&&(this['listenTo'](_0x174e08,'change:height',()=>{_0x3abda4['updatePosition']();}),this['listenTo'](_0x174e08,'Esc',()=>{this['_closeAnnotation'](_0x5ade4a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5ade4a&&this['setActiveAnnotation'](_0x5ade4a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3abda4['visibleView']&&_0x5e6003['getByView'](_0x3abda4['visibleView'])&&_0x3abda4['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 _0x8e9278('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xc38761 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xc38761);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x6f8fcb){for(const _0x3de358 of this['_selectedAnnotations'])_0x6f8fcb['includes'](_0x3de358)||this['_manuallyClosed']['delete'](_0x3de358);for(const _0x505544 of this['annotations'])_0x6f8fcb['includes'](_0x505544)||this['_removeAnnotationFromBalloon'](_0x505544);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2db1ec of _0x6f8fcb)this['_addAnnotationToBalloon'](_0x2db1ec);}this['_selectedAnnotations']=_0x6f8fcb;}['_addAnnotationToBalloon'](_0x4ceffa,_0x12aad0=!0x1){this['_manuallyClosed']['has'](_0x4ceffa)||(this['_addedAnnotations']['has'](_0x4ceffa)||this['_balloon']['hasView'](_0x4ceffa['view'])||(this['_addedAnnotations']['add'](_0x4ceffa),this['_balloon']['add']({'stackId':_0x4ceffa['view']['id'],'view':_0x4ceffa['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4ceffa)}})),_0x12aad0&&this['_balloon']['showStack'](_0x4ceffa['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5b9753){const _0xb3531=_0x5b9753['target'],_0x4f6f0d=this['editor']['editing']['view'],_0x4a4419=_0x4f6f0d['document']['selection']['getFirstRange'](),_0xf8413e=_0x4f6f0d['domConverter']['viewRangeToDom'](_0x4a4419);if(_0xf8413e['collapse'](!0x0),_0xb3531){if(_0xb3531 instanceof _0x45be68)return _0xb3531;let _0x4b31d8=[];for(const _0x48b0a1 of _0xb3531)_0x4b31d8['push'](..._0x45be68['getDomElementRects'](_0x48b0a1));_0x4b31d8=function(_0x40ab24){const _0x3029dc=[];let _0x32b3a1=_0x40ab24[0x0];for(let _0x3f9922=0x1;_0x3f9922<_0x40ab24['length'];_0x3f9922++)if(Pi(_0x32b3a1,_0x40ab24[_0x3f9922])){const _0x4e7f99=_0x40ab24[_0x3f9922]['width'];_0x32b3a1['width']+=_0x4e7f99,_0x32b3a1['right']+=_0x4e7f99;}else _0x3029dc['push'](_0x32b3a1),_0x32b3a1=_0x40ab24[_0x3f9922];return _0x3029dc['push'](_0x32b3a1),_0x3029dc;}(_0x4b31d8);const _0x2126b8=_0xf8413e['getBoundingClientRect']();return _0x4b31d8['find'](_0x10b8a6=>_0x10b8a6['top']<=_0x2126b8['top']&&_0x10b8a6['bottom']>=_0x2126b8['bottom']&&_0x10b8a6['left']<=_0x2126b8['left']&&_0x10b8a6['right']>=_0x2126b8['right'])||_0x4b31d8[0x0];}return _0x5b9753['targetRect']||_0xf8413e;}['_removeAnnotationFromBalloon'](_0x1f58df){this['_addedAnnotations']['has'](_0x1f58df)&&this['_balloon']['hasView'](_0x1f58df['view'])&&(this['_addedAnnotations']['delete'](_0x1f58df),this['_balloon']['remove'](_0x1f58df['view']));}['_closeAnnotation'](_0xe8b0b6){this['_manuallyClosed']['add'](_0xe8b0b6),this['_removeAnnotationFromBalloon'](_0xe8b0b6);}};function Pi(_0x4243ae,_0x420ed7){return _0x4243ae['top']===_0x420ed7['top']&&_0x4243ae['bottom']===_0x420ed7['bottom']&&_0x4243ae['right']===_0x420ed7['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x221acc,_0x43c531){super(_0x221acc),this['set']('isEmpty',!_0x43c531['length']),this['focusTracker']=new _0x471a49(),this['_annotationViews']=_0x43c531,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x43c531,'focusTracker':this['focusTracker']}),this['listenTo'](_0x43c531,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x43c531,'remove',(_0x14bf77,_0x42560b)=>{_0x42560b['isActive']&&this['focus'](),_0x43c531['length']||(this['isEmpty']=!0x0);});const _0x260041=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x221acc,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x43c531},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x260041['if']('isEmpty','ck-hidden',_0x1931c7=>!_0x1931c7)]},'children':[{'text':Et(_0x221acc,'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 _0x5e19b2 of this['_annotationViews'])this['focusTracker']['add'](_0x5e19b2['element']);this['_annotationViews']['on']('change',(_0x14fd57,{added:_0x5648c6,removed:_0x2b3fde})=>{for(const _0x34beb1 of _0x5648c6)this['focusTracker']['add'](_0x34beb1['element']);for(const _0x99c616 of _0x2b3fde)this['focusTracker']['remove'](_0x99c616['element']);});}},Di=class extends _0x5baefc{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x4e7626){super(_0x4e7626),this['archivedThreads']=new _0x3ec6c0();}['init'](){const _0x12ea76=this['context'],_0x5d70b6=_0x12ea76['plugins']['get'](oi),_0x4db04d=_0x12ea76['plugins']['get'](ti);this['listenTo'](_0x5d70b6,'addCommentThread',(_0x4f95b5,{threadId:_0x2c3692})=>{const _0x57ecfb=_0x5d70b6['getCommentThread'](_0x2c3692);_0x57ecfb['archivedAt']&&this['archivedThreads']['add'](_0x57ecfb,this['_calculatePosition'](_0x57ecfb['archivedAt'])),this['listenTo'](_0x57ecfb,'change:archivedAt',(_0x3c7547,_0x2a112e,_0x51cc32)=>{_0x51cc32?this['archivedThreads']['has'](_0x57ecfb)||this['archivedThreads']['add'](_0x57ecfb,this['_calculatePosition'](_0x57ecfb['archivedAt'])):this['archivedThreads']['has'](_0x57ecfb)&&this['archivedThreads']['remove'](_0x57ecfb);});}),this['listenTo'](_0x5d70b6,'removeCommentThread',(_0x17e99b,{threadId:_0x5f3bd9})=>{const _0x5a4b16=_0x5d70b6['getCommentThread'](_0x5f3bd9);this['stopListening'](_0x5a4b16),this['archivedThreads']['has'](_0x5a4b16)&&this['archivedThreads']['remove'](_0x5a4b16);},{'priority':'highest'}),this['listenTo'](_0x4db04d['collection'],'focus',(_0x10091d,_0xb67e4b)=>{_0xb67e4b['isVisible']||(_0xb67e4b['isActive']=!0x0,_0x4db04d['activate'](_0xb67e4b));});}['_calculatePosition'](_0x3456d3){const _0x5e10ac=[...this['archivedThreads']]['findIndex'](_0x4454b3=>_0x4454b3['archivedAt']<_0x3456d3);return _0x5e10ac>-0x1?_0x5e10ac:this['archivedThreads']['length'];}},Vi=class extends _0x2eff03{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x40184e];}constructor(_0x35eb05){super(_0x35eb05),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x574e4f=this['editor'],_0x1cf433=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x574e4f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2340d9,!0x0)),_0x574e4f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x20b146=this['_createCommentsArchiveButton'](rt);return _0x20b146['set']({'role':'menuitemcheckbox'}),_0x20b146;});const _0x2962d2=_0x574e4f['plugins']['get'](Di),_0x6b7d34=_0x574e4f['plugins']['get']('Annotations'),_0xc1e15e=_0x574e4f['plugins']['get']('CommentsRepository');_0x2962d2['archivedThreads']['forEach'](_0x5f33e2=>{this['_handleNewThread'](_0x5f33e2);}),this['listenTo'](_0x2962d2['archivedThreads'],'add',(_0x57c482,_0x3ed649)=>{this['_handleNewThread'](_0x3ed649);}),this['listenTo'](_0x6b7d34['collection'],'add',(_0x52b28b,_0x4d4521)=>{const _0x5f082e=this['_pendingThreads']['find'](_0x1e5c70=>{const _0x1efb7e=_0xc1e15e['_threadToController']['get'](_0x1e5c70);return _0x1efb7e&&_0x4d4521['innerView']===_0x1efb7e['view'];});if(_0x5f082e){const _0x515121=this['_calculatePosition'](_0x5f082e['archivedAt']);this['_addAnnotationToArchive'](_0x4d4521,_0x515121),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5f082e),0x1);}}),this['listenTo'](_0x2962d2['archivedThreads'],'remove',(_0x51b34f,_0x2994c2)=>{const _0x5574ac=_0x574e4f['config']['get']('collaboration.channelId');if(!_0x5574ac||_0x2994c2['channelId']===_0x5574ac){if(this['_pendingThreads']['includes'](_0x2994c2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2994c2),0x1);else{const _0x64df30=_0xc1e15e['_threadToController']['get'](_0x2994c2),_0x22e45b=_0x6b7d34['getByInnerView'](_0x64df30['view']);this['annotationViews']['remove'](_0x22e45b['view']),this['stopListening'](_0x22e45b),this['stopListening'](_0x22e45b['focusableElements']);}}}),this['listenTo'](_0x6b7d34['collection'],'add',(_0x4834cd,_0x51111b)=>{this['listenTo'](_0x51111b,'escape',_0x1cf433);}),this['listenTo'](_0x6b7d34['collection'],'remove',(_0x572056,_0x2525b2)=>{this['stopListening'](_0x2525b2,'escape',_0x1cf433);});}['_addAnnotationToArchive'](_0x1e9bb5,_0x5d8648){this['listenTo'](_0x1e9bb5,'set:isVisible',_0x315932=>{_0x315932['return']=!0x1,_0x315932['stop']();}),this['annotationViews']['add'](_0x1e9bb5['view'],_0x5d8648);}['_handleNewThread'](_0x28111d){const _0x81964b=this['editor']['plugins']['get']('CommentsRepository'),_0x26d67a=this['editor']['plugins']['get']('Annotations'),_0x248f40=this['editor']['config']['get']('collaboration.channelId');if(!_0x248f40||_0x28111d['channelId']===_0x248f40){const _0x11f16a=_0x81964b['_threadToController']['get'](_0x28111d);if(!_0x11f16a)return void this['_pendingThreads']['push'](_0x28111d);const _0x4c3da2=this['_calculatePosition'](_0x28111d['archivedAt']),_0x3e0211=_0x26d67a['getByInnerView'](_0x11f16a['view']);_0x3e0211['isVisible']&&_0x26d67a['_visibleAnnotations']['remove'](_0x3e0211),this['_addAnnotationToArchive'](_0x3e0211,_0x4c3da2);}}['_calculatePosition'](_0x299352){const _0x57b059=this['editor']['config']['get']('collaboration.channelId'),_0x482ad0=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x58cda9=>_0x58cda9['channelId']===_0x57b059)['findIndex'](_0x2810c2=>_0x2810c2['archivedAt']<_0x299352);return _0x482ad0<0x0||_0x482ad0>this['annotationViews']['length']?this['annotationViews']['length']:_0x482ad0-0x1;}['_toggleDialog'](){const _0x307fd7=this['editor'],_0x3cfff8=_0x307fd7['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x307fd7['locale'],this['annotationViews'])),'commentsArchive'===_0x3cfff8['id']?_0x3cfff8['hide']():_0x3cfff8['show']({'id':'commentsArchive','title':Et(_0x307fd7['locale'],'COMMENTS_ARCHIVE'),'icon':_0x33098a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1b2f23['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4dd202,_0x37fd0a=!0x1){const _0x296cd9=this['editor']['locale'],_0x3413fd=this['editor']['plugins']['get']('Dialog'),_0x238e37=new _0x4dd202(_0x296cd9);return _0x238e37['bind']('isEnabled')['to'](this,'isEnabled'),_0x238e37['bind']('isOn')['to'](_0x3413fd,'id',_0x52214e=>'commentsArchive'===_0x52214e),_0x238e37['set']({'label':Et(_0x296cd9,'COMMENTS_ARCHIVE'),'icon':_0x33098a,'isToggleable':!0x0}),_0x37fd0a&&(_0x238e37['tooltip']=!0x0),this['listenTo'](_0x238e37,'execute',()=>this['_toggleDialog']()),_0x238e37;}['_hideDialogOnAnnotationEscape']=_0x2eef1c=>{const _0x53273f=_0x2eef1c['source'];if(!this['annotationViews']['has'](_0x53273f['view']))return;const _0x1db871=this['editor']['plugins']['get']('Dialog');_0x1db871['isOpen']&&'commentsArchive'===_0x1db871['id']&&(_0x1db871['hide'](),_0x2eef1c['stop']());};},Bi=class extends _0x2eff03{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};