@ckeditor/ckeditor5-case-change
Version:
Case change feature for CKEditor 5.
23 lines • 9.3 kB
JavaScript
/*
* 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x1d69(){const _0x2fb4bb=['destroy','6nrqFEz','_registerComponents','evaluationLimit','isPremiumPlugin','locale','items','menuBar:caseChange','invalid','Case\x20change','expired','caseChangeLicenseKeyExpired','listenTo','1983192qeDevX','2146585gcDcnp','caseChange','bind','isOfficialPlugin','_getListItemDefinitionsAndCommands','8002nzdJdp','execute','buttonView','commandName','caseChangeLicenseKeyInvalid','900968ZhjTZY','init','7630436CkjgeY','_showLicenseError','Shift+F3','_licenseKeyCheckInterval','source','addKeystrokeInfos','trialLimit','some','accessibility','24jrRuII','ck-case-change-dropdown','isEnabled','get','focus','button','panelView','toMany','editing','caseChangeLicenseKeyUsageLimit','45HQqIhO','domainLimit','menuitemradio','view','editor','featureNotAllowed','caseChangeLicenseKeyValid','caseChangeLicenseKeyDomainLimit','2052043CMCQQT','model','caseChangeLicenseKeyNotAllowed','8072250XaqCvD','children','3tigoNY','delegate','143vTwpLd','_setButtonProperties','caseChangeLicenseKeyTrialLimit','CaseChangeUI','CaseChange','_createDropdownView','push','config','label','commands','extendTemplate','_createMenuBarMenuView','add','pluginName','caseChangeLicenseKeyEvaluationLimit','Change\x20text\x20case','set','keys','componentFactory','licenseKey','usageLimit','menu','Shift+f3'];_0x1d69=function(){return _0x2fb4bb;};return _0x1d69();}const _0x3ca970=_0x25f5;(function(_0xe082a1,_0x47a568){const _0x4046a9=_0x25f5,_0x22ee38=_0xe082a1();while(!![]){try{const _0x51b0da=parseInt(_0x4046a9(0x123))/0x1*(parseInt(_0x4046a9(0x14d))/0x2)+-parseInt(_0x4046a9(0x121))/0x3*(-parseInt(_0x4046a9(0x152))/0x4)+-parseInt(_0x4046a9(0x148))/0x5+parseInt(_0x4046a9(0x13b))/0x6*(-parseInt(_0x4046a9(0x11c))/0x7)+-parseInt(_0x4046a9(0x147))/0x8*(-parseInt(_0x4046a9(0x114))/0x9)+parseInt(_0x4046a9(0x11f))/0xa+parseInt(_0x4046a9(0x154))/0xb*(-parseInt(_0x4046a9(0x15d))/0xc);if(_0x51b0da===_0x47a568)break;else _0x22ee38['push'](_0x22ee38['shift']());}catch(_0x38c3c8){_0x22ee38['push'](_0x22ee38['shift']());}}}(_0x1d69,0xb344f));import{Plugin as _0x7fe6e8}from'ckeditor5/src/core.js';import{addListToDropdown as _0x21a22e,createDropdown as _0x4db88a,MenuBarMenuListItemButtonView as _0x575d1f,MenuBarMenuListItemView as _0x256ef7,MenuBarMenuListView as _0x4440bb,MenuBarMenuView as _0x42afa8,UIModel as _0x4fec67}from'ckeditor5/src/ui.js';import{IconCaseChange as _0x47fb34}from'ckeditor5/src/icons.js';import{Collection as _0x40330b}from'ckeditor5/src/utils.js';import{_getOptions as _0x2de45e}from'./casechangeediting.js';import{getTranslation as _0x316598}from'./utils/common-translations.js';function _0x25f5(_0x2154c2,_0x2e16cd){const _0x1d6970=_0x1d69();return _0x25f5=function(_0x25f546,_0x2d9508){_0x25f546=_0x25f546-0x113;let _0x37abb3=_0x1d6970[_0x25f546];return _0x37abb3;},_0x25f5(_0x2154c2,_0x2e16cd);}export class CaseChangeUI extends _0x7fe6e8{[_0x3ca970(0x136)];[_0x3ca970(0x157)];static get[_0x3ca970(0x130)](){const _0x382458=_0x3ca970;return _0x382458(0x126);}static get[_0x3ca970(0x14b)](){return!0x0;}static get[_0x3ca970(0x13e)](){return!0x0;}[_0x3ca970(0x153)](){const _0x276ea6=_0x3ca970,_0x164560=this[_0x276ea6(0x118)];this[_0x276ea6(0x13c)](),_0x164560[_0x276ea6(0x15c)][_0x276ea6(0x159)]({'keystrokes':[{'label':_0x316598(_0x164560[_0x276ea6(0x13f)],_0x276ea6(0x132)),'keystroke':_0x276ea6(0x139),'mayRequireFn':!0x0}]}),this[_0x276ea6(0x136)]=this[_0x276ea6(0x118)][_0x276ea6(0x12a)][_0x276ea6(0x160)](_0x276ea6(0x136));const _0x462fce=this[_0x276ea6(0x118)];this[_0x276ea6(0x157)]=setInterval(()=>{const _0x27faf8=_0x276ea6;let _0x38f87b;for(const _0x1ff32e in _0x462fce){const _0x2696db=_0x1ff32e,_0x362558=_0x462fce[_0x2696db];if(_0x27faf8(0x11a)==_0x362558||_0x27faf8(0x151)==_0x362558||_0x27faf8(0x145)==_0x362558||_0x27faf8(0x11b)==_0x362558||_0x27faf8(0x11e)==_0x362558||_0x27faf8(0x131)==_0x362558||_0x27faf8(0x125)==_0x362558||_0x27faf8(0x113)==_0x362558){delete _0x462fce[_0x2696db],_0x38f87b=_0x362558,clearInterval(this[_0x27faf8(0x157)]),this[_0x27faf8(0x157)]=void 0x0;break;}}_0x27faf8(0x151)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x142)),_0x27faf8(0x145)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x144)),_0x27faf8(0x11b)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x115)),_0x27faf8(0x11e)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x119),_0x27faf8(0x127)),_0x27faf8(0x131)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x13d)),_0x27faf8(0x125)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x15a)),_0x27faf8(0x113)==_0x38f87b&&_0x462fce[_0x27faf8(0x155)](_0x27faf8(0x137));},0x3e8);}[_0x3ca970(0x13a)](){const _0x17866f=_0x3ca970;super[_0x17866f(0x13a)](),this[_0x17866f(0x157)]&&clearInterval(this[_0x17866f(0x157)]);}[_0x3ca970(0x13c)](){const _0x2aa943=_0x3ca970,_0x1ff179=this[_0x2aa943(0x118)],{itemDefinitions:_0xdc34e1,commands:_0x4961a2}=this[_0x2aa943(0x14c)]();_0x1ff179['ui'][_0x2aa943(0x135)][_0x2aa943(0x12f)](_0x2aa943(0x149),()=>this[_0x2aa943(0x128)](_0xdc34e1,_0x4961a2)),_0x1ff179['ui'][_0x2aa943(0x135)][_0x2aa943(0x12f)](_0x2aa943(0x141),()=>this[_0x2aa943(0x12e)](_0xdc34e1,_0x4961a2));}[_0x3ca970(0x12e)](_0x20cabf,_0x355b2d){const _0x26ba4f=_0x3ca970,_0x30c906=this[_0x26ba4f(0x118)],_0x4a48f2=_0x30c906[_0x26ba4f(0x13f)],_0x4c4e7b=new _0x42afa8(_0x4a48f2),_0x4f4175=new _0x4440bb(_0x4a48f2);_0x4f4175[_0x26ba4f(0x133)]({'ariaLabel':_0x316598(_0x4a48f2,_0x26ba4f(0x143)),'role':_0x26ba4f(0x138)}),this[_0x26ba4f(0x124)](_0x4c4e7b[_0x26ba4f(0x14f)]),_0x4c4e7b[_0x26ba4f(0x14a)](_0x26ba4f(0x15f))[_0x26ba4f(0x164)](_0x355b2d,_0x26ba4f(0x15f),(..._0x2bdf44)=>_0x2bdf44[_0x26ba4f(0x15b)](_0x4cc388=>_0x4cc388));for(const _0xef6c12 of _0x20cabf){const _0x1ef3bd=new _0x256ef7(_0x4a48f2,_0x4c4e7b),_0x2ce9a7=new _0x575d1f(_0x4a48f2);_0x2ce9a7[_0x26ba4f(0x122)](_0x26ba4f(0x14e))['to'](_0x4c4e7b),_0x2ce9a7[_0x26ba4f(0x14a)](...Object[_0x26ba4f(0x134)](_0xef6c12[_0x26ba4f(0x11d)]))['to'](_0xef6c12[_0x26ba4f(0x11d)]),_0x2ce9a7['on'](_0x26ba4f(0x14e),()=>{const _0x5f1ee9=_0x26ba4f;_0x30c906[_0x5f1ee9(0x14e)](_0xef6c12[_0x5f1ee9(0x11d)][_0x5f1ee9(0x150)]),_0x30c906[_0x5f1ee9(0x165)][_0x5f1ee9(0x117)][_0x5f1ee9(0x161)]();}),_0x1ef3bd[_0x26ba4f(0x120)][_0x26ba4f(0x12f)](_0x2ce9a7),_0x4f4175[_0x26ba4f(0x140)][_0x26ba4f(0x12f)](_0x1ef3bd);}return _0x4c4e7b[_0x26ba4f(0x163)][_0x26ba4f(0x120)][_0x26ba4f(0x12f)](_0x4f4175),_0x4c4e7b;}[_0x3ca970(0x128)](_0x673767,_0x2c85e0){const _0x35b553=_0x3ca970,_0x14e3ca=this[_0x35b553(0x118)],_0x44589a=_0x4db88a(_0x14e3ca[_0x35b553(0x13f)]);return this[_0x35b553(0x124)](_0x44589a[_0x35b553(0x14f)]),_0x44589a[_0x35b553(0x14f)][_0x35b553(0x133)]({'tooltip':!0x0}),_0x44589a[_0x35b553(0x12d)]({'attributes':{'class':[_0x35b553(0x15e)]}}),_0x21a22e(_0x44589a,_0x673767,{'ariaLabel':_0x316598(_0x14e3ca[_0x35b553(0x13f)],_0x35b553(0x143)),'role':_0x35b553(0x138)}),_0x44589a[_0x35b553(0x14a)](_0x35b553(0x15f))[_0x35b553(0x164)](_0x2c85e0,_0x35b553(0x15f),(..._0x4e2ec9)=>_0x4e2ec9[_0x35b553(0x15b)](_0x24dca7=>_0x24dca7)),this[_0x35b553(0x146)](_0x44589a,_0x35b553(0x14e),_0x207f08=>{const _0x1c0dd8=_0x35b553;_0x14e3ca[_0x1c0dd8(0x14e)](_0x207f08[_0x1c0dd8(0x158)][_0x1c0dd8(0x150)]),_0x14e3ca[_0x1c0dd8(0x165)][_0x1c0dd8(0x117)][_0x1c0dd8(0x161)]();}),_0x44589a;}[_0x3ca970(0x124)](_0x1e6456){const _0x76979b=_0x3ca970,_0xa8e6f4=this[_0x76979b(0x118)];_0x1e6456[_0x76979b(0x133)]({'label':_0x316598(_0xa8e6f4[_0x76979b(0x13f)],_0x76979b(0x143)),'icon':_0x47fb34,'keystroke':_0x76979b(0x156)});}[_0x3ca970(0x14c)](){const _0x1488a6=_0x3ca970,_0x2a2646=new _0x40330b(),_0x2b2950=[];for(const _0x5757b7 of _0x2de45e(this[_0x1488a6(0x118)][_0x1488a6(0x13f)])){const _0x130a3f=this[_0x1488a6(0x118)][_0x1488a6(0x12c)][_0x1488a6(0x160)](_0x5757b7[_0x1488a6(0x150)]),_0x4c3611=new _0x4fec67({'commandName':_0x5757b7[_0x1488a6(0x150)],'label':_0x5757b7[_0x1488a6(0x12b)],'role':_0x1488a6(0x116),'withText':!0x0});_0x4c3611[_0x1488a6(0x14a)](_0x1488a6(0x15f))['to'](_0x130a3f,_0x1488a6(0x15f)),_0x2a2646[_0x1488a6(0x12f)]({'type':_0x1488a6(0x162),'model':_0x4c3611}),_0x2b2950[_0x1488a6(0x129)](_0x130a3f);}return{'itemDefinitions':_0x2a2646,'commands':_0x2b2950};}}