@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260125.0 → 0.0.0-nightly-next-20260126.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x1381fe,Command as _0x4053fb}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x136e42,IconGooglePhotos as _0x890cfc,IconGoogleDrive as _0xe04989,IconFacebook as _0x1dfde4,IconDropbox as _0x30595f,IconUploadcareLink as _0xa0d5b4,IconUploadcareImageUpload as _0x4de35b,IconError as _0x3352f5,IconUploadcareImageEdit as _0x2e810c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1c2298,MenuBarMenuListItemButtonView as _0x2ef86d,View as _0x5e2bd9,FocusCycler as _0x580d81,Dialog as _0xc5a1d6,DialogViewPosition as _0x5be585,SpinnerView as _0x81341c,IconView as _0x20776e,Notification as _0x4a616d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x4e710d,DomEmitterMixin as _0x572036,global as _0x58ec2d,getAncestors as _0x4fc9f1,ObservableMixin as _0x23ed1c,uid as _0x30f973,createElement as _0x367357}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x460eae}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1267ba,info as _0x4e0038}from'@uploadcare/upload-client';import*as _0x132b1c from'@uploadcare/file-uploader';var S=function(_0x51cb32){return _0x51cb32['Local']='local',_0x51cb32['URL']='url',_0x51cb32['Dropbox']='dropbox',_0x51cb32['GDrive']='gdrive',_0x51cb32['Facebook']='facebook',_0x51cb32['GPhotos']='gphotos',_0x51cb32['OneDrive']='onedrive',_0x51cb32;}({});function T(_0xa61e75,_0x52934b,_0x5f1f0b){const t=_0xa61e75['t'],_0x3970b=_0xa61e75['t'];switch(_0x52934b){case S['Local']:return{'text':_0x3970b('Insert'===_0x5f1f0b?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3970b('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x5f1f0b?_0x3970b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3970b('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x5f1f0b?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x52934b;}}class A extends _0x1381fe{['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 _0x60a97a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x206cab;for(const _0x4c549d in _0x60a97a){const _0x290dd1=_0x4c549d,_0x374b35=_0x60a97a[_0x290dd1];if('uploadcareLicenseKeyValid'==_0x374b35||'uploadcareLicenseKeyInvalid'==_0x374b35||'uploadcareLicenseKeyExpired'==_0x374b35||'uploadcareLicenseKeyDomainLimit'==_0x374b35||'uploadcareLicenseKeyNotAllowed'==_0x374b35||'uploadcareLicenseKeyEvaluationLimit'==_0x374b35||'uploadcareLicenseKeyUsageLimit'==_0x374b35){delete _0x60a97a[_0x290dd1],_0x206cab=_0x374b35,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x206cab&&_0x60a97a['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x206cab&&_0x60a97a['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x206cab&&_0x60a97a['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x206cab&&_0x60a97a['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2f3d30}=this,_0x2013a4=_0x2f3d30['commands']['get']('uploadcare');if(!_0x2013a4)return;const _0x34953e=this['_normalizeConfigSourceList'](_0x2f3d30['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x35de79,_0xc271a9)=>{const _0x13d84e=this['_getIntegrationKey'](_0xc271a9['type']);return _0x35de79[_0x13d84e]||(_0x35de79[_0x13d84e]=[]),_0x35de79[_0x13d84e]['push'](_0xc271a9),_0x35de79;},{});_0x2f3d30['plugins']['has']('ImageInsertUI')&&_0x2f3d30['commands']['get']('uploadcare')&&Object['entries'](_0x34953e)['forEach'](([_0x363a3f,_0x402bee])=>{_0x2f3d30['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x363a3f,'observable':()=>_0x2013a4,'buttonViewCreator':()=>this['_createToolbarButton'](_0x402bee),'formViewCreator':()=>this['_createDropdownButtons'](_0x402bee),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x402bee),'override':'assetManager'!==_0x363a3f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xf523ca){const {locale:_0x89ff36}=this['editor'];return _0xf523ca['map'](_0x271800=>{const _0x5322c0=T(_0x89ff36,_0x271800,'Insert');switch(_0x271800){case S['Local']:return{'icon':_0x4de35b,'type':S['Local'],..._0x5322c0};case S['URL']:return{'icon':_0xa0d5b4,'type':S['URL'],..._0x5322c0};case S['Dropbox']:return{'icon':_0x30595f,'type':S['Dropbox'],..._0x5322c0};case S['Facebook']:return{'icon':_0x1dfde4,'type':S['Facebook'],..._0x5322c0};case S['GDrive']:return{'icon':_0xe04989,'type':S['GDrive'],..._0x5322c0};case S['GPhotos']:return{'icon':_0x890cfc,'type':S['GPhotos'],..._0x5322c0};case S['OneDrive']:return{'icon':_0x136e42,'type':S['OneDrive'],..._0x5322c0};}});}['_getIntegrationKey'](_0xa5fbb4){switch(_0xa5fbb4){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3b1d43,_0x482d52){const _0x280716=this['editor'],_0x16d1d5=new _0x3b1d43(_0x280716['locale']),_0x27ac6e=_0x280716['commands']['get']('uploadcare');return _0x16d1d5['bind']('isEnabled')['to'](_0x27ac6e),_0x16d1d5['on']('execute',()=>{_0x27ac6e['execute'](_0x482d52);}),_0x16d1d5;}['_createToolbarButton'](_0x48669d){const {locale:_0x3718f6}=this['editor'],_0x2e06cd=this['editor']['plugins']['get']('ImageInsertUI'),_0x56507b=_0x48669d[0x0],_0x46f178=this['_createButton'](_0x1c2298,_0x56507b['type']);return _0x46f178['icon']=_0x56507b['icon'],_0x46f178['bind']('label')['to'](_0x2e06cd,'isImageSelected',_0x1d1314=>T(_0x3718f6,_0x56507b['type'],_0x1d1314?'Replace':'Insert')['text']),_0x46f178['tooltip']=!0x0,_0x46f178;}['_createDropdownButtons'](_0x286778){const {locale:_0x87e6bb}=this['editor'],_0x2ca0ad=this['editor']['plugins']['get']('ImageInsertUI');return _0x286778['map'](_0x283a0a=>{const _0xe21cb5=this['_createButton'](_0x1c2298,_0x283a0a['type']);return _0xe21cb5['withText']=!0x0,_0xe21cb5['icon']=_0x283a0a['icon'],_0xe21cb5['bind']('label')['to'](_0x2ca0ad,'isImageSelected',_0x3ae25d=>T(_0x87e6bb,_0x283a0a['type'],_0x3ae25d?'Replace':'Insert')['text']),_0xe21cb5;});}['_createMenuBarButtons'](_0x4d3566){return _0x4d3566['map'](_0x28d486=>{const _0x3d174e=this['_createButton'](_0x2ef86d,_0x28d486['type']);return _0x3d174e['icon']=_0x28d486['icon'],_0x3d174e['label']=_0x28d486['shortText'],_0x3d174e;});}}class K extends _0x5e2bd9{['focusTracker'];['focusCycler'];constructor(_0xb1055c){super(_0xb1055c),this['focusTracker']=new _0x4e710d(),this['focusCycler']=new _0x580d81({'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 O extends K{constructor(_0x4eb0a4,_0x369135){super(_0x4eb0a4),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-'+_0x369135}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x37eacc,_0xcd8f7f){const _0x1fdc63=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x504096=>_0x504096<=_0xcd8f7f)['map'](_0x2ec14b=>_0x37eacc['replace'](/\/$/,'')+'/-/resize/'+_0x2ec14b+'x/\x20'+_0x2ec14b+'w');return{'imageFallbackUrl':_0x37eacc,'imageSources':[{'srcset':_0x1fdc63['join'](',\x20'),'sizes':'(max-width:\x20'+_0xcd8f7f+'px)\x20100vw,\x20'+_0xcd8f7f+'px','type':'image/webp'}]};}function F(_0x12e357,_0x5ee673,_0x5a8f4f){const _0x44e05c=_0x12e357['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x44e05c?parseInt(_0x44e05c[0x1],0xa):_0x5ee673,'height':_0x44e05c?parseInt(_0x44e05c[0x2],0xa):_0x5a8f4f};}function $(_0x1cdfe0,_0x19dcfc){const _0x31779e=new(_0x572036())(),_0x20498c=_0x1cdfe0['plugins']['get']('ImageUtils'),_0x26f494=_0x1cdfe0['editing']['mapper']['toViewElement'](_0x19dcfc),_0x207367=_0x20498c['findViewImgElement'](_0x26f494),_0x30f885=_0x1cdfe0['editing']['view']['domConverter']['viewToDom'](_0x207367),_0x1e0029=_0x19dcfc['getAttribute']('width'),_0x1fcc12=_0x19dcfc['getAttribute']('height'),_0x430e17='image-processing';_0x1cdfe0['editing']['view']['change'](_0x162570=>{_0x162570['addClass'](_0x430e17,_0x26f494),_0x162570['setStyle']('aspect-ratio',_0x1e0029+'/'+_0x1fcc12,_0x207367);}),_0x31779e['listenTo'](_0x30f885,'load',()=>{_0x31779e['stopListening'](_0x30f885,'load'),_0x1cdfe0['editing']['view']['change'](_0x4ef38e=>{_0x4ef38e['removeClass'](_0x430e17,_0x26f494),_0x4ef38e['removeStyle']('aspect-ratio',_0x207367);});});}function B(_0x1e6891){if(Array['isArray'](_0x1e6891)){const _0x4cdc1f=_0x1e6891['map'](B);return _0x3e4966=>_0x4cdc1f['some'](_0xad94e8=>_0xad94e8(_0x3e4966));}if('origin'==_0x1e6891){const _0x316058=_0x58ec2d['window']['location']['origin'];return _0x231d3c=>new URL(_0x231d3c,_0x58ec2d['document']['baseURI'])['origin']==_0x316058;}return'function'==typeof _0x1e6891?_0x1e6891:_0x1e6891 instanceof RegExp?_0x536c15=>!(!_0x536c15['match'](_0x1e6891)&&!_0x536c15['replace'](/^https?:\/\//,'')['match'](_0x1e6891)):()=>!0x1;}function V(_0x58c051,_0x37f2f0){return _0x4fc9f1(_0x58c051['target'])['includes'](_0x37f2f0);}class j extends/* #__PURE__ -- @preserve */
24
- _0x23ed1c(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2d9580,_0x1e5db4,_0x3cfcdf){super(),this['_editor']=_0x2d9580,this['_editing']=_0x1e5db4,this['_dialog']=_0x2d9580['plugins']['get'](_0xc5a1d6),this['_api']=_0x1e5db4['ctxElement']['getAPI'](),this['_type']=_0x3cfcdf,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:_0x22e9e8,model:_0x7fa8fa}=this['_editor'],_0x33d5af=_0x7fa8fa['document']['selection']['getSelectedElement'](),_0x40ebea=_0x33d5af&&(_0x33d5af['is']('element','imageBlock')||_0x33d5af['is']('element','imageInline'));this['_formView']=new O(_0x22e9e8,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4de35b,'title':T(_0x22e9e8,this['_type'],_0x40ebea?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5be585['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3c1413=>!V(_0x3c1413,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x393074}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1e4c6c=>{const _0x1479e1=_0x393074['length'];for(const _0x5bb8cb of _0x393074){const _0x5a4965=_0x5bb8cb===_0x393074[_0x1479e1-0x1],{cdnUrl:_0x4ac312,fileInfo:_0xf46070}=_0x5bb8cb;if(!_0x4ac312||!_0xf46070)continue;const {width:_0x31bded,height:_0x417d4d}=_0xf46070['imageInfo'],_0x2f3edb=F(_0x4ac312,_0x31bded,_0x417d4d),_0x59b161=D(_0x4ac312,_0x2f3edb['width']),_0x6c29a6={'id':_0xf46070['uuid'],'type':'image','attributes':{'imageDimension':_0x2f3edb,..._0x59b161}};this['_insertAsset'](_0x6c29a6,_0x5a4965,_0x1e4c6c);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x4d5d13=>{'idle'===_0x4d5d13['detail']['status']&&!_0x4d5d13['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x2e0ebd,_0xd5a721,_0x19b461){const _0x44072b=this['_editor']['model']['document']['selection'],_0x1bb43d=_0x44072b['getSelectedElement'](),_0x4c6431=!(!_0x1bb43d||!_0x1bb43d['is']('element','imageInline'));_0x19b461['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x2e0ebd,_0x4c6431),_0xd5a721||_0x19b461['setSelection'](_0x44072b['getLastPosition']());}['_insertImage'](_0x1afe75,_0x3b2841){const _0x35adfa=this['_editor'],{imageDimension:_0x3f9f2b,imageFallbackUrl:_0x506226,imageSources:_0x1986a0}=_0x1afe75['attributes'];_0x35adfa['execute']('insertImage',{'imageType':_0x3b2841?'imageInline':null,'source':{'uploadcareImageId':_0x1afe75['id'],'src':_0x506226,'sources':_0x1986a0,..._0x3f9f2b}});}}class M extends _0x4053fb{['_editing'];['_controller']=null;static get['requires'](){return[_0xc5a1d6,z];}constructor(_0x1562f2){super(_0x1562f2),this['_editing']=_0x1562f2['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3d95b4){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x3d95b4);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x1ccb7e,..._0x11b8de}){return _0x1267ba(_0x1ccb7e,_0x11b8de);}static['getInfo'](_0x5f2a32,_0x1b4711){return _0x4e0038(_0x5f2a32,_0x1b4711);}}class W extends _0x1381fe{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x460eae,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x10a2fb=this['editor'];if(!!!_0x10a2fb['config']['get']('uploadcare'))return;_0x10a2fb['plugins']['get'](_0x460eae)['createUploadAdapter']=_0x12cc14=>new G(_0x12cc14,_0x10a2fb),_0x10a2fb['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4fc890,{imageElement:_0x18f443,data:_0x1d54d1})=>{_0x10a2fb['model']['change'](_0x11ec50=>{_0x11ec50['setAttribute']('uploadcareImageId',_0x1d54d1['uploadcareImageId'],_0x18f443);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x6d7bd,_0x395a60){this['loader']=_0x6d7bd,this['editor']=_0x395a60,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x31cb55=await this['loader']['file'];return q['upload']({'file':_0x31cb55,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x197ea0=>{_0x197ea0&&_0x197ea0['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x197ea0['value']);}})['then'](async _0x4cf98e=>{const {imageFallbackUrl:_0x5793f7,imageSources:_0x58ad48}=D(_0x4cf98e['cdnUrl'],_0x4cf98e['imageInfo']['width']);return{'uploadcareImageId':_0x4cf98e['uuid'],'default':_0x5793f7,'sources':_0x58ad48};})['catch'](()=>{const _0xf46057=t('Cannot\x20upload\x20file:')+('\x20'+_0x31cb55['name']+'.');return Promise['reject'](_0xf46057);});}['abort'](){this['controller']['abort']();}}class z extends _0x1381fe{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0xc5a1d6];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x4f25f6){super(_0x4f25f6),this['ucContextId']=_0x30f973();}['init'](){const _0x16f123=this['editor'];_0x16f123['commands']['add']('uploadcare',new M(_0x16f123));}['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 _0x4611bd=_0x58ec2d['document']['querySelector']('input[uploadcare-file-input]');_0x4611bd&&_0x4611bd['remove']();}),async function(_0x3fa222){const _0x4d7a04=_0x24435c([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x224f15=0x535f8c3a,_0x1635e6=0x5358f3ea^_0x224f15,_0x14dfa2=window[_0x24435c([0x44,0x61,0x74,0x65])][_0x24435c([0x6e,0x6f,0x77])](),_0x42382c=_0x3fa222[_0x24435c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe18156=new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x241552=>{_0x42382c[_0x24435c([0x6f,0x6e,0x63,0x65])](_0x24435c([0x72,0x65,0x61,0x64,0x79]),_0x241552);}),_0x59d899={[_0x24435c([0x6b,0x74,0x79])]:_0x24435c([0x45,0x43]),[_0x24435c([0x75,0x73,0x65])]:_0x24435c([0x73,0x69,0x67]),[_0x24435c([0x63,0x72,0x76])]:_0x24435c([0x50,0x2d,0x32,0x35,0x36]),[_0x24435c([0x78])]:_0x24435c([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]),[_0x24435c([0x79])]:_0x24435c([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]),[_0x24435c([0x61,0x6c,0x67])]:_0x24435c([0x45,0x53,0x32,0x35,0x36])},_0x55be63=_0x42382c[_0x24435c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24435c([0x67,0x65,0x74])](_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1921e8(){let _0x18a8b3,_0x13a399=null,_0x2eb66a=null;try{if(_0x55be63==_0x24435c([0x47,0x50,0x4c]))return _0x24435c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18a8b3=_0x5ec9a1(),!_0x18a8b3)return _0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18a8b3[_0x24435c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2eb66a=_0x5cce2e(_0x18a8b3[_0x24435c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18a8b3[_0x24435c([0x6a,0x74,0x69])])),await _0x19bd7c()?_0x1c2e83()?_0x554d83()?_0x24435c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1f2d9d()?(_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24435c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13a399=_0x19e8a5(_0x24435c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1a744d()):_0x24435c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24435c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x24435c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x554d83(){const _0x44ddf2=[_0x24435c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24435c([0x74,0x72,0x69,0x61,0x6c])][_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14dfa2/0x3e8:0xe10*_0x1635e6;return _0x18a8b3[_0x24435c([0x65,0x78,0x70])]<_0x44ddf2;}function _0x1c2e83(){const _0x159586=_0x18a8b3[_0x24435c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x159586&&(!!_0x159586[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x2a]))||!!_0x159586[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x55,0x50,0x4c,0x43])));}function _0x1f2d9d(){const _0x9581c0=_0x18a8b3[_0x24435c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9581c0||0x0==_0x9581c0[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd17cf1}=new URL(window[_0x24435c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9581c0[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd17cf1))return!0x0;const _0x588d22=_0xd17cf1[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e]));return _0x9581c0[_0x24435c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3777d6=>_0x3777d6[_0x24435c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24435c([0x2a])))[_0x24435c([0x6d,0x61,0x70])](_0x3226dc=>_0x3226dc[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e])))[_0x24435c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x52cf9a=>_0x52cf9a[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x588d22[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24435c([0x6d,0x61,0x70])](_0xd34862=>Array(_0x588d22[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xd34862[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24435c([0x66,0x69,0x6c,0x6c])](_0xd34862[0x0]===_0x24435c([0x2a])?_0x24435c([0x2a]):'')[_0x24435c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xd34862))[_0x24435c([0x73,0x6f,0x6d,0x65])](_0x3e3345=>_0x588d22[_0x24435c([0x65,0x76,0x65,0x72,0x79])]((_0xb9133e,_0x319138)=>_0x3e3345[_0x319138]===_0xb9133e||_0x3e3345[_0x319138]===_0x24435c([0x2a])));}function _0x1a744d(){return _0x13a399&&_0x2eb66a?new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d8994,_0x25967e)=>{_0x13a399[_0x24435c([0x74,0x68,0x65,0x6e])](_0x3d8994,_0x25967e),_0x2eb66a[_0x24435c([0x74,0x68,0x65,0x6e])](_0x274d69=>{_0x274d69!=_0x24435c([0x56,0x61,0x6c,0x69,0x64])&&_0x3d8994(_0x274d69);},_0x25967e);}):_0x13a399||_0x2eb66a||_0x24435c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5cce2e(_0x39d288,_0x45a4eb){return new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43e239=>{if(_0x354527())return _0x43e239(_0x24435c([0x56,0x61,0x6c,0x69,0x64]));_0x241a86(),_0x42382c[_0x24435c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c1f8b=!0x1;const _0x2bcbb=_0x30f973();function _0x4d2ac2(_0x21fc30){return!!_0x21fc30&&(typeof _0x21fc30===_0x24435c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x21fc30===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x21fc30[_0x24435c([0x74,0x68,0x65,0x6e])]===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x21fc30[_0x24435c([0x63,0x61,0x74,0x63,0x68])]===_0x24435c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x151ae8(_0xa2e18d){_0x4436c4(_0xa2e18d)[_0x24435c([0x74,0x68,0x65,0x6e])](_0x4109b2=>{if(!_0x4109b2||_0x4109b2[_0x24435c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24435c([0x6f,0x6b]))return _0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x32122a(_0x1e48aa(_0x2bcbb+_0x45a4eb))!=_0x4109b2[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24435c([0x56,0x61,0x6c,0x69,0x64]);})[_0x24435c([0x74,0x68,0x65,0x6e])](_0x438631=>(_0x39cf19(),_0x438631),()=>{const _0x477880=_0x111623();return null==_0x477880?(_0x39cf19(),_0x24435c([0x56,0x61,0x6c,0x69,0x64])):_0x24435c(_0x14dfa2-_0x477880>(0x7753083a^_0x224f15)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24435c([0x74,0x68,0x65,0x6e])](_0x43e239)[_0x24435c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x269e2a=0x536962ba^_0x224f15;function _0x39cf19(){const _0x133042=_0x24435c([0x6c,0x6c,0x63,0x74,0x2d])+_0x32122a(_0x1e48aa(_0x39d288)),_0x533044=_0x2d8284(_0x32122a(window[_0x24435c([0x4d,0x61,0x74,0x68])][_0x24435c([0x63,0x65,0x69,0x6c])](_0x14dfa2/_0x269e2a)));window[_0x24435c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24435c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x133042,_0x533044);}function _0x111623(){const _0x2c8743=_0x24435c([0x6c,0x6c,0x63,0x74,0x2d])+_0x32122a(_0x1e48aa(_0x39d288)),_0x5ce647=window[_0x24435c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24435c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c8743);return _0x5ce647?window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d8284(_0x5ce647),0x10)*_0x269e2a:null;}function _0x4436c4(_0x32819a){return new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3ab08a,_0x1284d7)=>{_0x32819a[_0x24435c([0x74,0x68,0x65,0x6e])](_0x3ab08a,_0x1284d7),window[_0x24435c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1284d7,0x535e58fa^_0x224f15);});}}_0x42382c[_0x24435c([0x6f,0x6e])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x720c98,_0x2006b5)=>{if(_0x2006b5[0x0]!=_0x39d288)return _0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2006b5[0x1]={..._0x2006b5[0x1],[_0x24435c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bcbb};},{[_0x24435c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24435c([0x68,0x69,0x67,0x68])}),_0x42382c[_0x24435c([0x6f,0x6e])](_0x24435c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x872816=>{_0x4d2ac2(_0x872816[_0x24435c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c1f8b=!0x0,_0x151ae8(_0x872816[_0x24435c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24435c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24435c([0x6c,0x6f,0x77])}),_0xe18156[_0x24435c([0x74,0x68,0x65,0x6e])](()=>{_0x4c1f8b||_0x43e239(_0x24435c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x354527(){return _0x42382c[_0x24435c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24435c([0x76,0x69,0x65,0x77])][_0x24435c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24435c([0x61,0x75,0x74,0x6f]);}function _0x241a86(){_0x42382c[_0x24435c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24435c([0x76,0x69,0x65,0x77])][_0x24435c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24435c([0x61,0x75,0x74,0x6f]);}}function _0x19e8a5(_0x26c4f1){const _0x3301ad=[new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2974ba=>setTimeout(_0x2974ba,0x5356b2f6^_0x224f15)),_0xe18156[_0x24435c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43be28=>{let _0x279ca5=0x0;_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x6f,0x6e])](_0x24435c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x31e7c5,_0x4e98dd)=>{_0x4e98dd[0x0][_0x24435c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x279ca5++,_0x279ca5==(0x535f89d2^_0x224f15)&&(_0x43be28(),_0x31e7c5[_0x24435c([0x6f,0x66,0x66])]());});}))];return window[_0x24435c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24435c([0x72,0x61,0x63,0x65])](_0x3301ad)[_0x24435c([0x74,0x68,0x65,0x6e])](()=>_0x26c4f1);}async function _0x16aea1(){await _0xe18156,_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x42eca3,_0x42382c[_0x24435c([0x6d,0x6f,0x64,0x65,0x6c])][_0x24435c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x42eca3,_0x42382c[_0x24435c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24435c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x100fd2(_0x1c55df){const _0x303917=_0x27939b();_0x42382c[_0x303917]=_0x24435c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1c55df,_0x1c55df!=_0x24435c([0x56,0x61,0x6c,0x69,0x64])&&_0x16aea1();}function _0x27939b(){const _0x34a1ef=window[_0x24435c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24435c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24435c([0x6e,0x6f,0x77])]())[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24435c([0x2e]),'');let _0x2473c2=_0x24435c([0x68]);for(let _0x25fee3=0x0;_0x25fee3<_0x34a1ef[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25fee3+=0x2){let _0x46f8cb=window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34a1ef[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25fee3,_0x25fee3+0x2));_0x46f8cb>=_0x4d7a04[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x46f8cb-=_0x4d7a04[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2473c2+=_0x4d7a04[_0x46f8cb];}return _0x2473c2;}function _0x5ec9a1(){const _0x5f30f2=_0x55be63[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e]));if(0x3!=_0x5f30f2[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12889a(_0x5f30f2[0x1]);function _0x12889a(_0x500b6c){const _0x219abe=_0x9530ca(_0x500b6c);return _0x219abe&&_0x223871()?_0x219abe:null;function _0x223871(){const _0x4be4ad=_0x219abe[_0x24435c([0x6a,0x74,0x69])],_0x2dce8a=window[_0x24435c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4be4ad[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4be4ad[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1ebf9d={..._0x219abe,[_0x24435c([0x6a,0x74,0x69])]:_0x4be4ad[_0x24435c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4be4ad[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1ebf9d[_0x24435c([0x76,0x63])],_0x1e48aa(_0x1ebf9d)==_0x2dce8a;}}}async function _0x19bd7c(){let _0x6be0b6=!0x0;try{const _0x4502e1=_0x55be63[_0x24435c([0x73,0x70,0x6c,0x69,0x74])](_0x24435c([0x2e])),[_0xd2da75,_0xe3b20b,_0x393e7b]=_0x4502e1;return _0x108412(_0xd2da75),await _0x3330c8(_0xd2da75,_0xe3b20b,_0x393e7b),_0x6be0b6;}catch{return!0x1;}function _0x108412(_0x335bc1){const _0x31048c=_0x9530ca(_0x335bc1);_0x31048c&&_0x31048c[_0x24435c([0x61,0x6c,0x67])]==_0x24435c([0x45,0x53,0x32,0x35,0x36])||(_0x6be0b6=!0x1);}async function _0x3330c8(_0x4e43f7,_0x161f42,_0x42c899){const _0x419816=window[_0x24435c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24435c([0x66,0x72,0x6f,0x6d])](_0xec0517(_0x42c899),_0x136598=>_0x136598[_0x24435c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2a7ff9=new window[(_0x24435c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24435c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4e43f7+_0x24435c([0x2e])+_0x161f42),_0x43daa0=window[_0x24435c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24435c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43daa0)return;const _0x2ba78a=await _0x43daa0[_0x24435c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24435c([0x6a,0x77,0x6b]),_0x59d899,{[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x45,0x43,0x44,0x53,0x41]),[_0x24435c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24435c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43daa0[_0x24435c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x45,0x43,0x44,0x53,0x41]),[_0x24435c([0x68,0x61,0x73,0x68])]:{[_0x24435c([0x6e,0x61,0x6d,0x65])]:_0x24435c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2ba78a,_0x419816,_0x2a7ff9)||(_0x6be0b6=!0x1);}}function _0x9530ca(_0x3b1ecd){return _0x3b1ecd[_0x24435c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24435c([0x65,0x79]))?JSON[_0x24435c([0x70,0x61,0x72,0x73,0x65])](_0xec0517(_0x3b1ecd)):null;}function _0xec0517(_0x3ef0b2){return window[_0x24435c([0x61,0x74,0x6f,0x62])](_0x3ef0b2[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24435c([0x2b]))[_0x24435c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24435c([0x2f])));}function _0x1e48aa(_0x19bc2e){let _0x3d77cc=0x1505;function _0x1dd351(_0x108b49){for(let _0x470c81=0x0;_0x470c81<_0x108b49[_0x24435c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x470c81++){const _0xd3dda=_0x108b49[_0x24435c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x470c81);_0x3d77cc=(_0x3d77cc<<0x5)+_0x3d77cc+_0xd3dda,_0x3d77cc&=_0x3d77cc;}}function _0x43b263(_0x3835fe){Array[_0x24435c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3835fe)?_0x3835fe[_0x24435c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43b263):_0x3835fe&&typeof _0x3835fe==_0x24435c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24435c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3835fe)[_0x24435c([0x73,0x6f,0x72,0x74])]()[_0x24435c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3a429c,_0xaaca39])=>{_0x1dd351(_0x3a429c),_0x43b263(_0xaaca39);}):_0x1dd351(window[_0x24435c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3835fe));}return _0x43b263(_0x19bc2e),_0x3d77cc>>>0x0;}function _0x32122a(_0x5de370){return _0x5de370[_0x24435c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24435c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24435c([0x30]));}function _0x2d8284(_0x1ffc6d){return _0x1ffc6d[_0x24435c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24435c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24435c([0x6a,0x6f,0x69,0x6e])]('');}function _0x42eca3(){}function _0x24435c(_0x50df25){return _0x50df25['map'](_0x4ad217=>String['fromCharCode'](_0x4ad217))['join']('');}_0x100fd2(await _0x1921e8());}(this);}['_initSchema'](){const _0xb8efe0=this['editor']['model']['schema'];_0xb8efe0['isRegistered']('imageBlock')&&_0xb8efe0['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xb8efe0['isRegistered']('imageInline')&&_0xb8efe0['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1c759b=this['editor'];_0x1c759b['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1c759b['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x457333=>_0x457333['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x55a935=_0x1c759b['commands']['get']('replaceImageSource');_0x55a935&&this['listenTo'](_0x55a935,'cleanupImage',(_0x1a8dfb,[_0x4ddb9c,_0x22e697])=>{_0x4ddb9c['removeAttribute']('uploadcareImageId',_0x22e697);});}['_initConfig'](){const _0xd2f987=this['editor']['config']['get']('uploadcare.uploader')||{},_0x58b7f2=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x367357(_0x58ec2d['document'],'uc-config',{..._0xd2f987,'pubkey':_0x58b7f2,'ctx-name':'uploader-'+this['ucContextId'],'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']=_0x3720ed=>{if('closeMax'==_0x3720ed)return'#uc-icon-arrow-down';},_0x58ec2d['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x367357(_0x58ec2d['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x58ec2d['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1f6f8a=this['editor']['commands']['get']('insertImage');_0x1f6f8a&&this['listenTo'](_0x1f6f8a,'execute',()=>{const _0x1eb0da=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1eb0da&&_0x1eb0da['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x1eb0da);});});const _0x11b886=this['editor']['commands']['get']('uploadcareImageReplace');_0x11b886&&this['listenTo'](_0x11b886,'execute',()=>{const _0x4bcaad=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4bcaad&&_0x4bcaad['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x4bcaad);});});}}class H extends _0x1381fe{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47667f){super(_0x47667f),_0x47667f['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x132b1c['defineComponents'](_0x132b1c),this['_defineLocale']();}['_defineLocale'](){const _0x273750=this['editor']['config']['get']('uploadcare.locale'),_0x1c7075=this['editor']['locale']['contentLanguage'];_0x273750&&_0x132b1c['defineLocale'](_0x1c7075,_0x273750);}}class J extends _0x5e2bd9{constructor(_0xd8e367){super(_0xd8e367);const t=_0xd8e367['t'],_0x37e1f6=this['bindTemplate'],_0x4afb0a=new _0x81341c();_0x4afb0a['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':[_0x4afb0a,{'text':_0x37e1f6['to']('imageUploadProgress',_0x11c16d=>t('Loading\x20image...')+'\x20('+(_0x11c16d||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 Z extends _0x5e2bd9{constructor(_0x393e35){super(_0x393e35);const t=_0x393e35['t'];this['set']('errorType',null);const _0x2df456=new _0x1c2298(_0x393e35);_0x2df456['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2df456['withText']=!0x0,_0x2df456['class']='ck-button-action',_0x2df456['on']('execute',()=>{this['fire']('retry');}),_0x2df456['bind']('isVisible')['to'](this,'errorType',_0x45b214=>'NotFound'!==_0x45b214);const _0x403310=new _0x20776e();_0x403310['content']=_0x3352f5,_0x403310['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1aae05=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':[_0x403310,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1aae05['to']('errorType',_0x39df01=>t('NotFound'!==_0x39df01?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2df456]},{'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 Q extends _0x5e2bd9{constructor(_0xb695ec,_0x3b585c){super(_0xb695ec);const _0x4cf1f5=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3b585c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x4cf1f5['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x17f7ff,_0x2127e0,_0x4ab33d){super(_0x17f7ff),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x17f7ff),this['_errorView']=new Z(_0x17f7ff),this['_editingView']=new Q(_0x17f7ff,_0x4ab33d),this['_focusableView']=new _0x5e2bd9(_0x17f7ff),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2127e0),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'],_0x37040f=>{this['_addUploadcareImageEditorListeners'](_0x37040f);});}),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'](_0x105efd,_0xe4505d){const _0x3772ad='uc-cloud-image-editor',_0x2a550e=_0x105efd['querySelector'](_0x3772ad);if(_0x2a550e)return _0xe4505d(_0x2a550e);const _0x489460=new MutationObserver(_0x5722fa=>{const _0x45c655=_0x5722fa['filter'](_0x5f01c6=>_0x5f01c6['target']===_0x105efd&&_0x5f01c6['addedNodes']['length']>0x0&&_0x5f01c6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3772ad);_0x45c655['length']&&(_0x489460['disconnect'](),_0xe4505d(_0x45c655[0x0]['addedNodes'][0x0]));});_0x489460['observe'](_0x105efd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x585b69){_0x585b69['addEventListener']('apply',_0xe02a2e=>{this['fire']('apply',{'imageSrc':_0xe02a2e['detail']['cdnUrl']});}),_0x585b69['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
25
- _0x23ed1c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ada3c,_0x5b0a6e,_0x5b1c2b){super(),this['_editor']=_0x4ada3c,this['_dialog']=_0x5b0a6e,this['_imageElement']=_0x5b1c2b,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 _0x55945a=this['_imageElement'],_0x21b82c=_0x55945a['getAttribute']('uploadcareImageId'),_0x50d407=_0x55945a['getAttribute']('src');if(_0x21b82c)await this['_loadImageInfo'](_0x21b82c,_0x50d407);else{if(this['_imageCache']['has'](_0x50d407)){const _0x16ca60=this['_imageCache']['get'](_0x50d407);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16ca60['url'],this['imageDimension']=_0x16ca60['dimension'],this['imageId']=_0x16ca60['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x474d33}=this['_editor'],t=_0x474d33['t'],_0x4965dc=new X(_0x474d33,this['imageStatus'],this['_attributes']);_0x4965dc['bind']('status')['to'](this,'imageStatus'),_0x4965dc['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4965dc['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4965dc['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4965dc,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2e810c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4965dc,'position':_0x5be585['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4965dc['focus']();},'onHide':()=>{_0x4965dc['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5b2ea8=>!V(_0x5b2ea8,_0x4965dc['element'])}});}['_loadImageInfo'](_0x363c53,_0x5df8c1){return q['getInfo'](_0x363c53,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x3e598b=>{const {width:_0x3aad0e,height:_0x382826}=_0x3e598b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5df8c1,this['imageDimension']={'width':_0x3aad0e,'height':_0x382826},this['imageId']=_0x363c53;})['catch'](_0x16bec2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x16bec2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xc7f7b3,_0x6def10){return this['_getImageAsFile'](_0xc7f7b3)['then'](_0xa32936=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x6def10['signal'],'file':_0xa32936,'onProgress':_0x21b9e0=>{_0x21b9e0&&_0x21b9e0['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x21b9e0['value']));}}))['then'](_0x1c167e=>{const {width:_0xce82c2,height:_0x34edcc}=_0x1c167e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1c167e['cdnUrl'],this['imageDimension']={'width':_0xce82c2,'height':_0x34edcc},this['imageId']=_0x1c167e['uuid'],this['imageUploadProgress']=null;const _0x3cf4d6=_0xc7f7b3['getAttribute']('src');this['_imageCache']['set'](_0x3cf4d6,{'id':_0x1c167e['uuid'],'url':_0x1c167e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2d4805=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d4805['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x391b86,_0x10cdf8){_0x391b86['on']('apply',(_0xdc1173,_0x411313)=>{this['_replaceImage'](_0x10cdf8,_0x411313['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x391b86['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x391b86['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4ae6f4,_0x4ed67a,_0x532338){const _0x1a77c0=this['_editor'],{width:_0x5a5585,height:_0x1d30e8}=F(_0x4ed67a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4578f8,imageSources:_0x460974}=D(_0x4ed67a,_0x5a5585);_0x1a77c0['model']['change'](_0x2a0d04=>{if('$graveyard'===_0x4ae6f4['root']['rootName']){_0x1a77c0['execute']('insertImage',{'imageType':_0x4ae6f4['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4ae6f4['getAttributes']()),'uploadcareImageId':_0x532338,'src':_0x4578f8,'sources':_0x460974,'width':_0x5a5585,'height':_0x1d30e8}});const _0x13cb89=_0x4ae6f4['getChildren']();_0x4ae6f4=_0x1a77c0['model']['document']['selection']['getSelectedElement']();for(const _0x32cd0e of _0x13cb89)_0x2a0d04['append'](_0x2a0d04['cloneElement'](_0x32cd0e),_0x4ae6f4);}else _0x2a0d04['setSelection'](_0x4ae6f4,'on'),_0x1a77c0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4ae6f4['getAttributes']()),'uploadcareImageId':_0x532338,'src':_0x4578f8,'sources':_0x460974,'width':_0x5a5585,'height':_0x1d30e8},_0x4ae6f4);_0x2a0d04['setSelection'](_0x4ae6f4,'on');});}async['_getImageAsFile'](_0x463cbd){const _0x1c0aab=_0x58ec2d['window'],_0x2c9d7b=_0x58ec2d['document']['location']['href'],_0x4efed1=new _0x1c0aab['URL'](_0x463cbd['getAttribute']('src'),_0x2c9d7b);if('data:'===_0x4efed1['protocol']){const _0xe2e402=_0x4efed1['href']['split'](','),_0x4b16f1=_0xe2e402[0x0]['match'](/:(.*?);/)[0x1],_0x5ef7a2=_0x4b16f1['split']('/')[0x1],_0x18609d=_0x1c0aab['atob'](_0xe2e402[_0xe2e402['length']-0x1]);let _0x3ef0d5=_0x18609d['length'];const _0x453538=new _0x1c0aab['Uint8Array'](_0x3ef0d5);for(;_0x3ef0d5--;)_0x453538[_0x3ef0d5]=_0x18609d['charCodeAt'](_0x3ef0d5);return new _0x1c0aab['File']([_0x453538],'image.'+_0x5ef7a2,{'type':_0x4b16f1});}const _0x3d7350=_0x4efed1['href']['split']('/'),_0x2c119f=_0x3d7350[_0x3d7350['length']-0x1],_0x2c69b4=_0x2c119f['split']('.')[0x1];return _0x1c0aab['fetch'](_0x4efed1['href'])['then'](_0xbfb0e=>_0xbfb0e['clone']()['blob']())['then'](_0x9ff674=>new _0x1c0aab['File']([_0x9ff674],_0x2c119f,{'type':'image/'+_0x2c69b4}));}}class tt extends _0x4053fb{['imageEditController'];static get['requires'](){return[_0xc5a1d6];}['_isEditable'];constructor(_0x255b7a){super(_0x255b7a),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x41a79f){const _0x260c1f=B(_0x41a79f);return _0x4553bf=>!(!_0x4553bf||!_0x4553bf['is']('element','imageBlock')&&!_0x4553bf['is']('element','imageInline'))&&(!!_0x4553bf['hasAttribute']('uploadcareImageId')||!!_0x4553bf['hasAttribute']('src')&&_0x260c1f(_0x4553bf['getAttribute']('src')));}(_0x255b7a['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x53ce0f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x53ce0f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x28043a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x28043a&&(_0x28043a['is']('element','imageBlock')||_0x28043a['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0xc5a1d6),_0x28043a),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x4053fb{['refresh'](){const _0x3b66ad=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3b66ad&&(_0x3b66ad['is']('element','imageBlock')||_0x3b66ad['is']('element','imageInline')));}['execute'](_0x5476ee){const _0x3a6bd7=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x10c881=>{_0x10c881['setAttributes'](_0x5476ee,_0x3a6bd7),_0x10c881['removeAttribute']('srcset',_0x3a6bd7),_0x10c881['removeAttribute']('sizes',_0x3a6bd7);});}}class it extends _0x1381fe{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x4a616d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5cbce4}=this;_0x5cbce4['commands']['add']('uploadcareImageEdit',new tt(_0x5cbce4)),_0x5cbce4['commands']['add']('uploadcareImageReplace',new et(_0x5cbce4));}}class st extends _0x1381fe{['_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 _0x53c9ae=this['editor'];_0x53c9ae['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2fa318=>{const _0x333168=_0x53c9ae['commands']['get']('uploadcareImageEdit'),_0xb1fed5=new _0x1c2298(_0x2fa318),t=_0x2fa318['t'];return _0xb1fed5['set']({'icon':_0x2e810c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0xb1fed5['bind']('isEnabled')['to'](_0x333168),_0xb1fed5['bind']('isOn')['to'](_0x333168,'isActive'),this['listenTo'](_0xb1fed5,'execute',()=>{_0x53c9ae['execute']('uploadcareImageEdit'),_0x53c9ae['editing']['view']['focus']();}),_0xb1fed5;}),this['_initConfig']();}['_initConfig'](){const _0x2ea773=_0x367357(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2ea773),this['listenTo'](this['editor'],'destroy',()=>{_0x2ea773['remove']();});}}class nt extends _0x1381fe{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W as UploadcareUploadAdapter};
23
+ import{Plugin as _0x1c510e,Command as _0x3a470c}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x33fc1e,IconGooglePhotos as _0x2665c6,IconGoogleDrive as _0x59cd45,IconFacebook as _0x5cc81f,IconDropbox as _0x2810ac,IconUploadcareLink as _0x384d9d,IconUploadcareImageUpload as _0x5c7d6b,IconError as _0x2350e5,IconUploadcareImageEdit as _0x358229}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x426537,MenuBarMenuListItemButtonView as _0x24f377,View as _0x2cd4c6,FocusCycler as _0x4852b1,Dialog as _0x2a27b6,DialogViewPosition as _0x1ddc4b,SpinnerView as _0x299f93,IconView as _0x19662a,Notification as _0x23db2d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x1a52db,DomEmitterMixin as _0x253aee,global as _0x4e45d2,getAncestors as _0x2af5c8,ObservableMixin as _0x3ee8ba,uid as _0x3877fa,createElement as _0x240285}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x239c0e}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4aa686,info as _0x38e5cc}from'@uploadcare/upload-client';import*as _0x18b9f0 from'@uploadcare/file-uploader';var S=function(_0x2a9493){return _0x2a9493['Local']='local',_0x2a9493['URL']='url',_0x2a9493['Dropbox']='dropbox',_0x2a9493['GDrive']='gdrive',_0x2a9493['Facebook']='facebook',_0x2a9493['GPhotos']='gphotos',_0x2a9493['OneDrive']='onedrive',_0x2a9493;}({});function T(_0x1fca63,_0x56a429,_0x5861f2){const t=_0x1fca63['t'],_0x39373f=_0x1fca63['t'];switch(_0x56a429){case S['Local']:return{'text':_0x39373f('Insert'===_0x5861f2?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x39373f('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x5861f2?_0x39373f('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x39373f('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x5861f2?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x5861f2?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x5861f2?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x5861f2?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x5861f2?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x56a429;}}class A extends _0x1c510e{['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 _0x17c6dd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1dbdd0;for(const _0x2e78e7 in _0x17c6dd){const _0x421a51=_0x2e78e7,_0x14327e=_0x17c6dd[_0x421a51];if('uploadcareLicenseKeyValid'==_0x14327e||'uploadcareLicenseKeyInvalid'==_0x14327e||'uploadcareLicenseKeyExpired'==_0x14327e||'uploadcareLicenseKeyDomainLimit'==_0x14327e||'uploadcareLicenseKeyNotAllowed'==_0x14327e||'uploadcareLicenseKeyEvaluationLimit'==_0x14327e||'uploadcareLicenseKeyUsageLimit'==_0x14327e){delete _0x17c6dd[_0x421a51],_0x1dbdd0=_0x14327e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1dbdd0&&_0x17c6dd['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x36a3fd}=this,_0xa0f603=_0x36a3fd['commands']['get']('uploadcare');if(!_0xa0f603)return;const _0x528f2d=this['_normalizeConfigSourceList'](_0x36a3fd['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2a6691,_0x9aa490)=>{const _0x209cf3=this['_getIntegrationKey'](_0x9aa490['type']);return _0x2a6691[_0x209cf3]||(_0x2a6691[_0x209cf3]=[]),_0x2a6691[_0x209cf3]['push'](_0x9aa490),_0x2a6691;},{});_0x36a3fd['plugins']['has']('ImageInsertUI')&&_0x36a3fd['commands']['get']('uploadcare')&&Object['entries'](_0x528f2d)['forEach'](([_0x21bf38,_0x49eb35])=>{_0x36a3fd['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x21bf38,'observable':()=>_0xa0f603,'buttonViewCreator':()=>this['_createToolbarButton'](_0x49eb35),'formViewCreator':()=>this['_createDropdownButtons'](_0x49eb35),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x49eb35),'override':'assetManager'!==_0x21bf38});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x154552){const {locale:_0x16e501}=this['editor'];return _0x154552['map'](_0x32dd97=>{const _0x115a7d=T(_0x16e501,_0x32dd97,'Insert');switch(_0x32dd97){case S['Local']:return{'icon':_0x5c7d6b,'type':S['Local'],..._0x115a7d};case S['URL']:return{'icon':_0x384d9d,'type':S['URL'],..._0x115a7d};case S['Dropbox']:return{'icon':_0x2810ac,'type':S['Dropbox'],..._0x115a7d};case S['Facebook']:return{'icon':_0x5cc81f,'type':S['Facebook'],..._0x115a7d};case S['GDrive']:return{'icon':_0x59cd45,'type':S['GDrive'],..._0x115a7d};case S['GPhotos']:return{'icon':_0x2665c6,'type':S['GPhotos'],..._0x115a7d};case S['OneDrive']:return{'icon':_0x33fc1e,'type':S['OneDrive'],..._0x115a7d};}});}['_getIntegrationKey'](_0xe7830e){switch(_0xe7830e){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x34be7d,_0x199ba5){const _0x1a390c=this['editor'],_0x49a9c0=new _0x34be7d(_0x1a390c['locale']),_0xe6f6e6=_0x1a390c['commands']['get']('uploadcare');return _0x49a9c0['bind']('isEnabled')['to'](_0xe6f6e6),_0x49a9c0['on']('execute',()=>{_0xe6f6e6['execute'](_0x199ba5);}),_0x49a9c0;}['_createToolbarButton'](_0x5d81ab){const {locale:_0x191635}=this['editor'],_0x10aeef=this['editor']['plugins']['get']('ImageInsertUI'),_0x29d28e=_0x5d81ab[0x0],_0x22be31=this['_createButton'](_0x426537,_0x29d28e['type']);return _0x22be31['icon']=_0x29d28e['icon'],_0x22be31['bind']('label')['to'](_0x10aeef,'isImageSelected',_0x63b9a1=>T(_0x191635,_0x29d28e['type'],_0x63b9a1?'Replace':'Insert')['text']),_0x22be31['tooltip']=!0x0,_0x22be31;}['_createDropdownButtons'](_0x2f8923){const {locale:_0x33d2db}=this['editor'],_0x455132=this['editor']['plugins']['get']('ImageInsertUI');return _0x2f8923['map'](_0x28cf24=>{const _0x3305a2=this['_createButton'](_0x426537,_0x28cf24['type']);return _0x3305a2['withText']=!0x0,_0x3305a2['icon']=_0x28cf24['icon'],_0x3305a2['bind']('label')['to'](_0x455132,'isImageSelected',_0x164861=>T(_0x33d2db,_0x28cf24['type'],_0x164861?'Replace':'Insert')['text']),_0x3305a2;});}['_createMenuBarButtons'](_0x5cf0e9){return _0x5cf0e9['map'](_0x44b952=>{const _0x19b4e0=this['_createButton'](_0x24f377,_0x44b952['type']);return _0x19b4e0['icon']=_0x44b952['icon'],_0x19b4e0['label']=_0x44b952['shortText'],_0x19b4e0;});}}class K extends _0x2cd4c6{['focusTracker'];['focusCycler'];constructor(_0x5b6da9){super(_0x5b6da9),this['focusTracker']=new _0x1a52db(),this['focusCycler']=new _0x4852b1({'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 O extends K{constructor(_0x1c0404,_0x36c183){super(_0x1c0404),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-'+_0x36c183}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x4fb009,_0x574f9b){const _0x5488c5=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x527ef0=>_0x527ef0<=_0x574f9b)['map'](_0x196807=>_0x4fb009['replace'](/\/$/,'')+'/-/resize/'+_0x196807+'x/\x20'+_0x196807+'w');return{'imageFallbackUrl':_0x4fb009,'imageSources':[{'srcset':_0x5488c5['join'](',\x20'),'sizes':'(max-width:\x20'+_0x574f9b+'px)\x20100vw,\x20'+_0x574f9b+'px','type':'image/webp'}]};}function F(_0x137c19,_0x3bf9fd,_0x3f1560){const _0x269efb=_0x137c19['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x269efb?parseInt(_0x269efb[0x1],0xa):_0x3bf9fd,'height':_0x269efb?parseInt(_0x269efb[0x2],0xa):_0x3f1560};}function $(_0x433c66,_0x371000){const _0x41b508=new(_0x253aee())(),_0x82ab99=_0x433c66['plugins']['get']('ImageUtils'),_0x4ca680=_0x433c66['editing']['mapper']['toViewElement'](_0x371000),_0x327919=_0x82ab99['findViewImgElement'](_0x4ca680),_0xdd7a9d=_0x433c66['editing']['view']['domConverter']['viewToDom'](_0x327919),_0x7e4181=_0x371000['getAttribute']('width'),_0x5a9cfe=_0x371000['getAttribute']('height'),_0x526285='image-processing';_0x433c66['editing']['view']['change'](_0x548cd2=>{_0x548cd2['addClass'](_0x526285,_0x4ca680),_0x548cd2['setStyle']('aspect-ratio',_0x7e4181+'/'+_0x5a9cfe,_0x327919);}),_0x41b508['listenTo'](_0xdd7a9d,'load',()=>{_0x41b508['stopListening'](_0xdd7a9d,'load'),_0x433c66['editing']['view']['change'](_0x11fdb8=>{_0x11fdb8['removeClass'](_0x526285,_0x4ca680),_0x11fdb8['removeStyle']('aspect-ratio',_0x327919);});});}function B(_0xc1d3fd){if(Array['isArray'](_0xc1d3fd)){const _0x35b368=_0xc1d3fd['map'](B);return _0x1f7276=>_0x35b368['some'](_0x11ff60=>_0x11ff60(_0x1f7276));}if('origin'==_0xc1d3fd){const _0x7720cf=_0x4e45d2['window']['location']['origin'];return _0x301e11=>new URL(_0x301e11,_0x4e45d2['document']['baseURI'])['origin']==_0x7720cf;}return'function'==typeof _0xc1d3fd?_0xc1d3fd:_0xc1d3fd instanceof RegExp?_0x398f37=>!(!_0x398f37['match'](_0xc1d3fd)&&!_0x398f37['replace'](/^https?:\/\//,'')['match'](_0xc1d3fd)):()=>!0x1;}function V(_0x3b2f05,_0x5f1ab9){return _0x2af5c8(_0x3b2f05['target'])['includes'](_0x5f1ab9);}class j extends/* #__PURE__ -- @preserve */
24
+ _0x3ee8ba(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x4b4a75,_0x52d8b8,_0x52b15c){super(),this['_editor']=_0x4b4a75,this['_editing']=_0x52d8b8,this['_dialog']=_0x4b4a75['plugins']['get'](_0x2a27b6),this['_api']=_0x52d8b8['ctxElement']['getAPI'](),this['_type']=_0x52b15c,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:_0x1fb9eb,model:_0x2e1046}=this['_editor'],_0x5a980d=_0x2e1046['document']['selection']['getSelectedElement'](),_0x172a3d=_0x5a980d&&(_0x5a980d['is']('element','imageBlock')||_0x5a980d['is']('element','imageInline'));this['_formView']=new O(_0x1fb9eb,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5c7d6b,'title':T(_0x1fb9eb,this['_type'],_0x172a3d?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x1ddc4b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x881139=>!V(_0x881139,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4610e2}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x360605=>{const _0x403164=_0x4610e2['length'];for(const _0x302c0a of _0x4610e2){const _0x21bbbd=_0x302c0a===_0x4610e2[_0x403164-0x1],{cdnUrl:_0x105333,fileInfo:_0x219e14}=_0x302c0a;if(!_0x105333||!_0x219e14)continue;const {width:_0x4e78f6,height:_0x39e9dd}=_0x219e14['imageInfo'],_0x49d3b7=F(_0x105333,_0x4e78f6,_0x39e9dd),_0x498255=D(_0x105333,_0x49d3b7['width']),_0x1b02c1={'id':_0x219e14['uuid'],'type':'image','attributes':{'imageDimension':_0x49d3b7,..._0x498255}};this['_insertAsset'](_0x1b02c1,_0x21bbbd,_0x360605);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2f4d51=>{'idle'===_0x2f4d51['detail']['status']&&!_0x2f4d51['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x257adc,_0x27d2b9,_0x57cbcc){const _0x1cc97b=this['_editor']['model']['document']['selection'],_0x3b9de5=_0x1cc97b['getSelectedElement'](),_0x2c3fdb=!(!_0x3b9de5||!_0x3b9de5['is']('element','imageInline'));_0x57cbcc['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x257adc,_0x2c3fdb),_0x27d2b9||_0x57cbcc['setSelection'](_0x1cc97b['getLastPosition']());}['_insertImage'](_0x181fa5,_0x3944b9){const _0x1aa5e9=this['_editor'],{imageDimension:_0x3430ea,imageFallbackUrl:_0x570add,imageSources:_0x15923f}=_0x181fa5['attributes'];_0x1aa5e9['execute']('insertImage',{'imageType':_0x3944b9?'imageInline':null,'source':{'uploadcareImageId':_0x181fa5['id'],'src':_0x570add,'sources':_0x15923f,..._0x3430ea}});}}class M extends _0x3a470c{['_editing'];['_controller']=null;static get['requires'](){return[_0x2a27b6,z];}constructor(_0x3912b9){super(_0x3912b9),this['_editing']=_0x3912b9['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x442922){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x442922);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x12e9e4,..._0x39e5e8}){return _0x4aa686(_0x12e9e4,_0x39e5e8);}static['getInfo'](_0x5715e5,_0x4e1c59){return _0x38e5cc(_0x5715e5,_0x4e1c59);}}class W extends _0x1c510e{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x239c0e,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x101b94=this['editor'];if(!!!_0x101b94['config']['get']('uploadcare'))return;_0x101b94['plugins']['get'](_0x239c0e)['createUploadAdapter']=_0x1bd74a=>new G(_0x1bd74a,_0x101b94),_0x101b94['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x340fec,{imageElement:_0x3fd34d,data:_0x6485aa})=>{_0x101b94['model']['change'](_0x16f521=>{_0x16f521['setAttribute']('uploadcareImageId',_0x6485aa['uploadcareImageId'],_0x3fd34d);});});}}class G{['loader'];['editor'];['controller'];constructor(_0xca4df5,_0x8e4e03){this['loader']=_0xca4df5,this['editor']=_0x8e4e03,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x18e819=await this['loader']['file'];return q['upload']({'file':_0x18e819,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x33f041=>{_0x33f041&&_0x33f041['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x33f041['value']);}})['then'](async _0x1ec6c6=>{const {imageFallbackUrl:_0xb7b67c,imageSources:_0x27386c}=D(_0x1ec6c6['cdnUrl'],_0x1ec6c6['imageInfo']['width']);return{'uploadcareImageId':_0x1ec6c6['uuid'],'default':_0xb7b67c,'sources':_0x27386c};})['catch'](()=>{const _0x164cfe=t('Cannot\x20upload\x20file:')+('\x20'+_0x18e819['name']+'.');return Promise['reject'](_0x164cfe);});}['abort'](){this['controller']['abort']();}}class z extends _0x1c510e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x2a27b6];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xa6b8f5){super(_0xa6b8f5),this['ucContextId']=_0x3877fa();}['init'](){const _0x4b323a=this['editor'];_0x4b323a['commands']['add']('uploadcare',new M(_0x4b323a));}['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 _0x559b2a=_0x4e45d2['document']['querySelector']('input[uploadcare-file-input]');_0x559b2a&&_0x559b2a['remove']();}),async function(_0x593d66){const _0x45d082=_0x4c06b1([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x161779=0x535f8c3a,_0x131467=0x5358f3d2^_0x161779,_0x1651a2=window[_0x4c06b1([0x44,0x61,0x74,0x65])][_0x4c06b1([0x6e,0x6f,0x77])](),_0x1eaeef=_0x593d66[_0x4c06b1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e143e=new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4059d0=>{_0x1eaeef[_0x4c06b1([0x6f,0x6e,0x63,0x65])](_0x4c06b1([0x72,0x65,0x61,0x64,0x79]),_0x4059d0);}),_0x4771fc={[_0x4c06b1([0x6b,0x74,0x79])]:_0x4c06b1([0x45,0x43]),[_0x4c06b1([0x75,0x73,0x65])]:_0x4c06b1([0x73,0x69,0x67]),[_0x4c06b1([0x63,0x72,0x76])]:_0x4c06b1([0x50,0x2d,0x32,0x35,0x36]),[_0x4c06b1([0x78])]:_0x4c06b1([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]),[_0x4c06b1([0x79])]:_0x4c06b1([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]),[_0x4c06b1([0x61,0x6c,0x67])]:_0x4c06b1([0x45,0x53,0x32,0x35,0x36])},_0x2f6a8d=_0x1eaeef[_0x4c06b1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c06b1([0x67,0x65,0x74])](_0x4c06b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x394b7d(){let _0x2433c1,_0x54f53c=null,_0x25b28d=null;try{if(_0x2f6a8d==_0x4c06b1([0x47,0x50,0x4c]))return _0x4c06b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2433c1=_0x557a0f(),!_0x2433c1)return _0x4c06b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2433c1[_0x4c06b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x25b28d=_0x49612c(_0x2433c1[_0x4c06b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2433c1[_0x4c06b1([0x6a,0x74,0x69])])),await _0x2c8981()?_0x1f4347()?_0x51d2de()?_0x4c06b1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x9a4ead()?(_0x2433c1[_0x4c06b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c06b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x54f53c=_0x5d6a72(_0x4c06b1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x191090()):_0x4c06b1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c06b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c06b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c06b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51d2de(){const _0xbf628f=[_0x4c06b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c06b1([0x74,0x72,0x69,0x61,0x6c])][_0x4c06b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2433c1[_0x4c06b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1651a2/0x3e8:0xe10*_0x131467;return _0x2433c1[_0x4c06b1([0x65,0x78,0x70])]<_0xbf628f;}function _0x1f4347(){const _0x286adb=_0x2433c1[_0x4c06b1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x286adb&&(!!_0x286adb[_0x4c06b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c06b1([0x2a]))||!!_0x286adb[_0x4c06b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c06b1([0x55,0x50,0x4c,0x43])));}function _0x9a4ead(){const _0x46931f=_0x2433c1[_0x4c06b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x46931f||0x0==_0x46931f[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2ec1bb}=new URL(window[_0x4c06b1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x46931f[_0x4c06b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ec1bb))return!0x0;const _0x50c1ec=_0x2ec1bb[_0x4c06b1([0x73,0x70,0x6c,0x69,0x74])](_0x4c06b1([0x2e]));return _0x46931f[_0x4c06b1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x58f23f=>_0x58f23f[_0x4c06b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c06b1([0x2a])))[_0x4c06b1([0x6d,0x61,0x70])](_0x4c8958=>_0x4c8958[_0x4c06b1([0x73,0x70,0x6c,0x69,0x74])](_0x4c06b1([0x2e])))[_0x4c06b1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x95d6ae=>_0x95d6ae[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x50c1ec[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c06b1([0x6d,0x61,0x70])](_0xd1f358=>Array(_0x50c1ec[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xd1f358[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c06b1([0x66,0x69,0x6c,0x6c])](_0xd1f358[0x0]===_0x4c06b1([0x2a])?_0x4c06b1([0x2a]):'')[_0x4c06b1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xd1f358))[_0x4c06b1([0x73,0x6f,0x6d,0x65])](_0x4e0d4d=>_0x50c1ec[_0x4c06b1([0x65,0x76,0x65,0x72,0x79])]((_0x57ca9e,_0x26c4a9)=>_0x4e0d4d[_0x26c4a9]===_0x57ca9e||_0x4e0d4d[_0x26c4a9]===_0x4c06b1([0x2a])));}function _0x191090(){return _0x54f53c&&_0x25b28d?new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x7232f8,_0x3e6c46)=>{_0x54f53c[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x7232f8,_0x3e6c46),_0x25b28d[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x3f7f52=>{_0x3f7f52!=_0x4c06b1([0x56,0x61,0x6c,0x69,0x64])&&_0x7232f8(_0x3f7f52);},_0x3e6c46);}):_0x54f53c||_0x25b28d||_0x4c06b1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x49612c(_0x3d9065,_0x46aec3){return new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58946e=>{if(_0x215721())return _0x58946e(_0x4c06b1([0x56,0x61,0x6c,0x69,0x64]));_0x1a1538(),_0x1eaeef[_0x4c06b1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c06b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x117816=!0x1;const _0x2b0942=_0x3877fa();function _0x39acc3(_0x29cba7){return!!_0x29cba7&&(typeof _0x29cba7===_0x4c06b1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x29cba7===_0x4c06b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x29cba7[_0x4c06b1([0x74,0x68,0x65,0x6e])]===_0x4c06b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x29cba7[_0x4c06b1([0x63,0x61,0x74,0x63,0x68])]===_0x4c06b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x342e65(_0x5ca4e8){_0x54046f(_0x5ca4e8)[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x585c90=>{if(!_0x585c90||_0x585c90[_0x4c06b1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c06b1([0x6f,0x6b]))return _0x4c06b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x223582(_0x32a92e(_0x2b0942+_0x46aec3))!=_0x585c90[_0x4c06b1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c06b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c06b1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x1c932d=>(_0x21834a(),_0x1c932d),()=>{const _0x3b38bd=_0x232e68();return null==_0x3b38bd?(_0x21834a(),_0x4c06b1([0x56,0x61,0x6c,0x69,0x64])):_0x4c06b1(_0x1651a2-_0x3b38bd>(0x7753083a^_0x161779)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x58946e)[_0x4c06b1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58946e(_0x4c06b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x56ffee=0x536962ba^_0x161779;function _0x21834a(){const _0x3fffa9=_0x4c06b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x223582(_0x32a92e(_0x3d9065)),_0x1865f6=_0x456bc9(_0x223582(window[_0x4c06b1([0x4d,0x61,0x74,0x68])][_0x4c06b1([0x63,0x65,0x69,0x6c])](_0x1651a2/_0x56ffee)));window[_0x4c06b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c06b1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fffa9,_0x1865f6);}function _0x232e68(){const _0x2522ec=_0x4c06b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x223582(_0x32a92e(_0x3d9065)),_0x95388f=window[_0x4c06b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c06b1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2522ec);return _0x95388f?window[_0x4c06b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x456bc9(_0x95388f),0x10)*_0x56ffee:null;}function _0x54046f(_0x346a3a){return new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x105d27,_0x46355a)=>{_0x346a3a[_0x4c06b1([0x74,0x68,0x65,0x6e])](_0x105d27,_0x46355a),window[_0x4c06b1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x46355a,0x535e58fa^_0x161779);});}}_0x1eaeef[_0x4c06b1([0x6f,0x6e])](_0x4c06b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x22b72a,_0x16fd40)=>{if(_0x16fd40[0x0]!=_0x3d9065)return _0x58946e(_0x4c06b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16fd40[0x1]={..._0x16fd40[0x1],[_0x4c06b1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2b0942};},{[_0x4c06b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c06b1([0x68,0x69,0x67,0x68])}),_0x1eaeef[_0x4c06b1([0x6f,0x6e])](_0x4c06b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x9e02bd=>{_0x39acc3(_0x9e02bd[_0x4c06b1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x117816=!0x0,_0x342e65(_0x9e02bd[_0x4c06b1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c06b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c06b1([0x6c,0x6f,0x77])}),_0x2e143e[_0x4c06b1([0x74,0x68,0x65,0x6e])](()=>{_0x117816||_0x58946e(_0x4c06b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x215721(){return _0x1eaeef[_0x4c06b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c06b1([0x76,0x69,0x65,0x77])][_0x4c06b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c06b1([0x61,0x75,0x74,0x6f]);}function _0x1a1538(){_0x1eaeef[_0x4c06b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c06b1([0x76,0x69,0x65,0x77])][_0x4c06b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c06b1([0x61,0x75,0x74,0x6f]);}}function _0x5d6a72(_0x591c33){const _0x28df6d=[new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x314f00=>setTimeout(_0x314f00,0x5356b2f6^_0x161779)),_0x2e143e[_0x4c06b1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55bb51=>{let _0x4b6870=0x0;_0x1eaeef[_0x4c06b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c06b1([0x6f,0x6e])](_0x4c06b1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf8b4e0,_0x361aa9)=>{_0x361aa9[0x0][_0x4c06b1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4b6870++,_0x4b6870==(0x535f89d2^_0x161779)&&(_0x55bb51(),_0xf8b4e0[_0x4c06b1([0x6f,0x66,0x66])]());});}))];return window[_0x4c06b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c06b1([0x72,0x61,0x63,0x65])](_0x28df6d)[_0x4c06b1([0x74,0x68,0x65,0x6e])](()=>_0x591c33);}async function _0x3e2cae(){await _0x2e143e,_0x1eaeef[_0x4c06b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c06b1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5ed1dc,_0x1eaeef[_0x4c06b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c06b1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5ed1dc,_0x1eaeef[_0x4c06b1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c06b1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xcac125(_0x563418){const _0x3e9991=_0x3be1c7();_0x1eaeef[_0x3e9991]=_0x4c06b1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x563418,_0x563418!=_0x4c06b1([0x56,0x61,0x6c,0x69,0x64])&&_0x3e2cae();}function _0x3be1c7(){const _0x41bc56=window[_0x4c06b1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c06b1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c06b1([0x6e,0x6f,0x77])]())[_0x4c06b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c06b1([0x2e]),'');let _0x13c692=_0x4c06b1([0x68]);for(let _0x4d7533=0x0;_0x4d7533<_0x41bc56[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d7533+=0x2){let _0xda0506=window[_0x4c06b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41bc56[_0x4c06b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4d7533,_0x4d7533+0x2));_0xda0506>=_0x45d082[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xda0506-=_0x45d082[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x13c692+=_0x45d082[_0xda0506];}return _0x13c692;}function _0x557a0f(){const _0x372530=_0x2f6a8d[_0x4c06b1([0x73,0x70,0x6c,0x69,0x74])](_0x4c06b1([0x2e]));if(0x3!=_0x372530[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2ceee4(_0x372530[0x1]);function _0x2ceee4(_0x5a5e7c){const _0x4e141b=_0x6a2a1d(_0x5a5e7c);return _0x4e141b&&_0x1e9d7b()?_0x4e141b:null;function _0x1e9d7b(){const _0x5cac50=_0x4e141b[_0x4c06b1([0x6a,0x74,0x69])],_0x5a5197=window[_0x4c06b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5cac50[_0x4c06b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5cac50[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1bb8a6={..._0x4e141b,[_0x4c06b1([0x6a,0x74,0x69])]:_0x5cac50[_0x4c06b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5cac50[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1bb8a6[_0x4c06b1([0x76,0x63])],_0x32a92e(_0x1bb8a6)==_0x5a5197;}}}async function _0x2c8981(){let _0x56e668=!0x0;try{const _0x513689=_0x2f6a8d[_0x4c06b1([0x73,0x70,0x6c,0x69,0x74])](_0x4c06b1([0x2e])),[_0x127ba0,_0x134aef,_0x2506c5]=_0x513689;return _0x19342e(_0x127ba0),await _0x1071f9(_0x127ba0,_0x134aef,_0x2506c5),_0x56e668;}catch{return!0x1;}function _0x19342e(_0xfc4226){const _0x4b23af=_0x6a2a1d(_0xfc4226);_0x4b23af&&_0x4b23af[_0x4c06b1([0x61,0x6c,0x67])]==_0x4c06b1([0x45,0x53,0x32,0x35,0x36])||(_0x56e668=!0x1);}async function _0x1071f9(_0x960694,_0x1028c5,_0x24300f){const _0x1500f=window[_0x4c06b1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c06b1([0x66,0x72,0x6f,0x6d])](_0x61b5be(_0x24300f),_0x3f45aa=>_0x3f45aa[_0x4c06b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1aad06=new window[(_0x4c06b1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c06b1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x960694+_0x4c06b1([0x2e])+_0x1028c5),_0x38ecf3=window[_0x4c06b1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c06b1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x38ecf3)return;const _0x3505cf=await _0x38ecf3[_0x4c06b1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c06b1([0x6a,0x77,0x6b]),_0x4771fc,{[_0x4c06b1([0x6e,0x61,0x6d,0x65])]:_0x4c06b1([0x45,0x43,0x44,0x53,0x41]),[_0x4c06b1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c06b1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c06b1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x38ecf3[_0x4c06b1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c06b1([0x6e,0x61,0x6d,0x65])]:_0x4c06b1([0x45,0x43,0x44,0x53,0x41]),[_0x4c06b1([0x68,0x61,0x73,0x68])]:{[_0x4c06b1([0x6e,0x61,0x6d,0x65])]:_0x4c06b1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3505cf,_0x1500f,_0x1aad06)||(_0x56e668=!0x1);}}function _0x6a2a1d(_0x18611e){return _0x18611e[_0x4c06b1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c06b1([0x65,0x79]))?JSON[_0x4c06b1([0x70,0x61,0x72,0x73,0x65])](_0x61b5be(_0x18611e)):null;}function _0x61b5be(_0x5926ec){return window[_0x4c06b1([0x61,0x74,0x6f,0x62])](_0x5926ec[_0x4c06b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c06b1([0x2b]))[_0x4c06b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c06b1([0x2f])));}function _0x32a92e(_0x21d1b1){let _0x270fda=0x1505;function _0x1d61bb(_0x5e3675){for(let _0x2b7f10=0x0;_0x2b7f10<_0x5e3675[_0x4c06b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2b7f10++){const _0x261804=_0x5e3675[_0x4c06b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2b7f10);_0x270fda=(_0x270fda<<0x5)+_0x270fda+_0x261804,_0x270fda&=_0x270fda;}}function _0x376c5a(_0x17e6b9){Array[_0x4c06b1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17e6b9)?_0x17e6b9[_0x4c06b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x376c5a):_0x17e6b9&&typeof _0x17e6b9==_0x4c06b1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c06b1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17e6b9)[_0x4c06b1([0x73,0x6f,0x72,0x74])]()[_0x4c06b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4bd934,_0xb42a8c])=>{_0x1d61bb(_0x4bd934),_0x376c5a(_0xb42a8c);}):_0x1d61bb(window[_0x4c06b1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17e6b9));}return _0x376c5a(_0x21d1b1),_0x270fda>>>0x0;}function _0x223582(_0x2b1c1e){return _0x2b1c1e[_0x4c06b1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c06b1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c06b1([0x30]));}function _0x456bc9(_0x2f123f){return _0x2f123f[_0x4c06b1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c06b1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c06b1([0x6a,0x6f,0x69,0x6e])]('');}function _0x5ed1dc(){}function _0x4c06b1(_0x9a3bea){return _0x9a3bea['map'](_0x31a953=>String['fromCharCode'](_0x31a953))['join']('');}_0xcac125(await _0x394b7d());}(this);}['_initSchema'](){const _0x342a99=this['editor']['model']['schema'];_0x342a99['isRegistered']('imageBlock')&&_0x342a99['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x342a99['isRegistered']('imageInline')&&_0x342a99['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3676e6=this['editor'];_0x3676e6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3676e6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x53652a=>_0x53652a['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4ae3ca=_0x3676e6['commands']['get']('replaceImageSource');_0x4ae3ca&&this['listenTo'](_0x4ae3ca,'cleanupImage',(_0xb14663,[_0x51a733,_0x1c2502])=>{_0x51a733['removeAttribute']('uploadcareImageId',_0x1c2502);});}['_initConfig'](){const _0x481b6a=this['editor']['config']['get']('uploadcare.uploader')||{},_0x551541=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x240285(_0x4e45d2['document'],'uc-config',{..._0x481b6a,'pubkey':_0x551541,'ctx-name':'uploader-'+this['ucContextId'],'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']=_0x1b7e9c=>{if('closeMax'==_0x1b7e9c)return'#uc-icon-arrow-down';},_0x4e45d2['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x240285(_0x4e45d2['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4e45d2['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2a650d=this['editor']['commands']['get']('insertImage');_0x2a650d&&this['listenTo'](_0x2a650d,'execute',()=>{const _0x4911cb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4911cb&&_0x4911cb['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x4911cb);});});const _0x1c3772=this['editor']['commands']['get']('uploadcareImageReplace');_0x1c3772&&this['listenTo'](_0x1c3772,'execute',()=>{const _0x3fa026=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3fa026&&_0x3fa026['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x3fa026);});});}}class H extends _0x1c510e{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3eee7b){super(_0x3eee7b),_0x3eee7b['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x18b9f0['defineComponents'](_0x18b9f0),this['_defineLocale']();}['_defineLocale'](){const _0x4c12cb=this['editor']['config']['get']('uploadcare.locale'),_0x50ff7a=this['editor']['locale']['contentLanguage'];_0x4c12cb&&_0x18b9f0['defineLocale'](_0x50ff7a,_0x4c12cb);}}class J extends _0x2cd4c6{constructor(_0x5e0443){super(_0x5e0443);const t=_0x5e0443['t'],_0x115f4c=this['bindTemplate'],_0x39ce22=new _0x299f93();_0x39ce22['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':[_0x39ce22,{'text':_0x115f4c['to']('imageUploadProgress',_0xf6cbb6=>t('Loading\x20image...')+'\x20('+(_0xf6cbb6||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 Z extends _0x2cd4c6{constructor(_0x35ac84){super(_0x35ac84);const t=_0x35ac84['t'];this['set']('errorType',null);const _0x1cbab8=new _0x426537(_0x35ac84);_0x1cbab8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1cbab8['withText']=!0x0,_0x1cbab8['class']='ck-button-action',_0x1cbab8['on']('execute',()=>{this['fire']('retry');}),_0x1cbab8['bind']('isVisible')['to'](this,'errorType',_0x223c64=>'NotFound'!==_0x223c64);const _0x49553e=new _0x19662a();_0x49553e['content']=_0x2350e5,_0x49553e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x205527=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':[_0x49553e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x205527['to']('errorType',_0x290f65=>t('NotFound'!==_0x290f65?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1cbab8]},{'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 Q extends _0x2cd4c6{constructor(_0x240b27,_0x2fa26b){super(_0x240b27);const _0x1f7012=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2fa26b,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1f7012['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3a9dce,_0x1877cf,_0x2fe8c2){super(_0x3a9dce),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x3a9dce),this['_errorView']=new Z(_0x3a9dce),this['_editingView']=new Q(_0x3a9dce,_0x2fe8c2),this['_focusableView']=new _0x2cd4c6(_0x3a9dce),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1877cf),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'],_0x445c38=>{this['_addUploadcareImageEditorListeners'](_0x445c38);});}),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'](_0x4a8679,_0x54f378){const _0xa1647d='uc-cloud-image-editor',_0x2dcff1=_0x4a8679['querySelector'](_0xa1647d);if(_0x2dcff1)return _0x54f378(_0x2dcff1);const _0x3df399=new MutationObserver(_0x281373=>{const _0xbbcd2b=_0x281373['filter'](_0x26b260=>_0x26b260['target']===_0x4a8679&&_0x26b260['addedNodes']['length']>0x0&&_0x26b260['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xa1647d);_0xbbcd2b['length']&&(_0x3df399['disconnect'](),_0x54f378(_0xbbcd2b[0x0]['addedNodes'][0x0]));});_0x3df399['observe'](_0x4a8679,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x315b59){_0x315b59['addEventListener']('apply',_0x57fc12=>{this['fire']('apply',{'imageSrc':_0x57fc12['detail']['cdnUrl']});}),_0x315b59['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
25
+ _0x3ee8ba(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ec24f,_0x166c64,_0x59d0e8){super(),this['_editor']=_0x4ec24f,this['_dialog']=_0x166c64,this['_imageElement']=_0x59d0e8,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 _0x130901=this['_imageElement'],_0x3cda9b=_0x130901['getAttribute']('uploadcareImageId'),_0xa7afb6=_0x130901['getAttribute']('src');if(_0x3cda9b)await this['_loadImageInfo'](_0x3cda9b,_0xa7afb6);else{if(this['_imageCache']['has'](_0xa7afb6)){const _0x40691a=this['_imageCache']['get'](_0xa7afb6);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x40691a['url'],this['imageDimension']=_0x40691a['dimension'],this['imageId']=_0x40691a['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1cd307}=this['_editor'],t=_0x1cd307['t'],_0x1fb38d=new X(_0x1cd307,this['imageStatus'],this['_attributes']);_0x1fb38d['bind']('status')['to'](this,'imageStatus'),_0x1fb38d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1fb38d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1fb38d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1fb38d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x358229,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1fb38d,'position':_0x1ddc4b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1fb38d['focus']();},'onHide':()=>{_0x1fb38d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1f5055=>!V(_0x1f5055,_0x1fb38d['element'])}});}['_loadImageInfo'](_0x5c007c,_0x1cc589){return q['getInfo'](_0x5c007c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x132d35=>{const {width:_0x11e5ca,height:_0x401d71}=_0x132d35['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1cc589,this['imageDimension']={'width':_0x11e5ca,'height':_0x401d71},this['imageId']=_0x5c007c;})['catch'](_0x588602=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x588602['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x16dad6,_0x546c25){return this['_getImageAsFile'](_0x16dad6)['then'](_0x34a37b=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x546c25['signal'],'file':_0x34a37b,'onProgress':_0x2a28ac=>{_0x2a28ac&&_0x2a28ac['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2a28ac['value']));}}))['then'](_0x17bc9d=>{const {width:_0x3fa374,height:_0x5b441d}=_0x17bc9d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x17bc9d['cdnUrl'],this['imageDimension']={'width':_0x3fa374,'height':_0x5b441d},this['imageId']=_0x17bc9d['uuid'],this['imageUploadProgress']=null;const _0x2b5d4b=_0x16dad6['getAttribute']('src');this['_imageCache']['set'](_0x2b5d4b,{'id':_0x17bc9d['uuid'],'url':_0x17bc9d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x251201=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x251201['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5e6d34,_0xa6091f){_0x5e6d34['on']('apply',(_0x5a10e1,_0x475392)=>{this['_replaceImage'](_0xa6091f,_0x475392['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5e6d34['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5e6d34['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x54143e,_0xc4f99,_0x206187){const _0x4ca77f=this['_editor'],{width:_0x3fd028,height:_0x67dd1e}=F(_0xc4f99,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x81e47f,imageSources:_0x1f887d}=D(_0xc4f99,_0x3fd028);_0x4ca77f['model']['change'](_0x133999=>{if('$graveyard'===_0x54143e['root']['rootName']){_0x4ca77f['execute']('insertImage',{'imageType':_0x54143e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x54143e['getAttributes']()),'uploadcareImageId':_0x206187,'src':_0x81e47f,'sources':_0x1f887d,'width':_0x3fd028,'height':_0x67dd1e}});const _0x26be5a=_0x54143e['getChildren']();_0x54143e=_0x4ca77f['model']['document']['selection']['getSelectedElement']();for(const _0x50edb7 of _0x26be5a)_0x133999['append'](_0x133999['cloneElement'](_0x50edb7),_0x54143e);}else _0x133999['setSelection'](_0x54143e,'on'),_0x4ca77f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x54143e['getAttributes']()),'uploadcareImageId':_0x206187,'src':_0x81e47f,'sources':_0x1f887d,'width':_0x3fd028,'height':_0x67dd1e},_0x54143e);_0x133999['setSelection'](_0x54143e,'on');});}async['_getImageAsFile'](_0x558589){const _0x4616ae=_0x4e45d2['window'],_0x5a780f=_0x4e45d2['document']['location']['href'],_0x455bbc=new _0x4616ae['URL'](_0x558589['getAttribute']('src'),_0x5a780f);if('data:'===_0x455bbc['protocol']){const _0x192a5c=_0x455bbc['href']['split'](','),_0x5ec4ae=_0x192a5c[0x0]['match'](/:(.*?);/)[0x1],_0x2b4304=_0x5ec4ae['split']('/')[0x1],_0x45743e=_0x4616ae['atob'](_0x192a5c[_0x192a5c['length']-0x1]);let _0x15eaab=_0x45743e['length'];const _0x1084c8=new _0x4616ae['Uint8Array'](_0x15eaab);for(;_0x15eaab--;)_0x1084c8[_0x15eaab]=_0x45743e['charCodeAt'](_0x15eaab);return new _0x4616ae['File']([_0x1084c8],'image.'+_0x2b4304,{'type':_0x5ec4ae});}const _0x31250d=_0x455bbc['href']['split']('/'),_0x2620d2=_0x31250d[_0x31250d['length']-0x1],_0x8d4514=_0x2620d2['split']('.')[0x1];return _0x4616ae['fetch'](_0x455bbc['href'])['then'](_0x52058e=>_0x52058e['clone']()['blob']())['then'](_0xa26e57=>new _0x4616ae['File']([_0xa26e57],_0x2620d2,{'type':'image/'+_0x8d4514}));}}class tt extends _0x3a470c{['imageEditController'];static get['requires'](){return[_0x2a27b6];}['_isEditable'];constructor(_0x912ac3){super(_0x912ac3),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xd47bae){const _0x5ac5ad=B(_0xd47bae);return _0x4ac842=>!(!_0x4ac842||!_0x4ac842['is']('element','imageBlock')&&!_0x4ac842['is']('element','imageInline'))&&(!!_0x4ac842['hasAttribute']('uploadcareImageId')||!!_0x4ac842['hasAttribute']('src')&&_0x5ac5ad(_0x4ac842['getAttribute']('src')));}(_0x912ac3['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xc840b4=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xc840b4);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4707b0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4707b0&&(_0x4707b0['is']('element','imageBlock')||_0x4707b0['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x2a27b6),_0x4707b0),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x3a470c{['refresh'](){const _0x42f31c=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x42f31c&&(_0x42f31c['is']('element','imageBlock')||_0x42f31c['is']('element','imageInline')));}['execute'](_0x227e57){const _0x58f740=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1130c2=>{_0x1130c2['setAttributes'](_0x227e57,_0x58f740),_0x1130c2['removeAttribute']('srcset',_0x58f740),_0x1130c2['removeAttribute']('sizes',_0x58f740);});}}class it extends _0x1c510e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x23db2d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x52f8b1}=this;_0x52f8b1['commands']['add']('uploadcareImageEdit',new tt(_0x52f8b1)),_0x52f8b1['commands']['add']('uploadcareImageReplace',new et(_0x52f8b1));}}class st extends _0x1c510e{['_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 _0x41673c=this['editor'];_0x41673c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x4c6211=>{const _0x34e8b6=_0x41673c['commands']['get']('uploadcareImageEdit'),_0x5b6205=new _0x426537(_0x4c6211),t=_0x4c6211['t'];return _0x5b6205['set']({'icon':_0x358229,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x5b6205['bind']('isEnabled')['to'](_0x34e8b6),_0x5b6205['bind']('isOn')['to'](_0x34e8b6,'isActive'),this['listenTo'](_0x5b6205,'execute',()=>{_0x41673c['execute']('uploadcareImageEdit'),_0x41673c['editing']['view']['focus']();}),_0x5b6205;}),this['_initConfig']();}['_initConfig'](){const _0x4242f8=_0x240285(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4242f8),this['listenTo'](this['editor'],'destroy',()=>{_0x4242f8['remove']();});}}class nt extends _0x1c510e{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-next-20260125.0",
3
+ "version": "0.0.0-nightly-next-20260126.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -37,14 +37,14 @@
37
37
  "dist/translations/*.umd.js"
38
38
  ],
39
39
  "dependencies": {
40
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260125.0",
41
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260125.0",
42
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260125.0",
43
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260125.0",
44
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260125.0",
45
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260125.0",
46
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260125.0",
47
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260125.0",
40
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260126.0",
41
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260126.0",
42
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260126.0",
43
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260126.0",
44
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260126.0",
45
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260126.0",
46
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260126.0",
47
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260126.0",
48
48
  "@uploadcare/file-uploader": "1.24.5",
49
49
  "@uploadcare/upload-client": "6.14.3"
50
50
  },