@ckeditor/ckeditor5-template 48.3.0-alpha.4 → 48.3.0-alpha.5
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 +6 -6
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x312c33,Plugin as _0x5b906d}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x549879,IconTemplateGeneric as _0x7a7bbf}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0xbf1458,HighlightedTextView as _0xf6ca49,ListItemView as _0x4dda36,ListView as _0x38982f,MenuBarMenuListItemButtonView as _0x26273c,MenuBarMenuListItemView as _0x3ba19f,MenuBarMenuListView as _0x377d99,MenuBarMenuView as _0x5148a5,SearchTextView as _0x212c62,View as _0x18e169,createDropdown as _0x573f61}from'@ckeditor/ckeditor5-ui';import{uid as _0x4a8b05}from'@ckeditor/ckeditor5-utils';var g=class extends _0x312c33{['execute'](_0x37b1d7){const {model:_0x5e414a}=this['editor'];let _0x259389;switch(typeof _0x37b1d7){case'string':_0x259389=_0x37b1d7;break;case'function':_0x259389=_0x37b1d7();}'string'==typeof _0x259389&&_0x5e414a['change'](()=>{const _0x445615=this['editor']['data']['htmlProcessor']['toView'](_0x259389),_0x1f8106=_0x5e414a['document']['selection']['getFirstPosition']()['root'],_0x4fb583=this['editor']['data']['toModel'](_0x445615,_0x1f8106);_0x5e414a['insertContent'](_0x4fb583);});}},y=class extends _0x5b906d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x41a837}=this;_0x41a837['commands']['add']('insertTemplate',new g(_0x41a837)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x143fb5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x111aa7;for(const _0x56e12e in _0x143fb5){const _0x59c86f=_0x56e12e,_0x18f5ad=_0x143fb5[_0x59c86f];if('templateLicenseKeyValid'==_0x18f5ad||'templateLicenseKeyInvalid'==_0x18f5ad||'templateLicenseKeyExpired'==_0x18f5ad||'templateLicenseKeyDomainLimit'==_0x18f5ad||'templateLicenseKeyNotAllowed'==_0x18f5ad||'templateLicenseKeyEvaluationLimit'==_0x18f5ad||'templateLicenseKeyUsageLimit'==_0x18f5ad){delete _0x143fb5[_0x59c86f],_0x111aa7=_0x18f5ad,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x111aa7&&_0x143fb5['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x111aa7&&_0x143fb5['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x111aa7&&_0x143fb5['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x111aa7&&_0x143fb5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x38982f{['filter'](_0x590830){if(!_0x590830)return this['_resetFiltering']();const _0x403d48=new Map(),_0x535242=this['items']['map'](_0x35a8cd=>{const _0x520ed8=_0x35a8cd['buttonView']['isMatching'](_0x590830);return _0x35a8cd['isVisible']=!!_0x520ed8,_0x35a8cd['buttonView']['highlightText'](_0x520ed8?_0x590830:null),_0x520ed8&&_0x403d48['set'](_0x35a8cd,_0x520ed8),_0x35a8cd;})['sort'](v)['sort'](function(_0x34df54){return function(_0x2768e7,_0x5588cd){const _0x4ac5a6=_0x34df54['get'](_0x2768e7),_0x4d8f27=_0x34df54['get'](_0x5588cd);return _0x4ac5a6&&!_0x4d8f27?-0x1:_0x4d8f27&&!_0x4ac5a6?0x1:_0x4ac5a6||_0x4d8f27?_0x4ac5a6['title']&&!_0x4d8f27['title']?-0x1:!_0x4ac5a6['title']&&_0x4d8f27['title']?0x1:0x0:0x0;};}(_0x403d48));return this['items']['clear'](),this['items']['addMany'](_0x535242),{'resultsCount':_0x403d48['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x78823a=this['items']['map'](_0xa46798=>_0xa46798)['sort'](v);return _0x78823a['forEach'](_0x58c70a=>{_0x58c70a['isVisible']=!0x0,_0x58c70a['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x78823a),{'resultsCount':_0x78823a['length'],'totalItemsCount':_0x78823a['length']};}};function v(_0x388ccb,_0x56ac8a){return _0x388ccb['originalIndex']-_0x56ac8a['originalIndex'];}var x=class extends _0x4dda36{['originalIndex'];['buttonView'];constructor(_0x488ef6,_0xa1d00f){super(_0x488ef6),this['originalIndex']=_0xa1d00f,this['buttonView']=null;}},b=class extends _0xbf1458{['templateDefinition'];['textPartView'];constructor(_0x49bbba,_0x27100b){super(_0x49bbba),this['templateDefinition']=_0x27100b,this['textPartView']=null;const {icon:_0x14c4d5=_0x7a7bbf}=_0x27100b;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x14c4d5}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x2e539b){const {title:_0x4c3c15,description:_0x260b45}=this['templateDefinition'],_0x533983=!!_0x4c3c15['match'](_0x2e539b),_0x2cfdef=!(!_0x260b45||!_0x260b45['match'](_0x2e539b));return _0x533983||_0x2cfdef?{'title':_0x533983,'description':_0x2cfdef}:null;}['highlightText'](_0x465335){this['textPartView']['highlightText'](_0x465335);}},k=class extends _0x18e169{constructor(_0x4592dd,_0x5330ca,_0x2fc309){super(_0x4592dd),this['title']=_0x5330ca['title'],this['description']=_0x5330ca['description'],this['titleView']=new _0xf6ca49(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x2fc309}});const _0xfd9ea5=[this['titleView']];this['description']&&(this['descriptionView']=new _0xf6ca49(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0xfd9ea5['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0xfd9ea5});}['highlightText'](_0x5a81ef){this['titleView']['highlightText'](_0x5a81ef),this['description']&&this['descriptionView']['highlightText'](_0x5a81ef);}};function I(_0x50c005,_0x1af4a9,..._0x3eecd3){const t=_0x50c005['t'];switch(_0x1af4a9){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x3eecd3);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0x3eecd3);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x1af4a9;}}var T=class extends _0x5b906d{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4898f0}=this,_0x259b51=_0x4898f0['config']['get']('template.definitions')||[];_0x4898f0['ui']['componentFactory']['add']('insertTemplate',_0x47e00f=>{const _0x26826f=_0x573f61(_0x47e00f),_0x2025ef=new _0x212c62(_0x47e00f,{'filteredView':this['_createTemplateListView'](_0x47e00f,_0x259b51),'queryView':{'label':I(_0x47e00f,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x586098=>I(_0x47e00f,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x586098),'secondary':I(_0x47e00f,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x47e00f,'No\x20templates\x20available.')}}}}),_0x2d04ac=_0x4898f0['commands']['get']('insertTemplate');return _0x2025ef['on']('search',(_0x4d035c,_0x113a93)=>{_0x113a93['query']&&_0x113a93['query']['length']&&_0x4898f0['ui']['ariaLiveAnnouncer']['announce'](I(_0x47e00f,'%0\x20templates\x20found',_0x113a93['resultsCount']));}),_0x26826f['bind']('isEnabled')['to'](_0x2d04ac),_0x26826f['panelView']['children']['add'](_0x2025ef),_0x26826f['buttonView']['set']({'label':I(_0x47e00f,'Insert\x20template'),'icon':_0x549879,'tooltip':!0x0}),_0x26826f['on']('change:isOpen',(_0x1136c9,_0x2ce87a,_0x4ce39e)=>{_0x4ce39e||_0x2025ef['reset']();}),_0x26826f;}),_0x4898f0['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x4431d4=>{const _0x85414f=_0x4898f0['commands']['get']('insertTemplate'),_0x50de7a=new _0x5148a5(_0x4431d4);_0x50de7a['buttonView']['set']({'label':I(_0x4431d4,'Template'),'icon':_0x549879});const _0x34e7f5=new _0x377d99(_0x4431d4);if(!_0x259b51||!_0x259b51['length']){const _0x1dd281=new _0x3ba19f(_0x4431d4,_0x50de7a),_0x3077e6=new _0x26273c(_0x4431d4);_0x3077e6['set']({'label':I(_0x4431d4,'No\x20templates\x20available.')}),_0x3077e6['delegate']('execute')['to'](_0x50de7a),_0x3077e6['on']('execute',()=>{_0x4898f0['editing']['view']['focus']();}),_0x1dd281['children']['add'](_0x3077e6),_0x34e7f5['items']['add'](_0x1dd281);}for(const _0x56628d of _0x259b51){const _0x37de31=new _0x3ba19f(_0x4431d4,_0x50de7a),_0xbf28df=new _0x26273c(_0x4431d4);_0xbf28df['set']({'class':'ck-template-button','label':_0x56628d['title'],'icon':_0x56628d['icon']||_0x7a7bbf}),_0xbf28df['delegate']('execute')['to'](_0x50de7a),_0xbf28df['on']('execute',()=>{_0x4898f0['execute']('insertTemplate',_0x56628d['data']),_0x4898f0['editing']['view']['focus']();}),_0x37de31['children']['add'](_0xbf28df),_0x34e7f5['items']['add'](_0x37de31);}return _0x50de7a['panelView']['children']['add'](_0x34e7f5),_0x50de7a['bind']('isEnabled')['to'](_0x85414f,'isEnabled'),_0x50de7a;});}['afterInit'](){!async function(_0xd7c25a){const _0x5864c3='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x43936a=0x78e28,_0x3b8a7b=window['Date']['now'](),_0x395676=_0xd7c25a['editor'],_0x5aa63f=new window['Promise'](_0x4ededd=>{_0x395676['once']('ready',_0x4ededd);}),_0x23e2bd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5c44a1=_0x395676['config']['get']('licenseKey');async function _0x3fce10(){let _0xf36260,_0x356e44=null,_0x10eeb8=null;try{return'GPL'==_0x5c44a1?'NotAllowed':(_0xf36260=_0x1c3e30(),_0xf36260?(_0xf36260['usageEndpoint']&&(_0x10eeb8=_0x23fb64(_0xf36260['usageEndpoint'],_0xf36260['jti'])),await _0x33538e()?_0x2df387()?_0x3994c1()?'Expired':_0x206455()?('evaluation'==_0xf36260['licenseType']&&(_0x356e44=_0x3703a8('EvaluationLimit')),await _0x3e2387()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3994c1(){const _0x6c1adf=['evaluation','trial']['includes'](_0xf36260['licenseType'])?_0x3b8a7b/0x3e8:0xe10*_0x43936a;return _0xf36260['exp']<_0x6c1adf;}function _0x2df387(){const _0x440891=_0xf36260['features'];return!!_0x440891&&(!!_0x440891['includes']('*')||(!!_0x440891['includes']('TPL')||(!!_0x440891['includes']('PP')||(!(!_0x440891['includes']('DRUP')||!_0x42c652())||!(!_0x440891['includes']('TRILIUM')||!_0x5026b7())))));}function _0x206455(){const _0x229636=_0xf36260['licensedHosts'];if(!_0x229636||0x0==_0x229636['length'])return!0x0;const {hostname:_0x20cb02}=new URL(window['location']['href']);if(_0x229636['includes'](_0x20cb02))return!0x0;const _0x4d175a=_0x20cb02['split']('.');return _0x229636['filter'](_0x4598df=>_0x4598df['includes']('*'))['map'](_0x4f13d2=>_0x4f13d2['split']('.'))['filter'](_0x57b0a2=>_0x57b0a2['length']<=_0x4d175a['length'])['map'](_0x57cc3e=>Array(_0x4d175a['length']-_0x57cc3e['length'])['fill']('*'===_0x57cc3e[0x0]?'*':'')['concat'](_0x57cc3e))['some'](_0x3c16bb=>_0x4d175a['every']((_0x3253af,_0x316b60)=>_0x3c16bb[_0x316b60]===_0x3253af||'*'===_0x3c16bb[_0x316b60]));}function _0x3e2387(){return _0x356e44&&_0x10eeb8?new window['Promise']((_0x4de57d,_0x5ef80b)=>{_0x356e44['then'](_0x4de57d,_0x5ef80b),_0x10eeb8['then'](_0x13f968=>{'Valid'!=_0x13f968&&_0x4de57d(_0x13f968);},_0x5ef80b);}):_0x356e44||_0x10eeb8||'Valid';}}function _0x23fb64(_0x569a9e,_0x722125){return new window['Promise'](_0x3560dc=>{if(_0x37cb5f())return _0x3560dc('Valid');_0x2d930c(),_0x395676['decorate']('_sendUsageRequest');let _0x3899e8=!0x1;const _0x3d0a38=_0x4a8b05();function _0x285418(_0xa00299){return!!_0xa00299&&('object'==typeof _0xa00299||'function'==typeof _0xa00299)&&'function'==typeof _0xa00299['then']&&'function'==typeof _0xa00299['catch'];}function _0xe0ca5f(_0x1faf63){_0x2ee071(_0x1faf63)['then'](_0x2a73a7=>_0x2a73a7&&'ok'==_0x2a73a7['status']?_0x7f4591(_0x312c57(_0x3d0a38+_0x722125))!=_0x2a73a7['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3e5955=>(_0x41ea2d(),_0x3e5955),()=>{const _0x408d54=_0x5e3e8f();return null==_0x408d54?(_0x41ea2d(),'Valid'):_0x3b8a7b-_0x408d54>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3560dc)['catch'](()=>{_0x3560dc('UsageLimit');});const _0x27c731=0x36ee80;function _0x41ea2d(){const _0x481f8f='llct-'+_0x7f4591(_0x312c57(_0x569a9e)),_0x3ddaee=_0x45d369(_0x7f4591(window['Math']['ceil'](_0x3b8a7b/_0x27c731)));window['localStorage']['setItem'](_0x481f8f,_0x3ddaee);}function _0x5e3e8f(){const _0x5c4c18='llct-'+_0x7f4591(_0x312c57(_0x569a9e)),_0x11c707=window['localStorage']['getItem'](_0x5c4c18);return _0x11c707?window['parseInt'](_0x45d369(_0x11c707),0x10)*_0x27c731:null;}function _0x2ee071(_0x31015a){return new window['Promise']((_0x1c4545,_0xb35fa8)=>{_0x31015a['then'](_0x1c4545,_0xb35fa8),window['setTimeout'](_0xb35fa8,0x1d4c0);});}}_0x395676['on']('_sendUsageRequest',(_0x33a21f,_0x430245)=>{if(_0x430245[0x0]!=_0x569a9e)return _0x3560dc('UsageLimit');_0x430245[0x1]={..._0x430245[0x1],'requestId':_0x3d0a38};},{'priority':'high'}),_0x395676['on']('_sendUsageRequest',_0x25dd0a=>{_0x285418(_0x25dd0a['return'])&&(_0x3899e8=!0x0,_0xe0ca5f(_0x25dd0a['return']));},{'priority':'low'}),_0x5aa63f['then'](()=>{_0x3899e8||_0x3560dc('UsageLimit');});});function _0x37cb5f(){return'auto'==_0x395676['editing']['view']['_overlayModeHint'];}function _0x2d930c(){_0x395676['editing']['view']['_overlayModeHint']='auto';}}function _0x3703a8(_0x5a70aa){const _0x484941=[new window['Promise'](_0x378d2e=>setTimeout(_0x378d2e,0x93ecc)),_0x5aa63f['then'](()=>new window['Promise'](_0x5ed7bc=>{let _0x407f96=0x0;_0x395676['model']['on']('applyOperation',(_0x2e3357,_0x1fc888)=>{_0x1fc888[0x0]['isDocumentOperation']&&_0x407f96++,0x5e8==_0x407f96&&(_0x5ed7bc(),_0x2e3357['off']());});}))];return window['Promise']['race'](_0x484941)['then'](()=>_0x5a70aa);}async function _0x1c9ace(){await _0x5aa63f,_0x395676['model']['change']=_0x40c868,_0x395676['model']['enqueueChange']=_0x40c868,_0x395676['enableReadOnlyMode']('model');}function _0x42c652(){return window['Drupal'];}function _0x5026b7(){return window['glob']&&window['glob']['triliumVersion'];}function _0x530de1(_0x255a42){const _0x1679d2=_0x3fee7a();_0x395676[_0x1679d2]='templateLicenseKey'+_0x255a42,'Valid'!=_0x255a42&&_0x1c9ace();}function _0x3fee7a(){const _0x37eadb=window['String'](window['performance']['now']())['replace']('.','');let _0x3c9a82='g';for(let _0x1f4cdb=0x0;_0x1f4cdb<_0x37eadb['length'];_0x1f4cdb+=0x2){let _0x22caeb=window['parseInt'](_0x37eadb['substring'](_0x1f4cdb,_0x1f4cdb+0x2));_0x22caeb>=0x3e&&(_0x22caeb-=0x3e),_0x3c9a82+=_0x5864c3[_0x22caeb];}return _0x3c9a82;}function _0x1c3e30(){const _0x2b3baa=_0x5c44a1['split']('.');if(0x3!=_0x2b3baa['length'])return null;return _0x382400(_0x2b3baa[0x1]);function _0x382400(_0x2119ab){const _0x1faf48=_0x41bae0(_0x2119ab);return _0x1faf48&&_0x281f55()?_0x1faf48:null;function _0x281f55(){const _0x189b8e=_0x1faf48['jti'],_0x3430d1=window['parseInt'](_0x189b8e['substring'](_0x189b8e['length']-0x8),0x10),_0x3f02b4={..._0x1faf48,'jti':_0x189b8e['substring'](0x0,_0x189b8e['length']-0x8)};return delete _0x3f02b4['vc'],_0x312c57(_0x3f02b4)==_0x3430d1;}}}async function _0x33538e(){let _0x49ba25=!0x0;try{const [_0x565639,_0x2a7903,_0x46b87a]=_0x5c44a1['split']('.');return _0x37f2a6(_0x565639),await _0x12f790(_0x565639,_0x2a7903,_0x46b87a),_0x49ba25;}catch{return!0x1;}function _0x37f2a6(_0x830ef5){const _0x118f06=_0x41bae0(_0x830ef5);_0x118f06&&'ES256'==_0x118f06['alg']||(_0x49ba25=!0x1);}async function _0x12f790(_0x2eb1b0,_0x5c6542,_0x79120){const _0x25ae91=window['Uint8Array']['from'](_0x102054(_0x79120),_0x4870b1=>_0x4870b1['charCodeAt'](0x0)),_0x4715f5=new window['TextEncoder']()['encode'](_0x2eb1b0+'.'+_0x5c6542),_0x3f36c2=window['crypto']['subtle'];if(!_0x3f36c2)return;const _0x9dc79d=await _0x3f36c2['importKey']('jwk',_0x23e2bd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3f36c2['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x9dc79d,_0x25ae91,_0x4715f5)||(_0x49ba25=!0x1);}}function _0x41bae0(_0x240a57){return _0x240a57['startsWith']('ey')?JSON['parse'](_0x102054(_0x240a57)):null;}function _0x102054(_0x1a703f){return window['atob'](_0x1a703f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x312c57(_0x40af07){let _0x3353b2=0x1505;function _0x332407(_0x5670a4){for(let _0x28f6c4=0x0;_0x28f6c4<_0x5670a4['length'];_0x28f6c4++){const _0x3646b2=_0x5670a4['charCodeAt'](_0x28f6c4);_0x3353b2=(_0x3353b2<<0x5)+_0x3353b2+_0x3646b2,_0x3353b2&=_0x3353b2;}}function _0x21b3d9(_0x42b54f){Array['isArray'](_0x42b54f)?_0x42b54f['forEach'](_0x21b3d9):_0x42b54f&&'object'==typeof _0x42b54f?Object['entries'](_0x42b54f)['sort']()['forEach'](([_0x1c8781,_0x31acba])=>{_0x332407(_0x1c8781),_0x21b3d9(_0x31acba);}):_0x332407(window['String'](_0x42b54f));}return _0x21b3d9(_0x40af07),_0x3353b2>>>0x0;}function _0x7f4591(_0x377373){return _0x377373['toString'](0x10)['padStart'](0x8,'0');}function _0x45d369(_0x4d5d53){return _0x4d5d53['split']('')['reverse']()['join']('');}function _0x40c868(){}_0x530de1(await _0x3fce10());}(this);}['_createTemplateListView'](_0x555f14,_0x35ecd5){const {editor:_0x338fd9}=this,_0x353644=new L(_0x555f14);return _0x353644['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x353644['items']['addMany'](_0x35ecd5['map']((_0x2cda0a,_0x137a4d)=>{const _0x5b28e3=new x(_0x555f14,_0x137a4d),_0x10e5ea=new b(_0x555f14,_0x2cda0a);return _0x5b28e3['buttonView']=_0x10e5ea,_0x5b28e3['children']['add'](_0x10e5ea),_0x5b28e3['buttonView']['on']('execute',_0x276408=>{_0x338fd9['execute']('insertTemplate',_0x276408['source']['templateDefinition']['data']),_0x338fd9['editing']['view']['focus']();}),_0x5b28e3;})),_0x353644;}},K=class extends _0x5b906d{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
|
23
|
+
import{Command as _0x37daa3,Plugin as _0x23211f}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x82ffff,IconTemplateGeneric as _0x77fdf5}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x5ee83d,HighlightedTextView as _0x21d4d9,ListItemView as _0x387190,ListView as _0x545831,MenuBarMenuListItemButtonView as _0x4057f1,MenuBarMenuListItemView as _0x532bdb,MenuBarMenuListView as _0x5e7ce4,MenuBarMenuView as _0x4b4b6d,SearchTextView as _0x6584f7,View as _0x22a67b,createDropdown as _0x1526ab}from'@ckeditor/ckeditor5-ui';import{uid as _0x49f129}from'@ckeditor/ckeditor5-utils';var g=class extends _0x37daa3{['execute'](_0x5aa68c){const {model:_0xd0bb9c}=this['editor'];let _0x2d01b9;switch(typeof _0x5aa68c){case'string':_0x2d01b9=_0x5aa68c;break;case'function':_0x2d01b9=_0x5aa68c();}'string'==typeof _0x2d01b9&&_0xd0bb9c['change'](()=>{const _0x4437a7=this['editor']['data']['htmlProcessor']['toView'](_0x2d01b9),_0x36d427=_0xd0bb9c['document']['selection']['getFirstPosition']()['root'],_0x41ba36=this['editor']['data']['toModel'](_0x4437a7,_0x36d427);_0xd0bb9c['insertContent'](_0x41ba36);});}},y=class extends _0x23211f{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c4062}=this;_0x2c4062['commands']['add']('insertTemplate',new g(_0x2c4062)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13cfe6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2f66ee;for(const _0x19245a in _0x13cfe6){const _0x5c8060=_0x19245a,_0xb31dc9=_0x13cfe6[_0x5c8060];if('templateLicenseKeyValid'==_0xb31dc9||'templateLicenseKeyInvalid'==_0xb31dc9||'templateLicenseKeyExpired'==_0xb31dc9||'templateLicenseKeyDomainLimit'==_0xb31dc9||'templateLicenseKeyNotAllowed'==_0xb31dc9||'templateLicenseKeyEvaluationLimit'==_0xb31dc9||'templateLicenseKeyUsageLimit'==_0xb31dc9){delete _0x13cfe6[_0x5c8060],_0x2f66ee=_0xb31dc9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x2f66ee&&_0x13cfe6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x545831{['filter'](_0x3e0a9c){if(!_0x3e0a9c)return this['_resetFiltering']();const _0x11c3ef=new Map(),_0x4a224f=this['items']['map'](_0x17c5cd=>{const _0x5b949c=_0x17c5cd['buttonView']['isMatching'](_0x3e0a9c);return _0x17c5cd['isVisible']=!!_0x5b949c,_0x17c5cd['buttonView']['highlightText'](_0x5b949c?_0x3e0a9c:null),_0x5b949c&&_0x11c3ef['set'](_0x17c5cd,_0x5b949c),_0x17c5cd;})['sort'](v)['sort'](function(_0x12d27f){return function(_0x2fe8dd,_0x46664a){const _0x1a1ff5=_0x12d27f['get'](_0x2fe8dd),_0x223c2d=_0x12d27f['get'](_0x46664a);return _0x1a1ff5&&!_0x223c2d?-0x1:_0x223c2d&&!_0x1a1ff5?0x1:_0x1a1ff5||_0x223c2d?_0x1a1ff5['title']&&!_0x223c2d['title']?-0x1:!_0x1a1ff5['title']&&_0x223c2d['title']?0x1:0x0:0x0;};}(_0x11c3ef));return this['items']['clear'](),this['items']['addMany'](_0x4a224f),{'resultsCount':_0x11c3ef['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x408fcb=this['items']['map'](_0x5a53ed=>_0x5a53ed)['sort'](v);return _0x408fcb['forEach'](_0x4ddcf1=>{_0x4ddcf1['isVisible']=!0x0,_0x4ddcf1['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x408fcb),{'resultsCount':_0x408fcb['length'],'totalItemsCount':_0x408fcb['length']};}};function v(_0x79f324,_0x1c5ddd){return _0x79f324['originalIndex']-_0x1c5ddd['originalIndex'];}var x=class extends _0x387190{['originalIndex'];['buttonView'];constructor(_0x24073d,_0x480c8c){super(_0x24073d),this['originalIndex']=_0x480c8c,this['buttonView']=null;}},b=class extends _0x5ee83d{['templateDefinition'];['textPartView'];constructor(_0x551dda,_0x32c845){super(_0x551dda),this['templateDefinition']=_0x32c845,this['textPartView']=null;const {icon:_0x515e8c=_0x77fdf5}=_0x32c845;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x515e8c}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x99438c){const {title:_0x4f945a,description:_0x4c81f6}=this['templateDefinition'],_0x36bb31=!!_0x4f945a['match'](_0x99438c),_0x25da58=!(!_0x4c81f6||!_0x4c81f6['match'](_0x99438c));return _0x36bb31||_0x25da58?{'title':_0x36bb31,'description':_0x25da58}:null;}['highlightText'](_0x327196){this['textPartView']['highlightText'](_0x327196);}},k=class extends _0x22a67b{constructor(_0x3b29f3,_0x5dfa18,_0x4b1207){super(_0x3b29f3),this['title']=_0x5dfa18['title'],this['description']=_0x5dfa18['description'],this['titleView']=new _0x21d4d9(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x4b1207}});const _0x17f5cb=[this['titleView']];this['description']&&(this['descriptionView']=new _0x21d4d9(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x17f5cb['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x17f5cb});}['highlightText'](_0x573f8a){this['titleView']['highlightText'](_0x573f8a),this['description']&&this['descriptionView']['highlightText'](_0x573f8a);}};function I(_0x191f08,_0x30d074,..._0x2006ce){const t=_0x191f08['t'];switch(_0x30d074){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x2006ce);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0x2006ce);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x30d074;}}var T=class extends _0x23211f{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5a6c91}=this,_0x5de200=_0x5a6c91['config']['get']('template.definitions')||[];_0x5a6c91['ui']['componentFactory']['add']('insertTemplate',_0x4c2161=>{const _0x17f875=_0x1526ab(_0x4c2161),_0x56ec51=new _0x6584f7(_0x4c2161,{'filteredView':this['_createTemplateListView'](_0x4c2161,_0x5de200),'queryView':{'label':I(_0x4c2161,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x1a2b71=>I(_0x4c2161,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x1a2b71),'secondary':I(_0x4c2161,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x4c2161,'No\x20templates\x20available.')}}}}),_0xc5053=_0x5a6c91['commands']['get']('insertTemplate');return _0x56ec51['on']('search',(_0xabe746,_0x5a77ab)=>{_0x5a77ab['query']&&_0x5a77ab['query']['length']&&_0x5a6c91['ui']['ariaLiveAnnouncer']['announce'](I(_0x4c2161,'%0\x20templates\x20found',_0x5a77ab['resultsCount']));}),_0x17f875['bind']('isEnabled')['to'](_0xc5053),_0x17f875['panelView']['children']['add'](_0x56ec51),_0x17f875['buttonView']['set']({'label':I(_0x4c2161,'Insert\x20template'),'icon':_0x82ffff,'tooltip':!0x0}),_0x17f875['on']('change:isOpen',(_0x2763d6,_0x2a43f1,_0x1c8f90)=>{_0x1c8f90||_0x56ec51['reset']();}),_0x17f875;}),_0x5a6c91['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x2993bf=>{const _0xeef53=_0x5a6c91['commands']['get']('insertTemplate'),_0xf7490=new _0x4b4b6d(_0x2993bf);_0xf7490['buttonView']['set']({'label':I(_0x2993bf,'Template'),'icon':_0x82ffff});const _0x2a841b=new _0x5e7ce4(_0x2993bf);if(!_0x5de200||!_0x5de200['length']){const _0x372dc4=new _0x532bdb(_0x2993bf,_0xf7490),_0x4fe3a0=new _0x4057f1(_0x2993bf);_0x4fe3a0['set']({'label':I(_0x2993bf,'No\x20templates\x20available.')}),_0x4fe3a0['delegate']('execute')['to'](_0xf7490),_0x4fe3a0['on']('execute',()=>{_0x5a6c91['editing']['view']['focus']();}),_0x372dc4['children']['add'](_0x4fe3a0),_0x2a841b['items']['add'](_0x372dc4);}for(const _0x48c4c3 of _0x5de200){const _0x3444ea=new _0x532bdb(_0x2993bf,_0xf7490),_0x1282ec=new _0x4057f1(_0x2993bf);_0x1282ec['set']({'class':'ck-template-button','label':_0x48c4c3['title'],'icon':_0x48c4c3['icon']||_0x77fdf5}),_0x1282ec['delegate']('execute')['to'](_0xf7490),_0x1282ec['on']('execute',()=>{_0x5a6c91['execute']('insertTemplate',_0x48c4c3['data']),_0x5a6c91['editing']['view']['focus']();}),_0x3444ea['children']['add'](_0x1282ec),_0x2a841b['items']['add'](_0x3444ea);}return _0xf7490['panelView']['children']['add'](_0x2a841b),_0xf7490['bind']('isEnabled')['to'](_0xeef53,'isEnabled'),_0xf7490;});}['afterInit'](){!async function(_0x45f35b){const _0x55cf77='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x2e125f=0x78e40,_0x2da7d9=window['Date']['now'](),_0x5b21c8=_0x45f35b['editor'],_0x59f795=new window['Promise'](_0x513428=>{_0x5b21c8['once']('ready',_0x513428);}),_0x83161c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x14d5cd=_0x5b21c8['config']['get']('licenseKey');async function _0xf624ff(){let _0x2b7be4,_0x753fb3=null,_0x239ae0=null;try{return'GPL'==_0x14d5cd?'NotAllowed':(_0x2b7be4=_0x28d257(),_0x2b7be4?(_0x2b7be4['usageEndpoint']&&(_0x239ae0=_0x257958(_0x2b7be4['usageEndpoint'],_0x2b7be4['jti'])),await _0x1bfd9a()?_0x164c10()?_0x20b6fb()?'Expired':_0x30f55b()?('evaluation'==_0x2b7be4['licenseType']&&(_0x753fb3=_0xd4249('EvaluationLimit')),await _0x1df232()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x20b6fb(){const _0xd42e76=['evaluation','trial']['includes'](_0x2b7be4['licenseType'])?_0x2da7d9/0x3e8:0xe10*_0x2e125f;return _0x2b7be4['exp']<_0xd42e76;}function _0x164c10(){const _0x283aa1=_0x2b7be4['features'];return!!_0x283aa1&&(!!_0x283aa1['includes']('*')||(!!_0x283aa1['includes']('TPL')||(!!_0x283aa1['includes']('PP')||(!(!_0x283aa1['includes']('DRUP')||!_0x32cd75())||!(!_0x283aa1['includes']('TRILIUM')||!_0x379654())))));}function _0x30f55b(){const _0x5c0185=_0x2b7be4['licensedHosts'];if(!_0x5c0185||0x0==_0x5c0185['length'])return!0x0;const {hostname:_0x43be1a}=new URL(window['location']['href']);if(_0x5c0185['includes'](_0x43be1a))return!0x0;const _0x2c7120=_0x43be1a['split']('.');return _0x5c0185['filter'](_0x4d806c=>_0x4d806c['includes']('*'))['map'](_0x36efb6=>_0x36efb6['split']('.'))['filter'](_0x4213a7=>_0x4213a7['length']<=_0x2c7120['length'])['map'](_0x4bb13b=>Array(_0x2c7120['length']-_0x4bb13b['length'])['fill']('*'===_0x4bb13b[0x0]?'*':'')['concat'](_0x4bb13b))['some'](_0x138bfa=>_0x2c7120['every']((_0xa02b8b,_0x26491d)=>_0x138bfa[_0x26491d]===_0xa02b8b||'*'===_0x138bfa[_0x26491d]));}function _0x1df232(){return _0x753fb3&&_0x239ae0?new window['Promise']((_0x4cfc95,_0xdb1178)=>{_0x753fb3['then'](_0x4cfc95,_0xdb1178),_0x239ae0['then'](_0x5f4a1b=>{'Valid'!=_0x5f4a1b&&_0x4cfc95(_0x5f4a1b);},_0xdb1178);}):_0x753fb3||_0x239ae0||'Valid';}}function _0x257958(_0x58c86d,_0x58e141){return new window['Promise'](_0xe9c88c=>{if(_0x2bf6e8())return _0xe9c88c('Valid');_0x1c99a0(),_0x5b21c8['decorate']('_sendUsageRequest');let _0x269f99=!0x1;const _0x3e15ea=_0x49f129();function _0x371bae(_0x546a29){return!!_0x546a29&&('object'==typeof _0x546a29||'function'==typeof _0x546a29)&&'function'==typeof _0x546a29['then']&&'function'==typeof _0x546a29['catch'];}function _0x294161(_0x11cca9){_0x4b3aed(_0x11cca9)['then'](_0x39150c=>_0x39150c&&'ok'==_0x39150c['status']?_0x3e3425(_0x1b0634(_0x3e15ea+_0x58e141))!=_0x39150c['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x281944=>(_0x28aa7b(),_0x281944),()=>{const _0x3273c4=_0x18dc56();return null==_0x3273c4?(_0x28aa7b(),'Valid'):_0x2da7d9-_0x3273c4>0x240c8400?'UsageLimit':'Valid';})['then'](_0xe9c88c)['catch'](()=>{_0xe9c88c('UsageLimit');});const _0x29c6ab=0x36ee80;function _0x28aa7b(){const _0x43ccef='llct-'+_0x3e3425(_0x1b0634(_0x58c86d)),_0x33131f=_0x3afbc1(_0x3e3425(window['Math']['ceil'](_0x2da7d9/_0x29c6ab)));window['localStorage']['setItem'](_0x43ccef,_0x33131f);}function _0x18dc56(){const _0x5148b4='llct-'+_0x3e3425(_0x1b0634(_0x58c86d)),_0x19f6a5=window['localStorage']['getItem'](_0x5148b4);return _0x19f6a5?window['parseInt'](_0x3afbc1(_0x19f6a5),0x10)*_0x29c6ab:null;}function _0x4b3aed(_0x1ede16){return new window['Promise']((_0x52b317,_0xbe5280)=>{_0x1ede16['then'](_0x52b317,_0xbe5280),window['setTimeout'](_0xbe5280,0x1d4c0);});}}_0x5b21c8['on']('_sendUsageRequest',(_0x1be5ac,_0xa34c05)=>{if(_0xa34c05[0x0]!=_0x58c86d)return _0xe9c88c('UsageLimit');_0xa34c05[0x1]={..._0xa34c05[0x1],'requestId':_0x3e15ea};},{'priority':'high'}),_0x5b21c8['on']('_sendUsageRequest',_0x1a17da=>{_0x371bae(_0x1a17da['return'])&&(_0x269f99=!0x0,_0x294161(_0x1a17da['return']));},{'priority':'low'}),_0x59f795['then'](()=>{_0x269f99||_0xe9c88c('UsageLimit');});});function _0x2bf6e8(){return'auto'==_0x5b21c8['editing']['view']['_overlayModeHint'];}function _0x1c99a0(){_0x5b21c8['editing']['view']['_overlayModeHint']='auto';}}function _0xd4249(_0x13133d){const _0x5b4818=[new window['Promise'](_0x5c926d=>setTimeout(_0x5c926d,0x93ecc)),_0x59f795['then'](()=>new window['Promise'](_0x3bee79=>{let _0xb6855b=0x0;_0x5b21c8['model']['on']('applyOperation',(_0x1b8799,_0x3d9228)=>{_0x3d9228[0x0]['isDocumentOperation']&&_0xb6855b++,0x5e8==_0xb6855b&&(_0x3bee79(),_0x1b8799['off']());});}))];return window['Promise']['race'](_0x5b4818)['then'](()=>_0x13133d);}async function _0xc4b3ef(){await _0x59f795,_0x5b21c8['model']['change']=_0x156cdb,_0x5b21c8['model']['enqueueChange']=_0x156cdb,_0x5b21c8['enableReadOnlyMode']('model');}function _0x32cd75(){return window['Drupal'];}function _0x379654(){return window['glob']&&window['glob']['triliumVersion'];}function _0x37d754(_0x29add1){const _0x1b2330=_0x579540();_0x5b21c8[_0x1b2330]='templateLicenseKey'+_0x29add1,'Valid'!=_0x29add1&&_0xc4b3ef();}function _0x579540(){const _0x4036e4=window['String'](window['performance']['now']())['replace']('.','');let _0x2256af='g';for(let _0x297bf0=0x0;_0x297bf0<_0x4036e4['length'];_0x297bf0+=0x2){let _0x1a4259=window['parseInt'](_0x4036e4['substring'](_0x297bf0,_0x297bf0+0x2));_0x1a4259>=0x3e&&(_0x1a4259-=0x3e),_0x2256af+=_0x55cf77[_0x1a4259];}return _0x2256af;}function _0x28d257(){const _0x4a4e48=_0x14d5cd['split']('.');if(0x3!=_0x4a4e48['length'])return null;return _0x39ef88(_0x4a4e48[0x1]);function _0x39ef88(_0x373407){const _0x3b2247=_0x4c8212(_0x373407);return _0x3b2247&&_0x30ecee()?_0x3b2247:null;function _0x30ecee(){const _0x19f9bd=_0x3b2247['jti'],_0x1b8691=window['parseInt'](_0x19f9bd['substring'](_0x19f9bd['length']-0x8),0x10),_0x29c076={..._0x3b2247,'jti':_0x19f9bd['substring'](0x0,_0x19f9bd['length']-0x8)};return delete _0x29c076['vc'],_0x1b0634(_0x29c076)==_0x1b8691;}}}async function _0x1bfd9a(){let _0x25a96a=!0x0;try{const [_0x2b6a41,_0x5b824e,_0x3b4642]=_0x14d5cd['split']('.');return _0x3c201c(_0x2b6a41),await _0x597f75(_0x2b6a41,_0x5b824e,_0x3b4642),_0x25a96a;}catch{return!0x1;}function _0x3c201c(_0x5a6cad){const _0x40c61d=_0x4c8212(_0x5a6cad);_0x40c61d&&'ES256'==_0x40c61d['alg']||(_0x25a96a=!0x1);}async function _0x597f75(_0x4353b6,_0x579968,_0x3690ce){const _0x3cb277=window['Uint8Array']['from'](_0x4a8650(_0x3690ce),_0x27a799=>_0x27a799['charCodeAt'](0x0)),_0x3b0e70=new window['TextEncoder']()['encode'](_0x4353b6+'.'+_0x579968),_0x1caa50=window['crypto']['subtle'];if(!_0x1caa50)return;const _0xbc5103=await _0x1caa50['importKey']('jwk',_0x83161c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1caa50['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xbc5103,_0x3cb277,_0x3b0e70)||(_0x25a96a=!0x1);}}function _0x4c8212(_0x1a000e){return _0x1a000e['startsWith']('ey')?JSON['parse'](_0x4a8650(_0x1a000e)):null;}function _0x4a8650(_0x1363a1){return window['atob'](_0x1363a1['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1b0634(_0x6aa3ea){let _0x4b9cea=0x1505;function _0x222590(_0x4b488b){for(let _0x3af833=0x0;_0x3af833<_0x4b488b['length'];_0x3af833++){const _0x3b2ff0=_0x4b488b['charCodeAt'](_0x3af833);_0x4b9cea=(_0x4b9cea<<0x5)+_0x4b9cea+_0x3b2ff0,_0x4b9cea&=_0x4b9cea;}}function _0x37eaba(_0xf9266e){Array['isArray'](_0xf9266e)?_0xf9266e['forEach'](_0x37eaba):_0xf9266e&&'object'==typeof _0xf9266e?Object['entries'](_0xf9266e)['sort']()['forEach'](([_0x16a1b2,_0x1496d8])=>{_0x222590(_0x16a1b2),_0x37eaba(_0x1496d8);}):_0x222590(window['String'](_0xf9266e));}return _0x37eaba(_0x6aa3ea),_0x4b9cea>>>0x0;}function _0x3e3425(_0x28e8c3){return _0x28e8c3['toString'](0x10)['padStart'](0x8,'0');}function _0x3afbc1(_0x246c64){return _0x246c64['split']('')['reverse']()['join']('');}function _0x156cdb(){}_0x37d754(await _0xf624ff());}(this);}['_createTemplateListView'](_0x2ae1c9,_0x55de87){const {editor:_0x4bb480}=this,_0x359a46=new L(_0x2ae1c9);return _0x359a46['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x359a46['items']['addMany'](_0x55de87['map']((_0x482747,_0x124cc6)=>{const _0x4a4a86=new x(_0x2ae1c9,_0x124cc6),_0x5839e8=new b(_0x2ae1c9,_0x482747);return _0x4a4a86['buttonView']=_0x5839e8,_0x4a4a86['children']['add'](_0x5839e8),_0x4a4a86['buttonView']['on']('execute',_0x3baa99=>{_0x4bb480['execute']('insertTemplate',_0x3baa99['source']['templateDefinition']['data']),_0x4bb480['editing']['view']['focus']();}),_0x4a4a86;})),_0x359a46;}},K=class extends _0x23211f{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-template",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.5",
|
|
4
4
|
"description": "Template feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ckeditor/ckeditor5-core": "48.3.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
37
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
34
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.5",
|
|
35
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.5",
|
|
36
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.5",
|
|
37
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.5",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.5"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|