@ckeditor/ckeditor5-collaboration-core 45.1.0-alpha.6 → 45.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ContextPlugin as _0x453b63,Editor as _0x32e7a1}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x194cf6,Collection as _0x74eaa1,uid as _0x351f7c,first as _0x2b9c30,FocusTracker as _0x2fc4b3,KeystrokeHandler as _0x14f901}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x233583,IconView as _0x284bf4,ButtonView as _0x5eb74a,DropdownButtonView as _0x6a6218,FocusCycler as _0x2826c0,isViewWithFocusCycler as _0x238a20}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconNotification as _0x1752b8,IconCheck as _0x4cfff7,IconCancel as _0x93f2b9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{DateTime as _0x4be381}from'luxon';class n extends _0x453b63{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x58a091,_0x424ecc){let _0x1f1f57;if(_0x424ecc||(_0x424ecc=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x424ecc?_0x1f1f57=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x1f1f57=this['context']['editors']['find'](_0x5114ba=>_0x5114ba['config']['get']('collaboration.channelId')==_0x424ecc)),!_0x1f1f57)throw new _0x194cf6('permissions-set-permissions-invalid-channel-id',null);const _0x29c246=_0x1f1f57['plugins'],_0x5219d2=_0x29c246['has']('CommentsRepository')?_0x29c246['get']('CommentsRepository'):void 0x0,_0x248c50=_0x29c246['has']('CommentsOnly')&&_0x29c246['get']('CommentsOnly'),_0x1ba58d=_0x58a091['includes']('document:write'),_0x4ebbfd=_0x58a091['includes']('comment:modify_all'),_0x45a2f6=_0x58a091['includes']('comment:admin'),_0x212b50=_0x58a091['includes']('comment:write'),_0x21bdd6=_0x212b50||_0x45a2f6,_0x374419=_0x21bdd6||_0x4ebbfd,_0x5388ef=_0x1ba58d||_0x21bdd6;(_0x248c50&&(_0x248c50['isEnabled']=!_0x1ba58d&&_0x374419),_0x1f1f57 instanceof _0x32e7a1)&&(!(_0x1ba58d||_0x374419&&_0x5219d2)?_0x1f1f57['enableReadOnlyMode']('no-permissions'):_0x1f1f57['disableReadOnlyMode']('no-permissions'));if(_0x5219d2){_0x5219d2['setPermissions']({'admin':_0x45a2f6,'modifyAll':_0x4ebbfd,'write':_0x212b50,'resolve':_0x5388ef},_0x424ecc);const _0x206f8e=_0x1f1f57 instanceof _0x32e7a1&&_0x1f1f57['commands']['get']('addCommentThread');_0x206f8e&&(_0x21bdd6?_0x206f8e['clearForceDisabled']('noPermissions'):_0x206f8e['forceDisabled']('noPermissions'));}}}function o(_0x1bff8f,_0x206ec5){const t=_0x1bff8f['t'];switch(_0x206ec5){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 u extends _0x453b63{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x5c0851){super(_0x5c0851),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x74eaa1(),this['_locale']=_0x5c0851['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:_0x313a26,name:_0x2f18ef,..._0x27ff39}){if(!_0x313a26||'string'!=typeof _0x313a26)throw new _0x194cf6('users-add-invalid-id');if(this['users']['has'](_0x313a26))throw new _0x194cf6('users-add-duplicated-id',null,{'id':_0x313a26});const _0x4e6f71=this['context']['config']['get']('users.getInitialsCallback'),_0x26aa25={..._0x27ff39,'id':_0x313a26,'name':h(this['_locale'],_0x2f18ef),'color':this['_getNextColor']()};_0x26aa25['name']=h(this['_locale'],_0x26aa25['name']);const _0x21d161=new P(_0x26aa25,_0x4e6f71);return this['users']['add'](_0x21d161),_0x21d161;}['getUser'](_0x3105b7){return this['users']['get'](_0x3105b7);}['useAnonymousUser'](){const _0x4aab4a=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4aab4a);}['defineMe'](_0x40ffce){if(this['_myId'])throw new _0x194cf6('users-me-already-defined',null);const _0x16a9ff=this['getUser'](_0x40ffce);if(!_0x16a9ff)throw new _0x194cf6('users-me-missing-user',null);this['_myId']=_0x40ffce,_0x16a9ff['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x6de4d6=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x6de4d6&&(this['_lastColor']=0x0),new l(this['_lastColor']++);}['_addAnonymousUser'](){const _0x25cb33=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x25cb33,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x562679,_0x5bb348){this['id']=_0x562679['id'],this['color']=_0x562679['color'],this['name']=_0x562679['name'],this['initials']=_0x5bb348?_0x5bb348(this['name']):this['_computeInitials'](),this['avatar']=_0x562679['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0x189033=this['name']['split']('\x20')['filter'](_0x3fc214=>/^[\p{Letter}]/u['test'](_0x3fc214));return 0x1===_0x189033['length']?this['_getInitial'](_0x189033[0x0]):0x0===_0x189033['length']?this['_getInitial'](this['name']):this['_getInitial'](_0x189033[0x0])+this['_getInitial'](_0x189033[_0x189033['length']-0x1]);}['_getInitial'](_0x522881){return String['fromCodePoint'](_0x522881['codePointAt'](0x0))['toUpperCase']();}}function h(_0x496102,_0x4ae99e=''){return''==(_0x4ae99e=_0x4ae99e['trim']())?o(_0x496102,'Anonymous'):_0x4ae99e;}class l{['_id'];constructor(_0x48c303){this['_id']=_0x48c303;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class I extends _0x233583{['name'];['notificationView'];constructor(_0x45870e,_0xa73d7f,_0x2a8d0f){super(_0x45870e),this['name']=_0xa73d7f['name'],this['notificationView']=null;const _0x4551cc=['ck','ck-user'],_0x11c5ca=['ck','ck-user__img'];if(_0xa73d7f['isAnonymous']&&_0x11c5ca['push']('ck-user__anonymous'),!_0xa73d7f['isAnonymous']&&_0xa73d7f['isMe']&&_0x4551cc['push']('ck-user_me'),_0xa73d7f['avatar']&&_0x11c5ca['push']('ck-user__avatar'),_0x2a8d0f){const _0xc491e7=new _0x284bf4();_0xc491e7['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0xc491e7['content']=_0x1752b8,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x2a8d0f},'children':[_0xc491e7]};}const _0x3484f5=[{'tag':'div','attributes':{'class':_0x11c5ca,'style':{'background-image':_0xa73d7f['avatar']?'url(\x27'+_0xa73d7f['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0xa73d7f['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0xa73d7f['name']},'children':[{'text':_0xa73d7f['initials']}]}];this['notificationView']&&_0x3484f5['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x4551cc,'data-user-id':_0xa73d7f['id']},'children':_0x3484f5});}}class F extends _0x233583{['id'];constructor(_0x21f4c8,_0x1d038b){super(_0x21f4c8),this['id']='ck-aria-description-'+_0x351f7c(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x1d038b}]});}}class U extends _0x5eb74a{['render'](){super['render'](),V(this);}}class Y extends _0x6a6218{['render'](){super['render'](),V(this);}}function V(_0x3d3d8d){_0x3d3d8d['listenTo'](_0x3d3d8d['element'],'mousedown',(_0x14e6c7,_0x1cab8a)=>{_0x1cab8a['stopPropagation'](),_0x1cab8a['preventDefault']();}),_0x3d3d8d['listenTo'](_0x3d3d8d['element'],'mouseup',()=>{_0x3d3d8d['element']['focus']();});}function E(_0x78dc44={},_0x218e5f){if(void 0x0!==_0x78dc44['dateTimeFormat']&&'function'!=typeof _0x78dc44['dateTimeFormat'])throw new _0x194cf6('invalid-date-time-format');return _0x6b2f78=>{const _0x466381='string'==typeof _0x6b2f78?_0x4be381['fromISO'](_0x6b2f78):_0x4be381['fromJSDate'](_0x6b2f78),_0x5526d3=_0x4be381['now'](),_0x156440=Math['floor'](_0x5526d3['diff'](_0x466381,'days')['days']);return _0x78dc44['dateTimeFormat']?_0x78dc44['dateTimeFormat'](_0x466381['toJSDate'](),_0x218e5f&&_0x218e5f['t']?_0x218e5f['t']:void 0x0):0x0===_0x156440?_0x218e5f?o(_0x218e5f,'Today')+'\x20'+_0x466381['toFormat']('hh:mma'):_0x466381['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x156440?_0x218e5f?o(_0x218e5f,'Yesterday')+'\x20'+_0x466381['toFormat']('hh:mma'):_0x466381['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x156440<0x7?_0x218e5f?o(_0x218e5f,'Last')+'\x20'+o(_0x218e5f,_0x466381['toFormat']('EEEE'))+'\x20'+_0x466381['toFormat']('hh:mma'):_0x466381['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x466381['toFormat']('LL-dd-yyyy\x20hh:mma');};}function A(_0x27d6eb,_0x2a23bc){const _0x2ec425=_0x27d6eb['mapper']['markerNameToElements'](_0x2a23bc['name']);if(!_0x2ec425)return null;const _0x268c63=_0x2b9c30(_0x2ec425['values']());return _0x27d6eb['view']['domConverter']['mapViewToDom'](_0x268c63)||null;}function R(_0x261029,_0x1c1e7e){if(0x0===_0x1c1e7e['length'])return null;const _0x330d3d=[],_0x2017ff=_0x261029['view']['domConverter'];for(const _0x4db216 of _0x1c1e7e){const _0x40e60e=_0x261029['mapper']['markerNameToElements'](_0x4db216['name']);if(!_0x40e60e)continue;const _0x538f85=Array['from'](_0x40e60e)['map'](_0x3dcc3d=>_0x2017ff['mapViewToDom'](_0x3dcc3d))['filter'](_0x34ea89=>!!_0x34ea89);_0x330d3d['push'](..._0x538f85);}if(0x0===_0x330d3d['length'])return null;const _0xc923bd=[];for(const _0x493403 of _0x330d3d){const _0x1c0e4b=_0x493403['getClientRects']()['item'](0x0);_0x1c0e4b&&_0xc923bd['push']({'x':_0x1c0e4b['x'],'y':_0x1c0e4b['y'],'domElement':_0x493403});}return 0x0===_0xc923bd['length']?null:(_0xc923bd['sort']((_0x4dfdbf,_0x36ed1b)=>_0x4dfdbf['y']-_0x36ed1b['y']||_0x4dfdbf['x']-_0x36ed1b['x']),_0xc923bd['map'](_0x676949=>_0x676949['domElement']));}function Z(_0x288860,{limit:_0x4007af,suffix:_0xa59720='...'}){const _0x3cd209=[];let _0x56be8=0x0;const _0x5bf798=_0x288860['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x14491a=0x0;_0x14491a<_0x5bf798['length'];_0x14491a++){let _0x35104c=_0x5bf798[_0x14491a];const _0xd6959d=$(_0x35104c);if(_0x35104c['startsWith']('<')){if(_0x56be8>=_0x4007af){const _0x16f5f3=_0x35104c['match'](/[a-zA-Z]+/);if(!_0x16f5f3){_0x5bf798[_0x14491a]='';continue;}const _0x3ebdf4=_0x16f5f3[0x0];_0x35104c['startsWith']('</')?(_0x3cd209['length']&&(_0x35104c=''),_0x3cd209['pop']()):(_0x3cd209['push'](_0x3ebdf4),_0x35104c='');}}else{if(_0x56be8>=_0x4007af)_0x35104c='';else{if(_0x56be8+_0xd6959d['length']>=_0x4007af){let _0x488e36=_0x4007af-_0x56be8;if('\x20'===_0xd6959d[_0x488e36-0x1])_0x488e36--;else{const _0x29edfa=_0xd6959d['slice'](_0x488e36)['indexOf']('\x20');-0x1!==_0x29edfa?_0x488e36+=_0x29edfa:_0x488e36=_0x35104c['length'];}_0x35104c=_0xd6959d['slice'](0x0,_0x488e36)['join']('')+_0xa59720,_0x56be8=_0x4007af;}else _0x56be8+=_0xd6959d['length'];}}_0x5bf798[_0x14491a]=_0x35104c;}return _0x5bf798['join']('\x0a')['replace'](/\n/g,'');}function $(_0x1fdc8f){const _0x5a3e3e=[];for(let _0x1ebd3b=0x0;_0x1ebd3b<_0x1fdc8f['length'];_0x1ebd3b++){const _0x2c3a81=_0x1fdc8f['substring'](_0x1ebd3b)['match'](/^&[a-z0-9#]+;/);if(_0x2c3a81){const _0x2679ff=_0x2c3a81[0x0];_0x5a3e3e['push'](_0x2679ff),_0x1ebd3b+=_0x2679ff['length']-0x1;}else _0x5a3e3e['push'](_0x1fdc8f[_0x1ebd3b]);}return _0x5a3e3e;}class m extends _0x233583{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x498873){super(_0x498873);const _0xd7ea52=this['bindTemplate'];this['set']('message',o(_0x498873,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x498873,o(_0x498873,'Yes'),_0x4cfff7,'submit'),this['cancelView']=this['_createButtonView'](_0x498873,o(_0x498873,'No'),_0x93f2b9,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x2fc4b3(),this['keystrokes']=new _0x14f901(),this['focusCycler']=new _0x2826c0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0xd7ea52['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x1fbd6f,_0x469aab,_0xd8a8aa,_0x1fd1c3){const _0x59a907=new _0x5eb74a(_0x1fbd6f);return _0x59a907['label']=_0x469aab,_0x59a907['icon']=_0xd8a8aa,_0x59a907['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x1fd1c3}}),_0x59a907['on']('execute',()=>this['fire'](_0x1fd1c3)),_0x59a907;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x2ad84e=>{this['keystrokes']['listenTo'](_0x2ad84e['element']),this['focusTracker']['add'](_0x2ad84e['element']);}),this['keystrokes']['set']('esc',(_0x3caf9c,_0x10d419)=>{this['fire']('cancel'),_0x10d419();});}}function c(_0x1356b2){return class extends _0x1356b2{['showConfirm'](_0x3f44a0,_0x4b2d8b){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x3f44a0,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x4b2d8b['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x480fc5=>this['confirmView']['on']('submit',_0x480fc5));}['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 j(_0x30bdc5){let _0x53ad49=0x0,_0xecf536=0x0;for(const _0x95082f of M(_0x30bdc5))_0x53ad49=(_0x53ad49<<0x5)-_0x53ad49+_0x95082f,_0x53ad49|=0x0,[_0x53ad49,_0xecf536]=[_0xecf536,_0x53ad49];return w(_0x53ad49)+w(_0xecf536);}function*g(_0x4f8e5c){null==_0x4f8e5c||null==_0x4f8e5c?yield 0x12b9b0a1:0x0===_0x4f8e5c||!0x1===_0x4f8e5c?yield 0x0:0x1===_0x4f8e5c||0x1==_0x4f8e5c?yield 0x1:Array['isArray'](_0x4f8e5c)?yield*function*(_0x3445e3){for(const _0x5025e5 of _0x3445e3)yield*g(_0x5025e5);}(_0x4f8e5c):'object'==typeof _0x4f8e5c?yield*M(_0x4f8e5c):'string'==typeof _0x4f8e5c?yield*O(_0x4f8e5c):'number'==typeof _0x4f8e5c&&(yield _0x4f8e5c);}function*M(_0x54a8ea){if(yield q('{'),_0x54a8ea){const _0x2d5756=Object['keys'](_0x54a8ea)['sort']();for(const _0x2cd842 of _0x2d5756){yield*O(_0x2cd842),yield q(':');const _0x23a915=_0x54a8ea[_0x2cd842];yield*g(_0x23a915);}}yield q('}');}function*O(_0x5ab1a4){yield q('\x22');for(const _0x2a69d9 of _0x5ab1a4)yield q(_0x2a69d9);yield q('\x22');}function q(_0x33cfa8){return _0x33cfa8['charCodeAt'](0x0);}function w(_0x5231eb){return(_0x5231eb*=Math['sign'](_0x5231eb))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x3d91f2,_0x2630b9,_0xd04233,_0x3a6980=[]){const _0x792b86='string'==typeof _0x3d91f2?_0xd04233['get'](_0x3d91f2)['constructor']:_0x3d91f2['prototype']['constructor'];if(_0x2630b9['has'](_0x792b86))return _0x2630b9['get'](_0x792b86);_0x2630b9['set'](_0x792b86,!0x0);const _0x1ab8d7=[...D,..._0x3a6980]['map'](_0x3bdde0=>{if(_0xd04233['has'](_0x3bdde0))return _0xd04233['get'](_0x3bdde0)['constructor'];})['filter'](_0xb5ca07=>_0xb5ca07);if(_0x792b86&&_0x1ab8d7['includes'](_0x792b86))return _0x2630b9['set'](_0x792b86,!0x1),!0x1;if(!_0x792b86['requires'])return _0x2630b9['set'](_0x792b86,!0x0),!0x0;const _0x1c4303=_0x792b86['requires']['every'](_0x237804=>S(_0x237804,_0x2630b9,_0xd04233,_0x3a6980));return _0x2630b9['set'](_0x792b86,_0x1c4303),_0x1c4303;}function C(_0x3f81c4,_0x14e1f1){const _0x283df9={};for(const _0xc26f56 of _0x3f81c4['config']['names']())W['includes'](_0xc26f56)||(_0x283df9[_0xc26f56]=_0x3f81c4['config']['get'](_0xc26f56));const _0x2c70a7=_0x283df9['plugins']||[],_0x22d343=_0x3f81c4['constructor']['builtinPlugins']||[],_0x5c36d4=_0x2c70a7['length']?_0x2c70a7:_0x22d343,_0x44c1b1=_0x283df9['extraPlugins']||[];delete _0x283df9['extraPlugins'];const _0x2fd468=_0x283df9['removePlugins']||[];delete _0x283df9['removePlugins'];const _0x2d16c0=_0x3f81c4['_context']['config']['get']('plugins')||[],_0x25517c=_0x5c36d4['concat'](_0x44c1b1)['concat'](_0x2d16c0)['map'](_0x4a0f00=>'string'==typeof _0x4a0f00?_0x22d343['find'](_0x9d58e4=>_0x9d58e4['pluginName']==_0x4a0f00):_0x4a0f00)['filter'](_0x3768d9=>!_0x2fd468['includes'](_0x3768d9)&&!_0x2fd468['includes'](_0x3768d9['pluginName'])),_0x4c9fb8=Array['from'](new Set(_0x25517c)),_0x160499=new Map();return _0x283df9['plugins']=_0x4c9fb8['filter'](_0x244b0=>S(_0x244b0,_0x160499,_0x3f81c4['plugins'],_0x14e1f1)),_0x283df9;}function z(_0x4449f0,_0x327c70){const _0x2dd8bc=[];_0x4449f0['document']['selection']['on']('change:range',()=>{const _0x436366=function(_0x39df2b,_0x11dc08){const _0x38d28f=[];for(const _0x3cb247 of _0x39df2b['markers']){const _0x17f58d=_0x3cb247['getRange']();(_0x17f58d['containsPosition'](_0x11dc08)||_0x17f58d['start']['isEqual'](_0x11dc08)||_0x17f58d['end']['isEqual'](_0x11dc08))&&_0x38d28f['push'](_0x3cb247);}return _0x38d28f;}(_0x4449f0,_0x4449f0['document']['selection']['focus']),_0x2a9ea5=[],_0x17d4a3=[],_0x52f709=[];for(const _0x2df8ef of _0x2dd8bc)_0x436366['includes'](_0x2df8ef)||_0x2a9ea5['push'](_0x2df8ef);for(const _0x335baf of _0x436366)_0x2dd8bc['includes'](_0x335baf)||_0x17d4a3['push'](_0x335baf),_0x52f709['push'](_0x335baf);(_0x2a9ea5['length']||_0x17d4a3['length'])&&_0x327c70({'left':_0x2a9ea5,'entered':_0x17d4a3}),_0x2dd8bc['length']=0x0,_0x2dd8bc['push'](..._0x52f709);});}const J='Ctrl+Shift+E';function T(_0x406042,_0x11ff9d){const _0x314230=_0x406042['element'];_0x406042['keystrokes']['listenTo'](_0x314230);for(const _0x38f1c7 of _0x11ff9d)K(_0x406042,_0x38f1c7);_0x11ff9d['on']('change',(_0x3a2f5b,_0x52c801)=>{for(const _0x9ba12a of _0x52c801['removed'])_(_0x406042,_0x9ba12a);for(const _0x52c17c of Array['from'](_0x52c801['added'])['reverse']())K(_0x406042,_0x52c17c);}),_0x406042['keystrokes']['set']('enter',(_0x391724,_0x2fedac)=>{_0x314230===_0x391724['target']&&(_0x406042['focusCycler']['focusFirst'](),_0x2fedac());},{'filter':_0x3b1545=>_0x3b1545['target']===_0x314230}),_0x406042['keystrokes']['set']('esc',(_0x57475f,_0x925ca6)=>{_0x314230!==_0x57475f['target']?_0x406042['focus']():_0x406042['fire']('escape'),_0x925ca6();}),_0x406042['keystrokes']['set']('arrowdown',(_0x1a156d,_0x74abc0)=>{_0x314230===_0x1a156d['target']&&(_0x406042['fire']('arrowdown'),_0x74abc0());}),_0x406042['keystrokes']['set']('arrowup',(_0x124468,_0x2eb991)=>{_0x314230===_0x124468['target']&&(_0x406042['fire']('arrowup'),_0x2eb991());});}function K(_0x58a7f5,_0x2c5513){_0x2c5513['isRendered']&&(_0x58a7f5['focusTracker']['add'](_0x2c5513['element']),_0x58a7f5['keystrokes']['listenTo'](_0x2c5513['element']),_0x238a20(_0x2c5513)&&function(_0x462540,_0x4036c8){const _0x274067=_0x462540['actions'],_0x3cb1d1=_0x4036c8['actions'];for(const _0x211511 of Object['keys'](_0x274067))if(_0x211511 in _0x3cb1d1&&_0x274067[_0x211511]!==_0x3cb1d1[_0x211511])return!0x1;return!0x0;}(_0x58a7f5['focusCycler'],_0x2c5513['focusCycler'])&&_0x58a7f5['focusCycler']['chain'](_0x2c5513['focusCycler']));}function _(_0x361311,_0x3506cd){_0x361311['focusTracker']['remove'](_0x3506cd['element']),_0x361311['keystrokes']['stopListening'](_0x3506cd['element']),_0x238a20(_0x3506cd)&&_0x361311['focusCycler']['unchain'](_0x3506cd['focusCycler']);}export{F as AriaDescriptionView,c as ConfirmMixin,J as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,I as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,A as getMarkerDomElement,j as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,z as surroundingMarkersDetector,Z as trimHtml};
23
+ import{ContextPlugin as _0x1fb868,Editor as _0x4e7d5d}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x211056,Collection as _0x4661b6,uid as _0x57b233,first as _0x57658b,FocusTracker as _0x5db86f,KeystrokeHandler as _0x10545d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x3b7c67,IconView as _0x416b11,ButtonView as _0x2b715f,DropdownButtonView as _0x440ff9,FocusCycler as _0x5e1c02,isViewWithFocusCycler as _0x13ba46}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconNotification as _0x154c33,IconCheck as _0x3089fa,IconCancel as _0xd83c7f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{DateTime as _0x30b399}from'luxon';class n extends _0x1fb868{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x3dbdd5,_0x593fa1){let _0x5d39d5;if(_0x593fa1||(_0x593fa1=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x593fa1?_0x5d39d5=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x5d39d5=this['context']['editors']['find'](_0x6cc75d=>_0x6cc75d['config']['get']('collaboration.channelId')==_0x593fa1)),!_0x5d39d5)throw new _0x211056('permissions-set-permissions-invalid-channel-id',null);const _0x3da986=_0x5d39d5['plugins'],_0x1e2e8e=_0x3da986['has']('CommentsRepository')?_0x3da986['get']('CommentsRepository'):void 0x0,_0x56edbe=_0x3da986['has']('CommentsOnly')&&_0x3da986['get']('CommentsOnly'),_0x45d803=_0x3dbdd5['includes']('document:write'),_0x49d659=_0x3dbdd5['includes']('comment:modify_all'),_0x3da6f7=_0x3dbdd5['includes']('comment:admin'),_0x380cfd=_0x3dbdd5['includes']('comment:write'),_0x1594e9=_0x380cfd||_0x3da6f7,_0xbdcc4d=_0x1594e9||_0x49d659,_0x578ba8=_0x45d803||_0x1594e9;(_0x56edbe&&(_0x56edbe['isEnabled']=!_0x45d803&&_0xbdcc4d),_0x5d39d5 instanceof _0x4e7d5d)&&(!(_0x45d803||_0xbdcc4d&&_0x1e2e8e)?_0x5d39d5['enableReadOnlyMode']('no-permissions'):_0x5d39d5['disableReadOnlyMode']('no-permissions'));if(_0x1e2e8e){_0x1e2e8e['setPermissions']({'admin':_0x3da6f7,'modifyAll':_0x49d659,'write':_0x380cfd,'resolve':_0x578ba8},_0x593fa1);const _0x1e08f3=_0x5d39d5 instanceof _0x4e7d5d&&_0x5d39d5['commands']['get']('addCommentThread');_0x1e08f3&&(_0x1594e9?_0x1e08f3['clearForceDisabled']('noPermissions'):_0x1e08f3['forceDisabled']('noPermissions'));}}}function o(_0x3dd64b,_0x3c97d8){const t=_0x3dd64b['t'];switch(_0x3c97d8){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 u extends _0x1fb868{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x1a337f){super(_0x1a337f),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x4661b6(),this['_locale']=_0x1a337f['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:_0x125fc5,name:_0x3c77f5,..._0x475174}){if(!_0x125fc5||'string'!=typeof _0x125fc5)throw new _0x211056('users-add-invalid-id');if(this['users']['has'](_0x125fc5))throw new _0x211056('users-add-duplicated-id',null,{'id':_0x125fc5});const _0x52218d=this['context']['config']['get']('users.getInitialsCallback'),_0xc8c7b9={..._0x475174,'id':_0x125fc5,'name':h(this['_locale'],_0x3c77f5),'color':this['_getNextColor']()};_0xc8c7b9['name']=h(this['_locale'],_0xc8c7b9['name']);const _0x14ca2c=new P(_0xc8c7b9,_0x52218d);return this['users']['add'](_0x14ca2c),_0x14ca2c;}['getUser'](_0x268268){return this['users']['get'](_0x268268);}['useAnonymousUser'](){const _0x192f3a=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x192f3a);}['defineMe'](_0x5852ef){if(this['_myId'])throw new _0x211056('users-me-already-defined',null);const _0x5dbe9c=this['getUser'](_0x5852ef);if(!_0x5dbe9c)throw new _0x211056('users-me-missing-user',null);this['_myId']=_0x5852ef,_0x5dbe9c['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x1fa760=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x1fa760&&(this['_lastColor']=0x0),new l(this['_lastColor']++);}['_addAnonymousUser'](){const _0x382fee=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x382fee,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x5412b1,_0x4c226a){this['id']=_0x5412b1['id'],this['color']=_0x5412b1['color'],this['name']=_0x5412b1['name'],this['initials']=_0x4c226a?_0x4c226a(this['name']):this['_computeInitials'](),this['avatar']=_0x5412b1['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0x4649f0=this['name']['split']('\x20')['filter'](_0x46053f=>/^[\p{Letter}]/u['test'](_0x46053f));return 0x1===_0x4649f0['length']?this['_getInitial'](_0x4649f0[0x0]):0x0===_0x4649f0['length']?this['_getInitial'](this['name']):this['_getInitial'](_0x4649f0[0x0])+this['_getInitial'](_0x4649f0[_0x4649f0['length']-0x1]);}['_getInitial'](_0x72e14){return String['fromCodePoint'](_0x72e14['codePointAt'](0x0))['toUpperCase']();}}function h(_0x540445,_0x185aa8=''){return''==(_0x185aa8=_0x185aa8['trim']())?o(_0x540445,'Anonymous'):_0x185aa8;}class l{['_id'];constructor(_0x216e75){this['_id']=_0x216e75;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class I extends _0x3b7c67{['name'];['notificationView'];constructor(_0x3babb8,_0x3e0050,_0x3031cb){super(_0x3babb8),this['name']=_0x3e0050['name'],this['notificationView']=null;const _0x26aac1=['ck','ck-user'],_0x449ccf=['ck','ck-user__img'];if(_0x3e0050['isAnonymous']&&_0x449ccf['push']('ck-user__anonymous'),!_0x3e0050['isAnonymous']&&_0x3e0050['isMe']&&_0x26aac1['push']('ck-user_me'),_0x3e0050['avatar']&&_0x449ccf['push']('ck-user__avatar'),_0x3031cb){const _0x1ecfb6=new _0x416b11();_0x1ecfb6['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x1ecfb6['content']=_0x154c33,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x3031cb},'children':[_0x1ecfb6]};}const _0x1afe32=[{'tag':'div','attributes':{'class':_0x449ccf,'style':{'background-image':_0x3e0050['avatar']?'url(\x27'+_0x3e0050['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x3e0050['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x3e0050['name']},'children':[{'text':_0x3e0050['initials']}]}];this['notificationView']&&_0x1afe32['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x26aac1,'data-user-id':_0x3e0050['id']},'children':_0x1afe32});}}class F extends _0x3b7c67{['id'];constructor(_0x135d49,_0x4637e0){super(_0x135d49),this['id']='ck-aria-description-'+_0x57b233(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x4637e0}]});}}class U extends _0x2b715f{['render'](){super['render'](),V(this);}}class Y extends _0x440ff9{['render'](){super['render'](),V(this);}}function V(_0x65eeed){_0x65eeed['listenTo'](_0x65eeed['element'],'mousedown',(_0xfd28b5,_0x29c6f3)=>{_0x29c6f3['stopPropagation'](),_0x29c6f3['preventDefault']();}),_0x65eeed['listenTo'](_0x65eeed['element'],'mouseup',()=>{_0x65eeed['element']['focus']();});}function E(_0x239bf0={},_0x1ef4e2){if(void 0x0!==_0x239bf0['dateTimeFormat']&&'function'!=typeof _0x239bf0['dateTimeFormat'])throw new _0x211056('invalid-date-time-format');return _0x1ed57d=>{const _0x4aa0c4='string'==typeof _0x1ed57d?_0x30b399['fromISO'](_0x1ed57d):_0x30b399['fromJSDate'](_0x1ed57d),_0x6a54d1=_0x30b399['now'](),_0x4bc55b=Math['floor'](_0x6a54d1['diff'](_0x4aa0c4,'days')['days']);return _0x239bf0['dateTimeFormat']?_0x239bf0['dateTimeFormat'](_0x4aa0c4['toJSDate'](),_0x1ef4e2&&_0x1ef4e2['t']?_0x1ef4e2['t']:void 0x0):0x0===_0x4bc55b?_0x1ef4e2?o(_0x1ef4e2,'Today')+'\x20'+_0x4aa0c4['toFormat']('hh:mma'):_0x4aa0c4['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x4bc55b?_0x1ef4e2?o(_0x1ef4e2,'Yesterday')+'\x20'+_0x4aa0c4['toFormat']('hh:mma'):_0x4aa0c4['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x4bc55b<0x7?_0x1ef4e2?o(_0x1ef4e2,'Last')+'\x20'+o(_0x1ef4e2,_0x4aa0c4['toFormat']('EEEE'))+'\x20'+_0x4aa0c4['toFormat']('hh:mma'):_0x4aa0c4['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x4aa0c4['toFormat']('LL-dd-yyyy\x20hh:mma');};}function A(_0x50b990,_0x1d72cf){const _0x3e61d4=_0x50b990['mapper']['markerNameToElements'](_0x1d72cf['name']);if(!_0x3e61d4)return null;const _0x1a64f9=_0x57658b(_0x3e61d4['values']());return _0x50b990['view']['domConverter']['mapViewToDom'](_0x1a64f9)||null;}function R(_0x197ac7,_0x4e09a1){if(0x0===_0x4e09a1['length'])return null;const _0x154949=[],_0x1d5e0a=_0x197ac7['view']['domConverter'];for(const _0x4ff6fc of _0x4e09a1){const _0x549e79=_0x197ac7['mapper']['markerNameToElements'](_0x4ff6fc['name']);if(!_0x549e79)continue;const _0xdd42cc=Array['from'](_0x549e79)['map'](_0x4ed158=>_0x1d5e0a['mapViewToDom'](_0x4ed158))['filter'](_0x2763df=>!!_0x2763df);_0x154949['push'](..._0xdd42cc);}if(0x0===_0x154949['length'])return null;const _0x178f60=[];for(const _0xc1d8fc of _0x154949){const _0x5ebe66=_0xc1d8fc['getClientRects']()['item'](0x0);_0x5ebe66&&_0x178f60['push']({'x':_0x5ebe66['x'],'y':_0x5ebe66['y'],'domElement':_0xc1d8fc});}return 0x0===_0x178f60['length']?null:(_0x178f60['sort']((_0x1b5806,_0x5dbb7a)=>_0x1b5806['y']-_0x5dbb7a['y']||_0x1b5806['x']-_0x5dbb7a['x']),_0x178f60['map'](_0x32671c=>_0x32671c['domElement']));}function Z(_0x72a35d,{limit:_0x449608,suffix:_0x31a822='...'}){const _0x562348=[];let _0x471149=0x0;const _0x42ffb2=_0x72a35d['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x4f4816=0x0;_0x4f4816<_0x42ffb2['length'];_0x4f4816++){let _0x34a10b=_0x42ffb2[_0x4f4816];const _0x12ef1b=$(_0x34a10b);if(_0x34a10b['startsWith']('<')){if(_0x471149>=_0x449608){const _0x42cebb=_0x34a10b['match'](/[a-zA-Z]+/);if(!_0x42cebb){_0x42ffb2[_0x4f4816]='';continue;}const _0x26e651=_0x42cebb[0x0];_0x34a10b['startsWith']('</')?(_0x562348['length']&&(_0x34a10b=''),_0x562348['pop']()):(_0x562348['push'](_0x26e651),_0x34a10b='');}}else{if(_0x471149>=_0x449608)_0x34a10b='';else{if(_0x471149+_0x12ef1b['length']>=_0x449608){let _0x298676=_0x449608-_0x471149;if('\x20'===_0x12ef1b[_0x298676-0x1])_0x298676--;else{const _0x87f1c4=_0x12ef1b['slice'](_0x298676)['indexOf']('\x20');-0x1!==_0x87f1c4?_0x298676+=_0x87f1c4:_0x298676=_0x34a10b['length'];}_0x34a10b=_0x12ef1b['slice'](0x0,_0x298676)['join']('')+_0x31a822,_0x471149=_0x449608;}else _0x471149+=_0x12ef1b['length'];}}_0x42ffb2[_0x4f4816]=_0x34a10b;}return _0x42ffb2['join']('\x0a')['replace'](/\n/g,'');}function $(_0x160725){const _0xd48334=[];for(let _0x57da21=0x0;_0x57da21<_0x160725['length'];_0x57da21++){const _0x2232b9=_0x160725['substring'](_0x57da21)['match'](/^&[a-z0-9#]+;/);if(_0x2232b9){const _0x5c2448=_0x2232b9[0x0];_0xd48334['push'](_0x5c2448),_0x57da21+=_0x5c2448['length']-0x1;}else _0xd48334['push'](_0x160725[_0x57da21]);}return _0xd48334;}class m extends _0x3b7c67{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x4e10c5){super(_0x4e10c5);const _0x11ec01=this['bindTemplate'];this['set']('message',o(_0x4e10c5,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x4e10c5,o(_0x4e10c5,'Yes'),_0x3089fa,'submit'),this['cancelView']=this['_createButtonView'](_0x4e10c5,o(_0x4e10c5,'No'),_0xd83c7f,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x5db86f(),this['keystrokes']=new _0x10545d(),this['focusCycler']=new _0x5e1c02({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x11ec01['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x59a5b7,_0x354948,_0x42d70e,_0x26ea23){const _0x2d0e10=new _0x2b715f(_0x59a5b7);return _0x2d0e10['label']=_0x354948,_0x2d0e10['icon']=_0x42d70e,_0x2d0e10['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x26ea23}}),_0x2d0e10['on']('execute',()=>this['fire'](_0x26ea23)),_0x2d0e10;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x503e74=>{this['keystrokes']['listenTo'](_0x503e74['element']),this['focusTracker']['add'](_0x503e74['element']);}),this['keystrokes']['set']('esc',(_0x2f35ec,_0x3ca811)=>{this['fire']('cancel'),_0x3ca811();});}}function c(_0x2441a4){return class extends _0x2441a4{['showConfirm'](_0x22c0c0,_0x2b817d){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x22c0c0,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x2b817d['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x243bed=>this['confirmView']['on']('submit',_0x243bed));}['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 j(_0x540262){let _0x581fe5=0x0,_0x57a6a7=0x0;for(const _0x5ec39e of M(_0x540262))_0x581fe5=(_0x581fe5<<0x5)-_0x581fe5+_0x5ec39e,_0x581fe5&=_0x581fe5,[_0x581fe5,_0x57a6a7]=[_0x57a6a7,_0x581fe5];return w(_0x581fe5)+w(_0x57a6a7);}function*g(_0x464d2e){null==_0x464d2e||null==_0x464d2e?yield 0x12b9b0a1:0x0===_0x464d2e||!0x1===_0x464d2e?yield 0x0:0x1===_0x464d2e||0x1==_0x464d2e?yield 0x1:Array['isArray'](_0x464d2e)?yield*function*(_0x3cec01){for(const _0x484db0 of _0x3cec01)yield*g(_0x484db0);}(_0x464d2e):'object'==typeof _0x464d2e?yield*M(_0x464d2e):'string'==typeof _0x464d2e?yield*O(_0x464d2e):'number'==typeof _0x464d2e&&(yield _0x464d2e);}function*M(_0x1d0fe3){if(yield q('{'),_0x1d0fe3){const _0x29b8c1=Object['keys'](_0x1d0fe3)['sort']();for(const _0x577561 of _0x29b8c1){yield*O(_0x577561),yield q(':');const _0x1282d5=_0x1d0fe3[_0x577561];yield*g(_0x1282d5);}}yield q('}');}function*O(_0x221e94){yield q('\x22');for(const _0xe107f2 of _0x221e94)yield q(_0xe107f2);yield q('\x22');}function q(_0x58217a){return _0x58217a['charCodeAt'](0x0);}function w(_0x45000a){return(_0x45000a*=Math['sign'](_0x45000a))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x3c6ed1,_0x32065f,_0x2a5781,_0x5d4b22=[]){const _0x445b29='string'==typeof _0x3c6ed1?_0x2a5781['get'](_0x3c6ed1)['constructor']:_0x3c6ed1['prototype']['constructor'];if(_0x32065f['has'](_0x445b29))return _0x32065f['get'](_0x445b29);_0x32065f['set'](_0x445b29,!0x0);const _0x1cec1d=[...D,..._0x5d4b22]['map'](_0xc34bb6=>{if(_0x2a5781['has'](_0xc34bb6))return _0x2a5781['get'](_0xc34bb6)['constructor'];})['filter'](_0x2224e3=>_0x2224e3);if(_0x445b29&&_0x1cec1d['includes'](_0x445b29))return _0x32065f['set'](_0x445b29,!0x1),!0x1;if(!_0x445b29['requires'])return _0x32065f['set'](_0x445b29,!0x0),!0x0;const _0x4e3251=_0x445b29['requires']['every'](_0x2bdd93=>S(_0x2bdd93,_0x32065f,_0x2a5781,_0x5d4b22));return _0x32065f['set'](_0x445b29,_0x4e3251),_0x4e3251;}function C(_0x13b7f6,_0x44e62d){const _0x321a40={};for(const _0x50fc60 of _0x13b7f6['config']['names']())W['includes'](_0x50fc60)||(_0x321a40[_0x50fc60]=_0x13b7f6['config']['get'](_0x50fc60));const _0x2a5138=_0x321a40['plugins']||[],_0x184271=_0x13b7f6['constructor']['builtinPlugins']||[],_0x561d6a=_0x2a5138['length']?_0x2a5138:_0x184271,_0x5c3327=_0x321a40['extraPlugins']||[];delete _0x321a40['extraPlugins'];const _0x1d8a7b=_0x321a40['removePlugins']||[];delete _0x321a40['removePlugins'];const _0x36d4ba=_0x13b7f6['_context']['config']['get']('plugins')||[],_0x1ef2fa=_0x561d6a['concat'](_0x5c3327)['concat'](_0x36d4ba)['map'](_0x3a6899=>'string'==typeof _0x3a6899?_0x184271['find'](_0xb1026=>_0xb1026['pluginName']==_0x3a6899):_0x3a6899)['filter'](_0x4ea555=>!_0x1d8a7b['includes'](_0x4ea555)&&!_0x1d8a7b['includes'](_0x4ea555['pluginName'])),_0x3c6ea0=Array['from'](new Set(_0x1ef2fa)),_0x502054=new Map();return _0x321a40['plugins']=_0x3c6ea0['filter'](_0x30ad4f=>S(_0x30ad4f,_0x502054,_0x13b7f6['plugins'],_0x44e62d)),_0x321a40;}function z(_0x13092a,_0x3993f5){const _0xff10e5=[];_0x13092a['document']['selection']['on']('change:range',()=>{const _0x4f7f4d=function(_0x3e57f2,_0x10dbe4){const _0x3fd350=[];for(const _0x3e005d of _0x3e57f2['markers']){const _0x2765e8=_0x3e005d['getRange']();(_0x2765e8['containsPosition'](_0x10dbe4)||_0x2765e8['start']['isEqual'](_0x10dbe4)||_0x2765e8['end']['isEqual'](_0x10dbe4))&&_0x3fd350['push'](_0x3e005d);}return _0x3fd350;}(_0x13092a,_0x13092a['document']['selection']['focus']),_0x46435e=[],_0x138cd2=[],_0x459a93=[];for(const _0x301514 of _0xff10e5)_0x4f7f4d['includes'](_0x301514)||_0x46435e['push'](_0x301514);for(const _0x431742 of _0x4f7f4d)_0xff10e5['includes'](_0x431742)||_0x138cd2['push'](_0x431742),_0x459a93['push'](_0x431742);(_0x46435e['length']||_0x138cd2['length'])&&_0x3993f5({'left':_0x46435e,'entered':_0x138cd2}),_0xff10e5['length']=0x0,_0xff10e5['push'](..._0x459a93);});}const J='Ctrl+Shift+E';function T(_0x298bbf,_0x4a763c){const _0x139e71=_0x298bbf['element'];_0x298bbf['keystrokes']['listenTo'](_0x139e71);for(const _0xe76471 of _0x4a763c)K(_0x298bbf,_0xe76471);_0x4a763c['on']('change',(_0x1d3139,_0x22f4e5)=>{for(const _0x4d6cc9 of _0x22f4e5['removed'])_(_0x298bbf,_0x4d6cc9);for(const _0xf70976 of Array['from'](_0x22f4e5['added'])['reverse']())K(_0x298bbf,_0xf70976);}),_0x298bbf['keystrokes']['set']('enter',(_0x3ee1b9,_0x4705bf)=>{_0x139e71===_0x3ee1b9['target']&&(_0x298bbf['focusCycler']['focusFirst'](),_0x4705bf());},{'filter':_0x45d37c=>_0x45d37c['target']===_0x139e71}),_0x298bbf['keystrokes']['set']('esc',(_0x1f496f,_0x4a3ef0)=>{_0x139e71!==_0x1f496f['target']?_0x298bbf['focus']():_0x298bbf['fire']('escape'),_0x4a3ef0();}),_0x298bbf['keystrokes']['set']('arrowdown',(_0x294cce,_0x15d2d0)=>{_0x139e71===_0x294cce['target']&&(_0x298bbf['fire']('arrowdown'),_0x15d2d0());}),_0x298bbf['keystrokes']['set']('arrowup',(_0x5607c4,_0x5e2c83)=>{_0x139e71===_0x5607c4['target']&&(_0x298bbf['fire']('arrowup'),_0x5e2c83());});}function K(_0x3eb706,_0x480143){_0x480143['isRendered']&&(_0x3eb706['focusTracker']['add'](_0x480143['element']),_0x3eb706['keystrokes']['listenTo'](_0x480143['element']),_0x13ba46(_0x480143)&&function(_0x50fdcb,_0x4b6975){const _0x298f3f=_0x50fdcb['actions'],_0x30742b=_0x4b6975['actions'];for(const _0x4bc9ad of Object['keys'](_0x298f3f))if(_0x4bc9ad in _0x30742b&&_0x298f3f[_0x4bc9ad]!==_0x30742b[_0x4bc9ad])return!0x1;return!0x0;}(_0x3eb706['focusCycler'],_0x480143['focusCycler'])&&_0x3eb706['focusCycler']['chain'](_0x480143['focusCycler']));}function _(_0xe70207,_0x59ec06){_0xe70207['focusTracker']['remove'](_0x59ec06['element']),_0xe70207['keystrokes']['stopListening'](_0x59ec06['element']),_0x13ba46(_0x59ec06)&&_0xe70207['focusCycler']['unchain'](_0x59ec06['focusCycler']);}export{F as AriaDescriptionView,c as ConfirmMixin,J as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,I as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,A as getMarkerDomElement,j as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,z as surroundingMarkersDetector,Z as trimHtml};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-collaboration-core",
3
- "version": "45.1.0-alpha.6",
3
+ "version": "45.1.0-alpha.7",
4
4
  "description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -32,15 +32,15 @@
32
32
  "type": "module",
33
33
  "main": "src/index.js",
34
34
  "dependencies": {
35
- "@ckeditor/ckeditor5-comments": "45.1.0-alpha.6",
36
- "@ckeditor/ckeditor5-core": "45.1.0-alpha.6",
37
- "@ckeditor/ckeditor5-icons": "45.1.0-alpha.6",
38
- "@ckeditor/ckeditor5-theme-lark": "45.1.0-alpha.6",
39
- "@ckeditor/ckeditor5-track-changes": "45.1.0-alpha.6",
40
- "@ckeditor/ckeditor5-ui": "45.1.0-alpha.6",
41
- "@ckeditor/ckeditor5-utils": "45.1.0-alpha.6",
35
+ "@ckeditor/ckeditor5-comments": "45.1.0-alpha.7",
36
+ "@ckeditor/ckeditor5-core": "45.1.0-alpha.7",
37
+ "@ckeditor/ckeditor5-icons": "45.1.0-alpha.7",
38
+ "@ckeditor/ckeditor5-theme-lark": "45.1.0-alpha.7",
39
+ "@ckeditor/ckeditor5-track-changes": "45.1.0-alpha.7",
40
+ "@ckeditor/ckeditor5-ui": "45.1.0-alpha.7",
41
+ "@ckeditor/ckeditor5-utils": "45.1.0-alpha.7",
42
42
  "@types/luxon": "3.4.2",
43
- "ckeditor5": "45.1.0-alpha.6",
43
+ "ckeditor5": "45.1.0-alpha.7",
44
44
  "luxon": "3.5.0"
45
45
  },
46
46
  "files": [
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0xc9ba48,_0x30a209){const _0x308bfe=_0xaf87,_0x1f6b82=_0xc9ba48();while(!![]){try{const _0x1eb77d=-parseInt(_0x308bfe(0x13a))/0x1*(-parseInt(_0x308bfe(0x12e))/0x2)+-parseInt(_0x308bfe(0x13d))/0x3*(-parseInt(_0x308bfe(0x135))/0x4)+-parseInt(_0x308bfe(0x12d))/0x5*(parseInt(_0x308bfe(0x134))/0x6)+-parseInt(_0x308bfe(0x12f))/0x7*(-parseInt(_0x308bfe(0x140))/0x8)+parseInt(_0x308bfe(0x130))/0x9+-parseInt(_0x308bfe(0x137))/0xa+-parseInt(_0x308bfe(0x138))/0xb;if(_0x1eb77d===_0x30a209)break;else _0x1f6b82['push'](_0x1f6b82['shift']());}catch(_0x15a3c0){_0x1f6b82['push'](_0x1f6b82['shift']());}}}(_0x52d3,0x601e8));export default function j(_0x527a5f){let _0x36b54f=0x0,_0x30694f=0x0;for(const _0x20e4be of M(_0x527a5f))_0x36b54f=(_0x36b54f<<0x5)-_0x36b54f+_0x20e4be,_0x36b54f|=0x0,[_0x36b54f,_0x30694f]=[_0x30694f,_0x36b54f];return w(_0x36b54f)+w(_0x30694f);}function _0xaf87(_0x49e42f,_0x10bb68){const _0x52d355=_0x52d3();return _0xaf87=function(_0xaf87d8,_0x48cee6){_0xaf87d8=_0xaf87d8-0x12d;let _0x20de2c=_0x52d355[_0xaf87d8];return _0x20de2c;},_0xaf87(_0x49e42f,_0x10bb68);}function _0x52d3(){const _0x54cf17=['33515ISGSul','933866Ooztoa','7IXabum','2266704oaKzVv','number','sort','isArray','90AxLcpB','59548fkbrCP','string','6875700vdZbwj','1006973CjJZRn','charCodeAt','1uUuGiz','object','sign','111djmXAP','toString','keys','30032JBlLMQ'];_0x52d3=function(){return _0x54cf17;};return _0x52d3();}function*g(_0x34c143){const _0x21930b=_0xaf87;null==_0x34c143||null==_0x34c143?yield 0x12b9b0a1:0x0===_0x34c143||!0x1===_0x34c143?yield 0x0:0x1===_0x34c143||0x1==_0x34c143?yield 0x1:Array[_0x21930b(0x133)](_0x34c143)?yield*function*(_0x297558){for(const _0x2a4aef of _0x297558)yield*g(_0x2a4aef);}(_0x34c143):_0x21930b(0x13b)==typeof _0x34c143?yield*M(_0x34c143):_0x21930b(0x136)==typeof _0x34c143?yield*O(_0x34c143):_0x21930b(0x131)==typeof _0x34c143&&(yield _0x34c143);}function*M(_0x151dad){const _0x59dc8d=_0xaf87;if(yield q('{'),_0x151dad){const _0x258e6a=Object[_0x59dc8d(0x13f)](_0x151dad)[_0x59dc8d(0x132)]();for(const _0xebec3e of _0x258e6a){yield*O(_0xebec3e),yield q(':');const _0x1e655b=_0x151dad[_0xebec3e];yield*g(_0x1e655b);}}yield q('}');}function*O(_0x2492cb){yield q('\x22');for(const _0x396dd3 of _0x2492cb)yield q(_0x396dd3);yield q('\x22');}function q(_0xc3f59f){const _0x1b5c78=_0xaf87;return _0xc3f59f[_0x1b5c78(0x139)](0x0);}function w(_0x41ed56){const _0xc6ddb0=_0xaf87;return(_0x41ed56*=Math[_0xc6ddb0(0x13c)](_0x41ed56))[_0xc6ddb0(0x13e)](0x24);}
23
+ (function(_0xcdbe,_0x3ae924){const _0x4aeb09=_0x4053,_0x201536=_0xcdbe();while(!![]){try{const _0x479f77=-parseInt(_0x4aeb09(0x1e3))/0x1+-parseInt(_0x4aeb09(0x1db))/0x2+parseInt(_0x4aeb09(0x1e8))/0x3+-parseInt(_0x4aeb09(0x1e4))/0x4+-parseInt(_0x4aeb09(0x1e0))/0x5*(parseInt(_0x4aeb09(0x1e2))/0x6)+parseInt(_0x4aeb09(0x1de))/0x7*(-parseInt(_0x4aeb09(0x1e5))/0x8)+parseInt(_0x4aeb09(0x1e7))/0x9*(parseInt(_0x4aeb09(0x1d9))/0xa);if(_0x479f77===_0x3ae924)break;else _0x201536['push'](_0x201536['shift']());}catch(_0xd89525){_0x201536['push'](_0x201536['shift']());}}}(_0xbab4,0x778fd));export default function j(_0x348e7c){let _0x4879d2=0x0,_0x4d7705=0x0;for(const _0x2b9fb4 of M(_0x348e7c))_0x4879d2=(_0x4879d2<<0x5)-_0x4879d2+_0x2b9fb4,_0x4879d2&=_0x4879d2,[_0x4879d2,_0x4d7705]=[_0x4d7705,_0x4879d2];return w(_0x4879d2)+w(_0x4d7705);}function*g(_0x909376){const _0x33423d=_0x4053;null==_0x909376||null==_0x909376?yield 0x12b9b0a1:0x0===_0x909376||!0x1===_0x909376?yield 0x0:0x1===_0x909376||0x1==_0x909376?yield 0x1:Array[_0x33423d(0x1e9)](_0x909376)?yield*function*(_0x2e6ea0){for(const _0x1eb328 of _0x2e6ea0)yield*g(_0x1eb328);}(_0x909376):_0x33423d(0x1dd)==typeof _0x909376?yield*M(_0x909376):_0x33423d(0x1e6)==typeof _0x909376?yield*O(_0x909376):_0x33423d(0x1da)==typeof _0x909376&&(yield _0x909376);}function*M(_0x845acc){const _0x93ad94=_0x4053;if(yield q('{'),_0x845acc){const _0x1cc802=Object[_0x93ad94(0x1df)](_0x845acc)[_0x93ad94(0x1dc)]();for(const _0x361f7b of _0x1cc802){yield*O(_0x361f7b),yield q(':');const _0x29ed77=_0x845acc[_0x361f7b];yield*g(_0x29ed77);}}yield q('}');}function*O(_0x1426bf){yield q('\x22');for(const _0x3ca598 of _0x1426bf)yield q(_0x3ca598);yield q('\x22');}function q(_0x5e2004){const _0x5b0840=_0x4053;return _0x5e2004[_0x5b0840(0x1ea)](0x0);}function _0x4053(_0x2f5895,_0x3ec574){const _0xbab4d2=_0xbab4();return _0x4053=function(_0x4053ae,_0x281c17){_0x4053ae=_0x4053ae-0x1d9;let _0x270127=_0xbab4d2[_0x4053ae];return _0x270127;},_0x4053(_0x2f5895,_0x3ec574);}function w(_0x4b16d0){const _0x40ee7a=_0x4053;return(_0x4b16d0*=Math[_0x40ee7a(0x1e1)](_0x4b16d0))[_0x40ee7a(0x1eb)](0x24);}function _0xbab4(){const _0x25d98e=['8NLcCJY','string','8301474AEZBdL','2015622gtDwMh','isArray','charCodeAt','toString','20QkYoez','number','529724uOqjti','sort','object','3821083FuuHkh','keys','206275QRohGP','sign','48EFTVou','413466BHAkmY','1890736IyZFFw'];_0xbab4=function(){return _0x25d98e;};return _0xbab4();}