@ckeditor/ckeditor5-slash-command 48.3.0-alpha.4 → 48.3.0-alpha.6
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 +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x821801}from'@ckeditor/ckeditor5-core';import{Mention as _0x131817}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x5d8a7d,uid as _0x42f15f}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0xa935c2,IconBulletedList as _0x14a54e,IconCodeBlock as _0xfb0adf,IconEmoji as _0x12251e,IconFootnote as _0x409cfe,IconHeading1 as _0x4d7761,IconHeading2 as _0x2c0d50,IconHeading3 as _0x221c32,IconHeading4 as _0x3d61cb,IconHeading5 as _0x58290d,IconHeading6 as _0x48d4aa,IconHorizontalLine as _0x1cc15c,IconHtml as _0x257afd,IconIndent as _0x1be1b7,IconNumberedList as _0x2db1ee,IconOutdent as _0x3ae335,IconParagraph as _0x73ceeb,IconPlay as _0x3afa21,IconQuote as _0x4a4418,IconRobotPencil as _0x1f292c,IconTable as _0x14cccd,IconTableOfContents as _0x3f8628,IconTodoList as _0x5834d2}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x35a918,View as _0x1caaea}from'@ckeditor/ckeditor5-ui';var O=class extends _0x821801{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56791){super(_0x56791),this['_allowedCommands']=null;}['afterInit'](){const _0x932dbf=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x59d7ca=function(_0x10838f){let _0x2cb402=['heading4','heading5','heading6'];if(_0x10838f){const _0x5b16c5=_0x10838f['map'](_0x4e24d1=>_0x4e24d1['model']);_0x2cb402=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x66b6b8=>!_0x5b16c5['includes'](_0x66b6b8));}return _0x2cb402;}(this['editor']['config']['get']('heading.options'));let _0x39fe54=this['getDefaultCommands']()['filter'](_0x200705=>!_0x59d7ca['includes'](_0x200705['id']))['filter'](_0x3b6354=>!_0x932dbf['includes'](_0x3b6354['commandName']));const _0x48a13c=this['editor']['config']['get']('slashCommand.extraCommands');_0x48a13c&&_0x48a13c['length']&&(_0x39fe54=_0x39fe54['concat'](_0x48a13c));const _0x42cb82=this['editor']['config']['get']('template.definitions');_0x42cb82&&_0x42cb82['length']&&(_0x39fe54=_0x39fe54['concat'](function(_0x190d97){return _0x190d97['map'](_0x33f05d=>{const {title:_0x98c10,icon:_0x12dcc1,description:_0xc439a5,data:_0x447f4a}=_0x33f05d,_0x54716e={'id':P(_0x98c10,'template'),'commandName':'insertTemplate','execute':_0x326de5=>{_0x326de5['execute']('insertTemplate',_0x447f4a);},'description':_0xc439a5,'icon':_0x12dcc1,'title':_0x98c10};return _0x12dcc1&&(_0x54716e['isIconColorInherited']=!0x1),_0x54716e;});}(_0x42cb82)));const _0x5db2a5=this['editor']['config']['get']('style.definitions');_0x5db2a5&&_0x5db2a5['length']&&(_0x39fe54=_0x39fe54['concat'](function(_0x1aab08){return _0x1aab08['map'](_0x3b6d75=>({'id':P(_0x3b6d75['name'],'style'),'commandName':'style','execute':_0x3662ee=>{_0x3662ee['execute']('style',{'styleName':_0x3b6d75['name']});},'isEnabled':_0x60a8a6=>{const _0x3f16fd=_0x60a8a6['commands']['get']('style');return _0x3f16fd['isEnabled']&&_0x3f16fd['enabledStyles']['includes'](_0x3b6d75['name']);},'title':_0x3b6d75['name']}));}(_0x5db2a5)));const _0x50fb8a=_0x39fe54['filter'](_0x40e622=>!_0x40e622['commandName']||void 0x0!==this['editor']['commands']['get'](_0x40e622['commandName'])),_0x2719c1=[];for(const _0xc7be62 of _0x50fb8a)_0x2719c1['push']({'id':_0xc7be62['id'],'commandName':_0xc7be62['commandName'],'title':'function'==typeof _0xc7be62['title']?_0xc7be62['title'](this['editor']):_0xc7be62['title'],'description':_0xc7be62['description'],'icon':_0xc7be62['icon'],'isIconColorInherited':_0xc7be62['isIconColorInherited'],'aliases':_0xc7be62['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0xc7be62),'execute':()=>this['_proxyExecute'](_0xc7be62)});this['_allowedCommands']=_0x2719c1['sort'](E),async function(_0x5bcc58){const _0x1b8b77='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x263951=0x78e28,_0x594a26=window['Date']['now'](),_0x39da98=_0x5bcc58['editor'],_0x536a72=new window['Promise'](_0x260145=>{_0x39da98['once']('ready',_0x260145);}),_0x30b695={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x56e4bf=_0x39da98['config']['get']('licenseKey');async function _0x28bbd0(){let _0x526740,_0x42222a=null,_0x2ff84a=null;try{return'GPL'==_0x56e4bf?'NotAllowed':(_0x526740=_0x212768(),_0x526740?(_0x526740['usageEndpoint']&&(_0x2ff84a=_0x4cc44b(_0x526740['usageEndpoint'],_0x526740['jti'])),await _0x11e908()?_0x41ff12()?_0x184305()?'Expired':_0x1e661d()?('evaluation'==_0x526740['licenseType']&&(_0x42222a=_0x199a1e('EvaluationLimit')),await _0x5b0950()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x184305(){const _0x569021=['evaluation','trial']['includes'](_0x526740['licenseType'])?_0x594a26/0x3e8:0xe10*_0x263951;return _0x526740['exp']<_0x569021;}function _0x41ff12(){const _0x43e43f=_0x526740['features'];return!!_0x43e43f&&(!!_0x43e43f['includes']('*')||(!!_0x43e43f['includes']('SC')||(!!_0x43e43f['includes']('PP')||!(!_0x43e43f['includes']('TRILIUM')||!_0x191d5b()))));}function _0x1e661d(){const _0x224fba=_0x526740['licensedHosts'];if(!_0x224fba||0x0==_0x224fba['length'])return!0x0;const {hostname:_0x5b4471}=new URL(window['location']['href']);if(_0x224fba['includes'](_0x5b4471))return!0x0;const _0x489e25=_0x5b4471['split']('.');return _0x224fba['filter'](_0x5e121e=>_0x5e121e['includes']('*'))['map'](_0x10bb42=>_0x10bb42['split']('.'))['filter'](_0x542a85=>_0x542a85['length']<=_0x489e25['length'])['map'](_0x460a4c=>Array(_0x489e25['length']-_0x460a4c['length'])['fill']('*'===_0x460a4c[0x0]?'*':'')['concat'](_0x460a4c))['some'](_0x28d6ba=>_0x489e25['every']((_0x2815eb,_0x49a69e)=>_0x28d6ba[_0x49a69e]===_0x2815eb||'*'===_0x28d6ba[_0x49a69e]));}function _0x5b0950(){return _0x42222a&&_0x2ff84a?new window['Promise']((_0x23d1fe,_0x3247a4)=>{_0x42222a['then'](_0x23d1fe,_0x3247a4),_0x2ff84a['then'](_0x11b99e=>{'Valid'!=_0x11b99e&&_0x23d1fe(_0x11b99e);},_0x3247a4);}):_0x42222a||_0x2ff84a||'Valid';}}function _0x4cc44b(_0x2ad97a,_0x456f4f){return new window['Promise'](_0x243067=>{if(_0x1554e9())return _0x243067('Valid');_0x51533c(),_0x39da98['decorate']('_sendUsageRequest');let _0x386658=!0x1;const _0x4dba38=_0x42f15f();function _0x349587(_0x4f62fd){return!!_0x4f62fd&&('object'==typeof _0x4f62fd||'function'==typeof _0x4f62fd)&&'function'==typeof _0x4f62fd['then']&&'function'==typeof _0x4f62fd['catch'];}function _0x5da34c(_0x47e066){_0xa0fe3c(_0x47e066)['then'](_0x308ce3=>_0x308ce3&&'ok'==_0x308ce3['status']?_0x274d7c(_0x1a2f6c(_0x4dba38+_0x456f4f))!=_0x308ce3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1ac795=>(_0x7a6cc1(),_0x1ac795),()=>{const _0x247521=_0x23ec20();return null==_0x247521?(_0x7a6cc1(),'Valid'):_0x594a26-_0x247521>0x240c8400?'UsageLimit':'Valid';})['then'](_0x243067)['catch'](()=>{_0x243067('UsageLimit');});const _0x124a43=0x36ee80;function _0x7a6cc1(){const _0x1899ae='llct-'+_0x274d7c(_0x1a2f6c(_0x2ad97a)),_0xa0e9a0=_0xdeab0e(_0x274d7c(window['Math']['ceil'](_0x594a26/_0x124a43)));window['localStorage']['setItem'](_0x1899ae,_0xa0e9a0);}function _0x23ec20(){const _0x425c82='llct-'+_0x274d7c(_0x1a2f6c(_0x2ad97a)),_0x2f1f7c=window['localStorage']['getItem'](_0x425c82);return _0x2f1f7c?window['parseInt'](_0xdeab0e(_0x2f1f7c),0x10)*_0x124a43:null;}function _0xa0fe3c(_0x268021){return new window['Promise']((_0x303879,_0x2b08a3)=>{_0x268021['then'](_0x303879,_0x2b08a3),window['setTimeout'](_0x2b08a3,0x1d4c0);});}}_0x39da98['on']('_sendUsageRequest',(_0x390384,_0x551b1e)=>{if(_0x551b1e[0x0]!=_0x2ad97a)return _0x243067('UsageLimit');_0x551b1e[0x1]={..._0x551b1e[0x1],'requestId':_0x4dba38};},{'priority':'high'}),_0x39da98['on']('_sendUsageRequest',_0x255a14=>{_0x349587(_0x255a14['return'])&&(_0x386658=!0x0,_0x5da34c(_0x255a14['return']));},{'priority':'low'}),_0x536a72['then'](()=>{_0x386658||_0x243067('UsageLimit');});});function _0x1554e9(){return'auto'==_0x39da98['editing']['view']['_overlayModeHint'];}function _0x51533c(){_0x39da98['editing']['view']['_overlayModeHint']='auto';}}function _0x199a1e(_0x46289){const _0x8e460f=[new window['Promise'](_0x27e9dd=>setTimeout(_0x27e9dd,0x93ecc)),_0x536a72['then'](()=>new window['Promise'](_0x27fb68=>{let _0x3ff7ff=0x0;_0x39da98['model']['on']('applyOperation',(_0x18e710,_0x353288)=>{_0x353288[0x0]['isDocumentOperation']&&_0x3ff7ff++,0x5e8==_0x3ff7ff&&(_0x27fb68(),_0x18e710['off']());});}))];return window['Promise']['race'](_0x8e460f)['then'](()=>_0x46289);}async function _0x5d71c9(){await _0x536a72,_0x39da98['model']['change']=_0x152f47,_0x39da98['model']['enqueueChange']=_0x152f47,_0x39da98['enableReadOnlyMode']('model');}function _0x191d5b(){return window['glob']&&window['glob']['triliumVersion'];}function _0xdac77b(_0x4b39cd){const _0x166236=_0x43bfce();_0x39da98[_0x166236]='slashCommandLicenseKey'+_0x4b39cd,'Valid'!=_0x4b39cd&&_0x5d71c9();}function _0x43bfce(){const _0x3f75d5=window['String'](window['performance']['now']())['replace']('.','');let _0x5f55b4='u';for(let _0x1aab39=0x0;_0x1aab39<_0x3f75d5['length'];_0x1aab39+=0x2){let _0x342ee9=window['parseInt'](_0x3f75d5['substring'](_0x1aab39,_0x1aab39+0x2));_0x342ee9>=0x3e&&(_0x342ee9-=0x3e),_0x5f55b4+=_0x1b8b77[_0x342ee9];}return _0x5f55b4;}function _0x212768(){const _0x3616fc=_0x56e4bf['split']('.');if(0x3!=_0x3616fc['length'])return null;return _0x3d29da(_0x3616fc[0x1]);function _0x3d29da(_0x2f49fa){const _0x5a8e5b=_0x5d06d6(_0x2f49fa);return _0x5a8e5b&&_0x3642a1()?_0x5a8e5b:null;function _0x3642a1(){const _0x2a05ac=_0x5a8e5b['jti'],_0x289da6=window['parseInt'](_0x2a05ac['substring'](_0x2a05ac['length']-0x8),0x10),_0x21812d={..._0x5a8e5b,'jti':_0x2a05ac['substring'](0x0,_0x2a05ac['length']-0x8)};return delete _0x21812d['vc'],_0x1a2f6c(_0x21812d)==_0x289da6;}}}async function _0x11e908(){let _0x461554=!0x0;try{const [_0x2f72e2,_0x4168c0,_0x206652]=_0x56e4bf['split']('.');return _0x5467bc(_0x2f72e2),await _0x2d498b(_0x2f72e2,_0x4168c0,_0x206652),_0x461554;}catch{return!0x1;}function _0x5467bc(_0xe499fd){const _0x29faad=_0x5d06d6(_0xe499fd);_0x29faad&&'ES256'==_0x29faad['alg']||(_0x461554=!0x1);}async function _0x2d498b(_0x2a15e2,_0x527475,_0x3af41d){const _0x39420c=window['Uint8Array']['from'](_0x23962e(_0x3af41d),_0x43b59d=>_0x43b59d['charCodeAt'](0x0)),_0x391c67=new window['TextEncoder']()['encode'](_0x2a15e2+'.'+_0x527475),_0x355808=window['crypto']['subtle'];if(!_0x355808)return;const _0x41ec1c=await _0x355808['importKey']('jwk',_0x30b695,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x355808['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x41ec1c,_0x39420c,_0x391c67)||(_0x461554=!0x1);}}function _0x5d06d6(_0x5a6a52){return _0x5a6a52['startsWith']('ey')?JSON['parse'](_0x23962e(_0x5a6a52)):null;}function _0x23962e(_0x44af7a){return window['atob'](_0x44af7a['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1a2f6c(_0x418726){let _0x208fba=0x1505;function _0x36bd4c(_0x3aa0a8){for(let _0xf3d0ed=0x0;_0xf3d0ed<_0x3aa0a8['length'];_0xf3d0ed++){const _0x4b9bbb=_0x3aa0a8['charCodeAt'](_0xf3d0ed);_0x208fba=(_0x208fba<<0x5)+_0x208fba+_0x4b9bbb,_0x208fba&=_0x208fba;}}function _0x4d63cd(_0x38bdf3){Array['isArray'](_0x38bdf3)?_0x38bdf3['forEach'](_0x4d63cd):_0x38bdf3&&'object'==typeof _0x38bdf3?Object['entries'](_0x38bdf3)['sort']()['forEach'](([_0x4bc5dd,_0x7fbf8d])=>{_0x36bd4c(_0x4bc5dd),_0x4d63cd(_0x7fbf8d);}):_0x36bd4c(window['String'](_0x38bdf3));}return _0x4d63cd(_0x418726),_0x208fba>>>0x0;}function _0x274d7c(_0x3527d5){return _0x3527d5['toString'](0x10)['padStart'](0x8,'0');}function _0xdeab0e(_0x47df3a){return _0x47df3a['split']('')['reverse']()['join']('');}function _0x152f47(){}_0xdac77b(await _0x28bbd0());}(this);}['getAllowedCommands'](){return this['_allowedCommands'];}['getDefaultCommands'](){const _0x8da11=_0x501507=>function(_0x28bed0,_0x2de496){const t=_0x28bed0['t'],_0x31c128=_0x28bed0['t'];switch(_0x2de496){case'AI\x20Assistant':return _0x31c128('AI\x20Assistant');case'Block\x20quote':return _0x31c128('Block\x20quote');case'Bulleted\x20List':return _0x31c128('Bulleted\x20List');case'Insert\x20code\x20block':return _0x31c128('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x31c128('Open\x20file\x20manager');case'Insert\x20image':return _0x31c128('Insert\x20image');case'Heading\x201':return _0x31c128('Heading\x201');case'Heading\x202':return _0x31c128('Heading\x202');case'Heading\x203':return _0x31c128('Heading\x203');case'Heading\x204':return _0x31c128('Heading\x204');case'Heading\x205':return _0x31c128('Heading\x205');case'Heading\x206':return _0x31c128('Heading\x206');case'Horizontal\x20line':return _0x31c128('Horizontal\x20line');case'Insert\x20HTML':return _0x31c128('Insert\x20HTML');case'Increase\x20indent':return _0x31c128('Increase\x20indent');case'Insert\x20table':return _0x31c128('Insert\x20table');case'Table\x20of\x20contents':return _0x31c128('Table\x20of\x20contents');case'Numbered\x20List':return _0x31c128('Numbered\x20List');case'Decrease\x20indent':return _0x31c128('Decrease\x20indent');case'Paragraph':return _0x31c128('Paragraph');case'To-do\x20List':return _0x31c128('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 _0x2de496;}}(this['editor']['locale'],_0x501507);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x1f292c,'title':_0x8da11('AI\x20Assistant'),'description':_0x8da11('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x3841e1=>{setTimeout(()=>_0x3841e1['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x4a4418,'title':_0x8da11('Block\x20quote'),'description':_0x8da11('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x14a54e,'title':_0x8da11('Bulleted\x20List'),'description':_0x8da11('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0xfb0adf,'title':_0x8da11('Insert\x20code\x20block'),'description':_0x8da11('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0xa935c2,'title':_0x8da11('Open\x20file\x20manager'),'description':_0x8da11('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0xa935c2,'title':_0x8da11('Insert\x20image'),'description':_0x8da11('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x12251e,'title':_0x8da11('Emoji'),'description':_0x8da11('Insert\x20an\x20emoji'),'execute':_0x2c78ac=>{setTimeout(()=>_0x2c78ac['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x4d7761,'title':_0x8da11('Heading\x201'),'description':_0x8da11('Create\x20a\x20heading\x20level\x201'),'execute':_0x51863a=>{_0x51863a['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x2c0d50,'title':_0x8da11('Heading\x202'),'description':_0x8da11('Create\x20a\x20heading\x20level\x202'),'execute':_0x5db520=>{_0x5db520['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x221c32,'title':_0x8da11('Heading\x203'),'description':_0x8da11('Create\x20a\x20heading\x20level\x203'),'execute':_0xf12103=>{_0xf12103['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x3d61cb,'title':_0x8da11('Heading\x204'),'description':_0x8da11('Create\x20a\x20heading\x20level\x204'),'execute':_0x1018dd=>{_0x1018dd['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x58290d,'title':_0x8da11('Heading\x205'),'description':_0x8da11('Create\x20a\x20heading\x20level\x205'),'execute':_0x58eaac=>{_0x58eaac['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x48d4aa,'title':_0x8da11('Heading\x206'),'description':_0x8da11('Create\x20a\x20heading\x20level\x206'),'execute':_0x47c0dd=>{_0x47c0dd['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x1cc15c,'title':_0x8da11('Horizontal\x20line'),'description':_0x8da11('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x257afd,'title':_0x8da11('Insert\x20HTML'),'description':_0x8da11('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x1be1b7,'title':_0x8da11('Increase\x20indent'),'description':_0x8da11('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x8da11('Insert\x20Mermaid\x20diagram'),'description':_0x8da11('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x14cccd,'title':_0x8da11('Insert\x20table'),'description':_0x8da11('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x3f8628,'title':_0x8da11('Table\x20of\x20contents'),'description':_0x8da11('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x2db1ee,'title':_0x8da11('Numbered\x20List'),'description':_0x8da11('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x3ae335,'title':_0x8da11('Decrease\x20indent'),'description':_0x8da11('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x73ceeb,'title':_0x8da11('Paragraph'),'description':_0x8da11('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x5834d2,'title':_0x8da11('To-do\x20List'),'description':_0x8da11('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x409cfe,'title':_0x8da11('Footnote'),'description':_0x8da11('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x101f3e){return _0x101f3e['isEnabled']?_0x101f3e['isEnabled'](this['editor']):!_0x101f3e['commandName']||this['editor']['commands']['get'](_0x101f3e['commandName'])['isEnabled'];}['_proxyExecute'](_0x2d150a){if(_0x2d150a['execute'])_0x2d150a['execute'](this['editor']);else{if(!_0x2d150a['commandName'])throw new _0x5d8a7d('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x2d150a});this['editor']['execute'](_0x2d150a['commandName']);}}};function E(_0x186d57,_0x459e34){return _0x186d57['title']<_0x459e34['title']?-0x1:_0x186d57['title']>_0x459e34['title']?0x1:0x0;}function P(_0x39a237,_0x1697d1){return _0x1697d1+'-'+_0x39a237['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x821801{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[O];}['getMatchingCommands'](_0x2f6022){const _0x162932=_0x2f6022&&_0x2f6022['toLowerCase']();let _0x1bcb06=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x1bcb06=_0x1bcb06['filter'](_0x368100=>_0x368100['isEnabled']()),_0x162932){const _0x3af674=[],_0x41e34a=[],_0x372fb6=[],_0xc9c01b=[];for(const _0x44fb84 of _0x1bcb06)_0x44fb84['id']['toLowerCase']()['includes'](_0x162932)?_0x3af674['push'](_0x44fb84):_0x44fb84['title']['toLowerCase']()['includes'](_0x162932)?_0x41e34a['push'](_0x44fb84):_0x44fb84['aliases']&&_0x44fb84['aliases']['some'](_0x13ec55=>_0x13ec55['toLowerCase']()['includes'](_0x162932))?_0x372fb6['push'](_0x44fb84):_0x44fb84['description']&&_0x44fb84['description']['toLowerCase']()['includes'](_0x162932)&&_0xc9c01b['push'](_0x44fb84);_0x1bcb06=_0x3af674['concat'](_0x41e34a,_0x372fb6,_0xc9c01b);}return _0x1bcb06;}},M=class extends _0x35a918{constructor(_0x223adc,_0x2a39b8){super(_0x223adc),this['textPartView']=this['_createTextPartView'](_0x223adc,_0x2a39b8),void 0x0!==_0x2a39b8['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x2a39b8['isIconColorInherited']),this['set']({'icon':_0x2a39b8['icon']||_0x3afa21,'withText':!0x0,'label':_0x2a39b8['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}['_createTextPartView'](_0x1bf6c7,_0x5817c7){const _0x425362=new _0x1caaea(_0x1bf6c7);return _0x425362['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x5817c7['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x5817c7['description']}]}]:[this['labelView']]}),_0x425362;}},S=class extends _0x821801{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8043c3){super(_0x8043c3),this['_setupMentionConfiguration']();}['init'](){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x50547a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x14e49f;for(const _0x3e3b45 in _0x50547a){const _0x110392=_0x3e3b45,_0x3561b9=_0x50547a[_0x110392];if('slashCommandLicenseKeyValid'==_0x3561b9||'slashCommandLicenseKeyInvalid'==_0x3561b9||'slashCommandLicenseKeyExpired'==_0x3561b9||'slashCommandLicenseKeyDomainLimit'==_0x3561b9||'slashCommandLicenseKeyNotAllowed'==_0x3561b9||'slashCommandLicenseKeyEvaluationLimit'==_0x3561b9||'slashCommandLicenseKeyUsageLimit'==_0x3561b9){delete _0x50547a[_0x110392],_0x14e49f=_0x3561b9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x14e49f&&_0x50547a['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x14e49f&&_0x50547a['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x14e49f&&_0x50547a['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x14e49f&&_0x50547a['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x14e49f&&_0x50547a['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x14e49f&&_0x50547a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_setupMentionConfiguration'](){const _0x1879de=this['editor'],_0x30bf5b=this['editor']['plugins']['get']('SlashCommandEditing'),_0x15ade8=_0x1879de['config']['get']('mention.feeds');_0x15ade8['push']({'marker':'/','feed':_0x35670d=>_0x30bf5b['getMatchingCommands'](_0x35670d),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x1879de['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x1879de['config']['set']('mention.feeds',_0x15ade8);}['_overrideMentionExecuteListener'](){const _0x3a5401=this['editor'];_0x3a5401['commands']['get']('mention')['on']('execute',(_0x3986ee,_0x1ceae1)=>{const _0x1b9d74=_0x1ceae1[0x0],_0x5ae106=_0x3a5401['model'];'/'===_0x1b9d74['marker']&&_0x5ae106['change'](_0x3e1bc4=>{_0x3e1bc4['remove'](_0x1b9d74['range']),_0x1b9d74['mention']['execute'](),_0x3986ee['stop']();});},{'priority':'high'});}['_customItemRenderer'](_0x260cf0){const _0x3753c0=this['editor']['locale'],_0x50d15b=new M(_0x3753c0,_0x260cf0);return _0x50d15b['render'](),_0x50d15b['element'];}},D=class extends _0x821801{static get['requires'](){return[_0x131817,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 _0x5d37ef}from'@ckeditor/ckeditor5-core';import{Mention as _0x445721}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x1024da,uid as _0x49f517}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x5406f8,IconBulletedList as _0xf2684a,IconCodeBlock as _0x248464,IconEmoji as _0x463b6e,IconFootnote as _0x3ea027,IconHeading1 as _0x361c64,IconHeading2 as _0x12f8b9,IconHeading3 as _0x55686d,IconHeading4 as _0xc544f,IconHeading5 as _0x4abf76,IconHeading6 as _0x6cb51c,IconHorizontalLine as _0x2218e9,IconHtml as _0x31acd6,IconIndent as _0x50a356,IconNumberedList as _0x50a1f1,IconOutdent as _0x572f4d,IconParagraph as _0x1f0edb,IconPlay as _0xc3a532,IconQuote as _0x7b3cf9,IconRobotPencil as _0x559a62,IconTable as _0x4a5cff,IconTableOfContents as _0x57ef8b,IconTodoList as _0x197f5d}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x2f13d7,View as _0x4bfb0a}from'@ckeditor/ckeditor5-ui';var O=class extends _0x5d37ef{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x264b1e){super(_0x264b1e),this['_allowedCommands']=null;}['afterInit'](){const _0x49f6da=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x3b5b31=function(_0x48693b){let _0x397ce2=['heading4','heading5','heading6'];if(_0x48693b){const _0x5dac55=_0x48693b['map'](_0x18d550=>_0x18d550['model']);_0x397ce2=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x23f65a=>!_0x5dac55['includes'](_0x23f65a));}return _0x397ce2;}(this['editor']['config']['get']('heading.options'));let _0x5828f8=this['getDefaultCommands']()['filter'](_0x21cee1=>!_0x3b5b31['includes'](_0x21cee1['id']))['filter'](_0x4c53b0=>!_0x49f6da['includes'](_0x4c53b0['commandName']));const _0x3facd3=this['editor']['config']['get']('slashCommand.extraCommands');_0x3facd3&&_0x3facd3['length']&&(_0x5828f8=_0x5828f8['concat'](_0x3facd3));const _0x5da76b=this['editor']['config']['get']('template.definitions');_0x5da76b&&_0x5da76b['length']&&(_0x5828f8=_0x5828f8['concat'](function(_0x5ccc37){return _0x5ccc37['map'](_0x1afafa=>{const {title:_0x5b30b5,icon:_0x199649,description:_0x183276,data:_0x3e93b1}=_0x1afafa,_0x312bc2={'id':P(_0x5b30b5,'template'),'commandName':'insertTemplate','execute':_0x3d0d81=>{_0x3d0d81['execute']('insertTemplate',_0x3e93b1);},'description':_0x183276,'icon':_0x199649,'title':_0x5b30b5};return _0x199649&&(_0x312bc2['isIconColorInherited']=!0x1),_0x312bc2;});}(_0x5da76b)));const _0x383b09=this['editor']['config']['get']('style.definitions');_0x383b09&&_0x383b09['length']&&(_0x5828f8=_0x5828f8['concat'](function(_0x5c224d){return _0x5c224d['map'](_0x49aa98=>({'id':P(_0x49aa98['name'],'style'),'commandName':'style','execute':_0x1dac57=>{_0x1dac57['execute']('style',{'styleName':_0x49aa98['name']});},'isEnabled':_0x35c6a8=>{const _0x4358ef=_0x35c6a8['commands']['get']('style');return _0x4358ef['isEnabled']&&_0x4358ef['enabledStyles']['includes'](_0x49aa98['name']);},'title':_0x49aa98['name']}));}(_0x383b09)));const _0x3dab68=_0x5828f8['filter'](_0xdf17e6=>!_0xdf17e6['commandName']||void 0x0!==this['editor']['commands']['get'](_0xdf17e6['commandName'])),_0x1fe43d=[];for(const _0xbf0250 of _0x3dab68)_0x1fe43d['push']({'id':_0xbf0250['id'],'commandName':_0xbf0250['commandName'],'title':'function'==typeof _0xbf0250['title']?_0xbf0250['title'](this['editor']):_0xbf0250['title'],'description':_0xbf0250['description'],'icon':_0xbf0250['icon'],'isIconColorInherited':_0xbf0250['isIconColorInherited'],'aliases':_0xbf0250['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0xbf0250),'execute':()=>this['_proxyExecute'](_0xbf0250)});this['_allowedCommands']=_0x1fe43d['sort'](E),async function(_0x3eb51f){const _0x467d25='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x928c8b=0x78e58,_0x6f3170=window['Date']['now'](),_0x6ffc8=_0x3eb51f['editor'],_0x2cb632=new window['Promise'](_0x5e0928=>{_0x6ffc8['once']('ready',_0x5e0928);}),_0x429171={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0xb02902=_0x6ffc8['config']['get']('licenseKey');async function _0x475b83(){let _0x1cbc87,_0x1ee595=null,_0x11b4b5=null;try{return'GPL'==_0xb02902?'NotAllowed':(_0x1cbc87=_0xae8d42(),_0x1cbc87?(_0x1cbc87['usageEndpoint']&&(_0x11b4b5=_0x1ba777(_0x1cbc87['usageEndpoint'],_0x1cbc87['jti'])),await _0x49a043()?_0x3721ed()?_0x2a1194()?'Expired':_0x30747e()?('evaluation'==_0x1cbc87['licenseType']&&(_0x1ee595=_0x51e22e('EvaluationLimit')),await _0xb60e61()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2a1194(){const _0x273f52=['evaluation','trial']['includes'](_0x1cbc87['licenseType'])?_0x6f3170/0x3e8:0xe10*_0x928c8b;return _0x1cbc87['exp']<_0x273f52;}function _0x3721ed(){const _0x28e503=_0x1cbc87['features'];return!!_0x28e503&&(!!_0x28e503['includes']('*')||(!!_0x28e503['includes']('SC')||(!!_0x28e503['includes']('PP')||!(!_0x28e503['includes']('TRILIUM')||!_0x3e53c9()))));}function _0x30747e(){const _0x2753f7=_0x1cbc87['licensedHosts'];if(!_0x2753f7||0x0==_0x2753f7['length'])return!0x0;const {hostname:_0x24fbdb}=new URL(window['location']['href']);if(_0x2753f7['includes'](_0x24fbdb))return!0x0;const _0x27cd5d=_0x24fbdb['split']('.');return _0x2753f7['filter'](_0x46dd4a=>_0x46dd4a['includes']('*'))['map'](_0x2771ba=>_0x2771ba['split']('.'))['filter'](_0x292f7d=>_0x292f7d['length']<=_0x27cd5d['length'])['map'](_0x40dba3=>Array(_0x27cd5d['length']-_0x40dba3['length'])['fill']('*'===_0x40dba3[0x0]?'*':'')['concat'](_0x40dba3))['some'](_0x3108f2=>_0x27cd5d['every']((_0x4cbe23,_0xd58f9b)=>_0x3108f2[_0xd58f9b]===_0x4cbe23||'*'===_0x3108f2[_0xd58f9b]));}function _0xb60e61(){return _0x1ee595&&_0x11b4b5?new window['Promise']((_0x60f4be,_0x2747fd)=>{_0x1ee595['then'](_0x60f4be,_0x2747fd),_0x11b4b5['then'](_0x31a3af=>{'Valid'!=_0x31a3af&&_0x60f4be(_0x31a3af);},_0x2747fd);}):_0x1ee595||_0x11b4b5||'Valid';}}function _0x1ba777(_0x47ce21,_0x4bf7e5){return new window['Promise'](_0x185ebe=>{if(_0x74528f())return _0x185ebe('Valid');_0x1e99f9(),_0x6ffc8['decorate']('_sendUsageRequest');let _0x754918=!0x1;const _0x336c3d=_0x49f517();function _0x1b72eb(_0x213596){return!!_0x213596&&('object'==typeof _0x213596||'function'==typeof _0x213596)&&'function'==typeof _0x213596['then']&&'function'==typeof _0x213596['catch'];}function _0x3dc0ef(_0x43a673){_0x299d5e(_0x43a673)['then'](_0x148b36=>_0x148b36&&'ok'==_0x148b36['status']?_0x4def54(_0x3ac162(_0x336c3d+_0x4bf7e5))!=_0x148b36['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3238c5=>(_0x27525f(),_0x3238c5),()=>{const _0x5d827e=_0x7c7eea();return null==_0x5d827e?(_0x27525f(),'Valid'):_0x6f3170-_0x5d827e>0x240c8400?'UsageLimit':'Valid';})['then'](_0x185ebe)['catch'](()=>{_0x185ebe('UsageLimit');});const _0x1d9b39=0x36ee80;function _0x27525f(){const _0x5cdc01='llct-'+_0x4def54(_0x3ac162(_0x47ce21)),_0x44423d=_0x3c8c83(_0x4def54(window['Math']['ceil'](_0x6f3170/_0x1d9b39)));window['localStorage']['setItem'](_0x5cdc01,_0x44423d);}function _0x7c7eea(){const _0x24b11c='llct-'+_0x4def54(_0x3ac162(_0x47ce21)),_0x504362=window['localStorage']['getItem'](_0x24b11c);return _0x504362?window['parseInt'](_0x3c8c83(_0x504362),0x10)*_0x1d9b39:null;}function _0x299d5e(_0xbfa8b3){return new window['Promise']((_0x20a31d,_0x30bb5a)=>{_0xbfa8b3['then'](_0x20a31d,_0x30bb5a),window['setTimeout'](_0x30bb5a,0x1d4c0);});}}_0x6ffc8['on']('_sendUsageRequest',(_0x88e6fa,_0x5bcdb9)=>{if(_0x5bcdb9[0x0]!=_0x47ce21)return _0x185ebe('UsageLimit');_0x5bcdb9[0x1]={..._0x5bcdb9[0x1],'requestId':_0x336c3d};},{'priority':'high'}),_0x6ffc8['on']('_sendUsageRequest',_0xe7ad7a=>{_0x1b72eb(_0xe7ad7a['return'])&&(_0x754918=!0x0,_0x3dc0ef(_0xe7ad7a['return']));},{'priority':'low'}),_0x2cb632['then'](()=>{_0x754918||_0x185ebe('UsageLimit');});});function _0x74528f(){return'auto'==_0x6ffc8['editing']['view']['_overlayModeHint'];}function _0x1e99f9(){_0x6ffc8['editing']['view']['_overlayModeHint']='auto';}}function _0x51e22e(_0x237b19){const _0x62c47f=[new window['Promise'](_0x3723e4=>setTimeout(_0x3723e4,0x93ecc)),_0x2cb632['then'](()=>new window['Promise'](_0x511764=>{let _0x2609cc=0x0;_0x6ffc8['model']['on']('applyOperation',(_0x48bc4a,_0x440cac)=>{_0x440cac[0x0]['isDocumentOperation']&&_0x2609cc++,0x5e8==_0x2609cc&&(_0x511764(),_0x48bc4a['off']());});}))];return window['Promise']['race'](_0x62c47f)['then'](()=>_0x237b19);}async function _0x23460c(){await _0x2cb632,_0x6ffc8['model']['change']=_0x5b8a03,_0x6ffc8['model']['enqueueChange']=_0x5b8a03,_0x6ffc8['enableReadOnlyMode']('model');}function _0x3e53c9(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5c89cc(_0x1eabd0){const _0x408b1a=_0x186c5c();_0x6ffc8[_0x408b1a]='slashCommandLicenseKey'+_0x1eabd0,'Valid'!=_0x1eabd0&&_0x23460c();}function _0x186c5c(){const _0x52ce3f=window['String'](window['performance']['now']())['replace']('.','');let _0x5e5f57='u';for(let _0x3333f=0x0;_0x3333f<_0x52ce3f['length'];_0x3333f+=0x2){let _0xfa821c=window['parseInt'](_0x52ce3f['substring'](_0x3333f,_0x3333f+0x2));_0xfa821c>=0x3e&&(_0xfa821c-=0x3e),_0x5e5f57+=_0x467d25[_0xfa821c];}return _0x5e5f57;}function _0xae8d42(){const _0x376ae5=_0xb02902['split']('.');if(0x3!=_0x376ae5['length'])return null;return _0x1011b3(_0x376ae5[0x1]);function _0x1011b3(_0x1488fa){const _0x87f869=_0x29fab3(_0x1488fa);return _0x87f869&&_0x31a438()?_0x87f869:null;function _0x31a438(){const _0x40146e=_0x87f869['jti'],_0x3b5c72=window['parseInt'](_0x40146e['substring'](_0x40146e['length']-0x8),0x10),_0x410d07={..._0x87f869,'jti':_0x40146e['substring'](0x0,_0x40146e['length']-0x8)};return delete _0x410d07['vc'],_0x3ac162(_0x410d07)==_0x3b5c72;}}}async function _0x49a043(){let _0x19b7d6=!0x0;try{const [_0x5544fd,_0x3a710c,_0x20f821]=_0xb02902['split']('.');return _0x324b7b(_0x5544fd),await _0x158005(_0x5544fd,_0x3a710c,_0x20f821),_0x19b7d6;}catch{return!0x1;}function _0x324b7b(_0x91eef2){const _0x1141c7=_0x29fab3(_0x91eef2);_0x1141c7&&'ES256'==_0x1141c7['alg']||(_0x19b7d6=!0x1);}async function _0x158005(_0x193027,_0x386097,_0x40335f){const _0x2f5282=window['Uint8Array']['from'](_0x5c741e(_0x40335f),_0x440e59=>_0x440e59['charCodeAt'](0x0)),_0x21f5b0=new window['TextEncoder']()['encode'](_0x193027+'.'+_0x386097),_0x42012c=window['crypto']['subtle'];if(!_0x42012c)return;const _0x39c5f1=await _0x42012c['importKey']('jwk',_0x429171,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x42012c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x39c5f1,_0x2f5282,_0x21f5b0)||(_0x19b7d6=!0x1);}}function _0x29fab3(_0x3e4f1c){return _0x3e4f1c['startsWith']('ey')?JSON['parse'](_0x5c741e(_0x3e4f1c)):null;}function _0x5c741e(_0x3023cf){return window['atob'](_0x3023cf['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3ac162(_0x5109aa){let _0x9e6f98=0x1505;function _0x5086d6(_0x3b638f){for(let _0x4ca40a=0x0;_0x4ca40a<_0x3b638f['length'];_0x4ca40a++){const _0x4c9059=_0x3b638f['charCodeAt'](_0x4ca40a);_0x9e6f98=(_0x9e6f98<<0x5)+_0x9e6f98+_0x4c9059,_0x9e6f98&=_0x9e6f98;}}function _0x21ee9a(_0xb37dea){Array['isArray'](_0xb37dea)?_0xb37dea['forEach'](_0x21ee9a):_0xb37dea&&'object'==typeof _0xb37dea?Object['entries'](_0xb37dea)['sort']()['forEach'](([_0x28d7ea,_0x2c057e])=>{_0x5086d6(_0x28d7ea),_0x21ee9a(_0x2c057e);}):_0x5086d6(window['String'](_0xb37dea));}return _0x21ee9a(_0x5109aa),_0x9e6f98>>>0x0;}function _0x4def54(_0x5e4ece){return _0x5e4ece['toString'](0x10)['padStart'](0x8,'0');}function _0x3c8c83(_0x2306c5){return _0x2306c5['split']('')['reverse']()['join']('');}function _0x5b8a03(){}_0x5c89cc(await _0x475b83());}(this);}['getAllowedCommands'](){return this['_allowedCommands'];}['getDefaultCommands'](){const _0x589d41=_0x1882f4=>function(_0x53f9b2,_0x56d7f3){const t=_0x53f9b2['t'],_0x1b0582=_0x53f9b2['t'];switch(_0x56d7f3){case'AI\x20Assistant':return _0x1b0582('AI\x20Assistant');case'Block\x20quote':return _0x1b0582('Block\x20quote');case'Bulleted\x20List':return _0x1b0582('Bulleted\x20List');case'Insert\x20code\x20block':return _0x1b0582('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x1b0582('Open\x20file\x20manager');case'Insert\x20image':return _0x1b0582('Insert\x20image');case'Heading\x201':return _0x1b0582('Heading\x201');case'Heading\x202':return _0x1b0582('Heading\x202');case'Heading\x203':return _0x1b0582('Heading\x203');case'Heading\x204':return _0x1b0582('Heading\x204');case'Heading\x205':return _0x1b0582('Heading\x205');case'Heading\x206':return _0x1b0582('Heading\x206');case'Horizontal\x20line':return _0x1b0582('Horizontal\x20line');case'Insert\x20HTML':return _0x1b0582('Insert\x20HTML');case'Increase\x20indent':return _0x1b0582('Increase\x20indent');case'Insert\x20table':return _0x1b0582('Insert\x20table');case'Table\x20of\x20contents':return _0x1b0582('Table\x20of\x20contents');case'Numbered\x20List':return _0x1b0582('Numbered\x20List');case'Decrease\x20indent':return _0x1b0582('Decrease\x20indent');case'Paragraph':return _0x1b0582('Paragraph');case'To-do\x20List':return _0x1b0582('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 _0x56d7f3;}}(this['editor']['locale'],_0x1882f4);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x559a62,'title':_0x589d41('AI\x20Assistant'),'description':_0x589d41('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x48ad3f=>{setTimeout(()=>_0x48ad3f['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x7b3cf9,'title':_0x589d41('Block\x20quote'),'description':_0x589d41('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0xf2684a,'title':_0x589d41('Bulleted\x20List'),'description':_0x589d41('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x248464,'title':_0x589d41('Insert\x20code\x20block'),'description':_0x589d41('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x5406f8,'title':_0x589d41('Open\x20file\x20manager'),'description':_0x589d41('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x5406f8,'title':_0x589d41('Insert\x20image'),'description':_0x589d41('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x463b6e,'title':_0x589d41('Emoji'),'description':_0x589d41('Insert\x20an\x20emoji'),'execute':_0x5ac7df=>{setTimeout(()=>_0x5ac7df['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x361c64,'title':_0x589d41('Heading\x201'),'description':_0x589d41('Create\x20a\x20heading\x20level\x201'),'execute':_0x71f490=>{_0x71f490['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x12f8b9,'title':_0x589d41('Heading\x202'),'description':_0x589d41('Create\x20a\x20heading\x20level\x202'),'execute':_0x4b8c3f=>{_0x4b8c3f['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x55686d,'title':_0x589d41('Heading\x203'),'description':_0x589d41('Create\x20a\x20heading\x20level\x203'),'execute':_0x57bfea=>{_0x57bfea['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0xc544f,'title':_0x589d41('Heading\x204'),'description':_0x589d41('Create\x20a\x20heading\x20level\x204'),'execute':_0x77b42e=>{_0x77b42e['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x4abf76,'title':_0x589d41('Heading\x205'),'description':_0x589d41('Create\x20a\x20heading\x20level\x205'),'execute':_0x6003c8=>{_0x6003c8['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x6cb51c,'title':_0x589d41('Heading\x206'),'description':_0x589d41('Create\x20a\x20heading\x20level\x206'),'execute':_0x2348f8=>{_0x2348f8['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x2218e9,'title':_0x589d41('Horizontal\x20line'),'description':_0x589d41('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x31acd6,'title':_0x589d41('Insert\x20HTML'),'description':_0x589d41('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x50a356,'title':_0x589d41('Increase\x20indent'),'description':_0x589d41('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x589d41('Insert\x20Mermaid\x20diagram'),'description':_0x589d41('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x4a5cff,'title':_0x589d41('Insert\x20table'),'description':_0x589d41('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x57ef8b,'title':_0x589d41('Table\x20of\x20contents'),'description':_0x589d41('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x50a1f1,'title':_0x589d41('Numbered\x20List'),'description':_0x589d41('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x572f4d,'title':_0x589d41('Decrease\x20indent'),'description':_0x589d41('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x1f0edb,'title':_0x589d41('Paragraph'),'description':_0x589d41('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x197f5d,'title':_0x589d41('To-do\x20List'),'description':_0x589d41('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x3ea027,'title':_0x589d41('Footnote'),'description':_0x589d41('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x40126e){return _0x40126e['isEnabled']?_0x40126e['isEnabled'](this['editor']):!_0x40126e['commandName']||this['editor']['commands']['get'](_0x40126e['commandName'])['isEnabled'];}['_proxyExecute'](_0x14ad81){if(_0x14ad81['execute'])_0x14ad81['execute'](this['editor']);else{if(!_0x14ad81['commandName'])throw new _0x1024da('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x14ad81});this['editor']['execute'](_0x14ad81['commandName']);}}};function E(_0x5818be,_0x2a7026){return _0x5818be['title']<_0x2a7026['title']?-0x1:_0x5818be['title']>_0x2a7026['title']?0x1:0x0;}function P(_0x493755,_0x217877){return _0x217877+'-'+_0x493755['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x5d37ef{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[O];}['getMatchingCommands'](_0x4654b8){const _0x379978=_0x4654b8&&_0x4654b8['toLowerCase']();let _0xd2b6be=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0xd2b6be=_0xd2b6be['filter'](_0x2a7f59=>_0x2a7f59['isEnabled']()),_0x379978){const _0x4224d3=[],_0x58f729=[],_0x488281=[],_0x13178e=[];for(const _0x36bb47 of _0xd2b6be)_0x36bb47['id']['toLowerCase']()['includes'](_0x379978)?_0x4224d3['push'](_0x36bb47):_0x36bb47['title']['toLowerCase']()['includes'](_0x379978)?_0x58f729['push'](_0x36bb47):_0x36bb47['aliases']&&_0x36bb47['aliases']['some'](_0x411992=>_0x411992['toLowerCase']()['includes'](_0x379978))?_0x488281['push'](_0x36bb47):_0x36bb47['description']&&_0x36bb47['description']['toLowerCase']()['includes'](_0x379978)&&_0x13178e['push'](_0x36bb47);_0xd2b6be=_0x4224d3['concat'](_0x58f729,_0x488281,_0x13178e);}return _0xd2b6be;}},M=class extends _0x2f13d7{constructor(_0x15a084,_0x1aeb8c){super(_0x15a084),this['textPartView']=this['_createTextPartView'](_0x15a084,_0x1aeb8c),void 0x0!==_0x1aeb8c['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x1aeb8c['isIconColorInherited']),this['set']({'icon':_0x1aeb8c['icon']||_0xc3a532,'withText':!0x0,'label':_0x1aeb8c['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}['_createTextPartView'](_0x560d1e,_0x591b54){const _0x47f9b0=new _0x4bfb0a(_0x560d1e);return _0x47f9b0['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x591b54['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x591b54['description']}]}]:[this['labelView']]}),_0x47f9b0;}},S=class extends _0x5d37ef{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b7117){super(_0x5b7117),this['_setupMentionConfiguration']();}['init'](){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3058b0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c6b04;for(const _0x8aa3d9 in _0x3058b0){const _0x59e0d1=_0x8aa3d9,_0x4dfd7c=_0x3058b0[_0x59e0d1];if('slashCommandLicenseKeyValid'==_0x4dfd7c||'slashCommandLicenseKeyInvalid'==_0x4dfd7c||'slashCommandLicenseKeyExpired'==_0x4dfd7c||'slashCommandLicenseKeyDomainLimit'==_0x4dfd7c||'slashCommandLicenseKeyNotAllowed'==_0x4dfd7c||'slashCommandLicenseKeyEvaluationLimit'==_0x4dfd7c||'slashCommandLicenseKeyUsageLimit'==_0x4dfd7c){delete _0x3058b0[_0x59e0d1],_0x1c6b04=_0x4dfd7c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x1c6b04&&_0x3058b0['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x1c6b04&&_0x3058b0['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x1c6b04&&_0x3058b0['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x1c6b04&&_0x3058b0['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x1c6b04&&_0x3058b0['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x1c6b04&&_0x3058b0['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_setupMentionConfiguration'](){const _0x26ddd5=this['editor'],_0x39a81b=this['editor']['plugins']['get']('SlashCommandEditing'),_0x5cfd6b=_0x26ddd5['config']['get']('mention.feeds');_0x5cfd6b['push']({'marker':'/','feed':_0x3a21ab=>_0x39a81b['getMatchingCommands'](_0x3a21ab),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x26ddd5['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x26ddd5['config']['set']('mention.feeds',_0x5cfd6b);}['_overrideMentionExecuteListener'](){const _0x55cf3d=this['editor'];_0x55cf3d['commands']['get']('mention')['on']('execute',(_0x2d9705,_0x32b43c)=>{const _0x3ab832=_0x32b43c[0x0],_0x5e3fe0=_0x55cf3d['model'];'/'===_0x3ab832['marker']&&_0x5e3fe0['change'](_0x1e7e10=>{_0x1e7e10['remove'](_0x3ab832['range']),_0x3ab832['mention']['execute'](),_0x2d9705['stop']();});},{'priority':'high'});}['_customItemRenderer'](_0x1b422e){const _0x2d091e=this['editor']['locale'],_0x473fb3=new M(_0x2d091e,_0x1b422e);return _0x473fb3['render'](),_0x473fb3['element'];}},D=class extends _0x5d37ef{static get['requires'](){return[_0x445721,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.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.6",
|
|
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.3.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-mention": "48.3.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-style": "48.3.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-template": "48.3.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.6",
|
|
25
|
+
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.6",
|
|
26
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.6",
|
|
27
|
+
"@ckeditor/ckeditor5-mention": "48.3.0-alpha.6",
|
|
28
|
+
"@ckeditor/ckeditor5-style": "48.3.0-alpha.6",
|
|
29
|
+
"@ckeditor/ckeditor5-template": "48.3.0-alpha.6",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.6",
|
|
31
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.6"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|