@ckeditor/ckeditor5-export-inline-styles 48.5.0-alpha.5 → 48.5.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x116bf5,Plugin as _0x178895}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x596d33,createElement as _0x2be304,uid as _0x4b5ba8}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x69b664,addMarginStylesRules as _0x1bc0a7,addPaddingStylesRules as _0x107676}from'@ckeditor/ckeditor5-engine';import{calculate as _0x5f46de,compare as _0x340b03}from'specificity';function f(_0x49a335){const _0x16eda4=[];let _0x38ce00='',_0x51c9fe=0x0;for(;_0x51c9fe<_0x49a335['length'];){const _0xc08b0a=_0x49a335[_0x51c9fe];if('('===_0xc08b0a){const _0x5f03a9=y(_0x49a335,_0x51c9fe+0x1);if(-0x1===_0x5f03a9)return[];_0x38ce00+=_0x49a335['slice'](_0x51c9fe,_0x5f03a9+0x1),_0x51c9fe=_0x5f03a9+0x1;}else','!==_0xc08b0a||_0x38ce00['endsWith']('\x5c')?(_0x38ce00+=_0xc08b0a,_0x51c9fe++):(_0x16eda4['push'](_0x38ce00['trim']()),_0x38ce00='',_0x51c9fe++);}return _0x38ce00['trim']()&&_0x16eda4['push'](_0x38ce00['trim']()),_0x16eda4['filter'](Boolean);}function y(_0x3f3ba1,_0x1310ab){let _0x11aea8=0x1;for(let _0x248c1d=_0x1310ab;_0x248c1d<_0x3f3ba1['length'];_0x248c1d++){const _0x48470e=_0x3f3ba1[_0x248c1d];if('('===_0x48470e)_0x11aea8++;else{if(')'===_0x48470e&&(_0x11aea8--,0x0===_0x11aea8))return _0x248c1d;}}return-0x1;}function d(_0x5dd5df){return _0x5dd5df['replace'](/!\s*important/i,'')['trim']();}function w(_0x31c146){const _0x16dcad=new Map();for(const {stylesMap:_0x5774a2,flatSelector:_0x26785f}of _0x31c146){if(':root'!==_0x26785f)continue;const _0x4add0e=p(_0x16dcad['get']['bind'](_0x16dcad),_0x5774a2);for(const [_0x38f0a1,_0x14e4e7]of _0x4add0e)_0x16dcad['set'](_0x38f0a1,_0x14e4e7);}return _0x16dcad;}function p(_0x27a69a,_0x2b35ec){const _0x39baee=new Map(),_0x5d90d7=_0x3c7c5c=>_0x39baee['has'](_0x3c7c5c)?_0x39baee['get'](_0x3c7c5c):_0x27a69a(_0x3c7c5c);for(const [_0x29945f,_0x2b0fd9]of _0x2b35ec['getStylesEntries']())if(_0x2b0fd9&&_0x29945f['startsWith']('--')){const _0x5d2d0f=m(_0x5d90d7,_0x2b0fd9);_0x39baee['set'](_0x29945f,_0x5d2d0f),_0x2b35ec['remove'](_0x29945f);}for(const [_0x1984e7,_0x45fac0]of _0x2b35ec['getStylesEntries']())if(_0x45fac0){const _0x4d26c2=m(_0x5d90d7,_0x45fac0);_0x2b35ec['set'](_0x1984e7,_0x4d26c2);}return _0x39baee;}function m(_0x1d5df7,_0x13bbbe){return function(_0xa9fedc,_0x4f9dcc){let _0x5efc3e='',_0x2154cc=0x0;for(;_0x2154cc<_0xa9fedc['length'];){const _0x56c96e=_0xa9fedc['indexOf']('var(',_0x2154cc);if(-0x1===_0x56c96e){_0x5efc3e+=_0xa9fedc['slice'](_0x2154cc);break;}_0x5efc3e+=_0xa9fedc['slice'](_0x2154cc,_0x56c96e);const _0x1cb749=_0x56c96e+0x4,_0x41eea8=y(_0xa9fedc,_0x1cb749);_0x5efc3e+=_0x4f9dcc(_0xa9fedc['substring'](_0x1cb749,_0x41eea8)),_0x2154cc=_0x41eea8+0x1;}return _0x5efc3e;}(_0x13bbbe,_0x136bf0=>{const [_0x21cb5e,_0x19302e]=f(_0x136bf0),_0x5d0ba3=_0x1d5df7(_0x21cb5e);return void 0x0!==_0x5d0ba3?_0x5d0ba3:_0x19302e?m(_0x1d5df7,_0x19302e):'var('+_0x21cb5e+')';});}async function h(_0x3466b5){const _0x2dd514=[await _0x596d33(_0x3466b5['stylesheets']),_0x3466b5['inlineCss']]['filter'](_0x4967c5=>_0x4967c5&&_0x4967c5['length'])['join']('\x0a'),_0x127c7a=await async function(_0x5795df,_0x502232){const _0xe296d9=new CSSStyleSheet();return await _0xe296d9['replace'](_0x502232),S(Array['from'](_0xe296d9['cssRules'])['filter'](_0x308c27=>_0x308c27 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x360406,contentCssText:_0x475dff})=>{const _0x1da1f1=f(_0x360406),_0x1e67df=new _0x69b664(_0x5795df)['setTo'](_0x475dff);return _0x1da1f1['map'](_0x2f9f13=>{const _0x32b736=function(_0x2f7a52){const _0x1be325=':where(';let _0x344723=_0x2f7a52,_0x8e0fc6=0x0;for(let _0x3bbdc4=0x0;_0x3bbdc4<0x64;_0x3bbdc4++){const _0x5bf9aa=_0x344723['indexOf'](_0x1be325,_0x8e0fc6);if(-0x1===_0x5bf9aa)break;let _0x30fe20=0x0;for(let _0x121c0d=0x0;_0x121c0d<_0x5bf9aa;_0x121c0d++)'('===_0x344723[_0x121c0d]?_0x30fe20++:')'===_0x344723[_0x121c0d]&&_0x30fe20--;if(_0x30fe20>0x0){_0x8e0fc6=_0x5bf9aa+0x7;continue;}let _0x4c4cfb=-0x1;for(let _0x6a0078=_0x5bf9aa+0x7,_0x2995fb=0x1;_0x6a0078<_0x344723['length'];_0x6a0078++)if('('===_0x344723[_0x6a0078]?_0x2995fb++:')'===_0x344723[_0x6a0078]&&_0x2995fb--,!_0x2995fb){_0x4c4cfb=_0x6a0078;break;}-0x1!==_0x4c4cfb?(_0x344723=_0x344723['slice'](0x0,_0x5bf9aa)+_0x344723['slice'](_0x4c4cfb+0x1),_0x8e0fc6=_0x5bf9aa):_0x8e0fc6=_0x5bf9aa+0x7;}return _0x344723['replace'](/\s+/g,'\x20')['trim']();}(_0x2f9f13),_0x5e6a7c=_0x32b736?_0x5f46de(_0x32b736)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x1e67df,'flatSelector':_0x2f9f13,'specificity':_0x5e6a7c};});})['sort']((_0x16bdd9,_0x23b75f)=>_0x340b03(_0x16bdd9['specificity'],_0x23b75f['specificity']));}(_0x3466b5['stylesProcessor'],_0x2dd514);return{'parsedCssRules':_0x127c7a,'rootCssVariables':w(_0x127c7a)};}function S(_0x2e6e3d,_0x9cd275=''){return _0x2e6e3d['flatMap'](_0x25dc33=>{const {selectorText:_0x17618c,cssText:_0x14fd59,cssRules:_0x524e24}=_0x25dc33;if(!_0x17618c)return[];const _0x332650=_0x17618c['replace'](/&/g,_0x9cd275);let _0x2f4455=_0x14fd59['replace'](_0x17618c,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x524e24||!_0x524e24['length'])return[{'selectorText':_0x332650,'contentCssText':_0x2f4455}];for(const _0x31b951 of _0x524e24)_0x2f4455=_0x2f4455['replace'](_0x31b951['cssText'],'')['trim']();return[{'selectorText':_0x332650,'contentCssText':_0x2f4455},...S(Array['from'](_0x524e24),_0x332650)];});}function L(_0x798722,_0x5c4a68){const _0x4cb33f=new _0x69b664(_0x798722);for(const _0x8d5114 of _0x5c4a68){let _0x1d13b4;if(_0x1d13b4='string'==typeof _0x8d5114?new _0x69b664(_0x798722)['setTo'](_0x8d5114):_0x8d5114,_0x1d13b4){for(const [_0x3009b4,_0x30424f]of _0x1d13b4['getStylesEntries']())_0x4cb33f['set'](_0x3009b4,_0x30424f);}}return _0x4cb33f;}var g=class extends _0x116bf5{_stylesProcessor;constructor(_0x2f67f1){super(_0x2f67f1),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x1bc0a7(this['_stylesProcessor']),_0x107676(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x4e44d8){const _0x591f5c=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x13f6cf}=this['editor']['locale'],{rootName:_0x4de653='main',dataControllerDowncastOptions:_0x306839={},transformations:_0x4d2181=_0x591f5c['transformations']||[]}=_0x4e44d8||{};this['isBusy']=!0x0,this['refresh']();const _0x5bfcea=this['_getRootDataHTMLFragment'](_0x4de653,_0x306839),_0x216910=_0x2be304(_0x5bfcea['ownerDocument'],'div',{'dir':_0x13f6cf,'class':'ck-content'},[_0x5bfcea]);return this['_collectAndApplyStyles'](_0x4d2181,_0x216910)['then'](()=>{const _0x2faa21=function(_0x5421fa){const _0x3fc494=_0x5421fa['ownerDocument']['createDocumentFragment']();for(;_0x5421fa['firstChild'];)_0x3fc494['appendChild'](_0x5421fa['firstChild']);return _0x3fc494;}(_0x216910),_0x8b0c7=_0x216910['getAttribute']('style');if(_0x8b0c7)for(const _0x5a4ca4 of _0x2faa21['children']){const _0x597181=_0x5a4ca4['getAttribute']('style'),_0x1a05e6=L(this['_stylesProcessor'],[_0x8b0c7,_0x597181]);_0x5a4ca4['setAttribute']('style',x(_0x1a05e6));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x2faa21);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x2b9a47,_0x2d7ef1){const {data:_0x55e633,model:_0x5c022a}=this['editor'],_0x5f428c=_0x5c022a['document']['getRoot'](_0x2b9a47),_0xb88c5d=_0x55e633['toView'](_0x5f428c,_0x2d7ef1);return _0x55e633['htmlProcessor']['domConverter']['viewToDom'](_0xb88c5d);}async _collectAndApplyStyles(_0x588a40,_0x397270){const {stylesheets:_0x4dd7aa,inlineCss:_0x12ce7c,stripCssClasses:_0x587f01}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x2a486a,rootCssVariables:_0x59bad7}=await h({'stylesheets':_0x4dd7aa||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x12ce7c}),_0x3daf2e=[];this['_processElementTree']({'transformations':_0x588a40,'parsedCssRules':_0x2a486a,'element':_0x397270,'stripCssClasses':_0x587f01,'parentCSSVariablesLookup':_0x59bad7['get']['bind'](_0x59bad7),'runAfterDocumentTransformation':_0x2ad952=>{_0x3daf2e['unshift'](_0x2ad952);}});for(const _0x35af80 of _0x3daf2e)_0x35af80();}_processElementTree({element:_0x4d2620,parsedCssRules:_0x163710,parentCSSVariablesLookup:_0x45455e,runAfterDocumentTransformation:_0x217c58,stripCssClasses:_0x2fb5a9,transformations:_0x3952ab}){const {stylesMap:_0x4ca87e,localCSSVariables:_0x4343ff}=function(_0x7bc5bf){const _0x39944e=_0x7bc5bf['element']['getAttribute']('style')||'',_0x17a94f=_0x7bc5bf['parsedCssRules']['filter'](_0x26ad40=>_0x7bc5bf['element']['matches'](_0x26ad40['flatSelector']))['map'](_0x48b149=>_0x48b149['stylesMap']),_0xa8f23=L(_0x7bc5bf['stylesProcessor'],[..._0x17a94f,_0x39944e]);return{'localCSSVariables':p(_0x7bc5bf['fallbackCSSVariablesLookup'],_0xa8f23),'stylesMap':_0xa8f23};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x45455e,'parsedCssRules':_0x163710,'element':_0x4d2620}),_0xfeb7a8=[];for(const _0xed293f of _0x3952ab){const _0x5a2a62=_0xed293f(_0x4d2620,_0x4ca87e,{'runAfterDocumentTransformation':_0x217c58,'runAfterChildrenTransformation':_0x1d2bc3=>{_0xfeb7a8['unshift'](_0x1d2bc3);}});_0x5a2a62&&_0x5a2a62 instanceof HTMLElement&&(_0x4d2620=_0x5a2a62);}_0x4ca87e['size']?_0x4d2620['setAttribute']('style',x(_0x4ca87e)):_0x4d2620['removeAttribute']('style');const _0x41e3d6=_0x5879a2=>_0x4343ff['has'](_0x5879a2)?_0x4343ff['get'](_0x5879a2):_0x45455e(_0x5879a2);for(const _0x156ccb of _0x4d2620['children'])_0x156ccb instanceof HTMLElement&&this['_processElementTree']({'element':_0x156ccb,'parsedCssRules':_0x163710,'stripCssClasses':_0x2fb5a9,'transformations':_0x3952ab,'parentCSSVariablesLookup':_0x41e3d6,'runAfterDocumentTransformation':_0x217c58});_0x2fb5a9&&_0x4d2620['removeAttribute']('class');for(const _0x35b401 of _0xfeb7a8)_0x35b401();}};function x(_0x297930){return _0x297930['getStylesEntries']()['map'](_0x5c8471=>_0x5c8471['join'](':'))['join'](';')+';';}var C=class extends _0x178895{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x46b125){const _0x15fb86='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x2072d3=0x79440,_0x4410e9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x19db70(_0x615d61){const _0x28e6e6=new window['Promise'](_0x3baa79=>{_0x615d61['once']('ready',_0x3baa79);}),_0x170a1b=window['Date']['now'](),_0x231c62=_0x615d61['config']['get']('licenseKey');async function _0x2b29f6(){let _0x5c533b,_0x34eb4f=null,_0x57c484=null;try{return'GPL'==_0x231c62?'NotAllowed':(_0x5c533b=_0x170a0a(),_0x5c533b?(_0x5c533b['usageEndpoint']&&(_0x57c484=_0x2b84f5(_0x5c533b['usageEndpoint'],_0x5c533b['jti'])),await _0x161983()?_0x16462f()?_0x26a563()?'Expired':_0x39f6f0()?('evaluation'==_0x5c533b['licenseType']&&(_0x34eb4f=_0xb1937f('EvaluationLimit')),await _0x42b368()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x26a563(){const _0x37884a=['evaluation','trial']['includes'](_0x5c533b['licenseType'])?_0x170a1b/0x3e8:0xe10*_0x2072d3;return _0x5c533b['exp']<_0x37884a;}function _0x16462f(){const _0x2f87c3=_0x5c533b['features'];return!!_0x2f87c3&&(!!_0x2f87c3['includes']('*')||!!_0x2f87c3['includes']('EIS'));}function _0x39f6f0(){const _0x7af43d=_0x5c533b['licensedHosts'];if(!_0x7af43d||0x0==_0x7af43d['length'])return!0x0;const {hostname:_0x5230c7}=new URL(window['location']['href']);if(_0x7af43d['includes'](_0x5230c7))return!0x0;const _0x31bfed=_0x5230c7['split']('.');return _0x7af43d['filter'](_0x1f9d78=>_0x1f9d78['includes']('*'))['map'](_0x5b2aef=>_0x5b2aef['split']('.'))['filter'](_0x43da7e=>_0x43da7e['length']<=_0x31bfed['length'])['map'](_0x1c8da8=>Array(_0x31bfed['length']-_0x1c8da8['length'])['fill']('*'===_0x1c8da8[0x0]?'*':'')['concat'](_0x1c8da8))['some'](_0x28d9c6=>_0x31bfed['every']((_0x2eb8b3,_0xb60853)=>_0x28d9c6[_0xb60853]===_0x2eb8b3||'*'===_0x28d9c6[_0xb60853]));}function _0x42b368(){return _0x34eb4f&&_0x57c484?new window['Promise']((_0x472805,_0x4cb092)=>{_0x34eb4f['then'](_0x472805,_0x4cb092),_0x57c484['then'](_0x516519=>{'Valid'!=_0x516519&&_0x472805(_0x516519);},_0x4cb092);}):_0x34eb4f||_0x57c484||'Valid';}}function _0x2b84f5(_0x3463d1,_0x145cdd){return new window['Promise'](_0x12d1e2=>{if(_0x2fa229())return _0x12d1e2('Valid');_0x553548(),_0x615d61['decorate']('_sendUsageRequest');let _0xab4c60=!0x1;const _0x219ddb=_0x4b5ba8();function _0x7908c7(_0x4ef1e6){return!!_0x4ef1e6&&('object'==typeof _0x4ef1e6||'function'==typeof _0x4ef1e6)&&'function'==typeof _0x4ef1e6['then']&&'function'==typeof _0x4ef1e6['catch'];}function _0x37eb00(_0x381264){_0x414bc8(_0x381264)['then'](_0x168d39=>_0x168d39&&'ok'==_0x168d39['status']?_0x352a66(_0x3a137b(_0x219ddb+_0x145cdd))!=_0x168d39['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x519fd5=>(_0x47005d(),_0x519fd5),()=>{const _0xd0c0cb=_0x3616e9();return null==_0xd0c0cb?(_0x47005d(),'Valid'):_0x170a1b-_0xd0c0cb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x12d1e2)['catch'](()=>{_0x12d1e2('UsageLimit');});const _0x2c1781=0x36ee80;function _0x47005d(){const _0x49057e='llct-'+_0x352a66(_0x3a137b(_0x3463d1)),_0xe0091d=_0x229a0a(_0x352a66(window['Math']['ceil'](_0x170a1b/_0x2c1781)));window['localStorage']['setItem'](_0x49057e,_0xe0091d);}function _0x3616e9(){const _0x5bd4ed='llct-'+_0x352a66(_0x3a137b(_0x3463d1)),_0x3f0187=window['localStorage']['getItem'](_0x5bd4ed);return _0x3f0187?window['parseInt'](_0x229a0a(_0x3f0187),0x10)*_0x2c1781:null;}function _0x414bc8(_0x18d91a){return new window['Promise']((_0x249e2f,_0x36af0c)=>{_0x18d91a['then'](_0x249e2f,_0x36af0c),window['setTimeout'](_0x36af0c,0x1d4c0);});}}_0x615d61['on']('_sendUsageRequest',(_0x23ae8c,_0x210cea)=>{if(_0x210cea[0x0]!=_0x3463d1)return _0x12d1e2('UsageLimit');_0x210cea[0x1]={..._0x210cea[0x1],'requestId':_0x219ddb};},{'priority':'high'}),_0x615d61['on']('_sendUsageRequest',_0x3dbe42=>{_0x7908c7(_0x3dbe42['return'])&&(_0xab4c60=!0x0,_0x37eb00(_0x3dbe42['return']));},{'priority':'low'}),_0x28e6e6['then'](()=>{_0xab4c60||_0x12d1e2('UsageLimit');});});function _0x2fa229(){return'auto'==_0x615d61['editing']['view']['_overlayModeHint'];}function _0x553548(){_0x615d61['editing']['view']['_overlayModeHint']='auto';}}function _0xb1937f(_0x74e247){const _0x39e6d4=[new window['Promise'](_0x2638e9=>setTimeout(_0x2638e9,0x93ecc)),_0x28e6e6['then'](()=>new window['Promise'](_0x1c4316=>{let _0x517be0=0x0;_0x615d61['model']['on']('applyOperation',(_0x281d04,_0x3997fe)=>{_0x3997fe[0x0]['isDocumentOperation']&&_0x517be0++,0x5e8==_0x517be0&&(_0x1c4316(),_0x281d04['off']());});}))];return window['Promise']['race'](_0x39e6d4)['then'](()=>_0x74e247);}async function _0x484e38(){await _0x28e6e6;const _0x272762=_0x615d61['commands']['get']('exportInlineStyles');_0x272762&&_0x272762['on']('execute',_0x532ca8=>{_0x532ca8['stop']();},{'priority':'highest'}),_0x615d61['model']['change']=_0x5a6eaf,_0x615d61['model']['enqueueChange']=_0x5a6eaf,_0x615d61['enableReadOnlyMode']('model');}function _0x4ebf2f(_0x31d9e9){const _0x3a59e6=_0x97c695();_0x615d61[_0x3a59e6]='exportInlineStylesLicenseKey'+_0x31d9e9,'Valid'!=_0x31d9e9&&_0x484e38();}function _0x97c695(){const _0x1078a3=window['String'](window['performance']['now']())['replace']('.','');let _0x252849='Q';for(let _0x215f80=0x0;_0x215f80<_0x1078a3['length'];_0x215f80+=0x2){let _0xf2fe2e=window['parseInt'](_0x1078a3['substring'](_0x215f80,_0x215f80+0x2));_0xf2fe2e>=0x3e&&(_0xf2fe2e-=0x3e),_0x252849+=_0x15fb86[_0xf2fe2e];}return _0x252849;}function _0x170a0a(){const _0x2b2017=_0x231c62['split']('.');if(0x3!=_0x2b2017['length'])return null;return _0x4b5e23(_0x2b2017[0x1]);function _0x4b5e23(_0x547a82){const _0x5f3d38=_0x315fe0(_0x547a82);return _0x5f3d38&&_0x404340()?_0x5f3d38:null;function _0x404340(){const _0xfe4b30=_0x5f3d38['jti'],_0x36cb58=window['parseInt'](_0xfe4b30['substring'](_0xfe4b30['length']-0x8),0x10),_0xc0fdc1={..._0x5f3d38,'jti':_0xfe4b30['substring'](0x0,_0xfe4b30['length']-0x8)};return delete _0xc0fdc1['vc'],_0x3a137b(_0xc0fdc1)==_0x36cb58;}}}async function _0x161983(){let _0x2a0573=!0x0;try{const [_0x36e122,_0x11e441,_0x5bfa3c]=_0x231c62['split']('.');return _0x265935(_0x36e122),await _0x42767a(_0x36e122,_0x11e441,_0x5bfa3c),_0x2a0573;}catch{return!0x1;}function _0x265935(_0x4d09ba){const _0xbb43c3=_0x315fe0(_0x4d09ba);_0xbb43c3&&'ES256'==_0xbb43c3['alg']||(_0x2a0573=!0x1);}async function _0x42767a(_0x2e2061,_0x3d3a77,_0x1efccf){const _0x3f065e=window['Uint8Array']['from'](_0x1f0b3d(_0x1efccf),_0x5b5608=>_0x5b5608['charCodeAt'](0x0)),_0x24f30d=new window['TextEncoder']()['encode'](_0x2e2061+'.'+_0x3d3a77),_0x3c22e3=window['crypto']['subtle'];if(!_0x3c22e3)return;const _0x3c3375=await _0x3c22e3['importKey']('jwk',_0x4410e9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3c22e3['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3c3375,_0x3f065e,_0x24f30d)||(_0x2a0573=!0x1);}}function _0x315fe0(_0xf22240){return _0xf22240['startsWith']('ey')?JSON['parse'](_0x1f0b3d(_0xf22240)):null;}function _0x1f0b3d(_0x35b13b){return window['atob'](_0x35b13b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3a137b(_0x1e81d0){let _0x3343d4=0x1505;function _0x378dce(_0x5e870b){for(let _0x1e01eb=0x0;_0x1e01eb<_0x5e870b['length'];_0x1e01eb++){const _0x1d4fae=_0x5e870b['charCodeAt'](_0x1e01eb);_0x3343d4=(_0x3343d4<<0x5)+_0x3343d4+_0x1d4fae,_0x3343d4&=_0x3343d4;}}function _0x2d4626(_0x392ca0){Array['isArray'](_0x392ca0)?_0x392ca0['forEach'](_0x2d4626):_0x392ca0&&'object'==typeof _0x392ca0?Object['entries'](_0x392ca0)['sort']()['forEach'](([_0x4c72a0,_0x273901])=>{_0x378dce(_0x4c72a0),_0x2d4626(_0x273901);}):_0x378dce(window['String'](_0x392ca0));}return _0x2d4626(_0x1e81d0),_0x3343d4>>>0x0;}function _0x352a66(_0x2302e1){return _0x2302e1['toString'](0x10)['padStart'](0x8,'0');}function _0x229a0a(_0x24cd18){return _0x24cd18['split']('')['reverse']()['join']('');}function _0x5a6eaf(){}_0x4ebf2f(await _0x2b29f6());}_0x19db70(_0x46b125['editor']);}(this);}},I=class extends _0x178895{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x42b749=[this['editor']];for(const _0x5e6efd of _0x42b749){let _0x5e911c;for(const _0x7c3285 in _0x5e6efd){const _0x1793dc=_0x7c3285,_0x2d0261=_0x5e6efd[_0x1793dc];if('exportInlineStylesLicenseKeyValid'==_0x2d0261||'exportInlineStylesLicenseKeyInvalid'==_0x2d0261||'exportInlineStylesLicenseKeyExpired'==_0x2d0261||'exportInlineStylesLicenseKeyDomainLimit'==_0x2d0261||'exportInlineStylesLicenseKeyNotAllowed'==_0x2d0261||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x2d0261||'exportInlineStylesLicenseKeyUsageLimit'==_0x2d0261){delete _0x5e6efd[_0x1793dc],_0x5e911c=_0x2d0261,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5e911c&&_0x5e6efd['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5e911c&&_0x5e6efd['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5e911c&&_0x5e6efd['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5e911c&&_0x5e6efd['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5e911c&&_0x5e6efd['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5e911c&&_0x5e6efd['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
|
23
|
+
import{Command as _0x554a39,Plugin as _0x1bd2fd}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x4f2eca,createElement as _0x3eb2f8,uid as _0x477c1e}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x37a1b7,addMarginStylesRules as _0x3569d1,addPaddingStylesRules as _0x17121d}from'@ckeditor/ckeditor5-engine';import{calculate as _0x2fd242,compare as _0x34eb9f}from'specificity';function f(_0x54a57a){const _0x35603b=[];let _0x596133='',_0x50d704=0x0;for(;_0x50d704<_0x54a57a['length'];){const _0x8853d9=_0x54a57a[_0x50d704];if('('===_0x8853d9){const _0x426ea2=y(_0x54a57a,_0x50d704+0x1);if(-0x1===_0x426ea2)return[];_0x596133+=_0x54a57a['slice'](_0x50d704,_0x426ea2+0x1),_0x50d704=_0x426ea2+0x1;}else','!==_0x8853d9||_0x596133['endsWith']('\x5c')?(_0x596133+=_0x8853d9,_0x50d704++):(_0x35603b['push'](_0x596133['trim']()),_0x596133='',_0x50d704++);}return _0x596133['trim']()&&_0x35603b['push'](_0x596133['trim']()),_0x35603b['filter'](Boolean);}function y(_0x3f1aa0,_0x5dac71){let _0x5d8f89=0x1;for(let _0x251466=_0x5dac71;_0x251466<_0x3f1aa0['length'];_0x251466++){const _0x372a3e=_0x3f1aa0[_0x251466];if('('===_0x372a3e)_0x5d8f89++;else{if(')'===_0x372a3e&&(_0x5d8f89--,0x0===_0x5d8f89))return _0x251466;}}return-0x1;}function d(_0x3891ca){return _0x3891ca['replace'](/!\s*important/i,'')['trim']();}function w(_0x3d8ff0){const _0x330f80=new Map();for(const {stylesMap:_0x5ab699,flatSelector:_0x4fb3f5}of _0x3d8ff0){if(':root'!==_0x4fb3f5)continue;const _0x98d541=p(_0x330f80['get']['bind'](_0x330f80),_0x5ab699);for(const [_0x345206,_0x390347]of _0x98d541)_0x330f80['set'](_0x345206,_0x390347);}return _0x330f80;}function p(_0x3b4245,_0x2042cd){const _0x4c655e=new Map(),_0x593fe8=_0x3173dc=>_0x4c655e['has'](_0x3173dc)?_0x4c655e['get'](_0x3173dc):_0x3b4245(_0x3173dc);for(const [_0x39e3e0,_0x5cefb9]of _0x2042cd['getStylesEntries']())if(_0x5cefb9&&_0x39e3e0['startsWith']('--')){const _0x4f9757=m(_0x593fe8,_0x5cefb9);_0x4c655e['set'](_0x39e3e0,_0x4f9757),_0x2042cd['remove'](_0x39e3e0);}for(const [_0x5e112b,_0x4d1fce]of _0x2042cd['getStylesEntries']())if(_0x4d1fce){const _0x410643=m(_0x593fe8,_0x4d1fce);_0x2042cd['set'](_0x5e112b,_0x410643);}return _0x4c655e;}function m(_0xd0d5f6,_0x140880){return function(_0x42386f,_0x54e9a4){let _0x107676='',_0x504920=0x0;for(;_0x504920<_0x42386f['length'];){const _0x20b5b0=_0x42386f['indexOf']('var(',_0x504920);if(-0x1===_0x20b5b0){_0x107676+=_0x42386f['slice'](_0x504920);break;}_0x107676+=_0x42386f['slice'](_0x504920,_0x20b5b0);const _0x4c2ff9=_0x20b5b0+0x4,_0x428bd5=y(_0x42386f,_0x4c2ff9);_0x107676+=_0x54e9a4(_0x42386f['substring'](_0x4c2ff9,_0x428bd5)),_0x504920=_0x428bd5+0x1;}return _0x107676;}(_0x140880,_0x27ddc3=>{const [_0x5aee97,_0x794f03]=f(_0x27ddc3),_0x10ff93=_0xd0d5f6(_0x5aee97);return void 0x0!==_0x10ff93?_0x10ff93:_0x794f03?m(_0xd0d5f6,_0x794f03):'var('+_0x5aee97+')';});}async function h(_0xa5be68){const _0x1804bf=[await _0x4f2eca(_0xa5be68['stylesheets']),_0xa5be68['inlineCss']]['filter'](_0x3502d1=>_0x3502d1&&_0x3502d1['length'])['join']('\x0a'),_0x4f5112=await async function(_0x243adc,_0x2845f0){const _0x2a1cde=new CSSStyleSheet();return await _0x2a1cde['replace'](_0x2845f0),S(Array['from'](_0x2a1cde['cssRules'])['filter'](_0x5c2436=>_0x5c2436 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x4a6d24,contentCssText:_0x46a4a1})=>{const _0x3f3d87=f(_0x4a6d24),_0x240aa7=new _0x37a1b7(_0x243adc)['setTo'](_0x46a4a1);return _0x3f3d87['map'](_0x49ac3c=>{const _0x410420=function(_0x109c1e){const _0x130b1e=':where(';let _0x1fb267=_0x109c1e,_0x210870=0x0;for(let _0x16417e=0x0;_0x16417e<0x64;_0x16417e++){const _0x46b8de=_0x1fb267['indexOf'](_0x130b1e,_0x210870);if(-0x1===_0x46b8de)break;let _0x5d338a=0x0;for(let _0x56b474=0x0;_0x56b474<_0x46b8de;_0x56b474++)'('===_0x1fb267[_0x56b474]?_0x5d338a++:')'===_0x1fb267[_0x56b474]&&_0x5d338a--;if(_0x5d338a>0x0){_0x210870=_0x46b8de+0x7;continue;}let _0xf632f2=-0x1;for(let _0xcadfc0=_0x46b8de+0x7,_0xb19fcd=0x1;_0xcadfc0<_0x1fb267['length'];_0xcadfc0++)if('('===_0x1fb267[_0xcadfc0]?_0xb19fcd++:')'===_0x1fb267[_0xcadfc0]&&_0xb19fcd--,!_0xb19fcd){_0xf632f2=_0xcadfc0;break;}-0x1!==_0xf632f2?(_0x1fb267=_0x1fb267['slice'](0x0,_0x46b8de)+_0x1fb267['slice'](_0xf632f2+0x1),_0x210870=_0x46b8de):_0x210870=_0x46b8de+0x7;}return _0x1fb267['replace'](/\s+/g,'\x20')['trim']();}(_0x49ac3c),_0x11e999=_0x410420?_0x2fd242(_0x410420)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x240aa7,'flatSelector':_0x49ac3c,'specificity':_0x11e999};});})['sort']((_0x62a168,_0x37cf30)=>_0x34eb9f(_0x62a168['specificity'],_0x37cf30['specificity']));}(_0xa5be68['stylesProcessor'],_0x1804bf);return{'parsedCssRules':_0x4f5112,'rootCssVariables':w(_0x4f5112)};}function S(_0x4c71ec,_0x242664=''){return _0x4c71ec['flatMap'](_0x193fd5=>{const {selectorText:_0x3a877d,cssText:_0x2addd1,cssRules:_0x265cc8}=_0x193fd5;if(!_0x3a877d)return[];const _0x474069=_0x3a877d['replace'](/&/g,_0x242664);let _0x97fe8b=_0x2addd1['replace'](_0x3a877d,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x265cc8||!_0x265cc8['length'])return[{'selectorText':_0x474069,'contentCssText':_0x97fe8b}];for(const _0x4c8d6d of _0x265cc8)_0x97fe8b=_0x97fe8b['replace'](_0x4c8d6d['cssText'],'')['trim']();return[{'selectorText':_0x474069,'contentCssText':_0x97fe8b},...S(Array['from'](_0x265cc8),_0x474069)];});}function L(_0x4990db,_0x459190){const _0x33f7ec=new _0x37a1b7(_0x4990db);for(const _0x4aa1b2 of _0x459190){let _0x12fd8f;if(_0x12fd8f='string'==typeof _0x4aa1b2?new _0x37a1b7(_0x4990db)['setTo'](_0x4aa1b2):_0x4aa1b2,_0x12fd8f){for(const [_0x548adf,_0x246cf9]of _0x12fd8f['getStylesEntries']())_0x33f7ec['set'](_0x548adf,_0x246cf9);}}return _0x33f7ec;}var g=class extends _0x554a39{_stylesProcessor;constructor(_0x1d49f9){super(_0x1d49f9),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x3569d1(this['_stylesProcessor']),_0x17121d(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x5a3034){const _0x28bddc=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x23ae4d}=this['editor']['locale'],{rootName:_0x2717cc='main',dataControllerDowncastOptions:_0x50efbf={},transformations:_0x5e57a0=_0x28bddc['transformations']||[]}=_0x5a3034||{};this['isBusy']=!0x0,this['refresh']();const _0x15cc4f=this['_getRootDataHTMLFragment'](_0x2717cc,_0x50efbf),_0x2dc3db=_0x3eb2f8(_0x15cc4f['ownerDocument'],'div',{'dir':_0x23ae4d,'class':'ck-content'},[_0x15cc4f]);return this['_collectAndApplyStyles'](_0x5e57a0,_0x2dc3db)['then'](()=>{const _0x3c56b5=function(_0x1b2319){const _0x19e4e2=_0x1b2319['ownerDocument']['createDocumentFragment']();for(;_0x1b2319['firstChild'];)_0x19e4e2['appendChild'](_0x1b2319['firstChild']);return _0x19e4e2;}(_0x2dc3db),_0x50bd87=_0x2dc3db['getAttribute']('style');if(_0x50bd87)for(const _0x2f4f4f of _0x3c56b5['children']){const _0x4a355c=_0x2f4f4f['getAttribute']('style'),_0x271b58=L(this['_stylesProcessor'],[_0x50bd87,_0x4a355c]);_0x2f4f4f['setAttribute']('style',x(_0x271b58));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x3c56b5);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x2fd6a7,_0x236e18){const {data:_0x348a3e,model:_0x2a9d1a}=this['editor'],_0x10849a=_0x2a9d1a['document']['getRoot'](_0x2fd6a7),_0x4883fa=_0x348a3e['toView'](_0x10849a,_0x236e18);return _0x348a3e['htmlProcessor']['domConverter']['viewToDom'](_0x4883fa);}async _collectAndApplyStyles(_0x14b92b,_0x435978){const {stylesheets:_0x1ff972,inlineCss:_0x228ec9,stripCssClasses:_0x2593db}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x29e125,rootCssVariables:_0x4f8f38}=await h({'stylesheets':_0x1ff972||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x228ec9}),_0x5cfcc4=[];this['_processElementTree']({'transformations':_0x14b92b,'parsedCssRules':_0x29e125,'element':_0x435978,'stripCssClasses':_0x2593db,'parentCSSVariablesLookup':_0x4f8f38['get']['bind'](_0x4f8f38),'runAfterDocumentTransformation':_0x4dbe6a=>{_0x5cfcc4['unshift'](_0x4dbe6a);}});for(const _0x127fc5 of _0x5cfcc4)_0x127fc5();}_processElementTree({element:_0x3b5979,parsedCssRules:_0x1fca06,parentCSSVariablesLookup:_0x3310d2,runAfterDocumentTransformation:_0x3a4079,stripCssClasses:_0x103d21,transformations:_0x3d6a59}){const {stylesMap:_0x214ac2,localCSSVariables:_0x16ee14}=function(_0x5d73a8){const _0x143285=_0x5d73a8['element']['getAttribute']('style')||'',_0x31e880=_0x5d73a8['parsedCssRules']['filter'](_0x156dc6=>_0x5d73a8['element']['matches'](_0x156dc6['flatSelector']))['map'](_0x3c96f0=>_0x3c96f0['stylesMap']),_0x44d221=L(_0x5d73a8['stylesProcessor'],[..._0x31e880,_0x143285]);return{'localCSSVariables':p(_0x5d73a8['fallbackCSSVariablesLookup'],_0x44d221),'stylesMap':_0x44d221};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3310d2,'parsedCssRules':_0x1fca06,'element':_0x3b5979}),_0x40749b=[];for(const _0x430057 of _0x3d6a59){const _0x179b1d=_0x430057(_0x3b5979,_0x214ac2,{'runAfterDocumentTransformation':_0x3a4079,'runAfterChildrenTransformation':_0x4d8f66=>{_0x40749b['unshift'](_0x4d8f66);}});_0x179b1d&&_0x179b1d instanceof HTMLElement&&(_0x3b5979=_0x179b1d);}_0x214ac2['size']?_0x3b5979['setAttribute']('style',x(_0x214ac2)):_0x3b5979['removeAttribute']('style');const _0x11680d=_0x4f7fc2=>_0x16ee14['has'](_0x4f7fc2)?_0x16ee14['get'](_0x4f7fc2):_0x3310d2(_0x4f7fc2);for(const _0x32d487 of _0x3b5979['children'])_0x32d487 instanceof HTMLElement&&this['_processElementTree']({'element':_0x32d487,'parsedCssRules':_0x1fca06,'stripCssClasses':_0x103d21,'transformations':_0x3d6a59,'parentCSSVariablesLookup':_0x11680d,'runAfterDocumentTransformation':_0x3a4079});_0x103d21&&_0x3b5979['removeAttribute']('class');for(const _0x17505b of _0x40749b)_0x17505b();}};function x(_0x2eaa54){return _0x2eaa54['getStylesEntries']()['map'](_0x147efa=>_0x147efa['join'](':'))['join'](';')+';';}var C=class extends _0x1bd2fd{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x20b6e7){const _0x1ef24a='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x2ba09f=0x79470,_0x4e7888={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1fdd56(_0x57740a){const _0x6a96f9=new window['Promise'](_0x44b7e1=>{_0x57740a['once']('ready',_0x44b7e1);}),_0x59ccf6=window['Date']['now'](),_0x32e64e=_0x57740a['config']['get']('licenseKey');async function _0x57e9b2(){let _0x1c31fa,_0x3cb460=null,_0x6be3d7=null;try{return'GPL'==_0x32e64e?'NotAllowed':(_0x1c31fa=_0x43b94a(),_0x1c31fa?(_0x1c31fa['usageEndpoint']&&(_0x6be3d7=_0xbc3136(_0x1c31fa['usageEndpoint'],_0x1c31fa['jti'])),await _0x3030bc()?_0x16e2ed()?_0x2d4703()?'Expired':_0x439c64()?('evaluation'==_0x1c31fa['licenseType']&&(_0x3cb460=_0x5deebf('EvaluationLimit')),await _0x580008()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2d4703(){const _0x102790=['evaluation','trial']['includes'](_0x1c31fa['licenseType'])?_0x59ccf6/0x3e8:0xe10*_0x2ba09f;return _0x1c31fa['exp']<_0x102790;}function _0x16e2ed(){const _0xbfa3ba=_0x1c31fa['features'];return!!_0xbfa3ba&&(!!_0xbfa3ba['includes']('*')||!!_0xbfa3ba['includes']('EIS'));}function _0x439c64(){const _0x1fb881=_0x1c31fa['licensedHosts'];if(!_0x1fb881||0x0==_0x1fb881['length'])return!0x0;const {hostname:_0x3fe7b8}=new URL(window['location']['href']);if(_0x1fb881['includes'](_0x3fe7b8))return!0x0;const _0x3f14ec=_0x3fe7b8['split']('.');return _0x1fb881['filter'](_0x291d34=>_0x291d34['includes']('*'))['map'](_0x313ae1=>_0x313ae1['split']('.'))['filter'](_0x5ad51f=>_0x5ad51f['length']<=_0x3f14ec['length'])['map'](_0x16d8fe=>Array(_0x3f14ec['length']-_0x16d8fe['length'])['fill']('*'===_0x16d8fe[0x0]?'*':'')['concat'](_0x16d8fe))['some'](_0x3c0901=>_0x3f14ec['every']((_0x179c5f,_0x14dd71)=>_0x3c0901[_0x14dd71]===_0x179c5f||'*'===_0x3c0901[_0x14dd71]));}function _0x580008(){return _0x3cb460&&_0x6be3d7?new window['Promise']((_0x4a6b1e,_0x3a48cd)=>{_0x3cb460['then'](_0x4a6b1e,_0x3a48cd),_0x6be3d7['then'](_0x4eff8d=>{'Valid'!=_0x4eff8d&&_0x4a6b1e(_0x4eff8d);},_0x3a48cd);}):_0x3cb460||_0x6be3d7||'Valid';}}function _0xbc3136(_0x59f52e,_0x3af167){return new window['Promise'](_0x30097f=>{if(_0x33fcbb())return _0x30097f('Valid');_0x91bc1b(),_0x57740a['decorate']('_sendUsageRequest');let _0x50bd53=!0x1;const _0x5a0ee3=_0x477c1e();function _0x3e585a(_0xbdb30f){return!!_0xbdb30f&&('object'==typeof _0xbdb30f||'function'==typeof _0xbdb30f)&&'function'==typeof _0xbdb30f['then']&&'function'==typeof _0xbdb30f['catch'];}function _0x3f4496(_0x39db5d){_0x25d904(_0x39db5d)['then'](_0x3a78d2=>_0x3a78d2&&'ok'==_0x3a78d2['status']?_0x85057d(_0x2342ce(_0x5a0ee3+_0x3af167))!=_0x3a78d2['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2cc116=>(_0x33d24b(),_0x2cc116),()=>{const _0x4a42e7=_0xb758f2();return null==_0x4a42e7?(_0x33d24b(),'Valid'):_0x59ccf6-_0x4a42e7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x30097f)['catch'](()=>{_0x30097f('UsageLimit');});const _0x4f0d13=0x36ee80;function _0x33d24b(){const _0x2aa92b='llct-'+_0x85057d(_0x2342ce(_0x59f52e)),_0x140a74=_0x26f794(_0x85057d(window['Math']['ceil'](_0x59ccf6/_0x4f0d13)));window['localStorage']['setItem'](_0x2aa92b,_0x140a74);}function _0xb758f2(){const _0x575049='llct-'+_0x85057d(_0x2342ce(_0x59f52e)),_0x27b18a=window['localStorage']['getItem'](_0x575049);return _0x27b18a?window['parseInt'](_0x26f794(_0x27b18a),0x10)*_0x4f0d13:null;}function _0x25d904(_0x44b234){return new window['Promise']((_0x3cff3e,_0x37d9cb)=>{_0x44b234['then'](_0x3cff3e,_0x37d9cb),window['setTimeout'](_0x37d9cb,0x1d4c0);});}}_0x57740a['on']('_sendUsageRequest',(_0x4c24e7,_0x3d144b)=>{if(_0x3d144b[0x0]!=_0x59f52e)return _0x30097f('UsageLimit');_0x3d144b[0x1]={..._0x3d144b[0x1],'requestId':_0x5a0ee3};},{'priority':'high'}),_0x57740a['on']('_sendUsageRequest',_0x2f849a=>{_0x3e585a(_0x2f849a['return'])&&(_0x50bd53=!0x0,_0x3f4496(_0x2f849a['return']));},{'priority':'low'}),_0x6a96f9['then'](()=>{_0x50bd53||_0x30097f('UsageLimit');});});function _0x33fcbb(){return'auto'==_0x57740a['editing']['view']['_overlayModeHint'];}function _0x91bc1b(){_0x57740a['editing']['view']['_overlayModeHint']='auto';}}function _0x5deebf(_0x5acccb){const _0x4ac07a=[new window['Promise'](_0x31b69e=>setTimeout(_0x31b69e,0x93ecc)),_0x6a96f9['then'](()=>new window['Promise'](_0x3fe1cd=>{let _0x1d0a95=0x0;_0x57740a['model']['on']('applyOperation',(_0x5705ba,_0x3351b0)=>{_0x3351b0[0x0]['isDocumentOperation']&&_0x1d0a95++,0x5e8==_0x1d0a95&&(_0x3fe1cd(),_0x5705ba['off']());});}))];return window['Promise']['race'](_0x4ac07a)['then'](()=>_0x5acccb);}async function _0x217c62(){await _0x6a96f9;const _0x230331=_0x57740a['commands']['get']('exportInlineStyles');_0x230331&&_0x230331['on']('execute',_0x56af96=>{_0x56af96['stop']();},{'priority':'highest'}),_0x57740a['model']['change']=_0x22b8c0,_0x57740a['model']['enqueueChange']=_0x22b8c0,_0x57740a['enableReadOnlyMode']('model');}function _0x4d98c4(_0x148348){const _0x305347=_0x365140();_0x57740a[_0x305347]='exportInlineStylesLicenseKey'+_0x148348,'Valid'!=_0x148348&&_0x217c62();}function _0x365140(){const _0x81641c=window['String'](window['performance']['now']())['replace']('.','');let _0x2cd448='Q';for(let _0xb48c87=0x0;_0xb48c87<_0x81641c['length'];_0xb48c87+=0x2){let _0x48b246=window['parseInt'](_0x81641c['substring'](_0xb48c87,_0xb48c87+0x2));_0x48b246>=0x3e&&(_0x48b246-=0x3e),_0x2cd448+=_0x1ef24a[_0x48b246];}return _0x2cd448;}function _0x43b94a(){const _0x26863e=_0x32e64e['split']('.');if(0x3!=_0x26863e['length'])return null;return _0x45d459(_0x26863e[0x1]);function _0x45d459(_0x4534b9){const _0x4e5b11=_0x36b119(_0x4534b9);return _0x4e5b11&&_0x490fb4()?_0x4e5b11:null;function _0x490fb4(){const _0x4f6747=_0x4e5b11['jti'],_0x1b3f72=window['parseInt'](_0x4f6747['substring'](_0x4f6747['length']-0x8),0x10),_0x5ced8a={..._0x4e5b11,'jti':_0x4f6747['substring'](0x0,_0x4f6747['length']-0x8)};return delete _0x5ced8a['vc'],_0x2342ce(_0x5ced8a)==_0x1b3f72;}}}async function _0x3030bc(){let _0x58212d=!0x0;try{const [_0x1c9ebe,_0x3e8f1e,_0x4c24ab]=_0x32e64e['split']('.');return _0x2b0f16(_0x1c9ebe),await _0x51a043(_0x1c9ebe,_0x3e8f1e,_0x4c24ab),_0x58212d;}catch{return!0x1;}function _0x2b0f16(_0x3a36a5){const _0x496f2c=_0x36b119(_0x3a36a5);_0x496f2c&&'ES256'==_0x496f2c['alg']||(_0x58212d=!0x1);}async function _0x51a043(_0x5c8217,_0x863cc4,_0x4860c0){const _0x4cbeb8=window['Uint8Array']['from'](_0x540778(_0x4860c0),_0x3cb5c7=>_0x3cb5c7['charCodeAt'](0x0)),_0x59cbcb=new window['TextEncoder']()['encode'](_0x5c8217+'.'+_0x863cc4),_0x310a36=window['crypto']['subtle'];if(!_0x310a36)return;const _0xf4da57=await _0x310a36['importKey']('jwk',_0x4e7888,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x310a36['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xf4da57,_0x4cbeb8,_0x59cbcb)||(_0x58212d=!0x1);}}function _0x36b119(_0x59fd46){return _0x59fd46['startsWith']('ey')?JSON['parse'](_0x540778(_0x59fd46)):null;}function _0x540778(_0x2e821f){return window['atob'](_0x2e821f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2342ce(_0x1dabfa){let _0x2df10c=0x1505;function _0x99359d(_0x3ae799){for(let _0xd6ccf5=0x0;_0xd6ccf5<_0x3ae799['length'];_0xd6ccf5++){const _0x4867a7=_0x3ae799['charCodeAt'](_0xd6ccf5);_0x2df10c=(_0x2df10c<<0x5)+_0x2df10c+_0x4867a7,_0x2df10c&=_0x2df10c;}}function _0x48630b(_0x297414){Array['isArray'](_0x297414)?_0x297414['forEach'](_0x48630b):_0x297414&&'object'==typeof _0x297414?Object['entries'](_0x297414)['sort']()['forEach'](([_0x302f75,_0x99c8eb])=>{_0x99359d(_0x302f75),_0x48630b(_0x99c8eb);}):_0x99359d(window['String'](_0x297414));}return _0x48630b(_0x1dabfa),_0x2df10c>>>0x0;}function _0x85057d(_0x4e2977){return _0x4e2977['toString'](0x10)['padStart'](0x8,'0');}function _0x26f794(_0x5ae5b8){return _0x5ae5b8['split']('')['reverse']()['join']('');}function _0x22b8c0(){}_0x4d98c4(await _0x57e9b2());}_0x1fdd56(_0x20b6e7['editor']);}(this);}},I=class extends _0x1bd2fd{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x40d787=[this['editor']];for(const _0x31e081 of _0x40d787){let _0x1720cc;for(const _0x52e1c4 in _0x31e081){const _0xddbd7f=_0x52e1c4,_0x5897b5=_0x31e081[_0xddbd7f];if('exportInlineStylesLicenseKeyValid'==_0x5897b5||'exportInlineStylesLicenseKeyInvalid'==_0x5897b5||'exportInlineStylesLicenseKeyExpired'==_0x5897b5||'exportInlineStylesLicenseKeyDomainLimit'==_0x5897b5||'exportInlineStylesLicenseKeyNotAllowed'==_0x5897b5||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5897b5||'exportInlineStylesLicenseKeyUsageLimit'==_0x5897b5){delete _0x31e081[_0xddbd7f],_0x1720cc=_0x5897b5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x1720cc&&_0x31e081['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x1720cc&&_0x31e081['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x1720cc&&_0x31e081['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x1720cc&&_0x31e081['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x1720cc&&_0x31e081['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x1720cc&&_0x31e081['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-inline-styles",
|
|
3
|
-
"version": "48.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.7",
|
|
4
4
|
"description": "The export with inline styles feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-core": "48.5.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.7",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.7",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.7",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|