@ckeditor/ckeditor5-uploadcare 46.0.1-alpha.12 → 46.0.1-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2cf13a,Command as _0x46f6ad}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2fdab6,IconGooglePhotos as _0x5628ad,IconGoogleDrive as _0xb1866d,IconFacebook as _0x3f5b14,IconDropbox as _0x2e6df2,IconUploadcareLink as _0x34906c,IconUploadcareImageUpload as _0x17a9a4,IconError as _0x279a7d,IconUploadcareImageEdit as _0x3da54a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x54eaf0,MenuBarMenuListItemButtonView as _0x3ca89c,View as _0x19ec15,FocusCycler as _0x121575,Dialog as _0x1fb372,DialogViewPosition as _0x537efb,SpinnerView as _0x17d250,IconView as _0x1c2f63,Notification as _0x2a8bc8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x526bed,DomEmitterMixin as _0x3c4eb0,global as _0x5db020,getAncestors as _0x226a00,ObservableMixin as _0x5df921,uid as _0x13dfba,createElement as _0x18589a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x483f69}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4e396f,info as _0x64964e}from'@uploadcare/upload-client';import*as _0x3c7763 from'@uploadcare/file-uploader';var i=function(_0x5ac3a8){return _0x5ac3a8['Local']='local',_0x5ac3a8['URL']='url',_0x5ac3a8['Dropbox']='dropbox',_0x5ac3a8['GDrive']='gdrive',_0x5ac3a8['Facebook']='facebook',_0x5ac3a8['GPhotos']='gphotos',_0x5ac3a8['OneDrive']='onedrive',_0x5ac3a8;}({});function _(_0x13f038,_0x9f826a,_0x329134){const t=_0x13f038['t'],_0x4bead1=_0x13f038['t'];switch(_0x9f826a){case i['Local']:return{'text':_0x4bead1('Insert'===_0x329134?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4bead1('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x329134?_0x4bead1('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4bead1('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x9f826a;}}class e extends _0x2cf13a{['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 _0x854ce8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x344ab1;for(const _0x405f93 in _0x854ce8){const _0x3785a1=_0x405f93,_0x106d73=_0x854ce8[_0x3785a1];if('uploadcareLicenseKeyValid'==_0x106d73||'uploadcareLicenseKeyInvalid'==_0x106d73||'uploadcareLicenseKeyExpired'==_0x106d73||'uploadcareLicenseKeyDomainLimit'==_0x106d73||'uploadcareLicenseKeyNotAllowed'==_0x106d73||'uploadcareLicenseKeyEvaluationLimit'==_0x106d73||'uploadcareLicenseKeyTrialLimit'==_0x106d73||'uploadcareLicenseKeyUsageLimit'==_0x106d73){delete _0x854ce8[_0x3785a1],_0x344ab1=_0x106d73,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x344ab1&&_0x854ce8['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x344ab1&&_0x854ce8['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x344ab1&&_0x854ce8['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x18bbdc}=this,_0x177cb8=_0x18bbdc['commands']['get']('uploadcare');if(!_0x177cb8)return;const _0x21ed83=this['_normalizeConfigSourceList'](_0x18bbdc['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x45b77c,_0x4748de)=>{const _0x4748ee=this['_getIntegrationKey'](_0x4748de['type']);return _0x45b77c[_0x4748ee]||(_0x45b77c[_0x4748ee]=[]),_0x45b77c[_0x4748ee]['push'](_0x4748de),_0x45b77c;},{});_0x18bbdc['plugins']['has']('ImageInsertUI')&&_0x18bbdc['commands']['get']('uploadcare')&&Object['entries'](_0x21ed83)['forEach'](([_0xaba372,_0x2acff6])=>{_0x18bbdc['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xaba372,'observable':()=>_0x177cb8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2acff6),'formViewCreator':()=>this['_createDropdownButtons'](_0x2acff6),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2acff6),'override':'assetManager'!==_0xaba372});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x368421){const {locale:_0x21f95d}=this['editor'];return _0x368421['map'](_0x581e5c=>{const _0x233c1d=_(_0x21f95d,_0x581e5c,'Insert');switch(_0x581e5c){case i['Local']:return{'icon':_0x17a9a4,'type':i['Local'],..._0x233c1d};case i['URL']:return{'icon':_0x34906c,'type':i['URL'],..._0x233c1d};case i['Dropbox']:return{'icon':_0x2e6df2,'type':i['Dropbox'],..._0x233c1d};case i['Facebook']:return{'icon':_0x3f5b14,'type':i['Facebook'],..._0x233c1d};case i['GDrive']:return{'icon':_0xb1866d,'type':i['GDrive'],..._0x233c1d};case i['GPhotos']:return{'icon':_0x5628ad,'type':i['GPhotos'],..._0x233c1d};case i['OneDrive']:return{'icon':_0x2fdab6,'type':i['OneDrive'],..._0x233c1d};}});}['_getIntegrationKey'](_0x4ccc0e){switch(_0x4ccc0e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x52951e,_0x26228f){const _0x29e6a2=this['editor'],_0x36986f=new _0x52951e(_0x29e6a2['locale']),_0x4f97d1=_0x29e6a2['commands']['get']('uploadcare');return _0x36986f['bind']('isEnabled')['to'](_0x4f97d1),_0x36986f['on']('execute',()=>{_0x4f97d1['execute'](_0x26228f);}),_0x36986f;}['_createToolbarButton'](_0x480ec5){const {locale:_0x3342a2}=this['editor'],_0x567f05=this['editor']['plugins']['get']('ImageInsertUI'),_0x3c6f73=_0x480ec5[0x0],_0xc9be53=this['_createButton'](_0x54eaf0,_0x3c6f73['type']);return _0xc9be53['icon']=_0x3c6f73['icon'],_0xc9be53['bind']('label')['to'](_0x567f05,'isImageSelected',_0x55f8fb=>_(_0x3342a2,_0x3c6f73['type'],_0x55f8fb?'Replace':'Insert')['text']),_0xc9be53['tooltip']=!0x0,_0xc9be53;}['_createDropdownButtons'](_0x53ea78){const {locale:_0x250d2c}=this['editor'],_0x38d7cf=this['editor']['plugins']['get']('ImageInsertUI');return _0x53ea78['map'](_0x5c924=>{const _0x149516=this['_createButton'](_0x54eaf0,_0x5c924['type']);return _0x149516['withText']=!0x0,_0x149516['icon']=_0x5c924['icon'],_0x149516['bind']('label')['to'](_0x38d7cf,'isImageSelected',_0x48d699=>_(_0x250d2c,_0x5c924['type'],_0x48d699?'Replace':'Insert')['text']),_0x149516;});}['_createMenuBarButtons'](_0x328b0c){return _0x328b0c['map'](_0x3c12fb=>{const _0xb0a459=this['_createButton'](_0x3ca89c,_0x3c12fb['type']);return _0xb0a459['icon']=_0x3c12fb['icon'],_0xb0a459['label']=_0x3c12fb['shortText'],_0xb0a459;});}}class F extends _0x19ec15{['focusTracker'];['focusCycler'];constructor(_0x58f050){super(_0x58f050),this['focusTracker']=new _0x526bed(),this['focusCycler']=new _0x121575({'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 x extends F{constructor(_0x165599,_0x4d6322){super(_0x165599),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-'+_0x4d6322}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x5893fd,_0x21c5ec){const _0xe68e26=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4aae83=>_0x4aae83<=_0x21c5ec)['map'](_0x4e6e4a=>_0x5893fd['replace'](/\/$/,'')+'/-/resize/'+_0x4e6e4a+'x/\x20'+_0x4e6e4a+'w');return{'imageFallbackUrl':_0x5893fd,'imageSources':[{'srcset':_0xe68e26['join'](',\x20'),'sizes':'(max-width:\x20'+_0x21c5ec+'px)\x20100vw,\x20'+_0x21c5ec+'px','type':'image/webp'}]};}function C(_0x34275d,_0xb2327e,_0x3f9278){const _0x540923=_0x34275d['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x540923?parseInt(_0x540923[0x1],0xa):_0xb2327e,'height':_0x540923?parseInt(_0x540923[0x2],0xa):_0x3f9278};}function p(_0x3b2084,_0x849118){const _0x3a8c94=new(_0x3c4eb0())(),_0x4ff1a2=_0x3b2084['plugins']['get']('ImageUtils'),_0x1d60fa=_0x3b2084['editing']['mapper']['toViewElement'](_0x849118),_0x481ee0=_0x4ff1a2['findViewImgElement'](_0x1d60fa),_0x4ecc92=_0x3b2084['editing']['view']['domConverter']['viewToDom'](_0x481ee0),_0x4f8e4c=_0x849118['getAttribute']('width'),_0x2c332e=_0x849118['getAttribute']('height'),_0x565669='image-processing';_0x3b2084['editing']['view']['change'](_0x458bc9=>{_0x458bc9['addClass'](_0x565669,_0x1d60fa),_0x458bc9['setStyle']('aspect-ratio',_0x4f8e4c+'/'+_0x2c332e,_0x481ee0);}),_0x3a8c94['listenTo'](_0x4ecc92,'load',()=>{_0x3a8c94['stopListening'](_0x4ecc92,'load'),_0x3b2084['editing']['view']['change'](_0x37fdad=>{_0x37fdad['removeClass'](_0x565669,_0x1d60fa),_0x37fdad['removeStyle']('aspect-ratio',_0x481ee0);});});}function z(_0x5330eb){if(Array['isArray'](_0x5330eb)){const _0x361e4f=_0x5330eb['map'](z);return _0x345a1d=>_0x361e4f['some'](_0x457922=>_0x457922(_0x345a1d));}if('origin'==_0x5330eb){const _0xa9e509=_0x5db020['window']['location']['origin'];return _0x357e9a=>new URL(_0x357e9a,_0x5db020['document']['baseURI'])['origin']==_0xa9e509;}return'function'==typeof _0x5330eb?_0x5330eb:_0x5330eb instanceof RegExp?_0x2ce444=>!(!_0x2ce444['match'](_0x5330eb)&&!_0x2ce444['replace'](/^https?:\/\//,'')['match'](_0x5330eb)):()=>!0x1;}function S(_0x4096c7,_0x308f80){return _0x226a00(_0x4096c7['target'])['includes'](_0x308f80);}class n extends/* #__PURE__ -- @preserve */
24
- _0x5df921(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x48893a,_0x3f2faf,_0x3a8dc0){super(),this['_editor']=_0x48893a,this['_editing']=_0x3f2faf,this['_dialog']=_0x48893a['plugins']['get'](_0x1fb372),this['_api']=_0x3f2faf['ctxElement']['getAPI'](),this['_type']=_0x3a8dc0,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:_0x30d6e2,model:_0x4254e2}=this['_editor'],_0x4d0221=_0x4254e2['document']['selection']['getSelectedElement'](),_0x28bca9=_0x4d0221&&(_0x4d0221['is']('element','imageBlock')||_0x4d0221['is']('element','imageInline'));this['_formView']=new x(_0x30d6e2,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x17a9a4,'title':_(_0x30d6e2,this['_type'],_0x28bca9?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x537efb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5d9f70=>!S(_0x5d9f70,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1c9ba7}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2ff4bb=>{const _0x42382c=_0x1c9ba7['length'];for(const _0x267a5b of _0x1c9ba7){const _0x2672f3=_0x267a5b===_0x1c9ba7[_0x42382c-0x1],{cdnUrl:_0x452b20,fileInfo:_0x3a2c9c}=_0x267a5b;if(!_0x452b20||!_0x3a2c9c)continue;const {width:_0x17f94b,height:_0x213ad6}=_0x3a2c9c['imageInfo'],_0x23e680=C(_0x452b20,_0x17f94b,_0x213ad6),_0x4fdc15=k(_0x452b20,_0x23e680['width']),_0x1ac9c3={'id':_0x3a2c9c['uuid'],'type':'image','attributes':{'imageDimension':_0x23e680,..._0x4fdc15}};this['_insertAsset'](_0x1ac9c3,_0x2672f3,_0x2ff4bb);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1a2557=>{'idle'===_0x1a2557['detail']['status']&&!_0x1a2557['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4444c9,_0x32d016,_0x44082b){const _0x148a1a=this['_editor']['model']['document']['selection'],_0x5fc17b=_0x148a1a['getSelectedElement'](),_0x56d16d=!(!_0x5fc17b||!_0x5fc17b['is']('element','imageInline'));_0x44082b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4444c9,_0x56d16d),_0x32d016||_0x44082b['setSelection'](_0x148a1a['getLastPosition']());}['_insertImage'](_0x45121e,_0xfa3faf){const _0x90039c=this['_editor'],{imageDimension:_0x5f1464,imageFallbackUrl:_0x137da9,imageSources:_0x5af647}=_0x45121e['attributes'];_0x90039c['execute']('insertImage',{'imageType':_0xfa3faf?'imageInline':null,'source':{'uploadcareImageId':_0x45121e['id'],'src':_0x137da9,'sources':_0x5af647,..._0x5f1464}});}}class w extends _0x46f6ad{['_editing'];['_controller']=null;static get['requires'](){return[_0x1fb372,o];}constructor(_0x1301a5){super(_0x1301a5),this['_editing']=_0x1301a5['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2e9948){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x2e9948);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5a3033,publicKey:_0x45f6a1,signal:_0xae21ca,onProgress:_0x257e1d}){return _0x4e396f(_0x5a3033,{'publicKey':_0x45f6a1,'store':'auto','signal':_0xae21ca,'onProgress':_0x257e1d});}static['getInfo'](_0x9ef49d,_0x1f8f47){return _0x64964e(_0x9ef49d,_0x1f8f47);}}class f extends _0x2cf13a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x483f69,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1e1ffd=this['editor'];if(!!!_0x1e1ffd['config']['get']('uploadcare'))return;_0x1e1ffd['plugins']['get'](_0x483f69)['createUploadAdapter']=_0x4b7a09=>new A(_0x4b7a09,_0x1e1ffd),_0x1e1ffd['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4ab8ce,{imageElement:_0x2a5d01,data:_0x48797c})=>{_0x1e1ffd['model']['change'](_0xf1eb08=>{_0xf1eb08['setAttribute']('uploadcareImageId',_0x48797c['uploadcareImageId'],_0x2a5d01);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x160730,_0x21e562){this['loader']=_0x160730,this['editor']=_0x21e562,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x2f08f9=this['editor']['config']['get']('uploadcare.pubkey'),_0x430ac4=await this['loader']['file'];return j['upload']({'file':_0x430ac4,'publicKey':_0x2f08f9,'signal':this['controller']['signal'],'onProgress':_0x3ab792=>{_0x3ab792&&_0x3ab792['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3ab792['value']);}})['then'](async _0x312d37=>{const {imageFallbackUrl:_0x17ca1e,imageSources:_0x373c32}=k(_0x312d37['cdnUrl'],_0x312d37['imageInfo']['width']);return{'uploadcareImageId':_0x312d37['uuid'],'default':_0x17ca1e,'sources':_0x373c32};})['catch'](()=>{const _0x24c8d5=t('Cannot\x20upload\x20file:')+('\x20'+_0x430ac4['name']+'.');return Promise['reject'](_0x24c8d5);});}['abort'](){this['controller']['abort']();}}class o extends _0x2cf13a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1fb372];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3f9846){super(_0x3f9846),this['ucContextId']=_0x13dfba();}['init'](){const _0x4a2519=this['editor'];_0x4a2519['commands']['add']('uploadcare',new w(_0x4a2519));}['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 _0x52e0ab=_0x5db020['document']['querySelector']('input[uploadcare-file-input]');_0x52e0ab&&_0x52e0ab['remove']();}),async function(_0x43786a){const _0xa765dd=_0x43656b([0x45,0x43,0x34,0x55,0x69,0x35,0x4c,0x71,0x65,0x6f,0x41,0x33,0x36,0x74,0x68,0x67,0x53,0x44,0x75,0x79,0x4b,0x32,0x6c,0x5a,0x66,0x78,0x52,0x6a,0x7a,0x49,0x58,0x56,0x47,0x42,0x6e,0x54,0x46,0x59,0x39,0x30,0x38,0x62,0x4a,0x4d,0x76,0x73,0x57,0x6b,0x70,0x72,0x77,0x4f,0x50,0x48,0x31,0x64,0x6d,0x63,0x61,0x37,0x4e,0x51]),_0x3cde35=0x9ff086f,_0x8904a1=0x9f86797^_0x3cde35,_0x1891fb=window[_0x43656b([0x44,0x61,0x74,0x65])][_0x43656b([0x6e,0x6f,0x77])](),_0x4b7fc2=_0x43786a[_0x43656b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xd3cb34=new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57cd73=>{_0x4b7fc2[_0x43656b([0x6f,0x6e,0x63,0x65])](_0x43656b([0x72,0x65,0x61,0x64,0x79]),_0x57cd73);}),_0x3f0416={[_0x43656b([0x6b,0x74,0x79])]:_0x43656b([0x45,0x43]),[_0x43656b([0x75,0x73,0x65])]:_0x43656b([0x73,0x69,0x67]),[_0x43656b([0x63,0x72,0x76])]:_0x43656b([0x50,0x2d,0x32,0x35,0x36]),[_0x43656b([0x78])]:_0x43656b([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]),[_0x43656b([0x79])]:_0x43656b([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]),[_0x43656b([0x61,0x6c,0x67])]:_0x43656b([0x45,0x53,0x32,0x35,0x36])},_0x9f8af1=_0x4b7fc2[_0x43656b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x43656b([0x67,0x65,0x74])](_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xd8f75(){let _0x15a0d2,_0x1fe725=null,_0x41e89b=null;try{if(_0x9f8af1==_0x43656b([0x47,0x50,0x4c]))return _0x43656b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x15a0d2=_0x70eac9(),!_0x15a0d2)return _0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x15a0d2[_0x43656b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x41e89b=_0x1a6b9f(_0x15a0d2[_0x43656b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x15a0d2[_0x43656b([0x6a,0x74,0x69])])),await _0x50816b()?_0xecb46e()?_0x3c05aa()?_0x43656b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x592ce7()?(_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43656b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1fe725=_0x44c40b(_0x43656b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43656b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1fe725=_0x44c40b(_0x43656b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x37b087()):_0x43656b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x43656b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c05aa(){const _0x4c94d4=[_0x43656b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x43656b([0x74,0x72,0x69,0x61,0x6c])][_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1891fb/0x3e8:0xe10*_0x8904a1;return _0x15a0d2[_0x43656b([0x65,0x78,0x70])]<_0x4c94d4;}function _0xecb46e(){const _0x5479aa=_0x15a0d2[_0x43656b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5479aa&&(!!_0x5479aa[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x2a]))||!!_0x5479aa[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x55,0x50,0x4c,0x43])));}function _0x592ce7(){const _0x61880c=_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x61880c||0x0==_0x61880c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5952f4}=new URL(window[_0x43656b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x61880c[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5952f4))return!0x0;const _0x4a62a8=_0x5952f4[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e]));return _0x61880c[_0x43656b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xff2754=>_0xff2754[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x2a])))[_0x43656b([0x6d,0x61,0x70])](_0x5d9a85=>_0x5d9a85[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e])))[_0x43656b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b0ad1=>_0x5b0ad1[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a62a8[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x43656b([0x6d,0x61,0x70])](_0x162088=>Array(_0x4a62a8[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x162088[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x43656b([0x66,0x69,0x6c,0x6c])](_0x162088[0x0]===_0x43656b([0x2a])?_0x43656b([0x2a]):'')[_0x43656b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x162088))[_0x43656b([0x73,0x6f,0x6d,0x65])](_0x83c0c4=>_0x4a62a8[_0x43656b([0x65,0x76,0x65,0x72,0x79])]((_0x11d826,_0xc2b9f)=>_0x83c0c4[_0xc2b9f]===_0x11d826||_0x83c0c4[_0xc2b9f]===_0x43656b([0x2a])));}function _0x37b087(){return _0x1fe725&&_0x41e89b?new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x276d84,_0x1abf3a)=>{_0x1fe725[_0x43656b([0x74,0x68,0x65,0x6e])](_0x276d84,_0x1abf3a),_0x41e89b[_0x43656b([0x74,0x68,0x65,0x6e])](_0x1b3659=>{_0x1b3659!=_0x43656b([0x56,0x61,0x6c,0x69,0x64])&&_0x276d84(_0x1b3659);},_0x1abf3a);}):_0x1fe725||_0x41e89b||_0x43656b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1a6b9f(_0x467443,_0x35a33c){return new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5435a1=>{if(_0x1c75d0())return _0x5435a1(_0x43656b([0x56,0x61,0x6c,0x69,0x64]));_0x2db518(),_0x4b7fc2[_0x43656b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x29ed14=!0x1;const _0x4c113f=_0x13dfba();function _0x4a230a(_0x3037b8){return!!_0x3037b8&&(typeof _0x3037b8===_0x43656b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3037b8===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3037b8[_0x43656b([0x74,0x68,0x65,0x6e])]===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3037b8[_0x43656b([0x63,0x61,0x74,0x63,0x68])]===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5a46f9(_0xef5a58){_0x41d1ce(_0xef5a58)[_0x43656b([0x74,0x68,0x65,0x6e])](_0x2fce02=>{if(!_0x2fce02||_0x2fce02[_0x43656b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x43656b([0x6f,0x6b]))return _0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x400c45(_0x4d503d(_0x4c113f+_0x35a33c))!=_0x2fce02[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x43656b([0x56,0x61,0x6c,0x69,0x64]);})[_0x43656b([0x74,0x68,0x65,0x6e])](_0x4b1ffc=>(_0x41ab67(),_0x4b1ffc),()=>{const _0x2021ad=_0x4d4a92();return null==_0x2021ad?(_0x41ab67(),_0x43656b([0x56,0x61,0x6c,0x69,0x64])):_0x43656b(_0x1891fb-_0x2021ad>(0x2df38c6f^_0x3cde35)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x43656b([0x74,0x68,0x65,0x6e])](_0x5435a1)[_0x43656b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x89c47d=0x9c9e6ef^_0x3cde35;function _0x41ab67(){const _0x350af7=_0x43656b([0x6c,0x6c,0x63,0x74,0x2d])+_0x400c45(_0x4d503d(_0x467443)),_0x169485=_0x5c4cac(_0x400c45(window[_0x43656b([0x4d,0x61,0x74,0x68])][_0x43656b([0x63,0x65,0x69,0x6c])](_0x1891fb/_0x89c47d)));window[_0x43656b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43656b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x350af7,_0x169485);}function _0x4d4a92(){const _0x48ea2e=_0x43656b([0x6c,0x6c,0x63,0x74,0x2d])+_0x400c45(_0x4d503d(_0x467443)),_0x1a0e13=window[_0x43656b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43656b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48ea2e);return _0x1a0e13?window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c4cac(_0x1a0e13),0x10)*_0x89c47d:null;}function _0x41d1ce(_0x4663c4){return new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x478211,_0x51791b)=>{_0x4663c4[_0x43656b([0x74,0x68,0x65,0x6e])](_0x478211,_0x51791b),window[_0x43656b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x51791b,0x9fedcaf^_0x3cde35);});}}_0x4b7fc2[_0x43656b([0x6f,0x6e])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5338a7,_0x37d0eb)=>{if(_0x37d0eb[0x0]!=_0x467443)return _0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x37d0eb[0x1]={..._0x37d0eb[0x1],[_0x43656b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4c113f};},{[_0x43656b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43656b([0x68,0x69,0x67,0x68])}),_0x4b7fc2[_0x43656b([0x6f,0x6e])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x55fe5c=>{_0x4a230a(_0x55fe5c[_0x43656b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x29ed14=!0x0,_0x5a46f9(_0x55fe5c[_0x43656b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x43656b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43656b([0x6c,0x6f,0x77])}),_0xd3cb34[_0x43656b([0x74,0x68,0x65,0x6e])](()=>{_0x29ed14||_0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c75d0(){return _0x4b7fc2[_0x43656b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43656b([0x76,0x69,0x65,0x77])][_0x43656b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x43656b([0x61,0x75,0x74,0x6f]);}function _0x2db518(){_0x4b7fc2[_0x43656b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43656b([0x76,0x69,0x65,0x77])][_0x43656b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x43656b([0x61,0x75,0x74,0x6f]);}}function _0x44c40b(_0xb8d5a2){const _0x3130fc=[new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9a10=>setTimeout(_0x5c9a10,0x9f636a3^_0x3cde35)),_0xd3cb34[_0x43656b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5aac15=>{let _0x309899=0x0;_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x6f,0x6e])](_0x43656b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x302731,_0x1c89b7)=>{_0x1c89b7[0x0][_0x43656b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x309899++,_0x309899==(0x9ff0997^_0x3cde35)&&(_0x5aac15(),_0x302731[_0x43656b([0x6f,0x66,0x66])]());});}))];return window[_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x43656b([0x72,0x61,0x63,0x65])](_0x3130fc)[_0x43656b([0x74,0x68,0x65,0x6e])](()=>_0xb8d5a2);}async function _0x440d3e(){await _0xd3cb34,_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x53afc8,_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x53afc8,_0x4b7fc2[_0x43656b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x43656b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x39dceb(_0xf486fe){const _0x17586d=_0x6437c2();_0x4b7fc2[_0x17586d]=_0x43656b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xf486fe,_0xf486fe!=_0x43656b([0x56,0x61,0x6c,0x69,0x64])&&_0x440d3e();}function _0x6437c2(){const _0x54852c=window[_0x43656b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x43656b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x43656b([0x6e,0x6f,0x77])]())[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x43656b([0x2e]),'');let _0x16fa56=_0x43656b([0x45]);for(let _0x350b7c=0x0;_0x350b7c<_0x54852c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x350b7c+=0x2){let _0x8774a3=window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54852c[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x350b7c,_0x350b7c+0x2));_0x8774a3>=_0xa765dd[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x8774a3-=_0xa765dd[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x16fa56+=_0xa765dd[_0x8774a3];}return _0x16fa56;}function _0x70eac9(){const _0x516a8d=_0x9f8af1[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e]));if(0x3!=_0x516a8d[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xa808a7(_0x516a8d[0x1]);function _0xa808a7(_0x3868a6){const _0x539f93=_0x5c0961(_0x3868a6);return _0x539f93&&_0x414bbe()?_0x539f93:null;function _0x414bbe(){const _0x57ccd9=_0x539f93[_0x43656b([0x6a,0x74,0x69])],_0x66e813=window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57ccd9[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57ccd9[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x485bba={..._0x539f93,[_0x43656b([0x6a,0x74,0x69])]:_0x57ccd9[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57ccd9[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x485bba[_0x43656b([0x76,0x63])],_0x4d503d(_0x485bba)==_0x66e813;}}}async function _0x50816b(){let _0xaa2c69=!0x0;try{const _0x1eb25a=_0x9f8af1[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e])),[_0x2ab9c3,_0x1bca09,_0x2ec29a]=_0x1eb25a;return _0x1187a1(_0x2ab9c3),await _0x43b3d3(_0x2ab9c3,_0x1bca09,_0x2ec29a),_0xaa2c69;}catch{return!0x1;}function _0x1187a1(_0x16b98b){const _0x408cea=_0x5c0961(_0x16b98b);_0x408cea&&_0x408cea[_0x43656b([0x61,0x6c,0x67])]==_0x43656b([0x45,0x53,0x32,0x35,0x36])||(_0xaa2c69=!0x1);}async function _0x43b3d3(_0xdb35c4,_0x50a654,_0x4f278b){const _0x14794d=window[_0x43656b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x43656b([0x66,0x72,0x6f,0x6d])](_0x4a8234(_0x4f278b),_0x4e53d0=>_0x4e53d0[_0x43656b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fc243=new window[(_0x43656b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x43656b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xdb35c4+_0x43656b([0x2e])+_0x50a654),_0x61e286=window[_0x43656b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x43656b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x61e286)return;const _0x2793cd=await _0x61e286[_0x43656b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x43656b([0x6a,0x77,0x6b]),_0x3f0416,{[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x45,0x43,0x44,0x53,0x41]),[_0x43656b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x43656b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x61e286[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x45,0x43,0x44,0x53,0x41]),[_0x43656b([0x68,0x61,0x73,0x68])]:{[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2793cd,_0x14794d,_0x2fc243)||(_0xaa2c69=!0x1);}}function _0x5c0961(_0x561da1){return _0x561da1[_0x43656b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x43656b([0x65,0x79]))?JSON[_0x43656b([0x70,0x61,0x72,0x73,0x65])](_0x4a8234(_0x561da1)):null;}function _0x4a8234(_0x27c3ff){return window[_0x43656b([0x61,0x74,0x6f,0x62])](_0x27c3ff[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x43656b([0x2b]))[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x43656b([0x2f])));}function _0x4d503d(_0x2d2f25){let _0x4c58dc=0x1505;function _0x4fd9d1(_0x1d4d0c){for(let _0x22a5a1=0x0;_0x22a5a1<_0x1d4d0c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22a5a1++){const _0x402c34=_0x1d4d0c[_0x43656b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x22a5a1);_0x4c58dc=(_0x4c58dc<<0x5)+_0x4c58dc+_0x402c34,_0x4c58dc&=_0x4c58dc;}}function _0x1ad783(_0x4dae1c){Array[_0x43656b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4dae1c)?_0x4dae1c[_0x43656b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ad783):_0x4dae1c&&typeof _0x4dae1c==_0x43656b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x43656b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4dae1c)[_0x43656b([0x73,0x6f,0x72,0x74])]()[_0x43656b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x371ac1,_0x5e3d03])=>{_0x4fd9d1(_0x371ac1),_0x1ad783(_0x5e3d03);}):_0x4fd9d1(window[_0x43656b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4dae1c));}return _0x1ad783(_0x2d2f25),_0x4c58dc>>>0x0;}function _0x400c45(_0x50520c){return _0x50520c[_0x43656b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x43656b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x43656b([0x30]));}function _0x5c4cac(_0xc13279){return _0xc13279[_0x43656b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x43656b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x43656b([0x6a,0x6f,0x69,0x6e])]('');}function _0x53afc8(){}function _0x43656b(_0x460680){return _0x460680['map'](_0x3671e3=>String['fromCharCode'](_0x3671e3))['join']('');}_0x39dceb(await _0xd8f75());}(this);}['_initSchema'](){const _0x50523d=this['editor']['model']['schema'];_0x50523d['isRegistered']('imageBlock')&&_0x50523d['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x50523d['isRegistered']('imageInline')&&_0x50523d['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2407a4=this['editor'];_0x2407a4['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2407a4['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bcab5=>_0x4bcab5['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x57b71=_0x2407a4['commands']['get']('replaceImageSource');_0x57b71&&this['listenTo'](_0x57b71,'cleanupImage',(_0x2652bd,[_0x1d1944,_0x5627ff])=>{_0x1d1944['removeAttribute']('uploadcareImageId',_0x5627ff);});}['_initConfig'](){const _0x16544d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x47635a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x18589a(_0x5db020['document'],'uc-config',{..._0x16544d,'pubkey':_0x47635a,'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']=_0x4740cd=>{if('closeMax'==_0x4740cd)return'#uc-icon-arrow-down';},_0x5db020['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x18589a(_0x5db020['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x5db020['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x51d5ea=this['editor']['commands']['get']('insertImage');_0x51d5ea&&this['listenTo'](_0x51d5ea,'execute',()=>{const _0x507749=this['editor']['model']['document']['selection']['getSelectedElement']();_0x507749&&_0x507749['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x507749);});});const _0x4dc536=this['editor']['commands']['get']('uploadcareImageReplace');_0x4dc536&&this['listenTo'](_0x4dc536,'execute',()=>{const _0x3764c9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3764c9&&_0x3764c9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3764c9);});});}}class tt extends _0x2cf13a{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ac30b){super(_0x3ac30b),_0x3ac30b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3c7763['defineComponents'](_0x3c7763);}}class ii extends _0x19ec15{constructor(_0x3e5747){super(_0x3e5747);const t=_0x3e5747['t'],_0x5a7125=this['bindTemplate'],_0x280470=new _0x17d250();_0x280470['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':[_0x280470,{'text':_0x5a7125['to']('imageUploadProgress',_0x46244b=>t('Loading\x20image...')+'\x20('+(_0x46244b||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 ti extends _0x19ec15{constructor(_0x62fcff){super(_0x62fcff);const t=_0x62fcff['t'];this['set']('errorType',null);const _0x50b5de=new _0x54eaf0(_0x62fcff);_0x50b5de['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x50b5de['withText']=!0x0,_0x50b5de['class']='ck-button-action',_0x50b5de['on']('execute',()=>{this['fire']('retry');}),_0x50b5de['bind']('isVisible')['to'](this,'errorType',_0x17234e=>'NotFound'!==_0x17234e);const _0xb81072=new _0x1c2f63();_0xb81072['content']=_0x279a7d,_0xb81072['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x17735e=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':[_0xb81072,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x17735e['to']('errorType',_0x373dd7=>t('NotFound'!==_0x373dd7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x50b5de]},{'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 ei extends _0x19ec15{constructor(_0x56b0d0,_0x5810ba){super(_0x56b0d0);const _0x1ac924=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5810ba,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1ac924['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2d4571,_0x3aa452,_0x185665){super(_0x2d4571),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2d4571),this['_errorView']=new ti(_0x2d4571),this['_editingView']=new ei(_0x2d4571,_0x185665),this['_focusableView']=new _0x19ec15(_0x2d4571),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3aa452),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'],_0x1e22f5=>{this['_addUploadcareImageEditorListeners'](_0x1e22f5);});}),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'](_0x3f5752,_0x1b427f){const _0x17c1f1='uc-cloud-image-editor',_0x52f40d=_0x3f5752['querySelector'](_0x17c1f1);if(_0x52f40d)return _0x1b427f(_0x52f40d);const _0x1ccad8=new MutationObserver(_0x24d4e6=>{const _0x2446f0=_0x24d4e6['filter'](_0x180d8d=>_0x180d8d['target']===_0x3f5752&&_0x180d8d['addedNodes']['length']>0x0&&_0x180d8d['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x17c1f1);_0x2446f0['length']&&(_0x1ccad8['disconnect'](),_0x1b427f(_0x2446f0[0x0]['addedNodes'][0x0]));});_0x1ccad8['observe'](_0x3f5752,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xfffebd){_0xfffebd['addEventListener']('apply',_0x2709cb=>{this['fire']('apply',{'imageSrc':_0x2709cb['detail']['cdnUrl']});}),_0xfffebd['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x5df921(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5240f5,_0x15ce37,_0x2a1c91){super(),this['_editor']=_0x5240f5,this['_dialog']=_0x15ce37,this['_imageElement']=_0x2a1c91,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 _0x4d01fe=this['_imageElement'],_0x5cf550=_0x4d01fe['getAttribute']('uploadcareImageId'),_0x52f1b0=_0x4d01fe['getAttribute']('src');if(_0x5cf550)await this['_loadImageInfo'](_0x5cf550,_0x52f1b0);else{if(this['_imageCache']['has'](_0x52f1b0)){const _0xf042c2=this['_imageCache']['get'](_0x52f1b0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xf042c2['url'],this['imageDimension']=_0xf042c2['dimension'],this['imageId']=_0xf042c2['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1ae352}=this['_editor'],t=_0x1ae352['t'],_0x474ada=new X(_0x1ae352,this['imageStatus'],this['_attributes']);_0x474ada['bind']('status')['to'](this,'imageStatus'),_0x474ada['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x474ada['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x474ada['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x474ada,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3da54a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x474ada,'position':_0x537efb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x474ada['focus']();},'onHide':()=>{_0x474ada['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3f0e3a=>!S(_0x3f0e3a,_0x474ada['element'])}});}['_loadImageInfo'](_0x3bd2cb,_0x4ac55a){return j['getInfo'](_0x3bd2cb,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3ad55a=>{const {width:_0x53bc80,height:_0x4d8255}=_0x3ad55a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ac55a,this['imageDimension']={'width':_0x53bc80,'height':_0x4d8255},this['imageId']=_0x3bd2cb;})['catch'](_0x2d93b6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d93b6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x37d41f,_0x4f1a29){return this['_getImageAsFile'](_0x37d41f)['then'](_0x33b965=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4f1a29['signal'],'file':_0x33b965,'onProgress':_0x51798b=>{_0x51798b&&_0x51798b['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x51798b['value']));}}))['then'](_0x5f3766=>{const {width:_0x47ab8c,height:_0x489ed2}=_0x5f3766['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5f3766['cdnUrl'],this['imageDimension']={'width':_0x47ab8c,'height':_0x489ed2},this['imageId']=_0x5f3766['uuid'],this['imageUploadProgress']=null;const _0x2b8298=_0x37d41f['getAttribute']('src');this['_imageCache']['set'](_0x2b8298,{'id':_0x5f3766['uuid'],'url':_0x5f3766['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x59489c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x59489c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x14a9ea,_0x9d8df0){_0x14a9ea['on']('apply',(_0x19609c,_0x1fd0f2)=>{this['_replaceImage'](_0x9d8df0,_0x1fd0f2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x14a9ea['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x14a9ea['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x760689,_0x3e084a,_0x1139ce){const _0x2a6587=this['_editor'],{width:_0x19e56c,height:_0x1bf488}=C(_0x3e084a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x57dd66,imageSources:_0x43d76c}=k(_0x3e084a,_0x19e56c);_0x2a6587['model']['change'](_0x124d50=>{if('$graveyard'===_0x760689['root']['rootName']){_0x2a6587['execute']('insertImage',{'imageType':_0x760689['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x760689['getAttributes']()),'uploadcareImageId':_0x1139ce,'src':_0x57dd66,'sources':_0x43d76c,'width':_0x19e56c,'height':_0x1bf488}});const _0x3e16c2=_0x760689['getChildren']();_0x760689=_0x2a6587['model']['document']['selection']['getSelectedElement']();for(const _0x4df713 of _0x3e16c2)_0x124d50['append'](_0x124d50['cloneElement'](_0x4df713),_0x760689);}else _0x124d50['setSelection'](_0x760689,'on'),_0x2a6587['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x760689['getAttributes']()),'uploadcareImageId':_0x1139ce,'src':_0x57dd66,'sources':_0x43d76c,'width':_0x19e56c,'height':_0x1bf488},_0x760689);_0x124d50['setSelection'](_0x760689,'on');});}async['_getImageAsFile'](_0x44ed6d){const _0xe089b7=_0x5db020['window'],_0x181a4c=_0x5db020['document']['location']['href'],_0x4316e4=new _0xe089b7['URL'](_0x44ed6d['getAttribute']('src'),_0x181a4c);if('data:'===_0x4316e4['protocol']){const _0x356784=_0x4316e4['href']['split'](','),_0x56362f=_0x356784[0x0]['match'](/:(.*?);/)[0x1],_0x56396f=_0x56362f['split']('/')[0x1],_0x434f7e=_0xe089b7['atob'](_0x356784[_0x356784['length']-0x1]);let _0x43cda4=_0x434f7e['length'];const _0x5d60f7=new _0xe089b7['Uint8Array'](_0x43cda4);for(;_0x43cda4--;)_0x5d60f7[_0x43cda4]=_0x434f7e['charCodeAt'](_0x43cda4);return new _0xe089b7['File']([_0x5d60f7],'image.'+_0x56396f,{'type':_0x56362f});}const _0xcd52=_0x4316e4['href']['split']('/'),_0x2a2311=_0xcd52[_0xcd52['length']-0x1],_0x47418b=_0x2a2311['split']('.')[0x1];return _0xe089b7['fetch'](_0x4316e4['href'])['then'](_0x34f524=>_0x34f524['clone']()['blob']())['then'](_0x17c73d=>new _0xe089b7['File']([_0x17c73d],_0x2a2311,{'type':'image/'+_0x47418b}));}}class Q extends _0x46f6ad{['imageEditController'];static get['requires'](){return[_0x1fb372];}['_isEditable'];constructor(_0x5b569a){super(_0x5b569a),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x39ca2a){const _0x34dae5=z(_0x39ca2a);return _0x1d3ca3=>!(!_0x1d3ca3||!_0x1d3ca3['is']('element','imageBlock')&&!_0x1d3ca3['is']('element','imageInline'))&&(!!_0x1d3ca3['hasAttribute']('uploadcareImageId')||!!_0x1d3ca3['hasAttribute']('src')&&_0x34dae5(_0x1d3ca3['getAttribute']('src')));}(_0x5b569a['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2cfbd0=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2cfbd0);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x384b44=this['editor']['model']['document']['selection']['getSelectedElement']();_0x384b44&&(_0x384b44['is']('element','imageBlock')||_0x384b44['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x1fb372),_0x384b44),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x46f6ad{['refresh'](){const _0x500bbc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x500bbc&&(_0x500bbc['is']('element','imageBlock')||_0x500bbc['is']('element','imageInline')));}['execute'](_0xc04652){const _0x353909=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4eef2d=>{_0x4eef2d['setAttributes'](_0xc04652,_0x353909),_0x4eef2d['removeAttribute']('srcset',_0x353909),_0x4eef2d['removeAttribute']('sizes',_0x353909);});}}class m extends _0x2cf13a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2a8bc8,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4ea926}=this;_0x4ea926['commands']['add']('uploadcareImageEdit',new Q(_0x4ea926)),_0x4ea926['commands']['add']('uploadcareImageReplace',new V(_0x4ea926));}}class g extends _0x2cf13a{['_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 _0x2f1efe=this['editor'];_0x2f1efe['ui']['componentFactory']['add']('uploadcareImageEdit',_0x56f87e=>{const _0x55ce46=_0x2f1efe['commands']['get']('uploadcareImageEdit'),_0x428554=new _0x54eaf0(_0x56f87e),t=_0x56f87e['t'];return _0x428554['set']({'icon':_0x3da54a,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x428554['bind']('isEnabled')['to'](_0x55ce46),_0x428554['bind']('isOn')['to'](_0x55ce46,'isActive'),this['listenTo'](_0x428554,'execute',()=>{_0x2f1efe['execute']('uploadcareImageEdit'),_0x2f1efe['editing']['view']['focus']();}),_0x428554;}),this['_initConfig']();}['_initConfig'](){const _0x42eeaa=_0x18589a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x42eeaa),this['listenTo'](this['editor'],'destroy',()=>{_0x42eeaa['remove']();});}}class et extends _0x2cf13a{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x17d3c0,Command as _0x371fa4}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x58f4d0,IconGooglePhotos as _0x3ae4a5,IconGoogleDrive as _0x415072,IconFacebook as _0x12e5f7,IconDropbox as _0x37babc,IconUploadcareLink as _0x5705c9,IconUploadcareImageUpload as _0x19dcc4,IconError as _0x23cb5c,IconUploadcareImageEdit as _0x3008bd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x432ee6,MenuBarMenuListItemButtonView as _0x4f07f5,View as _0x2e234f,FocusCycler as _0x105b34,Dialog as _0x2b6820,DialogViewPosition as _0x30357e,SpinnerView as _0x73312c,IconView as _0x148007,Notification as _0x3c3f6e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x67f8b8,DomEmitterMixin as _0x32cbe3,global as _0x4e8a95,getAncestors as _0x4eb747,ObservableMixin as _0x2d13b4,uid as _0x3a08f5,createElement as _0x124f34}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x16af72}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4d40e6,info as _0x3f59a3}from'@uploadcare/upload-client';import*as _0x2b731d from'@uploadcare/file-uploader';var i=function(_0x4f59e2){return _0x4f59e2['Local']='local',_0x4f59e2['URL']='url',_0x4f59e2['Dropbox']='dropbox',_0x4f59e2['GDrive']='gdrive',_0x4f59e2['Facebook']='facebook',_0x4f59e2['GPhotos']='gphotos',_0x4f59e2['OneDrive']='onedrive',_0x4f59e2;}({});function _(_0xf31df2,_0x8e3d15,_0x981d6f){const t=_0xf31df2['t'],_0x17d46a=_0xf31df2['t'];switch(_0x8e3d15){case i['Local']:return{'text':_0x17d46a('Insert'===_0x981d6f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x17d46a('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x981d6f?_0x17d46a('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x17d46a('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x8e3d15;}}class e extends _0x17d3c0{['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 _0x2f4cc9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3dd60b;for(const _0x654daf in _0x2f4cc9){const _0x51b3cf=_0x654daf,_0x3ab7d5=_0x2f4cc9[_0x51b3cf];if('uploadcareLicenseKeyValid'==_0x3ab7d5||'uploadcareLicenseKeyInvalid'==_0x3ab7d5||'uploadcareLicenseKeyExpired'==_0x3ab7d5||'uploadcareLicenseKeyDomainLimit'==_0x3ab7d5||'uploadcareLicenseKeyNotAllowed'==_0x3ab7d5||'uploadcareLicenseKeyEvaluationLimit'==_0x3ab7d5||'uploadcareLicenseKeyTrialLimit'==_0x3ab7d5||'uploadcareLicenseKeyUsageLimit'==_0x3ab7d5){delete _0x2f4cc9[_0x51b3cf],_0x3dd60b=_0x3ab7d5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x22eef3}=this,_0x141fae=_0x22eef3['commands']['get']('uploadcare');if(!_0x141fae)return;const _0x5213bd=this['_normalizeConfigSourceList'](_0x22eef3['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x538599,_0x2976d5)=>{const _0x3db616=this['_getIntegrationKey'](_0x2976d5['type']);return _0x538599[_0x3db616]||(_0x538599[_0x3db616]=[]),_0x538599[_0x3db616]['push'](_0x2976d5),_0x538599;},{});_0x22eef3['plugins']['has']('ImageInsertUI')&&_0x22eef3['commands']['get']('uploadcare')&&Object['entries'](_0x5213bd)['forEach'](([_0x391678,_0x336233])=>{_0x22eef3['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x391678,'observable':()=>_0x141fae,'buttonViewCreator':()=>this['_createToolbarButton'](_0x336233),'formViewCreator':()=>this['_createDropdownButtons'](_0x336233),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x336233),'override':'assetManager'!==_0x391678});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x1f3f7d){const {locale:_0xeb3e42}=this['editor'];return _0x1f3f7d['map'](_0x4f645e=>{const _0x6a8bb=_(_0xeb3e42,_0x4f645e,'Insert');switch(_0x4f645e){case i['Local']:return{'icon':_0x19dcc4,'type':i['Local'],..._0x6a8bb};case i['URL']:return{'icon':_0x5705c9,'type':i['URL'],..._0x6a8bb};case i['Dropbox']:return{'icon':_0x37babc,'type':i['Dropbox'],..._0x6a8bb};case i['Facebook']:return{'icon':_0x12e5f7,'type':i['Facebook'],..._0x6a8bb};case i['GDrive']:return{'icon':_0x415072,'type':i['GDrive'],..._0x6a8bb};case i['GPhotos']:return{'icon':_0x3ae4a5,'type':i['GPhotos'],..._0x6a8bb};case i['OneDrive']:return{'icon':_0x58f4d0,'type':i['OneDrive'],..._0x6a8bb};}});}['_getIntegrationKey'](_0x1a7c58){switch(_0x1a7c58){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x2b2448,_0x47622c){const _0xa90fce=this['editor'],_0x3f576e=new _0x2b2448(_0xa90fce['locale']),_0x26b999=_0xa90fce['commands']['get']('uploadcare');return _0x3f576e['bind']('isEnabled')['to'](_0x26b999),_0x3f576e['on']('execute',()=>{_0x26b999['execute'](_0x47622c);}),_0x3f576e;}['_createToolbarButton'](_0x2e3eba){const {locale:_0x3f8b01}=this['editor'],_0x4f65ea=this['editor']['plugins']['get']('ImageInsertUI'),_0xb9a3f5=_0x2e3eba[0x0],_0x575948=this['_createButton'](_0x432ee6,_0xb9a3f5['type']);return _0x575948['icon']=_0xb9a3f5['icon'],_0x575948['bind']('label')['to'](_0x4f65ea,'isImageSelected',_0x328cc6=>_(_0x3f8b01,_0xb9a3f5['type'],_0x328cc6?'Replace':'Insert')['text']),_0x575948['tooltip']=!0x0,_0x575948;}['_createDropdownButtons'](_0x5aff18){const {locale:_0x12a36f}=this['editor'],_0x412909=this['editor']['plugins']['get']('ImageInsertUI');return _0x5aff18['map'](_0x36decc=>{const _0x53f219=this['_createButton'](_0x432ee6,_0x36decc['type']);return _0x53f219['withText']=!0x0,_0x53f219['icon']=_0x36decc['icon'],_0x53f219['bind']('label')['to'](_0x412909,'isImageSelected',_0x305e68=>_(_0x12a36f,_0x36decc['type'],_0x305e68?'Replace':'Insert')['text']),_0x53f219;});}['_createMenuBarButtons'](_0xd42af1){return _0xd42af1['map'](_0x290c4e=>{const _0x53fea9=this['_createButton'](_0x4f07f5,_0x290c4e['type']);return _0x53fea9['icon']=_0x290c4e['icon'],_0x53fea9['label']=_0x290c4e['shortText'],_0x53fea9;});}}class F extends _0x2e234f{['focusTracker'];['focusCycler'];constructor(_0x2ee711){super(_0x2ee711),this['focusTracker']=new _0x67f8b8(),this['focusCycler']=new _0x105b34({'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 x extends F{constructor(_0x14ab23,_0x53d76d){super(_0x14ab23),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-'+_0x53d76d}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x5b64d9,_0x165d23){const _0x169c43=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x13a8f7=>_0x13a8f7<=_0x165d23)['map'](_0x4e62af=>_0x5b64d9['replace'](/\/$/,'')+'/-/resize/'+_0x4e62af+'x/\x20'+_0x4e62af+'w');return{'imageFallbackUrl':_0x5b64d9,'imageSources':[{'srcset':_0x169c43['join'](',\x20'),'sizes':'(max-width:\x20'+_0x165d23+'px)\x20100vw,\x20'+_0x165d23+'px','type':'image/webp'}]};}function C(_0x270397,_0x5a91d1,_0x16d716){const _0x3a82dd=_0x270397['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3a82dd?parseInt(_0x3a82dd[0x1],0xa):_0x5a91d1,'height':_0x3a82dd?parseInt(_0x3a82dd[0x2],0xa):_0x16d716};}function p(_0xf17688,_0x575618){const _0x514c09=new(_0x32cbe3())(),_0x492191=_0xf17688['plugins']['get']('ImageUtils'),_0x150959=_0xf17688['editing']['mapper']['toViewElement'](_0x575618),_0x59ae3e=_0x492191['findViewImgElement'](_0x150959),_0x4ac577=_0xf17688['editing']['view']['domConverter']['viewToDom'](_0x59ae3e),_0x2610a1=_0x575618['getAttribute']('width'),_0x3348c9=_0x575618['getAttribute']('height'),_0xad0fb8='image-processing';_0xf17688['editing']['view']['change'](_0x5b5c86=>{_0x5b5c86['addClass'](_0xad0fb8,_0x150959),_0x5b5c86['setStyle']('aspect-ratio',_0x2610a1+'/'+_0x3348c9,_0x59ae3e);}),_0x514c09['listenTo'](_0x4ac577,'load',()=>{_0x514c09['stopListening'](_0x4ac577,'load'),_0xf17688['editing']['view']['change'](_0x11825b=>{_0x11825b['removeClass'](_0xad0fb8,_0x150959),_0x11825b['removeStyle']('aspect-ratio',_0x59ae3e);});});}function G(_0x3f659a){if(Array['isArray'](_0x3f659a)){const _0x1efb36=_0x3f659a['map'](G);return _0x48846d=>_0x1efb36['some'](_0x36d12a=>_0x36d12a(_0x48846d));}if('origin'==_0x3f659a){const _0x48e423=_0x4e8a95['window']['location']['origin'];return _0x5dceb5=>new URL(_0x5dceb5,_0x4e8a95['document']['baseURI'])['origin']==_0x48e423;}return'function'==typeof _0x3f659a?_0x3f659a:_0x3f659a instanceof RegExp?_0x8aeb69=>!(!_0x8aeb69['match'](_0x3f659a)&&!_0x8aeb69['replace'](/^https?:\/\//,'')['match'](_0x3f659a)):()=>!0x1;}function S(_0x42303b,_0x471987){return _0x4eb747(_0x42303b['target'])['includes'](_0x471987);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x2d13b4(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x34e472,_0x415e08,_0x44b2af){super(),this['_editor']=_0x34e472,this['_editing']=_0x415e08,this['_dialog']=_0x34e472['plugins']['get'](_0x2b6820),this['_api']=_0x415e08['ctxElement']['getAPI'](),this['_type']=_0x44b2af,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:_0x4ba06c,model:_0x721413}=this['_editor'],_0x43acff=_0x721413['document']['selection']['getSelectedElement'](),_0x2ec1cc=_0x43acff&&(_0x43acff['is']('element','imageBlock')||_0x43acff['is']('element','imageInline'));this['_formView']=new x(_0x4ba06c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x19dcc4,'title':_(_0x4ba06c,this['_type'],_0x2ec1cc?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x30357e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1ce8b9=>!S(_0x1ce8b9,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3c0000}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5a3c85=>{const _0x108935=_0x3c0000['length'];for(const _0x4576f6 of _0x3c0000){const _0x1b72a2=_0x4576f6===_0x3c0000[_0x108935-0x1],{cdnUrl:_0x3fe0d7,fileInfo:_0x41baa2}=_0x4576f6;if(!_0x3fe0d7||!_0x41baa2)continue;const {width:_0x1ec8e3,height:_0x5b675f}=_0x41baa2['imageInfo'],_0xd4a37f=C(_0x3fe0d7,_0x1ec8e3,_0x5b675f),_0x3961ed=k(_0x3fe0d7,_0xd4a37f['width']),_0x29d8e7={'id':_0x41baa2['uuid'],'type':'image','attributes':{'imageDimension':_0xd4a37f,..._0x3961ed}};this['_insertAsset'](_0x29d8e7,_0x1b72a2,_0x5a3c85);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1ffa19=>{'idle'===_0x1ffa19['detail']['status']&&!_0x1ffa19['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x58cbc6,_0x4d26de,_0x24ae90){const _0x1b3b86=this['_editor']['model']['document']['selection'],_0x2ba635=_0x1b3b86['getSelectedElement'](),_0x257d7f=!(!_0x2ba635||!_0x2ba635['is']('element','imageInline'));_0x24ae90['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x58cbc6,_0x257d7f),_0x4d26de||_0x24ae90['setSelection'](_0x1b3b86['getLastPosition']());}['_insertImage'](_0x532bc8,_0x3f6e42){const _0x310a7a=this['_editor'],{imageDimension:_0x259224,imageFallbackUrl:_0x7d99d5,imageSources:_0x3c13fd}=_0x532bc8['attributes'];_0x310a7a['execute']('insertImage',{'imageType':_0x3f6e42?'imageInline':null,'source':{'uploadcareImageId':_0x532bc8['id'],'src':_0x7d99d5,'sources':_0x3c13fd,..._0x259224}});}}class w extends _0x371fa4{['_editing'];['_controller']=null;static get['requires'](){return[_0x2b6820,o];}constructor(_0x442a5d){super(_0x442a5d),this['_editing']=_0x442a5d['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x41c26f){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x41c26f);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1fa9f5,publicKey:_0x362000,signal:_0x50a432,onProgress:_0x49e75f}){return _0x4d40e6(_0x1fa9f5,{'publicKey':_0x362000,'store':'auto','signal':_0x50a432,'onProgress':_0x49e75f});}static['getInfo'](_0x3f2d2d,_0x2ef999){return _0x3f59a3(_0x3f2d2d,_0x2ef999);}}class f extends _0x17d3c0{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x16af72,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x27cc5b=this['editor'];if(!!!_0x27cc5b['config']['get']('uploadcare'))return;_0x27cc5b['plugins']['get'](_0x16af72)['createUploadAdapter']=_0x2c8795=>new A(_0x2c8795,_0x27cc5b),_0x27cc5b['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4412b8,{imageElement:_0x4b6d3e,data:_0x1cc037})=>{_0x27cc5b['model']['change'](_0x411348=>{_0x411348['setAttribute']('uploadcareImageId',_0x1cc037['uploadcareImageId'],_0x4b6d3e);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x5e6f83,_0x587f0b){this['loader']=_0x5e6f83,this['editor']=_0x587f0b,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x182d27=this['editor']['config']['get']('uploadcare.pubkey'),_0x122f38=await this['loader']['file'];return j['upload']({'file':_0x122f38,'publicKey':_0x182d27,'signal':this['controller']['signal'],'onProgress':_0x32bb3c=>{_0x32bb3c&&_0x32bb3c['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x32bb3c['value']);}})['then'](async _0x4e7743=>{const {imageFallbackUrl:_0x51ac87,imageSources:_0x491ae6}=k(_0x4e7743['cdnUrl'],_0x4e7743['imageInfo']['width']);return{'uploadcareImageId':_0x4e7743['uuid'],'default':_0x51ac87,'sources':_0x491ae6};})['catch'](()=>{const _0x1ffc0f=t('Cannot\x20upload\x20file:')+('\x20'+_0x122f38['name']+'.');return Promise['reject'](_0x1ffc0f);});}['abort'](){this['controller']['abort']();}}class o extends _0x17d3c0{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2b6820];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x171fc0){super(_0x171fc0),this['ucContextId']=_0x3a08f5();}['init'](){const _0x1c29b1=this['editor'];_0x1c29b1['commands']['add']('uploadcare',new w(_0x1c29b1));}['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 _0x1b5565=_0x4e8a95['document']['querySelector']('input[uploadcare-file-input]');_0x1b5565&&_0x1b5565['remove']();}),async function(_0x1cdb15){const _0x111cd1=_0x7c2b77([0x71,0x72,0x39,0x70,0x65,0x69,0x66,0x78,0x4d,0x5a,0x6d,0x74,0x68,0x73,0x7a,0x75,0x6f,0x32,0x53,0x59,0x36,0x48,0x76,0x52,0x47,0x4a,0x34,0x63,0x56,0x37,0x6b,0x43,0x45,0x4e,0x4b,0x6a,0x62,0x61,0x35,0x57,0x38,0x4c,0x6c,0x55,0x51,0x44,0x6e,0x64,0x33,0x42,0x77,0x49,0x4f,0x79,0x46,0x54,0x50,0x30,0x31,0x41,0x58,0x67]),_0xca9258=0x44cde989,_0x3d63fb=0x44ca9999^_0xca9258,_0x4436b7=window[_0x7c2b77([0x44,0x61,0x74,0x65])][_0x7c2b77([0x6e,0x6f,0x77])](),_0x3f230d=_0x1cdb15[_0x7c2b77([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x551fd9=new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20ebe7=>{_0x3f230d[_0x7c2b77([0x6f,0x6e,0x63,0x65])](_0x7c2b77([0x72,0x65,0x61,0x64,0x79]),_0x20ebe7);}),_0x1369bf={[_0x7c2b77([0x6b,0x74,0x79])]:_0x7c2b77([0x45,0x43]),[_0x7c2b77([0x75,0x73,0x65])]:_0x7c2b77([0x73,0x69,0x67]),[_0x7c2b77([0x63,0x72,0x76])]:_0x7c2b77([0x50,0x2d,0x32,0x35,0x36]),[_0x7c2b77([0x78])]:_0x7c2b77([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]),[_0x7c2b77([0x79])]:_0x7c2b77([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]),[_0x7c2b77([0x61,0x6c,0x67])]:_0x7c2b77([0x45,0x53,0x32,0x35,0x36])},_0x21adc5=_0x3f230d[_0x7c2b77([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x7c2b77([0x67,0x65,0x74])](_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x57cf0b(){let _0x256742,_0x12cfa5=null,_0x5d23f0=null;try{if(_0x21adc5==_0x7c2b77([0x47,0x50,0x4c]))return _0x7c2b77([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x256742=_0x4a4f79(),!_0x256742)return _0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x256742[_0x7c2b77([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d23f0=_0x26bf40(_0x256742[_0x7c2b77([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x256742[_0x7c2b77([0x6a,0x74,0x69])])),await _0x4bf2df()?_0x13cd6d()?_0x3f54ad()?_0x7c2b77([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x215760()?(_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7c2b77([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x12cfa5=_0x16a3a3(_0x7c2b77([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7c2b77([0x74,0x72,0x69,0x61,0x6c])&&(_0x12cfa5=_0x16a3a3(_0x7c2b77([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x353811()):_0x7c2b77([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x7c2b77([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f54ad(){const _0x1fd9d1=[_0x7c2b77([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x7c2b77([0x74,0x72,0x69,0x61,0x6c])][_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4436b7/0x3e8:0xe10*_0x3d63fb;return _0x256742[_0x7c2b77([0x65,0x78,0x70])]<_0x1fd9d1;}function _0x13cd6d(){const _0x36662b=_0x256742[_0x7c2b77([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x36662b&&(!!_0x36662b[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x2a]))||!!_0x36662b[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x55,0x50,0x4c,0x43])));}function _0x215760(){const _0x3d9026=_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3d9026||0x0==_0x3d9026[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x135a61}=new URL(window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3d9026[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x135a61))return!0x0;const _0x394f8b=_0x135a61[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e]));return _0x3d9026[_0x7c2b77([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x120f92=>_0x120f92[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x2a])))[_0x7c2b77([0x6d,0x61,0x70])](_0x2f0ce9=>_0x2f0ce9[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e])))[_0x7c2b77([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4fbc4c=>_0x4fbc4c[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x394f8b[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7c2b77([0x6d,0x61,0x70])](_0x3f5787=>Array(_0x394f8b[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f5787[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7c2b77([0x66,0x69,0x6c,0x6c])](_0x3f5787[0x0]===_0x7c2b77([0x2a])?_0x7c2b77([0x2a]):'')[_0x7c2b77([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f5787))[_0x7c2b77([0x73,0x6f,0x6d,0x65])](_0xabd416=>_0x394f8b[_0x7c2b77([0x65,0x76,0x65,0x72,0x79])]((_0x150c09,_0x40d476)=>_0xabd416[_0x40d476]===_0x150c09||_0xabd416[_0x40d476]===_0x7c2b77([0x2a])));}function _0x353811(){return _0x12cfa5&&_0x5d23f0?new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdf0481,_0x5513d1)=>{_0x12cfa5[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0xdf0481,_0x5513d1),_0x5d23f0[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x43e2cf=>{_0x43e2cf!=_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])&&_0xdf0481(_0x43e2cf);},_0x5513d1);}):_0x12cfa5||_0x5d23f0||_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]);}}function _0x26bf40(_0x29353d,_0x24f5c5){return new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34136a=>{if(_0x2cfc02())return _0x34136a(_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]));_0x4dc107(),_0x3f230d[_0x7c2b77([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x228386=!0x1;const _0xc2f7de=_0x3a08f5();function _0x335e7a(_0x4172b3){return!!_0x4172b3&&(typeof _0x4172b3===_0x7c2b77([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4172b3===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4172b3[_0x7c2b77([0x74,0x68,0x65,0x6e])]===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4172b3[_0x7c2b77([0x63,0x61,0x74,0x63,0x68])]===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf7d90a(_0x1a8290){_0x34dcab(_0x1a8290)[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x474edd=>{if(!_0x474edd||_0x474edd[_0x7c2b77([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x7c2b77([0x6f,0x6b]))return _0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x47cbdc(_0x27100b(_0xc2f7de+_0x24f5c5))!=_0x474edd[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]);})[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x2324bf=>(_0xc5a3b(),_0x2324bf),()=>{const _0x43f43e=_0x20abaa();return null==_0x43f43e?(_0xc5a3b(),_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])):_0x7c2b77(_0x4436b7-_0x43f43e>(0x60c16d89^_0xca9258)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x34136a)[_0x7c2b77([0x63,0x61,0x74,0x63,0x68])](()=>{_0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2c10d8=0x44fb0709^_0xca9258;function _0xc5a3b(){const _0x389b4c=_0x7c2b77([0x6c,0x6c,0x63,0x74,0x2d])+_0x47cbdc(_0x27100b(_0x29353d)),_0xa42bd3=_0x588b52(_0x47cbdc(window[_0x7c2b77([0x4d,0x61,0x74,0x68])][_0x7c2b77([0x63,0x65,0x69,0x6c])](_0x4436b7/_0x2c10d8)));window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7c2b77([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x389b4c,_0xa42bd3);}function _0x20abaa(){const _0x3679c6=_0x7c2b77([0x6c,0x6c,0x63,0x74,0x2d])+_0x47cbdc(_0x27100b(_0x29353d)),_0x1a49c8=window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7c2b77([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3679c6);return _0x1a49c8?window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x588b52(_0x1a49c8),0x10)*_0x2c10d8:null;}function _0x34dcab(_0x226a85){return new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x429cf1,_0x342dc4)=>{_0x226a85[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x429cf1,_0x342dc4),window[_0x7c2b77([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x342dc4,0x44cc3d49^_0xca9258);});}}_0x3f230d[_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4283a3,_0x4fe62f)=>{if(_0x4fe62f[0x0]!=_0x29353d)return _0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4fe62f[0x1]={..._0x4fe62f[0x1],[_0x7c2b77([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc2f7de};},{[_0x7c2b77([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7c2b77([0x68,0x69,0x67,0x68])}),_0x3f230d[_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17563a=>{_0x335e7a(_0x17563a[_0x7c2b77([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x228386=!0x0,_0xf7d90a(_0x17563a[_0x7c2b77([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x7c2b77([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7c2b77([0x6c,0x6f,0x77])}),_0x551fd9[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>{_0x228386||_0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cfc02(){return _0x3f230d[_0x7c2b77([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7c2b77([0x76,0x69,0x65,0x77])][_0x7c2b77([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x7c2b77([0x61,0x75,0x74,0x6f]);}function _0x4dc107(){_0x3f230d[_0x7c2b77([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7c2b77([0x76,0x69,0x65,0x77])][_0x7c2b77([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7c2b77([0x61,0x75,0x74,0x6f]);}}function _0x16a3a3(_0x200ceb){const _0x446665=[new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b85d1=>setTimeout(_0x2b85d1,0x44c4d745^_0xca9258)),_0x551fd9[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8fc43e=>{let _0x5a846b=0x0;_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x48b159,_0x6325e0)=>{_0x6325e0[0x0][_0x7c2b77([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a846b++,_0x5a846b==(0x44cde871^_0xca9258)&&(_0x8fc43e(),_0x48b159[_0x7c2b77([0x6f,0x66,0x66])]());});}))];return window[_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7c2b77([0x72,0x61,0x63,0x65])](_0x446665)[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>_0x200ceb);}async function _0x480edf(){await _0x551fd9,_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2fde6a,_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2fde6a,_0x3f230d[_0x7c2b77([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19c080(_0x48ea01){const _0x3f21ea=_0x3f5532();_0x3f230d[_0x3f21ea]=_0x7c2b77([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48ea01,_0x48ea01!=_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])&&_0x480edf();}function _0x3f5532(){const _0x920f09=window[_0x7c2b77([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x7c2b77([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x7c2b77([0x6e,0x6f,0x77])]())[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x7c2b77([0x2e]),'');let _0x6b611a=_0x7c2b77([0x71]);for(let _0x218321=0x0;_0x218321<_0x920f09[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x218321+=0x2){let _0x467827=window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x920f09[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x218321,_0x218321+0x2));_0x467827>=_0x111cd1[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x467827-=_0x111cd1[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x6b611a+=_0x111cd1[_0x467827];}return _0x6b611a;}function _0x4a4f79(){const _0x18c8ef=_0x21adc5[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e]));if(0x3!=_0x18c8ef[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2b150f(_0x18c8ef[0x1]);function _0x2b150f(_0x3a9e76){const _0xe07714=_0x5bda45(_0x3a9e76);return _0xe07714&&_0x29ff78()?_0xe07714:null;function _0x29ff78(){const _0x1ff38f=_0xe07714[_0x7c2b77([0x6a,0x74,0x69])],_0xb4a8e6=window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ff38f[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ff38f[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x40522b={..._0xe07714,[_0x7c2b77([0x6a,0x74,0x69])]:_0x1ff38f[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ff38f[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x40522b[_0x7c2b77([0x76,0x63])],_0x27100b(_0x40522b)==_0xb4a8e6;}}}async function _0x4bf2df(){let _0x5b8a40=!0x0;try{const _0x1f1f09=_0x21adc5[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e])),[_0x45107e,_0x51c6f4,_0x3c3841]=_0x1f1f09;return _0x3008a3(_0x45107e),await _0x1c3164(_0x45107e,_0x51c6f4,_0x3c3841),_0x5b8a40;}catch{return!0x1;}function _0x3008a3(_0x381719){const _0x1c7a90=_0x5bda45(_0x381719);_0x1c7a90&&_0x1c7a90[_0x7c2b77([0x61,0x6c,0x67])]==_0x7c2b77([0x45,0x53,0x32,0x35,0x36])||(_0x5b8a40=!0x1);}async function _0x1c3164(_0x41c4f9,_0x237e78,_0x2f4488){const _0x33d80d=window[_0x7c2b77([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x7c2b77([0x66,0x72,0x6f,0x6d])](_0x5156ef(_0x2f4488),_0x305a68=>_0x305a68[_0x7c2b77([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x384593=new window[(_0x7c2b77([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x7c2b77([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x41c4f9+_0x7c2b77([0x2e])+_0x237e78),_0x5232c3=window[_0x7c2b77([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x7c2b77([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5232c3)return;const _0x5e6aca=await _0x5232c3[_0x7c2b77([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x7c2b77([0x6a,0x77,0x6b]),_0x1369bf,{[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x45,0x43,0x44,0x53,0x41]),[_0x7c2b77([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x7c2b77([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5232c3[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x45,0x43,0x44,0x53,0x41]),[_0x7c2b77([0x68,0x61,0x73,0x68])]:{[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5e6aca,_0x33d80d,_0x384593)||(_0x5b8a40=!0x1);}}function _0x5bda45(_0x419725){return _0x419725[_0x7c2b77([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x7c2b77([0x65,0x79]))?JSON[_0x7c2b77([0x70,0x61,0x72,0x73,0x65])](_0x5156ef(_0x419725)):null;}function _0x5156ef(_0x9fce7e){return window[_0x7c2b77([0x61,0x74,0x6f,0x62])](_0x9fce7e[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x7c2b77([0x2b]))[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x7c2b77([0x2f])));}function _0x27100b(_0x2d4e2f){let _0x168e64=0x1505;function _0x55e179(_0x51ec2d){for(let _0xe255fe=0x0;_0xe255fe<_0x51ec2d[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe255fe++){const _0x9508ed=_0x51ec2d[_0x7c2b77([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xe255fe);_0x168e64=(_0x168e64<<0x5)+_0x168e64+_0x9508ed,_0x168e64&=_0x168e64;}}function _0x65da14(_0xefeb4f){Array[_0x7c2b77([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xefeb4f)?_0xefeb4f[_0x7c2b77([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x65da14):_0xefeb4f&&typeof _0xefeb4f==_0x7c2b77([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x7c2b77([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xefeb4f)[_0x7c2b77([0x73,0x6f,0x72,0x74])]()[_0x7c2b77([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3ec7e8,_0x3bd89e])=>{_0x55e179(_0x3ec7e8),_0x65da14(_0x3bd89e);}):_0x55e179(window[_0x7c2b77([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xefeb4f));}return _0x65da14(_0x2d4e2f),_0x168e64>>>0x0;}function _0x47cbdc(_0x1852a2){return _0x1852a2[_0x7c2b77([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x7c2b77([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x7c2b77([0x30]));}function _0x588b52(_0x1bc2d6){return _0x1bc2d6[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])]('')[_0x7c2b77([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x7c2b77([0x6a,0x6f,0x69,0x6e])]('');}function _0x2fde6a(){}function _0x7c2b77(_0x313814){return _0x313814['map'](_0x22402a=>String['fromCharCode'](_0x22402a))['join']('');}_0x19c080(await _0x57cf0b());}(this);}['_initSchema'](){const _0x4368a4=this['editor']['model']['schema'];_0x4368a4['isRegistered']('imageBlock')&&_0x4368a4['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4368a4['isRegistered']('imageInline')&&_0x4368a4['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x75635=this['editor'];_0x75635['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x75635['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1a7196=>_0x1a7196['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3ba503=_0x75635['commands']['get']('replaceImageSource');_0x3ba503&&this['listenTo'](_0x3ba503,'cleanupImage',(_0x24fbff,[_0x10c37e,_0x522d9f])=>{_0x10c37e['removeAttribute']('uploadcareImageId',_0x522d9f);});}['_initConfig'](){const _0x2be50a=this['editor']['config']['get']('uploadcare.uploader')||{},_0x23794c=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x124f34(_0x4e8a95['document'],'uc-config',{..._0x2be50a,'pubkey':_0x23794c,'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']=_0x1ae262=>{if('closeMax'==_0x1ae262)return'#uc-icon-arrow-down';},_0x4e8a95['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x124f34(_0x4e8a95['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4e8a95['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x22aec9=this['editor']['commands']['get']('insertImage');_0x22aec9&&this['listenTo'](_0x22aec9,'execute',()=>{const _0x1b4335=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1b4335&&_0x1b4335['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1b4335);});});const _0xd5c1cd=this['editor']['commands']['get']('uploadcareImageReplace');_0xd5c1cd&&this['listenTo'](_0xd5c1cd,'execute',()=>{const _0x5dbc8b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5dbc8b&&_0x5dbc8b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5dbc8b);});});}}class tt extends _0x17d3c0{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x323a2b){super(_0x323a2b),_0x323a2b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2b731d['defineComponents'](_0x2b731d);}}class ii extends _0x2e234f{constructor(_0xa68773){super(_0xa68773);const t=_0xa68773['t'],_0x2afa8d=this['bindTemplate'],_0x28c24d=new _0x73312c();_0x28c24d['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':[_0x28c24d,{'text':_0x2afa8d['to']('imageUploadProgress',_0x1c867a=>t('Loading\x20image...')+'\x20('+(_0x1c867a||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 ti extends _0x2e234f{constructor(_0x5e3c38){super(_0x5e3c38);const t=_0x5e3c38['t'];this['set']('errorType',null);const _0x25e5e6=new _0x432ee6(_0x5e3c38);_0x25e5e6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25e5e6['withText']=!0x0,_0x25e5e6['class']='ck-button-action',_0x25e5e6['on']('execute',()=>{this['fire']('retry');}),_0x25e5e6['bind']('isVisible')['to'](this,'errorType',_0x3d0561=>'NotFound'!==_0x3d0561);const _0xba149b=new _0x148007();_0xba149b['content']=_0x23cb5c,_0xba149b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x26e7be=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':[_0xba149b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x26e7be['to']('errorType',_0x2c2645=>t('NotFound'!==_0x2c2645?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25e5e6]},{'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 ei extends _0x2e234f{constructor(_0x6ac5c2,_0x7529ff){super(_0x6ac5c2);const _0x340ffb=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x7529ff,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x340ffb['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4dbb7c,_0x570bac,_0x587906){super(_0x4dbb7c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4dbb7c),this['_errorView']=new ti(_0x4dbb7c),this['_editingView']=new ei(_0x4dbb7c,_0x587906),this['_focusableView']=new _0x2e234f(_0x4dbb7c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x570bac),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'],_0x544679=>{this['_addUploadcareImageEditorListeners'](_0x544679);});}),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'](_0x146657,_0x547f75){const _0x39dbce='uc-cloud-image-editor',_0x5ca6a9=_0x146657['querySelector'](_0x39dbce);if(_0x5ca6a9)return _0x547f75(_0x5ca6a9);const _0x4502c6=new MutationObserver(_0x181d96=>{const _0x38ae43=_0x181d96['filter'](_0x2e6be6=>_0x2e6be6['target']===_0x146657&&_0x2e6be6['addedNodes']['length']>0x0&&_0x2e6be6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x39dbce);_0x38ae43['length']&&(_0x4502c6['disconnect'](),_0x547f75(_0x38ae43[0x0]['addedNodes'][0x0]));});_0x4502c6['observe'](_0x146657,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x100d83){_0x100d83['addEventListener']('apply',_0x264faa=>{this['fire']('apply',{'imageSrc':_0x264faa['detail']['cdnUrl']});}),_0x100d83['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x2d13b4(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2bd891,_0x3075b0,_0x33514f){super(),this['_editor']=_0x2bd891,this['_dialog']=_0x3075b0,this['_imageElement']=_0x33514f,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 _0x58a7ee=this['_imageElement'],_0x2b2963=_0x58a7ee['getAttribute']('uploadcareImageId'),_0xca453c=_0x58a7ee['getAttribute']('src');if(_0x2b2963)await this['_loadImageInfo'](_0x2b2963,_0xca453c);else{if(this['_imageCache']['has'](_0xca453c)){const _0xc54e7c=this['_imageCache']['get'](_0xca453c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc54e7c['url'],this['imageDimension']=_0xc54e7c['dimension'],this['imageId']=_0xc54e7c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5cbe13}=this['_editor'],t=_0x5cbe13['t'],_0x5d9d5a=new X(_0x5cbe13,this['imageStatus'],this['_attributes']);_0x5d9d5a['bind']('status')['to'](this,'imageStatus'),_0x5d9d5a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5d9d5a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5d9d5a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5d9d5a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3008bd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5d9d5a,'position':_0x30357e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5d9d5a['focus']();},'onHide':()=>{_0x5d9d5a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x30679d=>!S(_0x30679d,_0x5d9d5a['element'])}});}['_loadImageInfo'](_0x3bf5ed,_0x101a0d){return j['getInfo'](_0x3bf5ed,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2f0555=>{const {width:_0x2bda34,height:_0x4d342b}=_0x2f0555['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x101a0d,this['imageDimension']={'width':_0x2bda34,'height':_0x4d342b},this['imageId']=_0x3bf5ed;})['catch'](_0x38881c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38881c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x360160,_0x360ae0){return this['_getImageAsFile'](_0x360160)['then'](_0x2a416b=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x360ae0['signal'],'file':_0x2a416b,'onProgress':_0x3ea1e8=>{_0x3ea1e8&&_0x3ea1e8['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3ea1e8['value']));}}))['then'](_0x3909ef=>{const {width:_0x4ae923,height:_0x47375d}=_0x3909ef['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3909ef['cdnUrl'],this['imageDimension']={'width':_0x4ae923,'height':_0x47375d},this['imageId']=_0x3909ef['uuid'],this['imageUploadProgress']=null;const _0x1abd61=_0x360160['getAttribute']('src');this['_imageCache']['set'](_0x1abd61,{'id':_0x3909ef['uuid'],'url':_0x3909ef['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5538d6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5538d6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3d6da1,_0x4f7c48){_0x3d6da1['on']('apply',(_0x40a00d,_0x612c72)=>{this['_replaceImage'](_0x4f7c48,_0x612c72['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3d6da1['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3d6da1['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5997a0,_0x4e4e72,_0x2d8fb1){const _0x566212=this['_editor'],{width:_0x2614ae,height:_0x17f6cb}=C(_0x4e4e72,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1b87c9,imageSources:_0x3d17c6}=k(_0x4e4e72,_0x2614ae);_0x566212['model']['change'](_0x7ec699=>{if('$graveyard'===_0x5997a0['root']['rootName']){_0x566212['execute']('insertImage',{'imageType':_0x5997a0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5997a0['getAttributes']()),'uploadcareImageId':_0x2d8fb1,'src':_0x1b87c9,'sources':_0x3d17c6,'width':_0x2614ae,'height':_0x17f6cb}});const _0x5ec671=_0x5997a0['getChildren']();_0x5997a0=_0x566212['model']['document']['selection']['getSelectedElement']();for(const _0x1d5a2b of _0x5ec671)_0x7ec699['append'](_0x7ec699['cloneElement'](_0x1d5a2b),_0x5997a0);}else _0x7ec699['setSelection'](_0x5997a0,'on'),_0x566212['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5997a0['getAttributes']()),'uploadcareImageId':_0x2d8fb1,'src':_0x1b87c9,'sources':_0x3d17c6,'width':_0x2614ae,'height':_0x17f6cb},_0x5997a0);_0x7ec699['setSelection'](_0x5997a0,'on');});}async['_getImageAsFile'](_0x3ff7cd){const _0x44e55e=_0x4e8a95['window'],_0x28caef=_0x4e8a95['document']['location']['href'],_0x1218e8=new _0x44e55e['URL'](_0x3ff7cd['getAttribute']('src'),_0x28caef);if('data:'===_0x1218e8['protocol']){const _0x2bb932=_0x1218e8['href']['split'](','),_0xa0fd4d=_0x2bb932[0x0]['match'](/:(.*?);/)[0x1],_0x231f32=_0xa0fd4d['split']('/')[0x1],_0x48ed43=_0x44e55e['atob'](_0x2bb932[_0x2bb932['length']-0x1]);let _0x26a689=_0x48ed43['length'];const _0x8d1e3f=new _0x44e55e['Uint8Array'](_0x26a689);for(;_0x26a689--;)_0x8d1e3f[_0x26a689]=_0x48ed43['charCodeAt'](_0x26a689);return new _0x44e55e['File']([_0x8d1e3f],'image.'+_0x231f32,{'type':_0xa0fd4d});}const _0x6d8c37=_0x1218e8['href']['split']('/'),_0x27cc14=_0x6d8c37[_0x6d8c37['length']-0x1],_0x557b1d=_0x27cc14['split']('.')[0x1];return _0x44e55e['fetch'](_0x1218e8['href'])['then'](_0x3fd0b8=>_0x3fd0b8['clone']()['blob']())['then'](_0x7796a=>new _0x44e55e['File']([_0x7796a],_0x27cc14,{'type':'image/'+_0x557b1d}));}}class O extends _0x371fa4{['imageEditController'];static get['requires'](){return[_0x2b6820];}['_isEditable'];constructor(_0x4e11d1){super(_0x4e11d1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xdacc1a){const _0x809b67=G(_0xdacc1a);return _0x42323f=>!(!_0x42323f||!_0x42323f['is']('element','imageBlock')&&!_0x42323f['is']('element','imageInline'))&&(!!_0x42323f['hasAttribute']('uploadcareImageId')||!!_0x42323f['hasAttribute']('src')&&_0x809b67(_0x42323f['getAttribute']('src')));}(_0x4e11d1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2f0dea=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2f0dea);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2c067f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2c067f&&(_0x2c067f['is']('element','imageBlock')||_0x2c067f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x2b6820),_0x2c067f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x371fa4{['refresh'](){const _0x12d48a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x12d48a&&(_0x12d48a['is']('element','imageBlock')||_0x12d48a['is']('element','imageInline')));}['execute'](_0x27a175){const _0x1fa581=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1f3ec6=>{_0x1f3ec6['setAttributes'](_0x27a175,_0x1fa581),_0x1f3ec6['removeAttribute']('srcset',_0x1fa581),_0x1f3ec6['removeAttribute']('sizes',_0x1fa581);});}}class m extends _0x17d3c0{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x3c3f6e,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x271167}=this;_0x271167['commands']['add']('uploadcareImageEdit',new O(_0x271167)),_0x271167['commands']['add']('uploadcareImageReplace',new R(_0x271167));}}class g extends _0x17d3c0{['_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 _0xf3488b=this['editor'];_0xf3488b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x12b641=>{const _0x5bc828=_0xf3488b['commands']['get']('uploadcareImageEdit'),_0x11136c=new _0x432ee6(_0x12b641),t=_0x12b641['t'];return _0x11136c['set']({'icon':_0x3008bd,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x11136c['bind']('isEnabled')['to'](_0x5bc828),_0x11136c['bind']('isOn')['to'](_0x5bc828,'isActive'),this['listenTo'](_0x11136c,'execute',()=>{_0xf3488b['execute']('uploadcareImageEdit'),_0xf3488b['editing']['view']['focus']();}),_0x11136c;}),this['_initConfig']();}['_initConfig'](){const _0x1db862=_0x124f34(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1db862),this['listenTo'](this['editor'],'destroy',()=>{_0x1db862['remove']();});}}class et extends _0x17d3c0{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "46.0.1-alpha.12",
3
+ "version": "46.0.1-alpha.13",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "46.0.1-alpha.12",
27
- "@ckeditor/ckeditor5-icons": "46.0.1-alpha.12",
28
- "@ckeditor/ckeditor5-image": "46.0.1-alpha.12",
29
- "@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.12",
30
- "@ckeditor/ckeditor5-ui": "46.0.1-alpha.12",
31
- "@ckeditor/ckeditor5-upload": "46.0.1-alpha.12",
32
- "@ckeditor/ckeditor5-utils": "46.0.1-alpha.12",
33
- "ckeditor5": "46.0.1-alpha.12",
26
+ "@ckeditor/ckeditor5-core": "46.0.1-alpha.13",
27
+ "@ckeditor/ckeditor5-icons": "46.0.1-alpha.13",
28
+ "@ckeditor/ckeditor5-image": "46.0.1-alpha.13",
29
+ "@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.13",
30
+ "@ckeditor/ckeditor5-ui": "46.0.1-alpha.13",
31
+ "@ckeditor/ckeditor5-upload": "46.0.1-alpha.13",
32
+ "@ckeditor/ckeditor5-utils": "46.0.1-alpha.13",
33
+ "ckeditor5": "46.0.1-alpha.13",
34
34
  "@uploadcare/file-uploader": "1.17.1",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x30fc21=_0x543e;(function(_0x48fc69,_0x3a98d1){const _0x21a50f=_0x543e,_0x528bc7=_0x48fc69();while(!![]){try{const _0x54e312=-parseInt(_0x21a50f(0x174))/0x1+-parseInt(_0x21a50f(0x18c))/0x2+parseInt(_0x21a50f(0x194))/0x3*(parseInt(_0x21a50f(0x1b3))/0x4)+-parseInt(_0x21a50f(0x192))/0x5+-parseInt(_0x21a50f(0x19e))/0x6*(-parseInt(_0x21a50f(0x18a))/0x7)+parseInt(_0x21a50f(0x16c))/0x8+parseInt(_0x21a50f(0x1b2))/0x9;if(_0x54e312===_0x3a98d1)break;else _0x528bc7['push'](_0x528bc7['shift']());}catch(_0x539899){_0x528bc7['push'](_0x528bc7['shift']());}}}(_0x3b95,0xa6564));function _0x543e(_0x3eeb89,_0x3a8b19){const _0x3b950a=_0x3b95();return _0x543e=function(_0x543e7a,_0xd4961){_0x543e7a=_0x543e7a-0x16b;let _0x1f5386=_0x3b950a[_0x543e7a];return _0x1f5386;},_0x543e(_0x3eeb89,_0x3a8b19);}import{Plugin as _0x270e92}from'ckeditor5/src/core.js';import{Dialog as _0x1caf48}from'ckeditor5/src/ui.js';import{createElement as _0x3c9af7,global as _0x57462c,uid as _0x2bef6e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x37846e}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x28338c}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xeab640}from'./utils/editingutils.js';function _0x3b95(){const _0x4315d5=['_initConfig','uploadcare.uploader','2405165usNPIP','_initConversion','3wsudoB','join','true','_initCtx','UploadcareEditing','editor','view','removeAttribute','body','data-uc-image-id','145542iGsBJP','editing','uploadcareImageId','add','imageInline','isOfficialPlugin','attributeToAttribute','_ctxElement','_configElement','imageBlock','isPremiumPlugin','contentLanguage','locale','config','closeMax','insertImage','selection','upcast','for','document','770454dyRWYE','5062048VIxvCa','map','render','querySelector','configElement','conversion','requires','once','execute','fromCharCode','afterInit','isRegistered','\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','1150736HQVWqv','cleanupImage','PictureEditing','ctxElement','uploadcareImageReplace','listenTo','_initSchema','elementToAttribute','51709OJTDFV','pluginName','init','appendChild','_initImageProcessingIndicator','remove','commands','get','input[uploadcare-file-input]','downcast','destroy','ucContextId','iconHrefResolver','href','model','uc-config','schema','uploader-','extend','replaceImageSource','#uc-icon-arrow-down','getAttribute','28coFBMb','uc-upload-ctx-provider','755860osIwCK','getSelectedElement','uploadcare','uploadcare.pubkey'];_0x3b95=function(){return _0x4315d5;};return _0x3b95();}export class UploadcareEditing extends _0x270e92{[_0x30fc21(0x1a6)]=null;[_0x30fc21(0x1a5)]=null;static get[_0x30fc21(0x175)](){const _0x1337e6=_0x30fc21;return _0x1337e6(0x198);}static get[_0x30fc21(0x1b9)](){const _0x535951=_0x30fc21;return[_0x535951(0x16e),_0x28338c,_0x1caf48];}static get[_0x30fc21(0x1a3)](){return!0x0;}static get[_0x30fc21(0x1a8)](){return!0x0;}[_0x30fc21(0x17f)];get[_0x30fc21(0x1b7)](){const _0x8fbf08=_0x30fc21;return this[_0x8fbf08(0x1a6)];}get[_0x30fc21(0x16f)](){const _0x3b73eb=_0x30fc21;return this[_0x3b73eb(0x1a5)];}constructor(_0x4f91b2){const _0x2ebb58=_0x30fc21;super(_0x4f91b2),this[_0x2ebb58(0x17f)]=_0x2bef6e();}[_0x30fc21(0x176)](){const _0x1f50bb=_0x30fc21,_0x1f1007=this[_0x1f50bb(0x199)];_0x1f1007[_0x1f50bb(0x17a)][_0x1f50bb(0x1a1)](_0x1f50bb(0x18e),new _0x37846e(_0x1f1007));}[_0x30fc21(0x1bd)](){const _0x16b7c7=_0x30fc21;this[_0x16b7c7(0x172)](),this[_0x16b7c7(0x193)](),this[_0x16b7c7(0x190)](),this[_0x16b7c7(0x197)](),this[_0x16b7c7(0x178)](),this[_0x16b7c7(0x171)](this[_0x16b7c7(0x199)],_0x16b7c7(0x17e),()=>{const _0x1c6dee=_0x16b7c7;this[_0x1c6dee(0x1a6)]&&(this[_0x1c6dee(0x1a6)][_0x1c6dee(0x179)](),this[_0x1c6dee(0x1a6)]=null),this[_0x1c6dee(0x1a5)]&&(this[_0x1c6dee(0x1a5)][_0x1c6dee(0x179)](),this[_0x1c6dee(0x1a5)]=null);const _0x54a348=_0x57462c[_0x1c6dee(0x1b1)][_0x1c6dee(0x1b6)](_0x1c6dee(0x17c));_0x54a348&&_0x54a348[_0x1c6dee(0x179)]();}),async function(_0x37a488){const _0x235d7f=_0x1aaefc([0x45,0x43,0x34,0x55,0x69,0x35,0x4c,0x71,0x65,0x6f,0x41,0x33,0x36,0x74,0x68,0x67,0x53,0x44,0x75,0x79,0x4b,0x32,0x6c,0x5a,0x66,0x78,0x52,0x6a,0x7a,0x49,0x58,0x56,0x47,0x42,0x6e,0x54,0x46,0x59,0x39,0x30,0x38,0x62,0x4a,0x4d,0x76,0x73,0x57,0x6b,0x70,0x72,0x77,0x4f,0x50,0x48,0x31,0x64,0x6d,0x63,0x61,0x37,0x4e,0x51]),_0x40f94f=0x9ff086f,_0x31c540=0x9f86797^_0x40f94f,_0xe206d9=window[_0x1aaefc([0x44,0x61,0x74,0x65])][_0x1aaefc([0x6e,0x6f,0x77])](),_0x9ada83=_0x37a488[_0x1aaefc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x396af9=new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ff2af=>{_0x9ada83[_0x1aaefc([0x6f,0x6e,0x63,0x65])](_0x1aaefc([0x72,0x65,0x61,0x64,0x79]),_0x1ff2af);}),_0x339f51={[_0x1aaefc([0x6b,0x74,0x79])]:_0x1aaefc([0x45,0x43]),[_0x1aaefc([0x75,0x73,0x65])]:_0x1aaefc([0x73,0x69,0x67]),[_0x1aaefc([0x63,0x72,0x76])]:_0x1aaefc([0x50,0x2d,0x32,0x35,0x36]),[_0x1aaefc([0x78])]:_0x1aaefc([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]),[_0x1aaefc([0x79])]:_0x1aaefc([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]),[_0x1aaefc([0x61,0x6c,0x67])]:_0x1aaefc([0x45,0x53,0x32,0x35,0x36])},_0x580cef=_0x9ada83[_0x1aaefc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1aaefc([0x67,0x65,0x74])](_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x31f8f4(){let _0x55c7bd,_0x33a6fb=null,_0x3b06c9=null;try{if(_0x580cef==_0x1aaefc([0x47,0x50,0x4c]))return _0x1aaefc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x55c7bd=_0x2e7a16(),!_0x55c7bd)return _0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x55c7bd[_0x1aaefc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3b06c9=_0x1b428a(_0x55c7bd[_0x1aaefc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x55c7bd[_0x1aaefc([0x6a,0x74,0x69])])),await _0x2c8a21()?_0x3c5b29()?_0x2fa1f2()?_0x1aaefc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5a0bae()?(_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1aaefc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x33a6fb=_0x5404f9(_0x1aaefc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1aaefc([0x74,0x72,0x69,0x61,0x6c])&&(_0x33a6fb=_0x5404f9(_0x1aaefc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f7a5b()):_0x1aaefc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1aaefc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2fa1f2(){const _0xc5762f=[_0x1aaefc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1aaefc([0x74,0x72,0x69,0x61,0x6c])][_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe206d9/0x3e8:0xe10*_0x31c540;return _0x55c7bd[_0x1aaefc([0x65,0x78,0x70])]<_0xc5762f;}function _0x3c5b29(){const _0x4fb4e7=_0x55c7bd[_0x1aaefc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4fb4e7&&(!!_0x4fb4e7[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x2a]))||!!_0x4fb4e7[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x55,0x50,0x4c,0x43])));}function _0x5a0bae(){const _0x3d7d59=_0x543e,_0x563327=_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x563327||0x0==_0x563327[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x596da4}=new URL(window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x3d7d59(0x181)]);if(_0x563327[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x596da4))return!0x0;const _0x5b11d9=_0x596da4[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e]));return _0x563327[_0x1aaefc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32ff=>_0x32ff[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x2a])))[_0x1aaefc([0x6d,0x61,0x70])](_0x389e8e=>_0x389e8e[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e])))[_0x1aaefc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e41bd=>_0x5e41bd[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b11d9[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1aaefc([0x6d,0x61,0x70])](_0x542ad2=>Array(_0x5b11d9[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x542ad2[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1aaefc([0x66,0x69,0x6c,0x6c])](_0x542ad2[0x0]===_0x1aaefc([0x2a])?_0x1aaefc([0x2a]):'')[_0x1aaefc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x542ad2))[_0x1aaefc([0x73,0x6f,0x6d,0x65])](_0x21a6b3=>_0x5b11d9[_0x1aaefc([0x65,0x76,0x65,0x72,0x79])]((_0x2e1e49,_0x4ffc7e)=>_0x21a6b3[_0x4ffc7e]===_0x2e1e49||_0x21a6b3[_0x4ffc7e]===_0x1aaefc([0x2a])));}function _0x1f7a5b(){return _0x33a6fb&&_0x3b06c9?new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x94681e,_0xadcbe3)=>{_0x33a6fb[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x94681e,_0xadcbe3),_0x3b06c9[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x240f90=>{_0x240f90!=_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])&&_0x94681e(_0x240f90);},_0xadcbe3);}):_0x33a6fb||_0x3b06c9||_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1b428a(_0x3ec9a6,_0x32c10d){return new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27bed0=>{if(_0x3fa9fd())return _0x27bed0(_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]));_0x4dbd2c(),_0x9ada83[_0x1aaefc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3bbd7d=!0x1;const _0x32c226=_0x2bef6e();function _0x26de21(_0x227c37){return!!_0x227c37&&(typeof _0x227c37===_0x1aaefc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x227c37===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x227c37[_0x1aaefc([0x74,0x68,0x65,0x6e])]===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x227c37[_0x1aaefc([0x63,0x61,0x74,0x63,0x68])]===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1df05b(_0x544ea6){_0x25f5d4(_0x544ea6)[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x22f4e7=>{if(!_0x22f4e7||_0x22f4e7[_0x1aaefc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1aaefc([0x6f,0x6b]))return _0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x130d26(_0x53f649(_0x32c226+_0x32c10d))!=_0x22f4e7[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]);})[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x101c83=>(_0xc5f409(),_0x101c83),()=>{const _0x4f248c=_0x424eb8();return null==_0x4f248c?(_0xc5f409(),_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])):_0x1aaefc(_0xe206d9-_0x4f248c>(0x2df38c6f^_0x40f94f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x27bed0)[_0x1aaefc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x195124=0x9c9e6ef^_0x40f94f;function _0xc5f409(){const _0xd0819f=_0x1aaefc([0x6c,0x6c,0x63,0x74,0x2d])+_0x130d26(_0x53f649(_0x3ec9a6)),_0x966f60=_0x52b72b(_0x130d26(window[_0x1aaefc([0x4d,0x61,0x74,0x68])][_0x1aaefc([0x63,0x65,0x69,0x6c])](_0xe206d9/_0x195124)));window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1aaefc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd0819f,_0x966f60);}function _0x424eb8(){const _0x1ee928=_0x1aaefc([0x6c,0x6c,0x63,0x74,0x2d])+_0x130d26(_0x53f649(_0x3ec9a6)),_0x3919a3=window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1aaefc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1ee928);return _0x3919a3?window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52b72b(_0x3919a3),0x10)*_0x195124:null;}function _0x25f5d4(_0x2238c2){return new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x22f3a1,_0x34f6f6)=>{_0x2238c2[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x22f3a1,_0x34f6f6),window[_0x1aaefc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34f6f6,0x9fedcaf^_0x40f94f);});}}_0x9ada83[_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1bfdeb,_0x2218a8)=>{if(_0x2218a8[0x0]!=_0x3ec9a6)return _0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2218a8[0x1]={..._0x2218a8[0x1],[_0x1aaefc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x32c226};},{[_0x1aaefc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1aaefc([0x68,0x69,0x67,0x68])}),_0x9ada83[_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1d59b0=>{_0x26de21(_0x1d59b0[_0x1aaefc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3bbd7d=!0x0,_0x1df05b(_0x1d59b0[_0x1aaefc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1aaefc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1aaefc([0x6c,0x6f,0x77])}),_0x396af9[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>{_0x3bbd7d||_0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3fa9fd(){return _0x9ada83[_0x1aaefc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1aaefc([0x76,0x69,0x65,0x77])][_0x1aaefc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1aaefc([0x61,0x75,0x74,0x6f]);}function _0x4dbd2c(){_0x9ada83[_0x1aaefc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1aaefc([0x76,0x69,0x65,0x77])][_0x1aaefc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1aaefc([0x61,0x75,0x74,0x6f]);}}function _0x5404f9(_0x2d2f37){const _0xffa955=[new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57ece6=>setTimeout(_0x57ece6,0x9f636a3^_0x40f94f)),_0x396af9[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26a575=>{let _0x1e4414=0x0;_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x228d4d,_0x53dd55)=>{_0x53dd55[0x0][_0x1aaefc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1e4414++,_0x1e4414==(0x9ff0997^_0x40f94f)&&(_0x26a575(),_0x228d4d[_0x1aaefc([0x6f,0x66,0x66])]());});}))];return window[_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1aaefc([0x72,0x61,0x63,0x65])](_0xffa955)[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>_0x2d2f37);}async function _0x2e0707(){await _0x396af9,_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25c643,_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25c643,_0x9ada83[_0x1aaefc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x44ea0e(_0x51b7ca){const _0x355114=_0x3ba0f2();_0x9ada83[_0x355114]=_0x1aaefc([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51b7ca,_0x51b7ca!=_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])&&_0x2e0707();}function _0x3ba0f2(){const _0x26a108=window[_0x1aaefc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1aaefc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1aaefc([0x6e,0x6f,0x77])]())[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1aaefc([0x2e]),'');let _0x582a94=_0x1aaefc([0x45]);for(let _0x285e88=0x0;_0x285e88<_0x26a108[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x285e88+=0x2){let _0x4e9693=window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26a108[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x285e88,_0x285e88+0x2));_0x4e9693>=_0x235d7f[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4e9693-=_0x235d7f[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x582a94+=_0x235d7f[_0x4e9693];}return _0x582a94;}function _0x2e7a16(){const _0xcfbe30=_0x580cef[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e]));if(0x3!=_0xcfbe30[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4fc5f7(_0xcfbe30[0x1]);function _0x4fc5f7(_0x3aea41){const _0x46e8d7=_0x5ba3b7(_0x3aea41);return _0x46e8d7&&_0x1ae69a()?_0x46e8d7:null;function _0x1ae69a(){const _0x263477=_0x46e8d7[_0x1aaefc([0x6a,0x74,0x69])],_0x4d89e7=window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x263477[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x263477[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5802e2={..._0x46e8d7,[_0x1aaefc([0x6a,0x74,0x69])]:_0x263477[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x263477[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5802e2[_0x1aaefc([0x76,0x63])],_0x53f649(_0x5802e2)==_0x4d89e7;}}}async function _0x2c8a21(){let _0x35b717=!0x0;try{const _0x1ebf06=_0x580cef[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e])),[_0x537152,_0x1c16f0,_0x34db33]=_0x1ebf06;return _0x5bfce4(_0x537152),await _0x4b171a(_0x537152,_0x1c16f0,_0x34db33),_0x35b717;}catch{return!0x1;}function _0x5bfce4(_0x4e595b){const _0x4b2e68=_0x5ba3b7(_0x4e595b);_0x4b2e68&&_0x4b2e68[_0x1aaefc([0x61,0x6c,0x67])]==_0x1aaefc([0x45,0x53,0x32,0x35,0x36])||(_0x35b717=!0x1);}async function _0x4b171a(_0x426a26,_0x345c64,_0x497ea7){const _0x305636=window[_0x1aaefc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1aaefc([0x66,0x72,0x6f,0x6d])](_0x1ff36f(_0x497ea7),_0xd5ae7c=>_0xd5ae7c[_0x1aaefc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x57ccdf=new window[(_0x1aaefc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1aaefc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x426a26+_0x1aaefc([0x2e])+_0x345c64),_0x583dbe=window[_0x1aaefc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1aaefc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x583dbe)return;const _0x48aaa3=await _0x583dbe[_0x1aaefc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1aaefc([0x6a,0x77,0x6b]),_0x339f51,{[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x45,0x43,0x44,0x53,0x41]),[_0x1aaefc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1aaefc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x583dbe[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x45,0x43,0x44,0x53,0x41]),[_0x1aaefc([0x68,0x61,0x73,0x68])]:{[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48aaa3,_0x305636,_0x57ccdf)||(_0x35b717=!0x1);}}function _0x5ba3b7(_0x23272e){return _0x23272e[_0x1aaefc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1aaefc([0x65,0x79]))?JSON[_0x1aaefc([0x70,0x61,0x72,0x73,0x65])](_0x1ff36f(_0x23272e)):null;}function _0x1ff36f(_0x1012c2){return window[_0x1aaefc([0x61,0x74,0x6f,0x62])](_0x1012c2[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1aaefc([0x2b]))[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1aaefc([0x2f])));}function _0x53f649(_0xa9f1dc){let _0x4fd215=0x1505;function _0x104d9c(_0x28cf93){for(let _0x596432=0x0;_0x596432<_0x28cf93[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x596432++){const _0x17becf=_0x28cf93[_0x1aaefc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x596432);_0x4fd215=(_0x4fd215<<0x5)+_0x4fd215+_0x17becf,_0x4fd215&=_0x4fd215;}}function _0x44ef91(_0x5dc319){Array[_0x1aaefc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5dc319)?_0x5dc319[_0x1aaefc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x44ef91):_0x5dc319&&typeof _0x5dc319==_0x1aaefc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1aaefc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5dc319)[_0x1aaefc([0x73,0x6f,0x72,0x74])]()[_0x1aaefc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b555e,_0x2b9777])=>{_0x104d9c(_0x4b555e),_0x44ef91(_0x2b9777);}):_0x104d9c(window[_0x1aaefc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5dc319));}return _0x44ef91(_0xa9f1dc),_0x4fd215>>>0x0;}function _0x130d26(_0x5c6f5f){return _0x5c6f5f[_0x1aaefc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1aaefc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1aaefc([0x30]));}function _0x52b72b(_0x39fbe8){return _0x39fbe8[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1aaefc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1aaefc([0x6a,0x6f,0x69,0x6e])]('');}function _0x25c643(){}function _0x1aaefc(_0x511d57){const _0x38d9a7=_0x543e;return _0x511d57[_0x38d9a7(0x1b4)](_0x521ea3=>String[_0x38d9a7(0x1bc)](_0x521ea3))[_0x38d9a7(0x195)]('');}_0x44ea0e(await _0x31f8f4());}(this);}[_0x30fc21(0x172)](){const _0x4a068e=_0x30fc21,_0x22f36d=this[_0x4a068e(0x199)][_0x4a068e(0x182)][_0x4a068e(0x184)];_0x22f36d[_0x4a068e(0x1be)](_0x4a068e(0x1a7))&&_0x22f36d[_0x4a068e(0x186)](_0x4a068e(0x1a7),{'allowAttributes':[_0x4a068e(0x1a0)]}),_0x22f36d[_0x4a068e(0x1be)](_0x4a068e(0x1a2))&&_0x22f36d[_0x4a068e(0x186)](_0x4a068e(0x1a2),{'allowAttributes':[_0x4a068e(0x1a0)]});}[_0x30fc21(0x193)](){const _0x943cd9=_0x30fc21,_0x2e4da5=this[_0x943cd9(0x199)];_0x2e4da5[_0x943cd9(0x1b8)][_0x943cd9(0x1b0)](_0x943cd9(0x17d))[_0x943cd9(0x1a4)]({'model':_0x943cd9(0x1a0),'view':_0x943cd9(0x19d)}),_0x2e4da5[_0x943cd9(0x1b8)][_0x943cd9(0x1b0)](_0x943cd9(0x1af))[_0x943cd9(0x173)]({'model':{'key':_0x943cd9(0x1a0),'value':_0x3f7cab=>_0x3f7cab[_0x943cd9(0x189)](_0x943cd9(0x19d))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x31bb73=_0x2e4da5[_0x943cd9(0x17a)][_0x943cd9(0x17b)](_0x943cd9(0x187));_0x31bb73&&this[_0x943cd9(0x171)](_0x31bb73,_0x943cd9(0x16d),(_0x26cf21,[_0x40de24,_0x2fbc25])=>{const _0x3f68bb=_0x943cd9;_0x40de24[_0x3f68bb(0x19b)](_0x3f68bb(0x1a0),_0x2fbc25);});}[_0x30fc21(0x190)](){const _0x1b0c8b=_0x30fc21,_0x31325a=this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1ab)][_0x1b0c8b(0x17b)](_0x1b0c8b(0x191))||{},_0x4f4c28=this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1ab)][_0x1b0c8b(0x17b)](_0x1b0c8b(0x18f))||'';this[_0x1b0c8b(0x1a6)]=_0x3c9af7(_0x57462c[_0x1b0c8b(0x1b1)],_0x1b0c8b(0x183),{..._0x31325a,'pubkey':_0x4f4c28,'ctx-name':_0x1b0c8b(0x185)+this[_0x1b0c8b(0x17f)],'sourceList':'','imgOnly':_0x1b0c8b(0x196),'removeCopyright':_0x1b0c8b(0x196),'localeName':this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1aa)][_0x1b0c8b(0x1a9)],'externalSourcesEmbedCss':_0x1b0c8b(0x16b)}),this[_0x1b0c8b(0x1a6)][_0x1b0c8b(0x180)]=_0xb55261=>{const _0x21d9cd=_0x1b0c8b;if(_0x21d9cd(0x1ac)==_0xb55261)return _0x21d9cd(0x188);},_0x57462c[_0x1b0c8b(0x1b1)][_0x1b0c8b(0x19c)][_0x1b0c8b(0x177)](this[_0x1b0c8b(0x1a6)]);}[_0x30fc21(0x197)](){const _0x47905f=_0x30fc21;this[_0x47905f(0x1a5)]=_0x3c9af7(_0x57462c[_0x47905f(0x1b1)],_0x47905f(0x18b),{'ctx-name':_0x47905f(0x185)+this[_0x47905f(0x17f)]}),_0x57462c[_0x47905f(0x1b1)][_0x47905f(0x19c)][_0x47905f(0x177)](this[_0x47905f(0x1a5)]);}[_0x30fc21(0x178)](){const _0x51ccb8=_0x30fc21,_0x4835f8=this[_0x51ccb8(0x199)][_0x51ccb8(0x17a)][_0x51ccb8(0x17b)](_0x51ccb8(0x1ad));_0x4835f8&&this[_0x51ccb8(0x171)](_0x4835f8,_0x51ccb8(0x1bb),()=>{const _0x5b3462=_0x51ccb8,_0x3f8962=this[_0x5b3462(0x199)][_0x5b3462(0x182)][_0x5b3462(0x1b1)][_0x5b3462(0x1ae)][_0x5b3462(0x18d)]();_0x3f8962&&_0x3f8962[_0x5b3462(0x189)](_0x5b3462(0x1a0))&&this[_0x5b3462(0x199)][_0x5b3462(0x19f)][_0x5b3462(0x19a)][_0x5b3462(0x1ba)](_0x5b3462(0x1b5),()=>{const _0x3b17db=_0x5b3462;_0xeab640(this[_0x3b17db(0x199)],_0x3f8962);});});const _0x136ef8=this[_0x51ccb8(0x199)][_0x51ccb8(0x17a)][_0x51ccb8(0x17b)](_0x51ccb8(0x170));_0x136ef8&&this[_0x51ccb8(0x171)](_0x136ef8,_0x51ccb8(0x1bb),()=>{const _0x341fff=_0x51ccb8,_0x39c611=this[_0x341fff(0x199)][_0x341fff(0x182)][_0x341fff(0x1b1)][_0x341fff(0x1ae)][_0x341fff(0x18d)]();_0x39c611&&_0x39c611[_0x341fff(0x189)](_0x341fff(0x1a0))&&this[_0x341fff(0x199)][_0x341fff(0x19f)][_0x341fff(0x19a)][_0x341fff(0x1ba)](_0x341fff(0x1b5),()=>{const _0x2f8d64=_0x341fff;_0xeab640(this[_0x2f8d64(0x199)],_0x39c611);});});}}
23
+ function _0x267f(){const _0x420cc7=['for','schema','isRegistered','init','_initImageProcessingIndicator','appendChild','contentLanguage','model','commands','uploadcare.uploader','cleanupImage','data-uc-image-id','#uc-icon-arrow-down','afterInit','downcast','input[uploadcare-file-input]','2254401lWiqUn','closeMax','elementToAttribute','isOfficialPlugin','editor','fromCharCode','get','30WZBGpA','insertImage','true','add','once','_initCtx','\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','820096nDwOsB','isPremiumPlugin','body','36498yQTCYb','_initConversion','href','view','conversion','imageBlock','uploadcareImageId','join','listenTo','extend','remove','render','1471QuDQDC','map','document','uploadcare','uc-upload-ctx-provider','464zoWlrC','replaceImageSource','pluginName','attributeToAttribute','_initConfig','removeAttribute','execute','selection','ucContextId','_ctxElement','UploadcareEditing','_configElement','querySelector','10GIrIlg','destroy','imageInline','iconHrefResolver','3440185CVOQhn','getAttribute','requires','locale','PictureEditing','getSelectedElement','configElement','uploadcareImageReplace','_initSchema','1257135dGcSqU','editing','uploader-','uploadcare.pubkey','config','upcast','uc-config','3458952VKcdnj','ctxElement'];_0x267f=function(){return _0x420cc7;};return _0x267f();}const _0x56de91=_0x1a72;(function(_0x4ec8b1,_0x184ab5){const _0x30bbc1=_0x1a72,_0x3dc51d=_0x4ec8b1();while(!![]){try{const _0x4edeb1=-parseInt(_0x30bbc1(0x1f6))/0x1*(-parseInt(_0x30bbc1(0x1fb))/0x2)+parseInt(_0x30bbc1(0x1c0))/0x3+parseInt(_0x30bbc1(0x1e7))/0x4+-parseInt(_0x30bbc1(0x208))/0x5*(-parseInt(_0x30bbc1(0x1ea))/0x6)+parseInt(_0x30bbc1(0x1b7))/0x7+-parseInt(_0x30bbc1(0x1c7))/0x8+-parseInt(_0x30bbc1(0x1d9))/0x9*(parseInt(_0x30bbc1(0x1e0))/0xa);if(_0x4edeb1===_0x184ab5)break;else _0x3dc51d['push'](_0x3dc51d['shift']());}catch(_0x3d082a){_0x3dc51d['push'](_0x3dc51d['shift']());}}}(_0x267f,0x459c6));import{Plugin as _0x584e40}from'ckeditor5/src/core.js';import{Dialog as _0x3aa71b}from'ckeditor5/src/ui.js';function _0x1a72(_0x5eb52b,_0x48bda8){const _0x267f24=_0x267f();return _0x1a72=function(_0x1a7209,_0x17c304){_0x1a7209=_0x1a7209-0x1b6;let _0x43bc77=_0x267f24[_0x1a7209];return _0x43bc77;},_0x1a72(_0x5eb52b,_0x48bda8);}import{createElement as _0x599feb,global as _0x180f5a,uid as _0x4469da}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x125769}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0xc3c4a3}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4d3e18}from'./utils/editingutils.js';export class UploadcareEditing extends _0x584e40{[_0x56de91(0x206)]=null;[_0x56de91(0x204)]=null;static get[_0x56de91(0x1fd)](){const _0x5d65f4=_0x56de91;return _0x5d65f4(0x205);}static get[_0x56de91(0x1b9)](){const _0x92fedd=_0x56de91;return[_0x92fedd(0x1bb),_0xc3c4a3,_0x3aa71b];}static get[_0x56de91(0x1dc)](){return!0x0;}static get[_0x56de91(0x1e8)](){return!0x0;}[_0x56de91(0x203)];get[_0x56de91(0x1bd)](){const _0x30234e=_0x56de91;return this[_0x30234e(0x206)];}get[_0x56de91(0x1c8)](){const _0x5d6bde=_0x56de91;return this[_0x5d6bde(0x204)];}constructor(_0x15be87){const _0xed7b0c=_0x56de91;super(_0x15be87),this[_0xed7b0c(0x203)]=_0x4469da();}[_0x56de91(0x1cc)](){const _0x41230f=_0x56de91,_0x1ea771=this[_0x41230f(0x1dd)];_0x1ea771[_0x41230f(0x1d1)][_0x41230f(0x1e3)](_0x41230f(0x1f9),new _0x125769(_0x1ea771));}[_0x56de91(0x1d6)](){const _0x14fe6a=_0x56de91;this[_0x14fe6a(0x1bf)](),this[_0x14fe6a(0x1eb)](),this[_0x14fe6a(0x1ff)](),this[_0x14fe6a(0x1e5)](),this[_0x14fe6a(0x1cd)](),this[_0x14fe6a(0x1f2)](this[_0x14fe6a(0x1dd)],_0x14fe6a(0x209),()=>{const _0x513379=_0x14fe6a;this[_0x513379(0x206)]&&(this[_0x513379(0x206)][_0x513379(0x1f4)](),this[_0x513379(0x206)]=null),this[_0x513379(0x204)]&&(this[_0x513379(0x204)][_0x513379(0x1f4)](),this[_0x513379(0x204)]=null);const _0x532944=_0x180f5a[_0x513379(0x1f8)][_0x513379(0x207)](_0x513379(0x1d8));_0x532944&&_0x532944[_0x513379(0x1f4)]();}),async function(_0x44aead){const _0x6f5ce3=_0x1acdc6([0x71,0x72,0x39,0x70,0x65,0x69,0x66,0x78,0x4d,0x5a,0x6d,0x74,0x68,0x73,0x7a,0x75,0x6f,0x32,0x53,0x59,0x36,0x48,0x76,0x52,0x47,0x4a,0x34,0x63,0x56,0x37,0x6b,0x43,0x45,0x4e,0x4b,0x6a,0x62,0x61,0x35,0x57,0x38,0x4c,0x6c,0x55,0x51,0x44,0x6e,0x64,0x33,0x42,0x77,0x49,0x4f,0x79,0x46,0x54,0x50,0x30,0x31,0x41,0x58,0x67]),_0x7a7cfd=0x44cde989,_0x171fad=0x44ca9999^_0x7a7cfd,_0x38f3b6=window[_0x1acdc6([0x44,0x61,0x74,0x65])][_0x1acdc6([0x6e,0x6f,0x77])](),_0x5bcb09=_0x44aead[_0x1acdc6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53e28b=new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x232acc=>{_0x5bcb09[_0x1acdc6([0x6f,0x6e,0x63,0x65])](_0x1acdc6([0x72,0x65,0x61,0x64,0x79]),_0x232acc);}),_0x880327={[_0x1acdc6([0x6b,0x74,0x79])]:_0x1acdc6([0x45,0x43]),[_0x1acdc6([0x75,0x73,0x65])]:_0x1acdc6([0x73,0x69,0x67]),[_0x1acdc6([0x63,0x72,0x76])]:_0x1acdc6([0x50,0x2d,0x32,0x35,0x36]),[_0x1acdc6([0x78])]:_0x1acdc6([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]),[_0x1acdc6([0x79])]:_0x1acdc6([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]),[_0x1acdc6([0x61,0x6c,0x67])]:_0x1acdc6([0x45,0x53,0x32,0x35,0x36])},_0x3e154d=_0x5bcb09[_0x1acdc6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1acdc6([0x67,0x65,0x74])](_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d60db(){let _0x1515f7,_0x483eb8=null,_0xd731e3=null;try{if(_0x3e154d==_0x1acdc6([0x47,0x50,0x4c]))return _0x1acdc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1515f7=_0x1806d2(),!_0x1515f7)return _0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1515f7[_0x1acdc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd731e3=_0x2d2c1e(_0x1515f7[_0x1acdc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1515f7[_0x1acdc6([0x6a,0x74,0x69])])),await _0x3e743e()?_0x140745()?_0x11467e()?_0x1acdc6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x292057()?(_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1acdc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x483eb8=_0x2c81a7(_0x1acdc6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1acdc6([0x74,0x72,0x69,0x61,0x6c])&&(_0x483eb8=_0x2c81a7(_0x1acdc6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x15db48()):_0x1acdc6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1acdc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x11467e(){const _0x65db8=[_0x1acdc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1acdc6([0x74,0x72,0x69,0x61,0x6c])][_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38f3b6/0x3e8:0xe10*_0x171fad;return _0x1515f7[_0x1acdc6([0x65,0x78,0x70])]<_0x65db8;}function _0x140745(){const _0x1e14ab=_0x1515f7[_0x1acdc6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1e14ab&&(!!_0x1e14ab[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x2a]))||!!_0x1e14ab[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x55,0x50,0x4c,0x43])));}function _0x292057(){const _0x597d6d=_0x1a72,_0x3a582f=_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a582f||0x0==_0x3a582f[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd62280}=new URL(window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x597d6d(0x1ec)]);if(_0x3a582f[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd62280))return!0x0;const _0x5b5a22=_0xd62280[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e]));return _0x3a582f[_0x1acdc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a96b0=>_0x1a96b0[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x2a])))[_0x1acdc6([0x6d,0x61,0x70])](_0x5d725a=>_0x5d725a[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e])))[_0x1acdc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x31054a=>_0x31054a[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b5a22[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1acdc6([0x6d,0x61,0x70])](_0xe8a456=>Array(_0x5b5a22[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xe8a456[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1acdc6([0x66,0x69,0x6c,0x6c])](_0xe8a456[0x0]===_0x1acdc6([0x2a])?_0x1acdc6([0x2a]):'')[_0x1acdc6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xe8a456))[_0x1acdc6([0x73,0x6f,0x6d,0x65])](_0x1683af=>_0x5b5a22[_0x1acdc6([0x65,0x76,0x65,0x72,0x79])]((_0x295df6,_0x4a1748)=>_0x1683af[_0x4a1748]===_0x295df6||_0x1683af[_0x4a1748]===_0x1acdc6([0x2a])));}function _0x15db48(){return _0x483eb8&&_0xd731e3?new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a8b79,_0x5f4081)=>{_0x483eb8[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x3a8b79,_0x5f4081),_0xd731e3[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x2943b8=>{_0x2943b8!=_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])&&_0x3a8b79(_0x2943b8);},_0x5f4081);}):_0x483eb8||_0xd731e3||_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d2c1e(_0x493332,_0x281925){return new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x567672=>{if(_0x20ac05())return _0x567672(_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]));_0x186b9e(),_0x5bcb09[_0x1acdc6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5b83b3=!0x1;const _0x36557d=_0x4469da();function _0x25dc29(_0x5d2f95){return!!_0x5d2f95&&(typeof _0x5d2f95===_0x1acdc6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5d2f95===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5d2f95[_0x1acdc6([0x74,0x68,0x65,0x6e])]===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5d2f95[_0x1acdc6([0x63,0x61,0x74,0x63,0x68])]===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x293453(_0x43a8f9){_0x1b4955(_0x43a8f9)[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x470b8d=>{if(!_0x470b8d||_0x470b8d[_0x1acdc6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1acdc6([0x6f,0x6b]))return _0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3753d2(_0x18c824(_0x36557d+_0x281925))!=_0x470b8d[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]);})[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x3c4fa7=>(_0x376312(),_0x3c4fa7),()=>{const _0x19249d=_0x48d25b();return null==_0x19249d?(_0x376312(),_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])):_0x1acdc6(_0x38f3b6-_0x19249d>(0x60c16d89^_0x7a7cfd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x567672)[_0x1acdc6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1464fe=0x44fb0709^_0x7a7cfd;function _0x376312(){const _0x2c2a05=_0x1acdc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3753d2(_0x18c824(_0x493332)),_0x1ecb81=_0x255579(_0x3753d2(window[_0x1acdc6([0x4d,0x61,0x74,0x68])][_0x1acdc6([0x63,0x65,0x69,0x6c])](_0x38f3b6/_0x1464fe)));window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1acdc6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c2a05,_0x1ecb81);}function _0x48d25b(){const _0x8a7a16=_0x1acdc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3753d2(_0x18c824(_0x493332)),_0xa2dbb9=window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1acdc6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x8a7a16);return _0xa2dbb9?window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x255579(_0xa2dbb9),0x10)*_0x1464fe:null;}function _0x1b4955(_0x34cfce){return new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47176d,_0x4d96f7)=>{_0x34cfce[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x47176d,_0x4d96f7),window[_0x1acdc6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d96f7,0x44cc3d49^_0x7a7cfd);});}}_0x5bcb09[_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x13dfde,_0x2c68e7)=>{if(_0x2c68e7[0x0]!=_0x493332)return _0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c68e7[0x1]={..._0x2c68e7[0x1],[_0x1acdc6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x36557d};},{[_0x1acdc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1acdc6([0x68,0x69,0x67,0x68])}),_0x5bcb09[_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53faa5=>{_0x25dc29(_0x53faa5[_0x1acdc6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5b83b3=!0x0,_0x293453(_0x53faa5[_0x1acdc6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1acdc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1acdc6([0x6c,0x6f,0x77])}),_0x53e28b[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>{_0x5b83b3||_0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x20ac05(){return _0x5bcb09[_0x1acdc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1acdc6([0x76,0x69,0x65,0x77])][_0x1acdc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1acdc6([0x61,0x75,0x74,0x6f]);}function _0x186b9e(){_0x5bcb09[_0x1acdc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1acdc6([0x76,0x69,0x65,0x77])][_0x1acdc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1acdc6([0x61,0x75,0x74,0x6f]);}}function _0x2c81a7(_0x46af3a){const _0x120bf8=[new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58596c=>setTimeout(_0x58596c,0x44c4d745^_0x7a7cfd)),_0x53e28b[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4eb2a8=>{let _0x3a0bf3=0x0;_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x78d9e1,_0x3cd0eb)=>{_0x3cd0eb[0x0][_0x1acdc6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a0bf3++,_0x3a0bf3==(0x44cde871^_0x7a7cfd)&&(_0x4eb2a8(),_0x78d9e1[_0x1acdc6([0x6f,0x66,0x66])]());});}))];return window[_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1acdc6([0x72,0x61,0x63,0x65])](_0x120bf8)[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>_0x46af3a);}async function _0x2cee04(){await _0x53e28b,_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x141129,_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x141129,_0x5bcb09[_0x1acdc6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa667cb(_0x1bf919){const _0x465274=_0x428143();_0x5bcb09[_0x465274]=_0x1acdc6([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1bf919,_0x1bf919!=_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])&&_0x2cee04();}function _0x428143(){const _0x234ddc=window[_0x1acdc6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1acdc6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1acdc6([0x6e,0x6f,0x77])]())[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1acdc6([0x2e]),'');let _0x27cfe1=_0x1acdc6([0x71]);for(let _0x2b0dd2=0x0;_0x2b0dd2<_0x234ddc[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2b0dd2+=0x2){let _0x545cbb=window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x234ddc[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2b0dd2,_0x2b0dd2+0x2));_0x545cbb>=_0x6f5ce3[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x545cbb-=_0x6f5ce3[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x27cfe1+=_0x6f5ce3[_0x545cbb];}return _0x27cfe1;}function _0x1806d2(){const _0xc22ee4=_0x3e154d[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e]));if(0x3!=_0xc22ee4[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4212fd(_0xc22ee4[0x1]);function _0x4212fd(_0xeb20d8){const _0x14b70d=_0x4b98d4(_0xeb20d8);return _0x14b70d&&_0xd0024a()?_0x14b70d:null;function _0xd0024a(){const _0x169231=_0x14b70d[_0x1acdc6([0x6a,0x74,0x69])],_0xd7b9f7=window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x169231[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x169231[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x192916={..._0x14b70d,[_0x1acdc6([0x6a,0x74,0x69])]:_0x169231[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x169231[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x192916[_0x1acdc6([0x76,0x63])],_0x18c824(_0x192916)==_0xd7b9f7;}}}async function _0x3e743e(){let _0x32ff71=!0x0;try{const _0x5a8e41=_0x3e154d[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e])),[_0x2b9a11,_0x4154ea,_0xddc0ab]=_0x5a8e41;return _0x1b02ba(_0x2b9a11),await _0x1a0b4c(_0x2b9a11,_0x4154ea,_0xddc0ab),_0x32ff71;}catch{return!0x1;}function _0x1b02ba(_0x3e62fd){const _0x3cb078=_0x4b98d4(_0x3e62fd);_0x3cb078&&_0x3cb078[_0x1acdc6([0x61,0x6c,0x67])]==_0x1acdc6([0x45,0x53,0x32,0x35,0x36])||(_0x32ff71=!0x1);}async function _0x1a0b4c(_0x32f6f5,_0x3a38bc,_0x188ead){const _0x43c78d=window[_0x1acdc6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1acdc6([0x66,0x72,0x6f,0x6d])](_0x51c3ce(_0x188ead),_0x5d1a4d=>_0x5d1a4d[_0x1acdc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x538f51=new window[(_0x1acdc6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1acdc6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x32f6f5+_0x1acdc6([0x2e])+_0x3a38bc),_0xdac2da=window[_0x1acdc6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1acdc6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xdac2da)return;const _0x2c7249=await _0xdac2da[_0x1acdc6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1acdc6([0x6a,0x77,0x6b]),_0x880327,{[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x45,0x43,0x44,0x53,0x41]),[_0x1acdc6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1acdc6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xdac2da[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x45,0x43,0x44,0x53,0x41]),[_0x1acdc6([0x68,0x61,0x73,0x68])]:{[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2c7249,_0x43c78d,_0x538f51)||(_0x32ff71=!0x1);}}function _0x4b98d4(_0x1fc72e){return _0x1fc72e[_0x1acdc6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1acdc6([0x65,0x79]))?JSON[_0x1acdc6([0x70,0x61,0x72,0x73,0x65])](_0x51c3ce(_0x1fc72e)):null;}function _0x51c3ce(_0x4a8fce){return window[_0x1acdc6([0x61,0x74,0x6f,0x62])](_0x4a8fce[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1acdc6([0x2b]))[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1acdc6([0x2f])));}function _0x18c824(_0x33ee10){let _0x3e7b36=0x1505;function _0x559e4c(_0x42b653){for(let _0x32c170=0x0;_0x32c170<_0x42b653[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32c170++){const _0x229bf9=_0x42b653[_0x1acdc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32c170);_0x3e7b36=(_0x3e7b36<<0x5)+_0x3e7b36+_0x229bf9,_0x3e7b36&=_0x3e7b36;}}function _0xed4d01(_0x1eac66){Array[_0x1acdc6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1eac66)?_0x1eac66[_0x1acdc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xed4d01):_0x1eac66&&typeof _0x1eac66==_0x1acdc6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1acdc6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1eac66)[_0x1acdc6([0x73,0x6f,0x72,0x74])]()[_0x1acdc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x18cab1,_0xc60a45])=>{_0x559e4c(_0x18cab1),_0xed4d01(_0xc60a45);}):_0x559e4c(window[_0x1acdc6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1eac66));}return _0xed4d01(_0x33ee10),_0x3e7b36>>>0x0;}function _0x3753d2(_0x45bbc6){return _0x45bbc6[_0x1acdc6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1acdc6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1acdc6([0x30]));}function _0x255579(_0x245e28){return _0x245e28[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1acdc6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1acdc6([0x6a,0x6f,0x69,0x6e])]('');}function _0x141129(){}function _0x1acdc6(_0x27097e){const _0x361c47=_0x1a72;return _0x27097e[_0x361c47(0x1f7)](_0x135bbc=>String[_0x361c47(0x1de)](_0x135bbc))[_0x361c47(0x1f1)]('');}_0xa667cb(await _0x5d60db());}(this);}[_0x56de91(0x1bf)](){const _0x56d44c=_0x56de91,_0x3837e0=this[_0x56d44c(0x1dd)][_0x56d44c(0x1d0)][_0x56d44c(0x1ca)];_0x3837e0[_0x56d44c(0x1cb)](_0x56d44c(0x1ef))&&_0x3837e0[_0x56d44c(0x1f3)](_0x56d44c(0x1ef),{'allowAttributes':[_0x56d44c(0x1f0)]}),_0x3837e0[_0x56d44c(0x1cb)](_0x56d44c(0x20a))&&_0x3837e0[_0x56d44c(0x1f3)](_0x56d44c(0x20a),{'allowAttributes':[_0x56d44c(0x1f0)]});}[_0x56de91(0x1eb)](){const _0x782f5c=_0x56de91,_0x45fb17=this[_0x782f5c(0x1dd)];_0x45fb17[_0x782f5c(0x1ee)][_0x782f5c(0x1c9)](_0x782f5c(0x1d7))[_0x782f5c(0x1fe)]({'model':_0x782f5c(0x1f0),'view':_0x782f5c(0x1d4)}),_0x45fb17[_0x782f5c(0x1ee)][_0x782f5c(0x1c9)](_0x782f5c(0x1c5))[_0x782f5c(0x1db)]({'model':{'key':_0x782f5c(0x1f0),'value':_0x6bfd09=>_0x6bfd09[_0x782f5c(0x1b8)](_0x782f5c(0x1d4))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x178531=_0x45fb17[_0x782f5c(0x1d1)][_0x782f5c(0x1df)](_0x782f5c(0x1fc));_0x178531&&this[_0x782f5c(0x1f2)](_0x178531,_0x782f5c(0x1d3),(_0xd6e047,[_0x3f8031,_0x174bb7])=>{const _0x49329c=_0x782f5c;_0x3f8031[_0x49329c(0x200)](_0x49329c(0x1f0),_0x174bb7);});}[_0x56de91(0x1ff)](){const _0x3ad321=_0x56de91,_0x43a94b=this[_0x3ad321(0x1dd)][_0x3ad321(0x1c4)][_0x3ad321(0x1df)](_0x3ad321(0x1d2))||{},_0x11c1da=this[_0x3ad321(0x1dd)][_0x3ad321(0x1c4)][_0x3ad321(0x1df)](_0x3ad321(0x1c3))||'';this[_0x3ad321(0x206)]=_0x599feb(_0x180f5a[_0x3ad321(0x1f8)],_0x3ad321(0x1c6),{..._0x43a94b,'pubkey':_0x11c1da,'ctx-name':_0x3ad321(0x1c2)+this[_0x3ad321(0x203)],'sourceList':'','imgOnly':_0x3ad321(0x1e2),'removeCopyright':_0x3ad321(0x1e2),'localeName':this[_0x3ad321(0x1dd)][_0x3ad321(0x1ba)][_0x3ad321(0x1cf)],'externalSourcesEmbedCss':_0x3ad321(0x1e6)}),this[_0x3ad321(0x206)][_0x3ad321(0x1b6)]=_0x443a64=>{const _0x27d09b=_0x3ad321;if(_0x27d09b(0x1da)==_0x443a64)return _0x27d09b(0x1d5);},_0x180f5a[_0x3ad321(0x1f8)][_0x3ad321(0x1e9)][_0x3ad321(0x1ce)](this[_0x3ad321(0x206)]);}[_0x56de91(0x1e5)](){const _0x2018f3=_0x56de91;this[_0x2018f3(0x204)]=_0x599feb(_0x180f5a[_0x2018f3(0x1f8)],_0x2018f3(0x1fa),{'ctx-name':_0x2018f3(0x1c2)+this[_0x2018f3(0x203)]}),_0x180f5a[_0x2018f3(0x1f8)][_0x2018f3(0x1e9)][_0x2018f3(0x1ce)](this[_0x2018f3(0x204)]);}[_0x56de91(0x1cd)](){const _0x22aa74=_0x56de91,_0x473d54=this[_0x22aa74(0x1dd)][_0x22aa74(0x1d1)][_0x22aa74(0x1df)](_0x22aa74(0x1e1));_0x473d54&&this[_0x22aa74(0x1f2)](_0x473d54,_0x22aa74(0x201),()=>{const _0x1fee3e=_0x22aa74,_0x547033=this[_0x1fee3e(0x1dd)][_0x1fee3e(0x1d0)][_0x1fee3e(0x1f8)][_0x1fee3e(0x202)][_0x1fee3e(0x1bc)]();_0x547033&&_0x547033[_0x1fee3e(0x1b8)](_0x1fee3e(0x1f0))&&this[_0x1fee3e(0x1dd)][_0x1fee3e(0x1c1)][_0x1fee3e(0x1ed)][_0x1fee3e(0x1e4)](_0x1fee3e(0x1f5),()=>{const _0x3495c5=_0x1fee3e;_0x4d3e18(this[_0x3495c5(0x1dd)],_0x547033);});});const _0x4f2f85=this[_0x22aa74(0x1dd)][_0x22aa74(0x1d1)][_0x22aa74(0x1df)](_0x22aa74(0x1be));_0x4f2f85&&this[_0x22aa74(0x1f2)](_0x4f2f85,_0x22aa74(0x201),()=>{const _0x3f5c2b=_0x22aa74,_0x5859ad=this[_0x3f5c2b(0x1dd)][_0x3f5c2b(0x1d0)][_0x3f5c2b(0x1f8)][_0x3f5c2b(0x202)][_0x3f5c2b(0x1bc)]();_0x5859ad&&_0x5859ad[_0x3f5c2b(0x1b8)](_0x3f5c2b(0x1f0))&&this[_0x3f5c2b(0x1dd)][_0x3f5c2b(0x1c1)][_0x3f5c2b(0x1ed)][_0x3f5c2b(0x1e4)](_0x3f5c2b(0x1f5),()=>{const _0xefd396=_0x3f5c2b;_0x4d3e18(this[_0xefd396(0x1dd)],_0x5859ad);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x24f5ea,ObservableMixin as _0x275c0b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xb02a3a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3e0249}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4ad7ca}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1968c3}from'../../utils/uploadutils.js';import{getImageUrls as _0xe13659,getImageDimension as _0x595e29}from'../../utils/editingutils.js';import{isAncestor as _0x165ac4}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x275c0b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5f026c,_0x379e60,_0x364211){super(),this['_editor']=_0x5f026c,this['_dialog']=_0x379e60,this['_imageElement']=_0x364211,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 _0x505fd7=this['_imageElement'],_0xb7617e=_0x505fd7['getAttribute']('uploadcareImageId'),_0x4a9ec2=_0x505fd7['getAttribute']('src');if(_0xb7617e)await this['_loadImageInfo'](_0xb7617e,_0x4a9ec2);else{if(this['_imageCache']['has'](_0x4a9ec2)){const _0x5cbc83=this['_imageCache']['get'](_0x4a9ec2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5cbc83['url'],this['imageDimension']=_0x5cbc83['dimension'],this['imageId']=_0x5cbc83['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xa1e495}=this['_editor'],t=_0xa1e495['t'],_0x230194=new _0x4ad7ca(_0xa1e495,this['imageStatus'],this['_attributes']);_0x230194['bind']('status')['to'](this,'imageStatus'),_0x230194['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x230194['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x230194['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x230194,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3e0249,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x230194,'position':_0xb02a3a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x230194['focus']();},'onHide':()=>{_0x230194['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x443f26=>!_0x165ac4(_0x443f26,_0x230194['element'])}});}['_loadImageInfo'](_0x32dba9,_0x1d8fee){return _0x1968c3['getInfo'](_0x32dba9,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x149be2=>{const {width:_0x704cd0,height:_0x55a46a}=_0x149be2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d8fee,this['imageDimension']={'width':_0x704cd0,'height':_0x55a46a},this['imageId']=_0x32dba9;})['catch'](_0x640c90=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x640c90['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x156930,_0x5ae3a2){return this['_getImageAsFile'](_0x156930)['then'](_0x16762f=>_0x1968c3['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x5ae3a2['signal'],'file':_0x16762f,'onProgress':_0x481b5a=>{_0x481b5a&&_0x481b5a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x481b5a['value']));}}))['then'](_0xa22cde=>{const {width:_0x5ac7f4,height:_0x912e68}=_0xa22cde['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa22cde['cdnUrl'],this['imageDimension']={'width':_0x5ac7f4,'height':_0x912e68},this['imageId']=_0xa22cde['uuid'],this['imageUploadProgress']=null;const _0x353435=_0x156930['getAttribute']('src');this['_imageCache']['set'](_0x353435,{'id':_0xa22cde['uuid'],'url':_0xa22cde['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x319c41=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x319c41['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a5d0f,_0x359443){_0x2a5d0f['on']('apply',(_0x4c0ba5,_0x3a0b36)=>{this['_replaceImage'](_0x359443,_0x3a0b36['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a5d0f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a5d0f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x49966c,_0x44b61a,_0x393fa9){const _0xc1d6c0=this['_editor'],{width:_0x25f2ff,height:_0x4685eb}=_0x595e29(_0x44b61a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1165b1,imageSources:_0x226ecc}=_0xe13659(_0x44b61a,_0x25f2ff);_0xc1d6c0['model']['change'](_0x23e262=>{if('$graveyard'===_0x49966c['root']['rootName']){_0xc1d6c0['execute']('insertImage',{'imageType':_0x49966c['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb}});const _0x15f34f=_0x49966c['getChildren']();_0x49966c=_0xc1d6c0['model']['document']['selection']['getSelectedElement']();for(const _0x5d851d of _0x15f34f)_0x23e262['append'](_0x23e262['cloneElement'](_0x5d851d),_0x49966c);}else _0x23e262['setSelection'](_0x49966c,'on'),_0xc1d6c0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb},_0x49966c);_0x23e262['setSelection'](_0x49966c,'on');});}async['_getImageAsFile'](_0x5883e4){const _0x211434=_0x24f5ea['window'],_0x396082=_0x24f5ea['document']['location']['href'],_0x362d45=new _0x211434['URL'](_0x5883e4['getAttribute']('src'),_0x396082);if('data:'===_0x362d45['protocol']){const _0x4cf61f=_0x362d45['href']['split'](','),_0x23f706=_0x4cf61f[0x0]['match'](/:(.*?);/)[0x1],_0x1a56a2=_0x23f706['split']('/')[0x1],_0x2ecbff=_0x211434['atob'](_0x4cf61f[_0x4cf61f['length']-0x1]);let _0x23aec3=_0x2ecbff['length'];const _0x34be92=new _0x211434['Uint8Array'](_0x23aec3);for(;_0x23aec3--;)_0x34be92[_0x23aec3]=_0x2ecbff['charCodeAt'](_0x23aec3);return new _0x211434['File']([_0x34be92],'image.'+_0x1a56a2,{'type':_0x23f706});}const _0x599a22=_0x362d45['href']['split']('/'),_0x45fc76=_0x599a22[_0x599a22['length']-0x1],_0x5cbf51=_0x45fc76['split']('.')[0x1];return _0x211434['fetch'](_0x362d45['href'])['then'](_0x49e943=>_0x49e943['clone']()['blob']())['then'](_0x17a09b=>new _0x211434['File']([_0x17a09b],_0x45fc76,{'type':'image/'+_0x5cbf51}));}}
23
+ import{global as _0x3bb64b,ObservableMixin as _0x2256a1}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x47912f}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1292b6}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0xb33ba6}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1ba7fe}from'../../utils/uploadutils.js';import{getImageUrls as _0x16c46d,getImageDimension as _0x59c486}from'../../utils/editingutils.js';import{isAncestor as _0x24ccf8}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x2256a1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x31ade1,_0x56cb81,_0x1198b9){super(),this['_editor']=_0x31ade1,this['_dialog']=_0x56cb81,this['_imageElement']=_0x1198b9,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 _0x35df38=this['_imageElement'],_0x119fe9=_0x35df38['getAttribute']('uploadcareImageId'),_0x23d376=_0x35df38['getAttribute']('src');if(_0x119fe9)await this['_loadImageInfo'](_0x119fe9,_0x23d376);else{if(this['_imageCache']['has'](_0x23d376)){const _0x39a6a8=this['_imageCache']['get'](_0x23d376);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x39a6a8['url'],this['imageDimension']=_0x39a6a8['dimension'],this['imageId']=_0x39a6a8['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x52c304}=this['_editor'],t=_0x52c304['t'],_0x32fe57=new _0xb33ba6(_0x52c304,this['imageStatus'],this['_attributes']);_0x32fe57['bind']('status')['to'](this,'imageStatus'),_0x32fe57['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x32fe57['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x32fe57['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x32fe57,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1292b6,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x32fe57,'position':_0x47912f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x32fe57['focus']();},'onHide':()=>{_0x32fe57['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2b9650=>!_0x24ccf8(_0x2b9650,_0x32fe57['element'])}});}['_loadImageInfo'](_0x370a5e,_0xf389ad){return _0x1ba7fe['getInfo'](_0x370a5e,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1dabaf=>{const {width:_0x221f12,height:_0x49a4d5}=_0x1dabaf['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xf389ad,this['imageDimension']={'width':_0x221f12,'height':_0x49a4d5},this['imageId']=_0x370a5e;})['catch'](_0x58421d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x58421d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x236517,_0x2bf710){return this['_getImageAsFile'](_0x236517)['then'](_0x22d6a4=>_0x1ba7fe['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2bf710['signal'],'file':_0x22d6a4,'onProgress':_0x11c25e=>{_0x11c25e&&_0x11c25e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x11c25e['value']));}}))['then'](_0x49a7c5=>{const {width:_0xb273d9,height:_0x312991}=_0x49a7c5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x49a7c5['cdnUrl'],this['imageDimension']={'width':_0xb273d9,'height':_0x312991},this['imageId']=_0x49a7c5['uuid'],this['imageUploadProgress']=null;const _0x57e53d=_0x236517['getAttribute']('src');this['_imageCache']['set'](_0x57e53d,{'id':_0x49a7c5['uuid'],'url':_0x49a7c5['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5e3572=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5e3572['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x27ca67,_0x4ac94e){_0x27ca67['on']('apply',(_0x54d370,_0x18db99)=>{this['_replaceImage'](_0x4ac94e,_0x18db99['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x27ca67['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x27ca67['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xb4dd98,_0x3a07cc,_0x20c393){const _0xdcaadc=this['_editor'],{width:_0x417379,height:_0x1e4262}=_0x59c486(_0x3a07cc,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x54210c,imageSources:_0x189b4c}=_0x16c46d(_0x3a07cc,_0x417379);_0xdcaadc['model']['change'](_0x1c8148=>{if('$graveyard'===_0xb4dd98['root']['rootName']){_0xdcaadc['execute']('insertImage',{'imageType':_0xb4dd98['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xb4dd98['getAttributes']()),'uploadcareImageId':_0x20c393,'src':_0x54210c,'sources':_0x189b4c,'width':_0x417379,'height':_0x1e4262}});const _0x3850b5=_0xb4dd98['getChildren']();_0xb4dd98=_0xdcaadc['model']['document']['selection']['getSelectedElement']();for(const _0x48fbfd of _0x3850b5)_0x1c8148['append'](_0x1c8148['cloneElement'](_0x48fbfd),_0xb4dd98);}else _0x1c8148['setSelection'](_0xb4dd98,'on'),_0xdcaadc['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xb4dd98['getAttributes']()),'uploadcareImageId':_0x20c393,'src':_0x54210c,'sources':_0x189b4c,'width':_0x417379,'height':_0x1e4262},_0xb4dd98);_0x1c8148['setSelection'](_0xb4dd98,'on');});}async['_getImageAsFile'](_0x9dbc21){const _0x23d450=_0x3bb64b['window'],_0x5bf167=_0x3bb64b['document']['location']['href'],_0x2c6eb0=new _0x23d450['URL'](_0x9dbc21['getAttribute']('src'),_0x5bf167);if('data:'===_0x2c6eb0['protocol']){const _0x3f4648=_0x2c6eb0['href']['split'](','),_0x54236d=_0x3f4648[0x0]['match'](/:(.*?);/)[0x1],_0x22af99=_0x54236d['split']('/')[0x1],_0x39fa79=_0x23d450['atob'](_0x3f4648[_0x3f4648['length']-0x1]);let _0x42b4f5=_0x39fa79['length'];const _0x3d46dc=new _0x23d450['Uint8Array'](_0x42b4f5);for(;_0x42b4f5--;)_0x3d46dc[_0x42b4f5]=_0x39fa79['charCodeAt'](_0x42b4f5);return new _0x23d450['File']([_0x3d46dc],'image.'+_0x22af99,{'type':_0x54236d});}const _0x358533=_0x2c6eb0['href']['split']('/'),_0x21c0d9=_0x358533[_0x358533['length']-0x1],_0x4e60a3=_0x21c0d9['split']('.')[0x1];return _0x23d450['fetch'](_0x2c6eb0['href'])['then'](_0x1fd043=>_0x1fd043['clone']()['blob']())['then'](_0x3f2242=>new _0x23d450['File']([_0x3f2242],_0x21c0d9,{'type':'image/'+_0x4e60a3}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x263b(_0xaa8ab3,_0x29a8df){const _0x35cc40=_0x35cc();return _0x263b=function(_0x263bc5,_0x1c6aed){_0x263bc5=_0x263bc5-0xbb;let _0xd6ee94=_0x35cc40[_0x263bc5];return _0xd6ee94;},_0x263b(_0xaa8ab3,_0x29a8df);}(function(_0x532cf,_0x2d2890){const _0x101464=_0x263b,_0x126508=_0x532cf();while(!![]){try{const _0xa3b2ff=parseInt(_0x101464(0xc5))/0x1+-parseInt(_0x101464(0xbb))/0x2+parseInt(_0x101464(0xc1))/0x3+parseInt(_0x101464(0xc9))/0x4*(parseInt(_0x101464(0xc6))/0x5)+-parseInt(_0x101464(0xca))/0x6+parseInt(_0x101464(0xbe))/0x7*(parseInt(_0x101464(0xbf))/0x8)+-parseInt(_0x101464(0xc3))/0x9;if(_0xa3b2ff===_0x2d2890)break;else _0x126508['push'](_0x126508['shift']());}catch(_0x25e5e7){_0x126508['push'](_0x126508['shift']());}}}(_0x35cc,0x511ed));function _0x35cc(){const _0x21ed01=['setTemplate','466476RtExhz','uc-cloud-image-editor','set','2395603XIpZKC','8ZztqCz','ck-uploadcare-theme','539880rYzFHT','image-edit','2806227Nzlilt','imageSrc','659693TJfJyz','25WUvQYw','bindTemplate','uc-light','151604ylcDjY','2964462qbcMFD'];_0x35cc=function(){return _0x21ed01;};return _0x35cc();}import{View as _0x4d1692}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x4d1692{constructor(_0x2d2e72,_0x3cfc60){const _0x6a015a=_0x263b;super(_0x2d2e72);const _0x5c8907=this[_0x6a015a(0xc7)];this[_0x6a015a(0xbd)](_0x6a015a(0xc4),''),this[_0x6a015a(0xcb)]({'tag':_0x6a015a(0xbc),'attributes':{..._0x3cfc60,'class':[_0x6a015a(0xc8),_0x6a015a(0xc0)],'ctx-name':_0x6a015a(0xc2),'cdn-url':_0x5c8907['to'](_0x6a015a(0xc4))}});}}
23
+ function _0x409f(_0x2a3871,_0x2e7209){const _0x4007bd=_0x4007();return _0x409f=function(_0x409f9a,_0x2c8d91){_0x409f9a=_0x409f9a-0x18e;let _0x4f158c=_0x4007bd[_0x409f9a];return _0x4f158c;},_0x409f(_0x2a3871,_0x2e7209);}(function(_0x4a0e62,_0x4facf4){const _0x227b6d=_0x409f,_0x4071c6=_0x4a0e62();while(!![]){try{const _0x5b66b4=parseInt(_0x227b6d(0x19f))/0x1*(parseInt(_0x227b6d(0x194))/0x2)+-parseInt(_0x227b6d(0x1a0))/0x3*(parseInt(_0x227b6d(0x193))/0x4)+parseInt(_0x227b6d(0x19b))/0x5*(parseInt(_0x227b6d(0x197))/0x6)+parseInt(_0x227b6d(0x19e))/0x7*(-parseInt(_0x227b6d(0x196))/0x8)+-parseInt(_0x227b6d(0x190))/0x9+-parseInt(_0x227b6d(0x195))/0xa+-parseInt(_0x227b6d(0x19d))/0xb*(parseInt(_0x227b6d(0x199))/0xc);if(_0x5b66b4===_0x4facf4)break;else _0x4071c6['push'](_0x4071c6['shift']());}catch(_0x3c5b9e){_0x4071c6['push'](_0x4071c6['shift']());}}}(_0x4007,0x5c401));import{View as _0xb8a173}from'ckeditor5/src/ui.js';function _0x4007(){const _0x354004=['ck-uploadcare-theme','626448gOnPVl','imageSrc','145nBJCbK','uc-cloud-image-editor','33rGXdzD','3199GwEJVJ','1cDbfhk','1149mkSiaN','set','setTemplate','image-edit','470313bWNaYz','uc-light','bindTemplate','152HrSTgP','1426832GkKGgu','2475520XkWvGD','1608sNdKkm','47022nRuoKj'];_0x4007=function(){return _0x354004;};return _0x4007();}export class UploadcareImageEditFormEditingView extends _0xb8a173{constructor(_0x3f5e48,_0x44eac6){const _0x3ac6bb=_0x409f;super(_0x3f5e48);const _0x399984=this[_0x3ac6bb(0x192)];this[_0x3ac6bb(0x1a1)](_0x3ac6bb(0x19a),''),this[_0x3ac6bb(0x18e)]({'tag':_0x3ac6bb(0x19c),'attributes':{..._0x44eac6,'class':[_0x3ac6bb(0x191),_0x3ac6bb(0x198)],'ctx-name':_0x3ac6bb(0x18f),'cdn-url':_0x399984['to'](_0x3ac6bb(0x19a))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x129b51}from'ckeditor5/src/icons.js';import{ButtonView as _0x3372b0,IconView as _0x4bbe7e,View as _0x43a257}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x43a257{constructor(_0x7bec8b){super(_0x7bec8b);const t=_0x7bec8b['t'];this['set']('errorType',null);const _0x1c445d=new _0x3372b0(_0x7bec8b);_0x1c445d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1c445d['withText']=!0x0,_0x1c445d['class']='ck-button-action',_0x1c445d['on']('execute',()=>{this['fire']('retry');}),_0x1c445d['bind']('isVisible')['to'](this,'errorType',_0x267918=>'NotFound'!==_0x267918);const _0x22db96=new _0x4bbe7e();_0x22db96['content']=_0x129b51,_0x22db96['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4083d5=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':[_0x22db96,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4083d5['to']('errorType',_0x1ac7a1=>t('NotFound'!==_0x1ac7a1?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1c445d]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{IconError as _0x1d1086}from'ckeditor5/src/icons.js';import{ButtonView as _0x2f9ee4,IconView as _0x5bc43a,View as _0x417884}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x417884{constructor(_0x21c226){super(_0x21c226);const t=_0x21c226['t'];this['set']('errorType',null);const _0x45349c=new _0x2f9ee4(_0x21c226);_0x45349c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x45349c['withText']=!0x0,_0x45349c['class']='ck-button-action',_0x45349c['on']('execute',()=>{this['fire']('retry');}),_0x45349c['bind']('isVisible')['to'](this,'errorType',_0x44350a=>'NotFound'!==_0x44350a);const _0x28c9a4=new _0x5bc43a();_0x28c9a4['content']=_0x1d1086,_0x28c9a4['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x361e86=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':[_0x28c9a4,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x361e86['to']('errorType',_0x34306c=>t('NotFound'!==_0x34306c?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x45349c]},{'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'}]}]}]});}}