UNPKG

@ckeditor/ckeditor5-collaboration-core

Version:

Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.

23 lines • 70.5 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ import{ContextPlugin as _0x365494,Editor as _0x50c02e,Plugin as _0x1550a0}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x21f53a,Collection as _0x5026a7,uid as _0x13346b,toArray as rt,first as _0xcbab60,FocusTracker as ts,KeystrokeHandler as _0x2851e6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x3ab4d7,IconView as st,ButtonView as _0x1c3954,DropdownButtonView as _0x39a313,FocusCycler as _0x1bf895,isViewWithFocusCycler as _0x449a4a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconNotification as ct,IconCheck as _0xd83e77,IconCancel as _0x3472d4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{setHighlightHandling as it,toWidget as _0x2280fd}from'@ckeditor/ckeditor5-widget/dist/index.js';import{DateTime as tt}from'luxon';import{InsertOperation as _0x25ebf1,MoveOperation as _0x1648c4,ModelPosition as _0x1427f8,ModelRange as _0x1ca5f8,MarkerOperation as _0x32ba29,MergeOperation as _0x4251f5,SplitOperation as _0x1c9b06,RenameOperation as _0x185d57,AttributeOperation as _0x376df4,ModelTreeWalker as _0x48e48a,ModelText as _0x251d52}from'@ckeditor/ckeditor5-engine/dist/index.js';import{diffArrays as _0x1186a2}from'diff';class C extends _0x365494{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x374d0f,_0x59a1d4){let _0x479eab;if(_0x59a1d4||(_0x59a1d4=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x59a1d4?_0x479eab=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x479eab=this['context']['editors']['find'](_0x558d00=>_0x558d00['config']['get']('collaboration.channelId')==_0x59a1d4)),!_0x479eab)throw new _0x21f53a('permissions-set-permissions-invalid-channel-id',null);const _0x8e02b7=_0x479eab['plugins'],_0xe41a8d=_0x8e02b7['has']('CommentsRepository')?_0x8e02b7['get']('CommentsRepository'):void 0x0,_0x1a5a22=_0x8e02b7['has']('CommentsOnly')&&_0x8e02b7['get']('CommentsOnly'),_0x51f7a8=_0x374d0f['includes']('document:write'),_0xee12a5=_0x374d0f['includes']('comment:modify_all'),_0x5d2692=_0x374d0f['includes']('comment:admin'),_0x17075d=_0x374d0f['includes']('comment:write'),_0x406125=_0x17075d||_0x5d2692,_0x4a465c=_0x406125||_0xee12a5,_0x3c7bca=_0x51f7a8||_0x406125;(_0x1a5a22&&(_0x1a5a22['isEnabled']=!_0x51f7a8&&_0x4a465c),_0x479eab instanceof _0x50c02e)&&(!(_0x51f7a8||_0x4a465c&&_0xe41a8d)?_0x479eab['enableReadOnlyMode']('no-permissions'):_0x479eab['disableReadOnlyMode']('no-permissions'));if(_0xe41a8d){_0xe41a8d['setPermissions']({'admin':_0x5d2692,'modifyAll':_0xee12a5,'write':_0x17075d,'resolve':_0x3c7bca},_0x59a1d4);const _0x131dea=_0x479eab instanceof _0x50c02e&&_0x479eab['commands']['get']('addCommentThread');_0x131dea&&(_0x406125?_0x131dea['clearForceDisabled']('noPermissions'):_0x131dea['forceDisabled']('noPermissions'));}}}function U(_0x57eb27,_0x3c4761){const t=_0x57eb27['t'];switch(_0x3c4761){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');case'Today':return t('Today');case'Yesterday':return t('Yesterday');case'Last':return t('Last');case'Monday':return t('Monday');case'Tuesday':return t('Tuesday');case'Wednesday':return t('Wednesday');case'Thursday':return t('Thursday');case'Friday':return t('Friday');case'Saturday':return t('Saturday');case'Sunday':return t('Sunday');default:return'';}}class at extends _0x365494{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[C];}constructor(_0x3ca0b2){super(_0x3ca0b2),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x5026a7(),this['_locale']=_0x3ca0b2['locale'],this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x289976,name:_0x2f2778,..._0x31b861}){if(!_0x289976||'string'!=typeof _0x289976)throw new _0x21f53a('users-add-invalid-id');if(this['users']['has'](_0x289976))throw new _0x21f53a('users-add-duplicated-id',null,{'id':_0x289976});const _0xa2999b=this['context']['config']['get']('users.getInitialsCallback'),_0x2e59ab={..._0x31b861,'id':_0x289976,'name':A(this['_locale'],_0x2f2778),'color':this['_getNextColor']()};_0x2e59ab['name']=A(this['_locale'],_0x2e59ab['name']);const _0x478b0f=new lt(_0x2e59ab,_0xa2999b);return this['users']['add'](_0x478b0f),_0x478b0f;}['getUser'](_0x12fe6c){return this['users']['get'](_0x12fe6c);}['useAnonymousUser'](){const _0x48cdb5=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x48cdb5);}['defineMe'](_0x2c3af1){if(this['_myId'])throw new _0x21f53a('users-me-already-defined',null);const _0x4ac635=this['getUser'](_0x2c3af1);if(!_0x4ac635)throw new _0x21f53a('users-me-missing-user',null);this['_myId']=_0x2c3af1,_0x4ac635['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x14fa7d=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x14fa7d&&(this['_lastColor']=0x0),new ut(this['_lastColor']++);}['_addAnonymousUser'](){const _0x4e1388=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x4e1388,'name':U(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class lt{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x1a320f,_0x659e58){this['id']=_0x1a320f['id'],this['color']=_0x1a320f['color'],this['name']=_0x1a320f['name'],this['initials']=_0x659e58?_0x659e58(this['name']):this['_computeInitials'](),this['avatar']=_0x1a320f['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0x362402=this['name']['split']('\x20')['filter'](_0x3891cf=>/^[\p{Letter}]/u['test'](_0x3891cf));return 0x1===_0x362402['length']?this['_getInitial'](_0x362402[0x0]):0x0===_0x362402['length']?this['_getInitial'](this['name']):this['_getInitial'](_0x362402[0x0])+this['_getInitial'](_0x362402[_0x362402['length']-0x1]);}['_getInitial'](_0x34ba65){return String['fromCodePoint'](_0x34ba65['codePointAt'](0x0))['toUpperCase']();}}function A(_0x46a454,_0x409e4a=''){return''==(_0x409e4a=_0x409e4a['trim']())?U(_0x46a454,'Anonymous'):_0x409e4a;}class ut{['_id'];constructor(_0x526d71){this['_id']=_0x526d71;}get['id'](){return this['_id'];}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['id'];}['getSelectionClass'](){return'ck-user__selection--'+this['id'];}['getMarkerClass'](){return'ck-user__marker--'+this['id'];}}class ht extends _0x3ab4d7{['name'];['notificationView'];constructor(_0x1b2d8c,_0x1da905,_0x43efaa){super(_0x1b2d8c),this['name']=_0x1da905['name'],this['notificationView']=null;const _0x540c8e=['ck','ck-user'],_0x464cf3=['ck','ck-user__img'];if(_0x1da905['isAnonymous']&&_0x464cf3['push']('ck-user__anonymous'),!_0x1da905['isAnonymous']&&_0x1da905['isMe']&&_0x540c8e['push']('ck-user_me'),_0x1da905['avatar']&&_0x464cf3['push']('ck-user__avatar'),_0x43efaa){const _0x1e0800=new st();_0x1e0800['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x1e0800['content']=ct,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x43efaa},'children':[_0x1e0800]};}const _0x17d288=[{'tag':'div','attributes':{'class':_0x464cf3,'style':{'background-image':_0x1da905['avatar']?'url(\x27'+_0x1da905['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x1da905['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x1da905['name']},'children':[{'text':_0x1da905['initials']}]}];this['notificationView']&&_0x17d288['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x540c8e,'data-user-id':_0x1da905['id']},'children':_0x17d288});}}class dt extends _0x3ab4d7{['id'];constructor(_0x2951d0,_0x135f42){super(_0x2951d0),this['id']='ck-aria-description-'+_0x13346b(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x135f42}]});}}class ft extends _0x1c3954{['render'](){super['render'](),re(this);}}class gt extends _0x39a313{['render'](){super['render'](),re(this);}}function re(_0x1246a4){_0x1246a4['listenTo'](_0x1246a4['element'],'mousedown',(_0x342543,_0x3433e6)=>{_0x3433e6['stopPropagation'](),_0x3433e6['preventDefault']();}),_0x1246a4['listenTo'](_0x1246a4['element'],'mouseup',()=>{_0x1246a4['element']['focus']();});}function v(_0x4fc266){const _0x1f48cb=_0x4fc266['split'](':');return{'group':_0x1f48cb[0x0],'type':_0x1f48cb[0x1],'subType':_0x1f48cb['length']>=0x5?_0x1f48cb[0x2]:null,'id':_0x1f48cb['length']<0x5?_0x1f48cb[0x2]:_0x1f48cb[0x3],'authorId':_0x1f48cb['length']<0x5?_0x1f48cb[0x3]:_0x1f48cb[0x4],'markerCount':0x6==_0x1f48cb['length']?_0x1f48cb[0x5]:null};}function mt(_0x2d7f98,_0x246de7){const _0x2484af=_0x2d7f98['end']['nodeBefore'];if(_0x2484af&&_0x2484af['is']('element')&&_0x246de7['schema']['isBlock'](_0x2484af)&&!_0x246de7['schema']['isObject'](_0x2484af)){const _0x2f1505=_0x246de7['createPositionAt'](_0x2484af,'end');return _0x246de7['createRange'](_0x2d7f98['start'],_0x2f1505);}return _0x2d7f98;}class M extends _0x1550a0{['afterInit'](){const _0x151dcf=this['editor'];if(!_0x151dcf['plugins']['has']('AlignmentEditing'))return;_0x151dcf['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('alignment');}}const ii=['BoldEditing','ItalicEditing','UnderlineEditing','CodeEditing','StrikethroughEditing','SubscriptEditing','SuperscriptEditing'];class D extends _0x1550a0{['afterInit'](){const _0xcdbbc3=this['editor'],_0x297a56=_0xcdbbc3['plugins']['get']('SuggestionsConversion');for(const _0x5cf4ce of ii){if(!_0xcdbbc3['plugins']['has'](_0x5cf4ce))continue;const _0x47e1e2=_0x5cf4ce['slice'](0x0,-0x7)['toLowerCase']();_0x297a56['registerInlineAttribute'](_0x47e1e2);}}}class I extends _0x1550a0{['afterInit'](){const _0x40f663=this['editor'],_0x3e148d=_0x40f663['plugins']['get']('SuggestionsConversion');_0x40f663['plugins']['has']('BookmarkEditing')&&_0x3e148d['registerBlockAttribute']('bookmarkId');}}const no=[{'pluginName':'FontSizeEditing','commandName':'fontSize'},{'pluginName':'FontFamilyEditing','commandName':'fontFamily'},{'pluginName':'FontColorEditing','commandName':'fontColor'},{'pluginName':'FontBackgroundColorEditing','commandName':'fontBackgroundColor'}];class B extends _0x1550a0{['afterInit'](){const _0x3d7d68=this['editor']['plugins']['get']('SuggestionsConversion');for(const {pluginName:_0x246747,commandName:_0x1be8a5}of no)this['editor']['plugins']['has'](_0x246747)&&_0x3d7d68['registerInlineAttribute'](_0x1be8a5);}}class T extends _0x1550a0{['afterInit'](){const _0x17ed49=this['editor'];if(!_0x17ed49['plugins']['has']('HighlightEditing'))return;_0x17ed49['plugins']['get']('SuggestionsConversion')['registerInlineAttribute']('highlight');}}class E extends _0x1550a0{['afterInit'](){const _0x368b73=this['editor'];if(!_0x368b73['plugins']['has']('HtmlEmbed'))return;_0x368b73['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('value');}}class S extends _0x1550a0{['afterInit'](){const _0x91f1c8=this['editor'];if(!_0x91f1c8['plugins']['has']('ImageEditing'))return;const _0x59d4c8=_0x91f1c8['plugins']['get']('SuggestionsConversion');_0x59d4c8['registerBlockAttribute']('src'),_0x91f1c8['plugins']['has']('ImageResize')&&_0x59d4c8['registerBlockAttribute']('resizedWidth'),_0x91f1c8['plugins']['has']('ImageTextAlternativeEditing')&&_0x59d4c8['registerBlockAttribute']('alt'),_0x91f1c8['plugins']['has']('PictureEditing')&&_0x59d4c8['registerBlockAttribute']('sources'),_0x91f1c8['plugins']['has']('ImageSizeAttributes')&&(_0x59d4c8['registerBlockAttribute']('width'),_0x59d4c8['registerBlockAttribute']('height'));}}class $ extends _0x1550a0{['afterInit'](){const _0x154500=this['editor'],_0x14f0c7=_0x154500['plugins']['get']('SuggestionsConversion');_0x154500['plugins']['has']('IndentBlock')&&_0x14f0c7['registerBlockAttribute']('blockIndent');}}class x extends _0x1550a0{['afterInit'](){const _0x5edc0b=this['editor'];if(!_0x5edc0b['plugins']['has']('LineHeight'))return;_0x5edc0b['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('lineHeight');}}class H extends _0x1550a0{['afterInit'](){const _0x332176=this['editor'];if(!_0x332176['plugins']['has']('LinkEditing'))return;const _0xc8ce02=_0x332176['plugins']['get']('SuggestionsConversion'),_0x841cfb=_0x332176['commands']['get']('link');_0xc8ce02['registerInlineAttribute']('linkHref');for(const _0x127160 of _0x841cfb['manualDecorators'])_0xc8ce02['registerInlineAttribute'](_0x127160['id']);}}class N extends _0x1550a0{['afterInit'](){const _0x2399dc=this['editor'];if(!_0x2399dc['plugins']['has']('ListEditing'))return;const _0x59798d=_0x2399dc['plugins']['get']('SuggestionsConversion'),_0x49e3e1=_0x2399dc['plugins']['has']('TodoListEditing');_0x59798d['registerBlockAttribute']('listItemId'),_0x59798d['registerBlockAttribute']('listType'),_0x59798d['registerBlockAttribute']('listIndent'),_0x49e3e1&&_0x59798d['registerBlockAttribute']('todoListChecked');}}class P extends _0x1550a0{['afterInit'](){if(!this['editor']['plugins']['has']('ListPropertiesEditing'))return;const _0x5508d6=this['editor']['config']['get']('list.properties'),_0x58f484=this['editor']['plugins']['get']('SuggestionsConversion');_0x5508d6['styles']&&_0x58f484['registerBlockAttribute']('listStyle'),_0x5508d6['reversed']&&_0x58f484['registerBlockAttribute']('listReversed'),_0x5508d6['startIndex']&&_0x58f484['registerBlockAttribute']('listStart');}}class K extends _0x1550a0{['afterInit'](){const _0x1d13a8=this['editor'],_0x1d94be=_0x1d13a8['plugins']['get']('SuggestionsConversion');_0x1d13a8['plugins']['has']('MultiLevelList')&&_0x1d94be['registerBlockAttribute']('listMarkerStyle');}}class q extends _0x1550a0{['afterInit'](){const _0x426cf7=this['editor'];if(!_0x426cf7['plugins']['has']('Style')||!_0x426cf7['plugins']['has']('DataSchema')||!_0x426cf7['config']['get']('style.definitions'))return;const _0x383cb7=_0x426cf7['plugins']['get']('SuggestionsConversion'),_0x8c5ae9=_0x426cf7['config']['get']('style.definitions'),_0x104072=_0x426cf7['plugins']['get']('GeneralHtmlSupport'),_0x38881d=_0x426cf7['plugins']['get']('StyleUtils')['normalizeConfig'](_0x426cf7['plugins']['get']('DataSchema'),_0x8c5ae9),_0x162aca=new Set();for(const _0x3eb5d4 of _0x38881d['block']){const _0x4e3857=_0x104072['getGhsAttributeNameForElement'](_0x3eb5d4['element']);_0x162aca['add'](_0x4e3857);}const _0x457dbd=new Set();for(const _0x130b84 of _0x38881d['inline']){const _0x452437=_0x104072['getGhsAttributeNameForElement'](_0x130b84['element']);_0x457dbd['add'](_0x452437);for(const _0x40574c of _0x130b84['ghsAttributes'])_0x457dbd['add'](_0x40574c);}for(const _0x5e2223 of _0x162aca)_0x383cb7['registerBlockAttribute'](_0x5e2223);for(const _0xd10db0 of _0x457dbd)_0x383cb7['registerInlineAttribute'](_0xd10db0);}}class z extends _0x1550a0{['afterInit'](){const _0x913361=this['editor'];if(!_0x913361['plugins']['has']('TableEditing'))return;const _0x50a5f6=_0x913361['plugins']['get']('SuggestionsConversion');_0x50a5f6['registerBlockAttribute']('headingRows'),_0x50a5f6['registerBlockAttribute']('headingColumns');}}class O extends _0x1550a0{['afterInit'](){const _0x40a81a=this['editor']['plugins']['get']('SuggestionsConversion');if(!this['editor']['plugins']['has']('Table'))return;const _0x4304b9=['tableBorderColor','tableBorderStyle','tableBorderWidth','tableAlignment','tableWidth','tableHeight','tableBackgroundColor','tableCellBorderColor','tableCellBorderStyle','tableCellBorderWidth','tableCellPadding','tableCellWidth','tableCellHeight','tableCellBackgroundColor','tableCellHorizontalAlignment','tableCellVerticalAlignment'];for(const _0x167ee3 of _0x4304b9)_0x40a81a['registerBlockAttribute'](_0x167ee3);}}class R extends _0x1550a0{['afterInit'](){const _0x2d8691=this['editor'],_0x2f3ec6=_0x2d8691['plugins']['get']('SuggestionsConversion');_0x2d8691['plugins']['has']('TableLayout')&&_0x2f3ec6['registerBlockAttribute']('tableType');}}class F extends _0x1550a0{['afterInit'](){const _0x229653=this['editor'],_0x2cb8cc=this['editor']['plugins']['get']('SuggestionsConversion');_0x229653['plugins']['has']('Uploadcare')&&_0x229653['plugins']['has']('UploadcareImageEdit')&&_0x2cb8cc['registerBlockAttribute']('uploadcareImageId');}}class G extends _0x1550a0{['afterInit'](){const _0xedd21f=this['editor'];if(!_0xedd21f['plugins']['has']('ShiftEnter'))return;const _0x48e684=_0xedd21f['plugins']['get']('SuggestionsConversion'),_0x193ca0=(_0x497c69,_0x35b950,_0x3e5d9f,_0x36c769)=>{if(_0x36c769&&!_0x3e5d9f['options']['showSuggestionHighlights'])return;if(!_0x3e5d9f['consumable']['test'](_0x35b950['markerRange'],_0x497c69['name']))return;const _0xd8feb9=_0xedd21f['model'];for(const _0x547b66 of _0x35b950['markerRange']['getItems']()){if(!_0x547b66['is']('element','softBreak'))continue;const _0x54a311='deletion'==_0x35b950['markerName']['split'](':')[0x1]?'merge':'split',{id:_0x5dee52,authorId:_0x4122ae}=v(_0x35b950['markerName']),_0x27c65d=_0x3e5d9f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x54a311,'data-suggestion':_0x5dee52,'data-author-id':_0x4122ae}),_0x139cee=_0x3e5d9f['mapper']['toViewPosition'](_0xd8feb9['createPositionBefore'](_0x547b66));!_0x36c769&&_0x48e684['_activeMarkers']['includes'](_0x35b950['markerName'])&&_0x3e5d9f['writer']['addClass']('ck-suggestion-marker--active',_0x27c65d),_0x3e5d9f['writer']['insert'](_0x139cee,_0x27c65d),_0x3e5d9f['mapper']['bindElementToMarker'](_0x27c65d,_0x35b950['markerName']);}};_0xedd21f['editing']['downcastDispatcher']['on']('addMarker:suggestion',(_0x33287e,_0xe794c4,_0x3559d1)=>{_0x193ca0(_0x33287e,_0xe794c4,_0x3559d1,!0x1);},{'priority':'high'}),_0xedd21f['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x15fc22,_0xadf567,_0x104181)=>{_0x193ca0(_0x15fc22,_0xadf567,_0x104181,!0x0);},{'priority':'high'});}}class J extends _0x1550a0{['afterInit'](){const _0x4f9569=this['editor'];_0x4f9569['plugins']['has']('MediaEmbedEditing')&&(_0x4f9569['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x15a039,{writer:_0x52a1e6,options:_0x43c50d})=>{if(_0x43c50d['showSuggestionHighlights'])return _0x52a1e6['createEmptyElement']('div');},'converterPriority':'high'}),_0x4f9569['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3aa1ad,_0x538648,_0x39e778)=>{_0x39e778['options']['showSuggestionHighlights']&&_0x3aa1ad['stop']();},{'priority':'high'}));}}class L extends _0x1550a0{['afterInit'](){const _0x3183c0=this['editor'];if(!_0x3183c0['plugins']['has']('Table'))return;_0x3183c0['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x1017e3,_0x5e25e7,_0x1481e8)=>{((_0x5e4099,_0x20b3d,_0x1e86d6)=>{if(!_0x1e86d6['options']['showSuggestionHighlights'])return;const _0x571b02=_0x20b3d['item'];if(!_0x571b02||!_0x571b02['is']('element','tableCell'))return;const _0x5c0397=_0x1e86d6['mapper']['toViewElement'](_0x571b02);if(_0x5c0397){const {id:_0x52878d,authorId:_0x453668}=v(_0x20b3d['markerName']);it(_0x5c0397,_0x1e86d6['writer'],(_0x3e4630,_0x12c8c3,_0x2eb59e)=>{_0x2eb59e['addClass'](rt(_0x12c8c3['classes']),_0x3e4630),_0x2eb59e['setAttribute']('data-suggestion-id',_0x52878d,_0x3e4630),_0x2eb59e['setAttribute']('data-author-id',_0x453668,_0x3e4630);});}})(0x0,_0x5e25e7,_0x1481e8);},{'priority':'highest'});}}class Q extends _0x1550a0{['afterInit'](){const _0x1f7a7d=this['editor'];_0x1f7a7d['plugins']['has']('HorizontalLineEditing')&&_0x1f7a7d['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x39ffb4,{writer:_0x4e8a7c,options:_0x3eed57})=>{if(!_0x3eed57['showSuggestionHighlights'])return null;const _0x418893=_0x4e8a7c['createContainerElement']('div'),_0x65fd36=_0x4e8a7c['createEmptyElement']('hr');return _0x4e8a7c['addClass']('ck-horizontal-line',_0x418893),_0x4e8a7c['insert'](_0x4e8a7c['createPositionAt'](_0x418893,0x0),_0x65fd36),_0x418893;},'converterPriority':'high'});}}class kt extends _0x1550a0{['_activeMarkers']=[];['_blockAttributeKeys']=new Set(['$elementName']);['_inlineAttributeKeys']=new Set();static get['pluginName'](){return'SuggestionsConversion';}static get['requires'](){return[M,D,I,B,T,Q,E,S,$,x,H,N,P,J,K,G,q,L,z,R,O,F];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x466bb9=this['editor'],_0x415dd7=(_0x1227d0,_0x30992f,_0x2b1f37)=>{const {id:_0x36edd1,authorId:_0x102fb8,type:_0x593318,subType:_0x2589c2}=v(_0x1227d0['markerName']),_0x5f5030=['ck-suggestion-marker',this['_getClassName'](_0x593318,_0x2589c2)];let _0x197f8e=0xbb8;return!_0x2b1f37&&(this['_activeMarkers']['includes'](_0x1227d0['markerName'])&&(_0x5f5030['push']('ck-suggestion-marker--active'),_0x197f8e=0xbc2)),('deletion'==_0x593318&&(_0x197f8e+=0x5),{'classes':_0x5f5030,'attributes':{'data-suggestion':_0x36edd1,'data-author-id':_0x102fb8},'priority':_0x197f8e});};_0x466bb9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x98f6e5,_0x4897f5)=>_0x415dd7(_0x98f6e5,0x0,!0x1)}),_0x466bb9['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x16315d,_0xcdcb81)=>_0x415dd7(_0x16315d,0x0,!0x0)}),_0x466bb9['conversion']['for']('dataDowncast')['add'](_0x57caf4=>{_0x57caf4['on']('addMarker:suggestion',(_0x3aecb1,_0xe20d69,_0x4bcef7)=>{if(!_0x4bcef7['options']['showSuggestionHighlights'])return;const _0x3ada4f=_0xe20d69['item'];if(!_0x3ada4f)return;const _0x14fa28=_0x4bcef7['mapper']['toViewElement'](_0x3ada4f);_0x466bb9['model']['schema']['isObject'](_0x3ada4f)&&_0x14fa28&&!_0x14fa28['getCustomProperty']('widget')&&_0x14fa28['is']('containerElement')&&_0x2280fd(_0x14fa28,_0x4bcef7['writer']);},{'priority':'high'});});const _0x2bce31=(_0x5bb4dd,_0x2d9f1d,_0x5f2ab1,_0x1b7e45,_0x850c90)=>{if(_0x1b7e45&&!_0x5f2ab1['options']['showSuggestionHighlights'])return;if(!_0x2d9f1d['item'])return;const {id:_0x5ca4d1,authorId:_0x320ae2,subType:_0x23efaa}=v(_0x2d9f1d['markerName']);if(_0x850c90){const _0xf5e4db=_0x23efaa['split']('|')[0x0];if(!this['isBlockAttribute'](_0xf5e4db))return;}if(_0x2d9f1d['item']['is']('selection'))return void _0x5f2ab1['consumable']['consume'](_0x2d9f1d['item'],_0x5bb4dd['name']);const _0x2585f6=_0x5f2ab1['mapper']['toViewElement'](_0x2d9f1d['item']);if(_0x2d9f1d['item']['is']('element')&&_0x466bb9['model']['schema']['isBlock'](_0x2d9f1d['item'])&&!_0x2585f6['getCustomProperty']('addHighlight')){_0x5f2ab1['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x2585f6),_0x5f2ab1['writer']['setAttribute']('data-suggestion',_0x5ca4d1,_0x2585f6),_0x5f2ab1['writer']['setAttribute']('data-author-id',_0x320ae2,_0x2585f6),_0x5f2ab1['mapper']['bindElementToMarker'](_0x2585f6,_0x2d9f1d['markerName']),_0x1b7e45||(this['_activeMarkers']['includes'](_0x2d9f1d['markerName'])?_0x5f2ab1['writer']['addClass']('ck-suggestion-marker--active',_0x2585f6):_0x5f2ab1['writer']['removeClass']('ck-suggestion-marker--active',_0x2585f6));for(const _0x31a243 of _0x466bb9['model']['createRangeIn'](_0x2d9f1d['item'])['getItems']())_0x5f2ab1['consumable']['consume'](_0x31a243,_0x5bb4dd['name']);_0x5f2ab1['consumable']['consume'](_0x2d9f1d['item'],_0x5bb4dd['name']);}},_0x4ee427=(_0x3f22cf,_0x2b959f,_0x23019f,_0x5472ca)=>{const _0x18e9ab=_0x23019f['mapper']['markerNameToElements'](_0x2b959f['markerName']);if(_0x18e9ab){if(_0x5472ca){const {subType:_0x1a624d}=v(_0x2b959f['markerName']),_0x54eec5=_0x1a624d['split']('|')[0x0];if(!this['isBlockAttribute'](_0x54eec5))return;}for(const _0x5f22b4 of _0x18e9ab)_0x5f22b4['getCustomProperty']('addHighlight')||(_0x23019f['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x5f22b4),_0x23019f['writer']['removeAttribute']('data-suggestion',_0x5f22b4),_0x23019f['writer']['removeAttribute']('data-author-id',_0x5f22b4),_0x23019f['mapper']['unbindElementFromMarkerName'](_0x5f22b4,_0x2b959f['markerName']));}};_0x466bb9['conversion']['for']('editingDowncast')['add'](_0x450153=>{_0x450153['on']('addMarker:suggestion:formatBlock',(_0x46fd18,_0x361f38,_0x26b956)=>{_0x2bce31(_0x46fd18,_0x361f38,_0x26b956,!0x1,!0x1);},{'priority':'high'});}),_0x466bb9['conversion']['for']('editingDowncast')['add'](_0x42016b=>{_0x42016b['on']('addMarker:suggestion:attribute',(_0x486b2e,_0x470375,_0x18bab7)=>{_0x2bce31(_0x486b2e,_0x470375,_0x18bab7,!0x1,!0x0);},{'priority':'high'});}),_0x466bb9['conversion']['for']('editingDowncast')['add'](_0x4f9804=>{_0x4f9804['on']('removeMarker:suggestion:formatBlock',(_0x123501,_0x1d93e4,_0x38091b)=>{_0x4ee427(0x0,_0x1d93e4,_0x38091b,!0x1);},{'priority':'high'});}),_0x466bb9['conversion']['for']('editingDowncast')['add'](_0x520c22=>{_0x520c22['on']('removeMarker:suggestion:attribute',(_0x1f0494,_0x34bddc,_0x1bf017)=>{_0x4ee427(0x0,_0x34bddc,_0x1bf017,!0x0);},{'priority':'high'});}),_0x466bb9['conversion']['for']('dataDowncast')['add'](_0x7bfc9a=>{_0x7bfc9a['on']('addMarker:suggestion:formatBlock',(_0x4b5670,_0x439430,_0x1d5aa9)=>{_0x2bce31(_0x4b5670,_0x439430,_0x1d5aa9,!0x0,!0x1);},{'priority':'highest'});}),_0x466bb9['conversion']['for']('dataDowncast')['add'](_0x3a030d=>{_0x3a030d['on']('addMarker:suggestion:attribute',(_0x50d2c4,_0x123de9,_0x2e148c)=>{_0x2bce31(_0x50d2c4,_0x123de9,_0x2e148c,!0x0,!0x0);},{'priority':'highest'});}),_0x466bb9['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x53397f,_0x25fa4d)=>{if(_0x25fa4d['options']['showSuggestionHighlights']){const {id:_0x40194b,authorId:_0x2a936b}=v(_0x53397f);return _0x53397f['includes'](':split')||_0x53397f['includes'](':merge')?{'group':'suggestion','name':_0x53397f['substr'](0xb),'attributes':{'data-suggestion':_0x40194b,'data-author-id':_0x2a936b}}:null;}return{'group':'suggestion','name':_0x53397f['substr'](0xb)};}});const _0x4a374f=(_0x271f7b,_0x350861,_0x9ca10e,_0x132a25,_0x2f7f50)=>{if(_0x132a25&&!_0x9ca10e['options']['showSuggestionHighlights'])return;if(!_0x9ca10e['consumable']['test'](_0x350861['markerRange'],_0x271f7b['name']))return;const _0x3cb015=this['_activeMarkers'],_0x232a1e=_0x350861['markerRange']['getWalker'](),_0x149adc=_0x350861['markerRange']['start'],_0x4c80e8=_0x466bb9['model']['schema'];let _0x120bb7=null,_0x3c1861=null,_0x1849bb=!0x1,_0x578491=!0x1;for(const _0x3ff4b2 of _0x232a1e){const _0xb6fd8=_0x3ff4b2['item'];_0x1849bb=_0x1849bb||_0x4c80e8['isContent'](_0xb6fd8);const _0x26cd47=_0x9ca10e['mapper']['toViewElement'](_0xb6fd8);if(_0x26cd47&&_0x26cd47['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3ff4b2['type']&&(_0x4c80e8['isBlock'](_0xb6fd8)&&!_0x4c80e8['isLimit'](_0xb6fd8)&&(_0xb6fd8['nextSibling']||_0x149adc['isAtEnd']?_0x120bb7&&_0x120bb7['parent']==_0xb6fd8||(_0x120bb7=_0xb6fd8,_0x33e65b(_0x3ff4b2['previousPosition']),_0x578491=!0x0):_0x3c1861=_0x3c1861||_0x3ff4b2['previousPosition']));}function _0x33e65b(_0x177773){const {id:_0x51decc,authorId:_0x2c1dde}=v(_0x350861['markerName']),_0x130514=_0x9ca10e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f7f50,'data-suggestion':_0x51decc,'data-author-id':_0x2c1dde}),_0x9115c9=_0x9ca10e['mapper']['toViewPosition'](_0x177773);!_0x132a25&&_0x3cb015['includes'](_0x350861['markerName'])&&_0x9ca10e['writer']['addClass']('ck-suggestion-marker--active',_0x130514),_0x9ca10e['writer']['insert'](_0x9115c9,_0x130514),_0x9ca10e['mapper']['bindElementToMarker'](_0x130514,_0x350861['markerName']);}_0x1849bb||_0x578491||!_0x3c1861||_0x33e65b(_0x3c1861);};_0x466bb9['editing']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x252f9d,_0x82355d,_0x52e418)=>{_0x4a374f(_0x252f9d,_0x82355d,_0x52e418,!0x1,'merge');},{'priority':'high'}),_0x466bb9['data']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x1f9053,_0x2d44bd,_0x1a2084)=>{_0x4a374f(_0x1f9053,_0x2d44bd,_0x1a2084,!0x0,'merge');},{'priority':'high'}),_0x466bb9['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x9c3b81,_0x4fc04e,_0x13be1f)=>{_0x4a374f(_0x9c3b81,_0x4fc04e,_0x13be1f,!0x1,'split');},{'priority':'high'}),_0x466bb9['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x4e6956,_0x2a1d2f,_0x4a6ded)=>{_0x4a374f(_0x4e6956,_0x2a1d2f,_0x4a6ded,!0x0,'split');},{'priority':'high'}),_0x466bb9['editing']['downcastDispatcher']['on']('removeMarker:suggestion',(_0x53ebfc,_0x57ce72,_0x18dc3c)=>{((_0x2a17b1,_0x445bca,_0x3e1e2c)=>{const _0x5d89bd=_0x3e1e2c['mapper']['markerNameToElements'](_0x445bca['markerName']);if(_0x5d89bd){for(const _0x5c17bf of _0x5d89bd)(_0x5c17bf['hasClass']('ck-suggestion-marker-split')||_0x5c17bf['hasClass']('ck-suggestion-marker-merge'))&&(_0x3e1e2c['mapper']['unbindElementFromMarkerName'](_0x5c17bf,_0x445bca['markerName']),_0x3e1e2c['writer']['remove'](_0x5c17bf));}})(0x0,_0x57ce72,_0x18dc3c);},{'priority':'high'});const _0x1c4336=(_0x44e569,_0x61cb8,_0x150108,_0x5d5660)=>{if(_0x5d5660&&!_0x150108['options']['showSuggestionHighlights'])return;const _0x4d75a4=_0x61cb8['markerRange']['start'],_0x2bc04d=_0x61cb8['markerRange']['end'],_0x513b80=_0x466bb9['model']['schema'];if(!_0x4d75a4['isTouching'](_0x2bc04d)||!_0x4d75a4['nodeAfter'])return;const _0x234050=_0x4d75a4['nodeAfter'];if(_0x513b80['isBlock'](_0x234050)&&!_0x513b80['isLimit'](_0x234050)&&_0x513b80['checkChild'](_0x234050,'$text')){if(!_0x150108['consumable']['consume'](_0x61cb8['markerRange'],_0x44e569['name']))return;const {id:_0x26ba1e,authorId:_0x188a68}=v(_0x61cb8['markerName']),_0x30d49f=_0x150108['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-split','data-suggestion':_0x26ba1e,'data-author-id':_0x188a68}),_0x3e0c08=_0x150108['mapper']['toViewPosition'](_0x2bc04d);!_0x5d5660&&this['_activeMarkers']['includes'](_0x61cb8['markerName'])&&_0x150108['writer']['addClass']('ck-suggestion-marker--active',_0x30d49f),_0x150108['writer']['insert'](_0x3e0c08,_0x30d49f),_0x150108['mapper']['bindElementToMarker'](_0x30d49f,_0x61cb8['markerName']);}};_0x466bb9['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x37a77a,_0x5c7d7c,_0x588cc3)=>{_0x1c4336(_0x37a77a,_0x5c7d7c,_0x588cc3,!0x1);},{'priority':'high'}),_0x466bb9['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x356dc3,_0x2d9193,_0x19e561)=>{_0x1c4336(_0x356dc3,_0x2d9193,_0x19e561,!0x0);},{'priority':'high'});}['afterInit'](){this['editor']['plugins']['has']('TrackChangesEditing')&&this['listenTo'](this['editor']['plugins']['get']('TrackChangesEditing'),'change:activeMarkers',(_0x2c228d,_0x3ba89e,_0x3e91c8)=>{this['_activeMarkers']=_0x3e91c8['slice']();},{'priority':'highest'});}['registerBlockAttribute'](_0x3b700c){this['_blockAttributeKeys']['add'](_0x3b700c);}['registerInlineAttribute'](_0x3c2cef){this['_inlineAttributeKeys']['add'](_0x3c2cef);}['isBlockAttribute'](_0x312d0b){return this['_blockAttributeKeys']['has'](_0x312d0b);}['isInlineAttribute'](_0x1eb9a4){return this['_inlineAttributeKeys']['has'](_0x1eb9a4);}['isRegisteredAttribute'](_0x5cf5b0){return this['isInlineAttribute'](_0x5cf5b0)||this['isBlockAttribute'](_0x5cf5b0);}['_getClassName'](_0x15e7fd,_0x25da86){if('attribute'!=_0x15e7fd)return'ck-suggestion-marker-'+_0x15e7fd;const _0x3baf95=_0x25da86['split']('|')[0x0];return this['isBlockAttribute'](_0x3baf95)?'ck-suggestion-marker-formatBlock':'ck-suggestion-marker-formatInline';}}function pt(_0xfcc0a0={},_0x19c0a2){if(void 0x0!==_0xfcc0a0['dateTimeFormat']&&'function'!=typeof _0xfcc0a0['dateTimeFormat'])throw new _0x21f53a('invalid-date-time-format');return _0x1d8fb6=>{const _0x20aa56='string'==typeof _0x1d8fb6?tt['fromISO'](_0x1d8fb6):tt['fromJSDate'](_0x1d8fb6),_0x524381=tt['now'](),_0x367040=Math['floor'](_0x524381['diff'](_0x20aa56,'days')['days']);return _0xfcc0a0['dateTimeFormat']?_0xfcc0a0['dateTimeFormat'](_0x20aa56['toJSDate'](),_0x19c0a2&&_0x19c0a2['t']?_0x19c0a2['t']:void 0x0):0x0===_0x367040?_0x19c0a2?U(_0x19c0a2,'Today')+'\x20'+_0x20aa56['toFormat']('hh:mma'):_0x20aa56['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x367040?_0x19c0a2?U(_0x19c0a2,'Yesterday')+'\x20'+_0x20aa56['toFormat']('hh:mma'):_0x20aa56['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x367040<0x7?_0x19c0a2?U(_0x19c0a2,'Last')+'\x20'+U(_0x19c0a2,_0x20aa56['toFormat']('EEEE'))+'\x20'+_0x20aa56['toFormat']('hh:mma'):_0x20aa56['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x20aa56['toFormat']('LL-dd-yyyy\x20hh:mma');};}function yt(_0xaa2909,_0x44e137){const _0x2ff78f=_0xaa2909['mapper']['markerNameToElements'](_0x44e137['name']);if(!_0x2ff78f)return null;const _0x48ef4f=_0xcbab60(_0x2ff78f['values']());return _0xaa2909['view']['domConverter']['mapViewToDom'](_0x48ef4f)||null;}function wt(_0x1fd0af,_0x2121ec){if(0x0===_0x2121ec['length'])return null;const _0x48dff0=[],_0x5e1000=_0x1fd0af['view']['domConverter'];for(const _0x365c10 of _0x2121ec){const _0x49fd3d=_0x1fd0af['mapper']['markerNameToElements'](_0x365c10['name']);if(!_0x49fd3d)continue;const _0x1791e8=Array['from'](_0x49fd3d)['map'](_0x1015dd=>_0x5e1000['mapViewToDom'](_0x1015dd))['filter'](_0x512831=>!!_0x512831);_0x48dff0['push'](..._0x1791e8);}if(0x0===_0x48dff0['length'])return null;const _0xde0e51=[];for(const _0x11fdff of _0x48dff0){const _0x4079e1=_0x11fdff['getClientRects']()['item'](0x0);_0x4079e1&&_0xde0e51['push']({'x':_0x4079e1['x'],'y':_0x4079e1['y'],'domElement':_0x11fdff});}return 0x0===_0xde0e51['length']?null:(_0xde0e51['sort']((_0x17dacb,_0x3b5570)=>_0x17dacb['y']-_0x3b5570['y']||_0x17dacb['x']-_0x3b5570['x']),_0xde0e51['map'](_0x4b288f=>_0x4b288f['domElement']));}function bt(_0x2a7c66,{limit:_0x4cf07d,suffix:_0x33b83d='...'}){const _0x456a09=[];let _0x12d516=0x0;const _0x4b5258=_0x2a7c66['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x515859=0x0;_0x515859<_0x4b5258['length'];_0x515859++){let _0x1dc870=_0x4b5258[_0x515859];const _0x5a7e8b=tn(_0x1dc870);if(_0x1dc870['startsWith']('<')){if(_0x12d516>=_0x4cf07d){const _0xfff3b=_0x1dc870['match'](/[a-zA-Z]+/);if(!_0xfff3b){_0x4b5258[_0x515859]='';continue;}const _0x2f0bf9=_0xfff3b[0x0];_0x1dc870['startsWith']('</')?(_0x456a09['length']&&(_0x1dc870=''),_0x456a09['pop']()):(_0x456a09['push'](_0x2f0bf9),_0x1dc870='');}}else{if(_0x12d516>=_0x4cf07d)_0x1dc870='';else{if(_0x12d516+_0x5a7e8b['length']>=_0x4cf07d){let _0x436f48=_0x4cf07d-_0x12d516;if('\x20'===_0x5a7e8b[_0x436f48-0x1])_0x436f48--;else{const _0x13402e=_0x5a7e8b['slice'](_0x436f48)['indexOf']('\x20');-0x1!==_0x13402e?_0x436f48+=_0x13402e:_0x436f48=_0x1dc870['length'];}_0x1dc870=_0x5a7e8b['slice'](0x0,_0x436f48)['join']('')+_0x33b83d,_0x12d516=_0x4cf07d;}else _0x12d516+=_0x5a7e8b['length'];}}_0x4b5258[_0x515859]=_0x1dc870;}return _0x4b5258['join']('\x0a')['replace'](/\n/g,'');}function tn(_0x1da3ec){const _0x49a624=[];for(let _0x36864c=0x0;_0x36864c<_0x1da3ec['length'];_0x36864c++){const _0x191d82=_0x1da3ec['substring'](_0x36864c)['match'](/^&[a-z0-9#]+;/);if(_0x191d82){const _0x599f45=_0x191d82[0x0];_0x49a624['push'](_0x599f45),_0x36864c+=_0x599f45['length']-0x1;}else _0x49a624['push'](_0x1da3ec[_0x36864c]);}return _0x49a624;}class V extends _0x3ab4d7{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x8dc4b5){super(_0x8dc4b5);const _0x134cfe=this['bindTemplate'];this['set']('message',U(_0x8dc4b5,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x8dc4b5,U(_0x8dc4b5,'Yes'),_0xd83e77,'submit'),this['cancelView']=this['_createButtonView'](_0x8dc4b5,U(_0x8dc4b5,'No'),_0x3472d4,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new ts(),this['keystrokes']=new _0x2851e6(),this['focusCycler']=new _0x1bf895({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-confirm-view'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-confirm-view-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x134cfe['to']('message')}]},{'tag':'div','attributes':{'class':'ck-confirm-view-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x2c84fa,_0x5b57bf,_0x1baaf0,_0x25f4a9){const _0x5ba4c4=new _0x1c3954(_0x2c84fa);return _0x5ba4c4['label']=_0x5b57bf,_0x5ba4c4['icon']=_0x1baaf0,_0x5ba4c4['extendTemplate']({'attributes':{'class':'ck-confirm-view-'+_0x25f4a9}}),_0x5ba4c4['on']('execute',()=>this['fire'](_0x25f4a9)),_0x5ba4c4;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x34c489=>{this['keystrokes']['listenTo'](_0x34c489['element']),this['focusTracker']['add'](_0x34c489['element']);}),this['keystrokes']['set']('esc',(_0x5dfb60,_0x491ec4)=>{this['fire']('cancel'),_0x491ec4();});}}function vt(_0x17c874){return class extends _0x17c874{['showConfirm'](_0x158546,_0x2ef657){return this['confirmView']=new V(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x158546,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x2ef657['appendChild'](this['confirmView']['element']),_0x2ef657['classList']['add']('ck-confirm-view-active'),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),this['on']('change:isConfirm',(_0x2735aa,_0x429bd6,_0x4c6686)=>{_0x4c6686||_0x2ef657['classList']['remove']('ck-confirm-view-active');}),new Promise(_0x3f5173=>this['confirmView']['on']('submit',_0x3f5173));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function k(_0x113467){let _0xe96afd=0x0,_0x3a21a9=0x0;for(const _0x5dae50 of ne(_0x113467))_0xe96afd=(_0xe96afd<<0x5)-_0xe96afd+_0x5dae50,_0xe96afd&=_0xe96afd,[_0xe96afd,_0x3a21a9]=[_0x3a21a9,_0xe96afd];return ie(_0xe96afd)+ie(_0x3a21a9);}function*ee(_0x9d8c6f){null==_0x9d8c6f||null==_0x9d8c6f?yield 0x12b9b0a1:0x0===_0x9d8c6f||!0x1===_0x9d8c6f?yield 0x0:0x1===_0x9d8c6f||0x1==_0x9d8c6f?yield 0x1:Array['isArray'](_0x9d8c6f)?yield*function*(_0x49b4b0){for(const _0x123c52 of _0x49b4b0)yield*ee(_0x123c52);}(_0x9d8c6f):'object'==typeof _0x9d8c6f?yield*ne(_0x9d8c6f):'string'==typeof _0x9d8c6f?yield*oe(_0x9d8c6f):'number'==typeof _0x9d8c6f&&(yield _0x9d8c6f);}function*ne(_0x419103){if(yield te('{'),_0x419103){const _0x4a25d1=Object['keys'](_0x419103)['sort']();for(const _0x27cd8c of _0x4a25d1){yield*oe(_0x27cd8c),yield te(':');const _0x3131b5=_0x419103[_0x27cd8c];yield*ee(_0x3131b5);}}yield te('}');}function*oe(_0x5405ab){yield te('\x22');for(const _0x585dfd of _0x5405ab)yield te(_0x585dfd);yield te('\x22');}function te(_0x50b87d){return _0x50b87d['charCodeAt'](0x0);}function ie(_0x45d63c){return(_0x45d63c*=Math['sign'](_0x45d63c))['toString'](0x24);}const nt=['initialData','context','toolbar','rootsAttributes'],et=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function ot(_0x22edb5,_0x1cb8c4,_0x3026c2,_0x58515b=[]){const _0x3dc807='string'==typeof _0x22edb5?_0x3026c2['get'](_0x22edb5)['constructor']:_0x22edb5['prototype']['constructor'];if(_0x1cb8c4['has'](_0x3dc807))return _0x1cb8c4['get'](_0x3dc807);_0x1cb8c4['set'](_0x3dc807,!0x0);const _0x9dec61=[...et,..._0x58515b]['map'](_0x4901d8=>{if(_0x3026c2['has'](_0x4901d8))return _0x3026c2['get'](_0x4901d8)['constructor'];})['filter'](_0x3e7a7e=>_0x3e7a7e);if(_0x3dc807&&_0x9dec61['includes'](_0x3dc807))return _0x1cb8c4['set'](_0x3dc807,!0x1),!0x1;if(!_0x3dc807['requires'])return _0x1cb8c4['set'](_0x3dc807,!0x0),!0x0;const _0x499986=_0x3dc807['requires']['every'](_0x57915d=>ot(_0x57915d,_0x1cb8c4,_0x3026c2,_0x58515b));return _0x1cb8c4['set'](_0x3dc807,_0x499986),_0x499986;}function Ct(_0x118261,_0x1beaff){const _0x3cefc8={};for(const _0x3a0347 of _0x118261['config']['names']())nt['includes'](_0x3a0347)||(_0x3cefc8[_0x3a0347]=_0x118261['config']['get'](_0x3a0347));const _0x2ed181=_0x3cefc8['plugins']||[],_0x48ca7f=_0x118261['constructor']['builtinPlugins']||[],_0x5d40d3=_0x2ed181['length']?_0x2ed181:_0x48ca7f,_0x5e3ca5=_0x3cefc8['extraPlugins']||[];delete _0x3cefc8['extraPlugins'];const _0x82043f=_0x3cefc8['removePlugins']||[];delete _0x3cefc8['removePlugins'];const _0x2ca181=_0x118261['_context']['config']['get']('plugins')||[],_0x5dc6ce=_0x5d40d3['concat'](_0x5e3ca5)['concat'](_0x2ca181)['map'](_0x49ec3c=>'string'==typeof _0x49ec3c?_0x48ca7f['find'](_0xa97634=>_0xa97634['pluginName']==_0x49ec3c):_0x49ec3c)['filter'](_0x428ee1=>!_0x82043f['includes'](_0x428ee1)&&!_0x82043f['includes'](_0x428ee1['pluginName'])),_0x36fbe5=Array['from'](new Set(_0x5dc6ce)),_0x3fe1db=new Map();return _0x3cefc8['plugins']=_0x36fbe5['filter'](_0x30310e=>ot(_0x30310e,_0x3fe1db,_0x118261['plugins'],_0x1beaff)),_0x3cefc8;}function _t(_0x23ce92,_0x42bd9e){const _0x44e55f=[];_0x23ce92['document']['selection']['on']('change:range',()=>{const _0x45cd7d=function(_0x48113e,_0x11497a){const _0x49e284=[];for(const _0x40c3ee of _0x48113e['markers']){const _0x33fd18=_0x40c3ee['getRange']();(_0x33fd18['containsPosition'](_0x11497a)||_0x33fd18['start']['isEqual'](_0x11497a)||_0x33fd18['end']['isEqual'](_0x11497a))&&_0x49e284['push'](_0x40c3ee);}return _0x49e284;}(_0x23ce92,_0x23ce92['document']['selection']['focus']),_0x34e296=[],_0x30850d=[],_0x1e50fa=[];for(const _0x271ce0 of _0x44e55f)_0x45cd7d['includes'](_0x271ce0)||_0x34e296['push'](_0x271ce0);for(const _0x5bd53f of _0x45cd7d)_0x44e55f['includes'](_0x5bd53f)||_0x30850d['push'](_0x5bd53f),_0x1e50fa['push'](_0x5bd53f);(_0x34e296['length']||_0x30850d['length'])&&_0x42bd9e({'left':_0x34e296,'entered':_0x30850d}),_0x44e55f['length']=0x0,_0x44e55f['push'](..._0x1e50fa);});}const xt='Ctrl+Shift+E';function It(_0x36c253,_0x390533){const _0x3f9203=_0x36c253['element'];_0x36c253['keystrokes']['listenTo'](_0x3f9203);for(const _0x3df457 of _0x390533)ro(_0x36c253,_0x3df457);_0x390533['on']('change',(_0x6ea5b,_0x4f9062)=>{for(const _0x446009 of _0x4f9062['removed'])to(_0x36c253,_0x446009);for(const _0x49a610 of Array['from'](_0x4f9062['added'])['reverse']())ro(_0x36c253,_0x49a610);}),_0x36c253['keystrokes']['set']('enter',(_0x275e2f,_0xa2f152)=>{_0x3f9203===_0x275e2f['target']&&(_0x36c253['focusCycler']['focusFirst'](),_0xa2f152());},{'filter':_0x5071f8=>_0x5071f8['target']===_0x3f9203}),_0x36c253['keystrokes']['set']('esc',(_0x96df2,_0x4a0452)=>{_0x3f9203!==_0x96df2['target']?_0x36c253['focus']():_0x36c253['fire']('escape'),_0x4a0452();}),_0x36c253['keystrokes']['set']('arrowdown',(_0x17a15e,_0x197d16)=>{_0x3f9203===_0x17a15e['target']&&(_0x36c253['fire']('arrowdown'),_0x197d16());}),_0x36c253['keystrokes']['set']('arrowup',(_0x3e555a,_0x5908f7)=>{_0x3f9203===_0x3e555a['target']&&(_0x36c253['fire']('arrowup'),_0x5908f7());});}function ro(_0x1df331,_0x45143a){_0x45143a['isRendered']&&(_0x1df331['focusTracker']['add'](_0x45143a['element']),_0x1df331['keystrokes']['listenTo'](_0x45143a['element']),_0x449a4a(_0x45143a)&&function(_0x17fdd6,_0x2ac6b7){const _0x256aa4=_0x17fdd6['actions'],_0x1acf77=_0x2ac6b7['actions'];for(const _0x4664bf of Object['keys'](_0x256aa4))if(_0x4664bf in _0x1acf77&&_0x256aa4[_0x4664bf]!==_0x1acf77[_0x4664bf])return!0x1;return!0x0;}(_0x1df331['focusCycler'],_0x45143a['focusCycler'])&&_0x1df331['focusCycler']['chain'](_0x45143a['focusCycler']));}function to(_0x554ec7,_0x4ce86c){_0x554ec7['focusTracker']['remove'](_0x4ce86c['element']),_0x554ec7['keystrokes']['stopListening'](_0x4ce86c['element']),_0x449a4a(_0x4ce86c)&&_0x554ec7['focusCycler']['unchain'](_0x4ce86c['focusCycler']);}const St='$elementId',Et='data-id';class At extends _0x365494{static get['pluginName'](){return'DocumentCompare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['init'](){this['context']instanceof _0x50c02e?this['_integrateEditor'](this['context']):this['listenTo'](this['context']['editors'],'add',(_0x323b2e,_0x2be71d)=>{_0x2be71d['on']('ready',()=>{this['_integrateEditor'](_0x2be71d);});});}get['editor'](){if(this['context']instanceof _0x50c02e)return this['context'];{const _0x1730d7=this['context']['editors']['first'];if(!_0x1730d7)throw new _0x21f53a('documentcompare-no-editor',this);return _0x1730d7;}}['getDiff'](_0x1759c2,_0x3ab641,_0x169b3={'anchor':'main','markDeletions':!0x1}){let _0x5cd2fd,_0x45f36b;const _0x27759f=this['editor'];if('string'==typeof _0x169b3['anchor']){const _0x1326ae=_0x27759f['model']['document']['getRoot'](_0x169b3['anchor']);if(!_0x1326ae)throw new _0x21f53a('documentcompare-compare-no-root',this,{'anchor':_0x169b3['anchor']});_0x5cd2fd=_0x1326ae,_0x45f36b=_0x27759f['model']['createPositionAt'](_0x1326ae,0x0);}else _0x5cd2fd=_0x169b3['anchor']['clone'](),_0x45f36b=_0x169b3['anchor']['clone']();const _0x7a13c0=_0x27759f['data']['parse'](_0x1759c2,_0x5cd2fd),_0x2d3c82=_0x27759f['data']['parse'](_0x3ab641,_0x5cd2fd);return new Mt(_0x7a13c0,_0x2d3c82,_0x27759f,{'anchor':_0x45f36b,'markDeletions':_0x169b3['markDeletions']});}['isMarkedRemoveOperation'](_0x437663){return'marker'==_0x437663['type']&&_0x437663['name']['startsWith']('$markedRemove');}['_integrateEditor'](_0x12b529){_0x12b529['conversion']['for']('upcast')['add'](_0x32a15c=>{_0x32a15c['on']('element',(_0x5063d5,_0x31c041,_0x20180a)=>{if(_0x31c041['modelRange'])for(const _0x23673b of _0x31c041['modelRange']['getItems']({'shallow':!0x0})){if(_0x23673b['is']('$textProxy'))continue;const _0x55e705=_0x31c041['viewItem']['getAttribute'](Et);_0x55e705&&_0x20180a['writer']['setAttribute'](St,_0x55e705,_0x23673b);}},{'priority':'lowest'});}),_0x12b529['model']['schema']['addAttributeCheck'](()=>!0x0,St);}}class Mt{['_editor'];['_diffItems']=[];['_operationsData']=[];['_markDeletions'];['_anchor'];['_path']=[0x0];['_parents']=[];constructor(_0x5e6529,_0x93bbb6,_0x3ccd22,_0xd8399e){this['_editor']=_0x3ccd22,this['_markDeletions']=!!_0xd8399e['markDeletions'],this['_anchor']=_0xd8399e['anchor'];const _0x216791=this['_tokenizeModel'](_0x5e6529),_0x3090be=this['_tokenizeModel'](_0x93bbb6);this['_diffItems']=this['_diffModelTokens'](_0x216791,_0x3090be),this['_calculateOperationsData'](),this['_markDeletions']||this['_calculateMarkersOperationsData'](_0x5e6529['markers'],_0x93bbb6['markers']);}['getOperationsData'](){return this['_operationsData'];}['getOperations'](){const _0x5554b4=this['_editor']['model']['document'],_0x226998=[];let _0x3fad56=_0x5554b4['version'];for(const _0x8d11b0 of this['_operationsData'])switch(_0x8d11b0['type']){case'attribute':{const _0x372f56=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']),_0x4eb324=_0x372f56['getShiftedBy'](_0x8d11b0['howMany']),_0x3308a2=new _0x1ca5f8(_0x372f56,_0x4eb324),_0x149675=JSON['parse'](_0x8d11b0['oldValue']),_0x90f0df=JSON['parse'](_0x8d11b0['newValue']);_0x226998['push'](new _0x376df4(_0x3308a2,_0x8d11b0['key'],_0x149675,_0x90f0df,_0x3fad56++));break;}case'insert':{const _0x2a0e44=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']),_0x1be362=this['_makeModelFromTokens'](_0x8d11b0['tokens']);_0x226998['push'](new _0x25ebf1(_0x2a0e44,_0x1be362,_0x3fad56++));break;}case'remove':{const _0x448302=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']),_0x573a35=new _0x1427f8(_0x5554b4['graveyard'],[0x0]);_0x226998['push'](new _0x1648c4(_0x448302,_0x8d11b0['howMany'],_0x573a35,_0x3fad56++));break;}case'rename':{const _0x2ea87b=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']);_0x226998['push'](new _0x185d57(_0x2ea87b,_0x8d11b0['oldName'],_0x8d11b0['newName'],_0x3fad56++));break;}case'split':{const _0x5b3937=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']),_0x4c9574=this['_getPositionFromAnchorAndPath'](this['_anchor'],_0x8d11b0['path']['slice'