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 • 76.3 kB
/* * Copyright (c) 2003-2026, 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 _0x1055f5,Editor as _0x1ab7ed,Plugin as _0x55f00f}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x53c10c,Collection as _0x3389d5,FocusTracker as _0x3b21dc,KeystrokeHandler as _0x56353a,first as _0x17f563,toArray as _0x1af04b,uid as _0x3b108b}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x147358,DropdownButtonView as _0x52aca2,FocusCycler as _0x4eab07,IconView as _0x538188,View as _0x4a300f,isViewWithFocusCycler as _0x5069ce}from'@ckeditor/ckeditor5-ui';import{IconCancel as _0x3f9185,IconCheck as _0xcb7e48,IconNotification as _0x6b588e}from'@ckeditor/ckeditor5-icons';import{setHighlightHandling as _0x57922c,toWidget as _0x29d85b}from'@ckeditor/ckeditor5-widget';import{DateTime as _0x1dec02}from'luxon';import{AttributeOperation as _0x23c8a0,InsertOperation as _0x5dd876,MarkerOperation as _0xc9d81f,MergeOperation as _0x19aa9e,ModelPosition as _0x4bebeb,ModelRange as _0x2761a1,ModelText as _0x48c726,ModelTreeWalker as _0x37addd,MoveOperation as _0x229231,RenameOperation as _0x1af684,SplitOperation as _0x5c12e9}from'@ckeditor/ckeditor5-engine';import{diffArrays as _0x43d7fd}from'diff';var B=class extends _0x1055f5{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x515179,_0x1e250a){let _0x2506f1;if(_0x1e250a||(_0x1e250a=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x1e250a?_0x2506f1=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x2506f1=this['context']['editors']['find'](_0x2c1d20=>_0x2c1d20['config']['get']('collaboration.channelId')==_0x1e250a)),!_0x2506f1)throw new _0x53c10c('permissions-set-permissions-invalid-channel-id',null);const _0x9ff3e2=_0x2506f1['plugins'],_0x311edd=_0x9ff3e2['has']('CommentsRepository')?_0x9ff3e2['get']('CommentsRepository'):void 0x0,_0x1396ee=_0x9ff3e2['has']('CommentsOnly')&&_0x9ff3e2['get']('CommentsOnly'),_0x153d0=_0x515179['includes']('document:write'),_0x9215e1=_0x515179['includes']('comment:modify_all'),_0x8fd6f9=_0x515179['includes']('comment:admin'),_0x1c76bf=_0x515179['includes']('comment:write'),_0x4ee1ac=_0x1c76bf||_0x8fd6f9,_0x14c19c=_0x4ee1ac||_0x9215e1,_0x42d8a8=_0x153d0||_0x4ee1ac;if(_0x1396ee&&(_0x1396ee['isEnabled']=!_0x153d0&&_0x14c19c),_0x2506f1 instanceof _0x1ab7ed&&(_0x153d0||_0x14c19c&&_0x311edd?_0x2506f1['disableReadOnlyMode']('no-permissions'):_0x2506f1['enableReadOnlyMode']('no-permissions')),_0x311edd){_0x311edd['setPermissions']({'admin':_0x8fd6f9,'modifyAll':_0x9215e1,'write':_0x1c76bf,'resolve':_0x42d8a8},_0x1e250a);const _0x12d097=_0x2506f1 instanceof _0x1ab7ed&&_0x2506f1['commands']['get']('addCommentThread');_0x12d097&&(_0x4ee1ac?_0x12d097['clearForceDisabled']('noPermissions'):_0x12d097['forceDisabled']('noPermissions'));}}};function D(_0x46eb7e,_0x53fa32){const t=_0x46eb7e['t'];switch(_0x53fa32){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'';}}var $=class extends _0x1055f5{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[B];}constructor(_0x2d3bfe){super(_0x2d3bfe),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x3389d5(),this['_locale']=_0x2d3bfe['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:_0x26dba0,name:_0x3d93ba,..._0x585333}){if(!_0x26dba0||'string'!=typeof _0x26dba0)throw new _0x53c10c('users-add-invalid-id');if(this['users']['has'](_0x26dba0))throw new _0x53c10c('users-add-duplicated-id',null,{'id':_0x26dba0});const _0x833461=this['context']['config']['get']('users.getInitialsCallback'),_0x4636f4={..._0x585333,'id':_0x26dba0,'name':R(this['_locale'],_0x3d93ba),'color':this['_getNextColor']()};_0x4636f4['name']=R(this['_locale'],_0x4636f4['name']);const _0x496879=new L(_0x4636f4,_0x833461);return this['users']['add'](_0x496879),_0x496879;}['getUser'](_0xbfb161){return this['users']['get'](_0xbfb161);}['useAnonymousUser'](){const _0x2bd30f=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x2bd30f);}['defineMe'](_0x3fb9b0){if(this['_myId'])throw new _0x53c10c('users-me-already-defined',null);const _0x23b849=this['getUser'](_0x3fb9b0);if(!_0x23b849)throw new _0x53c10c('users-me-missing-user',null);this['_myId']=_0x3fb9b0,_0x23b849['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x320c7f=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x320c7f&&(this['_lastColor']=0x0),new F(this['_lastColor']++);}['_addAnonymousUser'](){const _0x3956d3=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x3956d3,'name':D(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}},L=class{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x5c893b,_0x795618){this['id']=_0x5c893b['id'],this['color']=_0x5c893b['color'],this['name']=_0x5c893b['name'],this['initials']=_0x795618?_0x795618(this['name']):this['_computeInitials'](),this['avatar']=_0x5c893b['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0x13058d=this['name']['split']('\x20')['filter'](_0x531829=>/^[\p{Letter}]/u['test'](_0x531829));return 0x1===_0x13058d['length']?this['_getInitial'](_0x13058d[0x0]):0x0===_0x13058d['length']?this['_getInitial'](this['name']):this['_getInitial'](_0x13058d[0x0])+this['_getInitial'](_0x13058d[_0x13058d['length']-0x1]);}['_getInitial'](_0x1d077d){return String['fromCodePoint'](_0x1d077d['codePointAt'](0x0))['toUpperCase']();}};function R(_0x140a91,_0x52d39d=''){return''==(_0x52d39d=_0x52d39d['trim']())?D(_0x140a91,'Anonymous'):_0x52d39d;}var F=class{['_id'];constructor(_0x49c72a){this['_id']=_0x49c72a;}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'];}['getColorVariable'](){return'var(--ck-user-colors--'+this['id']+',\x20var(--ck-user-colors--0))';}['getColorAlphaVariable'](){return'var(--ck-user-colors--'+this['id']+'-alpha,\x20var(--ck-user-colors--0-alpha))';}},H=class extends _0x4a300f{['name'];['notificationView'];constructor(_0x19a76c,_0x5a3905,_0xfc0516,_0x11a855){super(_0x19a76c),this['name']=_0x5a3905['name'],this['notificationView']=null;const _0x5ab0f5=['ck','ck-user'],_0x2657fe=['ck','ck-user__img'];_0x5a3905['isAnonymous']&&_0x2657fe['push']('ck-user__anonymous'),!_0x5a3905['isAnonymous']&&_0x5a3905['isMe']&&_0x5ab0f5['push']('ck-user_me'),(_0x5a3905['avatar']||_0x11a855)&&_0x2657fe['push']('ck-user__avatar');let _0x1b1001=null;if(_0x11a855&&(_0x1b1001=new _0x538188(),_0x1b1001['content']=_0x11a855,_0x1b1001['extendTemplate']({'attributes':{'class':['ck-user__avatar-icon']}})),_0xfc0516){const _0x43d515=new _0x538188();_0x43d515['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x43d515['content']=_0x6b588e,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0xfc0516},'children':[_0x43d515]};}const _0x6c8c44=[{'tag':'div','attributes':{'class':_0x2657fe,'style':{'background-image':_0x5a3905['avatar']&&!_0x11a855?'url(\x27'+_0x5a3905['avatar']+'\x27)':''}},'children':_0x1b1001?[_0x1b1001]:[]},{'tag':'div','attributes':{'class':_0x5a3905['avatar']||_0x11a855?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x5a3905['name']},'children':[{'text':_0x5a3905['initials']}]}];this['notificationView']&&_0x6c8c44['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x5ab0f5,'data-user-id':_0x5a3905['id']},'children':_0x6c8c44});}},U=class extends _0x4a300f{['children'];['iconView'];['labelView'];constructor(_0x41b201){super(_0x41b201);const _0x56a5e8=this['bindTemplate'];this['set']('icon',void 0x0),this['set']('label',void 0x0),this['set']('tooltip',void 0x0),this['set']('tooltipPosition','n'),this['set']('tooltipClass',void 0x0),this['set']('iconPosition','left'),this['set']('class',void 0x0),this['children']=this['createCollection'](),this['iconView']=this['_createIconView'](),this['labelView']=this['_createLabelView'](),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-pill',_0x56a5e8['to']('class'),_0x56a5e8['to']('iconPosition',_0x36e5a8=>'right'===_0x36e5a8?'ck-pill_icon-right':'')],'data-cke-tooltip-text':_0x56a5e8['to']('tooltip'),'data-cke-tooltip-position':_0x56a5e8['to']('tooltipPosition'),'data-cke-tooltip-class':_0x56a5e8['to']('tooltipClass')},'children':this['children']});}['render'](){super['render'](),this['icon']&&this['children']['add'](this['iconView']),this['children']['add'](this['labelView']),this['on']('change:icon',(_0x27966d,_0x20f6db,_0xeedaa0,_0x16021e)=>{_0xeedaa0&&!_0x16021e?this['children']['add'](this['iconView'],0x0):!_0xeedaa0&&_0x16021e&&this['children']['remove'](this['iconView']);});}['_createIconView'](){const _0x147926=new _0x538188();return _0x147926['extendTemplate']({'attributes':{'class':'ck-pill__icon'}}),_0x147926['bind']('content')['to'](this,'icon'),_0x147926;}['_createLabelView'](){const _0x205de0=new _0x4a300f(this['locale']),_0x4794af=this['bindTemplate'];return _0x205de0['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-pill__label']},'children':[{'text':_0x4794af['to']('label')}]}),_0x205de0;}},z=class extends _0x4a300f{['id'];constructor(_0x830711,_0x5d8b8d){super(_0x830711),this['id']='ck-aria-description-'+_0x3b108b(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x5d8b8d}]});}},W=class extends _0x147358{['render'](){super['render'](),j(this);}},Y=class extends _0x52aca2{['render'](){super['render'](),j(this);}};function j(_0xde5694){_0xde5694['listenTo'](_0xde5694['element'],'mousedown',(_0x1cabea,_0x2b259e)=>{_0x2b259e['stopPropagation'](),_0x2b259e['preventDefault']();}),_0xde5694['listenTo'](_0xde5694['element'],'mouseup',()=>{_0xde5694['element']['focus']();});}function J(_0x434566){const _0x14035c=_0x434566['split'](':');return{'group':_0x14035c[0x0],'type':_0x14035c[0x1],'subType':_0x14035c['length']>=0x5?_0x14035c[0x2]:null,'id':_0x14035c['length']<0x5?_0x14035c[0x2]:_0x14035c[0x3],'authorId':_0x14035c['length']<0x5?_0x14035c[0x3]:_0x14035c[0x4],'markerCount':0x6==_0x14035c['length']?_0x14035c[0x5]:null};}function G(_0x19b680,_0x1aac44){const _0x134d18=_0x19b680['end']['nodeBefore'];if(_0x134d18&&_0x134d18['is']('element')&&_0x1aac44['schema']['isBlock'](_0x134d18)&&!_0x1aac44['schema']['isObject'](_0x134d18)){const _0x32befc=_0x1aac44['createPositionAt'](_0x134d18,'end');return _0x1aac44['createRange'](_0x19b680['start'],_0x32befc);}return _0x19b680;}var K=class extends _0x55f00f{['afterInit'](){const _0xd348ef=this['editor'];_0xd348ef['plugins']['has']('AlignmentEditing')&&_0xd348ef['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('alignment');}};const q=['BoldEditing','ItalicEditing','UnderlineEditing','CodeEditing','StrikethroughEditing','SubscriptEditing','SuperscriptEditing'];var Z=class extends _0x55f00f{['afterInit'](){const _0x4c6c52=this['editor'],_0x1474b2=_0x4c6c52['plugins']['get']('SuggestionsConversion');for(const _0x43c7b0 of q){if(!_0x4c6c52['plugins']['has'](_0x43c7b0))continue;const _0x5802f5=_0x43c7b0['slice'](0x0,-0x7)['toLowerCase']();_0x1474b2['registerInlineAttribute'](_0x5802f5);}}},Q=class extends _0x55f00f{['afterInit'](){const _0x73c249=this['editor'],_0x53006b=_0x73c249['plugins']['get']('SuggestionsConversion');_0x73c249['plugins']['has']('BookmarkEditing')&&_0x53006b['registerBlockAttribute']('bookmarkId');}};const X=[{'pluginName':'FontSizeEditing','commandName':'fontSize'},{'pluginName':'FontFamilyEditing','commandName':'fontFamily'},{'pluginName':'FontColorEditing','commandName':'fontColor'},{'pluginName':'FontBackgroundColorEditing','commandName':'fontBackgroundColor'}];var tt=class extends _0x55f00f{['afterInit'](){const _0x41c792=this['editor']['plugins']['get']('SuggestionsConversion');for(const {pluginName:_0x23fc5b,commandName:_0xe5a128}of X)this['editor']['plugins']['has'](_0x23fc5b)&&_0x41c792['registerInlineAttribute'](_0xe5a128);}},et=class extends _0x55f00f{['afterInit'](){const {editor:_0x2a5375}=this;if(!_0x2a5375['plugins']['has']('FootnotesPropertiesEditing'))return;const _0xf84212=_0x2a5375['plugins']['get']('SuggestionsConversion');_0xf84212['registerBlockAttribute']('footnotesListStyle'),_0xf84212['registerBlockAttribute']('footnotesListStart');}},st=class extends _0x55f00f{['afterInit'](){const _0x2b0de8=this['editor'];if(!_0x2b0de8['plugins']['has']('GeneralHtmlSupport')||!_0x2b0de8['plugins']['has']('DataSchema'))return;const _0x144164=_0x2b0de8['plugins']['get']('SuggestionsConversion'),_0x381927=_0x2b0de8['plugins']['get']('GeneralHtmlSupport'),_0x46bd15=_0x2b0de8['plugins']['get']('DataSchema');for(const _0x40ec4a of _0x46bd15['getDefinitionsForView'](/.*/,!0x1)){const _0x50a630=_0x381927['getGhsAttributeNameForElement'](_0x40ec4a['view']);!_0x40ec4a['isInline']||_0x40ec4a['isObject']||'appliesToBlock'in _0x40ec4a&&_0x40ec4a['appliesToBlock']?_0x144164['registerBlockAttribute'](_0x50a630):_0x144164['registerInlineAttribute'](_0x50a630);}}},it=class extends _0x55f00f{['afterInit'](){const _0x5e930f=this['editor'];_0x5e930f['plugins']['has']('HighlightEditing')&&_0x5e930f['plugins']['get']('SuggestionsConversion')['registerInlineAttribute']('highlight');}},nt=class extends _0x55f00f{['afterInit'](){const _0xb9bd60=this['editor'];_0xb9bd60['plugins']['has']('HtmlEmbed')&&_0xb9bd60['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('value');}},ot=class extends _0x55f00f{['afterInit'](){const _0x4cc6e6=this['editor'];if(!_0x4cc6e6['plugins']['has']('ImageEditing'))return;const _0x2181db=_0x4cc6e6['plugins']['get']('SuggestionsConversion');_0x2181db['registerBlockAttribute']('src'),_0x4cc6e6['plugins']['has']('ImageResize')&&_0x2181db['registerBlockAttribute']('resizedWidth'),_0x4cc6e6['plugins']['has']('ImageTextAlternativeEditing')&&_0x2181db['registerBlockAttribute']('alt'),_0x4cc6e6['plugins']['has']('PictureEditing')&&_0x2181db['registerBlockAttribute']('sources'),_0x4cc6e6['plugins']['has']('ImageSizeAttributes')&&(_0x2181db['registerBlockAttribute']('width'),_0x2181db['registerBlockAttribute']('height'));}},rt=class extends _0x55f00f{['afterInit'](){const _0x116a45=this['editor'],_0x992c17=_0x116a45['plugins']['get']('SuggestionsConversion');_0x116a45['plugins']['has']('IndentBlock')&&(_0x992c17['registerBlockAttribute']('blockIndent'),_0x116a45['plugins']['has']('ListEditing')&&(_0x992c17['registerBlockAttribute']('blockIndentList'),_0x992c17['registerBlockAttribute']('blockIndentListItem')));}},at=class extends _0x55f00f{['afterInit'](){const _0x12e6cc=this['editor'];_0x12e6cc['plugins']['has']('LineHeight')&&_0x12e6cc['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('lineHeight');}},ct=class extends _0x55f00f{['afterInit'](){const _0x3cc73f=this['editor'];if(!_0x3cc73f['plugins']['has']('LinkEditing'))return;const _0x2a8dc8=_0x3cc73f['plugins']['get']('SuggestionsConversion'),_0x1bd47d=_0x3cc73f['commands']['get']('link');_0x2a8dc8['registerInlineAttribute']('linkHref');for(const _0x4bf449 of _0x1bd47d['manualDecorators'])_0x2a8dc8['registerInlineAttribute'](_0x4bf449['id']);}},lt=class extends _0x55f00f{['afterInit'](){const _0x29845e=this['editor'];if(!_0x29845e['plugins']['has']('ListEditing'))return;const _0x3365aa=_0x29845e['plugins']['get']('SuggestionsConversion'),_0x4828ac=_0x29845e['plugins']['has']('TodoListEditing');_0x3365aa['registerBlockAttribute']('listItemId'),_0x3365aa['registerBlockAttribute']('listType'),_0x3365aa['registerBlockAttribute']('listIndent'),_0x4828ac&&_0x3365aa['registerBlockAttribute']('todoListChecked');}},ht=class extends _0x55f00f{['afterInit'](){if(!this['editor']['plugins']['has']('ListPropertiesEditing'))return;const _0x4c473b=this['editor']['config']['get']('list.properties'),_0x6df3bf=this['editor']['plugins']['get']('SuggestionsConversion');_0x4c473b['styles']&&_0x6df3bf['registerBlockAttribute']('listStyle'),_0x4c473b['reversed']&&_0x6df3bf['registerBlockAttribute']('listReversed'),_0x4c473b['startIndex']&&_0x6df3bf['registerBlockAttribute']('listStart');}},ut=class extends _0x55f00f{['afterInit'](){const _0x47753e=this['editor'],_0xa24f7a=_0x47753e['plugins']['get']('SuggestionsConversion');_0x47753e['plugins']['has']('MultiLevelList')&&_0xa24f7a['registerBlockAttribute']('listMarkerStyle');}},dt=class extends _0x55f00f{['afterInit'](){const _0x26185f=this['editor'];if(!_0x26185f['plugins']['has']('TableEditing'))return;const _0x170924=_0x26185f['plugins']['get']('SuggestionsConversion');_0x170924['registerBlockAttribute']('headingRows'),_0x170924['registerBlockAttribute']('headingColumns');}},gt=class extends _0x55f00f{['afterInit'](){const {plugins:_0x5be81a}=this['editor'];if(!_0x5be81a['has']('TablePropertiesEditing'))return;const _0x168216=_0x5be81a['get']('SuggestionsConversion');for(const _0x32aa32 of['tableBorderColor','tableBorderStyle','tableBorderWidth','tableAlignment','tableWidth','tableHeight','tableBackgroundColor'])_0x168216['registerBlockAttribute'](_0x32aa32);}},ft=class extends _0x55f00f{['afterInit'](){const _0x35b3eb=this['editor'],_0xa07118=_0x35b3eb['plugins']['get']('SuggestionsConversion');_0x35b3eb['plugins']['has']('TableLayout')&&_0xa07118['registerBlockAttribute']('tableType');}},mt=class extends _0x55f00f{['afterInit'](){const _0x3f2ad9=this['editor'],_0x59a617=this['editor']['plugins']['get']('SuggestionsConversion');_0x3f2ad9['plugins']['has']('Uploadcare')&&_0x3f2ad9['plugins']['has']('UploadcareImageEdit')&&_0x59a617['registerBlockAttribute']('uploadcareImageId');}},pt=class extends _0x55f00f{['afterInit'](){const _0x57a0f3=this['editor'];if(!_0x57a0f3['plugins']['has']('ShiftEnter'))return;const _0x5d4c6e=_0x57a0f3['plugins']['get']('SuggestionsConversion'),_0x14c530=(_0x372951,_0x4502f7,_0x12bfd0,_0x46de5c)=>{if(_0x46de5c&&!_0x12bfd0['options']['showSuggestionHighlights'])return;if(!_0x12bfd0['consumable']['test'](_0x4502f7['markerRange'],_0x372951['name']))return;const _0xe64260=_0x57a0f3['model'];for(const _0x4b49ef of _0x4502f7['markerRange']['getItems']()){if(!_0x4b49ef['is']('element','softBreak'))continue;const _0x1f913c='deletion'==_0x4502f7['markerName']['split'](':')[0x1]?'merge':'split',{id:_0x524dd4,authorId:_0x196e21}=J(_0x4502f7['markerName']),_0x282ce7=_0x12bfd0['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1f913c,'data-suggestion':_0x524dd4,'data-author-id':_0x196e21}),_0x49b712=_0x12bfd0['mapper']['toViewPosition'](_0xe64260['createPositionBefore'](_0x4b49ef));!_0x46de5c&&_0x5d4c6e['_activeMarkers']['includes'](_0x4502f7['markerName'])&&_0x12bfd0['writer']['addClass']('ck-suggestion-marker--active',_0x282ce7),_0x12bfd0['writer']['insert'](_0x49b712,_0x282ce7),_0x12bfd0['mapper']['bindElementToMarker'](_0x282ce7,_0x4502f7['markerName']);}};_0x57a0f3['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x40c61a,_0x4c318a,_0x4ee421)=>{_0x14c530(_0x40c61a,_0x4c318a,_0x4ee421,!0x1);},{'priority':'high'}),_0x57a0f3['editing']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x3461c1,_0x1d38e6,_0x394674)=>{_0x14c530(_0x3461c1,_0x1d38e6,_0x394674,!0x1);},{'priority':'high'}),_0x57a0f3['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x2e08b8,_0x282c5a,_0x5edb5b)=>{_0x14c530(_0x2e08b8,_0x282c5a,_0x5edb5b,!0x0);},{'priority':'high'}),_0x57a0f3['data']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x1d4d84,_0x4aaec9,_0x449038)=>{_0x14c530(_0x1d4d84,_0x4aaec9,_0x449038,!0x0);},{'priority':'high'});}},kt=class extends _0x55f00f{['afterInit'](){const _0x2d92e1=this['editor'];if(!_0x2d92e1['plugins']['has']('MediaEmbedEditing'))return;const _0x27a0be=_0x2d92e1['plugins']['get']('SuggestionsConversion');_0x2d92e1['plugins']['has']('MediaEmbedResizeEditing')&&_0x27a0be['registerBlockAttribute']('resizedWidth'),_0x2d92e1['plugins']['has']('MediaEmbedStyleEditing')&&_0x27a0be['registerBlockAttribute']('mediaStyle'),_0x2d92e1['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x499fcc,{writer:_0x3bed90,options:_0x66dda4})=>{if(_0x66dda4['showSuggestionHighlights'])return _0x3bed90['createEmptyElement']('div');},'converterPriority':'high'}),_0x2d92e1['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2ff263,_0x33a345,_0x4d5ce4)=>{_0x4d5ce4['options']['showSuggestionHighlights']&&_0x2ff263['stop']();},{'priority':'high'});}},yt=class extends _0x55f00f{['afterInit'](){const _0x3324bc=this['editor'];if(!_0x3324bc['plugins']['has']('Table'))return;_0x3324bc['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x46a12d,_0x406762,_0x215a68)=>{((_0x3d654d,_0x493400,_0x33dc61)=>{if(!_0x33dc61['options']['showSuggestionHighlights'])return;const _0x18b2d4=_0x493400['item'];if(!_0x18b2d4||!_0x18b2d4['is']('element','tableCell'))return;const _0x36d601=_0x33dc61['mapper']['toViewElement'](_0x18b2d4);if(_0x36d601){const {id:_0x2a5368,authorId:_0x3500ea}=J(_0x493400['markerName']);_0x57922c(_0x36d601,_0x33dc61['writer'],(_0x5338f5,_0x3ded9a,_0xc18f05)=>{_0xc18f05['addClass'](_0x1af04b(_0x3ded9a['classes']),_0x5338f5),_0xc18f05['setAttribute']('data-suggestion',_0x2a5368,_0x5338f5),_0xc18f05['setAttribute']('data-author-id',_0x3500ea,_0x5338f5);});}})(0x0,_0x406762,_0x215a68);},{'priority':'highest'});}},bt=class extends _0x55f00f{['afterInit'](){const _0xf50a61=this['editor'];_0xf50a61['plugins']['has']('HorizontalLineEditing')&&_0xf50a61['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x27a6b4,{writer:_0x3b9da9,options:_0x1d8765})=>{if(!_0x1d8765['showSuggestionHighlights'])return null;const _0x93f089=_0x3b9da9['createContainerElement']('div'),_0x21bb53=_0x3b9da9['createEmptyElement']('hr');return _0x3b9da9['addClass']('ck-horizontal-line',_0x93f089),_0x3b9da9['insert'](_0x3b9da9['createPositionAt'](_0x93f089,0x0),_0x21bb53),_0x93f089;},'converterPriority':'high'});}},wt=class extends _0x55f00f{['afterInit'](){const {plugins:_0x36e7d5,model:_0x165565}=this['editor'];if(!_0x36e7d5['has']('TableCellPropertiesEditing'))return;const _0x1e9f97=_0x36e7d5['get']('SuggestionsConversion');for(const _0x3284cc of['tableCellBorderColor','tableCellBorderStyle','tableCellBorderWidth','tableCellPadding','tableCellWidth','tableCellHeight','tableCellBackgroundColor','tableCellHorizontalAlignment','tableCellVerticalAlignment'])_0x1e9f97['registerBlockAttribute'](_0x3284cc);_0x165565['schema']['checkAttribute']('tableCell','tableCellType')&&_0x1e9f97['registerBlockAttribute']('tableCellType');}},vt=class extends _0x55f00f{['afterInit'](){const _0x999348=this['editor'];_0x999348['plugins']['has']('TableEditing')&&_0x999348['config']['get']('table.enableFooters')&&_0x999348['plugins']['get']('SuggestionsConversion')['registerBlockAttribute']('footerRows');}},Ct=class extends _0x55f00f{['_activeMarkers']=[];['_blockAttributeKeys']=new Set(['$elementName']);['_inlineAttributeKeys']=new Set();static get['pluginName'](){return'SuggestionsConversion';}static get['requires'](){return[K,Z,Q,tt,et,st,it,bt,nt,ot,rt,at,ct,lt,ht,kt,ut,pt,yt,dt,vt,ft,wt,gt,mt];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0xc83a10=this['editor'],_0x2d70be=(_0x13f44d,_0x2de9f4,_0x36d143)=>{const {id:_0x3e1d5b,authorId:_0x29e44d,type:_0x24ce0d,subType:_0x3a5133}=J(_0x13f44d['markerName']),_0x4e420c=['ck-suggestion-marker',this['_getClassName'](_0x24ce0d,_0x3a5133)];let _0x3da2a3=0xbb8;return _0x36d143||this['_activeMarkers']['includes'](_0x13f44d['markerName'])&&(_0x4e420c['push']('ck-suggestion-marker--active'),_0x3da2a3=0xbc2),'deletion'==_0x24ce0d&&(_0x3da2a3+=0x5),{'classes':_0x4e420c,'attributes':{'data-suggestion':_0x3e1d5b,'data-author-id':_0x29e44d},'priority':_0x3da2a3};};_0xc83a10['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x5219c9,_0x1b1246)=>_0x2d70be(_0x5219c9,0x0,!0x1)}),_0xc83a10['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x3d5075,_0x670328)=>_0x2d70be(_0x3d5075,0x0,!0x0)}),_0xc83a10['conversion']['for']('dataDowncast')['add'](_0x3c213c=>{_0x3c213c['on']('addMarker:suggestion',(_0x5a4889,_0x1f81c0,_0x59f5ff)=>{if(!_0x59f5ff['options']['showSuggestionHighlights'])return;const _0x66f728=_0x1f81c0['item'];if(!_0x66f728)return;const _0x1ad0d8=_0x59f5ff['mapper']['toViewElement'](_0x66f728);_0xc83a10['model']['schema']['isObject'](_0x66f728)&&_0x1ad0d8&&!_0x1ad0d8['getCustomProperty']('widget')&&_0x1ad0d8['is']('containerElement')&&_0x29d85b(_0x1ad0d8,_0x59f5ff['writer']);},{'priority':'high'});});const _0x18dcb5=(_0x4a4b26,_0x13c83a,_0xc68dda,_0x43ab5f,_0x378725)=>{if(_0x43ab5f&&!_0xc68dda['options']['showSuggestionHighlights'])return;if(!_0x13c83a['item'])return;const {id:_0x4ef53e,authorId:_0xb13ea8,subType:_0x4e5992}=J(_0x13c83a['markerName']);if(_0x378725){const _0x1fa510=_0x4e5992['split']('|')[0x0];if(!this['isBlockAttribute'](_0x1fa510))return;}if(_0x13c83a['item']['is']('selection'))return void _0xc68dda['consumable']['consume'](_0x13c83a['item'],_0x4a4b26['name']);const _0x34a895=_0xc68dda['mapper']['toViewElement'](_0x13c83a['item']);if(_0x13c83a['item']['is']('element')&&_0xc83a10['model']['schema']['isBlock'](_0x13c83a['item'])&&!_0x34a895['getCustomProperty']('addHighlight')){_0xc68dda['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x34a895),_0xc68dda['writer']['setAttribute']('data-suggestion',_0x4ef53e,_0x34a895),_0xc68dda['writer']['setAttribute']('data-author-id',_0xb13ea8,_0x34a895),_0xc68dda['mapper']['bindElementToMarker'](_0x34a895,_0x13c83a['markerName']),_0x43ab5f||(this['_activeMarkers']['includes'](_0x13c83a['markerName'])?_0xc68dda['writer']['addClass']('ck-suggestion-marker--active',_0x34a895):_0xc68dda['writer']['removeClass']('ck-suggestion-marker--active',_0x34a895));for(const _0x107490 of _0xc83a10['model']['createRangeIn'](_0x13c83a['item'])['getItems']())_0xc68dda['consumable']['consume'](_0x107490,_0x4a4b26['name']);_0xc68dda['consumable']['consume'](_0x13c83a['item'],_0x4a4b26['name']);}},_0x89cfef=(_0x232605,_0x3e39be,_0x4d20fd,_0x19ec65)=>{const _0x81ffbd=_0x4d20fd['mapper']['markerNameToElements'](_0x3e39be['markerName']);if(_0x81ffbd){if(_0x19ec65){const {subType:_0x104a6d}=J(_0x3e39be['markerName']),_0x177b84=_0x104a6d['split']('|')[0x0];if(!this['isBlockAttribute'](_0x177b84))return;}for(const _0x270a17 of _0x81ffbd)_0x270a17['getCustomProperty']('addHighlight')||(_0x4d20fd['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x270a17),_0x4d20fd['writer']['removeAttribute']('data-suggestion',_0x270a17),_0x4d20fd['writer']['removeAttribute']('data-author-id',_0x270a17),_0x4d20fd['mapper']['unbindElementFromMarkerName'](_0x270a17,_0x3e39be['markerName']));}};_0xc83a10['conversion']['for']('editingDowncast')['add'](_0x2d53cd=>{_0x2d53cd['on']('addMarker:suggestion:formatBlock',(_0x4405cb,_0x4c3282,_0x1beaeb)=>{_0x18dcb5(_0x4405cb,_0x4c3282,_0x1beaeb,!0x1,!0x1);},{'priority':'high'});}),_0xc83a10['conversion']['for']('editingDowncast')['add'](_0x544e97=>{_0x544e97['on']('addMarker:suggestion:attribute',(_0x1463d6,_0x24f089,_0x1fee42)=>{_0x18dcb5(_0x1463d6,_0x24f089,_0x1fee42,!0x1,!0x0);},{'priority':'high'});}),_0xc83a10['conversion']['for']('editingDowncast')['add'](_0x3c238f=>{_0x3c238f['on']('removeMarker:suggestion:formatBlock',(_0x4d0481,_0x49710f,_0x46e7a5)=>{_0x89cfef(0x0,_0x49710f,_0x46e7a5,!0x1);},{'priority':'high'});}),_0xc83a10['conversion']['for']('editingDowncast')['add'](_0x1304b8=>{_0x1304b8['on']('removeMarker:suggestion:attribute',(_0x217fc0,_0x876186,_0x553026)=>{_0x89cfef(0x0,_0x876186,_0x553026,!0x0);},{'priority':'high'});}),_0xc83a10['conversion']['for']('dataDowncast')['add'](_0x554ae3=>{_0x554ae3['on']('addMarker:suggestion:formatBlock',(_0x220ad8,_0x557a09,_0x5aaae7)=>{_0x18dcb5(_0x220ad8,_0x557a09,_0x5aaae7,!0x0,!0x1);},{'priority':'highest'});}),_0xc83a10['conversion']['for']('dataDowncast')['add'](_0x5cc61a=>{_0x5cc61a['on']('addMarker:suggestion:attribute',(_0x27918f,_0x3cf85d,_0x370e)=>{_0x18dcb5(_0x27918f,_0x3cf85d,_0x370e,!0x0,!0x0);},{'priority':'highest'});}),_0xc83a10['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x31510e,_0x1c7a66)=>_0x1c7a66['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x31510e['substr'](0xb)}});const _0x5c6ffa=(_0x243d3d,_0x389e2f,_0x559ac8,_0x399099,_0x29451c)=>{if(_0x399099&&!_0x559ac8['options']['showSuggestionHighlights'])return;if(!_0x559ac8['consumable']['test'](_0x389e2f['markerRange'],_0x243d3d['name']))return;const _0x2bd27a=this['_activeMarkers'],_0x1e3155=_0x389e2f['markerRange']['getWalker'](),_0x2185a2=_0x389e2f['markerRange']['start'],_0x4b5ea7=_0xc83a10['model']['schema'];let _0x1229fb=null,_0x4d52e4=null,_0x5c2e2f=!0x1,_0x3f530b=!0x1;for(const _0x5082da of _0x1e3155){const _0xc64805=_0x5082da['item'];_0x5c2e2f=_0x5c2e2f||_0x4b5ea7['isContent'](_0xc64805);const _0x40ab12=_0x559ac8['mapper']['toViewElement'](_0xc64805);if(_0x40ab12&&_0x40ab12['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5082da['type']&&(_0x4b5ea7['isBlock'](_0xc64805)&&!_0x4b5ea7['isLimit'](_0xc64805)&&(_0xc64805['nextSibling']||_0x2185a2['isAtEnd']?_0x1229fb&&_0x1229fb['parent']==_0xc64805||(_0x1229fb=_0xc64805,_0x47db76(_0x5082da['previousPosition']),_0x3f530b=!0x0):_0x4d52e4=_0x4d52e4||_0x5082da['previousPosition']));}function _0x47db76(_0x3c05c5){const {id:_0x20de21,authorId:_0x3e8bd8}=J(_0x389e2f['markerName']),_0x149d41=_0x559ac8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x29451c,'data-suggestion':_0x20de21,'data-author-id':_0x3e8bd8}),_0x373307=_0x559ac8['mapper']['toViewPosition'](_0x3c05c5);!_0x399099&&_0x2bd27a['includes'](_0x389e2f['markerName'])&&_0x559ac8['writer']['addClass']('ck-suggestion-marker--active',_0x149d41),_0x559ac8['writer']['insert'](_0x373307,_0x149d41),_0x559ac8['mapper']['bindElementToMarker'](_0x149d41,_0x389e2f['markerName']);}_0x5c2e2f||_0x3f530b||!_0x4d52e4||_0x47db76(_0x4d52e4);};_0xc83a10['editing']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x1f0a95,_0x4a73fd,_0x204e28)=>{_0x5c6ffa(_0x1f0a95,_0x4a73fd,_0x204e28,!0x1,'merge');},{'priority':'high'}),_0xc83a10['data']['downcastDispatcher']['on']('addMarker:suggestion:deletion',(_0x13adb5,_0x7b6b5d,_0x368c0c)=>{_0x5c6ffa(_0x13adb5,_0x7b6b5d,_0x368c0c,!0x0,'merge');},{'priority':'high'}),_0xc83a10['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x4fba84,_0x179546,_0x4a303f)=>{_0x5c6ffa(_0x4fba84,_0x179546,_0x4a303f,!0x1,'split');},{'priority':'high'}),_0xc83a10['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x4664a5,_0x2fb1ed,_0x27c5a1)=>{_0x5c6ffa(_0x4664a5,_0x2fb1ed,_0x27c5a1,!0x0,'split');},{'priority':'high'}),_0xc83a10['editing']['downcastDispatcher']['on']('removeMarker:suggestion',(_0x494598,_0x4f5e54,_0x39c9a2)=>{((_0xb6aedb,_0x59e792,_0x4dad55)=>{const _0x2adc3f=_0x4dad55['mapper']['markerNameToElements'](_0x59e792['markerName']);if(_0x2adc3f){for(const _0x422fbd of _0x2adc3f)(_0x422fbd['hasClass']('ck-suggestion-marker-split')||_0x422fbd['hasClass']('ck-suggestion-marker-merge'))&&(_0x4dad55['mapper']['unbindElementFromMarkerName'](_0x422fbd,_0x59e792['markerName']),_0x4dad55['writer']['remove'](_0x422fbd));}})(0x0,_0x4f5e54,_0x39c9a2);},{'priority':'high'});const _0x2ac287=(_0x198b67,_0x568d46,_0x5f5987,_0x59bdc7)=>{if(_0x59bdc7&&!_0x5f5987['options']['showSuggestionHighlights'])return;const _0x3a2387=_0x568d46['markerRange']['start'],_0x4022d6=_0x568d46['markerRange']['end'],_0x581a9a=_0xc83a10['model']['schema'];if(!_0x3a2387['isTouching'](_0x4022d6)||!_0x3a2387['nodeAfter'])return;const _0x5ceb58=_0x3a2387['nodeAfter'];if(_0x581a9a['isBlock'](_0x5ceb58)&&!_0x581a9a['isLimit'](_0x5ceb58)&&_0x581a9a['checkChild'](_0x5ceb58,'$text')){if(!_0x5f5987['consumable']['consume'](_0x568d46['markerRange'],_0x198b67['name']))return;const {id:_0x40dfcb,authorId:_0x1ca23b}=J(_0x568d46['markerName']),_0x3eedae=_0x5f5987['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-split','data-suggestion':_0x40dfcb,'data-author-id':_0x1ca23b}),_0x33de1b=_0x5f5987['mapper']['toViewPosition'](_0x4022d6);!_0x59bdc7&&this['_activeMarkers']['includes'](_0x568d46['markerName'])&&_0x5f5987['writer']['addClass']('ck-suggestion-marker--active',_0x3eedae),_0x5f5987['writer']['insert'](_0x33de1b,_0x3eedae),_0x5f5987['mapper']['bindElementToMarker'](_0x3eedae,_0x568d46['markerName']);}};_0xc83a10['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x41264c,_0x305c5b,_0x1c2e7a)=>{_0x2ac287(_0x41264c,_0x305c5b,_0x1c2e7a,!0x1);},{'priority':'high'}),_0xc83a10['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x252577,_0x449563,_0x119762)=>{_0x2ac287(_0x252577,_0x449563,_0x119762,!0x0);},{'priority':'high'});}['afterInit'](){this['editor']['plugins']['has']('TrackChangesEditing')&&this['listenTo'](this['editor']['plugins']['get']('TrackChangesEditing'),'change:activeMarkers',(_0x46433a,_0x1d54a7,_0x480902)=>{this['_activeMarkers']=_0x480902['slice']();},{'priority':'highest'});}['registerBlockAttribute'](_0x1e01ac){this['_blockAttributeKeys']['add'](_0x1e01ac);}['registerInlineAttribute'](_0x2765ae){this['_inlineAttributeKeys']['add'](_0x2765ae);}['isBlockAttribute'](_0x3e86ff){return this['_blockAttributeKeys']['has'](_0x3e86ff);}['isInlineAttribute'](_0x30a11f){return this['_inlineAttributeKeys']['has'](_0x30a11f);}['isRegisteredAttribute'](_0x23e625){return this['isInlineAttribute'](_0x23e625)||this['isBlockAttribute'](_0x23e625);}['_getClassName'](_0x25110a,_0x361ed4){if('attribute'!=_0x25110a)return'ck-suggestion-marker-'+_0x25110a;const _0x52b337=_0x361ed4['split']('|')[0x0];return this['isBlockAttribute'](_0x52b337)?'ck-suggestion-marker-formatBlock':'ck-suggestion-marker-formatInline';}};function _t(_0x4c8b33={},_0x49f8a6){if(void 0x0!==_0x4c8b33['dateTimeFormat']&&'function'!=typeof _0x4c8b33['dateTimeFormat'])throw new _0x53c10c('invalid-date-time-format');return _0x292a30=>{const _0x35468e='string'==typeof _0x292a30?_0x1dec02['fromISO'](_0x292a30):_0x1dec02['fromJSDate'](_0x292a30),_0x4235a3=_0x1dec02['now'](),_0x1973ef=Math['floor'](_0x4235a3['diff'](_0x35468e,'days')['days']);return _0x4c8b33['dateTimeFormat']?_0x4c8b33['dateTimeFormat'](_0x35468e['toJSDate'](),_0x49f8a6&&_0x49f8a6['t']?_0x49f8a6['t']:void 0x0):0x0===_0x1973ef?_0x49f8a6?D(_0x49f8a6,'Today')+'\x20'+_0x35468e['toFormat']('hh:mma'):_0x35468e['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x1973ef?_0x49f8a6?D(_0x49f8a6,'Yesterday')+'\x20'+_0x35468e['toFormat']('hh:mma'):_0x35468e['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x1973ef<0x7?_0x49f8a6?D(_0x49f8a6,'Last')+'\x20'+D(_0x49f8a6,_0x35468e['toFormat']('EEEE'))+'\x20'+_0x35468e['toFormat']('hh:mma'):_0x35468e['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x35468e['toFormat']('LL-dd-yyyy\x20hh:mma');};}function xt(_0x233ff5,_0x285d64){const _0x484462=_0x233ff5['mapper']['markerNameToElements'](_0x285d64['name']);if(!_0x484462)return null;const _0x49ce12=_0x17f563(_0x484462['values']());return _0x233ff5['view']['domConverter']['mapViewToDom'](_0x49ce12)||null;}function It(_0x367348,_0x34c1d8){if(0x0===_0x34c1d8['length'])return null;const _0x2e1450=[],_0x30a9af=_0x367348['view']['domConverter'];for(const _0x23c11b of _0x34c1d8){const _0x3a2529=_0x367348['mapper']['markerNameToElements'](_0x23c11b['name']);if(!_0x3a2529)continue;const _0x3f1994=Array['from'](_0x3a2529)['map'](_0xe6d1eb=>_0x30a9af['mapViewToDom'](_0xe6d1eb))['filter'](_0x3b4b58=>!!_0x3b4b58);_0x2e1450['push'](..._0x3f1994);}if(0x0===_0x2e1450['length'])return null;const _0x3c22ab=[];for(const _0x3bdb81 of _0x2e1450){const _0x5eb4de=_0x3bdb81['getClientRects']()['item'](0x0);_0x5eb4de&&_0x3c22ab['push']({'x':_0x5eb4de['x'],'y':_0x5eb4de['y'],'domElement':_0x3bdb81});}return 0x0===_0x3c22ab['length']?null:(_0x3c22ab['sort']((_0x563368,_0x6e744e)=>_0x563368['y']-_0x6e744e['y']||_0x563368['x']-_0x6e744e['x']),_0x3c22ab['map'](_0x3bb62e=>_0x3bb62e['domElement']));}function St(_0x1e16e7,{limit:_0x5447e3,suffix:_0x5ab886='...'}){const _0x1573f5=[];let _0x5caa46=0x0;const _0x5d6d40=_0x1e16e7['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x22b37b=0x0;_0x22b37b<_0x5d6d40['length'];_0x22b37b++){let _0x365fa3=_0x5d6d40[_0x22b37b];const _0x2fc49b=Et(_0x365fa3);if(_0x365fa3['startsWith']('<')){if(_0x5caa46>=_0x5447e3){const _0x17a97c=_0x365fa3['match'](/[a-zA-Z]+/);if(!_0x17a97c){_0x5d6d40[_0x22b37b]='';continue;}const _0x2d7dec=_0x17a97c[0x0];_0x365fa3['startsWith']('</')?(_0x1573f5['length']&&(_0x365fa3=''),_0x1573f5['pop']()):(_0x1573f5['push'](_0x2d7dec),_0x365fa3='');}}else{if(_0x5caa46>=_0x5447e3)_0x365fa3='';else{if(_0x5caa46+_0x2fc49b['length']>=_0x5447e3){let _0x55f0a0=_0x5447e3-_0x5caa46;if('\x20'===_0x2fc49b[_0x55f0a0-0x1])_0x55f0a0--;else{const _0x4b6a46=_0x2fc49b['slice'](_0x55f0a0)['indexOf']('\x20');-0x1!==_0x4b6a46?_0x55f0a0+=_0x4b6a46:_0x55f0a0=_0x365fa3['length'];}_0x365fa3=_0x2fc49b['slice'](0x0,_0x55f0a0)['join']('')+_0x5ab886,_0x5caa46=_0x5447e3;}else _0x5caa46+=_0x2fc49b['length'];}}_0x5d6d40[_0x22b37b]=_0x365fa3;}return _0x5d6d40['join']('\x0a')['replace'](/\n/g,'');}function Et(_0x1568f5){const _0x37ddd1=[];for(let _0x24b3e7=0x0;_0x24b3e7<_0x1568f5['length'];_0x24b3e7++){const _0x39944d=_0x1568f5['substring'](_0x24b3e7)['match'](/^&[a-z0-9#]+;/);if(_0x39944d){const _0x1e00a1=_0x39944d[0x0];_0x37ddd1['push'](_0x1e00a1),_0x24b3e7+=_0x1e00a1['length']-0x1;}else _0x37ddd1['push'](_0x1568f5[_0x24b3e7]);}return _0x37ddd1;}var Mt=class extends _0x4a300f{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x34b240){super(_0x34b240);const _0x583fc4=this['bindTemplate'];this['set']('message',D(_0x34b240,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x34b240,D(_0x34b240,'Yes'),_0xcb7e48,'submit'),this['cancelView']=this['_createButtonView'](_0x34b240,D(_0x34b240,'No'),_0x3f9185,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x3b21dc(),this['keystrokes']=new _0x56353a(),this['focusCycler']=new _0x4eab07({'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':_0x583fc4['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'](_0x143822,_0x1a9d1f,_0x28c852,_0x4b0028){const _0x44e2b8=new _0x147358(_0x143822);return _0x44e2b8['label']=_0x1a9d1f,_0x44e2b8['icon']=_0x28c852,_0x44e2b8['extendTemplate']({'attributes':{'class':'ck-confirm-view-'+_0x4b0028}}),_0x44e2b8['on']('execute',()=>this['fire'](_0x4b0028)),_0x44e2b8;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x300489=>{this['keystrokes']['listenTo'](_0x300489['element']),this['focusTracker']['add'](_0x300489['element']);}),this['keystrokes']['set']('esc',(_0x56d1a8,_0x2e5449)=>{this['fire']('cancel'),_0x2e5449();});}};function At(_0x49e4b3){return class _0x38acc3 extends _0x49e4b3{['showConfirm'](_0x3e2b76,_0x4a4c87){return this['confirmView']=new Mt(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x3e2b76,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x4a4c87['appendChild'](this['confirmView']['element']),_0x4a4c87['classList']['add']('ck-confirm-view-active'),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),this['on']('change:isConfirm',(_0x408b46,_0x18891a,_0x55f5fe)=>{_0x55f5fe||_0x4a4c87['classList']['remove']('ck-confirm-view-active');}),new Promise(_0x22b7a8=>this['confirmView']['on']('submit',_0x22b7a8));}['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 Tt(_0x3c0116){let _0x455b35=0x0,_0x379108=0x0;for(const _0x15bd0e of Nt(_0x3c0116))_0x455b35=(_0x455b35<<0x5)-_0x455b35+_0x15bd0e,_0x455b35&=_0x455b35,[_0x455b35,_0x379108]=[_0x379108,_0x455b35];return Bt(_0x455b35)+Bt(_0x379108);}function*Pt(_0x3dfb41){null==_0x3dfb41||null==_0x3dfb41?yield 0x12b9b0a1:0x0===_0x3dfb41||!0x1===_0x3dfb41?yield 0x0:0x1===_0x3dfb41||0x1==_0x3dfb41?yield 0x1:Array['isArray'](_0x3dfb41)?yield*function*(_0x3f8917){for(const _0x628b85 of _0x3f8917)yield*Pt(_0x628b85);}(_0x3dfb41):'object'==typeof _0x3dfb41?yield*Nt(_0x3dfb41):'string'==typeof _0x3dfb41?yield*Vt(_0x3dfb41):'number'==typeof _0x3dfb41&&(yield _0x3dfb41);}function*Nt(_0x7fb127){if(yield Ot('{'),_0x7fb127){const _0x2a6869=Object['keys'](_0x7fb127)['sort']();for(const _0x315a09 of _0x2a6869){yield*Vt(_0x315a09),yield Ot(':');const _0xe71f99=_0x7fb127[_0x315a09];yield*Pt(_0xe71f99);}}yield Ot('}');}function*Vt(_0x25bcb2){yield Ot('\x22');for(const _0x4045f2 of _0x25bcb2)yield Ot(_0x4045f2);yield Ot('\x22');}function Ot(_0x5b5a9e){return _0x5b5a9e['charCodeAt'](0x0);}function Bt(_0x1cdc00){return(_0x1cdc00*=Math['sign'](_0x1cdc00))['toString'](0x24);}const Dt=['root','roots','initialData','context','toolbar','rootsAttributes'],$t=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function Lt(_0x1c9f42,_0x528974,_0x2babfd,_0x46d4ee=[]){const _0x16770b='string'==typeof _0x1c9f42?_0x2babfd['get'](_0x1c9f42)['constructor']:_0x1c9f42['prototype']['constructor'];if(_0x528974['has'](_0x16770b))return _0x528974['get'](_0x16770b);_0x528974['set'](_0x16770b,!0x0);const _0x527328=[...$t,..._0x46d4ee]['map'](_0xb2a2e1=>{if(_0x2babfd['has'](_0xb2a2e1))return _0x2babfd['get'](_0xb2a2e1)['constructor'];})['filter'](_0x277adb=>_0x277adb);if(_0x16770b&&_0x527328['includes'](_0x16770b))return _0x528974['set'](_0x16770b,!0x1),!0x1;if(!_0x16770b['requires'])return _0x528974['set'](_0x16770b,!0x0),!0x0;const _0x3392b6=_0x16770b['requires']['every'](_0x283df3=>Lt(_0x283df3,_0x528974,_0x2babfd,_0x46d4ee));return _0x528974['set'](_0x16770b,_0x3392b6),_0x3392b6;}function Rt(_0x8feca7,_0x3f51df){const _0x1ac79f={};for(const _0x120ffa of _0x8feca7['config']['names']())Dt['includes'](_0x120ffa)||(_0x1ac79f[_0x120ffa]=_0x8feca7['config']['get'](_0x120ffa));const _0x5bdc5e=_0x1ac79f['plugins']||[],_0x146a87=_0x8feca7['constructor']['builtinPlugins']||[],_0x4dbc18=_0x5bdc5e['length']?_0x5bdc5e:_0x146a87,_0xeb5f9c=_0x1ac79f['extraPlugins']||[];delete _0x1ac79f['extraPlugins'];const _0xa42ee5=_0x1ac79f['removePlugins']||[];delete _0x1ac79f['removePlugins'];const _0x5df666=_0x8feca7['_context']['config']['get']('plugins')||[],_0x11d851=_0x4dbc18['concat'](_0xeb5f9c)['concat'](_0x5df666)['map'](_0x27a97f=>'string'==typeof _0x27a97f?_0x146a87['find'](_0x148866=>_0x148866['pluginName']==_0x27a97f):_0x27a97f)['filter'](_0x136409=>!_0xa42ee5['includes'](_0x136409)&&!_0xa42ee5['includes'](_0x136409['pluginName'])),_0x9cc251=Array['from'](new Set(_0x11d851)),_0x176507=new Map();return _0x1ac79f['plugins']=_0x9cc251['filter'](_0x439d16=>Lt(_0x439d16,_0x176507,_0x8feca7['plugins'],_0x3f51df)),_0x1ac79f;}function Ft(_0x5d0bd3,_0x52ad2e){const _0xc239bb=[];_0x5d0bd3['document']['selection']['on']('change:range',()=>{const _0x246ed0=function(_0x33241e,_0x1133fb){const _0x290592=[];for(const _0xfec0a2 of _0x33241e['markers']){const _0x30fe33=_0xfec0a2['getRange']();(_0x30fe33['containsPosition'](_0x1133fb)||_0x30fe33['start']['isEqual'](_0x1133fb)||_0x30fe33['end']['isEqual'](_0x1133fb))&&_0x290592['push'](_0xfec0a2);}return _0x290592;}(_0x5d0bd3,_0x5d0bd3['document']['selection']['focus']),_0x3a6e8a=[],_0x122835=[],_0x277b22=[];for(const _0x98440a of _0xc239bb)_0x246ed0['includes'](_0x98440a)||_0x3a6e8a['push'](_0x98440a);for(const _0x22b2c9 of _0x246ed0)_0xc239bb['includes'](_0x22b2c9)||_0x122835['push'](_0x22b2c9),_0x277b22['push'](_0x22b2c9);(_0x3a6e8a['length']||_0x122835['length'])&&_0x52ad2e({'left':_0x3a6e8a,'entered':_0x122835}),_0xc239bb['length']=0x0,_0xc239bb['push'](..._0x277b22);});}const Ht='Ctrl+Shift+E';function Ut(_0x1245f2,_0x205eee){const _0x47cbb5=_0x1245f2['element'];_0x1245f2['keystrokes']['listenTo'](_0x47cbb5);for(const _0x504829 of _0x205eee)zt(_0x1245f2,_0x504829);_0x205eee['on']('change',(_0x58be25,_0x532560)=>{for(const _0x4aa9d1 of _0x532560['removed'])Wt(_0x1245f2,_0x4aa9d1);for(const _0x2f6ae8 of Array['from'](_0x532560['added'])['reverse']())zt(_0x1245f2,_0x2f6ae8);}),_0x1245f2['keystrokes']['set']('enter',(_0x1ddc89,_0x59c816)=>{_0x47cbb5===_0x1ddc89['target']&&(_0x1245f2['focusCycler']['focusFirst'](),_0x59c816());},{'filter':_0x4501f6=>_0x4501f6['target']===_0x47cbb5}),_0x1245f2['keystrokes']['set']('esc',(_0x4dcadc,_0x54db97)=>{_0x47cbb5!==_0x4dcadc['target']?_0x1245f2['focus']():_0x1245f2['fire']('escape'),_0x54db97();}),_0x1245f2['keystrokes']['set']('arrowdown',(_0x380651,_0x515ca9)=>{_0x47cbb5===_0x380651['target']&&(_0x1245f2['fire']('arrowdown'),_0x515ca9());}),_0x1245f2['keystrokes']['set']('arrowup',(_0x4560d8,_0x4d7305)=>{_0x47cbb5===_0x4560d8['target']&&(_0x1245f2['fire']('arrowup'),_0x4d7305());});}function zt(_0x198e19,_0x2e0ad2){_0x2e0ad2['isRendered']&&(_0x198e19['focusTracker']['add'](_0x2e0ad2['element']),_0x198e19['keystrokes']['listenTo'](_0x2e0ad2['element']),_0x5069ce(_0x2e0ad2)&&function(_0x1bcd55,_0x29a179){const _0x58c067=_0x1bcd55['actions'],_0x54cba0=_0x29a179['actions'];for(const _0x3f4ad2 of Object['keys'](_0x58c067))if(_0x3f4ad2 in _0x54cba0&&_0x58c067[_0x3f4ad2]!==_0x54cba0[_0x3f4ad2])return!0x1;return!0x0;}(_0x198e19['focusCycler'],_0x2e0ad2['focusCycler'])&&_0x198e19['focusCycler']['chain'](_0x2e0ad2['focusCycler']));}function Wt(_0x131629,_0x1341f2){_0x131629['focusTracker']['remove'](_0x1341f2['element']),_0x131629['keystrokes']['stopListening'](_0x1341f2['element']),_0x5069ce(_0x1341f2)&&_0x131629['focusCycler']['unchain'](_0x1341f2['focusCycler']);}const Yt='$elementId',jt='data-id';var Jt=class extends _0x1055f5{static get['pluginName'](){return'DocumentCompare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['init'](){this['context']instanceof _0x1ab7ed?this['_integrateEditor'](this['context']):this['listenTo'](this['context']['editors'],'add',(_0x40b573,_0x5ee8c0)=>{_0x5ee8c0['on']('ready',()=>{this['_integrateEditor'](_0x5ee8c0);});});}get['editor'](){if(this['context']instanceof _0x1ab7ed)return this['context'];{const _0x2a95fe=this['context']['editors']['first'];if(!_0x2a95fe)throw new _0x53c10c('documentcompare-no-editor',this);return _0x2a95fe;}}['getDiff'](_0x4ea987,_0x39078d,_0x1041f7={'anchor':'main','markDeletions':!0x1}){const _0x37e38d=_0x1041f7['targetEditor']||this