UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines • 8.5 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ (function(_0x5b3fd5,_0x1555bf){const _0x4dd315=_0x4253,_0xc88a02=_0x5b3fd5();while(!![]){try{const _0x84bb2e=parseInt(_0x4dd315(0x1ec))/0x1+parseInt(_0x4dd315(0x1d8))/0x2+-parseInt(_0x4dd315(0x1e6))/0x3+-parseInt(_0x4dd315(0x1f0))/0x4*(parseInt(_0x4dd315(0x1e0))/0x5)+-parseInt(_0x4dd315(0x1e3))/0x6+parseInt(_0x4dd315(0x1fb))/0x7*(-parseInt(_0x4dd315(0x1de))/0x8)+-parseInt(_0x4dd315(0x1e2))/0x9*(-parseInt(_0x4dd315(0x1e5))/0xa);if(_0x84bb2e===_0x1555bf)break;else _0xc88a02['push'](_0xc88a02['shift']());}catch(_0x1770db){_0xc88a02['push'](_0xc88a02['shift']());}}}(_0xe093,0x7b1de));export function getConverterOptions(_0x464f6e,_0x9026b6={}){const _0x1208f5=_0x4253,_0x14075e=_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1db)](_0x1208f5(0x200)),_0x7ddc26=_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1db)](_0x1208f5(0x1cf)),_0x53397d=_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1db)](_0x1208f5(0x1fa)),_0x5131a8=_0x9026b6;if(_0x14075e&&_0x7ddc26){const _0x1ca8fa=getComments(_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1d3)](_0x1208f5(0x1cf))[_0x1208f5(0x1d0)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x1208f5(0x1d5)](_0x1ca8fa)[_0x1208f5(0x1d1)]&&(_0x5131a8[_0x1208f5(0x1f5)]=_0x1ca8fa);}if(_0x14075e&&_0x53397d){const _0x3cd9ee=_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1d3)](_0x1208f5(0x1fa)),_0x42f9ae=_0x464f6e[_0x1208f5(0x1d9)][_0x1208f5(0x1d3)](_0x1208f5(0x200)),_0x349bb6=getSuggestions(_0x3cd9ee[_0x1208f5(0x1d2)]({'toJSON':!0x0}),_0x42f9ae[_0x1208f5(0x1fd)]);Object[_0x1208f5(0x1d5)](_0x349bb6)[_0x1208f5(0x1d1)]&&(_0x5131a8[_0x1208f5(0x1d7)]=_0x349bb6);}return(_0x5131a8[_0x1208f5(0x1d7)]||_0x5131a8[_0x1208f5(0x1f5)])&&(_0x5131a8[_0x1208f5(0x1d6)]=new Intl[(_0x1208f5(0x1f6))]()[_0x1208f5(0x1dc)]()[_0x1208f5(0x1d4)]),_0x5131a8;}function _0x4253(_0x5713c8,_0x1453cb){const _0xe09390=_0xe093();return _0x4253=function(_0x4253da,_0x3e383e){_0x4253da=_0x4253da-0x1c9;let _0x445208=_0xe09390[_0x4253da];return _0x445208;},_0x4253(_0x5713c8,_0x1453cb);}export function getComments(_0x2b2d09){const _0x298e96=_0x4253,_0x321ee5={};if(!_0x2b2d09[_0x298e96(0x1d1)])return _0x321ee5;for(const _0x1e4926 of _0x2b2d09)_0x1e4926[_0x298e96(0x1f5)][_0x298e96(0x201)](_0x338d8b=>{const _0xf6cf61=_0x298e96;void 0x0===_0x321ee5[_0x1e4926['id']]&&(_0x321ee5[_0x1e4926['id']]=[]),_0x321ee5[_0x1e4926['id']][_0xf6cf61(0x1fe)]({'author':_0x338d8b[_0xf6cf61(0x1e9)][_0xf6cf61(0x1ce)],'content':_0x338d8b[_0xf6cf61(0x1f4)],'created':_0x338d8b[_0xf6cf61(0x1f3)],'is_resolved':_0x1e4926[_0xf6cf61(0x1e8)]});});return _0x321ee5;}export function getSuggestions(_0x4723de,_0x18b71d){const _0x304499=_0x4253,_0x49ec85={};if(!_0x4723de[_0x304499(0x1d1)]||!_0x18b71d[_0x304499(0x1d1)])return _0x49ec85;for(const {id:_0x39ea91,createdAt:_0x18287a,authorId:_0x107cb,attributes:_0x26393c}of _0x4723de){const _0x3c186=_0x26393c&&_0x26393c[_0x304499(0x1ed)],_0x439cf1=_0x3c186?_0x3c186[_0x304499(0x1f1)]:_0x18b71d[_0x304499(0x1d3)](_0x107cb)[_0x304499(0x1ce)];_0x49ec85[_0x39ea91]={'author':_0x439cf1,'created':_0x18287a};}return _0x49ec85;}export function getConverterOptionsV2(_0x493031,_0x37167b={}){const _0x459743=_0x4253,_0x1325be=_0x493031[_0x459743(0x1d9)][_0x459743(0x1db)](_0x459743(0x200)),_0x22ba02=_0x493031[_0x459743(0x1d9)][_0x459743(0x1db)](_0x459743(0x1cf)),_0x6e1269=_0x493031[_0x459743(0x1d9)][_0x459743(0x1db)](_0x459743(0x1fa)),_0x33c9ba=_0x493031[_0x459743(0x1d9)][_0x459743(0x1db)](_0x459743(0x1cb)),_0x5e2b30=_0x493031[_0x459743(0x1cc)][_0x459743(0x1df)],_0x45ba76=_0x37167b,_0xe35f98={};if(_0x45ba76[_0x459743(0x202)]=_0x45ba76[_0x459743(0x202)]||{},_0x45ba76[_0x459743(0x202)][_0x459743(0x1f9)]=_0x45ba76[_0x459743(0x202)][_0x459743(0x1f9)]||_0x5e2b30,_0x1325be&&_0x22ba02){const _0x151928=getCommentsV2(_0x493031[_0x459743(0x1d9)][_0x459743(0x1d3)](_0x459743(0x1cf))[_0x459743(0x1d0)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));_0x151928[_0x459743(0x1d1)]&&(_0xe35f98[_0x459743(0x1e7)]=_0x151928);}if(_0x1325be&&_0x6e1269){const _0x16517c=_0x493031[_0x459743(0x1d9)][_0x459743(0x1d3)](_0x459743(0x1fa)),_0x1bb9fa=_0x493031[_0x459743(0x1d9)][_0x459743(0x1d3)](_0x459743(0x200)),_0x4b2295=getSuggestionsV2(_0x16517c[_0x459743(0x1d2)]({'toJSON':!0x0}),_0x1bb9fa[_0x459743(0x1fd)]);_0x4b2295[_0x459743(0x1d1)]&&(_0xe35f98[_0x459743(0x1d7)]=_0x4b2295);}if(_0x33c9ba){const _0x5ca761=_0x493031[_0x459743(0x1d9)][_0x459743(0x1d3)](_0x459743(0x1ee)),_0x536d0d=_0x5ca761[_0x459743(0x1c9)],{prefix:_0xf002ca,suffix:_0x472099}=_0x493031[_0x459743(0x1ff)][_0x459743(0x1d3)](_0x459743(0x1cd));if(_0x45ba76[_0x459743(0x1ef)]={'prefix':_0xf002ca,'suffix':_0x472099},_0x459743(0x1f7)!==_0x536d0d){_0x45ba76[_0x459743(0x1ef)][_0x459743(0x1f2)]={};const _0x22f329=_0x459743(0x1eb),_0x3fd8d7=_0x459743(0x1e1)===_0x536d0d?_0x5ca761[_0x459743(0x1ea)]():_0x5ca761[_0x459743(0x1da)](_0x536d0d,!0x0);for(const _0x356d55 of Object[_0x459743(0x1ca)](_0x3fd8d7)){const [_0x18a02b,_0x2f316d]=_0x356d55;_0x459743(0x1f8)===_0x5ca761[_0x459743(0x1dd)](_0x18a02b)?_0x45ba76[_0x459743(0x1ef)][_0x459743(0x1f2)][_0x18a02b]=null!==_0x2f316d?_0x2f316d:_0x22f329:_0x45ba76[_0x459743(0x1ef)][_0x459743(0x1f2)][_0x18a02b]=null!==_0x2f316d?_0x2f316d:_0x5ca761[_0x459743(0x1e4)](_0x18a02b)||_0x18a02b;}}}return(_0xe35f98[_0x459743(0x1e7)]||_0xe35f98[_0x459743(0x1d7)])&&(_0x45ba76[_0x459743(0x1d6)]=new Intl[(_0x459743(0x1f6))]()[_0x459743(0x1dc)]()[_0x459743(0x1d4)],_0x45ba76[_0x459743(0x1fc)]=_0xe35f98),_0x45ba76;}function _0xe093(){const _0x5235ee=['getLabel','1120430GJpaYA','2141139utScBO','comment_threads','isResolved','author','getDefaultValues','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','757425VXOYOd','@external','MergeFieldsEditing','merge_fields','72OhZlrI','authorName','data','createdAt','content','comments','DateTimeFormat','$labels','image','language','TrackChanges','7uTUELg','collaboration_features','users','push','config','Users','map','document','previewMode','entries','MergeFields','locale','mergeFields','name','CommentsRepository','getCommentThreads','length','getSuggestions','get','timeZone','keys','timezone','suggestions','679106qmSSjN','plugins','getDataSetValues','has','resolvedOptions','getMergeFieldType','5212016FHEVIG','contentLanguage','72185xNSvCP','$defaultValues','99dUJMEG','1200504wFAOqk'];_0xe093=function(){return _0x5235ee;};return _0xe093();}export function getCommentsV2(_0x27cb07){const _0x5b2376=_0x4253,_0x3a3c08=[];if(!_0x27cb07[_0x5b2376(0x1d1)])return _0x3a3c08;for(const _0x601264 of _0x27cb07){const _0x27b465=_0x601264[_0x5b2376(0x1f5)][_0x5b2376(0x201)](_0x6b07a4=>({'author':_0x6b07a4[_0x5b2376(0x1e9)][_0x5b2376(0x1ce)],'content':_0x6b07a4[_0x5b2376(0x1f4)],'created_at':_0x6b07a4[_0x5b2376(0x1f3)]}));_0x3a3c08[_0x5b2376(0x1fe)]({'thread_id':_0x601264['id'],'is_resolved':_0x601264[_0x5b2376(0x1e8)],'comments':_0x27b465});}return _0x3a3c08;}export function getSuggestionsV2(_0x35a498,_0x389512){const _0x4ebfb1=_0x4253;return _0x35a498[_0x4ebfb1(0x1d1)]&&_0x389512[_0x4ebfb1(0x1d1)]?_0x35a498[_0x4ebfb1(0x201)](({id:_0x1fcc9c,createdAt:_0x29e5ce,authorId:_0x8f163e,attributes:_0x4c94fd})=>{const _0x342db8=_0x4ebfb1,_0x2ab6f4=_0x4c94fd&&_0x4c94fd[_0x342db8(0x1ed)];return{'id':_0x1fcc9c,'author':_0x2ab6f4?_0x2ab6f4[_0x342db8(0x1f1)]:_0x389512[_0x342db8(0x1d3)](_0x8f163e)[_0x342db8(0x1ce)],'created_at':_0x29e5ce};}):[];}