@ckeditor/ckeditor5-collaboration-core 44.0.0-alpha.6 → 44.0.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 _0x23a917,Editor as _0x10cdd6,icons as _0x2f746}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0xdd0d4d,Collection as _0x393e6d,uid as _0x394b95,first as _0x1c4153,FocusTracker as _0x4ee95e,KeystrokeHandler as _0x3668ff}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x104e5e,IconView as _0x1bdcb3,ButtonView as _0x4c943f,DropdownButtonView as _0x486aa7,FocusCycler as _0x1968e3,isViewWithFocusCycler as _0x46e228}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x32a123 from'date-fns/format/index.js';import _0x99b3fa from'date-fns/parseISO/index.js';import _0x4bb644 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x23a917{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x3ccd21,_0xa5695d){let _0x325829;if(_0xa5695d||(_0xa5695d=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0xa5695d?_0x325829=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x325829=this['context']['editors']['find'](_0x4efbf1=>_0x4efbf1['config']['get']('collaboration.channelId')==_0xa5695d)),!_0x325829)throw new _0xdd0d4d('permissions-set-permissions-invalid-channel-id',null);const _0x1f2973=_0x325829['plugins'],_0x375de8=_0x1f2973['has']('CommentsRepository')?_0x1f2973['get']('CommentsRepository'):void 0x0,_0x4b1634=_0x1f2973['has']('CommentsOnly')&&_0x1f2973['get']('CommentsOnly'),_0x534fc7=_0x3ccd21['includes']('document:write'),_0x802086=_0x3ccd21['includes']('comment:modify_all'),_0x344796=_0x3ccd21['includes']('comment:admin'),_0x3beb1f=_0x3ccd21['includes']('comment:write'),_0xa1a759=_0x3beb1f||_0x344796,_0x2c1ca9=_0xa1a759||_0x802086,_0x5bce31=_0x534fc7||_0xa1a759;(_0x4b1634&&(_0x4b1634['isEnabled']=!_0x534fc7&&_0x2c1ca9),_0x325829 instanceof _0x10cdd6)&&(!(_0x534fc7||_0x2c1ca9&&_0x375de8)?_0x325829['enableReadOnlyMode']('no-permissions'):_0x325829['disableReadOnlyMode']('no-permissions'));if(_0x375de8){_0x375de8['setPermissions']({'admin':_0x344796,'modifyAll':_0x802086,'write':_0x3beb1f,'resolve':_0x5bce31},_0xa5695d);const _0x38082a=_0x325829 instanceof _0x10cdd6&&_0x325829['commands']['get']('addCommentThread');_0x38082a&&(_0xa1a759?_0x38082a['clearForceDisabled']('noPermissions'):_0x38082a['forceDisabled']('noPermissions'));}}}function o(_0x1c98af,_0x4d2f25){const t=_0x1c98af['t'];switch(_0x4d2f25){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0x23a917{['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(_0x23aedd){super(_0x23aedd),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x393e6d(),this['_locale']=_0x23aedd['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:_0x3e0ae1,name:_0x1c8b7f,..._0x4b0c54}){if(!_0x3e0ae1||'string'!=typeof _0x3e0ae1)throw new _0xdd0d4d('users-add-invalid-id');if(this['users']['has'](_0x3e0ae1))throw new _0xdd0d4d('users-add-duplicated-id',null,{'id':_0x3e0ae1});const _0x33c32c={..._0x4b0c54,'id':_0x3e0ae1,'name':h(this['_locale'],_0x1c8b7f),'color':this['_getNextColor']()};_0x33c32c['name']=h(this['_locale'],_0x33c32c['name']);const _0x50bb48=new P(_0x33c32c);return this['users']['add'](_0x50bb48),_0x50bb48;}['getUser'](_0x5a9505){return this['users']['get'](_0x5a9505);}['useAnonymousUser'](){const _0x775086=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x775086);}['defineMe'](_0x3bcb30){if(this['_myId'])throw new _0xdd0d4d('users-me-already-defined',null);const _0x456298=this['getUser'](_0x3bcb30);if(!_0x456298)throw new _0xdd0d4d('users-me-missing-user',null);this['_myId']=_0x3bcb30,_0x456298['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x4d5420=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x4d5420&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x1b05e5=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x1b05e5,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x32bfd8){this['id']=_0x32bfd8['id'],this['color']=_0x32bfd8['color'],this['name']=_0x32bfd8['name'],this['avatar']=_0x32bfd8['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x4a86da=this['name']['split']('\x20');return 0x1===_0x4a86da['length']?this['_getInitial'](_0x4a86da[0x0]):this['_getInitial'](_0x4a86da[0x0])+this['_getInitial'](_0x4a86da[_0x4a86da['length']-0x1]);}['_getInitial'](_0x56c36e){return _0x56c36e['charAt'](0x0)['toUpperCase']();}}function h(_0x258b52,_0x219b41=''){return''==(_0x219b41=_0x219b41['trim']())?o(_0x258b52,'Anonymous'):_0x219b41;}class c{['_id'];constructor(_0x4874a6){this['_id']=_0x4874a6;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class H extends _0x104e5e{['name'];['notificationView'];constructor(_0x50aba5,_0x227362,_0x2cb6b7){super(_0x50aba5),this['name']=_0x227362['name'],this['notificationView']=null;const _0x5a0a26=['ck','ck-user'],_0x436ae8=['ck','ck-user__img'];if(_0x227362['isAnonymous']&&_0x436ae8['push']('ck-user__anonymous'),!_0x227362['isAnonymous']&&_0x227362['isMe']&&_0x5a0a26['push']('ck-user_me'),_0x227362['avatar']&&_0x436ae8['push']('ck-user__avatar'),_0x2cb6b7){const _0x26a2ff=new _0x1bdcb3();_0x26a2ff['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x26a2ff['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x2cb6b7},'children':[_0x26a2ff]};}const _0x6d018b=[{'tag':'div','attributes':{'class':_0x436ae8,'style':{'background-image':_0x227362['avatar']?'url(\x27'+_0x227362['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x227362['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x227362['name']},'children':[{'text':_0x227362['initials']}]}];this['notificationView']&&_0x6d018b['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x5a0a26,'data-user-id':_0x227362['id']},'children':_0x6d018b});}}class J extends _0x104e5e{['id'];constructor(_0x1a8bf1,_0x154918){super(_0x1a8bf1),this['id']='ck-aria-description-'+_0x394b95(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x154918}]});}}class U extends _0x4c943f{['render'](){super['render'](),V(this);}}class Y extends _0x486aa7{['render'](){super['render'](),V(this);}}function V(_0x23573c){_0x23573c['listenTo'](_0x23573c['element'],'mousedown',(_0x3710a5,_0xaa030c)=>{_0xaa030c['stopPropagation'](),_0xaa030c['preventDefault']();}),_0x23573c['listenTo'](_0x23573c['element'],'mouseup',()=>{_0x23573c['element']['focus']();});}function E(_0x544dab={}){if(void 0x0!==_0x544dab['dateTimeFormat']&&'function'!=typeof _0x544dab['dateTimeFormat'])throw new _0xdd0d4d('invalid-date-time-format');return _0x3ee9ea=>{const _0x415058='string'==typeof _0x3ee9ea?_0x99b3fa(_0x3ee9ea):_0x3ee9ea,_0x53014c=new Date(),_0x3c0112=_0x4bb644(_0x53014c,_0x415058);return _0x544dab['dateTimeFormat']?_0x544dab['dateTimeFormat'](_0x415058):_0x32a123(_0x415058,0x0===_0x3c0112?'\x27Today\x27\x20hh:mma':0x1===_0x3c0112?'\x27Yesterday\x27\x20hh:mma':_0x3c0112<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x88ae64,_0x556020){const _0x1d1625=_0x88ae64['mapper']['markerNameToElements'](_0x556020['name']);if(!_0x1d1625)return null;const _0x30995d=_0x1c4153(_0x1d1625['values']());return _0x88ae64['view']['domConverter']['mapViewToDom'](_0x30995d)||null;}function R(_0x5c2be1,_0x41d748){if(0x0===_0x41d748['length'])return null;const _0x2b0be0=[],_0x2cdd45=_0x5c2be1['view']['domConverter'];for(const _0x25e9e9 of _0x41d748){const _0x24583e=_0x5c2be1['mapper']['markerNameToElements'](_0x25e9e9['name']);if(!_0x24583e)continue;const _0x12b297=Array['from'](_0x24583e)['map'](_0x450139=>_0x2cdd45['mapViewToDom'](_0x450139))['filter'](_0x8663f8=>!!_0x8663f8);_0x2b0be0['push'](..._0x12b297);}if(0x0===_0x2b0be0['length'])return null;const _0x35719d=[];for(const _0x3ab399 of _0x2b0be0){const _0x1d96d4=_0x3ab399['getClientRects']()['item'](0x0);_0x1d96d4&&_0x35719d['push']({'x':_0x1d96d4['x'],'y':_0x1d96d4['y'],'domElement':_0x3ab399});}return 0x0===_0x35719d['length']?null:(_0x35719d['sort']((_0x43ff89,_0x3c0e79)=>_0x43ff89['y']-_0x3c0e79['y']||_0x43ff89['x']-_0x3c0e79['x']),_0x35719d['map'](_0x1e562e=>_0x1e562e['domElement']));}function Z(_0x3f28cf,{limit:_0x10fcf6,suffix:_0x406668='...'}){const _0x17baaa=[];let _0x546331=0x0;const _0x321471=_0x3f28cf['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x47ae09=0x0;_0x47ae09<_0x321471['length'];_0x47ae09++){let _0x8efa1c=_0x321471[_0x47ae09];const _0x30872e=$(_0x8efa1c);if(_0x8efa1c['startsWith']('<')){if(_0x546331>=_0x10fcf6){const _0x256d8e=_0x8efa1c['match'](/[a-zA-Z]+/);if(!_0x256d8e){_0x321471[_0x47ae09]='';continue;}const _0xf49c11=_0x256d8e[0x0];_0x8efa1c['startsWith']('</')?(_0x17baaa['length']&&(_0x8efa1c=''),_0x17baaa['pop']()):(_0x17baaa['push'](_0xf49c11),_0x8efa1c='');}}else{if(_0x546331>=_0x10fcf6)_0x8efa1c='';else{if(_0x546331+_0x30872e['length']>=_0x10fcf6){let _0x5674dd=_0x10fcf6-_0x546331;if('\x20'===_0x30872e[_0x5674dd-0x1])_0x5674dd--;else{const _0x8c4f5e=_0x30872e['slice'](_0x5674dd)['indexOf']('\x20');-0x1!==_0x8c4f5e?_0x5674dd+=_0x8c4f5e:_0x5674dd=_0x8efa1c['length'];}_0x8efa1c=_0x30872e['slice'](0x0,_0x5674dd)['join']('')+_0x406668,_0x546331=_0x10fcf6;}else _0x546331+=_0x30872e['length'];}}_0x321471[_0x47ae09]=_0x8efa1c;}return _0x321471['join']('\x0a')['replace'](/\n/g,'');}function $(_0x5c4ef7){const _0x30d862=[];for(let _0x1761cc=0x0;_0x1761cc<_0x5c4ef7['length'];_0x1761cc++){const _0xf953fd=_0x5c4ef7['substring'](_0x1761cc)['match'](/^&[a-z0-9#]+;/);if(_0xf953fd){const _0x145a99=_0xf953fd[0x0];_0x30d862['push'](_0x145a99),_0x1761cc+=_0x145a99['length']-0x1;}else _0x30d862['push'](_0x5c4ef7[_0x1761cc]);}return _0x30d862;}class m extends _0x104e5e{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x4ab02e){super(_0x4ab02e);const _0x4e77dd=this['bindTemplate'];this['set']('message',o(_0x4ab02e,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x4ab02e,o(_0x4ab02e,'Yes'),_0x2f746['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x4ab02e,o(_0x4ab02e,'No'),_0x2f746['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x4ee95e(),this['keystrokes']=new _0x3668ff(),this['focusCycler']=new _0x1968e3({'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':_0x4e77dd['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'](_0x5b41e9,_0x2551e9,_0x542509,_0x1e2232){const _0x1b7e03=new _0x4c943f(_0x5b41e9);return _0x1b7e03['label']=_0x2551e9,_0x1b7e03['icon']=_0x542509,_0x1b7e03['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x1e2232}}),_0x1b7e03['on']('execute',()=>this['fire'](_0x1e2232)),_0x1b7e03;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x2bc30b=>{this['keystrokes']['listenTo'](_0x2bc30b['element']),this['focusTracker']['add'](_0x2bc30b['element']);}),this['keystrokes']['set']('esc',(_0x286f54,_0x3b3cf6)=>{this['fire']('cancel'),_0x3b3cf6();});}}function f(_0x300fa2){return class extends _0x300fa2{['showConfirm'](_0x21d4b9,_0x3fb4e3){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x21d4b9,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x3fb4e3['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x1538d0=>this['confirmView']['on']('submit',_0x1538d0));}['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 M(_0x4effea){let _0x2b7c19=0x0,_0xb40ebc=0x0;for(const _0x2d8d55 of q(_0x4effea))_0x2b7c19=(_0x2b7c19<<0x5)-_0x2b7c19+_0x2d8d55,_0x2b7c19|=0x0,[_0x2b7c19,_0xb40ebc]=[_0xb40ebc,_0x2b7c19];return z(_0x2b7c19)+z(_0xb40ebc);}function*O(_0x38bb60){null==_0x38bb60||null==_0x38bb60?yield 0x12b9b0a1:0x0===_0x38bb60||!0x1===_0x38bb60?yield 0x0:0x1===_0x38bb60||0x1==_0x38bb60?yield 0x1:Array['isArray'](_0x38bb60)?yield*function*(_0x2ad87a){for(const _0x345c60 of _0x2ad87a)yield*O(_0x345c60);}(_0x38bb60):'object'==typeof _0x38bb60?yield*q(_0x38bb60):'string'==typeof _0x38bb60?yield*v(_0x38bb60):'number'==typeof _0x38bb60&&(yield _0x38bb60);}function*q(_0x3acd0e){if(yield w('{'),_0x3acd0e){const _0x3a9daf=Object['keys'](_0x3acd0e)['sort']();for(const _0x298235 of _0x3a9daf){yield*v(_0x298235),yield w(':');const _0x42bdac=_0x3acd0e[_0x298235];yield*O(_0x42bdac);}}yield w('}');}function*v(_0x20f919){yield w('\x22');for(const _0x5d6112 of _0x20f919)yield w(_0x5d6112);yield w('\x22');}function w(_0x57e1ae){return _0x57e1ae['charCodeAt'](0x0);}function z(_0x4e0286){return(_0x4e0286*=Math['sign'](_0x4e0286))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x52df27,_0x30958a,_0x135f7e,_0x1b3dc7=[]){const _0x45dab8='string'==typeof _0x52df27?_0x135f7e['get'](_0x52df27)['constructor']:_0x52df27['prototype']['constructor'];if(_0x30958a['has'](_0x45dab8))return _0x30958a['get'](_0x45dab8);_0x30958a['set'](_0x45dab8,!0x0);const _0x1e5567=[...D,..._0x1b3dc7]['map'](_0x592133=>{if(_0x135f7e['has'](_0x592133))return _0x135f7e['get'](_0x592133)['constructor'];})['filter'](_0x314dae=>_0x314dae);if(_0x45dab8&&_0x1e5567['includes'](_0x45dab8))return _0x30958a['set'](_0x45dab8,!0x1),!0x1;if(!_0x45dab8['requires'])return _0x30958a['set'](_0x45dab8,!0x0),!0x0;const _0x386e90=_0x45dab8['requires']['every'](_0x6d4be5=>S(_0x6d4be5,_0x30958a,_0x135f7e,_0x1b3dc7));return _0x30958a['set'](_0x45dab8,_0x386e90),_0x386e90;}function C(_0x37de6c,_0x2e89c0){const _0x354573={};for(const _0x27dc1a of _0x37de6c['config']['names']())W['includes'](_0x27dc1a)||(_0x354573[_0x27dc1a]=_0x37de6c['config']['get'](_0x27dc1a));const _0x567d17=_0x354573['plugins']||[],_0x157d44=_0x37de6c['constructor']['builtinPlugins']||[],_0x44ab1a=_0x567d17['length']?_0x567d17:_0x157d44,_0x7fdd4c=_0x354573['extraPlugins']||[];delete _0x354573['extraPlugins'];const _0x2d6974=_0x354573['removePlugins']||[];delete _0x354573['removePlugins'];const _0x61bb1=_0x37de6c['_context']['config']['get']('plugins')||[],_0x127466=_0x44ab1a['concat'](_0x7fdd4c)['concat'](_0x61bb1)['map'](_0x2c0dde=>'string'==typeof _0x2c0dde?_0x157d44['find'](_0x30e00c=>_0x30e00c['pluginName']==_0x2c0dde):_0x2c0dde)['filter'](_0x2be624=>!_0x2d6974['includes'](_0x2be624)&&!_0x2d6974['includes'](_0x2be624['pluginName'])),_0x54aa9a=Array['from'](new Set(_0x127466)),_0x270d9a=new Map();return _0x354573['plugins']=_0x54aa9a['filter'](_0x2a401d=>S(_0x2a401d,_0x270d9a,_0x37de6c['plugins'],_0x2e89c0)),_0x354573;}function B(_0x2e26bf,_0x51e3fe){const _0x530929=[];_0x2e26bf['document']['selection']['on']('change:range',()=>{const _0x213d2a=function(_0x5aa190,_0x72930e){const _0x174bfb=[];for(const _0x433e6b of _0x5aa190['markers']){const _0x27d0f7=_0x433e6b['getRange']();(_0x27d0f7['containsPosition'](_0x72930e)||_0x27d0f7['start']['isEqual'](_0x72930e)||_0x27d0f7['end']['isEqual'](_0x72930e))&&_0x174bfb['push'](_0x433e6b);}return _0x174bfb;}(_0x2e26bf,_0x2e26bf['document']['selection']['focus']),_0x38dfa4=[],_0x160123=[],_0x13f1a6=[];for(const _0x31a469 of _0x530929)_0x213d2a['includes'](_0x31a469)||_0x38dfa4['push'](_0x31a469);for(const _0x7860b3 of _0x213d2a)_0x530929['includes'](_0x7860b3)||_0x160123['push'](_0x7860b3),_0x13f1a6['push'](_0x7860b3);(_0x38dfa4['length']||_0x160123['length'])&&_0x51e3fe({'left':_0x38dfa4,'entered':_0x160123}),_0x530929['length']=0x0,_0x530929['push'](..._0x13f1a6);});}const Q='Ctrl+Shift+E';function T(_0x36796c,_0x5134ef){const _0x48b003=_0x36796c['element'];_0x36796c['keystrokes']['listenTo'](_0x48b003);for(const _0x2173b6 of _0x5134ef)K(_0x36796c,_0x2173b6);_0x5134ef['on']('change',(_0xd4c7f1,_0x3fe5d7)=>{for(const _0x177889 of _0x3fe5d7['removed'])_(_0x36796c,_0x177889);for(const _0x4533b7 of Array['from'](_0x3fe5d7['added'])['reverse']())K(_0x36796c,_0x4533b7);}),_0x36796c['keystrokes']['set']('enter',(_0x5da2f4,_0x338714)=>{_0x48b003===_0x5da2f4['target']&&(_0x36796c['focusCycler']['focusFirst'](),_0x338714());},{'filter':_0x1cb652=>_0x1cb652['target']===_0x48b003}),_0x36796c['keystrokes']['set']('esc',(_0x4a0519,_0x231ca2)=>{_0x48b003!==_0x4a0519['target']?_0x36796c['focus']():_0x36796c['fire']('escape'),_0x231ca2();}),_0x36796c['keystrokes']['set']('arrowdown',(_0x2defe6,_0x48f707)=>{_0x48b003===_0x2defe6['target']&&(_0x36796c['fire']('arrowdown'),_0x48f707());}),_0x36796c['keystrokes']['set']('arrowup',(_0x549477,_0x7f5328)=>{_0x48b003===_0x549477['target']&&(_0x36796c['fire']('arrowup'),_0x7f5328());});}function K(_0x57d363,_0x4ced66){_0x4ced66['isRendered']&&(_0x57d363['focusTracker']['add'](_0x4ced66['element']),_0x57d363['keystrokes']['listenTo'](_0x4ced66['element']),_0x46e228(_0x4ced66)&&function(_0x31ad7d,_0x240f19){const _0xf4a2a=_0x31ad7d['actions'],_0x211040=_0x240f19['actions'];for(const _0x7a6131 of Object['keys'](_0xf4a2a))if(_0x7a6131 in _0x211040&&_0xf4a2a[_0x7a6131]!==_0x211040[_0x7a6131])return!0x1;return!0x0;}(_0x57d363['focusCycler'],_0x4ced66['focusCycler'])&&_0x57d363['focusCycler']['chain'](_0x4ced66['focusCycler']));}function _(_0x183639,_0x12251a){_0x183639['focusTracker']['remove'](_0x12251a['element']),_0x183639['keystrokes']['stopListening'](_0x12251a['element']),_0x46e228(_0x12251a)&&_0x183639['focusCycler']['unchain'](_0x12251a['focusCycler']);}export{J as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,H as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
23
|
+
import{ContextPlugin as _0x40e999,Editor as _0x39c681,icons as _0x166d43}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0xd4c16b,Collection as _0x414003,uid as _0x58b165,first as _0x1cbc09,FocusTracker as _0x92ed8a,KeystrokeHandler as _0x5d8ecc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x2c58ca,IconView as _0x38e2c4,ButtonView as _0x3faa8d,DropdownButtonView as _0x1273dc,FocusCycler as _0x55f8c7,isViewWithFocusCycler as _0x9df027}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x2b5209 from'date-fns/format/index.js';import _0x47f9be from'date-fns/parseISO/index.js';import _0x99ad7d from'date-fns/differenceInCalendarDays/index.js';class n extends _0x40e999{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0xf89611,_0x4c4631){let _0x46226d;if(_0x4c4631||(_0x4c4631=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x4c4631?_0x46226d=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x46226d=this['context']['editors']['find'](_0x469f2e=>_0x469f2e['config']['get']('collaboration.channelId')==_0x4c4631)),!_0x46226d)throw new _0xd4c16b('permissions-set-permissions-invalid-channel-id',null);const _0x6b3314=_0x46226d['plugins'],_0x24145f=_0x6b3314['has']('CommentsRepository')?_0x6b3314['get']('CommentsRepository'):void 0x0,_0x2ac866=_0x6b3314['has']('CommentsOnly')&&_0x6b3314['get']('CommentsOnly'),_0x1035b6=_0xf89611['includes']('document:write'),_0x27737b=_0xf89611['includes']('comment:modify_all'),_0xd57875=_0xf89611['includes']('comment:admin'),_0x2d5cb4=_0xf89611['includes']('comment:write'),_0x46ef3d=_0x2d5cb4||_0xd57875,_0x1219f8=_0x46ef3d||_0x27737b,_0x512e07=_0x1035b6||_0x46ef3d;(_0x2ac866&&(_0x2ac866['isEnabled']=!_0x1035b6&&_0x1219f8),_0x46226d instanceof _0x39c681)&&(!(_0x1035b6||_0x1219f8&&_0x24145f)?_0x46226d['enableReadOnlyMode']('no-permissions'):_0x46226d['disableReadOnlyMode']('no-permissions'));if(_0x24145f){_0x24145f['setPermissions']({'admin':_0xd57875,'modifyAll':_0x27737b,'write':_0x2d5cb4,'resolve':_0x512e07},_0x4c4631);const _0x5b7260=_0x46226d instanceof _0x39c681&&_0x46226d['commands']['get']('addCommentThread');_0x5b7260&&(_0x46ef3d?_0x5b7260['clearForceDisabled']('noPermissions'):_0x5b7260['forceDisabled']('noPermissions'));}}}function o(_0x41ab30,_0x23355f){const t=_0x41ab30['t'];switch(_0x23355f){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0x40e999{['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(_0x2e73fa){super(_0x2e73fa),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x414003(),this['_locale']=_0x2e73fa['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:_0x3dea7a,name:_0x5078cb,..._0x29bac0}){if(!_0x3dea7a||'string'!=typeof _0x3dea7a)throw new _0xd4c16b('users-add-invalid-id');if(this['users']['has'](_0x3dea7a))throw new _0xd4c16b('users-add-duplicated-id',null,{'id':_0x3dea7a});const _0xc3e59a={..._0x29bac0,'id':_0x3dea7a,'name':h(this['_locale'],_0x5078cb),'color':this['_getNextColor']()};_0xc3e59a['name']=h(this['_locale'],_0xc3e59a['name']);const _0x5e92c9=new P(_0xc3e59a);return this['users']['add'](_0x5e92c9),_0x5e92c9;}['getUser'](_0x3fdfd2){return this['users']['get'](_0x3fdfd2);}['useAnonymousUser'](){const _0xa66b16=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0xa66b16);}['defineMe'](_0x1ae707){if(this['_myId'])throw new _0xd4c16b('users-me-already-defined',null);const _0x5f3883=this['getUser'](_0x1ae707);if(!_0x5f3883)throw new _0xd4c16b('users-me-missing-user',null);this['_myId']=_0x1ae707,_0x5f3883['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x16783f=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x16783f&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x3e0b6b=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x3e0b6b,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x4f0aaf){this['id']=_0x4f0aaf['id'],this['color']=_0x4f0aaf['color'],this['name']=_0x4f0aaf['name'],this['avatar']=_0x4f0aaf['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x47a2d6=this['name']['split']('\x20');return 0x1===_0x47a2d6['length']?this['_getInitial'](_0x47a2d6[0x0]):this['_getInitial'](_0x47a2d6[0x0])+this['_getInitial'](_0x47a2d6[_0x47a2d6['length']-0x1]);}['_getInitial'](_0x44f16d){return _0x44f16d['charAt'](0x0)['toUpperCase']();}}function h(_0x2707b6,_0x162eee=''){return''==(_0x162eee=_0x162eee['trim']())?o(_0x2707b6,'Anonymous'):_0x162eee;}class c{['_id'];constructor(_0x376b53){this['_id']=_0x376b53;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class J extends _0x2c58ca{['name'];['notificationView'];constructor(_0x56e1ee,_0x581318,_0x3c14c8){super(_0x56e1ee),this['name']=_0x581318['name'],this['notificationView']=null;const _0x4d61ce=['ck','ck-user'],_0x4c4d26=['ck','ck-user__img'];if(_0x581318['isAnonymous']&&_0x4c4d26['push']('ck-user__anonymous'),!_0x581318['isAnonymous']&&_0x581318['isMe']&&_0x4d61ce['push']('ck-user_me'),_0x581318['avatar']&&_0x4c4d26['push']('ck-user__avatar'),_0x3c14c8){const _0xb8145c=new _0x38e2c4();_0xb8145c['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0xb8145c['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x3c14c8},'children':[_0xb8145c]};}const _0x15824f=[{'tag':'div','attributes':{'class':_0x4c4d26,'style':{'background-image':_0x581318['avatar']?'url(\x27'+_0x581318['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x581318['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x581318['name']},'children':[{'text':_0x581318['initials']}]}];this['notificationView']&&_0x15824f['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x4d61ce,'data-user-id':_0x581318['id']},'children':_0x15824f});}}class G extends _0x2c58ca{['id'];constructor(_0x5a9d43,_0x975f27){super(_0x5a9d43),this['id']='ck-aria-description-'+_0x58b165(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x975f27}]});}}class U extends _0x3faa8d{['render'](){super['render'](),V(this);}}class Y extends _0x1273dc{['render'](){super['render'](),V(this);}}function V(_0x3d3d10){_0x3d3d10['listenTo'](_0x3d3d10['element'],'mousedown',(_0x23a904,_0x1b5f48)=>{_0x1b5f48['stopPropagation'](),_0x1b5f48['preventDefault']();}),_0x3d3d10['listenTo'](_0x3d3d10['element'],'mouseup',()=>{_0x3d3d10['element']['focus']();});}function E(_0x1f53b2={}){if(void 0x0!==_0x1f53b2['dateTimeFormat']&&'function'!=typeof _0x1f53b2['dateTimeFormat'])throw new _0xd4c16b('invalid-date-time-format');return _0x191214=>{const _0x561799='string'==typeof _0x191214?_0x47f9be(_0x191214):_0x191214,_0x36c786=new Date(),_0x33955b=_0x99ad7d(_0x36c786,_0x561799);return _0x1f53b2['dateTimeFormat']?_0x1f53b2['dateTimeFormat'](_0x561799):_0x2b5209(_0x561799,0x0===_0x33955b?'\x27Today\x27\x20hh:mma':0x1===_0x33955b?'\x27Yesterday\x27\x20hh:mma':_0x33955b<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x329e09,_0x1e223b){const _0x302675=_0x329e09['mapper']['markerNameToElements'](_0x1e223b['name']);if(!_0x302675)return null;const _0x14aaad=_0x1cbc09(_0x302675['values']());return _0x329e09['view']['domConverter']['mapViewToDom'](_0x14aaad)||null;}function R(_0x16c375,_0x265b54){if(0x0===_0x265b54['length'])return null;const _0x1215fa=[],_0x31e542=_0x16c375['view']['domConverter'];for(const _0x177cea of _0x265b54){const _0x2f4809=_0x16c375['mapper']['markerNameToElements'](_0x177cea['name']);if(!_0x2f4809)continue;const _0x3724aa=Array['from'](_0x2f4809)['map'](_0x466dfe=>_0x31e542['mapViewToDom'](_0x466dfe))['filter'](_0x3ec23e=>!!_0x3ec23e);_0x1215fa['push'](..._0x3724aa);}if(0x0===_0x1215fa['length'])return null;const _0x5aa49c=[];for(const _0x5dce18 of _0x1215fa){const _0xf5cdd5=_0x5dce18['getClientRects']()['item'](0x0);_0xf5cdd5&&_0x5aa49c['push']({'x':_0xf5cdd5['x'],'y':_0xf5cdd5['y'],'domElement':_0x5dce18});}return 0x0===_0x5aa49c['length']?null:(_0x5aa49c['sort']((_0x2bce6a,_0x3fffa5)=>_0x2bce6a['y']-_0x3fffa5['y']||_0x2bce6a['x']-_0x3fffa5['x']),_0x5aa49c['map'](_0x245d4d=>_0x245d4d['domElement']));}function Z(_0x48a960,{limit:_0x4d5f3c,suffix:_0x28278a='...'}){const _0x24f21d=[];let _0x39da86=0x0;const _0x5bdad2=_0x48a960['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x1898fb=0x0;_0x1898fb<_0x5bdad2['length'];_0x1898fb++){let _0x34b017=_0x5bdad2[_0x1898fb];const _0x45fe07=$(_0x34b017);if(_0x34b017['startsWith']('<')){if(_0x39da86>=_0x4d5f3c){const _0x53501f=_0x34b017['match'](/[a-zA-Z]+/);if(!_0x53501f){_0x5bdad2[_0x1898fb]='';continue;}const _0x2d029b=_0x53501f[0x0];_0x34b017['startsWith']('</')?(_0x24f21d['length']&&(_0x34b017=''),_0x24f21d['pop']()):(_0x24f21d['push'](_0x2d029b),_0x34b017='');}}else{if(_0x39da86>=_0x4d5f3c)_0x34b017='';else{if(_0x39da86+_0x45fe07['length']>=_0x4d5f3c){let _0x51bcb9=_0x4d5f3c-_0x39da86;if('\x20'===_0x45fe07[_0x51bcb9-0x1])_0x51bcb9--;else{const _0x3225d6=_0x45fe07['slice'](_0x51bcb9)['indexOf']('\x20');-0x1!==_0x3225d6?_0x51bcb9+=_0x3225d6:_0x51bcb9=_0x34b017['length'];}_0x34b017=_0x45fe07['slice'](0x0,_0x51bcb9)['join']('')+_0x28278a,_0x39da86=_0x4d5f3c;}else _0x39da86+=_0x45fe07['length'];}}_0x5bdad2[_0x1898fb]=_0x34b017;}return _0x5bdad2['join']('\x0a')['replace'](/\n/g,'');}function $(_0x191879){const _0x171bc3=[];for(let _0x413424=0x0;_0x413424<_0x191879['length'];_0x413424++){const _0x1c42fc=_0x191879['substring'](_0x413424)['match'](/^&[a-z0-9#]+;/);if(_0x1c42fc){const _0x5bc81a=_0x1c42fc[0x0];_0x171bc3['push'](_0x5bc81a),_0x413424+=_0x5bc81a['length']-0x1;}else _0x171bc3['push'](_0x191879[_0x413424]);}return _0x171bc3;}class m extends _0x2c58ca{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x755134){super(_0x755134);const _0x228fb1=this['bindTemplate'];this['set']('message',o(_0x755134,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x755134,o(_0x755134,'Yes'),_0x166d43['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x755134,o(_0x755134,'No'),_0x166d43['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x92ed8a(),this['keystrokes']=new _0x5d8ecc(),this['focusCycler']=new _0x55f8c7({'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':_0x228fb1['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'](_0x1daa62,_0x3039b0,_0xe9950e,_0x97b322){const _0x341ebd=new _0x3faa8d(_0x1daa62);return _0x341ebd['label']=_0x3039b0,_0x341ebd['icon']=_0xe9950e,_0x341ebd['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x97b322}}),_0x341ebd['on']('execute',()=>this['fire'](_0x97b322)),_0x341ebd;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x4b2670=>{this['keystrokes']['listenTo'](_0x4b2670['element']),this['focusTracker']['add'](_0x4b2670['element']);}),this['keystrokes']['set']('esc',(_0x4c669c,_0x22a48d)=>{this['fire']('cancel'),_0x22a48d();});}}function f(_0x66c825){return class extends _0x66c825{['showConfirm'](_0x133048,_0xf9bcaa){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x133048,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0xf9bcaa['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x44d1b1=>this['confirmView']['on']('submit',_0x44d1b1));}['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 M(_0x4d0d1d){let _0x25ee8c=0x0,_0x462519=0x0;for(const _0x463858 of q(_0x4d0d1d))_0x25ee8c=(_0x25ee8c<<0x5)-_0x25ee8c+_0x463858,_0x25ee8c|=0x0,[_0x25ee8c,_0x462519]=[_0x462519,_0x25ee8c];return z(_0x25ee8c)+z(_0x462519);}function*O(_0x481690){null==_0x481690||null==_0x481690?yield 0x12b9b0a1:0x0===_0x481690||!0x1===_0x481690?yield 0x0:0x1===_0x481690||0x1==_0x481690?yield 0x1:Array['isArray'](_0x481690)?yield*function*(_0x1d5a48){for(const _0x157f12 of _0x1d5a48)yield*O(_0x157f12);}(_0x481690):'object'==typeof _0x481690?yield*q(_0x481690):'string'==typeof _0x481690?yield*v(_0x481690):'number'==typeof _0x481690&&(yield _0x481690);}function*q(_0x4fb231){if(yield w('{'),_0x4fb231){const _0x23c388=Object['keys'](_0x4fb231)['sort']();for(const _0x40570b of _0x23c388){yield*v(_0x40570b),yield w(':');const _0x1b63a7=_0x4fb231[_0x40570b];yield*O(_0x1b63a7);}}yield w('}');}function*v(_0x3c083b){yield w('\x22');for(const _0x3bdec6 of _0x3c083b)yield w(_0x3bdec6);yield w('\x22');}function w(_0x4107d8){return _0x4107d8['charCodeAt'](0x0);}function z(_0x40b8ec){return(_0x40b8ec*=Math['sign'](_0x40b8ec))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x15ae78,_0x4eff5f,_0x2ae183,_0x2bd057=[]){const _0x59238d='string'==typeof _0x15ae78?_0x2ae183['get'](_0x15ae78)['constructor']:_0x15ae78['prototype']['constructor'];if(_0x4eff5f['has'](_0x59238d))return _0x4eff5f['get'](_0x59238d);_0x4eff5f['set'](_0x59238d,!0x0);const _0x1cd047=[...D,..._0x2bd057]['map'](_0x2588f2=>{if(_0x2ae183['has'](_0x2588f2))return _0x2ae183['get'](_0x2588f2)['constructor'];})['filter'](_0x3c9cde=>_0x3c9cde);if(_0x59238d&&_0x1cd047['includes'](_0x59238d))return _0x4eff5f['set'](_0x59238d,!0x1),!0x1;if(!_0x59238d['requires'])return _0x4eff5f['set'](_0x59238d,!0x0),!0x0;const _0x4ef983=_0x59238d['requires']['every'](_0xba1221=>S(_0xba1221,_0x4eff5f,_0x2ae183,_0x2bd057));return _0x4eff5f['set'](_0x59238d,_0x4ef983),_0x4ef983;}function C(_0x498e03,_0x21dbe1){const _0x48e910={};for(const _0x192e93 of _0x498e03['config']['names']())W['includes'](_0x192e93)||(_0x48e910[_0x192e93]=_0x498e03['config']['get'](_0x192e93));const _0x199ac9=_0x48e910['plugins']||[],_0x3f95a9=_0x498e03['constructor']['builtinPlugins']||[],_0x540468=_0x199ac9['length']?_0x199ac9:_0x3f95a9,_0x5170b2=_0x48e910['extraPlugins']||[];delete _0x48e910['extraPlugins'];const _0x5891df=_0x48e910['removePlugins']||[];delete _0x48e910['removePlugins'];const _0x336a1f=_0x498e03['_context']['config']['get']('plugins')||[],_0x214eec=_0x540468['concat'](_0x5170b2)['concat'](_0x336a1f)['map'](_0x46593e=>'string'==typeof _0x46593e?_0x3f95a9['find'](_0x3c5e61=>_0x3c5e61['pluginName']==_0x46593e):_0x46593e)['filter'](_0xded933=>!_0x5891df['includes'](_0xded933)&&!_0x5891df['includes'](_0xded933['pluginName'])),_0x41fee5=Array['from'](new Set(_0x214eec)),_0x143505=new Map();return _0x48e910['plugins']=_0x41fee5['filter'](_0x1480dd=>S(_0x1480dd,_0x143505,_0x498e03['plugins'],_0x21dbe1)),_0x48e910;}function B(_0x572ab1,_0x1c3a19){const _0x22a4a6=[];_0x572ab1['document']['selection']['on']('change:range',()=>{const _0x54bf3e=function(_0x182fb9,_0x4ccb5a){const _0x13d53d=[];for(const _0x20d596 of _0x182fb9['markers']){const _0x14c232=_0x20d596['getRange']();(_0x14c232['containsPosition'](_0x4ccb5a)||_0x14c232['start']['isEqual'](_0x4ccb5a)||_0x14c232['end']['isEqual'](_0x4ccb5a))&&_0x13d53d['push'](_0x20d596);}return _0x13d53d;}(_0x572ab1,_0x572ab1['document']['selection']['focus']),_0xc3ecbd=[],_0x4d1797=[],_0x2e81fe=[];for(const _0x516eaa of _0x22a4a6)_0x54bf3e['includes'](_0x516eaa)||_0xc3ecbd['push'](_0x516eaa);for(const _0x10c77f of _0x54bf3e)_0x22a4a6['includes'](_0x10c77f)||_0x4d1797['push'](_0x10c77f),_0x2e81fe['push'](_0x10c77f);(_0xc3ecbd['length']||_0x4d1797['length'])&&_0x1c3a19({'left':_0xc3ecbd,'entered':_0x4d1797}),_0x22a4a6['length']=0x0,_0x22a4a6['push'](..._0x2e81fe);});}const Q='Ctrl+Shift+E';function T(_0x2e515e,_0x858d8f){const _0x3a5ed4=_0x2e515e['element'];_0x2e515e['keystrokes']['listenTo'](_0x3a5ed4);for(const _0x5273d3 of _0x858d8f)K(_0x2e515e,_0x5273d3);_0x858d8f['on']('change',(_0x4574e2,_0x1faeaf)=>{for(const _0x49c338 of _0x1faeaf['removed'])_(_0x2e515e,_0x49c338);for(const _0x5211f4 of Array['from'](_0x1faeaf['added'])['reverse']())K(_0x2e515e,_0x5211f4);}),_0x2e515e['keystrokes']['set']('enter',(_0x152e10,_0x285a40)=>{_0x3a5ed4===_0x152e10['target']&&(_0x2e515e['focusCycler']['focusFirst'](),_0x285a40());},{'filter':_0x1251fa=>_0x1251fa['target']===_0x3a5ed4}),_0x2e515e['keystrokes']['set']('esc',(_0x9853f4,_0x12b81d)=>{_0x3a5ed4!==_0x9853f4['target']?_0x2e515e['focus']():_0x2e515e['fire']('escape'),_0x12b81d();}),_0x2e515e['keystrokes']['set']('arrowdown',(_0x1c467e,_0x43e0ef)=>{_0x3a5ed4===_0x1c467e['target']&&(_0x2e515e['fire']('arrowdown'),_0x43e0ef());}),_0x2e515e['keystrokes']['set']('arrowup',(_0x221802,_0x21be4f)=>{_0x3a5ed4===_0x221802['target']&&(_0x2e515e['fire']('arrowup'),_0x21be4f());});}function K(_0x5c3cab,_0x3e6b04){_0x3e6b04['isRendered']&&(_0x5c3cab['focusTracker']['add'](_0x3e6b04['element']),_0x5c3cab['keystrokes']['listenTo'](_0x3e6b04['element']),_0x9df027(_0x3e6b04)&&function(_0x4656f7,_0x3c560b){const _0x318461=_0x4656f7['actions'],_0x3c6c9b=_0x3c560b['actions'];for(const _0x3d0b89 of Object['keys'](_0x318461))if(_0x3d0b89 in _0x3c6c9b&&_0x318461[_0x3d0b89]!==_0x3c6c9b[_0x3d0b89])return!0x1;return!0x0;}(_0x5c3cab['focusCycler'],_0x3e6b04['focusCycler'])&&_0x5c3cab['focusCycler']['chain'](_0x3e6b04['focusCycler']));}function _(_0x3ff861,_0x5869b3){_0x3ff861['focusTracker']['remove'](_0x5869b3['element']),_0x3ff861['keystrokes']['stopListening'](_0x5869b3['element']),_0x9df027(_0x5869b3)&&_0x3ff861['focusCycler']['unchain'](_0x5869b3['focusCycler']);}export{G as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,J as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "44.0.0-alpha.
|
3
|
+
"version": "44.0.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,11 +32,11 @@
|
|
32
32
|
"type": "module",
|
33
33
|
"main": "src/index.js",
|
34
34
|
"dependencies": {
|
35
|
-
"@ckeditor/ckeditor5-core": "44.0.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "44.0.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.
|
39
|
-
"ckeditor5": "44.0.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "44.0.0-alpha.7",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "44.0.0-alpha.7",
|
37
|
+
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.7",
|
38
|
+
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.7",
|
39
|
+
"ckeditor5": "44.0.0-alpha.7",
|
40
40
|
"date-fns": "2.30.0"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
(function(_0x536c5b,_0x35061a){var _0x4bb9bb=_0x5c42,_0x5cb793=_0x536c5b();while(!![]){try{var _0x1a6cf3=-parseInt(_0x4bb9bb(0x1e1))/0x1*(-parseInt(_0x4bb9bb(0x1dd))/0x2)+-parseInt(_0x4bb9bb(0x1ea))/0x3+-parseInt(_0x4bb9bb(0x1df))/0x4+parseInt(_0x4bb9bb(0x1e6))/0x5+-parseInt(_0x4bb9bb(0x1de))/0x6*(-parseInt(_0x4bb9bb(0x1e9))/0x7)+-parseInt(_0x4bb9bb(0x1e8))/0x8+parseInt(_0x4bb9bb(0x1e0))/0x9*(parseInt(_0x4bb9bb(0x1e4))/0xa);if(_0x1a6cf3===_0x35061a)break;else _0x5cb793['push'](_0x5cb793['shift']());}catch(_0x363ea8){_0x5cb793['push'](_0x5cb793['shift']());}}}(_0xecdf,0xbc329));import{uid as _0x10bea2}from'ckeditor5/src/utils.js';function _0x5c42(_0x4b71bc,_0x1df9c7){var _0xecdfe5=_0xecdf();return _0x5c42=function(_0x5c426e,_0x4ac424){_0x5c426e=_0x5c426e-0x1dd;var _0x20b772=_0xecdfe5[_0x5c426e];return _0x20b772;},_0x5c42(_0x4b71bc,_0x1df9c7);}import{View as _0x50f5e1}from'ckeditor5/src/ui.js';function _0xecdf(){var _0x3f7121=['7299395YyADqI','ck-aria-description','9931344tEieGR','2146529TSOllH','4497207UJTEwq','918122iigNgu','12GuiuYv','981180AkTDcH','711EjlAmP','3RKiAKn','span','ck-aria-description-','38770aYEjct','setTemplate'];_0xecdf=function(){return _0x3f7121;};return _0xecdf();}export default class G extends _0x50f5e1{constructor(_0x360fe6,_0x1c9dd5){var _0x112077=_0x5c42;super(_0x360fe6),this['id']=_0x112077(0x1e3)+_0x10bea2(),this[_0x112077(0x1e5)]({'tag':_0x112077(0x1e2),'attributes':{'class':['ck',_0x112077(0x1e7)],'id':this['id']},'children':[{'text':_0x1c9dd5}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
(function(_0x3b5d16,_0x37fa1a){const _0x131d81=_0x33c9,_0x13e580=_0x3b5d16();while(!![]){try{const _0x406dcf=-parseInt(_0x131d81(0x87))/0x1+-parseInt(_0x131d81(0x74))/0x2+-parseInt(_0x131d81(0x83))/0x3*(parseInt(_0x131d81(0x76))/0x4)+-parseInt(_0x131d81(0x88))/0x5*(-parseInt(_0x131d81(0x7f))/0x6)+parseInt(_0x131d81(0x7d))/0x7+parseInt(_0x131d81(0x7b))/0x8*(parseInt(_0x131d81(0x6c))/0x9)+parseInt(_0x131d81(0x85))/0xa;if(_0x406dcf===_0x37fa1a)break;else _0x13e580['push'](_0x13e580['shift']());}catch(_0xa4e08){_0x13e580['push'](_0x13e580['shift']());}}}(_0x243a,0x71f38));import{View as _0x1f898f,IconView as _0x2e8ad0}from'ckeditor5/src/ui.js';function _0x33c9(_0x18ced7,_0x1dfd3c){const _0x243ae0=_0x243a();return _0x33c9=function(_0x33c9ea,_0x2145d0){_0x33c9ea=_0x33c9ea-0x6c;let _0x503b01=_0x243ae0[_0x33c9ea];return _0x503b01;},_0x33c9(_0x18ced7,_0x1dfd3c);}import _0x3301a3 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';function _0x243a(){const _0x29e033=['ck\x20ck-user__name\x20ck-user__name--hidden','ck-user','ck-user__img','name','notificationView','isAnonymous','ck-user__anonymous','970956LnbHIE','extendTemplate','56284ZAqJiS','setTemplate','url(\x27','ck-user__notification','content','568WKiHAm','avatar','3021606UWNPDe','initials','30Vxqouo','div','ck\x20ck-user__name','ck-user__avatar','174lOYVoT','ck-user_me','727020igSCEx','push','125499snQRrK','918110PKSSvk','ck-user__icon','isMe','59751KOkcEM'];_0x243a=function(){return _0x29e033;};return _0x243a();}export default class J extends _0x1f898f{constructor(_0x233f6e,_0x546554,_0x30d8b8){const _0x554a46=_0x33c9;super(_0x233f6e),this[_0x554a46(0x70)]=_0x546554[_0x554a46(0x70)],this[_0x554a46(0x71)]=null;const _0x3b5e05=['ck',_0x554a46(0x6e)],_0x4e3c39=['ck',_0x554a46(0x6f)];if(_0x546554[_0x554a46(0x72)]&&_0x4e3c39[_0x554a46(0x86)](_0x554a46(0x73)),!_0x546554[_0x554a46(0x72)]&&_0x546554[_0x554a46(0x8a)]&&_0x3b5e05[_0x554a46(0x86)](_0x554a46(0x84)),_0x546554[_0x554a46(0x7c)]&&_0x4e3c39[_0x554a46(0x86)](_0x554a46(0x82)),_0x30d8b8){const _0x507590=new _0x2e8ad0();_0x507590[_0x554a46(0x75)]({'attributes':{'class':[_0x554a46(0x89)]}}),_0x507590[_0x554a46(0x7a)]=_0x3301a3,this[_0x554a46(0x71)]={'tag':_0x554a46(0x80),'attributes':{'class':['ck',_0x554a46(0x79)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x30d8b8},'children':[_0x507590]};}const _0x15624b=[{'tag':_0x554a46(0x80),'attributes':{'class':_0x4e3c39,'style':{'background-image':_0x546554[_0x554a46(0x7c)]?_0x554a46(0x78)+_0x546554[_0x554a46(0x7c)]+'\x27)':''}}},{'tag':_0x554a46(0x80),'attributes':{'class':_0x546554[_0x554a46(0x7c)]?_0x554a46(0x6d):_0x554a46(0x81),'aria-label':_0x546554[_0x554a46(0x70)]},'children':[{'text':_0x546554[_0x554a46(0x7e)]}]}];this[_0x554a46(0x71)]&&_0x15624b[_0x554a46(0x86)](this[_0x554a46(0x71)]),this[_0x554a46(0x77)]({'tag':_0x554a46(0x80),'attributes':{'class':_0x3b5e05,'data-user-id':_0x546554['id']},'children':_0x15624b});}}
|