@ckeditor/ckeditor5-slash-command 48.3.0-alpha.0 → 48.3.0-alpha.1

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 _0x1791db}from'@ckeditor/ckeditor5-core';import{Mention as _0x437adc}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x524e56,uid as _0x1a3fe8}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x469ff8,IconBulletedList as _0x1639b3,IconCodeBlock as _0x9d8de7,IconEmoji as _0x2cd4ed,IconFootnote as _0x58eb65,IconHeading1 as _0x1da821,IconHeading2 as _0x1c81b8,IconHeading3 as _0x2c6090,IconHeading4 as _0x383cc0,IconHeading5 as _0x830da,IconHeading6 as _0x42c71f,IconHorizontalLine as _0x2b6a9c,IconHtml as _0x53842a,IconIndent as _0x446e36,IconNumberedList as _0x5ea723,IconOutdent as _0x50cedf,IconParagraph as _0x3eae88,IconPlay as _0x4005e7,IconQuote as _0x288ec1,IconRobotPencil as _0x6daf74,IconTable as _0x16fe3e,IconTableOfContents as _0x5bf635,IconTodoList as _0x47e603}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x177d55,View as _0x56dd9b}from'@ckeditor/ckeditor5-ui';var O=class extends _0x1791db{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42232c){super(_0x42232c),this['_allowedCommands']=null;}['afterInit'](){const _0x4f0303=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x678c1c=function(_0xb89cf9){let _0xca8471=['heading4','heading5','heading6'];if(_0xb89cf9){const _0xeedee0=_0xb89cf9['map'](_0x4e85ac=>_0x4e85ac['model']);_0xca8471=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x13c315=>!_0xeedee0['includes'](_0x13c315));}return _0xca8471;}(this['editor']['config']['get']('heading.options'));let _0x257b1a=this['getDefaultCommands']()['filter'](_0x2a0aef=>!_0x678c1c['includes'](_0x2a0aef['id']))['filter'](_0x20f316=>!_0x4f0303['includes'](_0x20f316['commandName']));const _0x39cebd=this['editor']['config']['get']('slashCommand.extraCommands');_0x39cebd&&_0x39cebd['length']&&(_0x257b1a=_0x257b1a['concat'](_0x39cebd));const _0x2b40c4=this['editor']['config']['get']('template.definitions');_0x2b40c4&&_0x2b40c4['length']&&(_0x257b1a=_0x257b1a['concat'](function(_0x4a0806){return _0x4a0806['map'](_0x115926=>{const {title:_0x3547bb,icon:_0x4d1665,description:_0x420218,data:_0x1ee989}=_0x115926,_0x4b70c1={'id':P(_0x3547bb,'template'),'commandName':'insertTemplate','execute':_0x5c0373=>{_0x5c0373['execute']('insertTemplate',_0x1ee989);},'description':_0x420218,'icon':_0x4d1665,'title':_0x3547bb};return _0x4d1665&&(_0x4b70c1['isIconColorInherited']=!0x1),_0x4b70c1;});}(_0x2b40c4)));const _0x390fa7=this['editor']['config']['get']('style.definitions');_0x390fa7&&_0x390fa7['length']&&(_0x257b1a=_0x257b1a['concat'](function(_0x4eb8ed){return _0x4eb8ed['map'](_0x15311d=>({'id':P(_0x15311d['name'],'style'),'commandName':'style','execute':_0x30eb76=>{_0x30eb76['execute']('style',{'styleName':_0x15311d['name']});},'isEnabled':_0x36a4bf=>{const _0x102549=_0x36a4bf['commands']['get']('style');return _0x102549['isEnabled']&&_0x102549['enabledStyles']['includes'](_0x15311d['name']);},'title':_0x15311d['name']}));}(_0x390fa7)));const _0x25a38d=_0x257b1a['filter'](_0x494c68=>!_0x494c68['commandName']||void 0x0!==this['editor']['commands']['get'](_0x494c68['commandName'])),_0x31405f=[];for(const _0x5b2ae4 of _0x25a38d)_0x31405f['push']({'id':_0x5b2ae4['id'],'commandName':_0x5b2ae4['commandName'],'title':'function'==typeof _0x5b2ae4['title']?_0x5b2ae4['title'](this['editor']):_0x5b2ae4['title'],'description':_0x5b2ae4['description'],'icon':_0x5b2ae4['icon'],'isIconColorInherited':_0x5b2ae4['isIconColorInherited'],'aliases':_0x5b2ae4['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x5b2ae4),'execute':()=>this['_proxyExecute'](_0x5b2ae4)});this['_allowedCommands']=_0x31405f['sort'](E),async function(_0x4e67fc){const _0x37c092='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x55647a=0x78de0,_0x43354b=window['Date']['now'](),_0x3c8ed=_0x4e67fc['editor'],_0x37151b=new window['Promise'](_0xb01382=>{_0x3c8ed['once']('ready',_0xb01382);}),_0x40c6aa={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x2360e0=_0x3c8ed['config']['get']('licenseKey');async function _0x517727(){let _0x2ae86a,_0x5cb3e2=null,_0x3d418c=null;try{return'GPL'==_0x2360e0?'NotAllowed':(_0x2ae86a=_0x44500c(),_0x2ae86a?(_0x2ae86a['usageEndpoint']&&(_0x3d418c=_0x53371e(_0x2ae86a['usageEndpoint'],_0x2ae86a['jti'])),await _0x3b8add()?_0x53eca6()?_0x4b21fb()?'Expired':_0x1d3df2()?('evaluation'==_0x2ae86a['licenseType']&&(_0x5cb3e2=_0x53df0e('EvaluationLimit')),await _0x7ae514()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4b21fb(){const _0x3abd4c=['evaluation','trial']['includes'](_0x2ae86a['licenseType'])?_0x43354b/0x3e8:0xe10*_0x55647a;return _0x2ae86a['exp']<_0x3abd4c;}function _0x53eca6(){const _0x26e0ad=_0x2ae86a['features'];return!!_0x26e0ad&&(!!_0x26e0ad['includes']('*')||(!!_0x26e0ad['includes']('SC')||(!!_0x26e0ad['includes']('PP')||!(!_0x26e0ad['includes']('TRILIUM')||!_0x3f64b8()))));}function _0x1d3df2(){const _0x43dac2=_0x2ae86a['licensedHosts'];if(!_0x43dac2||0x0==_0x43dac2['length'])return!0x0;const {hostname:_0x1af02c}=new URL(window['location']['href']);if(_0x43dac2['includes'](_0x1af02c))return!0x0;const _0x3e9f5d=_0x1af02c['split']('.');return _0x43dac2['filter'](_0xf4ec7=>_0xf4ec7['includes']('*'))['map'](_0xaf7a3e=>_0xaf7a3e['split']('.'))['filter'](_0x23b772=>_0x23b772['length']<=_0x3e9f5d['length'])['map'](_0x1aafd8=>Array(_0x3e9f5d['length']-_0x1aafd8['length'])['fill']('*'===_0x1aafd8[0x0]?'*':'')['concat'](_0x1aafd8))['some'](_0x1f458d=>_0x3e9f5d['every']((_0x60a84,_0xb55463)=>_0x1f458d[_0xb55463]===_0x60a84||'*'===_0x1f458d[_0xb55463]));}function _0x7ae514(){return _0x5cb3e2&&_0x3d418c?new window['Promise']((_0x4da04b,_0x2e3f86)=>{_0x5cb3e2['then'](_0x4da04b,_0x2e3f86),_0x3d418c['then'](_0x4a23b7=>{'Valid'!=_0x4a23b7&&_0x4da04b(_0x4a23b7);},_0x2e3f86);}):_0x5cb3e2||_0x3d418c||'Valid';}}function _0x53371e(_0x23b44f,_0x494d28){return new window['Promise'](_0x247a1b=>{if(_0x10a56e())return _0x247a1b('Valid');_0x1e5aa5(),_0x3c8ed['decorate']('_sendUsageRequest');let _0x24b904=!0x1;const _0x338c45=_0x1a3fe8();function _0xe0afda(_0x5efe9e){return!!_0x5efe9e&&('object'==typeof _0x5efe9e||'function'==typeof _0x5efe9e)&&'function'==typeof _0x5efe9e['then']&&'function'==typeof _0x5efe9e['catch'];}function _0x1056bf(_0x2c3d5f){_0x3a6fdd(_0x2c3d5f)['then'](_0x5e728b=>_0x5e728b&&'ok'==_0x5e728b['status']?_0x47507c(_0x5f2e73(_0x338c45+_0x494d28))!=_0x5e728b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2c1bae=>(_0x5c5f03(),_0x2c1bae),()=>{const _0x1afc8d=_0x9b7ac7();return null==_0x1afc8d?(_0x5c5f03(),'Valid'):_0x43354b-_0x1afc8d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x247a1b)['catch'](()=>{_0x247a1b('UsageLimit');});const _0x588d43=0x36ee80;function _0x5c5f03(){const _0x31f6be='llct-'+_0x47507c(_0x5f2e73(_0x23b44f)),_0x17e362=_0x27cfac(_0x47507c(window['Math']['ceil'](_0x43354b/_0x588d43)));window['localStorage']['setItem'](_0x31f6be,_0x17e362);}function _0x9b7ac7(){const _0x5f5036='llct-'+_0x47507c(_0x5f2e73(_0x23b44f)),_0x2d4101=window['localStorage']['getItem'](_0x5f5036);return _0x2d4101?window['parseInt'](_0x27cfac(_0x2d4101),0x10)*_0x588d43:null;}function _0x3a6fdd(_0x5b7bdf){return new window['Promise']((_0x22ab3a,_0x18df35)=>{_0x5b7bdf['then'](_0x22ab3a,_0x18df35),window['setTimeout'](_0x18df35,0x1d4c0);});}}_0x3c8ed['on']('_sendUsageRequest',(_0x1abd2c,_0x111ad6)=>{if(_0x111ad6[0x0]!=_0x23b44f)return _0x247a1b('UsageLimit');_0x111ad6[0x1]={..._0x111ad6[0x1],'requestId':_0x338c45};},{'priority':'high'}),_0x3c8ed['on']('_sendUsageRequest',_0x2125fc=>{_0xe0afda(_0x2125fc['return'])&&(_0x24b904=!0x0,_0x1056bf(_0x2125fc['return']));},{'priority':'low'}),_0x37151b['then'](()=>{_0x24b904||_0x247a1b('UsageLimit');});});function _0x10a56e(){return'auto'==_0x3c8ed['editing']['view']['_overlayModeHint'];}function _0x1e5aa5(){_0x3c8ed['editing']['view']['_overlayModeHint']='auto';}}function _0x53df0e(_0x474f8a){const _0x53b06f=[new window['Promise'](_0x36f0d0=>setTimeout(_0x36f0d0,0x93ecc)),_0x37151b['then'](()=>new window['Promise'](_0x139bb0=>{let _0x1de43e=0x0;_0x3c8ed['model']['on']('applyOperation',(_0x509285,_0x344399)=>{_0x344399[0x0]['isDocumentOperation']&&_0x1de43e++,0x5e8==_0x1de43e&&(_0x139bb0(),_0x509285['off']());});}))];return window['Promise']['race'](_0x53b06f)['then'](()=>_0x474f8a);}async function _0x394434(){await _0x37151b,_0x3c8ed['model']['change']=_0x2bbf43,_0x3c8ed['model']['enqueueChange']=_0x2bbf43,_0x3c8ed['enableReadOnlyMode']('model');}function _0x3f64b8(){return window['glob']&&window['glob']['triliumVersion'];}function _0x2def4b(_0x136417){const _0x4a199f=_0x261900();_0x3c8ed[_0x4a199f]='slashCommandLicenseKey'+_0x136417,'Valid'!=_0x136417&&_0x394434();}function _0x261900(){const _0x794882=window['String'](window['performance']['now']())['replace']('.','');let _0x434a0e='u';for(let _0x18c07c=0x0;_0x18c07c<_0x794882['length'];_0x18c07c+=0x2){let _0x3bd5fd=window['parseInt'](_0x794882['substring'](_0x18c07c,_0x18c07c+0x2));_0x3bd5fd>=0x3e&&(_0x3bd5fd-=0x3e),_0x434a0e+=_0x37c092[_0x3bd5fd];}return _0x434a0e;}function _0x44500c(){const _0x52566a=_0x2360e0['split']('.');if(0x3!=_0x52566a['length'])return null;return _0x4f7dd7(_0x52566a[0x1]);function _0x4f7dd7(_0x71c843){const _0x2eeef4=_0x3b099c(_0x71c843);return _0x2eeef4&&_0x21e8c4()?_0x2eeef4:null;function _0x21e8c4(){const _0x225d79=_0x2eeef4['jti'],_0x315ba3=window['parseInt'](_0x225d79['substring'](_0x225d79['length']-0x8),0x10),_0x346c2f={..._0x2eeef4,'jti':_0x225d79['substring'](0x0,_0x225d79['length']-0x8)};return delete _0x346c2f['vc'],_0x5f2e73(_0x346c2f)==_0x315ba3;}}}async function _0x3b8add(){let _0x57f7b1=!0x0;try{const [_0x50477a,_0x55042d,_0x44a681]=_0x2360e0['split']('.');return _0x36458b(_0x50477a),await _0x44227b(_0x50477a,_0x55042d,_0x44a681),_0x57f7b1;}catch{return!0x1;}function _0x36458b(_0x1b7384){const _0x409369=_0x3b099c(_0x1b7384);_0x409369&&'ES256'==_0x409369['alg']||(_0x57f7b1=!0x1);}async function _0x44227b(_0xd0ae9f,_0x2865cb,_0x5213d6){const _0x3d528c=window['Uint8Array']['from'](_0x39e04e(_0x5213d6),_0x2fa9ff=>_0x2fa9ff['charCodeAt'](0x0)),_0x2506a6=new window['TextEncoder']()['encode'](_0xd0ae9f+'.'+_0x2865cb),_0x53f775=window['crypto']['subtle'];if(!_0x53f775)return;const _0xa52eb0=await _0x53f775['importKey']('jwk',_0x40c6aa,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x53f775['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xa52eb0,_0x3d528c,_0x2506a6)||(_0x57f7b1=!0x1);}}function _0x3b099c(_0x2dfc9a){return _0x2dfc9a['startsWith']('ey')?JSON['parse'](_0x39e04e(_0x2dfc9a)):null;}function _0x39e04e(_0xcc26c0){return window['atob'](_0xcc26c0['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5f2e73(_0x3aac19){let _0x4110ca=0x1505;function _0x38df8c(_0x1158b0){for(let _0x465e7f=0x0;_0x465e7f<_0x1158b0['length'];_0x465e7f++){const _0x1b3ec6=_0x1158b0['charCodeAt'](_0x465e7f);_0x4110ca=(_0x4110ca<<0x5)+_0x4110ca+_0x1b3ec6,_0x4110ca&=_0x4110ca;}}function _0x1b26b7(_0x4391d9){Array['isArray'](_0x4391d9)?_0x4391d9['forEach'](_0x1b26b7):_0x4391d9&&'object'==typeof _0x4391d9?Object['entries'](_0x4391d9)['sort']()['forEach'](([_0x2115dc,_0x2bc85e])=>{_0x38df8c(_0x2115dc),_0x1b26b7(_0x2bc85e);}):_0x38df8c(window['String'](_0x4391d9));}return _0x1b26b7(_0x3aac19),_0x4110ca>>>0x0;}function _0x47507c(_0x27b9d5){return _0x27b9d5['toString'](0x10)['padStart'](0x8,'0');}function _0x27cfac(_0x5eb3d6){return _0x5eb3d6['split']('')['reverse']()['join']('');}function _0x2bbf43(){}_0x2def4b(await _0x517727());}(this);}['getAllowedCommands'](){return this['_allowedCommands'];}['getDefaultCommands'](){const _0x16ad36=_0xee48ab=>function(_0x340e6c,_0x1491da){const t=_0x340e6c['t'],_0x35929a=_0x340e6c['t'];switch(_0x1491da){case'AI\x20Assistant':return _0x35929a('AI\x20Assistant');case'Block\x20quote':return _0x35929a('Block\x20quote');case'Bulleted\x20List':return _0x35929a('Bulleted\x20List');case'Insert\x20code\x20block':return _0x35929a('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x35929a('Open\x20file\x20manager');case'Insert\x20image':return _0x35929a('Insert\x20image');case'Heading\x201':return _0x35929a('Heading\x201');case'Heading\x202':return _0x35929a('Heading\x202');case'Heading\x203':return _0x35929a('Heading\x203');case'Heading\x204':return _0x35929a('Heading\x204');case'Heading\x205':return _0x35929a('Heading\x205');case'Heading\x206':return _0x35929a('Heading\x206');case'Horizontal\x20line':return _0x35929a('Horizontal\x20line');case'Insert\x20HTML':return _0x35929a('Insert\x20HTML');case'Increase\x20indent':return _0x35929a('Increase\x20indent');case'Insert\x20table':return _0x35929a('Insert\x20table');case'Table\x20of\x20contents':return _0x35929a('Table\x20of\x20contents');case'Numbered\x20List':return _0x35929a('Numbered\x20List');case'Decrease\x20indent':return _0x35929a('Decrease\x20indent');case'Paragraph':return _0x35929a('Paragraph');case'To-do\x20List':return _0x35929a('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 _0x1491da;}}(this['editor']['locale'],_0xee48ab);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x6daf74,'title':_0x16ad36('AI\x20Assistant'),'description':_0x16ad36('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0xa0da50=>{setTimeout(()=>_0xa0da50['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x288ec1,'title':_0x16ad36('Block\x20quote'),'description':_0x16ad36('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x1639b3,'title':_0x16ad36('Bulleted\x20List'),'description':_0x16ad36('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x9d8de7,'title':_0x16ad36('Insert\x20code\x20block'),'description':_0x16ad36('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x469ff8,'title':_0x16ad36('Open\x20file\x20manager'),'description':_0x16ad36('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x469ff8,'title':_0x16ad36('Insert\x20image'),'description':_0x16ad36('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x2cd4ed,'title':_0x16ad36('Emoji'),'description':_0x16ad36('Insert\x20an\x20emoji'),'execute':_0x51033e=>{setTimeout(()=>_0x51033e['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x1da821,'title':_0x16ad36('Heading\x201'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x201'),'execute':_0x5cbace=>{_0x5cbace['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x1c81b8,'title':_0x16ad36('Heading\x202'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x202'),'execute':_0x4a3677=>{_0x4a3677['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x2c6090,'title':_0x16ad36('Heading\x203'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x203'),'execute':_0x2fa3b3=>{_0x2fa3b3['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x383cc0,'title':_0x16ad36('Heading\x204'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x204'),'execute':_0x41410a=>{_0x41410a['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x830da,'title':_0x16ad36('Heading\x205'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x205'),'execute':_0x5661cb=>{_0x5661cb['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x42c71f,'title':_0x16ad36('Heading\x206'),'description':_0x16ad36('Create\x20a\x20heading\x20level\x206'),'execute':_0x494377=>{_0x494377['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x2b6a9c,'title':_0x16ad36('Horizontal\x20line'),'description':_0x16ad36('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x53842a,'title':_0x16ad36('Insert\x20HTML'),'description':_0x16ad36('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x446e36,'title':_0x16ad36('Increase\x20indent'),'description':_0x16ad36('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x16ad36('Insert\x20Mermaid\x20diagram'),'description':_0x16ad36('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x16fe3e,'title':_0x16ad36('Insert\x20table'),'description':_0x16ad36('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x5bf635,'title':_0x16ad36('Table\x20of\x20contents'),'description':_0x16ad36('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x5ea723,'title':_0x16ad36('Numbered\x20List'),'description':_0x16ad36('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x50cedf,'title':_0x16ad36('Decrease\x20indent'),'description':_0x16ad36('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x3eae88,'title':_0x16ad36('Paragraph'),'description':_0x16ad36('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x47e603,'title':_0x16ad36('To-do\x20List'),'description':_0x16ad36('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x58eb65,'title':_0x16ad36('Footnote'),'description':_0x16ad36('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x288f2f){return _0x288f2f['isEnabled']?_0x288f2f['isEnabled'](this['editor']):!_0x288f2f['commandName']||this['editor']['commands']['get'](_0x288f2f['commandName'])['isEnabled'];}['_proxyExecute'](_0x349ba1){if(_0x349ba1['execute'])_0x349ba1['execute'](this['editor']);else{if(!_0x349ba1['commandName'])throw new _0x524e56('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x349ba1});this['editor']['execute'](_0x349ba1['commandName']);}}};function E(_0x5aff05,_0x4f43ec){return _0x5aff05['title']<_0x4f43ec['title']?-0x1:_0x5aff05['title']>_0x4f43ec['title']?0x1:0x0;}function P(_0x4c2451,_0x10e3df){return _0x10e3df+'-'+_0x4c2451['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x1791db{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[O];}['getMatchingCommands'](_0x4af0a2){const _0x26bed5=_0x4af0a2&&_0x4af0a2['toLowerCase']();let _0x2986d7=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x2986d7=_0x2986d7['filter'](_0x2963aa=>_0x2963aa['isEnabled']()),_0x26bed5){const _0x47cbdb=[],_0x4d1402=[],_0x32ab24=[],_0x2a3637=[];for(const _0xc996c3 of _0x2986d7)_0xc996c3['id']['toLowerCase']()['includes'](_0x26bed5)?_0x47cbdb['push'](_0xc996c3):_0xc996c3['title']['toLowerCase']()['includes'](_0x26bed5)?_0x4d1402['push'](_0xc996c3):_0xc996c3['aliases']&&_0xc996c3['aliases']['some'](_0x53474e=>_0x53474e['toLowerCase']()['includes'](_0x26bed5))?_0x32ab24['push'](_0xc996c3):_0xc996c3['description']&&_0xc996c3['description']['toLowerCase']()['includes'](_0x26bed5)&&_0x2a3637['push'](_0xc996c3);_0x2986d7=_0x47cbdb['concat'](_0x4d1402,_0x32ab24,_0x2a3637);}return _0x2986d7;}},M=class extends _0x177d55{constructor(_0x15edd4,_0x2b1fab){super(_0x15edd4),this['textPartView']=this['_createTextPartView'](_0x15edd4,_0x2b1fab),void 0x0!==_0x2b1fab['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x2b1fab['isIconColorInherited']),this['set']({'icon':_0x2b1fab['icon']||_0x4005e7,'withText':!0x0,'label':_0x2b1fab['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}['_createTextPartView'](_0x2c50c6,_0x1f7b12){const _0x26c8a8=new _0x56dd9b(_0x2c50c6);return _0x26c8a8['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x1f7b12['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x1f7b12['description']}]}]:[this['labelView']]}),_0x26c8a8;}},S=class extends _0x1791db{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b4df6){super(_0x1b4df6),this['_setupMentionConfiguration']();}['init'](){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x124cc2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4797c1;for(const _0x5d43d9 in _0x124cc2){const _0x4dc226=_0x5d43d9,_0x229e7b=_0x124cc2[_0x4dc226];if('slashCommandLicenseKeyValid'==_0x229e7b||'slashCommandLicenseKeyInvalid'==_0x229e7b||'slashCommandLicenseKeyExpired'==_0x229e7b||'slashCommandLicenseKeyDomainLimit'==_0x229e7b||'slashCommandLicenseKeyNotAllowed'==_0x229e7b||'slashCommandLicenseKeyEvaluationLimit'==_0x229e7b||'slashCommandLicenseKeyUsageLimit'==_0x229e7b){delete _0x124cc2[_0x4dc226],_0x4797c1=_0x229e7b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x4797c1&&_0x124cc2['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x4797c1&&_0x124cc2['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x4797c1&&_0x124cc2['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x4797c1&&_0x124cc2['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x4797c1&&_0x124cc2['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x4797c1&&_0x124cc2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_setupMentionConfiguration'](){const _0x4cc317=this['editor'],_0x30b2a5=this['editor']['plugins']['get']('SlashCommandEditing'),_0x540a85=_0x4cc317['config']['get']('mention.feeds');_0x540a85['push']({'marker':'/','feed':_0x131a67=>_0x30b2a5['getMatchingCommands'](_0x131a67),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x4cc317['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x4cc317['config']['set']('mention.feeds',_0x540a85);}['_overrideMentionExecuteListener'](){const _0x42a411=this['editor'];_0x42a411['commands']['get']('mention')['on']('execute',(_0x43e640,_0x1e85ec)=>{const _0x48d4c0=_0x1e85ec[0x0],_0x142bba=_0x42a411['model'];'/'===_0x48d4c0['marker']&&_0x142bba['change'](_0x101767=>{_0x101767['remove'](_0x48d4c0['range']),_0x48d4c0['mention']['execute'](),_0x43e640['stop']();});},{'priority':'high'});}['_customItemRenderer'](_0x58af03){const _0x188a00=this['editor']['locale'],_0x2e109d=new M(_0x188a00,_0x58af03);return _0x2e109d['render'](),_0x2e109d['element'];}},D=class extends _0x1791db{static get['requires'](){return[_0x437adc,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 _0x585af2}from'@ckeditor/ckeditor5-core';import{Mention as _0x340f62}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x4aee0f,uid as _0xd0bf72}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x2c7f75,IconBulletedList as _0x9eb4a8,IconCodeBlock as _0x1e7af7,IconEmoji as _0x4d041c,IconFootnote as _0x486a11,IconHeading1 as _0x231a0b,IconHeading2 as _0x3b0cb6,IconHeading3 as _0x788608,IconHeading4 as _0x220951,IconHeading5 as _0x51e598,IconHeading6 as _0x5376d9,IconHorizontalLine as _0x20c0ca,IconHtml as _0x25751d,IconIndent as _0x4b5fef,IconNumberedList as _0x595c61,IconOutdent as _0x3a605e,IconParagraph as _0x63298f,IconPlay as _0x49bb3c,IconQuote as _0x461789,IconRobotPencil as _0x1c85d5,IconTable as _0x46b6bc,IconTableOfContents as _0xb71f31,IconTodoList as _0xc37455}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x1225c1,View as _0xe51416}from'@ckeditor/ckeditor5-ui';var O=class extends _0x585af2{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3925d7){super(_0x3925d7),this['_allowedCommands']=null;}['afterInit'](){const _0x3f5deb=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x18085a=function(_0x4c4147){let _0x13fd60=['heading4','heading5','heading6'];if(_0x4c4147){const _0x3ba12b=_0x4c4147['map'](_0x5c25e1=>_0x5c25e1['model']);_0x13fd60=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x4b960b=>!_0x3ba12b['includes'](_0x4b960b));}return _0x13fd60;}(this['editor']['config']['get']('heading.options'));let _0x1d726b=this['getDefaultCommands']()['filter'](_0x25e81b=>!_0x18085a['includes'](_0x25e81b['id']))['filter'](_0x5da565=>!_0x3f5deb['includes'](_0x5da565['commandName']));const _0x2d1474=this['editor']['config']['get']('slashCommand.extraCommands');_0x2d1474&&_0x2d1474['length']&&(_0x1d726b=_0x1d726b['concat'](_0x2d1474));const _0x36d343=this['editor']['config']['get']('template.definitions');_0x36d343&&_0x36d343['length']&&(_0x1d726b=_0x1d726b['concat'](function(_0x19bc8d){return _0x19bc8d['map'](_0x4276d0=>{const {title:_0x392322,icon:_0x4858e4,description:_0x15d278,data:_0x1fc2ea}=_0x4276d0,_0x1e70f0={'id':P(_0x392322,'template'),'commandName':'insertTemplate','execute':_0x24cac3=>{_0x24cac3['execute']('insertTemplate',_0x1fc2ea);},'description':_0x15d278,'icon':_0x4858e4,'title':_0x392322};return _0x4858e4&&(_0x1e70f0['isIconColorInherited']=!0x1),_0x1e70f0;});}(_0x36d343)));const _0x1b0feb=this['editor']['config']['get']('style.definitions');_0x1b0feb&&_0x1b0feb['length']&&(_0x1d726b=_0x1d726b['concat'](function(_0xfb8ba8){return _0xfb8ba8['map'](_0x57d46a=>({'id':P(_0x57d46a['name'],'style'),'commandName':'style','execute':_0x4c9dad=>{_0x4c9dad['execute']('style',{'styleName':_0x57d46a['name']});},'isEnabled':_0x3726f9=>{const _0x5b8ce5=_0x3726f9['commands']['get']('style');return _0x5b8ce5['isEnabled']&&_0x5b8ce5['enabledStyles']['includes'](_0x57d46a['name']);},'title':_0x57d46a['name']}));}(_0x1b0feb)));const _0x44b161=_0x1d726b['filter'](_0x53c884=>!_0x53c884['commandName']||void 0x0!==this['editor']['commands']['get'](_0x53c884['commandName'])),_0x50212f=[];for(const _0x1e7c63 of _0x44b161)_0x50212f['push']({'id':_0x1e7c63['id'],'commandName':_0x1e7c63['commandName'],'title':'function'==typeof _0x1e7c63['title']?_0x1e7c63['title'](this['editor']):_0x1e7c63['title'],'description':_0x1e7c63['description'],'icon':_0x1e7c63['icon'],'isIconColorInherited':_0x1e7c63['isIconColorInherited'],'aliases':_0x1e7c63['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x1e7c63),'execute':()=>this['_proxyExecute'](_0x1e7c63)});this['_allowedCommands']=_0x50212f['sort'](E),async function(_0x73b975){const _0x6568ea='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x1a0f7c=0x78df8,_0x9d5d81=window['Date']['now'](),_0x7e14ab=_0x73b975['editor'],_0x16f48d=new window['Promise'](_0x505212=>{_0x7e14ab['once']('ready',_0x505212);}),_0x35a83b={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5df41d=_0x7e14ab['config']['get']('licenseKey');async function _0x3b43e5(){let _0x3d3332,_0x5972b2=null,_0x48f122=null;try{return'GPL'==_0x5df41d?'NotAllowed':(_0x3d3332=_0x454d0d(),_0x3d3332?(_0x3d3332['usageEndpoint']&&(_0x48f122=_0x18132e(_0x3d3332['usageEndpoint'],_0x3d3332['jti'])),await _0x57306d()?_0x4e97b5()?_0x12fe94()?'Expired':_0x5418d9()?('evaluation'==_0x3d3332['licenseType']&&(_0x5972b2=_0x10e822('EvaluationLimit')),await _0x37bb24()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x12fe94(){const _0x9cff0f=['evaluation','trial']['includes'](_0x3d3332['licenseType'])?_0x9d5d81/0x3e8:0xe10*_0x1a0f7c;return _0x3d3332['exp']<_0x9cff0f;}function _0x4e97b5(){const _0x3ee332=_0x3d3332['features'];return!!_0x3ee332&&(!!_0x3ee332['includes']('*')||(!!_0x3ee332['includes']('SC')||(!!_0x3ee332['includes']('PP')||!(!_0x3ee332['includes']('TRILIUM')||!_0x30d78a()))));}function _0x5418d9(){const _0x28675b=_0x3d3332['licensedHosts'];if(!_0x28675b||0x0==_0x28675b['length'])return!0x0;const {hostname:_0x3d1131}=new URL(window['location']['href']);if(_0x28675b['includes'](_0x3d1131))return!0x0;const _0x369b5e=_0x3d1131['split']('.');return _0x28675b['filter'](_0x2e1ff9=>_0x2e1ff9['includes']('*'))['map'](_0xf40ec=>_0xf40ec['split']('.'))['filter'](_0x2af493=>_0x2af493['length']<=_0x369b5e['length'])['map'](_0x13dab3=>Array(_0x369b5e['length']-_0x13dab3['length'])['fill']('*'===_0x13dab3[0x0]?'*':'')['concat'](_0x13dab3))['some'](_0x442858=>_0x369b5e['every']((_0x5971e0,_0x7b79a6)=>_0x442858[_0x7b79a6]===_0x5971e0||'*'===_0x442858[_0x7b79a6]));}function _0x37bb24(){return _0x5972b2&&_0x48f122?new window['Promise']((_0x5beddc,_0x2db055)=>{_0x5972b2['then'](_0x5beddc,_0x2db055),_0x48f122['then'](_0x488816=>{'Valid'!=_0x488816&&_0x5beddc(_0x488816);},_0x2db055);}):_0x5972b2||_0x48f122||'Valid';}}function _0x18132e(_0x3919fe,_0x19dfea){return new window['Promise'](_0x5e9656=>{if(_0x17461c())return _0x5e9656('Valid');_0x1c0299(),_0x7e14ab['decorate']('_sendUsageRequest');let _0x5b45f9=!0x1;const _0x5646eb=_0xd0bf72();function _0x499e60(_0x41cb35){return!!_0x41cb35&&('object'==typeof _0x41cb35||'function'==typeof _0x41cb35)&&'function'==typeof _0x41cb35['then']&&'function'==typeof _0x41cb35['catch'];}function _0x44c4fe(_0x216fc7){_0x16c277(_0x216fc7)['then'](_0x4604fd=>_0x4604fd&&'ok'==_0x4604fd['status']?_0x3410b7(_0x37a1db(_0x5646eb+_0x19dfea))!=_0x4604fd['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x503ec3=>(_0x212e08(),_0x503ec3),()=>{const _0x2ded84=_0x46948b();return null==_0x2ded84?(_0x212e08(),'Valid'):_0x9d5d81-_0x2ded84>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5e9656)['catch'](()=>{_0x5e9656('UsageLimit');});const _0x4fc327=0x36ee80;function _0x212e08(){const _0x1806e1='llct-'+_0x3410b7(_0x37a1db(_0x3919fe)),_0x21057c=_0x5b9908(_0x3410b7(window['Math']['ceil'](_0x9d5d81/_0x4fc327)));window['localStorage']['setItem'](_0x1806e1,_0x21057c);}function _0x46948b(){const _0x5c89ce='llct-'+_0x3410b7(_0x37a1db(_0x3919fe)),_0xbcca28=window['localStorage']['getItem'](_0x5c89ce);return _0xbcca28?window['parseInt'](_0x5b9908(_0xbcca28),0x10)*_0x4fc327:null;}function _0x16c277(_0x5534e5){return new window['Promise']((_0x232dd2,_0x4f62f9)=>{_0x5534e5['then'](_0x232dd2,_0x4f62f9),window['setTimeout'](_0x4f62f9,0x1d4c0);});}}_0x7e14ab['on']('_sendUsageRequest',(_0x905ac4,_0x428daf)=>{if(_0x428daf[0x0]!=_0x3919fe)return _0x5e9656('UsageLimit');_0x428daf[0x1]={..._0x428daf[0x1],'requestId':_0x5646eb};},{'priority':'high'}),_0x7e14ab['on']('_sendUsageRequest',_0x4a914d=>{_0x499e60(_0x4a914d['return'])&&(_0x5b45f9=!0x0,_0x44c4fe(_0x4a914d['return']));},{'priority':'low'}),_0x16f48d['then'](()=>{_0x5b45f9||_0x5e9656('UsageLimit');});});function _0x17461c(){return'auto'==_0x7e14ab['editing']['view']['_overlayModeHint'];}function _0x1c0299(){_0x7e14ab['editing']['view']['_overlayModeHint']='auto';}}function _0x10e822(_0x4f4e49){const _0x4ce199=[new window['Promise'](_0x156c1d=>setTimeout(_0x156c1d,0x93ecc)),_0x16f48d['then'](()=>new window['Promise'](_0x53fb11=>{let _0x13b76b=0x0;_0x7e14ab['model']['on']('applyOperation',(_0x1ab350,_0x47ebd4)=>{_0x47ebd4[0x0]['isDocumentOperation']&&_0x13b76b++,0x5e8==_0x13b76b&&(_0x53fb11(),_0x1ab350['off']());});}))];return window['Promise']['race'](_0x4ce199)['then'](()=>_0x4f4e49);}async function _0x1da3d8(){await _0x16f48d,_0x7e14ab['model']['change']=_0x5a429b,_0x7e14ab['model']['enqueueChange']=_0x5a429b,_0x7e14ab['enableReadOnlyMode']('model');}function _0x30d78a(){return window['glob']&&window['glob']['triliumVersion'];}function _0x52bd3a(_0x405c77){const _0x24a6ec=_0x50f6c1();_0x7e14ab[_0x24a6ec]='slashCommandLicenseKey'+_0x405c77,'Valid'!=_0x405c77&&_0x1da3d8();}function _0x50f6c1(){const _0x58cd2a=window['String'](window['performance']['now']())['replace']('.','');let _0x51bf58='u';for(let _0x11ecd3=0x0;_0x11ecd3<_0x58cd2a['length'];_0x11ecd3+=0x2){let _0xba85ff=window['parseInt'](_0x58cd2a['substring'](_0x11ecd3,_0x11ecd3+0x2));_0xba85ff>=0x3e&&(_0xba85ff-=0x3e),_0x51bf58+=_0x6568ea[_0xba85ff];}return _0x51bf58;}function _0x454d0d(){const _0x337522=_0x5df41d['split']('.');if(0x3!=_0x337522['length'])return null;return _0x460292(_0x337522[0x1]);function _0x460292(_0x211b03){const _0xc152c4=_0x1007d8(_0x211b03);return _0xc152c4&&_0x44835c()?_0xc152c4:null;function _0x44835c(){const _0x44bbee=_0xc152c4['jti'],_0x2f2dfa=window['parseInt'](_0x44bbee['substring'](_0x44bbee['length']-0x8),0x10),_0x7bf022={..._0xc152c4,'jti':_0x44bbee['substring'](0x0,_0x44bbee['length']-0x8)};return delete _0x7bf022['vc'],_0x37a1db(_0x7bf022)==_0x2f2dfa;}}}async function _0x57306d(){let _0x229220=!0x0;try{const [_0x31703f,_0x39efb3,_0xc18aa2]=_0x5df41d['split']('.');return _0x582153(_0x31703f),await _0xe3a222(_0x31703f,_0x39efb3,_0xc18aa2),_0x229220;}catch{return!0x1;}function _0x582153(_0x46652e){const _0x32b545=_0x1007d8(_0x46652e);_0x32b545&&'ES256'==_0x32b545['alg']||(_0x229220=!0x1);}async function _0xe3a222(_0x20f06d,_0x40f0c0,_0x2c6f4e){const _0x2053d1=window['Uint8Array']['from'](_0x5da4e0(_0x2c6f4e),_0x49d47c=>_0x49d47c['charCodeAt'](0x0)),_0x28b7c0=new window['TextEncoder']()['encode'](_0x20f06d+'.'+_0x40f0c0),_0x5d7f63=window['crypto']['subtle'];if(!_0x5d7f63)return;const _0x35443c=await _0x5d7f63['importKey']('jwk',_0x35a83b,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5d7f63['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x35443c,_0x2053d1,_0x28b7c0)||(_0x229220=!0x1);}}function _0x1007d8(_0x2b1bb1){return _0x2b1bb1['startsWith']('ey')?JSON['parse'](_0x5da4e0(_0x2b1bb1)):null;}function _0x5da4e0(_0x51be3f){return window['atob'](_0x51be3f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x37a1db(_0x40c4fd){let _0x27306b=0x1505;function _0x134809(_0x18616b){for(let _0x386363=0x0;_0x386363<_0x18616b['length'];_0x386363++){const _0x434071=_0x18616b['charCodeAt'](_0x386363);_0x27306b=(_0x27306b<<0x5)+_0x27306b+_0x434071,_0x27306b&=_0x27306b;}}function _0x37d834(_0x3dd732){Array['isArray'](_0x3dd732)?_0x3dd732['forEach'](_0x37d834):_0x3dd732&&'object'==typeof _0x3dd732?Object['entries'](_0x3dd732)['sort']()['forEach'](([_0x10fe08,_0xdab444])=>{_0x134809(_0x10fe08),_0x37d834(_0xdab444);}):_0x134809(window['String'](_0x3dd732));}return _0x37d834(_0x40c4fd),_0x27306b>>>0x0;}function _0x3410b7(_0x53bb46){return _0x53bb46['toString'](0x10)['padStart'](0x8,'0');}function _0x5b9908(_0x5df60f){return _0x5df60f['split']('')['reverse']()['join']('');}function _0x5a429b(){}_0x52bd3a(await _0x3b43e5());}(this);}['getAllowedCommands'](){return this['_allowedCommands'];}['getDefaultCommands'](){const _0x182e4a=_0x45ea69=>function(_0x381582,_0x141484){const t=_0x381582['t'],_0x4e9873=_0x381582['t'];switch(_0x141484){case'AI\x20Assistant':return _0x4e9873('AI\x20Assistant');case'Block\x20quote':return _0x4e9873('Block\x20quote');case'Bulleted\x20List':return _0x4e9873('Bulleted\x20List');case'Insert\x20code\x20block':return _0x4e9873('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x4e9873('Open\x20file\x20manager');case'Insert\x20image':return _0x4e9873('Insert\x20image');case'Heading\x201':return _0x4e9873('Heading\x201');case'Heading\x202':return _0x4e9873('Heading\x202');case'Heading\x203':return _0x4e9873('Heading\x203');case'Heading\x204':return _0x4e9873('Heading\x204');case'Heading\x205':return _0x4e9873('Heading\x205');case'Heading\x206':return _0x4e9873('Heading\x206');case'Horizontal\x20line':return _0x4e9873('Horizontal\x20line');case'Insert\x20HTML':return _0x4e9873('Insert\x20HTML');case'Increase\x20indent':return _0x4e9873('Increase\x20indent');case'Insert\x20table':return _0x4e9873('Insert\x20table');case'Table\x20of\x20contents':return _0x4e9873('Table\x20of\x20contents');case'Numbered\x20List':return _0x4e9873('Numbered\x20List');case'Decrease\x20indent':return _0x4e9873('Decrease\x20indent');case'Paragraph':return _0x4e9873('Paragraph');case'To-do\x20List':return _0x4e9873('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 _0x141484;}}(this['editor']['locale'],_0x45ea69);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x1c85d5,'title':_0x182e4a('AI\x20Assistant'),'description':_0x182e4a('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x2d7df6=>{setTimeout(()=>_0x2d7df6['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x461789,'title':_0x182e4a('Block\x20quote'),'description':_0x182e4a('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x9eb4a8,'title':_0x182e4a('Bulleted\x20List'),'description':_0x182e4a('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x1e7af7,'title':_0x182e4a('Insert\x20code\x20block'),'description':_0x182e4a('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x2c7f75,'title':_0x182e4a('Open\x20file\x20manager'),'description':_0x182e4a('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x2c7f75,'title':_0x182e4a('Insert\x20image'),'description':_0x182e4a('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x4d041c,'title':_0x182e4a('Emoji'),'description':_0x182e4a('Insert\x20an\x20emoji'),'execute':_0x1ecd1a=>{setTimeout(()=>_0x1ecd1a['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x231a0b,'title':_0x182e4a('Heading\x201'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x201'),'execute':_0x1b10bd=>{_0x1b10bd['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x3b0cb6,'title':_0x182e4a('Heading\x202'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x202'),'execute':_0x2c19c2=>{_0x2c19c2['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x788608,'title':_0x182e4a('Heading\x203'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x203'),'execute':_0x546f8e=>{_0x546f8e['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x220951,'title':_0x182e4a('Heading\x204'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x204'),'execute':_0x3b7535=>{_0x3b7535['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x51e598,'title':_0x182e4a('Heading\x205'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x205'),'execute':_0x53d930=>{_0x53d930['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x5376d9,'title':_0x182e4a('Heading\x206'),'description':_0x182e4a('Create\x20a\x20heading\x20level\x206'),'execute':_0x116b26=>{_0x116b26['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x20c0ca,'title':_0x182e4a('Horizontal\x20line'),'description':_0x182e4a('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x25751d,'title':_0x182e4a('Insert\x20HTML'),'description':_0x182e4a('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x4b5fef,'title':_0x182e4a('Increase\x20indent'),'description':_0x182e4a('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x182e4a('Insert\x20Mermaid\x20diagram'),'description':_0x182e4a('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x46b6bc,'title':_0x182e4a('Insert\x20table'),'description':_0x182e4a('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0xb71f31,'title':_0x182e4a('Table\x20of\x20contents'),'description':_0x182e4a('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x595c61,'title':_0x182e4a('Numbered\x20List'),'description':_0x182e4a('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x3a605e,'title':_0x182e4a('Decrease\x20indent'),'description':_0x182e4a('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x63298f,'title':_0x182e4a('Paragraph'),'description':_0x182e4a('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0xc37455,'title':_0x182e4a('To-do\x20List'),'description':_0x182e4a('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x486a11,'title':_0x182e4a('Footnote'),'description':_0x182e4a('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0xa28910){return _0xa28910['isEnabled']?_0xa28910['isEnabled'](this['editor']):!_0xa28910['commandName']||this['editor']['commands']['get'](_0xa28910['commandName'])['isEnabled'];}['_proxyExecute'](_0x17312b){if(_0x17312b['execute'])_0x17312b['execute'](this['editor']);else{if(!_0x17312b['commandName'])throw new _0x4aee0f('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x17312b});this['editor']['execute'](_0x17312b['commandName']);}}};function E(_0x7b8e42,_0x2cb6e8){return _0x7b8e42['title']<_0x2cb6e8['title']?-0x1:_0x7b8e42['title']>_0x2cb6e8['title']?0x1:0x0;}function P(_0x320873,_0x24926d){return _0x24926d+'-'+_0x320873['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x585af2{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[O];}['getMatchingCommands'](_0x312c63){const _0x5bd396=_0x312c63&&_0x312c63['toLowerCase']();let _0x233332=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x233332=_0x233332['filter'](_0x5f58a3=>_0x5f58a3['isEnabled']()),_0x5bd396){const _0x5ab015=[],_0x5bff99=[],_0x12a54c=[],_0xfe1e06=[];for(const _0x1592b7 of _0x233332)_0x1592b7['id']['toLowerCase']()['includes'](_0x5bd396)?_0x5ab015['push'](_0x1592b7):_0x1592b7['title']['toLowerCase']()['includes'](_0x5bd396)?_0x5bff99['push'](_0x1592b7):_0x1592b7['aliases']&&_0x1592b7['aliases']['some'](_0x58417a=>_0x58417a['toLowerCase']()['includes'](_0x5bd396))?_0x12a54c['push'](_0x1592b7):_0x1592b7['description']&&_0x1592b7['description']['toLowerCase']()['includes'](_0x5bd396)&&_0xfe1e06['push'](_0x1592b7);_0x233332=_0x5ab015['concat'](_0x5bff99,_0x12a54c,_0xfe1e06);}return _0x233332;}},M=class extends _0x1225c1{constructor(_0x26c70e,_0x312801){super(_0x26c70e),this['textPartView']=this['_createTextPartView'](_0x26c70e,_0x312801),void 0x0!==_0x312801['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x312801['isIconColorInherited']),this['set']({'icon':_0x312801['icon']||_0x49bb3c,'withText':!0x0,'label':_0x312801['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}['_createTextPartView'](_0x437b3d,_0x105000){const _0x4620b2=new _0xe51416(_0x437b3d);return _0x4620b2['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x105000['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x105000['description']}]}]:[this['labelView']]}),_0x4620b2;}},S=class extends _0x585af2{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34abc0){super(_0x34abc0),this['_setupMentionConfiguration']();}['init'](){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53cbdd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x39ecc4;for(const _0x37c3c4 in _0x53cbdd){const _0x2f1314=_0x37c3c4,_0x1ed425=_0x53cbdd[_0x2f1314];if('slashCommandLicenseKeyValid'==_0x1ed425||'slashCommandLicenseKeyInvalid'==_0x1ed425||'slashCommandLicenseKeyExpired'==_0x1ed425||'slashCommandLicenseKeyDomainLimit'==_0x1ed425||'slashCommandLicenseKeyNotAllowed'==_0x1ed425||'slashCommandLicenseKeyEvaluationLimit'==_0x1ed425||'slashCommandLicenseKeyUsageLimit'==_0x1ed425){delete _0x53cbdd[_0x2f1314],_0x39ecc4=_0x1ed425,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x39ecc4&&_0x53cbdd['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_setupMentionConfiguration'](){const _0x57688f=this['editor'],_0x4edb81=this['editor']['plugins']['get']('SlashCommandEditing'),_0x3e493d=_0x57688f['config']['get']('mention.feeds');_0x3e493d['push']({'marker':'/','feed':_0x433b29=>_0x4edb81['getMatchingCommands'](_0x433b29),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x57688f['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x57688f['config']['set']('mention.feeds',_0x3e493d);}['_overrideMentionExecuteListener'](){const _0x55e9d7=this['editor'];_0x55e9d7['commands']['get']('mention')['on']('execute',(_0x547e19,_0x1c2af3)=>{const _0x5ccf42=_0x1c2af3[0x0],_0xdc043f=_0x55e9d7['model'];'/'===_0x5ccf42['marker']&&_0xdc043f['change'](_0x1986fe=>{_0x1986fe['remove'](_0x5ccf42['range']),_0x5ccf42['mention']['execute'](),_0x547e19['stop']();});},{'priority':'high'});}['_customItemRenderer'](_0x5328a9){const _0x3fa14b=this['editor']['locale'],_0x4074a5=new M(_0x3fa14b,_0x5328a9);return _0x4074a5['render'](),_0x4074a5['element'];}},D=class extends _0x585af2{static get['requires'](){return[_0x340f62,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.0",
3
+ "version": "48.3.0-alpha.1",
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.0",
25
- "@ckeditor/ckeditor5-heading": "48.3.0-alpha.0",
26
- "@ckeditor/ckeditor5-icons": "48.3.0-alpha.0",
27
- "@ckeditor/ckeditor5-mention": "48.3.0-alpha.0",
28
- "@ckeditor/ckeditor5-style": "48.3.0-alpha.0",
29
- "@ckeditor/ckeditor5-template": "48.3.0-alpha.0",
30
- "@ckeditor/ckeditor5-ui": "48.3.0-alpha.0",
31
- "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0"
24
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
25
+ "@ckeditor/ckeditor5-heading": "48.3.0-alpha.1",
26
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
27
+ "@ckeditor/ckeditor5-mention": "48.3.0-alpha.1",
28
+ "@ckeditor/ckeditor5-style": "48.3.0-alpha.1",
29
+ "@ckeditor/ckeditor5-template": "48.3.0-alpha.1",
30
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
31
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.1"
32
32
  },
33
33
  "files": [
34
34
  "dist",