UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines 7.16 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x1a6933=_0x5592;(function(_0x49b116,_0x53d902){const _0x296c79=_0x5592,_0x138db2=_0x49b116();while(!![]){try{const _0x31eb65=parseInt(_0x296c79(0x18a))/0x1*(-parseInt(_0x296c79(0x168))/0x2)+parseInt(_0x296c79(0x16c))/0x3+parseInt(_0x296c79(0x174))/0x4+-parseInt(_0x296c79(0x16e))/0x5+-parseInt(_0x296c79(0x155))/0x6*(-parseInt(_0x296c79(0x17d))/0x7)+parseInt(_0x296c79(0x16d))/0x8*(parseInt(_0x296c79(0x170))/0x9)+parseInt(_0x296c79(0x177))/0xa*(-parseInt(_0x296c79(0x199))/0xb);if(_0x31eb65===_0x53d902)break;else _0x138db2['push'](_0x138db2['shift']());}catch(_0x33a1ab){_0x138db2['push'](_0x138db2['shift']());}}}(_0x1801,0x8633b));import{Command as _0x2fb67d}from'ckeditor5/src/core.js';function _0x1801(){const _0x5c7f91=['execute','margin_top','document.docx','data','margin_left','711629HhhJjx','get','finally','isBusy','POST','affectsData','plugins','margin_right','href','export-word-v1-api-is-deprecated','ExportWord','</div>','createElement','config','EDITOR_STYLES','319oFUULF','application/docx','footer','auto_pagination','remove','fileName','header','status','value','orientation','<div\x20class=\x22ck-content\x22\x20dir=\x22','suggestions','download','_downloadFile','42FTcUcG','margin_bottom','token','catch','click','application/json','assertive','options','function','version','Word\x20document\x20export\x20successful','comments','https://docx-converter.cke-cs.com/v2/convert/html-docx','Notification','blob','ariaLiveAnnouncer','fetch','Word\x20document\x20export\x20failed','announce','2VjeIxL','https://docx-converter.cke-cs.com/v1/convert','format','refresh','3158883kUdxTU','1227736QfUSpp','2065840JgxlvX','converterOptions','45qssadj','_token','isEnabled','stylesheets','3016180xzmwlF','set','contentLanguageDirection','408550HEwgAi','converterUrl','dataCallback','showWarning','pending','editor','284942yukAJw','URL','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.','Word\x20document\x20export\x20started','stringify','then','locale','createObjectURL'];_0x1801=function(){return _0x5c7f91;};return _0x1801();}import{logWarning as _0x18e70a,collectStylesheets as _0x2fcb85}from'ckeditor5/src/utils.js';import{getConverterOptions as _0x1d363d,getConverterOptionsV2 as _0x1d3489}from'./utils.js';import{getTranslation as _0x24c261}from'./utils/common-translations.js';const h=[_0x1a6933(0x150),_0x1a6933(0x186),_0x1a6933(0x191),_0x1a6933(0x156),_0x1a6933(0x189),_0x1a6933(0x16a),_0x1a6933(0x14d),_0x1a6933(0x149),_0x1a6933(0x160),_0x1a6933(0x152)];function _0x5592(_0x48119b,_0x386959){const _0x180100=_0x1801();return _0x5592=function(_0x559292,_0x335664){_0x559292=_0x559292-0x148;let _0x3e248c=_0x180100[_0x559292];return _0x3e248c;},_0x5592(_0x48119b,_0x386959);}export default class e extends _0x2fb67d{constructor(_0x18fe70){const _0x3ec519=_0x1a6933;super(_0x18fe70),this[_0x3ec519(0x175)](_0x3ec519(0x18d),!0x1),this[_0x3ec519(0x18f)]=!0x1;}[_0x1a6933(0x16b)](){const _0x156407=_0x1a6933;this[_0x156407(0x172)]=!this[_0x156407(0x18d)],this[_0x156407(0x14f)]=this[_0x156407(0x18d)]?_0x156407(0x17b):void 0x0;}[_0x1a6933(0x185)](_0x2fc9d2={}){const _0x38b762=_0x1a6933,_0x382449=this[_0x38b762(0x17c)],_0x336374=_0x2fc9d2[_0x38b762(0x15e)]||0x2,_0x2ad05f=0x1===_0x336374,_0x35839d=_0x2fc9d2[_0x38b762(0x178)]||(_0x2ad05f?_0x38b762(0x169):_0x38b762(0x161)),_0x513823=_0x2fc9d2[_0x38b762(0x16f)]||{},_0xfcf80d=_0x382449[_0x38b762(0x190)][_0x38b762(0x18b)](_0x38b762(0x194)),_0x1a324a=_0x2fc9d2[_0x38b762(0x157)]||_0xfcf80d[_0x38b762(0x171)],_0x58e9e6=!0x0===_0x513823[_0x38b762(0x14a)],_0x3e9bed=_0x2fc9d2[_0x38b762(0x179)]||(_0x44b527=>_0x44b527[_0x38b762(0x188)][_0x38b762(0x18b)]({'pagination':_0x58e9e6}));return 0x2===_0x336374&&function(_0x339c39){for(const _0x24c1f9 of h)if(void 0x0!==_0x339c39[_0x24c1f9])return!0x0;return!0x1;}(_0x513823)&&_0x18e70a(_0x38b762(0x193)),this[_0x38b762(0x18d)]=!0x0,this[_0x38b762(0x16b)](),_0x2fcb85(_0x2fc9d2[_0x38b762(0x173)]||[_0x38b762(0x198)])[_0x38b762(0x182)](async _0x4e978c=>{const _0x2dba17=_0x38b762;_0x382449['ui'][_0x2dba17(0x164)][_0x2dba17(0x167)](_0x24c261(_0x382449[_0x2dba17(0x183)],_0x2dba17(0x180)));const _0x3e6de1=await _0x3e9bed(_0x382449),_0x4edc61={'html':_0x2dba17(0x151)+_0x382449[_0x2dba17(0x183)][_0x2dba17(0x176)]+'\x22>'+_0x3e6de1+_0x2dba17(0x195),'css':_0x4e978c,[_0x2ad05f?_0x2dba17(0x15c):_0x2dba17(0x197)]:{..._0x513823,..._0x2ad05f?_0x1d363d(_0x382449,_0x513823):_0x1d3489(_0x382449,_0x513823)}},_0x22dde6={'method':_0x2dba17(0x18e),'headers':{'Content-Type':_0x2dba17(0x15a),'Accept':_0x2dba17(0x148),..._0x1a324a?{'Authorization':_0x1a324a[_0x2dba17(0x14f)]}:null},'body':JSON[_0x2dba17(0x181)](_0x4edc61)};return window[_0x2dba17(0x165)](_0x35839d,_0x22dde6)[_0x2dba17(0x182)](_0x4630a9=>{const _0x1510f3=_0x2dba17;if(0xc8!==_0x4630a9[_0x1510f3(0x14e)])throw _0x4630a9;return _0x4630a9[_0x1510f3(0x163)]();})[_0x2dba17(0x182)](_0x45de50=>{const _0x433f02=_0x2dba17;_0x382449['ui'][_0x433f02(0x164)][_0x433f02(0x167)](_0x24c261(_0x382449[_0x433f02(0x183)],_0x433f02(0x15f)));const _0x5e9c13=_0x433f02(0x15d)==typeof _0x2fc9d2[_0x433f02(0x14c)]?_0x2fc9d2[_0x433f02(0x14c)]():_0x2fc9d2[_0x433f02(0x14c)];this[_0x433f02(0x154)](_0x45de50,_0x5e9c13||_0x433f02(0x187));});})[_0x38b762(0x158)](_0x244a65=>{const _0x595fe4=_0x38b762,_0x2be824=_0x382449[_0x595fe4(0x190)][_0x595fe4(0x18b)](_0x595fe4(0x162));throw _0x382449['ui'][_0x595fe4(0x164)][_0x595fe4(0x167)](_0x24c261(_0x382449[_0x595fe4(0x183)],_0x595fe4(0x166)),{'politeness':_0x595fe4(0x15b)}),_0x2be824[_0x595fe4(0x17a)](_0x24c261(_0x382449[_0x595fe4(0x183)],_0x595fe4(0x17f))),_0x244a65;})[_0x38b762(0x18c)](()=>{const _0xc923bd=_0x38b762;this[_0xc923bd(0x18d)]=!0x1,this[_0xc923bd(0x16b)]();});}[_0x1a6933(0x154)](_0x151de4,_0x55d32b){const _0x4618f2=_0x1a6933,_0x23a8f0=document[_0x4618f2(0x196)]('a');_0x23a8f0[_0x4618f2(0x192)]=window[_0x4618f2(0x17e)][_0x4618f2(0x184)](_0x151de4),_0x23a8f0[_0x4618f2(0x153)]=_0x55d32b,_0x23a8f0[_0x4618f2(0x159)](),_0x23a8f0[_0x4618f2(0x14b)]();}}