@ckeditor/ckeditor5-case-change 48.5.0-alpha.2 → 48.5.0-alpha.3

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 +6 -6
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x50e829,Plugin as _0x1a2f6e}from'@ckeditor/ckeditor5-core';import{Collection as _0x2e8934,uid as _0x1d257f}from'@ckeditor/ckeditor5-utils';import{MenuBarMenuListItemButtonView as _0x4d984f,MenuBarMenuListItemView as _0x4390f0,MenuBarMenuListView as _0x333ad7,MenuBarMenuView as _0x24df2d,UIModel as _0x58e7fc,addListToDropdown as _0x49b121,createDropdown as _0x3f615f}from'@ckeditor/ckeditor5-ui';import{IconCaseChange as _0x301e53}from'@ckeditor/ckeditor5-icons';var h=class extends _0x50e829{_transformCallback;constructor(_0xde2867,_0x5cafbb){super(_0xde2867),this['_transformCallback']=_0x5cafbb;}execute(){const _0x510571=this['editor']['model'],_0x32fd56=Array['from'](this['_getAffectedRanges']()),_0xaadf05=Array['from'](_0x510571['document']['selection']['getRanges']());_0x510571['change'](_0x1f3f11=>{for(const _0x32dd97 of _0x32fd56)this['_modifyContent'](_0x32dd97,_0x1f3f11);_0x1f3f11['setSelection'](_0xaadf05);});}['refresh'](){for(const _0x553940 of this['_getAffectedRanges']())for(const _0x59a42c of _0x553940)if(_0x59a42c['item']['is']('$textProxy'))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}_getAffectedRanges(){const _0x81c8ba=this['editor']['model'],_0x301225=_0x81c8ba['document']['selection'];if(_0x301225['isCollapsed']){const _0x363dd5=this['_findAncestorTextBlock'](_0x301225['getFirstPosition']()['parent']);return _0x363dd5?[_0x81c8ba['createRangeIn'](_0x363dd5)]:[];}return _0x301225['getRanges']();}_modifyContent(_0x4ae778,_0x2048a1){for(const _0x3492ea of this['_getElementsAllowingText'](_0x4ae778)){const _0x467da8=this['_getElementTextContent'](_0x3492ea),_0x3c665f=this['_transformCallback'](_0x467da8);for(const _0x16f08e of this['_getTextNodesRangeLimited'](_0x3492ea,_0x4ae778))this['_replaceTextNodeData'](_0x16f08e,_0x3c665f,_0x2048a1);}}_findAncestorTextBlock(_0x1ab2b6){const _0x552996=this['editor']['model']['schema'];if(_0x1ab2b6['is']('element')&&_0x552996['checkChild'](_0x1ab2b6,'$text'))return _0x1ab2b6;const _0x317080=_0x1ab2b6['parent'];return!_0x317080||_0x552996['isLimit'](_0x1ab2b6)?null:this['_findAncestorTextBlock'](_0x317080);}*_getElementsAllowingText(_0x2cb36d){const _0x5953b0=new Set();for(const {item:_0x494bea}of _0x2cb36d['getWalker']()){const _0x415d6=this['_findAncestorTextBlock'](_0x494bea);_0x415d6&&!_0x5953b0['has'](_0x415d6)&&(_0x5953b0['add'](_0x415d6),yield _0x415d6);}}_getElementTextContent(_0x4d3f7a){return Array['from'](_0x4d3f7a['getChildren']())['reduce']((_0x3c23ab,_0x50b4cc)=>_0x3c23ab+(_0x50b4cc['is']('$text')?_0x50b4cc['data']:'\x20'),'');}*_getTextNodesRangeLimited(_0x313180,_0x451437){const _0x56fbdf=_0x451437['getIntersection'](this['editor']['model']['createRangeIn'](_0x313180));if(_0x56fbdf){for(const _0x21aed1 of _0x56fbdf['getItems']())_0x21aed1['is']('$textProxy')&&_0x21aed1['parent']==_0x313180&&(yield _0x21aed1);}}_replaceTextNodeData(_0x64c8e2,_0x353537,_0x3f0d56){const _0x537512=_0x353537['substring'](_0x64c8e2['startOffset'],_0x64c8e2['endOffset']);if(_0x537512===_0x64c8e2['data'])return;const _0x3e54cb=_0x64c8e2['getAttributes']();this['editor']['model']['insertContent'](_0x3f0d56['createText'](_0x537512,_0x3e54cb),_0x3f0d56['createSelection'](_0x3f0d56['createRangeOn'](_0x64c8e2)));}};function w(_0x490827,_0x104684,..._0x20fa40){const t=_0x490827['t'];switch(_0x104684){case'Case\x20change':return t('Case\x20change');case'UPPERCASE':return t('UPPERCASE');case'lowercase':return t('lowercase');case'Title\x20Case':return t('Title\x20Case');case'Change\x20text\x20case':return t('Change\x20text\x20case');case'Changed\x20case\x20to\x20%0':return t('Changed\x20case\x20to\x20%0',..._0x20fa40);default:return _0x104684;}}var g=class extends _0x1a2f6e{_currentCommandIndex=0x0;static get['pluginName'](){return'CaseChangeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x396975=this['editor'],_0x460833=_0x396975['locale']['contentLanguage'],_0x23d34f=function(_0x32ce73=[]){return'function'==typeof _0x32ce73?_0x32ce73:(_0x29d10d,{wordIndex:_0x18e5ac})=>_0x18e5ac>0x0&&_0x32ce73['includes'](_0x29d10d);}(_0x396975['config']['get']('caseChange.titleCase.excludeWords')),_0x512a9e={'changeCaseUpper':new h(_0x396975,_0x5b8eef=>_0x5b8eef['toLocaleUpperCase'](_0x460833)),'changeCaseLower':new h(_0x396975,_0x145135=>_0x145135['toLocaleLowerCase'](_0x460833)),'changeCaseTitle':new h(_0x396975,_0x2f5280=>function(_0x255b42,_0x4e1c89,_0x5b8d29){return function(_0x18a73d,_0x2a06bc){let _0x4d5492='',_0x1fb35e=0x0,_0x486175=0x0;for(const _0x3dfc26 of _0x18a73d['matchAll'](/ +/g)){const _0x12944c=_0x3dfc26['index'],_0x31c608=_0x18a73d['substring'](_0x1fb35e,_0x12944c);_0x31c608['length']&&(_0x4d5492+=_0x2a06bc(_0x31c608,_0x1fb35e,_0x486175++)),_0x4d5492+=_0x3dfc26[0x0],_0x1fb35e=_0x12944c+_0x3dfc26[0x0]['length'];}const _0x282ff7=_0x18a73d['substring'](_0x1fb35e);return _0x282ff7['length']&&(_0x4d5492+=_0x2a06bc(_0x282ff7,_0x1fb35e,_0x486175)),_0x4d5492;}(_0x255b42,(_0x2b44a3,_0xae450d,_0x1b5e9d)=>{const _0x3b8468=_0x2b44a3['toLocaleLowerCase'](_0x5b8d29);return _0x4e1c89(_0x3b8468,{'charOffset':_0xae450d,'wordIndex':_0x1b5e9d,'blockText':_0x255b42})?_0x3b8468:_0x3b8468['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x204173=>_0x204173['toLocaleUpperCase'](_0x5b8d29));});}(_0x2f5280,_0x23d34f,_0x460833))};for(const [_0x5141dc,_0x3eb8e6]of Object['entries'](_0x512a9e))_0x396975['commands']['add'](_0x5141dc,_0x3eb8e6),_0x3eb8e6['on']('execute',()=>{this['_announceCaseChangeOperation'](_0x5141dc);});this['listenTo'](_0x396975['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x396975['keystrokes']['set']('shift+f3',(_0x241bc6,_0x4659f3)=>{const _0xc5a08b=m(this['editor']['locale']),_0x2e491a=_0xc5a08b[this['_currentCommandIndex']%_0xc5a08b['length']]['commandName'];_0x396975['execute'](_0x2e491a),this['_currentCommandIndex']++,_0x4659f3();});}afterInit(){!async function(_0xa9bf04){const _0x418ddd='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x50be4f=0x793f8,_0x3d7e60={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4a4a92(_0x1d4fcf){const _0x195e17=new window['Promise'](_0x20b2b8=>{_0x1d4fcf['once']('ready',_0x20b2b8);}),_0x526e9b=window['Date']['now'](),_0x5806ae=_0x1d4fcf['config']['get']('licenseKey');async function _0x43cf1d(){let _0x5e9845,_0x12a638=null,_0x54eccd=null;try{return'GPL'==_0x5806ae?'NotAllowed':(_0x5e9845=_0x3f5351(),_0x5e9845?(_0x5e9845['usageEndpoint']&&(_0x54eccd=_0x190b56(_0x5e9845['usageEndpoint'],_0x5e9845['jti'])),await _0x4eaec9()?_0x3ecb13()?_0x206ffe()?'Expired':_0x52f1ec()?('evaluation'==_0x5e9845['licenseType']&&(_0x12a638=_0x159f0a('EvaluationLimit')),await _0x28e8f3()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x206ffe(){const _0x19e6a7=['evaluation','trial']['includes'](_0x5e9845['licenseType'])?_0x526e9b/0x3e8:0xe10*_0x50be4f;return _0x5e9845['exp']<_0x19e6a7;}function _0x3ecb13(){const _0x95ffa7=_0x5e9845['features'];return!!_0x95ffa7&&(!!_0x95ffa7['includes']('*')||(!!_0x95ffa7['includes']('CC')||!!_0x95ffa7['includes']('PP')));}function _0x52f1ec(){const _0x59d485=_0x5e9845['licensedHosts'];if(!_0x59d485||0x0==_0x59d485['length'])return!0x0;const {hostname:_0x1135c8}=new URL(window['location']['href']);if(_0x59d485['includes'](_0x1135c8))return!0x0;const _0x1ae274=_0x1135c8['split']('.');return _0x59d485['filter'](_0x47ce51=>_0x47ce51['includes']('*'))['map'](_0x156236=>_0x156236['split']('.'))['filter'](_0x5497b9=>_0x5497b9['length']<=_0x1ae274['length'])['map'](_0x25bdd2=>Array(_0x1ae274['length']-_0x25bdd2['length'])['fill']('*'===_0x25bdd2[0x0]?'*':'')['concat'](_0x25bdd2))['some'](_0x119aea=>_0x1ae274['every']((_0x13b4dd,_0x4689ef)=>_0x119aea[_0x4689ef]===_0x13b4dd||'*'===_0x119aea[_0x4689ef]));}function _0x28e8f3(){return _0x12a638&&_0x54eccd?new window['Promise']((_0x355fd8,_0x5da582)=>{_0x12a638['then'](_0x355fd8,_0x5da582),_0x54eccd['then'](_0x1947a4=>{'Valid'!=_0x1947a4&&_0x355fd8(_0x1947a4);},_0x5da582);}):_0x12a638||_0x54eccd||'Valid';}}function _0x190b56(_0x209708,_0x3b24c2){return new window['Promise'](_0x4798d1=>{if(_0x50c754())return _0x4798d1('Valid');_0x31852c(),_0x1d4fcf['decorate']('_sendUsageRequest');let _0x4d8df0=!0x1;const _0x1e808b=_0x1d257f();function _0x246c65(_0x2a038f){return!!_0x2a038f&&('object'==typeof _0x2a038f||'function'==typeof _0x2a038f)&&'function'==typeof _0x2a038f['then']&&'function'==typeof _0x2a038f['catch'];}function _0x538116(_0x41f94b){_0x420fc3(_0x41f94b)['then'](_0x53a16f=>_0x53a16f&&'ok'==_0x53a16f['status']?_0x4c0ea1(_0x413246(_0x1e808b+_0x3b24c2))!=_0x53a16f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4b3a99=>(_0x5eb837(),_0x4b3a99),()=>{const _0x3c70ea=_0x47c019();return null==_0x3c70ea?(_0x5eb837(),'Valid'):_0x526e9b-_0x3c70ea>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4798d1)['catch'](()=>{_0x4798d1('UsageLimit');});const _0x1c45db=0x36ee80;function _0x5eb837(){const _0x32dd0d='llct-'+_0x4c0ea1(_0x413246(_0x209708)),_0x153095=_0x4b0ce1(_0x4c0ea1(window['Math']['ceil'](_0x526e9b/_0x1c45db)));window['localStorage']['setItem'](_0x32dd0d,_0x153095);}function _0x47c019(){const _0x273453='llct-'+_0x4c0ea1(_0x413246(_0x209708)),_0x164844=window['localStorage']['getItem'](_0x273453);return _0x164844?window['parseInt'](_0x4b0ce1(_0x164844),0x10)*_0x1c45db:null;}function _0x420fc3(_0x1c647e){return new window['Promise']((_0x2c578e,_0xa4fc1a)=>{_0x1c647e['then'](_0x2c578e,_0xa4fc1a),window['setTimeout'](_0xa4fc1a,0x1d4c0);});}}_0x1d4fcf['on']('_sendUsageRequest',(_0x41f2b8,_0x3cc879)=>{if(_0x3cc879[0x0]!=_0x209708)return _0x4798d1('UsageLimit');_0x3cc879[0x1]={..._0x3cc879[0x1],'requestId':_0x1e808b};},{'priority':'high'}),_0x1d4fcf['on']('_sendUsageRequest',_0x286a0f=>{_0x246c65(_0x286a0f['return'])&&(_0x4d8df0=!0x0,_0x538116(_0x286a0f['return']));},{'priority':'low'}),_0x195e17['then'](()=>{_0x4d8df0||_0x4798d1('UsageLimit');});});function _0x50c754(){return'auto'==_0x1d4fcf['editing']['view']['_overlayModeHint'];}function _0x31852c(){_0x1d4fcf['editing']['view']['_overlayModeHint']='auto';}}function _0x159f0a(_0x44248f){const _0x4cf24c=[new window['Promise'](_0x2c8125=>setTimeout(_0x2c8125,0x93ecc)),_0x195e17['then'](()=>new window['Promise'](_0x578cf2=>{let _0x41301e=0x0;_0x1d4fcf['model']['on']('applyOperation',(_0x2af9a5,_0x1cab7f)=>{_0x1cab7f[0x0]['isDocumentOperation']&&_0x41301e++,0x5e8==_0x41301e&&(_0x578cf2(),_0x2af9a5['off']());});}))];return window['Promise']['race'](_0x4cf24c)['then'](()=>_0x44248f);}async function _0x1154c3(){await _0x195e17,_0x1d4fcf['model']['change']=_0x168c4a,_0x1d4fcf['model']['enqueueChange']=_0x168c4a,_0x1d4fcf['enableReadOnlyMode']('model');}function _0x513ea8(_0x29ab63){const _0x3e82fd=_0x59b92d();_0x1d4fcf[_0x3e82fd]='caseChangeLicenseKey'+_0x29ab63,'Valid'!=_0x29ab63&&_0x1154c3();}function _0x59b92d(){const _0x4d53ce=window['String'](window['performance']['now']())['replace']('.','');let _0x8139a='a';for(let _0xd8a86b=0x0;_0xd8a86b<_0x4d53ce['length'];_0xd8a86b+=0x2){let _0x2668f7=window['parseInt'](_0x4d53ce['substring'](_0xd8a86b,_0xd8a86b+0x2));_0x2668f7>=0x3e&&(_0x2668f7-=0x3e),_0x8139a+=_0x418ddd[_0x2668f7];}return _0x8139a;}function _0x3f5351(){const _0x39e7f6=_0x5806ae['split']('.');if(0x3!=_0x39e7f6['length'])return null;return _0x32373a(_0x39e7f6[0x1]);function _0x32373a(_0x463257){const _0x3d815a=_0x1f7041(_0x463257);return _0x3d815a&&_0x30e34a()?_0x3d815a:null;function _0x30e34a(){const _0x2987c3=_0x3d815a['jti'],_0x54fe95=window['parseInt'](_0x2987c3['substring'](_0x2987c3['length']-0x8),0x10),_0x46c189={..._0x3d815a,'jti':_0x2987c3['substring'](0x0,_0x2987c3['length']-0x8)};return delete _0x46c189['vc'],_0x413246(_0x46c189)==_0x54fe95;}}}async function _0x4eaec9(){let _0x979484=!0x0;try{const [_0x565207,_0x5224cf,_0x1e6572]=_0x5806ae['split']('.');return _0x40d52a(_0x565207),await _0x660f00(_0x565207,_0x5224cf,_0x1e6572),_0x979484;}catch{return!0x1;}function _0x40d52a(_0x1da3cc){const _0x46f8a0=_0x1f7041(_0x1da3cc);_0x46f8a0&&'ES256'==_0x46f8a0['alg']||(_0x979484=!0x1);}async function _0x660f00(_0x55336a,_0x5eac7c,_0x122919){const _0x4ba9ff=window['Uint8Array']['from'](_0x310c57(_0x122919),_0x35d1d5=>_0x35d1d5['charCodeAt'](0x0)),_0x5ed9ab=new window['TextEncoder']()['encode'](_0x55336a+'.'+_0x5eac7c),_0x293d74=window['crypto']['subtle'];if(!_0x293d74)return;const _0x51c1f9=await _0x293d74['importKey']('jwk',_0x3d7e60,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x293d74['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x51c1f9,_0x4ba9ff,_0x5ed9ab)||(_0x979484=!0x1);}}function _0x1f7041(_0x3ffbc9){return _0x3ffbc9['startsWith']('ey')?JSON['parse'](_0x310c57(_0x3ffbc9)):null;}function _0x310c57(_0x11a7de){return window['atob'](_0x11a7de['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x413246(_0x3b1a57){let _0x3e7ced=0x1505;function _0x2e52cc(_0x5e59d3){for(let _0x335051=0x0;_0x335051<_0x5e59d3['length'];_0x335051++){const _0x54bf4d=_0x5e59d3['charCodeAt'](_0x335051);_0x3e7ced=(_0x3e7ced<<0x5)+_0x3e7ced+_0x54bf4d,_0x3e7ced&=_0x3e7ced;}}function _0x14d68a(_0xfc4ac7){Array['isArray'](_0xfc4ac7)?_0xfc4ac7['forEach'](_0x14d68a):_0xfc4ac7&&'object'==typeof _0xfc4ac7?Object['entries'](_0xfc4ac7)['sort']()['forEach'](([_0x4d9cae,_0x41cc82])=>{_0x2e52cc(_0x4d9cae),_0x14d68a(_0x41cc82);}):_0x2e52cc(window['String'](_0xfc4ac7));}return _0x14d68a(_0x3b1a57),_0x3e7ced>>>0x0;}function _0x4c0ea1(_0x536ed6){return _0x536ed6['toString'](0x10)['padStart'](0x8,'0');}function _0x4b0ce1(_0x3a5d87){return _0x3a5d87['split']('')['reverse']()['join']('');}function _0x168c4a(){}_0x513ea8(await _0x43cf1d());}_0x4a4a92(_0xa9bf04['editor']);}(this);}_announceCaseChangeOperation(_0x32d2ee){const {ui:_0x46309d,locale:_0x3783e2}=this['editor'],_0x581aea=m(_0x3783e2)['find'](_0x333090=>_0x333090['commandName']===_0x32d2ee)['label']['toLowerCase']();_0x46309d['ariaLiveAnnouncer']['announce'](w(_0x3783e2,'Changed\x20case\x20to\x20%0',_0x581aea));}};function m(_0x14d7b9){return[{'label':w(_0x14d7b9,'UPPERCASE'),'commandName':'changeCaseUpper'},{'label':w(_0x14d7b9,'lowercase'),'commandName':'changeCaseLower'},{'label':w(_0x14d7b9,'Title\x20Case'),'commandName':'changeCaseTitle'}];}var C=class extends _0x1a2f6e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CaseChangeUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x380dd4=this['editor'];this['_registerComponents'](),_0x380dd4['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':w(_0x380dd4['locale'],'Change\x20text\x20case'),'keystroke':'Shift+f3','mayRequireFn':!0x0}]}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x4dea9e=[this['editor']];for(const _0x716b86 of _0x4dea9e){let _0x2e246b;for(const _0x5db5c8 in _0x716b86){const _0x4ae2a8=_0x5db5c8,_0x1cc0cb=_0x716b86[_0x4ae2a8];if('caseChangeLicenseKeyValid'==_0x1cc0cb||'caseChangeLicenseKeyInvalid'==_0x1cc0cb||'caseChangeLicenseKeyExpired'==_0x1cc0cb||'caseChangeLicenseKeyDomainLimit'==_0x1cc0cb||'caseChangeLicenseKeyNotAllowed'==_0x1cc0cb||'caseChangeLicenseKeyEvaluationLimit'==_0x1cc0cb||'caseChangeLicenseKeyUsageLimit'==_0x1cc0cb){delete _0x716b86[_0x4ae2a8],_0x2e246b=_0x1cc0cb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'caseChangeLicenseKeyInvalid'==_0x2e246b&&_0x716b86['_showLicenseError']('invalid'),'caseChangeLicenseKeyExpired'==_0x2e246b&&_0x716b86['_showLicenseError']('expired'),'caseChangeLicenseKeyDomainLimit'==_0x2e246b&&_0x716b86['_showLicenseError']('domainLimit'),'caseChangeLicenseKeyNotAllowed'==_0x2e246b&&_0x716b86['_showLicenseError']('featureNotAllowed','CaseChange'),'caseChangeLicenseKeyEvaluationLimit'==_0x2e246b&&_0x716b86['_showLicenseError']('evaluationLimit'),'caseChangeLicenseKeyUsageLimit'==_0x2e246b&&_0x716b86['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_registerComponents(){const _0x860d92=this['editor'],{itemDefinitions:_0x4b357b,commands:_0x26f648}=this['_getListItemDefinitionsAndCommands']();_0x860d92['ui']['componentFactory']['add']('caseChange',()=>this['_createDropdownView'](_0x4b357b,_0x26f648)),_0x860d92['ui']['componentFactory']['add']('menuBar:caseChange',()=>this['_createMenuBarMenuView'](_0x4b357b,_0x26f648));}_createMenuBarMenuView(_0x4f0be5,_0x22c040){const _0x2155a5=this['editor'],_0x1c08de=_0x2155a5['locale'],_0x2ca5a4=new _0x24df2d(_0x1c08de),_0x3e6172=new _0x333ad7(_0x1c08de);_0x3e6172['set']({'ariaLabel':w(_0x1c08de,'Case\x20change'),'role':'menu'}),this['_setButtonProperties'](_0x2ca5a4['buttonView']),_0x2ca5a4['bind']('isEnabled')['toMany'](_0x22c040,'isEnabled',(..._0x169194)=>_0x169194['some'](_0x3fa55f=>_0x3fa55f));for(const _0xb33322 of _0x4f0be5){const _0x23f9d4=new _0x4390f0(_0x1c08de,_0x2ca5a4),_0x48a7a9=new _0x4d984f(_0x1c08de);_0x48a7a9['delegate']('execute')['to'](_0x2ca5a4),_0x48a7a9['bind'](...Object['keys'](_0xb33322['model']))['to'](_0xb33322['model']),_0x48a7a9['on']('execute',()=>{_0x2155a5['execute'](_0xb33322['model']['commandName']),_0x2155a5['editing']['view']['focus']();}),_0x23f9d4['children']['add'](_0x48a7a9),_0x3e6172['items']['add'](_0x23f9d4);}return _0x2ca5a4['panelView']['children']['add'](_0x3e6172),_0x2ca5a4;}_createDropdownView(_0x7e08a,_0x2132f6){const _0x5bf04d=this['editor'],_0x2e7f10=_0x3f615f(_0x5bf04d['locale']);return this['_setButtonProperties'](_0x2e7f10['buttonView']),_0x2e7f10['buttonView']['set']({'tooltip':!0x0}),_0x2e7f10['extendTemplate']({'attributes':{'class':['ck-case-change-dropdown']}}),_0x49b121(_0x2e7f10,_0x7e08a,{'ariaLabel':w(_0x5bf04d['locale'],'Case\x20change'),'role':'menu'}),_0x2e7f10['bind']('isEnabled')['toMany'](_0x2132f6,'isEnabled',(..._0x240324)=>_0x240324['some'](_0x3755ae=>_0x3755ae)),this['listenTo'](_0x2e7f10,'execute',_0x33c1c8=>{_0x5bf04d['execute'](_0x33c1c8['source']['commandName']),_0x5bf04d['editing']['view']['focus']();}),_0x2e7f10;}_setButtonProperties(_0x58bfbc){const _0x3d83ee=this['editor'];_0x58bfbc['set']({'label':w(_0x3d83ee['locale'],'Case\x20change'),'icon':_0x301e53,'keystroke':'Shift+F3'});}_getListItemDefinitionsAndCommands(){const _0x6254bd=new _0x2e8934(),_0x414bfc=[];for(const _0x2b76c6 of m(this['editor']['locale'])){const _0x1a6ae6=this['editor']['commands']['get'](_0x2b76c6['commandName']),_0x28eeef=new _0x58e7fc({'commandName':_0x2b76c6['commandName'],'label':_0x2b76c6['label'],'role':'menuitemradio','withText':!0x0});_0x28eeef['bind']('isEnabled')['to'](_0x1a6ae6,'isEnabled'),_0x6254bd['add']({'type':'button','model':_0x28eeef}),_0x414bfc['push'](_0x1a6ae6);}return{'itemDefinitions':_0x6254bd,'commands':_0x414bfc};}},y=class extends _0x1a2f6e{static get requires(){return[g,C];}static get['pluginName'](){return'CaseChange';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{y as CaseChange,h as CaseChangeCommand,g as CaseChangeEditing,C as CaseChangeUI};
23
+ import{Command as _0x53cd63,Plugin as _0x5ed300}from'@ckeditor/ckeditor5-core';import{Collection as _0x2ea394,uid as _0x3a0e25}from'@ckeditor/ckeditor5-utils';import{MenuBarMenuListItemButtonView as _0x16a902,MenuBarMenuListItemView as _0x17b795,MenuBarMenuListView as _0x5a1f4a,MenuBarMenuView as _0x2b02ae,UIModel as _0x521a8b,addListToDropdown as _0x752eb,createDropdown as _0x528cc7}from'@ckeditor/ckeditor5-ui';import{IconCaseChange as _0x3de04b}from'@ckeditor/ckeditor5-icons';var h=class extends _0x53cd63{_transformCallback;constructor(_0x258574,_0x393d6b){super(_0x258574),this['_transformCallback']=_0x393d6b;}execute(){const _0x70a141=this['editor']['model'],_0x25532f=Array['from'](this['_getAffectedRanges']()),_0x331d8e=Array['from'](_0x70a141['document']['selection']['getRanges']());_0x70a141['change'](_0x379c4a=>{for(const _0xd9468c of _0x25532f)this['_modifyContent'](_0xd9468c,_0x379c4a);_0x379c4a['setSelection'](_0x331d8e);});}['refresh'](){for(const _0x8e2bc5 of this['_getAffectedRanges']())for(const _0x9fe719 of _0x8e2bc5)if(_0x9fe719['item']['is']('$textProxy'))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}_getAffectedRanges(){const _0xaa4a65=this['editor']['model'],_0x34c461=_0xaa4a65['document']['selection'];if(_0x34c461['isCollapsed']){const _0xd128b3=this['_findAncestorTextBlock'](_0x34c461['getFirstPosition']()['parent']);return _0xd128b3?[_0xaa4a65['createRangeIn'](_0xd128b3)]:[];}return _0x34c461['getRanges']();}_modifyContent(_0x1509ab,_0x31ae9c){for(const _0x2e2675 of this['_getElementsAllowingText'](_0x1509ab)){const _0x1f9a5f=this['_getElementTextContent'](_0x2e2675),_0x534f71=this['_transformCallback'](_0x1f9a5f);for(const _0x28b5e4 of this['_getTextNodesRangeLimited'](_0x2e2675,_0x1509ab))this['_replaceTextNodeData'](_0x28b5e4,_0x534f71,_0x31ae9c);}}_findAncestorTextBlock(_0x5a3b5b){const _0x15225f=this['editor']['model']['schema'];if(_0x5a3b5b['is']('element')&&_0x15225f['checkChild'](_0x5a3b5b,'$text'))return _0x5a3b5b;const _0x20bade=_0x5a3b5b['parent'];return!_0x20bade||_0x15225f['isLimit'](_0x5a3b5b)?null:this['_findAncestorTextBlock'](_0x20bade);}*_getElementsAllowingText(_0x550d6a){const _0x10dffb=new Set();for(const {item:_0x3dc35a}of _0x550d6a['getWalker']()){const _0xb96caf=this['_findAncestorTextBlock'](_0x3dc35a);_0xb96caf&&!_0x10dffb['has'](_0xb96caf)&&(_0x10dffb['add'](_0xb96caf),yield _0xb96caf);}}_getElementTextContent(_0x4b6781){return Array['from'](_0x4b6781['getChildren']())['reduce']((_0x4cab11,_0x798cd5)=>_0x4cab11+(_0x798cd5['is']('$text')?_0x798cd5['data']:'\x20'),'');}*_getTextNodesRangeLimited(_0x58aa3a,_0x31157e){const _0x4c999b=_0x31157e['getIntersection'](this['editor']['model']['createRangeIn'](_0x58aa3a));if(_0x4c999b){for(const _0x51950c of _0x4c999b['getItems']())_0x51950c['is']('$textProxy')&&_0x51950c['parent']==_0x58aa3a&&(yield _0x51950c);}}_replaceTextNodeData(_0x4ddfb4,_0x200126,_0x423bf1){const _0x3fa98a=_0x200126['substring'](_0x4ddfb4['startOffset'],_0x4ddfb4['endOffset']);if(_0x3fa98a===_0x4ddfb4['data'])return;const _0x312e17=_0x4ddfb4['getAttributes']();this['editor']['model']['insertContent'](_0x423bf1['createText'](_0x3fa98a,_0x312e17),_0x423bf1['createSelection'](_0x423bf1['createRangeOn'](_0x4ddfb4)));}};function w(_0x268f0c,_0x2ded0a,..._0x1dafb2){const t=_0x268f0c['t'];switch(_0x2ded0a){case'Case\x20change':return t('Case\x20change');case'UPPERCASE':return t('UPPERCASE');case'lowercase':return t('lowercase');case'Title\x20Case':return t('Title\x20Case');case'Change\x20text\x20case':return t('Change\x20text\x20case');case'Changed\x20case\x20to\x20%0':return t('Changed\x20case\x20to\x20%0',..._0x1dafb2);default:return _0x2ded0a;}}var g=class extends _0x5ed300{_currentCommandIndex=0x0;static get['pluginName'](){return'CaseChangeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1d7ce5=this['editor'],_0x4e3b81=_0x1d7ce5['locale']['contentLanguage'],_0x546f4f=function(_0x3f74e0=[]){return'function'==typeof _0x3f74e0?_0x3f74e0:(_0x2516ed,{wordIndex:_0x1c0be6})=>_0x1c0be6>0x0&&_0x3f74e0['includes'](_0x2516ed);}(_0x1d7ce5['config']['get']('caseChange.titleCase.excludeWords')),_0x2e566c={'changeCaseUpper':new h(_0x1d7ce5,_0x181235=>_0x181235['toLocaleUpperCase'](_0x4e3b81)),'changeCaseLower':new h(_0x1d7ce5,_0x213b0=>_0x213b0['toLocaleLowerCase'](_0x4e3b81)),'changeCaseTitle':new h(_0x1d7ce5,_0x4fa514=>function(_0x15ef33,_0x5e285b,_0x197c93){return function(_0x35854f,_0x54270e){let _0x1749fc='',_0x175794=0x0,_0x31e10a=0x0;for(const _0x47eba1 of _0x35854f['matchAll'](/ +/g)){const _0x3324e9=_0x47eba1['index'],_0x380eba=_0x35854f['substring'](_0x175794,_0x3324e9);_0x380eba['length']&&(_0x1749fc+=_0x54270e(_0x380eba,_0x175794,_0x31e10a++)),_0x1749fc+=_0x47eba1[0x0],_0x175794=_0x3324e9+_0x47eba1[0x0]['length'];}const _0x9ed17=_0x35854f['substring'](_0x175794);return _0x9ed17['length']&&(_0x1749fc+=_0x54270e(_0x9ed17,_0x175794,_0x31e10a)),_0x1749fc;}(_0x15ef33,(_0x48a8f4,_0x48c890,_0x298568)=>{const _0x1393e3=_0x48a8f4['toLocaleLowerCase'](_0x197c93);return _0x5e285b(_0x1393e3,{'charOffset':_0x48c890,'wordIndex':_0x298568,'blockText':_0x15ef33})?_0x1393e3:_0x1393e3['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x5a5c07=>_0x5a5c07['toLocaleUpperCase'](_0x197c93));});}(_0x4fa514,_0x546f4f,_0x4e3b81))};for(const [_0x39e2f1,_0x205234]of Object['entries'](_0x2e566c))_0x1d7ce5['commands']['add'](_0x39e2f1,_0x205234),_0x205234['on']('execute',()=>{this['_announceCaseChangeOperation'](_0x39e2f1);});this['listenTo'](_0x1d7ce5['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x1d7ce5['keystrokes']['set']('shift+f3',(_0x2b9984,_0x32b616)=>{const _0xe54066=m(this['editor']['locale']),_0x302240=_0xe54066[this['_currentCommandIndex']%_0xe54066['length']]['commandName'];_0x1d7ce5['execute'](_0x302240),this['_currentCommandIndex']++,_0x32b616();});}afterInit(){!async function(_0x3e9a90){const _0x4ac316='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x537945=0x79410,_0x58a281={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2ab53d(_0x34480c){const _0x32adde=new window['Promise'](_0x40e230=>{_0x34480c['once']('ready',_0x40e230);}),_0x5183ba=window['Date']['now'](),_0x542aaf=_0x34480c['config']['get']('licenseKey');async function _0x284c0e(){let _0x2c4645,_0x35e482=null,_0x273808=null;try{return'GPL'==_0x542aaf?'NotAllowed':(_0x2c4645=_0x18b8e4(),_0x2c4645?(_0x2c4645['usageEndpoint']&&(_0x273808=_0x579da1(_0x2c4645['usageEndpoint'],_0x2c4645['jti'])),await _0xd27eb4()?_0x2d0614()?_0xf22d6d()?'Expired':_0x1224f4()?('evaluation'==_0x2c4645['licenseType']&&(_0x35e482=_0x456793('EvaluationLimit')),await _0x12c631()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xf22d6d(){const _0x3b11d0=['evaluation','trial']['includes'](_0x2c4645['licenseType'])?_0x5183ba/0x3e8:0xe10*_0x537945;return _0x2c4645['exp']<_0x3b11d0;}function _0x2d0614(){const _0xb39d1b=_0x2c4645['features'];return!!_0xb39d1b&&(!!_0xb39d1b['includes']('*')||(!!_0xb39d1b['includes']('CC')||!!_0xb39d1b['includes']('PP')));}function _0x1224f4(){const _0x4a88dd=_0x2c4645['licensedHosts'];if(!_0x4a88dd||0x0==_0x4a88dd['length'])return!0x0;const {hostname:_0x4c8f1a}=new URL(window['location']['href']);if(_0x4a88dd['includes'](_0x4c8f1a))return!0x0;const _0x532145=_0x4c8f1a['split']('.');return _0x4a88dd['filter'](_0x234fe2=>_0x234fe2['includes']('*'))['map'](_0x488feb=>_0x488feb['split']('.'))['filter'](_0x2676c3=>_0x2676c3['length']<=_0x532145['length'])['map'](_0x4e27cb=>Array(_0x532145['length']-_0x4e27cb['length'])['fill']('*'===_0x4e27cb[0x0]?'*':'')['concat'](_0x4e27cb))['some'](_0x127648=>_0x532145['every']((_0x3dd226,_0x3712ae)=>_0x127648[_0x3712ae]===_0x3dd226||'*'===_0x127648[_0x3712ae]));}function _0x12c631(){return _0x35e482&&_0x273808?new window['Promise']((_0x52146d,_0x2745d0)=>{_0x35e482['then'](_0x52146d,_0x2745d0),_0x273808['then'](_0xbf917a=>{'Valid'!=_0xbf917a&&_0x52146d(_0xbf917a);},_0x2745d0);}):_0x35e482||_0x273808||'Valid';}}function _0x579da1(_0x151451,_0x23ab5a){return new window['Promise'](_0xf0fbcd=>{if(_0x38d047())return _0xf0fbcd('Valid');_0x176219(),_0x34480c['decorate']('_sendUsageRequest');let _0x248e29=!0x1;const _0x1f2379=_0x3a0e25();function _0x4bc3e3(_0x131232){return!!_0x131232&&('object'==typeof _0x131232||'function'==typeof _0x131232)&&'function'==typeof _0x131232['then']&&'function'==typeof _0x131232['catch'];}function _0x35d7a6(_0x44a62d){_0xf96711(_0x44a62d)['then'](_0x4697dc=>_0x4697dc&&'ok'==_0x4697dc['status']?_0x28d4bc(_0x4619cb(_0x1f2379+_0x23ab5a))!=_0x4697dc['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x215a04=>(_0x11ebbb(),_0x215a04),()=>{const _0x3c5c28=_0x16c5c3();return null==_0x3c5c28?(_0x11ebbb(),'Valid'):_0x5183ba-_0x3c5c28>0x240c8400?'UsageLimit':'Valid';})['then'](_0xf0fbcd)['catch'](()=>{_0xf0fbcd('UsageLimit');});const _0x4e004b=0x36ee80;function _0x11ebbb(){const _0x394c9e='llct-'+_0x28d4bc(_0x4619cb(_0x151451)),_0x3f6903=_0x51b6e6(_0x28d4bc(window['Math']['ceil'](_0x5183ba/_0x4e004b)));window['localStorage']['setItem'](_0x394c9e,_0x3f6903);}function _0x16c5c3(){const _0x2f07e2='llct-'+_0x28d4bc(_0x4619cb(_0x151451)),_0x210450=window['localStorage']['getItem'](_0x2f07e2);return _0x210450?window['parseInt'](_0x51b6e6(_0x210450),0x10)*_0x4e004b:null;}function _0xf96711(_0x591a6d){return new window['Promise']((_0x371b20,_0x212e2e)=>{_0x591a6d['then'](_0x371b20,_0x212e2e),window['setTimeout'](_0x212e2e,0x1d4c0);});}}_0x34480c['on']('_sendUsageRequest',(_0x26daf5,_0x15ca34)=>{if(_0x15ca34[0x0]!=_0x151451)return _0xf0fbcd('UsageLimit');_0x15ca34[0x1]={..._0x15ca34[0x1],'requestId':_0x1f2379};},{'priority':'high'}),_0x34480c['on']('_sendUsageRequest',_0x5acb18=>{_0x4bc3e3(_0x5acb18['return'])&&(_0x248e29=!0x0,_0x35d7a6(_0x5acb18['return']));},{'priority':'low'}),_0x32adde['then'](()=>{_0x248e29||_0xf0fbcd('UsageLimit');});});function _0x38d047(){return'auto'==_0x34480c['editing']['view']['_overlayModeHint'];}function _0x176219(){_0x34480c['editing']['view']['_overlayModeHint']='auto';}}function _0x456793(_0x4a68a0){const _0x45b1ca=[new window['Promise'](_0x1167b1=>setTimeout(_0x1167b1,0x93ecc)),_0x32adde['then'](()=>new window['Promise'](_0x450287=>{let _0x22aaed=0x0;_0x34480c['model']['on']('applyOperation',(_0x9cf69a,_0x4ebfca)=>{_0x4ebfca[0x0]['isDocumentOperation']&&_0x22aaed++,0x5e8==_0x22aaed&&(_0x450287(),_0x9cf69a['off']());});}))];return window['Promise']['race'](_0x45b1ca)['then'](()=>_0x4a68a0);}async function _0x1f896a(){await _0x32adde,_0x34480c['model']['change']=_0x38a385,_0x34480c['model']['enqueueChange']=_0x38a385,_0x34480c['enableReadOnlyMode']('model');}function _0x5b8fb8(_0x1ea002){const _0x5cbf6e=_0x59b12d();_0x34480c[_0x5cbf6e]='caseChangeLicenseKey'+_0x1ea002,'Valid'!=_0x1ea002&&_0x1f896a();}function _0x59b12d(){const _0x3b0a17=window['String'](window['performance']['now']())['replace']('.','');let _0x3171e6='a';for(let _0x5cc696=0x0;_0x5cc696<_0x3b0a17['length'];_0x5cc696+=0x2){let _0x2e8f66=window['parseInt'](_0x3b0a17['substring'](_0x5cc696,_0x5cc696+0x2));_0x2e8f66>=0x3e&&(_0x2e8f66-=0x3e),_0x3171e6+=_0x4ac316[_0x2e8f66];}return _0x3171e6;}function _0x18b8e4(){const _0x45bbcb=_0x542aaf['split']('.');if(0x3!=_0x45bbcb['length'])return null;return _0x339118(_0x45bbcb[0x1]);function _0x339118(_0x29c83f){const _0x4c99ff=_0x2af3b4(_0x29c83f);return _0x4c99ff&&_0x31ab97()?_0x4c99ff:null;function _0x31ab97(){const _0x6f9a6b=_0x4c99ff['jti'],_0x32c1b4=window['parseInt'](_0x6f9a6b['substring'](_0x6f9a6b['length']-0x8),0x10),_0x5d1d72={..._0x4c99ff,'jti':_0x6f9a6b['substring'](0x0,_0x6f9a6b['length']-0x8)};return delete _0x5d1d72['vc'],_0x4619cb(_0x5d1d72)==_0x32c1b4;}}}async function _0xd27eb4(){let _0x29e2d8=!0x0;try{const [_0x1c4a02,_0x1f0abf,_0x4bd8b8]=_0x542aaf['split']('.');return _0x3750eb(_0x1c4a02),await _0x2ef7b1(_0x1c4a02,_0x1f0abf,_0x4bd8b8),_0x29e2d8;}catch{return!0x1;}function _0x3750eb(_0x422774){const _0x376e8c=_0x2af3b4(_0x422774);_0x376e8c&&'ES256'==_0x376e8c['alg']||(_0x29e2d8=!0x1);}async function _0x2ef7b1(_0x7b02ac,_0x1ba184,_0x12d173){const _0x41c1db=window['Uint8Array']['from'](_0x680a01(_0x12d173),_0x257fe1=>_0x257fe1['charCodeAt'](0x0)),_0x58c5af=new window['TextEncoder']()['encode'](_0x7b02ac+'.'+_0x1ba184),_0x5d13b8=window['crypto']['subtle'];if(!_0x5d13b8)return;const _0x3bd2e7=await _0x5d13b8['importKey']('jwk',_0x58a281,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5d13b8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3bd2e7,_0x41c1db,_0x58c5af)||(_0x29e2d8=!0x1);}}function _0x2af3b4(_0x45580d){return _0x45580d['startsWith']('ey')?JSON['parse'](_0x680a01(_0x45580d)):null;}function _0x680a01(_0x4dcdfd){return window['atob'](_0x4dcdfd['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4619cb(_0x33da93){let _0x555b44=0x1505;function _0x547dc0(_0x18dd7e){for(let _0x5bc738=0x0;_0x5bc738<_0x18dd7e['length'];_0x5bc738++){const _0x56cc2d=_0x18dd7e['charCodeAt'](_0x5bc738);_0x555b44=(_0x555b44<<0x5)+_0x555b44+_0x56cc2d,_0x555b44&=_0x555b44;}}function _0xb221ae(_0xe3192f){Array['isArray'](_0xe3192f)?_0xe3192f['forEach'](_0xb221ae):_0xe3192f&&'object'==typeof _0xe3192f?Object['entries'](_0xe3192f)['sort']()['forEach'](([_0x3caa1c,_0x53fb02])=>{_0x547dc0(_0x3caa1c),_0xb221ae(_0x53fb02);}):_0x547dc0(window['String'](_0xe3192f));}return _0xb221ae(_0x33da93),_0x555b44>>>0x0;}function _0x28d4bc(_0x4ca788){return _0x4ca788['toString'](0x10)['padStart'](0x8,'0');}function _0x51b6e6(_0x2f920a){return _0x2f920a['split']('')['reverse']()['join']('');}function _0x38a385(){}_0x5b8fb8(await _0x284c0e());}_0x2ab53d(_0x3e9a90['editor']);}(this);}_announceCaseChangeOperation(_0x278c29){const {ui:_0x2142a6,locale:_0x2024e7}=this['editor'],_0x29d4f9=m(_0x2024e7)['find'](_0x1ecf66=>_0x1ecf66['commandName']===_0x278c29)['label']['toLowerCase']();_0x2142a6['ariaLiveAnnouncer']['announce'](w(_0x2024e7,'Changed\x20case\x20to\x20%0',_0x29d4f9));}};function m(_0x3fef9c){return[{'label':w(_0x3fef9c,'UPPERCASE'),'commandName':'changeCaseUpper'},{'label':w(_0x3fef9c,'lowercase'),'commandName':'changeCaseLower'},{'label':w(_0x3fef9c,'Title\x20Case'),'commandName':'changeCaseTitle'}];}var C=class extends _0x5ed300{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CaseChangeUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1c745=this['editor'];this['_registerComponents'](),_0x1c745['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':w(_0x1c745['locale'],'Change\x20text\x20case'),'keystroke':'Shift+f3','mayRequireFn':!0x0}]}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x3ad99b=[this['editor']];for(const _0x44b41a of _0x3ad99b){let _0x559695;for(const _0x288c59 in _0x44b41a){const _0x275181=_0x288c59,_0x299241=_0x44b41a[_0x275181];if('caseChangeLicenseKeyValid'==_0x299241||'caseChangeLicenseKeyInvalid'==_0x299241||'caseChangeLicenseKeyExpired'==_0x299241||'caseChangeLicenseKeyDomainLimit'==_0x299241||'caseChangeLicenseKeyNotAllowed'==_0x299241||'caseChangeLicenseKeyEvaluationLimit'==_0x299241||'caseChangeLicenseKeyUsageLimit'==_0x299241){delete _0x44b41a[_0x275181],_0x559695=_0x299241,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'caseChangeLicenseKeyInvalid'==_0x559695&&_0x44b41a['_showLicenseError']('invalid'),'caseChangeLicenseKeyExpired'==_0x559695&&_0x44b41a['_showLicenseError']('expired'),'caseChangeLicenseKeyDomainLimit'==_0x559695&&_0x44b41a['_showLicenseError']('domainLimit'),'caseChangeLicenseKeyNotAllowed'==_0x559695&&_0x44b41a['_showLicenseError']('featureNotAllowed','CaseChange'),'caseChangeLicenseKeyEvaluationLimit'==_0x559695&&_0x44b41a['_showLicenseError']('evaluationLimit'),'caseChangeLicenseKeyUsageLimit'==_0x559695&&_0x44b41a['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_registerComponents(){const _0x3979d0=this['editor'],{itemDefinitions:_0x1f35a7,commands:_0x5d53a3}=this['_getListItemDefinitionsAndCommands']();_0x3979d0['ui']['componentFactory']['add']('caseChange',()=>this['_createDropdownView'](_0x1f35a7,_0x5d53a3)),_0x3979d0['ui']['componentFactory']['add']('menuBar:caseChange',()=>this['_createMenuBarMenuView'](_0x1f35a7,_0x5d53a3));}_createMenuBarMenuView(_0x3f17da,_0x128780){const _0x260d20=this['editor'],_0x3502c8=_0x260d20['locale'],_0x480a68=new _0x2b02ae(_0x3502c8),_0x5c3624=new _0x5a1f4a(_0x3502c8);_0x5c3624['set']({'ariaLabel':w(_0x3502c8,'Case\x20change'),'role':'menu'}),this['_setButtonProperties'](_0x480a68['buttonView']),_0x480a68['bind']('isEnabled')['toMany'](_0x128780,'isEnabled',(..._0x4975b1)=>_0x4975b1['some'](_0x434d29=>_0x434d29));for(const _0x1fb38d of _0x3f17da){const _0x347685=new _0x17b795(_0x3502c8,_0x480a68),_0x48c1a0=new _0x16a902(_0x3502c8);_0x48c1a0['delegate']('execute')['to'](_0x480a68),_0x48c1a0['bind'](...Object['keys'](_0x1fb38d['model']))['to'](_0x1fb38d['model']),_0x48c1a0['on']('execute',()=>{_0x260d20['execute'](_0x1fb38d['model']['commandName']),_0x260d20['editing']['view']['focus']();}),_0x347685['children']['add'](_0x48c1a0),_0x5c3624['items']['add'](_0x347685);}return _0x480a68['panelView']['children']['add'](_0x5c3624),_0x480a68;}_createDropdownView(_0x53e5d9,_0x4d7f0e){const _0x215d1f=this['editor'],_0x1e0aa6=_0x528cc7(_0x215d1f['locale']);return this['_setButtonProperties'](_0x1e0aa6['buttonView']),_0x1e0aa6['buttonView']['set']({'tooltip':!0x0}),_0x1e0aa6['extendTemplate']({'attributes':{'class':['ck-case-change-dropdown']}}),_0x752eb(_0x1e0aa6,_0x53e5d9,{'ariaLabel':w(_0x215d1f['locale'],'Case\x20change'),'role':'menu'}),_0x1e0aa6['bind']('isEnabled')['toMany'](_0x4d7f0e,'isEnabled',(..._0x1d02d0)=>_0x1d02d0['some'](_0x19e59f=>_0x19e59f)),this['listenTo'](_0x1e0aa6,'execute',_0x31bdea=>{_0x215d1f['execute'](_0x31bdea['source']['commandName']),_0x215d1f['editing']['view']['focus']();}),_0x1e0aa6;}_setButtonProperties(_0x2ba3d6){const _0x56fecf=this['editor'];_0x2ba3d6['set']({'label':w(_0x56fecf['locale'],'Case\x20change'),'icon':_0x3de04b,'keystroke':'Shift+F3'});}_getListItemDefinitionsAndCommands(){const _0x4bd38f=new _0x2ea394(),_0x47f685=[];for(const _0x1c94f of m(this['editor']['locale'])){const _0x4b310c=this['editor']['commands']['get'](_0x1c94f['commandName']),_0x5c3279=new _0x521a8b({'commandName':_0x1c94f['commandName'],'label':_0x1c94f['label'],'role':'menuitemradio','withText':!0x0});_0x5c3279['bind']('isEnabled')['to'](_0x4b310c,'isEnabled'),_0x4bd38f['add']({'type':'button','model':_0x5c3279}),_0x47f685['push'](_0x4b310c);}return{'itemDefinitions':_0x4bd38f,'commands':_0x47f685};}},y=class extends _0x5ed300{static get requires(){return[g,C];}static get['pluginName'](){return'CaseChange';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{y as CaseChange,h as CaseChangeCommand,g as CaseChangeEditing,C as CaseChangeUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-case-change",
3
- "version": "48.5.0-alpha.2",
3
+ "version": "48.5.0-alpha.3",
4
4
  "description": "Case change feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -36,11 +36,11 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "dependencies": {
39
- "@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
40
- "@ckeditor/ckeditor5-engine": "48.5.0-alpha.2",
41
- "@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
42
- "@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
43
- "@ckeditor/ckeditor5-utils": "48.5.0-alpha.2"
39
+ "@ckeditor/ckeditor5-core": "48.5.0-alpha.3",
40
+ "@ckeditor/ckeditor5-engine": "48.5.0-alpha.3",
41
+ "@ckeditor/ckeditor5-icons": "48.5.0-alpha.3",
42
+ "@ckeditor/ckeditor5-ui": "48.5.0-alpha.3",
43
+ "@ckeditor/ckeditor5-utils": "48.5.0-alpha.3"
44
44
  },
45
45
  "files": [
46
46
  "dist",