@ckeditor/ckeditor5-line-height 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 +7 -7
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1b2de8,Plugin as _0x44ed52}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x561132,Collection as _0x1a01d9,first as _0x4ba204,uid as _0x469505}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x47f5b3,isPercentageStyleValue as _0x20f581}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x3c4dc1,MenuBarMenuListItemView as _0x3100d6,MenuBarMenuListView as _0x152ff1,MenuBarMenuView as _0x29da89,UIModel as _0x1759ba,addListToDropdown as _0x3ed2ed,createDropdown as _0x2f7737}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x2d6370}from'@ckeditor/ckeditor5-icons';var p=class extends _0x1b2de8{['refresh'](){const _0x4500c9=this['editor']['model']['document'],_0x5cca14=_0x4ba204(_0x4500c9['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x5cca14)&&this['_canHaveLineHeight'](_0x5cca14),this['value']=this['isEnabled']&&_0x5cca14['getAttribute']('lineHeight');}execute(_0x488c1c={}){const _0xf95827=this['editor']['model'],_0x5618b4=_0xf95827['document']['selection'],_0x2f9a7c=_0x488c1c['value'];_0xf95827['change'](_0x258a53=>{const _0x3c4cfd=Array['from'](_0x5618b4['getSelectedBlocks']())['filter'](_0x4b9482=>this['_canHaveLineHeight'](_0x4b9482));for(const _0x396e5a of _0x3c4cfd)_0x2f9a7c?_0x258a53['setAttribute']('lineHeight',_0x2f9a7c,_0x396e5a):_0x258a53['removeAttribute']('lineHeight',_0x396e5a);});}_canHaveLineHeight(_0x4e3a4f){return this['editor']['model']['schema']['checkAttribute'](_0x4e3a4f,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x37389b){return'string'==typeof _0x37389b&&'default'===_0x37389b['toLowerCase']();}function L(_0x7332cf){return _0x7332cf['options']['map'](_0x43e940=>{return H(_0x43e940)?{'title':String(_0x7332cf['defaultValue']),'model':'default'}:('number'==typeof _0x43e940&&(_0x43e940=String(_0x43e940)),'string'!=typeof _0x43e940?_0x43e940:parseFloat(_0x43e940)?{'title':_0x43e940,'model':_0x43e940,'view':{'name':'span','styles':{'line-height':_0x43e940}}}:'string'==typeof(_0x315d8a=_0x43e940)?y[_0x315d8a]:y[_0x315d8a['model']]);var _0x315d8a;})['filter'](_0x592016=>void 0x0!==_0x592016);}var v=class extends _0x44ed52{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x2c0fb2,conversion:_0x504c46}=this['editor'];_0x2c0fb2['has']('ListEditing')&&_0x2c0fb2['has']('TodoListEditing')&&(_0x2c0fb2['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x3bfb8d,_0x271346,_0x3ab87b,_0x5e0056,_0x36aa2c){'todo'==_0x36aa2c['getAttribute']('listType')&&_0x271346&&(_0x3bfb8d['addClass']('ck-list-marker-line-height',_0x3ab87b),_0x3bfb8d['setStyle']('--ck-content-list-marker-line-height',_0x271346,_0x3ab87b));}}),_0x504c46['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x504c46['for']('upcast')['add'](_0xfabd75=>{_0xfabd75['on']('element:li',function(_0x2f2f66){const _0x4368a3=new _0x47f5b3(_0x2f2f66);return(_0x5df3e8,_0x1305bc,_0x449415)=>{const _0x30d6dc=_0x4368a3['match'](_0x1305bc['viewItem']);if(!_0x30d6dc)return;const _0x13c20f=_0x30d6dc['match'];_0x13c20f['name']=!0x1,_0x449415['consumable']['consume'](_0x1305bc['viewItem'],_0x13c20f);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x44ed52{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e58d9){super(_0x4e58d9),_0x4e58d9['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x41ef48=this['editor'];this['_validateConfig'](),_0x41ef48['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x41ef48['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x41ef48['commands']['add']('lineHeight',new p(_0x41ef48)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x1b6d51){const _0x34d51c='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x25d916=0x793f8,_0x2c0043={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4966fd(_0x2fc23e){const _0x2b312e=new window['Promise'](_0x5e40ff=>{_0x2fc23e['once']('ready',_0x5e40ff);}),_0x5413a8=window['Date']['now'](),_0x47b58b=_0x2fc23e['config']['get']('licenseKey');async function _0x30d5b9(){let _0x4c9d1b,_0x36f9eb=null,_0x2a622e=null;try{return'GPL'==_0x47b58b?'NotAllowed':(_0x4c9d1b=_0x4450e9(),_0x4c9d1b?(_0x4c9d1b['usageEndpoint']&&(_0x2a622e=_0x3f5321(_0x4c9d1b['usageEndpoint'],_0x4c9d1b['jti'])),await _0x339399()?_0x4d75ab()?_0xa6af89()?'Expired':_0xa26906()?('evaluation'==_0x4c9d1b['licenseType']&&(_0x36f9eb=_0x532dfd('EvaluationLimit')),await _0x2390a7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xa6af89(){const _0x3a5481=['evaluation','trial']['includes'](_0x4c9d1b['licenseType'])?_0x5413a8/0x3e8:0xe10*_0x25d916;return _0x4c9d1b['exp']<_0x3a5481;}function _0x4d75ab(){const _0x56aec3=_0x4c9d1b['features'];return!!_0x56aec3&&(!!_0x56aec3['includes']('*')||!!_0x56aec3['includes']('LH'));}function _0xa26906(){const _0x4f1ece=_0x4c9d1b['licensedHosts'];if(!_0x4f1ece||0x0==_0x4f1ece['length'])return!0x0;const {hostname:_0x2929da}=new URL(window['location']['href']);if(_0x4f1ece['includes'](_0x2929da))return!0x0;const _0xeaba80=_0x2929da['split']('.');return _0x4f1ece['filter'](_0x4a93af=>_0x4a93af['includes']('*'))['map'](_0x4d9893=>_0x4d9893['split']('.'))['filter'](_0x37f04c=>_0x37f04c['length']<=_0xeaba80['length'])['map'](_0x67acb3=>Array(_0xeaba80['length']-_0x67acb3['length'])['fill']('*'===_0x67acb3[0x0]?'*':'')['concat'](_0x67acb3))['some'](_0x38f554=>_0xeaba80['every']((_0x1d3a31,_0x52eba6)=>_0x38f554[_0x52eba6]===_0x1d3a31||'*'===_0x38f554[_0x52eba6]));}function _0x2390a7(){return _0x36f9eb&&_0x2a622e?new window['Promise']((_0x28a331,_0x53c7f8)=>{_0x36f9eb['then'](_0x28a331,_0x53c7f8),_0x2a622e['then'](_0x342357=>{'Valid'!=_0x342357&&_0x28a331(_0x342357);},_0x53c7f8);}):_0x36f9eb||_0x2a622e||'Valid';}}function _0x3f5321(_0x41f2e8,_0xfe0984){return new window['Promise'](_0x3644c0=>{if(_0xcee93d())return _0x3644c0('Valid');_0x19d29a(),_0x2fc23e['decorate']('_sendUsageRequest');let _0x1f7f5e=!0x1;const _0x10936a=_0x469505();function _0x458429(_0x4059bb){return!!_0x4059bb&&('object'==typeof _0x4059bb||'function'==typeof _0x4059bb)&&'function'==typeof _0x4059bb['then']&&'function'==typeof _0x4059bb['catch'];}function _0x2de620(_0x56ae6d){_0x2fb889(_0x56ae6d)['then'](_0xee2fe7=>_0xee2fe7&&'ok'==_0xee2fe7['status']?_0x5e98aa(_0x109a08(_0x10936a+_0xfe0984))!=_0xee2fe7['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x27c9c6=>(_0xce9700(),_0x27c9c6),()=>{const _0x1bcd32=_0x5bcf5f();return null==_0x1bcd32?(_0xce9700(),'Valid'):_0x5413a8-_0x1bcd32>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3644c0)['catch'](()=>{_0x3644c0('UsageLimit');});const _0x5d5aa8=0x36ee80;function _0xce9700(){const _0x414e89='llct-'+_0x5e98aa(_0x109a08(_0x41f2e8)),_0x31ffcb=_0x3c99eb(_0x5e98aa(window['Math']['ceil'](_0x5413a8/_0x5d5aa8)));window['localStorage']['setItem'](_0x414e89,_0x31ffcb);}function _0x5bcf5f(){const _0x16fe43='llct-'+_0x5e98aa(_0x109a08(_0x41f2e8)),_0x4d9ebb=window['localStorage']['getItem'](_0x16fe43);return _0x4d9ebb?window['parseInt'](_0x3c99eb(_0x4d9ebb),0x10)*_0x5d5aa8:null;}function _0x2fb889(_0x1c8b87){return new window['Promise']((_0x3f322e,_0x1977d4)=>{_0x1c8b87['then'](_0x3f322e,_0x1977d4),window['setTimeout'](_0x1977d4,0x1d4c0);});}}_0x2fc23e['on']('_sendUsageRequest',(_0x5d80f3,_0x198402)=>{if(_0x198402[0x0]!=_0x41f2e8)return _0x3644c0('UsageLimit');_0x198402[0x1]={..._0x198402[0x1],'requestId':_0x10936a};},{'priority':'high'}),_0x2fc23e['on']('_sendUsageRequest',_0x41d5a8=>{_0x458429(_0x41d5a8['return'])&&(_0x1f7f5e=!0x0,_0x2de620(_0x41d5a8['return']));},{'priority':'low'}),_0x2b312e['then'](()=>{_0x1f7f5e||_0x3644c0('UsageLimit');});});function _0xcee93d(){return'auto'==_0x2fc23e['editing']['view']['_overlayModeHint'];}function _0x19d29a(){_0x2fc23e['editing']['view']['_overlayModeHint']='auto';}}function _0x532dfd(_0x17f7d7){const _0x128829=[new window['Promise'](_0x4957c6=>setTimeout(_0x4957c6,0x93ecc)),_0x2b312e['then'](()=>new window['Promise'](_0x818fa1=>{let _0x54990f=0x0;_0x2fc23e['model']['on']('applyOperation',(_0x4b4c0b,_0x3c5818)=>{_0x3c5818[0x0]['isDocumentOperation']&&_0x54990f++,0x5e8==_0x54990f&&(_0x818fa1(),_0x4b4c0b['off']());});}))];return window['Promise']['race'](_0x128829)['then'](()=>_0x17f7d7);}async function _0x295f80(){await _0x2b312e,_0x2fc23e['model']['change']=_0x288f08,_0x2fc23e['model']['enqueueChange']=_0x288f08,_0x2fc23e['enableReadOnlyMode']('model');}function _0x133cb3(_0x11f019){const _0x1d3cdd=_0x1006f2();_0x2fc23e[_0x1d3cdd]='lineHeightLicenseKey'+_0x11f019,'Valid'!=_0x11f019&&_0x295f80();}function _0x1006f2(){const _0x4212d9=window['String'](window['performance']['now']())['replace']('.','');let _0x40e420='c';for(let _0x4f1739=0x0;_0x4f1739<_0x4212d9['length'];_0x4f1739+=0x2){let _0x4ea317=window['parseInt'](_0x4212d9['substring'](_0x4f1739,_0x4f1739+0x2));_0x4ea317>=0x3e&&(_0x4ea317-=0x3e),_0x40e420+=_0x34d51c[_0x4ea317];}return _0x40e420;}function _0x4450e9(){const _0x3c1937=_0x47b58b['split']('.');if(0x3!=_0x3c1937['length'])return null;return _0x18f688(_0x3c1937[0x1]);function _0x18f688(_0x126285){const _0x27ac64=_0x17c0b1(_0x126285);return _0x27ac64&&_0x1985fe()?_0x27ac64:null;function _0x1985fe(){const _0x1040bf=_0x27ac64['jti'],_0x39b299=window['parseInt'](_0x1040bf['substring'](_0x1040bf['length']-0x8),0x10),_0x167723={..._0x27ac64,'jti':_0x1040bf['substring'](0x0,_0x1040bf['length']-0x8)};return delete _0x167723['vc'],_0x109a08(_0x167723)==_0x39b299;}}}async function _0x339399(){let _0x279659=!0x0;try{const [_0x578c54,_0x1eea69,_0x2e3bc7]=_0x47b58b['split']('.');return _0x2f734f(_0x578c54),await _0x10847b(_0x578c54,_0x1eea69,_0x2e3bc7),_0x279659;}catch{return!0x1;}function _0x2f734f(_0x1b9cef){const _0x16ab5a=_0x17c0b1(_0x1b9cef);_0x16ab5a&&'ES256'==_0x16ab5a['alg']||(_0x279659=!0x1);}async function _0x10847b(_0x4afbd4,_0x4817b4,_0x5a3272){const _0x138651=window['Uint8Array']['from'](_0x258b67(_0x5a3272),_0x18b836=>_0x18b836['charCodeAt'](0x0)),_0x22f1af=new window['TextEncoder']()['encode'](_0x4afbd4+'.'+_0x4817b4),_0x8e663c=window['crypto']['subtle'];if(!_0x8e663c)return;const _0x2a288c=await _0x8e663c['importKey']('jwk',_0x2c0043,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x8e663c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2a288c,_0x138651,_0x22f1af)||(_0x279659=!0x1);}}function _0x17c0b1(_0x12f295){return _0x12f295['startsWith']('ey')?JSON['parse'](_0x258b67(_0x12f295)):null;}function _0x258b67(_0x1ed82d){return window['atob'](_0x1ed82d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x109a08(_0x54126c){let _0xf4123d=0x1505;function _0x19d006(_0x95313f){for(let _0x2018b6=0x0;_0x2018b6<_0x95313f['length'];_0x2018b6++){const _0x577b15=_0x95313f['charCodeAt'](_0x2018b6);_0xf4123d=(_0xf4123d<<0x5)+_0xf4123d+_0x577b15,_0xf4123d&=_0xf4123d;}}function _0x10a206(_0x4a02dc){Array['isArray'](_0x4a02dc)?_0x4a02dc['forEach'](_0x10a206):_0x4a02dc&&'object'==typeof _0x4a02dc?Object['entries'](_0x4a02dc)['sort']()['forEach'](([_0x220e33,_0x243668])=>{_0x19d006(_0x220e33),_0x10a206(_0x243668);}):_0x19d006(window['String'](_0x4a02dc));}return _0x10a206(_0x54126c),_0xf4123d>>>0x0;}function _0x5e98aa(_0x40f666){return _0x40f666['toString'](0x10)['padStart'](0x8,'0');}function _0x3c99eb(_0x1ec0da){return _0x1ec0da['split']('')['reverse']()['join']('');}function _0x288f08(){}_0x133cb3(await _0x30d5b9());}_0x4966fd(_0x1b6d51['editor']);}(this);}_validateConfig(){const _0x2d55d5=this['editor'];if(!_0x2d55d5['config']['get']('lineHeight.supportAllValues'))return;const _0x53c279=_0x2d55d5['config']['get']('lineHeight.options')['filter'](_0x250037=>'string'==typeof _0x250037&&(!H(_0x250037)&&isNaN(Number(_0x250037))));if(_0x53c279['length'])throw new _0x561132('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x53c279});}_prepareAnyValueConverters(){const _0x10d269=this['editor'],_0x45b40f=this['editor']['config']['get']('lineHeight.defaultValue');_0x10d269['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x46bcfe=>String(_0x46bcfe)===String(_0x45b40f)?null:{'key':'style','value':{'line-height':_0x46bcfe}}}),_0x10d269['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x514bc5=>{let _0x4b28bd=_0x514bc5['getStyle']('line-height');return _0x20f581(_0x4b28bd)&&(_0x4b28bd=String(Number(_0x4b28bd['slice'](0x0,-0x1))/0x64)),String(_0x4b28bd)===String(_0x45b40f)?null:_0x4b28bd;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x5dcefe=this['editor'],_0x1b7895=this['editor']['config']['get']('lineHeight.defaultValue'),_0xa03c33=function(_0x552b97,_0x45335b){const _0x2eb179={'model':{'key':_0x552b97,'values':[]},'view':{}};for(const _0x5b830a of _0x45335b)'class'===_0x5b830a['view']?.['key']?(_0x2eb179['model']['values']['push'](_0x5b830a['model']),_0x2eb179['view'][_0x5b830a['model']]={'key':'class','value':_0x5b830a['view']['value']}):(_0x2eb179['model']['values']['push'](_0x5b830a['model']),_0x2eb179['view'][_0x5b830a['model']]={'key':'style','value':'line-height:'+_0x5b830a['model']+';'});return _0x2eb179;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x4a5f3a=>_0x4a5f3a['model']));_0x5dcefe['conversion']['attributeToAttribute'](_0xa03c33),_0x5dcefe['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x1b4efa=>{let _0x4dbc4c=_0x1b4efa['getStyle']('line-height');return _0x20f581(_0x4dbc4c)&&(_0x4dbc4c=String(Number(_0x4dbc4c['slice'](0x0,-0x1))/0x64)),_0x4dbc4c===String(_0x1b7895)?null:_0xa03c33['model']['values']['includes'](_0x4dbc4c)?_0x4dbc4c:null;}}});}},k=class extends _0x44ed52{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x427442={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x427442),this['_registerMenuBarComponent'](_0x427442),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1efd25=[this['editor']];for(const _0x4b5cc7 of _0x1efd25){let _0x5d1a03;for(const _0x300793 in _0x4b5cc7){const _0x223c93=_0x300793,_0x3cc51c=_0x4b5cc7[_0x223c93];if('lineHeightLicenseKeyValid'==_0x3cc51c||'lineHeightLicenseKeyInvalid'==_0x3cc51c||'lineHeightLicenseKeyExpired'==_0x3cc51c||'lineHeightLicenseKeyDomainLimit'==_0x3cc51c||'lineHeightLicenseKeyNotAllowed'==_0x3cc51c||'lineHeightLicenseKeyEvaluationLimit'==_0x3cc51c||'lineHeightLicenseKeyUsageLimit'==_0x3cc51c){delete _0x4b5cc7[_0x223c93],_0x5d1a03=_0x3cc51c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x52609b=this['editor'],t=_0x52609b['t'],_0x5f0dc6=_0x52609b['config']['get']('lineHeight'),_0xa037b7={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x5f0dc6)['map'](_0x17cc91=>{const _0x294f89=_0xa037b7[_0x17cc91['title']];return _0x294f89&&_0x294f89!=_0x17cc91['title']&&(_0x17cc91=Object['assign']({},_0x17cc91,{'title':_0x294f89})),_0x17cc91;});}_prepareListOptions(){const _0x2d0c37=this['editor']['commands']['get']('lineHeight'),_0x3779cc=this['editor']['config']['get']('lineHeight.defaultValue'),_0x42143e=this['_getLocalizedLineHeightOptions'](),_0x379154=new _0x1a01d9(),_0x1ccfbb=_0x53523b=>'default'===_0x53523b||String(_0x3779cc)===_0x53523b;for(const _0x58ee47 of _0x42143e){const _0x2bc776={'type':'button','model':new _0x1759ba({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x58ee47['title'],'withText':!0x0})};_0x1ccfbb(_0x58ee47['model'])?(_0x2bc776['model']['bind']('isOn')['to'](_0x2d0c37,'value',_0x2354b8=>!_0x2354b8),_0x2bc776['model']['commandParam']=void 0x0):(_0x2bc776['model']['bind']('isOn')['to'](_0x2d0c37,'value',_0x2d69e1=>_0x2d69e1===_0x58ee47['model']),_0x2bc776['model']['commandParam']=_0x58ee47['model']),_0x379154['add'](_0x2bc776);}if(this['_shouldRenderCustomValueOption']()){const _0x3a4e80=this['_getCustomValueOptionDefinition'](_0x42143e);_0x379154['add'](_0x3a4e80);}return _0x379154;}_getCustomValueOptionDefinition(_0x3841ba){const _0x195c30=this['editor'],t=_0x195c30['t'],_0x2358fb=_0x195c30['commands']['get']('lineHeight'),_0x4c8355=_0x3841ba['map'](_0x58b7b7=>_0x58b7b7['model']),_0x164af4={'type':'button','model':new _0x1759ba({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x164af4['model']['bind']('commandParam')['to'](_0x2358fb,'value'),_0x164af4['model']['bind']('isOn')['to'](_0x2358fb,'value',_0x54a8ad=>!!_0x54a8ad&&!_0x4c8355['includes'](String(_0x54a8ad))),_0x164af4['model']['bind']('label')['to'](_0x2358fb,'value',_0x17e0f4=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x17e0f4))),_0x164af4;}_registerToolbarComponent({accessibleLabel:_0x5a7ff6,options:_0x4459ee}){const _0x2eeef6=this['editor'],_0x3f4db3=_0x2eeef6['commands']['get']('lineHeight');_0x2eeef6['ui']['componentFactory']['add']('lineHeight',_0x3c6851=>{const _0x457990=_0x2f7737(_0x3c6851);return _0x3ed2ed(_0x457990,_0x4459ee,{'role':'menu','ariaLabel':_0x5a7ff6}),_0x457990['buttonView']['set']({'label':_0x5a7ff6,'tooltip':!0x0,'icon':_0x2d6370}),_0x457990['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x457990['bind']('isEnabled')['to'](_0x3f4db3),this['listenTo'](_0x457990,'execute',_0x5b617f=>{_0x2eeef6['execute'](_0x5b617f['source']['commandName'],{'value':_0x5b617f['source']['commandParam']}),_0x2eeef6['editing']['view']['focus']();}),_0x457990['once']('change:isOpen',()=>{const _0x40e11a=_0x457990['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x457990,_0x4459ee,_0x40e11a);}),_0x457990;});}_registerMenuBarComponent({accessibleLabel:_0x3f6ee4,options:_0x35140e}){const _0x2f96f5=this['editor'],_0x391110=_0x2f96f5['commands']['get']('lineHeight');_0x2f96f5['ui']['componentFactory']['add']('menuBar:lineHeight',_0x2e6192=>{const _0x1fdee8=new _0x29da89(_0x2e6192);_0x1fdee8['buttonView']['set']({'label':_0x3f6ee4,'icon':_0x2d6370}),_0x1fdee8['bind']('isEnabled')['to'](_0x391110);const _0x4c99d5=new _0x152ff1(_0x2e6192);for(const _0x332aa3 of _0x35140e){const _0x359925=new _0x3100d6(_0x2e6192,_0x1fdee8),_0x389ae9=new _0x3c4dc1(_0x2e6192);_0x389ae9['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x389ae9['bind'](...Object['keys'](_0x332aa3['model']))['to'](_0x332aa3['model']),_0x389ae9['delegate']('execute')['to'](_0x1fdee8),_0x389ae9['on']('execute',()=>{_0x2f96f5['execute'](_0x332aa3['model']['commandName'],{'value':_0x332aa3['model']['commandParam']}),_0x2f96f5['editing']['view']['focus']();}),_0x359925['children']['add'](_0x389ae9),_0x4c99d5['items']['add'](_0x359925);}return _0x1fdee8['panelView']['children']['add'](_0x4c99d5),this['_attachCustomOptionVisibilityHandler'](_0x1fdee8,_0x35140e,_0x4c99d5),_0x1fdee8;});}_attachCustomOptionVisibilityHandler(_0x4c7999,_0x401593,_0x41cc72){if(!this['_shouldRenderCustomValueOption']())return;const _0x32f608=()=>{if(!_0x4c7999['isOpen'])return;_0x41cc72['items']['last']['isVisible']=Boolean(_0x401593['last']['model']['isOn']);};_0x32f608(),_0x4c7999['on']('change:isOpen',()=>{_0x32f608();});}},_=class extends _0x44ed52{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
23
+ import{Command as _0x5642c4,Plugin as _0x2df8bc}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x4c12f3,Collection as _0x4e0734,first as _0x468237,uid as _0x3b7e7f}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x4d759e,isPercentageStyleValue as _0x16e951}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x2fb419,MenuBarMenuListItemView as _0x5e521c,MenuBarMenuListView as _0x2bd843,MenuBarMenuView as _0x1cede2,UIModel as _0x343f6f,addListToDropdown as _0x46d838,createDropdown as _0x4b2e88}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x2bcafb}from'@ckeditor/ckeditor5-icons';var p=class extends _0x5642c4{['refresh'](){const _0x34c5e3=this['editor']['model']['document'],_0x326579=_0x468237(_0x34c5e3['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x326579)&&this['_canHaveLineHeight'](_0x326579),this['value']=this['isEnabled']&&_0x326579['getAttribute']('lineHeight');}execute(_0x3864ec={}){const _0x41a618=this['editor']['model'],_0x38fa1a=_0x41a618['document']['selection'],_0x1c9ad4=_0x3864ec['value'];_0x41a618['change'](_0x481875=>{const _0xc39119=Array['from'](_0x38fa1a['getSelectedBlocks']())['filter'](_0x2ef110=>this['_canHaveLineHeight'](_0x2ef110));for(const _0x5e3af7 of _0xc39119)_0x1c9ad4?_0x481875['setAttribute']('lineHeight',_0x1c9ad4,_0x5e3af7):_0x481875['removeAttribute']('lineHeight',_0x5e3af7);});}_canHaveLineHeight(_0x2c4223){return this['editor']['model']['schema']['checkAttribute'](_0x2c4223,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x563972){return'string'==typeof _0x563972&&'default'===_0x563972['toLowerCase']();}function L(_0x17da0b){return _0x17da0b['options']['map'](_0x8caa21=>{return H(_0x8caa21)?{'title':String(_0x17da0b['defaultValue']),'model':'default'}:('number'==typeof _0x8caa21&&(_0x8caa21=String(_0x8caa21)),'string'!=typeof _0x8caa21?_0x8caa21:parseFloat(_0x8caa21)?{'title':_0x8caa21,'model':_0x8caa21,'view':{'name':'span','styles':{'line-height':_0x8caa21}}}:'string'==typeof(_0x23b844=_0x8caa21)?y[_0x23b844]:y[_0x23b844['model']]);var _0x23b844;})['filter'](_0x31071a=>void 0x0!==_0x31071a);}var v=class extends _0x2df8bc{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x628ace,conversion:_0x27bb92}=this['editor'];_0x628ace['has']('ListEditing')&&_0x628ace['has']('TodoListEditing')&&(_0x628ace['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x42d9c5,_0x448c2d,_0x35a182,_0x49f7ad,_0x5686b6){'todo'==_0x5686b6['getAttribute']('listType')&&_0x448c2d&&(_0x42d9c5['addClass']('ck-list-marker-line-height',_0x35a182),_0x42d9c5['setStyle']('--ck-content-list-marker-line-height',_0x448c2d,_0x35a182));}}),_0x27bb92['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x27bb92['for']('upcast')['add'](_0x4a0301=>{_0x4a0301['on']('element:li',function(_0x10753e){const _0x12574c=new _0x4d759e(_0x10753e);return(_0x546339,_0x5e5dc0,_0x59272c)=>{const _0x398d2d=_0x12574c['match'](_0x5e5dc0['viewItem']);if(!_0x398d2d)return;const _0x3d1888=_0x398d2d['match'];_0x3d1888['name']=!0x1,_0x59272c['consumable']['consume'](_0x5e5dc0['viewItem'],_0x3d1888);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x2df8bc{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a7f1c){super(_0x4a7f1c),_0x4a7f1c['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x126a30=this['editor'];this['_validateConfig'](),_0x126a30['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x126a30['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x126a30['commands']['add']('lineHeight',new p(_0x126a30)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x5aa206){const _0x382bec='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x3b3e70=0x79410,_0x3afb2a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x50c981(_0xe9e2b9){const _0x48bb58=new window['Promise'](_0x2a17d3=>{_0xe9e2b9['once']('ready',_0x2a17d3);}),_0x36b3b5=window['Date']['now'](),_0x38ac52=_0xe9e2b9['config']['get']('licenseKey');async function _0x63e780(){let _0x5afd2c,_0x1a5429=null,_0x2e9554=null;try{return'GPL'==_0x38ac52?'NotAllowed':(_0x5afd2c=_0x196f66(),_0x5afd2c?(_0x5afd2c['usageEndpoint']&&(_0x2e9554=_0x578b09(_0x5afd2c['usageEndpoint'],_0x5afd2c['jti'])),await _0xef463()?_0x482720()?_0x1101fd()?'Expired':_0x1e276c()?('evaluation'==_0x5afd2c['licenseType']&&(_0x1a5429=_0x5aa819('EvaluationLimit')),await _0x3d29e6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1101fd(){const _0x2c6f5c=['evaluation','trial']['includes'](_0x5afd2c['licenseType'])?_0x36b3b5/0x3e8:0xe10*_0x3b3e70;return _0x5afd2c['exp']<_0x2c6f5c;}function _0x482720(){const _0x1b8d06=_0x5afd2c['features'];return!!_0x1b8d06&&(!!_0x1b8d06['includes']('*')||!!_0x1b8d06['includes']('LH'));}function _0x1e276c(){const _0x2679bb=_0x5afd2c['licensedHosts'];if(!_0x2679bb||0x0==_0x2679bb['length'])return!0x0;const {hostname:_0x3f491b}=new URL(window['location']['href']);if(_0x2679bb['includes'](_0x3f491b))return!0x0;const _0x5a22a3=_0x3f491b['split']('.');return _0x2679bb['filter'](_0x4adc8b=>_0x4adc8b['includes']('*'))['map'](_0x58ca91=>_0x58ca91['split']('.'))['filter'](_0x17ac03=>_0x17ac03['length']<=_0x5a22a3['length'])['map'](_0x392d19=>Array(_0x5a22a3['length']-_0x392d19['length'])['fill']('*'===_0x392d19[0x0]?'*':'')['concat'](_0x392d19))['some'](_0x5c93f5=>_0x5a22a3['every']((_0x387ecb,_0x35cce0)=>_0x5c93f5[_0x35cce0]===_0x387ecb||'*'===_0x5c93f5[_0x35cce0]));}function _0x3d29e6(){return _0x1a5429&&_0x2e9554?new window['Promise']((_0xd09da,_0x4a2119)=>{_0x1a5429['then'](_0xd09da,_0x4a2119),_0x2e9554['then'](_0x4c9a07=>{'Valid'!=_0x4c9a07&&_0xd09da(_0x4c9a07);},_0x4a2119);}):_0x1a5429||_0x2e9554||'Valid';}}function _0x578b09(_0x4d6df3,_0x14efd6){return new window['Promise'](_0x23b683=>{if(_0x4b7eec())return _0x23b683('Valid');_0xcc718d(),_0xe9e2b9['decorate']('_sendUsageRequest');let _0xbaef5c=!0x1;const _0x1b3c10=_0x3b7e7f();function _0x3cbb72(_0x48891d){return!!_0x48891d&&('object'==typeof _0x48891d||'function'==typeof _0x48891d)&&'function'==typeof _0x48891d['then']&&'function'==typeof _0x48891d['catch'];}function _0x2af87b(_0xda17c4){_0x22b384(_0xda17c4)['then'](_0x58fb07=>_0x58fb07&&'ok'==_0x58fb07['status']?_0x5cc887(_0x5211ce(_0x1b3c10+_0x14efd6))!=_0x58fb07['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5b431f=>(_0xf0c4b0(),_0x5b431f),()=>{const _0x297bc7=_0x12b93f();return null==_0x297bc7?(_0xf0c4b0(),'Valid'):_0x36b3b5-_0x297bc7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x23b683)['catch'](()=>{_0x23b683('UsageLimit');});const _0x1750f3=0x36ee80;function _0xf0c4b0(){const _0x54389f='llct-'+_0x5cc887(_0x5211ce(_0x4d6df3)),_0x35a296=_0x221788(_0x5cc887(window['Math']['ceil'](_0x36b3b5/_0x1750f3)));window['localStorage']['setItem'](_0x54389f,_0x35a296);}function _0x12b93f(){const _0x1b9ddb='llct-'+_0x5cc887(_0x5211ce(_0x4d6df3)),_0x5442bd=window['localStorage']['getItem'](_0x1b9ddb);return _0x5442bd?window['parseInt'](_0x221788(_0x5442bd),0x10)*_0x1750f3:null;}function _0x22b384(_0x3cfd74){return new window['Promise']((_0x15d3bd,_0x166be4)=>{_0x3cfd74['then'](_0x15d3bd,_0x166be4),window['setTimeout'](_0x166be4,0x1d4c0);});}}_0xe9e2b9['on']('_sendUsageRequest',(_0x2ab018,_0xc85c40)=>{if(_0xc85c40[0x0]!=_0x4d6df3)return _0x23b683('UsageLimit');_0xc85c40[0x1]={..._0xc85c40[0x1],'requestId':_0x1b3c10};},{'priority':'high'}),_0xe9e2b9['on']('_sendUsageRequest',_0x56ddb9=>{_0x3cbb72(_0x56ddb9['return'])&&(_0xbaef5c=!0x0,_0x2af87b(_0x56ddb9['return']));},{'priority':'low'}),_0x48bb58['then'](()=>{_0xbaef5c||_0x23b683('UsageLimit');});});function _0x4b7eec(){return'auto'==_0xe9e2b9['editing']['view']['_overlayModeHint'];}function _0xcc718d(){_0xe9e2b9['editing']['view']['_overlayModeHint']='auto';}}function _0x5aa819(_0x2e0641){const _0xc6ae79=[new window['Promise'](_0x51de26=>setTimeout(_0x51de26,0x93ecc)),_0x48bb58['then'](()=>new window['Promise'](_0xb41c8a=>{let _0x3be9c5=0x0;_0xe9e2b9['model']['on']('applyOperation',(_0x3e1953,_0x345eb3)=>{_0x345eb3[0x0]['isDocumentOperation']&&_0x3be9c5++,0x5e8==_0x3be9c5&&(_0xb41c8a(),_0x3e1953['off']());});}))];return window['Promise']['race'](_0xc6ae79)['then'](()=>_0x2e0641);}async function _0x29224a(){await _0x48bb58,_0xe9e2b9['model']['change']=_0x55b3fb,_0xe9e2b9['model']['enqueueChange']=_0x55b3fb,_0xe9e2b9['enableReadOnlyMode']('model');}function _0x31a6ba(_0x5d4c01){const _0x3ad532=_0x50bf47();_0xe9e2b9[_0x3ad532]='lineHeightLicenseKey'+_0x5d4c01,'Valid'!=_0x5d4c01&&_0x29224a();}function _0x50bf47(){const _0x23acff=window['String'](window['performance']['now']())['replace']('.','');let _0x2b3ebd='c';for(let _0x36b9bf=0x0;_0x36b9bf<_0x23acff['length'];_0x36b9bf+=0x2){let _0x3ac523=window['parseInt'](_0x23acff['substring'](_0x36b9bf,_0x36b9bf+0x2));_0x3ac523>=0x3e&&(_0x3ac523-=0x3e),_0x2b3ebd+=_0x382bec[_0x3ac523];}return _0x2b3ebd;}function _0x196f66(){const _0x42fcdb=_0x38ac52['split']('.');if(0x3!=_0x42fcdb['length'])return null;return _0x3609a7(_0x42fcdb[0x1]);function _0x3609a7(_0x236b04){const _0x66cbff=_0x53d217(_0x236b04);return _0x66cbff&&_0x383303()?_0x66cbff:null;function _0x383303(){const _0x4fe931=_0x66cbff['jti'],_0x4cd03b=window['parseInt'](_0x4fe931['substring'](_0x4fe931['length']-0x8),0x10),_0x4018e6={..._0x66cbff,'jti':_0x4fe931['substring'](0x0,_0x4fe931['length']-0x8)};return delete _0x4018e6['vc'],_0x5211ce(_0x4018e6)==_0x4cd03b;}}}async function _0xef463(){let _0x35cc69=!0x0;try{const [_0x1b3475,_0x15933e,_0x7e70b]=_0x38ac52['split']('.');return _0x3ea02b(_0x1b3475),await _0x352f75(_0x1b3475,_0x15933e,_0x7e70b),_0x35cc69;}catch{return!0x1;}function _0x3ea02b(_0xc32654){const _0x3c9520=_0x53d217(_0xc32654);_0x3c9520&&'ES256'==_0x3c9520['alg']||(_0x35cc69=!0x1);}async function _0x352f75(_0x43974f,_0x284304,_0xa8a9a7){const _0x218caf=window['Uint8Array']['from'](_0x532ac6(_0xa8a9a7),_0x2d126e=>_0x2d126e['charCodeAt'](0x0)),_0x78a75f=new window['TextEncoder']()['encode'](_0x43974f+'.'+_0x284304),_0x55f11b=window['crypto']['subtle'];if(!_0x55f11b)return;const _0x4286b4=await _0x55f11b['importKey']('jwk',_0x3afb2a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x55f11b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4286b4,_0x218caf,_0x78a75f)||(_0x35cc69=!0x1);}}function _0x53d217(_0x1927bc){return _0x1927bc['startsWith']('ey')?JSON['parse'](_0x532ac6(_0x1927bc)):null;}function _0x532ac6(_0x436471){return window['atob'](_0x436471['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5211ce(_0x550492){let _0x358948=0x1505;function _0x56d511(_0x140925){for(let _0x11745b=0x0;_0x11745b<_0x140925['length'];_0x11745b++){const _0x5a646d=_0x140925['charCodeAt'](_0x11745b);_0x358948=(_0x358948<<0x5)+_0x358948+_0x5a646d,_0x358948&=_0x358948;}}function _0x1792a6(_0x38252d){Array['isArray'](_0x38252d)?_0x38252d['forEach'](_0x1792a6):_0x38252d&&'object'==typeof _0x38252d?Object['entries'](_0x38252d)['sort']()['forEach'](([_0x4490e4,_0x565146])=>{_0x56d511(_0x4490e4),_0x1792a6(_0x565146);}):_0x56d511(window['String'](_0x38252d));}return _0x1792a6(_0x550492),_0x358948>>>0x0;}function _0x5cc887(_0x3e4c16){return _0x3e4c16['toString'](0x10)['padStart'](0x8,'0');}function _0x221788(_0x5c1be9){return _0x5c1be9['split']('')['reverse']()['join']('');}function _0x55b3fb(){}_0x31a6ba(await _0x63e780());}_0x50c981(_0x5aa206['editor']);}(this);}_validateConfig(){const _0x5b137a=this['editor'];if(!_0x5b137a['config']['get']('lineHeight.supportAllValues'))return;const _0x41ed48=_0x5b137a['config']['get']('lineHeight.options')['filter'](_0x2d6da2=>'string'==typeof _0x2d6da2&&(!H(_0x2d6da2)&&isNaN(Number(_0x2d6da2))));if(_0x41ed48['length'])throw new _0x4c12f3('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x41ed48});}_prepareAnyValueConverters(){const _0x546efb=this['editor'],_0xa550f=this['editor']['config']['get']('lineHeight.defaultValue');_0x546efb['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x12453f=>String(_0x12453f)===String(_0xa550f)?null:{'key':'style','value':{'line-height':_0x12453f}}}),_0x546efb['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x5c721a=>{let _0x120798=_0x5c721a['getStyle']('line-height');return _0x16e951(_0x120798)&&(_0x120798=String(Number(_0x120798['slice'](0x0,-0x1))/0x64)),String(_0x120798)===String(_0xa550f)?null:_0x120798;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x312ab1=this['editor'],_0x11c91f=this['editor']['config']['get']('lineHeight.defaultValue'),_0x11fa3d=function(_0x1b5f51,_0x14e6cd){const _0x1a3231={'model':{'key':_0x1b5f51,'values':[]},'view':{}};for(const _0x6146d1 of _0x14e6cd)'class'===_0x6146d1['view']?.['key']?(_0x1a3231['model']['values']['push'](_0x6146d1['model']),_0x1a3231['view'][_0x6146d1['model']]={'key':'class','value':_0x6146d1['view']['value']}):(_0x1a3231['model']['values']['push'](_0x6146d1['model']),_0x1a3231['view'][_0x6146d1['model']]={'key':'style','value':'line-height:'+_0x6146d1['model']+';'});return _0x1a3231;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x110d7c=>_0x110d7c['model']));_0x312ab1['conversion']['attributeToAttribute'](_0x11fa3d),_0x312ab1['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x1f0d5e=>{let _0x45f2a8=_0x1f0d5e['getStyle']('line-height');return _0x16e951(_0x45f2a8)&&(_0x45f2a8=String(Number(_0x45f2a8['slice'](0x0,-0x1))/0x64)),_0x45f2a8===String(_0x11c91f)?null:_0x11fa3d['model']['values']['includes'](_0x45f2a8)?_0x45f2a8:null;}}});}},k=class extends _0x2df8bc{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0xef9770={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0xef9770),this['_registerMenuBarComponent'](_0xef9770),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x2f5f94=[this['editor']];for(const _0x3e832e of _0x2f5f94){let _0x5ac059;for(const _0x222464 in _0x3e832e){const _0x3608ea=_0x222464,_0x2bde15=_0x3e832e[_0x3608ea];if('lineHeightLicenseKeyValid'==_0x2bde15||'lineHeightLicenseKeyInvalid'==_0x2bde15||'lineHeightLicenseKeyExpired'==_0x2bde15||'lineHeightLicenseKeyDomainLimit'==_0x2bde15||'lineHeightLicenseKeyNotAllowed'==_0x2bde15||'lineHeightLicenseKeyEvaluationLimit'==_0x2bde15||'lineHeightLicenseKeyUsageLimit'==_0x2bde15){delete _0x3e832e[_0x3608ea],_0x5ac059=_0x2bde15,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5ac059&&_0x3e832e['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5ac059&&_0x3e832e['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5ac059&&_0x3e832e['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5ac059&&_0x3e832e['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x23d383=this['editor'],t=_0x23d383['t'],_0x13018f=_0x23d383['config']['get']('lineHeight'),_0x2b9055={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x13018f)['map'](_0x5782db=>{const _0x15b6c5=_0x2b9055[_0x5782db['title']];return _0x15b6c5&&_0x15b6c5!=_0x5782db['title']&&(_0x5782db=Object['assign']({},_0x5782db,{'title':_0x15b6c5})),_0x5782db;});}_prepareListOptions(){const _0x33b2f7=this['editor']['commands']['get']('lineHeight'),_0x25989e=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2700be=this['_getLocalizedLineHeightOptions'](),_0x3a49af=new _0x4e0734(),_0x20d529=_0x583c9c=>'default'===_0x583c9c||String(_0x25989e)===_0x583c9c;for(const _0xaa1a31 of _0x2700be){const _0x2ae18c={'type':'button','model':new _0x343f6f({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0xaa1a31['title'],'withText':!0x0})};_0x20d529(_0xaa1a31['model'])?(_0x2ae18c['model']['bind']('isOn')['to'](_0x33b2f7,'value',_0x921737=>!_0x921737),_0x2ae18c['model']['commandParam']=void 0x0):(_0x2ae18c['model']['bind']('isOn')['to'](_0x33b2f7,'value',_0x426f6e=>_0x426f6e===_0xaa1a31['model']),_0x2ae18c['model']['commandParam']=_0xaa1a31['model']),_0x3a49af['add'](_0x2ae18c);}if(this['_shouldRenderCustomValueOption']()){const _0x25ef06=this['_getCustomValueOptionDefinition'](_0x2700be);_0x3a49af['add'](_0x25ef06);}return _0x3a49af;}_getCustomValueOptionDefinition(_0x100ab6){const _0x1f8f71=this['editor'],t=_0x1f8f71['t'],_0x38c829=_0x1f8f71['commands']['get']('lineHeight'),_0x32d2fa=_0x100ab6['map'](_0x408664=>_0x408664['model']),_0x340f07={'type':'button','model':new _0x343f6f({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x340f07['model']['bind']('commandParam')['to'](_0x38c829,'value'),_0x340f07['model']['bind']('isOn')['to'](_0x38c829,'value',_0x1336fb=>!!_0x1336fb&&!_0x32d2fa['includes'](String(_0x1336fb))),_0x340f07['model']['bind']('label')['to'](_0x38c829,'value',_0x45e9fa=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x45e9fa))),_0x340f07;}_registerToolbarComponent({accessibleLabel:_0x1450c2,options:_0x1290b1}){const _0xcc082c=this['editor'],_0x59237a=_0xcc082c['commands']['get']('lineHeight');_0xcc082c['ui']['componentFactory']['add']('lineHeight',_0x4631e2=>{const _0x3f05b4=_0x4b2e88(_0x4631e2);return _0x46d838(_0x3f05b4,_0x1290b1,{'role':'menu','ariaLabel':_0x1450c2}),_0x3f05b4['buttonView']['set']({'label':_0x1450c2,'tooltip':!0x0,'icon':_0x2bcafb}),_0x3f05b4['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x3f05b4['bind']('isEnabled')['to'](_0x59237a),this['listenTo'](_0x3f05b4,'execute',_0x27e35e=>{_0xcc082c['execute'](_0x27e35e['source']['commandName'],{'value':_0x27e35e['source']['commandParam']}),_0xcc082c['editing']['view']['focus']();}),_0x3f05b4['once']('change:isOpen',()=>{const _0x23b8a6=_0x3f05b4['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x3f05b4,_0x1290b1,_0x23b8a6);}),_0x3f05b4;});}_registerMenuBarComponent({accessibleLabel:_0xbeca6,options:_0x557673}){const _0x1d1aea=this['editor'],_0x159f9d=_0x1d1aea['commands']['get']('lineHeight');_0x1d1aea['ui']['componentFactory']['add']('menuBar:lineHeight',_0x255e99=>{const _0x1cd314=new _0x1cede2(_0x255e99);_0x1cd314['buttonView']['set']({'label':_0xbeca6,'icon':_0x2bcafb}),_0x1cd314['bind']('isEnabled')['to'](_0x159f9d);const _0x11e3dd=new _0x2bd843(_0x255e99);for(const _0xb0541c of _0x557673){const _0x29082c=new _0x5e521c(_0x255e99,_0x1cd314),_0x176cf3=new _0x2fb419(_0x255e99);_0x176cf3['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x176cf3['bind'](...Object['keys'](_0xb0541c['model']))['to'](_0xb0541c['model']),_0x176cf3['delegate']('execute')['to'](_0x1cd314),_0x176cf3['on']('execute',()=>{_0x1d1aea['execute'](_0xb0541c['model']['commandName'],{'value':_0xb0541c['model']['commandParam']}),_0x1d1aea['editing']['view']['focus']();}),_0x29082c['children']['add'](_0x176cf3),_0x11e3dd['items']['add'](_0x29082c);}return _0x1cd314['panelView']['children']['add'](_0x11e3dd),this['_attachCustomOptionVisibilityHandler'](_0x1cd314,_0x557673,_0x11e3dd),_0x1cd314;});}_attachCustomOptionVisibilityHandler(_0xeeefbf,_0x578858,_0x237cbd){if(!this['_shouldRenderCustomValueOption']())return;const _0x3d5ac0=()=>{if(!_0xeeefbf['isOpen'])return;_0x237cbd['items']['last']['isVisible']=Boolean(_0x578858['last']['model']['isOn']);};_0x3d5ac0(),_0xeeefbf['on']('change:isOpen',()=>{_0x3d5ac0();});}},_=class extends _0x2df8bc{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-line-height",
3
- "version": "48.5.0-alpha.2",
3
+ "version": "48.5.0-alpha.3",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -26,12 +26,12 @@
26
26
  "dist/translations/*.umd.js"
27
27
  ],
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
30
- "@ckeditor/ckeditor5-engine": "48.5.0-alpha.2",
31
- "@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
32
- "@ckeditor/ckeditor5-list": "48.5.0-alpha.2",
33
- "@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
34
- "@ckeditor/ckeditor5-utils": "48.5.0-alpha.2"
29
+ "@ckeditor/ckeditor5-core": "48.5.0-alpha.3",
30
+ "@ckeditor/ckeditor5-engine": "48.5.0-alpha.3",
31
+ "@ckeditor/ckeditor5-icons": "48.5.0-alpha.3",
32
+ "@ckeditor/ckeditor5-list": "48.5.0-alpha.3",
33
+ "@ckeditor/ckeditor5-ui": "48.5.0-alpha.3",
34
+ "@ckeditor/ckeditor5-utils": "48.5.0-alpha.3"
35
35
  },
36
36
  "files": [
37
37
  "dist",