UNPKG

@ckeditor/ckeditor5-template

Version:

Template feature for CKEditor 5.

23 lines • 28.5 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ import{Command as _0x247d6a,Plugin as _0x2a656d}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconTemplateGeneric as _0x46a272,IconTemplate as _0x26618c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ListView as _0x1a3ae8,ListItemView as _0x36450c,ButtonView as _0xff7406,View as _0x214465,HighlightedTextView as _0x286f58,createDropdown as _0x5cf18d,SearchTextView as _0x355638,MenuBarMenuView as _0x51e607,MenuBarMenuListView as _0x34c6dd,MenuBarMenuListItemView as _0x5906f3,MenuBarMenuListItemButtonView as _0x40bbdb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{uid as _0x5ec999}from'@ckeditor/ckeditor5-utils/dist/index.js';class o extends _0x247d6a{['execute'](_0x49f143){const {model:_0x460406}=this['editor'];let _0x342911;switch(typeof _0x49f143){case'string':_0x342911=_0x49f143;break;case'function':_0x342911=_0x49f143();}'string'==typeof _0x342911&&_0x460406['change'](()=>{const _0x4bdef2=this['editor']['data']['htmlProcessor']['toView'](_0x342911),_0x17d135=this['editor']['data']['toModel'](_0x4bdef2);_0x460406['insertContent'](_0x17d135);});}}class i extends _0x2a656d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4112ec}=this;_0x4112ec['commands']['add']('insertTemplate',new o(_0x4112ec)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x883136=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c761a;for(const _0x39f0cf in _0x883136){const _0x1ca5e=_0x39f0cf,_0x428e21=_0x883136[_0x1ca5e];if('templateLicenseKeyValid'==_0x428e21||'templateLicenseKeyInvalid'==_0x428e21||'templateLicenseKeyExpired'==_0x428e21||'templateLicenseKeyDomainLimit'==_0x428e21||'templateLicenseKeyNotAllowed'==_0x428e21||'templateLicenseKeyEvaluationLimit'==_0x428e21||'templateLicenseKeyTrialLimit'==_0x428e21||'templateLicenseKeyUsageLimit'==_0x428e21){delete _0x883136[_0x1ca5e],_0x1c761a=_0x428e21,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x1c761a&&_0x883136['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x1c761a&&_0x883136['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x1c761a&&_0x883136['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x1c761a&&_0x883136['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x1c761a&&_0x883136['_showLicenseError']('evaluationLimit'),'templateLicenseKeyTrialLimit'==_0x1c761a&&_0x883136['_showLicenseError']('trialLimit'),'templateLicenseKeyUsageLimit'==_0x1c761a&&_0x883136['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class b extends _0x1a3ae8{['filter'](_0x383cfd){if(!_0x383cfd)return this['_resetFiltering']();const _0x59d1d9=new Map(),_0x449280=this['items']['map'](_0x95270c=>{const _0xb156f4=_0x95270c['buttonView']['isMatching'](_0x383cfd);return _0x95270c['isVisible']=!!_0xb156f4,_0x95270c['buttonView']['highlightText'](_0xb156f4?_0x383cfd:null),_0xb156f4&&_0x59d1d9['set'](_0x95270c,_0xb156f4),_0x95270c;})['sort'](I)['sort'](function(_0x235607){return function(_0x2e8034,_0x808dae){const _0x1d92c2=_0x235607['get'](_0x2e8034),_0x48545c=_0x235607['get'](_0x808dae);return _0x1d92c2&&!_0x48545c?-0x1:_0x48545c&&!_0x1d92c2?0x1:_0x1d92c2||_0x48545c?_0x1d92c2['title']&&!_0x48545c['title']?-0x1:!_0x1d92c2['title']&&_0x48545c['title']?0x1:0x0:0x0;};}(_0x59d1d9));return this['items']['clear'](),this['items']['addMany'](_0x449280),{'resultsCount':_0x59d1d9['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x45cf1e=this['items']['map'](_0x4d2c8d=>_0x4d2c8d)['sort'](I);return _0x45cf1e['forEach'](_0x46d5b5=>{_0x46d5b5['isVisible']=!0x0,_0x46d5b5['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x45cf1e),{'resultsCount':_0x45cf1e['length'],'totalItemsCount':_0x45cf1e['length']};}}function I(_0x405e54,_0x382c87){return _0x405e54['originalIndex']-_0x382c87['originalIndex'];}class h extends _0x36450c{['originalIndex'];['buttonView'];constructor(_0x2f9c5d,_0x36aa97){super(_0x2f9c5d),this['originalIndex']=_0x36aa97,this['buttonView']=null;}}class g extends _0xff7406{['templateDefinition'];['textPartView'];constructor(_0x21d191,_0x279381){super(_0x21d191),this['templateDefinition']=_0x279381,this['textPartView']=null;const {icon:_0x165bc6=_0x46a272}=_0x279381;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x165bc6}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new L(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'](_0x167575){const {title:_0x5c0b60,description:_0xc690e4}=this['templateDefinition'],_0x35b45a=!!_0x5c0b60['match'](_0x167575),_0x3ce554=!(!_0xc690e4||!_0xc690e4['match'](_0x167575));return _0x35b45a||_0x3ce554?{'title':_0x35b45a,'description':_0x3ce554}:null;}['highlightText'](_0x501d05){this['textPartView']['highlightText'](_0x501d05);}}class L extends _0x214465{constructor(_0x39319a,_0xc1d01b,_0x555eb9){super(_0x39319a),this['title']=_0xc1d01b['title'],this['description']=_0xc1d01b['description'],this['titleView']=new _0x286f58(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x555eb9}});const _0x4380d1=[this['titleView']];this['description']&&(this['descriptionView']=new _0x286f58(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x4380d1['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x4380d1});}['highlightText'](_0x3a5ae3){this['titleView']['highlightText'](_0x3a5ae3),this['description']&&this['descriptionView']['highlightText'](_0x3a5ae3);}}function T(_0x5e2749,_0x31ef3d,..._0x275e5f){const t=_0x5e2749['t'];switch(_0x31ef3d){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x275e5f);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',..._0x275e5f);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x31ef3d;}}class s extends _0x2a656d{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c1bf3}=this,_0x495be4=_0x2c1bf3['config']['get']('template.definitions')||[];_0x2c1bf3['ui']['componentFactory']['add']('insertTemplate',_0x539f11=>{const _0x2a0f0d=_0x5cf18d(_0x539f11),_0x35d74c=this['_createTemplateListView'](_0x539f11,_0x495be4),_0x4f9ee6=new _0x355638(_0x539f11,{'filteredView':_0x35d74c,'queryView':{'label':T(_0x539f11,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x132446=>T(_0x539f11,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x132446),'secondary':T(_0x539f11,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':T(_0x539f11,'No\x20templates\x20available.')}}}}),_0x22333d=_0x2c1bf3['commands']['get']('insertTemplate');return _0x4f9ee6['on']('search',(_0x557bec,_0x3174d9)=>{_0x3174d9['query']&&_0x3174d9['query']['length']&&_0x2c1bf3['ui']['ariaLiveAnnouncer']['announce'](T(_0x539f11,'%0\x20templates\x20found',_0x3174d9['resultsCount']));}),_0x2a0f0d['bind']('isEnabled')['to'](_0x22333d),_0x2a0f0d['panelView']['children']['add'](_0x4f9ee6),_0x2a0f0d['buttonView']['set']({'label':T(_0x539f11,'Insert\x20template'),'icon':_0x26618c,'tooltip':!0x0}),_0x2a0f0d['on']('change:isOpen',(_0x406c0d,_0x4a8ca5,_0x53fd50)=>{_0x53fd50||_0x4f9ee6['reset']();}),_0x2a0f0d;}),_0x2c1bf3['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x5905de=>{const _0x4fbbc0=_0x2c1bf3['commands']['get']('insertTemplate'),_0x81d043=new _0x51e607(_0x5905de);_0x81d043['buttonView']['set']({'label':T(_0x5905de,'Template'),'icon':_0x26618c});const _0x3c4d9d=new _0x34c6dd(_0x5905de);if(!_0x495be4||!_0x495be4['length']){const _0x160496=new _0x5906f3(_0x5905de,_0x81d043),_0x4c09ff=new _0x40bbdb(_0x5905de);_0x4c09ff['set']({'label':T(_0x5905de,'No\x20templates\x20available.')}),_0x4c09ff['delegate']('execute')['to'](_0x81d043),_0x4c09ff['on']('execute',()=>{_0x2c1bf3['editing']['view']['focus']();}),_0x160496['children']['add'](_0x4c09ff),_0x3c4d9d['items']['add'](_0x160496);}for(const _0x4f71b3 of _0x495be4){const _0x248a36=new _0x5906f3(_0x5905de,_0x81d043),_0x79cbfc=new _0x40bbdb(_0x5905de);_0x79cbfc['set']({'class':'ck-template-button','label':_0x4f71b3['title'],'icon':_0x4f71b3['icon']||_0x46a272}),_0x79cbfc['delegate']('execute')['to'](_0x81d043),_0x79cbfc['on']('execute',()=>{_0x2c1bf3['execute']('insertTemplate',_0x4f71b3['data']),_0x2c1bf3['editing']['view']['focus']();}),_0x248a36['children']['add'](_0x79cbfc),_0x3c4d9d['items']['add'](_0x248a36);}return _0x81d043['panelView']['children']['add'](_0x3c4d9d),_0x81d043['bind']('isEnabled')['to'](_0x4fbbc0,'isEnabled'),_0x81d043;});}['afterInit'](){!async function(_0x5411cf){const _0x48f8b4=_0x201207([0x74,0x51,0x35,0x4c,0x34,0x53,0x46,0x50,0x6f,0x77,0x52,0x39,0x67,0x57,0x62,0x54,0x7a,0x72,0x44,0x4d,0x5a,0x4f,0x73,0x37,0x6d,0x33,0x6e,0x38,0x70,0x66,0x68,0x58,0x6b,0x64,0x75,0x43,0x41,0x56,0x47,0x78,0x6c,0x42,0x32,0x71,0x4b,0x4e,0x30,0x55,0x63,0x36,0x76,0x4a,0x59,0x79,0x6a,0x48,0x45,0x69,0x31,0x65,0x61,0x49]),_0xde0664=0x183277cd,_0x5ca442=0x18351e05^_0xde0664,_0x378051=window[_0x201207([0x44,0x61,0x74,0x65])][_0x201207([0x6e,0x6f,0x77])](),_0x3fc41a=_0x5411cf[_0x201207([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x33b3d2=new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11e48c=>{_0x3fc41a[_0x201207([0x6f,0x6e,0x63,0x65])](_0x201207([0x72,0x65,0x61,0x64,0x79]),_0x11e48c);}),_0x5be189={[_0x201207([0x6b,0x74,0x79])]:_0x201207([0x45,0x43]),[_0x201207([0x75,0x73,0x65])]:_0x201207([0x73,0x69,0x67]),[_0x201207([0x63,0x72,0x76])]:_0x201207([0x50,0x2d,0x32,0x35,0x36]),[_0x201207([0x78])]:_0x201207([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x201207([0x79])]:_0x201207([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x201207([0x61,0x6c,0x67])]:_0x201207([0x45,0x53,0x32,0x35,0x36])},_0x164cab=_0x3fc41a[_0x201207([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x201207([0x67,0x65,0x74])](_0x201207([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2b231f(){let _0x3d69e4,_0x5a4d72=null,_0x187aae=null;try{if(_0x164cab==_0x201207([0x47,0x50,0x4c]))return _0x201207([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3d69e4=_0x24856b(),!_0x3d69e4)return _0x201207([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3d69e4[_0x201207([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x187aae=_0x1217ae(_0x3d69e4[_0x201207([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3d69e4[_0x201207([0x6a,0x74,0x69])])),await _0x330b57()?_0x4a2311()?_0x5ee94b()?_0x201207([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x153758()?(_0x3d69e4[_0x201207([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x201207([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a4d72=_0x518cfb(_0x201207([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3d69e4[_0x201207([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x201207([0x74,0x72,0x69,0x61,0x6c])&&(_0x5a4d72=_0x518cfb(_0x201207([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x40aa2f()):_0x201207([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x201207([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x201207([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x201207([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5ee94b(){const _0x1ba7ad=[_0x201207([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x201207([0x74,0x72,0x69,0x61,0x6c])][_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d69e4[_0x201207([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x378051/0x3e8:0xe10*_0x5ca442;return _0x3d69e4[_0x201207([0x65,0x78,0x70])]<_0x1ba7ad;}function _0x4a2311(){const _0x5077b8=_0x3d69e4[_0x201207([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5077b8&&(!!_0x5077b8[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x201207([0x2a]))||(!!_0x5077b8[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x201207([0x54,0x50,0x4c]))||(!!_0x5077b8[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x201207([0x50,0x50]))||!(!_0x5077b8[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x201207([0x44,0x52,0x55,0x50]))||!_0x9c1039()))));}function _0x153758(){const _0x1d8588=_0x3d69e4[_0x201207([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1d8588||0x0==_0x1d8588[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4277f7}=new URL(window[_0x201207([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1d8588[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4277f7))return!0x0;const _0x2df281=_0x4277f7[_0x201207([0x73,0x70,0x6c,0x69,0x74])](_0x201207([0x2e]));return _0x1d8588[_0x201207([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xec4f44=>_0xec4f44[_0x201207([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x201207([0x2a])))[_0x201207([0x6d,0x61,0x70])](_0x4fd04f=>_0x4fd04f[_0x201207([0x73,0x70,0x6c,0x69,0x74])](_0x201207([0x2e])))[_0x201207([0x73,0x6f,0x6d,0x65])](_0x449300=>_0x2df281[_0x201207([0x65,0x76,0x65,0x72,0x79])]((_0x23852d,_0x30edf9)=>_0x449300[_0x30edf9]===_0x23852d||_0x449300[_0x30edf9]===_0x201207([0x2a])));}function _0x40aa2f(){return _0x5a4d72&&_0x187aae?new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x39ce91,_0x170451)=>{_0x5a4d72[_0x201207([0x74,0x68,0x65,0x6e])](_0x39ce91,_0x170451),_0x187aae[_0x201207([0x74,0x68,0x65,0x6e])](_0x2920ea=>{_0x2920ea!=_0x201207([0x56,0x61,0x6c,0x69,0x64])&&_0x39ce91(_0x2920ea);},_0x170451);}):_0x5a4d72||_0x187aae||_0x201207([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1217ae(_0x4a2db7,_0x4ab83b){return new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x71495e=>{if(_0x53b6b9())return _0x71495e(_0x201207([0x56,0x61,0x6c,0x69,0x64]));_0x53fb66(),_0x3fc41a[_0x201207([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x201207([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2cf739=!0x1;const _0x2fe4a2=_0x5ec999();function _0x2fdb94(_0x99ef2c){return!!_0x99ef2c&&(typeof _0x99ef2c===_0x201207([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x99ef2c===_0x201207([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x99ef2c[_0x201207([0x74,0x68,0x65,0x6e])]===_0x201207([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x99ef2c[_0x201207([0x63,0x61,0x74,0x63,0x68])]===_0x201207([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x905330(_0x1e08dd){_0x4ab950(_0x1e08dd)[_0x201207([0x74,0x68,0x65,0x6e])](_0x218e4c=>{if(!_0x218e4c||_0x218e4c[_0x201207([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x201207([0x6f,0x6b]))return _0x201207([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1a6acd(_0x57063a(_0x2fe4a2+_0x4ab83b))!=_0x218e4c[_0x201207([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x201207([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x201207([0x56,0x61,0x6c,0x69,0x64]);})[_0x201207([0x74,0x68,0x65,0x6e])](_0xe91e07=>(_0x93a891(),_0xe91e07),()=>{const _0x40e040=_0x2b616a();return null==_0x40e040?(_0x93a891(),_0x201207([0x56,0x61,0x6c,0x69,0x64])):_0x201207(_0x378051-_0x40e040>(0x3c3ef3cd^_0xde0664)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x201207([0x74,0x68,0x65,0x6e])](_0x71495e)[_0x201207([0x63,0x61,0x74,0x63,0x68])](()=>{_0x71495e(_0x201207([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1fe52d=0x1804994d^_0xde0664;function _0x93a891(){const _0x5b6c1b=_0x201207([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a6acd(_0x57063a(_0x4a2db7)),_0x12b8b2=_0x373b5a(_0x1a6acd(window[_0x201207([0x4d,0x61,0x74,0x68])][_0x201207([0x63,0x65,0x69,0x6c])](_0x378051/_0x1fe52d)));window[_0x201207([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x201207([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b6c1b,_0x12b8b2);}function _0x2b616a(){const _0x596260=_0x201207([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a6acd(_0x57063a(_0x4a2db7)),_0x4b7987=window[_0x201207([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x201207([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x596260);return _0x4b7987?window[_0x201207([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x373b5a(_0x4b7987),0x10)*_0x1fe52d:null;}function _0x4ab950(_0x5dc82d){return new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a0ba6,_0x5572c1)=>{_0x5dc82d[_0x201207([0x74,0x68,0x65,0x6e])](_0x2a0ba6,_0x5572c1),window[_0x201207([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5572c1,0x1833a30d^_0xde0664);});}}_0x3fc41a[_0x201207([0x6f,0x6e])](_0x201207([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf27219,_0x243d03)=>{if(_0x243d03[0x0]!=_0x4a2db7)return _0x71495e(_0x201207([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x243d03[0x1]={..._0x243d03[0x1],[_0x201207([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2fe4a2};},{[_0x201207([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x201207([0x68,0x69,0x67,0x68])}),_0x3fc41a[_0x201207([0x6f,0x6e])](_0x201207([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1cb8ae=>{_0x2fdb94(_0x1cb8ae[_0x201207([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2cf739=!0x0,_0x905330(_0x1cb8ae[_0x201207([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x201207([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x201207([0x6c,0x6f,0x77])}),_0x33b3d2[_0x201207([0x74,0x68,0x65,0x6e])](()=>{_0x2cf739||_0x71495e(_0x201207([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x53b6b9(){return _0x3fc41a[_0x201207([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x201207([0x76,0x69,0x65,0x77])][_0x201207([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x201207([0x61,0x75,0x74,0x6f]);}function _0x53fb66(){_0x3fc41a[_0x201207([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x201207([0x76,0x69,0x65,0x77])][_0x201207([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x201207([0x61,0x75,0x74,0x6f]);}}function _0x518cfb(_0x36175a){const _0x4adbc6=[new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1568bb=>setTimeout(_0x1568bb,0x183b4901^_0xde0664)),_0x33b3d2[_0x201207([0x74,0x68,0x65,0x6e])](()=>new window[(_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd4dfb3=>{let _0x3e6016=0x0;_0x3fc41a[_0x201207([0x6d,0x6f,0x64,0x65,0x6c])][_0x201207([0x6f,0x6e])](_0x201207([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3fe17e,_0x341535)=>{_0x341535[0x0][_0x201207([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3e6016++,_0x3e6016==(0x18327635^_0xde0664)&&(_0xd4dfb3(),_0x3fe17e[_0x201207([0x6f,0x66,0x66])]());});}))];return window[_0x201207([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x201207([0x72,0x61,0x63,0x65])](_0x4adbc6)[_0x201207([0x74,0x68,0x65,0x6e])](()=>_0x36175a);}async function _0xc50eb9(){await _0x33b3d2,_0x3fc41a[_0x201207([0x6d,0x6f,0x64,0x65,0x6c])][_0x201207([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xfcbd26,_0x3fc41a[_0x201207([0x6d,0x6f,0x64,0x65,0x6c])][_0x201207([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xfcbd26,_0x3fc41a[_0x201207([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x201207([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x9c1039(){return window[_0x201207([0x44,0x72,0x75,0x70,0x61,0x6c])];}function _0x43870f(_0x7b5eff){const _0x5bb16c=_0xd42e34();_0x3fc41a[_0x5bb16c]=_0x201207([0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x7b5eff,_0x7b5eff!=_0x201207([0x56,0x61,0x6c,0x69,0x64])&&_0xc50eb9();}function _0xd42e34(){const _0x560405=window[_0x201207([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x201207([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x201207([0x6e,0x6f,0x77])]())[_0x201207([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x201207([0x2e]),'');let _0x121d68=_0x201207([0x74]);for(let _0x47c76e=0x0;_0x47c76e<_0x560405[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x47c76e+=0x2){let _0x5002c5=window[_0x201207([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x560405[_0x201207([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x47c76e,_0x47c76e+0x2));_0x5002c5>=_0x48f8b4[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5002c5-=_0x48f8b4[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x121d68+=_0x48f8b4[_0x5002c5];}return _0x121d68;}function _0x24856b(){const _0x5da6b9=_0x164cab[_0x201207([0x73,0x70,0x6c,0x69,0x74])](_0x201207([0x2e]));if(0x3!=_0x5da6b9[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x54aa61(_0x5da6b9[0x1]);function _0x54aa61(_0x573b87){const _0x20eb44=_0x3a2987(_0x573b87);return _0x20eb44&&_0x528b0f()?_0x20eb44:null;function _0x528b0f(){const _0x313310=_0x20eb44[_0x201207([0x6a,0x74,0x69])],_0x2de186=window[_0x201207([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x313310[_0x201207([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x313310[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5f0b83={..._0x20eb44,[_0x201207([0x6a,0x74,0x69])]:_0x313310[_0x201207([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x313310[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5f0b83[_0x201207([0x76,0x63])],_0x57063a(_0x5f0b83)==_0x2de186;}}}async function _0x330b57(){let _0x199034=!0x0;try{const _0x28b465=_0x164cab[_0x201207([0x73,0x70,0x6c,0x69,0x74])](_0x201207([0x2e])),[_0x102c01,_0x9815cb,_0x379433]=_0x28b465;return _0x115784(_0x102c01),await _0x3efd69(_0x102c01,_0x9815cb,_0x379433),_0x199034;}catch{return!0x1;}function _0x115784(_0x6957f8){const _0xf2693b=_0x3a2987(_0x6957f8);_0xf2693b&&_0xf2693b[_0x201207([0x61,0x6c,0x67])]==_0x201207([0x45,0x53,0x32,0x35,0x36])||(_0x199034=!0x1);}async function _0x3efd69(_0x49bda9,_0x55f88a,_0x15f87b){const _0x2d20a1=window[_0x201207([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x201207([0x66,0x72,0x6f,0x6d])](_0x2a91e0(_0x15f87b),_0x1743bc=>_0x1743bc[_0x201207([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x12ec2b=new window[(_0x201207([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x201207([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x49bda9+_0x201207([0x2e])+_0x55f88a),_0x5f3ed1=window[_0x201207([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x201207([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5f3ed1)return;const _0x1ed0d3=await _0x5f3ed1[_0x201207([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x201207([0x6a,0x77,0x6b]),_0x5be189,{[_0x201207([0x6e,0x61,0x6d,0x65])]:_0x201207([0x45,0x43,0x44,0x53,0x41]),[_0x201207([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x201207([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x201207([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5f3ed1[_0x201207([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x201207([0x6e,0x61,0x6d,0x65])]:_0x201207([0x45,0x43,0x44,0x53,0x41]),[_0x201207([0x68,0x61,0x73,0x68])]:{[_0x201207([0x6e,0x61,0x6d,0x65])]:_0x201207([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1ed0d3,_0x2d20a1,_0x12ec2b)||(_0x199034=!0x1);}}function _0x3a2987(_0x23151c){return _0x23151c[_0x201207([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x201207([0x65,0x79]))?JSON[_0x201207([0x70,0x61,0x72,0x73,0x65])](_0x2a91e0(_0x23151c)):null;}function _0x2a91e0(_0x3b9958){return window[_0x201207([0x61,0x74,0x6f,0x62])](_0x3b9958[_0x201207([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x201207([0x2b]))[_0x201207([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x201207([0x2f])));}function _0x57063a(_0x45b3ae){let _0x5888a3=0x1505;function _0x44cce1(_0xf64885){for(let _0x5cc91d=0x0;_0x5cc91d<_0xf64885[_0x201207([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5cc91d++){const _0x151732=_0xf64885[_0x201207([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5cc91d);_0x5888a3=(_0x5888a3<<0x5)+_0x5888a3+_0x151732,_0x5888a3&=_0x5888a3;}}function _0x3cc18d(_0x3e41a6){Array[_0x201207([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3e41a6)?_0x3e41a6[_0x201207([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3cc18d):_0x3e41a6&&typeof _0x3e41a6==_0x201207([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x201207([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3e41a6)[_0x201207([0x73,0x6f,0x72,0x74])]()[_0x201207([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x46f799,_0x517180])=>{_0x44cce1(_0x46f799),_0x3cc18d(_0x517180);}):_0x44cce1(window[_0x201207([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3e41a6));}return _0x3cc18d(_0x45b3ae),_0x5888a3>>>0x0;}function _0x1a6acd(_0x4dbd0c){return _0x4dbd0c[_0x201207([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x201207([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x201207([0x30]));}function _0x373b5a(_0x4da110){return _0x4da110[_0x201207([0x73,0x70,0x6c,0x69,0x74])]('')[_0x201207([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x201207([0x6a,0x6f,0x69,0x6e])]('');}function _0xfcbd26(){}function _0x201207(_0x166bf2){return _0x166bf2['map'](_0xe01bb=>String['fromCharCode'](_0xe01bb))['join']('');}_0x43870f(await _0x2b231f());}(this);}['_createTemplateListView'](_0x2854ef,_0x2418c4){const {editor:_0x119d76}=this,_0x2be6df=new b(_0x2854ef);return _0x2be6df['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x2be6df['items']['addMany'](_0x2418c4['map']((_0x18ebe6,_0x473e70)=>{const _0xf3df46=new h(_0x2854ef,_0x473e70),_0x39ace2=new g(_0x2854ef,_0x18ebe6);return _0xf3df46['buttonView']=_0x39ace2,_0xf3df46['children']['add'](_0x39ace2),_0xf3df46['buttonView']['on']('execute',_0x573cea=>{_0x119d76['execute']('insertTemplate',_0x573cea['source']['templateDefinition']['data']),_0x119d76['editing']['view']['focus']();}),_0xf3df46;})),_0x2be6df;}}class m extends _0x2a656d{static get['requires'](){return[i,s];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{m as Template,o as TemplateCommand,i as TemplateEditing,s as TemplateUI};