@ckeditor/ckeditor5-uploadcare 45.0.0-alpha.3 → 45.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x4a10d,Command as _0x356a34}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x7a3d8,IconGooglePhotos as _0x3bd15f,IconGoogleDrive as _0x1c8d5d,IconFacebook as _0xf8ba5a,IconDropbox as _0x20eb75,IconUploadcareLink as _0x58bc4a,IconUploadcareImageUpload as _0x5de80d,IconError as et,IconUploadcareImageEdit as _0x31e1f3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x7b8817,MenuBarMenuListItemButtonView as _0x5440c0,View as _0x4d5fa9,FocusCycler as _0x377ba5,Dialog as _0xa8fec7,DialogViewPosition as _0xd04362,SpinnerView as _0x41628b,IconView as at,Notification as _0x4a47a8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2107a9,DomEmitterMixin as _0x389868,global as _0x5654e2,getAncestors as _0xb78d68,ObservableMixin as _0x4860f8,createElement as _0x189c4f,uid as _0x1ad438}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x50c30b}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x10eeed,info as _0x328c7b}from'@uploadcare/upload-client';import*as _0x3859c3 from'@uploadcare/file-uploader';var o=function(_0x53e392){return _0x53e392['Local']='local',_0x53e392['URL']='url',_0x53e392['Dropbox']='dropbox',_0x53e392['GDrive']='gdrive',_0x53e392['Facebook']='facebook',_0x53e392['GPhotos']='gphotos',_0x53e392['OneDrive']='onedrive',_0x53e392;}({});function _(_0x29ec7f,_0x37e7a9,_0x48a917){const t=_0x29ec7f['t'],_0x227c2c=_0x29ec7f['t'];switch(_0x37e7a9){case o['Local']:return{'text':_0x227c2c('Insert'===_0x48a917?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x227c2c('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x48a917?_0x227c2c('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x227c2c('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x48a917?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x48a917?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x48a917?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x48a917?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x48a917?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x37e7a9;}}class e extends _0x4a10d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x21879d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x43771c;for(const _0x1774b7 in _0x21879d){const _0x13a048=_0x1774b7,_0x55c671=_0x21879d[_0x13a048];if('uploadcareLicenseKeyValid'==_0x55c671||'uploadcareLicenseKeyInvalid'==_0x55c671||'uploadcareLicenseKeyExpired'==_0x55c671||'uploadcareLicenseKeyDomainLimit'==_0x55c671||'uploadcareLicenseKeyNotAllowed'==_0x55c671||'uploadcareLicenseKeyEvaluationLimit'==_0x55c671||'uploadcareLicenseKeyTrialLimit'==_0x55c671||'uploadcareLicenseKeyUsageLimit'==_0x55c671){delete _0x21879d[_0x13a048],_0x43771c=_0x55c671,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x43771c&&_0x21879d['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x43771c&&_0x21879d['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x43771c&&_0x21879d['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x43771c&&_0x21879d['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x43771c&&_0x21879d['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x43771c&&_0x21879d['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x43771c&&_0x21879d['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x572c58}=this,_0x49cea1=_0x572c58['commands']['get']('uploadcare');if(!_0x49cea1)return;const _0x18a8da=this['_normalizeConfigSourceList'](_0x572c58['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x394a43,_0x442074)=>{const _0x111bba=this['_getIntegrationKey'](_0x442074['type']);return _0x394a43[_0x111bba]||(_0x394a43[_0x111bba]=[]),_0x394a43[_0x111bba]['push'](_0x442074),_0x394a43;},{});_0x572c58['plugins']['has']('ImageInsertUI')&&_0x572c58['commands']['get']('uploadcare')&&Object['entries'](_0x18a8da)['forEach'](([_0x44d7ac,_0x95df30])=>{_0x572c58['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x44d7ac,'observable':()=>_0x49cea1,'buttonViewCreator':()=>this['_createToolbarButton'](_0x95df30),'formViewCreator':()=>this['_createDropdownButtons'](_0x95df30),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x95df30),'override':'assetManager'!==_0x44d7ac});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x21bd0c){const {locale:_0x41caa9}=this['editor'];return _0x21bd0c['map'](_0x2dd401=>{const _0x4795b8=_(_0x41caa9,_0x2dd401,'Insert');switch(_0x2dd401){case o['Local']:return{'icon':_0x5de80d,'type':o['Local'],..._0x4795b8};case o['URL']:return{'icon':_0x58bc4a,'type':o['URL'],..._0x4795b8};case o['Dropbox']:return{'icon':_0x20eb75,'type':o['Dropbox'],..._0x4795b8};case o['Facebook']:return{'icon':_0xf8ba5a,'type':o['Facebook'],..._0x4795b8};case o['GDrive']:return{'icon':_0x1c8d5d,'type':o['GDrive'],..._0x4795b8};case o['GPhotos']:return{'icon':_0x3bd15f,'type':o['GPhotos'],..._0x4795b8};case o['OneDrive']:return{'icon':_0x7a3d8,'type':o['OneDrive'],..._0x4795b8};}});}['_getIntegrationKey'](_0x302b51){switch(_0x302b51){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3333ca,_0x421c76){const _0x387beb=this['editor'],_0x348c67=new _0x3333ca(_0x387beb['locale']),_0x5cee3b=_0x387beb['commands']['get']('uploadcare');return _0x348c67['bind']('isEnabled')['to'](_0x5cee3b),_0x348c67['on']('execute',()=>{_0x5cee3b['execute'](_0x421c76);}),_0x348c67;}['_createToolbarButton'](_0x2a4dc2){const {locale:_0x22e8b1}=this['editor'],_0x26829c=this['editor']['plugins']['get']('ImageInsertUI'),_0x530e4b=_0x2a4dc2[0x0],_0x2de7bb=this['_createButton'](_0x7b8817,_0x530e4b['type']);return _0x2de7bb['icon']=_0x530e4b['icon'],_0x2de7bb['bind']('label')['to'](_0x26829c,'isImageSelected',_0x47d55e=>_(_0x22e8b1,_0x530e4b['type'],_0x47d55e?'Replace':'Insert')['text']),_0x2de7bb['tooltip']=!0x0,_0x2de7bb;}['_createDropdownButtons'](_0x3612a2){const {locale:_0x42172a}=this['editor'],_0x5e554e=this['editor']['plugins']['get']('ImageInsertUI');return _0x3612a2['map'](_0x180897=>{const _0x988104=this['_createButton'](_0x7b8817,_0x180897['type']);return _0x988104['withText']=!0x0,_0x988104['icon']=_0x180897['icon'],_0x988104['bind']('label')['to'](_0x5e554e,'isImageSelected',_0x5337f6=>_(_0x42172a,_0x180897['type'],_0x5337f6?'Replace':'Insert')['text']),_0x988104;});}['_createMenuBarButtons'](_0x5a91e3){return _0x5a91e3['map'](_0x739e63=>{const _0x52f36b=this['_createButton'](_0x5440c0,_0x739e63['type']);return _0x52f36b['icon']=_0x739e63['icon'],_0x52f36b['label']=_0x739e63['shortText'],_0x52f36b;});}}class q extends _0x4d5fa9{['focusTracker'];['focusCycler'];constructor(_0x3d31df){super(_0x3d31df),this['focusTracker']=new _0x2107a9(),this['focusCycler']=new _0x377ba5({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x295804){super(_0x295804),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x26f177,_0x10ca44){const _0x5c8c43=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0xc7ef88=>_0xc7ef88<=_0x10ca44)['map'](_0xc61a5=>_0x26f177['replace'](/\/$/,'')+'/-/resize/'+_0xc61a5+'x/\x20'+_0xc61a5+'w');return{'imageFallbackUrl':_0x26f177,'imageSources':[{'srcset':_0x5c8c43['join'](',\x20'),'sizes':'(max-width:\x20'+_0x10ca44+'px)\x20100vw,\x20'+_0x10ca44+'px','type':'image/webp'}]};}function A(_0x165b8e,_0x4a07f2,_0x583d98){const _0x4c1b80=_0x165b8e['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4c1b80?parseInt(_0x4c1b80[0x1],0xa):_0x4a07f2,'height':_0x4c1b80?parseInt(_0x4c1b80[0x2],0xa):_0x583d98};}function m(_0x9b4098,_0x2864dd){const _0x5cf26f=Object['create'](_0x389868),_0x273663=_0x9b4098['plugins']['get']('ImageUtils'),_0x3c1087=_0x9b4098['editing']['mapper']['toViewElement'](_0x2864dd),_0x49b04a=_0x273663['findViewImgElement'](_0x3c1087),_0x5b0478=_0x9b4098['editing']['view']['domConverter']['viewToDom'](_0x49b04a),_0x4b5685=_0x2864dd['getAttribute']('width'),_0x40b544=_0x2864dd['getAttribute']('height'),_0x114d39='image-processing';_0x9b4098['editing']['view']['change'](_0x11b968=>{_0x11b968['addClass'](_0x114d39,_0x3c1087),_0x11b968['setStyle']('aspect-ratio',_0x4b5685+'/'+_0x40b544,_0x49b04a);}),_0x5cf26f['listenTo'](_0x5b0478,'load',()=>{_0x5cf26f['stopListening'](_0x5b0478,'load'),_0x9b4098['editing']['view']['change'](_0x82f541=>{_0x82f541['removeClass'](_0x114d39,_0x3c1087),_0x82f541['removeStyle']('aspect-ratio',_0x49b04a);});});}function V(_0x5a37ac){if(Array['isArray'](_0x5a37ac)){const _0x5c5ce9=_0x5a37ac['map'](V);return _0x16e5ed=>_0x5c5ce9['some'](_0x442216=>_0x442216(_0x16e5ed));}if('origin'==_0x5a37ac){const _0xd4d629=_0x5654e2['window']['location']['origin'];return _0x163229=>new URL(_0x163229,_0x5654e2['document']['baseURI'])['origin']==_0xd4d629;}return'function'==typeof _0x5a37ac?_0x5a37ac:_0x5a37ac instanceof RegExp?_0x234a01=>!(!_0x234a01['match'](_0x5a37ac)&&!_0x234a01['replace'](/^https?:\/\//,'')['match'](_0x5a37ac)):()=>!0x1;}function F(_0x797ce8,_0xcd7b49){return _0xb78d68(_0x797ce8['target'])['includes'](_0xcd7b49);}class l extends/* #__PURE__ -- @preserve */
24
- _0x4860f8(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x444889,_0x35903a,_0xc0d461){super(),this['_editor']=_0x444889,this['_editing']=_0x35903a,this['_dialog']=_0x444889['plugins']['get'](_0xa8fec7),this['_api']=_0x35903a['ctxElement']['getAPI'](),this['_type']=_0xc0d461,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x225929,model:_0x3660e2}=this['_editor'],_0x174265=_0x3660e2['document']['selection']['getSelectedElement'](),_0x2d0aa1=_0x174265&&(_0x174265['is']('element','imageBlock')||_0x174265['is']('element','imageInline'));this['_formView']=new S(_0x225929),this['_dialog']['show']({'id':'uploadCare','icon':_0x5de80d,'title':_(_0x225929,this['_type'],_0x2d0aa1?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xd04362['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5be7d7=>!F(_0x5be7d7,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2cc852}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5cc248=>{const _0x1ee718=_0x2cc852['length'];for(const _0x4188b2 of _0x2cc852){const _0x3c7761=_0x4188b2===_0x2cc852[_0x1ee718-0x1],{cdnUrl:_0x6c13d7,fileInfo:_0x1e057e}=_0x4188b2;if(!_0x6c13d7||!_0x1e057e)continue;const {width:_0x40c9e6,height:_0x469735}=_0x1e057e['imageInfo'],_0x40e1ab=A(_0x6c13d7,_0x40c9e6,_0x469735),_0x1376f6=E(_0x6c13d7,_0x40e1ab['width']),_0x3dc5e0={'id':_0x1e057e['uuid'],'type':'image','attributes':{'imageDimension':_0x40e1ab,..._0x1376f6}};this['_insertAsset'](_0x3dc5e0,_0x3c7761,_0x5cc248);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x59f853=>{'idle'===_0x59f853['detail']['status']&&!_0x59f853['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x18dbfe,_0x202a95,_0x32e1cb){const _0xdf6c56=this['_editor']['model']['document']['selection'],_0x2dbc32=_0xdf6c56['getSelectedElement'](),_0x5c63a9=!(!_0x2dbc32||!_0x2dbc32['is']('element','imageInline'));_0x32e1cb['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x18dbfe,_0x5c63a9),_0x202a95||_0x32e1cb['setSelection'](_0xdf6c56['getLastPosition']());}['_insertImage'](_0x2704cd,_0x4796be){const _0x151bdb=this['_editor'],{imageDimension:_0x2dbaad,imageFallbackUrl:_0x117b9b,imageSources:_0x52f5d7}=_0x2704cd['attributes'];_0x151bdb['execute']('insertImage',{'imageType':_0x4796be?'imageInline':null,'source':{'uploadcareImageId':_0x2704cd['id'],'src':_0x117b9b,'sources':_0x52f5d7,..._0x2dbaad}});}}class n extends _0x356a34{['_editing'];['_controller']=null;static get['requires'](){return[_0xa8fec7,i];}constructor(_0x2f9b96){super(_0x2f9b96),this['_editing']=_0x2f9b96['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x37ec32){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x37ec32);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x43f8cb,publicKey:_0x53da89,signal:_0x1b7bb0,onProgress:_0x1fb04a}){return _0x10eeed(_0x43f8cb,{'publicKey':_0x53da89,'store':'auto','signal':_0x1b7bb0,'onProgress':_0x1fb04a});}static['getInfo'](_0xdbea67,_0x1c0153){return _0x328c7b(_0xdbea67,_0x1c0153);}}class p extends _0x4a10d{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x50c30b,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2f6162=this['editor'];if(!!!_0x2f6162['config']['get']('uploadcare'))return;_0x2f6162['plugins']['get'](_0x50c30b)['createUploadAdapter']=_0x1ffb26=>new x(_0x1ffb26,_0x2f6162),_0x2f6162['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x385266,{imageElement:_0x4eb8f0,data:_0x261610})=>{_0x2f6162['model']['change'](_0x278f06=>{_0x278f06['setAttribute']('uploadcareImageId',_0x261610['uploadcareImageId'],_0x4eb8f0);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x3134cc,_0x4e4045){this['loader']=_0x3134cc,this['editor']=_0x4e4045,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x465b9a=this['editor']['config']['get']('uploadcare.pubkey'),_0x4f3960=await this['loader']['file'];return C['upload']({'file':_0x4f3960,'publicKey':_0x465b9a,'signal':this['controller']['signal'],'onProgress':_0x199e00=>{_0x199e00&&_0x199e00['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x199e00['value']);}})['then'](async _0x78bd77=>{const {imageFallbackUrl:_0x31d02b,imageSources:_0x212c82}=E(_0x78bd77['cdnUrl'],_0x78bd77['imageInfo']['width']);return{'uploadcareImageId':_0x78bd77['uuid'],'default':_0x31d02b,'sources':_0x212c82};})['catch'](()=>{const _0x421c89=t('Cannot\x20upload\x20file:')+('\x20'+_0x4f3960['name']+'.');return Promise['reject'](_0x421c89);});}['abort'](){this['controller']['abort']();}}class i extends _0x4a10d{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0xa8fec7];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x3cef84=this['editor'];_0x3cef84['commands']['add']('uploadcare',new n(_0x3cef84));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x16d14f=_0x5654e2['document']['querySelector']('input[uploadcare-file-input]');_0x16d14f&&_0x16d14f['remove']();}),async function(_0xc20389){const _0x13550f=_0x68d8a0([0x58,0x6a,0x4d,0x46,0x44,0x68,0x5a,0x31,0x4f,0x6c,0x63,0x69,0x6e,0x35,0x36,0x72,0x6b,0x6f,0x47,0x50,0x41,0x4c,0x78,0x49,0x30,0x39,0x65,0x54,0x59,0x7a,0x53,0x76,0x45,0x61,0x6d,0x38,0x74,0x51,0x37,0x56,0x4b,0x79,0x71,0x32,0x34,0x67,0x66,0x62,0x55,0x52,0x70,0x48,0x64,0x43,0x33,0x75,0x4a,0x77,0x73,0x57,0x4e,0x42]),_0x4f1471=0x4b3a6f5f,_0x8b574f=0x4b3d0cdf^_0x4f1471,_0x3f644a=window[_0x68d8a0([0x44,0x61,0x74,0x65])][_0x68d8a0([0x6e,0x6f,0x77])](),_0x2e97c0=_0xc20389[_0x68d8a0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4b0aab=new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53dd07=>{_0x2e97c0[_0x68d8a0([0x6f,0x6e,0x63,0x65])](_0x68d8a0([0x72,0x65,0x61,0x64,0x79]),_0x53dd07);}),_0x300fa1={[_0x68d8a0([0x6b,0x74,0x79])]:_0x68d8a0([0x45,0x43]),[_0x68d8a0([0x75,0x73,0x65])]:_0x68d8a0([0x73,0x69,0x67]),[_0x68d8a0([0x63,0x72,0x76])]:_0x68d8a0([0x50,0x2d,0x32,0x35,0x36]),[_0x68d8a0([0x78])]:_0x68d8a0([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]),[_0x68d8a0([0x79])]:_0x68d8a0([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]),[_0x68d8a0([0x61,0x6c,0x67])]:_0x68d8a0([0x45,0x53,0x32,0x35,0x36])},_0x5dda9e=_0x2e97c0[_0x68d8a0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x68d8a0([0x67,0x65,0x74])](_0x68d8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1bdd52(){let _0x1de98d,_0x523083=null,_0x205175=null;try{if(_0x5dda9e==_0x68d8a0([0x47,0x50,0x4c]))return _0x68d8a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1de98d=_0x524f91(),!_0x1de98d)return _0x68d8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1de98d[_0x68d8a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x205175=_0x5d4704(_0x1de98d[_0x68d8a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1de98d[_0x68d8a0([0x6a,0x74,0x69])])),await _0x12bbb3()?_0xb7e0ea()?_0x507ad4()?_0x68d8a0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2fe9e2()?(_0x1de98d[_0x68d8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x68d8a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x523083=_0x21d155(_0x68d8a0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1de98d[_0x68d8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x68d8a0([0x74,0x72,0x69,0x61,0x6c])&&(_0x523083=_0x21d155(_0x68d8a0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x10940e()):_0x68d8a0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x68d8a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x68d8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2469f3){return _0x68d8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x507ad4(){const _0x194a79=[_0x68d8a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x68d8a0([0x74,0x72,0x69,0x61,0x6c])][_0x68d8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1de98d[_0x68d8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3f644a/0x3e8:0xe10*_0x8b574f;return _0x1de98d[_0x68d8a0([0x65,0x78,0x70])]<_0x194a79;}function _0xb7e0ea(){const _0x2cf6cf=_0x1de98d[_0x68d8a0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2cf6cf&&(!!_0x2cf6cf[_0x68d8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x68d8a0([0x2a]))||!!_0x2cf6cf[_0x68d8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x68d8a0([0x55,0x50,0x4c,0x43])));}function _0x2fe9e2(){const _0x468ec3=_0x1de98d[_0x68d8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x468ec3||0x0==_0x468ec3[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x34902b}=new URL(window[_0x68d8a0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x468ec3[_0x68d8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34902b))return!0x0;const _0x1a26c7=_0x34902b[_0x68d8a0([0x73,0x70,0x6c,0x69,0x74])](_0x68d8a0([0x2e]));return _0x468ec3[_0x68d8a0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x547ca1=>_0x547ca1[_0x68d8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x68d8a0([0x2a])))[_0x68d8a0([0x6d,0x61,0x70])](_0x50f6cb=>_0x50f6cb[_0x68d8a0([0x73,0x70,0x6c,0x69,0x74])](_0x68d8a0([0x2e])))[_0x68d8a0([0x73,0x6f,0x6d,0x65])](_0x32c2eb=>_0x1a26c7[_0x68d8a0([0x65,0x76,0x65,0x72,0x79])]((_0x3c3384,_0x3cdc9e)=>_0x32c2eb[_0x3cdc9e]===_0x3c3384||_0x32c2eb[_0x3cdc9e]===_0x68d8a0([0x2a])));}function _0x10940e(){return _0x523083&&_0x205175?new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x39d05d,_0x5b38d8)=>{_0x523083[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x39d05d,_0x5b38d8),_0x205175[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x5dfd4e=>{_0x5dfd4e!=_0x68d8a0([0x56,0x61,0x6c,0x69,0x64])&&_0x39d05d(_0x5dfd4e);},_0x5b38d8);}):_0x523083||_0x205175||_0x68d8a0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d4704(_0x391bb2,_0x33d93f){return new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25d7b0=>{if(_0x412f04())return _0x25d7b0(_0x68d8a0([0x56,0x61,0x6c,0x69,0x64]));_0x5c94ea(),_0x2e97c0[_0x68d8a0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x68d8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19e1bf=!0x1;const _0x271bac=_0x1ad438();function _0x5e3d53(_0x513cc4){return!!_0x513cc4&&(typeof _0x513cc4===_0x68d8a0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x513cc4===_0x68d8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x513cc4[_0x68d8a0([0x74,0x68,0x65,0x6e])]===_0x68d8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x513cc4[_0x68d8a0([0x63,0x61,0x74,0x63,0x68])]===_0x68d8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4fe480(_0x1eb68c){_0x4f3775(_0x1eb68c)[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x36a5c1=>{if(!_0x36a5c1||_0x36a5c1[_0x68d8a0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x68d8a0([0x6f,0x6b]))return _0x68d8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a8052(_0x8455dc(_0x271bac+_0x33d93f))!=_0x36a5c1[_0x68d8a0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x68d8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x68d8a0([0x56,0x61,0x6c,0x69,0x64]);})[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x2249d1=>(_0xced930(),_0x2249d1),()=>{const _0x34e7c4=_0xf92da2();return null==_0x34e7c4?(_0xced930(),_0x68d8a0([0x56,0x61,0x6c,0x69,0x64])):_0x68d8a0(_0x3f644a-_0x34e7c4>(0x6f36eb5f^_0x4f1471)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x25d7b0)[_0x68d8a0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x25d7b0(_0x68d8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x285c20=0x4b0c81df^_0x4f1471;function _0xced930(){const _0x395da1=_0x68d8a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8052(_0x8455dc(_0x391bb2)),_0xb30d3a=_0x1125d1(_0x4a8052(window[_0x68d8a0([0x4d,0x61,0x74,0x68])][_0x68d8a0([0x63,0x65,0x69,0x6c])](_0x3f644a/_0x285c20)));window[_0x68d8a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x68d8a0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x395da1,_0xb30d3a);}function _0xf92da2(){const _0x45e4b4=_0x68d8a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a8052(_0x8455dc(_0x391bb2)),_0x5dcefe=window[_0x68d8a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x68d8a0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x45e4b4);return _0x5dcefe?window[_0x68d8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1125d1(_0x5dcefe),0x10)*_0x285c20:null;}function _0x4f3775(_0x3d1312){return new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x523acc,_0x2726a0)=>{_0x3d1312[_0x68d8a0([0x74,0x68,0x65,0x6e])](_0x523acc,_0x2726a0),window[_0x68d8a0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2726a0,0x4b3bbb9f^_0x4f1471);});}}_0x2e97c0[_0x68d8a0([0x6f,0x6e])](_0x68d8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x634b1c,_0x36170f)=>{if(_0x36170f[0x0]!=_0x391bb2)return _0x25d7b0(_0x68d8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36170f[0x1]={..._0x36170f[0x1],[_0x68d8a0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x271bac};},{[_0x68d8a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x68d8a0([0x68,0x69,0x67,0x68])}),_0x2e97c0[_0x68d8a0([0x6f,0x6e])](_0x68d8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57638e=>{_0x5e3d53(_0x57638e[_0x68d8a0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19e1bf=!0x0,_0x4fe480(_0x57638e[_0x68d8a0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x68d8a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x68d8a0([0x6c,0x6f,0x77])}),_0x4b0aab[_0x68d8a0([0x74,0x68,0x65,0x6e])](()=>{_0x19e1bf||_0x25d7b0(_0x68d8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x412f04(){return _0x2e97c0[_0x68d8a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x68d8a0([0x76,0x69,0x65,0x77])][_0x68d8a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x68d8a0([0x61,0x75,0x74,0x6f]);}function _0x5c94ea(){_0x2e97c0[_0x68d8a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x68d8a0([0x76,0x69,0x65,0x77])][_0x68d8a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x68d8a0([0x61,0x75,0x74,0x6f]);}}function _0x21d155(_0x8f2974){const _0x54421d=[new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31ed24=>setTimeout(_0x31ed24,0x4b335193^_0x4f1471)),_0x4b0aab[_0x68d8a0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ef63c=>{let _0x5def4b=0x0;_0x2e97c0[_0x68d8a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x68d8a0([0x6f,0x6e])](_0x68d8a0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x538c22,_0x577142)=>{_0x577142[0x0][_0x68d8a0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5def4b++,_0x5def4b==(0x4b3a6ea7^_0x4f1471)&&(_0x3ef63c(),_0x538c22[_0x68d8a0([0x6f,0x66,0x66])]());});}))];return window[_0x68d8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x68d8a0([0x72,0x61,0x63,0x65])](_0x54421d)[_0x68d8a0([0x74,0x68,0x65,0x6e])](()=>_0x8f2974);}async function _0x1520ba(){await _0x4b0aab,_0x2e97c0[_0x68d8a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x68d8a0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x51803e,_0x2e97c0[_0x68d8a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x68d8a0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x51803e,_0x2e97c0[_0x68d8a0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x68d8a0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x8b3344(_0x38bbef){const _0x34fa80=_0x3cdd9c();_0x2e97c0[_0x34fa80]=_0x68d8a0([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x38bbef,_0x38bbef!=_0x68d8a0([0x56,0x61,0x6c,0x69,0x64])&&_0x1520ba();}function _0x3cdd9c(){const _0x4b9ba4=window[_0x68d8a0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x68d8a0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x68d8a0([0x6e,0x6f,0x77])]())[_0x68d8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x68d8a0([0x2e]),'');let _0x142619=_0x68d8a0([0x58]);for(let _0x415bf7=0x0;_0x415bf7<_0x4b9ba4[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x415bf7+=0x2){let _0x591aa9=window[_0x68d8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b9ba4[_0x68d8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x415bf7,_0x415bf7+0x2));_0x591aa9>=_0x13550f[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x591aa9-=_0x13550f[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x142619+=_0x13550f[_0x591aa9];}return _0x142619;}function _0x524f91(){const _0x294931=_0x5dda9e[_0x68d8a0([0x73,0x70,0x6c,0x69,0x74])](_0x68d8a0([0x2e]));if(0x3!=_0x294931[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1e7c81(_0x294931[0x1]);function _0x1e7c81(_0x3bf227){const _0x106526=_0x176271(_0x3bf227);return _0x106526&&_0x3c9db0()?_0x106526:null;function _0x3c9db0(){const _0x4fb83b=_0x106526[_0x68d8a0([0x6a,0x74,0x69])],_0x34b597=window[_0x68d8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fb83b[_0x68d8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fb83b[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x7ced84={..._0x106526,[_0x68d8a0([0x6a,0x74,0x69])]:_0x4fb83b[_0x68d8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4fb83b[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x7ced84[_0x68d8a0([0x76,0x63])],_0x8455dc(_0x7ced84)==_0x34b597;}}}async function _0x12bbb3(){let _0x15a8f1=!0x0;try{const _0x3b88fb=_0x5dda9e[_0x68d8a0([0x73,0x70,0x6c,0x69,0x74])](_0x68d8a0([0x2e])),[_0x2d15c6,_0x2ecb8c,_0x16b51a]=_0x3b88fb;return _0x358c41(_0x2d15c6),await _0x451d30(_0x2d15c6,_0x2ecb8c,_0x16b51a),_0x15a8f1;}catch(_0x1839e3){return!0x1;}function _0x358c41(_0x4aaf92){const _0xbc3266=_0x176271(_0x4aaf92);_0xbc3266&&_0xbc3266[_0x68d8a0([0x61,0x6c,0x67])]==_0x68d8a0([0x45,0x53,0x32,0x35,0x36])||(_0x15a8f1=!0x1);}async function _0x451d30(_0x20953c,_0xfc22e1,_0x3cd126){const _0x1fafb5=window[_0x68d8a0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x68d8a0([0x66,0x72,0x6f,0x6d])](_0x1485cf(_0x3cd126),_0x34d0b5=>_0x34d0b5[_0x68d8a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c30f1=new window[(_0x68d8a0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x68d8a0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20953c+_0x68d8a0([0x2e])+_0xfc22e1),_0x5887d6=window[_0x68d8a0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x68d8a0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5887d6)return;const _0x3c67f2=await _0x5887d6[_0x68d8a0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x68d8a0([0x6a,0x77,0x6b]),_0x300fa1,{[_0x68d8a0([0x6e,0x61,0x6d,0x65])]:_0x68d8a0([0x45,0x43,0x44,0x53,0x41]),[_0x68d8a0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x68d8a0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x68d8a0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5887d6[_0x68d8a0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x68d8a0([0x6e,0x61,0x6d,0x65])]:_0x68d8a0([0x45,0x43,0x44,0x53,0x41]),[_0x68d8a0([0x68,0x61,0x73,0x68])]:{[_0x68d8a0([0x6e,0x61,0x6d,0x65])]:_0x68d8a0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c67f2,_0x1fafb5,_0x5c30f1)||(_0x15a8f1=!0x1);}}function _0x176271(_0x1834ab){return _0x1834ab[_0x68d8a0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x68d8a0([0x65,0x79]))?JSON[_0x68d8a0([0x70,0x61,0x72,0x73,0x65])](_0x1485cf(_0x1834ab)):null;}function _0x1485cf(_0x110fb4){return window[_0x68d8a0([0x61,0x74,0x6f,0x62])](_0x110fb4[_0x68d8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x68d8a0([0x2b]))[_0x68d8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x68d8a0([0x2f])));}function _0x8455dc(_0x2db7ee){let _0x18f5d6=0x1505;function _0x379833(_0x2f4cfc){for(let _0x587bd5=0x0;_0x587bd5<_0x2f4cfc[_0x68d8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x587bd5++){const _0x2967ee=_0x2f4cfc[_0x68d8a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x587bd5);_0x18f5d6=(_0x18f5d6<<0x5)+_0x18f5d6+_0x2967ee,_0x18f5d6&=_0x18f5d6;}}function _0x5902e1(_0x51821e){Array[_0x68d8a0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x51821e)?_0x51821e[_0x68d8a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5902e1):_0x51821e&&typeof _0x51821e==_0x68d8a0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x68d8a0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x51821e)[_0x68d8a0([0x73,0x6f,0x72,0x74])]()[_0x68d8a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5e526f,_0x4570d2])=>{_0x379833(_0x5e526f),_0x5902e1(_0x4570d2);}):_0x379833(window[_0x68d8a0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x51821e));}return _0x5902e1(_0x2db7ee),_0x18f5d6>>>0x0;}function _0x4a8052(_0x292483){return _0x292483[_0x68d8a0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x68d8a0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x68d8a0([0x30]));}function _0x1125d1(_0x47339e){return _0x47339e[_0x68d8a0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x68d8a0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x68d8a0([0x6a,0x6f,0x69,0x6e])]('');}function _0x51803e(){}function _0x68d8a0(_0x19da28){return _0x19da28['map'](_0x557c40=>String['fromCharCode'](_0x557c40))['join']('');}_0x8b3344(await _0x1bdd52());}(this);}['_initSchema'](){const _0x36e450=this['editor']['model']['schema'];_0x36e450['isRegistered']('imageBlock')&&_0x36e450['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x36e450['isRegistered']('imageInline')&&_0x36e450['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5e164a=this['editor'];_0x5e164a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5e164a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x191da6=>_0x191da6['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2cfe9a=_0x5e164a['commands']['get']('replaceImageSource');_0x2cfe9a&&this['listenTo'](_0x2cfe9a,'cleanupImage',(_0x5ab4bf,[_0x4c2e77,_0x161888])=>{_0x4c2e77['removeAttribute']('uploadcareImageId',_0x161888);});}['_initConfig'](){const _0x1fe727=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3c4fbf=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x189c4f(_0x5654e2['document'],'uc-config',{..._0x1fe727,'pubkey':_0x3c4fbf,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x2cf79f=>{if('closeMax'==_0x2cf79f)return'#uc-icon-arrow-down';},_0x5654e2['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x189c4f(_0x5654e2['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x5654e2['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3aef17=this['editor']['commands']['get']('insertImage');_0x3aef17&&this['listenTo'](_0x3aef17,'execute',()=>{const _0x407813=this['editor']['model']['document']['selection']['getSelectedElement']();_0x407813&&_0x407813['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x407813);});});const _0x22973f=this['editor']['commands']['get']('uploadcareImageReplace');_0x22973f&&this['listenTo'](_0x22973f,'execute',()=>{const _0x56385f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x56385f&&_0x56385f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x56385f);});});}}class u extends _0x4a10d{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2278f9){super(_0x2278f9),_0x2278f9['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x3859c3['defineComponents'](_0x3859c3);}}class ta extends _0x4d5fa9{constructor(_0x177ea2){super(_0x177ea2);const t=_0x177ea2['t'],_0x909d0a=this['bindTemplate'],_0x212913=new _0x41628b();_0x212913['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x212913,{'text':_0x909d0a['to']('imageUploadProgress',_0x46cbfb=>t('Loading\x20image...')+'\x20('+(_0x46cbfb||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class rt extends _0x4d5fa9{constructor(_0x743474){super(_0x743474);const t=_0x743474['t'];this['set']('errorType',null);const _0x1190ea=new _0x7b8817(_0x743474);_0x1190ea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1190ea['withText']=!0x0,_0x1190ea['class']='ck-button-action',_0x1190ea['on']('execute',()=>{this['fire']('retry');}),_0x1190ea['bind']('isVisible')['to'](this,'errorType',_0xe239c1=>'NotFound'!==_0xe239c1);const _0xb507ce=new at();_0xb507ce['content']=et,_0xb507ce['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3608dd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0xb507ce,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3608dd['to']('errorType',_0x59def6=>t('NotFound'!==_0x59def6?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1190ea]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class tt extends _0x4d5fa9{constructor(_0x9c45ae,_0x358015){super(_0x9c45ae);const _0x1b22bc=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x358015,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1b22bc['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x103215,_0x153903,_0x4fc799){super(_0x103215),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x103215),this['_errorView']=new rt(_0x103215),this['_editingView']=new tt(_0x103215,_0x4fc799),this['_focusableView']=new _0x4d5fa9(_0x103215),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x153903),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x3a7794=>{this['_addUploadcareImageEditorListeners'](_0x3a7794);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x1bb368,_0x5bee98){const _0x291414='uc-cloud-image-editor',_0x30e2ad=_0x1bb368['querySelector'](_0x291414);if(_0x30e2ad)return _0x5bee98(_0x30e2ad);const _0x2db96e=new MutationObserver(_0x2f8f5e=>{const _0x1702a7=_0x2f8f5e['filter'](_0x153189=>_0x153189['target']===_0x1bb368&&_0x153189['addedNodes']['length']>0x0&&_0x153189['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x291414);_0x1702a7['length']&&(_0x2db96e['disconnect'](),_0x5bee98(_0x1702a7[0x0]['addedNodes'][0x0]));});_0x2db96e['observe'](_0x1bb368,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x5f3c09){_0x5f3c09['addEventListener']('apply',_0x3482a9=>{this['fire']('apply',{'imageSrc':_0x3482a9['detail']['cdnUrl']});}),_0x5f3c09['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
25
- _0x4860f8(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x292c1a,_0x395f3e,_0x51cba3){super(),this['_editor']=_0x292c1a,this['_dialog']=_0x395f3e,this['_imageElement']=_0x51cba3,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x1de138=this['_imageElement'],_0x2964c4=_0x1de138['getAttribute']('uploadcareImageId'),_0x1d0318=_0x1de138['getAttribute']('src');if(_0x2964c4)await this['_loadImageInfo'](_0x2964c4,_0x1d0318);else{if(this['_imageCache']['has'](_0x1d0318)){const _0x4fc90d=this['_imageCache']['get'](_0x1d0318);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4fc90d['url'],this['imageDimension']=_0x4fc90d['dimension'],this['imageId']=_0x4fc90d['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x56d711}=this['_editor'],t=_0x56d711['t'],_0x2dd506=new Z(_0x56d711,this['imageStatus'],this['_attributes']);_0x2dd506['bind']('status')['to'](this,'imageStatus'),_0x2dd506['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2dd506['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2dd506['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2dd506,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x31e1f3,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2dd506,'position':_0xd04362['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2dd506['focus']();},'onHide':()=>{_0x2dd506['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x19bc11=>!F(_0x19bc11,_0x2dd506['element'])}});}['_loadImageInfo'](_0xc405a,_0x530fb8){return C['getInfo'](_0xc405a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x29ad16=>{const {width:_0x24b5a6,height:_0xccadde}=_0x29ad16['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x530fb8,this['imageDimension']={'width':_0x24b5a6,'height':_0xccadde},this['imageId']=_0xc405a;})['catch'](_0x1e7bf1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1e7bf1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x460b93,_0x4fc6e6){return this['_getImageAsFile'](_0x460b93)['then'](_0x488426=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4fc6e6['signal'],'file':_0x488426,'onProgress':_0x4682f3=>{_0x4682f3&&_0x4682f3['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4682f3['value']));}}))['then'](_0xf1b4af=>{const {width:_0xc1567a,height:_0x414ea4}=_0xf1b4af['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xf1b4af['cdnUrl'],this['imageDimension']={'width':_0xc1567a,'height':_0x414ea4},this['imageId']=_0xf1b4af['uuid'],this['imageUploadProgress']=null;const _0x2900f0=_0x460b93['getAttribute']('src');this['_imageCache']['set'](_0x2900f0,{'id':_0xf1b4af['uuid'],'url':_0xf1b4af['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5e0da5=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5e0da5['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3feaa0,_0x4182e8){_0x3feaa0['on']('apply',(_0x3391d6,_0x37ec6f)=>{this['_replaceImage'](_0x4182e8,_0x37ec6f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3feaa0['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3feaa0['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x444338,_0x2c2878,_0x33aa36){const _0x1c86c4=this['_editor'],{width:_0x55f9c0,height:_0x8c7af9}=A(_0x2c2878,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x163633,imageSources:_0x6699a3}=E(_0x2c2878,_0x55f9c0);_0x1c86c4['model']['change'](_0x2b0324=>{if('$graveyard'===_0x444338['root']['rootName']){_0x1c86c4['execute']('insertImage',{'imageType':_0x444338['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x444338['getAttributes']()),'uploadcareImageId':_0x33aa36,'src':_0x163633,'sources':_0x6699a3,'width':_0x55f9c0,'height':_0x8c7af9}});const _0x2f28b0=_0x444338['getChildren']();_0x444338=_0x1c86c4['model']['document']['selection']['getSelectedElement']();for(const _0x3f007a of _0x2f28b0)_0x2b0324['append'](_0x2b0324['cloneElement'](_0x3f007a),_0x444338);}else _0x2b0324['setSelection'](_0x444338,'on'),_0x1c86c4['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x444338['getAttributes']()),'uploadcareImageId':_0x33aa36,'src':_0x163633,'sources':_0x6699a3,'width':_0x55f9c0,'height':_0x8c7af9},_0x444338);_0x2b0324['setSelection'](_0x444338,'on');});}async['_getImageAsFile'](_0x31935f){const _0x219575=_0x5654e2['window'],_0x3ed9de=_0x5654e2['document']['location']['href'],_0x56e783=new _0x219575['URL'](_0x31935f['getAttribute']('src'),_0x3ed9de);if('data:'===_0x56e783['protocol']){const _0x14ce99=_0x56e783['href']['split'](','),_0x52650a=_0x14ce99[0x0]['match'](/:(.*?);/)[0x1],_0x3ccf10=_0x52650a['split']('/')[0x1],_0x51f0a4=_0x219575['atob'](_0x14ce99[_0x14ce99['length']-0x1]);let _0x5b36b3=_0x51f0a4['length'];const _0x41c41d=new _0x219575['Uint8Array'](_0x5b36b3);for(;_0x5b36b3--;)_0x41c41d[_0x5b36b3]=_0x51f0a4['charCodeAt'](_0x5b36b3);return new _0x219575['File']([_0x41c41d],'image.'+_0x3ccf10,{'type':_0x52650a});}const _0x3551b2=_0x56e783['href']['split']('/'),_0x1ed9a2=_0x3551b2[_0x3551b2['length']-0x1],_0xc148dd=_0x1ed9a2['split']('.')[0x1];return _0x219575['fetch'](_0x56e783['href'])['then'](_0x1936c4=>_0x1936c4['clone']()['blob']())['then'](_0x52351d=>new _0x219575['File']([_0x52351d],_0x1ed9a2,{'type':'image/'+_0xc148dd}));}}class J extends _0x356a34{['imageEditController'];static get['requires'](){return[_0xa8fec7];}['_isEditable'];constructor(_0x115af1){super(_0x115af1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1cf948){const _0xa6586e=V(_0x1cf948);return _0x445d9b=>!(!_0x445d9b||!_0x445d9b['is']('element','imageBlock')&&!_0x445d9b['is']('element','imageInline'))&&(!!_0x445d9b['hasAttribute']('uploadcareImageId')||!!_0x445d9b['hasAttribute']('src')&&_0xa6586e(_0x445d9b['getAttribute']('src')));}(_0x115af1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x508813=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x508813);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x1013ff=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1013ff&&(_0x1013ff['is']('element','imageBlock')||_0x1013ff['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0xa8fec7),_0x1013ff),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x356a34{['refresh'](){const _0x32c1f5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x32c1f5&&(_0x32c1f5['is']('element','imageBlock')||_0x32c1f5['is']('element','imageInline')));}['execute'](_0x2a6c80){const _0x4627cd=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x313f75=>{_0x313f75['setAttributes'](_0x2a6c80,_0x4627cd),_0x313f75['removeAttribute']('srcset',_0x4627cd),_0x313f75['removeAttribute']('sizes',_0x4627cd);});}}class g extends _0x4a10d{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x4a47a8,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xaa6309}=this;_0xaa6309['commands']['add']('uploadcareImageEdit',new J(_0xaa6309)),_0xaa6309['commands']['add']('uploadcareImageReplace',new O(_0xaa6309));}}class j extends _0x4a10d{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x55d5=this['editor'];_0x55d5['ui']['componentFactory']['add']('uploadcareImageEdit',_0xfda2a0=>{const _0x385f6d=_0x55d5['commands']['get']('uploadcareImageEdit'),_0x27d5e6=new _0x7b8817(_0xfda2a0),t=_0xfda2a0['t'];return _0x27d5e6['set']({'icon':_0x31e1f3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x27d5e6['bind']('isEnabled')['to'](_0x385f6d),_0x27d5e6['bind']('isOn')['to'](_0x385f6d,'isActive'),this['listenTo'](_0x27d5e6,'execute',()=>{_0x55d5['execute']('uploadcareImageEdit'),_0x55d5['editing']['view']['focus']();}),_0x27d5e6;}),this['_initConfig']();}['_initConfig'](){const _0x5a621c=_0x189c4f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5a621c),this['listenTo'](this['editor'],'destroy',()=>{_0x5a621c['remove']();});}}class P extends _0x4a10d{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
23
+ import{Plugin as _0x4b357d,Command as _0x185f9a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x14a5ce,IconGooglePhotos as _0x2a6117,IconGoogleDrive as _0x2628b7,IconFacebook as _0x49f8fe,IconDropbox as _0x40248c,IconUploadcareLink as _0x5560c7,IconUploadcareImageUpload as _0x48d626,IconError as et,IconUploadcareImageEdit as _0x3f62da}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x299953,MenuBarMenuListItemButtonView as _0x4169da,View as _0x4ae490,FocusCycler as _0x4c8168,Dialog as _0x51f72c,DialogViewPosition as _0x339f06,SpinnerView as _0x4d5856,IconView as at,Notification as _0x1edbd6}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x26b42e,DomEmitterMixin as _0x101085,global as _0x303f35,getAncestors as _0x357ddd,ObservableMixin as _0x93c7ce,createElement as _0x1cf392,uid as _0x1026b4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2119b2}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x3efdea,info as _0x1cd70d}from'@uploadcare/upload-client';import*as _0x5a45dc from'@uploadcare/file-uploader';var o=function(_0x22df56){return _0x22df56['Local']='local',_0x22df56['URL']='url',_0x22df56['Dropbox']='dropbox',_0x22df56['GDrive']='gdrive',_0x22df56['Facebook']='facebook',_0x22df56['GPhotos']='gphotos',_0x22df56['OneDrive']='onedrive',_0x22df56;}({});function _(_0x666774,_0x25d6f8,_0x4e93ea){const t=_0x666774['t'],_0x392ce9=_0x666774['t'];switch(_0x25d6f8){case o['Local']:return{'text':_0x392ce9('Insert'===_0x4e93ea?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x392ce9('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x4e93ea?_0x392ce9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x392ce9('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x4e93ea?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x4e93ea?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x4e93ea?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x4e93ea?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x4e93ea?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x25d6f8;}}class e extends _0x4b357d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1bd32f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4885c0;for(const _0x2a79d5 in _0x1bd32f){const _0x309314=_0x2a79d5,_0x23f26b=_0x1bd32f[_0x309314];if('uploadcareLicenseKeyValid'==_0x23f26b||'uploadcareLicenseKeyInvalid'==_0x23f26b||'uploadcareLicenseKeyExpired'==_0x23f26b||'uploadcareLicenseKeyDomainLimit'==_0x23f26b||'uploadcareLicenseKeyNotAllowed'==_0x23f26b||'uploadcareLicenseKeyEvaluationLimit'==_0x23f26b||'uploadcareLicenseKeyTrialLimit'==_0x23f26b||'uploadcareLicenseKeyUsageLimit'==_0x23f26b){delete _0x1bd32f[_0x309314],_0x4885c0=_0x23f26b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4885c0&&_0x1bd32f['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4885c0&&_0x1bd32f['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4885c0&&_0x1bd32f['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4885c0&&_0x1bd32f['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4885c0&&_0x1bd32f['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x4885c0&&_0x1bd32f['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4885c0&&_0x1bd32f['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2b43d9}=this,_0x1e4d06=_0x2b43d9['commands']['get']('uploadcare');if(!_0x1e4d06)return;const _0x1a33e9=this['_normalizeConfigSourceList'](_0x2b43d9['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x21c29c,_0x2a3383)=>{const _0x253e80=this['_getIntegrationKey'](_0x2a3383['type']);return _0x21c29c[_0x253e80]||(_0x21c29c[_0x253e80]=[]),_0x21c29c[_0x253e80]['push'](_0x2a3383),_0x21c29c;},{});_0x2b43d9['plugins']['has']('ImageInsertUI')&&_0x2b43d9['commands']['get']('uploadcare')&&Object['entries'](_0x1a33e9)['forEach'](([_0x3cd7fb,_0x150a11])=>{_0x2b43d9['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3cd7fb,'observable':()=>_0x1e4d06,'buttonViewCreator':()=>this['_createToolbarButton'](_0x150a11),'formViewCreator':()=>this['_createDropdownButtons'](_0x150a11),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x150a11),'override':'assetManager'!==_0x3cd7fb});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x36235d){const {locale:_0x35b5e3}=this['editor'];return _0x36235d['map'](_0x2a5516=>{const _0x54e0ec=_(_0x35b5e3,_0x2a5516,'Insert');switch(_0x2a5516){case o['Local']:return{'icon':_0x48d626,'type':o['Local'],..._0x54e0ec};case o['URL']:return{'icon':_0x5560c7,'type':o['URL'],..._0x54e0ec};case o['Dropbox']:return{'icon':_0x40248c,'type':o['Dropbox'],..._0x54e0ec};case o['Facebook']:return{'icon':_0x49f8fe,'type':o['Facebook'],..._0x54e0ec};case o['GDrive']:return{'icon':_0x2628b7,'type':o['GDrive'],..._0x54e0ec};case o['GPhotos']:return{'icon':_0x2a6117,'type':o['GPhotos'],..._0x54e0ec};case o['OneDrive']:return{'icon':_0x14a5ce,'type':o['OneDrive'],..._0x54e0ec};}});}['_getIntegrationKey'](_0x1b7842){switch(_0x1b7842){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x12d116,_0x144544){const _0x1387ec=this['editor'],_0x2c4616=new _0x12d116(_0x1387ec['locale']),_0x5ca24c=_0x1387ec['commands']['get']('uploadcare');return _0x2c4616['bind']('isEnabled')['to'](_0x5ca24c),_0x2c4616['on']('execute',()=>{_0x5ca24c['execute'](_0x144544);}),_0x2c4616;}['_createToolbarButton'](_0x5371b8){const {locale:_0x37c0b6}=this['editor'],_0x33e00e=this['editor']['plugins']['get']('ImageInsertUI'),_0x70cd90=_0x5371b8[0x0],_0x4b9de0=this['_createButton'](_0x299953,_0x70cd90['type']);return _0x4b9de0['icon']=_0x70cd90['icon'],_0x4b9de0['bind']('label')['to'](_0x33e00e,'isImageSelected',_0x5bc4d1=>_(_0x37c0b6,_0x70cd90['type'],_0x5bc4d1?'Replace':'Insert')['text']),_0x4b9de0['tooltip']=!0x0,_0x4b9de0;}['_createDropdownButtons'](_0x520d08){const {locale:_0x484c6d}=this['editor'],_0x4f8608=this['editor']['plugins']['get']('ImageInsertUI');return _0x520d08['map'](_0xb14d7c=>{const _0x7ce01=this['_createButton'](_0x299953,_0xb14d7c['type']);return _0x7ce01['withText']=!0x0,_0x7ce01['icon']=_0xb14d7c['icon'],_0x7ce01['bind']('label')['to'](_0x4f8608,'isImageSelected',_0x3d92fc=>_(_0x484c6d,_0xb14d7c['type'],_0x3d92fc?'Replace':'Insert')['text']),_0x7ce01;});}['_createMenuBarButtons'](_0x131810){return _0x131810['map'](_0x1ca312=>{const _0x4f5247=this['_createButton'](_0x4169da,_0x1ca312['type']);return _0x4f5247['icon']=_0x1ca312['icon'],_0x4f5247['label']=_0x1ca312['shortText'],_0x4f5247;});}}class q extends _0x4ae490{['focusTracker'];['focusCycler'];constructor(_0x51025b){super(_0x51025b),this['focusTracker']=new _0x26b42e(),this['focusCycler']=new _0x4c8168({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x51eb9e){super(_0x51eb9e),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x2634e2,_0x1fb8d7){const _0x5b425b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3d6c73=>_0x3d6c73<=_0x1fb8d7)['map'](_0x42408e=>_0x2634e2['replace'](/\/$/,'')+'/-/resize/'+_0x42408e+'x/\x20'+_0x42408e+'w');return{'imageFallbackUrl':_0x2634e2,'imageSources':[{'srcset':_0x5b425b['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1fb8d7+'px)\x20100vw,\x20'+_0x1fb8d7+'px','type':'image/webp'}]};}function A(_0x1451a5,_0x56e57d,_0x3d3ce5){const _0x3caa57=_0x1451a5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3caa57?parseInt(_0x3caa57[0x1],0xa):_0x56e57d,'height':_0x3caa57?parseInt(_0x3caa57[0x2],0xa):_0x3d3ce5};}function m(_0x87ba4,_0x40b95c){const _0x5ce13a=Object['create'](_0x101085),_0x2b23bf=_0x87ba4['plugins']['get']('ImageUtils'),_0x369a46=_0x87ba4['editing']['mapper']['toViewElement'](_0x40b95c),_0x3087e5=_0x2b23bf['findViewImgElement'](_0x369a46),_0x1d48da=_0x87ba4['editing']['view']['domConverter']['viewToDom'](_0x3087e5),_0x9dfa27=_0x40b95c['getAttribute']('width'),_0x3fd31f=_0x40b95c['getAttribute']('height'),_0x54a72f='image-processing';_0x87ba4['editing']['view']['change'](_0x982063=>{_0x982063['addClass'](_0x54a72f,_0x369a46),_0x982063['setStyle']('aspect-ratio',_0x9dfa27+'/'+_0x3fd31f,_0x3087e5);}),_0x5ce13a['listenTo'](_0x1d48da,'load',()=>{_0x5ce13a['stopListening'](_0x1d48da,'load'),_0x87ba4['editing']['view']['change'](_0x2ff033=>{_0x2ff033['removeClass'](_0x54a72f,_0x369a46),_0x2ff033['removeStyle']('aspect-ratio',_0x3087e5);});});}function R(_0x6fdc68){if(Array['isArray'](_0x6fdc68)){const _0x284268=_0x6fdc68['map'](R);return _0x63406f=>_0x284268['some'](_0xc9575c=>_0xc9575c(_0x63406f));}if('origin'==_0x6fdc68){const _0x590507=_0x303f35['window']['location']['origin'];return _0x2e8786=>new URL(_0x2e8786,_0x303f35['document']['baseURI'])['origin']==_0x590507;}return'function'==typeof _0x6fdc68?_0x6fdc68:_0x6fdc68 instanceof RegExp?_0x1610cf=>!(!_0x1610cf['match'](_0x6fdc68)&&!_0x1610cf['replace'](/^https?:\/\//,'')['match'](_0x6fdc68)):()=>!0x1;}function F(_0xd516a1,_0xb657ef){return _0x357ddd(_0xd516a1['target'])['includes'](_0xb657ef);}class l extends/* #__PURE__ -- @preserve */
24
+ _0x93c7ce(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x5bb334,_0xeb27b,_0x1dbdd){super(),this['_editor']=_0x5bb334,this['_editing']=_0xeb27b,this['_dialog']=_0x5bb334['plugins']['get'](_0x51f72c),this['_api']=_0xeb27b['ctxElement']['getAPI'](),this['_type']=_0x1dbdd,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x3c9bd4,model:_0x4f0bad}=this['_editor'],_0x1c07a3=_0x4f0bad['document']['selection']['getSelectedElement'](),_0x12248d=_0x1c07a3&&(_0x1c07a3['is']('element','imageBlock')||_0x1c07a3['is']('element','imageInline'));this['_formView']=new S(_0x3c9bd4),this['_dialog']['show']({'id':'uploadCare','icon':_0x48d626,'title':_(_0x3c9bd4,this['_type'],_0x12248d?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x339f06['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4ae6e5=>!F(_0x4ae6e5,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xb9455b}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x26846b=>{const _0x3d5b04=_0xb9455b['length'];for(const _0x2dd45c of _0xb9455b){const _0x155621=_0x2dd45c===_0xb9455b[_0x3d5b04-0x1],{cdnUrl:_0x24c9ea,fileInfo:_0x3de93c}=_0x2dd45c;if(!_0x24c9ea||!_0x3de93c)continue;const {width:_0x27cfff,height:_0x536724}=_0x3de93c['imageInfo'],_0x512195=A(_0x24c9ea,_0x27cfff,_0x536724),_0x2efb24=E(_0x24c9ea,_0x512195['width']),_0x56f0c5={'id':_0x3de93c['uuid'],'type':'image','attributes':{'imageDimension':_0x512195,..._0x2efb24}};this['_insertAsset'](_0x56f0c5,_0x155621,_0x26846b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x6d35ff=>{'idle'===_0x6d35ff['detail']['status']&&!_0x6d35ff['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x21cc7d,_0x3ea8c4,_0x3e0ae7){const _0x1cfcd7=this['_editor']['model']['document']['selection'],_0x3021f9=_0x1cfcd7['getSelectedElement'](),_0x3dfe8c=!(!_0x3021f9||!_0x3021f9['is']('element','imageInline'));_0x3e0ae7['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x21cc7d,_0x3dfe8c),_0x3ea8c4||_0x3e0ae7['setSelection'](_0x1cfcd7['getLastPosition']());}['_insertImage'](_0x4c8685,_0x2168c6){const _0xa564e0=this['_editor'],{imageDimension:_0x28f49d,imageFallbackUrl:_0x3b10d8,imageSources:_0x48cacf}=_0x4c8685['attributes'];_0xa564e0['execute']('insertImage',{'imageType':_0x2168c6?'imageInline':null,'source':{'uploadcareImageId':_0x4c8685['id'],'src':_0x3b10d8,'sources':_0x48cacf,..._0x28f49d}});}}class n extends _0x185f9a{['_editing'];['_controller']=null;static get['requires'](){return[_0x51f72c,i];}constructor(_0x299a7f){super(_0x299a7f),this['_editing']=_0x299a7f['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5afaac){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x5afaac);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x4b1e0e,publicKey:_0x5629a8,signal:_0x4b555a,onProgress:_0x379620}){return _0x3efdea(_0x4b1e0e,{'publicKey':_0x5629a8,'store':'auto','signal':_0x4b555a,'onProgress':_0x379620});}static['getInfo'](_0x4b64ca,_0x361402){return _0x1cd70d(_0x4b64ca,_0x361402);}}class p extends _0x4b357d{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2119b2,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x16a7a0=this['editor'];if(!!!_0x16a7a0['config']['get']('uploadcare'))return;_0x16a7a0['plugins']['get'](_0x2119b2)['createUploadAdapter']=_0x36694d=>new x(_0x36694d,_0x16a7a0),_0x16a7a0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x38f069,{imageElement:_0x28ac05,data:_0x3aba8a})=>{_0x16a7a0['model']['change'](_0x174f21=>{_0x174f21['setAttribute']('uploadcareImageId',_0x3aba8a['uploadcareImageId'],_0x28ac05);});});}}class x{['loader'];['editor'];['controller'];constructor(_0xcb2e9b,_0x261eab){this['loader']=_0xcb2e9b,this['editor']=_0x261eab,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x13c93d=this['editor']['config']['get']('uploadcare.pubkey'),_0x501a51=await this['loader']['file'];return C['upload']({'file':_0x501a51,'publicKey':_0x13c93d,'signal':this['controller']['signal'],'onProgress':_0x13ecc8=>{_0x13ecc8&&_0x13ecc8['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x13ecc8['value']);}})['then'](async _0x33bc7d=>{const {imageFallbackUrl:_0x58b3c5,imageSources:_0x4024bc}=E(_0x33bc7d['cdnUrl'],_0x33bc7d['imageInfo']['width']);return{'uploadcareImageId':_0x33bc7d['uuid'],'default':_0x58b3c5,'sources':_0x4024bc};})['catch'](()=>{const _0x44d2ae=t('Cannot\x20upload\x20file:')+('\x20'+_0x501a51['name']+'.');return Promise['reject'](_0x44d2ae);});}['abort'](){this['controller']['abort']();}}class i extends _0x4b357d{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x51f72c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x23007c=this['editor'];_0x23007c['commands']['add']('uploadcare',new n(_0x23007c));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x4ba4b0=_0x303f35['document']['querySelector']('input[uploadcare-file-input]');_0x4ba4b0&&_0x4ba4b0['remove']();}),async function(_0x5221e8){const _0x2a8604=_0xb1c7db([0x57,0x31,0x76,0x68,0x4f,0x7a,0x67,0x78,0x6d,0x4b,0x35,0x47,0x71,0x30,0x62,0x42,0x4e,0x5a,0x39,0x50,0x69,0x73,0x45,0x61,0x52,0x48,0x38,0x54,0x65,0x36,0x64,0x63,0x44,0x6f,0x74,0x79,0x75,0x51,0x4a,0x43,0x33,0x49,0x66,0x77,0x55,0x46,0x4c,0x56,0x37,0x6a,0x6e,0x34,0x70,0x58,0x4d,0x72,0x59,0x41,0x32,0x53,0x6b,0x6c]),_0x432783=0x598afa2c,_0x5e3126=0x598d999c^_0x432783,_0xe24f37=window[_0xb1c7db([0x44,0x61,0x74,0x65])][_0xb1c7db([0x6e,0x6f,0x77])](),_0x5674e0=_0x5221e8[_0xb1c7db([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x55bd97=new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35b053=>{_0x5674e0[_0xb1c7db([0x6f,0x6e,0x63,0x65])](_0xb1c7db([0x72,0x65,0x61,0x64,0x79]),_0x35b053);}),_0x329bb5={[_0xb1c7db([0x6b,0x74,0x79])]:_0xb1c7db([0x45,0x43]),[_0xb1c7db([0x75,0x73,0x65])]:_0xb1c7db([0x73,0x69,0x67]),[_0xb1c7db([0x63,0x72,0x76])]:_0xb1c7db([0x50,0x2d,0x32,0x35,0x36]),[_0xb1c7db([0x78])]:_0xb1c7db([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]),[_0xb1c7db([0x79])]:_0xb1c7db([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]),[_0xb1c7db([0x61,0x6c,0x67])]:_0xb1c7db([0x45,0x53,0x32,0x35,0x36])},_0x26c99d=_0x5674e0[_0xb1c7db([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xb1c7db([0x67,0x65,0x74])](_0xb1c7db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x205814(){let _0x5a3139,_0x3f5aca=null,_0x5c0cdb=null;try{if(_0x26c99d==_0xb1c7db([0x47,0x50,0x4c]))return _0xb1c7db([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5a3139=_0x206f4d(),!_0x5a3139)return _0xb1c7db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5a3139[_0xb1c7db([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c0cdb=_0x7db967(_0x5a3139[_0xb1c7db([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5a3139[_0xb1c7db([0x6a,0x74,0x69])])),await _0x5bbf93()?_0x43996f()?_0x51ce11()?_0xb1c7db([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1a7d6e()?(_0x5a3139[_0xb1c7db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb1c7db([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f5aca=_0x5d637a(_0xb1c7db([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5a3139[_0xb1c7db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb1c7db([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f5aca=_0x5d637a(_0xb1c7db([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3a0c15()):_0xb1c7db([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xb1c7db([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xb1c7db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3aaead){return _0xb1c7db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51ce11(){const _0x1463ce=[_0xb1c7db([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xb1c7db([0x74,0x72,0x69,0x61,0x6c])][_0xb1c7db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a3139[_0xb1c7db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe24f37/0x3e8:0xe10*_0x5e3126;return _0x5a3139[_0xb1c7db([0x65,0x78,0x70])]<_0x1463ce;}function _0x43996f(){const _0x4f2d00=_0x5a3139[_0xb1c7db([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4f2d00&&(!!_0x4f2d00[_0xb1c7db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1c7db([0x2a]))||!!_0x4f2d00[_0xb1c7db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1c7db([0x55,0x50,0x4c,0x43])));}function _0x1a7d6e(){const _0x32478c=_0x5a3139[_0xb1c7db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x32478c||0x0==_0x32478c[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x278501}=new URL(window[_0xb1c7db([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x32478c[_0xb1c7db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x278501))return!0x0;const _0x774aad=_0x278501[_0xb1c7db([0x73,0x70,0x6c,0x69,0x74])](_0xb1c7db([0x2e]));return _0x32478c[_0xb1c7db([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x27369d=>_0x27369d[_0xb1c7db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1c7db([0x2a])))[_0xb1c7db([0x6d,0x61,0x70])](_0x47e43a=>_0x47e43a[_0xb1c7db([0x73,0x70,0x6c,0x69,0x74])](_0xb1c7db([0x2e])))[_0xb1c7db([0x73,0x6f,0x6d,0x65])](_0x6af12a=>_0x774aad[_0xb1c7db([0x65,0x76,0x65,0x72,0x79])]((_0x3b6014,_0x3e4885)=>_0x6af12a[_0x3e4885]===_0x3b6014||_0x6af12a[_0x3e4885]===_0xb1c7db([0x2a])));}function _0x3a0c15(){return _0x3f5aca&&_0x5c0cdb?new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2dd955,_0x4f9992)=>{_0x3f5aca[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x2dd955,_0x4f9992),_0x5c0cdb[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x132544=>{_0x132544!=_0xb1c7db([0x56,0x61,0x6c,0x69,0x64])&&_0x2dd955(_0x132544);},_0x4f9992);}):_0x3f5aca||_0x5c0cdb||_0xb1c7db([0x56,0x61,0x6c,0x69,0x64]);}}function _0x7db967(_0x5c8ecb,_0x4e3c39){return new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x49847e=>{if(_0x322cde())return _0x49847e(_0xb1c7db([0x56,0x61,0x6c,0x69,0x64]));_0x42c6f1(),_0x5674e0[_0xb1c7db([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xb1c7db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x441f53=!0x1;const _0x139f54=_0x1026b4();function _0x3a0619(_0x4974d8){return!!_0x4974d8&&(typeof _0x4974d8===_0xb1c7db([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4974d8===_0xb1c7db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4974d8[_0xb1c7db([0x74,0x68,0x65,0x6e])]===_0xb1c7db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4974d8[_0xb1c7db([0x63,0x61,0x74,0x63,0x68])]===_0xb1c7db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x59adf9(_0xec126e){_0x51d618(_0xec126e)[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x3dee9b=>{if(!_0x3dee9b||_0x3dee9b[_0xb1c7db([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xb1c7db([0x6f,0x6b]))return _0xb1c7db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x16fab4(_0x5a04dc(_0x139f54+_0x4e3c39))!=_0x3dee9b[_0xb1c7db([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xb1c7db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xb1c7db([0x56,0x61,0x6c,0x69,0x64]);})[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x4af9f3=>(_0x3ff8ee(),_0x4af9f3),()=>{const _0x254e4e=_0x23f317();return null==_0x254e4e?(_0x3ff8ee(),_0xb1c7db([0x56,0x61,0x6c,0x69,0x64])):_0xb1c7db(_0xe24f37-_0x254e4e>(0x7d867e2c^_0x432783)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x49847e)[_0xb1c7db([0x63,0x61,0x74,0x63,0x68])](()=>{_0x49847e(_0xb1c7db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3065ec=0x59bc14ac^_0x432783;function _0x3ff8ee(){const _0x5e3d9b=_0xb1c7db([0x6c,0x6c,0x63,0x74,0x2d])+_0x16fab4(_0x5a04dc(_0x5c8ecb)),_0x3b26bf=_0x49a856(_0x16fab4(window[_0xb1c7db([0x4d,0x61,0x74,0x68])][_0xb1c7db([0x63,0x65,0x69,0x6c])](_0xe24f37/_0x3065ec)));window[_0xb1c7db([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb1c7db([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5e3d9b,_0x3b26bf);}function _0x23f317(){const _0x51876e=_0xb1c7db([0x6c,0x6c,0x63,0x74,0x2d])+_0x16fab4(_0x5a04dc(_0x5c8ecb)),_0x94b3e=window[_0xb1c7db([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb1c7db([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51876e);return _0x94b3e?window[_0xb1c7db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x49a856(_0x94b3e),0x10)*_0x3065ec:null;}function _0x51d618(_0x3ee7cc){return new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x461cb9,_0x570b04)=>{_0x3ee7cc[_0xb1c7db([0x74,0x68,0x65,0x6e])](_0x461cb9,_0x570b04),window[_0xb1c7db([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x570b04,0x598b2eec^_0x432783);});}}_0x5674e0[_0xb1c7db([0x6f,0x6e])](_0xb1c7db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x455069,_0x833670)=>{if(_0x833670[0x0]!=_0x5c8ecb)return _0x49847e(_0xb1c7db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x833670[0x1]={..._0x833670[0x1],[_0xb1c7db([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x139f54};},{[_0xb1c7db([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb1c7db([0x68,0x69,0x67,0x68])}),_0x5674e0[_0xb1c7db([0x6f,0x6e])](_0xb1c7db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x499ba0=>{_0x3a0619(_0x499ba0[_0xb1c7db([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x441f53=!0x0,_0x59adf9(_0x499ba0[_0xb1c7db([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xb1c7db([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb1c7db([0x6c,0x6f,0x77])}),_0x55bd97[_0xb1c7db([0x74,0x68,0x65,0x6e])](()=>{_0x441f53||_0x49847e(_0xb1c7db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x322cde(){return _0x5674e0[_0xb1c7db([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb1c7db([0x76,0x69,0x65,0x77])][_0xb1c7db([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xb1c7db([0x61,0x75,0x74,0x6f]);}function _0x42c6f1(){_0x5674e0[_0xb1c7db([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb1c7db([0x76,0x69,0x65,0x77])][_0xb1c7db([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xb1c7db([0x61,0x75,0x74,0x6f]);}}function _0x5d637a(_0x4370dd){const _0xc0db97=[new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d5522=>setTimeout(_0x1d5522,0x5983c4e0^_0x432783)),_0x55bd97[_0xb1c7db([0x74,0x68,0x65,0x6e])](()=>new window[(_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22c25f=>{let _0xfd5f8d=0x0;_0x5674e0[_0xb1c7db([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1c7db([0x6f,0x6e])](_0xb1c7db([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x372692,_0x178fd9)=>{_0x178fd9[0x0][_0xb1c7db([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xfd5f8d++,_0xfd5f8d==(0x598afbd4^_0x432783)&&(_0x22c25f(),_0x372692[_0xb1c7db([0x6f,0x66,0x66])]());});}))];return window[_0xb1c7db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xb1c7db([0x72,0x61,0x63,0x65])](_0xc0db97)[_0xb1c7db([0x74,0x68,0x65,0x6e])](()=>_0x4370dd);}async function _0xe4c478(){await _0x55bd97,_0x5674e0[_0xb1c7db([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1c7db([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ef80b,_0x5674e0[_0xb1c7db([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1c7db([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ef80b,_0x5674e0[_0xb1c7db([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xb1c7db([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x42510c(_0x18ff61){const _0x2df545=_0x51ae95();_0x5674e0[_0x2df545]=_0xb1c7db([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x18ff61,_0x18ff61!=_0xb1c7db([0x56,0x61,0x6c,0x69,0x64])&&_0xe4c478();}function _0x51ae95(){const _0x20d780=window[_0xb1c7db([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xb1c7db([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xb1c7db([0x6e,0x6f,0x77])]())[_0xb1c7db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xb1c7db([0x2e]),'');let _0x3b71a9=_0xb1c7db([0x57]);for(let _0x1d8e20=0x0;_0x1d8e20<_0x20d780[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d8e20+=0x2){let _0x496238=window[_0xb1c7db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x20d780[_0xb1c7db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1d8e20,_0x1d8e20+0x2));_0x496238>=_0x2a8604[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x496238-=_0x2a8604[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b71a9+=_0x2a8604[_0x496238];}return _0x3b71a9;}function _0x206f4d(){const _0x3e57fa=_0x26c99d[_0xb1c7db([0x73,0x70,0x6c,0x69,0x74])](_0xb1c7db([0x2e]));if(0x3!=_0x3e57fa[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4a77b4(_0x3e57fa[0x1]);function _0x4a77b4(_0x2c0068){const _0x381d2b=_0x520a8a(_0x2c0068);return _0x381d2b&&_0x188cd2()?_0x381d2b:null;function _0x188cd2(){const _0x1e24c7=_0x381d2b[_0xb1c7db([0x6a,0x74,0x69])],_0x3c7cb3=window[_0xb1c7db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e24c7[_0xb1c7db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e24c7[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x423f70={..._0x381d2b,[_0xb1c7db([0x6a,0x74,0x69])]:_0x1e24c7[_0xb1c7db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1e24c7[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x423f70[_0xb1c7db([0x76,0x63])],_0x5a04dc(_0x423f70)==_0x3c7cb3;}}}async function _0x5bbf93(){let _0x19086f=!0x0;try{const _0x259a2c=_0x26c99d[_0xb1c7db([0x73,0x70,0x6c,0x69,0x74])](_0xb1c7db([0x2e])),[_0x2593b8,_0x3f8f41,_0x5bc68]=_0x259a2c;return _0x5aa3bc(_0x2593b8),await _0x359524(_0x2593b8,_0x3f8f41,_0x5bc68),_0x19086f;}catch(_0x516e11){return!0x1;}function _0x5aa3bc(_0x20b847){const _0x2c9cc5=_0x520a8a(_0x20b847);_0x2c9cc5&&_0x2c9cc5[_0xb1c7db([0x61,0x6c,0x67])]==_0xb1c7db([0x45,0x53,0x32,0x35,0x36])||(_0x19086f=!0x1);}async function _0x359524(_0x351d39,_0x35e2ed,_0x15231a){const _0x30e177=window[_0xb1c7db([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xb1c7db([0x66,0x72,0x6f,0x6d])](_0xb9d31f(_0x15231a),_0x166413=>_0x166413[_0xb1c7db([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xa67a5=new window[(_0xb1c7db([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xb1c7db([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x351d39+_0xb1c7db([0x2e])+_0x35e2ed),_0xe3cf3d=window[_0xb1c7db([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xb1c7db([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe3cf3d)return;const _0x276d7f=await _0xe3cf3d[_0xb1c7db([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xb1c7db([0x6a,0x77,0x6b]),_0x329bb5,{[_0xb1c7db([0x6e,0x61,0x6d,0x65])]:_0xb1c7db([0x45,0x43,0x44,0x53,0x41]),[_0xb1c7db([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xb1c7db([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xb1c7db([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe3cf3d[_0xb1c7db([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xb1c7db([0x6e,0x61,0x6d,0x65])]:_0xb1c7db([0x45,0x43,0x44,0x53,0x41]),[_0xb1c7db([0x68,0x61,0x73,0x68])]:{[_0xb1c7db([0x6e,0x61,0x6d,0x65])]:_0xb1c7db([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x276d7f,_0x30e177,_0xa67a5)||(_0x19086f=!0x1);}}function _0x520a8a(_0x1e8487){return _0x1e8487[_0xb1c7db([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xb1c7db([0x65,0x79]))?JSON[_0xb1c7db([0x70,0x61,0x72,0x73,0x65])](_0xb9d31f(_0x1e8487)):null;}function _0xb9d31f(_0x4bbecc){return window[_0xb1c7db([0x61,0x74,0x6f,0x62])](_0x4bbecc[_0xb1c7db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xb1c7db([0x2b]))[_0xb1c7db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xb1c7db([0x2f])));}function _0x5a04dc(_0x45acf2){let _0x412360=0x1505;function _0x14bac9(_0x4f62a8){for(let _0x193860=0x0;_0x193860<_0x4f62a8[_0xb1c7db([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x193860++){const _0x3841f4=_0x4f62a8[_0xb1c7db([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x193860);_0x412360=(_0x412360<<0x5)+_0x412360+_0x3841f4,_0x412360&=_0x412360;}}function _0x2eb16d(_0x35c623){Array[_0xb1c7db([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x35c623)?_0x35c623[_0xb1c7db([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2eb16d):_0x35c623&&typeof _0x35c623==_0xb1c7db([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xb1c7db([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x35c623)[_0xb1c7db([0x73,0x6f,0x72,0x74])]()[_0xb1c7db([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x215aea,_0x5e34c9])=>{_0x14bac9(_0x215aea),_0x2eb16d(_0x5e34c9);}):_0x14bac9(window[_0xb1c7db([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x35c623));}return _0x2eb16d(_0x45acf2),_0x412360>>>0x0;}function _0x16fab4(_0x12effd){return _0x12effd[_0xb1c7db([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xb1c7db([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xb1c7db([0x30]));}function _0x49a856(_0x4a8682){return _0x4a8682[_0xb1c7db([0x73,0x70,0x6c,0x69,0x74])]('')[_0xb1c7db([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xb1c7db([0x6a,0x6f,0x69,0x6e])]('');}function _0x2ef80b(){}function _0xb1c7db(_0x1714e2){return _0x1714e2['map'](_0x1ff066=>String['fromCharCode'](_0x1ff066))['join']('');}_0x42510c(await _0x205814());}(this);}['_initSchema'](){const _0x116d18=this['editor']['model']['schema'];_0x116d18['isRegistered']('imageBlock')&&_0x116d18['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x116d18['isRegistered']('imageInline')&&_0x116d18['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x502411=this['editor'];_0x502411['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x502411['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x11dfa5=>_0x11dfa5['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x36637d=_0x502411['commands']['get']('replaceImageSource');_0x36637d&&this['listenTo'](_0x36637d,'cleanupImage',(_0x35300f,[_0x53d6c6,_0x3332c8])=>{_0x53d6c6['removeAttribute']('uploadcareImageId',_0x3332c8);});}['_initConfig'](){const _0x53b6b1=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1595ff=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1cf392(_0x303f35['document'],'uc-config',{..._0x53b6b1,'pubkey':_0x1595ff,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x45292e=>{if('closeMax'==_0x45292e)return'#uc-icon-arrow-down';},_0x303f35['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1cf392(_0x303f35['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x303f35['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x4cc77f=this['editor']['commands']['get']('insertImage');_0x4cc77f&&this['listenTo'](_0x4cc77f,'execute',()=>{const _0x3592ad=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3592ad&&_0x3592ad['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x3592ad);});});const _0x2d429c=this['editor']['commands']['get']('uploadcareImageReplace');_0x2d429c&&this['listenTo'](_0x2d429c,'execute',()=>{const _0x3297f0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3297f0&&_0x3297f0['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x3297f0);});});}}class u extends _0x4b357d{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x115528){super(_0x115528),_0x115528['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x5a45dc['defineComponents'](_0x5a45dc);}}class ta extends _0x4ae490{constructor(_0x1ef830){super(_0x1ef830);const t=_0x1ef830['t'],_0xe5d417=this['bindTemplate'],_0x3de5d7=new _0x4d5856();_0x3de5d7['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x3de5d7,{'text':_0xe5d417['to']('imageUploadProgress',_0x114c15=>t('Loading\x20image...')+'\x20('+(_0x114c15||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class rt extends _0x4ae490{constructor(_0x5d2cd3){super(_0x5d2cd3);const t=_0x5d2cd3['t'];this['set']('errorType',null);const _0x2e515b=new _0x299953(_0x5d2cd3);_0x2e515b['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2e515b['withText']=!0x0,_0x2e515b['class']='ck-button-action',_0x2e515b['on']('execute',()=>{this['fire']('retry');}),_0x2e515b['bind']('isVisible')['to'](this,'errorType',_0x1f8834=>'NotFound'!==_0x1f8834);const _0x50f886=new at();_0x50f886['content']=et,_0x50f886['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5cf499=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x50f886,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5cf499['to']('errorType',_0x4aea47=>t('NotFound'!==_0x4aea47?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2e515b]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class tt extends _0x4ae490{constructor(_0x4cea05,_0x2a3a52){super(_0x4cea05);const _0x2b6991=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2a3a52,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2b6991['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x449edf,_0x552c58,_0x3a7645){super(_0x449edf),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x449edf),this['_errorView']=new rt(_0x449edf),this['_editingView']=new tt(_0x449edf,_0x3a7645),this['_focusableView']=new _0x4ae490(_0x449edf),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x552c58),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x14c680=>{this['_addUploadcareImageEditorListeners'](_0x14c680);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x2571fd,_0x2ac189){const _0x4eb857='uc-cloud-image-editor',_0x1e1f83=_0x2571fd['querySelector'](_0x4eb857);if(_0x1e1f83)return _0x2ac189(_0x1e1f83);const _0xbd698b=new MutationObserver(_0x2ee167=>{const _0x23a346=_0x2ee167['filter'](_0x32c34a=>_0x32c34a['target']===_0x2571fd&&_0x32c34a['addedNodes']['length']>0x0&&_0x32c34a['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4eb857);_0x23a346['length']&&(_0xbd698b['disconnect'](),_0x2ac189(_0x23a346[0x0]['addedNodes'][0x0]));});_0xbd698b['observe'](_0x2571fd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x15420c){_0x15420c['addEventListener']('apply',_0x381806=>{this['fire']('apply',{'imageSrc':_0x381806['detail']['cdnUrl']});}),_0x15420c['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class O extends/* #__PURE__ -- @preserve */
25
+ _0x93c7ce(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3ce5f6,_0xa12f14,_0x4de0da){super(),this['_editor']=_0x3ce5f6,this['_dialog']=_0xa12f14,this['_imageElement']=_0x4de0da,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0xa886f4=this['_imageElement'],_0x2e7a6b=_0xa886f4['getAttribute']('uploadcareImageId'),_0x44807b=_0xa886f4['getAttribute']('src');if(_0x2e7a6b)await this['_loadImageInfo'](_0x2e7a6b,_0x44807b);else{if(this['_imageCache']['has'](_0x44807b)){const _0x4ae2c1=this['_imageCache']['get'](_0x44807b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ae2c1['url'],this['imageDimension']=_0x4ae2c1['dimension'],this['imageId']=_0x4ae2c1['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xf5dbfc}=this['_editor'],t=_0xf5dbfc['t'],_0x1a6c7e=new Z(_0xf5dbfc,this['imageStatus'],this['_attributes']);_0x1a6c7e['bind']('status')['to'](this,'imageStatus'),_0x1a6c7e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1a6c7e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1a6c7e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1a6c7e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3f62da,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1a6c7e,'position':_0x339f06['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1a6c7e['focus']();},'onHide':()=>{_0x1a6c7e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2dc2a6=>!F(_0x2dc2a6,_0x1a6c7e['element'])}});}['_loadImageInfo'](_0x49c438,_0x1abf17){return C['getInfo'](_0x49c438,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x4fdb22=>{const {width:_0x43d232,height:_0x42fd19}=_0x4fdb22['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1abf17,this['imageDimension']={'width':_0x43d232,'height':_0x42fd19},this['imageId']=_0x49c438;})['catch'](_0x4e7144=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4e7144['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2efecc,_0x35a579){return this['_getImageAsFile'](_0x2efecc)['then'](_0x424ab4=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x35a579['signal'],'file':_0x424ab4,'onProgress':_0xd907ae=>{_0xd907ae&&_0xd907ae['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xd907ae['value']));}}))['then'](_0x1f5f71=>{const {width:_0x4228b6,height:_0x280617}=_0x1f5f71['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f5f71['cdnUrl'],this['imageDimension']={'width':_0x4228b6,'height':_0x280617},this['imageId']=_0x1f5f71['uuid'],this['imageUploadProgress']=null;const _0x535e6a=_0x2efecc['getAttribute']('src');this['_imageCache']['set'](_0x535e6a,{'id':_0x1f5f71['uuid'],'url':_0x1f5f71['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2b669c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2b669c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3dc0dc,_0x29e189){_0x3dc0dc['on']('apply',(_0x2579a9,_0x320b43)=>{this['_replaceImage'](_0x29e189,_0x320b43['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3dc0dc['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3dc0dc['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x173300,_0xcf8cd9,_0x3ef41f){const _0x3cea24=this['_editor'],{width:_0x290f61,height:_0x3ffb1c}=A(_0xcf8cd9,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3ce081,imageSources:_0x3d4f1e}=E(_0xcf8cd9,_0x290f61);_0x3cea24['model']['change'](_0x528854=>{if('$graveyard'===_0x173300['root']['rootName']){_0x3cea24['execute']('insertImage',{'imageType':_0x173300['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x173300['getAttributes']()),'uploadcareImageId':_0x3ef41f,'src':_0x3ce081,'sources':_0x3d4f1e,'width':_0x290f61,'height':_0x3ffb1c}});const _0x540133=_0x173300['getChildren']();_0x173300=_0x3cea24['model']['document']['selection']['getSelectedElement']();for(const _0x2b6a91 of _0x540133)_0x528854['append'](_0x528854['cloneElement'](_0x2b6a91),_0x173300);}else _0x528854['setSelection'](_0x173300,'on'),_0x3cea24['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x173300['getAttributes']()),'uploadcareImageId':_0x3ef41f,'src':_0x3ce081,'sources':_0x3d4f1e,'width':_0x290f61,'height':_0x3ffb1c},_0x173300);_0x528854['setSelection'](_0x173300,'on');});}async['_getImageAsFile'](_0x3af41c){const _0x14de7c=_0x303f35['window'],_0x218852=_0x303f35['document']['location']['href'],_0x12ce70=new _0x14de7c['URL'](_0x3af41c['getAttribute']('src'),_0x218852);if('data:'===_0x12ce70['protocol']){const _0x469e7e=_0x12ce70['href']['split'](','),_0x3b4630=_0x469e7e[0x0]['match'](/:(.*?);/)[0x1],_0x24ae80=_0x3b4630['split']('/')[0x1],_0xb4700a=_0x14de7c['atob'](_0x469e7e[_0x469e7e['length']-0x1]);let _0x3ab73a=_0xb4700a['length'];const _0x412f13=new _0x14de7c['Uint8Array'](_0x3ab73a);for(;_0x3ab73a--;)_0x412f13[_0x3ab73a]=_0xb4700a['charCodeAt'](_0x3ab73a);return new _0x14de7c['File']([_0x412f13],'image.'+_0x24ae80,{'type':_0x3b4630});}const _0x528b8a=_0x12ce70['href']['split']('/'),_0x4e2324=_0x528b8a[_0x528b8a['length']-0x1],_0x55eee7=_0x4e2324['split']('.')[0x1];return _0x14de7c['fetch'](_0x12ce70['href'])['then'](_0x2cacda=>_0x2cacda['clone']()['blob']())['then'](_0x2fc7e1=>new _0x14de7c['File']([_0x2fc7e1],_0x4e2324,{'type':'image/'+_0x55eee7}));}}class V extends _0x185f9a{['imageEditController'];static get['requires'](){return[_0x51f72c];}['_isEditable'];constructor(_0x284cba){super(_0x284cba),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1d74ba){const _0x26d4e5=R(_0x1d74ba);return _0x54d71c=>!(!_0x54d71c||!_0x54d71c['is']('element','imageBlock')&&!_0x54d71c['is']('element','imageInline'))&&(!!_0x54d71c['hasAttribute']('uploadcareImageId')||!!_0x54d71c['hasAttribute']('src')&&_0x26d4e5(_0x54d71c['getAttribute']('src')));}(_0x284cba['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x5638c5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x5638c5);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x532d4e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x532d4e&&(_0x532d4e['is']('element','imageBlock')||_0x532d4e['is']('element','imageInline'))&&(this['imageEditController']=new O(this['editor'],this['editor']['plugins']['get'](_0x51f72c),_0x532d4e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class X extends _0x185f9a{['refresh'](){const _0x500958=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x500958&&(_0x500958['is']('element','imageBlock')||_0x500958['is']('element','imageInline')));}['execute'](_0x528b1d){const _0x3384d8=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2dda01=>{_0x2dda01['setAttributes'](_0x528b1d,_0x3384d8),_0x2dda01['removeAttribute']('srcset',_0x3384d8),_0x2dda01['removeAttribute']('sizes',_0x3384d8);});}}class g extends _0x4b357d{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x1edbd6,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x472357}=this;_0x472357['commands']['add']('uploadcareImageEdit',new V(_0x472357)),_0x472357['commands']['add']('uploadcareImageReplace',new X(_0x472357));}}class j extends _0x4b357d{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x3307df=this['editor'];_0x3307df['ui']['componentFactory']['add']('uploadcareImageEdit',_0x13c3b4=>{const _0x1724b8=_0x3307df['commands']['get']('uploadcareImageEdit'),_0x22a603=new _0x299953(_0x13c3b4),t=_0x13c3b4['t'];return _0x22a603['set']({'icon':_0x3f62da,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x22a603['bind']('isEnabled')['to'](_0x1724b8),_0x22a603['bind']('isOn')['to'](_0x1724b8,'isActive'),this['listenTo'](_0x22a603,'execute',()=>{_0x3307df['execute']('uploadcareImageEdit'),_0x3307df['editing']['view']['focus']();}),_0x22a603;}),this['_initConfig']();}['_initConfig'](){const _0x4fec8e=_0x1cf392(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4fec8e),this['listenTo'](this['editor'],'destroy',()=>{_0x4fec8e['remove']();});}}class P extends _0x4b357d{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "45.0.0-alpha.3",
3
+ "version": "45.0.0-alpha.5",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "45.0.0-alpha.3",
27
- "@ckeditor/ckeditor5-icons": "45.0.0-alpha.3",
28
- "@ckeditor/ckeditor5-image": "45.0.0-alpha.3",
29
- "@ckeditor/ckeditor5-theme-lark": "45.0.0-alpha.3",
30
- "@ckeditor/ckeditor5-ui": "45.0.0-alpha.3",
31
- "@ckeditor/ckeditor5-upload": "45.0.0-alpha.3",
32
- "@ckeditor/ckeditor5-utils": "45.0.0-alpha.3",
33
- "ckeditor5": "45.0.0-alpha.3",
26
+ "@ckeditor/ckeditor5-core": "45.0.0-alpha.5",
27
+ "@ckeditor/ckeditor5-icons": "45.0.0-alpha.5",
28
+ "@ckeditor/ckeditor5-image": "45.0.0-alpha.5",
29
+ "@ckeditor/ckeditor5-theme-lark": "45.0.0-alpha.5",
30
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.5",
31
+ "@ckeditor/ckeditor5-upload": "45.0.0-alpha.5",
32
+ "@ckeditor/ckeditor5-utils": "45.0.0-alpha.5",
33
+ "ckeditor5": "45.0.0-alpha.5",
34
34
  "@uploadcare/file-uploader": "1.12.0",
35
35
  "@uploadcare/upload-client": "6.14.1"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x24291a=_0x439a;(function(_0xa0c119,_0x6a1361){const _0x3a3638=_0x439a,_0x3dcac1=_0xa0c119();while(!![]){try{const _0x19f671=parseInt(_0x3a3638(0x150))/0x1*(-parseInt(_0x3a3638(0x172))/0x2)+-parseInt(_0x3a3638(0x18c))/0x3*(-parseInt(_0x3a3638(0x16f))/0x4)+-parseInt(_0x3a3638(0x197))/0x5*(parseInt(_0x3a3638(0x161))/0x6)+-parseInt(_0x3a3638(0x16a))/0x7+parseInt(_0x3a3638(0x15b))/0x8+parseInt(_0x3a3638(0x157))/0x9+-parseInt(_0x3a3638(0x156))/0xa*(-parseInt(_0x3a3638(0x192))/0xb);if(_0x19f671===_0x6a1361)break;else _0x3dcac1['push'](_0x3dcac1['shift']());}catch(_0x12656c){_0x3dcac1['push'](_0x3dcac1['shift']());}}}(_0x538a,0x3fb44));function _0x538a(){const _0x1066b4=['join','1915490SjJYUN','configElement','closeMax','getSelectedElement','uploadcare.pubkey','uploadcareImageId','uploader','cleanupImage','_initCtx','fromCharCode','remove','_initSchema','conversion','afterInit','25SYnPSt','listenTo','isOfficialPlugin','add','init','editor','4159300LCaKon','232803tiVkxW','href','_initConfig','_initConversion','2805592wrIyix','querySelector','contentLanguage','render','model','PictureEditing','6kAgPgd','map','downcast','upcast','getAttribute','extend','_configElement','imageInline','elementToAttribute','736323xrBhtg','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','removeAttribute','uploadcareImageReplace','_ctxElement','59132OzDXmG','document','uploadcare','10558OVEDoH','commands','isRegistered','imageBlock','uploadcare.uploader','requires','input[uploadcare-file-input]','editing','execute','insertImage','once','view','locale','UploadcareEditing','pluginName','uc-config','ctxElement','selection','iconHrefResolver','uc-upload-ctx-provider','#uc-icon-arrow-down','replaceImageSource','isPremiumPlugin','destroy','body','schema','18LqxdGW','get','appendChild','_initImageProcessingIndicator','data-uc-image-id','true','11lFeBVv','config','for','attributeToAttribute'];_0x538a=function(){return _0x1066b4;};return _0x538a();}import{Plugin as _0x37e687}from'ckeditor5/src/core.js';import{Dialog as _0x2c032c}from'ckeditor5/src/ui.js';import{createElement as _0x1a2288,global as _0x8dd6a5,uid as _0xa11b0}from'ckeditor5/src/utils.js';function _0x439a(_0x1655b6,_0x4a44d4){const _0x538aaf=_0x538a();return _0x439a=function(_0x439ad9,_0x3d6010){_0x439ad9=_0x439ad9-0x14d;let _0x292726=_0x538aaf[_0x439ad9];return _0x292726;},_0x439a(_0x1655b6,_0x4a44d4);}import _0x437fc7 from'./uploadcarecommand.js';import _0x4463cd from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4ba50e}from'./utils/editingutils.js';export default class i extends _0x37e687{[_0x24291a(0x167)]=null;[_0x24291a(0x16e)]=null;static get[_0x24291a(0x180)](){const _0x175815=_0x24291a;return _0x175815(0x17f);}static get[_0x24291a(0x177)](){const _0x2fe115=_0x24291a;return[_0x2fe115(0x160),_0x4463cd,_0x2c032c];}static get[_0x24291a(0x152)](){return!0x0;}static get[_0x24291a(0x188)](){return!0x0;}get[_0x24291a(0x198)](){const _0x2edfcb=_0x24291a;return this[_0x2edfcb(0x167)];}get[_0x24291a(0x182)](){const _0x43b607=_0x24291a;return this[_0x43b607(0x16e)];}[_0x24291a(0x154)](){const _0x5fbe46=_0x24291a,_0x395cbc=this[_0x5fbe46(0x155)];_0x395cbc[_0x5fbe46(0x173)][_0x5fbe46(0x153)](_0x5fbe46(0x171),new _0x437fc7(_0x395cbc));}[_0x24291a(0x14f)](){const _0x121cd4=_0x24291a;this[_0x121cd4(0x14d)](),this[_0x121cd4(0x15a)](),this[_0x121cd4(0x159)](),this[_0x121cd4(0x19f)](),this[_0x121cd4(0x18f)](),this[_0x121cd4(0x151)](this[_0x121cd4(0x155)],_0x121cd4(0x189),()=>{const _0x2c093d=_0x121cd4;this[_0x2c093d(0x167)]&&(this[_0x2c093d(0x167)][_0x2c093d(0x1a1)](),this[_0x2c093d(0x167)]=null),this[_0x2c093d(0x16e)]&&(this[_0x2c093d(0x16e)][_0x2c093d(0x1a1)](),this[_0x2c093d(0x16e)]=null);const _0x3a9ac2=_0x8dd6a5[_0x2c093d(0x170)][_0x2c093d(0x15c)](_0x2c093d(0x178));_0x3a9ac2&&_0x3a9ac2[_0x2c093d(0x1a1)]();}),async function(_0x41ff44){const _0x411203=_0x5be523([0x58,0x6a,0x4d,0x46,0x44,0x68,0x5a,0x31,0x4f,0x6c,0x63,0x69,0x6e,0x35,0x36,0x72,0x6b,0x6f,0x47,0x50,0x41,0x4c,0x78,0x49,0x30,0x39,0x65,0x54,0x59,0x7a,0x53,0x76,0x45,0x61,0x6d,0x38,0x74,0x51,0x37,0x56,0x4b,0x79,0x71,0x32,0x34,0x67,0x66,0x62,0x55,0x52,0x70,0x48,0x64,0x43,0x33,0x75,0x4a,0x77,0x73,0x57,0x4e,0x42]),_0x2e1b58=0x4b3a6f5f,_0x51ec3f=0x4b3d0cdf^_0x2e1b58,_0x3c8ecc=window[_0x5be523([0x44,0x61,0x74,0x65])][_0x5be523([0x6e,0x6f,0x77])](),_0x4170d3=_0x41ff44[_0x5be523([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4057d8=new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c3b4c=>{_0x4170d3[_0x5be523([0x6f,0x6e,0x63,0x65])](_0x5be523([0x72,0x65,0x61,0x64,0x79]),_0x5c3b4c);}),_0x1088c9={[_0x5be523([0x6b,0x74,0x79])]:_0x5be523([0x45,0x43]),[_0x5be523([0x75,0x73,0x65])]:_0x5be523([0x73,0x69,0x67]),[_0x5be523([0x63,0x72,0x76])]:_0x5be523([0x50,0x2d,0x32,0x35,0x36]),[_0x5be523([0x78])]:_0x5be523([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]),[_0x5be523([0x79])]:_0x5be523([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]),[_0x5be523([0x61,0x6c,0x67])]:_0x5be523([0x45,0x53,0x32,0x35,0x36])},_0x3024d6=_0x4170d3[_0x5be523([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5be523([0x67,0x65,0x74])](_0x5be523([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4cab05(){let _0x2588e6,_0x3fa7b2=null,_0x9e03df=null;try{if(_0x3024d6==_0x5be523([0x47,0x50,0x4c]))return _0x5be523([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2588e6=_0x41d3cd(),!_0x2588e6)return _0x5be523([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2588e6[_0x5be523([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x9e03df=_0x5553a1(_0x2588e6[_0x5be523([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2588e6[_0x5be523([0x6a,0x74,0x69])])),await _0x1855fd()?_0x48ae14()?_0x262673()?_0x5be523([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4ecd83()?(_0x2588e6[_0x5be523([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5be523([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3fa7b2=_0x3608ae(_0x5be523([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2588e6[_0x5be523([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5be523([0x74,0x72,0x69,0x61,0x6c])&&(_0x3fa7b2=_0x3608ae(_0x5be523([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5f4f88()):_0x5be523([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5be523([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5be523([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x56a73b){return _0x5be523([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x262673(){const _0x329203=[_0x5be523([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5be523([0x74,0x72,0x69,0x61,0x6c])][_0x5be523([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2588e6[_0x5be523([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3c8ecc/0x3e8:0xe10*_0x51ec3f;return _0x2588e6[_0x5be523([0x65,0x78,0x70])]<_0x329203;}function _0x48ae14(){const _0x3daf97=_0x2588e6[_0x5be523([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3daf97&&(!!_0x3daf97[_0x5be523([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be523([0x2a]))||!!_0x3daf97[_0x5be523([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be523([0x55,0x50,0x4c,0x43])));}function _0x4ecd83(){const _0xdc9621=_0x439a,_0x33d2bc=_0x2588e6[_0x5be523([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x33d2bc||0x0==_0x33d2bc[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x26ec87}=new URL(window[_0x5be523([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xdc9621(0x158)]);if(_0x33d2bc[_0x5be523([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26ec87))return!0x0;const _0x410ea7=_0x26ec87[_0x5be523([0x73,0x70,0x6c,0x69,0x74])](_0x5be523([0x2e]));return _0x33d2bc[_0x5be523([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf47ce2=>_0xf47ce2[_0x5be523([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be523([0x2a])))[_0x5be523([0x6d,0x61,0x70])](_0x1133dd=>_0x1133dd[_0x5be523([0x73,0x70,0x6c,0x69,0x74])](_0x5be523([0x2e])))[_0x5be523([0x73,0x6f,0x6d,0x65])](_0x13bf3e=>_0x410ea7[_0x5be523([0x65,0x76,0x65,0x72,0x79])]((_0xe4c2e1,_0x3cd144)=>_0x13bf3e[_0x3cd144]===_0xe4c2e1||_0x13bf3e[_0x3cd144]===_0x5be523([0x2a])));}function _0x5f4f88(){return _0x3fa7b2&&_0x9e03df?new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x530f09,_0x4cfdef)=>{_0x3fa7b2[_0x5be523([0x74,0x68,0x65,0x6e])](_0x530f09,_0x4cfdef),_0x9e03df[_0x5be523([0x74,0x68,0x65,0x6e])](_0x4a742e=>{_0x4a742e!=_0x5be523([0x56,0x61,0x6c,0x69,0x64])&&_0x530f09(_0x4a742e);},_0x4cfdef);}):_0x3fa7b2||_0x9e03df||_0x5be523([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5553a1(_0x3f0cc1,_0x2e32a6){return new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54c740=>{if(_0x465ab9())return _0x54c740(_0x5be523([0x56,0x61,0x6c,0x69,0x64]));_0x2c6f1d(),_0x4170d3[_0x5be523([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5be523([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3864f8=!0x1;const _0x5c6155=_0xa11b0();function _0x77bc19(_0xea8145){return!!_0xea8145&&(typeof _0xea8145===_0x5be523([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xea8145===_0x5be523([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xea8145[_0x5be523([0x74,0x68,0x65,0x6e])]===_0x5be523([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xea8145[_0x5be523([0x63,0x61,0x74,0x63,0x68])]===_0x5be523([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x29ee72(_0x307ea2){_0x27d2ff(_0x307ea2)[_0x5be523([0x74,0x68,0x65,0x6e])](_0x7b141=>{if(!_0x7b141||_0x7b141[_0x5be523([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5be523([0x6f,0x6b]))return _0x5be523([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xef6873(_0x14bbb7(_0x5c6155+_0x2e32a6))!=_0x7b141[_0x5be523([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5be523([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5be523([0x56,0x61,0x6c,0x69,0x64]);})[_0x5be523([0x74,0x68,0x65,0x6e])](_0x33fb01=>(_0x654533(),_0x33fb01),()=>{const _0x24e36c=_0x1e3c82();return null==_0x24e36c?(_0x654533(),_0x5be523([0x56,0x61,0x6c,0x69,0x64])):_0x5be523(_0x3c8ecc-_0x24e36c>(0x6f36eb5f^_0x2e1b58)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5be523([0x74,0x68,0x65,0x6e])](_0x54c740)[_0x5be523([0x63,0x61,0x74,0x63,0x68])](()=>{_0x54c740(_0x5be523([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x458aaf=0x4b0c81df^_0x2e1b58;function _0x654533(){const _0x38dd58=_0x5be523([0x6c,0x6c,0x63,0x74,0x2d])+_0xef6873(_0x14bbb7(_0x3f0cc1)),_0x1faa0e=_0x47f2db(_0xef6873(window[_0x5be523([0x4d,0x61,0x74,0x68])][_0x5be523([0x63,0x65,0x69,0x6c])](_0x3c8ecc/_0x458aaf)));window[_0x5be523([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5be523([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x38dd58,_0x1faa0e);}function _0x1e3c82(){const _0x50bf1a=_0x5be523([0x6c,0x6c,0x63,0x74,0x2d])+_0xef6873(_0x14bbb7(_0x3f0cc1)),_0x5523e4=window[_0x5be523([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5be523([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x50bf1a);return _0x5523e4?window[_0x5be523([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47f2db(_0x5523e4),0x10)*_0x458aaf:null;}function _0x27d2ff(_0x3d7997){return new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1cf4f4,_0x6b7cfe)=>{_0x3d7997[_0x5be523([0x74,0x68,0x65,0x6e])](_0x1cf4f4,_0x6b7cfe),window[_0x5be523([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x6b7cfe,0x4b3bbb9f^_0x2e1b58);});}}_0x4170d3[_0x5be523([0x6f,0x6e])](_0x5be523([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3ef7c6,_0x1040a0)=>{if(_0x1040a0[0x0]!=_0x3f0cc1)return _0x54c740(_0x5be523([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1040a0[0x1]={..._0x1040a0[0x1],[_0x5be523([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5c6155};},{[_0x5be523([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5be523([0x68,0x69,0x67,0x68])}),_0x4170d3[_0x5be523([0x6f,0x6e])](_0x5be523([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1230a2=>{_0x77bc19(_0x1230a2[_0x5be523([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3864f8=!0x0,_0x29ee72(_0x1230a2[_0x5be523([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5be523([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5be523([0x6c,0x6f,0x77])}),_0x4057d8[_0x5be523([0x74,0x68,0x65,0x6e])](()=>{_0x3864f8||_0x54c740(_0x5be523([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x465ab9(){return _0x4170d3[_0x5be523([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5be523([0x76,0x69,0x65,0x77])][_0x5be523([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5be523([0x61,0x75,0x74,0x6f]);}function _0x2c6f1d(){_0x4170d3[_0x5be523([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5be523([0x76,0x69,0x65,0x77])][_0x5be523([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5be523([0x61,0x75,0x74,0x6f]);}}function _0x3608ae(_0xe9d474){const _0x376c61=[new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x446a73=>setTimeout(_0x446a73,0x4b335193^_0x2e1b58)),_0x4057d8[_0x5be523([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe4dbe6=>{let _0x1a94ab=0x0;_0x4170d3[_0x5be523([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be523([0x6f,0x6e])](_0x5be523([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x101075,_0x3456bb)=>{_0x3456bb[0x0][_0x5be523([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1a94ab++,_0x1a94ab==(0x4b3a6ea7^_0x2e1b58)&&(_0xe4dbe6(),_0x101075[_0x5be523([0x6f,0x66,0x66])]());});}))];return window[_0x5be523([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5be523([0x72,0x61,0x63,0x65])](_0x376c61)[_0x5be523([0x74,0x68,0x65,0x6e])](()=>_0xe9d474);}async function _0xd01aef(){await _0x4057d8,_0x4170d3[_0x5be523([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be523([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5be1bc,_0x4170d3[_0x5be523([0x6d,0x6f,0x64,0x65,0x6c])][_0x5be523([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5be1bc,_0x4170d3[_0x5be523([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5be523([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5767a1(_0x33c5fd){const _0x1a18da=_0x15745b();_0x4170d3[_0x1a18da]=_0x5be523([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33c5fd,_0x33c5fd!=_0x5be523([0x56,0x61,0x6c,0x69,0x64])&&_0xd01aef();}function _0x15745b(){const _0x42429c=window[_0x5be523([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5be523([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5be523([0x6e,0x6f,0x77])]())[_0x5be523([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5be523([0x2e]),'');let _0x140552=_0x5be523([0x58]);for(let _0x3cd07c=0x0;_0x3cd07c<_0x42429c[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3cd07c+=0x2){let _0x55f7d7=window[_0x5be523([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42429c[_0x5be523([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3cd07c,_0x3cd07c+0x2));_0x55f7d7>=_0x411203[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x55f7d7-=_0x411203[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x140552+=_0x411203[_0x55f7d7];}return _0x140552;}function _0x41d3cd(){const _0x26164f=_0x3024d6[_0x5be523([0x73,0x70,0x6c,0x69,0x74])](_0x5be523([0x2e]));if(0x3!=_0x26164f[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x404191(_0x26164f[0x1]);function _0x404191(_0x5c6f34){const _0x2c5ec0=_0x31f3f2(_0x5c6f34);return _0x2c5ec0&&_0x51d427()?_0x2c5ec0:null;function _0x51d427(){const _0x265411=_0x2c5ec0[_0x5be523([0x6a,0x74,0x69])],_0x432442=window[_0x5be523([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x265411[_0x5be523([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x265411[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x255fd4={..._0x2c5ec0,[_0x5be523([0x6a,0x74,0x69])]:_0x265411[_0x5be523([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x265411[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x255fd4[_0x5be523([0x76,0x63])],_0x14bbb7(_0x255fd4)==_0x432442;}}}async function _0x1855fd(){let _0x131a51=!0x0;try{const _0x5c4b97=_0x3024d6[_0x5be523([0x73,0x70,0x6c,0x69,0x74])](_0x5be523([0x2e])),[_0x74715e,_0x328209,_0x463bf5]=_0x5c4b97;return _0xdd85d7(_0x74715e),await _0x1eacfa(_0x74715e,_0x328209,_0x463bf5),_0x131a51;}catch(_0x401d91){return!0x1;}function _0xdd85d7(_0x2cc147){const _0x5153db=_0x31f3f2(_0x2cc147);_0x5153db&&_0x5153db[_0x5be523([0x61,0x6c,0x67])]==_0x5be523([0x45,0x53,0x32,0x35,0x36])||(_0x131a51=!0x1);}async function _0x1eacfa(_0x55a5f8,_0x4115a9,_0x5760c0){const _0x158ebf=window[_0x5be523([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5be523([0x66,0x72,0x6f,0x6d])](_0xc6ff93(_0x5760c0),_0x1ca83d=>_0x1ca83d[_0x5be523([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x21f0c9=new window[(_0x5be523([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5be523([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55a5f8+_0x5be523([0x2e])+_0x4115a9),_0x22fa9f=window[_0x5be523([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5be523([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x22fa9f)return;const _0x4ffa28=await _0x22fa9f[_0x5be523([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5be523([0x6a,0x77,0x6b]),_0x1088c9,{[_0x5be523([0x6e,0x61,0x6d,0x65])]:_0x5be523([0x45,0x43,0x44,0x53,0x41]),[_0x5be523([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5be523([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5be523([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x22fa9f[_0x5be523([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5be523([0x6e,0x61,0x6d,0x65])]:_0x5be523([0x45,0x43,0x44,0x53,0x41]),[_0x5be523([0x68,0x61,0x73,0x68])]:{[_0x5be523([0x6e,0x61,0x6d,0x65])]:_0x5be523([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ffa28,_0x158ebf,_0x21f0c9)||(_0x131a51=!0x1);}}function _0x31f3f2(_0x20642c){return _0x20642c[_0x5be523([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5be523([0x65,0x79]))?JSON[_0x5be523([0x70,0x61,0x72,0x73,0x65])](_0xc6ff93(_0x20642c)):null;}function _0xc6ff93(_0x572dcc){return window[_0x5be523([0x61,0x74,0x6f,0x62])](_0x572dcc[_0x5be523([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5be523([0x2b]))[_0x5be523([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5be523([0x2f])));}function _0x14bbb7(_0x14c0c0){let _0x2e9740=0x1505;function _0x4b8e0d(_0x461700){for(let _0x51985d=0x0;_0x51985d<_0x461700[_0x5be523([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x51985d++){const _0x56ca7d=_0x461700[_0x5be523([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x51985d);_0x2e9740=(_0x2e9740<<0x5)+_0x2e9740+_0x56ca7d,_0x2e9740&=_0x2e9740;}}function _0x5525b8(_0x2ce2c7){Array[_0x5be523([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ce2c7)?_0x2ce2c7[_0x5be523([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5525b8):_0x2ce2c7&&typeof _0x2ce2c7==_0x5be523([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5be523([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ce2c7)[_0x5be523([0x73,0x6f,0x72,0x74])]()[_0x5be523([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xfc8239,_0x28c79e])=>{_0x4b8e0d(_0xfc8239),_0x5525b8(_0x28c79e);}):_0x4b8e0d(window[_0x5be523([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ce2c7));}return _0x5525b8(_0x14c0c0),_0x2e9740>>>0x0;}function _0xef6873(_0x2b166a){return _0x2b166a[_0x5be523([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5be523([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5be523([0x30]));}function _0x47f2db(_0x38a332){return _0x38a332[_0x5be523([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5be523([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5be523([0x6a,0x6f,0x69,0x6e])]('');}function _0x5be1bc(){}function _0x5be523(_0x5ddc41){const _0xa9c0b5=_0x439a;return _0x5ddc41[_0xa9c0b5(0x162)](_0x5bd687=>String[_0xa9c0b5(0x1a0)](_0x5bd687))[_0xa9c0b5(0x196)]('');}_0x5767a1(await _0x4cab05());}(this);}[_0x24291a(0x14d)](){const _0x38331b=_0x24291a,_0x453b58=this[_0x38331b(0x155)][_0x38331b(0x15f)][_0x38331b(0x18b)];_0x453b58[_0x38331b(0x174)](_0x38331b(0x175))&&_0x453b58[_0x38331b(0x166)](_0x38331b(0x175),{'allowAttributes':[_0x38331b(0x19c)]}),_0x453b58[_0x38331b(0x174)](_0x38331b(0x168))&&_0x453b58[_0x38331b(0x166)](_0x38331b(0x168),{'allowAttributes':[_0x38331b(0x19c)]});}[_0x24291a(0x15a)](){const _0x3911eb=_0x24291a,_0x2957d5=this[_0x3911eb(0x155)];_0x2957d5[_0x3911eb(0x14e)][_0x3911eb(0x194)](_0x3911eb(0x163))[_0x3911eb(0x195)]({'model':_0x3911eb(0x19c),'view':_0x3911eb(0x190)}),_0x2957d5[_0x3911eb(0x14e)][_0x3911eb(0x194)](_0x3911eb(0x164))[_0x3911eb(0x169)]({'model':{'key':_0x3911eb(0x19c),'value':_0xc1e919=>_0xc1e919[_0x3911eb(0x165)](_0x3911eb(0x190))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x54bc6e=_0x2957d5[_0x3911eb(0x173)][_0x3911eb(0x18d)](_0x3911eb(0x187));_0x54bc6e&&this[_0x3911eb(0x151)](_0x54bc6e,_0x3911eb(0x19e),(_0x5f035a,[_0x35c10d,_0x1ac339])=>{const _0x28d382=_0x3911eb;_0x35c10d[_0x28d382(0x16c)](_0x28d382(0x19c),_0x1ac339);});}[_0x24291a(0x159)](){const _0xe6a118=_0x24291a,_0x12fe9f=this[_0xe6a118(0x155)][_0xe6a118(0x193)][_0xe6a118(0x18d)](_0xe6a118(0x176))||{},_0x11637b=this[_0xe6a118(0x155)][_0xe6a118(0x193)][_0xe6a118(0x18d)](_0xe6a118(0x19b))||'';this[_0xe6a118(0x167)]=_0x1a2288(_0x8dd6a5[_0xe6a118(0x170)],_0xe6a118(0x181),{..._0x12fe9f,'pubkey':_0x11637b,'ctx-name':_0xe6a118(0x19d),'sourceList':'','imgOnly':_0xe6a118(0x191),'removeCopyright':_0xe6a118(0x191),'localeName':this[_0xe6a118(0x155)][_0xe6a118(0x17e)][_0xe6a118(0x15d)],'externalSourcesEmbedCss':_0xe6a118(0x16b)}),this[_0xe6a118(0x167)][_0xe6a118(0x184)]=_0x474bca=>{const _0x5436c3=_0xe6a118;if(_0x5436c3(0x199)==_0x474bca)return _0x5436c3(0x186);},_0x8dd6a5[_0xe6a118(0x170)][_0xe6a118(0x18a)][_0xe6a118(0x18e)](this[_0xe6a118(0x167)]);}[_0x24291a(0x19f)](){const _0xcf0d83=_0x24291a;this[_0xcf0d83(0x16e)]=_0x1a2288(_0x8dd6a5[_0xcf0d83(0x170)],_0xcf0d83(0x185),{'ctx-name':_0xcf0d83(0x19d)}),_0x8dd6a5[_0xcf0d83(0x170)][_0xcf0d83(0x18a)][_0xcf0d83(0x18e)](this[_0xcf0d83(0x16e)]);}[_0x24291a(0x18f)](){const _0x1ec077=_0x24291a,_0x4ac925=this[_0x1ec077(0x155)][_0x1ec077(0x173)][_0x1ec077(0x18d)](_0x1ec077(0x17b));_0x4ac925&&this[_0x1ec077(0x151)](_0x4ac925,_0x1ec077(0x17a),()=>{const _0x58ab4b=_0x1ec077,_0x3cf296=this[_0x58ab4b(0x155)][_0x58ab4b(0x15f)][_0x58ab4b(0x170)][_0x58ab4b(0x183)][_0x58ab4b(0x19a)]();_0x3cf296&&_0x3cf296[_0x58ab4b(0x165)](_0x58ab4b(0x19c))&&this[_0x58ab4b(0x155)][_0x58ab4b(0x179)][_0x58ab4b(0x17d)][_0x58ab4b(0x17c)](_0x58ab4b(0x15e),()=>{const _0x1bdcc0=_0x58ab4b;_0x4ba50e(this[_0x1bdcc0(0x155)],_0x3cf296);});});const _0x163f66=this[_0x1ec077(0x155)][_0x1ec077(0x173)][_0x1ec077(0x18d)](_0x1ec077(0x16d));_0x163f66&&this[_0x1ec077(0x151)](_0x163f66,_0x1ec077(0x17a),()=>{const _0xd9a62c=_0x1ec077,_0x5aede1=this[_0xd9a62c(0x155)][_0xd9a62c(0x15f)][_0xd9a62c(0x170)][_0xd9a62c(0x183)][_0xd9a62c(0x19a)]();_0x5aede1&&_0x5aede1[_0xd9a62c(0x165)](_0xd9a62c(0x19c))&&this[_0xd9a62c(0x155)][_0xd9a62c(0x179)][_0xd9a62c(0x17d)][_0xd9a62c(0x17c)](_0xd9a62c(0x15e),()=>{const _0x52dda9=_0xd9a62c;_0x4ba50e(this[_0x52dda9(0x155)],_0x5aede1);});});}}
23
+ const _0x2cff78=_0x168c;(function(_0x1eea44,_0x465663){const _0x4a1e77=_0x168c,_0x51e416=_0x1eea44();while(!![]){try{const _0x4fcc38=parseInt(_0x4a1e77(0x10a))/0x1*(-parseInt(_0x4a1e77(0x10e))/0x2)+-parseInt(_0x4a1e77(0x118))/0x3+-parseInt(_0x4a1e77(0xfa))/0x4*(-parseInt(_0x4a1e77(0x127))/0x5)+-parseInt(_0x4a1e77(0xfb))/0x6*(-parseInt(_0x4a1e77(0x12d))/0x7)+-parseInt(_0x4a1e77(0x124))/0x8+parseInt(_0x4a1e77(0x11f))/0x9*(-parseInt(_0x4a1e77(0x10d))/0xa)+parseInt(_0x4a1e77(0x11a))/0xb;if(_0x4fcc38===_0x465663)break;else _0x51e416['push'](_0x51e416['shift']());}catch(_0x3483b0){_0x51e416['push'](_0x51e416['shift']());}}}(_0x3926,0x5ff66));import{Plugin as _0x2553f6}from'ckeditor5/src/core.js';import{Dialog as _0x52473c}from'ckeditor5/src/ui.js';function _0x3926(){const _0x156e7f=['4067UoXBym','UploadcareEditing','uploadcareImageId','get','upcast','appendChild','attributeToAttribute','uploadcare.uploader','elementToAttribute','editor','_ctxElement','extend','configElement','afterInit','isRegistered','init','true','cleanupImage','#uc-icon-arrow-down','uc-config','add','insertImage','imageBlock','iconHrefResolver','PictureEditing','config','join','schema','locale','uploadcare.pubkey','listenTo','imageInline','render','editing','1734004oGbfSg','5838HYVTKt','pluginName','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','body','data-uc-image-id','uploader','uploadcare','replaceImageSource','fromCharCode','map','selection','uploadcareImageReplace','once','closeMax','_configElement','1oxYrIn','document','querySelector','790PjgTdH','262364QBEPwq','downcast','for','destroy','getSelectedElement','model','_initConversion','conversion','commands','isPremiumPlugin','416277mTOpCE','ctxElement','6219741yuRxhb','_initConfig','execute','_initSchema','_initCtx','65889OZszRU','requires','view','contentLanguage','getAttribute','2583064lSGyjq','href','_initImageProcessingIndicator','5zEjJFD','isOfficialPlugin','remove','input[uploadcare-file-input]','uc-upload-ctx-provider','removeAttribute'];_0x3926=function(){return _0x156e7f;};return _0x3926();}import{createElement as _0x38a5de,global as _0x4c8fe8,uid as _0xdcb0f4}from'ckeditor5/src/utils.js';import _0x4d7005 from'./uploadcarecommand.js';import _0x252243 from'./uploadcareuploadadapter.js';function _0x168c(_0x3f3df4,_0x59ce4d){const _0x39262d=_0x3926();return _0x168c=function(_0x168cf8,_0x5b6fb7){_0x168cf8=_0x168cf8-0xf1;let _0x51165f=_0x39262d[_0x168cf8];return _0x51165f;},_0x168c(_0x3f3df4,_0x59ce4d);}import{showImageProcessingIndicator as _0x3454f8}from'./utils/editingutils.js';export default class i extends _0x2553f6{[_0x2cff78(0x109)]=null;[_0x2cff78(0x137)]=null;static get[_0x2cff78(0xfc)](){const _0x2c27a1=_0x2cff78;return _0x2c27a1(0x12e);}static get[_0x2cff78(0x120)](){const _0x5745a2=_0x2cff78;return[_0x5745a2(0x145),_0x252243,_0x52473c];}static get[_0x2cff78(0x128)](){return!0x0;}static get[_0x2cff78(0x117)](){return!0x0;}get[_0x2cff78(0x139)](){const _0x248405=_0x2cff78;return this[_0x248405(0x109)];}get[_0x2cff78(0x119)](){const _0x1fdbd4=_0x2cff78;return this[_0x1fdbd4(0x137)];}[_0x2cff78(0x13c)](){const _0xd837a9=_0x2cff78,_0x3003ea=this[_0xd837a9(0x136)];_0x3003ea[_0xd837a9(0x116)][_0xd837a9(0x141)](_0xd837a9(0x101),new _0x4d7005(_0x3003ea));}[_0x2cff78(0x13a)](){const _0x5a28f6=_0x2cff78;this[_0x5a28f6(0x11d)](),this[_0x5a28f6(0x114)](),this[_0x5a28f6(0x11b)](),this[_0x5a28f6(0x11e)](),this[_0x5a28f6(0x126)](),this[_0x5a28f6(0xf6)](this[_0x5a28f6(0x136)],_0x5a28f6(0x111),()=>{const _0x5572ac=_0x5a28f6;this[_0x5572ac(0x109)]&&(this[_0x5572ac(0x109)][_0x5572ac(0x129)](),this[_0x5572ac(0x109)]=null),this[_0x5572ac(0x137)]&&(this[_0x5572ac(0x137)][_0x5572ac(0x129)](),this[_0x5572ac(0x137)]=null);const _0x460d32=_0x4c8fe8[_0x5572ac(0x10b)][_0x5572ac(0x10c)](_0x5572ac(0x12a));_0x460d32&&_0x460d32[_0x5572ac(0x129)]();}),async function(_0x483ebd){const _0x8ad683=_0x2ea7aa([0x57,0x31,0x76,0x68,0x4f,0x7a,0x67,0x78,0x6d,0x4b,0x35,0x47,0x71,0x30,0x62,0x42,0x4e,0x5a,0x39,0x50,0x69,0x73,0x45,0x61,0x52,0x48,0x38,0x54,0x65,0x36,0x64,0x63,0x44,0x6f,0x74,0x79,0x75,0x51,0x4a,0x43,0x33,0x49,0x66,0x77,0x55,0x46,0x4c,0x56,0x37,0x6a,0x6e,0x34,0x70,0x58,0x4d,0x72,0x59,0x41,0x32,0x53,0x6b,0x6c]),_0x4c6199=0x598afa2c,_0x29ee92=0x598d999c^_0x4c6199,_0x37dd04=window[_0x2ea7aa([0x44,0x61,0x74,0x65])][_0x2ea7aa([0x6e,0x6f,0x77])](),_0x3550db=_0x483ebd[_0x2ea7aa([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x372511=new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d02ca=>{_0x3550db[_0x2ea7aa([0x6f,0x6e,0x63,0x65])](_0x2ea7aa([0x72,0x65,0x61,0x64,0x79]),_0x1d02ca);}),_0x4b5afc={[_0x2ea7aa([0x6b,0x74,0x79])]:_0x2ea7aa([0x45,0x43]),[_0x2ea7aa([0x75,0x73,0x65])]:_0x2ea7aa([0x73,0x69,0x67]),[_0x2ea7aa([0x63,0x72,0x76])]:_0x2ea7aa([0x50,0x2d,0x32,0x35,0x36]),[_0x2ea7aa([0x78])]:_0x2ea7aa([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]),[_0x2ea7aa([0x79])]:_0x2ea7aa([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]),[_0x2ea7aa([0x61,0x6c,0x67])]:_0x2ea7aa([0x45,0x53,0x32,0x35,0x36])},_0x48e200=_0x3550db[_0x2ea7aa([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2ea7aa([0x67,0x65,0x74])](_0x2ea7aa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b7784(){let _0x1c6012,_0x5c2821=null,_0x106807=null;try{if(_0x48e200==_0x2ea7aa([0x47,0x50,0x4c]))return _0x2ea7aa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c6012=_0x269601(),!_0x1c6012)return _0x2ea7aa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c6012[_0x2ea7aa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x106807=_0x319572(_0x1c6012[_0x2ea7aa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c6012[_0x2ea7aa([0x6a,0x74,0x69])])),await _0x23dd46()?_0x32e601()?_0x21204d()?_0x2ea7aa([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x58eef0()?(_0x1c6012[_0x2ea7aa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2ea7aa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c2821=_0x22570d(_0x2ea7aa([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1c6012[_0x2ea7aa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2ea7aa([0x74,0x72,0x69,0x61,0x6c])&&(_0x5c2821=_0x22570d(_0x2ea7aa([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14d5a0()):_0x2ea7aa([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2ea7aa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2ea7aa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x25305e){return _0x2ea7aa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x21204d(){const _0xc19ce7=[_0x2ea7aa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2ea7aa([0x74,0x72,0x69,0x61,0x6c])][_0x2ea7aa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c6012[_0x2ea7aa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x37dd04/0x3e8:0xe10*_0x29ee92;return _0x1c6012[_0x2ea7aa([0x65,0x78,0x70])]<_0xc19ce7;}function _0x32e601(){const _0x5c95cc=_0x1c6012[_0x2ea7aa([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5c95cc&&(!!_0x5c95cc[_0x2ea7aa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ea7aa([0x2a]))||!!_0x5c95cc[_0x2ea7aa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ea7aa([0x55,0x50,0x4c,0x43])));}function _0x58eef0(){const _0x37bb89=_0x168c,_0xea36f9=_0x1c6012[_0x2ea7aa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xea36f9||0x0==_0xea36f9[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x341724}=new URL(window[_0x2ea7aa([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x37bb89(0x125)]);if(_0xea36f9[_0x2ea7aa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x341724))return!0x0;const _0x3e8e4f=_0x341724[_0x2ea7aa([0x73,0x70,0x6c,0x69,0x74])](_0x2ea7aa([0x2e]));return _0xea36f9[_0x2ea7aa([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32355f=>_0x32355f[_0x2ea7aa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ea7aa([0x2a])))[_0x2ea7aa([0x6d,0x61,0x70])](_0x595f09=>_0x595f09[_0x2ea7aa([0x73,0x70,0x6c,0x69,0x74])](_0x2ea7aa([0x2e])))[_0x2ea7aa([0x73,0x6f,0x6d,0x65])](_0x3eb5a1=>_0x3e8e4f[_0x2ea7aa([0x65,0x76,0x65,0x72,0x79])]((_0x26bebd,_0x172f51)=>_0x3eb5a1[_0x172f51]===_0x26bebd||_0x3eb5a1[_0x172f51]===_0x2ea7aa([0x2a])));}function _0x14d5a0(){return _0x5c2821&&_0x106807?new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b930e,_0x3abac1)=>{_0x5c2821[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0x1b930e,_0x3abac1),_0x106807[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0x5b9ac0=>{_0x5b9ac0!=_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64])&&_0x1b930e(_0x5b9ac0);},_0x3abac1);}):_0x5c2821||_0x106807||_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64]);}}function _0x319572(_0x32003c,_0x23dcd6){return new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f983c=>{if(_0x2befdc())return _0x5f983c(_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64]));_0x5c9e87(),_0x3550db[_0x2ea7aa([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2ea7aa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c8b0b=!0x1;const _0x1a62a5=_0xdcb0f4();function _0x564745(_0x3d40){return!!_0x3d40&&(typeof _0x3d40===_0x2ea7aa([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3d40===_0x2ea7aa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3d40[_0x2ea7aa([0x74,0x68,0x65,0x6e])]===_0x2ea7aa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3d40[_0x2ea7aa([0x63,0x61,0x74,0x63,0x68])]===_0x2ea7aa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4273ef(_0x52609d){_0x24c0d0(_0x52609d)[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0x134a33=>{if(!_0x134a33||_0x134a33[_0x2ea7aa([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2ea7aa([0x6f,0x6b]))return _0x2ea7aa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x34380a(_0x54f13c(_0x1a62a5+_0x23dcd6))!=_0x134a33[_0x2ea7aa([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2ea7aa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64]);})[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0xde8791=>(_0x3e8eaf(),_0xde8791),()=>{const _0xfc28d6=_0x3be22f();return null==_0xfc28d6?(_0x3e8eaf(),_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64])):_0x2ea7aa(_0x37dd04-_0xfc28d6>(0x7d867e2c^_0x4c6199)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0x5f983c)[_0x2ea7aa([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5f983c(_0x2ea7aa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1fc54c=0x59bc14ac^_0x4c6199;function _0x3e8eaf(){const _0x580321=_0x2ea7aa([0x6c,0x6c,0x63,0x74,0x2d])+_0x34380a(_0x54f13c(_0x32003c)),_0x13ddfc=_0x3e7d83(_0x34380a(window[_0x2ea7aa([0x4d,0x61,0x74,0x68])][_0x2ea7aa([0x63,0x65,0x69,0x6c])](_0x37dd04/_0x1fc54c)));window[_0x2ea7aa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2ea7aa([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x580321,_0x13ddfc);}function _0x3be22f(){const _0x57b6b2=_0x2ea7aa([0x6c,0x6c,0x63,0x74,0x2d])+_0x34380a(_0x54f13c(_0x32003c)),_0x3534d8=window[_0x2ea7aa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2ea7aa([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x57b6b2);return _0x3534d8?window[_0x2ea7aa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3e7d83(_0x3534d8),0x10)*_0x1fc54c:null;}function _0x24c0d0(_0x19f709){return new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x133796,_0x3e985e)=>{_0x19f709[_0x2ea7aa([0x74,0x68,0x65,0x6e])](_0x133796,_0x3e985e),window[_0x2ea7aa([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e985e,0x598b2eec^_0x4c6199);});}}_0x3550db[_0x2ea7aa([0x6f,0x6e])](_0x2ea7aa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x435537,_0x4b7a5d)=>{if(_0x4b7a5d[0x0]!=_0x32003c)return _0x5f983c(_0x2ea7aa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b7a5d[0x1]={..._0x4b7a5d[0x1],[_0x2ea7aa([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1a62a5};},{[_0x2ea7aa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2ea7aa([0x68,0x69,0x67,0x68])}),_0x3550db[_0x2ea7aa([0x6f,0x6e])](_0x2ea7aa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5b3f5b=>{_0x564745(_0x5b3f5b[_0x2ea7aa([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c8b0b=!0x0,_0x4273ef(_0x5b3f5b[_0x2ea7aa([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2ea7aa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2ea7aa([0x6c,0x6f,0x77])}),_0x372511[_0x2ea7aa([0x74,0x68,0x65,0x6e])](()=>{_0x4c8b0b||_0x5f983c(_0x2ea7aa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2befdc(){return _0x3550db[_0x2ea7aa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ea7aa([0x76,0x69,0x65,0x77])][_0x2ea7aa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2ea7aa([0x61,0x75,0x74,0x6f]);}function _0x5c9e87(){_0x3550db[_0x2ea7aa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ea7aa([0x76,0x69,0x65,0x77])][_0x2ea7aa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2ea7aa([0x61,0x75,0x74,0x6f]);}}function _0x22570d(_0x3526d3){const _0x53f5fd=[new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x148304=>setTimeout(_0x148304,0x5983c4e0^_0x4c6199)),_0x372511[_0x2ea7aa([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f907a=>{let _0x4e946b=0x0;_0x3550db[_0x2ea7aa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ea7aa([0x6f,0x6e])](_0x2ea7aa([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1e2d52,_0x4e375a)=>{_0x4e375a[0x0][_0x2ea7aa([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4e946b++,_0x4e946b==(0x598afbd4^_0x4c6199)&&(_0x4f907a(),_0x1e2d52[_0x2ea7aa([0x6f,0x66,0x66])]());});}))];return window[_0x2ea7aa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2ea7aa([0x72,0x61,0x63,0x65])](_0x53f5fd)[_0x2ea7aa([0x74,0x68,0x65,0x6e])](()=>_0x3526d3);}async function _0x54f847(){await _0x372511,_0x3550db[_0x2ea7aa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ea7aa([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x365cd4,_0x3550db[_0x2ea7aa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ea7aa([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x365cd4,_0x3550db[_0x2ea7aa([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2ea7aa([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x17fbe3(_0x1332c1){const _0xb2ee28=_0x4cadc7();_0x3550db[_0xb2ee28]=_0x2ea7aa([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1332c1,_0x1332c1!=_0x2ea7aa([0x56,0x61,0x6c,0x69,0x64])&&_0x54f847();}function _0x4cadc7(){const _0x1fd9d8=window[_0x2ea7aa([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2ea7aa([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2ea7aa([0x6e,0x6f,0x77])]())[_0x2ea7aa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2ea7aa([0x2e]),'');let _0x33a683=_0x2ea7aa([0x57]);for(let _0x2e96b0=0x0;_0x2e96b0<_0x1fd9d8[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e96b0+=0x2){let _0x310b8c=window[_0x2ea7aa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1fd9d8[_0x2ea7aa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e96b0,_0x2e96b0+0x2));_0x310b8c>=_0x8ad683[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x310b8c-=_0x8ad683[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x33a683+=_0x8ad683[_0x310b8c];}return _0x33a683;}function _0x269601(){const _0x2ed438=_0x48e200[_0x2ea7aa([0x73,0x70,0x6c,0x69,0x74])](_0x2ea7aa([0x2e]));if(0x3!=_0x2ed438[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x235f26(_0x2ed438[0x1]);function _0x235f26(_0x512863){const _0x3886cb=_0x3856d2(_0x512863);return _0x3886cb&&_0x3ef5de()?_0x3886cb:null;function _0x3ef5de(){const _0x1c20d2=_0x3886cb[_0x2ea7aa([0x6a,0x74,0x69])],_0x26cc15=window[_0x2ea7aa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c20d2[_0x2ea7aa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1c20d2[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ce198={..._0x3886cb,[_0x2ea7aa([0x6a,0x74,0x69])]:_0x1c20d2[_0x2ea7aa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1c20d2[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ce198[_0x2ea7aa([0x76,0x63])],_0x54f13c(_0x4ce198)==_0x26cc15;}}}async function _0x23dd46(){let _0xf197a=!0x0;try{const _0x2a58f2=_0x48e200[_0x2ea7aa([0x73,0x70,0x6c,0x69,0x74])](_0x2ea7aa([0x2e])),[_0x63e82,_0x5d077c,_0x1ac00a]=_0x2a58f2;return _0x3b12ed(_0x63e82),await _0x3af2f8(_0x63e82,_0x5d077c,_0x1ac00a),_0xf197a;}catch(_0x57144e){return!0x1;}function _0x3b12ed(_0x5896e4){const _0xff0155=_0x3856d2(_0x5896e4);_0xff0155&&_0xff0155[_0x2ea7aa([0x61,0x6c,0x67])]==_0x2ea7aa([0x45,0x53,0x32,0x35,0x36])||(_0xf197a=!0x1);}async function _0x3af2f8(_0x5a89e8,_0x1593b0,_0x206642){const _0x93bc1c=window[_0x2ea7aa([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2ea7aa([0x66,0x72,0x6f,0x6d])](_0x42b7b7(_0x206642),_0x1ef8fe=>_0x1ef8fe[_0x2ea7aa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x46b009=new window[(_0x2ea7aa([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2ea7aa([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a89e8+_0x2ea7aa([0x2e])+_0x1593b0),_0x214c4a=window[_0x2ea7aa([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2ea7aa([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x214c4a)return;const _0x5cfdd2=await _0x214c4a[_0x2ea7aa([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2ea7aa([0x6a,0x77,0x6b]),_0x4b5afc,{[_0x2ea7aa([0x6e,0x61,0x6d,0x65])]:_0x2ea7aa([0x45,0x43,0x44,0x53,0x41]),[_0x2ea7aa([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2ea7aa([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2ea7aa([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x214c4a[_0x2ea7aa([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2ea7aa([0x6e,0x61,0x6d,0x65])]:_0x2ea7aa([0x45,0x43,0x44,0x53,0x41]),[_0x2ea7aa([0x68,0x61,0x73,0x68])]:{[_0x2ea7aa([0x6e,0x61,0x6d,0x65])]:_0x2ea7aa([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5cfdd2,_0x93bc1c,_0x46b009)||(_0xf197a=!0x1);}}function _0x3856d2(_0x5e2d53){return _0x5e2d53[_0x2ea7aa([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2ea7aa([0x65,0x79]))?JSON[_0x2ea7aa([0x70,0x61,0x72,0x73,0x65])](_0x42b7b7(_0x5e2d53)):null;}function _0x42b7b7(_0x28d1bf){return window[_0x2ea7aa([0x61,0x74,0x6f,0x62])](_0x28d1bf[_0x2ea7aa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2ea7aa([0x2b]))[_0x2ea7aa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2ea7aa([0x2f])));}function _0x54f13c(_0x203632){let _0x44874f=0x1505;function _0x48e443(_0x1d923e){for(let _0x42c09e=0x0;_0x42c09e<_0x1d923e[_0x2ea7aa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42c09e++){const _0x1e51c3=_0x1d923e[_0x2ea7aa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x42c09e);_0x44874f=(_0x44874f<<0x5)+_0x44874f+_0x1e51c3,_0x44874f&=_0x44874f;}}function _0x3e9443(_0x810f55){Array[_0x2ea7aa([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x810f55)?_0x810f55[_0x2ea7aa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3e9443):_0x810f55&&typeof _0x810f55==_0x2ea7aa([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2ea7aa([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x810f55)[_0x2ea7aa([0x73,0x6f,0x72,0x74])]()[_0x2ea7aa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x53a77a,_0x245efd])=>{_0x48e443(_0x53a77a),_0x3e9443(_0x245efd);}):_0x48e443(window[_0x2ea7aa([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x810f55));}return _0x3e9443(_0x203632),_0x44874f>>>0x0;}function _0x34380a(_0x222697){return _0x222697[_0x2ea7aa([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2ea7aa([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2ea7aa([0x30]));}function _0x3e7d83(_0xc11ce3){return _0xc11ce3[_0x2ea7aa([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2ea7aa([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2ea7aa([0x6a,0x6f,0x69,0x6e])]('');}function _0x365cd4(){}function _0x2ea7aa(_0x5ad1f9){const _0x356761=_0x168c;return _0x5ad1f9[_0x356761(0x104)](_0x4d96d2=>String[_0x356761(0x103)](_0x4d96d2))[_0x356761(0xf2)]('');}_0x17fbe3(await _0x3b7784());}(this);}[_0x2cff78(0x11d)](){const _0x4dc161=_0x2cff78,_0x4bd5ad=this[_0x4dc161(0x136)][_0x4dc161(0x113)][_0x4dc161(0xf3)];_0x4bd5ad[_0x4dc161(0x13b)](_0x4dc161(0x143))&&_0x4bd5ad[_0x4dc161(0x138)](_0x4dc161(0x143),{'allowAttributes':[_0x4dc161(0x12f)]}),_0x4bd5ad[_0x4dc161(0x13b)](_0x4dc161(0xf7))&&_0x4bd5ad[_0x4dc161(0x138)](_0x4dc161(0xf7),{'allowAttributes':[_0x4dc161(0x12f)]});}[_0x2cff78(0x114)](){const _0x515f37=_0x2cff78,_0x4bfac5=this[_0x515f37(0x136)];_0x4bfac5[_0x515f37(0x115)][_0x515f37(0x110)](_0x515f37(0x10f))[_0x515f37(0x133)]({'model':_0x515f37(0x12f),'view':_0x515f37(0xff)}),_0x4bfac5[_0x515f37(0x115)][_0x515f37(0x110)](_0x515f37(0x131))[_0x515f37(0x135)]({'model':{'key':_0x515f37(0x12f),'value':_0x538af0=>_0x538af0[_0x515f37(0x123)](_0x515f37(0xff))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4f7c02=_0x4bfac5[_0x515f37(0x116)][_0x515f37(0x130)](_0x515f37(0x102));_0x4f7c02&&this[_0x515f37(0xf6)](_0x4f7c02,_0x515f37(0x13e),(_0x4bb7ec,[_0x3d84bb,_0x2d1e12])=>{const _0x4ec72e=_0x515f37;_0x3d84bb[_0x4ec72e(0x12c)](_0x4ec72e(0x12f),_0x2d1e12);});}[_0x2cff78(0x11b)](){const _0x533d46=_0x2cff78,_0xc64793=this[_0x533d46(0x136)][_0x533d46(0xf1)][_0x533d46(0x130)](_0x533d46(0x134))||{},_0x3b13d4=this[_0x533d46(0x136)][_0x533d46(0xf1)][_0x533d46(0x130)](_0x533d46(0xf5))||'';this[_0x533d46(0x109)]=_0x38a5de(_0x4c8fe8[_0x533d46(0x10b)],_0x533d46(0x140),{..._0xc64793,'pubkey':_0x3b13d4,'ctx-name':_0x533d46(0x100),'sourceList':'','imgOnly':_0x533d46(0x13d),'removeCopyright':_0x533d46(0x13d),'localeName':this[_0x533d46(0x136)][_0x533d46(0xf4)][_0x533d46(0x122)],'externalSourcesEmbedCss':_0x533d46(0xfd)}),this[_0x533d46(0x109)][_0x533d46(0x144)]=_0x6289bf=>{const _0xea7d1=_0x533d46;if(_0xea7d1(0x108)==_0x6289bf)return _0xea7d1(0x13f);},_0x4c8fe8[_0x533d46(0x10b)][_0x533d46(0xfe)][_0x533d46(0x132)](this[_0x533d46(0x109)]);}[_0x2cff78(0x11e)](){const _0x3194f5=_0x2cff78;this[_0x3194f5(0x137)]=_0x38a5de(_0x4c8fe8[_0x3194f5(0x10b)],_0x3194f5(0x12b),{'ctx-name':_0x3194f5(0x100)}),_0x4c8fe8[_0x3194f5(0x10b)][_0x3194f5(0xfe)][_0x3194f5(0x132)](this[_0x3194f5(0x137)]);}[_0x2cff78(0x126)](){const _0x52d432=_0x2cff78,_0x5a1f6d=this[_0x52d432(0x136)][_0x52d432(0x116)][_0x52d432(0x130)](_0x52d432(0x142));_0x5a1f6d&&this[_0x52d432(0xf6)](_0x5a1f6d,_0x52d432(0x11c),()=>{const _0x455468=_0x52d432,_0x25c0cb=this[_0x455468(0x136)][_0x455468(0x113)][_0x455468(0x10b)][_0x455468(0x105)][_0x455468(0x112)]();_0x25c0cb&&_0x25c0cb[_0x455468(0x123)](_0x455468(0x12f))&&this[_0x455468(0x136)][_0x455468(0xf9)][_0x455468(0x121)][_0x455468(0x107)](_0x455468(0xf8),()=>{const _0xaabc5d=_0x455468;_0x3454f8(this[_0xaabc5d(0x136)],_0x25c0cb);});});const _0x1e666e=this[_0x52d432(0x136)][_0x52d432(0x116)][_0x52d432(0x130)](_0x52d432(0x106));_0x1e666e&&this[_0x52d432(0xf6)](_0x1e666e,_0x52d432(0x11c),()=>{const _0x18c95c=_0x52d432,_0x4e21d0=this[_0x18c95c(0x136)][_0x18c95c(0x113)][_0x18c95c(0x10b)][_0x18c95c(0x105)][_0x18c95c(0x112)]();_0x4e21d0&&_0x4e21d0[_0x18c95c(0x123)](_0x18c95c(0x12f))&&this[_0x18c95c(0x136)][_0x18c95c(0xf9)][_0x18c95c(0x121)][_0x18c95c(0x107)](_0x18c95c(0xf8),()=>{const _0x2ca051=_0x18c95c;_0x3454f8(this[_0x2ca051(0x136)],_0x4e21d0);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x15526b,ObservableMixin as _0x10fd1d}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x3b09e5}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x212d08}from'ckeditor5/src/icons.js';import _0x429258 from'./uploadcareimageeditformview.js';import _0x249fcf from'../../utils/uploadutils.js';import{getImageUrls as _0x128c9c,getImageDimension as _0x1b3db9}from'../../utils/editingutils.js';import{isAncestor as _0x4177eb}from'../../utils/isancestor.js';export default class z extends/* #__PURE__ -- @preserve */
24
- _0x10fd1d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4a88df,_0x3ffb9b,_0x22a3ef){super(),this['_editor']=_0x4a88df,this['_dialog']=_0x3ffb9b,this['_imageElement']=_0x22a3ef,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x520279=this['_imageElement'],_0x14ee3a=_0x520279['getAttribute']('uploadcareImageId'),_0x59eaa9=_0x520279['getAttribute']('src');if(_0x14ee3a)await this['_loadImageInfo'](_0x14ee3a,_0x59eaa9);else{if(this['_imageCache']['has'](_0x59eaa9)){const _0x5a9101=this['_imageCache']['get'](_0x59eaa9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5a9101['url'],this['imageDimension']=_0x5a9101['dimension'],this['imageId']=_0x5a9101['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3d03e6}=this['_editor'],t=_0x3d03e6['t'],_0xd92578=new _0x429258(_0x3d03e6,this['imageStatus'],this['_attributes']);_0xd92578['bind']('status')['to'](this,'imageStatus'),_0xd92578['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xd92578['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xd92578['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xd92578,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x212d08,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xd92578,'position':_0x3b09e5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xd92578['focus']();},'onHide':()=>{_0xd92578['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5baf39=>!_0x4177eb(_0x5baf39,_0xd92578['element'])}});}['_loadImageInfo'](_0x4443c1,_0x4dba97){return _0x249fcf['getInfo'](_0x4443c1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x402179=>{const {width:_0x4fbb0f,height:_0x2b0cbb}=_0x402179['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4dba97,this['imageDimension']={'width':_0x4fbb0f,'height':_0x2b0cbb},this['imageId']=_0x4443c1;})['catch'](_0x307099=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x307099['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2cc3dc,_0x295d56){return this['_getImageAsFile'](_0x2cc3dc)['then'](_0x593fa5=>_0x249fcf['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x295d56['signal'],'file':_0x593fa5,'onProgress':_0x2fb1e3=>{_0x2fb1e3&&_0x2fb1e3['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2fb1e3['value']));}}))['then'](_0x56a332=>{const {width:_0xd09103,height:_0x87bb51}=_0x56a332['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x56a332['cdnUrl'],this['imageDimension']={'width':_0xd09103,'height':_0x87bb51},this['imageId']=_0x56a332['uuid'],this['imageUploadProgress']=null;const _0xd540e1=_0x2cc3dc['getAttribute']('src');this['_imageCache']['set'](_0xd540e1,{'id':_0x56a332['uuid'],'url':_0x56a332['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x510c39=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x510c39['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1b1d15,_0xb15bca){_0x1b1d15['on']('apply',(_0x2f2b2c,_0x416062)=>{this['_replaceImage'](_0xb15bca,_0x416062['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1b1d15['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1b1d15['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x29b6d3,_0x5dd7a4,_0x2d360f){const _0x3d056e=this['_editor'],{width:_0x3a7e1e,height:_0x437452}=_0x1b3db9(_0x5dd7a4,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x43636d,imageSources:_0x4b041c}=_0x128c9c(_0x5dd7a4,_0x3a7e1e);_0x3d056e['model']['change'](_0x3a6a1f=>{if('$graveyard'===_0x29b6d3['root']['rootName']){_0x3d056e['execute']('insertImage',{'imageType':_0x29b6d3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x29b6d3['getAttributes']()),'uploadcareImageId':_0x2d360f,'src':_0x43636d,'sources':_0x4b041c,'width':_0x3a7e1e,'height':_0x437452}});const _0x599580=_0x29b6d3['getChildren']();_0x29b6d3=_0x3d056e['model']['document']['selection']['getSelectedElement']();for(const _0x45a54f of _0x599580)_0x3a6a1f['append'](_0x3a6a1f['cloneElement'](_0x45a54f),_0x29b6d3);}else _0x3a6a1f['setSelection'](_0x29b6d3,'on'),_0x3d056e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x29b6d3['getAttributes']()),'uploadcareImageId':_0x2d360f,'src':_0x43636d,'sources':_0x4b041c,'width':_0x3a7e1e,'height':_0x437452},_0x29b6d3);_0x3a6a1f['setSelection'](_0x29b6d3,'on');});}async['_getImageAsFile'](_0x448c28){const _0x35342a=_0x15526b['window'],_0x1ecf6e=_0x15526b['document']['location']['href'],_0x4947f3=new _0x35342a['URL'](_0x448c28['getAttribute']('src'),_0x1ecf6e);if('data:'===_0x4947f3['protocol']){const _0x558c95=_0x4947f3['href']['split'](','),_0x11be7b=_0x558c95[0x0]['match'](/:(.*?);/)[0x1],_0x2fa351=_0x11be7b['split']('/')[0x1],_0x2a1a08=_0x35342a['atob'](_0x558c95[_0x558c95['length']-0x1]);let _0x3e7920=_0x2a1a08['length'];const _0x3da2c7=new _0x35342a['Uint8Array'](_0x3e7920);for(;_0x3e7920--;)_0x3da2c7[_0x3e7920]=_0x2a1a08['charCodeAt'](_0x3e7920);return new _0x35342a['File']([_0x3da2c7],'image.'+_0x2fa351,{'type':_0x11be7b});}const _0x641c03=_0x4947f3['href']['split']('/'),_0x58a871=_0x641c03[_0x641c03['length']-0x1],_0x1e57a1=_0x58a871['split']('.')[0x1];return _0x35342a['fetch'](_0x4947f3['href'])['then'](_0x5c394b=>_0x5c394b['clone']()['blob']())['then'](_0x3e4784=>new _0x35342a['File']([_0x3e4784],_0x58a871,{'type':'image/'+_0x1e57a1}));}}
23
+ import{global as _0x3860e0,ObservableMixin as _0x4adf5d}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x3e6479}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x47826d}from'ckeditor5/src/icons.js';import _0x138094 from'./uploadcareimageeditformview.js';import _0x4cf3ac from'../../utils/uploadutils.js';import{getImageUrls as _0x3469e8,getImageDimension as _0x48ad97}from'../../utils/editingutils.js';import{isAncestor as _0x405a97}from'../../utils/isancestor.js';export default class O extends/* #__PURE__ -- @preserve */
24
+ _0x4adf5d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1694bf,_0x4692a2,_0x1dc4f6){super(),this['_editor']=_0x1694bf,this['_dialog']=_0x4692a2,this['_imageElement']=_0x1dc4f6,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x472114=this['_imageElement'],_0x366478=_0x472114['getAttribute']('uploadcareImageId'),_0x1d0303=_0x472114['getAttribute']('src');if(_0x366478)await this['_loadImageInfo'](_0x366478,_0x1d0303);else{if(this['_imageCache']['has'](_0x1d0303)){const _0x4145be=this['_imageCache']['get'](_0x1d0303);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4145be['url'],this['imageDimension']=_0x4145be['dimension'],this['imageId']=_0x4145be['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2a6f2d}=this['_editor'],t=_0x2a6f2d['t'],_0xaf72e8=new _0x138094(_0x2a6f2d,this['imageStatus'],this['_attributes']);_0xaf72e8['bind']('status')['to'](this,'imageStatus'),_0xaf72e8['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xaf72e8['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xaf72e8['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xaf72e8,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x47826d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xaf72e8,'position':_0x3e6479['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xaf72e8['focus']();},'onHide':()=>{_0xaf72e8['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x396787=>!_0x405a97(_0x396787,_0xaf72e8['element'])}});}['_loadImageInfo'](_0x3ceb9a,_0x2e3550){return _0x4cf3ac['getInfo'](_0x3ceb9a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0xdae3df=>{const {width:_0x2f9661,height:_0x15df6a}=_0xdae3df['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2e3550,this['imageDimension']={'width':_0x2f9661,'height':_0x15df6a},this['imageId']=_0x3ceb9a;})['catch'](_0x2dbf27=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2dbf27['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3b311c,_0x2ba351){return this['_getImageAsFile'](_0x3b311c)['then'](_0x53f22d=>_0x4cf3ac['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2ba351['signal'],'file':_0x53f22d,'onProgress':_0x71f794=>{_0x71f794&&_0x71f794['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x71f794['value']));}}))['then'](_0x1fac04=>{const {width:_0x75cd01,height:_0x350b01}=_0x1fac04['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1fac04['cdnUrl'],this['imageDimension']={'width':_0x75cd01,'height':_0x350b01},this['imageId']=_0x1fac04['uuid'],this['imageUploadProgress']=null;const _0x3fecde=_0x3b311c['getAttribute']('src');this['_imageCache']['set'](_0x3fecde,{'id':_0x1fac04['uuid'],'url':_0x1fac04['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x13e63e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x13e63e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4bef0f,_0x43f2fc){_0x4bef0f['on']('apply',(_0xa95a52,_0x207928)=>{this['_replaceImage'](_0x43f2fc,_0x207928['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4bef0f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4bef0f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3f6ab5,_0xe59a98,_0x29b69e){const _0x58e364=this['_editor'],{width:_0x2fc76b,height:_0x471253}=_0x48ad97(_0xe59a98,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1bf785,imageSources:_0x5dd5a8}=_0x3469e8(_0xe59a98,_0x2fc76b);_0x58e364['model']['change'](_0xd5bc39=>{if('$graveyard'===_0x3f6ab5['root']['rootName']){_0x58e364['execute']('insertImage',{'imageType':_0x3f6ab5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3f6ab5['getAttributes']()),'uploadcareImageId':_0x29b69e,'src':_0x1bf785,'sources':_0x5dd5a8,'width':_0x2fc76b,'height':_0x471253}});const _0x3b9913=_0x3f6ab5['getChildren']();_0x3f6ab5=_0x58e364['model']['document']['selection']['getSelectedElement']();for(const _0xb59846 of _0x3b9913)_0xd5bc39['append'](_0xd5bc39['cloneElement'](_0xb59846),_0x3f6ab5);}else _0xd5bc39['setSelection'](_0x3f6ab5,'on'),_0x58e364['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3f6ab5['getAttributes']()),'uploadcareImageId':_0x29b69e,'src':_0x1bf785,'sources':_0x5dd5a8,'width':_0x2fc76b,'height':_0x471253},_0x3f6ab5);_0xd5bc39['setSelection'](_0x3f6ab5,'on');});}async['_getImageAsFile'](_0x30ffea){const _0x133a3c=_0x3860e0['window'],_0x4865aa=_0x3860e0['document']['location']['href'],_0x3ac4a4=new _0x133a3c['URL'](_0x30ffea['getAttribute']('src'),_0x4865aa);if('data:'===_0x3ac4a4['protocol']){const _0x5efaf4=_0x3ac4a4['href']['split'](','),_0x514098=_0x5efaf4[0x0]['match'](/:(.*?);/)[0x1],_0x47c0ef=_0x514098['split']('/')[0x1],_0x5c2e50=_0x133a3c['atob'](_0x5efaf4[_0x5efaf4['length']-0x1]);let _0x576726=_0x5c2e50['length'];const _0x194aba=new _0x133a3c['Uint8Array'](_0x576726);for(;_0x576726--;)_0x194aba[_0x576726]=_0x5c2e50['charCodeAt'](_0x576726);return new _0x133a3c['File']([_0x194aba],'image.'+_0x47c0ef,{'type':_0x514098});}const _0x241c72=_0x3ac4a4['href']['split']('/'),_0x2b4517=_0x241c72[_0x241c72['length']-0x1],_0x34ac06=_0x2b4517['split']('.')[0x1];return _0x133a3c['fetch'](_0x3ac4a4['href'])['then'](_0x1ed069=>_0x1ed069['clone']()['blob']())['then'](_0x55f8ae=>new _0x133a3c['File']([_0x55f8ae],_0x2b4517,{'type':'image/'+_0x34ac06}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x5090(){const _0x2ad298=['10OHJotp','7UYwjNm','91492WNQqVQ','71682UPMugq','394306wmSuYZ','40ULbWGu','11244232jUSKOV','setTemplate','uc-light','28115879NdLSwn','set','454929ZbXJRr','bindTemplate','uc-cloud-image-editor','ck-uploadcare-theme','imageSrc','32HNqjvT','4180707PRbIgq','image-edit'];_0x5090=function(){return _0x2ad298;};return _0x5090();}(function(_0x1843ec,_0x494e78){const _0x49ffb7=_0x4c76,_0x719e=_0x1843ec();while(!![]){try{const _0x43752f=parseInt(_0x49ffb7(0x10a))/0x1+-parseInt(_0x49ffb7(0x11b))/0x2+-parseInt(_0x49ffb7(0x111))/0x3*(parseInt(_0x49ffb7(0x116))/0x4)+parseInt(_0x49ffb7(0x10b))/0x5*(parseInt(_0x49ffb7(0x109))/0x6)+parseInt(_0x49ffb7(0x11a))/0x7*(-parseInt(_0x49ffb7(0x10c))/0x8)+parseInt(_0x49ffb7(0x117))/0x9+parseInt(_0x49ffb7(0x119))/0xa*(parseInt(_0x49ffb7(0x10f))/0xb);if(_0x43752f===_0x494e78)break;else _0x719e['push'](_0x719e['shift']());}catch(_0x3c26c1){_0x719e['push'](_0x719e['shift']());}}}(_0x5090,0xce897));function _0x4c76(_0x3b3077,_0x4c55c0){const _0x509063=_0x5090();return _0x4c76=function(_0x4c7607,_0x5e182d){_0x4c7607=_0x4c7607-0x109;let _0x134424=_0x509063[_0x4c7607];return _0x134424;},_0x4c76(_0x3b3077,_0x4c55c0);}import{View as _0x30f6ba}from'ckeditor5/src/ui.js';export default class tt extends _0x30f6ba{constructor(_0x55ab37,_0x33600a){const _0x101df1=_0x4c76;super(_0x55ab37);const _0x2cd04b=this[_0x101df1(0x112)];this[_0x101df1(0x110)](_0x101df1(0x115),''),this[_0x101df1(0x10d)]({'tag':_0x101df1(0x113),'attributes':{..._0x33600a,'class':[_0x101df1(0x10e),_0x101df1(0x114)],'ctx-name':_0x101df1(0x118),'cdn-url':_0x2cd04b['to'](_0x101df1(0x115))}});}}
23
+ (function(_0x249490,_0x3aa320){const _0x521bd4=_0x3681,_0x28f1f2=_0x249490();while(!![]){try{const _0x48c86d=parseInt(_0x521bd4(0x1b6))/0x1+parseInt(_0x521bd4(0x1a8))/0x2*(parseInt(_0x521bd4(0x1a5))/0x3)+-parseInt(_0x521bd4(0x1aa))/0x4*(parseInt(_0x521bd4(0x1a9))/0x5)+-parseInt(_0x521bd4(0x1b4))/0x6+-parseInt(_0x521bd4(0x1b3))/0x7*(-parseInt(_0x521bd4(0x1b2))/0x8)+parseInt(_0x521bd4(0x1ab))/0x9+-parseInt(_0x521bd4(0x1ac))/0xa;if(_0x48c86d===_0x3aa320)break;else _0x28f1f2['push'](_0x28f1f2['shift']());}catch(_0x525498){_0x28f1f2['push'](_0x28f1f2['shift']());}}}(_0x3517,0x6cb21));function _0x3681(_0x3990b6,_0x415d81){const _0x351705=_0x3517();return _0x3681=function(_0x3681bf,_0xdb8ba5){_0x3681bf=_0x3681bf-0x1a5;let _0x42e160=_0x351705[_0x3681bf];return _0x42e160;},_0x3681(_0x3990b6,_0x415d81);}import{View as _0x3af82a}from'ckeditor5/src/ui.js';function _0x3517(){const _0x8a46fd=['250168dGnluA','1400185sJxVGG','8UylqvY','6845067MLxdRl','10515930CAewmG','uc-light','ck-uploadcare-theme','imageSrc','bindTemplate','uc-cloud-image-editor','216EAIRSp','192801KEHDJb','4342980LvJtsR','set','776154oHPyaA','12yKaXMS','setTemplate','image-edit'];_0x3517=function(){return _0x8a46fd;};return _0x3517();}export default class tt extends _0x3af82a{constructor(_0x21b740,_0x5bf435){const _0x4d8a08=_0x3681;super(_0x21b740);const _0x5c1ec8=this[_0x4d8a08(0x1b0)];this[_0x4d8a08(0x1b5)](_0x4d8a08(0x1af),''),this[_0x4d8a08(0x1a6)]({'tag':_0x4d8a08(0x1b1),'attributes':{..._0x5bf435,'class':[_0x4d8a08(0x1ad),_0x4d8a08(0x1ae)],'ctx-name':_0x4d8a08(0x1a7),'cdn-url':_0x5c1ec8['to'](_0x4d8a08(0x1af))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x20967d,IconView as at,View as _0x2e70c9}from'ckeditor5/src/ui.js';export default class rt extends _0x2e70c9{constructor(_0x1595e2){super(_0x1595e2);const t=_0x1595e2['t'];this['set']('errorType',null);const _0x59bf6b=new _0x20967d(_0x1595e2);_0x59bf6b['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x59bf6b['withText']=!0x0,_0x59bf6b['class']='ck-button-action',_0x59bf6b['on']('execute',()=>{this['fire']('retry');}),_0x59bf6b['bind']('isVisible')['to'](this,'errorType',_0x1f6bb4=>'NotFound'!==_0x1f6bb4);const _0x4a2653=new at();_0x4a2653['content']=et,_0x4a2653['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4427dc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x4a2653,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4427dc['to']('errorType',_0x40fae0=>t('NotFound'!==_0x40fae0?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x59bf6b]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x290ed4,IconView as at,View as _0x2637e2}from'ckeditor5/src/ui.js';export default class rt extends _0x2637e2{constructor(_0x1aa706){super(_0x1aa706);const t=_0x1aa706['t'];this['set']('errorType',null);const _0x576de7=new _0x290ed4(_0x1aa706);_0x576de7['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x576de7['withText']=!0x0,_0x576de7['class']='ck-button-action',_0x576de7['on']('execute',()=>{this['fire']('retry');}),_0x576de7['bind']('isVisible')['to'](this,'errorType',_0x4fd9af=>'NotFound'!==_0x4fd9af);const _0x30b35d=new at();_0x30b35d['content']=et,_0x30b35d['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4e60c4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x30b35d,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4e60c4['to']('errorType',_0x3af7c3=>t('NotFound'!==_0x3af7c3?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x576de7]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{SpinnerView as _0x39fffb,View as _0x39063e}from'ckeditor5/src/ui.js';export default class ta extends _0x39063e{constructor(_0x6ba3ca){super(_0x6ba3ca);const t=_0x6ba3ca['t'],_0x131175=this['bindTemplate'],_0x3d1d99=new _0x39fffb();_0x3d1d99['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x3d1d99,{'text':_0x131175['to']('imageUploadProgress',_0x48104a=>t('Loading\x20image...')+'\x20('+(_0x48104a||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{SpinnerView as _0x31f7ce,View as _0x1a7834}from'ckeditor5/src/ui.js';export default class ta extends _0x1a7834{constructor(_0x2f2311){super(_0x2f2311);const t=_0x2f2311['t'],_0x930c37=this['bindTemplate'],_0x5f0593=new _0x31f7ce();_0x5f0593['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x5f0593,{'text':_0x930c37['to']('imageUploadProgress',_0x47c758=>t('Loading\x20image...')+'\x20('+(_0x47c758||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}