@ckeditor/ckeditor5-slash-command 48.5.0-alpha.1 → 48.5.0-alpha.2

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x245b02}from'@ckeditor/ckeditor5-core';import{Mention as _0x3683c3}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x2f8916,uid as _0x4c78fa}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x2a09bc,IconBulletedList as _0x467a4e,IconCodeBlock as _0x576ec9,IconEmoji as _0x4f9cc8,IconFootnote as _0x136b2b,IconHeading1 as _0x1bf7ec,IconHeading2 as _0x492ac8,IconHeading3 as _0x329060,IconHeading4 as _0x350fc6,IconHeading5 as _0x1e889e,IconHeading6 as _0x4ed9a7,IconHorizontalLine as _0x11f863,IconHtml as _0x2738e1,IconIndent as _0x38111f,IconNumberedList as _0x567a08,IconOutdent as _0x5ae55f,IconParagraph as _0x40c227,IconPlay as _0x4a5df2,IconQuote as _0x41dd04,IconRobotPencil as _0x4dc667,IconTable as _0x11e361,IconTableOfContents as _0x19b2d6,IconTodoList as _0x2efa13}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x59db11,View as _0x17de7f}from'@ckeditor/ckeditor5-ui';var O=class extends _0x245b02{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x278d57){super(_0x278d57),this['_allowedCommands']=null;}afterInit(){const _0xdc67c2=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x30314d=function(_0x1083d2){let _0x4e425d=['heading4','heading5','heading6'];if(_0x1083d2){const _0x1feb90=_0x1083d2['map'](_0x3bf488=>_0x3bf488['model']);_0x4e425d=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x23815c=>!_0x1feb90['includes'](_0x23815c));}return _0x4e425d;}(this['editor']['config']['get']('heading.options'));let _0x3790d0=this['getDefaultCommands']()['filter'](_0x5f2829=>!_0x30314d['includes'](_0x5f2829['id']))['filter'](_0x288fe0=>!_0xdc67c2['includes'](_0x288fe0['commandName']));const _0x5e3ecc=this['editor']['config']['get']('slashCommand.extraCommands');_0x5e3ecc&&_0x5e3ecc['length']&&(_0x3790d0=_0x3790d0['concat'](_0x5e3ecc));const _0x3d6c01=this['editor']['config']['get']('template.definitions');_0x3d6c01&&_0x3d6c01['length']&&(_0x3790d0=_0x3790d0['concat'](function(_0x2a427a){return _0x2a427a['map'](_0x524347=>{const {title:_0x2d6970,icon:_0x3c3660,description:_0x4123bf,data:_0x265c88}=_0x524347,_0x60f59b={'id':P(_0x2d6970,'template'),'commandName':'insertTemplate','execute':_0x7625b3=>{_0x7625b3['execute']('insertTemplate',_0x265c88);},'description':_0x4123bf,'icon':_0x3c3660,'title':_0x2d6970};return _0x3c3660&&(_0x60f59b['isIconColorInherited']=!0x1),_0x60f59b;});}(_0x3d6c01)));const _0x3977a5=this['editor']['config']['get']('style.definitions');_0x3977a5&&_0x3977a5['length']&&(_0x3790d0=_0x3790d0['concat'](function(_0x31a694){return _0x31a694['map'](_0x21e21f=>({'id':P(_0x21e21f['name'],'style'),'commandName':'style','execute':_0x5169bb=>{_0x5169bb['execute']('style',{'styleName':_0x21e21f['name']});},'isEnabled':_0x20d0af=>{const _0x4e4273=_0x20d0af['commands']['get']('style');return _0x4e4273['isEnabled']&&_0x4e4273['enabledStyles']['includes'](_0x21e21f['name']);},'title':_0x21e21f['name']}));}(_0x3977a5)));const _0x3723e2=_0x3790d0['filter'](_0x39f4b0=>!_0x39f4b0['commandName']||void 0x0!==this['editor']['commands']['get'](_0x39f4b0['commandName'])),_0x1ab5e1=[];for(const _0x764157 of _0x3723e2)_0x1ab5e1['push']({'id':_0x764157['id'],'commandName':_0x764157['commandName'],'title':'function'==typeof _0x764157['title']?_0x764157['title'](this['editor']):_0x764157['title'],'description':_0x764157['description'],'icon':_0x764157['icon'],'isIconColorInherited':_0x764157['isIconColorInherited'],'aliases':_0x764157['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x764157),'execute':()=>this['_proxyExecute'](_0x764157)});this['_allowedCommands']=_0x1ab5e1['sort'](E),async function(_0x19e362){const _0x46a1e7='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x612e7c=0x793e0,_0x3ddbc3={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5b9062(_0x1f96c3){const _0x24517c=new window['Promise'](_0x514272=>{_0x1f96c3['once']('ready',_0x514272);}),_0x5079a3=window['Date']['now'](),_0x5ebadf=_0x1f96c3['config']['get']('licenseKey');async function _0x3ef56b(){let _0x4e6485,_0x9bbfec=null,_0x963e42=null;try{return'GPL'==_0x5ebadf?'NotAllowed':(_0x4e6485=_0x4f5d3e(),_0x4e6485?(_0x4e6485['usageEndpoint']&&(_0x963e42=_0x1df84b(_0x4e6485['usageEndpoint'],_0x4e6485['jti'])),await _0x359a0b()?_0xef57b2()?_0x26e847()?'Expired':_0x4ad9a7()?('evaluation'==_0x4e6485['licenseType']&&(_0x9bbfec=_0x1d2447('EvaluationLimit')),await _0x1ca924()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x26e847(){const _0x4255d3=['evaluation','trial']['includes'](_0x4e6485['licenseType'])?_0x5079a3/0x3e8:0xe10*_0x612e7c;return _0x4e6485['exp']<_0x4255d3;}function _0xef57b2(){const _0x18ce78=_0x4e6485['features'];return!!_0x18ce78&&(!!_0x18ce78['includes']('*')||(!!_0x18ce78['includes']('SC')||(!!_0x18ce78['includes']('PP')||!(!_0x18ce78['includes']('TRILIUM')||!_0x429008()))));}function _0x4ad9a7(){const _0x3d9312=_0x4e6485['licensedHosts'];if(!_0x3d9312||0x0==_0x3d9312['length'])return!0x0;const {hostname:_0x52f029}=new URL(window['location']['href']);if(_0x3d9312['includes'](_0x52f029))return!0x0;const _0x479136=_0x52f029['split']('.');return _0x3d9312['filter'](_0x3b9de6=>_0x3b9de6['includes']('*'))['map'](_0xcbd64a=>_0xcbd64a['split']('.'))['filter'](_0x37bd25=>_0x37bd25['length']<=_0x479136['length'])['map'](_0x49dbe1=>Array(_0x479136['length']-_0x49dbe1['length'])['fill']('*'===_0x49dbe1[0x0]?'*':'')['concat'](_0x49dbe1))['some'](_0x2ec2ba=>_0x479136['every']((_0x3eb3c6,_0x1a0b60)=>_0x2ec2ba[_0x1a0b60]===_0x3eb3c6||'*'===_0x2ec2ba[_0x1a0b60]));}function _0x1ca924(){return _0x9bbfec&&_0x963e42?new window['Promise']((_0x4a65a9,_0xeddfcc)=>{_0x9bbfec['then'](_0x4a65a9,_0xeddfcc),_0x963e42['then'](_0x4121b6=>{'Valid'!=_0x4121b6&&_0x4a65a9(_0x4121b6);},_0xeddfcc);}):_0x9bbfec||_0x963e42||'Valid';}}function _0x1df84b(_0x15cb42,_0x515a53){return new window['Promise'](_0x186a58=>{if(_0x46a40e())return _0x186a58('Valid');_0x1095c5(),_0x1f96c3['decorate']('_sendUsageRequest');let _0x387483=!0x1;const _0x11b660=_0x4c78fa();function _0x5eaac2(_0x1aca76){return!!_0x1aca76&&('object'==typeof _0x1aca76||'function'==typeof _0x1aca76)&&'function'==typeof _0x1aca76['then']&&'function'==typeof _0x1aca76['catch'];}function _0x5a04bd(_0x32f3b1){_0x5f054f(_0x32f3b1)['then'](_0x10b003=>_0x10b003&&'ok'==_0x10b003['status']?_0x12ff92(_0x503239(_0x11b660+_0x515a53))!=_0x10b003['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x33dc4f=>(_0x57b8ef(),_0x33dc4f),()=>{const _0x40628d=_0x38074b();return null==_0x40628d?(_0x57b8ef(),'Valid'):_0x5079a3-_0x40628d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x186a58)['catch'](()=>{_0x186a58('UsageLimit');});const _0x20993a=0x36ee80;function _0x57b8ef(){const _0x541f88='llct-'+_0x12ff92(_0x503239(_0x15cb42)),_0x2b3dff=_0x2f58c9(_0x12ff92(window['Math']['ceil'](_0x5079a3/_0x20993a)));window['localStorage']['setItem'](_0x541f88,_0x2b3dff);}function _0x38074b(){const _0x1bcbd0='llct-'+_0x12ff92(_0x503239(_0x15cb42)),_0x363011=window['localStorage']['getItem'](_0x1bcbd0);return _0x363011?window['parseInt'](_0x2f58c9(_0x363011),0x10)*_0x20993a:null;}function _0x5f054f(_0x131f45){return new window['Promise']((_0x4a8ad8,_0x1d54d3)=>{_0x131f45['then'](_0x4a8ad8,_0x1d54d3),window['setTimeout'](_0x1d54d3,0x1d4c0);});}}_0x1f96c3['on']('_sendUsageRequest',(_0x3d13e8,_0x289c72)=>{if(_0x289c72[0x0]!=_0x15cb42)return _0x186a58('UsageLimit');_0x289c72[0x1]={..._0x289c72[0x1],'requestId':_0x11b660};},{'priority':'high'}),_0x1f96c3['on']('_sendUsageRequest',_0x26650b=>{_0x5eaac2(_0x26650b['return'])&&(_0x387483=!0x0,_0x5a04bd(_0x26650b['return']));},{'priority':'low'}),_0x24517c['then'](()=>{_0x387483||_0x186a58('UsageLimit');});});function _0x46a40e(){return'auto'==_0x1f96c3['editing']['view']['_overlayModeHint'];}function _0x1095c5(){_0x1f96c3['editing']['view']['_overlayModeHint']='auto';}}function _0x1d2447(_0x5d80b5){const _0x559eaa=[new window['Promise'](_0x225f7f=>setTimeout(_0x225f7f,0x93ecc)),_0x24517c['then'](()=>new window['Promise'](_0x577373=>{let _0x25d9a7=0x0;_0x1f96c3['model']['on']('applyOperation',(_0x477b21,_0x182a45)=>{_0x182a45[0x0]['isDocumentOperation']&&_0x25d9a7++,0x5e8==_0x25d9a7&&(_0x577373(),_0x477b21['off']());});}))];return window['Promise']['race'](_0x559eaa)['then'](()=>_0x5d80b5);}async function _0x1d975b(){await _0x24517c,_0x1f96c3['model']['change']=_0xafca34,_0x1f96c3['model']['enqueueChange']=_0xafca34,_0x1f96c3['enableReadOnlyMode']('model');}function _0x429008(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5d00d4(_0x26f265){const _0x4aa0d2=_0x3609d9();_0x1f96c3[_0x4aa0d2]='slashCommandLicenseKey'+_0x26f265,'Valid'!=_0x26f265&&_0x1d975b();}function _0x3609d9(){const _0x5496a4=window['String'](window['performance']['now']())['replace']('.','');let _0x3c3182='g';for(let _0x27ba6c=0x0;_0x27ba6c<_0x5496a4['length'];_0x27ba6c+=0x2){let _0xce6b6d=window['parseInt'](_0x5496a4['substring'](_0x27ba6c,_0x27ba6c+0x2));_0xce6b6d>=0x3e&&(_0xce6b6d-=0x3e),_0x3c3182+=_0x46a1e7[_0xce6b6d];}return _0x3c3182;}function _0x4f5d3e(){const _0x13d912=_0x5ebadf['split']('.');if(0x3!=_0x13d912['length'])return null;return _0x2fd4eb(_0x13d912[0x1]);function _0x2fd4eb(_0x263637){const _0x23b769=_0x33c9fc(_0x263637);return _0x23b769&&_0x15c5fc()?_0x23b769:null;function _0x15c5fc(){const _0x373b3a=_0x23b769['jti'],_0x2b1448=window['parseInt'](_0x373b3a['substring'](_0x373b3a['length']-0x8),0x10),_0x3389cb={..._0x23b769,'jti':_0x373b3a['substring'](0x0,_0x373b3a['length']-0x8)};return delete _0x3389cb['vc'],_0x503239(_0x3389cb)==_0x2b1448;}}}async function _0x359a0b(){let _0x35dfdc=!0x0;try{const [_0x13c56e,_0x55ccbc,_0x3ba1b5]=_0x5ebadf['split']('.');return _0x5cd532(_0x13c56e),await _0xbe37e(_0x13c56e,_0x55ccbc,_0x3ba1b5),_0x35dfdc;}catch{return!0x1;}function _0x5cd532(_0x42f2a5){const _0x5bb3cc=_0x33c9fc(_0x42f2a5);_0x5bb3cc&&'ES256'==_0x5bb3cc['alg']||(_0x35dfdc=!0x1);}async function _0xbe37e(_0x224ff6,_0x106367,_0x4c043e){const _0x2a181b=window['Uint8Array']['from'](_0x126f96(_0x4c043e),_0x4f51e4=>_0x4f51e4['charCodeAt'](0x0)),_0x138c56=new window['TextEncoder']()['encode'](_0x224ff6+'.'+_0x106367),_0x426e37=window['crypto']['subtle'];if(!_0x426e37)return;const _0x4fbd34=await _0x426e37['importKey']('jwk',_0x3ddbc3,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x426e37['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4fbd34,_0x2a181b,_0x138c56)||(_0x35dfdc=!0x1);}}function _0x33c9fc(_0x1b06a8){return _0x1b06a8['startsWith']('ey')?JSON['parse'](_0x126f96(_0x1b06a8)):null;}function _0x126f96(_0x2da18b){return window['atob'](_0x2da18b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x503239(_0x28a841){let _0x498cf6=0x1505;function _0x14e3b1(_0x4bf7f9){for(let _0x1c9226=0x0;_0x1c9226<_0x4bf7f9['length'];_0x1c9226++){const _0x4c4ac0=_0x4bf7f9['charCodeAt'](_0x1c9226);_0x498cf6=(_0x498cf6<<0x5)+_0x498cf6+_0x4c4ac0,_0x498cf6&=_0x498cf6;}}function _0x1c5e03(_0x1ab06b){Array['isArray'](_0x1ab06b)?_0x1ab06b['forEach'](_0x1c5e03):_0x1ab06b&&'object'==typeof _0x1ab06b?Object['entries'](_0x1ab06b)['sort']()['forEach'](([_0x188b51,_0x450a22])=>{_0x14e3b1(_0x188b51),_0x1c5e03(_0x450a22);}):_0x14e3b1(window['String'](_0x1ab06b));}return _0x1c5e03(_0x28a841),_0x498cf6>>>0x0;}function _0x12ff92(_0x11cc06){return _0x11cc06['toString'](0x10)['padStart'](0x8,'0');}function _0x2f58c9(_0x382af4){return _0x382af4['split']('')['reverse']()['join']('');}function _0xafca34(){}_0x5d00d4(await _0x3ef56b());}_0x5b9062(_0x19e362['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x9ab789=_0x25451e=>function(_0x5a2225,_0x2e45d4){const t=_0x5a2225['t'],_0x3b556e=_0x5a2225['t'];switch(_0x2e45d4){case'AI\x20Assistant':return _0x3b556e('AI\x20Assistant');case'Block\x20quote':return _0x3b556e('Block\x20quote');case'Bulleted\x20List':return _0x3b556e('Bulleted\x20List');case'Insert\x20code\x20block':return _0x3b556e('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x3b556e('Open\x20file\x20manager');case'Insert\x20image':return _0x3b556e('Insert\x20image');case'Heading\x201':return _0x3b556e('Heading\x201');case'Heading\x202':return _0x3b556e('Heading\x202');case'Heading\x203':return _0x3b556e('Heading\x203');case'Heading\x204':return _0x3b556e('Heading\x204');case'Heading\x205':return _0x3b556e('Heading\x205');case'Heading\x206':return _0x3b556e('Heading\x206');case'Horizontal\x20line':return _0x3b556e('Horizontal\x20line');case'Insert\x20HTML':return _0x3b556e('Insert\x20HTML');case'Increase\x20indent':return _0x3b556e('Increase\x20indent');case'Insert\x20table':return _0x3b556e('Insert\x20table');case'Table\x20of\x20contents':return _0x3b556e('Table\x20of\x20contents');case'Numbered\x20List':return _0x3b556e('Numbered\x20List');case'Decrease\x20indent':return _0x3b556e('Decrease\x20indent');case'Paragraph':return _0x3b556e('Paragraph');case'To-do\x20List':return _0x3b556e('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0x2e45d4;}}(this['editor']['locale'],_0x25451e);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x4dc667,'title':_0x9ab789('AI\x20Assistant'),'description':_0x9ab789('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x48d348=>{setTimeout(()=>_0x48d348['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x41dd04,'title':_0x9ab789('Block\x20quote'),'description':_0x9ab789('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x467a4e,'title':_0x9ab789('Bulleted\x20List'),'description':_0x9ab789('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x576ec9,'title':_0x9ab789('Insert\x20code\x20block'),'description':_0x9ab789('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x2a09bc,'title':_0x9ab789('Open\x20file\x20manager'),'description':_0x9ab789('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x2a09bc,'title':_0x9ab789('Insert\x20image'),'description':_0x9ab789('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x4f9cc8,'title':_0x9ab789('Emoji'),'description':_0x9ab789('Insert\x20an\x20emoji'),'execute':_0x1fb166=>{setTimeout(()=>_0x1fb166['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x1bf7ec,'title':_0x9ab789('Heading\x201'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x201'),'execute':_0x55f8f8=>{_0x55f8f8['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x492ac8,'title':_0x9ab789('Heading\x202'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x202'),'execute':_0x261bff=>{_0x261bff['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x329060,'title':_0x9ab789('Heading\x203'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x203'),'execute':_0x395f14=>{_0x395f14['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x350fc6,'title':_0x9ab789('Heading\x204'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x204'),'execute':_0x5d3d73=>{_0x5d3d73['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x1e889e,'title':_0x9ab789('Heading\x205'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x205'),'execute':_0x22ca90=>{_0x22ca90['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x4ed9a7,'title':_0x9ab789('Heading\x206'),'description':_0x9ab789('Create\x20a\x20heading\x20level\x206'),'execute':_0x3bcc36=>{_0x3bcc36['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x11f863,'title':_0x9ab789('Horizontal\x20line'),'description':_0x9ab789('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x2738e1,'title':_0x9ab789('Insert\x20HTML'),'description':_0x9ab789('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x38111f,'title':_0x9ab789('Increase\x20indent'),'description':_0x9ab789('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x9ab789('Insert\x20Mermaid\x20diagram'),'description':_0x9ab789('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x11e361,'title':_0x9ab789('Insert\x20table'),'description':_0x9ab789('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x19b2d6,'title':_0x9ab789('Table\x20of\x20contents'),'description':_0x9ab789('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x567a08,'title':_0x9ab789('Numbered\x20List'),'description':_0x9ab789('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x5ae55f,'title':_0x9ab789('Decrease\x20indent'),'description':_0x9ab789('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x40c227,'title':_0x9ab789('Paragraph'),'description':_0x9ab789('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x2efa13,'title':_0x9ab789('To-do\x20List'),'description':_0x9ab789('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x136b2b,'title':_0x9ab789('Footnote'),'description':_0x9ab789('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x347db2){return _0x347db2['isEnabled']?_0x347db2['isEnabled'](this['editor']):!_0x347db2['commandName']||this['editor']['commands']['get'](_0x347db2['commandName'])['isEnabled'];}_proxyExecute(_0x1fad0b){if(_0x1fad0b['execute'])_0x1fad0b['execute'](this['editor']);else{if(!_0x1fad0b['commandName'])throw new _0x2f8916('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x1fad0b});this['editor']['execute'](_0x1fad0b['commandName']);}}};function E(_0x3aa7f0,_0x44b927){return _0x3aa7f0['title']<_0x44b927['title']?-0x1:_0x3aa7f0['title']>_0x44b927['title']?0x1:0x0;}function P(_0x46a317,_0x735ae1){return _0x735ae1+'-'+_0x46a317['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x245b02{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x2d4c72){const _0x169fbc=_0x2d4c72&&_0x2d4c72['toLowerCase']();let _0x5a1024=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x5a1024=_0x5a1024['filter'](_0x222b2f=>_0x222b2f['isEnabled']()),_0x169fbc){const _0x3890c5=[],_0x434852=[],_0x28b3e9=[],_0x41dfe2=[];for(const _0x36a241 of _0x5a1024)_0x36a241['id']['toLowerCase']()['includes'](_0x169fbc)?_0x3890c5['push'](_0x36a241):_0x36a241['title']['toLowerCase']()['includes'](_0x169fbc)?_0x434852['push'](_0x36a241):_0x36a241['aliases']&&_0x36a241['aliases']['some'](_0x35384c=>_0x35384c['toLowerCase']()['includes'](_0x169fbc))?_0x28b3e9['push'](_0x36a241):_0x36a241['description']&&_0x36a241['description']['toLowerCase']()['includes'](_0x169fbc)&&_0x41dfe2['push'](_0x36a241);_0x5a1024=_0x3890c5['concat'](_0x434852,_0x28b3e9,_0x41dfe2);}return _0x5a1024;}},M=class extends _0x59db11{constructor(_0x4b6fd4,_0x19e7de){super(_0x4b6fd4),this['textPartView']=this['_createTextPartView'](_0x4b6fd4,_0x19e7de),void 0x0!==_0x19e7de['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x19e7de['isIconColorInherited']),this['set']({'icon':_0x19e7de['icon']||_0x4a5df2,'withText':!0x0,'label':_0x19e7de['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0x3b337a,_0x14adeb){const _0x4fd357=new _0x17de7f(_0x3b337a);return _0x4fd357['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x14adeb['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x14adeb['description']}]}]:[this['labelView']]}),_0x4fd357;}},S=class extends _0x245b02{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1dd022){super(_0x1dd022),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x19cfea=[this['editor']];for(const _0x86b8ed of _0x19cfea){let _0x13e352;for(const _0x1d3376 in _0x86b8ed){const _0x171677=_0x1d3376,_0x5a0101=_0x86b8ed[_0x171677];if('slashCommandLicenseKeyValid'==_0x5a0101||'slashCommandLicenseKeyInvalid'==_0x5a0101||'slashCommandLicenseKeyExpired'==_0x5a0101||'slashCommandLicenseKeyDomainLimit'==_0x5a0101||'slashCommandLicenseKeyNotAllowed'==_0x5a0101||'slashCommandLicenseKeyEvaluationLimit'==_0x5a0101||'slashCommandLicenseKeyUsageLimit'==_0x5a0101){delete _0x86b8ed[_0x171677],_0x13e352=_0x5a0101,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x13e352&&_0x86b8ed['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x13e352&&_0x86b8ed['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x13e352&&_0x86b8ed['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x13e352&&_0x86b8ed['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x13e352&&_0x86b8ed['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x13e352&&_0x86b8ed['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x5aa35a=this['editor'],_0x19d2a9=this['editor']['plugins']['get']('SlashCommandEditing'),_0x2ea0b8=_0x5aa35a['config']['get']('mention.feeds');_0x2ea0b8['push']({'marker':'/','feed':_0x5bc89a=>_0x19d2a9['getMatchingCommands'](_0x5bc89a),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x5aa35a['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x5aa35a['config']['set']('mention.feeds',_0x2ea0b8);}_overrideMentionExecuteListener(){const _0x3ebea4=this['editor'];_0x3ebea4['commands']['get']('mention')['on']('execute',(_0x539816,_0x4c3141)=>{const _0x7afa16=_0x4c3141[0x0],_0x486611=_0x3ebea4['model'];'/'===_0x7afa16['marker']&&_0x486611['change'](_0x19adb5=>{_0x19adb5['remove'](_0x7afa16['range']),_0x7afa16['mention']['execute'](),_0x539816['stop']();});},{'priority':'high'});}_customItemRenderer(_0x25b71d){const _0x535d7e=this['editor']['locale'],_0x122490=new M(_0x535d7e,_0x25b71d);return _0x122490['render'](),_0x122490['element'];}},D=class extends _0x245b02{static get requires(){return[_0x3683c3,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
23
+ import{Plugin as _0x553b63}from'@ckeditor/ckeditor5-core';import{Mention as _0x1e5c9c}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x5e5a2d,uid as _0x223b7f}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x3c3481,IconBulletedList as _0x3b4929,IconCodeBlock as _0x155dc5,IconEmoji as _0x229948,IconFootnote as _0x15bff2,IconHeading1 as _0x244b81,IconHeading2 as _0x3ae8cd,IconHeading3 as _0x1a9c31,IconHeading4 as _0x2fa503,IconHeading5 as _0x3a1bbb,IconHeading6 as _0x355805,IconHorizontalLine as _0x582eb1,IconHtml as _0x3e8655,IconIndent as _0x17123d,IconNumberedList as _0x36e2e9,IconOutdent as _0x239c45,IconParagraph as _0x12d509,IconPlay as _0x23b89e,IconQuote as _0x9b414c,IconRobotPencil as _0x4a523a,IconTable as _0x440bfc,IconTableOfContents as _0x3738b5,IconTodoList as _0x43e8a3}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x322601,View as _0x46a449}from'@ckeditor/ckeditor5-ui';var O=class extends _0x553b63{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x90256f){super(_0x90256f),this['_allowedCommands']=null;}afterInit(){const _0x5a6512=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x18153a=function(_0x53fa39){let _0x181c4d=['heading4','heading5','heading6'];if(_0x53fa39){const _0x25bba2=_0x53fa39['map'](_0x482a62=>_0x482a62['model']);_0x181c4d=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x32d73c=>!_0x25bba2['includes'](_0x32d73c));}return _0x181c4d;}(this['editor']['config']['get']('heading.options'));let _0x1cf971=this['getDefaultCommands']()['filter'](_0x342fe9=>!_0x18153a['includes'](_0x342fe9['id']))['filter'](_0x4f5779=>!_0x5a6512['includes'](_0x4f5779['commandName']));const _0x2131e9=this['editor']['config']['get']('slashCommand.extraCommands');_0x2131e9&&_0x2131e9['length']&&(_0x1cf971=_0x1cf971['concat'](_0x2131e9));const _0x2c3d35=this['editor']['config']['get']('template.definitions');_0x2c3d35&&_0x2c3d35['length']&&(_0x1cf971=_0x1cf971['concat'](function(_0x1e2620){return _0x1e2620['map'](_0x1706e5=>{const {title:_0x584e31,icon:_0x5a9a6c,description:_0x33e6f9,data:_0x172a62}=_0x1706e5,_0x335176={'id':P(_0x584e31,'template'),'commandName':'insertTemplate','execute':_0xff7692=>{_0xff7692['execute']('insertTemplate',_0x172a62);},'description':_0x33e6f9,'icon':_0x5a9a6c,'title':_0x584e31};return _0x5a9a6c&&(_0x335176['isIconColorInherited']=!0x1),_0x335176;});}(_0x2c3d35)));const _0x18ec33=this['editor']['config']['get']('style.definitions');_0x18ec33&&_0x18ec33['length']&&(_0x1cf971=_0x1cf971['concat'](function(_0x574668){return _0x574668['map'](_0x31cf63=>({'id':P(_0x31cf63['name'],'style'),'commandName':'style','execute':_0x276df9=>{_0x276df9['execute']('style',{'styleName':_0x31cf63['name']});},'isEnabled':_0x10db79=>{const _0x1844e8=_0x10db79['commands']['get']('style');return _0x1844e8['isEnabled']&&_0x1844e8['enabledStyles']['includes'](_0x31cf63['name']);},'title':_0x31cf63['name']}));}(_0x18ec33)));const _0x39fadd=_0x1cf971['filter'](_0x3b4af2=>!_0x3b4af2['commandName']||void 0x0!==this['editor']['commands']['get'](_0x3b4af2['commandName'])),_0x5cd610=[];for(const _0xdd1a8d of _0x39fadd)_0x5cd610['push']({'id':_0xdd1a8d['id'],'commandName':_0xdd1a8d['commandName'],'title':'function'==typeof _0xdd1a8d['title']?_0xdd1a8d['title'](this['editor']):_0xdd1a8d['title'],'description':_0xdd1a8d['description'],'icon':_0xdd1a8d['icon'],'isIconColorInherited':_0xdd1a8d['isIconColorInherited'],'aliases':_0xdd1a8d['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0xdd1a8d),'execute':()=>this['_proxyExecute'](_0xdd1a8d)});this['_allowedCommands']=_0x5cd610['sort'](E),async function(_0x1b9149){const _0x4855c4='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x5cdcb4=0x793f8,_0xdd894b={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x3ecfc9(_0x3d9fc8){const _0x5c0694=new window['Promise'](_0x21d779=>{_0x3d9fc8['once']('ready',_0x21d779);}),_0xbb7de3=window['Date']['now'](),_0x5ee150=_0x3d9fc8['config']['get']('licenseKey');async function _0x527576(){let _0x32c039,_0x3456fd=null,_0x213f30=null;try{return'GPL'==_0x5ee150?'NotAllowed':(_0x32c039=_0x30aaca(),_0x32c039?(_0x32c039['usageEndpoint']&&(_0x213f30=_0x53d4cd(_0x32c039['usageEndpoint'],_0x32c039['jti'])),await _0xf6803f()?_0x1b2a8b()?_0x42dda9()?'Expired':_0x5e9a4f()?('evaluation'==_0x32c039['licenseType']&&(_0x3456fd=_0x341689('EvaluationLimit')),await _0xe00fc4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x42dda9(){const _0x22e4a2=['evaluation','trial']['includes'](_0x32c039['licenseType'])?_0xbb7de3/0x3e8:0xe10*_0x5cdcb4;return _0x32c039['exp']<_0x22e4a2;}function _0x1b2a8b(){const _0x12f2cc=_0x32c039['features'];return!!_0x12f2cc&&(!!_0x12f2cc['includes']('*')||(!!_0x12f2cc['includes']('SC')||(!!_0x12f2cc['includes']('PP')||!(!_0x12f2cc['includes']('TRILIUM')||!_0x468c14()))));}function _0x5e9a4f(){const _0x1292e8=_0x32c039['licensedHosts'];if(!_0x1292e8||0x0==_0x1292e8['length'])return!0x0;const {hostname:_0x55a353}=new URL(window['location']['href']);if(_0x1292e8['includes'](_0x55a353))return!0x0;const _0x51210d=_0x55a353['split']('.');return _0x1292e8['filter'](_0xc3ee3=>_0xc3ee3['includes']('*'))['map'](_0x581f75=>_0x581f75['split']('.'))['filter'](_0x5e25fd=>_0x5e25fd['length']<=_0x51210d['length'])['map'](_0x111b09=>Array(_0x51210d['length']-_0x111b09['length'])['fill']('*'===_0x111b09[0x0]?'*':'')['concat'](_0x111b09))['some'](_0x500ea9=>_0x51210d['every']((_0x11a5fa,_0x449ea9)=>_0x500ea9[_0x449ea9]===_0x11a5fa||'*'===_0x500ea9[_0x449ea9]));}function _0xe00fc4(){return _0x3456fd&&_0x213f30?new window['Promise']((_0x4af68d,_0x2bdb56)=>{_0x3456fd['then'](_0x4af68d,_0x2bdb56),_0x213f30['then'](_0x3145b5=>{'Valid'!=_0x3145b5&&_0x4af68d(_0x3145b5);},_0x2bdb56);}):_0x3456fd||_0x213f30||'Valid';}}function _0x53d4cd(_0x1cdabe,_0x473256){return new window['Promise'](_0xcbbd2d=>{if(_0x3c81c8())return _0xcbbd2d('Valid');_0x259aef(),_0x3d9fc8['decorate']('_sendUsageRequest');let _0x5d98b9=!0x1;const _0x3e95ec=_0x223b7f();function _0x42374f(_0x6c87ac){return!!_0x6c87ac&&('object'==typeof _0x6c87ac||'function'==typeof _0x6c87ac)&&'function'==typeof _0x6c87ac['then']&&'function'==typeof _0x6c87ac['catch'];}function _0x47c4a4(_0x8e5c3a){_0x333da5(_0x8e5c3a)['then'](_0x5d6b8c=>_0x5d6b8c&&'ok'==_0x5d6b8c['status']?_0x37c4b4(_0x8667a5(_0x3e95ec+_0x473256))!=_0x5d6b8c['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x55a803=>(_0x89ebc3(),_0x55a803),()=>{const _0x34aa7b=_0x3db0e1();return null==_0x34aa7b?(_0x89ebc3(),'Valid'):_0xbb7de3-_0x34aa7b>0x240c8400?'UsageLimit':'Valid';})['then'](_0xcbbd2d)['catch'](()=>{_0xcbbd2d('UsageLimit');});const _0x4570ca=0x36ee80;function _0x89ebc3(){const _0x1720b9='llct-'+_0x37c4b4(_0x8667a5(_0x1cdabe)),_0x197edd=_0x1d804d(_0x37c4b4(window['Math']['ceil'](_0xbb7de3/_0x4570ca)));window['localStorage']['setItem'](_0x1720b9,_0x197edd);}function _0x3db0e1(){const _0x10d5b2='llct-'+_0x37c4b4(_0x8667a5(_0x1cdabe)),_0x1ebe9b=window['localStorage']['getItem'](_0x10d5b2);return _0x1ebe9b?window['parseInt'](_0x1d804d(_0x1ebe9b),0x10)*_0x4570ca:null;}function _0x333da5(_0x179ad2){return new window['Promise']((_0x4c239a,_0x1886d9)=>{_0x179ad2['then'](_0x4c239a,_0x1886d9),window['setTimeout'](_0x1886d9,0x1d4c0);});}}_0x3d9fc8['on']('_sendUsageRequest',(_0xb27d50,_0x269945)=>{if(_0x269945[0x0]!=_0x1cdabe)return _0xcbbd2d('UsageLimit');_0x269945[0x1]={..._0x269945[0x1],'requestId':_0x3e95ec};},{'priority':'high'}),_0x3d9fc8['on']('_sendUsageRequest',_0x379fb0=>{_0x42374f(_0x379fb0['return'])&&(_0x5d98b9=!0x0,_0x47c4a4(_0x379fb0['return']));},{'priority':'low'}),_0x5c0694['then'](()=>{_0x5d98b9||_0xcbbd2d('UsageLimit');});});function _0x3c81c8(){return'auto'==_0x3d9fc8['editing']['view']['_overlayModeHint'];}function _0x259aef(){_0x3d9fc8['editing']['view']['_overlayModeHint']='auto';}}function _0x341689(_0x5604fa){const _0x8df7d5=[new window['Promise'](_0x1d246c=>setTimeout(_0x1d246c,0x93ecc)),_0x5c0694['then'](()=>new window['Promise'](_0x2b46fe=>{let _0x30445e=0x0;_0x3d9fc8['model']['on']('applyOperation',(_0x1ca0fc,_0x3551bf)=>{_0x3551bf[0x0]['isDocumentOperation']&&_0x30445e++,0x5e8==_0x30445e&&(_0x2b46fe(),_0x1ca0fc['off']());});}))];return window['Promise']['race'](_0x8df7d5)['then'](()=>_0x5604fa);}async function _0x281714(){await _0x5c0694,_0x3d9fc8['model']['change']=_0x13abfb,_0x3d9fc8['model']['enqueueChange']=_0x13abfb,_0x3d9fc8['enableReadOnlyMode']('model');}function _0x468c14(){return window['glob']&&window['glob']['triliumVersion'];}function _0x37b30a(_0x433012){const _0x5c443f=_0x31ad47();_0x3d9fc8[_0x5c443f]='slashCommandLicenseKey'+_0x433012,'Valid'!=_0x433012&&_0x281714();}function _0x31ad47(){const _0x9afefb=window['String'](window['performance']['now']())['replace']('.','');let _0x2cdbb8='g';for(let _0x51c44f=0x0;_0x51c44f<_0x9afefb['length'];_0x51c44f+=0x2){let _0x12a973=window['parseInt'](_0x9afefb['substring'](_0x51c44f,_0x51c44f+0x2));_0x12a973>=0x3e&&(_0x12a973-=0x3e),_0x2cdbb8+=_0x4855c4[_0x12a973];}return _0x2cdbb8;}function _0x30aaca(){const _0x336150=_0x5ee150['split']('.');if(0x3!=_0x336150['length'])return null;return _0x1d532f(_0x336150[0x1]);function _0x1d532f(_0x2198f2){const _0x5c8da8=_0x3e09b3(_0x2198f2);return _0x5c8da8&&_0x44433d()?_0x5c8da8:null;function _0x44433d(){const _0x515ce2=_0x5c8da8['jti'],_0xf10da=window['parseInt'](_0x515ce2['substring'](_0x515ce2['length']-0x8),0x10),_0x169ba9={..._0x5c8da8,'jti':_0x515ce2['substring'](0x0,_0x515ce2['length']-0x8)};return delete _0x169ba9['vc'],_0x8667a5(_0x169ba9)==_0xf10da;}}}async function _0xf6803f(){let _0x22dd9b=!0x0;try{const [_0x204e0b,_0x11e57e,_0x3141c5]=_0x5ee150['split']('.');return _0x157fc0(_0x204e0b),await _0xb7171b(_0x204e0b,_0x11e57e,_0x3141c5),_0x22dd9b;}catch{return!0x1;}function _0x157fc0(_0x37a3a5){const _0x3fceb1=_0x3e09b3(_0x37a3a5);_0x3fceb1&&'ES256'==_0x3fceb1['alg']||(_0x22dd9b=!0x1);}async function _0xb7171b(_0x232c6d,_0x10df26,_0xf4181){const _0x4db029=window['Uint8Array']['from'](_0x5d5b87(_0xf4181),_0x1452c8=>_0x1452c8['charCodeAt'](0x0)),_0x5ec1c6=new window['TextEncoder']()['encode'](_0x232c6d+'.'+_0x10df26),_0x77d4cb=window['crypto']['subtle'];if(!_0x77d4cb)return;const _0x13a94e=await _0x77d4cb['importKey']('jwk',_0xdd894b,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x77d4cb['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x13a94e,_0x4db029,_0x5ec1c6)||(_0x22dd9b=!0x1);}}function _0x3e09b3(_0x2c54e3){return _0x2c54e3['startsWith']('ey')?JSON['parse'](_0x5d5b87(_0x2c54e3)):null;}function _0x5d5b87(_0xf90371){return window['atob'](_0xf90371['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x8667a5(_0x2c63cf){let _0xba01e0=0x1505;function _0x1499bd(_0x3c9809){for(let _0x2974c9=0x0;_0x2974c9<_0x3c9809['length'];_0x2974c9++){const _0x49ee55=_0x3c9809['charCodeAt'](_0x2974c9);_0xba01e0=(_0xba01e0<<0x5)+_0xba01e0+_0x49ee55,_0xba01e0&=_0xba01e0;}}function _0x26ed46(_0x3354c5){Array['isArray'](_0x3354c5)?_0x3354c5['forEach'](_0x26ed46):_0x3354c5&&'object'==typeof _0x3354c5?Object['entries'](_0x3354c5)['sort']()['forEach'](([_0x428c89,_0x58758b])=>{_0x1499bd(_0x428c89),_0x26ed46(_0x58758b);}):_0x1499bd(window['String'](_0x3354c5));}return _0x26ed46(_0x2c63cf),_0xba01e0>>>0x0;}function _0x37c4b4(_0x521b66){return _0x521b66['toString'](0x10)['padStart'](0x8,'0');}function _0x1d804d(_0x340583){return _0x340583['split']('')['reverse']()['join']('');}function _0x13abfb(){}_0x37b30a(await _0x527576());}_0x3ecfc9(_0x1b9149['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x2d44b3=_0x515ea8=>function(_0x594f53,_0x5a47c4){const t=_0x594f53['t'],_0x3513bd=_0x594f53['t'];switch(_0x5a47c4){case'AI\x20Assistant':return _0x3513bd('AI\x20Assistant');case'Block\x20quote':return _0x3513bd('Block\x20quote');case'Bulleted\x20List':return _0x3513bd('Bulleted\x20List');case'Insert\x20code\x20block':return _0x3513bd('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x3513bd('Open\x20file\x20manager');case'Insert\x20image':return _0x3513bd('Insert\x20image');case'Heading\x201':return _0x3513bd('Heading\x201');case'Heading\x202':return _0x3513bd('Heading\x202');case'Heading\x203':return _0x3513bd('Heading\x203');case'Heading\x204':return _0x3513bd('Heading\x204');case'Heading\x205':return _0x3513bd('Heading\x205');case'Heading\x206':return _0x3513bd('Heading\x206');case'Horizontal\x20line':return _0x3513bd('Horizontal\x20line');case'Insert\x20HTML':return _0x3513bd('Insert\x20HTML');case'Increase\x20indent':return _0x3513bd('Increase\x20indent');case'Insert\x20table':return _0x3513bd('Insert\x20table');case'Table\x20of\x20contents':return _0x3513bd('Table\x20of\x20contents');case'Numbered\x20List':return _0x3513bd('Numbered\x20List');case'Decrease\x20indent':return _0x3513bd('Decrease\x20indent');case'Paragraph':return _0x3513bd('Paragraph');case'To-do\x20List':return _0x3513bd('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0x5a47c4;}}(this['editor']['locale'],_0x515ea8);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x4a523a,'title':_0x2d44b3('AI\x20Assistant'),'description':_0x2d44b3('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x239123=>{setTimeout(()=>_0x239123['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x9b414c,'title':_0x2d44b3('Block\x20quote'),'description':_0x2d44b3('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x3b4929,'title':_0x2d44b3('Bulleted\x20List'),'description':_0x2d44b3('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x155dc5,'title':_0x2d44b3('Insert\x20code\x20block'),'description':_0x2d44b3('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x3c3481,'title':_0x2d44b3('Open\x20file\x20manager'),'description':_0x2d44b3('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x3c3481,'title':_0x2d44b3('Insert\x20image'),'description':_0x2d44b3('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x229948,'title':_0x2d44b3('Emoji'),'description':_0x2d44b3('Insert\x20an\x20emoji'),'execute':_0x26f37c=>{setTimeout(()=>_0x26f37c['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x244b81,'title':_0x2d44b3('Heading\x201'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x201'),'execute':_0x113aa3=>{_0x113aa3['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x3ae8cd,'title':_0x2d44b3('Heading\x202'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x202'),'execute':_0x4854a9=>{_0x4854a9['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x1a9c31,'title':_0x2d44b3('Heading\x203'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x203'),'execute':_0x478daf=>{_0x478daf['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x2fa503,'title':_0x2d44b3('Heading\x204'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x204'),'execute':_0x50db1a=>{_0x50db1a['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x3a1bbb,'title':_0x2d44b3('Heading\x205'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x205'),'execute':_0x1f008f=>{_0x1f008f['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x355805,'title':_0x2d44b3('Heading\x206'),'description':_0x2d44b3('Create\x20a\x20heading\x20level\x206'),'execute':_0x21ec30=>{_0x21ec30['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x582eb1,'title':_0x2d44b3('Horizontal\x20line'),'description':_0x2d44b3('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x3e8655,'title':_0x2d44b3('Insert\x20HTML'),'description':_0x2d44b3('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x17123d,'title':_0x2d44b3('Increase\x20indent'),'description':_0x2d44b3('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x2d44b3('Insert\x20Mermaid\x20diagram'),'description':_0x2d44b3('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x440bfc,'title':_0x2d44b3('Insert\x20table'),'description':_0x2d44b3('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x3738b5,'title':_0x2d44b3('Table\x20of\x20contents'),'description':_0x2d44b3('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x36e2e9,'title':_0x2d44b3('Numbered\x20List'),'description':_0x2d44b3('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x239c45,'title':_0x2d44b3('Decrease\x20indent'),'description':_0x2d44b3('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x12d509,'title':_0x2d44b3('Paragraph'),'description':_0x2d44b3('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x43e8a3,'title':_0x2d44b3('To-do\x20List'),'description':_0x2d44b3('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x15bff2,'title':_0x2d44b3('Footnote'),'description':_0x2d44b3('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x3ebf1a){return _0x3ebf1a['isEnabled']?_0x3ebf1a['isEnabled'](this['editor']):!_0x3ebf1a['commandName']||this['editor']['commands']['get'](_0x3ebf1a['commandName'])['isEnabled'];}_proxyExecute(_0xee97c){if(_0xee97c['execute'])_0xee97c['execute'](this['editor']);else{if(!_0xee97c['commandName'])throw new _0x5e5a2d('slash-command-execute-missing',this['editor'],{'commandDefinition':_0xee97c});this['editor']['execute'](_0xee97c['commandName']);}}};function E(_0x2c3930,_0x1c75bf){return _0x2c3930['title']<_0x1c75bf['title']?-0x1:_0x2c3930['title']>_0x1c75bf['title']?0x1:0x0;}function P(_0x20a584,_0x3d050b){return _0x3d050b+'-'+_0x20a584['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x553b63{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x4a29ad){const _0x296584=_0x4a29ad&&_0x4a29ad['toLowerCase']();let _0x3fd15a=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x3fd15a=_0x3fd15a['filter'](_0x5b5c86=>_0x5b5c86['isEnabled']()),_0x296584){const _0x5e0967=[],_0x473b48=[],_0x5e0d61=[],_0x59d50f=[];for(const _0x24579a of _0x3fd15a)_0x24579a['id']['toLowerCase']()['includes'](_0x296584)?_0x5e0967['push'](_0x24579a):_0x24579a['title']['toLowerCase']()['includes'](_0x296584)?_0x473b48['push'](_0x24579a):_0x24579a['aliases']&&_0x24579a['aliases']['some'](_0x33d80a=>_0x33d80a['toLowerCase']()['includes'](_0x296584))?_0x5e0d61['push'](_0x24579a):_0x24579a['description']&&_0x24579a['description']['toLowerCase']()['includes'](_0x296584)&&_0x59d50f['push'](_0x24579a);_0x3fd15a=_0x5e0967['concat'](_0x473b48,_0x5e0d61,_0x59d50f);}return _0x3fd15a;}},M=class extends _0x322601{constructor(_0x2f553a,_0x2061c0){super(_0x2f553a),this['textPartView']=this['_createTextPartView'](_0x2f553a,_0x2061c0),void 0x0!==_0x2061c0['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x2061c0['isIconColorInherited']),this['set']({'icon':_0x2061c0['icon']||_0x23b89e,'withText':!0x0,'label':_0x2061c0['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0x2a36d6,_0x13f8c0){const _0x436f57=new _0x46a449(_0x2a36d6);return _0x436f57['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x13f8c0['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x13f8c0['description']}]}]:[this['labelView']]}),_0x436f57;}},S=class extends _0x553b63{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x269daf){super(_0x269daf),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x7cd321=[this['editor']];for(const _0x73cb88 of _0x7cd321){let _0x5358e4;for(const _0x418360 in _0x73cb88){const _0x1b570e=_0x418360,_0x2a9212=_0x73cb88[_0x1b570e];if('slashCommandLicenseKeyValid'==_0x2a9212||'slashCommandLicenseKeyInvalid'==_0x2a9212||'slashCommandLicenseKeyExpired'==_0x2a9212||'slashCommandLicenseKeyDomainLimit'==_0x2a9212||'slashCommandLicenseKeyNotAllowed'==_0x2a9212||'slashCommandLicenseKeyEvaluationLimit'==_0x2a9212||'slashCommandLicenseKeyUsageLimit'==_0x2a9212){delete _0x73cb88[_0x1b570e],_0x5358e4=_0x2a9212,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x5358e4&&_0x73cb88['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x5358e4&&_0x73cb88['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x5358e4&&_0x73cb88['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x5358e4&&_0x73cb88['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x5358e4&&_0x73cb88['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x5358e4&&_0x73cb88['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x95b7a0=this['editor'],_0x56e8b6=this['editor']['plugins']['get']('SlashCommandEditing'),_0x133a91=_0x95b7a0['config']['get']('mention.feeds');_0x133a91['push']({'marker':'/','feed':_0x40674b=>_0x56e8b6['getMatchingCommands'](_0x40674b),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x95b7a0['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x95b7a0['config']['set']('mention.feeds',_0x133a91);}_overrideMentionExecuteListener(){const _0x8c540a=this['editor'];_0x8c540a['commands']['get']('mention')['on']('execute',(_0x2fc480,_0x24f21a)=>{const _0x1f45ee=_0x24f21a[0x0],_0xe92922=_0x8c540a['model'];'/'===_0x1f45ee['marker']&&_0xe92922['change'](_0xad80c5=>{_0xad80c5['remove'](_0x1f45ee['range']),_0x1f45ee['mention']['execute'](),_0x2fc480['stop']();});},{'priority':'high'});}_customItemRenderer(_0x1723fd){const _0x594e98=this['editor']['locale'],_0x13d197=new M(_0x594e98,_0x1723fd);return _0x13d197['render'](),_0x13d197['element'];}},D=class extends _0x553b63{static get requires(){return[_0x1e5c9c,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-slash-command",
3
- "version": "48.5.0-alpha.1",
3
+ "version": "48.5.0-alpha.2",
4
4
  "description": "Slash command feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -21,14 +21,14 @@
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "dependencies": {
24
- "@ckeditor/ckeditor5-core": "48.5.0-alpha.1",
25
- "@ckeditor/ckeditor5-heading": "48.5.0-alpha.1",
26
- "@ckeditor/ckeditor5-icons": "48.5.0-alpha.1",
27
- "@ckeditor/ckeditor5-mention": "48.5.0-alpha.1",
28
- "@ckeditor/ckeditor5-style": "48.5.0-alpha.1",
29
- "@ckeditor/ckeditor5-template": "48.5.0-alpha.1",
30
- "@ckeditor/ckeditor5-ui": "48.5.0-alpha.1",
31
- "@ckeditor/ckeditor5-utils": "48.5.0-alpha.1"
24
+ "@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
25
+ "@ckeditor/ckeditor5-heading": "48.5.0-alpha.2",
26
+ "@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
27
+ "@ckeditor/ckeditor5-mention": "48.5.0-alpha.2",
28
+ "@ckeditor/ckeditor5-style": "48.5.0-alpha.2",
29
+ "@ckeditor/ckeditor5-template": "48.5.0-alpha.2",
30
+ "@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
31
+ "@ckeditor/ckeditor5-utils": "48.5.0-alpha.2"
32
32
  },
33
33
  "files": [
34
34
  "dist",