@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20250211.0 → 0.0.0-nightly-next-20250212.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x44f695,Command as _0x22905a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x8d86d,IconInstagram as _0x1b62e4,IconGooglePhotos as _0x4683d1,IconGoogleDrive as _0x112cec,IconFacebook as _0x5eea51,IconDropbox as _0x3b5e72,IconUploadcareLink as _0x165f96,IconUploadcareImageUpload as _0x1b9970,IconError as et,IconUploadcareImageEdit as _0x4cd61b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1c659d,MenuBarMenuListItemButtonView as _0x457e84,View as _0x55f9eb,FocusCycler as _0x3cd7a9,Dialog as _0x307410,DialogViewPosition as _0x125e54,SpinnerView as _0x2bd220,IconView as at,Notification as _0x3a7d5d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x1e5194,DomEmitterMixin as _0x33a441,global as _0x54c10e,getAncestors as _0x4f4bd0,ObservableMixin as _0x464e64,createElement as _0x5b1d07,uid as _0x476afb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x14bb78}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x27f1d8,info as _0x58d3ec}from'@uploadcare/upload-client';import*as _0x65e70a from'@uploadcare/file-uploader';var o=function(_0x49864e){return _0x49864e['Local']='local',_0x49864e['URL']='url',_0x49864e['Dropbox']='dropbox',_0x49864e['GDrive']='gdrive',_0x49864e['Facebook']='facebook',_0x49864e['GPhotos']='gphotos',_0x49864e['Instagram']='instagram',_0x49864e['OneDrive']='onedrive',_0x49864e;}({});function x(_0x1eea68,_0x5d133b,_0x2cd9b8){const t=_0x1eea68['t'],_0x556e93=_0x1eea68['t'];switch(_0x5d133b){case o['Local']:return{'text':_0x556e93('Insert'===_0x2cd9b8?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x556e93('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x2cd9b8?_0x556e93('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x556e93('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x2cd9b8?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x5d133b;}}class e extends _0x44f695{['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 _0x5ea6ba=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x32cb2b;for(const _0x16f122 in _0x5ea6ba){const _0x3bae58=_0x16f122,_0xa1f258=_0x5ea6ba[_0x3bae58];if('uploadcareLicenseKeyValid'==_0xa1f258||'uploadcareLicenseKeyInvalid'==_0xa1f258||'uploadcareLicenseKeyExpired'==_0xa1f258||'uploadcareLicenseKeyDomainLimit'==_0xa1f258||'uploadcareLicenseKeyNotAllowed'==_0xa1f258||'uploadcareLicenseKeyEvaluationLimit'==_0xa1f258||'uploadcareLicenseKeyTrialLimit'==_0xa1f258||'uploadcareLicenseKeyUsageLimit'==_0xa1f258){delete _0x5ea6ba[_0x3bae58],_0x32cb2b=_0xa1f258,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x32cb2b&&_0x5ea6ba['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x125fe5}=this,_0x5308a5=_0x125fe5['commands']['get']('uploadcare');if(!_0x5308a5)return;const _0x835304=this['_normalizeConfigSourceList'](_0x125fe5['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4b8617,_0x3b045d)=>{const _0x583d04=this['_getIntegrationKey'](_0x3b045d['type']);return _0x4b8617[_0x583d04]||(_0x4b8617[_0x583d04]=[]),_0x4b8617[_0x583d04]['push'](_0x3b045d),_0x4b8617;},{});_0x125fe5['plugins']['has']('ImageInsertUI')&&_0x125fe5['commands']['get']('uploadcare')&&Object['entries'](_0x835304)['forEach'](([_0x4e53c3,_0x2db2ca])=>{_0x125fe5['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4e53c3,'observable':()=>_0x5308a5,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2db2ca),'formViewCreator':()=>this['_createDropdownButtons'](_0x2db2ca),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2db2ca),'override':'assetManager'!==_0x4e53c3});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5646ac){const {locale:_0x579dc}=this['editor'];return _0x5646ac['map'](_0x2ae7fc=>{const _0x16ef6f=x(_0x579dc,_0x2ae7fc,'Insert');switch(_0x2ae7fc){case o['Local']:return{'icon':_0x1b9970,'type':o['Local'],..._0x16ef6f};case o['URL']:return{'icon':_0x165f96,'type':o['URL'],..._0x16ef6f};case o['Dropbox']:return{'icon':_0x3b5e72,'type':o['Dropbox'],..._0x16ef6f};case o['Facebook']:return{'icon':_0x5eea51,'type':o['Facebook'],..._0x16ef6f};case o['GDrive']:return{'icon':_0x112cec,'type':o['GDrive'],..._0x16ef6f};case o['GPhotos']:return{'icon':_0x4683d1,'type':o['GPhotos'],..._0x16ef6f};case o['Instagram']:return{'icon':_0x1b62e4,'type':o['Instagram'],..._0x16ef6f};case o['OneDrive']:return{'icon':_0x8d86d,'type':o['OneDrive'],..._0x16ef6f};}});}['_getIntegrationKey'](_0x5c74d2){switch(_0x5c74d2){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x53fd0b,_0x3f1c11){const _0x348397=this['editor'],_0x586280=new _0x53fd0b(_0x348397['locale']),_0x356e02=_0x348397['commands']['get']('uploadcare');return _0x586280['bind']('isEnabled')['to'](_0x356e02),_0x586280['on']('execute',()=>{_0x356e02['execute'](_0x3f1c11);}),_0x586280;}['_createToolbarButton'](_0x5324a5){const {locale:_0x2a2998}=this['editor'],_0x126f3f=this['editor']['plugins']['get']('ImageInsertUI'),_0x161279=_0x5324a5[0x0],_0x5bf107=this['_createButton'](_0x1c659d,_0x161279['type']);return _0x5bf107['icon']=_0x161279['icon'],_0x5bf107['bind']('label')['to'](_0x126f3f,'isImageSelected',_0xc2dbbb=>x(_0x2a2998,_0x161279['type'],_0xc2dbbb?'Replace':'Insert')['text']),_0x5bf107['tooltip']=!0x0,_0x5bf107;}['_createDropdownButtons'](_0x59f17b){const {locale:_0xa99f38}=this['editor'],_0x4b62f0=this['editor']['plugins']['get']('ImageInsertUI');return _0x59f17b['map'](_0x4151ac=>{const _0x1db236=this['_createButton'](_0x1c659d,_0x4151ac['type']);return _0x1db236['withText']=!0x0,_0x1db236['icon']=_0x4151ac['icon'],_0x1db236['bind']('label')['to'](_0x4b62f0,'isImageSelected',_0x4c24e8=>x(_0xa99f38,_0x4151ac['type'],_0x4c24e8?'Replace':'Insert')['text']),_0x1db236;});}['_createMenuBarButtons'](_0x17fc39){return _0x17fc39['map'](_0x4f7df6=>{const _0x4f9b03=this['_createButton'](_0x457e84,_0x4f7df6['type']);return _0x4f9b03['icon']=_0x4f7df6['icon'],_0x4f9b03['label']=_0x4f7df6['shortText'],_0x4f9b03;});}}class q extends _0x55f9eb{['focusTracker'];['focusCycler'];constructor(_0x13b12d){super(_0x13b12d),this['focusTracker']=new _0x1e5194(),this['focusCycler']=new _0x3cd7a9({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x51ffc9){super(_0x51ffc9),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x722a9b,_0x1c05ef){const _0x461f2f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x33beb5=>_0x33beb5<=_0x1c05ef)['map'](_0x452ad4=>_0x722a9b['replace'](/\/$/,'')+'/-/resize/'+_0x452ad4+'x/\x20'+_0x452ad4+'w');return{'imageFallbackUrl':_0x722a9b,'imageSources':[{'srcset':_0x461f2f['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1c05ef+'px)\x20100vw,\x20'+_0x1c05ef+'px','type':'image/webp'}]};}function F(_0x583e8e,_0x2fe374,_0x18a81e){const _0x1f5c68=_0x583e8e['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1f5c68?parseInt(_0x1f5c68[0x1],0xa):_0x2fe374,'height':_0x1f5c68?parseInt(_0x1f5c68[0x2],0xa):_0x18a81e};}function m(_0x1a19ae,_0x33a9b6){const _0x5800ac=Object['create'](_0x33a441),_0x17b0b3=_0x1a19ae['plugins']['get']('ImageUtils'),_0x2261f4=_0x1a19ae['editing']['mapper']['toViewElement'](_0x33a9b6),_0x5d6892=_0x17b0b3['findViewImgElement'](_0x2261f4),_0x609d43=_0x1a19ae['editing']['view']['domConverter']['viewToDom'](_0x5d6892),_0x1596fc=_0x33a9b6['getAttribute']('width'),_0x1c93d2=_0x33a9b6['getAttribute']('height'),_0x30019e='image-processing';_0x1a19ae['editing']['view']['change'](_0x1eed8a=>{_0x1eed8a['addClass'](_0x30019e,_0x2261f4),_0x1eed8a['setStyle']('aspect-ratio',_0x1596fc+'/'+_0x1c93d2,_0x5d6892);}),_0x5800ac['listenTo'](_0x609d43,'load',()=>{_0x5800ac['stopListening'](_0x609d43,'load'),_0x1a19ae['editing']['view']['change'](_0x5ae893=>{_0x5ae893['removeClass'](_0x30019e,_0x2261f4),_0x5ae893['removeStyle']('aspect-ratio',_0x5d6892);});});}function R(_0x5801fa){if(Array['isArray'](_0x5801fa)){const _0x431971=_0x5801fa['map'](R);return _0x48605c=>_0x431971['some'](_0x515917=>_0x515917(_0x48605c));}if('origin'==_0x5801fa){const _0xfeb5fb=_0x54c10e['window']['location']['origin'];return _0x4eb34a=>new URL(_0x4eb34a,_0x54c10e['document']['baseURI'])['origin']==_0xfeb5fb;}return'function'==typeof _0x5801fa?_0x5801fa:_0x5801fa instanceof RegExp?_0x3ea366=>!(!_0x3ea366['match'](_0x5801fa)&&!_0x3ea366['replace'](/^https?:\/\//,'')['match'](_0x5801fa)):()=>!0x1;}function M(_0x57fc0a,_0xb09890){return _0x4f4bd0(_0x57fc0a['target'])['includes'](_0xb09890);}class l extends/* #__PURE__ -- @preserve */
24
- _0x464e64(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x8fbe00,_0x50cf72,_0x50fe3a){super(),this['_editor']=_0x8fbe00,this['_editing']=_0x50cf72,this['_dialog']=_0x8fbe00['plugins']['get'](_0x307410),this['_api']=_0x50cf72['ctxElement']['getAPI'](),this['_type']=_0x50fe3a,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:_0x736931,model:_0xc7494b}=this['_editor'],_0x6e31d5=_0xc7494b['document']['selection']['getSelectedElement'](),_0x598fab=_0x6e31d5&&(_0x6e31d5['is']('element','imageBlock')||_0x6e31d5['is']('element','imageInline'));this['_formView']=new S(_0x736931),this['_dialog']['show']({'id':'uploadCare','icon':_0x1b9970,'title':x(_0x736931,this['_type'],_0x598fab?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x125e54['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x27a491=>!M(_0x27a491,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5d006b}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2b9da7=>{const _0x5950bb=_0x5d006b['length'];for(const _0x5e61e7 of _0x5d006b){const _0x18d18a=_0x5e61e7===_0x5d006b[_0x5950bb-0x1],{cdnUrl:_0x555bc1,fileInfo:_0x36b7c7}=_0x5e61e7;if(!_0x555bc1||!_0x36b7c7)continue;const {width:_0x2f7142,height:_0x5d2c1d}=_0x36b7c7['imageInfo'],_0xee30c3=F(_0x555bc1,_0x2f7142,_0x5d2c1d),_0x254958=E(_0x555bc1,_0xee30c3['width']),_0xeb68c6={'id':_0x36b7c7['uuid'],'type':'image','attributes':{'imageDimension':_0xee30c3,..._0x254958}};this['_insertAsset'](_0xeb68c6,_0x18d18a,_0x2b9da7);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x13aa77=>{'idle'===_0x13aa77['detail']['status']&&!_0x13aa77['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x2cda4c,_0x2c6e04,_0x5cb8fb){const _0x1f7be8=this['_editor']['model']['document']['selection'],_0x580b68=_0x1f7be8['getSelectedElement'](),_0x23f339=!(!_0x580b68||!_0x580b68['is']('element','imageInline'));_0x5cb8fb['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x2cda4c,_0x23f339),_0x2c6e04||_0x5cb8fb['setSelection'](_0x1f7be8['getLastPosition']());}['_insertImage'](_0x37b594,_0x3c966a){const _0x45e247=this['_editor'],{imageDimension:_0x34d84c,imageFallbackUrl:_0x577c6c,imageSources:_0xb6aa38}=_0x37b594['attributes'];_0x45e247['execute']('insertImage',{'imageType':_0x3c966a?'imageInline':null,'source':{'uploadcareImageId':_0x37b594['id'],'src':_0x577c6c,'sources':_0xb6aa38,..._0x34d84c}});}}class n extends _0x22905a{['_editing'];['_controller']=null;static get['requires'](){return[_0x307410,i];}constructor(_0x16e35c){super(_0x16e35c),this['_editing']=_0x16e35c['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x36efb0){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x36efb0);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x56a4b6,publicKey:_0x16be40,signal:_0x2d905f,onProgress:_0x182163}){return _0x27f1d8(_0x56a4b6,{'publicKey':_0x16be40,'store':'auto','signal':_0x2d905f,'onProgress':_0x182163});}static['getInfo'](_0x86b2a8,_0x42bc9){return _0x58d3ec(_0x86b2a8,_0x42bc9);}}class p extends _0x44f695{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x14bb78,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1c803a=this['editor'];if(!!!_0x1c803a['config']['get']('uploadcare'))return;_0x1c803a['plugins']['get'](_0x14bb78)['createUploadAdapter']=_0x8944ee=>new A(_0x8944ee,_0x1c803a),_0x1c803a['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x598d97,{imageElement:_0x35bd12,data:_0xdc3d02})=>{_0x1c803a['model']['change'](_0x434f7c=>{_0x434f7c['setAttribute']('uploadcareImageId',_0xdc3d02['uploadcareImageId'],_0x35bd12);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x386454,_0x443756){this['loader']=_0x386454,this['editor']=_0x443756,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xda6bb3=this['editor']['config']['get']('uploadcare.pubkey'),_0x475e04=await this['loader']['file'];return C['upload']({'file':_0x475e04,'publicKey':_0xda6bb3,'signal':this['controller']['signal'],'onProgress':_0x3ffe7f=>{_0x3ffe7f&&_0x3ffe7f['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3ffe7f['value']);}})['then'](async _0x42ba80=>{const {imageFallbackUrl:_0x592d0d,imageSources:_0x2b5969}=E(_0x42ba80['cdnUrl'],_0x42ba80['imageInfo']['width']);return{'uploadcareImageId':_0x42ba80['uuid'],'default':_0x592d0d,'sources':_0x2b5969};})['catch'](()=>{const _0x16f869=t('Cannot\x20upload\x20file:')+('\x20'+_0x475e04['name']+'.');return Promise['reject'](_0x16f869);});}['abort'](){this['controller']['abort']();}}class i extends _0x44f695{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x307410];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x5ee7d2=this['editor'];_0x5ee7d2['commands']['add']('uploadcare',new n(_0x5ee7d2));}['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 _0x3e10ae=_0x54c10e['document']['querySelector']('input[uploadcare-file-input]');_0x3e10ae&&_0x3e10ae['remove']();}),async function(_0x276961){const _0x1bb749=_0x3c0c01([0x31,0x69,0x70,0x6a,0x61,0x47,0x78,0x50,0x48,0x66,0x6c,0x35,0x71,0x36,0x68,0x6d,0x58,0x43,0x32,0x74,0x75,0x33,0x30,0x67,0x76,0x6f,0x39,0x46,0x51,0x6b,0x5a,0x4a,0x63,0x54,0x4e,0x4d,0x41,0x73,0x57,0x65,0x4f,0x59,0x34,0x6e,0x4b,0x38,0x4c,0x55,0x37,0x62,0x53,0x64,0x45,0x44,0x52,0x72,0x56,0x79,0x42,0x7a,0x77,0x49]),_0xaebf71=0x39b5577e,_0x520c95=0x39b2084e^_0xaebf71,_0x273ae3=window[_0x3c0c01([0x44,0x61,0x74,0x65])][_0x3c0c01([0x6e,0x6f,0x77])](),_0x186de5=_0x276961[_0x3c0c01([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x24a9aa=new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ea3f7=>{_0x186de5[_0x3c0c01([0x6f,0x6e,0x63,0x65])](_0x3c0c01([0x72,0x65,0x61,0x64,0x79]),_0x1ea3f7);}),_0x59ab02={[_0x3c0c01([0x6b,0x74,0x79])]:_0x3c0c01([0x45,0x43]),[_0x3c0c01([0x75,0x73,0x65])]:_0x3c0c01([0x73,0x69,0x67]),[_0x3c0c01([0x63,0x72,0x76])]:_0x3c0c01([0x50,0x2d,0x32,0x35,0x36]),[_0x3c0c01([0x78])]:_0x3c0c01([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]),[_0x3c0c01([0x79])]:_0x3c0c01([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]),[_0x3c0c01([0x61,0x6c,0x67])]:_0x3c0c01([0x45,0x53,0x32,0x35,0x36])},_0xdfaf3d=_0x186de5[_0x3c0c01([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3c0c01([0x67,0x65,0x74])](_0x3c0c01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x27ab6a(){let _0x38b205,_0x109b1d=null,_0x5f8b1e=null;try{if(_0xdfaf3d==_0x3c0c01([0x47,0x50,0x4c]))return _0x3c0c01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x38b205=_0x3b457a(),!_0x38b205)return _0x3c0c01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x38b205[_0x3c0c01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5f8b1e=_0xf7ed3a(_0x38b205[_0x3c0c01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x38b205[_0x3c0c01([0x6a,0x74,0x69])])),await _0x7be077()?_0x315979()?_0x4f3131()?_0x3c0c01([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3f0082()?(_0x38b205[_0x3c0c01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c0c01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x109b1d=_0x49a218(_0x3c0c01([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x38b205[_0x3c0c01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c0c01([0x74,0x72,0x69,0x61,0x6c])&&(_0x109b1d=_0x49a218(_0x3c0c01([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a956e()):_0x3c0c01([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3c0c01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3c0c01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1f865a){return _0x3c0c01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4f3131(){const _0x4ddd5d=[_0x3c0c01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3c0c01([0x74,0x72,0x69,0x61,0x6c])][_0x3c0c01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38b205[_0x3c0c01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x273ae3/0x3e8:0xe10*_0x520c95;return _0x38b205[_0x3c0c01([0x65,0x78,0x70])]<_0x4ddd5d;}function _0x315979(){const _0x2bab7c=_0x38b205[_0x3c0c01([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2bab7c&&(!!_0x2bab7c[_0x3c0c01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c0c01([0x2a]))||!!_0x2bab7c[_0x3c0c01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c0c01([0x55,0x50,0x4c,0x43])));}function _0x3f0082(){const _0x45623d=_0x38b205[_0x3c0c01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x45623d||0x0==_0x45623d[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x199856}=new URL(window[_0x3c0c01([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x45623d[_0x3c0c01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x199856))return!0x0;const _0x35b81b=_0x199856[_0x3c0c01([0x73,0x70,0x6c,0x69,0x74])](_0x3c0c01([0x2e]));return _0x45623d[_0x3c0c01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x233e6d=>_0x233e6d[_0x3c0c01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c0c01([0x2a])))[_0x3c0c01([0x6d,0x61,0x70])](_0x40a55c=>_0x40a55c[_0x3c0c01([0x73,0x70,0x6c,0x69,0x74])](_0x3c0c01([0x2e])))[_0x3c0c01([0x73,0x6f,0x6d,0x65])](_0x4b3494=>_0x35b81b[_0x3c0c01([0x65,0x76,0x65,0x72,0x79])]((_0x59f1f8,_0x35da7c)=>_0x4b3494[_0x35da7c]===_0x59f1f8||_0x4b3494[_0x35da7c]===_0x3c0c01([0x2a])));}function _0x5a956e(){return _0x109b1d&&_0x5f8b1e?new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf4a0cc,_0x2b0cd2)=>{_0x109b1d[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0xf4a0cc,_0x2b0cd2),_0x5f8b1e[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0x152ad9=>{_0x152ad9!=_0x3c0c01([0x56,0x61,0x6c,0x69,0x64])&&_0xf4a0cc(_0x152ad9);},_0x2b0cd2);}):_0x109b1d||_0x5f8b1e||_0x3c0c01([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf7ed3a(_0x4b7d2a,_0x2f71c3){return new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cc07e=>{if(_0x3e8d8b())return _0x3cc07e(_0x3c0c01([0x56,0x61,0x6c,0x69,0x64]));_0x463494(),_0x186de5[_0x3c0c01([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3c0c01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x195725=!0x1;const _0xb894a3=_0x476afb();function _0x2711d2(_0x189267){return!!_0x189267&&(typeof _0x189267===_0x3c0c01([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x189267===_0x3c0c01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x189267[_0x3c0c01([0x74,0x68,0x65,0x6e])]===_0x3c0c01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x189267[_0x3c0c01([0x63,0x61,0x74,0x63,0x68])]===_0x3c0c01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3ed81f(_0x1d003d){_0x216b36(_0x1d003d)[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0x34b55f=>{if(!_0x34b55f||_0x34b55f[_0x3c0c01([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3c0c01([0x6f,0x6b]))return _0x3c0c01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5e2239(_0x41c424(_0xb894a3+_0x2f71c3))!=_0x34b55f[_0x3c0c01([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3c0c01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3c0c01([0x56,0x61,0x6c,0x69,0x64]);})[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0x3395fd=>(_0x3bc61a(),_0x3395fd),()=>{const _0x37a7d3=_0x3b7984();return null==_0x37a7d3?(_0x3bc61a(),_0x3c0c01([0x56,0x61,0x6c,0x69,0x64])):_0x3c0c01(_0x273ae3-_0x37a7d3>(0x1db9d37e^_0xaebf71)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0x3cc07e)[_0x3c0c01([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3cc07e(_0x3c0c01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x550660=0x3983b9fe^_0xaebf71;function _0x3bc61a(){const _0x508361=_0x3c0c01([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e2239(_0x41c424(_0x4b7d2a)),_0x47c202=_0x149c21(_0x5e2239(window[_0x3c0c01([0x4d,0x61,0x74,0x68])][_0x3c0c01([0x63,0x65,0x69,0x6c])](_0x273ae3/_0x550660)));window[_0x3c0c01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c0c01([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x508361,_0x47c202);}function _0x3b7984(){const _0x3b0acb=_0x3c0c01([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e2239(_0x41c424(_0x4b7d2a)),_0x46211c=window[_0x3c0c01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c0c01([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b0acb);return _0x46211c?window[_0x3c0c01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x149c21(_0x46211c),0x10)*_0x550660:null;}function _0x216b36(_0x400bff){return new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5ad0c6,_0x3e259d)=>{_0x400bff[_0x3c0c01([0x74,0x68,0x65,0x6e])](_0x5ad0c6,_0x3e259d),window[_0x3c0c01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e259d,0x39b483be^_0xaebf71);});}}_0x186de5[_0x3c0c01([0x6f,0x6e])](_0x3c0c01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x56ed4b,_0x393f9c)=>{if(_0x393f9c[0x0]!=_0x4b7d2a)return _0x3cc07e(_0x3c0c01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x393f9c[0x1]={..._0x393f9c[0x1],[_0x3c0c01([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xb894a3};},{[_0x3c0c01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c0c01([0x68,0x69,0x67,0x68])}),_0x186de5[_0x3c0c01([0x6f,0x6e])](_0x3c0c01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xc402a3=>{_0x2711d2(_0xc402a3[_0x3c0c01([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x195725=!0x0,_0x3ed81f(_0xc402a3[_0x3c0c01([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3c0c01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c0c01([0x6c,0x6f,0x77])}),_0x24a9aa[_0x3c0c01([0x74,0x68,0x65,0x6e])](()=>{_0x195725||_0x3cc07e(_0x3c0c01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e8d8b(){return _0x186de5[_0x3c0c01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c0c01([0x76,0x69,0x65,0x77])][_0x3c0c01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3c0c01([0x61,0x75,0x74,0x6f]);}function _0x463494(){_0x186de5[_0x3c0c01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c0c01([0x76,0x69,0x65,0x77])][_0x3c0c01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3c0c01([0x61,0x75,0x74,0x6f]);}}function _0x49a218(_0x1784fe){const _0x3183b5=[new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c3c5d=>setTimeout(_0x3c3c5d,0x39bc69b2^_0xaebf71)),_0x24a9aa[_0x3c0c01([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x104ce6=>{let _0x27dcb3=0x0;_0x186de5[_0x3c0c01([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c0c01([0x6f,0x6e])](_0x3c0c01([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x14dd1d,_0x507437)=>{_0x507437[0x0][_0x3c0c01([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x27dcb3++,_0x27dcb3==(0x39b55686^_0xaebf71)&&(_0x104ce6(),_0x14dd1d[_0x3c0c01([0x6f,0x66,0x66])]());});}))];return window[_0x3c0c01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3c0c01([0x72,0x61,0x63,0x65])](_0x3183b5)[_0x3c0c01([0x74,0x68,0x65,0x6e])](()=>_0x1784fe);}async function _0x4a2e0d(){await _0x24a9aa,_0x186de5[_0x3c0c01([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c0c01([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x17266a,_0x186de5[_0x3c0c01([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c0c01([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x17266a,_0x186de5[_0x3c0c01([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3c0c01([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4cdadc(_0x4442d8){const _0x523a2a=_0x4bb2e6();_0x186de5[_0x523a2a]=_0x3c0c01([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4442d8,_0x4442d8!=_0x3c0c01([0x56,0x61,0x6c,0x69,0x64])&&_0x4a2e0d();}function _0x4bb2e6(){const _0x3ea270=window[_0x3c0c01([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3c0c01([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3c0c01([0x6e,0x6f,0x77])]())[_0x3c0c01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3c0c01([0x2e]),'');let _0x31b482=_0x3c0c01([0x69]);for(let _0x1629a3=0x0;_0x1629a3<_0x3ea270[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1629a3+=0x2){let _0x19f8d9=window[_0x3c0c01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ea270[_0x3c0c01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1629a3,_0x1629a3+0x2));_0x19f8d9>=_0x1bb749[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x19f8d9-=_0x1bb749[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x31b482+=_0x1bb749[_0x19f8d9];}return _0x31b482;}function _0x3b457a(){const _0x5b335d=_0xdfaf3d[_0x3c0c01([0x73,0x70,0x6c,0x69,0x74])](_0x3c0c01([0x2e]));if(0x3!=_0x5b335d[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4cc2ff(_0x5b335d[0x1]);function _0x4cc2ff(_0x1900b8){const _0x1ac996=_0x4033f4(_0x1900b8);return _0x1ac996&&_0x52594d()?_0x1ac996:null;function _0x52594d(){const _0x54ffd9=_0x1ac996[_0x3c0c01([0x6a,0x74,0x69])],_0x5a61ef=window[_0x3c0c01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54ffd9[_0x3c0c01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x54ffd9[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4141a5={..._0x1ac996,[_0x3c0c01([0x6a,0x74,0x69])]:_0x54ffd9[_0x3c0c01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x54ffd9[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4141a5[_0x3c0c01([0x76,0x63])],_0x41c424(_0x4141a5)==_0x5a61ef;}}}async function _0x7be077(){let _0x5dec01=!0x0;try{const _0x10d070=_0xdfaf3d[_0x3c0c01([0x73,0x70,0x6c,0x69,0x74])](_0x3c0c01([0x2e])),[_0x59c39d,_0x1affb0,_0x7e4369]=_0x10d070;return _0x14effb(_0x59c39d),await _0x3b979b(_0x59c39d,_0x1affb0,_0x7e4369),_0x5dec01;}catch(_0x228b0a){return!0x1;}function _0x14effb(_0xb982b0){const _0x232431=_0x4033f4(_0xb982b0);_0x232431&&_0x232431[_0x3c0c01([0x61,0x6c,0x67])]==_0x3c0c01([0x45,0x53,0x32,0x35,0x36])||(_0x5dec01=!0x1);}async function _0x3b979b(_0x16d0eb,_0x31f31c,_0x2d57ee){const _0x5b649f=window[_0x3c0c01([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3c0c01([0x66,0x72,0x6f,0x6d])](_0x19e8ca(_0x2d57ee),_0x478d2f=>_0x478d2f[_0x3c0c01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x218318=new window[(_0x3c0c01([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3c0c01([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x16d0eb+_0x3c0c01([0x2e])+_0x31f31c),_0x106eba=window[_0x3c0c01([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3c0c01([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x106eba)return;const _0x1abb97=await _0x106eba[_0x3c0c01([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3c0c01([0x6a,0x77,0x6b]),_0x59ab02,{[_0x3c0c01([0x6e,0x61,0x6d,0x65])]:_0x3c0c01([0x45,0x43,0x44,0x53,0x41]),[_0x3c0c01([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3c0c01([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3c0c01([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x106eba[_0x3c0c01([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3c0c01([0x6e,0x61,0x6d,0x65])]:_0x3c0c01([0x45,0x43,0x44,0x53,0x41]),[_0x3c0c01([0x68,0x61,0x73,0x68])]:{[_0x3c0c01([0x6e,0x61,0x6d,0x65])]:_0x3c0c01([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1abb97,_0x5b649f,_0x218318)||(_0x5dec01=!0x1);}}function _0x4033f4(_0x347a37){return _0x347a37[_0x3c0c01([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3c0c01([0x65,0x79]))?JSON[_0x3c0c01([0x70,0x61,0x72,0x73,0x65])](_0x19e8ca(_0x347a37)):null;}function _0x19e8ca(_0x141bed){return window[_0x3c0c01([0x61,0x74,0x6f,0x62])](_0x141bed[_0x3c0c01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3c0c01([0x2b]))[_0x3c0c01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3c0c01([0x2f])));}function _0x41c424(_0x695a7d){let _0x53c108=0x1505;function _0xc81343(_0x278ac2){for(let _0x1b70a3=0x0;_0x1b70a3<_0x278ac2[_0x3c0c01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b70a3++){const _0xc401ab=_0x278ac2[_0x3c0c01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1b70a3);_0x53c108=(_0x53c108<<0x5)+_0x53c108+_0xc401ab,_0x53c108&=_0x53c108;}}function _0x562048(_0x449567){Array[_0x3c0c01([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x449567)?_0x449567[_0x3c0c01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x562048):_0x449567&&typeof _0x449567==_0x3c0c01([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3c0c01([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x449567)[_0x3c0c01([0x73,0x6f,0x72,0x74])]()[_0x3c0c01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9849e7,_0x34735b])=>{_0xc81343(_0x9849e7),_0x562048(_0x34735b);}):_0xc81343(window[_0x3c0c01([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x449567));}return _0x562048(_0x695a7d),_0x53c108>>>0x0;}function _0x5e2239(_0x23d6e2){return _0x23d6e2[_0x3c0c01([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3c0c01([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3c0c01([0x30]));}function _0x149c21(_0x35dd5d){return _0x35dd5d[_0x3c0c01([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3c0c01([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3c0c01([0x6a,0x6f,0x69,0x6e])]('');}function _0x17266a(){}function _0x3c0c01(_0x150e52){return _0x150e52['map'](_0x3b4e24=>String['fromCharCode'](_0x3b4e24))['join']('');}_0x4cdadc(await _0x27ab6a());}(this);}['_initSchema'](){const _0x1dd41c=this['editor']['model']['schema'];_0x1dd41c['isRegistered']('imageBlock')&&_0x1dd41c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1dd41c['isRegistered']('imageInline')&&_0x1dd41c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1930cd=this['editor'];_0x1930cd['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1930cd['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1c6237=>_0x1c6237['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x46fefc=_0x1930cd['commands']['get']('replaceImageSource');_0x46fefc&&this['listenTo'](_0x46fefc,'cleanupImage',(_0x535f32,[_0x5148c1,_0x67a322])=>{_0x5148c1['removeAttribute']('uploadcareImageId',_0x67a322);});}['_initConfig'](){const _0x2b2e63=this['editor']['config']['get']('uploadcare.uploader')||{},_0x448114=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x5b1d07(_0x54c10e['document'],'uc-config',{..._0x2b2e63,'pubkey':_0x448114,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x2f1fd2=>{if('closeMax'==_0x2f1fd2)return'#uc-icon-arrow-down';},_0x54c10e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x5b1d07(_0x54c10e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x54c10e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x198df1=this['editor']['commands']['get']('insertImage');_0x198df1&&this['listenTo'](_0x198df1,'execute',()=>{const _0x11cabb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x11cabb&&_0x11cabb['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x11cabb);});});const _0x4691a5=this['editor']['commands']['get']('uploadcareImageReplace');_0x4691a5&&this['listenTo'](_0x4691a5,'execute',()=>{const _0x19e01a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x19e01a&&_0x19e01a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x19e01a);});});}}class u extends _0x44f695{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4aa303){super(_0x4aa303),_0x4aa303['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x65e70a['defineComponents'](_0x65e70a);}}class ta extends _0x55f9eb{constructor(_0x3ec4a6){super(_0x3ec4a6);const t=_0x3ec4a6['t'],_0x406cdd=this['bindTemplate'],_0x5b65e4=new _0x2bd220();_0x5b65e4['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':[_0x5b65e4,{'text':_0x406cdd['to']('imageUploadProgress',_0x4050ed=>t('Loading\x20image...')+'\x20('+(_0x4050ed||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class rt extends _0x55f9eb{constructor(_0x5b849b){super(_0x5b849b);const t=_0x5b849b['t'];this['set']('errorType',null);const _0x507d2e=new _0x1c659d(_0x5b849b);_0x507d2e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x507d2e['withText']=!0x0,_0x507d2e['class']='ck-button-action',_0x507d2e['on']('execute',()=>{this['fire']('retry');}),_0x507d2e['bind']('isVisible')['to'](this,'errorType',_0x18a9fd=>'NotFound'!==_0x18a9fd);const _0x4ca2ef=new at();_0x4ca2ef['content']=et,_0x4ca2ef['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5d5158=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':[_0x4ca2ef,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5d5158['to']('errorType',_0x1f71c2=>t('NotFound'!==_0x1f71c2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x507d2e]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class tt extends _0x55f9eb{constructor(_0xecad9b,_0x1fc96c){super(_0xecad9b);const _0x491a3b=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1fc96c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x491a3b['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2c27a2,_0x1793fb,_0x15afd3){super(_0x2c27a2),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x2c27a2),this['_errorView']=new rt(_0x2c27a2),this['_editingView']=new tt(_0x2c27a2,_0x15afd3),this['_focusableView']=new _0x55f9eb(_0x2c27a2),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1793fb),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'],_0x1d1659=>{this['_addUploadcareImageEditorListeners'](_0x1d1659);});}),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'](_0xaf11f9,_0x37bb3c){const _0x244fc5='uc-cloud-image-editor',_0x8bda0=_0xaf11f9['querySelector'](_0x244fc5);if(_0x8bda0)return _0x37bb3c(_0x8bda0);const _0x47d0d0=new MutationObserver(_0x119621=>{const _0x5eb780=_0x119621['filter'](_0x3ee7dc=>_0x3ee7dc['target']===_0xaf11f9&&_0x3ee7dc['addedNodes']['length']>0x0&&_0x3ee7dc['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x244fc5);_0x5eb780['length']&&(_0x47d0d0['disconnect'](),_0x37bb3c(_0x5eb780[0x0]['addedNodes'][0x0]));});_0x47d0d0['observe'](_0xaf11f9,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x402ebf){_0x402ebf['addEventListener']('apply',_0x8e6033=>{this['fire']('apply',{'imageSrc':_0x8e6033['detail']['cdnUrl']});}),_0x402ebf['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Q extends/* #__PURE__ -- @preserve */
25
- _0x464e64(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x29960e,_0x37ae30,_0x2661ea){super(),this['_editor']=_0x29960e,this['_dialog']=_0x37ae30,this['_imageElement']=_0x2661ea,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 _0x47976d=this['_imageElement'],_0x8df049=_0x47976d['getAttribute']('uploadcareImageId'),_0x35d53f=_0x47976d['getAttribute']('src');if(_0x8df049)await this['_loadImageInfo'](_0x8df049,_0x35d53f);else{if(this['_imageCache']['has'](_0x35d53f)){const _0x1892a9=this['_imageCache']['get'](_0x35d53f);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1892a9['url'],this['imageDimension']=_0x1892a9['dimension'],this['imageId']=_0x1892a9['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3a68b1}=this['_editor'],t=_0x3a68b1['t'],_0x5dd57b=new ii(_0x3a68b1,this['imageStatus'],this['_attributes']);_0x5dd57b['bind']('status')['to'](this,'imageStatus'),_0x5dd57b['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5dd57b['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5dd57b['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5dd57b,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4cd61b,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5dd57b,'position':_0x125e54['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5dd57b['focus']();},'onHide':()=>{_0x5dd57b['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x50be0c=>!M(_0x50be0c,_0x5dd57b['element'])}});}['_loadImageInfo'](_0x5254a8,_0x4b4c27){return C['getInfo'](_0x5254a8,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x5d55f6=>{const {width:_0x38309f,height:_0x535995}=_0x5d55f6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4b4c27,this['imageDimension']={'width':_0x38309f,'height':_0x535995},this['imageId']=_0x5254a8;})['catch'](_0x384e6d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x384e6d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x10def4,_0x326030){return this['_getImageAsFile'](_0x10def4)['then'](_0x19814b=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x326030['signal'],'file':_0x19814b,'onProgress':_0xf35e32=>{_0xf35e32&&_0xf35e32['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xf35e32['value']));}}))['then'](_0x497e2d=>{const {width:_0x351618,height:_0x184688}=_0x497e2d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x497e2d['cdnUrl'],this['imageDimension']={'width':_0x351618,'height':_0x184688},this['imageId']=_0x497e2d['uuid'],this['imageUploadProgress']=null;const _0x5bc14e=_0x10def4['getAttribute']('src');this['_imageCache']['set'](_0x5bc14e,{'id':_0x497e2d['uuid'],'url':_0x497e2d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x254ed9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x254ed9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5c9a72,_0x354a2c){_0x5c9a72['on']('apply',(_0x4f45a4,_0x2678fe)=>{this['_replaceImage'](_0x354a2c,_0x2678fe['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5c9a72['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5c9a72['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1dadfb,_0x2280e4,_0x578a18){const _0x3716f9=this['_editor'],{width:_0x5ddca1,height:_0x46be17}=F(_0x2280e4,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x515666,imageSources:_0x1fdfae}=E(_0x2280e4,_0x5ddca1);_0x3716f9['model']['change'](_0x46dbf9=>{if('$graveyard'===_0x1dadfb['root']['rootName']){_0x3716f9['execute']('insertImage',{'imageType':_0x1dadfb['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1dadfb['getAttributes']()),'uploadcareImageId':_0x578a18,'src':_0x515666,'sources':_0x1fdfae,'width':_0x5ddca1,'height':_0x46be17}});const _0x4d8208=_0x1dadfb['getChildren']();_0x1dadfb=_0x3716f9['model']['document']['selection']['getSelectedElement']();for(const _0x58d806 of _0x4d8208)_0x46dbf9['append'](_0x46dbf9['cloneElement'](_0x58d806),_0x1dadfb);}else _0x46dbf9['setSelection'](_0x1dadfb,'on'),_0x3716f9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1dadfb['getAttributes']()),'uploadcareImageId':_0x578a18,'src':_0x515666,'sources':_0x1fdfae,'width':_0x5ddca1,'height':_0x46be17},_0x1dadfb);_0x46dbf9['setSelection'](_0x1dadfb,'on');});}async['_getImageAsFile'](_0x33ff6f){const _0x2256a9=_0x54c10e['window'],_0x36f2c7=_0x54c10e['document']['location']['href'],_0x5a6038=new _0x2256a9['URL'](_0x33ff6f['getAttribute']('src'),_0x36f2c7);if('data:'===_0x5a6038['protocol']){const _0x5db4f2=_0x5a6038['href']['split'](','),_0x12a1c3=_0x5db4f2[0x0]['match'](/:(.*?);/)[0x1],_0x1a915a=_0x12a1c3['split']('/')[0x1],_0x33ae0b=_0x2256a9['atob'](_0x5db4f2[_0x5db4f2['length']-0x1]);let _0x38bcc1=_0x33ae0b['length'];const _0x2413fc=new _0x2256a9['Uint8Array'](_0x38bcc1);for(;_0x38bcc1--;)_0x2413fc[_0x38bcc1]=_0x33ae0b['charCodeAt'](_0x38bcc1);return new _0x2256a9['File']([_0x2413fc],'image.'+_0x1a915a,{'type':_0x12a1c3});}const _0x104158=_0x5a6038['href']['split']('/'),_0x5c48fd=_0x104158[_0x104158['length']-0x1],_0xca0fdb=_0x5c48fd['split']('.')[0x1];return _0x2256a9['fetch'](_0x5a6038['href'])['then'](_0x2a9a28=>_0x2a9a28['clone']()['blob']())['then'](_0x2c9c45=>new _0x2256a9['File']([_0x2c9c45],_0x5c48fd,{'type':'image/'+_0xca0fdb}));}}class W extends _0x22905a{['imageEditController'];static get['requires'](){return[_0x307410];}['_isEditable'];constructor(_0x3922cd){super(_0x3922cd),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3ad76e){const _0x3e91ff=R(_0x3ad76e);return _0x5eb2a4=>!(!_0x5eb2a4||!_0x5eb2a4['is']('element','imageBlock')&&!_0x5eb2a4['is']('element','imageInline'))&&(!!_0x5eb2a4['hasAttribute']('uploadcareImageId')||!!_0x5eb2a4['hasAttribute']('src')&&_0x3e91ff(_0x5eb2a4['getAttribute']('src')));}(_0x3922cd['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x18507a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x18507a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x12598c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x12598c&&(_0x12598c['is']('element','imageBlock')||_0x12598c['is']('element','imageInline'))&&(this['imageEditController']=new Q(this['editor'],this['editor']['plugins']['get'](_0x307410),_0x12598c),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class Y extends _0x22905a{['refresh'](){const _0x386726=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x386726&&(_0x386726['is']('element','imageBlock')||_0x386726['is']('element','imageInline')));}['execute'](_0x2ba096){const _0xd4be0e=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x57c812=>{_0x57c812['setAttributes'](_0x2ba096,_0xd4be0e),_0x57c812['removeAttribute']('srcset',_0xd4be0e),_0x57c812['removeAttribute']('sizes',_0xd4be0e);});}}class g extends _0x44f695{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x3a7d5d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1b111f}=this;_0x1b111f['commands']['add']('uploadcareImageEdit',new W(_0x1b111f)),_0x1b111f['commands']['add']('uploadcareImageReplace',new Y(_0x1b111f));}}class j extends _0x44f695{['_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 _0x4c784a=this['editor'];_0x4c784a['ui']['componentFactory']['add']('uploadcareImageEdit',_0x17106f=>{const _0x430e63=_0x4c784a['commands']['get']('uploadcareImageEdit'),_0x3a2792=new _0x1c659d(_0x17106f),t=_0x17106f['t'];return _0x3a2792['set']({'icon':_0x4cd61b,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3a2792['bind']('isEnabled')['to'](_0x430e63),_0x3a2792['bind']('isOn')['to'](_0x430e63,'isActive'),this['listenTo'](_0x3a2792,'execute',()=>{_0x4c784a['execute']('uploadcareImageEdit'),_0x4c784a['editing']['view']['focus']();}),_0x3a2792;}),this['_initConfig']();}['_initConfig'](){const _0x16413d=_0x5b1d07(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x16413d),this['listenTo'](this['editor'],'destroy',()=>{_0x16413d['remove']();});}}class P extends _0x44f695{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
23
+ import{Plugin as _0x2544ae,Command as _0x76a7f9}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2181f0,IconInstagram as _0x337e8c,IconGooglePhotos as _0x51fdc4,IconGoogleDrive as _0x3d7f87,IconFacebook as _0x4fbc52,IconDropbox as _0x104c24,IconUploadcareLink as _0xc13d9c,IconUploadcareImageUpload as _0x36b33b,IconError as et,IconUploadcareImageEdit as _0x3aa786}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x5b9268,MenuBarMenuListItemButtonView as _0x29028f,View as _0x334409,FocusCycler as _0xb392a6,Dialog as _0x3ffdfe,DialogViewPosition as _0xa4f76d,SpinnerView as _0x2da488,IconView as at,Notification as _0x3cbf33}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x27ca56,DomEmitterMixin as _0x53cc36,global as _0x4244d7,getAncestors as _0x118af3,ObservableMixin as _0x2e1d99,createElement as _0x4abd0f,uid as _0x1c0462}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2b96ce}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x30aec0,info as _0xaa2859}from'@uploadcare/upload-client';import*as _0x24dc53 from'@uploadcare/file-uploader';var o=function(_0x6309b7){return _0x6309b7['Local']='local',_0x6309b7['URL']='url',_0x6309b7['Dropbox']='dropbox',_0x6309b7['GDrive']='gdrive',_0x6309b7['Facebook']='facebook',_0x6309b7['GPhotos']='gphotos',_0x6309b7['Instagram']='instagram',_0x6309b7['OneDrive']='onedrive',_0x6309b7;}({});function x(_0x2b0b5e,_0x46418c,_0x5f148a){const t=_0x2b0b5e['t'],_0x560d64=_0x2b0b5e['t'];switch(_0x46418c){case o['Local']:return{'text':_0x560d64('Insert'===_0x5f148a?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x560d64('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x5f148a?_0x560d64('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x560d64('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x5f148a?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x46418c;}}class e extends _0x2544ae{['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 _0x3cf6e8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23e365;for(const _0x582fcb in _0x3cf6e8){const _0x17d57a=_0x582fcb,_0x15d7d1=_0x3cf6e8[_0x17d57a];if('uploadcareLicenseKeyValid'==_0x15d7d1||'uploadcareLicenseKeyInvalid'==_0x15d7d1||'uploadcareLicenseKeyExpired'==_0x15d7d1||'uploadcareLicenseKeyDomainLimit'==_0x15d7d1||'uploadcareLicenseKeyNotAllowed'==_0x15d7d1||'uploadcareLicenseKeyEvaluationLimit'==_0x15d7d1||'uploadcareLicenseKeyTrialLimit'==_0x15d7d1||'uploadcareLicenseKeyUsageLimit'==_0x15d7d1){delete _0x3cf6e8[_0x17d57a],_0x23e365=_0x15d7d1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x23e365&&_0x3cf6e8['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x23e365&&_0x3cf6e8['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x23e365&&_0x3cf6e8['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x23e365&&_0x3cf6e8['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4cd75c}=this,_0x399e29=_0x4cd75c['commands']['get']('uploadcare');if(!_0x399e29)return;const _0x37c338=this['_normalizeConfigSourceList'](_0x4cd75c['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4954b6,_0x1a184a)=>{const _0x1d3e73=this['_getIntegrationKey'](_0x1a184a['type']);return _0x4954b6[_0x1d3e73]||(_0x4954b6[_0x1d3e73]=[]),_0x4954b6[_0x1d3e73]['push'](_0x1a184a),_0x4954b6;},{});_0x4cd75c['plugins']['has']('ImageInsertUI')&&_0x4cd75c['commands']['get']('uploadcare')&&Object['entries'](_0x37c338)['forEach'](([_0xe2ddd3,_0x4f0475])=>{_0x4cd75c['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xe2ddd3,'observable':()=>_0x399e29,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4f0475),'formViewCreator':()=>this['_createDropdownButtons'](_0x4f0475),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4f0475),'override':'assetManager'!==_0xe2ddd3});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5ef0ce){const {locale:_0xd300e6}=this['editor'];return _0x5ef0ce['map'](_0x2554fc=>{const _0x424dc4=x(_0xd300e6,_0x2554fc,'Insert');switch(_0x2554fc){case o['Local']:return{'icon':_0x36b33b,'type':o['Local'],..._0x424dc4};case o['URL']:return{'icon':_0xc13d9c,'type':o['URL'],..._0x424dc4};case o['Dropbox']:return{'icon':_0x104c24,'type':o['Dropbox'],..._0x424dc4};case o['Facebook']:return{'icon':_0x4fbc52,'type':o['Facebook'],..._0x424dc4};case o['GDrive']:return{'icon':_0x3d7f87,'type':o['GDrive'],..._0x424dc4};case o['GPhotos']:return{'icon':_0x51fdc4,'type':o['GPhotos'],..._0x424dc4};case o['Instagram']:return{'icon':_0x337e8c,'type':o['Instagram'],..._0x424dc4};case o['OneDrive']:return{'icon':_0x2181f0,'type':o['OneDrive'],..._0x424dc4};}});}['_getIntegrationKey'](_0x49be89){switch(_0x49be89){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1c9761,_0x3ed193){const _0x2a40eb=this['editor'],_0x1d6ba2=new _0x1c9761(_0x2a40eb['locale']),_0x29a519=_0x2a40eb['commands']['get']('uploadcare');return _0x1d6ba2['bind']('isEnabled')['to'](_0x29a519),_0x1d6ba2['on']('execute',()=>{_0x29a519['execute'](_0x3ed193);}),_0x1d6ba2;}['_createToolbarButton'](_0x425495){const {locale:_0x13661b}=this['editor'],_0x58992a=this['editor']['plugins']['get']('ImageInsertUI'),_0x20f9ae=_0x425495[0x0],_0x246f2d=this['_createButton'](_0x5b9268,_0x20f9ae['type']);return _0x246f2d['icon']=_0x20f9ae['icon'],_0x246f2d['bind']('label')['to'](_0x58992a,'isImageSelected',_0x5d7fd2=>x(_0x13661b,_0x20f9ae['type'],_0x5d7fd2?'Replace':'Insert')['text']),_0x246f2d['tooltip']=!0x0,_0x246f2d;}['_createDropdownButtons'](_0x2fcdcb){const {locale:_0x403f65}=this['editor'],_0xc57703=this['editor']['plugins']['get']('ImageInsertUI');return _0x2fcdcb['map'](_0x1a34f3=>{const _0x4a68c9=this['_createButton'](_0x5b9268,_0x1a34f3['type']);return _0x4a68c9['withText']=!0x0,_0x4a68c9['icon']=_0x1a34f3['icon'],_0x4a68c9['bind']('label')['to'](_0xc57703,'isImageSelected',_0x5b7273=>x(_0x403f65,_0x1a34f3['type'],_0x5b7273?'Replace':'Insert')['text']),_0x4a68c9;});}['_createMenuBarButtons'](_0x3d705a){return _0x3d705a['map'](_0x31f490=>{const _0x4d7be6=this['_createButton'](_0x29028f,_0x31f490['type']);return _0x4d7be6['icon']=_0x31f490['icon'],_0x4d7be6['label']=_0x31f490['shortText'],_0x4d7be6;});}}class q extends _0x334409{['focusTracker'];['focusCycler'];constructor(_0x525673){super(_0x525673),this['focusTracker']=new _0x27ca56(),this['focusCycler']=new _0xb392a6({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x48e1a7){super(_0x48e1a7),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x55701a,_0x4140e3){const _0x4886e7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x16afc2=>_0x16afc2<=_0x4140e3)['map'](_0x354460=>_0x55701a['replace'](/\/$/,'')+'/-/resize/'+_0x354460+'x/\x20'+_0x354460+'w');return{'imageFallbackUrl':_0x55701a,'imageSources':[{'srcset':_0x4886e7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4140e3+'px)\x20100vw,\x20'+_0x4140e3+'px','type':'image/webp'}]};}function F(_0x19a3ac,_0xa0ecb5,_0x230f8b){const _0xf7bb2d=_0x19a3ac['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xf7bb2d?parseInt(_0xf7bb2d[0x1],0xa):_0xa0ecb5,'height':_0xf7bb2d?parseInt(_0xf7bb2d[0x2],0xa):_0x230f8b};}function m(_0x45a123,_0x48d31d){const _0x25763b=Object['create'](_0x53cc36),_0x56b0d9=_0x45a123['plugins']['get']('ImageUtils'),_0x59f774=_0x45a123['editing']['mapper']['toViewElement'](_0x48d31d),_0x506319=_0x56b0d9['findViewImgElement'](_0x59f774),_0x2a2443=_0x45a123['editing']['view']['domConverter']['viewToDom'](_0x506319),_0x49c395=_0x48d31d['getAttribute']('width'),_0x1c45b5=_0x48d31d['getAttribute']('height'),_0x5bf03f='image-processing';_0x45a123['editing']['view']['change'](_0x4146c6=>{_0x4146c6['addClass'](_0x5bf03f,_0x59f774),_0x4146c6['setStyle']('aspect-ratio',_0x49c395+'/'+_0x1c45b5,_0x506319);}),_0x25763b['listenTo'](_0x2a2443,'load',()=>{_0x25763b['stopListening'](_0x2a2443,'load'),_0x45a123['editing']['view']['change'](_0x40a63c=>{_0x40a63c['removeClass'](_0x5bf03f,_0x59f774),_0x40a63c['removeStyle']('aspect-ratio',_0x506319);});});}function W(_0x564059){if(Array['isArray'](_0x564059)){const _0x41a5cf=_0x564059['map'](W);return _0x4de4d7=>_0x41a5cf['some'](_0x4f78f6=>_0x4f78f6(_0x4de4d7));}if('origin'==_0x564059){const _0x613e3a=_0x4244d7['window']['location']['origin'];return _0x526bb0=>new URL(_0x526bb0,_0x4244d7['document']['baseURI'])['origin']==_0x613e3a;}return'function'==typeof _0x564059?_0x564059:_0x564059 instanceof RegExp?_0x4667ee=>!(!_0x4667ee['match'](_0x564059)&&!_0x4667ee['replace'](/^https?:\/\//,'')['match'](_0x564059)):()=>!0x1;}function M(_0x13398c,_0x1e688c){return _0x118af3(_0x13398c['target'])['includes'](_0x1e688c);}class l extends/* #__PURE__ -- @preserve */
24
+ _0x2e1d99(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x49a67f,_0x555ab2,_0x2fa2bb){super(),this['_editor']=_0x49a67f,this['_editing']=_0x555ab2,this['_dialog']=_0x49a67f['plugins']['get'](_0x3ffdfe),this['_api']=_0x555ab2['ctxElement']['getAPI'](),this['_type']=_0x2fa2bb,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:_0x1af5c0,model:_0x26c6a8}=this['_editor'],_0x3e8977=_0x26c6a8['document']['selection']['getSelectedElement'](),_0x3eb479=_0x3e8977&&(_0x3e8977['is']('element','imageBlock')||_0x3e8977['is']('element','imageInline'));this['_formView']=new S(_0x1af5c0),this['_dialog']['show']({'id':'uploadCare','icon':_0x36b33b,'title':x(_0x1af5c0,this['_type'],_0x3eb479?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xa4f76d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x253002=>!M(_0x253002,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x28823a}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5ef37a=>{const _0x560d27=_0x28823a['length'];for(const _0x1f1d25 of _0x28823a){const _0x1b3669=_0x1f1d25===_0x28823a[_0x560d27-0x1],{cdnUrl:_0x1b4458,fileInfo:_0x51e81c}=_0x1f1d25;if(!_0x1b4458||!_0x51e81c)continue;const {width:_0x4a99a0,height:_0x482364}=_0x51e81c['imageInfo'],_0x561ecc=F(_0x1b4458,_0x4a99a0,_0x482364),_0x4b9830=E(_0x1b4458,_0x561ecc['width']),_0x84b678={'id':_0x51e81c['uuid'],'type':'image','attributes':{'imageDimension':_0x561ecc,..._0x4b9830}};this['_insertAsset'](_0x84b678,_0x1b3669,_0x5ef37a);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x433fd6=>{'idle'===_0x433fd6['detail']['status']&&!_0x433fd6['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3b8308,_0x21c6e7,_0x4c7cca){const _0x26dd73=this['_editor']['model']['document']['selection'],_0x54e57f=_0x26dd73['getSelectedElement'](),_0x463e31=!(!_0x54e57f||!_0x54e57f['is']('element','imageInline'));_0x4c7cca['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3b8308,_0x463e31),_0x21c6e7||_0x4c7cca['setSelection'](_0x26dd73['getLastPosition']());}['_insertImage'](_0x5072bb,_0x59bb8c){const _0xca5541=this['_editor'],{imageDimension:_0x2de129,imageFallbackUrl:_0x1309fb,imageSources:_0x2e5cfe}=_0x5072bb['attributes'];_0xca5541['execute']('insertImage',{'imageType':_0x59bb8c?'imageInline':null,'source':{'uploadcareImageId':_0x5072bb['id'],'src':_0x1309fb,'sources':_0x2e5cfe,..._0x2de129}});}}class n extends _0x76a7f9{['_editing'];['_controller']=null;static get['requires'](){return[_0x3ffdfe,i];}constructor(_0x58deaf){super(_0x58deaf),this['_editing']=_0x58deaf['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2bc388){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x2bc388);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x36a75a,publicKey:_0x1b9088,signal:_0xeaa74a,onProgress:_0x28c503}){return _0x30aec0(_0x36a75a,{'publicKey':_0x1b9088,'store':'auto','signal':_0xeaa74a,'onProgress':_0x28c503});}static['getInfo'](_0x46bf1f,_0x193151){return _0xaa2859(_0x46bf1f,_0x193151);}}class p extends _0x2544ae{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2b96ce,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2fe6d7=this['editor'];if(!!!_0x2fe6d7['config']['get']('uploadcare'))return;_0x2fe6d7['plugins']['get'](_0x2b96ce)['createUploadAdapter']=_0x2f303b=>new A(_0x2f303b,_0x2fe6d7),_0x2fe6d7['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4974ba,{imageElement:_0x49a15e,data:_0x1319ad})=>{_0x2fe6d7['model']['change'](_0x3058ba=>{_0x3058ba['setAttribute']('uploadcareImageId',_0x1319ad['uploadcareImageId'],_0x49a15e);});});}}class A{['loader'];['editor'];['controller'];constructor(_0xfaeb3e,_0x489e68){this['loader']=_0xfaeb3e,this['editor']=_0x489e68,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1bd360=this['editor']['config']['get']('uploadcare.pubkey'),_0x332c41=await this['loader']['file'];return C['upload']({'file':_0x332c41,'publicKey':_0x1bd360,'signal':this['controller']['signal'],'onProgress':_0x541eff=>{_0x541eff&&_0x541eff['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x541eff['value']);}})['then'](async _0x3b02d2=>{const {imageFallbackUrl:_0x1f7483,imageSources:_0x494421}=E(_0x3b02d2['cdnUrl'],_0x3b02d2['imageInfo']['width']);return{'uploadcareImageId':_0x3b02d2['uuid'],'default':_0x1f7483,'sources':_0x494421};})['catch'](()=>{const _0x1c6d40=t('Cannot\x20upload\x20file:')+('\x20'+_0x332c41['name']+'.');return Promise['reject'](_0x1c6d40);});}['abort'](){this['controller']['abort']();}}class i extends _0x2544ae{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x3ffdfe];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x436737=this['editor'];_0x436737['commands']['add']('uploadcare',new n(_0x436737));}['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 _0x244643=_0x4244d7['document']['querySelector']('input[uploadcare-file-input]');_0x244643&&_0x244643['remove']();}),async function(_0x4ae13d){const _0x2e868a=_0x4e8bb6([0x51,0x47,0x38,0x57,0x4f,0x46,0x6e,0x36,0x77,0x7a,0x56,0x55,0x6d,0x42,0x48,0x70,0x75,0x6f,0x41,0x44,0x76,0x37,0x67,0x4d,0x73,0x64,0x63,0x4a,0x4b,0x61,0x49,0x58,0x5a,0x39,0x50,0x71,0x68,0x69,0x74,0x6a,0x6c,0x45,0x32,0x78,0x65,0x35,0x4c,0x52,0x54,0x72,0x33,0x66,0x59,0x6b,0x30,0x43,0x79,0x4e,0x34,0x53,0x31,0x62]),_0x3b2c18=0x114ca2e9,_0x27cbe6=0x114bfda1^_0x3b2c18,_0x8ca4df=window[_0x4e8bb6([0x44,0x61,0x74,0x65])][_0x4e8bb6([0x6e,0x6f,0x77])](),_0x2849b5=_0x4ae13d[_0x4e8bb6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2a706f=new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x359500=>{_0x2849b5[_0x4e8bb6([0x6f,0x6e,0x63,0x65])](_0x4e8bb6([0x72,0x65,0x61,0x64,0x79]),_0x359500);}),_0x1d3c7f={[_0x4e8bb6([0x6b,0x74,0x79])]:_0x4e8bb6([0x45,0x43]),[_0x4e8bb6([0x75,0x73,0x65])]:_0x4e8bb6([0x73,0x69,0x67]),[_0x4e8bb6([0x63,0x72,0x76])]:_0x4e8bb6([0x50,0x2d,0x32,0x35,0x36]),[_0x4e8bb6([0x78])]:_0x4e8bb6([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]),[_0x4e8bb6([0x79])]:_0x4e8bb6([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]),[_0x4e8bb6([0x61,0x6c,0x67])]:_0x4e8bb6([0x45,0x53,0x32,0x35,0x36])},_0x877605=_0x2849b5[_0x4e8bb6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4e8bb6([0x67,0x65,0x74])](_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x437ce3(){let _0x2111f5,_0x43771a=null,_0x28088d=null;try{if(_0x877605==_0x4e8bb6([0x47,0x50,0x4c]))return _0x4e8bb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2111f5=_0x218b03(),!_0x2111f5)return _0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2111f5[_0x4e8bb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x28088d=_0x523ff1(_0x2111f5[_0x4e8bb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2111f5[_0x4e8bb6([0x6a,0x74,0x69])])),await _0x237a79()?_0x573472()?_0xda51cd()?_0x4e8bb6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x332f2a()?(_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e8bb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x43771a=_0x52e72c(_0x4e8bb6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e8bb6([0x74,0x72,0x69,0x61,0x6c])&&(_0x43771a=_0x52e72c(_0x4e8bb6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x284f20()):_0x4e8bb6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4e8bb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2f1ec7){return _0x4e8bb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xda51cd(){const _0x3fe0c1=[_0x4e8bb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4e8bb6([0x74,0x72,0x69,0x61,0x6c])][_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8ca4df/0x3e8:0xe10*_0x27cbe6;return _0x2111f5[_0x4e8bb6([0x65,0x78,0x70])]<_0x3fe0c1;}function _0x573472(){const _0x58c71b=_0x2111f5[_0x4e8bb6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x58c71b&&(!!_0x58c71b[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x2a]))||!!_0x58c71b[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x55,0x50,0x4c,0x43])));}function _0x332f2a(){const _0xebe6c7=_0x2111f5[_0x4e8bb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xebe6c7||0x0==_0xebe6c7[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3bd67a}=new URL(window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xebe6c7[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bd67a))return!0x0;const _0x50fb24=_0x3bd67a[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e]));return _0xebe6c7[_0x4e8bb6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x146308=>_0x146308[_0x4e8bb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e8bb6([0x2a])))[_0x4e8bb6([0x6d,0x61,0x70])](_0x174cdc=>_0x174cdc[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e])))[_0x4e8bb6([0x73,0x6f,0x6d,0x65])](_0x4fa583=>_0x50fb24[_0x4e8bb6([0x65,0x76,0x65,0x72,0x79])]((_0x26f690,_0x470da4)=>_0x4fa583[_0x470da4]===_0x26f690||_0x4fa583[_0x470da4]===_0x4e8bb6([0x2a])));}function _0x284f20(){return _0x43771a&&_0x28088d?new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2488f6,_0x43a18f)=>{_0x43771a[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x2488f6,_0x43a18f),_0x28088d[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x47deae=>{_0x47deae!=_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])&&_0x2488f6(_0x47deae);},_0x43a18f);}):_0x43771a||_0x28088d||_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x523ff1(_0x434b79,_0x16e7e7){return new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d587d=>{if(_0x4e0059())return _0x4d587d(_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]));_0x2bf9e3(),_0x2849b5[_0x4e8bb6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x424940=!0x1;const _0x1905c2=_0x1c0462();function _0x38b2e4(_0x374b14){return!!_0x374b14&&(typeof _0x374b14===_0x4e8bb6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x374b14===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x374b14[_0x4e8bb6([0x74,0x68,0x65,0x6e])]===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x374b14[_0x4e8bb6([0x63,0x61,0x74,0x63,0x68])]===_0x4e8bb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x56e70e(_0x29cd2c){_0x49fb4c(_0x29cd2c)[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4af09d=>{if(!_0x4af09d||_0x4af09d[_0x4e8bb6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4e8bb6([0x6f,0x6b]))return _0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xb71c6e(_0x1504b3(_0x1905c2+_0x16e7e7))!=_0x4af09d[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64]);})[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x2f1f23=>(_0x5de045(),_0x2f1f23),()=>{const _0x3723c2=_0x1a1f2f();return null==_0x3723c2?(_0x5de045(),_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])):_0x4e8bb6(_0x8ca4df-_0x3723c2>(0x354026e9^_0x3b2c18)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4d587d)[_0x4e8bb6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5a1e6c=0x117a4c69^_0x3b2c18;function _0x5de045(){const _0x201313=_0x4e8bb6([0x6c,0x6c,0x63,0x74,0x2d])+_0xb71c6e(_0x1504b3(_0x434b79)),_0x286852=_0x12391e(_0xb71c6e(window[_0x4e8bb6([0x4d,0x61,0x74,0x68])][_0x4e8bb6([0x63,0x65,0x69,0x6c])](_0x8ca4df/_0x5a1e6c)));window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e8bb6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x201313,_0x286852);}function _0x1a1f2f(){const _0x281208=_0x4e8bb6([0x6c,0x6c,0x63,0x74,0x2d])+_0xb71c6e(_0x1504b3(_0x434b79)),_0x168041=window[_0x4e8bb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e8bb6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x281208);return _0x168041?window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12391e(_0x168041),0x10)*_0x5a1e6c:null;}function _0x49fb4c(_0x33e0c8){return new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4829cb,_0x437623)=>{_0x33e0c8[_0x4e8bb6([0x74,0x68,0x65,0x6e])](_0x4829cb,_0x437623),window[_0x4e8bb6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x437623,0x114d7629^_0x3b2c18);});}}_0x2849b5[_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ef418,_0x81ae11)=>{if(_0x81ae11[0x0]!=_0x434b79)return _0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x81ae11[0x1]={..._0x81ae11[0x1],[_0x4e8bb6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1905c2};},{[_0x4e8bb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e8bb6([0x68,0x69,0x67,0x68])}),_0x2849b5[_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2493f8=>{_0x38b2e4(_0x2493f8[_0x4e8bb6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x424940=!0x0,_0x56e70e(_0x2493f8[_0x4e8bb6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4e8bb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e8bb6([0x6c,0x6f,0x77])}),_0x2a706f[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>{_0x424940||_0x4d587d(_0x4e8bb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e0059(){return _0x2849b5[_0x4e8bb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e8bb6([0x76,0x69,0x65,0x77])][_0x4e8bb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4e8bb6([0x61,0x75,0x74,0x6f]);}function _0x2bf9e3(){_0x2849b5[_0x4e8bb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e8bb6([0x76,0x69,0x65,0x77])][_0x4e8bb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e8bb6([0x61,0x75,0x74,0x6f]);}}function _0x52e72c(_0x3dea11){const _0xd90618=[new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22ab3b=>setTimeout(_0x22ab3b,0x11459c25^_0x3b2c18)),_0x2a706f[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43b533=>{let _0x327538=0x0;_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x6f,0x6e])](_0x4e8bb6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x799f9c,_0x4b22d8)=>{_0x4b22d8[0x0][_0x4e8bb6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x327538++,_0x327538==(0x114ca311^_0x3b2c18)&&(_0x43b533(),_0x799f9c[_0x4e8bb6([0x6f,0x66,0x66])]());});}))];return window[_0x4e8bb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e8bb6([0x72,0x61,0x63,0x65])](_0xd90618)[_0x4e8bb6([0x74,0x68,0x65,0x6e])](()=>_0x3dea11);}async function _0x63df39(){await _0x2a706f,_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x56db6f,_0x2849b5[_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e8bb6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x56db6f,_0x2849b5[_0x4e8bb6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4e8bb6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x291520(_0x526ce5){const _0x4c24d9=_0x538878();_0x2849b5[_0x4c24d9]=_0x4e8bb6([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x526ce5,_0x526ce5!=_0x4e8bb6([0x56,0x61,0x6c,0x69,0x64])&&_0x63df39();}function _0x538878(){const _0x2e37c3=window[_0x4e8bb6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4e8bb6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4e8bb6([0x6e,0x6f,0x77])]())[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4e8bb6([0x2e]),'');let _0x55b3cb=_0x4e8bb6([0x51]);for(let _0x15be83=0x0;_0x15be83<_0x2e37c3[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x15be83+=0x2){let _0xd64eb1=window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e37c3[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15be83,_0x15be83+0x2));_0xd64eb1>=_0x2e868a[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xd64eb1-=_0x2e868a[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x55b3cb+=_0x2e868a[_0xd64eb1];}return _0x55b3cb;}function _0x218b03(){const _0xb3ace3=_0x877605[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e]));if(0x3!=_0xb3ace3[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x36eadd(_0xb3ace3[0x1]);function _0x36eadd(_0x401bb0){const _0xdb9723=_0x33f2bf(_0x401bb0);return _0xdb9723&&_0x79fb1f()?_0xdb9723:null;function _0x79fb1f(){const _0x486cb1=_0xdb9723[_0x4e8bb6([0x6a,0x74,0x69])],_0x338e88=window[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x486cb1[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x486cb1[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4869f6={..._0xdb9723,[_0x4e8bb6([0x6a,0x74,0x69])]:_0x486cb1[_0x4e8bb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x486cb1[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4869f6[_0x4e8bb6([0x76,0x63])],_0x1504b3(_0x4869f6)==_0x338e88;}}}async function _0x237a79(){let _0x76c82b=!0x0;try{const _0x576f25=_0x877605[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])](_0x4e8bb6([0x2e])),[_0x192269,_0x98b7ef,_0x18d7d8]=_0x576f25;return _0x1e0e3b(_0x192269),await _0xb8856b(_0x192269,_0x98b7ef,_0x18d7d8),_0x76c82b;}catch(_0x1a7738){return!0x1;}function _0x1e0e3b(_0x5d5794){const _0x3ade61=_0x33f2bf(_0x5d5794);_0x3ade61&&_0x3ade61[_0x4e8bb6([0x61,0x6c,0x67])]==_0x4e8bb6([0x45,0x53,0x32,0x35,0x36])||(_0x76c82b=!0x1);}async function _0xb8856b(_0x1b934a,_0x45c891,_0xcaef9b){const _0xe1b347=window[_0x4e8bb6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4e8bb6([0x66,0x72,0x6f,0x6d])](_0x17d2f7(_0xcaef9b),_0x246b98=>_0x246b98[_0x4e8bb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4ba454=new window[(_0x4e8bb6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4e8bb6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1b934a+_0x4e8bb6([0x2e])+_0x45c891),_0x358676=window[_0x4e8bb6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4e8bb6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x358676)return;const _0x418699=await _0x358676[_0x4e8bb6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4e8bb6([0x6a,0x77,0x6b]),_0x1d3c7f,{[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x45,0x43,0x44,0x53,0x41]),[_0x4e8bb6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4e8bb6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x358676[_0x4e8bb6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x45,0x43,0x44,0x53,0x41]),[_0x4e8bb6([0x68,0x61,0x73,0x68])]:{[_0x4e8bb6([0x6e,0x61,0x6d,0x65])]:_0x4e8bb6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x418699,_0xe1b347,_0x4ba454)||(_0x76c82b=!0x1);}}function _0x33f2bf(_0x17251e){return _0x17251e[_0x4e8bb6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4e8bb6([0x65,0x79]))?JSON[_0x4e8bb6([0x70,0x61,0x72,0x73,0x65])](_0x17d2f7(_0x17251e)):null;}function _0x17d2f7(_0x8cd626){return window[_0x4e8bb6([0x61,0x74,0x6f,0x62])](_0x8cd626[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4e8bb6([0x2b]))[_0x4e8bb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4e8bb6([0x2f])));}function _0x1504b3(_0xd4c913){let _0x6d7868=0x1505;function _0x2299be(_0xa5dbec){for(let _0x4740ca=0x0;_0x4740ca<_0xa5dbec[_0x4e8bb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4740ca++){const _0x340d2a=_0xa5dbec[_0x4e8bb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4740ca);_0x6d7868=(_0x6d7868<<0x5)+_0x6d7868+_0x340d2a,_0x6d7868&=_0x6d7868;}}function _0x483135(_0x4955ed){Array[_0x4e8bb6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4955ed)?_0x4955ed[_0x4e8bb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x483135):_0x4955ed&&typeof _0x4955ed==_0x4e8bb6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4e8bb6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4955ed)[_0x4e8bb6([0x73,0x6f,0x72,0x74])]()[_0x4e8bb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4c2f78,_0x42cbda])=>{_0x2299be(_0x4c2f78),_0x483135(_0x42cbda);}):_0x2299be(window[_0x4e8bb6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4955ed));}return _0x483135(_0xd4c913),_0x6d7868>>>0x0;}function _0xb71c6e(_0x5bb768){return _0x5bb768[_0x4e8bb6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4e8bb6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4e8bb6([0x30]));}function _0x12391e(_0xf651c4){return _0xf651c4[_0x4e8bb6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4e8bb6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4e8bb6([0x6a,0x6f,0x69,0x6e])]('');}function _0x56db6f(){}function _0x4e8bb6(_0x4599ed){return _0x4599ed['map'](_0x5d9efe=>String['fromCharCode'](_0x5d9efe))['join']('');}_0x291520(await _0x437ce3());}(this);}['_initSchema'](){const _0x4fba18=this['editor']['model']['schema'];_0x4fba18['isRegistered']('imageBlock')&&_0x4fba18['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4fba18['isRegistered']('imageInline')&&_0x4fba18['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3d944f=this['editor'];_0x3d944f['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3d944f['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bb2c0=>_0x4bb2c0['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1c32fe=_0x3d944f['commands']['get']('replaceImageSource');_0x1c32fe&&this['listenTo'](_0x1c32fe,'cleanupImage',(_0x24ca02,[_0x1923f8,_0x3e86a6])=>{_0x1923f8['removeAttribute']('uploadcareImageId',_0x3e86a6);});}['_initConfig'](){const _0x4c245f=this['editor']['config']['get']('uploadcare.uploader')||{},_0xf0623a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4abd0f(_0x4244d7['document'],'uc-config',{..._0x4c245f,'pubkey':_0xf0623a,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x1a671c=>{if('closeMax'==_0x1a671c)return'#uc-icon-arrow-down';},_0x4244d7['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4abd0f(_0x4244d7['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x4244d7['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1cd261=this['editor']['commands']['get']('insertImage');_0x1cd261&&this['listenTo'](_0x1cd261,'execute',()=>{const _0x5135c3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5135c3&&_0x5135c3['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5135c3);});});const _0x14d447=this['editor']['commands']['get']('uploadcareImageReplace');_0x14d447&&this['listenTo'](_0x14d447,'execute',()=>{const _0x2ab308=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2ab308&&_0x2ab308['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x2ab308);});});}}class u extends _0x2544ae{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56b00e){super(_0x56b00e),_0x56b00e['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x24dc53['defineComponents'](_0x24dc53);}}class ta extends _0x334409{constructor(_0xb40380){super(_0xb40380);const t=_0xb40380['t'],_0x17fe8a=this['bindTemplate'],_0x3438db=new _0x2da488();_0x3438db['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':[_0x3438db,{'text':_0x17fe8a['to']('imageUploadProgress',_0x3ce234=>t('Loading\x20image...')+'\x20('+(_0x3ce234||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class rt extends _0x334409{constructor(_0x2468fd){super(_0x2468fd);const t=_0x2468fd['t'];this['set']('errorType',null);const _0x58adb2=new _0x5b9268(_0x2468fd);_0x58adb2['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x58adb2['withText']=!0x0,_0x58adb2['class']='ck-button-action',_0x58adb2['on']('execute',()=>{this['fire']('retry');}),_0x58adb2['bind']('isVisible')['to'](this,'errorType',_0x40a1e6=>'NotFound'!==_0x40a1e6);const _0x2edd53=new at();_0x2edd53['content']=et,_0x2edd53['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4103c9=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':[_0x2edd53,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4103c9['to']('errorType',_0x1c2cea=>t('NotFound'!==_0x1c2cea?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x58adb2]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class tt extends _0x334409{constructor(_0x1de372,_0x147dd8){super(_0x1de372);const _0xae64f7=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x147dd8,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xae64f7['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x54a8a3,_0x5b1018,_0x1df704){super(_0x54a8a3),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x54a8a3),this['_errorView']=new rt(_0x54a8a3),this['_editingView']=new tt(_0x54a8a3,_0x1df704),this['_focusableView']=new _0x334409(_0x54a8a3),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5b1018),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'],_0x38e44b=>{this['_addUploadcareImageEditorListeners'](_0x38e44b);});}),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'](_0x20c56c,_0x577d5c){const _0x2a12cb='uc-cloud-image-editor',_0xea5428=_0x20c56c['querySelector'](_0x2a12cb);if(_0xea5428)return _0x577d5c(_0xea5428);const _0x142383=new MutationObserver(_0xd73abf=>{const _0xc21932=_0xd73abf['filter'](_0x45fe70=>_0x45fe70['target']===_0x20c56c&&_0x45fe70['addedNodes']['length']>0x0&&_0x45fe70['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2a12cb);_0xc21932['length']&&(_0x142383['disconnect'](),_0x577d5c(_0xc21932[0x0]['addedNodes'][0x0]));});_0x142383['observe'](_0x20c56c,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x73e44b){_0x73e44b['addEventListener']('apply',_0x14dbce=>{this['fire']('apply',{'imageSrc':_0x14dbce['detail']['cdnUrl']});}),_0x73e44b['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
25
+ _0x2e1d99(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x273f64,_0x4b331d,_0xbb2b70){super(),this['_editor']=_0x273f64,this['_dialog']=_0x4b331d,this['_imageElement']=_0xbb2b70,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 _0x3cb4f4=this['_imageElement'],_0x7718a2=_0x3cb4f4['getAttribute']('uploadcareImageId'),_0x3d2f94=_0x3cb4f4['getAttribute']('src');if(_0x7718a2)await this['_loadImageInfo'](_0x7718a2,_0x3d2f94);else{if(this['_imageCache']['has'](_0x3d2f94)){const _0x4bac5c=this['_imageCache']['get'](_0x3d2f94);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4bac5c['url'],this['imageDimension']=_0x4bac5c['dimension'],this['imageId']=_0x4bac5c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4649c7}=this['_editor'],t=_0x4649c7['t'],_0x517b8c=new ii(_0x4649c7,this['imageStatus'],this['_attributes']);_0x517b8c['bind']('status')['to'](this,'imageStatus'),_0x517b8c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x517b8c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x517b8c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x517b8c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3aa786,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x517b8c,'position':_0xa4f76d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x517b8c['focus']();},'onHide':()=>{_0x517b8c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2fe7dc=>!M(_0x2fe7dc,_0x517b8c['element'])}});}['_loadImageInfo'](_0x32ada6,_0x3089a1){return C['getInfo'](_0x32ada6,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3c6b02=>{const {width:_0x13adb4,height:_0x505413}=_0x3c6b02['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3089a1,this['imageDimension']={'width':_0x13adb4,'height':_0x505413},this['imageId']=_0x32ada6;})['catch'](_0x2691c6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2691c6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4be7a7,_0x54dbad){return this['_getImageAsFile'](_0x4be7a7)['then'](_0x47f7e7=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x54dbad['signal'],'file':_0x47f7e7,'onProgress':_0x2a49fc=>{_0x2a49fc&&_0x2a49fc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2a49fc['value']));}}))['then'](_0x249fdc=>{const {width:_0x2c85e7,height:_0x52daae}=_0x249fdc['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x249fdc['cdnUrl'],this['imageDimension']={'width':_0x2c85e7,'height':_0x52daae},this['imageId']=_0x249fdc['uuid'],this['imageUploadProgress']=null;const _0x2fc00f=_0x4be7a7['getAttribute']('src');this['_imageCache']['set'](_0x2fc00f,{'id':_0x249fdc['uuid'],'url':_0x249fdc['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x48d6a6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x48d6a6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x234e52,_0x31a892){_0x234e52['on']('apply',(_0x364693,_0x4c9449)=>{this['_replaceImage'](_0x31a892,_0x4c9449['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x234e52['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x234e52['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x47b6af,_0x459441,_0x179935){const _0x4fc105=this['_editor'],{width:_0x196b84,height:_0x115f2e}=F(_0x459441,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x54a21a,imageSources:_0x1fa29b}=E(_0x459441,_0x196b84);_0x4fc105['model']['change'](_0x64f38=>{if('$graveyard'===_0x47b6af['root']['rootName']){_0x4fc105['execute']('insertImage',{'imageType':_0x47b6af['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x47b6af['getAttributes']()),'uploadcareImageId':_0x179935,'src':_0x54a21a,'sources':_0x1fa29b,'width':_0x196b84,'height':_0x115f2e}});const _0x5573c5=_0x47b6af['getChildren']();_0x47b6af=_0x4fc105['model']['document']['selection']['getSelectedElement']();for(const _0x361346 of _0x5573c5)_0x64f38['append'](_0x64f38['cloneElement'](_0x361346),_0x47b6af);}else _0x64f38['setSelection'](_0x47b6af,'on'),_0x4fc105['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x47b6af['getAttributes']()),'uploadcareImageId':_0x179935,'src':_0x54a21a,'sources':_0x1fa29b,'width':_0x196b84,'height':_0x115f2e},_0x47b6af);_0x64f38['setSelection'](_0x47b6af,'on');});}async['_getImageAsFile'](_0x5a4055){const _0x83ed3f=_0x4244d7['window'],_0x356db1=_0x4244d7['document']['location']['href'],_0x2da7f0=new _0x83ed3f['URL'](_0x5a4055['getAttribute']('src'),_0x356db1);if('data:'===_0x2da7f0['protocol']){const _0x56a5c0=_0x2da7f0['href']['split'](','),_0x5bca5e=_0x56a5c0[0x0]['match'](/:(.*?);/)[0x1],_0x5ab7b0=_0x5bca5e['split']('/')[0x1],_0x13420d=_0x83ed3f['atob'](_0x56a5c0[_0x56a5c0['length']-0x1]);let _0x537858=_0x13420d['length'];const _0x58c952=new _0x83ed3f['Uint8Array'](_0x537858);for(;_0x537858--;)_0x58c952[_0x537858]=_0x13420d['charCodeAt'](_0x537858);return new _0x83ed3f['File']([_0x58c952],'image.'+_0x5ab7b0,{'type':_0x5bca5e});}const _0x306679=_0x2da7f0['href']['split']('/'),_0x5d92fd=_0x306679[_0x306679['length']-0x1],_0x776f6a=_0x5d92fd['split']('.')[0x1];return _0x83ed3f['fetch'](_0x2da7f0['href'])['then'](_0x572226=>_0x572226['clone']()['blob']())['then'](_0x8c3354=>new _0x83ed3f['File']([_0x8c3354],_0x5d92fd,{'type':'image/'+_0x776f6a}));}}class J extends _0x76a7f9{['imageEditController'];static get['requires'](){return[_0x3ffdfe];}['_isEditable'];constructor(_0xa93044){super(_0xa93044),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x22bfe1){const _0x2f43c1=W(_0x22bfe1);return _0x2c41bd=>!(!_0x2c41bd||!_0x2c41bd['is']('element','imageBlock')&&!_0x2c41bd['is']('element','imageInline'))&&(!!_0x2c41bd['hasAttribute']('uploadcareImageId')||!!_0x2c41bd['hasAttribute']('src')&&_0x2f43c1(_0x2c41bd['getAttribute']('src')));}(_0xa93044['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x8fa1f9=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x8fa1f9);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2cacb6=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2cacb6&&(_0x2cacb6['is']('element','imageBlock')||_0x2cacb6['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x3ffdfe),_0x2cacb6),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x76a7f9{['refresh'](){const _0x278ec1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x278ec1&&(_0x278ec1['is']('element','imageBlock')||_0x278ec1['is']('element','imageInline')));}['execute'](_0x40e362){const _0x1b78a5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4b98c6=>{_0x4b98c6['setAttributes'](_0x40e362,_0x1b78a5),_0x4b98c6['removeAttribute']('srcset',_0x1b78a5),_0x4b98c6['removeAttribute']('sizes',_0x1b78a5);});}}class g extends _0x2544ae{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x3cbf33,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2119a5}=this;_0x2119a5['commands']['add']('uploadcareImageEdit',new J(_0x2119a5)),_0x2119a5['commands']['add']('uploadcareImageReplace',new O(_0x2119a5));}}class j extends _0x2544ae{['_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 _0x213389=this['editor'];_0x213389['ui']['componentFactory']['add']('uploadcareImageEdit',_0x586d36=>{const _0x23af58=_0x213389['commands']['get']('uploadcareImageEdit'),_0x562818=new _0x5b9268(_0x586d36),t=_0x586d36['t'];return _0x562818['set']({'icon':_0x3aa786,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x562818['bind']('isEnabled')['to'](_0x23af58),_0x562818['bind']('isOn')['to'](_0x23af58,'isActive'),this['listenTo'](_0x562818,'execute',()=>{_0x213389['execute']('uploadcareImageEdit'),_0x213389['editing']['view']['focus']();}),_0x562818;}),this['_initConfig']();}['_initConfig'](){const _0x435a01=_0x4abd0f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x435a01),this['listenTo'](this['editor'],'destroy',()=>{_0x435a01['remove']();});}}class P extends _0x2544ae{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-next-20250211.0",
3
+ "version": "0.0.0-nightly-next-20250212.0",
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": "0.0.0-nightly-next-20250211.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250211.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20250211.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20250211.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250211.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20250211.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250211.0",
33
- "ckeditor5": "0.0.0-nightly-next-20250211.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20250212.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250212.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20250212.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20250212.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250212.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20250212.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250212.0",
33
+ "ckeditor5": "0.0.0-nightly-next-20250212.0",
34
34
  "@uploadcare/file-uploader": "1.12.0",
35
35
  "@uploadcare/upload-client": "6.14.1"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x45fb(){const _0x1a0829=['destroy','upcast','uploadcare','insertImage','contentLanguage','config','closeMax','ctxElement','view','input[uploadcare-file-input]','iconHrefResolver','downcast','getSelectedElement','editor','schema','init','uploadcareImageReplace','locale','querySelector','getAttribute','_configElement','cleanupImage','get','uploader','true','uc-config','uc-upload-ctx-provider','body','imageInline','fromCharCode','once','1083600AdtLEu','map','requires','163912VqWHwH','PictureEditing','data-uc-image-id','attributeToAttribute','imageBlock','#uc-icon-arrow-down','_initConversion','uploadcare.uploader','854488ZkHnXk','12036WwniuE','\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','isRegistered','remove','224260swjQeN','_initConfig','uploadcareImageId','394359EhwzFF','render','selection','_initImageProcessingIndicator','replaceImageSource','model','elementToAttribute','_ctxElement','execute','136cSeRaz','isPremiumPlugin','conversion','545232OwlItb','appendChild','editing','listenTo','configElement','_initSchema','pluginName','UploadcareEditing','for','commands','href','add','afterInit','380lJfspb','document','removeAttribute','isOfficialPlugin','_initCtx','uploadcare.pubkey','extend','join'];_0x45fb=function(){return _0x1a0829;};return _0x45fb();}function _0x3b70(_0x6dffee,_0x395df7){const _0x45fbbc=_0x45fb();return _0x3b70=function(_0x3b70af,_0x27400b){_0x3b70af=_0x3b70af-0x107;let _0x270ce7=_0x45fbbc[_0x3b70af];return _0x270ce7;},_0x3b70(_0x6dffee,_0x395df7);}const _0xfedd90=_0x3b70;(function(_0x55cd70,_0x4a1759){const _0x1f71cc=_0x3b70,_0x13666d=_0x55cd70();while(!![]){try{const _0x578600=parseInt(_0x1f71cc(0x12f))/0x1+-parseInt(_0x1f71cc(0x12a))/0x2+parseInt(_0x1f71cc(0x132))/0x3+-parseInt(_0x1f71cc(0x12b))/0x4*(-parseInt(_0x1f71cc(0x14b))/0x5)+-parseInt(_0x1f71cc(0x13e))/0x6+parseInt(_0x1f71cc(0x122))/0x7*(parseInt(_0x1f71cc(0x13b))/0x8)+-parseInt(_0x1f71cc(0x11f))/0x9;if(_0x578600===_0x4a1759)break;else _0x13666d['push'](_0x13666d['shift']());}catch(_0x4805b8){_0x13666d['push'](_0x13666d['shift']());}}}(_0x45fb,0x53f91));import{Plugin as _0x5190ca}from'ckeditor5/src/core.js';import{Dialog as _0x29e4ae}from'ckeditor5/src/ui.js';import{createElement as _0x3de23b,global as _0x30a242,uid as _0x4086f0}from'ckeditor5/src/utils.js';import _0x3563f from'./uploadcarecommand.js';import _0x3093ce from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x735816}from'./utils/editingutils.js';export default class i extends _0x5190ca{[_0xfedd90(0x114)]=null;[_0xfedd90(0x139)]=null;static get[_0xfedd90(0x144)](){const _0xf12185=_0xfedd90;return _0xf12185(0x145);}static get[_0xfedd90(0x121)](){const _0x5deb75=_0xfedd90;return[_0x5deb75(0x123),_0x3093ce,_0x29e4ae];}static get[_0xfedd90(0x14e)](){return!0x0;}static get[_0xfedd90(0x13c)](){return!0x0;}get[_0xfedd90(0x142)](){const _0x51c415=_0xfedd90;return this[_0x51c415(0x114)];}get[_0xfedd90(0x107)](){const _0x43afce=_0xfedd90;return this[_0x43afce(0x139)];}[_0xfedd90(0x10f)](){const _0x28a19f=_0xfedd90,_0x491489=this[_0x28a19f(0x10d)];_0x491489[_0x28a19f(0x147)][_0x28a19f(0x149)](_0x28a19f(0x155),new _0x3563f(_0x491489));}[_0xfedd90(0x14a)](){const _0x4626d0=_0xfedd90;this[_0x4626d0(0x143)](),this[_0x4626d0(0x128)](),this[_0x4626d0(0x130)](),this[_0x4626d0(0x14f)](),this[_0x4626d0(0x135)](),this[_0x4626d0(0x141)](this[_0x4626d0(0x10d)],_0x4626d0(0x153),()=>{const _0x4200cd=_0x4626d0;this[_0x4200cd(0x114)]&&(this[_0x4200cd(0x114)][_0x4200cd(0x12e)](),this[_0x4200cd(0x114)]=null),this[_0x4200cd(0x139)]&&(this[_0x4200cd(0x139)][_0x4200cd(0x12e)](),this[_0x4200cd(0x139)]=null);const _0x27d65f=_0x30a242[_0x4200cd(0x14c)][_0x4200cd(0x112)](_0x4200cd(0x109));_0x27d65f&&_0x27d65f[_0x4200cd(0x12e)]();}),async function(_0x5a085a){const _0x494c6a=_0x4632d1([0x31,0x69,0x70,0x6a,0x61,0x47,0x78,0x50,0x48,0x66,0x6c,0x35,0x71,0x36,0x68,0x6d,0x58,0x43,0x32,0x74,0x75,0x33,0x30,0x67,0x76,0x6f,0x39,0x46,0x51,0x6b,0x5a,0x4a,0x63,0x54,0x4e,0x4d,0x41,0x73,0x57,0x65,0x4f,0x59,0x34,0x6e,0x4b,0x38,0x4c,0x55,0x37,0x62,0x53,0x64,0x45,0x44,0x52,0x72,0x56,0x79,0x42,0x7a,0x77,0x49]),_0x3a7353=0x39b5577e,_0x1ebf79=0x39b2084e^_0x3a7353,_0x38bd9f=window[_0x4632d1([0x44,0x61,0x74,0x65])][_0x4632d1([0x6e,0x6f,0x77])](),_0x6baac6=_0x5a085a[_0x4632d1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1cd010=new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e6b46=>{_0x6baac6[_0x4632d1([0x6f,0x6e,0x63,0x65])](_0x4632d1([0x72,0x65,0x61,0x64,0x79]),_0x2e6b46);}),_0x3e2f90={[_0x4632d1([0x6b,0x74,0x79])]:_0x4632d1([0x45,0x43]),[_0x4632d1([0x75,0x73,0x65])]:_0x4632d1([0x73,0x69,0x67]),[_0x4632d1([0x63,0x72,0x76])]:_0x4632d1([0x50,0x2d,0x32,0x35,0x36]),[_0x4632d1([0x78])]:_0x4632d1([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]),[_0x4632d1([0x79])]:_0x4632d1([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]),[_0x4632d1([0x61,0x6c,0x67])]:_0x4632d1([0x45,0x53,0x32,0x35,0x36])},_0x920501=_0x6baac6[_0x4632d1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4632d1([0x67,0x65,0x74])](_0x4632d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2c3897(){let _0x58f90e,_0x21e494=null,_0x19d43f=null;try{if(_0x920501==_0x4632d1([0x47,0x50,0x4c]))return _0x4632d1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x58f90e=_0x4c2378(),!_0x58f90e)return _0x4632d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x58f90e[_0x4632d1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x19d43f=_0x3fa246(_0x58f90e[_0x4632d1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x58f90e[_0x4632d1([0x6a,0x74,0x69])])),await _0x275a40()?_0x1366a4()?_0x3cdab9()?_0x4632d1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x308ae2()?(_0x58f90e[_0x4632d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4632d1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21e494=_0x54a18a(_0x4632d1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x58f90e[_0x4632d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4632d1([0x74,0x72,0x69,0x61,0x6c])&&(_0x21e494=_0x54a18a(_0x4632d1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x142d16()):_0x4632d1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4632d1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4632d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3c88b6){return _0x4632d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3cdab9(){const _0x31c10a=[_0x4632d1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4632d1([0x74,0x72,0x69,0x61,0x6c])][_0x4632d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58f90e[_0x4632d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38bd9f/0x3e8:0xe10*_0x1ebf79;return _0x58f90e[_0x4632d1([0x65,0x78,0x70])]<_0x31c10a;}function _0x1366a4(){const _0x434c08=_0x58f90e[_0x4632d1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x434c08&&(!!_0x434c08[_0x4632d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4632d1([0x2a]))||!!_0x434c08[_0x4632d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4632d1([0x55,0x50,0x4c,0x43])));}function _0x308ae2(){const _0x5163c4=_0x3b70,_0x45bf80=_0x58f90e[_0x4632d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x45bf80||0x0==_0x45bf80[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4232be}=new URL(window[_0x4632d1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5163c4(0x148)]);if(_0x45bf80[_0x4632d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4232be))return!0x0;const _0x134da6=_0x4232be[_0x4632d1([0x73,0x70,0x6c,0x69,0x74])](_0x4632d1([0x2e]));return _0x45bf80[_0x4632d1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x272837=>_0x272837[_0x4632d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4632d1([0x2a])))[_0x4632d1([0x6d,0x61,0x70])](_0x3ea4e6=>_0x3ea4e6[_0x4632d1([0x73,0x70,0x6c,0x69,0x74])](_0x4632d1([0x2e])))[_0x4632d1([0x73,0x6f,0x6d,0x65])](_0x4f4941=>_0x134da6[_0x4632d1([0x65,0x76,0x65,0x72,0x79])]((_0x42e1aa,_0x10778b)=>_0x4f4941[_0x10778b]===_0x42e1aa||_0x4f4941[_0x10778b]===_0x4632d1([0x2a])));}function _0x142d16(){return _0x21e494&&_0x19d43f?new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x43a17b,_0x52555f)=>{_0x21e494[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x43a17b,_0x52555f),_0x19d43f[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x38ea00=>{_0x38ea00!=_0x4632d1([0x56,0x61,0x6c,0x69,0x64])&&_0x43a17b(_0x38ea00);},_0x52555f);}):_0x21e494||_0x19d43f||_0x4632d1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3fa246(_0x5744ef,_0x1b7df8){return new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x420499=>{if(_0x59a7c1())return _0x420499(_0x4632d1([0x56,0x61,0x6c,0x69,0x64]));_0xc280d0(),_0x6baac6[_0x4632d1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4632d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c4b9e=!0x1;const _0x1ab2b2=_0x4086f0();function _0x3ea4ac(_0x198ed2){return!!_0x198ed2&&(typeof _0x198ed2===_0x4632d1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x198ed2===_0x4632d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x198ed2[_0x4632d1([0x74,0x68,0x65,0x6e])]===_0x4632d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x198ed2[_0x4632d1([0x63,0x61,0x74,0x63,0x68])]===_0x4632d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x39fe97(_0x6423f2){_0x5f126c(_0x6423f2)[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x35c07a=>{if(!_0x35c07a||_0x35c07a[_0x4632d1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4632d1([0x6f,0x6b]))return _0x4632d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x816152(_0x4a6c16(_0x1ab2b2+_0x1b7df8))!=_0x35c07a[_0x4632d1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4632d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4632d1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x4f6972=>(_0x345003(),_0x4f6972),()=>{const _0xd7824a=_0x11e111();return null==_0xd7824a?(_0x345003(),_0x4632d1([0x56,0x61,0x6c,0x69,0x64])):_0x4632d1(_0x38bd9f-_0xd7824a>(0x1db9d37e^_0x3a7353)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x420499)[_0x4632d1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x420499(_0x4632d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5a9bec=0x3983b9fe^_0x3a7353;function _0x345003(){const _0x4e54c8=_0x4632d1([0x6c,0x6c,0x63,0x74,0x2d])+_0x816152(_0x4a6c16(_0x5744ef)),_0x28879a=_0x2d592d(_0x816152(window[_0x4632d1([0x4d,0x61,0x74,0x68])][_0x4632d1([0x63,0x65,0x69,0x6c])](_0x38bd9f/_0x5a9bec)));window[_0x4632d1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4632d1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e54c8,_0x28879a);}function _0x11e111(){const _0xc5b042=_0x4632d1([0x6c,0x6c,0x63,0x74,0x2d])+_0x816152(_0x4a6c16(_0x5744ef)),_0x273691=window[_0x4632d1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4632d1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xc5b042);return _0x273691?window[_0x4632d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d592d(_0x273691),0x10)*_0x5a9bec:null;}function _0x5f126c(_0x2b451d){return new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x22866a,_0x553ceb)=>{_0x2b451d[_0x4632d1([0x74,0x68,0x65,0x6e])](_0x22866a,_0x553ceb),window[_0x4632d1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x553ceb,0x39b483be^_0x3a7353);});}}_0x6baac6[_0x4632d1([0x6f,0x6e])](_0x4632d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x62ab10,_0x2bbbda)=>{if(_0x2bbbda[0x0]!=_0x5744ef)return _0x420499(_0x4632d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2bbbda[0x1]={..._0x2bbbda[0x1],[_0x4632d1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1ab2b2};},{[_0x4632d1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4632d1([0x68,0x69,0x67,0x68])}),_0x6baac6[_0x4632d1([0x6f,0x6e])](_0x4632d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17fdbb=>{_0x3ea4ac(_0x17fdbb[_0x4632d1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c4b9e=!0x0,_0x39fe97(_0x17fdbb[_0x4632d1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4632d1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4632d1([0x6c,0x6f,0x77])}),_0x1cd010[_0x4632d1([0x74,0x68,0x65,0x6e])](()=>{_0x4c4b9e||_0x420499(_0x4632d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x59a7c1(){return _0x6baac6[_0x4632d1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4632d1([0x76,0x69,0x65,0x77])][_0x4632d1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4632d1([0x61,0x75,0x74,0x6f]);}function _0xc280d0(){_0x6baac6[_0x4632d1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4632d1([0x76,0x69,0x65,0x77])][_0x4632d1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4632d1([0x61,0x75,0x74,0x6f]);}}function _0x54a18a(_0x2eabf8){const _0x1c572b=[new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2173f9=>setTimeout(_0x2173f9,0x39bc69b2^_0x3a7353)),_0x1cd010[_0x4632d1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33623a=>{let _0x3af20e=0x0;_0x6baac6[_0x4632d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4632d1([0x6f,0x6e])](_0x4632d1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20743d,_0x1436d5)=>{_0x1436d5[0x0][_0x4632d1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3af20e++,_0x3af20e==(0x39b55686^_0x3a7353)&&(_0x33623a(),_0x20743d[_0x4632d1([0x6f,0x66,0x66])]());});}))];return window[_0x4632d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4632d1([0x72,0x61,0x63,0x65])](_0x1c572b)[_0x4632d1([0x74,0x68,0x65,0x6e])](()=>_0x2eabf8);}async function _0x2b0ff9(){await _0x1cd010,_0x6baac6[_0x4632d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4632d1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2db492,_0x6baac6[_0x4632d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4632d1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2db492,_0x6baac6[_0x4632d1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4632d1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1f23c7(_0x56bb88){const _0x19c1e7=_0x50f816();_0x6baac6[_0x19c1e7]=_0x4632d1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x56bb88,_0x56bb88!=_0x4632d1([0x56,0x61,0x6c,0x69,0x64])&&_0x2b0ff9();}function _0x50f816(){const _0x155077=window[_0x4632d1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4632d1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4632d1([0x6e,0x6f,0x77])]())[_0x4632d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4632d1([0x2e]),'');let _0x1cedd3=_0x4632d1([0x69]);for(let _0x533aee=0x0;_0x533aee<_0x155077[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x533aee+=0x2){let _0xa9ff66=window[_0x4632d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x155077[_0x4632d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x533aee,_0x533aee+0x2));_0xa9ff66>=_0x494c6a[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xa9ff66-=_0x494c6a[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cedd3+=_0x494c6a[_0xa9ff66];}return _0x1cedd3;}function _0x4c2378(){const _0xbd9fc1=_0x920501[_0x4632d1([0x73,0x70,0x6c,0x69,0x74])](_0x4632d1([0x2e]));if(0x3!=_0xbd9fc1[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x180433(_0xbd9fc1[0x1]);function _0x180433(_0x252bed){const _0x1397f3=_0x167a88(_0x252bed);return _0x1397f3&&_0xdd1b2()?_0x1397f3:null;function _0xdd1b2(){const _0x2c5771=_0x1397f3[_0x4632d1([0x6a,0x74,0x69])],_0x5b55f5=window[_0x4632d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c5771[_0x4632d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c5771[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c6448={..._0x1397f3,[_0x4632d1([0x6a,0x74,0x69])]:_0x2c5771[_0x4632d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2c5771[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c6448[_0x4632d1([0x76,0x63])],_0x4a6c16(_0x1c6448)==_0x5b55f5;}}}async function _0x275a40(){let _0x52cc02=!0x0;try{const _0x237fd0=_0x920501[_0x4632d1([0x73,0x70,0x6c,0x69,0x74])](_0x4632d1([0x2e])),[_0x2ddb80,_0x10dd83,_0x486d9d]=_0x237fd0;return _0x3aa331(_0x2ddb80),await _0x3f0025(_0x2ddb80,_0x10dd83,_0x486d9d),_0x52cc02;}catch(_0x274610){return!0x1;}function _0x3aa331(_0x520b77){const _0x591a21=_0x167a88(_0x520b77);_0x591a21&&_0x591a21[_0x4632d1([0x61,0x6c,0x67])]==_0x4632d1([0x45,0x53,0x32,0x35,0x36])||(_0x52cc02=!0x1);}async function _0x3f0025(_0x43f763,_0x30edd8,_0x34c00a){const _0xfe4f02=window[_0x4632d1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4632d1([0x66,0x72,0x6f,0x6d])](_0x5d2332(_0x34c00a),_0x20d8fb=>_0x20d8fb[_0x4632d1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x875afc=new window[(_0x4632d1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4632d1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x43f763+_0x4632d1([0x2e])+_0x30edd8),_0x489c4b=window[_0x4632d1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4632d1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x489c4b)return;const _0x4c6bdd=await _0x489c4b[_0x4632d1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4632d1([0x6a,0x77,0x6b]),_0x3e2f90,{[_0x4632d1([0x6e,0x61,0x6d,0x65])]:_0x4632d1([0x45,0x43,0x44,0x53,0x41]),[_0x4632d1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4632d1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4632d1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x489c4b[_0x4632d1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4632d1([0x6e,0x61,0x6d,0x65])]:_0x4632d1([0x45,0x43,0x44,0x53,0x41]),[_0x4632d1([0x68,0x61,0x73,0x68])]:{[_0x4632d1([0x6e,0x61,0x6d,0x65])]:_0x4632d1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4c6bdd,_0xfe4f02,_0x875afc)||(_0x52cc02=!0x1);}}function _0x167a88(_0x21e8a0){return _0x21e8a0[_0x4632d1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4632d1([0x65,0x79]))?JSON[_0x4632d1([0x70,0x61,0x72,0x73,0x65])](_0x5d2332(_0x21e8a0)):null;}function _0x5d2332(_0x17ae20){return window[_0x4632d1([0x61,0x74,0x6f,0x62])](_0x17ae20[_0x4632d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4632d1([0x2b]))[_0x4632d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4632d1([0x2f])));}function _0x4a6c16(_0x1c4933){let _0x12ff39=0x1505;function _0xccb3dd(_0x20ee6c){for(let _0x20ca70=0x0;_0x20ca70<_0x20ee6c[_0x4632d1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20ca70++){const _0x1d6630=_0x20ee6c[_0x4632d1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x20ca70);_0x12ff39=(_0x12ff39<<0x5)+_0x12ff39+_0x1d6630,_0x12ff39&=_0x12ff39;}}function _0x5855b1(_0x2462e7){Array[_0x4632d1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2462e7)?_0x2462e7[_0x4632d1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5855b1):_0x2462e7&&typeof _0x2462e7==_0x4632d1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4632d1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2462e7)[_0x4632d1([0x73,0x6f,0x72,0x74])]()[_0x4632d1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x27a7e6,_0x1a76cf])=>{_0xccb3dd(_0x27a7e6),_0x5855b1(_0x1a76cf);}):_0xccb3dd(window[_0x4632d1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2462e7));}return _0x5855b1(_0x1c4933),_0x12ff39>>>0x0;}function _0x816152(_0x48c6ef){return _0x48c6ef[_0x4632d1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4632d1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4632d1([0x30]));}function _0x2d592d(_0x58a85a){return _0x58a85a[_0x4632d1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4632d1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4632d1([0x6a,0x6f,0x69,0x6e])]('');}function _0x2db492(){}function _0x4632d1(_0x19d559){const _0x168d8d=_0x3b70;return _0x19d559[_0x168d8d(0x120)](_0x116d00=>String[_0x168d8d(0x11d)](_0x116d00))[_0x168d8d(0x152)]('');}_0x1f23c7(await _0x2c3897());}(this);}[_0xfedd90(0x143)](){const _0x465a74=_0xfedd90,_0x2e664c=this[_0x465a74(0x10d)][_0x465a74(0x137)][_0x465a74(0x10e)];_0x2e664c[_0x465a74(0x12d)](_0x465a74(0x126))&&_0x2e664c[_0x465a74(0x151)](_0x465a74(0x126),{'allowAttributes':[_0x465a74(0x131)]}),_0x2e664c[_0x465a74(0x12d)](_0x465a74(0x11c))&&_0x2e664c[_0x465a74(0x151)](_0x465a74(0x11c),{'allowAttributes':[_0x465a74(0x131)]});}[_0xfedd90(0x128)](){const _0xe3e871=_0xfedd90,_0x2cc634=this[_0xe3e871(0x10d)];_0x2cc634[_0xe3e871(0x13d)][_0xe3e871(0x146)](_0xe3e871(0x10b))[_0xe3e871(0x125)]({'model':_0xe3e871(0x131),'view':_0xe3e871(0x124)}),_0x2cc634[_0xe3e871(0x13d)][_0xe3e871(0x146)](_0xe3e871(0x154))[_0xe3e871(0x138)]({'model':{'key':_0xe3e871(0x131),'value':_0x5827f1=>_0x5827f1[_0xe3e871(0x113)](_0xe3e871(0x124))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1695e3=_0x2cc634[_0xe3e871(0x147)][_0xe3e871(0x116)](_0xe3e871(0x136));_0x1695e3&&this[_0xe3e871(0x141)](_0x1695e3,_0xe3e871(0x115),(_0x2dbcae,[_0x37060f,_0x21cb10])=>{const _0x3d4af0=_0xe3e871;_0x37060f[_0x3d4af0(0x14d)](_0x3d4af0(0x131),_0x21cb10);});}[_0xfedd90(0x130)](){const _0x337a7c=_0xfedd90,_0x42f768=this[_0x337a7c(0x10d)][_0x337a7c(0x158)][_0x337a7c(0x116)](_0x337a7c(0x129))||{},_0x2bef3a=this[_0x337a7c(0x10d)][_0x337a7c(0x158)][_0x337a7c(0x116)](_0x337a7c(0x150))||'';this[_0x337a7c(0x114)]=_0x3de23b(_0x30a242[_0x337a7c(0x14c)],_0x337a7c(0x119),{..._0x42f768,'pubkey':_0x2bef3a,'ctx-name':_0x337a7c(0x117),'sourceList':'','imgOnly':_0x337a7c(0x118),'removeCopyright':_0x337a7c(0x118),'localeName':this[_0x337a7c(0x10d)][_0x337a7c(0x111)][_0x337a7c(0x157)],'externalSourcesEmbedCss':_0x337a7c(0x12c)}),this[_0x337a7c(0x114)][_0x337a7c(0x10a)]=_0x4739c2=>{const _0x15f97f=_0x337a7c;if(_0x15f97f(0x159)==_0x4739c2)return _0x15f97f(0x127);},_0x30a242[_0x337a7c(0x14c)][_0x337a7c(0x11b)][_0x337a7c(0x13f)](this[_0x337a7c(0x114)]);}[_0xfedd90(0x14f)](){const _0x2cb88f=_0xfedd90;this[_0x2cb88f(0x139)]=_0x3de23b(_0x30a242[_0x2cb88f(0x14c)],_0x2cb88f(0x11a),{'ctx-name':_0x2cb88f(0x117)}),_0x30a242[_0x2cb88f(0x14c)][_0x2cb88f(0x11b)][_0x2cb88f(0x13f)](this[_0x2cb88f(0x139)]);}[_0xfedd90(0x135)](){const _0x2fa4f5=_0xfedd90,_0x5cc74e=this[_0x2fa4f5(0x10d)][_0x2fa4f5(0x147)][_0x2fa4f5(0x116)](_0x2fa4f5(0x156));_0x5cc74e&&this[_0x2fa4f5(0x141)](_0x5cc74e,_0x2fa4f5(0x13a),()=>{const _0x33eae5=_0x2fa4f5,_0x1ea358=this[_0x33eae5(0x10d)][_0x33eae5(0x137)][_0x33eae5(0x14c)][_0x33eae5(0x134)][_0x33eae5(0x10c)]();_0x1ea358&&_0x1ea358[_0x33eae5(0x113)](_0x33eae5(0x131))&&this[_0x33eae5(0x10d)][_0x33eae5(0x140)][_0x33eae5(0x108)][_0x33eae5(0x11e)](_0x33eae5(0x133),()=>{const _0x1b5657=_0x33eae5;_0x735816(this[_0x1b5657(0x10d)],_0x1ea358);});});const _0x1b0132=this[_0x2fa4f5(0x10d)][_0x2fa4f5(0x147)][_0x2fa4f5(0x116)](_0x2fa4f5(0x110));_0x1b0132&&this[_0x2fa4f5(0x141)](_0x1b0132,_0x2fa4f5(0x13a),()=>{const _0x2ce261=_0x2fa4f5,_0x2543e2=this[_0x2ce261(0x10d)][_0x2ce261(0x137)][_0x2ce261(0x14c)][_0x2ce261(0x134)][_0x2ce261(0x10c)]();_0x2543e2&&_0x2543e2[_0x2ce261(0x113)](_0x2ce261(0x131))&&this[_0x2ce261(0x10d)][_0x2ce261(0x140)][_0x2ce261(0x108)][_0x2ce261(0x11e)](_0x2ce261(0x133),()=>{const _0x54278f=_0x2ce261;_0x735816(this[_0x54278f(0x10d)],_0x2543e2);});});}}
23
+ function _0x508c(){const _0x2be388=['querySelector','destroy','6iDXKvR','href','render','input[uploadcare-file-input]','pluginName','afterInit','downcast','body','attributeToAttribute','imageInline','270BxpnNR','requires','getAttribute','remove','cleanupImage','uploadcareImageReplace','once','4102272JwXIeV','810331kGMGwF','_configElement','commands','config','364299DMAyxO','add','8239532fFjrQy','ctxElement','document','isPremiumPlugin','schema','extend','20AmTpjT','editor','uc-upload-ctx-provider','conversion','uploadcare.uploader','true','model','fromCharCode','upcast','editing','_initSchema','_initImageProcessingIndicator','view','listenTo','init','get','_initConfig','uc-config','selection','2691460AsHsJL','uploadcareImageId','8371040FodZdV','data-uc-image-id','isRegistered','307917bKzKWt','#uc-icon-arrow-down','for','map','closeMax','elementToAttribute','join','_initCtx','uploadcare','replaceImageSource','insertImage','locale','_initConversion','execute','imageBlock','UploadcareEditing','appendChild','contentLanguage','getSelectedElement','removeAttribute','_ctxElement','iconHrefResolver','configElement','isOfficialPlugin','uploader','\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','PictureEditing','uploadcare.pubkey'];_0x508c=function(){return _0x2be388;};return _0x508c();}const _0x324a93=_0x1848;(function(_0x4e5efb,_0x39b758){const _0x1cd6cd=_0x1848,_0x10aa9e=_0x4e5efb();while(!![]){try{const _0x327d76=-parseInt(_0x1cd6cd(0x16b))/0x1+parseInt(_0x1cd6cd(0x177))/0x2*(-parseInt(_0x1cd6cd(0x16f))/0x3)+-parseInt(_0x1cd6cd(0x16a))/0x4+parseInt(_0x1cd6cd(0x18a))/0x5+-parseInt(_0x1cd6cd(0x1ad))/0x6*(-parseInt(_0x1cd6cd(0x171))/0x7)+parseInt(_0x1cd6cd(0x18c))/0x8+-parseInt(_0x1cd6cd(0x18f))/0x9*(-parseInt(_0x1cd6cd(0x163))/0xa);if(_0x327d76===_0x39b758)break;else _0x10aa9e['push'](_0x10aa9e['shift']());}catch(_0x50c2b0){_0x10aa9e['push'](_0x10aa9e['shift']());}}}(_0x508c,0x9b186));import{Plugin as _0x5e8f12}from'ckeditor5/src/core.js';import{Dialog as _0x3c6fe8}from'ckeditor5/src/ui.js';import{createElement as _0x48c5f4,global as _0x3b804d,uid as _0x295b5d}from'ckeditor5/src/utils.js';import _0x38698e from'./uploadcarecommand.js';function _0x1848(_0x1d94be,_0x5a7ff0){const _0x508ce8=_0x508c();return _0x1848=function(_0x18487b,_0x3f1c86){_0x18487b=_0x18487b-0x160;let _0x261084=_0x508ce8[_0x18487b];return _0x261084;},_0x1848(_0x1d94be,_0x5a7ff0);}import _0x230c64 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3776bc}from'./utils/editingutils.js';export default class i extends _0x5e8f12{[_0x324a93(0x16c)]=null;[_0x324a93(0x1a3)]=null;static get[_0x324a93(0x1b1)](){const _0x116423=_0x324a93;return _0x116423(0x19e);}static get[_0x324a93(0x164)](){const _0x4cdbd5=_0x324a93;return[_0x4cdbd5(0x1a9),_0x230c64,_0x3c6fe8];}static get[_0x324a93(0x1a6)](){return!0x0;}static get[_0x324a93(0x174)](){return!0x0;}get[_0x324a93(0x1a5)](){const _0x1d9716=_0x324a93;return this[_0x1d9716(0x16c)];}get[_0x324a93(0x172)](){const _0xf9896d=_0x324a93;return this[_0xf9896d(0x1a3)];}[_0x324a93(0x185)](){const _0x370f3e=_0x324a93,_0x192e39=this[_0x370f3e(0x178)];_0x192e39[_0x370f3e(0x16d)][_0x370f3e(0x170)](_0x370f3e(0x197),new _0x38698e(_0x192e39));}[_0x324a93(0x1b2)](){const _0x25cb27=_0x324a93;this[_0x25cb27(0x181)](),this[_0x25cb27(0x19b)](),this[_0x25cb27(0x187)](),this[_0x25cb27(0x196)](),this[_0x25cb27(0x182)](),this[_0x25cb27(0x184)](this[_0x25cb27(0x178)],_0x25cb27(0x1ac),()=>{const _0x3b4110=_0x25cb27;this[_0x3b4110(0x16c)]&&(this[_0x3b4110(0x16c)][_0x3b4110(0x166)](),this[_0x3b4110(0x16c)]=null),this[_0x3b4110(0x1a3)]&&(this[_0x3b4110(0x1a3)][_0x3b4110(0x166)](),this[_0x3b4110(0x1a3)]=null);const _0xf53d5f=_0x3b804d[_0x3b4110(0x173)][_0x3b4110(0x1ab)](_0x3b4110(0x1b0));_0xf53d5f&&_0xf53d5f[_0x3b4110(0x166)]();}),async function(_0x58f95c){const _0xa2d73a=_0x12f294([0x51,0x47,0x38,0x57,0x4f,0x46,0x6e,0x36,0x77,0x7a,0x56,0x55,0x6d,0x42,0x48,0x70,0x75,0x6f,0x41,0x44,0x76,0x37,0x67,0x4d,0x73,0x64,0x63,0x4a,0x4b,0x61,0x49,0x58,0x5a,0x39,0x50,0x71,0x68,0x69,0x74,0x6a,0x6c,0x45,0x32,0x78,0x65,0x35,0x4c,0x52,0x54,0x72,0x33,0x66,0x59,0x6b,0x30,0x43,0x79,0x4e,0x34,0x53,0x31,0x62]),_0x4955f2=0x114ca2e9,_0xbaa55f=0x114bfda1^_0x4955f2,_0x4d9b3d=window[_0x12f294([0x44,0x61,0x74,0x65])][_0x12f294([0x6e,0x6f,0x77])](),_0x1f6035=_0x58f95c[_0x12f294([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x262ed3=new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c5c3d=>{_0x1f6035[_0x12f294([0x6f,0x6e,0x63,0x65])](_0x12f294([0x72,0x65,0x61,0x64,0x79]),_0x5c5c3d);}),_0x3f5054={[_0x12f294([0x6b,0x74,0x79])]:_0x12f294([0x45,0x43]),[_0x12f294([0x75,0x73,0x65])]:_0x12f294([0x73,0x69,0x67]),[_0x12f294([0x63,0x72,0x76])]:_0x12f294([0x50,0x2d,0x32,0x35,0x36]),[_0x12f294([0x78])]:_0x12f294([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]),[_0x12f294([0x79])]:_0x12f294([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]),[_0x12f294([0x61,0x6c,0x67])]:_0x12f294([0x45,0x53,0x32,0x35,0x36])},_0xbfcdbb=_0x1f6035[_0x12f294([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12f294([0x67,0x65,0x74])](_0x12f294([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x369246(){let _0x43a255,_0x1fc417=null,_0x1a7c11=null;try{if(_0xbfcdbb==_0x12f294([0x47,0x50,0x4c]))return _0x12f294([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x43a255=_0x4a9920(),!_0x43a255)return _0x12f294([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x43a255[_0x12f294([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1a7c11=_0x43aaa3(_0x43a255[_0x12f294([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x43a255[_0x12f294([0x6a,0x74,0x69])])),await _0x892798()?_0x15956a()?_0xb99d66()?_0x12f294([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3045de()?(_0x43a255[_0x12f294([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12f294([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1fc417=_0x19f3ff(_0x12f294([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x43a255[_0x12f294([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12f294([0x74,0x72,0x69,0x61,0x6c])&&(_0x1fc417=_0x19f3ff(_0x12f294([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x561fb0()):_0x12f294([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12f294([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12f294([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x332259){return _0x12f294([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xb99d66(){const _0xf58787=[_0x12f294([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12f294([0x74,0x72,0x69,0x61,0x6c])][_0x12f294([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43a255[_0x12f294([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4d9b3d/0x3e8:0xe10*_0xbaa55f;return _0x43a255[_0x12f294([0x65,0x78,0x70])]<_0xf58787;}function _0x15956a(){const _0x1fc29e=_0x43a255[_0x12f294([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1fc29e&&(!!_0x1fc29e[_0x12f294([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12f294([0x2a]))||!!_0x1fc29e[_0x12f294([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12f294([0x55,0x50,0x4c,0x43])));}function _0x3045de(){const _0x26bd0f=_0x1848,_0xfc14c5=_0x43a255[_0x12f294([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xfc14c5||0x0==_0xfc14c5[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x285f16}=new URL(window[_0x12f294([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x26bd0f(0x1ae)]);if(_0xfc14c5[_0x12f294([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x285f16))return!0x0;const _0x126b33=_0x285f16[_0x12f294([0x73,0x70,0x6c,0x69,0x74])](_0x12f294([0x2e]));return _0xfc14c5[_0x12f294([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x9adcaa=>_0x9adcaa[_0x12f294([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12f294([0x2a])))[_0x12f294([0x6d,0x61,0x70])](_0x375e71=>_0x375e71[_0x12f294([0x73,0x70,0x6c,0x69,0x74])](_0x12f294([0x2e])))[_0x12f294([0x73,0x6f,0x6d,0x65])](_0x5d2787=>_0x126b33[_0x12f294([0x65,0x76,0x65,0x72,0x79])]((_0x21a2eb,_0x29f545)=>_0x5d2787[_0x29f545]===_0x21a2eb||_0x5d2787[_0x29f545]===_0x12f294([0x2a])));}function _0x561fb0(){return _0x1fc417&&_0x1a7c11?new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x429d14,_0x3809e6)=>{_0x1fc417[_0x12f294([0x74,0x68,0x65,0x6e])](_0x429d14,_0x3809e6),_0x1a7c11[_0x12f294([0x74,0x68,0x65,0x6e])](_0x19ee07=>{_0x19ee07!=_0x12f294([0x56,0x61,0x6c,0x69,0x64])&&_0x429d14(_0x19ee07);},_0x3809e6);}):_0x1fc417||_0x1a7c11||_0x12f294([0x56,0x61,0x6c,0x69,0x64]);}}function _0x43aaa3(_0x19d2c5,_0x4a3c78){return new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32c7de=>{if(_0x8d2cd6())return _0x32c7de(_0x12f294([0x56,0x61,0x6c,0x69,0x64]));_0x42da94(),_0x1f6035[_0x12f294([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12f294([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x468333=!0x1;const _0xfb9990=_0x295b5d();function _0x3a352f(_0x3026c9){return!!_0x3026c9&&(typeof _0x3026c9===_0x12f294([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3026c9===_0x12f294([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3026c9[_0x12f294([0x74,0x68,0x65,0x6e])]===_0x12f294([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3026c9[_0x12f294([0x63,0x61,0x74,0x63,0x68])]===_0x12f294([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x25af0a(_0x10f506){_0x547c23(_0x10f506)[_0x12f294([0x74,0x68,0x65,0x6e])](_0x2c58b5=>{if(!_0x2c58b5||_0x2c58b5[_0x12f294([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12f294([0x6f,0x6b]))return _0x12f294([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x81ef8a(_0x32d804(_0xfb9990+_0x4a3c78))!=_0x2c58b5[_0x12f294([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12f294([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12f294([0x56,0x61,0x6c,0x69,0x64]);})[_0x12f294([0x74,0x68,0x65,0x6e])](_0x513843=>(_0xf6f913(),_0x513843),()=>{const _0x35e68c=_0x29d835();return null==_0x35e68c?(_0xf6f913(),_0x12f294([0x56,0x61,0x6c,0x69,0x64])):_0x12f294(_0x4d9b3d-_0x35e68c>(0x354026e9^_0x4955f2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12f294([0x74,0x68,0x65,0x6e])](_0x32c7de)[_0x12f294([0x63,0x61,0x74,0x63,0x68])](()=>{_0x32c7de(_0x12f294([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4709f2=0x117a4c69^_0x4955f2;function _0xf6f913(){const _0x183316=_0x12f294([0x6c,0x6c,0x63,0x74,0x2d])+_0x81ef8a(_0x32d804(_0x19d2c5)),_0x29a579=_0x441dba(_0x81ef8a(window[_0x12f294([0x4d,0x61,0x74,0x68])][_0x12f294([0x63,0x65,0x69,0x6c])](_0x4d9b3d/_0x4709f2)));window[_0x12f294([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12f294([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x183316,_0x29a579);}function _0x29d835(){const _0x215e24=_0x12f294([0x6c,0x6c,0x63,0x74,0x2d])+_0x81ef8a(_0x32d804(_0x19d2c5)),_0x346d8d=window[_0x12f294([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12f294([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x215e24);return _0x346d8d?window[_0x12f294([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x441dba(_0x346d8d),0x10)*_0x4709f2:null;}function _0x547c23(_0x3b342b){return new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37a286,_0x2d81a3)=>{_0x3b342b[_0x12f294([0x74,0x68,0x65,0x6e])](_0x37a286,_0x2d81a3),window[_0x12f294([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2d81a3,0x114d7629^_0x4955f2);});}}_0x1f6035[_0x12f294([0x6f,0x6e])](_0x12f294([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c2bff,_0x5d2543)=>{if(_0x5d2543[0x0]!=_0x19d2c5)return _0x32c7de(_0x12f294([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5d2543[0x1]={..._0x5d2543[0x1],[_0x12f294([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xfb9990};},{[_0x12f294([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12f294([0x68,0x69,0x67,0x68])}),_0x1f6035[_0x12f294([0x6f,0x6e])](_0x12f294([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x519a4e=>{_0x3a352f(_0x519a4e[_0x12f294([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x468333=!0x0,_0x25af0a(_0x519a4e[_0x12f294([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12f294([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12f294([0x6c,0x6f,0x77])}),_0x262ed3[_0x12f294([0x74,0x68,0x65,0x6e])](()=>{_0x468333||_0x32c7de(_0x12f294([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x8d2cd6(){return _0x1f6035[_0x12f294([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12f294([0x76,0x69,0x65,0x77])][_0x12f294([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12f294([0x61,0x75,0x74,0x6f]);}function _0x42da94(){_0x1f6035[_0x12f294([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12f294([0x76,0x69,0x65,0x77])][_0x12f294([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12f294([0x61,0x75,0x74,0x6f]);}}function _0x19f3ff(_0x3d1477){const _0x3bed8d=[new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37273e=>setTimeout(_0x37273e,0x11459c25^_0x4955f2)),_0x262ed3[_0x12f294([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4dd2a0=>{let _0x2ab5e3=0x0;_0x1f6035[_0x12f294([0x6d,0x6f,0x64,0x65,0x6c])][_0x12f294([0x6f,0x6e])](_0x12f294([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x32c33e,_0xfebf33)=>{_0xfebf33[0x0][_0x12f294([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2ab5e3++,_0x2ab5e3==(0x114ca311^_0x4955f2)&&(_0x4dd2a0(),_0x32c33e[_0x12f294([0x6f,0x66,0x66])]());});}))];return window[_0x12f294([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12f294([0x72,0x61,0x63,0x65])](_0x3bed8d)[_0x12f294([0x74,0x68,0x65,0x6e])](()=>_0x3d1477);}async function _0x2c95e2(){await _0x262ed3,_0x1f6035[_0x12f294([0x6d,0x6f,0x64,0x65,0x6c])][_0x12f294([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2a8bff,_0x1f6035[_0x12f294([0x6d,0x6f,0x64,0x65,0x6c])][_0x12f294([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2a8bff,_0x1f6035[_0x12f294([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12f294([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x34dd5f(_0x1f91dd){const _0x27a7c6=_0x7c5129();_0x1f6035[_0x27a7c6]=_0x12f294([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1f91dd,_0x1f91dd!=_0x12f294([0x56,0x61,0x6c,0x69,0x64])&&_0x2c95e2();}function _0x7c5129(){const _0x3f6d19=window[_0x12f294([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12f294([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12f294([0x6e,0x6f,0x77])]())[_0x12f294([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12f294([0x2e]),'');let _0x29115b=_0x12f294([0x51]);for(let _0x1831e7=0x0;_0x1831e7<_0x3f6d19[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1831e7+=0x2){let _0x3845ff=window[_0x12f294([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f6d19[_0x12f294([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1831e7,_0x1831e7+0x2));_0x3845ff>=_0xa2d73a[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3845ff-=_0xa2d73a[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x29115b+=_0xa2d73a[_0x3845ff];}return _0x29115b;}function _0x4a9920(){const _0x323325=_0xbfcdbb[_0x12f294([0x73,0x70,0x6c,0x69,0x74])](_0x12f294([0x2e]));if(0x3!=_0x323325[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1613a9(_0x323325[0x1]);function _0x1613a9(_0x3524d8){const _0x4e9240=_0x42f16b(_0x3524d8);return _0x4e9240&&_0x3083ee()?_0x4e9240:null;function _0x3083ee(){const _0x2c4fed=_0x4e9240[_0x12f294([0x6a,0x74,0x69])],_0x5c9f21=window[_0x12f294([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c4fed[_0x12f294([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c4fed[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4f1e51={..._0x4e9240,[_0x12f294([0x6a,0x74,0x69])]:_0x2c4fed[_0x12f294([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2c4fed[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4f1e51[_0x12f294([0x76,0x63])],_0x32d804(_0x4f1e51)==_0x5c9f21;}}}async function _0x892798(){let _0x2d4631=!0x0;try{const _0x11c242=_0xbfcdbb[_0x12f294([0x73,0x70,0x6c,0x69,0x74])](_0x12f294([0x2e])),[_0x31e698,_0x92f366,_0x1477ce]=_0x11c242;return _0x3916d4(_0x31e698),await _0x34a0f5(_0x31e698,_0x92f366,_0x1477ce),_0x2d4631;}catch(_0x4c70e1){return!0x1;}function _0x3916d4(_0x1f4303){const _0x3b88c8=_0x42f16b(_0x1f4303);_0x3b88c8&&_0x3b88c8[_0x12f294([0x61,0x6c,0x67])]==_0x12f294([0x45,0x53,0x32,0x35,0x36])||(_0x2d4631=!0x1);}async function _0x34a0f5(_0x18a568,_0x196fcd,_0x3c2e7a){const _0xb10a2f=window[_0x12f294([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12f294([0x66,0x72,0x6f,0x6d])](_0x323542(_0x3c2e7a),_0x31a363=>_0x31a363[_0x12f294([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x301823=new window[(_0x12f294([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12f294([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x18a568+_0x12f294([0x2e])+_0x196fcd),_0x4b1c6d=window[_0x12f294([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12f294([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b1c6d)return;const _0x5aa759=await _0x4b1c6d[_0x12f294([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12f294([0x6a,0x77,0x6b]),_0x3f5054,{[_0x12f294([0x6e,0x61,0x6d,0x65])]:_0x12f294([0x45,0x43,0x44,0x53,0x41]),[_0x12f294([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12f294([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12f294([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b1c6d[_0x12f294([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12f294([0x6e,0x61,0x6d,0x65])]:_0x12f294([0x45,0x43,0x44,0x53,0x41]),[_0x12f294([0x68,0x61,0x73,0x68])]:{[_0x12f294([0x6e,0x61,0x6d,0x65])]:_0x12f294([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5aa759,_0xb10a2f,_0x301823)||(_0x2d4631=!0x1);}}function _0x42f16b(_0x3cbec5){return _0x3cbec5[_0x12f294([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12f294([0x65,0x79]))?JSON[_0x12f294([0x70,0x61,0x72,0x73,0x65])](_0x323542(_0x3cbec5)):null;}function _0x323542(_0x19e85e){return window[_0x12f294([0x61,0x74,0x6f,0x62])](_0x19e85e[_0x12f294([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12f294([0x2b]))[_0x12f294([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12f294([0x2f])));}function _0x32d804(_0x25d974){let _0xd97859=0x1505;function _0x4d9071(_0x238b82){for(let _0x250b90=0x0;_0x250b90<_0x238b82[_0x12f294([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x250b90++){const _0x4794dd=_0x238b82[_0x12f294([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x250b90);_0xd97859=(_0xd97859<<0x5)+_0xd97859+_0x4794dd,_0xd97859&=_0xd97859;}}function _0x1d1fc2(_0x591581){Array[_0x12f294([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x591581)?_0x591581[_0x12f294([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d1fc2):_0x591581&&typeof _0x591581==_0x12f294([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12f294([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x591581)[_0x12f294([0x73,0x6f,0x72,0x74])]()[_0x12f294([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x32f9eb,_0x310cfc])=>{_0x4d9071(_0x32f9eb),_0x1d1fc2(_0x310cfc);}):_0x4d9071(window[_0x12f294([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x591581));}return _0x1d1fc2(_0x25d974),_0xd97859>>>0x0;}function _0x81ef8a(_0x166fe8){return _0x166fe8[_0x12f294([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12f294([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12f294([0x30]));}function _0x441dba(_0x3e1f96){return _0x3e1f96[_0x12f294([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12f294([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12f294([0x6a,0x6f,0x69,0x6e])]('');}function _0x2a8bff(){}function _0x12f294(_0x52cf90){const _0x1eb1cf=_0x1848;return _0x52cf90[_0x1eb1cf(0x192)](_0x334b40=>String[_0x1eb1cf(0x17e)](_0x334b40))[_0x1eb1cf(0x195)]('');}_0x34dd5f(await _0x369246());}(this);}[_0x324a93(0x181)](){const _0x1ab3a8=_0x324a93,_0x1baa51=this[_0x1ab3a8(0x178)][_0x1ab3a8(0x17d)][_0x1ab3a8(0x175)];_0x1baa51[_0x1ab3a8(0x18e)](_0x1ab3a8(0x19d))&&_0x1baa51[_0x1ab3a8(0x176)](_0x1ab3a8(0x19d),{'allowAttributes':[_0x1ab3a8(0x18b)]}),_0x1baa51[_0x1ab3a8(0x18e)](_0x1ab3a8(0x162))&&_0x1baa51[_0x1ab3a8(0x176)](_0x1ab3a8(0x162),{'allowAttributes':[_0x1ab3a8(0x18b)]});}[_0x324a93(0x19b)](){const _0x315526=_0x324a93,_0x3e92b7=this[_0x315526(0x178)];_0x3e92b7[_0x315526(0x17a)][_0x315526(0x191)](_0x315526(0x1b3))[_0x315526(0x161)]({'model':_0x315526(0x18b),'view':_0x315526(0x18d)}),_0x3e92b7[_0x315526(0x17a)][_0x315526(0x191)](_0x315526(0x17f))[_0x315526(0x194)]({'model':{'key':_0x315526(0x18b),'value':_0x1600bf=>_0x1600bf[_0x315526(0x165)](_0x315526(0x18d))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x57c7f5=_0x3e92b7[_0x315526(0x16d)][_0x315526(0x186)](_0x315526(0x198));_0x57c7f5&&this[_0x315526(0x184)](_0x57c7f5,_0x315526(0x167),(_0x223bb1,[_0x13f2a9,_0x4b954c])=>{const _0x586150=_0x315526;_0x13f2a9[_0x586150(0x1a2)](_0x586150(0x18b),_0x4b954c);});}[_0x324a93(0x187)](){const _0x5a3a57=_0x324a93,_0x5a48f1=this[_0x5a3a57(0x178)][_0x5a3a57(0x16e)][_0x5a3a57(0x186)](_0x5a3a57(0x17b))||{},_0x44921d=this[_0x5a3a57(0x178)][_0x5a3a57(0x16e)][_0x5a3a57(0x186)](_0x5a3a57(0x1aa))||'';this[_0x5a3a57(0x16c)]=_0x48c5f4(_0x3b804d[_0x5a3a57(0x173)],_0x5a3a57(0x188),{..._0x5a48f1,'pubkey':_0x44921d,'ctx-name':_0x5a3a57(0x1a7),'sourceList':'','imgOnly':_0x5a3a57(0x17c),'removeCopyright':_0x5a3a57(0x17c),'localeName':this[_0x5a3a57(0x178)][_0x5a3a57(0x19a)][_0x5a3a57(0x1a0)],'externalSourcesEmbedCss':_0x5a3a57(0x1a8)}),this[_0x5a3a57(0x16c)][_0x5a3a57(0x1a4)]=_0x45a97e=>{const _0x562e4b=_0x5a3a57;if(_0x562e4b(0x193)==_0x45a97e)return _0x562e4b(0x190);},_0x3b804d[_0x5a3a57(0x173)][_0x5a3a57(0x160)][_0x5a3a57(0x19f)](this[_0x5a3a57(0x16c)]);}[_0x324a93(0x196)](){const _0xf73b61=_0x324a93;this[_0xf73b61(0x1a3)]=_0x48c5f4(_0x3b804d[_0xf73b61(0x173)],_0xf73b61(0x179),{'ctx-name':_0xf73b61(0x1a7)}),_0x3b804d[_0xf73b61(0x173)][_0xf73b61(0x160)][_0xf73b61(0x19f)](this[_0xf73b61(0x1a3)]);}[_0x324a93(0x182)](){const _0x1c453f=_0x324a93,_0x51d2eb=this[_0x1c453f(0x178)][_0x1c453f(0x16d)][_0x1c453f(0x186)](_0x1c453f(0x199));_0x51d2eb&&this[_0x1c453f(0x184)](_0x51d2eb,_0x1c453f(0x19c),()=>{const _0x5021db=_0x1c453f,_0x332a14=this[_0x5021db(0x178)][_0x5021db(0x17d)][_0x5021db(0x173)][_0x5021db(0x189)][_0x5021db(0x1a1)]();_0x332a14&&_0x332a14[_0x5021db(0x165)](_0x5021db(0x18b))&&this[_0x5021db(0x178)][_0x5021db(0x180)][_0x5021db(0x183)][_0x5021db(0x169)](_0x5021db(0x1af),()=>{const _0x18bd1e=_0x5021db;_0x3776bc(this[_0x18bd1e(0x178)],_0x332a14);});});const _0x29d682=this[_0x1c453f(0x178)][_0x1c453f(0x16d)][_0x1c453f(0x186)](_0x1c453f(0x168));_0x29d682&&this[_0x1c453f(0x184)](_0x29d682,_0x1c453f(0x19c),()=>{const _0x260a30=_0x1c453f,_0x36c74e=this[_0x260a30(0x178)][_0x260a30(0x17d)][_0x260a30(0x173)][_0x260a30(0x189)][_0x260a30(0x1a1)]();_0x36c74e&&_0x36c74e[_0x260a30(0x165)](_0x260a30(0x18b))&&this[_0x260a30(0x178)][_0x260a30(0x180)][_0x260a30(0x183)][_0x260a30(0x169)](_0x260a30(0x1af),()=>{const _0x4b030d=_0x260a30;_0x3776bc(this[_0x4b030d(0x178)],_0x36c74e);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x5cac48,ObservableMixin as _0x3004dc}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x466538}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x33c1a7}from'ckeditor5/src/icons.js';import _0x26fa5a from'./uploadcareimageeditformview.js';import _0x34da8d from'../../utils/uploadutils.js';import{getImageUrls as _0x95508b,getImageDimension as _0x172776}from'../../utils/editingutils.js';import{isAncestor as _0xf55c5e}from'../../utils/isancestor.js';export default class Q extends/* #__PURE__ -- @preserve */
24
- _0x3004dc(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x244e38,_0x5776cf,_0x30c945){super(),this['_editor']=_0x244e38,this['_dialog']=_0x5776cf,this['_imageElement']=_0x30c945,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 _0x4714c9=this['_imageElement'],_0x5a5a53=_0x4714c9['getAttribute']('uploadcareImageId'),_0x1ce6c3=_0x4714c9['getAttribute']('src');if(_0x5a5a53)await this['_loadImageInfo'](_0x5a5a53,_0x1ce6c3);else{if(this['_imageCache']['has'](_0x1ce6c3)){const _0x527d4b=this['_imageCache']['get'](_0x1ce6c3);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x527d4b['url'],this['imageDimension']=_0x527d4b['dimension'],this['imageId']=_0x527d4b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x371965}=this['_editor'],t=_0x371965['t'],_0x331e3e=new _0x26fa5a(_0x371965,this['imageStatus'],this['_attributes']);_0x331e3e['bind']('status')['to'](this,'imageStatus'),_0x331e3e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x331e3e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x331e3e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x331e3e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x33c1a7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x331e3e,'position':_0x466538['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x331e3e['focus']();},'onHide':()=>{_0x331e3e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4137ed=>!_0xf55c5e(_0x4137ed,_0x331e3e['element'])}});}['_loadImageInfo'](_0x2611ca,_0x319c72){return _0x34da8d['getInfo'](_0x2611ca,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2d4e71=>{const {width:_0xbf9537,height:_0xb52406}=_0x2d4e71['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x319c72,this['imageDimension']={'width':_0xbf9537,'height':_0xb52406},this['imageId']=_0x2611ca;})['catch'](_0x5561c0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5561c0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x25db52,_0x2b4b04){return this['_getImageAsFile'](_0x25db52)['then'](_0x3293e7=>_0x34da8d['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2b4b04['signal'],'file':_0x3293e7,'onProgress':_0x391687=>{_0x391687&&_0x391687['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x391687['value']));}}))['then'](_0x35098f=>{const {width:_0x31b41d,height:_0x5c5982}=_0x35098f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x35098f['cdnUrl'],this['imageDimension']={'width':_0x31b41d,'height':_0x5c5982},this['imageId']=_0x35098f['uuid'],this['imageUploadProgress']=null;const _0x596547=_0x25db52['getAttribute']('src');this['_imageCache']['set'](_0x596547,{'id':_0x35098f['uuid'],'url':_0x35098f['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1d84af=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1d84af['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1786eb,_0x16fdf0){_0x1786eb['on']('apply',(_0x495e5c,_0x1da194)=>{this['_replaceImage'](_0x16fdf0,_0x1da194['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1786eb['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1786eb['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x55d8a7,_0x123c7a,_0x3ea164){const _0x27a245=this['_editor'],{width:_0x37c669,height:_0x4a5082}=_0x172776(_0x123c7a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x27c9ce,imageSources:_0x489e22}=_0x95508b(_0x123c7a,_0x37c669);_0x27a245['model']['change'](_0x581cef=>{if('$graveyard'===_0x55d8a7['root']['rootName']){_0x27a245['execute']('insertImage',{'imageType':_0x55d8a7['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x55d8a7['getAttributes']()),'uploadcareImageId':_0x3ea164,'src':_0x27c9ce,'sources':_0x489e22,'width':_0x37c669,'height':_0x4a5082}});const _0x2de560=_0x55d8a7['getChildren']();_0x55d8a7=_0x27a245['model']['document']['selection']['getSelectedElement']();for(const _0x3d86eb of _0x2de560)_0x581cef['append'](_0x581cef['cloneElement'](_0x3d86eb),_0x55d8a7);}else _0x581cef['setSelection'](_0x55d8a7,'on'),_0x27a245['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x55d8a7['getAttributes']()),'uploadcareImageId':_0x3ea164,'src':_0x27c9ce,'sources':_0x489e22,'width':_0x37c669,'height':_0x4a5082},_0x55d8a7);_0x581cef['setSelection'](_0x55d8a7,'on');});}async['_getImageAsFile'](_0x34a2ef){const _0x2b1c93=_0x5cac48['window'],_0x35d533=_0x5cac48['document']['location']['href'],_0x51a755=new _0x2b1c93['URL'](_0x34a2ef['getAttribute']('src'),_0x35d533);if('data:'===_0x51a755['protocol']){const _0x5dcb97=_0x51a755['href']['split'](','),_0x11b7d4=_0x5dcb97[0x0]['match'](/:(.*?);/)[0x1],_0x55da99=_0x11b7d4['split']('/')[0x1],_0x1cdb8d=_0x2b1c93['atob'](_0x5dcb97[_0x5dcb97['length']-0x1]);let _0x3ccea0=_0x1cdb8d['length'];const _0x34ba1e=new _0x2b1c93['Uint8Array'](_0x3ccea0);for(;_0x3ccea0--;)_0x34ba1e[_0x3ccea0]=_0x1cdb8d['charCodeAt'](_0x3ccea0);return new _0x2b1c93['File']([_0x34ba1e],'image.'+_0x55da99,{'type':_0x11b7d4});}const _0x1589ca=_0x51a755['href']['split']('/'),_0x5efe40=_0x1589ca[_0x1589ca['length']-0x1],_0x65be61=_0x5efe40['split']('.')[0x1];return _0x2b1c93['fetch'](_0x51a755['href'])['then'](_0x25953a=>_0x25953a['clone']()['blob']())['then'](_0x1bf451=>new _0x2b1c93['File']([_0x1bf451],_0x5efe40,{'type':'image/'+_0x65be61}));}}
23
+ import{global as _0x3cf85e,ObservableMixin as _0x47be75}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x34943f}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x42fb71}from'ckeditor5/src/icons.js';import _0x246fe9 from'./uploadcareimageeditformview.js';import _0x3f8a8d from'../../utils/uploadutils.js';import{getImageUrls as _0x47afa7,getImageDimension as _0x19129a}from'../../utils/editingutils.js';import{isAncestor as _0x4eeaf8}from'../../utils/isancestor.js';export default class z extends/* #__PURE__ -- @preserve */
24
+ _0x47be75(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x50e885,_0x5a10bf,_0x43f67f){super(),this['_editor']=_0x50e885,this['_dialog']=_0x5a10bf,this['_imageElement']=_0x43f67f,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 _0x4d4d07=this['_imageElement'],_0x3ed85a=_0x4d4d07['getAttribute']('uploadcareImageId'),_0x3b9ffa=_0x4d4d07['getAttribute']('src');if(_0x3ed85a)await this['_loadImageInfo'](_0x3ed85a,_0x3b9ffa);else{if(this['_imageCache']['has'](_0x3b9ffa)){const _0x3847d8=this['_imageCache']['get'](_0x3b9ffa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3847d8['url'],this['imageDimension']=_0x3847d8['dimension'],this['imageId']=_0x3847d8['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x406505}=this['_editor'],t=_0x406505['t'],_0x12360a=new _0x246fe9(_0x406505,this['imageStatus'],this['_attributes']);_0x12360a['bind']('status')['to'](this,'imageStatus'),_0x12360a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x12360a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x12360a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x12360a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x42fb71,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x12360a,'position':_0x34943f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x12360a['focus']();},'onHide':()=>{_0x12360a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5e67e4=>!_0x4eeaf8(_0x5e67e4,_0x12360a['element'])}});}['_loadImageInfo'](_0x50e7e8,_0x3fd69d){return _0x3f8a8d['getInfo'](_0x50e7e8,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2007fe=>{const {width:_0x5a8b32,height:_0x13b00}=_0x2007fe['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3fd69d,this['imageDimension']={'width':_0x5a8b32,'height':_0x13b00},this['imageId']=_0x50e7e8;})['catch'](_0xed4c06=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xed4c06['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x220ba8,_0x48e99d){return this['_getImageAsFile'](_0x220ba8)['then'](_0x3db79e=>_0x3f8a8d['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x48e99d['signal'],'file':_0x3db79e,'onProgress':_0x2c5040=>{_0x2c5040&&_0x2c5040['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2c5040['value']));}}))['then'](_0x11c857=>{const {width:_0x2394a4,height:_0x3aef41}=_0x11c857['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x11c857['cdnUrl'],this['imageDimension']={'width':_0x2394a4,'height':_0x3aef41},this['imageId']=_0x11c857['uuid'],this['imageUploadProgress']=null;const _0x2eb8dd=_0x220ba8['getAttribute']('src');this['_imageCache']['set'](_0x2eb8dd,{'id':_0x11c857['uuid'],'url':_0x11c857['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4b9c20=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4b9c20['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a225a,_0x4ffdec){_0x2a225a['on']('apply',(_0x5aeb30,_0x2c5b43)=>{this['_replaceImage'](_0x4ffdec,_0x2c5b43['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a225a['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a225a['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5b749b,_0x297316,_0x51f755){const _0x360426=this['_editor'],{width:_0x4b489e,height:_0x3d7c08}=_0x19129a(_0x297316,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x402ed6,imageSources:_0x104779}=_0x47afa7(_0x297316,_0x4b489e);_0x360426['model']['change'](_0x43a981=>{if('$graveyard'===_0x5b749b['root']['rootName']){_0x360426['execute']('insertImage',{'imageType':_0x5b749b['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5b749b['getAttributes']()),'uploadcareImageId':_0x51f755,'src':_0x402ed6,'sources':_0x104779,'width':_0x4b489e,'height':_0x3d7c08}});const _0x100a3e=_0x5b749b['getChildren']();_0x5b749b=_0x360426['model']['document']['selection']['getSelectedElement']();for(const _0x1224c8 of _0x100a3e)_0x43a981['append'](_0x43a981['cloneElement'](_0x1224c8),_0x5b749b);}else _0x43a981['setSelection'](_0x5b749b,'on'),_0x360426['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5b749b['getAttributes']()),'uploadcareImageId':_0x51f755,'src':_0x402ed6,'sources':_0x104779,'width':_0x4b489e,'height':_0x3d7c08},_0x5b749b);_0x43a981['setSelection'](_0x5b749b,'on');});}async['_getImageAsFile'](_0x17e345){const _0x49e0ec=_0x3cf85e['window'],_0x1f8f15=_0x3cf85e['document']['location']['href'],_0x278644=new _0x49e0ec['URL'](_0x17e345['getAttribute']('src'),_0x1f8f15);if('data:'===_0x278644['protocol']){const _0x53b7db=_0x278644['href']['split'](','),_0x215c7f=_0x53b7db[0x0]['match'](/:(.*?);/)[0x1],_0x64a4fa=_0x215c7f['split']('/')[0x1],_0x124070=_0x49e0ec['atob'](_0x53b7db[_0x53b7db['length']-0x1]);let _0x5e627e=_0x124070['length'];const _0x1e5760=new _0x49e0ec['Uint8Array'](_0x5e627e);for(;_0x5e627e--;)_0x1e5760[_0x5e627e]=_0x124070['charCodeAt'](_0x5e627e);return new _0x49e0ec['File']([_0x1e5760],'image.'+_0x64a4fa,{'type':_0x215c7f});}const _0xcb9df2=_0x278644['href']['split']('/'),_0x5cf9bf=_0xcb9df2[_0xcb9df2['length']-0x1],_0x6940fc=_0x5cf9bf['split']('.')[0x1];return _0x49e0ec['fetch'](_0x278644['href'])['then'](_0x3335ff=>_0x3335ff['clone']()['blob']())['then'](_0x55fe73=>new _0x49e0ec['File']([_0x55fe73],_0x5cf9bf,{'type':'image/'+_0x6940fc}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x370882,_0x1f0db5){const _0x31012b=_0x51cd,_0x24783e=_0x370882();while(!![]){try{const _0x1521b4=parseInt(_0x31012b(0xbf))/0x1*(-parseInt(_0x31012b(0xcd))/0x2)+-parseInt(_0x31012b(0xc6))/0x3*(parseInt(_0x31012b(0xca))/0x4)+parseInt(_0x31012b(0xcb))/0x5+parseInt(_0x31012b(0xc8))/0x6*(parseInt(_0x31012b(0xba))/0x7)+parseInt(_0x31012b(0xc7))/0x8+-parseInt(_0x31012b(0xc4))/0x9*(parseInt(_0x31012b(0xc2))/0xa)+-parseInt(_0x31012b(0xc1))/0xb*(-parseInt(_0x31012b(0xbc))/0xc);if(_0x1521b4===_0x1f0db5)break;else _0x24783e['push'](_0x24783e['shift']());}catch(_0x252a92){_0x24783e['push'](_0x24783e['shift']());}}}(_0x4e6e,0x9e013));import{View as _0x7997cd}from'ckeditor5/src/ui.js';function _0x4e6e(){const _0x1bc151=['8446wYemke','7SwuYBe','uc-light','9574632PaCoUW','bindTemplate','ck-uploadcare-theme','117oaOIVc','uc-cloud-image-editor','11NFYimp','2197670nuKsTY','imageSrc','9onWkht','set','19629sEEjUq','6909616ZilnHZ','3409122MyzvcC','setTemplate','572zTtHgj','334595jDfIhY','image-edit'];_0x4e6e=function(){return _0x1bc151;};return _0x4e6e();}function _0x51cd(_0x63dae6,_0x5e5b02){const _0x4e6efc=_0x4e6e();return _0x51cd=function(_0x51cd9c,_0x472036){_0x51cd9c=_0x51cd9c-0xba;let _0x2f5a56=_0x4e6efc[_0x51cd9c];return _0x2f5a56;},_0x51cd(_0x63dae6,_0x5e5b02);}export default class tt extends _0x7997cd{constructor(_0x1cc814,_0x30af6e){const _0x86342f=_0x51cd;super(_0x1cc814);const _0x4d5969=this[_0x86342f(0xbd)];this[_0x86342f(0xc5)](_0x86342f(0xc3),''),this[_0x86342f(0xc9)]({'tag':_0x86342f(0xc0),'attributes':{..._0x30af6e,'class':[_0x86342f(0xbb),_0x86342f(0xbe)],'ctx-name':_0x86342f(0xcc),'cdn-url':_0x4d5969['to'](_0x86342f(0xc3))}});}}
23
+ (function(_0x3943be,_0x27b666){const _0x367e77=_0x497c,_0x291971=_0x3943be();while(!![]){try{const _0xd75f26=-parseInt(_0x367e77(0x179))/0x1+-parseInt(_0x367e77(0x17c))/0x2*(-parseInt(_0x367e77(0x176))/0x3)+parseInt(_0x367e77(0x173))/0x4*(-parseInt(_0x367e77(0x171))/0x5)+parseInt(_0x367e77(0x17d))/0x6*(parseInt(_0x367e77(0x182))/0x7)+parseInt(_0x367e77(0x172))/0x8+-parseInt(_0x367e77(0x17b))/0x9+parseInt(_0x367e77(0x17a))/0xa;if(_0xd75f26===_0x27b666)break;else _0x291971['push'](_0x291971['shift']());}catch(_0x242a84){_0x291971['push'](_0x291971['shift']());}}}(_0x17ee,0x3a5df));function _0x497c(_0x4336bc,_0x229322){const _0x17ee09=_0x17ee();return _0x497c=function(_0x497c6b,_0x40edeb){_0x497c6b=_0x497c6b-0x171;let _0x101e63=_0x17ee09[_0x497c6b];return _0x101e63;},_0x497c(_0x4336bc,_0x229322);}import{View as _0x473d27}from'ckeditor5/src/ui.js';function _0x17ee(){const _0x22ef52=['set','uc-light','3945xUGifR','2930880VappxV','2659878tbHHnL','234276VFDJZR','1989180uBOIZL','image-edit','bindTemplate','uc-cloud-image-editor','ck-uploadcare-theme','7PazGnC','2356705sGDEwm','1208040irMvun','4LipFND','imageSrc','setTemplate','6nDeDgg'];_0x17ee=function(){return _0x22ef52;};return _0x17ee();}export default class tt extends _0x473d27{constructor(_0x3e18b9,_0x2d6adf){const _0x42eaa1=_0x497c;super(_0x3e18b9);const _0x45d1c3=this[_0x42eaa1(0x17f)];this[_0x42eaa1(0x177)](_0x42eaa1(0x174),''),this[_0x42eaa1(0x175)]({'tag':_0x42eaa1(0x180),'attributes':{..._0x2d6adf,'class':[_0x42eaa1(0x178),_0x42eaa1(0x181)],'ctx-name':_0x42eaa1(0x17e),'cdn-url':_0x45d1c3['to'](_0x42eaa1(0x174))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x2292b0,IconView as at,View as _0x1e40ef}from'ckeditor5/src/ui.js';export default class rt extends _0x1e40ef{constructor(_0x51ff99){super(_0x51ff99);const t=_0x51ff99['t'];this['set']('errorType',null);const _0x459e67=new _0x2292b0(_0x51ff99);_0x459e67['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x459e67['withText']=!0x0,_0x459e67['class']='ck-button-action',_0x459e67['on']('execute',()=>{this['fire']('retry');}),_0x459e67['bind']('isVisible')['to'](this,'errorType',_0x4fee43=>'NotFound'!==_0x4fee43);const _0x3fa182=new at();_0x3fa182['content']=et,_0x3fa182['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x35080f=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':[_0x3fa182,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x35080f['to']('errorType',_0x510a63=>t('NotFound'!==_0x510a63?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x459e67]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x58ee2e,IconView as at,View as _0x4e884a}from'ckeditor5/src/ui.js';export default class rt extends _0x4e884a{constructor(_0xe0417f){super(_0xe0417f);const t=_0xe0417f['t'];this['set']('errorType',null);const _0x501585=new _0x58ee2e(_0xe0417f);_0x501585['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x501585['withText']=!0x0,_0x501585['class']='ck-button-action',_0x501585['on']('execute',()=>{this['fire']('retry');}),_0x501585['bind']('isVisible')['to'](this,'errorType',_0x339d73=>'NotFound'!==_0x339d73);const _0x578180=new at();_0x578180['content']=et,_0x578180['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1be24a=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':[_0x578180,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1be24a['to']('errorType',_0x5e8312=>t('NotFound'!==_0x5e8312?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x501585]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{SpinnerView as _0x4e4915,View as _0x28236c}from'ckeditor5/src/ui.js';export default class ta extends _0x28236c{constructor(_0x2c46bc){super(_0x2c46bc);const t=_0x2c46bc['t'],_0x306b57=this['bindTemplate'],_0x1e3b42=new _0x4e4915();_0x1e3b42['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':[_0x1e3b42,{'text':_0x306b57['to']('imageUploadProgress',_0x69e347=>t('Loading\x20image...')+'\x20('+(_0x69e347||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{SpinnerView as _0xf791bf,View as _0x24f7c1}from'ckeditor5/src/ui.js';export default class ta extends _0x24f7c1{constructor(_0x3ed12c){super(_0x3ed12c);const t=_0x3ed12c['t'],_0x441179=this['bindTemplate'],_0x542b5d=new _0xf791bf();_0x542b5d['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':[_0x542b5d,{'text':_0x441179['to']('imageUploadProgress',_0x3f2063=>t('Loading\x20image...')+'\x20('+(_0x3f2063||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'}]}]}]});}}