@ckeditor/ckeditor5-comments 48.0.0-alpha.8 → 48.0.0-alpha.9
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.
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0xf388e8={}){function _0xffad17(_0x19549b){return _0x19549b['map'](_0x3b8a55=>String['fromCharCode'](_0x3b8a55))['join']('');}(_0xf388e8=Object['assign']({},_0xf388e8))['plugins']||(_0xf388e8['plugins']=Ot['defaultPlugins']),super(_0xf388e8),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[_0xffad17([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xffad17([0x76,0x69,0x65,0x77])][_0xffad17([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xffad17([0x61,0x75,0x74,0x6f]),this[_0xffad17([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xffad17([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xffad17([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xffad17([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xffad17([0x6f,0x6b])});}['create'](){const _0x48951f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x48951f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5569d7=>{const _0x4d5dc8=this['model']['document']['getRoot'](),_0xb81f95=_0x4d5dc8&&_0x4d5dc8['getChild'](_0x4d5dc8['childCount']-0x1);_0x5569d7['setSelection'](_0xb81f95,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x51f173=this['editing']['view'],_0x37b477=_0x51f173['document']['getRoot'](),_0x29fb0f=_0x37b477['getChild'](0x0);_0x37b477['childCount']>0x1||!_0x29fb0f||'p'!=_0x29fb0f['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x51f173,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x29fb0f['placeholder']=this['placeholder']),ut({'view':_0x51f173,'element':_0x29fb0f,'keepOnFocus':!0x0}),this['placeholderElement']=_0x29fb0f);}}class Mt extends _0x32e0d0{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5e52e5,_0xba3ed2={}){super(_0x5e52e5),this['editor']=null,this['_editorConfig']=_0xba3ed2,this['set']('value',_0xba3ed2['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x5e52e5,'Reply...')),this['set']('submitLabel',bt(_0x5e52e5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4c2f91(),this['focusTracker']=new _0x46222e(),this['focusCycler']=new _0xe4e85f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x534877,_0x50bb93)=>{this['cancelButtonView']['fire']('execute'),_0x50bb93();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3ff9a6,_0x33f033)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x33f033());}),this['on']('submit',(_0x4dbab9,_0x512eaf)=>{_0x512eaf['length']>0xfde8?(alert(bt(_0x5e52e5,'TOO_LONG_COMMENT_ALERT',[_0x512eaf['length'],0xfde8])),_0x4dbab9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2b98b9=this['editor'];this['element']['insertBefore'](_0x2b98b9['ui']['element'],this['element']['firstChild']),_0x2b98b9['model']['document']['on']('change',()=>this['value']=_0x2b98b9['getData']()),_0x2b98b9['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2b98b9['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3376a9){-0x1===_0x3376a9?(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:_0x5b46e9}=this,_0x2cb61c=new _0x55e7f2(_0x5b46e9);return _0x2cb61c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2cb61c['withText']=!0x0,_0x2cb61c['bind']('label')['to'](this,'submitLabel'),_0x2cb61c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2cb61c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x29f17d,_0x91ab0)=>!_0x91ab0&&!!_0x29f17d['trim']()),_0x2cb61c;}['_createCancelButton'](){const {locale:_0x18ed80}=this,_0x3a28aa=new _0x55e7f2(_0x18ed80);return _0x3a28aa['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3a28aa['label']=bt(_0x18ed80,'Cancel'),_0x3a28aa['withText']=!0x0,_0x3a28aa['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3a28aa;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x57e6ec=>{this['focusTracker']['add'](_0x57e6ec['element']);}),this['focusables']['on']('change',(_0x2f672e,_0x1df5e3)=>{for(const _0x5956d4 of Array['from'](_0x1df5e3['added'])['reverse']())this['focusTracker']['add'](_0x5956d4['element']);});}}class Rt extends _0x32e0d0{constructor(_0x1826a8,_0x47b4b6,_0x5756cc){super(_0x1826a8),this['commentInputView']=new Mt(_0x1826a8,_0x5756cc),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x21a900,_0x3d4946)=>_0x21a900||!!_0x3d4946),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 _0x339d56(_0x1826a8,_0x47b4b6),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'](_0xa8861e){this['commentInputView']['focus'](_0xa8861e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x52782b,_0x27d80b)=>{const {submitButtonView:_0x3b74c7,cancelButtonView:_0x21cbb2,editor:_0x5b07b8}=this['commentInputView'];[_0x3b74c7['element'],_0x21cbb2['element'],_0x5b07b8?_0x5b07b8['editing']['view']['getDomRoot']():null]['filter'](_0x4052b5=>_0x4052b5)['some'](_0x4866be=>_0x4866be['contains'](_0x27d80b['target']))||(this['focus'](),_0x27d80b['preventDefault']());});}}class xt extends _0x32e0d0{constructor(_0x1040c0){super(_0x1040c0);const _0x40b716=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x40b716['to']('count',_0x805ff2=>bt(_0x1040c0,'NUMBER_OF_COMMENTS',_0x805ff2))}]});}}class St extends _0x32e0d0{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4f79f4,_0x2e00e4,_0x15576d){super(_0x4f79f4);const _0x52efb7=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2e00e4['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2e00e4,this['_config']=_0x15576d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x46222e(),this['keystrokes']=new _0x4c2f91(),this['focusCycler']=new _0xe4e85f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3bf65e=>this['commentViews']['map'](_0x2677ac=>_0x2677ac['element'])['includes'](_0x3bf65e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x4f79f4),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xd20b4b=>_0xd20b4b-this['_config']['maxCommentsWhenCollapsed']);for(const _0x121597 of _0x2e00e4['comments'])this['_handleNewCommentModel'](_0x121597);this['_handleInfoComment'](),this['listenTo'](_0x2e00e4['comments'],'add',(_0x2fae14,_0xdc799f)=>{const _0x2957d9=this['_calculatePosition'](_0xdc799f);this['length']++,this['_handleNewCommentModel'](_0xdc799f,_0x2957d9),this['refreshVisibleViews']();}),this['listenTo'](_0x2e00e4['comments'],'remove',(_0x1b8290,_0x525c54)=>{this['length']--,this['_handleRemoveCommentModel'](_0x525c54),this['refreshVisibleViews']();}),this['listenTo'](_0x2e00e4,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2e00e4,'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',_0x52efb7['if']('length','ck-hidden',_0x303e19=>!_0x303e19)],'aria-label':bt(_0x4f79f4,'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'](_0x11bc9c){-0x1===_0x11bc9c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5da45d of this['commentViews'])_0x5da45d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x39124a,_0x4e6230){const _0x5ab6a2=new this['_config']['CommentView'](this['locale'],_0x39124a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5ab6a2['viewUid']=_0x39124a['id'],_0x5ab6a2['delegate']('removeComment')['to'](this),_0x5ab6a2['delegate']('updateComment')['to'](this),_0x5ab6a2['delegate']('resolveCommentThread')['to'](this),_0x5ab6a2['delegate']('editorReady')['to'](this),_0x5ab6a2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5ab6a2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5ab6a2,_0x4e6230);}['_calculatePosition'](_0x343ebd){const _0x5540a6=this['_model']['_findOptimalIndex'](_0x343ebd);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x343ebd['authoredAt']?_0x5540a6-0x1:_0x5540a6:_0x5540a6-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x36b800={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x36b800,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x36b800));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x45170c){const _0x105c0d=this['commentViews']['remove'](_0x45170c['id']);this['stopListening'](_0x105c0d),_0x105c0d['isEditMode']&&this['_updateHasDirtyComment'](),_0x105c0d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2ddacd=>_0x2ddacd['isEditMode']);}['_rearrangeCollapse'](){const _0x37ddc9=function(_0x27631a){const _0x4f9b5d=new _0x5243cc();for(const _0x5990e7 of _0x27631a)_0x4f9b5d['add'](_0x5990e7);return _0x4f9b5d;}(this['commentViews']),_0x2c9500=this['_collapsedCommentsView']['count'];for(let _0xdf426=0x1;_0xdf426<=_0x2c9500;_0xdf426++)_0x37ddc9['remove'](0x1);for(const _0x3e1efb of _0x37ddc9)_0x3e1efb['collapse']();_0x2c9500>0x0&&_0x37ddc9['add'](this['_collapsedCommentsView'],0x1),Pt(_0x4e13a7(Array['from'](this['visibleViews']),Array['from'](_0x37ddc9)),this['visibleViews'],_0x37ddc9);}['_rearrangeExpand'](){Pt(_0x4e13a7(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x113a08 of this['visibleViews'])_0x113a08['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x25a70b=>{this['focusTracker']['add'](_0x25a70b['element']),this['keystrokes']['listenTo'](_0x25a70b['element']);}),this['commentViews']['on']('change',(_0x2c849f,_0x171741)=>{for(const _0x720e2f of _0x171741['removed'])this['focusTracker']['remove'](_0x720e2f['element']),this['keystrokes']['stopListening'](_0x720e2f['element']);for(const _0x3b5c9e of Array['from'](_0x171741['added'])['reverse']())this['focusTracker']['add'](_0x3b5c9e['element']),this['keystrokes']['listenTo'](_0x3b5c9e['element']);});}}function Pt(_0x534be0,_0x7b9ee4,_0x25a001){let _0x254d89=0x0;for(const _0x1f40dd of _0x534be0)switch(_0x1f40dd){case'insert':_0x7b9ee4['add'](_0x25a001['get'](_0x254d89),_0x254d89),_0x254d89++;break;case'delete':_0x7b9ee4['remove'](_0x254d89);break;case'equal':_0x254d89++;}}class Lt extends _0x32e0d0{constructor(_0x3a3c47){super(_0x3a3c47);const _0x190d1b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x190d1b['to']('contextValue',_0x18bd0e=>bt(_0x3a3c47,'THREAD_CONTEXT_LABEL',_0x18bd0e)),'tabindex':-0x1},'children':[{'text':_0x190d1b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x32e0d0{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3a8c30,_0x432aa9){super(_0x3a8c30);const _0x4ec3eb=this['bindTemplate'];this['_model']=_0x432aa9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x46222e(),this['keystrokes']=new _0x4c2f91(),this['focusCycler']=new _0xe4e85f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x435ed7=>!!_0x435ed7),this['bind']('contextValue')['to'](this['_model'],'context',_0x121b8f=>_0x121b8f&&_0x121b8f['value']?this['_trimContextValue'](_0x121b8f['value']):bt(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',_0x4ec3eb['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 _0xb934d=new _0x55e7f2(this['locale']);return _0xb934d['label']=bt(this['locale'],'Reopen'),_0xb934d['tooltip']=bt(this['locale'],'Reopen'),_0xb934d['icon']=_0x4276a2,_0xb934d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x568af4=>!_0x568af4),_0xb934d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2a30ee,_0x5ceee3)=>_0x2a30ee&&_0x5ceee3),_0xb934d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xb934d;}['_trimContextValue'](_0x3ed93f){if(_0x3ed93f['length']<0x96)return _0x3ed93f;const _0x35a294=_0x3ed93f['lastIndexOf']('\x20',0x93);return _0x3ed93f['substring'](0x0,_0x35a294>-0x1?_0x35a294:0x93)+'...';}['_attachContextActions'](){const _0x121014=this['element']['querySelector']('.ck-context'),_0x5d520e=_0x121014['querySelector']('.ck-context__value');this['listenTo'](_0x121014,'mouseenter',()=>{_0x5d520e['offsetWidth']<_0x5d520e['scrollWidth']&&_0x121014['classList']['add']('overlay');}),this['listenTo'](_0x121014,'mouseleave',()=>{_0x121014['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x127fff of this['focusables'])this['focusTracker']['add'](_0x127fff['element']),this['keystrokes']['listenTo'](_0x127fff['element']);}['_createContextView'](){const _0x23bdea=new Lt(this['locale']);return _0x23bdea['bind']('contextValue')['to'](this),_0x23bdea;}}class Vt extends _0x32e0d0{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x893704,_0x363c58,_0x540da7,_0x1b758d){super(_0x893704),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x363c58,this['_localUser']=_0x540da7,this['_config']=_0x1b758d,this['commentThreadHeaderView']=new Dt(_0x893704,_0x363c58),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3b6024(_0x893704,bt(_0x893704,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x893704,_0x363c58,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1b758d)),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',(_0x119207,_0xf44c02)=>_0x119207||!!_0xf44c02),this['bind']('isUnlinked')['to'](_0x363c58,'unlinkedAt',_0x2ea54b=>!!_0x2ea54b),this['bind']('ariaLabel')['to'](this,'length',_0x37d7e9=>{const _0xdc8fb4=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x37d7e9,_0xdc8fb4]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x46222e(),this['keystrokes']=new _0x4c2f91(),this['focusCycler']=new _0xe4e85f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x362891=>_0x362891['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x21a2ff(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x24ba43=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x18b319=_0x24ba43['commentInputView'];return _0x24ba43['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x18b319,'value',(_0x11baab,_0x371e8a,_0x49373c,_0xfb5ece,_0x48f436)=>!!_0x48f436||!!_0xfb5ece&&_0x49373c&&!_0x371e8a||_0x11baab&&_0x49373c&&!_0x371e8a),_0x18b319['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4cc09f,_0x163911,_0x56bbb1)=>{let _0x31c352;return _0x31c352=_0x56bbb1&&_0x163911?'Reply\x20to\x20reopen\x20discussion...':_0x4cc09f?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x31c352);}),_0x18b319['bind']('submitLabel')['to'](this,'length',_0x442427=>bt(this['locale'],_0x442427?'Reply':'Comment')),_0x18b319['on']('submit',(_0xb7a963,_0x3f1711)=>{this['fire']('addComment',_0x3f1711),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x18b319['on']('cancel',()=>{this['focus']();}),_0x18b319['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x18b319['on']('cancel',_0x2cc217=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2cc217['stop']());}),this['on']('change:isActive',(_0x5e64a8,_0x1cd098,_0x19ce35)=>{_0x19ce35||this['length']||_0x18b319['value']||this['fire']('removeCommentThread');}),_0x24ba43;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x11fd6d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2f37f4,target:_0x2f7a62,type:_0x89fc78,isVisible:_0x32d254=!0x0}){super(),this['view']=_0x2f37f4,this['view']['element']||this['view']['render'](),this['_type']=_0x89fc78,this['_target']=_0x2f7a62,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5243cc([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2b4480,_0x23f4d4)=>{this['view']['focusTracker']['add'](_0x23f4d4);}),this['focusableElements']['on']('remove',(_0x330915,_0x1af504)=>{this['view']['focusTracker']['remove'](_0x1af504);}),this['set']('isVisible',_0x32d254);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1085da=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x1085da),_0x1085da;}get['targetRect'](){const _0x479296=this['target'];if(null===_0x479296)return null;if(_0x479296 instanceof _0x297850)return _0x479296;const _0xd0f43e=_0x479296['filter'](_0x2b6787=>function(_0x2996c6){const _0x148d64=_0x2996c6['offsetParent'];if(_0x148d64)return!0x0;const _0x35518d=_0x2996c6['getClientRects']()['item'](0x0);return!!_0x35518d;}(_0x2b6787));return 0x0===_0xd0f43e['length']?null:_0x297850['getDomElementRects'](_0xd0f43e[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x123f61){this['view']['isActive']=_0x123f61,this['view']['mainView']['isActive']=_0x123f61;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x330e31){if(!(null===_0x330e31||_0x330e31 instanceof _0x297850||Array['isArray'](_0x330e31)&&_0x330e31['every'](_0x278ac4=>Gt(_0x278ac4))))throw new _0x373a51('annotation-invalid-target',null,{'target':_0x330e31});}['_getNormalizedTarget'](){const _0x5cd418='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x5cd418)?[_0x5cd418]:_0x5cd418;}}function Gt(_0xf6a8aa){return null!==_0xf6a8aa&&'object'==typeof _0xf6a8aa&&'nodeType'in _0xf6a8aa&&0x1===_0xf6a8aa['nodeType'];}class jt extends _0x5243cc{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5efdfa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x46222e(),this['_focusTracker']['on']('change:isFocused',(_0x53d719,_0xfb8cb3,_0x33fdc2)=>{_0x33fdc2||this['fire']('blur');});for(const _0x544e78 of _0x5efdfa)this['add'](_0x544e78);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4e6477){if(this['has'](_0x4e6477))throw new _0x373a51('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4e6477['innerView'],_0x4e6477),this['_viewToAnnotation']['set'](_0x4e6477['view'],_0x4e6477);for(const _0x4bcde3 of _0x4e6477['focusableElements'])this['_focusTracker']['add'](_0x4bcde3);this['listenTo'](_0x4e6477['focusableElements'],'add',(_0x1da4ab,_0x14e214)=>{this['_focusTracker']['add'](_0x14e214);}),this['listenTo'](_0x4e6477['focusableElements'],'remove',(_0x2bed5d,_0x4a7632)=>{this['_focusTracker']['remove'](_0x4a7632);}),this['listenTo'](_0x4e6477['view']['focusTracker'],'change:isFocused',(_0x4ed275,_0x5267f3,_0x16d613)=>{_0x16d613&&this['fire']('focus',_0x4e6477);}),_0x4e6477['updateTargetRect']();const _0x353899=this['_getOrderInContent'](_0x4e6477['view']['targetRect']);return super['add'](_0x4e6477,_0x353899);}['remove'](_0x2e250e){if(!this['has'](_0x2e250e))throw new _0x373a51('annotationcollection-not-existing-item',null);this['stopListening'](_0x2e250e['view']['focusTracker']),this['stopListening'](_0x2e250e['focusableElements']);for(const _0x57b095 of _0x2e250e['focusableElements'])this['_focusTracker']['remove'](_0x57b095);return this['_viewToAnnotation']['delete'](_0x2e250e['view']),this['_innerViewToAnnotation']['delete'](_0x2e250e['innerView']),super['remove'](_0x2e250e);}['getByInnerView'](_0x45ab6a){return this['_innerViewToAnnotation']['get'](_0x45ab6a);}['getByView'](_0x3eee43){return this['_viewToAnnotation']['get'](_0x3eee43);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5a61ee of this)_0x5a61ee['updateTargetRect']();this['_sort']();}['_sort'](){const _0xabc5b=Array['from'](this)['sort']((_0x4dd018,_0x4ccb83)=>qt(_0x4dd018['view']['targetRect'],_0x4ccb83['view']['targetRect']));for(let _0x907604=_0xabc5b['length']-0x1;_0x907604>0x0;_0x907604--){const _0x1e4791=_0xabc5b[_0x907604];_0x907604!==this['getIndex'](_0x1e4791)&&(this['remove'](_0x1e4791),this['add'](_0x1e4791));}}['_getOrderInContent'](_0x4fc07f){let _0x28741b=0x0;if(!_0x4fc07f)return this['length'];for(const _0x1208f6 of this){const _0x5a26ca=_0x1208f6['view']['targetRect'];if(_0x5a26ca){if(qt(_0x4fc07f,_0x5a26ca)<0x0)return _0x28741b;_0x28741b++;}}return _0x28741b;}}function Xt({source:_0x31acd9,target:_0x401ce4,filter:_0x161dd9}){for(const _0x209edd of _0x31acd9)_0x161dd9(_0x209edd)&&_0x401ce4['add'](_0x209edd);_0x401ce4['listenTo'](_0x31acd9,'add',(_0x3df715,_0x31dbb1)=>{_0x161dd9(_0x31dbb1)&&_0x401ce4['add'](_0x31dbb1);}),_0x401ce4['listenTo'](_0x31acd9,'remove',(_0x45beb6,_0x93823a)=>{_0x401ce4['has'](_0x93823a)&&_0x401ce4['remove'](_0x93823a);});}function qt(_0x49555c,_0x1b2be8){if(null===_0x49555c&&null===_0x1b2be8)return 0x0;if(null===_0x49555c)return-0x1;if(null===_0x1b2be8)return 0x1;const _0x2cea42=_0x49555c['top']-_0x1b2be8['top'];return 0x0==_0x2cea42?_0x49555c['left']-_0x1b2be8['left']:_0x2cea42;}class $t extends _0x1f8e1d{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xc9ff91){if(super(_0xc9ff91),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xc9ff91 instanceof _0x2e529c){const _0x493c12=_0xc9ff91['locale'];_0xc9ff91['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x493c12,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1e586d){this['collection']['add'](_0x1e586d);}['remove'](_0xc357c2){this['collection']['remove'](_0xc357c2),_0xc357c2['destroy']();}['refreshVisibility'](){for(const _0x5dfa27 of this['collection'])_0x5dfa27['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x375808){return this['collection']['getByInnerView'](_0x375808);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2f5b84 of this['collection'])_0x2f5b84['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2d7e26){this['fire']('_activateAnnotation',_0x2d7e26);}['createAnnotation'](_0x1913dc){return new Yt(_0x1913dc);}['createAnnotationView'](_0x53a07d,_0xf947ad){return new Kt(_0x53a07d,_0xf947ad);}['_addActiveAnnotation'](_0x3b5665){const _0x47f58a=new Set(this['activeAnnotations']);_0x47f58a['add'](_0x3b5665),this['activeAnnotations']=_0x47f58a;}['_removeActiveAnnotation'](_0xdd98eb){const _0x1de085=new Set(this['activeAnnotations']);_0x1de085['delete'](_0xdd98eb),this['activeAnnotations']=_0x1de085;}['_bindAnnotationsToVisibleAnnotations'](){const _0x44b594=this['collection'],_0x394870=this['_visibleAnnotations'];function _0x213f3c(_0x590f01){const _0x4c7ea0=_0x590f01['source'];_0x4c7ea0['isVisible']&&!_0x394870['has'](_0x4c7ea0)?_0x394870['add'](_0x4c7ea0):!_0x4c7ea0['isVisible']&&_0x394870['has'](_0x4c7ea0)&&_0x394870['remove'](_0x4c7ea0),_0x4c7ea0['view']['focusTracker']['remove'](_0x4c7ea0['view']['element']),_0x4c7ea0['view']['focusTracker']['add'](_0x4c7ea0['view']['element']);}this['listenTo'](_0x44b594,'add',(_0x38a9f2,_0x5ae685)=>{_0x5ae685['isVisible']&&_0x394870['add'](_0x5ae685),this['listenTo'](_0x5ae685,'change:isVisible',_0x213f3c);}),this['listenTo'](_0x44b594,'remove',(_0x195454,_0x43b1ce)=>{_0x394870['has'](_0x43b1ce)&&_0x394870['remove'](_0x43b1ce),this['stopListening'](_0x43b1ce,'change:isVisible',_0x213f3c);});}['_setupEnterAnnotationKeystroke'](){const _0x3deaae=_0x41db49=>{_0x41db49['on']('ready',()=>{_0x41db49['keystrokes']['set'](_0x4f881f,(_0x5df5f7,_0x537ab6)=>{const _0x7112bd=_0x58c6ad(this['activeAnnotations']['values']());_0x7112bd&&(_0x7112bd['view']['focus'](),_0x537ab6());});});};this['context']instanceof _0x2e529c?_0x3deaae(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x554da9,_0x575a92)=>{_0x3deaae(_0x575a92);});}['_setupEscapeAnnotationHandling'](){const _0xd7a5e5=_0x5e0aa1=>{const _0x5378b9=_0x5e0aa1['source'],_0x412c42=[];let _0x248172;if(Array['isArray'](_0x5378b9['target'])){_0x248172=_0x5378b9['target'][0x0],this['context']instanceof _0x2e529c?_0x412c42['push'](this['context']):this['context']['editors']&&_0x412c42['push'](...this['context']['editors']);for(const _0x14b5da of _0x412c42)for(const _0x14aac7 of _0x14b5da['editing']['view']['domRoots']['values']())if(_0x14aac7['contains'](_0x248172))return void _0x14b5da['editing']['view']['focus']();_0x248172['focus']();}};this['listenTo'](this['collection'],'add',(_0x549456,_0x2bee14)=>{this['listenTo'](_0x2bee14,'escape',_0xd7a5e5,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x507d57,_0x1b811a)=>{this['stopListening'](_0x1b811a,'escape',_0xd7a5e5);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x1f8e1d{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x1ef6fd,_0x2b1ff4];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb4a72c){super(_0xb4a72c),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xdf30fe=this['context']['config'];_0xdf30fe['define']('comments.maxCommentsWhenCollapsed',0x2),_0xdf30fe['define']('comments.maxThreadTotalWeight',0x1f4),_0xdf30fe['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xdf30fe['define']('comments.CommentThreadView',Bt),_0xdf30fe['define']('comments.CommentView',Ut),_0xdf30fe['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5e3048=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4b220a,_0x5b903f)=>this['_addCommentThread'](_0x5b903f)),this['on']('submitCommentThread',(_0x5069d2,_0x59818b)=>this['_submitCommentThread'](_0x59818b)),this['on']('resolveCommentThread',(_0x27a0e6,_0x8008e6)=>this['_resolveCommentThread'](_0x8008e6)),this['on']('resolveCommentThread',(_0x286ac7,_0x514aa9)=>this['_updateActiveAnnotation'](_0x514aa9),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xaf4c3c,_0x156341)=>this['_reopenCommentThread'](_0x156341)),this['on']('reopenCommentThread',(_0x445fe2,_0x5b66f7)=>this['_updateActiveAnnotation'](_0x5b66f7),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x354bd1,_0x3b338b)=>this['_removeCommentThread'](_0x3b338b)),this['on']('updateCommentThread',(_0x1b02d7,_0x1a6e04)=>this['_updateCommentThread'](_0x1a6e04)),this['on']('updateCommentThread',(_0xaa9cab,_0xe7a18)=>this['_updateActiveAnnotation'](_0xe7a18),{'priority':'lowest'}),this['on']('addComment',(_0x167da1,_0x3ea9e5)=>this['_addComment'](_0x3ea9e5)),this['on']('updateComment',(_0x2e9806,_0x3a73c4)=>this['_updateComment'](_0x3a73c4)),this['on']('removeComment',(_0x20db96,_0x4f8101)=>this['_removeComment'](_0x4f8101)),this['on']('addComment',(_0x200e79,{threadId:_0x462eab,isFromAdapter:_0x3d5c7f})=>{if(_0x3d5c7f)return;const _0x2c033e=this['getCommentThread'](_0x462eab),_0x1ff517=_0x2c033e&&this['_threadToController']['get'](_0x2c033e);_0x1ff517&&_0x1ff517['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5e3048,'change:activeAnnotations',(_0x4be0cb,_0x121ef7,_0x1ddb98)=>{const _0x572753=Array['from'](_0x1ddb98)['map'](_0x13a4d8=>this['_viewToController']['get'](_0x13a4d8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x572753?_0x572753['model']:null;});}set['adapter'](_0x1e4a6b){if(this['_adapter'])throw new _0x373a51('commentsrepository-adapter-already-set');this['_adapter']=_0x1e4a6b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x466b8e=zt,threadId:_0x1caed0=_0x2cee89(),comments:_0x5f202a=[],unlinkedAt:_0x179d30=null,resolvedAt:_0x89b778=null,resolvedBy:_0x26d45f=null,target:_0x2eec42=null,context:_0x468bf4=null,attributes:_0x1bfc7a={},isResolvable:_0x3d230b=!0x0,isSubmitted:_0x48706e=!0x1,isFromAdapter:_0x29a589=!0x1}={}){return this['fire'](ii('addCommentThread',_0x466b8e),{'channelId':_0x466b8e,'threadId':_0x1caed0,'comments':_0x5f202a,'unlinkedAt':_0x179d30,'resolvedAt':_0x89b778,'resolvedBy':_0x26d45f,'target':_0x2eec42,'context':_0x468bf4,'attributes':_0x1bfc7a,'isFromAdapter':_0x29a589,'isResolvable':_0x3d230b,'isSubmitted':_0x48706e}),this['getCommentThread'](_0x1caed0);}['openNewCommentThread']({channelId:_0x3519ef=zt,threadId:_0x348e32=_0x2cee89(),target:_0x224aa6,context:_0x253642=null,isResolvable:_0x2fce21=!0x0}){if(this['_readOnlyChannels']['has'](_0x3519ef)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x224aa6)throw new _0x373a51('commentsrepository-missing-target');const _0x513a6e=this['addCommentThread']({'channelId':_0x3519ef,'threadId':_0x348e32,'target':_0x224aa6,'context':_0x253642,'isResolvable':_0x2fce21});if(!_0x513a6e)return null;const _0x55bbdc=this['_threadToController']['get'](_0x513a6e),_0x25e5ec=_0x55bbdc['view']['commentThreadInputView']['commentInputView'],_0xc853e1=this['context']['plugins']['get']($t),_0x4ff2f4=_0xc853e1['getByInnerView'](_0x55bbdc['view']);return _0xc853e1['activate'](_0x4ff2f4),_0x25e5ec['once']('editorReady',()=>_0x25e5ec['focus']()),_0x513a6e;}['hasCommentThread'](_0x7b0b60){if('string'!=typeof _0x7b0b60)throw new _0x373a51('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x7b0b60);}['updateCommentThread']({channelId:_0x55b0fc=zt,threadId:_0x51a054,context:_0x3f02f9,unlinkedAt:_0x1f0141,attributes:_0x5f4744,isFromAdapter:_0x51240e=!0x1}){return this['fire'](ii('updateCommentThread',_0x55b0fc),{'channelId':_0x55b0fc,'threadId':_0x51a054,'context':_0x3f02f9,'unlinkedAt':_0x1f0141,'attributes':_0x5f4744,'isFromAdapter':_0x51240e}),this['getCommentThread'](_0x51a054);}['getCommentThread'](_0x522952){if('string'!=typeof _0x522952)throw new _0x373a51('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x522952);}['fetchCommentThread']({channelId:_0x38bf18,threadId:_0x40e167}={}){const _0x493249=this['getCommentThread'](_0x40e167);if(_0x493249)return Promise['resolve'](_0x493249);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x373a51('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x38bf18,'threadId':_0x40e167})['then'](_0x2af103=>this['hasCommentThread'](_0x40e167)?this['getCommentThread'](_0x40e167):_0x2af103?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x38bf18},_0x2af103)):void 0x0)['catch'](_0x4a8653=>{throw console['error'](_0x4a8653),new _0x373a51('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x27fef7,skipNotAttached:_0x5bc13a=!0x1,skipEmpty:_0x525fee=!0x1,toJSON:_0x5af0e7=!0x1}={}){const _0x5cc9c4=[];for(const _0x203efe of this['_threads']['values']())_0x27fef7&&_0x203efe['channelId']!==_0x27fef7||_0x5bc13a&&!_0x203efe['isAttached']||_0x525fee&&0x0===_0x203efe['length']||_0x5cc9c4['push'](_0x203efe);return _0x5af0e7?_0x5cc9c4['map'](_0x271669=>_0x271669['toJSON']()):_0x5cc9c4;}['getAnnotationForCommentThread'](_0x28a2ba){const _0x1c990d=this['_threadToController']['get'](_0x28a2ba);if(!_0x1c990d)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x1c990d['view'])||null;}['getCommentThreadForAnnotation'](_0x1a491c){const _0x5221d9=this['_viewToController']['get'](_0x1a491c['innerView']);return _0x5221d9?_0x5221d9['model']:null;}['setActiveCommentThread'](_0x359508){const _0x106a81=this['context']['plugins']['get']($t);if(!_0x359508)return void(this['activeCommentThread']&&_0x106a81['deactivateAll']());const _0x339b96=this['getCommentThread'](_0x359508);if(!_0x339b96)throw new _0x373a51('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x359508});if(!this['_threadToController']['has'](_0x339b96))throw new _0x373a51('commentsrepository-active-not-attached',null,{'threadId':_0x359508});const _0x38afb6=_0x106a81['getByInnerView'](this['_threadToController']['get'](_0x339b96)['view']);_0x106a81['activate'](_0x38afb6);}['switchReadOnly'](_0x2987ae,_0x579bcc){_0x2987ae?this['_readOnlyChannels']['add'](_0x579bcc):this['_readOnlyChannels']['delete'](_0x579bcc),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3503b6){return this['_readOnlyChannels']['has'](_0x3503b6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x20decf,_0x38484c){return new It(_0x20decf,_0x38484c);}['setPermissions'](_0x2220f6,_0x1868b5=zt){this['_permissions']['set'](_0x1868b5,_0x2220f6),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x23cebf=zt){return this['_permissions']['has'](_0x23cebf)?this['_permissions']['get'](_0x23cebf):Jt;}['_addCommentThread']({channelId:_0x27dd5c,threadId:_0x4eba0c,comments:_0x4af6a8,unlinkedAt:_0x35076c,resolvedAt:_0x501a41,resolvedBy:_0x1254d0,target:_0x1717d4,context:_0x597f1a,attributes:_0x9eac2e,isFromAdapter:_0x2d3daf,isResolvable:_0x16172b,isSubmitted:_0x1a85ea}){if('string'!=typeof _0x4eba0c)throw new _0x373a51('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4eba0c});if(this['hasCommentThread'](_0x4eba0c))throw new _0x373a51('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4eba0c});const _0x2dc05e=new Zt(this,{'channelId':_0x27dd5c,'id':_0x4eba0c,'context':_0x597f1a,'attributes':_0x9eac2e,'unlinkedAt':_0x35076c,'resolvedAt':_0x501a41,'resolvedBy':_0x1254d0?this['context']['plugins']['get'](_0x2b1ff4)['getUser'](_0x1254d0):null,'isResolvable':_0x16172b,'isSubmitted':_0x1a85ea||_0x2d3daf});this['_threads']['set'](_0x4eba0c,_0x2dc05e);for(const _0x567a71 of _0x4af6a8)_0x2dc05e['_add'](this['_createNewComment']({'threadId':_0x4eba0c,..._0x567a71}));return _0x1717d4&&_0x2dc05e['attachTo'](_0x1717d4),_0x2d3daf||!_0x2dc05e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x27dd5c,'threadId':_0x4eba0c});}['_submitCommentThread']({channelId:_0x33acbc,threadId:_0x4ff551}){if(!this['hasCommentThread'](_0x4ff551))throw new _0x373a51('commentsrepository-missing-comment-thread',this);const _0x2239f1=this['getCommentThread'](_0x4ff551);if(_0x2239f1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3520bc,comments:_0x4cf118,resolvedAt:_0x16be1a,resolvedBy:_0x1a4fff,context:_0x3d042b,attributes:_0xd6460a}=_0x2239f1,_0x26bb94=this['context']['plugins']['get']('PendingActions'),_0x4c6ce1=_0x26bb94['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x33acbc,'threadId':_0x3520bc,'comments':_0x4cf118['map'](_0x660d33=>_0x660d33['toJSON']()),'resolvedAt':_0x16be1a,'resolvedBy':_0x1a4fff?_0x1a4fff['id']:_0x1a4fff,'context':_0x3d042b,'attributes':_0xd6460a})['then'](({comments:_0x1f09ea})=>{_0x26bb94['remove'](_0x4c6ce1);for(const _0x1880f4 of _0x1f09ea)this['_updateComment']({'channelId':_0x33acbc,'threadId':_0x4ff551,'commentId':_0x1880f4['commentId'],'createdAt':_0x1880f4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b60b9=>{throw console['error'](_0x3b60b9),new _0x373a51('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x357a8c,target:_0x1e2972}){const _0x1204c1=this['getCommentThread'](_0x357a8c);if(!_0x1204c1)throw new _0x373a51('commentsrepository-attach-missing-comment-thread',this);const _0x34a537=this['context']['plugins']['get']('PendingActions'),_0x15069c=this['context']['plugins']['get']($t),_0x27ee11=this['_createCommentThreadView'](_0x1204c1),_0x59e114=new It(_0x1204c1,_0x27ee11);let _0x2c5d47=null;_0x27ee11['on']('change:isDirty',(_0x56cd63,_0x4db84a,_0x26af4a)=>{_0x26af4a?_0x2c5d47=_0x34a537['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2c5d47&&(_0x34a537['remove'](_0x2c5d47),_0x2c5d47=null);}),this['_threadToController']['set'](_0x1204c1,_0x59e114),this['_viewToController']['set'](_0x27ee11,_0x59e114);const _0x1ce033=new Kt(this['context']['locale'],_0x27ee11);_0x1ce033['bind']('length')['to'](_0x27ee11),_0x1ce033['bind']('isDirty')['to'](_0x27ee11,'isDirty',_0x27ee11,'length',(_0x8a53b6,_0xea9f5)=>_0x8a53b6||!_0xea9f5),_0x1ce033['bind']('isActive')['to'](_0x27ee11),_0x1ce033['type']='comment';const _0x231a3c=new Yt({'view':_0x1ce033,'target':_0x1e2972,'type':'comment','isVisible':!_0x1204c1['archivedAt']&&!!('function'==typeof _0x1e2972?_0x1e2972():_0x1e2972)});return _0x27ee11['on']('escape',()=>{_0x231a3c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x27ee11,_0x231a3c),_0x15069c['add'](_0x231a3c),_0x231a3c;}['_bindAnnotationToEditors'](_0x712cbe,_0x408062){this['listenTo'](_0x712cbe,'editorReady',(_0x18e82c,_0x40d931)=>{const _0x43d63a=_0x40d931['ui']['view']['body']['bodyCollectionContainer'];_0x408062['focusableElements']['add'](_0x43d63a),this['context']instanceof _0x2e529c&&this['context']['ui']['focusTracker']['add'](_0x43d63a);},{'priority':'highest'}),this['listenTo'](_0x712cbe,'editorDestroyed',(_0x225bf0,_0x5e2cf1)=>{const _0x39a290=_0x5e2cf1['ui']['view']['body']['bodyCollectionContainer'];_0x408062['focusableElements']['has'](_0x39a290)&&_0x408062['focusableElements']['remove'](_0x39a290),this['context']instanceof _0x2e529c&&this['context']['ui']['focusTracker']['remove'](_0x39a290);});}['_unbindEditors'](_0x589549){this['stopListening'](_0x589549,'editorReady'),this['stopListening'](_0x589549,'editorDestroyed');}['_createCommentThreadView'](_0x6204cb){const _0x36c64a=this['context']['plugins']['get'](_0x2b1ff4),{config:_0x5820d0,locale:_0x2a07fd}=this['context'],_0x10b22d=_0x383774(_0x5820d0['get']('locale'),_0x2a07fd);return new(0x0,(_0x5820d0['get']('comments'))['CommentThreadView'])(_0x2a07fd,_0x6204cb,_0x36c64a['me'],{'editorConfig':{..._0x5820d0['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5820d0['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5820d0['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5820d0['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5820d0['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x10b22d,'CommentView':_0x5820d0['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3b264a,channelId:_0x44095c,resolvedAt:_0xdbee8a,resolvedBy:_0x801b8a,isFromAdapter:_0x13e423}){if(!this['hasCommentThread'](_0x3b264a))throw new _0x373a51('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b264a});const _0x4cc38a=this['getCommentThread'](_0x3b264a);if(_0x4cc38a['isResolved'])throw new _0x373a51('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3b264a});const _0x2ee668=this['context']['plugins']['get'](_0x2b1ff4);if(_0x4cc38a['resolvedBy']=_0x2ee668['getUser'](_0x801b8a),_0x4cc38a['resolvedAt']=_0xdbee8a,_0x13e423||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2462b4=this['context']['plugins']['get']('PendingActions'),_0xa715ce=_0x2462b4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x44095c,'threadId':_0x3b264a})['then'](({resolvedAt:_0x23fb58,resolvedBy:_0x5da3a4})=>{_0x2462b4['remove'](_0xa715ce),_0x4cc38a['resolvedBy']['id']!==_0x5da3a4&&(_0x4cc38a['resolvedBy']=_0x2ee668['getUser'](_0x5da3a4)),_0x4cc38a['resolvedAt']=_0x23fb58;})['catch'](_0x3f3c6a=>{throw console['error'](_0x3f3c6a),new _0x373a51('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x544d17,channelId:_0x3ac0d6,isFromAdapter:_0x213f72}){if(!this['hasCommentThread'](_0x544d17))throw new _0x373a51('commentsrepository-missing-comment-thread',null,{'threadId':_0x544d17});const _0x1189b4=this['getCommentThread'](_0x544d17);if(!_0x1189b4['isResolved'])throw new _0x373a51('commentsrepository-reopen-comment-thread',null,{'threadId':_0x544d17});if(_0x1189b4['resolvedBy']=null,_0x1189b4['resolvedAt']=null,_0x213f72||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3b30cb=this['context']['plugins']['get']('PendingActions'),_0x2d36dd=_0x3b30cb['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3ac0d6,'threadId':_0x544d17})['then'](()=>_0x3b30cb['remove'](_0x2d36dd))['catch'](_0x3c3646=>{throw console['error'](_0x3c3646),new _0x373a51('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x81a88e,isFromAdapter:_0x508e73}){const _0x5e2a37=this['getCommentThread'](_0x81a88e);if(!_0x5e2a37)throw new _0x373a51('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x81a88e),this['_threads']['delete'](_0x81a88e),!_0x5e2a37['isSubmitted']||_0x508e73||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x303aa4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c8c3f}=_0x5e2a37,_0x487f71=_0x303aa4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1c8c3f,'threadId':_0x81a88e})['then'](()=>_0x303aa4['remove'](_0x487f71))['catch'](_0x45dd74=>{throw console['error'](_0x45dd74),new _0x373a51('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3bd71e,unlinkedAt:_0x172d61,context:_0x5b4f11,attributes:_0x5b4b99,isFromAdapter:_0x3af3a4}){if('string'!=typeof _0x3bd71e)throw new _0x373a51('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3bd71e});if(!this['hasCommentThread'](_0x3bd71e))throw new _0x373a51('commentsrepository-missing-comment-thread',null,{'threadId':_0x3bd71e});const _0x4c1d8d=this['getCommentThread'](_0x3bd71e);let _0x60473=!0x1;if(void 0x0!==_0x5b4f11&&_0x4c1d8d['context']!==_0x5b4f11&&(_0x4c1d8d['context']=_0x5b4f11,_0x60473=!0x0),void 0x0!==_0x172d61&&_0x4c1d8d['unlinkedAt']!==_0x172d61&&(_0x4c1d8d['unlinkedAt']=_0x172d61,_0x60473=!0x0),_0x5b4b99&&!_0x1b228f(_0x5b4b99,_0x4c1d8d['attributes'])&&(_0x4c1d8d['attributes']=_0x5b4b99,_0x60473=!0x0),!_0x60473)return Promise['resolve']();if(!_0x4c1d8d['isSubmitted']||_0x3af3a4||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2d0f4d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2cc408}=_0x4c1d8d,_0x4c852f=_0x2d0f4d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2cc408,'threadId':_0x3bd71e,'context':_0x5b4f11,'unlinkedAt':_0x172d61,'attributes':_0x5b4b99})['then'](()=>_0x2d0f4d['remove'](_0x4c852f))['catch'](_0xb2c5e9=>{throw console['error'](_0xb2c5e9),new _0x373a51('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3cd910){const _0x398b58=this['context']['plugins']['get']($t),_0x15a721=this['getCommentThread'](_0x3cd910);if(_0x15a721['_isAttached']=!0x1,this['_threadToController']['has'](_0x15a721)){const _0x223dc6=this['_threadToController']['get'](_0x15a721),_0x16db65=_0x223dc6['view'],_0x5ac2ab=_0x398b58['getByInnerView'](_0x16db65);this['_threadToController']['delete'](_0x15a721),this['_viewToController']['delete'](_0x16db65),_0x5ac2ab&&_0x398b58['remove'](_0x5ac2ab),_0x223dc6['destroy'](),_0x16db65['destroy']()['then'](()=>{this['_unbindEditors'](_0x16db65);});}}['_updateActiveAnnotation']({threadId:_0x20a2ec,resolvedAt:_0xd960fa,unlinkedAt:_0x1b0b77}){const _0x482945=!!_0xd960fa,_0x213771=this['context']['plugins']['get']($t),_0x585f04=this['getCommentThread'](_0x20a2ec);if(this['_threadToController']['has'](_0x585f04)){const _0x39cad4=this['_threadToController']['get'](_0x585f04)['view'],_0x34df4f=_0x213771['getByInnerView'](_0x39cad4);_0x34df4f&&(_0x482945&&_0x213771['_removeActiveAnnotation'](_0x34df4f),_0x1b0b77?_0x34df4f['isVisible']=!0x1:_0x34df4f['refreshVisibility']());}}['_getExternalAuthor'](_0xd0fbb1){const _0x54cac8=this['context']['plugins']['get'](_0x2b1ff4),_0x375b46=_0x179180('external:'+_0xd0fbb1),_0x4adb95=_0x54cac8['getUser'](_0x375b46);return _0x4adb95||_0x54cac8['addUser']({'id':_0x375b46,'name':_0xd0fbb1});}['_createNewComment']({threadId:_0x80aa3f,commentId:_0x5b73ba=_0x2cee89(),content:_0x3f371e,authorId:_0x5a92ec,createdAt:_0x11c812,attributes:_0x369a2f}){if('string'!=typeof _0x5b73ba)throw new _0x373a51('commentsrepository-invalid-commentid');if('string'!=typeof _0x5a92ec)throw new _0x373a51('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3f371e||!_0x3f371e['trim']())throw new _0x373a51('commentsrepository-invalid-comment-content');const _0x20f6bb=this['context']['plugins']['get'](_0x2b1ff4)['getUser'](_0x5a92ec);if(!_0x20f6bb)throw new _0x373a51('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5a92ec});let _0x4dfd97=null,_0x8ce025=_0x11c812;return _0x369a2f?.['@external']&&(_0x4dfd97=this['_getExternalAuthor'](_0x369a2f['@external']['authorName']),_0x8ce025=new Date(_0x369a2f['@external']['createdAt'])),new ti(this,{'threadId':_0x80aa3f,'id':_0x5b73ba,'author':_0x4dfd97||_0x20f6bb,'creator':_0x20f6bb,'content':_0x3f371e,'createdAt':_0x11c812,'authoredAt':_0x8ce025,'attributes':_0x369a2f});}['_addComment'](_0x4bf5d1){let {threadId:_0x3650e6,content:_0x4aa595,attributes:_0x59398a,isFromAdapter:_0x2af233}=_0x4bf5d1;const _0x45b1b0=this['getCommentThread'](_0x4bf5d1['threadId']);if(!_0x45b1b0)throw new _0x373a51('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1b7cf9=this['_createNewComment'](_0x4bf5d1),{id:_0x1fed3b}=_0x1b7cf9;if(_0x45b1b0['_add'](_0x1b7cf9),_0x2af233||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x45b1b0['isSubmitted'])return Promise['resolve']();const _0x361d24=this['context']['plugins']['get']('PendingActions'),{channelId:_0x37bbc5}=_0x45b1b0,_0x17436c=_0x361d24['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x59398a||(_0x59398a={}),this['adapter']['addComment']({'channelId':_0x37bbc5,'threadId':_0x3650e6,'commentId':_0x1fed3b,'content':_0x4aa595,'attributes':_0x59398a})['then'](_0x39e145=>{_0x361d24['remove'](_0x17436c),_0x39e145&&this['_updateComment']({'channelId':_0x37bbc5,'threadId':_0x3650e6,'commentId':_0x1fed3b,'createdAt':_0x39e145['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x672743=>{throw console['error'](_0x672743),new _0x373a51('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x15a9fb,commentId:_0x59168d,content:_0x11c56e,createdAt:_0x2e6d31,attributes:_0x2c454f,isFromAdapter:_0x485473}){if(void 0x0!==_0x11c56e&&('string'!=typeof _0x11c56e||!_0x11c56e['trim']()['length']))throw new _0x373a51('commentsrepository-update-comment-invalid-content');const _0x2111da=this['getCommentThread'](_0x15a9fb),_0x33377b=_0x2111da['getComment'](_0x59168d);if(!_0x33377b)throw new _0x373a51('commentsrepository-update-missing-comment',this);let _0x3f570e=!0x1;if(_0x11c56e&&_0x11c56e!==_0x33377b['content']&&(_0x33377b['isEditable']||_0x485473)&&(_0x33377b['content']=_0x11c56e,_0x3f570e=!0x0),_0x2e6d31&&_0x2e6d31!==_0x33377b['createdAt']&&(_0x33377b['createdAt']=_0x2e6d31,_0x33377b['attributes']&&_0x33377b['attributes']['@external']||(_0x33377b['authoredAt']=_0x2e6d31),_0x3f570e=!0x0),_0x2c454f&&!_0x1b228f(_0x2c454f,_0x33377b['attributes'])&&(_0x33377b['attributes']=_0x2c454f,_0x3f570e=!0x0),!_0x3f570e)return Promise['resolve']();if(_0x2111da['fire']('commentUpdated'),_0x485473||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xda61d=this['context']['plugins']['get']('PendingActions'),{channelId:_0xae0ff6}=this['getCommentThread'](_0x33377b['threadId']),_0x2f5cc4=_0xda61d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xae0ff6,'threadId':_0x15a9fb,'commentId':_0x59168d,'content':_0x11c56e,'attributes':_0x2c454f})['then'](()=>_0xda61d['remove'](_0x2f5cc4))['catch'](_0x2fdb1a=>{throw console['error'](_0x2fdb1a),new _0x373a51('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4d268e,commentId:_0x23c0ae,isFromAdapter:_0x181a1b}){const _0x541597=this['getCommentThread'](_0x4d268e),_0x24836b=_0x541597['getComment'](_0x23c0ae);if(!_0x24836b)throw new _0x373a51('commentsrepository-remove-missing-comment',this);if(_0x541597['_remove'](_0x24836b),_0x181a1b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5dfe24=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49b744}=_0x541597,_0x546e5c=_0x5dfe24['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x49b744,'threadId':_0x4d268e,'commentId':_0x23c0ae})['then'](()=>_0x5dfe24['remove'](_0x546e5c))['catch'](_0x28597a=>{throw console['error'](_0x28597a),new _0x373a51('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x11fd6d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x9b9cd6,_0x538de0){super();const _0x444333=_0x9b9cd6['context']['plugins']['get'](_0x2b1ff4)['me'],_0x51c005=_0x9b9cd6['getCommentThread'](_0x538de0['threadId']),_0x51a1f7=0x0===_0x51c005['comments']['length'],_0x3a92e5=_0x444333===_0x538de0['author'];this['id']=_0x538de0['id'],this['threadId']=_0x538de0['threadId'],this['author']=_0x538de0['author'],this['creator']=_0x538de0['creator'],this['isExternal']=Boolean(_0x538de0['attributes']&&_0x538de0['attributes']['@external']),this['set']('content',_0x538de0['content']),this['createdAt']=_0x538de0['createdAt']||new Date(),this['set']('authoredAt',_0x538de0['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x51c005,'resolvedAt'),this['set']('attributes',_0x538de0['attributes']||{}),this['bind']('isEditable')['to'](_0x9b9cd6,'_permissions',()=>{const _0x37e057=_0x9b9cd6['getPermissions'](_0x51c005['channelId'])['write'],_0x293fae=_0x9b9cd6['getPermissions'](_0x51c005['channelId'])['modifyAll'];return _0x3a92e5&&_0x37e057||!_0x3a92e5&&_0x293fae;}),this['bind']('isRemovable')['to'](_0x51c005,'isRemovable',_0x9b9cd6,'_permissions',_0x33b3dc=>{const _0x205d3a=_0x9b9cd6['getPermissions'](_0x51c005['channelId'])['write'],_0x4abb74=_0x9b9cd6['getPermissions'](_0x51c005['channelId'])['modifyAll'];return _0x3a92e5&&_0x205d3a||_0x33b3dc&&_0x51a1f7||!_0x3a92e5&&_0x4abb74&&!_0x51a1f7;}),this['bind']('isReadOnly')['to'](_0x51c005,'isReadOnly'),this['_repository']=_0x9b9cd6;}get['weight'](){return Math['max'](function(_0x384437){const _0x53cf57=document['createElement']('div');return _0x53cf57['innerHTML']=_0x384437,_0x53cf57['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2773dd){const {threadId:_0x3ba002,id:_0x892fd9}=this;if(!this['_repository']['hasCommentThread'](_0x3ba002))throw new _0x373a51('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4a81b1}=this['_repository']['getCommentThread'](_0x3ba002);this['_repository']['fire'](ii('updateComment',_0x4a81b1,_0x3ba002),{'channelId':_0x4a81b1,'threadId':_0x3ba002,'commentId':_0x892fd9,..._0x2773dd});}['setAttribute'](_0x6255f9,_0x4cd900){const _0x478ebd=_0x208ef5(this['attributes']);_0x5d0c23(_0x478ebd,_0x6255f9,_0x4cd900),this['update']({'attributes':_0x478ebd});}['removeAttribute'](_0x24f7c2){const _0x389372=_0x208ef5(this['attributes']);_0x5a6e11(_0x389372,_0x24f7c2),this['update']({'attributes':_0x389372});}['remove'](_0x49ddfa={}){if(!_0x49ddfa['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x59154e,id:_0x48f374}=this;if(!this['_repository']['hasCommentThread'](_0x59154e))throw new _0x373a51('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4cce4f}=this['_repository']['getCommentThread'](_0x59154e);this['_repository']['fire'](ii('removeComment',_0x4cce4f,_0x59154e),{'channelId':_0x4cce4f,'threadId':_0x59154e,'commentId':_0x48f374,..._0x49ddfa});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x5dd11b,..._0x253c87){for(const _0x18ed20 of _0x253c87)void 0x0!==_0x18ed20&&(_0x5dd11b+=':'+String(_0x18ed20));return _0x5dd11b;}class ei extends _0x51aa9f{constructor(_0x49b648){super(_0x49b648),this['set']('hasContent',!0x1);}['refresh'](){const _0x285476=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x162949 of _0x285476['getRanges']())if(this['_hasContent'](_0x162949))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4e6721=_0x2cee89(),ranges:_0x9c7050,comment:_0x57d9f6}={}){const _0x12c98c=this['editor']['model'],_0x1fad1d=_0x9c7050??Array['from'](_0x12c98c['document']['selection']['getRanges']()),_0x3668fb=[];for(const _0x49fc13 of _0x1fad1d)this['_hasContent'](_0x49fc13)&&_0x3668fb['push'](this['_trimToContent'](_0x49fc13));if(!_0x3668fb['length'])throw new _0x373a51('addcommentthreadcommand-incorrect-ranges',null);_0x57d9f6&&this['_createCommentThread'](_0x4e6721,_0x57d9f6),this['_createMarkersFromRanges'](_0x4e6721,_0x3668fb,!!_0x57d9f6);}['_createMarkersFromRanges'](_0x555eb8,_0x3cd093,_0x3e54a7){this['editor']['model']['change'](_0xd7f54f=>{for(const _0x4f5c60 of _0x3cd093){const _0xb68592=_0x2cee89()['substr'](0x1,0x5),_0x431cc3='comment:'+_0x555eb8+':'+_0xb68592;_0xd7f54f['addMarker'](_0x431cc3,{'range':_0x4f5c60,'usingOperation':_0x3e54a7,'affectsData':_0x3e54a7});}});}['_createCommentThread'](_0x29f451,_0x26ce5a){const _0x4b5980=this['editor']['plugins']['get']('CommentsRepository'),_0x47906=this['editor']['config']['get']('collaboration.channelId'),_0x1a739e=this['editor']['plugins']['get']('Users')['me'];if(!_0x1a739e)throw new _0x373a51('addcommentthreadcommand-user-not-found',null);_0x4b5980['addCommentThread']({'threadId':_0x29f451,'channelId':_0x47906,'comments':[{'authorId':_0x1a739e['id'],'content':_0x26ce5a,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3e4e7){for(const _0x2e02cc of _0x3e4e7['getItems']())if(this['_itemIsContent'](_0x2e02cc))return!0x0;return!0x1;}['_itemIsContent'](_0x2f14c2){return _0x2f14c2['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2f14c2)&&!_0x2f14c2['is']('element','tableCell');}['_trimToContent'](_0x1577cf){const _0x4b7205=_0x239f16=>!this['_itemIsContent'](_0x239f16['item']),_0x34139f=_0x1577cf['start']['getLastMatchingPosition'](_0x4b7205),_0x53f427=_0x1577cf['end']['getLastMatchingPosition'](_0x4b7205,{'direction':'backward'});return this['editor']['model']['createRange'](_0x34139f,_0x53f427);}}class si extends _0x4d9904{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52fb1d){super(_0x52fb1d),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x357b84=this['editor'],_0x499a99=_0x357b84['model']['document']['selection'],_0x4c9ff7=_0x3f4835(()=>this['refreshSelectedViews'](),0xa);_0x499a99['on']('change:range',(_0x341a90,_0x3f5481)=>{_0x3f5481['directChange']&&(_0x4c9ff7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x357b84['editing']['view']['document'],'change:isFocused',(_0x3d5706,_0x469969,_0x57dcee)=>{_0x57dcee&&_0x4c9ff7();}),this['listenTo'](_0x357b84['ui']['focusTracker'],'change:isFocused',(_0x145e42,_0x1fa5f1,_0x3415a8)=>{_0x3415a8||this['fire']('blur',{'isAnnotationTracked':_0x4af4da=>this['_editorAnnotationsData']['has'](_0x4af4da['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x263a0f){if(this['_editorAnnotations']['has'](_0x263a0f['view']))return;this['_editorAnnotations']['add'](_0x263a0f['view']),this['editor']['ui']['focusTracker']['add'](_0x263a0f['view']['element']);const _0x43f530=this['editor']['plugins']['get']($t);this['listenTo'](_0x43f530['collection'],'remove',(_0x3ab254,_0x51b3b9)=>{this['editor']['ui']['focusTracker']['remove'](_0x51b3b9['view']['element']),this['_editorAnnotations']['delete'](_0x51b3b9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2da67e){if('function'!=typeof _0x2da67e)throw new _0x373a51('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2da67e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x21cae7,annotations:_0x19a44f}){const _0x131714=[],_0x508662=this['editor']['model']['document']['selection'],_0x4fc03c=Array['from'](_0x508662['getRanges']());for(const [_0x2f394c,_0x5c0607]of this['_editorAnnotationsData']){const _0x94e14a=_0x51a984(_0x5c0607),_0x3416da=_0x19a44f['getByInnerView'](_0x2f394c);_0x94e14a&&_0x3416da&&_0x131714['push']({'annotation':_0x3416da,'range':_0x94e14a});}function _0x51a984(_0xef890a){for(const _0x3f1dbf of _0xef890a)for(const _0xb68029 of _0x4fc03c)if(_0x3f1dbf['containsRange'](_0xb68029,!_0x508662['isCollapsed']))return _0x3f1dbf;return null;}return _0x131714['sort']((_0x4fcedb,_0xce8ece)=>{const _0x460ddc=_0x4fcedb['range'],_0x17d0d8=_0xce8ece['range'];if(!_0x460ddc['isEqual'](_0x17d0d8)){if(_0x460ddc['containsRange'](_0x17d0d8,!0x0))return 0x1;if(_0x17d0d8['containsRange'](_0x460ddc,!0x0))return-0x1;}return _0x4fcedb['annotation']==_0x21cae7?-0x1:_0xce8ece['annotation']==_0x21cae7?0x1:0x0;})['map'](_0x10af85=>_0x10af85['annotation']);}get['_editorAnnotationsData'](){const _0x1e2429=new Map();for(const _0x46f4cd of Array['from'](this['_dataCollectors']))for(const [_0x42194a,_0x1df13b]of _0x46f4cd())_0x1e2429['set'](_0x42194a,_0x1df13b);return _0x1e2429;}}class ni extends _0x4d9904{['afterInit'](){const _0x569635=this['editor'];if(!_0x569635['plugins']['has']('RestrictedEditingModeEditing'))return;_0x569635['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x4d9904{constructor(_0x2d151d){super(_0x2d151d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x26e476=this['editor'],_0x13392e=_0x26e476['commands']['get']('importWord'),_0x3892ba=_0x26e476['plugins']['get'](_0x2b1ff4);_0x13392e&&(_0x13392e['on']('execute',(_0x312102,[,_0x16815b])=>{_0x16815b['collaboration_features']={'comments':!0x0,'user_id':_0x3892ba['me']['id']};},{'priority':_0x321c4c['high']+0xa}),this['listenTo'](_0x13392e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1452fe,_0x2e46a2){const {comment_threads:_0x384b73}=_0x2e46a2;_0x384b73&&_0x384b73['forEach'](({thread_id:_0x1b0e03,comments:_0x1dd6c2,is_resolved:_0x5866bc})=>{const _0x211a39=new Date(),_0x1be225=_0x1dd6c2['map'](({author:_0x1655b9,content:_0x109904,created_at:_0x2baf1})=>({'content':_0x109904,'authorId':this['editor']['plugins']['get'](_0x2b1ff4)['me']['id'],'createdAt':_0x211a39,'attributes':{'@external':{'authorName':_0x1655b9,'createdAt':_0x2baf1?new Date(_0x2baf1):new Date(),'source':'importWord'}}})),_0x5d13d3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x5d13d3,'threadId':_0x1b0e03,'comments':_0x1be225,'resolvedAt':_0x5866bc?_0x211a39:null});});}}class ri extends _0x4d9904{constructor(_0x3dfca2){super(_0x3dfca2),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x20dbde=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x20dbde,'contentInsertion',(_0x1b191d,_0x1e6e65)=>this['_removeMarkersWithoutThreads'](_0x1e6e65['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x19db5d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x19db5d;const _0x4155ba=this['editor']['plugins']['get']('CommentsRepository');for(const _0x160449 of _0x19db5d['keys']()){const [_0x501ecb,_0x4828cb]=_0x160449['split'](':');'comment'!=_0x501ecb||_0x4155ba['hasCommentThread'](_0x4828cb)||_0x19db5d['delete'](_0x160449);}return _0x19db5d;}['_registerMarkerInClipboardPipeline'](){const _0x531b49=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1e277a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1e277a&&_0x531b49['_registerMarkerToCopy']('comment',_0x1e277a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1a4ae0){switch(_0x1a4ae0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x4bad48){const _0x1ad09e=_0x4bad48['split'](':');return{'group':_0x1ad09e[0x0],'id':_0x1ad09e[0x1],'part':_0x1ad09e[0x2]};}class ai extends _0x4d9904{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56b136,_0x5115c1)=>{if(!_0x5115c1['options']['showCommentHighlights'])return null;if(_0x5115c1['options']['ignoreResolvedComments']){const {id:_0x3aad24}=hi(_0x56b136['markerName']),_0x471b7e=this['editor']['plugins']['get'](Qt);if(_0x471b7e['getCommentThread'](_0x3aad24)?.['isResolved']&&_0x56b136['item'])return _0x5115c1['consumable']['consume'](_0x56b136['item'],'addMarker:'+_0x56b136['markerName']),_0x5115c1['consumable']['consume'](_0x56b136['item'],'removeMarker:'+_0x56b136['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1b820b=>{_0x1b820b['on']('addMarker:comment',(_0x5ae860,_0x584107,_0x40bedf)=>{if(!_0x40bedf['options']['showCommentHighlights'])return;const _0xcc4c40=_0x584107['item'];if(!_0xcc4c40)return;const _0x445706=_0x40bedf['mapper']['toViewElement'](_0xcc4c40);this['editor']['model']['schema']['isObject'](_0xcc4c40)&&_0x445706&&!_0x445706['getCustomProperty']('widget')&&_0x445706['is']('containerElement')&&Ct(_0x445706,_0x40bedf['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2bd4f3,{writer:_0x4c0ab7,options:_0x4465c1})=>{if(!_0x4465c1['showCommentHighlights'])return null;const _0x51a93d=_0x4c0ab7['createContainerElement']('div'),_0x4e03ec=_0x4c0ab7['createEmptyElement']('hr');return _0x4c0ab7['addClass']('ck-horizontal-line',_0x51a93d),_0x4c0ab7['insert'](_0x4c0ab7['createPositionAt'](_0x51a93d,0x0),_0x4e03ec),_0x51a93d;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4d475b,{writer:_0x32fd3d,options:_0x6ac1e2})=>{if(!_0x6ac1e2['showCommentHighlights'])return null;const _0x5bba69=_0x32fd3d['createContainerElement']('span'),_0x4b6579=_0x32fd3d['createEmptyElement']('img');return _0x32fd3d['addClass']('image-inline',_0x5bba69),_0x32fd3d['insert'](_0x32fd3d['createPositionAt'](_0x5bba69,0x0),_0x4b6579),_0x5bba69;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x36626d,{writer:_0x5c21c2,options:_0x39c5d2})=>{if(_0x39c5d2['showCommentHighlights'])return _0x5c21c2['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x495886,_0x588853,_0x58c73e)=>{_0x58c73e['options']['showCommentHighlights']&&_0x495886['stop']();},{'priority':'high'});}}class ci extends _0x4d9904{static get['requires'](){return[Qt,si,_0x2b1ff4,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28eb3c){super(_0x28eb3c),this['set']('isThreadsLoadingPaused',!0x0),_0x28eb3c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x501fc3,_0x2eaea5,_0x2eba8b,_0xce1534)=>{const _0x29dc6d=_0x28eb3c['plugins']['get'](Qt),_0x13a004=_0x2eba8b?hi(_0x2eba8b)['id']:null;_0x28eb3c['model']['change'](()=>{if(_0x13a004){const _0x76e536=this['getAllMarkersForId'](_0x13a004);for(const _0x10b795 of _0x76e536)_0x28eb3c['editing']['reconvertMarker'](_0x10b795);}if(_0xce1534){const {id:_0x532b4f}=hi(_0xce1534),_0x5709de=_0x29dc6d['getCommentThread'](_0x532b4f);if(_0x5709de&&_0x5709de['unlinkedAt'])return;if(_0x5709de&&!_0x5709de['isAttached'])return;const _0x3505d9=this['getAllMarkersForId'](_0x532b4f);for(const _0x39d023 of _0x3505d9)_0x28eb3c['editing']['reconvertMarker'](_0x39d023);}}),_0x13a004&&this['scrollToThreadMarker'](_0x13a004);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x444207=this['editor'],_0x478673=_0x444207['plugins']['get'](Qt),_0x4442b0=_0x444207['config']['get']('collaboration.channelId'),_0x139f71=_0x478673['getCommentThreads']()['filter'](_0x273976=>_0x273976['channelId']!==_0x4442b0);_0x444207['commands']['add']('addCommentThread',new ei(_0x444207)),this['listenTo'](_0x444207,'change:isReadOnly',(_0x2831bd,_0x5e98c9,_0x567625)=>{_0x478673['switchReadOnly'](_0x567625,_0x444207['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x478673,di('addCommentThread',_0x4442b0),(_0x42236f,{threadId:_0x90b523})=>{const _0x14a3ba=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x90b523);_0x14a3ba?.['unlinkedAt']&&this['_attachArchivedThread'](_0x90b523);}),this['listenTo'](_0x478673,di('removeCommentThread',_0x4442b0),(_0x472f56,{threadId:_0x3df81a})=>{_0x444207['model']['enqueueChange']({'isUndoable':!0x1},_0x21a3e9=>{const _0x1eeedc=this['getAllMarkersForId'](_0x3df81a);for(const _0x553849 of _0x1eeedc)_0x21a3e9['removeMarker'](_0x553849);});}),this['listenTo'](_0x478673,di('resolveCommentThread',_0x4442b0),(_0xcbee75,{threadId:_0x29ed65})=>{(this['_reconvertMarkers'](_0x29ed65),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x29ed65)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x478673,di('reopenCommentThread',_0x4442b0),(_0x55114a,{threadId:_0x8bb21b})=>{this['_reconvertMarkers'](_0x8bb21b);},{'priority':'low'}),this['listenTo'](_0x478673,di('addComment',_0x4442b0),(_0x45e4ca,{threadId:_0x51ee36,isFromAdapter:_0x3e65a9})=>{const _0x282685=this['getAllMarkersForId'](_0x51ee36);if(_0x3e65a9||0x0==_0x282685['length']||!_0x478673['hasCommentThread'](_0x51ee36))return;0x1===_0x478673['getCommentThread'](_0x51ee36)['length']&&_0x444207['model']['enqueueChange']({'isUndoable':!0x1},_0x2bafc1=>{for(const _0x103757 of _0x282685)_0x2bafc1['updateMarker'](_0x103757,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x139f71);}['afterInit'](){!async function(_0x3c2ede){const _0x56660d=_0x116d51([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x2e8d16=0x73460ab3,_0x22932f=0x73418f3b^_0x2e8d16,_0xdabf=window[_0x116d51([0x44,0x61,0x74,0x65])][_0x116d51([0x6e,0x6f,0x77])](),_0x5792bf=_0x3c2ede[_0x116d51([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x214633=new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e216a=>{_0x5792bf[_0x116d51([0x6f,0x6e,0x63,0x65])](_0x116d51([0x72,0x65,0x61,0x64,0x79]),_0x1e216a);}),_0x3934c3={[_0x116d51([0x6b,0x74,0x79])]:_0x116d51([0x45,0x43]),[_0x116d51([0x75,0x73,0x65])]:_0x116d51([0x73,0x69,0x67]),[_0x116d51([0x63,0x72,0x76])]:_0x116d51([0x50,0x2d,0x32,0x35,0x36]),[_0x116d51([0x78])]:_0x116d51([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x116d51([0x79])]:_0x116d51([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x116d51([0x61,0x6c,0x67])]:_0x116d51([0x45,0x53,0x32,0x35,0x36])},_0x137bbd=_0x5792bf[_0x116d51([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x116d51([0x67,0x65,0x74])](_0x116d51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x10d4f7(){let _0x5a2142,_0x21381e=null,_0x103d40=null;try{if(_0x137bbd==_0x116d51([0x47,0x50,0x4c]))return _0x116d51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5a2142=_0x446075(),!_0x5a2142)return _0x116d51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5a2142[_0x116d51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x103d40=_0x3b6f5c(_0x5a2142[_0x116d51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5a2142[_0x116d51([0x6a,0x74,0x69])])),await _0x4955da()?_0x2593c8()?_0x433cd0()?_0x116d51([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x457cab()?(_0x5a2142[_0x116d51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x116d51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21381e=_0x3a346a(_0x116d51([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4fa875()):_0x116d51([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x116d51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x116d51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x116d51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x433cd0(){const _0x4d0943=[_0x116d51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x116d51([0x74,0x72,0x69,0x61,0x6c])][_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a2142[_0x116d51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xdabf/0x3e8:0xe10*_0x22932f;return _0x5a2142[_0x116d51([0x65,0x78,0x70])]<_0x4d0943;}function _0x2593c8(){const _0x57702a=_0x5a2142[_0x116d51([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x57702a)return!0x1;if(_0x57702a[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x116d51([0x2a])))return!0x0;if(_0x57702a[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x116d51([0x43,0x4d,0x54])))return!0x0;if(_0x57702a[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x116d51([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x3b8992())return!0x0;if(_0x57702a[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x116d51([0x52,0x43,0x4d,0x54]))){if(_0x1d336a())return!0x0;if(_0x3e0e96()||_0x35bea7())return!0x0;}return!0x1;}function _0x457cab(){const _0x54d594=_0x5a2142[_0x116d51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x54d594||0x0==_0x54d594[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4abf55}=new URL(window[_0x116d51([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x54d594[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4abf55))return!0x0;const _0xe7fb83=_0x4abf55[_0x116d51([0x73,0x70,0x6c,0x69,0x74])](_0x116d51([0x2e]));return _0x54d594[_0x116d51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x137979=>_0x137979[_0x116d51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x116d51([0x2a])))[_0x116d51([0x6d,0x61,0x70])](_0x14d7a8=>_0x14d7a8[_0x116d51([0x73,0x70,0x6c,0x69,0x74])](_0x116d51([0x2e])))[_0x116d51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28ee4d=>_0x28ee4d[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe7fb83[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x116d51([0x6d,0x61,0x70])](_0x547786=>Array(_0xe7fb83[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x547786[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x116d51([0x66,0x69,0x6c,0x6c])](_0x547786[0x0]===_0x116d51([0x2a])?_0x116d51([0x2a]):'')[_0x116d51([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x547786))[_0x116d51([0x73,0x6f,0x6d,0x65])](_0x5a21d7=>_0xe7fb83[_0x116d51([0x65,0x76,0x65,0x72,0x79])]((_0x11fd0d,_0x3bb3d8)=>_0x5a21d7[_0x3bb3d8]===_0x11fd0d||_0x5a21d7[_0x3bb3d8]===_0x116d51([0x2a])));}function _0x4fa875(){return _0x21381e&&_0x103d40?new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x398bcc,_0x2778d7)=>{_0x21381e[_0x116d51([0x74,0x68,0x65,0x6e])](_0x398bcc,_0x2778d7),_0x103d40[_0x116d51([0x74,0x68,0x65,0x6e])](_0x5572ba=>{_0x5572ba!=_0x116d51([0x56,0x61,0x6c,0x69,0x64])&&_0x398bcc(_0x5572ba);},_0x2778d7);}):_0x21381e||_0x103d40||_0x116d51([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3b6f5c(_0x585f4c,_0x13a814){return new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35121d=>{if(_0x5a7691())return _0x35121d(_0x116d51([0x56,0x61,0x6c,0x69,0x64]));_0x42bc92(),_0x5792bf[_0x116d51([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x116d51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x50dbfd=!0x1;const _0x4277a6=_0x2cee89();function _0xdcd066(_0x3532e3){return!!_0x3532e3&&(typeof _0x3532e3===_0x116d51([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3532e3===_0x116d51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3532e3[_0x116d51([0x74,0x68,0x65,0x6e])]===_0x116d51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3532e3[_0x116d51([0x63,0x61,0x74,0x63,0x68])]===_0x116d51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x117c3b(_0x1d598e){_0x5b1b33(_0x1d598e)[_0x116d51([0x74,0x68,0x65,0x6e])](_0x24760e=>{if(!_0x24760e||_0x24760e[_0x116d51([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x116d51([0x6f,0x6b]))return _0x116d51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x190dd8(_0x3e7d58(_0x4277a6+_0x13a814))!=_0x24760e[_0x116d51([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x116d51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x116d51([0x56,0x61,0x6c,0x69,0x64]);})[_0x116d51([0x74,0x68,0x65,0x6e])](_0x45458a=>(_0x4b0dd1(),_0x45458a),()=>{const _0x210af3=_0x5aa274();return null==_0x210af3?(_0x4b0dd1(),_0x116d51([0x56,0x61,0x6c,0x69,0x64])):_0x116d51(_0xdabf-_0x210af3>(0x574a8eb3^_0x2e8d16)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x116d51([0x74,0x68,0x65,0x6e])](_0x35121d)[_0x116d51([0x63,0x61,0x74,0x63,0x68])](()=>{_0x35121d(_0x116d51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4563ec=0x7370e433^_0x2e8d16;function _0x4b0dd1(){const _0xd8b935=_0x116d51([0x6c,0x6c,0x63,0x74,0x2d])+_0x190dd8(_0x3e7d58(_0x585f4c)),_0x52deb4=_0x30dceb(_0x190dd8(window[_0x116d51([0x4d,0x61,0x74,0x68])][_0x116d51([0x63,0x65,0x69,0x6c])](_0xdabf/_0x4563ec)));window[_0x116d51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x116d51([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd8b935,_0x52deb4);}function _0x5aa274(){const _0x7f300a=_0x116d51([0x6c,0x6c,0x63,0x74,0x2d])+_0x190dd8(_0x3e7d58(_0x585f4c)),_0x53fb34=window[_0x116d51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x116d51([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7f300a);return _0x53fb34?window[_0x116d51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x30dceb(_0x53fb34),0x10)*_0x4563ec:null;}function _0x5b1b33(_0x33618f){return new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e273e,_0x43c5c2)=>{_0x33618f[_0x116d51([0x74,0x68,0x65,0x6e])](_0x3e273e,_0x43c5c2),window[_0x116d51([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x43c5c2,0x7347de73^_0x2e8d16);});}}_0x5792bf[_0x116d51([0x6f,0x6e])](_0x116d51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x99c55d,_0x4cb2a7)=>{if(_0x4cb2a7[0x0]!=_0x585f4c)return _0x35121d(_0x116d51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cb2a7[0x1]={..._0x4cb2a7[0x1],[_0x116d51([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4277a6};},{[_0x116d51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x116d51([0x68,0x69,0x67,0x68])}),_0x5792bf[_0x116d51([0x6f,0x6e])](_0x116d51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x372dc5=>{_0xdcd066(_0x372dc5[_0x116d51([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x50dbfd=!0x0,_0x117c3b(_0x372dc5[_0x116d51([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x116d51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x116d51([0x6c,0x6f,0x77])}),_0x214633[_0x116d51([0x74,0x68,0x65,0x6e])](()=>{_0x50dbfd||_0x35121d(_0x116d51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5a7691(){return _0x5792bf[_0x116d51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x116d51([0x76,0x69,0x65,0x77])][_0x116d51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x116d51([0x61,0x75,0x74,0x6f]);}function _0x42bc92(){_0x5792bf[_0x116d51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x116d51([0x76,0x69,0x65,0x77])][_0x116d51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x116d51([0x61,0x75,0x74,0x6f]);}}function _0x3a346a(_0x2d0eda){const _0xae59af=[new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32f84f=>setTimeout(_0x32f84f,0x734f347f^_0x2e8d16)),_0x214633[_0x116d51([0x74,0x68,0x65,0x6e])](()=>new window[(_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x593353=>{let _0x5206ae=0x0;_0x5792bf[_0x116d51([0x6d,0x6f,0x64,0x65,0x6c])][_0x116d51([0x6f,0x6e])](_0x116d51([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x35b35b,_0x3010c8)=>{_0x3010c8[0x0][_0x116d51([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5206ae++,_0x5206ae==(0x73460f5b^_0x2e8d16)&&(_0x593353(),_0x35b35b[_0x116d51([0x6f,0x66,0x66])]());});}))];return window[_0x116d51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x116d51([0x72,0x61,0x63,0x65])](_0xae59af)[_0x116d51([0x74,0x68,0x65,0x6e])](()=>_0x2d0eda);}async function _0x3af22f(){await _0x214633,_0x5792bf[_0x116d51([0x6d,0x6f,0x64,0x65,0x6c])][_0x116d51([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x232e5e,_0x5792bf[_0x116d51([0x6d,0x6f,0x64,0x65,0x6c])][_0x116d51([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x232e5e,_0x5792bf[_0x116d51([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x116d51([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3b8992(){return window[_0x116d51([0x67,0x6c,0x6f,0x62])]&&window[_0x116d51([0x67,0x6c,0x6f,0x62])][_0x116d51([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1d336a(){return _0x346946(_0x116d51([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x50a287(_0x116d51([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x116d51([0x73,0x74,0x61,0x74,0x65])]==_0x116d51([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3e0e96(){return _0x346946(_0x116d51([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x35bea7(){return _0x346946(_0x116d51([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x170313(_0x1dedcc){const _0xda3505=_0x945af9();_0x5792bf[_0xda3505]=_0x116d51([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1dedcc,_0x1dedcc!=_0x116d51([0x56,0x61,0x6c,0x69,0x64])&&_0x3af22f();}function _0x945af9(){const _0x213dd5=window[_0x116d51([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x116d51([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x116d51([0x6e,0x6f,0x77])]())[_0x116d51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x116d51([0x2e]),'');let _0x2ce9a8=_0x116d51([0x4b]);for(let _0xccd4b9=0x0;_0xccd4b9<_0x213dd5[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xccd4b9+=0x2){let _0x264bc4=window[_0x116d51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x213dd5[_0x116d51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xccd4b9,_0xccd4b9+0x2));_0x264bc4>=_0x56660d[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x264bc4-=_0x56660d[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ce9a8+=_0x56660d[_0x264bc4];}return _0x2ce9a8;}function _0x446075(){const _0x296135=_0x137bbd[_0x116d51([0x73,0x70,0x6c,0x69,0x74])](_0x116d51([0x2e]));if(0x3!=_0x296135[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x310d02(_0x296135[0x1]);function _0x310d02(_0xf247){const _0xf14c78=_0x2c993c(_0xf247);return _0xf14c78&&_0xbbfdfe()?_0xf14c78:null;function _0xbbfdfe(){const _0xbc45d5=_0xf14c78[_0x116d51([0x6a,0x74,0x69])],_0x4f6180=window[_0x116d51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xbc45d5[_0x116d51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbc45d5[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5c8e35={..._0xf14c78,[_0x116d51([0x6a,0x74,0x69])]:_0xbc45d5[_0x116d51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xbc45d5[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5c8e35[_0x116d51([0x76,0x63])],_0x3e7d58(_0x5c8e35)==_0x4f6180;}}}async function _0x4955da(){let _0x30dc52=!0x0;try{const _0x3613f5=_0x137bbd[_0x116d51([0x73,0x70,0x6c,0x69,0x74])](_0x116d51([0x2e])),[_0x744f76,_0x52d279,_0x56d199]=_0x3613f5;return _0x391942(_0x744f76),await _0x534083(_0x744f76,_0x52d279,_0x56d199),_0x30dc52;}catch{return!0x1;}function _0x391942(_0x42541c){const _0x17d89d=_0x2c993c(_0x42541c);_0x17d89d&&_0x17d89d[_0x116d51([0x61,0x6c,0x67])]==_0x116d51([0x45,0x53,0x32,0x35,0x36])||(_0x30dc52=!0x1);}async function _0x534083(_0x15dca1,_0x34b1cc,_0x18b92e){const _0x36e82e=window[_0x116d51([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x116d51([0x66,0x72,0x6f,0x6d])](_0x153b83(_0x18b92e),_0x5ebfa5=>_0x5ebfa5[_0x116d51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x19ea70=new window[(_0x116d51([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x116d51([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x15dca1+_0x116d51([0x2e])+_0x34b1cc),_0x3f3ff7=window[_0x116d51([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x116d51([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f3ff7)return;const _0x32eaa2=await _0x3f3ff7[_0x116d51([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x116d51([0x6a,0x77,0x6b]),_0x3934c3,{[_0x116d51([0x6e,0x61,0x6d,0x65])]:_0x116d51([0x45,0x43,0x44,0x53,0x41]),[_0x116d51([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x116d51([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x116d51([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f3ff7[_0x116d51([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x116d51([0x6e,0x61,0x6d,0x65])]:_0x116d51([0x45,0x43,0x44,0x53,0x41]),[_0x116d51([0x68,0x61,0x73,0x68])]:{[_0x116d51([0x6e,0x61,0x6d,0x65])]:_0x116d51([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32eaa2,_0x36e82e,_0x19ea70)||(_0x30dc52=!0x1);}}function _0x2c993c(_0x49ccb4){return _0x49ccb4[_0x116d51([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x116d51([0x65,0x79]))?JSON[_0x116d51([0x70,0x61,0x72,0x73,0x65])](_0x153b83(_0x49ccb4)):null;}function _0x153b83(_0x5787d4){return window[_0x116d51([0x61,0x74,0x6f,0x62])](_0x5787d4[_0x116d51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x116d51([0x2b]))[_0x116d51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x116d51([0x2f])));}function _0x3e7d58(_0x1b49b6){let _0x1fc9c5=0x1505;function _0x2790dc(_0x5ae7ae){for(let _0x12ac4e=0x0;_0x12ac4e<_0x5ae7ae[_0x116d51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x12ac4e++){const _0x86df9e=_0x5ae7ae[_0x116d51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x12ac4e);_0x1fc9c5=(_0x1fc9c5<<0x5)+_0x1fc9c5+_0x86df9e,_0x1fc9c5&=_0x1fc9c5;}}function _0x3d3084(_0x191845){Array[_0x116d51([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x191845)?_0x191845[_0x116d51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3d3084):_0x191845&&typeof _0x191845==_0x116d51([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x116d51([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x191845)[_0x116d51([0x73,0x6f,0x72,0x74])]()[_0x116d51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4ed1c1,_0x3217de])=>{_0x2790dc(_0x4ed1c1),_0x3d3084(_0x3217de);}):_0x2790dc(window[_0x116d51([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x191845));}return _0x3d3084(_0x1b49b6),_0x1fc9c5>>>0x0;}function _0x190dd8(_0x4eb1ed){return _0x4eb1ed[_0x116d51([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x116d51([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x116d51([0x30]));}function _0x30dceb(_0x370afe){return _0x370afe[_0x116d51([0x73,0x70,0x6c,0x69,0x74])]('')[_0x116d51([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x116d51([0x6a,0x6f,0x69,0x6e])]('');}function _0x346946(_0x44ecc4){return _0x5792bf[_0x116d51([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x116d51([0x68,0x61,0x73])](_0x44ecc4);}function _0x50a287(_0x3d4ea2){return _0x5792bf[_0x116d51([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x116d51([0x67,0x65,0x74])](_0x3d4ea2);}function _0x232e5e(){}function _0x116d51(_0x41fb0b){return _0x41fb0b['map'](_0x1f6e41=>String['fromCharCode'](_0x1f6e41))['join']('');}_0x170313(await _0x10d4f7());}(this);}['destroy'](){const _0x9bd8e8=this['editor']['plugins']['get'](Qt),_0x30435e=this['editor']['config']['get']('collaboration.channelId');for(const _0x1df848 of _0x9bd8e8['getCommentThreads']({'channelId':_0x30435e}))_0x9bd8e8['_detachCommentThread'](_0x1df848['id']),_0x9bd8e8['_threads']['delete'](_0x1df848['id']);super['destroy']();}['hasMarkerForId'](_0x5637e7){return this['getAllMarkersForId'](_0x5637e7)['length']>0x0;}['getAllMarkersForId'](_0x6363c2){const _0x3148d4=[];for(const _0xa4b0a of this['editor']['model']['markers'])_0xa4b0a['name']['startsWith']('comment:'+_0x6363c2)&&_0x3148d4['push'](_0xa4b0a);return _0x3148d4;}['scrollToThreadMarker'](_0x27a1df){setTimeout(()=>{const _0x6e04ef=this['_getTargetForId'](_0x27a1df);if(!_0x6e04ef)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x27a1df&&_0xb6cae({'target':_0x6e04ef[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x7cd7c1){this['editor']['model']['change'](()=>{for(const _0xc1ed1c of this['getAllMarkersForId'](_0x7cd7c1))this['editor']['editing']['reconvertMarker'](_0xc1ed1c);});}['_attachArchivedThread'](_0x27f856){const _0x4bdfb8=this['editor']['plugins']['get'](Qt),_0x1ff55f=this['editor']['plugins']['get'](si),_0x3a8f11=_0x4bdfb8['getCommentThread'](_0x27f856);if(!_0x3a8f11['isAttached']){const _0x383605=_0x3a8f11['attachTo'](()=>this['_getTargetForId'](_0x3a8f11['id']));_0x1ff55f['registerAnnotation'](_0x383605),_0x3a8f11['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1bf83c=this['editor'],_0xb5454c=_0x1bf83c['plugins']['get'](_0x2b1ff4);_0x1bf83c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4dd6d8,_0x5d2743)=>{const {id:_0x56ba8d}=hi(_0x4dd6d8['markerName']),_0x4ccc1e=_0x1bf83c['plugins']['get'](Qt)['getCommentThread'](_0x56ba8d),_0x41d422=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x56ba8d;let _0x4c61e8;if(_0x4ccc1e&&_0x4ccc1e['isResolved']&&!_0x41d422&&_0x4dd6d8['item'])return _0x5d2743['consumable']['consume'](_0x4dd6d8['item'],'addMarker:'+_0x4dd6d8['markerName']),_0x5d2743['consumable']['consume'](_0x4dd6d8['item'],'removeMarker:'+_0x4dd6d8['markerName']),null;const _0x3bf6a9=['ck-comment-marker'];return _0x41d422&&_0x3bf6a9['push']('ck-comment-marker--active'),_0x4c61e8=_0x4ccc1e?.['length']?_0x4ccc1e['comments']['first']['author']['id']:_0xb5454c['me']['id'],{'classes':_0x3bf6a9,'attributes':{'data-comment':_0x56ba8d,'data-author-id':_0x4c61e8}};}}),_0x1bf83c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x21a4d8,{options:_0x1fe17c})=>{if(_0x1fe17c['showCommentHighlights'])return null;const _0x258173=_0x1bf83c['plugins']['get'](Qt),_0x1b4d08=_0x1bf83c['model']['markers']['get'](_0x21a4d8),{id:_0x4b9d98,part:_0x2c767f}=hi(_0x21a4d8);return _0x1b4d08&&!_0x1b4d08['affectsData']||_0x1fe17c['ignoreResolvedComments']&&_0x258173['getCommentThread'](_0x4b9d98)?.['isResolved']?null:{'group':'comment','name':_0x2c767f?_0x4b9d98+':'+_0x2c767f:_0x4b9d98};}}),_0x1bf83c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x47dec6,{writer:_0x33e6dd})=>_0x33e6dd['createElement']('$marker',{'data-name':'comment:'+_0x47dec6['getAttribute']('id')})}),_0x1bf83c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5134b1=this['editor'],_0x44f1f3=_0x5134b1['plugins']['get'](Qt),_0x3f9858=new Set(),_0x2f58f0=new Set();_0x5134b1['model']['document']['registerPostFixer'](_0x832768=>{let _0x48bffd=!0x1;for(const {name:_0x43b795,data:_0x1a5d5f}of _0x5134b1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3487f2,id:_0x38411d}=hi(_0x43b795);let _0x1176ce=_0x1a5d5f['newRange'];if('comment'!==_0x3487f2||!_0x1176ce)continue;const _0x5d3dac='$graveyard'===_0x1176ce['root']['rootName'];_0x5d3dac||(_0x1176ce=li(_0x1176ce,_0x5134b1['model']),!_0x1176ce||_0x1176ce['isCollapsed']||!_0x1a5d5f['newRange']||_0x1176ce['isEqual'](_0x1a5d5f['newRange']))?_0x5134b1['model']['hasContent'](_0x1176ce)&&!_0x5d3dac?this['isThreadsLoadingPaused']?_0x3f9858['add'](_0x43b795):this['_handleThreadMarker'](_0x43b795,_0x38411d):(_0x2f58f0['add'](_0x43b795),_0x3f9858['delete'](_0x43b795),_0x832768['removeMarker'](_0x43b795),_0x48bffd=!0x0):(_0x832768['updateMarker'](_0x43b795,{'range':_0x1176ce}),_0x48bffd=!0x0);}return _0x48bffd;}),this['on']('change:isThreadsLoadingPaused',(_0x45b026,_0x52556f,_0x9e8532)=>{if(!_0x9e8532&&_0x3f9858['size'])for(const _0x5ce7af of _0x3f9858){const {id:_0x2b683b}=hi(_0x5ce7af);_0x3f9858['delete'](_0x5ce7af),_0x5134b1['model']['markers']['get'](_0x5ce7af)&&this['_handleThreadMarker'](_0x5ce7af,_0x2b683b);}}),this['listenTo'](_0x5134b1['model']['document'],'change',()=>{for(const {name:_0x552d69,data:{newRange:_0x2b6b14}}of _0x5134b1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1edd64,id:_0x54cbd7}=hi(_0x552d69);if('comment'!==_0x1edd64)continue;const _0x303eed=_0x44f1f3['getCommentThread'](_0x54cbd7),_0x3a8c44=this['hasMarkerForId'](_0x54cbd7);_0x303eed&&(!_0x303eed['_hasTargetInContent']&&_0x2b6b14&&_0x5134b1['editing']['view']['once']('render',()=>{const _0xeec2df=_0x5134b1['plugins']['get']($t),_0x17ad14=_0x44f1f3['_threadToController']['get'](_0x303eed)['view'];_0xeec2df['getByInnerView'](_0x17ad14)['refreshVisibility']();},{'priority':'low'}),_0x303eed['_hasTargetInContent']=_0x3a8c44||!!_0x2b6b14),_0x2b6b14||(_0x2f58f0['add'](_0x552d69),_0x3f9858['delete'](_0x552d69));}for(const _0x5701ec of _0x2f58f0){const {id:_0x16e687}=hi(_0x5701ec),_0x2ed94d=_0x44f1f3['getCommentThread'](_0x16e687);if(_0x3f9858['delete'](_0x5701ec),!_0x2ed94d)continue;const _0x4ede98=this['hasMarkerForId'](_0x16e687);_0x4ede98||_0x2ed94d['isSubmitted']?_0x4ede98||_0x2ed94d['unlinkedAt']||_0x2ed94d['setUnlinkedAt'](new Date()):_0x2ed94d['remove']();}_0x2f58f0['clear']();});}['_handleInitialThreads'](_0x182ffb){_0x182ffb['forEach'](_0x27d3de=>{_0x27d3de['unlinkedAt']&&this['_attachArchivedThread'](_0x27d3de['id']);});}['_getTargetForId'](_0x2313f3){const _0x213890=this['editor'],_0x208e2a=this['getAllMarkersForId'](_0x2313f3);return _0x1c9996(_0x213890['editing'],_0x208e2a);}['_getTextContext'](_0x57a06c){const _0x4accb5=this['getAllMarkersForId'](_0x57a06c);let _0x42b40a='',_0x1cc70a=!0x1;for(const _0xb40b62 of _0x4accb5){const _0xa97097=_0xb40b62['getRange']();for(const _0x588932 of Array['from'](_0xa97097['getItems']()))_0x588932['is']('$textProxy')?(_0x42b40a&&_0x1cc70a&&(_0x42b40a+='\x20',_0x1cc70a=!0x1),_0x42b40a+=_0x588932['data']):_0x1cc70a=!0x0;_0x1cc70a=!0x0;}return _0x42b40a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1bcdb3,_0xe20b43){const _0x126152=this['editor'],_0x30b54c=_0x126152['plugins']['get'](Qt);let _0x54cbda=_0x30b54c['getCommentThread'](_0xe20b43);const _0x34900f=_0x126152['config']['get']('collaboration.channelId'),_0x1120ad=_0x126152['plugins']['get'](si);if(_0x54cbda&&(_0x54cbda['unlinkedAt']&&_0x54cbda['setUnlinkedAt'](null),_0x54cbda['isAttached']))return _0x54cbda;return!this['getAllMarkersForId'](_0xe20b43)[0x0]['managedUsingOperations']?_0x126152['editing']['view']['once']('render',()=>{if(_0x30b54c['getCommentThread'](_0xe20b43))return;const _0x49dcb2=_0x126152['plugins']['get']($t);_0x54cbda=_0x30b54c['openNewCommentThread']({'channelId':_0x34900f,'threadId':_0xe20b43,'target':()=>this['_getTargetForId'](_0xe20b43),'context':{'type':'text','value':this['_getTextContext'](_0xe20b43)}});const _0x2dd123=_0x30b54c['_threadToController']['get'](_0x54cbda)['view'],_0x1931d0=_0x49dcb2['getByInnerView'](_0x2dd123);_0x1931d0&&_0x1120ad['registerAnnotation'](_0x1931d0);},{'priority':'low'}):_0x30b54c['fetchCommentThread']({'channelId':_0x34900f,'threadId':_0xe20b43})['then'](_0xc9f505=>{if('destroyed'!==_0x126152['state']){if(_0x54cbda=_0xc9f505,_0x54cbda&&!_0x54cbda['isAttached']){const _0x20a56d=_0x54cbda['attachTo'](()=>this['_getTargetForId'](_0xe20b43));_0x1120ad['registerAnnotation'](_0x20a56d),_0x54cbda['isResolved']&&this['_reconvertMarkers'](_0xe20b43);}else{if(!_0x54cbda){const _0x303381=this['getAllMarkersForId'](_0xe20b43);_0x126152['model']['change'](_0x49cb9a=>{for(const _0x2ee19f of _0x303381)_0x49cb9a['removeMarker'](_0x2ee19f);});}}}}),_0x54cbda;}['_handleThreadMarker'](_0x14244c,_0x2dc0f3){const _0x31db1e=this['_attachMarkerToThread'](_0x14244c,_0x2dc0f3);_0x31db1e&&!_0x31db1e['context']&&_0x31db1e['setContext']({'type':'text','value':this['_getTextContext'](_0x2dc0f3)});}['_initAriaMarkerChangeAnnouncements'](){const _0x17c4d6=this['editor'];_0x4122ea(_0x17c4d6['model'],({left:_0x3424a1,entered:_0x55f54c})=>{for(const _0x3e7478 of _0x3424a1)if(ui(_0x3e7478)){_0x17c4d6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x17c4d6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5dc6e2 of _0x55f54c)if(ui(_0x5dc6e2)){_0x17c4d6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x17c4d6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x231145(_0x4f881f)));break;}});}}function di(_0x18eacb,_0x58d875){return _0x58d875?_0x18eacb+':'+_0x58d875:_0x18eacb;}function li(_0x3a3c52,_0x1e7b02){const _0x425fb1=_0x1e7b02['schema'],_0x74cf41=_0x1e7b02['createRange'](_0x3a3c52['start']);for(const _0x115fe3 of _0x3a3c52['getWalker']()){const {type:_0x95c91,item:_0x3ccff4,nextPosition:_0x425711}=_0x115fe3;if('text'===_0x95c91||_0x425fb1['isObject'](_0x3ccff4)){const _0x350201=_0x1e7b02['createPositionBefore'](_0x3ccff4);_0x74cf41['isCollapsed']&&(_0x74cf41['start']=_0x350201),_0x74cf41['end']=_0x425711;}}return _0x74cf41;}function ui(_0x123bc0){return'comment'===hi(_0x123bc0['name'])['group'];}class mi extends _0x4d9904{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x3bdb6f=this['editor'],_0x2d87d6=_0x3bdb6f['plugins']['get'](Qt),_0x2bc803=_0x3bdb6f['plugins']['get'](ci),_0x33d24d=_0x3bdb6f['plugins']['get']($t),_0x135d71=_0x3bdb6f['plugins']['get'](si);_0x3bdb6f['ui']['componentFactory']['add']('comment',()=>{const _0x10e10e=this['_createUIButton'](_0x55e7f2);return _0x10e10e['tooltip']=!0x0,_0x10e10e;}),_0x3bdb6f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x135d71['addSourceCollector'](()=>{const _0x2e84c9=[];for(const [_0x547b33,_0x51f160]of _0x2d87d6['_threadToController']){const _0x2917ef=_0x2bc803['getAllMarkersForId'](_0x547b33['id']),_0x36beb2=_0x2917ef['map'](_0x12c501=>_0x12c501['getRange']());_0x2917ef['length']>0x0&&_0x2e84c9['push']([_0x51f160['view'],_0x36beb2]);}return _0x2e84c9;}),this['listenTo'](_0x33d24d,'change:activeAnnotations',(_0x35cace,_0x4224a1,_0x438e14)=>{const _0x1e552e=Array['from'](_0x438e14)['map'](_0x2ddcb1=>_0x2ddcb1['innerView'])['find'](_0x1ad5ec=>_0x2d87d6['_viewToController']['has'](_0x1ad5ec));if(!_0x1e552e)return void(_0x2bc803['activeMarker']=null);const _0x4ee92d=_0x2d87d6['_viewToController']['get'](_0x1e552e)['model']['id'],_0x29780f='comment:'+_0x4ee92d;_0x4ee92d&&_0x2bc803['hasMarkerForId'](_0x4ee92d)?_0x2bc803['activeMarker']=_0x29780f:_0x2bc803['activeMarker']&&(_0x2bc803['activeMarker']=null);}),this['listenTo'](_0x2d87d6,'removeCommentThread',(_0x4d4d58,{threadId:_0x51fa84,isFromAdapter:_0x3886d1})=>{!_0x3886d1&&_0x3bdb6f['ui']['focusTracker']['isFocused']&&_0x2bc803['hasMarkerForId'](_0x51fa84)&&_0x3bdb6f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2d87d6,'addComment',(_0x591a33,{threadId:_0x579cb6,isFromAdapter:_0x492b0c})=>{if(_0x492b0c||!_0x2bc803['hasMarkerForId'](_0x579cb6)||!_0x2d87d6['hasCommentThread'](_0x579cb6))return;0x1===_0x2d87d6['getCommentThread'](_0x579cb6)['length']&&(_0x3bdb6f['editing']['view']['focus'](),_0x591a33['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x19644a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x9f66af;for(const _0x588bec in _0x19644a){const _0xd62958=_0x588bec,_0x4e7393=_0x19644a[_0xd62958];if('commentsLicenseKeyValid'==_0x4e7393||'commentsLicenseKeyInvalid'==_0x4e7393||'commentsLicenseKeyExpired'==_0x4e7393||'commentsLicenseKeyDomainLimit'==_0x4e7393||'commentsLicenseKeyNotAllowed'==_0x4e7393||'commentsLicenseKeyEvaluationLimit'==_0x4e7393||'commentsLicenseKeyUsageLimit'==_0x4e7393){delete _0x19644a[_0xd62958],_0x9f66af=_0x4e7393,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x9f66af&&_0x19644a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x9f66af&&_0x19644a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x9f66af&&_0x19644a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x9f66af&&_0x19644a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x9f66af&&_0x19644a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x9f66af&&_0x19644a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1c424e){const _0x20ba15=this['editor'],_0x5169f0=new _0x1c424e(_0x20ba15['locale']),_0x16a0a5=_0x20ba15['commands']['get']('addCommentThread');return _0x5169f0['set']({'label':bt(_0x20ba15['locale'],'Comment'),'icon':_0xe6bf43}),_0x5169f0['bind']('isEnabled')['to'](_0x16a0a5,'isEnabled',_0x16a0a5,'hasContent',(_0x1558d2,_0x42da56)=>_0x1558d2&&_0x42da56),this['listenTo'](_0x5169f0,'execute',()=>{_0x16a0a5['execute']();}),_0x5169f0;}}class fi extends _0x4d9904{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x494494){super(_0x494494),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xca257b,_0x2c8a94,_0x5b5342)=>{_0x5b5342?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xe36d95,_0x3c696a]of this['editor']['commands'])_0x3c696a['affectsData']&&'addCommentThread'!==_0xe36d95&&_0x3c696a['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 _0x16b404=this['editor']['editing']['view']['document'];this['listenTo'](_0x16b404,'cut',_0x17651d=>_0x17651d['stop'](),{'priority':'highest'}),this['listenTo'](_0x16b404,'clipboardInput',_0x84ac39=>_0x84ac39['stop'](),{'priority':'highest'}),this['listenTo'](_0x16b404,'delete',_0x2b556b=>_0x2b556b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x91ed91,_0x3ef21f]of this['editor']['commands'])_0x3ef21f['affectsData']&&'addCommentThread'!==_0x91ed91&&_0x3ef21f['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x1f8e1d{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36358e){super(_0x36358e),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2b4f51=this['context']['plugins']['get']($t);this['listenTo'](_0x2b4f51,'_activateAnnotation',(_0x152922,_0x36b80a)=>{for(const _0x2988f2 of this['activeUIs']){const _0xc73e13=this['_uis']['get'](_0x2988f2);(0x0,this['uisData']['get'](_0x2988f2)['filter'])(_0x36b80a)&&_0xc73e13['setActiveAnnotation'](_0x36b80a);}}),this['listenTo'](_0x2b4f51,'_deactivateAllAnnotations',()=>{for(const _0x21e16d of this['activeUIs']){this['_uis']['get'](_0x21e16d)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2b4f51['_visibleAnnotations'],'add',(_0x4b272e,_0x17a865)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x17a865);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x40723a){return this['activeUIs']['has'](_0x40723a);}['activate'](_0x2bc027,_0x5a0070=this['defaultFilter']){const _0x13f451=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x2bc027))throw new _0x373a51('annotationsuis-missing-ui',this,{'uiName':_0x2bc027});this['isActive'](_0x2bc027)&&this['deactivate'](_0x2bc027),this['activeUIs']['add'](_0x2bc027);const _0x79da25=new jt();Xt({'source':_0x13f451['_visibleAnnotations'],'target':_0x79da25,'filter':_0x5a0070}),this['uisData']['set'](_0x2bc027,{'collection':_0x79da25,'filter':_0x5a0070});const _0x30063e=this['_uis']['get'](_0x2bc027);_0x30063e['attach'](_0x79da25),this['listenTo'](_0x30063e,'change:activeAnnotation',(_0x174072,_0x1ff069,_0x36ff73,_0x4d656c)=>{_0x4d656c&&_0x13f451['_removeActiveAnnotation'](_0x4d656c),_0x36ff73&&_0x13f451['_addActiveAnnotation'](_0x36ff73);});}['deactivate'](_0x1c6d2f){if(this['activeUIs']['delete'](_0x1c6d2f),!this['_uis']['has'](_0x1c6d2f))throw new _0x373a51('annotationsuis-missing-ui',this,{'uiName':_0x1c6d2f});const _0x1f83d2=this['_uis']['get'](_0x1c6d2f);_0x1f83d2['detach'](),this['stopListening'](_0x1f83d2),this['uisData']['get'](_0x1c6d2f)['collection']['destroy'](),this['uisData']['delete'](_0x1c6d2f);}['switchTo'](_0x6de91e){if(!this['_uis']['has'](_0x6de91e))throw new _0x373a51('annotationsuis-missing-ui',this,{'uiName':_0x6de91e});const _0x5f25cc=this['context']['plugins']['get']($t),_0xf944bd=Array['from'](_0x5f25cc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x6de91e);const _0x3f66eb=this['_uis']['get'](_0x6de91e);_0x3f66eb['setActiveAnnotation'](_0xf944bd),_0x3f66eb['_setSelectedAnnotations']&&_0xf944bd&&_0x3f66eb['_setSelectedAnnotations']([_0xf944bd]);}['deactivateAll'](){for(const _0x1bac93 of this['activeUIs'])this['deactivate'](_0x1bac93);}['register'](_0x5a57d7,_0x5ebd60){if(this['_uis']['has'](_0x5a57d7))throw new _0x373a51('annotationsuis-register-already-registered');if('function'!=typeof _0x5ebd60['attach']||'function'!=typeof _0x5ebd60['detach']||'function'!=typeof _0x5ebd60['setActiveAnnotation'])throw new _0x373a51('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5a57d7,_0x5ebd60);}['refilterAnnotations'](){const _0xf9ac11=this['context']['plugins']['get']($t)['collection'],_0x43f1ab=new Map(),_0x210686=Array['from'](this['activeUIs']);for(const _0x29bde1 of this['activeUIs']){const _0x748b5f=this['uisData']['get'](_0x29bde1)['collection'];for(const _0x4ab5d2 of _0x748b5f)_0x43f1ab['set'](_0x4ab5d2,_0x29bde1);}for(const _0x448712 of _0xf9ac11){const _0x4ed81d=_0x43f1ab['get'](_0x448712);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x448712);const _0x48cf50=_0x210686['find'](_0x135803=>this['uisData']['get'](_0x135803)['filter'](_0x448712));_0x4ed81d!==_0x48cf50&&(_0x4ed81d&&this['uisData']['get'](_0x4ed81d)['collection']['remove'](_0x448712),_0x48cf50&&this['uisData']['get'](_0x48cf50)['collection']['add'](_0x448712));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4e9ea6){const _0x400410=[];for(const _0xf983e0 of this['activeUIs']){(0x0,this['uisData']['get'](_0xf983e0)['filter'])(_0x4e9ea6)&&_0x400410['push'](_0xf983e0);}if(_0x400410['length']>0x1)throw new _0x373a51('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x400410,'annotationType':_0x4e9ea6['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x14119e('px');class Ai extends _0x32e0d0{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2b983a){super(_0x2b983a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x39d2ef,_0x430fb0)=>_0x39d2ef+_0x430fb0),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x391028=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x391028['to']('isAnimationDisabled',_0x24581f=>_0x24581f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x391028['to']('top',_0x2d83a3=>gi(_0x2d83a3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x345483=this['element']['clientHeight'];_0x345483&&(this['height']=_0x345483);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x1f8e1d{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x557530){super(_0x557530),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 _0xc7127e=this['context']['config']['get']('sidebar.container');_0xc7127e&&this['setContainer'](_0xc7127e);}['setContainer'](_0x4594ac){if(!yi(_0x4594ac))throw new _0x373a51('sidebar-setcontainer-invalid-element');this['container']=_0x4594ac;}['_attachToContainer']({viewClass:_0x3f1e03='',spaceBetweenItems:_0x563cb8=0x19}={}){if(!yi(this['container']))throw new _0x373a51('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3f1e03,this['_spaceBetweenItems']=_0x563cb8;}['rearrange']({removedAnnotation:_0x2c4e50,previousAnnotation:_0x14aed2,nextAnnotation:_0x44e1ca}){const _0x584fb0=this['getSidebarItemView'](_0x2c4e50);this['view']['list']['remove'](_0x584fb0),this['_destroySidebarItemView'](_0x2c4e50),_0x14aed2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x14aed2)),_0x44e1ca&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x44e1ca)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xcd4be9,activatedAnnotation:_0x10fdba,disableAnimationOnActivatedAnnotation:_0x216a55}){if(this['_activeAnnotation']=_0x10fdba,_0xcd4be9){_0xcd4be9['isActive']=!0x1;const _0x3299f6=this['getSidebarItemView'](_0xcd4be9);_0x3299f6&&_0x216a55&&(_0x3299f6['isAnimationDisabled']=!0x1);}if(_0x10fdba){const _0x446c91=this['getSidebarItemView'](_0x10fdba);_0x446c91&&(_0x10fdba['isActive']=!0x0,_0x216a55&&(_0x446c91['isAnimationDisabled']=!0x0,_0x446c91['top']+=0x1),this['_alignToTargetRect'](_0x446c91));}}['_detachFromContainer'](_0x2d178f){if(this['view']['element']['remove'](),_0x2d178f){for(const _0x427203 of _0x2d178f)this['_destroySidebarItemView'](_0x427203);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x4e5a1d,_0x2c0ab4){_0x2c0ab4||(_0x2c0ab4=_0x4e5a1d['view']);const _0x1b1395=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1b1395,_0x4e5a1d),this['_annotationToSidebarItemView']['set'](_0x4e5a1d,_0x1b1395),_0x1b1395['content']['add'](_0x2c0ab4),this['listenTo'](_0x4e5a1d['view'],'change:targetRect',(_0x170eee,_0x5c7133,_0x348c4d)=>{const _0x101016=this['_getTargetTop'](_0x4e5a1d,_0x348c4d);_0x1b1395['_targetTop']!=_0x101016&&(_0x1b1395['_targetTop']=_0x101016,this['_setItemTop'](_0x1b1395,_0x101016));}),this['listenTo'](_0x1b1395,'change:top',()=>{this['_recalculate'](_0x1b1395,'top');}),this['listenTo'](_0x1b1395,'change:bottom',()=>{this['_recalculate'](_0x1b1395,'bottom');}),this['_alignToTargetRect'](_0x1b1395);const _0x5dcdab=this['_getItemBefore'](_0x1b1395);if(_0x5dcdab)this['_alignAfterItem'](_0x5dcdab,_0x1b1395)||this['_alignToTargetRect'](_0x1b1395);else this['_alignToTargetRect'](_0x1b1395);return this['_updateLastItem'](),this['view']['list']['add'](_0x1b1395),_0x1b1395;}['_alignForTopChange'](_0x5472f6){if(!_0x5472f6['content']['length'])return;const _0x201fac=this['_getItemBefore'](_0x5472f6);if(!_0x201fac)return;const _0x26644d=this['_sidebarItemViewToAnnotation']['get'](_0x201fac),_0x3a8775=this['_activeAnnotation'];_0x3a8775&&_0x3a8775===_0x26644d?this['_alignAfterItem'](_0x201fac,_0x5472f6):this['_alignBeforeItem'](_0x5472f6,_0x201fac);}['_alignForBottomChange'](_0xc07788){if(!_0xc07788['content']['length'])return;const _0x3c1d6c=this['_getItemAfter'](_0xc07788);if(!_0x3c1d6c)return;const _0x6ae9b6=this['_sidebarItemViewToAnnotation']['get'](_0x3c1d6c),_0x5df09b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x442914=this['_activeAnnotation'];_0x442914&&_0x442914===_0x6ae9b6&&_0x5df09b?(this['_alignBeforeItem'](_0x3c1d6c,_0xc07788),this['_alignAfterItem'](_0xc07788,_0x3c1d6c)):_0x442914&&_0x442914===_0x6ae9b6?this['_alignBeforeItem'](_0x3c1d6c,_0xc07788):this['_alignAfterItem'](_0xc07788,_0x3c1d6c);}['_recalculate'](_0x4123dd,_0x1631ef){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x371203,changedProp:_0x3f6a52}of this['_recalculateBuffer'])'top'===_0x3f6a52?this['_alignForTopChange'](_0x371203):this['_alignForBottomChange'](_0x371203);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4123dd,'changedProp':_0x1631ef});}['getSidebarItemView'](_0x35d43b){return this['_annotationToSidebarItemView']['get'](_0x35d43b);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x26adbc){const _0x141bbf=this['getSidebarItemView'](_0x26adbc);this['stopListening'](_0x141bbf),this['stopListening'](_0x26adbc['view']),_0x141bbf['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x26adbc),this['_sidebarItemViewToAnnotation']['delete'](_0x141bbf);}['_createSidebarView'](){const _0x3c7023=new _i(this['context']['locale']);return _0x3c7023['render'](),this['on']('change:_lastItem',(_0x59a830,_0x33eb87,_0x49bebf,_0x2b1bbe)=>{_0x2b1bbe&&_0x3c7023['unbind']('minHeight'),_0x49bebf?_0x3c7023['bind']('minHeight')['to'](_0x49bebf,'bottom'):_0x3c7023['minHeight']=null;}),_0x3c7023;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x341d34){const _0xee185b=this['_sidebarItemViewToAnnotation']['get'](_0x341d34),_0x27ee99=_0xee185b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xee185b)-0x1);return _0x27ee99&&this['getSidebarItemView'](_0x27ee99)||null;}['_getItemAfter'](_0x32f953){const _0x54e2ea=this['_sidebarItemViewToAnnotation']['get'](_0x32f953),_0x22cc31=_0x54e2ea&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54e2ea)+0x1);return _0x22cc31&&this['getSidebarItemView'](_0x22cc31)||null;}['_alignBeforeItem'](_0x100a67,_0x368d98){_0x100a67['updateHeight']();const _0x2a61a5=vi(_0x368d98['bottom']+this['_spaceBetweenItems'],_0x100a67['top']);return!!_0x2a61a5&&(this['_setItemTop'](_0x368d98,_0x368d98['top']-_0x2a61a5),!0x0);}['_alignAfterItem'](_0x54a795,_0x27e4b4){_0x54a795['updateHeight']();const _0x975ba4=vi(_0x54a795['bottom']+this['_spaceBetweenItems'],_0x27e4b4['top']);return!!_0x975ba4&&(this['_setItemTop'](_0x27e4b4,_0x27e4b4['top']+_0x975ba4,!0x1),!0x0);}['_alignToTargetRect'](_0x23c294){const _0x2aa728=this['_sidebarItemViewToAnnotation']['get'](_0x23c294);if(!_0x2aa728||!_0x2aa728['target']||!_0x2aa728['targetRect'])return;const _0x19c5d0=this['_getTargetTop'](_0x2aa728,_0x2aa728['targetRect']);this['_setItemTop'](_0x23c294,_0x19c5d0);}['_getTargetTop'](_0x3663b4,_0x56c185){if(null===_0x56c185)return 0x0;if(_0x3663b4['target']instanceof _0x297850)return _0x56c185['top'];{const _0x7a8e1c=new _0x297850(this['view']['element'])['top'];return _0x56c185['top']-_0x7a8e1c;}}['_setItemTop'](_0x492acf,_0x4bd653,_0x1476fa=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1476fa&&(_0x4bd653=Math['max'](_0x4bd653,this['_getMaxAvailableTop'](_0x492acf))),_0x492acf['top']=_0x4bd653;}['_getMaxAvailableTop'](_0xbba169){let _0xfcc1e2=this['_getItemBefore'](_0xbba169),_0x87eceb=0x0;for(;_0xfcc1e2;)_0xfcc1e2['updateHeight'](),_0x87eceb+=this['_spaceBetweenItems']+_0xfcc1e2['height'],_0xfcc1e2=this['_getItemBefore'](_0xfcc1e2);return _0x87eceb;}}function vi(_0x21c69d,_0x3ffeef){return Math['max'](_0x21c69d-_0x3ffeef,0x0);}function yi(_0x547f3f){return null!==_0x547f3f&&'object'==typeof _0x547f3f&&0x1===_0x547f3f['nodeType'];}class Ci extends _0x1f8e1d{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fc589){super(_0x4fc589),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5243cc(),this['_refreshPositioningDebounced']=_0x3f4835(()=>{_0x4fc589['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5ccc62=this['context']['plugins']['get'](pi),_0x3d62c3=this['context']['plugins']['get'](Ti);_0x5ccc62['register']('wideSidebar',this),_0x3d62c3['container']&&_0x5ccc62['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2f555a){if(_0x2f555a===this['activeAnnotation'])return;const _0xad2a38=this['context']['plugins']['get'](Ti);_0xad2a38['_activeAnnotation']=_0x2f555a;const _0x5707b2=this['activeAnnotation'];_0xad2a38['refresh']({'blurredAnnotation':_0x5707b2,'activatedAnnotation':_0x2f555a}),this['activeAnnotation']=_0x2f555a;}['attach'](_0x2c404a){this['annotations']=_0x2c404a;const _0xfd024b=this['context']['plugins']['get'](Ti);if(_0xfd024b['_annotations']=_0x2c404a,this['isAttached'])throw new _0x373a51('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xfd024b,'set:container',()=>{this['detach'](),this['listenTo'](_0xfd024b,'change:container',_0x31b634=>{_0x31b634['off'](),this['attach'](_0x2c404a);});}),_0xfd024b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x38c3c2=_0x8e47be=>{_0x8e47be['updateTargetRect'](),_0xfd024b['addAnnotation'](_0x8e47be);};for(const _0x464624 of _0x2c404a)_0x38c3c2(_0x464624);this['listenTo'](_0x2c404a,'add',(_0x2f6c49,_0x46d9ab)=>{_0x38c3c2(_0x46d9ab);}),this['listenTo'](_0x2c404a,'remove',(_0xcc005,_0x3f7df1,_0xc9abfc)=>{_0xfd024b['rearrange']({'removedAnnotation':_0x3f7df1,'previousAnnotation':_0x2c404a['get'](_0xc9abfc-0x1),'nextAnnotation':_0x2c404a['get'](_0xc9abfc+0x1)}),_0x3f7df1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2c404a,'focus',(_0x45fd77,_0x8917f2)=>{this['setActiveAnnotation'](_0x8917f2);}),this['listenTo'](_0x2c404a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x26bb19=this['context']instanceof _0x45e00d?this['context']['editors']:new _0x5243cc([this['context']]);for(const _0x17af35 of _0x26bb19)this['_integrateWithEditorAnnotations'](_0x17af35);this['listenTo'](_0x26bb19,'add',(_0xaeda1e,_0x539201)=>{this['listenTo'](_0x539201,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x539201);});}),this['listenTo'](_0x26bb19,'remove',(_0x300551,_0x3a3081)=>{_0x3a3081['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a3081['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x373a51('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x777618=this['context']['plugins']['get'](Ti);_0x777618['_detachFromContainer'](this['annotations']),this['stopListening'](_0x777618),this['stopListening'](this['annotations']),this['context']instanceof _0x45e00d&&this['stopListening'](this['context']['editors']);for(const _0x28f9cc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x28f9cc);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1f4871){if(!_0x1f4871['plugins']['has']('EditorAnnotations'))return;const _0x219a49=_0x1f4871['plugins']['get']('EditorAnnotations'),_0x1dcaee=()=>{const _0x49dd19=_0x219a49['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x49dd19[0x0]||null);};this['listenTo'](_0x219a49,'refresh',_0x1dcaee),this['listenTo'](_0x219a49,'blur',(_0xaeed04,{isAnnotationTracked:_0x3c2a2c})=>{this['activeAnnotation']&&_0x3c2a2c(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x219a49,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4b5fb5=>{_0x219a49['hasDomSelection']()&&(_0x1dcaee(),_0x4b5fb5['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x219a49);}['_destroyEditorAnnotationsIntegration'](_0x1d4a92){this['stopListening'](_0x1d4a92),this['_editorAnnotations']['remove'](_0x1d4a92);}}class Ii extends _0x55e7f2{['counterView'];constructor(_0x41f12c){super(_0x41f12c);const _0x3f840d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2a81aa,_0x35e37c)=>_0x2a81aa?'...':_0x35e37c['toString']()),this['set']('annotationType',''),this['icon']=_0xe6bf43,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x32e0d0(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3f840d['to']('annotationType',_0x341666=>'ck-annotation-counter__badge--'+_0x341666),_0x3f840d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3f840d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x1f8e1d{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31323e){super(_0x31323e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x457906())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5243cc(),this['_refreshPositioningDebounced']=_0x3f4835(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x42e624){this['annotations']=_0x42e624;const _0x580c73=this['context']['plugins']['get'](Ti),_0x55db35=this['balloonPanelView'];if(_0x580c73['_annotations']=_0x42e624,this['isAttached'])throw new _0x373a51('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x580c73,'set:container',()=>{this['detach'](),this['listenTo'](_0x580c73,'change:container',_0x550422=>{_0x550422['off'](),this['attach'](_0x42e624);});}),_0x580c73['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xaee9dd=_0x2c3c15=>{const _0x543604=new Ii(this['context']['locale']);_0x580c73['addAnnotation'](_0x2c3c15,_0x543604),this['_annotationToNarrowView']['set'](_0x2c3c15,_0x543604),_0x543604['bind']('isDirty','annotationType','number')['to'](_0x2c3c15['view'],'isDirty','type','length'),_0x543604['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x55db35['content']['first']!==_0x2c3c15['view']?(this['_showBalloon'](_0x2c3c15),_0x2c3c15['view']['element']['focus'](),this['setActiveAnnotation'](_0x2c3c15)):this['setActiveAnnotation'](null);});};for(const _0x3dd4da of _0x42e624)_0xaee9dd(_0x3dd4da);this['listenTo'](_0x42e624,'add',(_0x577e16,_0x2800b9)=>{_0xaee9dd(_0x2800b9);}),this['listenTo'](_0x42e624,'remove',(_0x4d7771,_0x3097dc,_0x22c2c1)=>{this['_annotationToNarrowView']['get'](_0x3097dc)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3097dc),_0x580c73['rearrange']({'removedAnnotation':_0x3097dc,'previousAnnotation':_0x42e624['get'](_0x22c2c1-0x1),'nextAnnotation':_0x42e624['get'](_0x22c2c1+0x1)}),_0x3097dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x42e624,'focus',(_0xcd440e,_0x4f8252)=>{this['setActiveAnnotation'](_0x4f8252);}),this['listenTo'](_0x42e624,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4fe8e9,_0x3fe13a)=>{_0x3fe13a['keyCode']===_0x42fc28['esc']&&_0x55db35['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x55db35['content']['first']),this['_hideBalloon'](),_0x3fe13a['stopPropagation'](),_0x3fe13a['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x200d0f,_0x3d3eeb)=>{const _0xffcc48=_0x3d3eeb['target'];_0x55db35['isVisible']&&_0x55db35['element']['contains'](_0xffcc48)||_0x580c73['view']['element']['contains'](_0xffcc48)||_0x200d0f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x380ba3=>_0x380ba3['contains'](_0xffcc48))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x52dc9e=this['context']instanceof _0x45e00d?this['context']['editors']:new _0x5243cc([this['context']]);for(const _0xd69e05 of _0x52dc9e)this['_integrateWithEditorAnnotations'](_0xd69e05);this['listenTo'](_0x52dc9e,'add',(_0x400ab4,_0x2148d2)=>{this['listenTo'](_0x2148d2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2148d2);});}),this['listenTo'](_0x52dc9e,'remove',(_0x5e3c97,_0x5232b1)=>{_0x5232b1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5232b1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xf306e5){if(_0xf306e5===this['activeAnnotation'])return;const _0x2c9753=this['context']['plugins']['get'](Ti);if(_0x2c9753['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xf306e5,'disableAnimationOnActivatedAnnotation':!0x0}),_0xf306e5)_0x2c9753['getSidebarItemView'](_0xf306e5)?this['_showBalloon'](_0xf306e5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xf306e5;}['detach'](){if(!this['isAttached'])throw new _0x373a51('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xad755=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x49d704=>_0x49d704['destroy']()),this['_annotationToNarrowView']['clear'](),_0xad755['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x45e00d&&this['stopListening'](this['context']['editors']);for(const _0x1d4cad of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1d4cad);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'](_0x218119){if(!_0x218119['plugins']['has']('EditorAnnotations'))return;const _0x4d165d=_0x218119['plugins']['get']('EditorAnnotations'),_0x726d69=this['context']['plugins']['get'](Ti),_0xefcb03=this['annotations'],_0x29f517=this['balloonPanelView'],_0x44f5e3=()=>{const _0x119df5=_0x4d165d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x119df5),this['setActiveAnnotation'](_0x119df5[0x0]||null);};this['listenTo'](_0x4d165d,'refresh',_0x44f5e3),this['listenTo'](_0x4d165d,'blur',(_0x15ee91,{isAnnotationTracked:_0x3cf5fc})=>{this['activeAnnotation']&&_0x3cf5fc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4d165d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xefcb03,'blur',_0x344d7d=>{_0x4d165d['hasDomSelection']()&&_0x344d7d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x285f85,_0x5ca7b2)=>{const _0x599eb1=_0x5ca7b2['target'];_0x29f517['isVisible']&&_0x29f517['element']['contains'](_0x599eb1)||_0x726d69['view']['element']['contains'](_0x599eb1)||this['activeAnnotation']&&_0x4d165d['hasDomSelection']()&&(_0x44f5e3(),_0x285f85['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4d165d);}['_destroyEditorAnnotationsIntegration'](_0x2b7fa9){_0x2b7fa9&&(this['stopListening'](_0x2b7fa9),this['_editorAnnotations']['remove'](_0x2b7fa9));}['_setSelectedAnnotations'](_0x4b7b41){for(const _0x13b897 of this['_selectedAnnotations'])_0x4b7b41['includes'](_0x13b897)||this['_manuallyClosedAnnotationViews']['delete'](_0x13b897['view']);this['_selectedAnnotations']=_0x4b7b41;}['_refreshPositioning'](){const _0x5a55fd=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a55fd['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3ee3e0){if(this['_manuallyClosedAnnotationViews']['has'](_0x3ee3e0['view']))return;const _0x1a404c=this['balloonPanelView']['content']['first'];_0x1a404c!==_0x3ee3e0['view']?(_0x1a404c&&this['_detachListeners'](_0x1a404c),this['_attachListeners'](_0x3ee3e0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3ee3e0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x5aa959=this['balloonPanelView']['content']['first'],_0xfacf26=_0x5aa959&&this['annotations']['getByView'](_0x5aa959);if(!_0xfacf26||!this['_annotationToNarrowView']['has'](_0xfacf26))return;const _0x34e23d=this['_annotationToNarrowView']['get'](_0xfacf26)['element'],_0x4fb38b=(function(){const _0x53d315=ht['defaultPositions'];return[_0x53d315['southArrowNorthEast'],_0x53d315['northArrowSouthEast'],_0x53d315['southArrowNorth'],_0x53d315['northArrowSouth'],_0x53d315['southArrowNorthWest'],_0x53d315['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x34e23d,'positions':_0x4fb38b});}['_hideBalloon'](){const _0x35fc4c=this['balloonPanelView'],_0x30fa7f=_0x35fc4c['content']['first'];_0x30fa7f&&(this['_detachListeners'](_0x30fa7f),_0x35fc4c['unpin'](),_0x35fc4c['content']['clear']());}['_attachListeners'](_0x2ee655){this['listenTo'](_0x2ee655,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2ee655,'Esc',(_0x102778,_0x210b15)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2ee655),this['_hideBalloon'](),_0x210b15();});}['_detachListeners'](_0x348a3c){this['stopListening'](_0x348a3c);}}class Ei extends _0x4d9904{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d0672){super(_0x4d0672),_0x4d0672['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4d0672['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x3f4835(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x16b583=this['editor']['plugins']['get'](pi);_0x16b583['context']===this['editor']&&(_0x16b583['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x36f116,_0x5c2ec7)=>{const _0x262875=this['_balloon'];if(this['isAttached']&&_0x262875['visibleView']){const _0x59ad2b=this['annotations']['getByView'](_0x262875['visibleView']);_0x59ad2b&&this['_closeAnnotation'](_0x59ad2b),_0x5c2ec7();}}));}['afterInit'](){const _0x5a0a20=this['editor']['plugins']['get'](pi);_0x5a0a20['context']===this['editor']&&(_0x5a0a20['hasActive']()||_0x5a0a20['switchTo']('inline'));}['setActiveAnnotation'](_0x141f11){_0x141f11!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x141f11&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x141f11)&&this['_addAnnotationToBalloon'](_0x141f11,!0x0),_0x141f11['isActive']=!0x0),_0x141f11||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x141f11);}['attach'](_0x392b55){this['annotations']=_0x392b55;const _0x232a54=this['editor']['plugins']['get'](pi),_0xf8b151=this['_balloon'];if(this['isAttached'])throw new _0x373a51('inlineannotations-attach-already-attached',this);if(_0x232a54['context']!==this['editor'])throw new _0x373a51('inlineannotations-not-allowed-with-context',this);const _0x24a5de=this['editor']['plugins']['get'](si);this['listenTo'](_0x24a5de,'refresh',()=>{const _0x163d3c=_0x24a5de['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x55fcf6,_0x1b259b;!this['_forceRefresh']&&(_0x55fcf6=_0x163d3c,_0x1b259b=this['_selectedAnnotations'],_0x55fcf6['length']===_0x1b259b['length']&&_0x55fcf6['every'](_0x58d98c=>_0x1b259b['includes'](_0x58d98c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x163d3c),this['setActiveAnnotation'](_0x163d3c[0x0]||null));}),this['listenTo'](_0x24a5de,'blur',(_0x66e80e,{isAnnotationTracked:_0x1dcfd1})=>{this['activeAnnotation']&&_0x1dcfd1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x24a5de,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2935a0,_0x51fab2,_0x1e5d10)=>{_0x1e5d10||this['setActiveAnnotation'](null);}),this['listenTo'](_0x392b55,'remove',(_0x1247e0,_0x63a59c)=>{this['_removeAnnotationFromBalloon'](_0x63a59c),_0x63a59c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xf8b151,'change:visibleView',(_0x344eea,_0x5005eb,_0x55ac22,_0x64949e)=>{_0x64949e&&this['stopListening'](_0x64949e);const _0x303039=_0x392b55['getByView'](_0x55ac22);_0x55ac22&&_0x303039&&(this['listenTo'](_0x55ac22,'change:height',()=>{_0xf8b151['updatePosition']();}),this['listenTo'](_0x55ac22,'Esc',()=>{this['_closeAnnotation'](_0x303039),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x303039&&this['setActiveAnnotation'](_0x303039));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xf8b151['visibleView']&&(_0x392b55['getByView'](_0xf8b151['visibleView'])&&_0xf8b151['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 _0x373a51('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a6b6f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a6b6f);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x25186f){for(const _0x1de20f of this['_selectedAnnotations'])_0x25186f['includes'](_0x1de20f)||this['_manuallyClosed']['delete'](_0x1de20f);for(const _0x59c99b of this['annotations'])_0x25186f['includes'](_0x59c99b)||this['_removeAnnotationFromBalloon'](_0x59c99b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xcbb57f of _0x25186f)this['_addAnnotationToBalloon'](_0xcbb57f);}this['_selectedAnnotations']=_0x25186f;}['_addAnnotationToBalloon'](_0x5ed7dd,_0x65cd4c=!0x1){this['_manuallyClosed']['has'](_0x5ed7dd)||(this['_addedAnnotations']['has'](_0x5ed7dd)||this['_balloon']['hasView'](_0x5ed7dd['view'])||(this['_addedAnnotations']['add'](_0x5ed7dd),this['_balloon']['add']({'stackId':_0x5ed7dd['view']['id'],'view':_0x5ed7dd['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5ed7dd)}})),_0x65cd4c&&this['_balloon']['showStack'](_0x5ed7dd['view']['id']));}['_getBalloonTargetForAnnotation'](_0x31299a){const _0x1d627c=_0x31299a['target'],_0x12cc3a=this['editor']['editing']['view'],_0x4a9fcc=_0x12cc3a['document']['selection']['getFirstRange'](),_0x5199f1=_0x12cc3a['domConverter']['viewRangeToDom'](_0x4a9fcc);if(_0x5199f1['collapse'](!0x0),_0x1d627c){if(_0x1d627c instanceof _0x297850)return _0x1d627c;let _0x498136=[];for(const _0x507657 of _0x1d627c)_0x498136['push'](..._0x297850['getDomElementRects'](_0x507657));_0x498136=function(_0x4b42ea){const _0x1306b9=[];let _0xbe49f3=_0x4b42ea[0x0];for(let _0x2fe060=0x1;_0x2fe060<_0x4b42ea['length'];_0x2fe060++)if(Ni(_0xbe49f3,_0x4b42ea[_0x2fe060])){const _0x4e9074=_0x4b42ea[_0x2fe060]['width'];_0xbe49f3['width']+=_0x4e9074,_0xbe49f3['right']+=_0x4e9074;}else _0x1306b9['push'](_0xbe49f3),_0xbe49f3=_0x4b42ea[_0x2fe060];return _0x1306b9['push'](_0xbe49f3),_0x1306b9;}(_0x498136);const _0x38af90=_0x5199f1['getBoundingClientRect']();return _0x498136['find'](_0x37d19a=>_0x37d19a['top']<=_0x38af90['top']&&_0x37d19a['bottom']>=_0x38af90['bottom']&&_0x37d19a['left']<=_0x38af90['left']&&_0x37d19a['right']>=_0x38af90['right'])||_0x498136[0x0];}return _0x31299a['targetRect']||_0x5199f1;}['_removeAnnotationFromBalloon'](_0x59f04e){this['_addedAnnotations']['has'](_0x59f04e)&&this['_balloon']['hasView'](_0x59f04e['view'])&&(this['_addedAnnotations']['delete'](_0x59f04e),this['_balloon']['remove'](_0x59f04e['view']));}['_closeAnnotation'](_0x50adf1){this['_manuallyClosed']['add'](_0x50adf1),this['_removeAnnotationFromBalloon'](_0x50adf1);}}function Ni(_0x693043,_0x231edc){return _0x693043['top']===_0x231edc['top']&&_0x693043['bottom']===_0x231edc['bottom']&&_0x693043['right']===_0x231edc['left'];}class ki extends _0x32e0d0{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x3a71c2,_0x10d578){super(_0x3a71c2),this['set']('isEmpty',!_0x10d578['length']),this['focusTracker']=new _0x46222e(),this['_annotationViews']=_0x10d578,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xe4e85f({'focusables':_0x10d578,'focusTracker':this['focusTracker']}),this['listenTo'](_0x10d578,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x10d578,'remove',(_0x36d489,_0x229d32)=>{_0x229d32['isActive']&&this['focus'](),_0x10d578['length']||(this['isEmpty']=!0x0);});const _0x580cf7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x3a71c2,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x10d578},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x580cf7['if']('isEmpty','ck-hidden',_0x4d6cd8=>!_0x4d6cd8)]},'children':[{'text':bt(_0x3a71c2,'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 _0x3271b5 of this['_annotationViews'])this['focusTracker']['add'](_0x3271b5['element']);this['_annotationViews']['on']('change',(_0xe5a76c,{added:_0x366c9e,removed:_0xac21c0})=>{for(const _0xbf12ff of _0x366c9e)this['focusTracker']['add'](_0xbf12ff['element']);for(const _0xd36d27 of _0xac21c0)this['focusTracker']['remove'](_0xd36d27['element']);});}}class Oi extends _0x1f8e1d{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x15a827){super(_0x15a827),this['archivedThreads']=new _0x5243cc();}['init'](){const _0x4b78ce=this['context'],_0x415689=_0x4b78ce['plugins']['get'](Qt),_0x51a866=_0x4b78ce['plugins']['get']($t);this['listenTo'](_0x415689,'addCommentThread',(_0x2e778a,{threadId:_0x59d153})=>{const _0x3ded62=_0x415689['getCommentThread'](_0x59d153);_0x3ded62['archivedAt']&&this['archivedThreads']['add'](_0x3ded62,this['_calculatePosition'](_0x3ded62['archivedAt'])),this['listenTo'](_0x3ded62,'change:archivedAt',(_0x1979de,_0x592039,_0x3952d5)=>{_0x3952d5?this['archivedThreads']['has'](_0x3ded62)||this['archivedThreads']['add'](_0x3ded62,this['_calculatePosition'](_0x3ded62['archivedAt'])):this['archivedThreads']['has'](_0x3ded62)&&this['archivedThreads']['remove'](_0x3ded62);});}),this['listenTo'](_0x415689,'removeCommentThread',(_0x24a264,{threadId:_0x2ea532})=>{const _0x40c240=_0x415689['getCommentThread'](_0x2ea532);this['stopListening'](_0x40c240),this['archivedThreads']['has'](_0x40c240)&&this['archivedThreads']['remove'](_0x40c240);},{'priority':'highest'}),this['listenTo'](_0x51a866['collection'],'focus',(_0x39f40e,_0x23eaa3)=>{_0x23eaa3['isVisible']||(_0x23eaa3['isActive']=!0x0,_0x51a866['activate'](_0x23eaa3));});}['_calculatePosition'](_0x6bf2c1){const _0x4cabab=[...this['archivedThreads']]['findIndex'](_0x5ce0d2=>_0x5ce0d2['archivedAt']<_0x6bf2c1);return _0x4cabab>-0x1?_0x4cabab:this['archivedThreads']['length'];}}class Mi extends _0x4d9904{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x526803){super(_0x526803),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x3e319a=this['editor'],_0x1cc39e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3e319a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x55e7f2,!0x0)),_0x3e319a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x422e33=this['_createCommentsArchiveButton'](ot);return _0x422e33['set']({'role':'menuitemcheckbox'}),_0x422e33;});const _0x543428=_0x3e319a['plugins']['get'](Oi),_0x5d5efa=_0x3e319a['plugins']['get']('Annotations'),_0x9cb0fe=_0x3e319a['plugins']['get']('CommentsRepository');_0x543428['archivedThreads']['forEach'](_0x482679=>{this['_handleNewThread'](_0x482679);}),this['listenTo'](_0x543428['archivedThreads'],'add',(_0x2e5b20,_0x344ca9)=>{this['_handleNewThread'](_0x344ca9);}),this['listenTo'](_0x5d5efa['collection'],'add',(_0x4be19f,_0x24d45e)=>{const _0x349e8d=this['_pendingThreads']['find'](_0x5c38d9=>{const _0x34ebc2=_0x9cb0fe['_threadToController']['get'](_0x5c38d9);return _0x34ebc2&&_0x24d45e['innerView']===_0x34ebc2['view'];});if(_0x349e8d){const _0x3462a6=this['_calculatePosition'](_0x349e8d['archivedAt']);this['_addAnnotationToArchive'](_0x24d45e,_0x3462a6),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x349e8d),0x1);}}),this['listenTo'](_0x543428['archivedThreads'],'remove',(_0x36d255,_0x2159af)=>{const _0x3b8696=_0x3e319a['config']['get']('collaboration.channelId');if(!_0x3b8696||_0x2159af['channelId']===_0x3b8696){if(this['_pendingThreads']['includes'](_0x2159af))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2159af),0x1);else{const _0x162638=_0x9cb0fe['_threadToController']['get'](_0x2159af),_0x982d0b=_0x5d5efa['getByInnerView'](_0x162638['view']);this['annotationViews']['remove'](_0x982d0b['view']),this['stopListening'](_0x982d0b),this['stopListening'](_0x982d0b['focusableElements']);}}}),this['listenTo'](_0x5d5efa['collection'],'add',(_0x1928e0,_0x486e84)=>{this['listenTo'](_0x486e84,'escape',_0x1cc39e);}),this['listenTo'](_0x5d5efa['collection'],'remove',(_0x1b6ee4,_0x250d5d)=>{this['stopListening'](_0x250d5d,'escape',_0x1cc39e);});}['_addAnnotationToArchive'](_0x101870,_0x287471){this['listenTo'](_0x101870,'set:isVisible',_0x213e8b=>{_0x213e8b['return']=!0x1,_0x213e8b['stop']();}),this['annotationViews']['add'](_0x101870['view'],_0x287471);}['_handleNewThread'](_0x4711e6){const _0x28be75=this['editor']['plugins']['get']('CommentsRepository'),_0x3f1b84=this['editor']['plugins']['get']('Annotations'),_0x41adb5=this['editor']['config']['get']('collaboration.channelId');if(!_0x41adb5||_0x4711e6['channelId']===_0x41adb5){const _0x44b8b3=_0x28be75['_threadToController']['get'](_0x4711e6);if(!_0x44b8b3)return void this['_pendingThreads']['push'](_0x4711e6);const _0x2df3de=this['_calculatePosition'](_0x4711e6['archivedAt']),_0x27c80b=_0x3f1b84['getByInnerView'](_0x44b8b3['view']);_0x27c80b['isVisible']&&_0x3f1b84['_visibleAnnotations']['remove'](_0x27c80b),this['_addAnnotationToArchive'](_0x27c80b,_0x2df3de);}}['_calculatePosition'](_0x33a211){const _0x5b9b07=this['editor']['config']['get']('collaboration.channelId'),_0x574150=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0xfcfe15=>_0xfcfe15['channelId']===_0x5b9b07)['findIndex'](_0x22b7a7=>_0x22b7a7['archivedAt']<_0x33a211);return _0x574150<0x0||_0x574150>this['annotationViews']['length']?this['annotationViews']['length']:_0x574150-0x1;}['_toggleDialog'](){const _0x3379f6=this['editor'],_0x49ea43=_0x3379f6['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x3379f6['locale'],this['annotationViews'])),'commentsArchive'===_0x49ea43['id']?_0x49ea43['hide']():_0x49ea43['show']({'id':'commentsArchive','title':bt(_0x3379f6['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4b0a9b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4a826b,_0x23661c=!0x1){const _0x389825=this['editor']['locale'],_0x31d3b7=this['editor']['plugins']['get']('Dialog'),_0x25e7e1=new _0x4a826b(_0x389825);return _0x25e7e1['bind']('isEnabled')['to'](this,'isEnabled'),_0x25e7e1['bind']('isOn')['to'](_0x31d3b7,'id',_0x4c28b1=>'commentsArchive'===_0x4c28b1),_0x25e7e1['set']({'label':bt(_0x389825,'COMMENTS_ARCHIVE'),'icon':_0x4b0a9b,'isToggleable':!0x0}),_0x23661c&&(_0x25e7e1['tooltip']=!0x0),this['listenTo'](_0x25e7e1,'execute',()=>this['_toggleDialog']()),_0x25e7e1;}['_hideDialogOnAnnotationEscape']=_0x1d3c3f=>{const _0x18793d=_0x1d3c3f['source'];if(!this['annotationViews']['has'](_0x18793d['view']))return;const _0x3b6c94=this['editor']['plugins']['get']('Dialog');_0x3b6c94['isOpen']&&'commentsArchive'===_0x3b6c94['id']&&(_0x3b6c94['hide'](),_0x1d3c3f['stop']());};}class Ri extends _0x4d9904{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x2d5d5b,ContextPlugin as _0x5f30da,PendingActions as _0x4cca70,Command as _0x5d7909,Plugin as _0x1576f0,Context as _0x3fe192}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x38d982,uid as _0x4c898f,KeystrokeHandler as _0x1c3d3e,FocusTracker as _0x4691cf,diff as _0x1cd6fb,Collection as _0x2957ce,Rect as _0x1419a3,CKEditorError as _0x4e5896,first as _0x51babc,priorities as _0x18180e,scrollViewportToShowTarget as _0x3983aa,getEnvKeystrokeText as _0x1dd84f,toUnit as _0x5c74f2,DomEmitterMixin as _0xc25130,keyCodes as _0x1b2238}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x350299,AriaDescriptionView as _0x38d2f7,setupThreadKeyboardNavigation as _0x4bd331,ConfirmMixin as _0x5fae2d,LateFocusButtonView as _0x51398d,trimHtml as _0x57ddd5,LateFocusDropdownButtonView as _0x6b24b,FOCUS_ANNOTATION_KEYSTROKE as _0x29748d,Users as _0x15a349,getDateTimeFormatter as _0x2c3507,hashObject as _0x2c486f,getAllMarkersDomElementsSorted as _0x2fc2b4,surroundingMarkersDetector as _0x23d947}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x5bc811,cloneDeep as _0x1be07f,set as _0x26a330,unset as _0x32c716,isEqual as _0x3bf914,debounce as _0x538c79}from'es-toolkit/compat';import{IconUndo as _0x4e31f1,IconCheck as _0x3958d2,IconPencil as _0x4d3ea2,IconRemoveComment as _0x7de475,IconThreeVerticalDots as _0x390c28,IconAddComment as _0x1b267d,IconCommentsArchive as _0x2c3d78}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x22c4d6,InlineEditableUIView as _0x562478,EditorUI as _0x31f0ae,View as _0x73c3b7,FocusCycler as _0x1962b4,ButtonView as _0x39c4f7,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x38d982(){['model'];['view'];constructor(_0xb32d1,_0x1e3d94){super(),this['model']=_0xb32d1,this['model']['_isAttached']=!0x0,this['view']=_0x1e3d94,this['listenTo'](_0x1e3d94,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1e3d94,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1e3d94,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1e3d94,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1e3d94,'addComment',(_0x2f300b,_0x4e3dc7)=>this['addComment'](_0x4e3dc7)),this['listenTo'](_0x1e3d94,'updateComment',(_0x10f77a,_0x37cac2,_0x5c7c57)=>this['updateComment'](_0x37cac2,_0x5c7c57)),this['listenTo'](_0x1e3d94,'removeComment',(_0xddbe44,_0x42a090)=>this['removeComment'](_0x42a090));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0xf926f7){this['model']['addComment']({'content':_0xf926f7,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3b73a8,_0x47a153){this['model']['getComment'](_0x3b73a8)['update']({'content':_0x47a153});}['removeComment'](_0xd20099){this['model']['getComment'](_0xd20099)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x1d1177,_0x86883,_0x482a91){const t=_0x1d1177['t'];switch(_0x86883){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'},_0x482a91);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x482a91);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'},_0x482a91);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'},_0x482a91);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x482a91);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'},_0x482a91);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'},_0x482a91);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'},_0x482a91);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x22c4d6{['main'];['editable'];constructor(_0x529e99,_0x5e80ad){super(_0x529e99);const _0xf87cee=_0x4c898f();this['main']=this['createCollection'](),this['editable']=new _0x562478(_0x529e99,_0x5e80ad,void 0x0,{'label':()=>bt(_0x529e99,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x529e99['uiLanguageDirection'],'lang':_0x529e99['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xf87cee},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x31f0ae{['view'];constructor(_0x29d3bf){super(_0x29d3bf),this['view']=new Et(_0x29d3bf['locale'],_0x29d3bf['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x291067=this['editor']['editing']['view'],_0x11fd79=this['view']['editable'],_0x50e6d9=_0x291067['document']['getRoot']();_0x11fd79['name']=_0x50e6d9['rootName'],this['view']['render']();const _0x265cff=_0x11fd79['element'];this['setEditableElement'](_0x11fd79['name'],_0x265cff),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x291067['attachDomRoot'](_0x265cff),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x38d982(_0x2d5d5b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x436d57={}){function _0x196782(_0x51466a){return _0x51466a['map'](_0x170c36=>String['fromCharCode'](_0x170c36))['join']('');}(_0x436d57=Object['assign']({},_0x436d57))['plugins']||(_0x436d57['plugins']=Ot['defaultPlugins']),super(_0x436d57),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[_0x196782([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x196782([0x76,0x69,0x65,0x77])][_0x196782([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x196782([0x61,0x75,0x74,0x6f]),this[_0x196782([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x196782([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x196782([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x196782([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x196782([0x6f,0x6b])});}['create'](){const _0x5a454f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5a454f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5e259e=>{const _0x5b57cf=this['model']['document']['getRoot'](),_0x16bb3e=_0x5b57cf&&_0x5b57cf['getChild'](_0x5b57cf['childCount']-0x1);_0x5e259e['setSelection'](_0x16bb3e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e4832=this['editing']['view'],_0x48b516=_0x3e4832['document']['getRoot'](),_0x2faee7=_0x48b516['getChild'](0x0);_0x48b516['childCount']>0x1||!_0x2faee7||'p'!=_0x2faee7['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x3e4832,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2faee7['placeholder']=this['placeholder']),ut({'view':_0x3e4832,'element':_0x2faee7,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2faee7);}}class Mt extends _0x73c3b7{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c0e77,_0x124190={}){super(_0x3c0e77),this['editor']=null,this['_editorConfig']=_0x124190,this['set']('value',_0x124190['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x3c0e77,'Reply...')),this['set']('submitLabel',bt(_0x3c0e77,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x1c3d3e(),this['focusTracker']=new _0x4691cf(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x7e50b0,_0x44e6d9)=>{this['cancelButtonView']['fire']('execute'),_0x44e6d9();}),this['keystrokes']['set']('Ctrl+Enter',(_0xdf4fe5,_0x3a4e1e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3a4e1e());}),this['on']('submit',(_0x11bdb4,_0x566f4b)=>{_0x566f4b['length']>0xfde8?(alert(bt(_0x3c0e77,'TOO_LONG_COMMENT_ALERT',[_0x566f4b['length'],0xfde8])),_0x11bdb4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x171510=this['editor'];this['element']['insertBefore'](_0x171510['ui']['element'],this['element']['firstChild']),_0x171510['model']['document']['on']('change',()=>this['value']=_0x171510['getData']()),_0x171510['bind']('placeholder')['to'](this),this['focusables']['add'](_0x171510['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x565bb4){-0x1===_0x565bb4?(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:_0x493293}=this,_0x254460=new _0x39c4f7(_0x493293);return _0x254460['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x254460['withText']=!0x0,_0x254460['bind']('label')['to'](this,'submitLabel'),_0x254460['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x254460['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x32e6c9,_0x3df729)=>!_0x3df729&&!!_0x32e6c9['trim']()),_0x254460;}['_createCancelButton'](){const {locale:_0x13a067}=this,_0x365368=new _0x39c4f7(_0x13a067);return _0x365368['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x365368['label']=bt(_0x13a067,'Cancel'),_0x365368['withText']=!0x0,_0x365368['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x365368;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4013b0=>{this['focusTracker']['add'](_0x4013b0['element']);}),this['focusables']['on']('change',(_0x2d44ff,_0x39e58e)=>{for(const _0x4f2aed of Array['from'](_0x39e58e['added'])['reverse']())this['focusTracker']['add'](_0x4f2aed['element']);});}}class Rt extends _0x73c3b7{constructor(_0x32bcd9,_0x4e3c15,_0x47048a){super(_0x32bcd9),this['commentInputView']=new Mt(_0x32bcd9,_0x47048a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2757c3,_0x199f44)=>_0x2757c3||!!_0x199f44),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 _0x350299(_0x32bcd9,_0x4e3c15),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'](_0x400107){this['commentInputView']['focus'](_0x400107);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x386ab6,_0x37ece7)=>{const {submitButtonView:_0x449ccb,cancelButtonView:_0x242af6,editor:_0x2f9607}=this['commentInputView'];[_0x449ccb['element'],_0x242af6['element'],_0x2f9607?_0x2f9607['editing']['view']['getDomRoot']():null]['filter'](_0x56067e=>_0x56067e)['some'](_0x1d8aa9=>_0x1d8aa9['contains'](_0x37ece7['target']))||(this['focus'](),_0x37ece7['preventDefault']());});}}class xt extends _0x73c3b7{constructor(_0x4ebe35){super(_0x4ebe35);const _0x521dcc=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x521dcc['to']('count',_0x38b9e2=>bt(_0x4ebe35,'NUMBER_OF_COMMENTS',_0x38b9e2))}]});}}class St extends _0x73c3b7{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4e9b59,_0x3f47e9,_0x42ca74){super(_0x4e9b59);const _0x4b6f10=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3f47e9['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3f47e9,this['_config']=_0x42ca74,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c0c40=>this['commentViews']['map'](_0x4ec484=>_0x4ec484['element'])['includes'](_0x1c0c40['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x4e9b59),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x408449=>_0x408449-this['_config']['maxCommentsWhenCollapsed']);for(const _0x43315c of _0x3f47e9['comments'])this['_handleNewCommentModel'](_0x43315c);this['_handleInfoComment'](),this['listenTo'](_0x3f47e9['comments'],'add',(_0x48d570,_0x1977d9)=>{const _0x51c61c=this['_calculatePosition'](_0x1977d9);this['length']++,this['_handleNewCommentModel'](_0x1977d9,_0x51c61c),this['refreshVisibleViews']();}),this['listenTo'](_0x3f47e9['comments'],'remove',(_0x46dee2,_0x2eda19)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2eda19),this['refreshVisibleViews']();}),this['listenTo'](_0x3f47e9,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3f47e9,'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',_0x4b6f10['if']('length','ck-hidden',_0x5241c0=>!_0x5241c0)],'aria-label':bt(_0x4e9b59,'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'](_0x3a6d35){-0x1===_0x3a6d35?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x76afa of this['commentViews'])_0x76afa['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1300ed,_0x414f2e){const _0x3e8f0e=new this['_config']['CommentView'](this['locale'],_0x1300ed,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3e8f0e['viewUid']=_0x1300ed['id'],_0x3e8f0e['delegate']('removeComment')['to'](this),_0x3e8f0e['delegate']('updateComment')['to'](this),_0x3e8f0e['delegate']('resolveCommentThread')['to'](this),_0x3e8f0e['delegate']('editorReady')['to'](this),_0x3e8f0e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3e8f0e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3e8f0e,_0x414f2e);}['_calculatePosition'](_0x42e417){const _0x1b3174=this['_model']['_findOptimalIndex'](_0x42e417);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x42e417['authoredAt']?_0x1b3174-0x1:_0x1b3174:_0x1b3174-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x22095e={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x22095e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x22095e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x7b7446){const _0x13e40b=this['commentViews']['remove'](_0x7b7446['id']);this['stopListening'](_0x13e40b),_0x13e40b['isEditMode']&&this['_updateHasDirtyComment'](),_0x13e40b['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x911708=>_0x911708['isEditMode']);}['_rearrangeCollapse'](){const _0x11d9ec=function(_0x52d51b){const _0x153925=new _0x2957ce();for(const _0x5b7fec of _0x52d51b)_0x153925['add'](_0x5b7fec);return _0x153925;}(this['commentViews']),_0x57039c=this['_collapsedCommentsView']['count'];for(let _0xf74e74=0x1;_0xf74e74<=_0x57039c;_0xf74e74++)_0x11d9ec['remove'](0x1);for(const _0x88ee84 of _0x11d9ec)_0x88ee84['collapse']();_0x57039c>0x0&&_0x11d9ec['add'](this['_collapsedCommentsView'],0x1),Pt(_0x1cd6fb(Array['from'](this['visibleViews']),Array['from'](_0x11d9ec)),this['visibleViews'],_0x11d9ec);}['_rearrangeExpand'](){Pt(_0x1cd6fb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x446db8 of this['visibleViews'])_0x446db8['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x465a4f=>{this['focusTracker']['add'](_0x465a4f['element']),this['keystrokes']['listenTo'](_0x465a4f['element']);}),this['commentViews']['on']('change',(_0x2acea1,_0x121689)=>{for(const _0x53f466 of _0x121689['removed'])this['focusTracker']['remove'](_0x53f466['element']),this['keystrokes']['stopListening'](_0x53f466['element']);for(const _0x102dbd of Array['from'](_0x121689['added'])['reverse']())this['focusTracker']['add'](_0x102dbd['element']),this['keystrokes']['listenTo'](_0x102dbd['element']);});}}function Pt(_0x51788c,_0x1149a8,_0x453029){let _0x57f119=0x0;for(const _0x37a257 of _0x51788c)switch(_0x37a257){case'insert':_0x1149a8['add'](_0x453029['get'](_0x57f119),_0x57f119),_0x57f119++;break;case'delete':_0x1149a8['remove'](_0x57f119);break;case'equal':_0x57f119++;}}class Lt extends _0x73c3b7{constructor(_0x49394f){super(_0x49394f);const _0x1a9aa9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1a9aa9['to']('contextValue',_0xa18479=>bt(_0x49394f,'THREAD_CONTEXT_LABEL',_0xa18479)),'tabindex':-0x1},'children':[{'text':_0x1a9aa9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x73c3b7{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x13f009,_0x49779a){super(_0x13f009);const _0x997ae1=this['bindTemplate'];this['_model']=_0x49779a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1b47c7=>!!_0x1b47c7),this['bind']('contextValue')['to'](this['_model'],'context',_0x505dec=>_0x505dec&&_0x505dec['value']?this['_trimContextValue'](_0x505dec['value']):bt(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',_0x997ae1['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 _0x441055=new _0x39c4f7(this['locale']);return _0x441055['label']=bt(this['locale'],'Reopen'),_0x441055['tooltip']=bt(this['locale'],'Reopen'),_0x441055['icon']=_0x4e31f1,_0x441055['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x235043=>!_0x235043),_0x441055['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x197e30,_0x2607a9)=>_0x197e30&&_0x2607a9),_0x441055['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x441055;}['_trimContextValue'](_0x3a61a4){if(_0x3a61a4['length']<0x96)return _0x3a61a4;const _0xee8663=_0x3a61a4['lastIndexOf']('\x20',0x93);return _0x3a61a4['substring'](0x0,_0xee8663>-0x1?_0xee8663:0x93)+'...';}['_attachContextActions'](){const _0x4c1d7b=this['element']['querySelector']('.ck-context'),_0xdfc19a=_0x4c1d7b['querySelector']('.ck-context__value');this['listenTo'](_0x4c1d7b,'mouseenter',()=>{_0xdfc19a['offsetWidth']<_0xdfc19a['scrollWidth']&&_0x4c1d7b['classList']['add']('overlay');}),this['listenTo'](_0x4c1d7b,'mouseleave',()=>{_0x4c1d7b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2cdb60 of this['focusables'])this['focusTracker']['add'](_0x2cdb60['element']),this['keystrokes']['listenTo'](_0x2cdb60['element']);}['_createContextView'](){const _0x40c7a8=new Lt(this['locale']);return _0x40c7a8['bind']('contextValue')['to'](this),_0x40c7a8;}}class Vt extends _0x73c3b7{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3dbe4a,_0x131da4,_0x3145aa,_0x565a66){super(_0x3dbe4a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x131da4,this['_localUser']=_0x3145aa,this['_config']=_0x565a66,this['commentThreadHeaderView']=new Dt(_0x3dbe4a,_0x131da4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x38d2f7(_0x3dbe4a,bt(_0x3dbe4a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x3dbe4a,_0x131da4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x565a66)),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',(_0x55cbc0,_0x3469aa)=>_0x55cbc0||!!_0x3469aa),this['bind']('isUnlinked')['to'](_0x131da4,'unlinkedAt',_0x394e6e=>!!_0x394e6e),this['bind']('ariaLabel')['to'](this,'length',_0x34a886=>{const _0x2b91e5=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x34a886,_0x2b91e5]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4fa889=>_0x4fa889['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4bd331(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xbba561=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4965ae=_0xbba561['commentInputView'];return _0xbba561['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4965ae,'value',(_0x1d62ff,_0xea09f2,_0x4f88de,_0x58eb4c,_0x1e32a7)=>!!_0x1e32a7||!!_0x58eb4c&&_0x4f88de&&!_0xea09f2||_0x1d62ff&&_0x4f88de&&!_0xea09f2),_0x4965ae['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53060a,_0x4c9422,_0x1c19f9)=>{let _0x2a2087;return _0x2a2087=_0x1c19f9&&_0x4c9422?'Reply\x20to\x20reopen\x20discussion...':_0x53060a?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x2a2087);}),_0x4965ae['bind']('submitLabel')['to'](this,'length',_0x52c05c=>bt(this['locale'],_0x52c05c?'Reply':'Comment')),_0x4965ae['on']('submit',(_0x5fd7d4,_0x3bafa4)=>{this['fire']('addComment',_0x3bafa4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4965ae['on']('cancel',()=>{this['focus']();}),_0x4965ae['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4965ae['on']('cancel',_0x567f67=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x567f67['stop']());}),this['on']('change:isActive',(_0x187446,_0x4bb560,_0x344f34)=>{_0x344f34||this['length']||_0x4965ae['value']||this['fire']('removeCommentThread');}),_0xbba561;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x5fae2d(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x3379f8,_0x492014,_0x58ee28,_0x1129bd){super(_0x3379f8,_0x492014,_0x58ee28,_0x1129bd),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3379f8,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x59ffb1,_0x2d9377,_0x15ce93)=>{_0x15ce93||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x46d32e,_0x1a75cd,_0x25f188)=>{_0x25f188&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4a6fa4=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4a6fa4['if']('isActive','ck-thread--active'),_0x4a6fa4['if']('isUnlinked','ck-thread--unlinked'),_0x4a6fa4['to']('actionIndicator',_0x41dd8d=>_0x41dd8d?'ck-thread--'+_0x41dd8d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4a6fa4['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 _0x596446 of this['commentsListView']['commentViews'])_0x596446['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x314233}=this,_0x656b94=this['commentsListView']['commentViews']['get'](0x0);_0x656b94===this['_boundFirstCommentView']||_0x656b94['isSystemComment']||(this['_boundFirstCommentView']=_0x656b94,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x656b94,'actionIndicator',_0x48d864=>'remove'===_0x48d864?'remove':null),_0x656b94['placeholder']=bt(_0x314233,'Write\x20a\x20comment...'),_0x656b94['removeButton']['on']('execute',_0x104ec8=>{_0x104ec8['stop'](),this['showConfirm'](bt(_0x314233,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x656b94['focus']();}),_0x656b94['actionBar']['add'](this['resolveButton'],0x0),_0x656b94['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x7195b8=new _0x51398d(this['locale']);return _0x7195b8['label']=bt(this['locale'],'Resolve'),_0x7195b8['tooltip']=bt(this['locale'],'Resolve'),_0x7195b8['icon']=_0x3958d2,_0x7195b8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x7195b8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x556038=>!_0x556038),_0x7195b8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2f9952,_0x58ad82)=>_0x2f9952&&!_0x58ad82),_0x7195b8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x7195b8;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x73c3b7{constructor(_0x3ca07a){super(_0x3ca07a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x432035,_0x39ee7d,_0x4849c1)=>{this['element']['innerHTML']=_0x4849c1;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x73c3b7{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x46aaa9,_0x118126,_0x203e60){super(_0x46aaa9),this['_model']=_0x118126,this['_config']=_0x203e60,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x118126,'content',_0x118126,'authoredAt',(_0x3d93ab,_0x2f60f2)=>bt(_0x46aaa9,'COMMENT_ARIA_LABEL',[_0x118126['author']['name'],_0x203e60['formatDateTime'](_0x2f60f2),new DOMParser()['parseFromString'](_0x3d93ab,'text/html')['body']['textContent'],_0x118126['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x38d2f7(_0x46aaa9,bt(_0x46aaa9,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x839f82=>_0x839f82['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']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x4a6d32=new Ht(this['locale']);return _0x4a6d32['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3e741e,_0x2a9ff1)=>_0x2a9ff1?_0x57ddd5(_0x3e741e,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3e741e),_0x4a6d32;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1a9708=new Mt(this['locale'],this['_config']['editorConfig']);return _0x1a9708['value']=this['_model']['content'],_0x1a9708['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1a9708['submitLabel']=bt(this['locale'],'Save'),_0x1a9708['on']('submit',(_0x2c9845,_0x14d61c)=>{this['fire']('updateComment',this['_model']['id'],_0x14d61c),this['switchToDisplayMode'](),this['focus']();}),_0x1a9708['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1a9708['once']('editorReady',()=>{_0x1a9708['focus']();}),_0x1a9708['createEditor'](),_0x1a9708['delegate']('editorReady')['to'](this),_0x1a9708['delegate']('editorDestroyed')['to'](this),_0x1a9708;}['_setupKeyboardNavigation'](){const _0x1e125f=this['element'];this['keystrokes']['listenTo'](_0x1e125f);for(const _0x233d20 of this['focusables'])this['focusTracker']['add'](_0x233d20['element']),this['keystrokes']['listenTo'](_0x233d20['element']);this['focusables']['on']('change',(_0x9237b,_0x556d6c)=>{for(const _0xa2155e of _0x556d6c['removed'])this['focusTracker']['remove'](_0xa2155e['element']),this['keystrokes']['stopListening'](_0xa2155e['element']);for(const _0x7c2bd of _0x556d6c['added'])this['focusTracker']['add'](_0x7c2bd['element']),this['keystrokes']['listenTo'](_0x7c2bd['element']);}),this['keystrokes']['set']('enter',(_0xaa4463,_0x57ced8)=>{_0x1e125f===_0xaa4463['target']&&(this['focusCycler']['focusFirst'](),_0x57ced8());}),this['keystrokes']['set']('esc',(_0x5c118a,_0x535ace)=>{_0x1e125f!==_0x5c118a['target']&&(this['focus'](),_0x535ace());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x5fae2d(Ft){['actionBar'];['userView'];constructor(_0x2a7ba0,_0x42c478,_0x887d6e){super(_0x2a7ba0,_0x42c478,_0x887d6e),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x2a7ba0,'Reply...')),this['bind']('authoredAt')['to'](_0x42c478),this['bind']('resolvedAt')['to'](_0x42c478),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 _0x350299(_0x2a7ba0,_0x42c478['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x42c478,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x29f3d4=this['bindTemplate'],_0x11447c=[{'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':_0x29f3d4['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x29f3d4['to']('authoredAt',_0x255b4b=>this['_config']['formatDateTime'](_0x255b4b))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x29f3d4['if']('isEditMode','ck-comment__actions--hidden'),_0x29f3d4['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']&&_0x11447c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x29f3d4['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x29f3d4['if']('isEditMode','ck-comment--edit'),_0x29f3d4['if']('isSystemComment','ck-comment--info'),_0x29f3d4['to']('actionIndicator',_0x3d8c52=>_0x3d8c52?'ck-comment--'+_0x3d8c52:'')],'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':_0x11447c}]}]};}['_createEditButton'](){const _0x37ce42=new _0x39c4f7(this['locale']);return _0x37ce42['label']=bt(this['locale'],'Edit'),_0x37ce42['icon']=_0x4d3ea2,_0x37ce42['withText']=!0x0,_0x37ce42['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x37ce42['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4885bb=>!_0x4885bb),_0x37ce42['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x37ce42['on']('execute',()=>this['switchToEditMode']()),_0x37ce42;}['_createRemoveButton'](){const _0x3e82af=new _0x39c4f7(this['locale']);return _0x3e82af['label']=bt(this['locale'],'Remove'),_0x3e82af['icon']=_0x7de475,_0x3e82af['withText']=!0x0,_0x3e82af['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3e82af['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4b497e=>!_0x4b497e),_0x3e82af['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3e82af['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3e82af;}['_createDropdown'](){const _0x5615a3=it(this['locale'],_0x6b24b),_0x4b1c1f=_0x5615a3['panelView']['children'],_0x1c849c=new et(this['locale']),_0x374e56=_0x5615a3['bindTemplate'];st(_0x5615a3,()=>this['items']['find'](_0xfab845=>_0xfab845['isVisible'])),_0x5615a3['extendTemplate']({'attributes':{'class':[_0x374e56['if']('isVisible','ck-hidden',_0x28622b=>!_0x28622b)]}});const _0x3473da=(_0x4f7182,_0x468c2f=-0x1)=>{const _0x1c40d4=new nt(this['locale']);_0x1c40d4['children']['add'](_0x4f7182);const _0x4412a8=_0x468c2f>-0x1?_0x468c2f:_0x1c849c['items']['length'];_0x1c849c['items']['add'](_0x1c40d4,_0x4412a8);const _0x3ec140=Array['from'](this['items']);_0x5615a3['unbind']('isEnabled','isVisible'),_0x5615a3['bind']('isEnabled')['toMany'](_0x3ec140,'isEnabled',(..._0x1854c7)=>_0x1854c7['some'](_0x380d93=>_0x380d93)),_0x5615a3['bind']('isVisible')['toMany'](_0x3ec140,'isVisible',(..._0x1749ae)=>_0x1749ae['some'](_0x2e9841=>_0x2e9841));};_0x5615a3['panelPosition']='sw',_0x5615a3['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x390c28});for(const _0x4f2aba of this['items'])_0x3473da(_0x4f2aba);return _0x4b1c1f['add'](_0x1c849c),_0x5615a3['listenTo'](this['items'],'add',(_0x155d9c,_0x52acf8,_0x251c7)=>{_0x3473da(_0x52acf8,_0x251c7);}),_0x5615a3['listenTo'](this['items'],'remove',(_0x4956e3,_0x5c8e83,_0x5eeec7)=>{_0x1c849c['items']['remove'](_0x5eeec7);}),_0x5615a3;}['_attachActions'](_0x169672,_0x8144b8){const _0x124f62=_0x169672&&_0x169672['element'];_0x124f62&&(this['listenTo'](_0x124f62,'mouseenter',()=>this['actionIndicator']=_0x8144b8),this['listenTo'](_0x124f62,'focus',()=>this['actionIndicator']=_0x8144b8),this['listenTo'](_0x124f62,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x124f62,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3c789e=super['_createCommentInputView']();return _0x3c789e['bind']('placeholder')['to'](this),_0x3c789e;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x11b11d){const _0x1c3df2=_0x5bc811(_0x11b11d,0x1e),_0x4228f6=new MutationObserver(_0x54be54=>{for(const _0x2a3cc3 of _0x54be54)('attributes'==_0x2a3cc3['type']&&'class'==_0x2a3cc3['attributeName']||'childList'==_0x2a3cc3['type']||'characterData'==_0x2a3cc3['type'])&&_0x1c3df2();});return{'attach'(_0x525b74){_0x4228f6['observe'](_0x525b74,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4228f6['disconnect'](),_0x1c3df2['cancel']();}};}class Kt extends _0x73c3b7{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x46721f,_0x3cc22d){super(_0x46721f),this['id']=_0x4c898f(),this['focusTracker']=new _0x4691cf(),this['keystrokes']=new _0x1c3d3e(),this['keystrokes']['set']('Esc',(_0x6e7e11,_0x50784c)=>this['fire']('Esc',_0x50784c)),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']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3cc22d),this['mainView']=_0x3cc22d;const _0x4e94bb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4e94bb['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 _0x3061a9=this['element']['clientHeight'];_0x3061a9&&(this['height']=_0x3061a9);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x38d982(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50cbb5,target:_0x45ed1b,type:_0x39343b,isVisible:_0x26f126=!0x0}){super(),this['view']=_0x50cbb5,this['view']['element']||this['view']['render'](),this['_type']=_0x39343b,this['_target']=_0x45ed1b,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2957ce([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xbd7000,_0x3818de)=>{this['view']['focusTracker']['add'](_0x3818de);}),this['focusableElements']['on']('remove',(_0x37b821,_0x78d0f0)=>{this['view']['focusTracker']['remove'](_0x78d0f0);}),this['set']('isVisible',_0x26f126);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x54bc38=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x54bc38),_0x54bc38;}get['targetRect'](){const _0x529dad=this['target'];if(null===_0x529dad)return null;if(_0x529dad instanceof _0x1419a3)return _0x529dad;const _0xb7bd9=_0x529dad['filter'](_0x4109c7=>function(_0x4d74e2){const _0x975074=_0x4d74e2['offsetParent'];if(_0x975074)return!0x0;const _0x4121d5=_0x4d74e2['getClientRects']()['item'](0x0);return!!_0x4121d5;}(_0x4109c7));return 0x0===_0xb7bd9['length']?null:_0x1419a3['getDomElementRects'](_0xb7bd9[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x51d711){this['view']['isActive']=_0x51d711,this['view']['mainView']['isActive']=_0x51d711;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x55a01b){if(!(null===_0x55a01b||_0x55a01b instanceof _0x1419a3||Array['isArray'](_0x55a01b)&&_0x55a01b['every'](_0x5df444=>Gt(_0x5df444))))throw new _0x4e5896('annotation-invalid-target',null,{'target':_0x55a01b});}['_getNormalizedTarget'](){const _0x4ac904='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x4ac904)?[_0x4ac904]:_0x4ac904;}}function Gt(_0x26f220){return null!==_0x26f220&&'object'==typeof _0x26f220&&'nodeType'in _0x26f220&&0x1===_0x26f220['nodeType'];}class jt extends _0x2957ce{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x28ad32=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4691cf(),this['_focusTracker']['on']('change:isFocused',(_0x2dc93a,_0x1cf8af,_0xd6fed1)=>{_0xd6fed1||this['fire']('blur');});for(const _0x24e0ef of _0x28ad32)this['add'](_0x24e0ef);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2dae5b){if(this['has'](_0x2dae5b))throw new _0x4e5896('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2dae5b['innerView'],_0x2dae5b),this['_viewToAnnotation']['set'](_0x2dae5b['view'],_0x2dae5b);for(const _0x1e0a6c of _0x2dae5b['focusableElements'])this['_focusTracker']['add'](_0x1e0a6c);this['listenTo'](_0x2dae5b['focusableElements'],'add',(_0x2a21f7,_0x2254c6)=>{this['_focusTracker']['add'](_0x2254c6);}),this['listenTo'](_0x2dae5b['focusableElements'],'remove',(_0x37b893,_0x5096a0)=>{this['_focusTracker']['remove'](_0x5096a0);}),this['listenTo'](_0x2dae5b['view']['focusTracker'],'change:isFocused',(_0x627818,_0x3a1933,_0x9d9949)=>{_0x9d9949&&this['fire']('focus',_0x2dae5b);}),_0x2dae5b['updateTargetRect']();const _0x4adf73=this['_getOrderInContent'](_0x2dae5b['view']['targetRect']);return super['add'](_0x2dae5b,_0x4adf73);}['remove'](_0x5c98dc){if(!this['has'](_0x5c98dc))throw new _0x4e5896('annotationcollection-not-existing-item',null);this['stopListening'](_0x5c98dc['view']['focusTracker']),this['stopListening'](_0x5c98dc['focusableElements']);for(const _0x1fcc87 of _0x5c98dc['focusableElements'])this['_focusTracker']['remove'](_0x1fcc87);return this['_viewToAnnotation']['delete'](_0x5c98dc['view']),this['_innerViewToAnnotation']['delete'](_0x5c98dc['innerView']),super['remove'](_0x5c98dc);}['getByInnerView'](_0x2ab831){return this['_innerViewToAnnotation']['get'](_0x2ab831);}['getByView'](_0x523f23){return this['_viewToAnnotation']['get'](_0x523f23);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x57c1b9 of this)_0x57c1b9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x42929c=Array['from'](this)['sort']((_0x256744,_0xdf71b0)=>qt(_0x256744['view']['targetRect'],_0xdf71b0['view']['targetRect']));for(let _0x4b2f28=_0x42929c['length']-0x1;_0x4b2f28>0x0;_0x4b2f28--){const _0xd12968=_0x42929c[_0x4b2f28];_0x4b2f28!==this['getIndex'](_0xd12968)&&(this['remove'](_0xd12968),this['add'](_0xd12968));}}['_getOrderInContent'](_0x11d499){let _0x536b90=0x0;if(!_0x11d499)return this['length'];for(const _0x1ddd4b of this){const _0x53718d=_0x1ddd4b['view']['targetRect'];if(_0x53718d){if(qt(_0x11d499,_0x53718d)<0x0)return _0x536b90;_0x536b90++;}}return _0x536b90;}}function Xt({source:_0x17fafb,target:_0x341de4,filter:_0x57bb5d}){for(const _0x3a0b1c of _0x17fafb)_0x57bb5d(_0x3a0b1c)&&_0x341de4['add'](_0x3a0b1c);_0x341de4['listenTo'](_0x17fafb,'add',(_0x2914a1,_0x24db99)=>{_0x57bb5d(_0x24db99)&&_0x341de4['add'](_0x24db99);}),_0x341de4['listenTo'](_0x17fafb,'remove',(_0xd04f3b,_0x21a41c)=>{_0x341de4['has'](_0x21a41c)&&_0x341de4['remove'](_0x21a41c);});}function qt(_0x2db7d4,_0x2b1a23){if(null===_0x2db7d4&&null===_0x2b1a23)return 0x0;if(null===_0x2db7d4)return-0x1;if(null===_0x2b1a23)return 0x1;const _0x1ea908=_0x2db7d4['top']-_0x2b1a23['top'];return 0x0==_0x1ea908?_0x2db7d4['left']-_0x2b1a23['left']:_0x1ea908;}class $t extends _0x5f30da{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x212548){if(super(_0x212548),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x212548 instanceof _0x2d5d5b){const _0x2176cb=_0x212548['locale'];_0x212548['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x2176cb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f575e){this['collection']['add'](_0x4f575e);}['remove'](_0x14fc4b){this['collection']['remove'](_0x14fc4b),_0x14fc4b['destroy']();}['refreshVisibility'](){for(const _0x164078 of this['collection'])_0x164078['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x25e640){return this['collection']['getByInnerView'](_0x25e640);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x157515 of this['collection'])_0x157515['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x13611a){this['fire']('_activateAnnotation',_0x13611a);}['createAnnotation'](_0x46d7f8){return new Yt(_0x46d7f8);}['createAnnotationView'](_0x184d6a,_0x20e3d9){return new Kt(_0x184d6a,_0x20e3d9);}['_addActiveAnnotation'](_0x347d13){const _0xb03579=new Set(this['activeAnnotations']);_0xb03579['add'](_0x347d13),this['activeAnnotations']=_0xb03579;}['_removeActiveAnnotation'](_0xc234c){const _0x4997f8=new Set(this['activeAnnotations']);_0x4997f8['delete'](_0xc234c),this['activeAnnotations']=_0x4997f8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3c9421=this['collection'],_0x55a92e=this['_visibleAnnotations'];function _0x11ae35(_0x1032e8){const _0x3dfae0=_0x1032e8['source'];_0x3dfae0['isVisible']&&!_0x55a92e['has'](_0x3dfae0)?_0x55a92e['add'](_0x3dfae0):!_0x3dfae0['isVisible']&&_0x55a92e['has'](_0x3dfae0)&&_0x55a92e['remove'](_0x3dfae0),_0x3dfae0['view']['focusTracker']['remove'](_0x3dfae0['view']['element']),_0x3dfae0['view']['focusTracker']['add'](_0x3dfae0['view']['element']);}this['listenTo'](_0x3c9421,'add',(_0x1bb7ca,_0xd47d69)=>{_0xd47d69['isVisible']&&_0x55a92e['add'](_0xd47d69),this['listenTo'](_0xd47d69,'change:isVisible',_0x11ae35);}),this['listenTo'](_0x3c9421,'remove',(_0x3b597d,_0x5c0f08)=>{_0x55a92e['has'](_0x5c0f08)&&_0x55a92e['remove'](_0x5c0f08),this['stopListening'](_0x5c0f08,'change:isVisible',_0x11ae35);});}['_setupEnterAnnotationKeystroke'](){const _0x17e4af=_0x25a8f3=>{_0x25a8f3['on']('ready',()=>{_0x25a8f3['keystrokes']['set'](_0x29748d,(_0x179237,_0x57a080)=>{const _0x27bd02=_0x51babc(this['activeAnnotations']['values']());_0x27bd02&&(_0x27bd02['view']['focus'](),_0x57a080());});});};this['context']instanceof _0x2d5d5b?_0x17e4af(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x47ae47,_0xb0d175)=>{_0x17e4af(_0xb0d175);});}['_setupEscapeAnnotationHandling'](){const _0x5a0783=_0x4cd699=>{const _0x51bb5b=_0x4cd699['source'],_0x135328=[];let _0x41e2dd;if(Array['isArray'](_0x51bb5b['target'])){_0x41e2dd=_0x51bb5b['target'][0x0],this['context']instanceof _0x2d5d5b?_0x135328['push'](this['context']):this['context']['editors']&&_0x135328['push'](...this['context']['editors']);for(const _0x23136c of _0x135328)for(const _0x52d479 of _0x23136c['editing']['view']['domRoots']['values']())if(_0x52d479['contains'](_0x41e2dd))return void _0x23136c['editing']['view']['focus']();_0x41e2dd['focus']();}};this['listenTo'](this['collection'],'add',(_0x4ddce7,_0xb08845)=>{this['listenTo'](_0xb08845,'escape',_0x5a0783,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x358833,_0x25e71a)=>{this['stopListening'](_0x25e71a,'escape',_0x5a0783);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x5f30da{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x4cca70,_0x15a349];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0e829){super(_0xe0e829),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5958cc=this['context']['config'];_0x5958cc['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5958cc['define']('comments.maxThreadTotalWeight',0x1f4),_0x5958cc['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5958cc['define']('comments.CommentThreadView',Bt),_0x5958cc['define']('comments.CommentView',Ut),_0x5958cc['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x285ae8=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x401103,_0x2a9f24)=>this['_addCommentThread'](_0x2a9f24)),this['on']('submitCommentThread',(_0x45535e,_0x56d0a1)=>this['_submitCommentThread'](_0x56d0a1)),this['on']('resolveCommentThread',(_0x4fa29a,_0x326632)=>this['_resolveCommentThread'](_0x326632)),this['on']('resolveCommentThread',(_0x1a06a7,_0x337b7c)=>this['_updateActiveAnnotation'](_0x337b7c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3396f1,_0x248c28)=>this['_reopenCommentThread'](_0x248c28)),this['on']('reopenCommentThread',(_0x21ed71,_0x5ae5e8)=>this['_updateActiveAnnotation'](_0x5ae5e8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x6ab806,_0x5b974e)=>this['_removeCommentThread'](_0x5b974e)),this['on']('updateCommentThread',(_0x2be3eb,_0x2c8979)=>this['_updateCommentThread'](_0x2c8979)),this['on']('updateCommentThread',(_0x158380,_0x236459)=>this['_updateActiveAnnotation'](_0x236459),{'priority':'lowest'}),this['on']('addComment',(_0x54484f,_0x283566)=>this['_addComment'](_0x283566)),this['on']('updateComment',(_0x303c9d,_0x26e631)=>this['_updateComment'](_0x26e631)),this['on']('removeComment',(_0x4ea57a,_0x5c87a4)=>this['_removeComment'](_0x5c87a4)),this['on']('addComment',(_0x45bbe6,{threadId:_0x5e7d23,isFromAdapter:_0x4ba499})=>{if(_0x4ba499)return;const _0x3ae368=this['getCommentThread'](_0x5e7d23),_0x34fda1=_0x3ae368&&this['_threadToController']['get'](_0x3ae368);_0x34fda1&&_0x34fda1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x285ae8,'change:activeAnnotations',(_0x32702a,_0x42bd23,_0x2f3033)=>{const _0x42f17b=Array['from'](_0x2f3033)['map'](_0x2b8b38=>this['_viewToController']['get'](_0x2b8b38['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x42f17b?_0x42f17b['model']:null;});}set['adapter'](_0xa17544){if(this['_adapter'])throw new _0x4e5896('commentsrepository-adapter-already-set');this['_adapter']=_0xa17544;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5e5cf5=zt,threadId:_0x345e01=_0x4c898f(),comments:_0x110c1a=[],unlinkedAt:_0x32a8fa=null,resolvedAt:_0x57a1bf=null,resolvedBy:_0x31a906=null,target:_0x32e8ce=null,context:_0x55072f=null,attributes:_0x364c6e={},isResolvable:_0x4c9d4d=!0x0,isSubmitted:_0x2a677f=!0x1,isFromAdapter:_0x12083d=!0x1}={}){return this['fire'](ii('addCommentThread',_0x5e5cf5),{'channelId':_0x5e5cf5,'threadId':_0x345e01,'comments':_0x110c1a,'unlinkedAt':_0x32a8fa,'resolvedAt':_0x57a1bf,'resolvedBy':_0x31a906,'target':_0x32e8ce,'context':_0x55072f,'attributes':_0x364c6e,'isFromAdapter':_0x12083d,'isResolvable':_0x4c9d4d,'isSubmitted':_0x2a677f}),this['getCommentThread'](_0x345e01);}['openNewCommentThread']({channelId:_0x45f324=zt,threadId:_0x489ea8=_0x4c898f(),target:_0x5c7945,context:_0x3194e1=null,isResolvable:_0x1eb349=!0x0}){if(this['_readOnlyChannels']['has'](_0x45f324)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5c7945)throw new _0x4e5896('commentsrepository-missing-target');const _0x15eeae=this['addCommentThread']({'channelId':_0x45f324,'threadId':_0x489ea8,'target':_0x5c7945,'context':_0x3194e1,'isResolvable':_0x1eb349});if(!_0x15eeae)return null;const _0x4777e5=this['_threadToController']['get'](_0x15eeae),_0xc62d2c=_0x4777e5['view']['commentThreadInputView']['commentInputView'],_0xa536=this['context']['plugins']['get']($t),_0x43b387=_0xa536['getByInnerView'](_0x4777e5['view']);return _0xa536['activate'](_0x43b387),_0xc62d2c['once']('editorReady',()=>_0xc62d2c['focus']()),_0x15eeae;}['hasCommentThread'](_0x481677){if('string'!=typeof _0x481677)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x481677);}['updateCommentThread']({channelId:_0x4dd77f=zt,threadId:_0x445c86,context:_0xbf8d9,unlinkedAt:_0x4b7bb8,attributes:_0x190c4c,isFromAdapter:_0x13dd85=!0x1}){return this['fire'](ii('updateCommentThread',_0x4dd77f),{'channelId':_0x4dd77f,'threadId':_0x445c86,'context':_0xbf8d9,'unlinkedAt':_0x4b7bb8,'attributes':_0x190c4c,'isFromAdapter':_0x13dd85}),this['getCommentThread'](_0x445c86);}['getCommentThread'](_0x1e8576){if('string'!=typeof _0x1e8576)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1e8576);}['fetchCommentThread']({channelId:_0x2e6492,threadId:_0x5e6605}={}){const _0x4c7261=this['getCommentThread'](_0x5e6605);if(_0x4c7261)return Promise['resolve'](_0x4c7261);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4e5896('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2e6492,'threadId':_0x5e6605})['then'](_0x586ff1=>this['hasCommentThread'](_0x5e6605)?this['getCommentThread'](_0x5e6605):_0x586ff1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2e6492},_0x586ff1)):void 0x0)['catch'](_0x59ee35=>{throw console['error'](_0x59ee35),new _0x4e5896('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2c5d6d,skipNotAttached:_0x3f9514=!0x1,skipEmpty:_0x2736d3=!0x1,toJSON:_0x55c6e1=!0x1}={}){const _0x99a238=[];for(const _0x5c04f9 of this['_threads']['values']())_0x2c5d6d&&_0x5c04f9['channelId']!==_0x2c5d6d||_0x3f9514&&!_0x5c04f9['isAttached']||_0x2736d3&&0x0===_0x5c04f9['length']||_0x99a238['push'](_0x5c04f9);return _0x55c6e1?_0x99a238['map'](_0x162aa9=>_0x162aa9['toJSON']()):_0x99a238;}['getAnnotationForCommentThread'](_0x57f32d){const _0x532a9f=this['_threadToController']['get'](_0x57f32d);if(!_0x532a9f)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x532a9f['view'])||null;}['getCommentThreadForAnnotation'](_0x339c8e){const _0x2573f7=this['_viewToController']['get'](_0x339c8e['innerView']);return _0x2573f7?_0x2573f7['model']:null;}['setActiveCommentThread'](_0x81a801){const _0x43be30=this['context']['plugins']['get']($t);if(!_0x81a801)return void(this['activeCommentThread']&&_0x43be30['deactivateAll']());const _0x37ebf7=this['getCommentThread'](_0x81a801);if(!_0x37ebf7)throw new _0x4e5896('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x81a801});if(!this['_threadToController']['has'](_0x37ebf7))throw new _0x4e5896('commentsrepository-active-not-attached',null,{'threadId':_0x81a801});const _0x1894f2=_0x43be30['getByInnerView'](this['_threadToController']['get'](_0x37ebf7)['view']);_0x43be30['activate'](_0x1894f2);}['switchReadOnly'](_0x1faf32,_0x43935a){_0x1faf32?this['_readOnlyChannels']['add'](_0x43935a):this['_readOnlyChannels']['delete'](_0x43935a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xf8da03){return this['_readOnlyChannels']['has'](_0xf8da03)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x318d3d,_0x20e7ba){return new It(_0x318d3d,_0x20e7ba);}['setPermissions'](_0x50bdce,_0x3610af=zt){this['_permissions']['set'](_0x3610af,_0x50bdce),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x184d25=zt){return this['_permissions']['has'](_0x184d25)?this['_permissions']['get'](_0x184d25):Jt;}['_addCommentThread']({channelId:_0x16550a,threadId:_0x196d07,comments:_0x57ccdb,unlinkedAt:_0x1feecf,resolvedAt:_0x2eac2f,resolvedBy:_0x20005a,target:_0x3b5b62,context:_0x1ee3b1,attributes:_0x1fb5db,isFromAdapter:_0x462b45,isResolvable:_0x493552,isSubmitted:_0x1892d5}){if('string'!=typeof _0x196d07)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x196d07});if(this['hasCommentThread'](_0x196d07))throw new _0x4e5896('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x196d07});const _0x19dcc9=new Zt(this,{'channelId':_0x16550a,'id':_0x196d07,'context':_0x1ee3b1,'attributes':_0x1fb5db,'unlinkedAt':_0x1feecf,'resolvedAt':_0x2eac2f,'resolvedBy':_0x20005a?this['context']['plugins']['get'](_0x15a349)['getUser'](_0x20005a):null,'isResolvable':_0x493552,'isSubmitted':_0x1892d5||_0x462b45});this['_threads']['set'](_0x196d07,_0x19dcc9);for(const _0x331005 of _0x57ccdb)_0x19dcc9['_add'](this['_createNewComment']({'threadId':_0x196d07,..._0x331005}));return _0x3b5b62&&_0x19dcc9['attachTo'](_0x3b5b62),_0x462b45||!_0x19dcc9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x16550a,'threadId':_0x196d07});}['_submitCommentThread']({channelId:_0x5d9d61,threadId:_0x497744}){if(!this['hasCommentThread'](_0x497744))throw new _0x4e5896('commentsrepository-missing-comment-thread',this);const _0x1675f9=this['getCommentThread'](_0x497744);if(_0x1675f9['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x7bb5a6,comments:_0x4d4d50,resolvedAt:_0x50e872,resolvedBy:_0x1ef164,context:_0x3236ef,attributes:_0x113b64}=_0x1675f9,_0x4d3225=this['context']['plugins']['get']('PendingActions'),_0x17f07d=_0x4d3225['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5d9d61,'threadId':_0x7bb5a6,'comments':_0x4d4d50['map'](_0x24a573=>_0x24a573['toJSON']()),'resolvedAt':_0x50e872,'resolvedBy':_0x1ef164?_0x1ef164['id']:_0x1ef164,'context':_0x3236ef,'attributes':_0x113b64})['then'](({comments:_0x2d0d33})=>{_0x4d3225['remove'](_0x17f07d);for(const _0x422d51 of _0x2d0d33)this['_updateComment']({'channelId':_0x5d9d61,'threadId':_0x497744,'commentId':_0x422d51['commentId'],'createdAt':_0x422d51['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x27b01c=>{throw console['error'](_0x27b01c),new _0x4e5896('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x295550,target:_0x288293}){const _0x2ef7e1=this['getCommentThread'](_0x295550);if(!_0x2ef7e1)throw new _0x4e5896('commentsrepository-attach-missing-comment-thread',this);const _0x3cb8d4=this['context']['plugins']['get']('PendingActions'),_0x177d7b=this['context']['plugins']['get']($t),_0x5bd229=this['_createCommentThreadView'](_0x2ef7e1),_0x368704=new It(_0x2ef7e1,_0x5bd229);let _0x2c5846=null;_0x5bd229['on']('change:isDirty',(_0x4286dd,_0x4a6daa,_0x25c7df)=>{_0x25c7df?_0x2c5846=_0x3cb8d4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2c5846&&(_0x3cb8d4['remove'](_0x2c5846),_0x2c5846=null);}),this['_threadToController']['set'](_0x2ef7e1,_0x368704),this['_viewToController']['set'](_0x5bd229,_0x368704);const _0x40a800=new Kt(this['context']['locale'],_0x5bd229);_0x40a800['bind']('length')['to'](_0x5bd229),_0x40a800['bind']('isDirty')['to'](_0x5bd229,'isDirty',_0x5bd229,'length',(_0x58a2d1,_0x4b3147)=>_0x58a2d1||!_0x4b3147),_0x40a800['bind']('isActive')['to'](_0x5bd229),_0x40a800['type']='comment';const _0x38c93b=new Yt({'view':_0x40a800,'target':_0x288293,'type':'comment','isVisible':!_0x2ef7e1['archivedAt']&&!!('function'==typeof _0x288293?_0x288293():_0x288293)});return _0x5bd229['on']('escape',()=>{_0x38c93b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5bd229,_0x38c93b),_0x177d7b['add'](_0x38c93b),_0x38c93b;}['_bindAnnotationToEditors'](_0x556999,_0x105256){this['listenTo'](_0x556999,'editorReady',(_0xf761f6,_0x2d1dc2)=>{const _0x5e57a8=_0x2d1dc2['ui']['view']['body']['bodyCollectionContainer'];_0x105256['focusableElements']['add'](_0x5e57a8),this['context']instanceof _0x2d5d5b&&this['context']['ui']['focusTracker']['add'](_0x5e57a8);},{'priority':'highest'}),this['listenTo'](_0x556999,'editorDestroyed',(_0x3e86ba,_0x54553e)=>{const _0x40c2b9=_0x54553e['ui']['view']['body']['bodyCollectionContainer'];_0x105256['focusableElements']['has'](_0x40c2b9)&&_0x105256['focusableElements']['remove'](_0x40c2b9),this['context']instanceof _0x2d5d5b&&this['context']['ui']['focusTracker']['remove'](_0x40c2b9);});}['_unbindEditors'](_0x26e638){this['stopListening'](_0x26e638,'editorReady'),this['stopListening'](_0x26e638,'editorDestroyed');}['_createCommentThreadView'](_0x588bf0){const _0x3de4df=this['context']['plugins']['get'](_0x15a349),{config:_0x416a61,locale:_0x361952}=this['context'],_0x2081cd=_0x2c3507(_0x416a61['get']('locale'),_0x361952);return new(0x0,(_0x416a61['get']('comments'))['CommentThreadView'])(_0x361952,_0x588bf0,_0x3de4df['me'],{'editorConfig':{..._0x416a61['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x416a61['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x416a61['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x416a61['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x416a61['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2081cd,'CommentView':_0x416a61['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x34e8c0,channelId:_0x3d8d3a,resolvedAt:_0x4618c8,resolvedBy:_0x2fbc81,isFromAdapter:_0xbea26f}){if(!this['hasCommentThread'](_0x34e8c0))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x34e8c0});const _0x58590d=this['getCommentThread'](_0x34e8c0);if(_0x58590d['isResolved'])throw new _0x4e5896('commentsrepository-resolved-comment-thread',null,{'threadId':_0x34e8c0});const _0x4f19cc=this['context']['plugins']['get'](_0x15a349);if(_0x58590d['resolvedBy']=_0x4f19cc['getUser'](_0x2fbc81),_0x58590d['resolvedAt']=_0x4618c8,_0xbea26f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x44edb9=this['context']['plugins']['get']('PendingActions'),_0x1730fe=_0x44edb9['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3d8d3a,'threadId':_0x34e8c0})['then'](({resolvedAt:_0x24a5b3,resolvedBy:_0x2bdcfa})=>{_0x44edb9['remove'](_0x1730fe),_0x58590d['resolvedBy']['id']!==_0x2bdcfa&&(_0x58590d['resolvedBy']=_0x4f19cc['getUser'](_0x2bdcfa)),_0x58590d['resolvedAt']=_0x24a5b3;})['catch'](_0x5ef80d=>{throw console['error'](_0x5ef80d),new _0x4e5896('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x36147d,channelId:_0x38d5b1,isFromAdapter:_0x1344cb}){if(!this['hasCommentThread'](_0x36147d))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x36147d});const _0x45df14=this['getCommentThread'](_0x36147d);if(!_0x45df14['isResolved'])throw new _0x4e5896('commentsrepository-reopen-comment-thread',null,{'threadId':_0x36147d});if(_0x45df14['resolvedBy']=null,_0x45df14['resolvedAt']=null,_0x1344cb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5b9932=this['context']['plugins']['get']('PendingActions'),_0x4db8be=_0x5b9932['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x38d5b1,'threadId':_0x36147d})['then'](()=>_0x5b9932['remove'](_0x4db8be))['catch'](_0x1afe33=>{throw console['error'](_0x1afe33),new _0x4e5896('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x329dc8,isFromAdapter:_0x39a786}){const _0x3ba969=this['getCommentThread'](_0x329dc8);if(!_0x3ba969)throw new _0x4e5896('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x329dc8),this['_threads']['delete'](_0x329dc8),!_0x3ba969['isSubmitted']||_0x39a786||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4c297a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3abfb8}=_0x3ba969,_0x39274f=_0x4c297a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3abfb8,'threadId':_0x329dc8})['then'](()=>_0x4c297a['remove'](_0x39274f))['catch'](_0x5646ff=>{throw console['error'](_0x5646ff),new _0x4e5896('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x464570,unlinkedAt:_0x26b362,context:_0x4e790f,attributes:_0x51c243,isFromAdapter:_0x148cb0}){if('string'!=typeof _0x464570)throw new _0x4e5896('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x464570});if(!this['hasCommentThread'](_0x464570))throw new _0x4e5896('commentsrepository-missing-comment-thread',null,{'threadId':_0x464570});const _0x5ae6f7=this['getCommentThread'](_0x464570);let _0x32f6eb=!0x1;if(void 0x0!==_0x4e790f&&_0x5ae6f7['context']!==_0x4e790f&&(_0x5ae6f7['context']=_0x4e790f,_0x32f6eb=!0x0),void 0x0!==_0x26b362&&_0x5ae6f7['unlinkedAt']!==_0x26b362&&(_0x5ae6f7['unlinkedAt']=_0x26b362,_0x32f6eb=!0x0),_0x51c243&&!_0x3bf914(_0x51c243,_0x5ae6f7['attributes'])&&(_0x5ae6f7['attributes']=_0x51c243,_0x32f6eb=!0x0),!_0x32f6eb)return Promise['resolve']();if(!_0x5ae6f7['isSubmitted']||_0x148cb0||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x37286d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x277b5f}=_0x5ae6f7,_0x240daa=_0x37286d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x277b5f,'threadId':_0x464570,'context':_0x4e790f,'unlinkedAt':_0x26b362,'attributes':_0x51c243})['then'](()=>_0x37286d['remove'](_0x240daa))['catch'](_0x58466c=>{throw console['error'](_0x58466c),new _0x4e5896('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x34a3fc){const _0x1d786c=this['context']['plugins']['get']($t),_0x4ffb1a=this['getCommentThread'](_0x34a3fc);if(_0x4ffb1a['_isAttached']=!0x1,this['_threadToController']['has'](_0x4ffb1a)){const _0xb7d1fe=this['_threadToController']['get'](_0x4ffb1a),_0x150454=_0xb7d1fe['view'],_0x35bd78=_0x1d786c['getByInnerView'](_0x150454);this['_threadToController']['delete'](_0x4ffb1a),this['_viewToController']['delete'](_0x150454),_0x35bd78&&_0x1d786c['remove'](_0x35bd78),_0xb7d1fe['destroy'](),_0x150454['destroy']()['then'](()=>{this['_unbindEditors'](_0x150454);});}}['_updateActiveAnnotation']({threadId:_0x4ebc7f,resolvedAt:_0x236090,unlinkedAt:_0x1d28a9}){const _0x50b480=!!_0x236090,_0x35ab18=this['context']['plugins']['get']($t),_0x3d7f01=this['getCommentThread'](_0x4ebc7f);if(this['_threadToController']['has'](_0x3d7f01)){const _0x56ac6a=this['_threadToController']['get'](_0x3d7f01)['view'],_0x5a1c87=_0x35ab18['getByInnerView'](_0x56ac6a);_0x5a1c87&&(_0x50b480&&_0x35ab18['_removeActiveAnnotation'](_0x5a1c87),_0x1d28a9?_0x5a1c87['isVisible']=!0x1:_0x5a1c87['refreshVisibility']());}}['_getExternalAuthor'](_0x5bd45d){const _0x13df88=this['context']['plugins']['get'](_0x15a349),_0x2ed9bf=_0x2c486f('external:'+_0x5bd45d),_0x6e2835=_0x13df88['getUser'](_0x2ed9bf);return _0x6e2835||_0x13df88['addUser']({'id':_0x2ed9bf,'name':_0x5bd45d});}['_createNewComment']({threadId:_0x295b72,commentId:_0xa335db=_0x4c898f(),content:_0x273a38,authorId:_0x4cf348,createdAt:_0x459418,attributes:_0x1be9c8}){if('string'!=typeof _0xa335db)throw new _0x4e5896('commentsrepository-invalid-commentid');if('string'!=typeof _0x4cf348)throw new _0x4e5896('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x273a38||!_0x273a38['trim']())throw new _0x4e5896('commentsrepository-invalid-comment-content');const _0xd0baf6=this['context']['plugins']['get'](_0x15a349)['getUser'](_0x4cf348);if(!_0xd0baf6)throw new _0x4e5896('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4cf348});let _0x213842=null,_0x17c5bd=_0x459418;return _0x1be9c8?.['@external']&&(_0x213842=this['_getExternalAuthor'](_0x1be9c8['@external']['authorName']),_0x17c5bd=new Date(_0x1be9c8['@external']['createdAt'])),new ti(this,{'threadId':_0x295b72,'id':_0xa335db,'author':_0x213842||_0xd0baf6,'creator':_0xd0baf6,'content':_0x273a38,'createdAt':_0x459418,'authoredAt':_0x17c5bd,'attributes':_0x1be9c8});}['_addComment'](_0x23ce01){let {threadId:_0x25198a,content:_0x136824,attributes:_0x3726bf,isFromAdapter:_0x151bf2}=_0x23ce01;const _0x2f533a=this['getCommentThread'](_0x23ce01['threadId']);if(!_0x2f533a)throw new _0x4e5896('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x471a4d=this['_createNewComment'](_0x23ce01),{id:_0x3fd109}=_0x471a4d;if(_0x2f533a['_add'](_0x471a4d),_0x151bf2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2f533a['isSubmitted'])return Promise['resolve']();const _0x5f52d7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2e7e2d}=_0x2f533a,_0x4baa0a=_0x5f52d7['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3726bf||(_0x3726bf={}),this['adapter']['addComment']({'channelId':_0x2e7e2d,'threadId':_0x25198a,'commentId':_0x3fd109,'content':_0x136824,'attributes':_0x3726bf})['then'](_0x4a3a46=>{_0x5f52d7['remove'](_0x4baa0a),_0x4a3a46&&this['_updateComment']({'channelId':_0x2e7e2d,'threadId':_0x25198a,'commentId':_0x3fd109,'createdAt':_0x4a3a46['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x23a67e=>{throw console['error'](_0x23a67e),new _0x4e5896('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4d6eb6,commentId:_0x179167,content:_0x36d147,createdAt:_0x26b51d,attributes:_0x53ee82,isFromAdapter:_0x1f282d}){if(void 0x0!==_0x36d147&&('string'!=typeof _0x36d147||!_0x36d147['trim']()['length']))throw new _0x4e5896('commentsrepository-update-comment-invalid-content');const _0x1cfa82=this['getCommentThread'](_0x4d6eb6),_0x1a9549=_0x1cfa82['getComment'](_0x179167);if(!_0x1a9549)throw new _0x4e5896('commentsrepository-update-missing-comment',this);let _0x38dbbc=!0x1;if(_0x36d147&&_0x36d147!==_0x1a9549['content']&&(_0x1a9549['isEditable']||_0x1f282d)&&(_0x1a9549['content']=_0x36d147,_0x38dbbc=!0x0),_0x26b51d&&_0x26b51d!==_0x1a9549['createdAt']&&(_0x1a9549['createdAt']=_0x26b51d,_0x1a9549['attributes']&&_0x1a9549['attributes']['@external']||(_0x1a9549['authoredAt']=_0x26b51d),_0x38dbbc=!0x0),_0x53ee82&&!_0x3bf914(_0x53ee82,_0x1a9549['attributes'])&&(_0x1a9549['attributes']=_0x53ee82,_0x38dbbc=!0x0),!_0x38dbbc)return Promise['resolve']();if(_0x1cfa82['fire']('commentUpdated'),_0x1f282d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x38ac9d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x542232}=this['getCommentThread'](_0x1a9549['threadId']),_0x3d78fd=_0x38ac9d['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x542232,'threadId':_0x4d6eb6,'commentId':_0x179167,'content':_0x36d147,'attributes':_0x53ee82})['then'](()=>_0x38ac9d['remove'](_0x3d78fd))['catch'](_0x55c0f8=>{throw console['error'](_0x55c0f8),new _0x4e5896('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4809dd,commentId:_0x3a1b10,isFromAdapter:_0x352e78}){const _0x1c3a62=this['getCommentThread'](_0x4809dd),_0x407e64=_0x1c3a62['getComment'](_0x3a1b10);if(!_0x407e64)throw new _0x4e5896('commentsrepository-remove-missing-comment',this);if(_0x1c3a62['_remove'](_0x407e64),_0x352e78||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x30ba32=this['context']['plugins']['get']('PendingActions'),{channelId:_0x235ae8}=_0x1c3a62,_0x5cc75d=_0x30ba32['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x235ae8,'threadId':_0x4809dd,'commentId':_0x3a1b10})['then'](()=>_0x30ba32['remove'](_0x5cc75d))['catch'](_0x393a97=>{throw console['error'](_0x393a97),new _0x4e5896('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x38d982(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1cfaa7,_0x284a88){super();const _0x5ed422=_0x284a88['isResolvable'];this['channelId']=_0x284a88['channelId'],this['id']=_0x284a88['id'],this['comments']=new _0x2957ce(),this['_repository']=_0x1cfaa7,this['_isAttached']=!0x1,this['_isSubmitted']=_0x284a88['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1cfaa7,'_permissions',_0x1cfaa7,'_readOnlyChannels',()=>_0x1cfaa7['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1cfaa7,'_permissions',()=>_0x1cfaa7['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1cfaa7,'_permissions',()=>{const _0x3c15a5=_0x1cfaa7['getPermissions'](this['channelId']);return _0x3c15a5['write']||_0x3c15a5['admin'];}),this['bind']('isResolvable')['to'](_0x1cfaa7,'_permissions',()=>_0x5ed422&&_0x1cfaa7['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x284a88['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x651bf9,_0x40f618)=>_0x651bf9?_0x40f618?_0x651bf9<_0x40f618?_0x651bf9:_0x40f618:_0x651bf9:_0x40f618),this['set']('unlinkedAt',_0x284a88['unlinkedAt']||null),this['set']('resolvedAt',_0x284a88['resolvedAt']||null),this['set']('resolvedBy',_0x284a88['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3dc1b9=>!!_0x3dc1b9),this['set']('attributes',_0x284a88['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x425c57,_0x3688b1)=>_0x425c57+_0x3688b1['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x49e807,id:_0x497208}=this;this['_repository']['fire'](ii('submitCommentThread',_0x49e807),{'channelId':_0x49e807,'threadId':_0x497208});}['setUnlinkedAt'](_0x131743){this['_update']({'unlinkedAt':_0x131743});}['resolve']({resolvedAt:_0x345936=new Date(),resolvedBy:_0x44a63f='',isFromAdapter:_0x4fe512=!0x1}={}){const _0x577e88=this['_repository']['context']['plugins']['get'](_0x15a349)['me'],{channelId:_0x328d5b,id:_0x1fc7d9}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x328d5b),{'channelId':_0x328d5b,'threadId':_0x1fc7d9,'resolvedAt':_0x345936,'resolvedBy':_0x44a63f||_0x577e88['id'],'isFromAdapter':_0x4fe512});}['reopen']({isFromAdapter:_0x10f70a=!0x1}={}){const {channelId:_0x4506a6,id:_0x37a2b3}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x4506a6),{'channelId':_0x4506a6,'threadId':_0x37a2b3,'isFromAdapter':_0x10f70a});}['setContext'](_0x41b629){this['context']||this['_update']({'context':_0x41b629});}['setAttribute'](_0x9ec35c,_0x1d0ec8){const _0x3e6aee=_0x1be07f(this['attributes']);_0x26a330(_0x3e6aee,_0x9ec35c,_0x1d0ec8),this['_update']({'attributes':_0x3e6aee});}['removeAttribute'](_0x1aa108){const _0x4de11e=_0x1be07f(this['attributes']);_0x32c716(_0x4de11e,_0x1aa108),this['_update']({'attributes':_0x4de11e});}['remove']({isFromAdapter:_0x80dcce=!0x1}={}){const {channelId:_0x5585eb,id:_0x48e05b}=this;this['_repository']['fire'](ii('removeCommentThread',_0x5585eb),{'channelId':_0x5585eb,'threadId':_0x48e05b,'isFromAdapter':_0x80dcce});}['attachTo'](_0x25ce8b){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x25ce8b});}['addComment'](_0x32b1c4){const {channelId:_0x75ef82,id:_0x495ed0}=this;this['_repository']['fire'](ii('addComment',_0x75ef82,_0x495ed0),Object['assign']({'channelId':_0x75ef82,'threadId':_0x495ed0},_0x32b1c4));}['getComment'](_0x236b81){if('string'!=typeof _0x236b81)throw new _0x4e5896('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x236b81});return this['comments']['get'](_0x236b81);}['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'](_0x13edae=>_0x13edae['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1d506e){return this['listenTo'](_0x1d506e,'change:authoredAt',()=>{const _0x17790d=this['_findOptimalIndex'](_0x1d506e),_0x265d59=this['comments'];_0x17790d-0x1!=_0x265d59['getIndex'](_0x1d506e)&&_0x17790d+0x1!=_0x265d59['getIndex'](_0x1d506e)&&(this['_remove'](_0x1d506e),this['_add'](_0x1d506e));}),this['comments']['add'](_0x1d506e,this['_findOptimalIndex'](_0x1d506e));}['_update'](_0xfe6d2b){const {channelId:_0x3b701f,id:_0x5d98ca}=this;this['_repository']['fire'](ii('updateCommentThread',_0x3b701f),{..._0xfe6d2b,'channelId':_0x3b701f,'threadId':_0x5d98ca});}['_remove'](_0x2af828){return this['stopListening'](_0x2af828),_0x2af828['destroy'](),this['comments']['remove'](_0x2af828);}['_findOptimalIndex'](_0x20e882){const _0x4db23b=this['comments']['find'](_0x34e033=>new Date(_0x34e033['authoredAt'])['getTime']()>new Date(_0x20e882['authoredAt'])['getTime']());return _0x4db23b?this['comments']['getIndex'](_0x4db23b):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x38d982(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1268e7,_0x5eaf5a){super();const _0x4e4d27=_0x1268e7['context']['plugins']['get'](_0x15a349)['me'],_0x3f34ad=_0x1268e7['getCommentThread'](_0x5eaf5a['threadId']),_0x341c5e=0x0===_0x3f34ad['comments']['length'],_0x53e935=_0x4e4d27===_0x5eaf5a['author'];this['id']=_0x5eaf5a['id'],this['threadId']=_0x5eaf5a['threadId'],this['author']=_0x5eaf5a['author'],this['creator']=_0x5eaf5a['creator'],this['isExternal']=Boolean(_0x5eaf5a['attributes']&&_0x5eaf5a['attributes']['@external']),this['set']('content',_0x5eaf5a['content']),this['createdAt']=_0x5eaf5a['createdAt']||new Date(),this['set']('authoredAt',_0x5eaf5a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3f34ad,'resolvedAt'),this['set']('attributes',_0x5eaf5a['attributes']||{}),this['bind']('isEditable')['to'](_0x1268e7,'_permissions',()=>{const _0x1d0e7b=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['write'],_0xf98db7=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['modifyAll'];return _0x53e935&&_0x1d0e7b||!_0x53e935&&_0xf98db7;}),this['bind']('isRemovable')['to'](_0x3f34ad,'isRemovable',_0x1268e7,'_permissions',_0x42c46e=>{const _0x1ae820=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['write'],_0x5157f8=_0x1268e7['getPermissions'](_0x3f34ad['channelId'])['modifyAll'];return _0x53e935&&_0x1ae820||_0x42c46e&&_0x341c5e||!_0x53e935&&_0x5157f8&&!_0x341c5e;}),this['bind']('isReadOnly')['to'](_0x3f34ad,'isReadOnly'),this['_repository']=_0x1268e7;}get['weight'](){return Math['max'](function(_0x54e5a8){const _0x240d68=document['createElement']('div');return _0x240d68['innerHTML']=_0x54e5a8,_0x240d68['textContent']['length'];}(this['content']),0xc8);}['update'](_0x32dc9a){const {threadId:_0x4b0896,id:_0x29a854}=this;if(!this['_repository']['hasCommentThread'](_0x4b0896))throw new _0x4e5896('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3a52bc}=this['_repository']['getCommentThread'](_0x4b0896);this['_repository']['fire'](ii('updateComment',_0x3a52bc,_0x4b0896),{'channelId':_0x3a52bc,'threadId':_0x4b0896,'commentId':_0x29a854,..._0x32dc9a});}['setAttribute'](_0x1c3f7e,_0x94a930){const _0x154d99=_0x1be07f(this['attributes']);_0x26a330(_0x154d99,_0x1c3f7e,_0x94a930),this['update']({'attributes':_0x154d99});}['removeAttribute'](_0x30dd72){const _0x5102d4=_0x1be07f(this['attributes']);_0x32c716(_0x5102d4,_0x30dd72),this['update']({'attributes':_0x5102d4});}['remove'](_0x1d24c0={}){if(!_0x1d24c0['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x545302,id:_0x551648}=this;if(!this['_repository']['hasCommentThread'](_0x545302))throw new _0x4e5896('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x16b639}=this['_repository']['getCommentThread'](_0x545302);this['_repository']['fire'](ii('removeComment',_0x16b639,_0x545302),{'channelId':_0x16b639,'threadId':_0x545302,'commentId':_0x551648,..._0x1d24c0});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x3c80fc,..._0xb26e64){for(const _0x59a5f7 of _0xb26e64)void 0x0!==_0x59a5f7&&(_0x3c80fc+=':'+String(_0x59a5f7));return _0x3c80fc;}class ei extends _0x5d7909{constructor(_0x130997){super(_0x130997),this['set']('hasContent',!0x1);}['refresh'](){const _0x15ac1b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x40d515 of _0x15ac1b['getRanges']())if(this['_hasContent'](_0x40d515))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x407267=_0x4c898f(),ranges:_0x1bf560,comment:_0x1cd85c}={}){const _0x2872f5=this['editor']['model'],_0x2963a6=_0x1bf560??Array['from'](_0x2872f5['document']['selection']['getRanges']()),_0x330842=[];for(const _0x318d9b of _0x2963a6)this['_hasContent'](_0x318d9b)&&_0x330842['push'](this['_trimToContent'](_0x318d9b));if(!_0x330842['length'])throw new _0x4e5896('addcommentthreadcommand-incorrect-ranges',null);_0x1cd85c&&this['_createCommentThread'](_0x407267,_0x1cd85c),this['_createMarkersFromRanges'](_0x407267,_0x330842,!!_0x1cd85c);}['_createMarkersFromRanges'](_0x2799e8,_0x4cf49e,_0x33c7fc){this['editor']['model']['change'](_0x51cdd9=>{for(const _0x569005 of _0x4cf49e){const _0x5d24b1=_0x4c898f()['substr'](0x1,0x5),_0x3435d5='comment:'+_0x2799e8+':'+_0x5d24b1;_0x51cdd9['addMarker'](_0x3435d5,{'range':_0x569005,'usingOperation':_0x33c7fc,'affectsData':_0x33c7fc});}});}['_createCommentThread'](_0x454565,_0xbe24a1){const _0x1a8cd9=this['editor']['plugins']['get']('CommentsRepository'),_0x58d0f3=this['editor']['config']['get']('collaboration.channelId'),_0x3d3a70=this['editor']['plugins']['get']('Users')['me'];if(!_0x3d3a70)throw new _0x4e5896('addcommentthreadcommand-user-not-found',null);_0x1a8cd9['addCommentThread']({'threadId':_0x454565,'channelId':_0x58d0f3,'comments':[{'authorId':_0x3d3a70['id'],'content':_0xbe24a1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x9427da){for(const _0x2cda91 of _0x9427da['getItems']())if(this['_itemIsContent'](_0x2cda91))return!0x0;return!0x1;}['_itemIsContent'](_0x6be36e){return _0x6be36e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x6be36e)&&!_0x6be36e['is']('element','tableCell');}['_trimToContent'](_0x7bbad3){const _0x38c21b=_0x4ff5de=>!this['_itemIsContent'](_0x4ff5de['item']),_0x378edd=_0x7bbad3['start']['getLastMatchingPosition'](_0x38c21b),_0x5025be=_0x7bbad3['end']['getLastMatchingPosition'](_0x38c21b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x378edd,_0x5025be);}}class si extends _0x1576f0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ca239){super(_0x5ca239),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x282069=this['editor'],_0x48e183=_0x282069['model']['document']['selection'],_0x1e1103=_0x538c79(()=>this['refreshSelectedViews'](),0xa);_0x48e183['on']('change:range',(_0x57d1a8,_0x4c3b8c)=>{_0x4c3b8c['directChange']&&(_0x1e1103['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x282069['editing']['view']['document'],'change:isFocused',(_0x378b34,_0x320787,_0x59964d)=>{_0x59964d&&_0x1e1103();}),this['listenTo'](_0x282069['ui']['focusTracker'],'change:isFocused',(_0x39ef4a,_0x22c6ee,_0x3efc01)=>{_0x3efc01||this['fire']('blur',{'isAnnotationTracked':_0xcd19a1=>this['_editorAnnotationsData']['has'](_0xcd19a1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1343f7){if(this['_editorAnnotations']['has'](_0x1343f7['view']))return;this['_editorAnnotations']['add'](_0x1343f7['view']),this['editor']['ui']['focusTracker']['add'](_0x1343f7['view']['element']);const _0x36b747=this['editor']['plugins']['get']($t);this['listenTo'](_0x36b747['collection'],'remove',(_0x334da5,_0x5c3f01)=>{this['editor']['ui']['focusTracker']['remove'](_0x5c3f01['view']['element']),this['_editorAnnotations']['delete'](_0x5c3f01['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x355ff4){if('function'!=typeof _0x355ff4)throw new _0x4e5896('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x355ff4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x22074e,annotations:_0x12ca40}){const _0x5360ae=[],_0x22e204=this['editor']['model']['document']['selection'],_0x5ae893=Array['from'](_0x22e204['getRanges']());for(const [_0x104a85,_0x743544]of this['_editorAnnotationsData']){const _0x412db6=_0x2c5189(_0x743544),_0x320d4d=_0x12ca40['getByInnerView'](_0x104a85);_0x412db6&&_0x320d4d&&_0x5360ae['push']({'annotation':_0x320d4d,'range':_0x412db6});}function _0x2c5189(_0x327098){for(const _0x584ad8 of _0x327098)for(const _0x171ec5 of _0x5ae893)if(_0x584ad8['containsRange'](_0x171ec5,!_0x22e204['isCollapsed']))return _0x584ad8;return null;}return _0x5360ae['sort']((_0x44643b,_0x55c919)=>{const _0x4adc1a=_0x44643b['range'],_0x2bbc18=_0x55c919['range'];if(!_0x4adc1a['isEqual'](_0x2bbc18)){if(_0x4adc1a['containsRange'](_0x2bbc18,!0x0))return 0x1;if(_0x2bbc18['containsRange'](_0x4adc1a,!0x0))return-0x1;}return _0x44643b['annotation']==_0x22074e?-0x1:_0x55c919['annotation']==_0x22074e?0x1:0x0;})['map'](_0xf93f4f=>_0xf93f4f['annotation']);}get['_editorAnnotationsData'](){const _0x4c29d7=new Map();for(const _0x5ac879 of Array['from'](this['_dataCollectors']))for(const [_0x53c987,_0x1b3a97]of _0x5ac879())_0x4c29d7['set'](_0x53c987,_0x1b3a97);return _0x4c29d7;}}class ni extends _0x1576f0{['afterInit'](){const _0x1e46f4=this['editor'];if(!_0x1e46f4['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1e46f4['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x1576f0{constructor(_0xb4d5cd){super(_0xb4d5cd),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x237401=this['editor'],_0x51aee2=_0x237401['commands']['get']('importWord'),_0x477158=_0x237401['plugins']['get'](_0x15a349);_0x51aee2&&(_0x51aee2['on']('execute',(_0x353ddf,[,_0x3c0ef2])=>{_0x3c0ef2['collaboration_features']={'comments':!0x0,'user_id':_0x477158['me']['id']};},{'priority':_0x18180e['high']+0xa}),this['listenTo'](_0x51aee2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2558e6,_0x46c62a){const {comment_threads:_0x27afdc}=_0x46c62a;_0x27afdc&&_0x27afdc['forEach'](({thread_id:_0x296bf4,comments:_0x774320,is_resolved:_0x537107})=>{const _0x428784=new Date(),_0x17c792=_0x774320['map'](({author:_0x5f5540,content:_0x359154,created_at:_0x27ca40})=>({'content':_0x359154,'authorId':this['editor']['plugins']['get'](_0x15a349)['me']['id'],'createdAt':_0x428784,'attributes':{'@external':{'authorName':_0x5f5540,'createdAt':_0x27ca40?new Date(_0x27ca40):new Date(),'source':'importWord'}}})),_0x19ae36=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x19ae36,'threadId':_0x296bf4,'comments':_0x17c792,'resolvedAt':_0x537107?_0x428784:null});});}}class ri extends _0x1576f0{constructor(_0x16a495){super(_0x16a495),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x16305d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x16305d,'contentInsertion',(_0xd2acb0,_0x2dc755)=>this['_removeMarkersWithoutThreads'](_0x2dc755['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x49be0f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x49be0f;const _0x59aeea=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1489a5 of _0x49be0f['keys']()){const [_0x50f0ea,_0x420e0c]=_0x1489a5['split'](':');'comment'!=_0x50f0ea||_0x59aeea['hasCommentThread'](_0x420e0c)||_0x49be0f['delete'](_0x1489a5);}return _0x49be0f;}['_registerMarkerInClipboardPipeline'](){const _0x1430b3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5dabf5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5dabf5&&_0x1430b3['_registerMarkerToCopy']('comment',_0x5dabf5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x298e9f){switch(_0x298e9f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x15a62a){const _0x428429=_0x15a62a['split'](':');return{'group':_0x428429[0x0],'id':_0x428429[0x1],'part':_0x428429[0x2]};}class ai extends _0x1576f0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x10a7a2,_0x11ed05)=>{if(!_0x11ed05['options']['showCommentHighlights'])return null;if(_0x11ed05['options']['ignoreResolvedComments']){const {id:_0x5b6f50}=hi(_0x10a7a2['markerName']),_0x42c582=this['editor']['plugins']['get'](Qt);if(_0x42c582['getCommentThread'](_0x5b6f50)?.['isResolved']&&_0x10a7a2['item'])return _0x11ed05['consumable']['consume'](_0x10a7a2['item'],'addMarker:'+_0x10a7a2['markerName']),_0x11ed05['consumable']['consume'](_0x10a7a2['item'],'removeMarker:'+_0x10a7a2['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x301ad2=>{_0x301ad2['on']('addMarker:comment',(_0x5ec664,_0x16ee00,_0x5d8de1)=>{if(!_0x5d8de1['options']['showCommentHighlights'])return;const _0x561be6=_0x16ee00['item'];if(!_0x561be6)return;const _0x4a07a6=_0x5d8de1['mapper']['toViewElement'](_0x561be6);this['editor']['model']['schema']['isObject'](_0x561be6)&&_0x4a07a6&&!_0x4a07a6['getCustomProperty']('widget')&&_0x4a07a6['is']('containerElement')&&Ct(_0x4a07a6,_0x5d8de1['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x292411,{writer:_0x35b39a,options:_0x5bcaa7})=>{if(!_0x5bcaa7['showCommentHighlights'])return null;const _0x16146d=_0x35b39a['createContainerElement']('div'),_0x565fbb=_0x35b39a['createEmptyElement']('hr');return _0x35b39a['addClass']('ck-horizontal-line',_0x16146d),_0x35b39a['insert'](_0x35b39a['createPositionAt'](_0x16146d,0x0),_0x565fbb),_0x16146d;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1d0f57,{writer:_0x1dc694,options:_0xc5e2f6})=>{if(!_0xc5e2f6['showCommentHighlights'])return null;const _0x213b3e=_0x1dc694['createContainerElement']('span'),_0x3ba17a=_0x1dc694['createEmptyElement']('img');return _0x1dc694['addClass']('image-inline',_0x213b3e),_0x1dc694['insert'](_0x1dc694['createPositionAt'](_0x213b3e,0x0),_0x3ba17a),_0x213b3e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x25ca77,{writer:_0x57d2cc,options:_0x320d20})=>{if(_0x320d20['showCommentHighlights'])return _0x57d2cc['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x147ca7,_0x34fbda,_0x493b69)=>{_0x493b69['options']['showCommentHighlights']&&_0x147ca7['stop']();},{'priority':'high'});}}class ci extends _0x1576f0{static get['requires'](){return[Qt,si,_0x15a349,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35a6cd){super(_0x35a6cd),this['set']('isThreadsLoadingPaused',!0x0),_0x35a6cd['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x30456a,_0x517fed,_0x28762d,_0x55b538)=>{const _0x3d6a0d=_0x35a6cd['plugins']['get'](Qt),_0x1921c7=_0x28762d?hi(_0x28762d)['id']:null;_0x35a6cd['model']['change'](()=>{if(_0x1921c7){const _0x728a96=this['getAllMarkersForId'](_0x1921c7);for(const _0x1296df of _0x728a96)_0x35a6cd['editing']['reconvertMarker'](_0x1296df);}if(_0x55b538){const {id:_0x3bb718}=hi(_0x55b538),_0x17f701=_0x3d6a0d['getCommentThread'](_0x3bb718);if(_0x17f701&&_0x17f701['unlinkedAt'])return;if(_0x17f701&&!_0x17f701['isAttached'])return;const _0x1e0315=this['getAllMarkersForId'](_0x3bb718);for(const _0x2a6b53 of _0x1e0315)_0x35a6cd['editing']['reconvertMarker'](_0x2a6b53);}}),_0x1921c7&&this['scrollToThreadMarker'](_0x1921c7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x57e5ef=this['editor'],_0x2004bd=_0x57e5ef['plugins']['get'](Qt),_0x56ca79=_0x57e5ef['config']['get']('collaboration.channelId'),_0x439660=_0x2004bd['getCommentThreads']()['filter'](_0x201f90=>_0x201f90['channelId']!==_0x56ca79);_0x57e5ef['commands']['add']('addCommentThread',new ei(_0x57e5ef)),this['listenTo'](_0x57e5ef,'change:isReadOnly',(_0x42357c,_0x457fa1,_0x38e364)=>{_0x2004bd['switchReadOnly'](_0x38e364,_0x57e5ef['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2004bd,di('addCommentThread',_0x56ca79),(_0x471057,{threadId:_0x5887b7})=>{const _0x29686c=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x5887b7);_0x29686c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5887b7);}),this['listenTo'](_0x2004bd,di('removeCommentThread',_0x56ca79),(_0x223e5e,{threadId:_0x33d0d5})=>{_0x57e5ef['model']['enqueueChange']({'isUndoable':!0x1},_0x4f7fb9=>{const _0x4fbb8e=this['getAllMarkersForId'](_0x33d0d5);for(const _0x547901 of _0x4fbb8e)_0x4f7fb9['removeMarker'](_0x547901);});}),this['listenTo'](_0x2004bd,di('resolveCommentThread',_0x56ca79),(_0x3aa565,{threadId:_0x11f65d})=>{(this['_reconvertMarkers'](_0x11f65d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x11f65d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2004bd,di('reopenCommentThread',_0x56ca79),(_0x6afddf,{threadId:_0x1a042e})=>{this['_reconvertMarkers'](_0x1a042e);},{'priority':'low'}),this['listenTo'](_0x2004bd,di('addComment',_0x56ca79),(_0x105ccf,{threadId:_0x4a77a2,isFromAdapter:_0x36cfce})=>{const _0x3eeb86=this['getAllMarkersForId'](_0x4a77a2);if(_0x36cfce||0x0==_0x3eeb86['length']||!_0x2004bd['hasCommentThread'](_0x4a77a2))return;0x1===_0x2004bd['getCommentThread'](_0x4a77a2)['length']&&_0x57e5ef['model']['enqueueChange']({'isUndoable':!0x1},_0x1c1adc=>{for(const _0x301a41 of _0x3eeb86)_0x1c1adc['updateMarker'](_0x301a41,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x439660);}['afterInit'](){!async function(_0x14ec54){const _0x289512=_0x1e266b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4ddc6e=0x73460ab3,_0x1c6b10=0x73418f13^_0x4ddc6e,_0x5b4f12=window[_0x1e266b([0x44,0x61,0x74,0x65])][_0x1e266b([0x6e,0x6f,0x77])](),_0x4b61b0=_0x14ec54[_0x1e266b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7c8a01=new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bba6e=>{_0x4b61b0[_0x1e266b([0x6f,0x6e,0x63,0x65])](_0x1e266b([0x72,0x65,0x61,0x64,0x79]),_0x3bba6e);}),_0x3a40f3={[_0x1e266b([0x6b,0x74,0x79])]:_0x1e266b([0x45,0x43]),[_0x1e266b([0x75,0x73,0x65])]:_0x1e266b([0x73,0x69,0x67]),[_0x1e266b([0x63,0x72,0x76])]:_0x1e266b([0x50,0x2d,0x32,0x35,0x36]),[_0x1e266b([0x78])]:_0x1e266b([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x1e266b([0x79])]:_0x1e266b([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x1e266b([0x61,0x6c,0x67])]:_0x1e266b([0x45,0x53,0x32,0x35,0x36])},_0x3d151b=_0x4b61b0[_0x1e266b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1e266b([0x67,0x65,0x74])](_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5ec578(){let _0x2c5f23,_0x2e7594=null,_0x292f5b=null;try{if(_0x3d151b==_0x1e266b([0x47,0x50,0x4c]))return _0x1e266b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c5f23=_0x135dea(),!_0x2c5f23)return _0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c5f23[_0x1e266b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x292f5b=_0x5e375d(_0x2c5f23[_0x1e266b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c5f23[_0x1e266b([0x6a,0x74,0x69])])),await _0x1f7518()?_0x1a5349()?_0x4d9589()?_0x1e266b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x399988()?(_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1e266b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e7594=_0x4611ae(_0x1e266b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x222261()):_0x1e266b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1e266b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1e266b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4d9589(){const _0x4e58e7=[_0x1e266b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1e266b([0x74,0x72,0x69,0x61,0x6c])][_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5b4f12/0x3e8:0xe10*_0x1c6b10;return _0x2c5f23[_0x1e266b([0x65,0x78,0x70])]<_0x4e58e7;}function _0x1a5349(){const _0xf1cc50=_0x2c5f23[_0x1e266b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xf1cc50)return!0x1;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x2a])))return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x43,0x4d,0x54])))return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1789f1())return!0x0;if(_0xf1cc50[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x52,0x43,0x4d,0x54]))){if(_0x48c911())return!0x0;if(_0x58b705()||_0x1d5132())return!0x0;}return!0x1;}function _0x399988(){const _0x4e0f22=_0x2c5f23[_0x1e266b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e0f22||0x0==_0x4e0f22[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a11de}=new URL(window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e0f22[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a11de))return!0x0;const _0xbaaedc=_0x4a11de[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e]));return _0x4e0f22[_0x1e266b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48eda0=>_0x48eda0[_0x1e266b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e266b([0x2a])))[_0x1e266b([0x6d,0x61,0x70])](_0x3cb158=>_0x3cb158[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e])))[_0x1e266b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e6763=>_0x2e6763[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xbaaedc[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e266b([0x6d,0x61,0x70])](_0x3fdec6=>Array(_0xbaaedc[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3fdec6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1e266b([0x66,0x69,0x6c,0x6c])](_0x3fdec6[0x0]===_0x1e266b([0x2a])?_0x1e266b([0x2a]):'')[_0x1e266b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3fdec6))[_0x1e266b([0x73,0x6f,0x6d,0x65])](_0x5e7c41=>_0xbaaedc[_0x1e266b([0x65,0x76,0x65,0x72,0x79])]((_0x4836fe,_0x1bd9b9)=>_0x5e7c41[_0x1bd9b9]===_0x4836fe||_0x5e7c41[_0x1bd9b9]===_0x1e266b([0x2a])));}function _0x222261(){return _0x2e7594&&_0x292f5b?new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49352d,_0x5a2cda)=>{_0x2e7594[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x49352d,_0x5a2cda),_0x292f5b[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x5ae9c6=>{_0x5ae9c6!=_0x1e266b([0x56,0x61,0x6c,0x69,0x64])&&_0x49352d(_0x5ae9c6);},_0x5a2cda);}):_0x2e7594||_0x292f5b||_0x1e266b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5e375d(_0x28d02f,_0x45c030){return new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5deecb=>{if(_0x5de4e8())return _0x5deecb(_0x1e266b([0x56,0x61,0x6c,0x69,0x64]));_0x2c28d6(),_0x4b61b0[_0x1e266b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3e5aea=!0x1;const _0x291a32=_0x4c898f();function _0x587b5a(_0x33604b){return!!_0x33604b&&(typeof _0x33604b===_0x1e266b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x33604b===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x33604b[_0x1e266b([0x74,0x68,0x65,0x6e])]===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x33604b[_0x1e266b([0x63,0x61,0x74,0x63,0x68])]===_0x1e266b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x899d95(_0x4f304e){_0x166fcc(_0x4f304e)[_0x1e266b([0x74,0x68,0x65,0x6e])](_0xed1407=>{if(!_0xed1407||_0xed1407[_0x1e266b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1e266b([0x6f,0x6b]))return _0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d59b9(_0x4d68ad(_0x291a32+_0x45c030))!=_0xed1407[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1e266b([0x56,0x61,0x6c,0x69,0x64]);})[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x4b7a36=>(_0x459950(),_0x4b7a36),()=>{const _0x59e1db=_0x4e7998();return null==_0x59e1db?(_0x459950(),_0x1e266b([0x56,0x61,0x6c,0x69,0x64])):_0x1e266b(_0x5b4f12-_0x59e1db>(0x574a8eb3^_0x4ddc6e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x5deecb)[_0x1e266b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d1fbb=0x7370e433^_0x4ddc6e;function _0x459950(){const _0x71500d=_0x1e266b([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d59b9(_0x4d68ad(_0x28d02f)),_0x1d4991=_0x26703d(_0x5d59b9(window[_0x1e266b([0x4d,0x61,0x74,0x68])][_0x1e266b([0x63,0x65,0x69,0x6c])](_0x5b4f12/_0x4d1fbb)));window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e266b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x71500d,_0x1d4991);}function _0x4e7998(){const _0x5c4416=_0x1e266b([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d59b9(_0x4d68ad(_0x28d02f)),_0x431a51=window[_0x1e266b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1e266b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c4416);return _0x431a51?window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26703d(_0x431a51),0x10)*_0x4d1fbb:null;}function _0x166fcc(_0x51abde){return new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51c400,_0x55386b)=>{_0x51abde[_0x1e266b([0x74,0x68,0x65,0x6e])](_0x51c400,_0x55386b),window[_0x1e266b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55386b,0x7347de73^_0x4ddc6e);});}}_0x4b61b0[_0x1e266b([0x6f,0x6e])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1eedcd,_0x2e4c75)=>{if(_0x2e4c75[0x0]!=_0x28d02f)return _0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2e4c75[0x1]={..._0x2e4c75[0x1],[_0x1e266b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x291a32};},{[_0x1e266b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e266b([0x68,0x69,0x67,0x68])}),_0x4b61b0[_0x1e266b([0x6f,0x6e])](_0x1e266b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x454653=>{_0x587b5a(_0x454653[_0x1e266b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3e5aea=!0x0,_0x899d95(_0x454653[_0x1e266b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1e266b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1e266b([0x6c,0x6f,0x77])}),_0x7c8a01[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>{_0x3e5aea||_0x5deecb(_0x1e266b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5de4e8(){return _0x4b61b0[_0x1e266b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e266b([0x76,0x69,0x65,0x77])][_0x1e266b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1e266b([0x61,0x75,0x74,0x6f]);}function _0x2c28d6(){_0x4b61b0[_0x1e266b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1e266b([0x76,0x69,0x65,0x77])][_0x1e266b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1e266b([0x61,0x75,0x74,0x6f]);}}function _0x4611ae(_0x1bc029){const _0x43d2c9=[new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fced4=>setTimeout(_0x3fced4,0x734f347f^_0x4ddc6e)),_0x7c8a01[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a9dde=>{let _0x35e43d=0x0;_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x6f,0x6e])](_0x1e266b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d6fcb,_0x415b2c)=>{_0x415b2c[0x0][_0x1e266b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35e43d++,_0x35e43d==(0x73460f5b^_0x4ddc6e)&&(_0x5a9dde(),_0x2d6fcb[_0x1e266b([0x6f,0x66,0x66])]());});}))];return window[_0x1e266b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1e266b([0x72,0x61,0x63,0x65])](_0x43d2c9)[_0x1e266b([0x74,0x68,0x65,0x6e])](()=>_0x1bc029);}async function _0x1654c7(){await _0x7c8a01,_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20662e,_0x4b61b0[_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c])][_0x1e266b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20662e,_0x4b61b0[_0x1e266b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1e266b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1789f1(){return window[_0x1e266b([0x67,0x6c,0x6f,0x62])]&&window[_0x1e266b([0x67,0x6c,0x6f,0x62])][_0x1e266b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x48c911(){return _0x38ec6b(_0x1e266b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xabbd37(_0x1e266b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1e266b([0x73,0x74,0x61,0x74,0x65])]==_0x1e266b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x58b705(){return _0x38ec6b(_0x1e266b([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x1d5132(){return _0x38ec6b(_0x1e266b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3022e0(_0x435ea9){const _0xa347d5=_0x5c8cfd();_0x4b61b0[_0xa347d5]=_0x1e266b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x435ea9,_0x435ea9!=_0x1e266b([0x56,0x61,0x6c,0x69,0x64])&&_0x1654c7();}function _0x5c8cfd(){const _0x10501c=window[_0x1e266b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1e266b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1e266b([0x6e,0x6f,0x77])]())[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1e266b([0x2e]),'');let _0xb78d9e=_0x1e266b([0x4b]);for(let _0xb19a75=0x0;_0xb19a75<_0x10501c[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xb19a75+=0x2){let _0x412861=window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10501c[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb19a75,_0xb19a75+0x2));_0x412861>=_0x289512[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x412861-=_0x289512[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb78d9e+=_0x289512[_0x412861];}return _0xb78d9e;}function _0x135dea(){const _0x1f08cb=_0x3d151b[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e]));if(0x3!=_0x1f08cb[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbebb34(_0x1f08cb[0x1]);function _0xbebb34(_0x329626){const _0x3bc4cb=_0x5e22f9(_0x329626);return _0x3bc4cb&&_0x1924bc()?_0x3bc4cb:null;function _0x1924bc(){const _0x5722e6=_0x3bc4cb[_0x1e266b([0x6a,0x74,0x69])],_0x4afa43=window[_0x1e266b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5722e6[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5722e6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fe991={..._0x3bc4cb,[_0x1e266b([0x6a,0x74,0x69])]:_0x5722e6[_0x1e266b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5722e6[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fe991[_0x1e266b([0x76,0x63])],_0x4d68ad(_0x2fe991)==_0x4afa43;}}}async function _0x1f7518(){let _0x258677=!0x0;try{const _0x378265=_0x3d151b[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])](_0x1e266b([0x2e])),[_0x20adc5,_0x41da35,_0x377c55]=_0x378265;return _0x24660e(_0x20adc5),await _0x5e54de(_0x20adc5,_0x41da35,_0x377c55),_0x258677;}catch{return!0x1;}function _0x24660e(_0x356507){const _0x4108ab=_0x5e22f9(_0x356507);_0x4108ab&&_0x4108ab[_0x1e266b([0x61,0x6c,0x67])]==_0x1e266b([0x45,0x53,0x32,0x35,0x36])||(_0x258677=!0x1);}async function _0x5e54de(_0x5b5023,_0x247b53,_0x280af5){const _0x3f5381=window[_0x1e266b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1e266b([0x66,0x72,0x6f,0x6d])](_0xb5edec(_0x280af5),_0x51318e=>_0x51318e[_0x1e266b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x413021=new window[(_0x1e266b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1e266b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5b5023+_0x1e266b([0x2e])+_0x247b53),_0x1395af=window[_0x1e266b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1e266b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1395af)return;const _0x31f4b0=await _0x1395af[_0x1e266b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1e266b([0x6a,0x77,0x6b]),_0x3a40f3,{[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x45,0x43,0x44,0x53,0x41]),[_0x1e266b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1e266b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1395af[_0x1e266b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x45,0x43,0x44,0x53,0x41]),[_0x1e266b([0x68,0x61,0x73,0x68])]:{[_0x1e266b([0x6e,0x61,0x6d,0x65])]:_0x1e266b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x31f4b0,_0x3f5381,_0x413021)||(_0x258677=!0x1);}}function _0x5e22f9(_0x297f0f){return _0x297f0f[_0x1e266b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1e266b([0x65,0x79]))?JSON[_0x1e266b([0x70,0x61,0x72,0x73,0x65])](_0xb5edec(_0x297f0f)):null;}function _0xb5edec(_0x1aa775){return window[_0x1e266b([0x61,0x74,0x6f,0x62])](_0x1aa775[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1e266b([0x2b]))[_0x1e266b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1e266b([0x2f])));}function _0x4d68ad(_0x48551c){let _0x3e2cb4=0x1505;function _0xfe258d(_0x2c3041){for(let _0x1fc8e5=0x0;_0x1fc8e5<_0x2c3041[_0x1e266b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fc8e5++){const _0x5cd5dc=_0x2c3041[_0x1e266b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1fc8e5);_0x3e2cb4=(_0x3e2cb4<<0x5)+_0x3e2cb4+_0x5cd5dc,_0x3e2cb4&=_0x3e2cb4;}}function _0x126c8d(_0x35e45e){Array[_0x1e266b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x35e45e)?_0x35e45e[_0x1e266b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x126c8d):_0x35e45e&&typeof _0x35e45e==_0x1e266b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1e266b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x35e45e)[_0x1e266b([0x73,0x6f,0x72,0x74])]()[_0x1e266b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5b58d0,_0x5c3385])=>{_0xfe258d(_0x5b58d0),_0x126c8d(_0x5c3385);}):_0xfe258d(window[_0x1e266b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x35e45e));}return _0x126c8d(_0x48551c),_0x3e2cb4>>>0x0;}function _0x5d59b9(_0x3d86f0){return _0x3d86f0[_0x1e266b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1e266b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1e266b([0x30]));}function _0x26703d(_0x11f2bf){return _0x11f2bf[_0x1e266b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1e266b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1e266b([0x6a,0x6f,0x69,0x6e])]('');}function _0x38ec6b(_0x38e347){return _0x4b61b0[_0x1e266b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e266b([0x68,0x61,0x73])](_0x38e347);}function _0xabbd37(_0x58488e){return _0x4b61b0[_0x1e266b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1e266b([0x67,0x65,0x74])](_0x58488e);}function _0x20662e(){}function _0x1e266b(_0xb27ada){return _0xb27ada['map'](_0x2ee510=>String['fromCharCode'](_0x2ee510))['join']('');}_0x3022e0(await _0x5ec578());}(this);}['destroy'](){const _0x5020f9=this['editor']['plugins']['get'](Qt),_0x4cf97b=this['editor']['config']['get']('collaboration.channelId');for(const _0x170217 of _0x5020f9['getCommentThreads']({'channelId':_0x4cf97b}))_0x5020f9['_detachCommentThread'](_0x170217['id']),_0x5020f9['_threads']['delete'](_0x170217['id']);super['destroy']();}['hasMarkerForId'](_0x485bf9){return this['getAllMarkersForId'](_0x485bf9)['length']>0x0;}['getAllMarkersForId'](_0x15831a){const _0x2ac637=[];for(const _0x2e3db9 of this['editor']['model']['markers'])_0x2e3db9['name']['startsWith']('comment:'+_0x15831a)&&_0x2ac637['push'](_0x2e3db9);return _0x2ac637;}['scrollToThreadMarker'](_0x2e4b96){setTimeout(()=>{const _0x53233e=this['_getTargetForId'](_0x2e4b96);if(!_0x53233e)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x2e4b96&&_0x3983aa({'target':_0x53233e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x121726){this['editor']['model']['change'](()=>{for(const _0x224a37 of this['getAllMarkersForId'](_0x121726))this['editor']['editing']['reconvertMarker'](_0x224a37);});}['_attachArchivedThread'](_0x391cf4){const _0x32cdcb=this['editor']['plugins']['get'](Qt),_0x4469e2=this['editor']['plugins']['get'](si),_0xb33e18=_0x32cdcb['getCommentThread'](_0x391cf4);if(!_0xb33e18['isAttached']){const _0x22a8d4=_0xb33e18['attachTo'](()=>this['_getTargetForId'](_0xb33e18['id']));_0x4469e2['registerAnnotation'](_0x22a8d4),_0xb33e18['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x29b5ac=this['editor'],_0x42de51=_0x29b5ac['plugins']['get'](_0x15a349);_0x29b5ac['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d65d3,_0x3c3e12)=>{const {id:_0x400e87}=hi(_0x5d65d3['markerName']),_0x441f8e=_0x29b5ac['plugins']['get'](Qt)['getCommentThread'](_0x400e87),_0x364c87=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x400e87;let _0x28f23e;if(_0x441f8e&&_0x441f8e['isResolved']&&!_0x364c87&&_0x5d65d3['item'])return _0x3c3e12['consumable']['consume'](_0x5d65d3['item'],'addMarker:'+_0x5d65d3['markerName']),_0x3c3e12['consumable']['consume'](_0x5d65d3['item'],'removeMarker:'+_0x5d65d3['markerName']),null;const _0x583e54=['ck-comment-marker'];return _0x364c87&&_0x583e54['push']('ck-comment-marker--active'),_0x28f23e=_0x441f8e?.['length']?_0x441f8e['comments']['first']['author']['id']:_0x42de51['me']['id'],{'classes':_0x583e54,'attributes':{'data-comment':_0x400e87,'data-author-id':_0x28f23e}};}}),_0x29b5ac['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5ec32f,{options:_0x5aba75})=>{if(_0x5aba75['showCommentHighlights'])return null;const _0x7095d3=_0x29b5ac['plugins']['get'](Qt),_0x49a401=_0x29b5ac['model']['markers']['get'](_0x5ec32f),{id:_0x260c7f,part:_0x4aa601}=hi(_0x5ec32f);return _0x49a401&&!_0x49a401['affectsData']||_0x5aba75['ignoreResolvedComments']&&_0x7095d3['getCommentThread'](_0x260c7f)?.['isResolved']?null:{'group':'comment','name':_0x4aa601?_0x260c7f+':'+_0x4aa601:_0x260c7f};}}),_0x29b5ac['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3743c9,{writer:_0x4d023c})=>_0x4d023c['createElement']('$marker',{'data-name':'comment:'+_0x3743c9['getAttribute']('id')})}),_0x29b5ac['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4160e3=this['editor'],_0x499d88=_0x4160e3['plugins']['get'](Qt),_0x7a7a32=new Set(),_0x10879b=new Set();_0x4160e3['model']['document']['registerPostFixer'](_0x6a442c=>{let _0x15aa32=!0x1;for(const {name:_0xc29b59,data:_0x41fe4a}of _0x4160e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x168c94,id:_0x2a0d7a}=hi(_0xc29b59);let _0x30bb9b=_0x41fe4a['newRange'];if('comment'!==_0x168c94||!_0x30bb9b)continue;const _0x19e6d9='$graveyard'===_0x30bb9b['root']['rootName'];_0x19e6d9||(_0x30bb9b=li(_0x30bb9b,_0x4160e3['model']),!_0x30bb9b||_0x30bb9b['isCollapsed']||!_0x41fe4a['newRange']||_0x30bb9b['isEqual'](_0x41fe4a['newRange']))?_0x4160e3['model']['hasContent'](_0x30bb9b)&&!_0x19e6d9?this['isThreadsLoadingPaused']?_0x7a7a32['add'](_0xc29b59):this['_handleThreadMarker'](_0xc29b59,_0x2a0d7a):(_0x10879b['add'](_0xc29b59),_0x7a7a32['delete'](_0xc29b59),_0x6a442c['removeMarker'](_0xc29b59),_0x15aa32=!0x0):(_0x6a442c['updateMarker'](_0xc29b59,{'range':_0x30bb9b}),_0x15aa32=!0x0);}return _0x15aa32;}),this['on']('change:isThreadsLoadingPaused',(_0x51abd2,_0x444f62,_0x21fd21)=>{if(!_0x21fd21&&_0x7a7a32['size'])for(const _0x2871fb of _0x7a7a32){const {id:_0x54147c}=hi(_0x2871fb);_0x7a7a32['delete'](_0x2871fb),_0x4160e3['model']['markers']['get'](_0x2871fb)&&this['_handleThreadMarker'](_0x2871fb,_0x54147c);}}),this['listenTo'](_0x4160e3['model']['document'],'change',()=>{for(const {name:_0x31d76e,data:{newRange:_0x52a599}}of _0x4160e3['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5f117d,id:_0x5dd9c6}=hi(_0x31d76e);if('comment'!==_0x5f117d)continue;const _0x23f026=_0x499d88['getCommentThread'](_0x5dd9c6),_0x3e2a99=this['hasMarkerForId'](_0x5dd9c6);_0x23f026&&(!_0x23f026['_hasTargetInContent']&&_0x52a599&&_0x4160e3['editing']['view']['once']('render',()=>{const _0xe4bd05=_0x4160e3['plugins']['get']($t),_0x4e43ff=_0x499d88['_threadToController']['get'](_0x23f026)['view'];_0xe4bd05['getByInnerView'](_0x4e43ff)['refreshVisibility']();},{'priority':'low'}),_0x23f026['_hasTargetInContent']=_0x3e2a99||!!_0x52a599),_0x52a599||(_0x10879b['add'](_0x31d76e),_0x7a7a32['delete'](_0x31d76e));}for(const _0x52efca of _0x10879b){const {id:_0x117ab2}=hi(_0x52efca),_0x461b47=_0x499d88['getCommentThread'](_0x117ab2);if(_0x7a7a32['delete'](_0x52efca),!_0x461b47)continue;const _0x1c463b=this['hasMarkerForId'](_0x117ab2);_0x1c463b||_0x461b47['isSubmitted']?_0x1c463b||_0x461b47['unlinkedAt']||_0x461b47['setUnlinkedAt'](new Date()):_0x461b47['remove']();}_0x10879b['clear']();});}['_handleInitialThreads'](_0x469b12){_0x469b12['forEach'](_0x4e9242=>{_0x4e9242['unlinkedAt']&&this['_attachArchivedThread'](_0x4e9242['id']);});}['_getTargetForId'](_0x19c28e){const _0x1b96db=this['editor'],_0x2827bb=this['getAllMarkersForId'](_0x19c28e);return _0x2fc2b4(_0x1b96db['editing'],_0x2827bb);}['_getTextContext'](_0x2df7fd){const _0x4723e7=this['getAllMarkersForId'](_0x2df7fd);let _0x46bec8='',_0x34f2c8=!0x1;for(const _0x36b37e of _0x4723e7){const _0x1db521=_0x36b37e['getRange']();for(const _0x51052f of Array['from'](_0x1db521['getItems']()))_0x51052f['is']('$textProxy')?(_0x46bec8&&_0x34f2c8&&(_0x46bec8+='\x20',_0x34f2c8=!0x1),_0x46bec8+=_0x51052f['data']):_0x34f2c8=!0x0;_0x34f2c8=!0x0;}return _0x46bec8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x6e3099,_0x2d9321){const _0x324b38=this['editor'],_0x659a73=_0x324b38['plugins']['get'](Qt);let _0x9c54b9=_0x659a73['getCommentThread'](_0x2d9321);const _0x178480=_0x324b38['config']['get']('collaboration.channelId'),_0x1277e0=_0x324b38['plugins']['get'](si);if(_0x9c54b9&&(_0x9c54b9['unlinkedAt']&&_0x9c54b9['setUnlinkedAt'](null),_0x9c54b9['isAttached']))return _0x9c54b9;return!this['getAllMarkersForId'](_0x2d9321)[0x0]['managedUsingOperations']?_0x324b38['editing']['view']['once']('render',()=>{if(_0x659a73['getCommentThread'](_0x2d9321))return;const _0x56e909=_0x324b38['plugins']['get']($t);_0x9c54b9=_0x659a73['openNewCommentThread']({'channelId':_0x178480,'threadId':_0x2d9321,'target':()=>this['_getTargetForId'](_0x2d9321),'context':{'type':'text','value':this['_getTextContext'](_0x2d9321)}});const _0x141344=_0x659a73['_threadToController']['get'](_0x9c54b9)['view'],_0x45e9f4=_0x56e909['getByInnerView'](_0x141344);_0x45e9f4&&_0x1277e0['registerAnnotation'](_0x45e9f4);},{'priority':'low'}):_0x659a73['fetchCommentThread']({'channelId':_0x178480,'threadId':_0x2d9321})['then'](_0x230982=>{if('destroyed'!==_0x324b38['state']){if(_0x9c54b9=_0x230982,_0x9c54b9&&!_0x9c54b9['isAttached']){const _0x43855d=_0x9c54b9['attachTo'](()=>this['_getTargetForId'](_0x2d9321));_0x1277e0['registerAnnotation'](_0x43855d),_0x9c54b9['isResolved']&&this['_reconvertMarkers'](_0x2d9321);}else{if(!_0x9c54b9){const _0x1410e6=this['getAllMarkersForId'](_0x2d9321);_0x324b38['model']['change'](_0x3444da=>{for(const _0x366f83 of _0x1410e6)_0x3444da['removeMarker'](_0x366f83);});}}}}),_0x9c54b9;}['_handleThreadMarker'](_0x35c674,_0x12a5a0){const _0xe0f4dc=this['_attachMarkerToThread'](_0x35c674,_0x12a5a0);_0xe0f4dc&&!_0xe0f4dc['context']&&_0xe0f4dc['setContext']({'type':'text','value':this['_getTextContext'](_0x12a5a0)});}['_initAriaMarkerChangeAnnouncements'](){const _0x429bba=this['editor'];_0x23d947(_0x429bba['model'],({left:_0x21d80c,entered:_0x22c18b})=>{for(const _0x31f075 of _0x21d80c)if(ui(_0x31f075)){_0x429bba['ui']['ariaLiveAnnouncer']['announce'](bt(_0x429bba['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2db31a of _0x22c18b)if(ui(_0x2db31a)){_0x429bba['ui']['ariaLiveAnnouncer']['announce'](bt(_0x429bba['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1dd84f(_0x29748d)));break;}});}}function di(_0x55206e,_0x33e184){return _0x33e184?_0x55206e+':'+_0x33e184:_0x55206e;}function li(_0x411891,_0x2eec56){const _0x27eb1a=_0x2eec56['schema'],_0x3080ca=_0x2eec56['createRange'](_0x411891['start']);for(const _0xdc00ce of _0x411891['getWalker']()){const {type:_0xed32bb,item:_0x445d25,nextPosition:_0x1b0b4a}=_0xdc00ce;if('text'===_0xed32bb||_0x27eb1a['isObject'](_0x445d25)){const _0x40c28c=_0x2eec56['createPositionBefore'](_0x445d25);_0x3080ca['isCollapsed']&&(_0x3080ca['start']=_0x40c28c),_0x3080ca['end']=_0x1b0b4a;}}return _0x3080ca;}function ui(_0x3f510d){return'comment'===hi(_0x3f510d['name'])['group'];}class mi extends _0x1576f0{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x4eabe7=this['editor'],_0x2593cd=_0x4eabe7['plugins']['get'](Qt),_0x43712e=_0x4eabe7['plugins']['get'](ci),_0x3d3f0c=_0x4eabe7['plugins']['get']($t),_0x4cf359=_0x4eabe7['plugins']['get'](si);_0x4eabe7['ui']['componentFactory']['add']('comment',()=>{const _0x540c15=this['_createUIButton'](_0x39c4f7);return _0x540c15['tooltip']=!0x0,_0x540c15;}),_0x4eabe7['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x4cf359['addSourceCollector'](()=>{const _0x24172d=[];for(const [_0x5813a2,_0x345ed0]of _0x2593cd['_threadToController']){const _0x58aeb1=_0x43712e['getAllMarkersForId'](_0x5813a2['id']),_0x141451=_0x58aeb1['map'](_0x264aaa=>_0x264aaa['getRange']());_0x58aeb1['length']>0x0&&_0x24172d['push']([_0x345ed0['view'],_0x141451]);}return _0x24172d;}),this['listenTo'](_0x3d3f0c,'change:activeAnnotations',(_0x2dd454,_0x1bb94c,_0x21d3bf)=>{const _0x304d23=Array['from'](_0x21d3bf)['map'](_0x58a2a9=>_0x58a2a9['innerView'])['find'](_0x50c893=>_0x2593cd['_viewToController']['has'](_0x50c893));if(!_0x304d23)return void(_0x43712e['activeMarker']=null);const _0x1cee05=_0x2593cd['_viewToController']['get'](_0x304d23)['model']['id'],_0x5e61a3='comment:'+_0x1cee05;_0x1cee05&&_0x43712e['hasMarkerForId'](_0x1cee05)?_0x43712e['activeMarker']=_0x5e61a3:_0x43712e['activeMarker']&&(_0x43712e['activeMarker']=null);}),this['listenTo'](_0x2593cd,'removeCommentThread',(_0x300d52,{threadId:_0x2f3545,isFromAdapter:_0x16dd0f})=>{!_0x16dd0f&&_0x4eabe7['ui']['focusTracker']['isFocused']&&_0x43712e['hasMarkerForId'](_0x2f3545)&&_0x4eabe7['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2593cd,'addComment',(_0x39a6e5,{threadId:_0x17cbeb,isFromAdapter:_0x33f967})=>{if(_0x33f967||!_0x43712e['hasMarkerForId'](_0x17cbeb)||!_0x2593cd['hasCommentThread'](_0x17cbeb))return;0x1===_0x2593cd['getCommentThread'](_0x17cbeb)['length']&&(_0x4eabe7['editing']['view']['focus'](),_0x39a6e5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x467608=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3ef8ad;for(const _0x27ecca in _0x467608){const _0x1e5edf=_0x27ecca,_0x107699=_0x467608[_0x1e5edf];if('commentsLicenseKeyValid'==_0x107699||'commentsLicenseKeyInvalid'==_0x107699||'commentsLicenseKeyExpired'==_0x107699||'commentsLicenseKeyDomainLimit'==_0x107699||'commentsLicenseKeyNotAllowed'==_0x107699||'commentsLicenseKeyEvaluationLimit'==_0x107699||'commentsLicenseKeyUsageLimit'==_0x107699){delete _0x467608[_0x1e5edf],_0x3ef8ad=_0x107699,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3ef8ad&&_0x467608['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3ef8ad&&_0x467608['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3ef8ad&&_0x467608['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3ef8ad&&_0x467608['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x48396b){const _0xa38655=this['editor'],_0x26f739=new _0x48396b(_0xa38655['locale']),_0x4d3d5b=_0xa38655['commands']['get']('addCommentThread');return _0x26f739['set']({'label':bt(_0xa38655['locale'],'Comment'),'icon':_0x1b267d}),_0x26f739['bind']('isEnabled')['to'](_0x4d3d5b,'isEnabled',_0x4d3d5b,'hasContent',(_0x2bfe12,_0x218698)=>_0x2bfe12&&_0x218698),this['listenTo'](_0x26f739,'execute',()=>{_0x4d3d5b['execute']();}),_0x26f739;}}class fi extends _0x1576f0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x1b9493){super(_0x1b9493),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2835fb,_0x40f77e,_0x3938c7)=>{_0x3938c7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x37b28e,_0x5a4a4b]of this['editor']['commands'])_0x5a4a4b['affectsData']&&'addCommentThread'!==_0x37b28e&&_0x5a4a4b['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 _0x25030e=this['editor']['editing']['view']['document'];this['listenTo'](_0x25030e,'cut',_0xba17e1=>_0xba17e1['stop'](),{'priority':'highest'}),this['listenTo'](_0x25030e,'clipboardInput',_0x2b53ac=>_0x2b53ac['stop'](),{'priority':'highest'}),this['listenTo'](_0x25030e,'delete',_0x261e19=>_0x261e19['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x56d8e1,_0x806a88]of this['editor']['commands'])_0x806a88['affectsData']&&'addCommentThread'!==_0x56d8e1&&_0x806a88['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x5f30da{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bf01c){super(_0x2bf01c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1ab453=this['context']['plugins']['get']($t);this['listenTo'](_0x1ab453,'_activateAnnotation',(_0x373b02,_0x5f0b8b)=>{for(const _0x33bfc2 of this['activeUIs']){const _0x375c46=this['_uis']['get'](_0x33bfc2);(0x0,this['uisData']['get'](_0x33bfc2)['filter'])(_0x5f0b8b)&&_0x375c46['setActiveAnnotation'](_0x5f0b8b);}}),this['listenTo'](_0x1ab453,'_deactivateAllAnnotations',()=>{for(const _0x1306f7 of this['activeUIs']){this['_uis']['get'](_0x1306f7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1ab453['_visibleAnnotations'],'add',(_0x436862,_0x189c13)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x189c13);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x432fee){return this['activeUIs']['has'](_0x432fee);}['activate'](_0x3b6f80,_0x3a9469=this['defaultFilter']){const _0x7b79c7=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x3b6f80))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x3b6f80});this['isActive'](_0x3b6f80)&&this['deactivate'](_0x3b6f80),this['activeUIs']['add'](_0x3b6f80);const _0x427560=new jt();Xt({'source':_0x7b79c7['_visibleAnnotations'],'target':_0x427560,'filter':_0x3a9469}),this['uisData']['set'](_0x3b6f80,{'collection':_0x427560,'filter':_0x3a9469});const _0xf20273=this['_uis']['get'](_0x3b6f80);_0xf20273['attach'](_0x427560),this['listenTo'](_0xf20273,'change:activeAnnotation',(_0x1cc811,_0xce7725,_0xf99551,_0x47aea1)=>{_0x47aea1&&_0x7b79c7['_removeActiveAnnotation'](_0x47aea1),_0xf99551&&_0x7b79c7['_addActiveAnnotation'](_0xf99551);});}['deactivate'](_0x401863){if(this['activeUIs']['delete'](_0x401863),!this['_uis']['has'](_0x401863))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x401863});const _0x2d2ee7=this['_uis']['get'](_0x401863);_0x2d2ee7['detach'](),this['stopListening'](_0x2d2ee7),this['uisData']['get'](_0x401863)['collection']['destroy'](),this['uisData']['delete'](_0x401863);}['switchTo'](_0x1631da){if(!this['_uis']['has'](_0x1631da))throw new _0x4e5896('annotationsuis-missing-ui',this,{'uiName':_0x1631da});const _0x8d85be=this['context']['plugins']['get']($t),_0x575268=Array['from'](_0x8d85be['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1631da);const _0x75cee0=this['_uis']['get'](_0x1631da);_0x75cee0['setActiveAnnotation'](_0x575268),_0x75cee0['_setSelectedAnnotations']&&_0x575268&&_0x75cee0['_setSelectedAnnotations']([_0x575268]);}['deactivateAll'](){for(const _0xd29c8 of this['activeUIs'])this['deactivate'](_0xd29c8);}['register'](_0x1cb392,_0x337f97){if(this['_uis']['has'](_0x1cb392))throw new _0x4e5896('annotationsuis-register-already-registered');if('function'!=typeof _0x337f97['attach']||'function'!=typeof _0x337f97['detach']||'function'!=typeof _0x337f97['setActiveAnnotation'])throw new _0x4e5896('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1cb392,_0x337f97);}['refilterAnnotations'](){const _0x58535d=this['context']['plugins']['get']($t)['collection'],_0x3d9a50=new Map(),_0x5ac1a0=Array['from'](this['activeUIs']);for(const _0x296c5f of this['activeUIs']){const _0x3e7f47=this['uisData']['get'](_0x296c5f)['collection'];for(const _0x4b5e0d of _0x3e7f47)_0x3d9a50['set'](_0x4b5e0d,_0x296c5f);}for(const _0x2d29f2 of _0x58535d){const _0x5b4dcb=_0x3d9a50['get'](_0x2d29f2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d29f2);const _0x21f083=_0x5ac1a0['find'](_0x30e0d9=>this['uisData']['get'](_0x30e0d9)['filter'](_0x2d29f2));_0x5b4dcb!==_0x21f083&&(_0x5b4dcb&&this['uisData']['get'](_0x5b4dcb)['collection']['remove'](_0x2d29f2),_0x21f083&&this['uisData']['get'](_0x21f083)['collection']['add'](_0x2d29f2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x96c3fe){const _0x415ea1=[];for(const _0x4cef58 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4cef58)['filter'])(_0x96c3fe)&&_0x415ea1['push'](_0x4cef58);}if(_0x415ea1['length']>0x1)throw new _0x4e5896('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x415ea1,'annotationType':_0x96c3fe['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x5c74f2('px');class _i extends _0x73c3b7{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5cc051){super(_0x5cc051);const _0x3c300b=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 _0x4691cf(),this['focusCycler']=new _0x1962b4({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3c300b['to']('class')],'style':{'minHeight':_0x3c300b['to']('minHeight',_0x2c1528=>'number'==typeof _0x2c1528?wi(_0x2c1528+0xa):null)},'dir':_0x5cc051['uiLanguageDirection'],'role':'application','aria-label':bt(_0x5cc051,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x5cc051,'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',_0x50af3c=>{this['_updateItemPositionInFocusables'](_0x50af3c['source']);}),this['list']['forEach'](_0x2ec8e2=>{this['focusTracker']['add'](_0x2ec8e2['element']),this['_updateItemPositionInFocusables'](_0x2ec8e2);}),this['list']['on']('change',(_0x3d3233,_0x4c7e2b)=>{for(const _0x26d141 of _0x4c7e2b['removed'])this['focusTracker']['remove'](_0x26d141['element']),this['focusables']['remove'](_0x26d141);for(const _0x330805 of _0x4c7e2b['added'])this['focusTracker']['add'](_0x330805['element']),this['_updateItemPositionInFocusables'](_0x330805);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x110ebe){const _0x97bbeb=this['focusables']['getIndex'](_0x110ebe);let _0x452e35,_0x5f2143;for(const _0x1db9e1 of this['focusables'])if(_0x110ebe['top']<_0x1db9e1['top']){_0x452e35=_0x1db9e1;break;}if(_0x5f2143=_0x452e35?this['focusables']['getIndex'](_0x452e35):this['focusables']['length'],-0x1!==_0x97bbeb){if(_0x97bbeb===_0x5f2143-0x1)return;this['focusables']['remove'](_0x110ebe),_0x5f2143=_0x452e35?this['focusables']['getIndex'](_0x452e35):this['focusables']['length'];}this['focusables']['add'](_0x110ebe,_0x5f2143);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x5c74f2('px');class Ai extends _0x73c3b7{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3bee8c){super(_0x3bee8c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5611b0,_0x197b3e)=>_0x5611b0+_0x197b3e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x240b5e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x240b5e['to']('isAnimationDisabled',_0x2c7bab=>_0x2c7bab?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x240b5e['to']('top',_0x2a3e44=>gi(_0x2a3e44))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x37c61d=this['element']['clientHeight'];_0x37c61d&&(this['height']=_0x37c61d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x5f30da{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4319e9){super(_0x4319e9),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 _0x3a2bf3=this['context']['config']['get']('sidebar.container');_0x3a2bf3&&this['setContainer'](_0x3a2bf3);}['setContainer'](_0x57b4ce){if(!yi(_0x57b4ce))throw new _0x4e5896('sidebar-setcontainer-invalid-element');this['container']=_0x57b4ce;}['_attachToContainer']({viewClass:_0x5e70b9='',spaceBetweenItems:_0x1292d8=0x19}={}){if(!yi(this['container']))throw new _0x4e5896('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5e70b9,this['_spaceBetweenItems']=_0x1292d8;}['rearrange']({removedAnnotation:_0xe0e7dc,previousAnnotation:_0x3c9188,nextAnnotation:_0x1ba201}){const _0x40f926=this['getSidebarItemView'](_0xe0e7dc);this['view']['list']['remove'](_0x40f926),this['_destroySidebarItemView'](_0xe0e7dc),_0x3c9188&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3c9188)),_0x1ba201&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ba201)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4f07fb,activatedAnnotation:_0xa0ef9,disableAnimationOnActivatedAnnotation:_0x480b4e}){if(this['_activeAnnotation']=_0xa0ef9,_0x4f07fb){_0x4f07fb['isActive']=!0x1;const _0x22c217=this['getSidebarItemView'](_0x4f07fb);_0x22c217&&_0x480b4e&&(_0x22c217['isAnimationDisabled']=!0x1);}if(_0xa0ef9){const _0x115348=this['getSidebarItemView'](_0xa0ef9);_0x115348&&(_0xa0ef9['isActive']=!0x0,_0x480b4e&&(_0x115348['isAnimationDisabled']=!0x0,_0x115348['top']+=0x1),this['_alignToTargetRect'](_0x115348));}}['_detachFromContainer'](_0x20f248){if(this['view']['element']['remove'](),_0x20f248){for(const _0x2d7ef1 of _0x20f248)this['_destroySidebarItemView'](_0x2d7ef1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x575281,_0xb73041){_0xb73041||(_0xb73041=_0x575281['view']);const _0x18ecf0=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x18ecf0,_0x575281),this['_annotationToSidebarItemView']['set'](_0x575281,_0x18ecf0),_0x18ecf0['content']['add'](_0xb73041),this['listenTo'](_0x575281['view'],'change:targetRect',(_0x1782f2,_0x5ae21f,_0x597a38)=>{const _0x4e0a0f=this['_getTargetTop'](_0x575281,_0x597a38);_0x18ecf0['_targetTop']!=_0x4e0a0f&&(_0x18ecf0['_targetTop']=_0x4e0a0f,this['_setItemTop'](_0x18ecf0,_0x4e0a0f));}),this['listenTo'](_0x18ecf0,'change:top',()=>{this['_recalculate'](_0x18ecf0,'top');}),this['listenTo'](_0x18ecf0,'change:bottom',()=>{this['_recalculate'](_0x18ecf0,'bottom');}),this['_alignToTargetRect'](_0x18ecf0);const _0xfb22e2=this['_getItemBefore'](_0x18ecf0);if(_0xfb22e2)this['_alignAfterItem'](_0xfb22e2,_0x18ecf0)||this['_alignToTargetRect'](_0x18ecf0);else this['_alignToTargetRect'](_0x18ecf0);return this['_updateLastItem'](),this['view']['list']['add'](_0x18ecf0),_0x18ecf0;}['_alignForTopChange'](_0x184dd6){if(!_0x184dd6['content']['length'])return;const _0x155756=this['_getItemBefore'](_0x184dd6);if(!_0x155756)return;const _0x32ecc3=this['_sidebarItemViewToAnnotation']['get'](_0x155756),_0x23f056=this['_activeAnnotation'];_0x23f056&&_0x23f056===_0x32ecc3?this['_alignAfterItem'](_0x155756,_0x184dd6):this['_alignBeforeItem'](_0x184dd6,_0x155756);}['_alignForBottomChange'](_0x293f8c){if(!_0x293f8c['content']['length'])return;const _0xc5c67=this['_getItemAfter'](_0x293f8c);if(!_0xc5c67)return;const _0x104e03=this['_sidebarItemViewToAnnotation']['get'](_0xc5c67),_0x530560=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x28f1d7=this['_activeAnnotation'];_0x28f1d7&&_0x28f1d7===_0x104e03&&_0x530560?(this['_alignBeforeItem'](_0xc5c67,_0x293f8c),this['_alignAfterItem'](_0x293f8c,_0xc5c67)):_0x28f1d7&&_0x28f1d7===_0x104e03?this['_alignBeforeItem'](_0xc5c67,_0x293f8c):this['_alignAfterItem'](_0x293f8c,_0xc5c67);}['_recalculate'](_0x56919f,_0x554bca){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x51a435,changedProp:_0x590582}of this['_recalculateBuffer'])'top'===_0x590582?this['_alignForTopChange'](_0x51a435):this['_alignForBottomChange'](_0x51a435);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x56919f,'changedProp':_0x554bca});}['getSidebarItemView'](_0x248c31){return this['_annotationToSidebarItemView']['get'](_0x248c31);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x496579){const _0x1fe411=this['getSidebarItemView'](_0x496579);this['stopListening'](_0x1fe411),this['stopListening'](_0x496579['view']),_0x1fe411['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x496579),this['_sidebarItemViewToAnnotation']['delete'](_0x1fe411);}['_createSidebarView'](){const _0x2f925e=new _i(this['context']['locale']);return _0x2f925e['render'](),this['on']('change:_lastItem',(_0x2bf863,_0x45412d,_0x1de65e,_0x500fc8)=>{_0x500fc8&&_0x2f925e['unbind']('minHeight'),_0x1de65e?_0x2f925e['bind']('minHeight')['to'](_0x1de65e,'bottom'):_0x2f925e['minHeight']=null;}),_0x2f925e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x47a72e){const _0x3a0f87=this['_sidebarItemViewToAnnotation']['get'](_0x47a72e),_0x225062=_0x3a0f87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a0f87)-0x1);return _0x225062&&this['getSidebarItemView'](_0x225062)||null;}['_getItemAfter'](_0x3ccf17){const _0x32fe6c=this['_sidebarItemViewToAnnotation']['get'](_0x3ccf17),_0x52963e=_0x32fe6c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x32fe6c)+0x1);return _0x52963e&&this['getSidebarItemView'](_0x52963e)||null;}['_alignBeforeItem'](_0x1ed3ad,_0x10d2b0){_0x1ed3ad['updateHeight']();const _0x5843bc=vi(_0x10d2b0['bottom']+this['_spaceBetweenItems'],_0x1ed3ad['top']);return!!_0x5843bc&&(this['_setItemTop'](_0x10d2b0,_0x10d2b0['top']-_0x5843bc),!0x0);}['_alignAfterItem'](_0x510688,_0x13da08){_0x510688['updateHeight']();const _0x2c2556=vi(_0x510688['bottom']+this['_spaceBetweenItems'],_0x13da08['top']);return!!_0x2c2556&&(this['_setItemTop'](_0x13da08,_0x13da08['top']+_0x2c2556,!0x1),!0x0);}['_alignToTargetRect'](_0x319ca5){const _0x2a0074=this['_sidebarItemViewToAnnotation']['get'](_0x319ca5);if(!_0x2a0074||!_0x2a0074['target']||!_0x2a0074['targetRect'])return;const _0x5e8b6e=this['_getTargetTop'](_0x2a0074,_0x2a0074['targetRect']);this['_setItemTop'](_0x319ca5,_0x5e8b6e);}['_getTargetTop'](_0x3d68db,_0x468d97){if(null===_0x468d97)return 0x0;if(_0x3d68db['target']instanceof _0x1419a3)return _0x468d97['top'];{const _0x107b1f=new _0x1419a3(this['view']['element'])['top'];return _0x468d97['top']-_0x107b1f;}}['_setItemTop'](_0x16f593,_0x334c59,_0x38a8a9=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x38a8a9&&(_0x334c59=Math['max'](_0x334c59,this['_getMaxAvailableTop'](_0x16f593))),_0x16f593['top']=_0x334c59;}['_getMaxAvailableTop'](_0x2abe5a){let _0x2faeb4=this['_getItemBefore'](_0x2abe5a),_0x2ac071=0x0;for(;_0x2faeb4;)_0x2faeb4['updateHeight'](),_0x2ac071+=this['_spaceBetweenItems']+_0x2faeb4['height'],_0x2faeb4=this['_getItemBefore'](_0x2faeb4);return _0x2ac071;}}function vi(_0x1d2ab0,_0x41e740){return Math['max'](_0x1d2ab0-_0x41e740,0x0);}function yi(_0x137251){return null!==_0x137251&&'object'==typeof _0x137251&&0x1===_0x137251['nodeType'];}class Ci extends _0x5f30da{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad8cb){super(_0x3ad8cb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2957ce(),this['_refreshPositioningDebounced']=_0x538c79(()=>{_0x3ad8cb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5b1193=this['context']['plugins']['get'](pi),_0x40114e=this['context']['plugins']['get'](Ti);_0x5b1193['register']('wideSidebar',this),_0x40114e['container']&&_0x5b1193['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x55bff1){if(_0x55bff1===this['activeAnnotation'])return;const _0x4783bf=this['context']['plugins']['get'](Ti);_0x4783bf['_activeAnnotation']=_0x55bff1;const _0x4e04f8=this['activeAnnotation'];_0x4783bf['refresh']({'blurredAnnotation':_0x4e04f8,'activatedAnnotation':_0x55bff1}),this['activeAnnotation']=_0x55bff1;}['attach'](_0x1cc1af){this['annotations']=_0x1cc1af;const _0x55b4bf=this['context']['plugins']['get'](Ti);if(_0x55b4bf['_annotations']=_0x1cc1af,this['isAttached'])throw new _0x4e5896('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55b4bf,'set:container',()=>{this['detach'](),this['listenTo'](_0x55b4bf,'change:container',_0x397fc5=>{_0x397fc5['off'](),this['attach'](_0x1cc1af);});}),_0x55b4bf['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x138544=_0x8d9f0b=>{_0x8d9f0b['updateTargetRect'](),_0x55b4bf['addAnnotation'](_0x8d9f0b);};for(const _0x2a3ed3 of _0x1cc1af)_0x138544(_0x2a3ed3);this['listenTo'](_0x1cc1af,'add',(_0x550f6f,_0x451f31)=>{_0x138544(_0x451f31);}),this['listenTo'](_0x1cc1af,'remove',(_0x2b345f,_0x1d70ce,_0x4c696b)=>{_0x55b4bf['rearrange']({'removedAnnotation':_0x1d70ce,'previousAnnotation':_0x1cc1af['get'](_0x4c696b-0x1),'nextAnnotation':_0x1cc1af['get'](_0x4c696b+0x1)}),_0x1d70ce===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1cc1af,'focus',(_0x2a22ef,_0x3d56c5)=>{this['setActiveAnnotation'](_0x3d56c5);}),this['listenTo'](_0x1cc1af,'blur',()=>{this['setActiveAnnotation'](null);});const _0x559509=this['context']instanceof _0x3fe192?this['context']['editors']:new _0x2957ce([this['context']]);for(const _0x1ce5d9 of _0x559509)this['_integrateWithEditorAnnotations'](_0x1ce5d9);this['listenTo'](_0x559509,'add',(_0x53c230,_0x26a9ef)=>{this['listenTo'](_0x26a9ef,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x26a9ef);});}),this['listenTo'](_0x559509,'remove',(_0x1ab7d5,_0x5db258)=>{_0x5db258['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5db258['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4e5896('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1fbbbe=this['context']['plugins']['get'](Ti);_0x1fbbbe['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1fbbbe),this['stopListening'](this['annotations']),this['context']instanceof _0x3fe192&&this['stopListening'](this['context']['editors']);for(const _0x49a2ef of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x49a2ef);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5cc3d7){if(!_0x5cc3d7['plugins']['has']('EditorAnnotations'))return;const _0x137b9c=_0x5cc3d7['plugins']['get']('EditorAnnotations'),_0x8a951a=()=>{const _0x4967b6=_0x137b9c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4967b6[0x0]||null);};this['listenTo'](_0x137b9c,'refresh',_0x8a951a),this['listenTo'](_0x137b9c,'blur',(_0x2b36df,{isAnnotationTracked:_0x4a4a85})=>{this['activeAnnotation']&&_0x4a4a85(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x137b9c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x359414=>{_0x137b9c['hasDomSelection']()&&(_0x8a951a(),_0x359414['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x137b9c);}['_destroyEditorAnnotationsIntegration'](_0x460316){this['stopListening'](_0x460316),this['_editorAnnotations']['remove'](_0x460316);}}class Ii extends _0x39c4f7{['counterView'];constructor(_0x454723){super(_0x454723);const _0x47e7a9=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x12dcc3,_0x26a24c)=>_0x12dcc3?'...':_0x26a24c['toString']()),this['set']('annotationType',''),this['icon']=_0x1b267d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x73c3b7(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x47e7a9['to']('annotationType',_0x50ad1a=>'ck-annotation-counter__badge--'+_0x50ad1a),_0x47e7a9['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x47e7a9['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x5f30da{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f2ce8){super(_0x2f2ce8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xc25130())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2957ce(),this['_refreshPositioningDebounced']=_0x538c79(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xbfe48){this['annotations']=_0xbfe48;const _0x2ef519=this['context']['plugins']['get'](Ti),_0x36f77a=this['balloonPanelView'];if(_0x2ef519['_annotations']=_0xbfe48,this['isAttached'])throw new _0x4e5896('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2ef519,'set:container',()=>{this['detach'](),this['listenTo'](_0x2ef519,'change:container',_0x15a7b9=>{_0x15a7b9['off'](),this['attach'](_0xbfe48);});}),_0x2ef519['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x13a091=_0x19ec6a=>{const _0x2df9ae=new Ii(this['context']['locale']);_0x2ef519['addAnnotation'](_0x19ec6a,_0x2df9ae),this['_annotationToNarrowView']['set'](_0x19ec6a,_0x2df9ae),_0x2df9ae['bind']('isDirty','annotationType','number')['to'](_0x19ec6a['view'],'isDirty','type','length'),_0x2df9ae['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x36f77a['content']['first']!==_0x19ec6a['view']?(this['_showBalloon'](_0x19ec6a),_0x19ec6a['view']['element']['focus'](),this['setActiveAnnotation'](_0x19ec6a)):this['setActiveAnnotation'](null);});};for(const _0x21b9d7 of _0xbfe48)_0x13a091(_0x21b9d7);this['listenTo'](_0xbfe48,'add',(_0x472945,_0x14be81)=>{_0x13a091(_0x14be81);}),this['listenTo'](_0xbfe48,'remove',(_0x532af8,_0x3459b7,_0x5d43e7)=>{this['_annotationToNarrowView']['get'](_0x3459b7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3459b7),_0x2ef519['rearrange']({'removedAnnotation':_0x3459b7,'previousAnnotation':_0xbfe48['get'](_0x5d43e7-0x1),'nextAnnotation':_0xbfe48['get'](_0x5d43e7+0x1)}),_0x3459b7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xbfe48,'focus',(_0x1ce30a,_0x3812b3)=>{this['setActiveAnnotation'](_0x3812b3);}),this['listenTo'](_0xbfe48,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x380a68,_0xc9e12)=>{_0xc9e12['keyCode']===_0x1b2238['esc']&&_0x36f77a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x36f77a['content']['first']),this['_hideBalloon'](),_0xc9e12['stopPropagation'](),_0xc9e12['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x54eba7,_0x1e3d80)=>{const _0x39602c=_0x1e3d80['target'];_0x36f77a['isVisible']&&_0x36f77a['element']['contains'](_0x39602c)||_0x2ef519['view']['element']['contains'](_0x39602c)||_0x54eba7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x823d71=>_0x823d71['contains'](_0x39602c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x24caba=this['context']instanceof _0x3fe192?this['context']['editors']:new _0x2957ce([this['context']]);for(const _0xa99b80 of _0x24caba)this['_integrateWithEditorAnnotations'](_0xa99b80);this['listenTo'](_0x24caba,'add',(_0xac665e,_0x2db0cb)=>{this['listenTo'](_0x2db0cb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2db0cb);});}),this['listenTo'](_0x24caba,'remove',(_0x23b5d1,_0x340e69)=>{_0x340e69['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x340e69['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x33a787){if(_0x33a787===this['activeAnnotation'])return;const _0x4ff36b=this['context']['plugins']['get'](Ti);if(_0x4ff36b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x33a787,'disableAnimationOnActivatedAnnotation':!0x0}),_0x33a787)_0x4ff36b['getSidebarItemView'](_0x33a787)?this['_showBalloon'](_0x33a787):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x33a787;}['detach'](){if(!this['isAttached'])throw new _0x4e5896('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x112065=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3db43a=>_0x3db43a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x112065['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3fe192&&this['stopListening'](this['context']['editors']);for(const _0x3bf040 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3bf040);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'](_0x51365b){if(!_0x51365b['plugins']['has']('EditorAnnotations'))return;const _0xfcff51=_0x51365b['plugins']['get']('EditorAnnotations'),_0x11ba9c=this['context']['plugins']['get'](Ti),_0x33707f=this['annotations'],_0x25eb40=this['balloonPanelView'],_0x41f9bc=()=>{const _0x2e2945=_0xfcff51['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2e2945),this['setActiveAnnotation'](_0x2e2945[0x0]||null);};this['listenTo'](_0xfcff51,'refresh',_0x41f9bc),this['listenTo'](_0xfcff51,'blur',(_0x50fe11,{isAnnotationTracked:_0x28d794})=>{this['activeAnnotation']&&_0x28d794(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xfcff51,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x33707f,'blur',_0x1ec8b8=>{_0xfcff51['hasDomSelection']()&&_0x1ec8b8['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x279a81,_0xfe59a3)=>{const _0x231108=_0xfe59a3['target'];_0x25eb40['isVisible']&&_0x25eb40['element']['contains'](_0x231108)||_0x11ba9c['view']['element']['contains'](_0x231108)||this['activeAnnotation']&&_0xfcff51['hasDomSelection']()&&(_0x41f9bc(),_0x279a81['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xfcff51);}['_destroyEditorAnnotationsIntegration'](_0x572e47){_0x572e47&&(this['stopListening'](_0x572e47),this['_editorAnnotations']['remove'](_0x572e47));}['_setSelectedAnnotations'](_0x3f7324){for(const _0x19cb18 of this['_selectedAnnotations'])_0x3f7324['includes'](_0x19cb18)||this['_manuallyClosedAnnotationViews']['delete'](_0x19cb18['view']);this['_selectedAnnotations']=_0x3f7324;}['_refreshPositioning'](){const _0x4606e2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4606e2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x14446b){if(this['_manuallyClosedAnnotationViews']['has'](_0x14446b['view']))return;const _0x1407a2=this['balloonPanelView']['content']['first'];_0x1407a2!==_0x14446b['view']?(_0x1407a2&&this['_detachListeners'](_0x1407a2),this['_attachListeners'](_0x14446b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x14446b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4b2169=this['balloonPanelView']['content']['first'],_0x2e63e0=_0x4b2169&&this['annotations']['getByView'](_0x4b2169);if(!_0x2e63e0||!this['_annotationToNarrowView']['has'](_0x2e63e0))return;const _0xcdec33=this['_annotationToNarrowView']['get'](_0x2e63e0)['element'],_0x13b0fc=(function(){const _0x28d084=ht['defaultPositions'];return[_0x28d084['southArrowNorthEast'],_0x28d084['northArrowSouthEast'],_0x28d084['southArrowNorth'],_0x28d084['northArrowSouth'],_0x28d084['southArrowNorthWest'],_0x28d084['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xcdec33,'positions':_0x13b0fc});}['_hideBalloon'](){const _0x32ac13=this['balloonPanelView'],_0xca71bf=_0x32ac13['content']['first'];_0xca71bf&&(this['_detachListeners'](_0xca71bf),_0x32ac13['unpin'](),_0x32ac13['content']['clear']());}['_attachListeners'](_0xc33579){this['listenTo'](_0xc33579,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xc33579,'Esc',(_0x725b67,_0x4fbcf5)=>{this['_manuallyClosedAnnotationViews']['add'](_0xc33579),this['_hideBalloon'](),_0x4fbcf5();});}['_detachListeners'](_0x15e544){this['stopListening'](_0x15e544);}}class Ei extends _0x1576f0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4431fc){super(_0x4431fc),_0x4431fc['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4431fc['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x538c79(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x1ad430=this['editor']['plugins']['get'](pi);_0x1ad430['context']===this['editor']&&(_0x1ad430['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4d76f7,_0x479f57)=>{const _0x44c023=this['_balloon'];if(this['isAttached']&&_0x44c023['visibleView']){const _0x5d62fe=this['annotations']['getByView'](_0x44c023['visibleView']);_0x5d62fe&&this['_closeAnnotation'](_0x5d62fe),_0x479f57();}}));}['afterInit'](){const _0x36a3f8=this['editor']['plugins']['get'](pi);_0x36a3f8['context']===this['editor']&&(_0x36a3f8['hasActive']()||_0x36a3f8['switchTo']('inline'));}['setActiveAnnotation'](_0x2f67fe){_0x2f67fe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2f67fe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2f67fe)&&this['_addAnnotationToBalloon'](_0x2f67fe,!0x0),_0x2f67fe['isActive']=!0x0),_0x2f67fe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2f67fe);}['attach'](_0x529c06){this['annotations']=_0x529c06;const _0x1fab79=this['editor']['plugins']['get'](pi),_0x6d6ced=this['_balloon'];if(this['isAttached'])throw new _0x4e5896('inlineannotations-attach-already-attached',this);if(_0x1fab79['context']!==this['editor'])throw new _0x4e5896('inlineannotations-not-allowed-with-context',this);const _0x466e33=this['editor']['plugins']['get'](si);this['listenTo'](_0x466e33,'refresh',()=>{const _0x63b5dc=_0x466e33['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1fd735,_0x313297;!this['_forceRefresh']&&(_0x1fd735=_0x63b5dc,_0x313297=this['_selectedAnnotations'],_0x1fd735['length']===_0x313297['length']&&_0x1fd735['every'](_0x3b69ae=>_0x313297['includes'](_0x3b69ae)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x63b5dc),this['setActiveAnnotation'](_0x63b5dc[0x0]||null));}),this['listenTo'](_0x466e33,'blur',(_0x10d9d9,{isAnnotationTracked:_0xb71e51})=>{this['activeAnnotation']&&_0xb71e51(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x466e33,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x542a0a,_0x31a88a,_0x4c1835)=>{_0x4c1835||this['setActiveAnnotation'](null);}),this['listenTo'](_0x529c06,'remove',(_0x51c203,_0x2e1ab5)=>{this['_removeAnnotationFromBalloon'](_0x2e1ab5),_0x2e1ab5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x6d6ced,'change:visibleView',(_0x17bcaf,_0x1af733,_0x4e241d,_0x367bb1)=>{_0x367bb1&&this['stopListening'](_0x367bb1);const _0x141514=_0x529c06['getByView'](_0x4e241d);_0x4e241d&&_0x141514&&(this['listenTo'](_0x4e241d,'change:height',()=>{_0x6d6ced['updatePosition']();}),this['listenTo'](_0x4e241d,'Esc',()=>{this['_closeAnnotation'](_0x141514),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x141514&&this['setActiveAnnotation'](_0x141514));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x6d6ced['visibleView']&&(_0x529c06['getByView'](_0x6d6ced['visibleView'])&&_0x6d6ced['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 _0x4e5896('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5c4fd3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5c4fd3);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x4d61a2){for(const _0xc835ec of this['_selectedAnnotations'])_0x4d61a2['includes'](_0xc835ec)||this['_manuallyClosed']['delete'](_0xc835ec);for(const _0x4f111b of this['annotations'])_0x4d61a2['includes'](_0x4f111b)||this['_removeAnnotationFromBalloon'](_0x4f111b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x16daa2 of _0x4d61a2)this['_addAnnotationToBalloon'](_0x16daa2);}this['_selectedAnnotations']=_0x4d61a2;}['_addAnnotationToBalloon'](_0x2a809a,_0x10c517=!0x1){this['_manuallyClosed']['has'](_0x2a809a)||(this['_addedAnnotations']['has'](_0x2a809a)||this['_balloon']['hasView'](_0x2a809a['view'])||(this['_addedAnnotations']['add'](_0x2a809a),this['_balloon']['add']({'stackId':_0x2a809a['view']['id'],'view':_0x2a809a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2a809a)}})),_0x10c517&&this['_balloon']['showStack'](_0x2a809a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x170661){const _0x44e712=_0x170661['target'],_0x2889b3=this['editor']['editing']['view'],_0x4aa0cd=_0x2889b3['document']['selection']['getFirstRange'](),_0x28989a=_0x2889b3['domConverter']['viewRangeToDom'](_0x4aa0cd);if(_0x28989a['collapse'](!0x0),_0x44e712){if(_0x44e712 instanceof _0x1419a3)return _0x44e712;let _0x4406b4=[];for(const _0x4aa273 of _0x44e712)_0x4406b4['push'](..._0x1419a3['getDomElementRects'](_0x4aa273));_0x4406b4=function(_0x1209ea){const _0x45d844=[];let _0x4a8e3c=_0x1209ea[0x0];for(let _0x167dc0=0x1;_0x167dc0<_0x1209ea['length'];_0x167dc0++)if(Ni(_0x4a8e3c,_0x1209ea[_0x167dc0])){const _0x27847c=_0x1209ea[_0x167dc0]['width'];_0x4a8e3c['width']+=_0x27847c,_0x4a8e3c['right']+=_0x27847c;}else _0x45d844['push'](_0x4a8e3c),_0x4a8e3c=_0x1209ea[_0x167dc0];return _0x45d844['push'](_0x4a8e3c),_0x45d844;}(_0x4406b4);const _0x48194e=_0x28989a['getBoundingClientRect']();return _0x4406b4['find'](_0x4e4fea=>_0x4e4fea['top']<=_0x48194e['top']&&_0x4e4fea['bottom']>=_0x48194e['bottom']&&_0x4e4fea['left']<=_0x48194e['left']&&_0x4e4fea['right']>=_0x48194e['right'])||_0x4406b4[0x0];}return _0x170661['targetRect']||_0x28989a;}['_removeAnnotationFromBalloon'](_0x36effa){this['_addedAnnotations']['has'](_0x36effa)&&this['_balloon']['hasView'](_0x36effa['view'])&&(this['_addedAnnotations']['delete'](_0x36effa),this['_balloon']['remove'](_0x36effa['view']));}['_closeAnnotation'](_0x26a17f){this['_manuallyClosed']['add'](_0x26a17f),this['_removeAnnotationFromBalloon'](_0x26a17f);}}function Ni(_0x2afd3d,_0x5b1d83){return _0x2afd3d['top']===_0x5b1d83['top']&&_0x2afd3d['bottom']===_0x5b1d83['bottom']&&_0x2afd3d['right']===_0x5b1d83['left'];}class ki extends _0x73c3b7{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2f657d,_0x4d2a4e){super(_0x2f657d),this['set']('isEmpty',!_0x4d2a4e['length']),this['focusTracker']=new _0x4691cf(),this['_annotationViews']=_0x4d2a4e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1962b4({'focusables':_0x4d2a4e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4d2a4e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4d2a4e,'remove',(_0x537421,_0x11b7ed)=>{_0x11b7ed['isActive']&&this['focus'](),_0x4d2a4e['length']||(this['isEmpty']=!0x0);});const _0x5d3d5d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x2f657d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4d2a4e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5d3d5d['if']('isEmpty','ck-hidden',_0x9149a1=>!_0x9149a1)]},'children':[{'text':bt(_0x2f657d,'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 _0x14d442 of this['_annotationViews'])this['focusTracker']['add'](_0x14d442['element']);this['_annotationViews']['on']('change',(_0x3e21d0,{added:_0x242401,removed:_0x58b214})=>{for(const _0x2e4f51 of _0x242401)this['focusTracker']['add'](_0x2e4f51['element']);for(const _0x2ce88b of _0x58b214)this['focusTracker']['remove'](_0x2ce88b['element']);});}}class Oi extends _0x5f30da{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x2be0a4){super(_0x2be0a4),this['archivedThreads']=new _0x2957ce();}['init'](){const _0x464dbb=this['context'],_0x469b75=_0x464dbb['plugins']['get'](Qt),_0x458562=_0x464dbb['plugins']['get']($t);this['listenTo'](_0x469b75,'addCommentThread',(_0x38fef4,{threadId:_0x13c346})=>{const _0x251a2e=_0x469b75['getCommentThread'](_0x13c346);_0x251a2e['archivedAt']&&this['archivedThreads']['add'](_0x251a2e,this['_calculatePosition'](_0x251a2e['archivedAt'])),this['listenTo'](_0x251a2e,'change:archivedAt',(_0x2bfd52,_0x2e109b,_0xbf5fad)=>{_0xbf5fad?this['archivedThreads']['has'](_0x251a2e)||this['archivedThreads']['add'](_0x251a2e,this['_calculatePosition'](_0x251a2e['archivedAt'])):this['archivedThreads']['has'](_0x251a2e)&&this['archivedThreads']['remove'](_0x251a2e);});}),this['listenTo'](_0x469b75,'removeCommentThread',(_0x3f73cb,{threadId:_0x2f56a5})=>{const _0x535015=_0x469b75['getCommentThread'](_0x2f56a5);this['stopListening'](_0x535015),this['archivedThreads']['has'](_0x535015)&&this['archivedThreads']['remove'](_0x535015);},{'priority':'highest'}),this['listenTo'](_0x458562['collection'],'focus',(_0x47c990,_0x118e39)=>{_0x118e39['isVisible']||(_0x118e39['isActive']=!0x0,_0x458562['activate'](_0x118e39));});}['_calculatePosition'](_0x5b14b5){const _0x494b99=[...this['archivedThreads']]['findIndex'](_0x41e636=>_0x41e636['archivedAt']<_0x5b14b5);return _0x494b99>-0x1?_0x494b99:this['archivedThreads']['length'];}}class Mi extends _0x1576f0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x2d77ea){super(_0x2d77ea),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4a2264=this['editor'],_0x3e15fc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4a2264['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x39c4f7,!0x0)),_0x4a2264['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3883e4=this['_createCommentsArchiveButton'](ot);return _0x3883e4['set']({'role':'menuitemcheckbox'}),_0x3883e4;});const _0xbe4209=_0x4a2264['plugins']['get'](Oi),_0x360316=_0x4a2264['plugins']['get']('Annotations'),_0x31fb6b=_0x4a2264['plugins']['get']('CommentsRepository');_0xbe4209['archivedThreads']['forEach'](_0x4be161=>{this['_handleNewThread'](_0x4be161);}),this['listenTo'](_0xbe4209['archivedThreads'],'add',(_0x44a704,_0x17a004)=>{this['_handleNewThread'](_0x17a004);}),this['listenTo'](_0x360316['collection'],'add',(_0x275247,_0x5e5d30)=>{const _0x53eef9=this['_pendingThreads']['find'](_0x1d2e2e=>{const _0x12263c=_0x31fb6b['_threadToController']['get'](_0x1d2e2e);return _0x12263c&&_0x5e5d30['innerView']===_0x12263c['view'];});if(_0x53eef9){const _0x5c0f8a=this['_calculatePosition'](_0x53eef9['archivedAt']);this['_addAnnotationToArchive'](_0x5e5d30,_0x5c0f8a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x53eef9),0x1);}}),this['listenTo'](_0xbe4209['archivedThreads'],'remove',(_0x49b2c6,_0x431cf1)=>{const _0x408cd2=_0x4a2264['config']['get']('collaboration.channelId');if(!_0x408cd2||_0x431cf1['channelId']===_0x408cd2){if(this['_pendingThreads']['includes'](_0x431cf1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x431cf1),0x1);else{const _0x39db61=_0x31fb6b['_threadToController']['get'](_0x431cf1),_0x4ea320=_0x360316['getByInnerView'](_0x39db61['view']);this['annotationViews']['remove'](_0x4ea320['view']),this['stopListening'](_0x4ea320),this['stopListening'](_0x4ea320['focusableElements']);}}}),this['listenTo'](_0x360316['collection'],'add',(_0x35f65c,_0x4cf2ad)=>{this['listenTo'](_0x4cf2ad,'escape',_0x3e15fc);}),this['listenTo'](_0x360316['collection'],'remove',(_0x5430d2,_0x4c4396)=>{this['stopListening'](_0x4c4396,'escape',_0x3e15fc);});}['_addAnnotationToArchive'](_0x6c5821,_0x21bec0){this['listenTo'](_0x6c5821,'set:isVisible',_0x3f0f82=>{_0x3f0f82['return']=!0x1,_0x3f0f82['stop']();}),this['annotationViews']['add'](_0x6c5821['view'],_0x21bec0);}['_handleNewThread'](_0x214eb7){const _0x5f0468=this['editor']['plugins']['get']('CommentsRepository'),_0x3bbc8b=this['editor']['plugins']['get']('Annotations'),_0x24956c=this['editor']['config']['get']('collaboration.channelId');if(!_0x24956c||_0x214eb7['channelId']===_0x24956c){const _0x35aff2=_0x5f0468['_threadToController']['get'](_0x214eb7);if(!_0x35aff2)return void this['_pendingThreads']['push'](_0x214eb7);const _0x24502e=this['_calculatePosition'](_0x214eb7['archivedAt']),_0x1d1a7f=_0x3bbc8b['getByInnerView'](_0x35aff2['view']);_0x1d1a7f['isVisible']&&_0x3bbc8b['_visibleAnnotations']['remove'](_0x1d1a7f),this['_addAnnotationToArchive'](_0x1d1a7f,_0x24502e);}}['_calculatePosition'](_0x5b8ad2){const _0x581570=this['editor']['config']['get']('collaboration.channelId'),_0x22e13f=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x32bb91=>_0x32bb91['channelId']===_0x581570)['findIndex'](_0x136ff9=>_0x136ff9['archivedAt']<_0x5b8ad2);return _0x22e13f<0x0||_0x22e13f>this['annotationViews']['length']?this['annotationViews']['length']:_0x22e13f-0x1;}['_toggleDialog'](){const _0x1d1b4e=this['editor'],_0x5097b2=_0x1d1b4e['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x1d1b4e['locale'],this['annotationViews'])),'commentsArchive'===_0x5097b2['id']?_0x5097b2['hide']():_0x5097b2['show']({'id':'commentsArchive','title':bt(_0x1d1b4e['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2c3d78,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2eafc9,_0x14adab=!0x1){const _0x511888=this['editor']['locale'],_0x55e729=this['editor']['plugins']['get']('Dialog'),_0x47de0f=new _0x2eafc9(_0x511888);return _0x47de0f['bind']('isEnabled')['to'](this,'isEnabled'),_0x47de0f['bind']('isOn')['to'](_0x55e729,'id',_0x9444f5=>'commentsArchive'===_0x9444f5),_0x47de0f['set']({'label':bt(_0x511888,'COMMENTS_ARCHIVE'),'icon':_0x2c3d78,'isToggleable':!0x0}),_0x14adab&&(_0x47de0f['tooltip']=!0x0),this['listenTo'](_0x47de0f,'execute',()=>this['_toggleDialog']()),_0x47de0f;}['_hideDialogOnAnnotationEscape']=_0x169612=>{const _0x5a320b=_0x169612['source'];if(!this['annotationViews']['has'](_0x5a320b['view']))return;const _0xaca49d=this['editor']['plugins']['get']('Dialog');_0xaca49d['isOpen']&&'commentsArchive'===_0xaca49d['id']&&(_0xaca49d['hide'](),_0x169612['stop']());};}class Ri extends _0x1576f0{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|