@ckeditor/ckeditor5-paste-from-office-enhanced 48.8.1-alpha.3 → 49.0.0-alpha.0
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/augmentation.d.ts +8 -8
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/normalizers/inliner/msofficestylesinliner.d.ts +39 -38
- package/dist/normalizers/inliner/utils.d.ts +125 -125
- package/dist/normalizers/propagator/msofficeinlinestylepropagator.d.ts +43 -39
- package/dist/normalizers/propagator/utils.d.ts +87 -89
- package/dist/pastefromofficeenhanced.d.ts +33 -33
- package/dist/pastefromofficeenhancedinliner.d.ts +33 -33
- package/dist/pastefromofficeenhancedpropagator.d.ts +35 -35
- package/dist/utils.d.ts +8 -8
- package/package.json +6 -6
package/dist/augmentation.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { PasteFromOfficeEnhanced } from
|
|
6
|
-
declare module
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { PasteFromOfficeEnhanced } from "./index.js";
|
|
6
|
+
declare module "@ckeditor/ckeditor5-core" {
|
|
7
|
+
interface PluginsMap {
|
|
8
|
+
[PasteFromOfficeEnhanced.pluginName]: PasteFromOfficeEnhanced;
|
|
9
|
+
}
|
|
10
10
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { PasteFromOfficeEnhanced } from
|
|
9
|
-
import
|
|
6
|
+
* @module paste-from-office-enhanced
|
|
7
|
+
*/
|
|
8
|
+
export { PasteFromOfficeEnhanced } from "./pastefromofficeenhanced.js";
|
|
9
|
+
import "./augmentation.js";
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x3b3aba}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x10d157,PasteFromOffice as _0x567ac2,parsePasteOfficeHtml as _0x261b1e}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x5a3f34,uid as _0x1f027c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x2a4b12,ViewDocument as _0x46a780,ViewDomConverter as _0xfe35d2}from'@ckeditor/ckeditor5-engine/dist/index.js';const u=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function l(_0x39137a){return u['test'](_0x39137a);}const d=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function w(_0x30b249,_0x30b595){const _0xe2bf5=new Map();for(const [_0x2a2928,_0x2bfc1c]of _0x30b595){if(!_0x2a2928['tagName']&&!_0x2a2928['className'])continue;const _0x405158=!_0x2a2928['tagName']||_0x30b249['name']===_0x2a2928['tagName'],_0x42da00=!_0x2a2928['className']||_0x30b249['hasClass'](_0x2a2928['className']);_0x405158&&_0x42da00&&_0xe2bf5['set'](_0x2a2928,_0x2bfc1c);}return _0xe2bf5;}function m(_0x2f1aa9){const _0x3e7ca2={};for(let _0x493237=0x0;_0x493237<_0x2f1aa9['length'];_0x493237++){const _0x221f91=_0x2f1aa9[_0x493237],_0x187521=_0x2f1aa9['getPropertyValue'](_0x221f91);'initial'!==_0x187521&&(_0x3e7ca2[_0x221f91]=_0x187521);}return _0x3e7ca2;}function p(_0xef4990){const _0x236e7a=_0xef4990['split'](',')['map'](_0xff331b=>_0xff331b['trim']()),_0x933a6a=[];for(const _0x5a82b3 of _0x236e7a){const _0x2a7a19=d['exec'](_0x5a82b3);_0x2a7a19&&_0x933a6a['push'](_0x2a7a19['groups']);}return _0x933a6a;}function y(_0x5c2b2a){const _0x448c8d={};for(const _0x514f4b of _0x5c2b2a)Object['assign'](_0x448c8d,_0x514f4b);return _0x448c8d;}class MSOfficeStylesInliner extends _0x10d157{['execute'](_0x4ca1a0){const {body:_0x1c9fd9,styles:_0x566f9e,stylesString:_0x1cfde8}=_0x4ca1a0['_parsedData'],_0x4dfd4b=new _0x2a4b12(_0x1c9fd9['document']),_0xf1cf7c=_0x4dfd4b['createRangeIn'](_0x1c9fd9),_0x59bea6=function(_0x2f40dc){const _0x58b580={};for(const _0x43f8c1 of _0x2f40dc)for(const _0x1b0724 of _0x43f8c1['cssRules'])if(_0x1b0724 instanceof CSSStyleRule){const _0x446f75=m(_0x1b0724['style']);_0x58b580[_0x1b0724['selectorText']]=Object['assign']({},_0x58b580[_0x1b0724['selectorText']]||{},_0x446f75);}return _0x58b580;}(_0x566f9e),_0x119bac=function(_0x48aa35){const _0x1c30f7=new Map();for(const _0x3523d7 in _0x48aa35){const _0x83cc35=p(_0x3523d7),_0x52d72f=_0x48aa35[_0x3523d7];for(const _0x17f4a1 of _0x83cc35)_0x1c30f7['set'](_0x17f4a1,_0x52d72f);}return _0x1c30f7;}(_0x59bea6),_0x43e865=function(_0x190b40){const _0xe98263={},_0x1363d0=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x1463b0=/\.(?<className>[\w-]+)/g;let _0x2da1dd;for(;null!==(_0x2da1dd=_0x1363d0['exec'](_0x190b40));){const {selector:_0x2aa00a,color:_0x463941,patternType:_0x5a5e40}=_0x2da1dd['groups'];if('auto'!==_0x463941['toLowerCase']()&&'none'!==_0x5a5e40['toLowerCase']()&&'auto'!==_0x5a5e40['toLowerCase']()){for(const _0x28427a of _0x2aa00a['matchAll'](_0x1463b0))_0xe98263[_0x28427a['groups']['className']]=_0x463941;}}return _0xe98263;}(_0x1cfde8);for(const _0x5403e1 of _0xf1cf7c){if('elementStart'!==_0x5403e1['type'])continue;const _0x312c6b=_0x5403e1['item'],_0x189adb=w(_0x312c6b,_0x119bac),_0x4b35be=_0x189adb['size']?y(Array['from'](_0x189adb['values']())):{};if(!('background-color'in _0x4b35be)&&!('background'in _0x4b35be)){for(const [_0x4aba76,_0x36fe1e]of Object['entries'](_0x43e865))if(_0x312c6b['hasClass'](_0x4aba76)){_0x4b35be['background-color']=_0x36fe1e;break;}}for(const _0x5bd534 in _0x4b35be)_0x312c6b['hasStyle'](_0x5bd534)||_0x4dfd4b['setStyle'](_0x5bd534,_0x4b35be[_0x5bd534],_0x312c6b);}_0x4ca1a0['content']=_0x1c9fd9;}['isActive'](_0x3e3122){return super['isActive'](_0x3e3122)||l(_0x3e3122);}}class PasteFromOfficeEnhancedInliner extends _0x3b3aba{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x567ac2];}['init'](){const _0x2450ca=this['editor'],_0x37dce7=_0x2450ca['plugins']['get']('ClipboardPipeline'),_0x38e095=_0x2450ca['editing']['view']['document'],_0x21e906=new MSOfficeStylesInliner(_0x38e095);_0x37dce7['on']('inputTransformation',(_0x594f63,_0x28981d)=>{const _0x231599=_0x28981d['dataTransfer']['getData']('text/html');_0x21e906['isActive'](_0x231599)&&(_0x28981d['_parsedData']||(_0x28981d['_parsedData']=_0x261b1e(_0x231599,_0x38e095['stylesProcessor'])),_0x21e906['execute'](_0x28981d));},{'priority':_0x5a3f34['get']('high')+0xb});}['afterInit'](){!async function(_0xe12bda){const _0x529f1a=_0x3783a8([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x28c0ae=0x7374585f,_0x738784=0x7373d237^_0x28c0ae,_0x549e44=window[_0x3783a8([0x44,0x61,0x74,0x65])][_0x3783a8([0x6e,0x6f,0x77])](),_0x44fb8f=_0xe12bda[_0x3783a8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x164a6f=new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e7afe=>{_0x44fb8f[_0x3783a8([0x6f,0x6e,0x63,0x65])](_0x3783a8([0x72,0x65,0x61,0x64,0x79]),_0x3e7afe);}),_0x318af2={[_0x3783a8([0x6b,0x74,0x79])]:_0x3783a8([0x45,0x43]),[_0x3783a8([0x75,0x73,0x65])]:_0x3783a8([0x73,0x69,0x67]),[_0x3783a8([0x63,0x72,0x76])]:_0x3783a8([0x50,0x2d,0x32,0x35,0x36]),[_0x3783a8([0x78])]:_0x3783a8([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x3783a8([0x79])]:_0x3783a8([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x3783a8([0x61,0x6c,0x67])]:_0x3783a8([0x45,0x53,0x32,0x35,0x36])},_0x195a11=_0x44fb8f[_0x3783a8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3783a8([0x67,0x65,0x74])](_0x3783a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42017e(){let _0x41f490,_0x1c09a4=null,_0x1fde2f=null;try{if(_0x195a11==_0x3783a8([0x47,0x50,0x4c]))return _0x3783a8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x41f490=_0x24d55e(),!_0x41f490)return _0x3783a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x41f490[_0x3783a8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1fde2f=_0x10f280(_0x41f490[_0x3783a8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x41f490[_0x3783a8([0x6a,0x74,0x69])])),await _0x1cd7cc()?_0x438b5a()?_0x415a11()?_0x3783a8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3e42aa()?(_0x41f490[_0x3783a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3783a8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1c09a4=_0x17541f(_0x3783a8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb5311c()):_0x3783a8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3783a8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3783a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3783a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x415a11(){const _0x370a61=[_0x3783a8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3783a8([0x74,0x72,0x69,0x61,0x6c])][_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f490[_0x3783a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x549e44/0x3e8:0xe10*_0x738784;return _0x41f490[_0x3783a8([0x65,0x78,0x70])]<_0x370a61;}function _0x438b5a(){const _0x5cac62=_0x41f490[_0x3783a8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5cac62&&(!!_0x5cac62[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3783a8([0x2a]))||(!!_0x5cac62[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3783a8([0x50,0x4f,0x45]))||(!!_0x5cac62[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3783a8([0x50,0x50]))||!(!_0x5cac62[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3783a8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0x5650c6()))));}function _0x3e42aa(){const _0x12627b=_0x41f490[_0x3783a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12627b||0x0==_0x12627b[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1039a3}=new URL(window[_0x3783a8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x12627b[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1039a3))return!0x0;const _0x4f294c=_0x1039a3[_0x3783a8([0x73,0x70,0x6c,0x69,0x74])](_0x3783a8([0x2e]));return _0x12627b[_0x3783a8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4093b4=>_0x4093b4[_0x3783a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3783a8([0x2a])))[_0x3783a8([0x6d,0x61,0x70])](_0x5d4784=>_0x5d4784[_0x3783a8([0x73,0x70,0x6c,0x69,0x74])](_0x3783a8([0x2e])))[_0x3783a8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x279444=>_0x279444[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4f294c[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3783a8([0x6d,0x61,0x70])](_0xf56ac6=>Array(_0x4f294c[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xf56ac6[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3783a8([0x66,0x69,0x6c,0x6c])](_0xf56ac6[0x0]===_0x3783a8([0x2a])?_0x3783a8([0x2a]):'')[_0x3783a8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xf56ac6))[_0x3783a8([0x73,0x6f,0x6d,0x65])](_0x1f2b71=>_0x4f294c[_0x3783a8([0x65,0x76,0x65,0x72,0x79])]((_0x390403,_0x190db7)=>_0x1f2b71[_0x190db7]===_0x390403||_0x1f2b71[_0x190db7]===_0x3783a8([0x2a])));}function _0xb5311c(){return _0x1c09a4&&_0x1fde2f?new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1d495d,_0x32e001)=>{_0x1c09a4[_0x3783a8([0x74,0x68,0x65,0x6e])](_0x1d495d,_0x32e001),_0x1fde2f[_0x3783a8([0x74,0x68,0x65,0x6e])](_0x43c09b=>{_0x43c09b!=_0x3783a8([0x56,0x61,0x6c,0x69,0x64])&&_0x1d495d(_0x43c09b);},_0x32e001);}):_0x1c09a4||_0x1fde2f||_0x3783a8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x10f280(_0x474424,_0x4dfe8e){return new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17bcd6=>{if(_0x33db12())return _0x17bcd6(_0x3783a8([0x56,0x61,0x6c,0x69,0x64]));_0x5ba526(),_0x44fb8f[_0x3783a8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3783a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x310198=!0x1;const _0x1b8cc4=_0x1f027c();function _0x29378b(_0x4d42f4){return!!_0x4d42f4&&(typeof _0x4d42f4===_0x3783a8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4d42f4===_0x3783a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4d42f4[_0x3783a8([0x74,0x68,0x65,0x6e])]===_0x3783a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4d42f4[_0x3783a8([0x63,0x61,0x74,0x63,0x68])]===_0x3783a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xc698a0(_0x487648){_0x497d52(_0x487648)[_0x3783a8([0x74,0x68,0x65,0x6e])](_0x1fe99a=>{if(!_0x1fe99a||_0x1fe99a[_0x3783a8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3783a8([0x6f,0x6b]))return _0x3783a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4d37d0(_0xe66ae(_0x1b8cc4+_0x4dfe8e))!=_0x1fe99a[_0x3783a8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3783a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3783a8([0x56,0x61,0x6c,0x69,0x64]);})[_0x3783a8([0x74,0x68,0x65,0x6e])](_0x435cfc=>(_0x3560d2(),_0x435cfc),()=>{const _0x200af0=_0x94c54f();return null==_0x200af0?(_0x3560d2(),_0x3783a8([0x56,0x61,0x6c,0x69,0x64])):_0x3783a8(_0x549e44-_0x200af0>(0x5778dc5f^_0x28c0ae)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3783a8([0x74,0x68,0x65,0x6e])](_0x17bcd6)[_0x3783a8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x17bcd6(_0x3783a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb65efa=0x7342b6df^_0x28c0ae;function _0x3560d2(){const _0x12a12c=_0x3783a8([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d37d0(_0xe66ae(_0x474424)),_0x47d357=_0x4431a8(_0x4d37d0(window[_0x3783a8([0x4d,0x61,0x74,0x68])][_0x3783a8([0x63,0x65,0x69,0x6c])](_0x549e44/_0xb65efa)));window[_0x3783a8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3783a8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12a12c,_0x47d357);}function _0x94c54f(){const _0x156f08=_0x3783a8([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d37d0(_0xe66ae(_0x474424)),_0x21606e=window[_0x3783a8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3783a8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x156f08);return _0x21606e?window[_0x3783a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4431a8(_0x21606e),0x10)*_0xb65efa:null;}function _0x497d52(_0x3bb4b9){return new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdea199,_0x6f670c)=>{_0x3bb4b9[_0x3783a8([0x74,0x68,0x65,0x6e])](_0xdea199,_0x6f670c),window[_0x3783a8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x6f670c,0x73758c9f^_0x28c0ae);});}}_0x44fb8f[_0x3783a8([0x6f,0x6e])](_0x3783a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16c416,_0x3e7452)=>{if(_0x3e7452[0x0]!=_0x474424)return _0x17bcd6(_0x3783a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3e7452[0x1]={..._0x3e7452[0x1],[_0x3783a8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1b8cc4};},{[_0x3783a8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3783a8([0x68,0x69,0x67,0x68])}),_0x44fb8f[_0x3783a8([0x6f,0x6e])](_0x3783a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xcf6b61=>{_0x29378b(_0xcf6b61[_0x3783a8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x310198=!0x0,_0xc698a0(_0xcf6b61[_0x3783a8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3783a8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3783a8([0x6c,0x6f,0x77])}),_0x164a6f[_0x3783a8([0x74,0x68,0x65,0x6e])](()=>{_0x310198||_0x17bcd6(_0x3783a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x33db12(){return _0x44fb8f[_0x3783a8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3783a8([0x76,0x69,0x65,0x77])][_0x3783a8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3783a8([0x61,0x75,0x74,0x6f]);}function _0x5ba526(){_0x44fb8f[_0x3783a8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3783a8([0x76,0x69,0x65,0x77])][_0x3783a8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3783a8([0x61,0x75,0x74,0x6f]);}}function _0x17541f(_0x4e851f){const _0x4f1b8a=[new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b8c12=>setTimeout(_0x3b8c12,0x737d6693^_0x28c0ae)),_0x164a6f[_0x3783a8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f3b83=>{let _0x2b21e7=0x0;_0x44fb8f[_0x3783a8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3783a8([0x6f,0x6e])](_0x3783a8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5dc9c2,_0x16c99b)=>{_0x16c99b[0x0][_0x3783a8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2b21e7++,_0x2b21e7==(0x73745db7^_0x28c0ae)&&(_0x3f3b83(),_0x5dc9c2[_0x3783a8([0x6f,0x66,0x66])]());});}))];return window[_0x3783a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3783a8([0x72,0x61,0x63,0x65])](_0x4f1b8a)[_0x3783a8([0x74,0x68,0x65,0x6e])](()=>_0x4e851f);}async function _0xd270f8(){await _0x164a6f,_0x44fb8f[_0x3783a8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3783a8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xef691e,_0x44fb8f[_0x3783a8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3783a8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xef691e,_0x44fb8f[_0x3783a8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3783a8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5650c6(){return window[_0x3783a8([0x67,0x6c,0x6f,0x62])]&&window[_0x3783a8([0x67,0x6c,0x6f,0x62])][_0x3783a8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4c72c6(_0x305669){const _0x254091=_0x215502();_0x44fb8f[_0x254091]=_0x3783a8([0x70,0x61,0x73,0x74,0x65,0x46,0x72,0x6f,0x6d,0x4f,0x66,0x66,0x69,0x63,0x65,0x45,0x6e,0x68,0x61,0x6e,0x63,0x65,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x305669,_0x305669!=_0x3783a8([0x56,0x61,0x6c,0x69,0x64])&&_0xd270f8();}function _0x215502(){const _0x11c5b7=window[_0x3783a8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3783a8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3783a8([0x6e,0x6f,0x77])]())[_0x3783a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3783a8([0x2e]),'');let _0x2bd05b=_0x3783a8([0x73]);for(let _0x2332ff=0x0;_0x2332ff<_0x11c5b7[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2332ff+=0x2){let _0x56b0a6=window[_0x3783a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x11c5b7[_0x3783a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2332ff,_0x2332ff+0x2));_0x56b0a6>=_0x529f1a[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x56b0a6-=_0x529f1a[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2bd05b+=_0x529f1a[_0x56b0a6];}return _0x2bd05b;}function _0x24d55e(){const _0x5b575f=_0x195a11[_0x3783a8([0x73,0x70,0x6c,0x69,0x74])](_0x3783a8([0x2e]));if(0x3!=_0x5b575f[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x39340c(_0x5b575f[0x1]);function _0x39340c(_0x4aa967){const _0x56a1b9=_0x1314eb(_0x4aa967);return _0x56a1b9&&_0x37be4b()?_0x56a1b9:null;function _0x37be4b(){const _0x302158=_0x56a1b9[_0x3783a8([0x6a,0x74,0x69])],_0x4bda2b=window[_0x3783a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x302158[_0x3783a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x302158[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3e89b2={..._0x56a1b9,[_0x3783a8([0x6a,0x74,0x69])]:_0x302158[_0x3783a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x302158[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3e89b2[_0x3783a8([0x76,0x63])],_0xe66ae(_0x3e89b2)==_0x4bda2b;}}}async function _0x1cd7cc(){let _0x33436f=!0x0;try{const _0x5d9e50=_0x195a11[_0x3783a8([0x73,0x70,0x6c,0x69,0x74])](_0x3783a8([0x2e])),[_0x2fe3cb,_0x1af032,_0x551803]=_0x5d9e50;return _0x31347d(_0x2fe3cb),await _0x10e0fc(_0x2fe3cb,_0x1af032,_0x551803),_0x33436f;}catch{return!0x1;}function _0x31347d(_0x208d30){const _0x349fec=_0x1314eb(_0x208d30);_0x349fec&&_0x349fec[_0x3783a8([0x61,0x6c,0x67])]==_0x3783a8([0x45,0x53,0x32,0x35,0x36])||(_0x33436f=!0x1);}async function _0x10e0fc(_0x5f068e,_0x260d9a,_0x60c696){const _0x305fa9=window[_0x3783a8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3783a8([0x66,0x72,0x6f,0x6d])](_0x18cfea(_0x60c696),_0x86104c=>_0x86104c[_0x3783a8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xdbf7b0=new window[(_0x3783a8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3783a8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5f068e+_0x3783a8([0x2e])+_0x260d9a),_0x4d5ec4=window[_0x3783a8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3783a8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4d5ec4)return;const _0x13938e=await _0x4d5ec4[_0x3783a8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3783a8([0x6a,0x77,0x6b]),_0x318af2,{[_0x3783a8([0x6e,0x61,0x6d,0x65])]:_0x3783a8([0x45,0x43,0x44,0x53,0x41]),[_0x3783a8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3783a8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3783a8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4d5ec4[_0x3783a8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3783a8([0x6e,0x61,0x6d,0x65])]:_0x3783a8([0x45,0x43,0x44,0x53,0x41]),[_0x3783a8([0x68,0x61,0x73,0x68])]:{[_0x3783a8([0x6e,0x61,0x6d,0x65])]:_0x3783a8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x13938e,_0x305fa9,_0xdbf7b0)||(_0x33436f=!0x1);}}function _0x1314eb(_0x14254f){return _0x14254f[_0x3783a8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3783a8([0x65,0x79]))?JSON[_0x3783a8([0x70,0x61,0x72,0x73,0x65])](_0x18cfea(_0x14254f)):null;}function _0x18cfea(_0x144413){return window[_0x3783a8([0x61,0x74,0x6f,0x62])](_0x144413[_0x3783a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3783a8([0x2b]))[_0x3783a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3783a8([0x2f])));}function _0xe66ae(_0x4a28c7){let _0x38144e=0x1505;function _0x4f8f88(_0x16e54c){for(let _0x31cb7a=0x0;_0x31cb7a<_0x16e54c[_0x3783a8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31cb7a++){const _0x43d1af=_0x16e54c[_0x3783a8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x31cb7a);_0x38144e=(_0x38144e<<0x5)+_0x38144e+_0x43d1af,_0x38144e&=_0x38144e;}}function _0x4f4262(_0x5cfefc){Array[_0x3783a8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5cfefc)?_0x5cfefc[_0x3783a8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4f4262):_0x5cfefc&&typeof _0x5cfefc==_0x3783a8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3783a8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5cfefc)[_0x3783a8([0x73,0x6f,0x72,0x74])]()[_0x3783a8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56c3ff,_0x342052])=>{_0x4f8f88(_0x56c3ff),_0x4f4262(_0x342052);}):_0x4f8f88(window[_0x3783a8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5cfefc));}return _0x4f4262(_0x4a28c7),_0x38144e>>>0x0;}function _0x4d37d0(_0x125a86){return _0x125a86[_0x3783a8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3783a8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3783a8([0x30]));}function _0x4431a8(_0x542644){return _0x542644[_0x3783a8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3783a8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3783a8([0x6a,0x6f,0x69,0x6e])]('');}function _0xef691e(){}function _0x3783a8(_0x40a482){return _0x40a482['map'](_0x44deba=>String['fromCharCode'](_0x44deba))['join']('');}_0x4c72c6(await _0x42017e());}(this);}}const g=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],h=['color','font-family','font-size'],O={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x702db6=>Number(_0x702db6)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function E(_0x4bd1a5){return g['includes'](_0x4bd1a5);}function P(_0x3ed3b3){return Array['from'](_0x3ed3b3['getStyleNames']())['filter'](E);}function F(_0x20e53e,_0x4a85c4,_0x1a20a2){const {spanStyles:_0x192c26,stylesToBeHtmlElements:_0x581206}=x(_0x20e53e,_0x1a20a2);!function(_0xa93d35,_0x39ba80,_0x2e6c68){for(const _0x33df91 in _0x2e6c68){_0x2e6c68[_0x33df91]['forEach'](([,_0x4e5251])=>{const _0x182bda=_0x39ba80['createElement'](_0x4e5251,[],_0xa93d35['getChildren']());_0x39ba80['insertChild'](0x0,_0x182bda,_0xa93d35);}),_0x39ba80['removeStyle'](_0x33df91,_0xa93d35);}}(_0x20e53e,_0x4a85c4,_0x581206),function(_0x2e58a0,_0x2d2756,_0x52b105){if(!Object['keys'](_0x52b105)['length'])return;const _0x3a9f96=_0x2d2756['createElement']('span',[],_0x2e58a0['getChildren']());_0x2d2756['setStyle'](_0x52b105,_0x3a9f96),_0x2d2756['insertChild'](0x0,_0x3a9f96,_0x2e58a0),_0x2d2756['removeStyle'](Object['keys'](_0x52b105),_0x2e58a0);}(_0x20e53e,_0x4a85c4,_0x192c26);}function L(_0x315976,_0x1e4edf,_0x4c7b5b){const {spanStyles:_0x1a9e28}=x(_0x315976,_0x4c7b5b),_0x504ebe=Object['keys'](_0x1a9e28);if(!_0x504ebe['length'])return;let _0x36955e=!0x1;for(const _0xb8a2b9 of _0x315976['getChildren']())if(_0xb8a2b9['is']('element','span')){_0x36955e=!0x0;for(const [_0x3bc4fc,_0x5bfc4f]of Object['entries'](_0x1a9e28))_0xb8a2b9['hasStyle'](_0x3bc4fc)||_0x1e4edf['setStyle']({[_0x3bc4fc]:_0x5bfc4f},_0xb8a2b9);}_0x36955e&&_0x1e4edf['removeStyle'](_0x504ebe,_0x315976);}function x(_0x4dc4ee,_0x25254c){const _0x53bda7={},_0x2ce51a={};return _0x25254c['forEach'](_0x4dd4fd=>{const _0x21e38b=_0x4dc4ee['getStyle'](_0x4dd4fd);if(_0x21e38b){if(function(_0x2919c7){return h['includes'](_0x2919c7);}(_0x4dd4fd))_0x53bda7[_0x4dd4fd]=_0x21e38b;else{if(function(_0x3f37c5){return _0x3f37c5 in O;}(_0x4dd4fd)){const _0x23fb38=_0x21e38b['split']('\x20');O[_0x4dd4fd]['forEach'](([_0x4d1fee,_0xc880d2])=>{for(const _0x192b28 of _0x23fb38){('function'==typeof _0x4d1fee&&_0x4d1fee(_0x192b28)||_0x4d1fee===_0x192b28)&&(_0x2ce51a[_0x4dd4fd]=[..._0x2ce51a[_0x4dd4fd]||[],[_0x4d1fee,_0xc880d2]]);}});}}}}),{'spanStyles':_0x53bda7,'stylesToBeHtmlElements':_0x2ce51a};}class MSOfficeInlineStylePropagator extends _0x10d157{['execute'](_0x20a3c0){const {body:_0x9448f3}=_0x20a3c0['_parsedData'],_0x5ca29d=new _0x2a4b12(_0x9448f3['document']),_0x55722f=_0x5ca29d['createRangeIn'](_0x9448f3),_0x49e013=new _0x46a780(_0x5ca29d['document']['stylesProcessor']),_0x2a130b=[...new _0xfe35d2(_0x49e013)['blockElements'],'font'],_0x1ece5f=_0x55722f['getItems']();for(const _0x53e5bf of _0x1ece5f)if(_0x53e5bf['is']('element')&&_0x2a130b['includes'](_0x53e5bf['name'])){if(_0x53e5bf['hasStyle']('mso-list')&&'none'!==_0x53e5bf['getStyle']('mso-list')){L(_0x53e5bf,_0x5ca29d,P(_0x53e5bf));continue;}F(_0x53e5bf,_0x5ca29d,P(_0x53e5bf));}_0x20a3c0['content']=_0x9448f3;}['isActive'](_0x2a129a){return super['isActive'](_0x2a129a)||l(_0x2a129a);}}class PasteFromOfficeEnhancedPropagator extends _0x3b3aba{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x567ac2];}['init'](){const _0x48ffda=this['editor'],_0x230c53=_0x48ffda['plugins']['get']('ClipboardPipeline'),_0x22b8cc=_0x48ffda['editing']['view']['document'],_0xd9a023=new MSOfficeInlineStylePropagator(_0x22b8cc);_0x230c53['on']('inputTransformation',(_0x468d9e,_0x3d2767)=>{const _0x4ea577=_0x3d2767['dataTransfer']['getData']('text/html');_0xd9a023['isActive'](_0x4ea577)&&(_0x3d2767['_parsedData']||(_0x3d2767['_parsedData']=_0x261b1e(_0x4ea577,_0x22b8cc['stylesProcessor'])),_0xd9a023['execute'](_0x3d2767));},{'priority':_0x5a3f34['get']('high')+0xa}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1f02a4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x14b909;for(const _0x561af8 in _0x1f02a4){const _0x151f69=_0x561af8,_0x4014d6=_0x1f02a4[_0x151f69];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x4014d6||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x4014d6){delete _0x1f02a4[_0x151f69],_0x14b909=_0x4014d6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x14b909&&_0x1f02a4['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x14b909&&_0x1f02a4['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x14b909&&_0x1f02a4['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x14b909&&_0x1f02a4['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x14b909&&_0x1f02a4['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x14b909&&_0x1f02a4['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x3b3aba{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x567ac2,PasteFromOfficeEnhancedInliner,PasteFromOfficeEnhancedPropagator];}}export{PasteFromOfficeEnhanced};
|
|
23
|
+
import{Plugin as _0x12bd6a}from'@ckeditor/ckeditor5-core';import{PasteFromOffice as _0x921b8e,PasteFromOfficeMSWordNormalizer as _0x422cf5}from'@ckeditor/ckeditor5-paste-from-office';import{priorities as _0x15e6b5,uid as _0x42b827}from'@ckeditor/ckeditor5-utils';import{ViewDocument as _0x54ce81,ViewDomConverter as _0x329782,ViewUpcastWriter as _0x197779}from'@ckeditor/ckeditor5-engine';const f=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x11179f){return f['test'](_0x11179f);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x217692,_0x12af3c){const _0xd553e7=new Map();for(const [_0xc8b7ca,_0x38838b]of _0x12af3c){if(!_0xc8b7ca['tagName']&&!_0xc8b7ca['className'])continue;const _0x27f4c8=!_0xc8b7ca['tagName']||_0x217692['name']===_0xc8b7ca['tagName'],_0x56e03d=!_0xc8b7ca['className']||_0x217692['hasClass'](_0xc8b7ca['className']);_0x27f4c8&&_0x56e03d&&_0xd553e7['set'](_0xc8b7ca,_0x38838b);}return _0xd553e7;}function m(_0x36a1b8){const _0x215fa4={};for(let _0x17ab04=0x0;_0x17ab04<_0x36a1b8['length'];_0x17ab04++){const _0x4d97d0=_0x36a1b8[_0x17ab04],_0x50f3aa=_0x36a1b8['getPropertyValue'](_0x4d97d0);'initial'!==_0x50f3aa&&(_0x215fa4[_0x4d97d0]=_0x50f3aa);}return _0x215fa4;}function w(_0x389c16){const _0x1b8183=_0x389c16['split'](',')['map'](_0x2ca906=>_0x2ca906['trim']()),_0x56826d=[];for(const _0x4773ad of _0x1b8183){const _0x2a226b=l['exec'](_0x4773ad);_0x2a226b&&_0x56826d['push'](_0x2a226b['groups']);}return _0x56826d;}function y(_0x3385cc){const _0x267fd8={};for(const _0x2edcdf of _0x3385cc)Object['assign'](_0x267fd8,_0x2edcdf);return _0x267fd8;}var g=class extends _0x422cf5{execute(_0x2aeab2){const {styles:_0x5ee934,stylesString:_0x3f3f53}=_0x2aeab2['extraContent'],_0x52b34a=new _0x197779(_0x2aeab2['content']['document']),_0x644838=_0x52b34a['createRangeIn'](_0x2aeab2['content']),_0x29dda0=function(_0x206d70){const _0x7d6670={};for(const _0x421d66 of _0x206d70)for(const _0x1fc625 of _0x421d66['cssRules'])if(_0x1fc625 instanceof CSSStyleRule){const _0x39894d=m(_0x1fc625['style']);_0x7d6670[_0x1fc625['selectorText']]=Object['assign']({},_0x7d6670[_0x1fc625['selectorText']]||{},_0x39894d);}return _0x7d6670;}(_0x5ee934),_0x13d5ea=function(_0x52a3ae){const _0x5a567c=new Map();for(const _0x102f7b in _0x52a3ae){const _0x2ff445=w(_0x102f7b),_0x3ac9ae=_0x52a3ae[_0x102f7b];for(const _0x207a4a of _0x2ff445)_0x5a567c['set'](_0x207a4a,_0x3ac9ae);}return _0x5a567c;}(_0x29dda0),_0x5e2e8f=function(_0x1c3c00){const _0x5674f5={},_0x5bf188=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x1a1f6e=/\.(?<className>[\w-]+)/g;let _0x5a693e;for(;null!==(_0x5a693e=_0x5bf188['exec'](_0x1c3c00));){const {selector:_0x268e81,color:_0x468511,patternType:_0x4b1317}=_0x5a693e['groups'];if('auto'!==_0x468511['toLowerCase']()&&'none'!==_0x4b1317['toLowerCase']()&&'auto'!==_0x4b1317['toLowerCase']()){for(const _0x51eb99 of _0x268e81['matchAll'](_0x1a1f6e))_0x5674f5[_0x51eb99['groups']['className']]=_0x468511;}}return _0x5674f5;}(_0x3f3f53);for(const _0x54aa84 of _0x644838){if('elementStart'!==_0x54aa84['type'])continue;const _0x4669e9=_0x54aa84['item'],_0x123741=d(_0x4669e9,_0x13d5ea),_0x56b315=_0x123741['size']?y(Array['from'](_0x123741['values']())):{};if(!('background-color'in _0x56b315)&&!('background'in _0x56b315)){for(const [_0x35a4b7,_0x4a2b23]of Object['entries'](_0x5e2e8f))if(_0x4669e9['hasClass'](_0x35a4b7)){_0x56b315['background-color']=_0x4a2b23;break;}}for(const _0x4a866a in _0x56b315)_0x4669e9['hasStyle'](_0x4a866a)||_0x52b34a['setStyle'](_0x4a866a,_0x56b315[_0x4a866a],_0x4669e9);}}isActive(_0x2765d1){return super['isActive'](_0x2765d1)||u(_0x2765d1);}},p=class extends _0x12bd6a{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e];}init(){const _0x40e656=this['editor'],_0x2a8398=_0x40e656['plugins']['get']('PasteFromOffice'),_0x56cf5d=_0x40e656['editing']['view']['document'],_0x5aa350=new g(_0x56cf5d);_0x2a8398['registerNormalizer'](_0x5aa350,_0x15e6b5['high']+0xb);}afterInit(){!async function(_0x291f88){const _0xb262b4='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x3e9bbf=0x79710,_0x7d4a29={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1f4954(_0x344e27){const _0x2276c6=new window['Promise'](_0x5d825c=>{_0x344e27['once']('ready',_0x5d825c);}),_0x205608=window['Date']['now'](),_0x105a4d=_0x344e27['config']['get']('licenseKey');async function _0x106f9d(){let _0x369cd5,_0x9c3505=null,_0xec5fbe=null;try{return'GPL'==_0x105a4d?'NotAllowed':(_0x369cd5=_0x45dcd0(),_0x369cd5?(_0x369cd5['usageEndpoint']&&(_0xec5fbe=_0x3cd9b3(_0x369cd5['usageEndpoint'],_0x369cd5['jti'])),await _0x147d3d()?_0x8ebea()?_0x4c4b32()?'Expired':_0x24fde5()?('evaluation'==_0x369cd5['licenseType']&&(_0x9c3505=_0x1de80a('EvaluationLimit')),await _0x5bddee()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4c4b32(){const _0x29362c=['evaluation','trial']['includes'](_0x369cd5['licenseType'])?_0x205608/0x3e8:0xe10*_0x3e9bbf;return _0x369cd5['exp']<_0x29362c;}function _0x8ebea(){const _0x2c8359=_0x369cd5['features'];return!!_0x2c8359&&(!!_0x2c8359['includes']('*')||(!!_0x2c8359['includes']('POE')||(!!_0x2c8359['includes']('PP')||!(!_0x2c8359['includes']('TRILIUM')||!_0x84332e()))));}function _0x24fde5(){const _0x2aef45=_0x369cd5['licensedHosts'];if(!_0x2aef45||0x0==_0x2aef45['length'])return!0x0;const {hostname:_0x4fe3ac}=new URL(window['location']['href']);if(_0x2aef45['includes'](_0x4fe3ac))return!0x0;const _0x54c3f7=_0x4fe3ac['split']('.');return _0x2aef45['filter'](_0x53ccb4=>_0x53ccb4['includes']('*'))['map'](_0x3f0767=>_0x3f0767['split']('.'))['filter'](_0x3e83e9=>_0x3e83e9['length']<=_0x54c3f7['length'])['map'](_0x375c3f=>Array(_0x54c3f7['length']-_0x375c3f['length'])['fill']('*'===_0x375c3f[0x0]?'*':'')['concat'](_0x375c3f))['some'](_0x123bd5=>_0x54c3f7['every']((_0x44a93e,_0x21659d)=>_0x123bd5[_0x21659d]===_0x44a93e||'*'===_0x123bd5[_0x21659d]));}function _0x5bddee(){return _0x9c3505&&_0xec5fbe?new window['Promise']((_0x46bf47,_0x579f06)=>{_0x9c3505['then'](_0x46bf47,_0x579f06),_0xec5fbe['then'](_0x1289c3=>{'Valid'!=_0x1289c3&&_0x46bf47(_0x1289c3);},_0x579f06);}):_0x9c3505||_0xec5fbe||'Valid';}}function _0x3cd9b3(_0x5b0e40,_0x405cfb){return new window['Promise'](_0x51cfd6=>{if(_0x1f95cf())return _0x51cfd6('Valid');_0x12c4c8(),_0x344e27['decorate']('_sendUsageRequest');let _0x1c42f5=!0x1;const _0x35ddcd=_0x42b827();function _0x28a2cf(_0x2aa476){return!!_0x2aa476&&('object'==typeof _0x2aa476||'function'==typeof _0x2aa476)&&'function'==typeof _0x2aa476['then']&&'function'==typeof _0x2aa476['catch'];}function _0x5bbe65(_0x468128){_0x2bb456(_0x468128)['then'](_0x2376d4=>_0x2376d4&&'ok'==_0x2376d4['status']?_0x311452(_0x5c89ec(_0x35ddcd+_0x405cfb))!=_0x2376d4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x140b07=>(_0x1ba237(),_0x140b07),()=>{const _0x3af58c=_0x5c387b();return null==_0x3af58c?(_0x1ba237(),'Valid'):_0x205608-_0x3af58c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x51cfd6)['catch'](()=>{_0x51cfd6('UsageLimit');});const _0x33d574=0x36ee80;function _0x1ba237(){const _0x5e178d='llct-'+_0x311452(_0x5c89ec(_0x5b0e40)),_0x382b14=_0x52c096(_0x311452(window['Math']['ceil'](_0x205608/_0x33d574)));window['localStorage']['setItem'](_0x5e178d,_0x382b14);}function _0x5c387b(){const _0x51b02c='llct-'+_0x311452(_0x5c89ec(_0x5b0e40)),_0x49ff8e=window['localStorage']['getItem'](_0x51b02c);return _0x49ff8e?window['parseInt'](_0x52c096(_0x49ff8e),0x10)*_0x33d574:null;}function _0x2bb456(_0xafed60){return new window['Promise']((_0x1386a7,_0x525cbc)=>{_0xafed60['then'](_0x1386a7,_0x525cbc),window['setTimeout'](_0x525cbc,0x1d4c0);});}}_0x344e27['on']('_sendUsageRequest',(_0x18eb56,_0x250182)=>{if(_0x250182[0x0]!=_0x5b0e40)return _0x51cfd6('UsageLimit');_0x250182[0x1]={..._0x250182[0x1],'requestId':_0x35ddcd};},{'priority':'high'}),_0x344e27['on']('_sendUsageRequest',_0x15ef16=>{_0x28a2cf(_0x15ef16['return'])&&(_0x1c42f5=!0x0,_0x5bbe65(_0x15ef16['return']));},{'priority':'low'}),_0x2276c6['then'](()=>{_0x1c42f5||_0x51cfd6('UsageLimit');});});function _0x1f95cf(){return'auto'==_0x344e27['editing']['view']['_overlayModeHint'];}function _0x12c4c8(){_0x344e27['editing']['view']['_overlayModeHint']='auto';}}function _0x1de80a(_0x371d2e){const _0x4b02c0=[new window['Promise'](_0x63a0e9=>setTimeout(_0x63a0e9,0x93ecc)),_0x2276c6['then'](()=>new window['Promise'](_0x1e7859=>{let _0x1b47c1=0x0;_0x344e27['model']['on']('applyOperation',(_0x2830f3,_0x5f4a4d)=>{_0x5f4a4d[0x0]['isDocumentOperation']&&_0x1b47c1++,0x5e8==_0x1b47c1&&(_0x1e7859(),_0x2830f3['off']());});}))];return window['Promise']['race'](_0x4b02c0)['then'](()=>_0x371d2e);}async function _0x2b82b6(){await _0x2276c6,_0x344e27['model']['change']=_0xa470d0,_0x344e27['model']['enqueueChange']=_0xa470d0,_0x344e27['enableReadOnlyMode']('model');}function _0x84332e(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4247c4(_0x59ae24){const _0x562505=_0x1d2d6f();_0x344e27[_0x562505]='pasteFromOfficeEnhancedLicenseKey'+_0x59ae24,'Valid'!=_0x59ae24&&_0x2b82b6();}function _0x1d2d6f(){const _0x7b759f=window['String'](window['performance']['now']())['replace']('.','');let _0x4c89eb='u';for(let _0xcf9ac9=0x0;_0xcf9ac9<_0x7b759f['length'];_0xcf9ac9+=0x2){let _0x1d873f=window['parseInt'](_0x7b759f['substring'](_0xcf9ac9,_0xcf9ac9+0x2));_0x1d873f>=0x3e&&(_0x1d873f-=0x3e),_0x4c89eb+=_0xb262b4[_0x1d873f];}return _0x4c89eb;}function _0x45dcd0(){const _0xfd7e9=_0x105a4d['split']('.');if(0x3!=_0xfd7e9['length'])return null;return _0x3c7d7c(_0xfd7e9[0x1]);function _0x3c7d7c(_0x598fff){const _0x35bfa1=_0x2f0f6b(_0x598fff);return _0x35bfa1&&_0x1416eb()?_0x35bfa1:null;function _0x1416eb(){const _0x848dd6=_0x35bfa1['jti'],_0xd236ee=window['parseInt'](_0x848dd6['substring'](_0x848dd6['length']-0x8),0x10),_0x48f1a9={..._0x35bfa1,'jti':_0x848dd6['substring'](0x0,_0x848dd6['length']-0x8)};return delete _0x48f1a9['vc'],_0x5c89ec(_0x48f1a9)==_0xd236ee;}}}async function _0x147d3d(){let _0x2a95b7=!0x0;try{const [_0x1c45bf,_0x5c1dee,_0x4cb3b5]=_0x105a4d['split']('.');return _0x3db9e7(_0x1c45bf),await _0x4f9417(_0x1c45bf,_0x5c1dee,_0x4cb3b5),_0x2a95b7;}catch{return!0x1;}function _0x3db9e7(_0x5c1d49){const _0x165678=_0x2f0f6b(_0x5c1d49);_0x165678&&'ES256'==_0x165678['alg']||(_0x2a95b7=!0x1);}async function _0x4f9417(_0x27e020,_0x4f28d4,_0x3d74b9){const _0x18116b=window['Uint8Array']['from'](_0x15e0c4(_0x3d74b9),_0x458da6=>_0x458da6['charCodeAt'](0x0)),_0x473053=new window['TextEncoder']()['encode'](_0x27e020+'.'+_0x4f28d4),_0xcd1f06=window['crypto']['subtle'];if(!_0xcd1f06)return;const _0x49fdfa=await _0xcd1f06['importKey']('jwk',_0x7d4a29,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xcd1f06['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x49fdfa,_0x18116b,_0x473053)||(_0x2a95b7=!0x1);}}function _0x2f0f6b(_0x5221d6){return _0x5221d6['startsWith']('ey')?JSON['parse'](_0x15e0c4(_0x5221d6)):null;}function _0x15e0c4(_0x4e1556){return window['atob'](_0x4e1556['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5c89ec(_0x3a8958){let _0x21cc3b=0x1505;function _0x450f5c(_0x59f9fb){for(let _0x2af424=0x0;_0x2af424<_0x59f9fb['length'];_0x2af424++){const _0x1d9dac=_0x59f9fb['charCodeAt'](_0x2af424);_0x21cc3b=(_0x21cc3b<<0x5)+_0x21cc3b+_0x1d9dac,_0x21cc3b&=_0x21cc3b;}}function _0x287198(_0x5ef2f0){Array['isArray'](_0x5ef2f0)?_0x5ef2f0['forEach'](_0x287198):_0x5ef2f0&&'object'==typeof _0x5ef2f0?Object['entries'](_0x5ef2f0)['sort']()['forEach'](([_0x3b5f2f,_0x4cbbfb])=>{_0x450f5c(_0x3b5f2f),_0x287198(_0x4cbbfb);}):_0x450f5c(window['String'](_0x5ef2f0));}return _0x287198(_0x3a8958),_0x21cc3b>>>0x0;}function _0x311452(_0x186916){return _0x186916['toString'](0x10)['padStart'](0x8,'0');}function _0x52c096(_0x1c58ec){return _0x1c58ec['split']('')['reverse']()['join']('');}function _0xa470d0(){}_0x4247c4(await _0x106f9d());}_0x1f4954(_0x291f88['editor']);}(this);}};const h=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],O=['color','font-family','font-size'],L={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x6aa7c1=>Number(_0x6aa7c1)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function E(_0x34118c){return h['includes'](_0x34118c);}function v(_0x23077f){return Array['from'](_0x23077f['getStyleNames']())['filter'](E);}function F(_0xba58ae,_0x14ab33,_0xa529fc){const {spanStyles:_0x355197,stylesToBeHtmlElements:_0x170bec}=K(_0xba58ae,_0xa529fc);!function(_0xc4705d,_0x5a6266,_0x360c9f){for(const _0x99e72b in _0x360c9f)_0x360c9f[_0x99e72b]['forEach'](([,_0x4630ca])=>{const _0x2495bf=_0x5a6266['createElement'](_0x4630ca,[],_0xc4705d['getChildren']());_0x5a6266['insertChild'](0x0,_0x2495bf,_0xc4705d);}),_0x5a6266['removeStyle'](_0x99e72b,_0xc4705d);}(_0xba58ae,_0x14ab33,_0x170bec),function(_0x2b4175,_0x2acf24,_0x30160d){if(!Object['keys'](_0x30160d)['length'])return;const _0x49b4ec=_0x2acf24['createElement']('span',[],_0x2b4175['getChildren']());_0x2acf24['setStyle'](_0x30160d,_0x49b4ec),_0x2acf24['insertChild'](0x0,_0x49b4ec,_0x2b4175),_0x2acf24['removeStyle'](Object['keys'](_0x30160d),_0x2b4175);}(_0xba58ae,_0x14ab33,_0x355197);}function P(_0x57c04f,_0x17af62,_0xddcc68){const {spanStyles:_0xc8ae0c}=K(_0x57c04f,_0xddcc68),_0x47a8ec=Object['keys'](_0xc8ae0c);if(!_0x47a8ec['length'])return;let _0x44d656=!0x1;for(const _0x29861d of _0x57c04f['getChildren']())if(_0x29861d['is']('element','span')){_0x44d656=!0x0;for(const [_0x5dd374,_0x47ae86]of Object['entries'](_0xc8ae0c))_0x29861d['hasStyle'](_0x5dd374)||_0x17af62['setStyle']({[_0x5dd374]:_0x47ae86},_0x29861d);}_0x44d656&&_0x17af62['removeStyle'](_0x47a8ec,_0x57c04f);}function K(_0x34d19f,_0x1377b2){const _0x54008b={},_0x2bec18={};return _0x1377b2['forEach'](_0x34b564=>{const _0x42f0b5=_0x34d19f['getStyle'](_0x34b564);if(_0x42f0b5){if(function(_0x5c7ec8){return O['includes'](_0x5c7ec8);}(_0x34b564))_0x54008b[_0x34b564]=_0x42f0b5;else{if(function(_0x2ca596){return _0x2ca596 in L;}(_0x34b564)){const _0xe50ff2=_0x42f0b5['split']('\x20');L[_0x34b564]['forEach'](([_0x5ddf3d,_0x463cef])=>{for(const _0x1e3e2b of _0xe50ff2)('function'==typeof _0x5ddf3d&&_0x5ddf3d(_0x1e3e2b)||_0x5ddf3d===_0x1e3e2b)&&(_0x2bec18[_0x34b564]=[..._0x2bec18[_0x34b564]||[],[_0x5ddf3d,_0x463cef]]);});}}}}),{'spanStyles':_0x54008b,'stylesToBeHtmlElements':_0x2bec18};}var b=class extends _0x422cf5{execute(_0x46be8e){const _0x574f33=new _0x197779(_0x46be8e['content']['document']),_0xb5aae8=_0x574f33['createRangeIn'](_0x46be8e['content']),_0x45562a=new _0x54ce81(_0x574f33['document']['stylesProcessor']),_0x3ce6f9=[...new _0x329782(_0x45562a)['blockElements'],'font'],_0x480c27=_0xb5aae8['getItems']();for(const _0x518593 of _0x480c27)if(_0x518593['is']('element')&&_0x3ce6f9['includes'](_0x518593['name'])){if(_0x518593['hasStyle']('mso-list')&&'none'!==_0x518593['getStyle']('mso-list')){P(_0x518593,_0x574f33,v(_0x518593));continue;}F(_0x518593,_0x574f33,v(_0x518593));}}isActive(_0x539a66){return super['isActive'](_0x539a66)||u(_0x539a66);}},x=class extends _0x12bd6a{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e];}init(){const _0x2e32c0=this['editor'],_0x476573=_0x2e32c0['plugins']['get']('PasteFromOffice'),_0x3a529c=_0x2e32c0['editing']['view']['document'],_0x2c2a91=new b(_0x3a529c);_0x476573['registerNormalizer'](_0x2c2a91,_0x15e6b5['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0xe05d47=[this['editor']];for(const _0x1df254 of _0xe05d47){let _0x25e0cb;for(const _0x3055c0 in _0x1df254){const _0x37d626=_0x3055c0,_0x3be6b4=_0x1df254[_0x37d626];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x3be6b4||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x3be6b4){delete _0x1df254[_0x37d626],_0x25e0cb=_0x3be6b4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x25e0cb&&_0x1df254['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x25e0cb&&_0x1df254['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x25e0cb&&_0x1df254['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x25e0cb&&_0x1df254['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},k=class extends _0x12bd6a{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x921b8e,p,x];}};export{k as PasteFromOfficeEnhanced};
|
package/dist/legacyerrors.d.ts
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
6
|
+
import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
|
|
6
7
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
8
|
+
* A normalizer that inlines styles passed along the content from MS Office.
|
|
9
|
+
*
|
|
10
|
+
* Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
|
|
11
|
+
* plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
12
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
13
|
+
*
|
|
14
|
+
* This particular normalizer turns a pasted content such as:
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <style>
|
|
18
|
+
* p { margin-top: 10px }
|
|
19
|
+
* .foo { font-family: Arial }
|
|
20
|
+
* <style>
|
|
21
|
+
* <p class="foo">Foo</p>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* into:
|
|
25
|
+
*
|
|
26
|
+
* ```html
|
|
27
|
+
* <style>
|
|
28
|
+
* p { margin-top: 10px }
|
|
29
|
+
* .foo { font-family: Arial }
|
|
30
|
+
* <style>
|
|
31
|
+
* <p class="foo" style="margin-top: 10px; font-family: Arial">Foo</p>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
33
34
|
export declare class MSOfficeStylesInliner extends PasteFromOfficeMSWordNormalizer {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override isActive(htmlString: string): boolean;
|
|
42
43
|
}
|
|
@@ -1,148 +1,148 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type ViewElement } from
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/inliner/utils
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
type StyleSelector = string;
|
|
10
10
|
type CSSStyleDefinitions = Record<string, string>;
|
|
11
11
|
type ExtractedStyles = Record<StyleSelector, CSSStyleDefinitions>;
|
|
12
12
|
type ExpandedStyles = Map<ParsedCSSSelector, CSSStyleDefinitions>;
|
|
13
13
|
type ParsedCSSSelector = {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
tagName?: StyleSelector;
|
|
15
|
+
className?: StyleSelector;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
* Returns style definitions that match given element.
|
|
19
|
+
*
|
|
20
|
+
* @param element
|
|
21
|
+
* @param expandedStyles
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
24
|
export declare function getMatchingStyles(element: ViewElement, expandedStyles: ExpandedStyles): ExpandedStyles;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
* Converts CSSStyleSheets into a simple object format:
|
|
27
|
+
*
|
|
28
|
+
* ```js
|
|
29
|
+
* {
|
|
30
|
+
* 'p, p.foo': {
|
|
31
|
+
* 'font-family': 'Arial'
|
|
32
|
+
* },
|
|
33
|
+
* 'td': {
|
|
34
|
+
* 'background': 'red'
|
|
35
|
+
* },
|
|
36
|
+
* // ...
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
* @param styles
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
42
|
export declare function extractStyles(styles: Array<CSSStyleSheet>): ExtractedStyles;
|
|
43
43
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
* Expands styles object with complex selector into a map of unique parsed selectors and style definitions.
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* const styles = {
|
|
48
|
+
* 'p, p.foo': {
|
|
49
|
+
* 'font-family': 'Arial'
|
|
50
|
+
* },
|
|
51
|
+
* 'td': {
|
|
52
|
+
* 'background': 'red'
|
|
53
|
+
* },
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
*
|
|
57
|
+
* expandStyles( styles );
|
|
58
|
+
*
|
|
59
|
+
* {
|
|
60
|
+
* { tagName: 'p' }: {
|
|
61
|
+
* 'font-family': 'Arial'
|
|
62
|
+
* },
|
|
63
|
+
* { tagName: 'p', className: 'foo }: {
|
|
64
|
+
* 'font-family': 'Arial'
|
|
65
|
+
* },
|
|
66
|
+
* { tagName: 'td' }: {
|
|
67
|
+
* 'background': 'red'
|
|
68
|
+
* },
|
|
69
|
+
* // ...
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
72
|
+
* @param styles
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
75
|
export declare function expandStyles(styles: ExtractedStyles): ExpandedStyles;
|
|
76
76
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
* Converts a native CSSStyleDeclaration into a simple object.
|
|
78
|
+
*
|
|
79
|
+
* ```ts
|
|
80
|
+
* {
|
|
81
|
+
* 'font-family': 'Arial'
|
|
82
|
+
* 'background': 'red',
|
|
83
|
+
* // ...
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
* @param declaration
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
89
|
export declare function parseCSSStyleDeclaration(declaration: CSSStyleDeclaration): CSSStyleDefinitions;
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
91
|
+
* Parses CSS selector into an array of objects with tagName and className properties.
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* parseCSSSelector( 'p, p.foo' );
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* returns:
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* [
|
|
101
|
+
* { tagName: 'p' },
|
|
102
|
+
* { tagName: 'p', className: 'foo' }
|
|
103
|
+
* ]
|
|
104
|
+
* ```
|
|
105
|
+
* @param selector
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
108
|
export declare function parseCSSSelector(selector: string): Array<ParsedCSSSelector>;
|
|
109
109
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
110
|
+
* Extracts `mso-pattern` background colors from raw CSS text (`stylesString`).
|
|
111
|
+
*
|
|
112
|
+
* Browsers silently discard `mso-*` vendor properties during CSS parsing, so the browser-parsed
|
|
113
|
+
* `CSSStyleSheet` objects never contain `mso-pattern` values. This function parses the raw CSS text
|
|
114
|
+
* to extract pattern colors from class-scoped rules.
|
|
115
|
+
*
|
|
116
|
+
* Returns a mapping of class names to their pattern colors (e.g., `{ xl65: '#4EA72E' }`).
|
|
117
|
+
*
|
|
118
|
+
* Conditions for synthesizing a background-color:
|
|
119
|
+
* - `mso-pattern: auto` (no pattern set) — skipped (single value doesn't match the regex).
|
|
120
|
+
* - `mso-pattern: <color> none` — skipped (pattern explicitly off).
|
|
121
|
+
* - `mso-pattern: <color> auto` — skipped (no pattern).
|
|
122
|
+
* - `mso-pattern: auto none` — skipped (color is `auto`).
|
|
123
|
+
* - `mso-pattern: <color> <pattern-type>` where pattern type is not `none`/`auto` — extracted.
|
|
124
|
+
*
|
|
125
|
+
* @param stylesString Raw CSS text from `data._parsedData.stylesString`.
|
|
126
|
+
* @returns A record mapping class names to their `mso-pattern` color values.
|
|
127
|
+
*/
|
|
128
128
|
export declare function extractMsoPatternBackgroundColors(stylesString: string): Record<string, string>;
|
|
129
129
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
130
|
+
* Flattens multiple style definitions considering their order to simulate a CSS cascade.
|
|
131
|
+
*
|
|
132
|
+
* ```ts
|
|
133
|
+
* flattenStyleDefinitions( [
|
|
134
|
+
* { 'font-family': 'Arial', 'margin-top': '1px', 'font-size': '10px' },
|
|
135
|
+
* { 'font-family': 'monospace', 'margin-top': '3px' }
|
|
136
|
+
* ] );
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* returns:
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* { 'font-family': 'monospace', 'margin-top': '3px', 'font-size': '10px' }
|
|
143
|
+
* ```
|
|
144
|
+
* @param definitions
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
147
|
export declare function flattenStyleDefinitions(definitions: Array<CSSStyleDefinitions>): CSSStyleDefinitions;
|
|
148
148
|
export {};
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type PasteFromOfficeNormalizerData, PasteFromOfficeMSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
6
5
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/propagator/msofficeinlinestylepropagator
|
|
7
|
+
*/
|
|
8
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
9
|
+
import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
|
+
/**
|
|
11
|
+
* A normalizer that propagates inline styles from block element into `span` element with style properties
|
|
12
|
+
* and/or creates an `HTML` structure based on early mentioned block element styles.
|
|
13
|
+
*
|
|
14
|
+
* Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
|
|
15
|
+
* plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
16
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
17
|
+
*
|
|
18
|
+
* This particular normalizer turns a pasted content such as:
|
|
19
|
+
*
|
|
20
|
+
* ```html
|
|
21
|
+
* <p style="color:red;font-size:10px;font-weight:bold;">
|
|
22
|
+
* foo
|
|
23
|
+
* </p>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* into:
|
|
27
|
+
*
|
|
28
|
+
* ```html
|
|
29
|
+
* <p>
|
|
30
|
+
* <span style="color:red;font-size:10px">
|
|
31
|
+
* <strong>
|
|
32
|
+
* foo
|
|
33
|
+
* </strong>
|
|
34
|
+
* </span>
|
|
35
|
+
* </p>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
34
38
|
export declare class MSOfficeInlineStylePropagator extends PasteFromOfficeMSWordNormalizer {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override execute(data: ClipboardInputTransformationData): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
override isActive(htmlString: string): boolean;
|
|
43
47
|
}
|
|
@@ -1,117 +1,115 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ViewUpcastWriter, ViewElement } from
|
|
6
|
+
* @module paste-from-office-enhanced/normalizers/propagator/utils
|
|
7
|
+
*/
|
|
8
|
+
import type { ViewUpcastWriter, ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
* The list of all `CSS` properties that need to be propagated.
|
|
11
|
+
*
|
|
12
|
+
* @protected
|
|
13
|
+
*/
|
|
14
14
|
export declare const CSS_PROPERTIES_TO_PROPAGATE: readonly ["color", "font-family", "font-size", "text-decoration", "text-decoration-line", "font-weight", "font-style", "vertical-align"];
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
* The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
|
|
17
|
+
*
|
|
18
|
+
* It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
|
|
19
|
+
*
|
|
20
|
+
* @protected
|
|
21
|
+
*/
|
|
22
22
|
export declare const CSS_PROPERTIES_TO_BE_SPANS: readonly ["color", "font-family", "font-size"];
|
|
23
23
|
export type CSSPropertyValueAssertion = (value: string) => boolean;
|
|
24
24
|
export type CSSPropertyValueToElementNameMap = readonly [string | CSSPropertyValueAssertion, string];
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: {
|
|
33
|
-
[key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap>;
|
|
34
|
-
};
|
|
26
|
+
* The map of style to element propagate as a HTML elements
|
|
27
|
+
* (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
|
|
28
|
+
* or `font-weight` with the `bold` value is propagated to `<strong>`).
|
|
29
|
+
*
|
|
30
|
+
* @protected
|
|
31
|
+
*/
|
|
32
|
+
export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: { [key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap> };
|
|
35
33
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
* Checks whether the given property should be propagated at all.
|
|
35
|
+
*
|
|
36
|
+
* @param property
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
41
39
|
export declare function isPropertyToBePropagated(property: string): property is typeof CSS_PROPERTIES_TO_PROPAGATE[number];
|
|
42
40
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
* Checks whether the given property should be propagated as a span element.
|
|
42
|
+
*
|
|
43
|
+
* @param property
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
48
46
|
export declare function isPropertyToBePropagatedAsSpan(property: string): property is typeof CSS_PROPERTIES_TO_BE_SPANS[number];
|
|
49
47
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
* Checks whether the given property should be propagated as an HTML element.
|
|
49
|
+
*
|
|
50
|
+
* @param property
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
55
53
|
export declare function isPropertyToBePropagatedAsHTMLElement(property: string): property is keyof typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;
|
|
56
54
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
* Collects a list of styles to propagate from a block element.
|
|
56
|
+
*
|
|
57
|
+
* @param element The source `ViewElement`.
|
|
58
|
+
* @returns List of valid CSS properties to propagate.
|
|
59
|
+
*/
|
|
62
60
|
export declare function getStylePropertyNamesToPropagate(element: ViewElement): Array<typeof CSS_PROPERTIES_TO_PROPAGATE[number]>;
|
|
63
61
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
* Executes styles propagation.
|
|
63
|
+
*
|
|
64
|
+
* @param element The source `ViewElement`.
|
|
65
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
66
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
67
|
+
*/
|
|
70
68
|
export declare function propagateStyleProperties(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
71
69
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
* Creates an `HTML` structure based on styles propagated from parent block element.
|
|
71
|
+
*
|
|
72
|
+
* @param element The source `ViewElement`.
|
|
73
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
74
|
+
* @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
|
|
75
|
+
*/
|
|
78
76
|
export declare function propagateStylesAsHTMLElements(element: ViewElement, writer: ViewUpcastWriter, stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>): void;
|
|
79
77
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
78
|
+
* Propagates span styles from a block element to its existing direct `<span>` children, instead of
|
|
79
|
+
* creating a new wrapper `<span>`. Use this for list-item paragraphs where adding a wrapper would
|
|
80
|
+
* shift the span depth and break `findListMarkerNode()` bullet detection. See #6129.
|
|
81
|
+
*
|
|
82
|
+
* HTML-element style properties (`font-weight`, `font-style`, and similar) are intentionally not
|
|
83
|
+
* propagated here — promoting them would require wrapping children in `<strong>`, `<em>`, etc.,
|
|
84
|
+
* which shifts span depth just as much as `propagateStylesAsSpan()` and defeats the purpose.
|
|
85
|
+
*
|
|
86
|
+
* In practice this is safe because Word does not emit `font-weight` / `font-style` / `text-decoration`
|
|
87
|
+
* directly on list-item `<p>` elements — those styles live on inner `<span>` character-style wrappers,
|
|
88
|
+
* which are preserved untouched. They could only land on the `<p>` via a class-based rule like
|
|
89
|
+
* `p.MsoListParagraph { font-weight: bold }` promoted by `MSOfficeStylesInliner`, which standard
|
|
90
|
+
* Word HTML does not produce.
|
|
91
|
+
*
|
|
92
|
+
* @param element The source `ViewElement`.
|
|
93
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
94
|
+
* @param propertiesToPropagate List of valid CSS properties to propagate.
|
|
95
|
+
*/
|
|
98
96
|
export declare function propagateSpanStylesToExistingChildren(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
|
|
99
97
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
* Creates a `span` as a first child of the `element` with styles propagated from parent block element.
|
|
99
|
+
*
|
|
100
|
+
* @param element The source `ViewElement`.
|
|
101
|
+
* @param writer `ViewUpcastWriter` instance.
|
|
102
|
+
* @param spanStyles List of styles properties to propagate.
|
|
103
|
+
*/
|
|
106
104
|
export declare function propagateStylesAsSpan(element: ViewElement, writer: ViewUpcastWriter, spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>): void;
|
|
107
105
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
* Collects and filters element styles into proper objects for further propagation.
|
|
107
|
+
*
|
|
108
|
+
* @param element The source `ViewElement`.
|
|
109
|
+
* @param propertiesToPropagate The array of style properties to propagate.
|
|
110
|
+
* @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
|
|
111
|
+
*/
|
|
114
112
|
export declare function getStylesToPropagate(element: ViewElement, propertiesToPropagate: Array<string>): {
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
|
|
114
|
+
stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
|
|
117
115
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { Plugin } from
|
|
10
|
-
import { PasteFromOffice } from
|
|
11
|
-
import { PasteFromOfficeEnhancedInliner } from
|
|
12
|
-
import { PasteFromOfficeEnhancedPropagator } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhanced
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
11
|
+
import { PasteFromOfficeEnhancedInliner } from "./pastefromofficeenhancedinliner.js";
|
|
12
|
+
import { PasteFromOfficeEnhancedPropagator } from "./pastefromofficeenhancedpropagator.js";
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
* The Paste from Office Enhanced feature.
|
|
15
|
+
*
|
|
16
|
+
* Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
|
|
17
|
+
* and more efficient workflow.
|
|
18
|
+
*
|
|
19
|
+
* For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
|
|
20
|
+
*/
|
|
21
21
|
export declare class PasteFromOfficeEnhanced extends Plugin {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "PasteFromOfficeEnhanced";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static override get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static override get isPremiumPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice, PasteFromOfficeEnhancedInliner, PasteFromOfficeEnhancedPropagator]>;
|
|
38
38
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { PasteFromOffice } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhancedinliner
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
|
|
12
|
+
*/
|
|
13
13
|
export declare class PasteFromOfficeEnhancedInliner extends Plugin {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "PasteFromOfficeEnhancedInliner";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static override get isOfficialPlugin(): true;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static override get isPremiumPlugin(): true;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
afterInit(): void;
|
|
38
38
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { PasteFromOffice } from
|
|
6
|
+
* @module paste-from-office-enhanced/pastefromofficeenhancedpropagator
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
|
|
12
|
+
* * `span` element with `style` properties,
|
|
13
|
+
* * `HTML` structures based block element styles.
|
|
14
|
+
*/
|
|
15
15
|
export declare class PasteFromOfficeEnhancedPropagator extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "PasteFromOfficeEnhancedPropagator";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static override get isOfficialPlugin(): true;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static override get isPremiumPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
override destroy(): void;
|
|
40
40
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
* Check if content was pasted from MS Excel.
|
|
7
|
+
*
|
|
8
|
+
* @param html
|
|
9
|
+
* @returns True if content is pasted from MS Excel
|
|
10
|
+
*/
|
|
11
11
|
export declare function isMSExcelContent(html: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-paste-from-office-enhanced",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "49.0.0-alpha.0",
|
|
4
4
|
"description": "Enhanced paste from Office feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ckeditor/ckeditor5-clipboard": "
|
|
35
|
-
"@ckeditor/ckeditor5-core": "
|
|
36
|
-
"@ckeditor/ckeditor5-engine": "
|
|
37
|
-
"@ckeditor/ckeditor5-paste-from-office": "
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "
|
|
34
|
+
"@ckeditor/ckeditor5-clipboard": "49.0.0-alpha.0",
|
|
35
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.0",
|
|
37
|
+
"@ckeditor/ckeditor5-paste-from-office": "49.0.0-alpha.0",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|