@ckeditor/ckeditor5-export-pdf
Version:
Export to PDF feature for CKEditor 5.
23 lines • 8.15 kB
JavaScript
/*
* 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 _0x374def=_0x246a;(function(_0x56500c,_0x9efc9){const _0xb1d000=_0x246a,_0xc4bc2c=_0x56500c();while(!![]){try{const _0x237f2c=parseInt(_0xb1d000(0xe1))/0x1*(parseInt(_0xb1d000(0xd4))/0x2)+-parseInt(_0xb1d000(0xfc))/0x3*(parseInt(_0xb1d000(0x111))/0x4)+parseInt(_0xb1d000(0x118))/0x5*(parseInt(_0xb1d000(0xde))/0x6)+-parseInt(_0xb1d000(0xf3))/0x7*(parseInt(_0xb1d000(0xec))/0x8)+-parseInt(_0xb1d000(0xff))/0x9*(parseInt(_0xb1d000(0x104))/0xa)+parseInt(_0xb1d000(0xe0))/0xb+parseInt(_0xb1d000(0xd1))/0xc;if(_0x237f2c===_0x9efc9)break;else _0xc4bc2c['push'](_0xc4bc2c['shift']());}catch(_0x552573){_0xc4bc2c['push'](_0xc4bc2c['shift']());}}}(_0x67cd,0x41845));import{Command as _0x5a7848}from'ckeditor5/src/core.js';import{collectStylesheets as _0x69c34e}from'ckeditor5/src/utils.js';import{getTranslation as _0x16a073}from'./utils/common-translations.js';function _0x246a(_0x1c73dd,_0x22e9d){const _0x67cdf7=_0x67cd();return _0x246a=function(_0x246aaa,_0x40d776){_0x246aaa=_0x246aaa-0xca;let _0x1db271=_0x67cdf7[_0x246aaa];return _0x1db271;},_0x246a(_0x1c73dd,_0x22e9d);}export default class i extends _0x5a7848{constructor(_0x481ec8){const _0x22538f=_0x246a;super(_0x481ec8),this[_0x22538f(0x117)](_0x22538f(0xd8),!0x1),this[_0x22538f(0xd7)]=!0x1;}[_0x374def(0xca)](){const _0x3c7ca6=_0x374def;this[_0x3c7ca6(0xf9)]=!this[_0x3c7ca6(0xd8)],this[_0x3c7ca6(0xce)]=this[_0x3c7ca6(0xd8)]?_0x3c7ca6(0x119):void 0x0;}[_0x374def(0x108)](_0x2c4f66={}){const _0x4defae=_0x374def,_0x4ab721=this[_0x4defae(0xdc)],_0x2fa84c=_0x2c4f66[_0x4defae(0x116)]||_0x4defae(0xfb),_0x485411=_0x2c4f66[_0x4defae(0xe3)]||(_0x189e99=>_0x189e99[_0x4defae(0xcc)][_0x4defae(0xdb)]()),_0x625ea8=_0x4ab721[_0x4defae(0xee)][_0x4defae(0xdb)](_0x4defae(0xe6)),_0x6c5d79=_0x2c4f66[_0x4defae(0xf2)]||_0x625ea8[_0x4defae(0xfa)];return this[_0x4defae(0xd8)]=!0x0,this[_0x4defae(0xca)](),_0x69c34e(_0x2c4f66[_0x4defae(0xda)]||[_0x4defae(0xf7)])[_0x4defae(0xfe)](async _0x424053=>{const _0x237247=_0x4defae;if(_0x4ab721['ui'][_0x237247(0xd3)][_0x237247(0xd6)](_0x16a073(_0x4ab721[_0x237247(0xcd)],_0x237247(0xd0))),_0x4ab721[_0x237247(0xee)][_0x237247(0x100)](_0x237247(0x10b))){_0x2c4f66[_0x237247(0x105)]||(_0x2c4f66[_0x237247(0x105)]={});const _0x1f8f7b=_0x4ab721[_0x237247(0xee)][_0x237247(0xdb)](_0x237247(0x10d)),_0x1ddccf=_0x1f8f7b[_0x237247(0xea)],{prefix:_0x1b1a54,suffix:_0x532860}=_0x4ab721[_0x237247(0x11c)][_0x237247(0xdb)](_0x237247(0x103)),_0x16ee62=_0x237247(0x101),_0x55705d={'prefix':_0x1b1a54,'suffix':_0x532860,'data':{}};if(_0x237247(0x120)===_0x1ddccf){for(const _0x228333 of _0x1f8f7b[_0x237247(0x11a)]())_0x237247(0xfd)===_0x1f8f7b[_0x237247(0xf8)](_0x228333)?_0x55705d[_0x237247(0xcc)][_0x228333]=_0x16ee62:_0x55705d[_0x237247(0xcc)][_0x228333]=_0x1f8f7b[_0x237247(0x109)](_0x1f8f7b[_0x237247(0xd2)](_0x228333)||_0x228333);}else{const _0x35303f=_0x237247(0xcf)===_0x1ddccf?_0x1f8f7b[_0x237247(0xf4)]():_0x1f8f7b[_0x237247(0x110)](_0x1ddccf,!0x0);for(const _0x3e5cb4 of Object[_0x237247(0x10a)](_0x35303f)){const [_0x24d7e9,_0x43d21e]=_0x3e5cb4;_0x237247(0xfd)===_0x1f8f7b[_0x237247(0xf8)](_0x24d7e9)?_0x55705d[_0x237247(0xcc)][_0x24d7e9]=null!==_0x43d21e?_0x43d21e:_0x16ee62:_0x55705d[_0x237247(0xcc)][_0x24d7e9]=null!==_0x43d21e?_0x43d21e:_0x1f8f7b[_0x237247(0xd2)](_0x24d7e9)||_0x24d7e9;}}_0x2c4f66[_0x237247(0x105)][_0x237247(0x114)]=_0x55705d;}const _0x125b4a={'html':_0x237247(0xeb)+_0x4ab721[_0x237247(0xcd)][_0x237247(0xef)]+_0x237247(0x10c)+await _0x485411(_0x4ab721)+_0x237247(0xe7),'css':_0x424053,'options':_0x2c4f66[_0x237247(0x105)]},_0xe1b009={'method':_0x237247(0xed),'headers':{'Content-Type':_0x237247(0x106),'Accept':_0x237247(0xf1),..._0x6c5d79?{'Authorization':_0x6c5d79[_0x237247(0xce)]}:null,'x-cs-app-id':_0x2c4f66[_0x237247(0x11b)]||_0x237247(0x115)},'body':JSON[_0x237247(0xe8)](_0x125b4a)};return window[_0x237247(0x10f)](_0x2fa84c,_0xe1b009)[_0x237247(0xfe)](_0x5cd2be=>{const _0x34a981=_0x237247;if(0xc8!==_0x5cd2be[_0x34a981(0xd5)])throw _0x5cd2be;return _0x5cd2be[_0x34a981(0x11e)]();})[_0x237247(0xfe)](_0x2f828b=>{const _0x150a20=_0x237247;_0x4ab721['ui'][_0x150a20(0xd3)][_0x150a20(0xd6)](_0x16a073(_0x4ab721[_0x150a20(0xcd)],_0x150a20(0x107)));const _0x556277=_0x150a20(0xe4)==typeof _0x2c4f66[_0x150a20(0x10e)]?_0x2c4f66[_0x150a20(0x10e)]():_0x2c4f66[_0x150a20(0x10e)];this[_0x150a20(0xcb)](_0x2f828b,_0x556277||_0x150a20(0xe9));});})[_0x4defae(0x11d)](_0x445aea=>{const _0x1748f6=_0x4defae,_0x397b2b=_0x4ab721[_0x1748f6(0xee)][_0x1748f6(0xdb)](_0x1748f6(0xe5));throw _0x4ab721['ui'][_0x1748f6(0xd3)][_0x1748f6(0xd6)](_0x16a073(_0x4ab721[_0x1748f6(0xcd)],_0x1748f6(0xdd)),{'politeness':_0x1748f6(0xd9)}),_0x397b2b[_0x1748f6(0xe2)](_0x16a073(_0x4ab721[_0x1748f6(0xcd)],_0x1748f6(0xf0))),_0x445aea;})[_0x4defae(0x11f)](()=>{const _0x728c64=_0x4defae;this[_0x728c64(0xd8)]=!0x1,this[_0x728c64(0xca)]();});}[_0x374def(0xcb)](_0x573615,_0x194a49){const _0x5c7807=_0x374def,_0x1f5e08=document[_0x5c7807(0xf6)]('a');_0x1f5e08[_0x5c7807(0xf5)]=window[_0x5c7807(0xdf)][_0x5c7807(0x113)](_0x573615),_0x1f5e08[_0x5c7807(0x102)]=_0x194a49,_0x1f5e08[_0x5c7807(0x112)](),_0x1f5e08[_0x5c7807(0x121)]();}}function _0x67cd(){const _0x1fe3a3=['\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>','stringify','document.pdf','previewMode','<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22','3064Hgcecj','POST','plugins','contentLanguageDirection','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.','application/pdf','token','8456EeRJhH','getDefaultValues','href','createElement','EDITOR_STYLES','getMergeFieldType','isEnabled','_token','https://pdf-converter.cke-cs.com/v1/convert/','489249YQQhcU','image','then','36obkcSF','has','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','download','mergeFields','833880BkGFnN','converterOptions','application/json','PDF\x20export\x20successful','execute','wrapInAffixes','entries','MergeFields','\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09','MergeFieldsEditing','fileName','fetch','getDataSetValues','4BCbKnq','click','createObjectURL','merge_fields','cke5','converterUrl','set','5LricYh','pending','getMergeFieldsIds','appID','config','catch','blob','finally','$labels','remove','refresh','_downloadFile','data','locale','value','$defaultValues','PDF\x20export\x20started','5326896okIIhA','getLabel','ariaLiveAnnouncer','2nUjubT','status','announce','affectsData','isBusy','assertive','stylesheets','get','editor','PDF\x20export\x20failed','2299524xCgbIe','URL','3231349TZYBZj','106735nrsoEg','showWarning','dataCallback','function','Notification','ExportPdf'];_0x67cd=function(){return _0x1fe3a3;};return _0x67cd();}