@ckeditor/ckeditor5-uploadcare 46.0.0-alpha.0 → 46.0.0-alpha.1
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/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x2b631a,Command as _0x5474e0}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x29c00d,IconGooglePhotos as _0x599ef3,IconGoogleDrive as _0x2e4200,IconFacebook as _0x2bb54e,IconDropbox as _0xd59dfd,IconUploadcareLink as _0x35bc73,IconUploadcareImageUpload as _0x4fe539,IconError as _0x1ded43,IconUploadcareImageEdit as _0x364002}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x3e512e,MenuBarMenuListItemButtonView as _0x8eee56,View as _0x2fe1b2,FocusCycler as _0x1ba751,Dialog as _0x170bfe,DialogViewPosition as _0x182982,SpinnerView as _0x2bff5a,IconView as _0x48209c,Notification as _0x27de56}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x54daa3,DomEmitterMixin as _0x36a661,global as _0x3a53c9,getAncestors as _0x5a21d7,ObservableMixin as _0x5cf3c6,uid as _0x276b8e,createElement as _0x4b8c50}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x22d3f3}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x122436,info as _0x4ce6a4}from'@uploadcare/upload-client';import*as _0x26078e from'@uploadcare/file-uploader';var i=function(_0x38a265){return _0x38a265['Local']='local',_0x38a265['URL']='url',_0x38a265['Dropbox']='dropbox',_0x38a265['GDrive']='gdrive',_0x38a265['Facebook']='facebook',_0x38a265['GPhotos']='gphotos',_0x38a265['OneDrive']='onedrive',_0x38a265;}({});function _(_0x5dedcd,_0x622201,_0x12e798){const t=_0x5dedcd['t'],_0x4391e8=_0x5dedcd['t'];switch(_0x622201){case i['Local']:return{'text':_0x4391e8('Insert'===_0x12e798?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4391e8('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x12e798?_0x4391e8('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4391e8('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x12e798?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x12e798?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x12e798?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x12e798?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x12e798?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x622201;}}class e extends _0x2b631a{['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 _0x12b802=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3062ae;for(const _0x4aec2c in _0x12b802){const _0x3bf031=_0x4aec2c,_0x5b2866=_0x12b802[_0x3bf031];if('uploadcareLicenseKeyValid'==_0x5b2866||'uploadcareLicenseKeyInvalid'==_0x5b2866||'uploadcareLicenseKeyExpired'==_0x5b2866||'uploadcareLicenseKeyDomainLimit'==_0x5b2866||'uploadcareLicenseKeyNotAllowed'==_0x5b2866||'uploadcareLicenseKeyEvaluationLimit'==_0x5b2866||'uploadcareLicenseKeyTrialLimit'==_0x5b2866||'uploadcareLicenseKeyUsageLimit'==_0x5b2866){delete _0x12b802[_0x3bf031],_0x3062ae=_0x5b2866,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3062ae&&_0x12b802['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3062ae&&_0x12b802['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3062ae&&_0x12b802['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3062ae&&_0x12b802['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3062ae&&_0x12b802['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3062ae&&_0x12b802['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3062ae&&_0x12b802['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x18c6f4}=this,_0x240096=_0x18c6f4['commands']['get']('uploadcare');if(!_0x240096)return;const _0x8a8af9=this['_normalizeConfigSourceList'](_0x18c6f4['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x30176b,_0x3c9899)=>{const _0x13c207=this['_getIntegrationKey'](_0x3c9899['type']);return _0x30176b[_0x13c207]||(_0x30176b[_0x13c207]=[]),_0x30176b[_0x13c207]['push'](_0x3c9899),_0x30176b;},{});_0x18c6f4['plugins']['has']('ImageInsertUI')&&_0x18c6f4['commands']['get']('uploadcare')&&Object['entries'](_0x8a8af9)['forEach'](([_0x228761,_0x16fb32])=>{_0x18c6f4['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x228761,'observable':()=>_0x240096,'buttonViewCreator':()=>this['_createToolbarButton'](_0x16fb32),'formViewCreator':()=>this['_createDropdownButtons'](_0x16fb32),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x16fb32),'override':'assetManager'!==_0x228761});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4fb9ad){const {locale:_0x508712}=this['editor'];return _0x4fb9ad['map'](_0x2c6aa2=>{const _0xf57001=_(_0x508712,_0x2c6aa2,'Insert');switch(_0x2c6aa2){case i['Local']:return{'icon':_0x4fe539,'type':i['Local'],..._0xf57001};case i['URL']:return{'icon':_0x35bc73,'type':i['URL'],..._0xf57001};case i['Dropbox']:return{'icon':_0xd59dfd,'type':i['Dropbox'],..._0xf57001};case i['Facebook']:return{'icon':_0x2bb54e,'type':i['Facebook'],..._0xf57001};case i['GDrive']:return{'icon':_0x2e4200,'type':i['GDrive'],..._0xf57001};case i['GPhotos']:return{'icon':_0x599ef3,'type':i['GPhotos'],..._0xf57001};case i['OneDrive']:return{'icon':_0x29c00d,'type':i['OneDrive'],..._0xf57001};}});}['_getIntegrationKey'](_0x218154){switch(_0x218154){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x23a77f,_0x19ec2b){const _0x67947d=this['editor'],_0x3fca76=new _0x23a77f(_0x67947d['locale']),_0x28f812=_0x67947d['commands']['get']('uploadcare');return _0x3fca76['bind']('isEnabled')['to'](_0x28f812),_0x3fca76['on']('execute',()=>{_0x28f812['execute'](_0x19ec2b);}),_0x3fca76;}['_createToolbarButton'](_0x3947aa){const {locale:_0x505b3a}=this['editor'],_0x2d693f=this['editor']['plugins']['get']('ImageInsertUI'),_0x327f2b=_0x3947aa[0x0],_0x3838a9=this['_createButton'](_0x3e512e,_0x327f2b['type']);return _0x3838a9['icon']=_0x327f2b['icon'],_0x3838a9['bind']('label')['to'](_0x2d693f,'isImageSelected',_0xdc6bc6=>_(_0x505b3a,_0x327f2b['type'],_0xdc6bc6?'Replace':'Insert')['text']),_0x3838a9['tooltip']=!0x0,_0x3838a9;}['_createDropdownButtons'](_0x594208){const {locale:_0x1b2028}=this['editor'],_0x4648af=this['editor']['plugins']['get']('ImageInsertUI');return _0x594208['map'](_0x587e3d=>{const _0x32303b=this['_createButton'](_0x3e512e,_0x587e3d['type']);return _0x32303b['withText']=!0x0,_0x32303b['icon']=_0x587e3d['icon'],_0x32303b['bind']('label')['to'](_0x4648af,'isImageSelected',_0x38dd36=>_(_0x1b2028,_0x587e3d['type'],_0x38dd36?'Replace':'Insert')['text']),_0x32303b;});}['_createMenuBarButtons'](_0x15c5b7){return _0x15c5b7['map'](_0x306ff2=>{const _0x26ba56=this['_createButton'](_0x8eee56,_0x306ff2['type']);return _0x26ba56['icon']=_0x306ff2['icon'],_0x26ba56['label']=_0x306ff2['shortText'],_0x26ba56;});}}class F extends _0x2fe1b2{['focusTracker'];['focusCycler'];constructor(_0x121953){super(_0x121953),this['focusTracker']=new _0x54daa3(),this['focusCycler']=new _0x1ba751({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x3a01f1,_0x384133){super(_0x3a01f1),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-'+_0x384133}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x421f29,_0x431718){const _0x5b6621=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x28bcb4=>_0x28bcb4<=_0x431718)['map'](_0x43a795=>_0x421f29['replace'](/\/$/,'')+'/-/resize/'+_0x43a795+'x/\x20'+_0x43a795+'w');return{'imageFallbackUrl':_0x421f29,'imageSources':[{'srcset':_0x5b6621['join'](',\x20'),'sizes':'(max-width:\x20'+_0x431718+'px)\x20100vw,\x20'+_0x431718+'px','type':'image/webp'}]};}function C(_0x18604c,_0x3a4567,_0x3078b1){const _0x40a6cc=_0x18604c['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x40a6cc?parseInt(_0x40a6cc[0x1],0xa):_0x3a4567,'height':_0x40a6cc?parseInt(_0x40a6cc[0x2],0xa):_0x3078b1};}function p(_0x2dc99c,_0x54d725){const _0xd55a71=new(_0x36a661())(),_0x9ba812=_0x2dc99c['plugins']['get']('ImageUtils'),_0x5ed198=_0x2dc99c['editing']['mapper']['toViewElement'](_0x54d725),_0x2abb9d=_0x9ba812['findViewImgElement'](_0x5ed198),_0xa565f9=_0x2dc99c['editing']['view']['domConverter']['viewToDom'](_0x2abb9d),_0x28a106=_0x54d725['getAttribute']('width'),_0x1e5e24=_0x54d725['getAttribute']('height'),_0x58be0b='image-processing';_0x2dc99c['editing']['view']['change'](_0x3a3e64=>{_0x3a3e64['addClass'](_0x58be0b,_0x5ed198),_0x3a3e64['setStyle']('aspect-ratio',_0x28a106+'/'+_0x1e5e24,_0x2abb9d);}),_0xd55a71['listenTo'](_0xa565f9,'load',()=>{_0xd55a71['stopListening'](_0xa565f9,'load'),_0x2dc99c['editing']['view']['change'](_0x30b5e3=>{_0x30b5e3['removeClass'](_0x58be0b,_0x5ed198),_0x30b5e3['removeStyle']('aspect-ratio',_0x2abb9d);});});}function G(_0x584b3c){if(Array['isArray'](_0x584b3c)){const _0x21c4b7=_0x584b3c['map'](G);return _0x40fc63=>_0x21c4b7['some'](_0x10b387=>_0x10b387(_0x40fc63));}if('origin'==_0x584b3c){const _0x2b5dd6=_0x3a53c9['window']['location']['origin'];return _0x2683bb=>new URL(_0x2683bb,_0x3a53c9['document']['baseURI'])['origin']==_0x2b5dd6;}return'function'==typeof _0x584b3c?_0x584b3c:_0x584b3c instanceof RegExp?_0xb71455=>!(!_0xb71455['match'](_0x584b3c)&&!_0xb71455['replace'](/^https?:\/\//,'')['match'](_0x584b3c)):()=>!0x1;}function S(_0x406d04,_0x37da22){return _0x5a21d7(_0x406d04['target'])['includes'](_0x37da22);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x5cf3c6(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x54a28b,_0x602667,_0x55b594){super(),this['_editor']=_0x54a28b,this['_editing']=_0x602667,this['_dialog']=_0x54a28b['plugins']['get'](_0x170bfe),this['_api']=_0x602667['ctxElement']['getAPI'](),this['_type']=_0x55b594,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:_0x4c0622,model:_0xb70fad}=this['_editor'],_0x1f4014=_0xb70fad['document']['selection']['getSelectedElement'](),_0x36def8=_0x1f4014&&(_0x1f4014['is']('element','imageBlock')||_0x1f4014['is']('element','imageInline'));this['_formView']=new x(_0x4c0622,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4fe539,'title':_(_0x4c0622,this['_type'],_0x36def8?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x182982['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5f2672=>!S(_0x5f2672,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x365c94}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x3d9a18=>{const _0x5f33e5=_0x365c94['length'];for(const _0x5ea2c0 of _0x365c94){const _0x43e005=_0x5ea2c0===_0x365c94[_0x5f33e5-0x1],{cdnUrl:_0x8250bc,fileInfo:_0x394983}=_0x5ea2c0;if(!_0x8250bc||!_0x394983)continue;const {width:_0x4a55ff,height:_0x36cfb8}=_0x394983['imageInfo'],_0x36e683=C(_0x8250bc,_0x4a55ff,_0x36cfb8),_0x2877c9=k(_0x8250bc,_0x36e683['width']),_0x263221={'id':_0x394983['uuid'],'type':'image','attributes':{'imageDimension':_0x36e683,..._0x2877c9}};this['_insertAsset'](_0x263221,_0x43e005,_0x3d9a18);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x5d63af=>{'idle'===_0x5d63af['detail']['status']&&!_0x5d63af['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x500e50,_0x2527f2,_0x4ba3bc){const _0x5566d1=this['_editor']['model']['document']['selection'],_0x4145d3=_0x5566d1['getSelectedElement'](),_0x31608b=!(!_0x4145d3||!_0x4145d3['is']('element','imageInline'));_0x4ba3bc['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x500e50,_0x31608b),_0x2527f2||_0x4ba3bc['setSelection'](_0x5566d1['getLastPosition']());}['_insertImage'](_0x32677a,_0x1f7b01){const _0x1dfed3=this['_editor'],{imageDimension:_0x466fae,imageFallbackUrl:_0x4e7372,imageSources:_0x53e98a}=_0x32677a['attributes'];_0x1dfed3['execute']('insertImage',{'imageType':_0x1f7b01?'imageInline':null,'source':{'uploadcareImageId':_0x32677a['id'],'src':_0x4e7372,'sources':_0x53e98a,..._0x466fae}});}}class w extends _0x5474e0{['_editing'];['_controller']=null;static get['requires'](){return[_0x170bfe,o];}constructor(_0x50596c){super(_0x50596c),this['_editing']=_0x50596c['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5d1e6e){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x5d1e6e);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3658ce,publicKey:_0x4c6f4e,signal:_0x5056af,onProgress:_0x4d7ecf}){return _0x122436(_0x3658ce,{'publicKey':_0x4c6f4e,'store':'auto','signal':_0x5056af,'onProgress':_0x4d7ecf});}static['getInfo'](_0x1f1333,_0x2448ee){return _0x4ce6a4(_0x1f1333,_0x2448ee);}}class f extends _0x2b631a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x22d3f3,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x860dc4=this['editor'];if(!!!_0x860dc4['config']['get']('uploadcare'))return;_0x860dc4['plugins']['get'](_0x22d3f3)['createUploadAdapter']=_0x697768=>new A(_0x697768,_0x860dc4),_0x860dc4['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3a8327,{imageElement:_0x535ed0,data:_0x2fe19e})=>{_0x860dc4['model']['change'](_0x5b988d=>{_0x5b988d['setAttribute']('uploadcareImageId',_0x2fe19e['uploadcareImageId'],_0x535ed0);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x668d25,_0x129a9f){this['loader']=_0x668d25,this['editor']=_0x129a9f,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3e48d4=this['editor']['config']['get']('uploadcare.pubkey'),_0x98b19b=await this['loader']['file'];return j['upload']({'file':_0x98b19b,'publicKey':_0x3e48d4,'signal':this['controller']['signal'],'onProgress':_0x4778fc=>{_0x4778fc&&_0x4778fc['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4778fc['value']);}})['then'](async _0x3469ee=>{const {imageFallbackUrl:_0x5a782b,imageSources:_0x58312b}=k(_0x3469ee['cdnUrl'],_0x3469ee['imageInfo']['width']);return{'uploadcareImageId':_0x3469ee['uuid'],'default':_0x5a782b,'sources':_0x58312b};})['catch'](()=>{const _0x4ae32d=t('Cannot\x20upload\x20file:')+('\x20'+_0x98b19b['name']+'.');return Promise['reject'](_0x4ae32d);});}['abort'](){this['controller']['abort']();}}class o extends _0x2b631a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x170bfe];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2af21d){super(_0x2af21d),this['ucContextId']=_0x276b8e();}['init'](){const _0x5807dc=this['editor'];_0x5807dc['commands']['add']('uploadcare',new w(_0x5807dc));}['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 _0x4b010e=_0x3a53c9['document']['querySelector']('input[uploadcare-file-input]');_0x4b010e&&_0x4b010e['remove']();}),async function(_0x1bb8fc){const _0xe9be80=_0x22b2b5([0x6a,0x68,0x62,0x52,0x4e,0x6f,0x58,0x39,0x42,0x6b,0x7a,0x78,0x6c,0x67,0x37,0x54,0x64,0x47,0x77,0x34,0x75,0x56,0x66,0x48,0x73,0x4a,0x6e,0x53,0x31,0x46,0x45,0x38,0x51,0x36,0x70,0x6d,0x59,0x69,0x65,0x63,0x71,0x61,0x43,0x30,0x57,0x32,0x76,0x5a,0x4b,0x4c,0x4f,0x35,0x72,0x50,0x55,0x41,0x79,0x49,0x74,0x4d,0x44,0x33]),_0x18ed54=0x16f2b914,_0x37a81d=0x16f5d544^_0x18ed54,_0x4cf758=window[_0x22b2b5([0x44,0x61,0x74,0x65])][_0x22b2b5([0x6e,0x6f,0x77])](),_0x45e7a0=_0x1bb8fc[_0x22b2b5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x103627=new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57e07b=>{_0x45e7a0[_0x22b2b5([0x6f,0x6e,0x63,0x65])](_0x22b2b5([0x72,0x65,0x61,0x64,0x79]),_0x57e07b);}),_0x2a39ae={[_0x22b2b5([0x6b,0x74,0x79])]:_0x22b2b5([0x45,0x43]),[_0x22b2b5([0x75,0x73,0x65])]:_0x22b2b5([0x73,0x69,0x67]),[_0x22b2b5([0x63,0x72,0x76])]:_0x22b2b5([0x50,0x2d,0x32,0x35,0x36]),[_0x22b2b5([0x78])]:_0x22b2b5([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]),[_0x22b2b5([0x79])]:_0x22b2b5([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]),[_0x22b2b5([0x61,0x6c,0x67])]:_0x22b2b5([0x45,0x53,0x32,0x35,0x36])},_0x2dd82b=_0x45e7a0[_0x22b2b5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x22b2b5([0x67,0x65,0x74])](_0x22b2b5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x36b227(){let _0x40b1e1,_0x57bd05=null,_0x57ede0=null;try{if(_0x2dd82b==_0x22b2b5([0x47,0x50,0x4c]))return _0x22b2b5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x40b1e1=_0x5b91f8(),!_0x40b1e1)return _0x22b2b5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x40b1e1[_0x22b2b5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x57ede0=_0x771b72(_0x40b1e1[_0x22b2b5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x40b1e1[_0x22b2b5([0x6a,0x74,0x69])])),await _0x31b7cc()?_0xb6baaa()?_0x1aebfc()?_0x22b2b5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x130f51()?(_0x40b1e1[_0x22b2b5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22b2b5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x57bd05=_0x2affe9(_0x22b2b5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x40b1e1[_0x22b2b5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22b2b5([0x74,0x72,0x69,0x61,0x6c])&&(_0x57bd05=_0x2affe9(_0x22b2b5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b177e()):_0x22b2b5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x22b2b5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x22b2b5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x22b2b5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1aebfc(){const _0x3407f4=[_0x22b2b5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x22b2b5([0x74,0x72,0x69,0x61,0x6c])][_0x22b2b5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40b1e1[_0x22b2b5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4cf758/0x3e8:0xe10*_0x37a81d;return _0x40b1e1[_0x22b2b5([0x65,0x78,0x70])]<_0x3407f4;}function _0xb6baaa(){const _0x831b10=_0x40b1e1[_0x22b2b5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x831b10&&(!!_0x831b10[_0x22b2b5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22b2b5([0x2a]))||!!_0x831b10[_0x22b2b5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22b2b5([0x55,0x50,0x4c,0x43])));}function _0x130f51(){const _0x5d23cd=_0x40b1e1[_0x22b2b5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d23cd||0x0==_0x5d23cd[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x59e693}=new URL(window[_0x22b2b5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5d23cd[_0x22b2b5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59e693))return!0x0;const _0x373b4e=_0x59e693[_0x22b2b5([0x73,0x70,0x6c,0x69,0x74])](_0x22b2b5([0x2e]));return _0x5d23cd[_0x22b2b5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x303d03=>_0x303d03[_0x22b2b5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22b2b5([0x2a])))[_0x22b2b5([0x6d,0x61,0x70])](_0x427156=>_0x427156[_0x22b2b5([0x73,0x70,0x6c,0x69,0x74])](_0x22b2b5([0x2e])))[_0x22b2b5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35fb04=>_0x35fb04[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x373b4e[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22b2b5([0x6d,0x61,0x70])](_0xb10372=>Array(_0x373b4e[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xb10372[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22b2b5([0x66,0x69,0x6c,0x6c])](_0xb10372[0x0]===_0x22b2b5([0x2a])?_0x22b2b5([0x2a]):'')[_0x22b2b5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xb10372))[_0x22b2b5([0x73,0x6f,0x6d,0x65])](_0x162a67=>_0x373b4e[_0x22b2b5([0x65,0x76,0x65,0x72,0x79])]((_0x41137e,_0x4a344e)=>_0x162a67[_0x4a344e]===_0x41137e||_0x162a67[_0x4a344e]===_0x22b2b5([0x2a])));}function _0x3b177e(){return _0x57bd05&&_0x57ede0?new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9d5c49,_0x575d7f)=>{_0x57bd05[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x9d5c49,_0x575d7f),_0x57ede0[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x30e95b=>{_0x30e95b!=_0x22b2b5([0x56,0x61,0x6c,0x69,0x64])&&_0x9d5c49(_0x30e95b);},_0x575d7f);}):_0x57bd05||_0x57ede0||_0x22b2b5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x771b72(_0x44c416,_0x2ab1bd){return new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53e450=>{if(_0xd10f2a())return _0x53e450(_0x22b2b5([0x56,0x61,0x6c,0x69,0x64]));_0x5c7354(),_0x45e7a0[_0x22b2b5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x22b2b5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3c5a4d=!0x1;const _0x1be945=_0x276b8e();function _0x4e2e72(_0x5cd7cc){return!!_0x5cd7cc&&(typeof _0x5cd7cc===_0x22b2b5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5cd7cc===_0x22b2b5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5cd7cc[_0x22b2b5([0x74,0x68,0x65,0x6e])]===_0x22b2b5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5cd7cc[_0x22b2b5([0x63,0x61,0x74,0x63,0x68])]===_0x22b2b5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2f13a4(_0x204c85){_0x4c2867(_0x204c85)[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x179717=>{if(!_0x179717||_0x179717[_0x22b2b5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x22b2b5([0x6f,0x6b]))return _0x22b2b5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x41409a(_0xe1d9d(_0x1be945+_0x2ab1bd))!=_0x179717[_0x22b2b5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x22b2b5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x22b2b5([0x56,0x61,0x6c,0x69,0x64]);})[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x44f52a=>(_0x3124bf(),_0x44f52a),()=>{const _0x399612=_0x46f564();return null==_0x399612?(_0x3124bf(),_0x22b2b5([0x56,0x61,0x6c,0x69,0x64])):_0x22b2b5(_0x4cf758-_0x399612>(0x32fe3d14^_0x18ed54)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x53e450)[_0x22b2b5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x53e450(_0x22b2b5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2ad9f1=0x16c45794^_0x18ed54;function _0x3124bf(){const _0x59ca0e=_0x22b2b5([0x6c,0x6c,0x63,0x74,0x2d])+_0x41409a(_0xe1d9d(_0x44c416)),_0x18ed95=_0x293107(_0x41409a(window[_0x22b2b5([0x4d,0x61,0x74,0x68])][_0x22b2b5([0x63,0x65,0x69,0x6c])](_0x4cf758/_0x2ad9f1)));window[_0x22b2b5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22b2b5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x59ca0e,_0x18ed95);}function _0x46f564(){const _0x43ff64=_0x22b2b5([0x6c,0x6c,0x63,0x74,0x2d])+_0x41409a(_0xe1d9d(_0x44c416)),_0x25c40c=window[_0x22b2b5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22b2b5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x43ff64);return _0x25c40c?window[_0x22b2b5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x293107(_0x25c40c),0x10)*_0x2ad9f1:null;}function _0x4c2867(_0x32e8f5){return new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59f2f7,_0x533d27)=>{_0x32e8f5[_0x22b2b5([0x74,0x68,0x65,0x6e])](_0x59f2f7,_0x533d27),window[_0x22b2b5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x533d27,0x16f36dd4^_0x18ed54);});}}_0x45e7a0[_0x22b2b5([0x6f,0x6e])](_0x22b2b5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b171a,_0xabd800)=>{if(_0xabd800[0x0]!=_0x44c416)return _0x53e450(_0x22b2b5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xabd800[0x1]={..._0xabd800[0x1],[_0x22b2b5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1be945};},{[_0x22b2b5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22b2b5([0x68,0x69,0x67,0x68])}),_0x45e7a0[_0x22b2b5([0x6f,0x6e])](_0x22b2b5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5aff92=>{_0x4e2e72(_0x5aff92[_0x22b2b5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3c5a4d=!0x0,_0x2f13a4(_0x5aff92[_0x22b2b5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x22b2b5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22b2b5([0x6c,0x6f,0x77])}),_0x103627[_0x22b2b5([0x74,0x68,0x65,0x6e])](()=>{_0x3c5a4d||_0x53e450(_0x22b2b5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xd10f2a(){return _0x45e7a0[_0x22b2b5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22b2b5([0x76,0x69,0x65,0x77])][_0x22b2b5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x22b2b5([0x61,0x75,0x74,0x6f]);}function _0x5c7354(){_0x45e7a0[_0x22b2b5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22b2b5([0x76,0x69,0x65,0x77])][_0x22b2b5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22b2b5([0x61,0x75,0x74,0x6f]);}}function _0x2affe9(_0x34b2ae){const _0xb6dd82=[new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3513c7=>setTimeout(_0x3513c7,0x16fb87d8^_0x18ed54)),_0x103627[_0x22b2b5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f6fef=>{let _0x2986e1=0x0;_0x45e7a0[_0x22b2b5([0x6d,0x6f,0x64,0x65,0x6c])][_0x22b2b5([0x6f,0x6e])](_0x22b2b5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3fc192,_0x321b3e)=>{_0x321b3e[0x0][_0x22b2b5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2986e1++,_0x2986e1==(0x16f2b8ec^_0x18ed54)&&(_0x2f6fef(),_0x3fc192[_0x22b2b5([0x6f,0x66,0x66])]());});}))];return window[_0x22b2b5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22b2b5([0x72,0x61,0x63,0x65])](_0xb6dd82)[_0x22b2b5([0x74,0x68,0x65,0x6e])](()=>_0x34b2ae);}async function _0x25f872(){await _0x103627,_0x45e7a0[_0x22b2b5([0x6d,0x6f,0x64,0x65,0x6c])][_0x22b2b5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x182fb0,_0x45e7a0[_0x22b2b5([0x6d,0x6f,0x64,0x65,0x6c])][_0x22b2b5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x182fb0,_0x45e7a0[_0x22b2b5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x22b2b5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x440e9a(_0x28baaf){const _0x47f206=_0x2b5548();_0x45e7a0[_0x47f206]=_0x22b2b5([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x28baaf,_0x28baaf!=_0x22b2b5([0x56,0x61,0x6c,0x69,0x64])&&_0x25f872();}function _0x2b5548(){const _0x164efe=window[_0x22b2b5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x22b2b5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x22b2b5([0x6e,0x6f,0x77])]())[_0x22b2b5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x22b2b5([0x2e]),'');let _0x3d647c=_0x22b2b5([0x6a]);for(let _0x4a792a=0x0;_0x4a792a<_0x164efe[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a792a+=0x2){let _0x5420dd=window[_0x22b2b5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x164efe[_0x22b2b5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4a792a,_0x4a792a+0x2));_0x5420dd>=_0xe9be80[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5420dd-=_0xe9be80[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d647c+=_0xe9be80[_0x5420dd];}return _0x3d647c;}function _0x5b91f8(){const _0x4bd16c=_0x2dd82b[_0x22b2b5([0x73,0x70,0x6c,0x69,0x74])](_0x22b2b5([0x2e]));if(0x3!=_0x4bd16c[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x949fa4(_0x4bd16c[0x1]);function _0x949fa4(_0x476df5){const _0x2c1836=_0x57b91f(_0x476df5);return _0x2c1836&&_0x47d63f()?_0x2c1836:null;function _0x47d63f(){const _0x528bdb=_0x2c1836[_0x22b2b5([0x6a,0x74,0x69])],_0x289594=window[_0x22b2b5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x528bdb[_0x22b2b5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x528bdb[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ca9c9={..._0x2c1836,[_0x22b2b5([0x6a,0x74,0x69])]:_0x528bdb[_0x22b2b5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x528bdb[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ca9c9[_0x22b2b5([0x76,0x63])],_0xe1d9d(_0x3ca9c9)==_0x289594;}}}async function _0x31b7cc(){let _0x174ab5=!0x0;try{const _0x757486=_0x2dd82b[_0x22b2b5([0x73,0x70,0x6c,0x69,0x74])](_0x22b2b5([0x2e])),[_0x43bea4,_0x351d02,_0x4f41ac]=_0x757486;return _0x17a6c7(_0x43bea4),await _0x532935(_0x43bea4,_0x351d02,_0x4f41ac),_0x174ab5;}catch{return!0x1;}function _0x17a6c7(_0x10a474){const _0x2db94e=_0x57b91f(_0x10a474);_0x2db94e&&_0x2db94e[_0x22b2b5([0x61,0x6c,0x67])]==_0x22b2b5([0x45,0x53,0x32,0x35,0x36])||(_0x174ab5=!0x1);}async function _0x532935(_0x1e2255,_0x54372a,_0x4deae4){const _0x33e604=window[_0x22b2b5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x22b2b5([0x66,0x72,0x6f,0x6d])](_0x3b5174(_0x4deae4),_0x416c4c=>_0x416c4c[_0x22b2b5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x522487=new window[(_0x22b2b5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x22b2b5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1e2255+_0x22b2b5([0x2e])+_0x54372a),_0x487716=window[_0x22b2b5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x22b2b5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x487716)return;const _0x350488=await _0x487716[_0x22b2b5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x22b2b5([0x6a,0x77,0x6b]),_0x2a39ae,{[_0x22b2b5([0x6e,0x61,0x6d,0x65])]:_0x22b2b5([0x45,0x43,0x44,0x53,0x41]),[_0x22b2b5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x22b2b5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x22b2b5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x487716[_0x22b2b5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x22b2b5([0x6e,0x61,0x6d,0x65])]:_0x22b2b5([0x45,0x43,0x44,0x53,0x41]),[_0x22b2b5([0x68,0x61,0x73,0x68])]:{[_0x22b2b5([0x6e,0x61,0x6d,0x65])]:_0x22b2b5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x350488,_0x33e604,_0x522487)||(_0x174ab5=!0x1);}}function _0x57b91f(_0x2ba567){return _0x2ba567[_0x22b2b5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x22b2b5([0x65,0x79]))?JSON[_0x22b2b5([0x70,0x61,0x72,0x73,0x65])](_0x3b5174(_0x2ba567)):null;}function _0x3b5174(_0x16ec44){return window[_0x22b2b5([0x61,0x74,0x6f,0x62])](_0x16ec44[_0x22b2b5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x22b2b5([0x2b]))[_0x22b2b5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x22b2b5([0x2f])));}function _0xe1d9d(_0x38a391){let _0x20d35c=0x1505;function _0x14c95c(_0x3cd352){for(let _0x4d48ca=0x0;_0x4d48ca<_0x3cd352[_0x22b2b5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d48ca++){const _0x44def0=_0x3cd352[_0x22b2b5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d48ca);_0x20d35c=(_0x20d35c<<0x5)+_0x20d35c+_0x44def0,_0x20d35c&=_0x20d35c;}}function _0x122c52(_0x592038){Array[_0x22b2b5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x592038)?_0x592038[_0x22b2b5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x122c52):_0x592038&&typeof _0x592038==_0x22b2b5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x22b2b5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x592038)[_0x22b2b5([0x73,0x6f,0x72,0x74])]()[_0x22b2b5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x48ff64,_0x5aa0c3])=>{_0x14c95c(_0x48ff64),_0x122c52(_0x5aa0c3);}):_0x14c95c(window[_0x22b2b5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x592038));}return _0x122c52(_0x38a391),_0x20d35c>>>0x0;}function _0x41409a(_0x1da4fd){return _0x1da4fd[_0x22b2b5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x22b2b5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x22b2b5([0x30]));}function _0x293107(_0x520717){return _0x520717[_0x22b2b5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x22b2b5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x22b2b5([0x6a,0x6f,0x69,0x6e])]('');}function _0x182fb0(){}function _0x22b2b5(_0xa3a134){return _0xa3a134['map'](_0x1bee64=>String['fromCharCode'](_0x1bee64))['join']('');}_0x440e9a(await _0x36b227());}(this);}['_initSchema'](){const _0x50cd86=this['editor']['model']['schema'];_0x50cd86['isRegistered']('imageBlock')&&_0x50cd86['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x50cd86['isRegistered']('imageInline')&&_0x50cd86['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5af2b3=this['editor'];_0x5af2b3['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5af2b3['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x412172=>_0x412172['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x36e982=_0x5af2b3['commands']['get']('replaceImageSource');_0x36e982&&this['listenTo'](_0x36e982,'cleanupImage',(_0x1e695e,[_0x1f8c22,_0x3eebda])=>{_0x1f8c22['removeAttribute']('uploadcareImageId',_0x3eebda);});}['_initConfig'](){const _0xfa572c=this['editor']['config']['get']('uploadcare.uploader')||{},_0x364ffb=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4b8c50(_0x3a53c9['document'],'uc-config',{..._0xfa572c,'pubkey':_0x364ffb,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x411e6d=>{if('closeMax'==_0x411e6d)return'#uc-icon-arrow-down';},_0x3a53c9['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4b8c50(_0x3a53c9['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3a53c9['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xf0fa4b=this['editor']['commands']['get']('insertImage');_0xf0fa4b&&this['listenTo'](_0xf0fa4b,'execute',()=>{const _0x1e1afb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1e1afb&&_0x1e1afb['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1e1afb);});});const _0x16cdf4=this['editor']['commands']['get']('uploadcareImageReplace');_0x16cdf4&&this['listenTo'](_0x16cdf4,'execute',()=>{const _0x30af27=this['editor']['model']['document']['selection']['getSelectedElement']();_0x30af27&&_0x30af27['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x30af27);});});}}class tt extends _0x2b631a{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d9090){super(_0x4d9090),_0x4d9090['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x26078e['defineComponents'](_0x26078e);}}class ii extends _0x2fe1b2{constructor(_0x46333a){super(_0x46333a);const t=_0x46333a['t'],_0x31a088=this['bindTemplate'],_0x368d5c=new _0x2bff5a();_0x368d5c['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':[_0x368d5c,{'text':_0x31a088['to']('imageUploadProgress',_0x25458c=>t('Loading\x20image...')+'\x20('+(_0x25458c||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x2fe1b2{constructor(_0x4d7739){super(_0x4d7739);const t=_0x4d7739['t'];this['set']('errorType',null);const _0x322b48=new _0x3e512e(_0x4d7739);_0x322b48['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x322b48['withText']=!0x0,_0x322b48['class']='ck-button-action',_0x322b48['on']('execute',()=>{this['fire']('retry');}),_0x322b48['bind']('isVisible')['to'](this,'errorType',_0x3026cf=>'NotFound'!==_0x3026cf);const _0xc333d0=new _0x48209c();_0xc333d0['content']=_0x1ded43,_0xc333d0['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1746f8=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':[_0xc333d0,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1746f8['to']('errorType',_0x4d0322=>t('NotFound'!==_0x4d0322?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x322b48]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x2fe1b2{constructor(_0x4c41d8,_0xfe2cce){super(_0x4c41d8);const _0x19f90b=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0xfe2cce,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x19f90b['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x367d3e,_0x27d354,_0xe441f5){super(_0x367d3e),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x367d3e),this['_errorView']=new ti(_0x367d3e),this['_editingView']=new ei(_0x367d3e,_0xe441f5),this['_focusableView']=new _0x2fe1b2(_0x367d3e),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x27d354),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'],_0x3b0e03=>{this['_addUploadcareImageEditorListeners'](_0x3b0e03);});}),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'](_0x454974,_0x43087){const _0xc894d3='uc-cloud-image-editor',_0x10eeaa=_0x454974['querySelector'](_0xc894d3);if(_0x10eeaa)return _0x43087(_0x10eeaa);const _0x45abf1=new MutationObserver(_0x437f79=>{const _0x3b4f4c=_0x437f79['filter'](_0x10a572=>_0x10a572['target']===_0x454974&&_0x10a572['addedNodes']['length']>0x0&&_0x10a572['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xc894d3);_0x3b4f4c['length']&&(_0x45abf1['disconnect'](),_0x43087(_0x3b4f4c[0x0]['addedNodes'][0x0]));});_0x45abf1['observe'](_0x454974,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4746df){_0x4746df['addEventListener']('apply',_0xd43554=>{this['fire']('apply',{'imageSrc':_0xd43554['detail']['cdnUrl']});}),_0x4746df['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x5cf3c6(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x23e94b,_0x5cd2a7,_0x3d0a39){super(),this['_editor']=_0x23e94b,this['_dialog']=_0x5cd2a7,this['_imageElement']=_0x3d0a39,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 _0x13e129=this['_imageElement'],_0x42bac7=_0x13e129['getAttribute']('uploadcareImageId'),_0x7e112b=_0x13e129['getAttribute']('src');if(_0x42bac7)await this['_loadImageInfo'](_0x42bac7,_0x7e112b);else{if(this['_imageCache']['has'](_0x7e112b)){const _0x49bbbd=this['_imageCache']['get'](_0x7e112b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x49bbbd['url'],this['imageDimension']=_0x49bbbd['dimension'],this['imageId']=_0x49bbbd['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2cd3e3}=this['_editor'],t=_0x2cd3e3['t'],_0x40fedf=new X(_0x2cd3e3,this['imageStatus'],this['_attributes']);_0x40fedf['bind']('status')['to'](this,'imageStatus'),_0x40fedf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x40fedf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x40fedf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x40fedf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x364002,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x40fedf,'position':_0x182982['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x40fedf['focus']();},'onHide':()=>{_0x40fedf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2f0300=>!S(_0x2f0300,_0x40fedf['element'])}});}['_loadImageInfo'](_0x587256,_0xa663f){return j['getInfo'](_0x587256,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x5b942a=>{const {width:_0x2ca7fa,height:_0x3995ed}=_0x5b942a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa663f,this['imageDimension']={'width':_0x2ca7fa,'height':_0x3995ed},this['imageId']=_0x587256;})['catch'](_0x279eef=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x279eef['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x35ccba,_0x2650d7){return this['_getImageAsFile'](_0x35ccba)['then'](_0x3a22b4=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2650d7['signal'],'file':_0x3a22b4,'onProgress':_0x585957=>{_0x585957&&_0x585957['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x585957['value']));}}))['then'](_0x54f6a0=>{const {width:_0x271171,height:_0x43a4ca}=_0x54f6a0['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x54f6a0['cdnUrl'],this['imageDimension']={'width':_0x271171,'height':_0x43a4ca},this['imageId']=_0x54f6a0['uuid'],this['imageUploadProgress']=null;const _0x5ce116=_0x35ccba['getAttribute']('src');this['_imageCache']['set'](_0x5ce116,{'id':_0x54f6a0['uuid'],'url':_0x54f6a0['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5b6a2c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5b6a2c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x46fb89,_0x3c4cb9){_0x46fb89['on']('apply',(_0x529120,_0x1c475a)=>{this['_replaceImage'](_0x3c4cb9,_0x1c475a['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x46fb89['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x46fb89['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1f5a76,_0x2fd969,_0x2d0a5c){const _0x321884=this['_editor'],{width:_0x2179a7,height:_0x36ea91}=C(_0x2fd969,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x304bca,imageSources:_0x510222}=k(_0x2fd969,_0x2179a7);_0x321884['model']['change'](_0x7f0d09=>{if('$graveyard'===_0x1f5a76['root']['rootName']){_0x321884['execute']('insertImage',{'imageType':_0x1f5a76['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1f5a76['getAttributes']()),'uploadcareImageId':_0x2d0a5c,'src':_0x304bca,'sources':_0x510222,'width':_0x2179a7,'height':_0x36ea91}});const _0x1761c9=_0x1f5a76['getChildren']();_0x1f5a76=_0x321884['model']['document']['selection']['getSelectedElement']();for(const _0x4c6434 of _0x1761c9)_0x7f0d09['append'](_0x7f0d09['cloneElement'](_0x4c6434),_0x1f5a76);}else _0x7f0d09['setSelection'](_0x1f5a76,'on'),_0x321884['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1f5a76['getAttributes']()),'uploadcareImageId':_0x2d0a5c,'src':_0x304bca,'sources':_0x510222,'width':_0x2179a7,'height':_0x36ea91},_0x1f5a76);_0x7f0d09['setSelection'](_0x1f5a76,'on');});}async['_getImageAsFile'](_0x2f9cc7){const _0x11fd74=_0x3a53c9['window'],_0x44a5a2=_0x3a53c9['document']['location']['href'],_0xb42a08=new _0x11fd74['URL'](_0x2f9cc7['getAttribute']('src'),_0x44a5a2);if('data:'===_0xb42a08['protocol']){const _0x1e73fd=_0xb42a08['href']['split'](','),_0x436fa2=_0x1e73fd[0x0]['match'](/:(.*?);/)[0x1],_0x4f552f=_0x436fa2['split']('/')[0x1],_0x2dc1aa=_0x11fd74['atob'](_0x1e73fd[_0x1e73fd['length']-0x1]);let _0x2822b2=_0x2dc1aa['length'];const _0x57a20e=new _0x11fd74['Uint8Array'](_0x2822b2);for(;_0x2822b2--;)_0x57a20e[_0x2822b2]=_0x2dc1aa['charCodeAt'](_0x2822b2);return new _0x11fd74['File']([_0x57a20e],'image.'+_0x4f552f,{'type':_0x436fa2});}const _0x5e8c8f=_0xb42a08['href']['split']('/'),_0x45e5ca=_0x5e8c8f[_0x5e8c8f['length']-0x1],_0x5dcdec=_0x45e5ca['split']('.')[0x1];return _0x11fd74['fetch'](_0xb42a08['href'])['then'](_0x20ecbe=>_0x20ecbe['clone']()['blob']())['then'](_0x2adcf4=>new _0x11fd74['File']([_0x2adcf4],_0x45e5ca,{'type':'image/'+_0x5dcdec}));}}class O extends _0x5474e0{['imageEditController'];static get['requires'](){return[_0x170bfe];}['_isEditable'];constructor(_0x5bb8db){super(_0x5bb8db),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x560784){const _0x4b0a88=G(_0x560784);return _0x4fce29=>!(!_0x4fce29||!_0x4fce29['is']('element','imageBlock')&&!_0x4fce29['is']('element','imageInline'))&&(!!_0x4fce29['hasAttribute']('uploadcareImageId')||!!_0x4fce29['hasAttribute']('src')&&_0x4b0a88(_0x4fce29['getAttribute']('src')));}(_0x5bb8db['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xc6feb2=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xc6feb2);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5a5e64=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a5e64&&(_0x5a5e64['is']('element','imageBlock')||_0x5a5e64['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x170bfe),_0x5a5e64),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x5474e0{['refresh'](){const _0x2ccf23=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x2ccf23&&(_0x2ccf23['is']('element','imageBlock')||_0x2ccf23['is']('element','imageInline')));}['execute'](_0x40c87e){const _0x107e04=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2f6746=>{_0x2f6746['setAttributes'](_0x40c87e,_0x107e04),_0x2f6746['removeAttribute']('srcset',_0x107e04),_0x2f6746['removeAttribute']('sizes',_0x107e04);});}}class m extends _0x2b631a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x27de56,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x45ba2e}=this;_0x45ba2e['commands']['add']('uploadcareImageEdit',new O(_0x45ba2e)),_0x45ba2e['commands']['add']('uploadcareImageReplace',new R(_0x45ba2e));}}class g extends _0x2b631a{['_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 _0x43b2d2=this['editor'];_0x43b2d2['ui']['componentFactory']['add']('uploadcareImageEdit',_0x3abe1b=>{const _0x33a9b0=_0x43b2d2['commands']['get']('uploadcareImageEdit'),_0x4802b9=new _0x3e512e(_0x3abe1b),t=_0x3abe1b['t'];return _0x4802b9['set']({'icon':_0x364002,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4802b9['bind']('isEnabled')['to'](_0x33a9b0),_0x4802b9['bind']('isOn')['to'](_0x33a9b0,'isActive'),this['listenTo'](_0x4802b9,'execute',()=>{_0x43b2d2['execute']('uploadcareImageEdit'),_0x43b2d2['editing']['view']['focus']();}),_0x4802b9;}),this['_initConfig']();}['_initConfig'](){const _0x5386f5=_0x4b8c50(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5386f5),this['listenTo'](this['editor'],'destroy',()=>{_0x5386f5['remove']();});}}class et extends _0x2b631a{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x29696b,Command as _0x468043}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x404707,IconGooglePhotos as _0x320594,IconGoogleDrive as _0x1e298a,IconFacebook as _0x1ddeb6,IconDropbox as _0x41bd33,IconUploadcareLink as _0x4f225b,IconUploadcareImageUpload as _0xd3953a,IconError as _0x5362b8,IconUploadcareImageEdit as _0x2bbec4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x3636bf,MenuBarMenuListItemButtonView as _0x239793,View as _0x4db710,FocusCycler as _0x33a5f8,Dialog as _0x50fd6c,DialogViewPosition as _0xa9e1eb,SpinnerView as _0x5cf200,IconView as _0x1cf3cf,Notification as _0x37d367}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x41ba66,DomEmitterMixin as _0x173d96,global as _0x230713,getAncestors as _0x4d8c01,ObservableMixin as _0x14b450,uid as _0x29cc85,createElement as _0x1fc52b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2ad47d}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x12cf73,info as _0x4a4051}from'@uploadcare/upload-client';import*as _0x12b04a from'@uploadcare/file-uploader';var i=function(_0x1c7a44){return _0x1c7a44['Local']='local',_0x1c7a44['URL']='url',_0x1c7a44['Dropbox']='dropbox',_0x1c7a44['GDrive']='gdrive',_0x1c7a44['Facebook']='facebook',_0x1c7a44['GPhotos']='gphotos',_0x1c7a44['OneDrive']='onedrive',_0x1c7a44;}({});function _(_0x31a5a4,_0x565a17,_0x1d7804){const t=_0x31a5a4['t'],_0x429678=_0x31a5a4['t'];switch(_0x565a17){case i['Local']:return{'text':_0x429678('Insert'===_0x1d7804?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x429678('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1d7804?_0x429678('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x429678('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1d7804?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1d7804?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1d7804?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1d7804?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1d7804?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x565a17;}}class e extends _0x29696b{['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 _0x3ad903=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2e79b2;for(const _0x32e935 in _0x3ad903){const _0x435178=_0x32e935,_0x5ee4fb=_0x3ad903[_0x435178];if('uploadcareLicenseKeyValid'==_0x5ee4fb||'uploadcareLicenseKeyInvalid'==_0x5ee4fb||'uploadcareLicenseKeyExpired'==_0x5ee4fb||'uploadcareLicenseKeyDomainLimit'==_0x5ee4fb||'uploadcareLicenseKeyNotAllowed'==_0x5ee4fb||'uploadcareLicenseKeyEvaluationLimit'==_0x5ee4fb||'uploadcareLicenseKeyTrialLimit'==_0x5ee4fb||'uploadcareLicenseKeyUsageLimit'==_0x5ee4fb){delete _0x3ad903[_0x435178],_0x2e79b2=_0x5ee4fb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2e79b2&&_0x3ad903['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2e79b2&&_0x3ad903['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2e79b2&&_0x3ad903['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2e79b2&&_0x3ad903['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2e79b2&&_0x3ad903['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x2e79b2&&_0x3ad903['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2e79b2&&_0x3ad903['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x32c8fe}=this,_0x1ca10c=_0x32c8fe['commands']['get']('uploadcare');if(!_0x1ca10c)return;const _0x46136c=this['_normalizeConfigSourceList'](_0x32c8fe['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3fea83,_0x37e21b)=>{const _0x3977d6=this['_getIntegrationKey'](_0x37e21b['type']);return _0x3fea83[_0x3977d6]||(_0x3fea83[_0x3977d6]=[]),_0x3fea83[_0x3977d6]['push'](_0x37e21b),_0x3fea83;},{});_0x32c8fe['plugins']['has']('ImageInsertUI')&&_0x32c8fe['commands']['get']('uploadcare')&&Object['entries'](_0x46136c)['forEach'](([_0x3c269e,_0x18a0d1])=>{_0x32c8fe['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3c269e,'observable':()=>_0x1ca10c,'buttonViewCreator':()=>this['_createToolbarButton'](_0x18a0d1),'formViewCreator':()=>this['_createDropdownButtons'](_0x18a0d1),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x18a0d1),'override':'assetManager'!==_0x3c269e});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x21d956){const {locale:_0xb6d0a7}=this['editor'];return _0x21d956['map'](_0xde6c3=>{const _0x5c474b=_(_0xb6d0a7,_0xde6c3,'Insert');switch(_0xde6c3){case i['Local']:return{'icon':_0xd3953a,'type':i['Local'],..._0x5c474b};case i['URL']:return{'icon':_0x4f225b,'type':i['URL'],..._0x5c474b};case i['Dropbox']:return{'icon':_0x41bd33,'type':i['Dropbox'],..._0x5c474b};case i['Facebook']:return{'icon':_0x1ddeb6,'type':i['Facebook'],..._0x5c474b};case i['GDrive']:return{'icon':_0x1e298a,'type':i['GDrive'],..._0x5c474b};case i['GPhotos']:return{'icon':_0x320594,'type':i['GPhotos'],..._0x5c474b};case i['OneDrive']:return{'icon':_0x404707,'type':i['OneDrive'],..._0x5c474b};}});}['_getIntegrationKey'](_0x3664d4){switch(_0x3664d4){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3e2c12,_0xc40726){const _0x16d19a=this['editor'],_0x2326e4=new _0x3e2c12(_0x16d19a['locale']),_0x304e5e=_0x16d19a['commands']['get']('uploadcare');return _0x2326e4['bind']('isEnabled')['to'](_0x304e5e),_0x2326e4['on']('execute',()=>{_0x304e5e['execute'](_0xc40726);}),_0x2326e4;}['_createToolbarButton'](_0x5e1002){const {locale:_0x4464bb}=this['editor'],_0x5490e0=this['editor']['plugins']['get']('ImageInsertUI'),_0x1563a8=_0x5e1002[0x0],_0x54fc85=this['_createButton'](_0x3636bf,_0x1563a8['type']);return _0x54fc85['icon']=_0x1563a8['icon'],_0x54fc85['bind']('label')['to'](_0x5490e0,'isImageSelected',_0x452c92=>_(_0x4464bb,_0x1563a8['type'],_0x452c92?'Replace':'Insert')['text']),_0x54fc85['tooltip']=!0x0,_0x54fc85;}['_createDropdownButtons'](_0x4e18c5){const {locale:_0x426b1f}=this['editor'],_0x2fdc1c=this['editor']['plugins']['get']('ImageInsertUI');return _0x4e18c5['map'](_0x192fd7=>{const _0x2c0b5b=this['_createButton'](_0x3636bf,_0x192fd7['type']);return _0x2c0b5b['withText']=!0x0,_0x2c0b5b['icon']=_0x192fd7['icon'],_0x2c0b5b['bind']('label')['to'](_0x2fdc1c,'isImageSelected',_0x4e9b17=>_(_0x426b1f,_0x192fd7['type'],_0x4e9b17?'Replace':'Insert')['text']),_0x2c0b5b;});}['_createMenuBarButtons'](_0x1c38f3){return _0x1c38f3['map'](_0x5e85f1=>{const _0x406234=this['_createButton'](_0x239793,_0x5e85f1['type']);return _0x406234['icon']=_0x5e85f1['icon'],_0x406234['label']=_0x5e85f1['shortText'],_0x406234;});}}class F extends _0x4db710{['focusTracker'];['focusCycler'];constructor(_0x3093bb){super(_0x3093bb),this['focusTracker']=new _0x41ba66(),this['focusCycler']=new _0x33a5f8({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0xc3787e,_0x19c567){super(_0xc3787e),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-'+_0x19c567}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0xf9f625,_0xd8237f){const _0x4b7a1c=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3a9e14=>_0x3a9e14<=_0xd8237f)['map'](_0x15cdda=>_0xf9f625['replace'](/\/$/,'')+'/-/resize/'+_0x15cdda+'x/\x20'+_0x15cdda+'w');return{'imageFallbackUrl':_0xf9f625,'imageSources':[{'srcset':_0x4b7a1c['join'](',\x20'),'sizes':'(max-width:\x20'+_0xd8237f+'px)\x20100vw,\x20'+_0xd8237f+'px','type':'image/webp'}]};}function C(_0x3d83c5,_0x1b42b5,_0x2c2a67){const _0xe90fd7=_0x3d83c5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xe90fd7?parseInt(_0xe90fd7[0x1],0xa):_0x1b42b5,'height':_0xe90fd7?parseInt(_0xe90fd7[0x2],0xa):_0x2c2a67};}function p(_0xe688b2,_0x12bc61){const _0x1526fa=new(_0x173d96())(),_0x55d25d=_0xe688b2['plugins']['get']('ImageUtils'),_0x5e4c81=_0xe688b2['editing']['mapper']['toViewElement'](_0x12bc61),_0x466670=_0x55d25d['findViewImgElement'](_0x5e4c81),_0x50af44=_0xe688b2['editing']['view']['domConverter']['viewToDom'](_0x466670),_0xc33ef2=_0x12bc61['getAttribute']('width'),_0x720d8d=_0x12bc61['getAttribute']('height'),_0x32bb82='image-processing';_0xe688b2['editing']['view']['change'](_0x15a768=>{_0x15a768['addClass'](_0x32bb82,_0x5e4c81),_0x15a768['setStyle']('aspect-ratio',_0xc33ef2+'/'+_0x720d8d,_0x466670);}),_0x1526fa['listenTo'](_0x50af44,'load',()=>{_0x1526fa['stopListening'](_0x50af44,'load'),_0xe688b2['editing']['view']['change'](_0x17eab1=>{_0x17eab1['removeClass'](_0x32bb82,_0x5e4c81),_0x17eab1['removeStyle']('aspect-ratio',_0x466670);});});}function z(_0x22c7f9){if(Array['isArray'](_0x22c7f9)){const _0x501985=_0x22c7f9['map'](z);return _0x499ca6=>_0x501985['some'](_0x40a31f=>_0x40a31f(_0x499ca6));}if('origin'==_0x22c7f9){const _0x356cf9=_0x230713['window']['location']['origin'];return _0x52e84b=>new URL(_0x52e84b,_0x230713['document']['baseURI'])['origin']==_0x356cf9;}return'function'==typeof _0x22c7f9?_0x22c7f9:_0x22c7f9 instanceof RegExp?_0x186d71=>!(!_0x186d71['match'](_0x22c7f9)&&!_0x186d71['replace'](/^https?:\/\//,'')['match'](_0x22c7f9)):()=>!0x1;}function S(_0x3af925,_0x4ac685){return _0x4d8c01(_0x3af925['target'])['includes'](_0x4ac685);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x14b450(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x1561ff,_0x275d5e,_0x2673b6){super(),this['_editor']=_0x1561ff,this['_editing']=_0x275d5e,this['_dialog']=_0x1561ff['plugins']['get'](_0x50fd6c),this['_api']=_0x275d5e['ctxElement']['getAPI'](),this['_type']=_0x2673b6,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:_0x3b9ce4,model:_0xa3c9c1}=this['_editor'],_0x3b7e22=_0xa3c9c1['document']['selection']['getSelectedElement'](),_0x56496f=_0x3b7e22&&(_0x3b7e22['is']('element','imageBlock')||_0x3b7e22['is']('element','imageInline'));this['_formView']=new x(_0x3b9ce4,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xd3953a,'title':_(_0x3b9ce4,this['_type'],_0x56496f?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xa9e1eb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2f1cec=>!S(_0x2f1cec,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x189445}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x30824f=>{const _0x4d9864=_0x189445['length'];for(const _0x594ad2 of _0x189445){const _0x533586=_0x594ad2===_0x189445[_0x4d9864-0x1],{cdnUrl:_0xf3c614,fileInfo:_0xe3dd6d}=_0x594ad2;if(!_0xf3c614||!_0xe3dd6d)continue;const {width:_0xa6a36f,height:_0x450036}=_0xe3dd6d['imageInfo'],_0x1aafe5=C(_0xf3c614,_0xa6a36f,_0x450036),_0xd9879e=k(_0xf3c614,_0x1aafe5['width']),_0x11ba6f={'id':_0xe3dd6d['uuid'],'type':'image','attributes':{'imageDimension':_0x1aafe5,..._0xd9879e}};this['_insertAsset'](_0x11ba6f,_0x533586,_0x30824f);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x339ddf=>{'idle'===_0x339ddf['detail']['status']&&!_0x339ddf['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3426ed,_0x2b9acb,_0x40132d){const _0x7773c5=this['_editor']['model']['document']['selection'],_0x1b3b40=_0x7773c5['getSelectedElement'](),_0xe9b216=!(!_0x1b3b40||!_0x1b3b40['is']('element','imageInline'));_0x40132d['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3426ed,_0xe9b216),_0x2b9acb||_0x40132d['setSelection'](_0x7773c5['getLastPosition']());}['_insertImage'](_0x34df24,_0x2af787){const _0x49b518=this['_editor'],{imageDimension:_0x30a598,imageFallbackUrl:_0x14fb9f,imageSources:_0x29ab88}=_0x34df24['attributes'];_0x49b518['execute']('insertImage',{'imageType':_0x2af787?'imageInline':null,'source':{'uploadcareImageId':_0x34df24['id'],'src':_0x14fb9f,'sources':_0x29ab88,..._0x30a598}});}}class w extends _0x468043{['_editing'];['_controller']=null;static get['requires'](){return[_0x50fd6c,o];}constructor(_0x5376a1){super(_0x5376a1),this['_editing']=_0x5376a1['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5e6806){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x5e6806);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3aef5a,publicKey:_0xdf6c1a,signal:_0x76b059,onProgress:_0x4b7fc7}){return _0x12cf73(_0x3aef5a,{'publicKey':_0xdf6c1a,'store':'auto','signal':_0x76b059,'onProgress':_0x4b7fc7});}static['getInfo'](_0x1a2674,_0x172485){return _0x4a4051(_0x1a2674,_0x172485);}}class f extends _0x29696b{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2ad47d,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2d3560=this['editor'];if(!!!_0x2d3560['config']['get']('uploadcare'))return;_0x2d3560['plugins']['get'](_0x2ad47d)['createUploadAdapter']=_0xa2dc4e=>new A(_0xa2dc4e,_0x2d3560),_0x2d3560['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x36b566,{imageElement:_0x5acbc7,data:_0x4ea363})=>{_0x2d3560['model']['change'](_0x3a5214=>{_0x3a5214['setAttribute']('uploadcareImageId',_0x4ea363['uploadcareImageId'],_0x5acbc7);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x4f45a4,_0x38d18e){this['loader']=_0x4f45a4,this['editor']=_0x38d18e,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xcdfcfe=this['editor']['config']['get']('uploadcare.pubkey'),_0x558927=await this['loader']['file'];return j['upload']({'file':_0x558927,'publicKey':_0xcdfcfe,'signal':this['controller']['signal'],'onProgress':_0x2ec772=>{_0x2ec772&&_0x2ec772['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2ec772['value']);}})['then'](async _0x1c9cb5=>{const {imageFallbackUrl:_0x488a7d,imageSources:_0x4945a8}=k(_0x1c9cb5['cdnUrl'],_0x1c9cb5['imageInfo']['width']);return{'uploadcareImageId':_0x1c9cb5['uuid'],'default':_0x488a7d,'sources':_0x4945a8};})['catch'](()=>{const _0x8518e6=t('Cannot\x20upload\x20file:')+('\x20'+_0x558927['name']+'.');return Promise['reject'](_0x8518e6);});}['abort'](){this['controller']['abort']();}}class o extends _0x29696b{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x50fd6c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x511a04){super(_0x511a04),this['ucContextId']=_0x29cc85();}['init'](){const _0x308ade=this['editor'];_0x308ade['commands']['add']('uploadcare',new w(_0x308ade));}['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 _0x39003a=_0x230713['document']['querySelector']('input[uploadcare-file-input]');_0x39003a&&_0x39003a['remove']();}),async function(_0x2f8d2a){const _0x3407e9=_0x5ae8b4([0x35,0x64,0x66,0x76,0x56,0x32,0x5a,0x46,0x49,0x6d,0x47,0x4a,0x37,0x4d,0x57,0x63,0x4f,0x36,0x6c,0x65,0x48,0x74,0x50,0x71,0x6b,0x62,0x75,0x51,0x53,0x68,0x69,0x54,0x30,0x6e,0x44,0x45,0x41,0x4e,0x77,0x73,0x6a,0x33,0x70,0x38,0x43,0x78,0x72,0x31,0x61,0x52,0x42,0x67,0x55,0x4b,0x4c,0x7a,0x59,0x6f,0x58,0x34,0x79,0x39]),_0x2a6578=0x2cc1038,_0x4fb420=0x2cb7c50^_0x2a6578,_0x363dec=window[_0x5ae8b4([0x44,0x61,0x74,0x65])][_0x5ae8b4([0x6e,0x6f,0x77])](),_0x1964e4=_0x2f8d2a[_0x5ae8b4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x252add=new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x164f9c=>{_0x1964e4[_0x5ae8b4([0x6f,0x6e,0x63,0x65])](_0x5ae8b4([0x72,0x65,0x61,0x64,0x79]),_0x164f9c);}),_0x4bc497={[_0x5ae8b4([0x6b,0x74,0x79])]:_0x5ae8b4([0x45,0x43]),[_0x5ae8b4([0x75,0x73,0x65])]:_0x5ae8b4([0x73,0x69,0x67]),[_0x5ae8b4([0x63,0x72,0x76])]:_0x5ae8b4([0x50,0x2d,0x32,0x35,0x36]),[_0x5ae8b4([0x78])]:_0x5ae8b4([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]),[_0x5ae8b4([0x79])]:_0x5ae8b4([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]),[_0x5ae8b4([0x61,0x6c,0x67])]:_0x5ae8b4([0x45,0x53,0x32,0x35,0x36])},_0x494fd3=_0x1964e4[_0x5ae8b4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5ae8b4([0x67,0x65,0x74])](_0x5ae8b4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2696ee(){let _0x388488,_0x34d541=null,_0x1d7b40=null;try{if(_0x494fd3==_0x5ae8b4([0x47,0x50,0x4c]))return _0x5ae8b4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x388488=_0x3dc9ad(),!_0x388488)return _0x5ae8b4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x388488[_0x5ae8b4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1d7b40=_0x288166(_0x388488[_0x5ae8b4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x388488[_0x5ae8b4([0x6a,0x74,0x69])])),await _0x2ab8b4()?_0x3f6a83()?_0x2a49be()?_0x5ae8b4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x903f66()?(_0x388488[_0x5ae8b4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ae8b4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x34d541=_0x59f8fa(_0x5ae8b4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x388488[_0x5ae8b4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ae8b4([0x74,0x72,0x69,0x61,0x6c])&&(_0x34d541=_0x59f8fa(_0x5ae8b4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e8e19()):_0x5ae8b4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5ae8b4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5ae8b4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5ae8b4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2a49be(){const _0xeeae48=[_0x5ae8b4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5ae8b4([0x74,0x72,0x69,0x61,0x6c])][_0x5ae8b4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x388488[_0x5ae8b4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x363dec/0x3e8:0xe10*_0x4fb420;return _0x388488[_0x5ae8b4([0x65,0x78,0x70])]<_0xeeae48;}function _0x3f6a83(){const _0x41c093=_0x388488[_0x5ae8b4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x41c093&&(!!_0x41c093[_0x5ae8b4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae8b4([0x2a]))||!!_0x41c093[_0x5ae8b4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae8b4([0x55,0x50,0x4c,0x43])));}function _0x903f66(){const _0x330b95=_0x388488[_0x5ae8b4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x330b95||0x0==_0x330b95[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4c0406}=new URL(window[_0x5ae8b4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x330b95[_0x5ae8b4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c0406))return!0x0;const _0x1752cd=_0x4c0406[_0x5ae8b4([0x73,0x70,0x6c,0x69,0x74])](_0x5ae8b4([0x2e]));return _0x330b95[_0x5ae8b4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfaac5f=>_0xfaac5f[_0x5ae8b4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ae8b4([0x2a])))[_0x5ae8b4([0x6d,0x61,0x70])](_0x5c2503=>_0x5c2503[_0x5ae8b4([0x73,0x70,0x6c,0x69,0x74])](_0x5ae8b4([0x2e])))[_0x5ae8b4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d44d3=>_0x1d44d3[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1752cd[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ae8b4([0x6d,0x61,0x70])](_0x32787f=>Array(_0x1752cd[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x32787f[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ae8b4([0x66,0x69,0x6c,0x6c])](_0x32787f[0x0]===_0x5ae8b4([0x2a])?_0x5ae8b4([0x2a]):'')[_0x5ae8b4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x32787f))[_0x5ae8b4([0x73,0x6f,0x6d,0x65])](_0x147270=>_0x1752cd[_0x5ae8b4([0x65,0x76,0x65,0x72,0x79])]((_0x17d746,_0x423078)=>_0x147270[_0x423078]===_0x17d746||_0x147270[_0x423078]===_0x5ae8b4([0x2a])));}function _0x3e8e19(){return _0x34d541&&_0x1d7b40?new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x62b0a3,_0xc00044)=>{_0x34d541[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x62b0a3,_0xc00044),_0x1d7b40[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x4bf457=>{_0x4bf457!=_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64])&&_0x62b0a3(_0x4bf457);},_0xc00044);}):_0x34d541||_0x1d7b40||_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x288166(_0x5bd41d,_0x218a81){return new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43fe03=>{if(_0x28e4ab())return _0x43fe03(_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64]));_0x2fdfd1(),_0x1964e4[_0x5ae8b4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5ae8b4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x398b86=!0x1;const _0x48ea52=_0x29cc85();function _0x4c28d6(_0xacc64f){return!!_0xacc64f&&(typeof _0xacc64f===_0x5ae8b4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xacc64f===_0x5ae8b4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xacc64f[_0x5ae8b4([0x74,0x68,0x65,0x6e])]===_0x5ae8b4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xacc64f[_0x5ae8b4([0x63,0x61,0x74,0x63,0x68])]===_0x5ae8b4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x106b96(_0x92e7cb){_0xbbaa62(_0x92e7cb)[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x4d7c9a=>{if(!_0x4d7c9a||_0x4d7c9a[_0x5ae8b4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5ae8b4([0x6f,0x6b]))return _0x5ae8b4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3cd8cb(_0x107ccb(_0x48ea52+_0x218a81))!=_0x4d7c9a[_0x5ae8b4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5ae8b4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64]);})[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x154af2=>(_0x2b6de6(),_0x154af2),()=>{const _0x192402=_0x4434b0();return null==_0x192402?(_0x2b6de6(),_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64])):_0x5ae8b4(_0x363dec-_0x192402>(0x26c09438^_0x2a6578)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x43fe03)[_0x5ae8b4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43fe03(_0x5ae8b4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x279220=0x2fafeb8^_0x2a6578;function _0x2b6de6(){const _0x2d000b=_0x5ae8b4([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cd8cb(_0x107ccb(_0x5bd41d)),_0x8859a9=_0x4a4079(_0x3cd8cb(window[_0x5ae8b4([0x4d,0x61,0x74,0x68])][_0x5ae8b4([0x63,0x65,0x69,0x6c])](_0x363dec/_0x279220)));window[_0x5ae8b4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ae8b4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d000b,_0x8859a9);}function _0x4434b0(){const _0x3cf8bd=_0x5ae8b4([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cd8cb(_0x107ccb(_0x5bd41d)),_0x232894=window[_0x5ae8b4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ae8b4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3cf8bd);return _0x232894?window[_0x5ae8b4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a4079(_0x232894),0x10)*_0x279220:null;}function _0xbbaa62(_0x5dc838){return new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x138624,_0x54937d)=>{_0x5dc838[_0x5ae8b4([0x74,0x68,0x65,0x6e])](_0x138624,_0x54937d),window[_0x5ae8b4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x54937d,0x2cdc4f8^_0x2a6578);});}}_0x1964e4[_0x5ae8b4([0x6f,0x6e])](_0x5ae8b4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x11dfe4,_0x42306f)=>{if(_0x42306f[0x0]!=_0x5bd41d)return _0x43fe03(_0x5ae8b4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x42306f[0x1]={..._0x42306f[0x1],[_0x5ae8b4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48ea52};},{[_0x5ae8b4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ae8b4([0x68,0x69,0x67,0x68])}),_0x1964e4[_0x5ae8b4([0x6f,0x6e])](_0x5ae8b4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x48470d=>{_0x4c28d6(_0x48470d[_0x5ae8b4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x398b86=!0x0,_0x106b96(_0x48470d[_0x5ae8b4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5ae8b4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ae8b4([0x6c,0x6f,0x77])}),_0x252add[_0x5ae8b4([0x74,0x68,0x65,0x6e])](()=>{_0x398b86||_0x43fe03(_0x5ae8b4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x28e4ab(){return _0x1964e4[_0x5ae8b4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ae8b4([0x76,0x69,0x65,0x77])][_0x5ae8b4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5ae8b4([0x61,0x75,0x74,0x6f]);}function _0x2fdfd1(){_0x1964e4[_0x5ae8b4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ae8b4([0x76,0x69,0x65,0x77])][_0x5ae8b4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ae8b4([0x61,0x75,0x74,0x6f]);}}function _0x59f8fa(_0x417ad3){const _0x455653=[new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36b4d4=>setTimeout(_0x36b4d4,0x2c52ef4^_0x2a6578)),_0x252add[_0x5ae8b4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e18d2=>{let _0x1b7c61=0x0;_0x1964e4[_0x5ae8b4([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae8b4([0x6f,0x6e])](_0x5ae8b4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d4eb7,_0x3f40f0)=>{_0x3f40f0[0x0][_0x5ae8b4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1b7c61++,_0x1b7c61==(0x2cc11c0^_0x2a6578)&&(_0x5e18d2(),_0x2d4eb7[_0x5ae8b4([0x6f,0x66,0x66])]());});}))];return window[_0x5ae8b4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ae8b4([0x72,0x61,0x63,0x65])](_0x455653)[_0x5ae8b4([0x74,0x68,0x65,0x6e])](()=>_0x417ad3);}async function _0x3ef74c(){await _0x252add,_0x1964e4[_0x5ae8b4([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae8b4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x536079,_0x1964e4[_0x5ae8b4([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ae8b4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x536079,_0x1964e4[_0x5ae8b4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5ae8b4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1180a8(_0x561632){const _0x3bb12a=_0x1ac023();_0x1964e4[_0x3bb12a]=_0x5ae8b4([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x561632,_0x561632!=_0x5ae8b4([0x56,0x61,0x6c,0x69,0x64])&&_0x3ef74c();}function _0x1ac023(){const _0x29309d=window[_0x5ae8b4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5ae8b4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5ae8b4([0x6e,0x6f,0x77])]())[_0x5ae8b4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5ae8b4([0x2e]),'');let _0x5be143=_0x5ae8b4([0x64]);for(let _0x12b631=0x0;_0x12b631<_0x29309d[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x12b631+=0x2){let _0x5108b9=window[_0x5ae8b4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29309d[_0x5ae8b4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x12b631,_0x12b631+0x2));_0x5108b9>=_0x3407e9[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5108b9-=_0x3407e9[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5be143+=_0x3407e9[_0x5108b9];}return _0x5be143;}function _0x3dc9ad(){const _0x215a06=_0x494fd3[_0x5ae8b4([0x73,0x70,0x6c,0x69,0x74])](_0x5ae8b4([0x2e]));if(0x3!=_0x215a06[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x369939(_0x215a06[0x1]);function _0x369939(_0x16ebb7){const _0x111f3e=_0x351190(_0x16ebb7);return _0x111f3e&&_0x526ca4()?_0x111f3e:null;function _0x526ca4(){const _0x4f1c97=_0x111f3e[_0x5ae8b4([0x6a,0x74,0x69])],_0x34559c=window[_0x5ae8b4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f1c97[_0x5ae8b4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f1c97[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x479038={..._0x111f3e,[_0x5ae8b4([0x6a,0x74,0x69])]:_0x4f1c97[_0x5ae8b4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f1c97[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x479038[_0x5ae8b4([0x76,0x63])],_0x107ccb(_0x479038)==_0x34559c;}}}async function _0x2ab8b4(){let _0x531df4=!0x0;try{const _0x5c9ec4=_0x494fd3[_0x5ae8b4([0x73,0x70,0x6c,0x69,0x74])](_0x5ae8b4([0x2e])),[_0x3d5e84,_0xdc31c9,_0x36a90a]=_0x5c9ec4;return _0x2801a4(_0x3d5e84),await _0x3d8cb9(_0x3d5e84,_0xdc31c9,_0x36a90a),_0x531df4;}catch{return!0x1;}function _0x2801a4(_0x56a432){const _0x445d93=_0x351190(_0x56a432);_0x445d93&&_0x445d93[_0x5ae8b4([0x61,0x6c,0x67])]==_0x5ae8b4([0x45,0x53,0x32,0x35,0x36])||(_0x531df4=!0x1);}async function _0x3d8cb9(_0x3a3e73,_0x179748,_0x17052d){const _0x1bca68=window[_0x5ae8b4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5ae8b4([0x66,0x72,0x6f,0x6d])](_0x2664b9(_0x17052d),_0x4a23ca=>_0x4a23ca[_0x5ae8b4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4a7191=new window[(_0x5ae8b4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5ae8b4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3a3e73+_0x5ae8b4([0x2e])+_0x179748),_0x2fe1c0=window[_0x5ae8b4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5ae8b4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2fe1c0)return;const _0x2005bf=await _0x2fe1c0[_0x5ae8b4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5ae8b4([0x6a,0x77,0x6b]),_0x4bc497,{[_0x5ae8b4([0x6e,0x61,0x6d,0x65])]:_0x5ae8b4([0x45,0x43,0x44,0x53,0x41]),[_0x5ae8b4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5ae8b4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5ae8b4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2fe1c0[_0x5ae8b4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5ae8b4([0x6e,0x61,0x6d,0x65])]:_0x5ae8b4([0x45,0x43,0x44,0x53,0x41]),[_0x5ae8b4([0x68,0x61,0x73,0x68])]:{[_0x5ae8b4([0x6e,0x61,0x6d,0x65])]:_0x5ae8b4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2005bf,_0x1bca68,_0x4a7191)||(_0x531df4=!0x1);}}function _0x351190(_0x23399c){return _0x23399c[_0x5ae8b4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5ae8b4([0x65,0x79]))?JSON[_0x5ae8b4([0x70,0x61,0x72,0x73,0x65])](_0x2664b9(_0x23399c)):null;}function _0x2664b9(_0x350522){return window[_0x5ae8b4([0x61,0x74,0x6f,0x62])](_0x350522[_0x5ae8b4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5ae8b4([0x2b]))[_0x5ae8b4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5ae8b4([0x2f])));}function _0x107ccb(_0x4ab311){let _0x4c65d0=0x1505;function _0x11ca24(_0x5d620a){for(let _0x4dcdd4=0x0;_0x4dcdd4<_0x5d620a[_0x5ae8b4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4dcdd4++){const _0x59afaf=_0x5d620a[_0x5ae8b4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4dcdd4);_0x4c65d0=(_0x4c65d0<<0x5)+_0x4c65d0+_0x59afaf,_0x4c65d0&=_0x4c65d0;}}function _0x5acc70(_0x3f54e6){Array[_0x5ae8b4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3f54e6)?_0x3f54e6[_0x5ae8b4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5acc70):_0x3f54e6&&typeof _0x3f54e6==_0x5ae8b4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5ae8b4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3f54e6)[_0x5ae8b4([0x73,0x6f,0x72,0x74])]()[_0x5ae8b4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b72b8,_0x2ee803])=>{_0x11ca24(_0x4b72b8),_0x5acc70(_0x2ee803);}):_0x11ca24(window[_0x5ae8b4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3f54e6));}return _0x5acc70(_0x4ab311),_0x4c65d0>>>0x0;}function _0x3cd8cb(_0x4004b0){return _0x4004b0[_0x5ae8b4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5ae8b4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5ae8b4([0x30]));}function _0x4a4079(_0x7f92ca){return _0x7f92ca[_0x5ae8b4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5ae8b4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5ae8b4([0x6a,0x6f,0x69,0x6e])]('');}function _0x536079(){}function _0x5ae8b4(_0x597897){return _0x597897['map'](_0x4bbcce=>String['fromCharCode'](_0x4bbcce))['join']('');}_0x1180a8(await _0x2696ee());}(this);}['_initSchema'](){const _0x46023b=this['editor']['model']['schema'];_0x46023b['isRegistered']('imageBlock')&&_0x46023b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x46023b['isRegistered']('imageInline')&&_0x46023b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x579af2=this['editor'];_0x579af2['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x579af2['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x45d53b=>_0x45d53b['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3c0dca=_0x579af2['commands']['get']('replaceImageSource');_0x3c0dca&&this['listenTo'](_0x3c0dca,'cleanupImage',(_0x2f8372,[_0xab2b5c,_0x288376])=>{_0xab2b5c['removeAttribute']('uploadcareImageId',_0x288376);});}['_initConfig'](){const _0x216311=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2fc33c=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1fc52b(_0x230713['document'],'uc-config',{..._0x216311,'pubkey':_0x2fc33c,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x3e31ea=>{if('closeMax'==_0x3e31ea)return'#uc-icon-arrow-down';},_0x230713['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1fc52b(_0x230713['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x230713['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x280213=this['editor']['commands']['get']('insertImage');_0x280213&&this['listenTo'](_0x280213,'execute',()=>{const _0x2b7131=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2b7131&&_0x2b7131['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2b7131);});});const _0x1b6c7c=this['editor']['commands']['get']('uploadcareImageReplace');_0x1b6c7c&&this['listenTo'](_0x1b6c7c,'execute',()=>{const _0x20e563=this['editor']['model']['document']['selection']['getSelectedElement']();_0x20e563&&_0x20e563['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x20e563);});});}}class tt extends _0x29696b{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47e4b1){super(_0x47e4b1),_0x47e4b1['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x12b04a['defineComponents'](_0x12b04a);}}class ii extends _0x4db710{constructor(_0x5d3bae){super(_0x5d3bae);const t=_0x5d3bae['t'],_0x5786d6=this['bindTemplate'],_0x2d267b=new _0x5cf200();_0x2d267b['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':[_0x2d267b,{'text':_0x5786d6['to']('imageUploadProgress',_0x446cfe=>t('Loading\x20image...')+'\x20('+(_0x446cfe||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x4db710{constructor(_0x4e9dad){super(_0x4e9dad);const t=_0x4e9dad['t'];this['set']('errorType',null);const _0x265060=new _0x3636bf(_0x4e9dad);_0x265060['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x265060['withText']=!0x0,_0x265060['class']='ck-button-action',_0x265060['on']('execute',()=>{this['fire']('retry');}),_0x265060['bind']('isVisible')['to'](this,'errorType',_0x25fd3a=>'NotFound'!==_0x25fd3a);const _0x5545b6=new _0x1cf3cf();_0x5545b6['content']=_0x5362b8,_0x5545b6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1385d6=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':[_0x5545b6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1385d6['to']('errorType',_0x496e44=>t('NotFound'!==_0x496e44?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x265060]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x4db710{constructor(_0x1737d1,_0x3a1f5f){super(_0x1737d1);const _0x4f226e=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3a1f5f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x4f226e['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x307ef4,_0x1534d0,_0x4d71d3){super(_0x307ef4),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x307ef4),this['_errorView']=new ti(_0x307ef4),this['_editingView']=new ei(_0x307ef4,_0x4d71d3),this['_focusableView']=new _0x4db710(_0x307ef4),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1534d0),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'],_0x50fa11=>{this['_addUploadcareImageEditorListeners'](_0x50fa11);});}),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'](_0x45e1cd,_0x5efd07){const _0x18ed14='uc-cloud-image-editor',_0x376d4b=_0x45e1cd['querySelector'](_0x18ed14);if(_0x376d4b)return _0x5efd07(_0x376d4b);const _0x5b01de=new MutationObserver(_0xfd6c76=>{const _0x3173f9=_0xfd6c76['filter'](_0x1910e4=>_0x1910e4['target']===_0x45e1cd&&_0x1910e4['addedNodes']['length']>0x0&&_0x1910e4['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x18ed14);_0x3173f9['length']&&(_0x5b01de['disconnect'](),_0x5efd07(_0x3173f9[0x0]['addedNodes'][0x0]));});_0x5b01de['observe'](_0x45e1cd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x221f47){_0x221f47['addEventListener']('apply',_0x5aee2b=>{this['fire']('apply',{'imageSrc':_0x5aee2b['detail']['cdnUrl']});}),_0x221f47['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x14b450(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x568032,_0x3df421,_0x199641){super(),this['_editor']=_0x568032,this['_dialog']=_0x3df421,this['_imageElement']=_0x199641,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 _0x339f97=this['_imageElement'],_0x3b40e0=_0x339f97['getAttribute']('uploadcareImageId'),_0xbb8612=_0x339f97['getAttribute']('src');if(_0x3b40e0)await this['_loadImageInfo'](_0x3b40e0,_0xbb8612);else{if(this['_imageCache']['has'](_0xbb8612)){const _0x546d23=this['_imageCache']['get'](_0xbb8612);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x546d23['url'],this['imageDimension']=_0x546d23['dimension'],this['imageId']=_0x546d23['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3aa6e8}=this['_editor'],t=_0x3aa6e8['t'],_0x4beda8=new X(_0x3aa6e8,this['imageStatus'],this['_attributes']);_0x4beda8['bind']('status')['to'](this,'imageStatus'),_0x4beda8['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4beda8['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4beda8['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4beda8,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2bbec4,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4beda8,'position':_0xa9e1eb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4beda8['focus']();},'onHide':()=>{_0x4beda8['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1e5c36=>!S(_0x1e5c36,_0x4beda8['element'])}});}['_loadImageInfo'](_0x32c956,_0x1c1877){return j['getInfo'](_0x32c956,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3e372a=>{const {width:_0x360f49,height:_0x44862b}=_0x3e372a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1c1877,this['imageDimension']={'width':_0x360f49,'height':_0x44862b},this['imageId']=_0x32c956;})['catch'](_0x4ecbfb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4ecbfb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2c84c2,_0x316841){return this['_getImageAsFile'](_0x2c84c2)['then'](_0x44c7e8=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x316841['signal'],'file':_0x44c7e8,'onProgress':_0x5361d7=>{_0x5361d7&&_0x5361d7['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5361d7['value']));}}))['then'](_0x542698=>{const {width:_0x15f391,height:_0x32e519}=_0x542698['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x542698['cdnUrl'],this['imageDimension']={'width':_0x15f391,'height':_0x32e519},this['imageId']=_0x542698['uuid'],this['imageUploadProgress']=null;const _0x587029=_0x2c84c2['getAttribute']('src');this['_imageCache']['set'](_0x587029,{'id':_0x542698['uuid'],'url':_0x542698['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x406e46=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x406e46['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3daa0e,_0x406e59){_0x3daa0e['on']('apply',(_0x508c6c,_0x1e0483)=>{this['_replaceImage'](_0x406e59,_0x1e0483['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3daa0e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3daa0e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x32650b,_0x707b4c,_0x2b97fb){const _0x238859=this['_editor'],{width:_0x31811a,height:_0x13a89e}=C(_0x707b4c,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x20c45a,imageSources:_0x3dc3d5}=k(_0x707b4c,_0x31811a);_0x238859['model']['change'](_0x276a99=>{if('$graveyard'===_0x32650b['root']['rootName']){_0x238859['execute']('insertImage',{'imageType':_0x32650b['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x32650b['getAttributes']()),'uploadcareImageId':_0x2b97fb,'src':_0x20c45a,'sources':_0x3dc3d5,'width':_0x31811a,'height':_0x13a89e}});const _0xa0d82f=_0x32650b['getChildren']();_0x32650b=_0x238859['model']['document']['selection']['getSelectedElement']();for(const _0x149c3a of _0xa0d82f)_0x276a99['append'](_0x276a99['cloneElement'](_0x149c3a),_0x32650b);}else _0x276a99['setSelection'](_0x32650b,'on'),_0x238859['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x32650b['getAttributes']()),'uploadcareImageId':_0x2b97fb,'src':_0x20c45a,'sources':_0x3dc3d5,'width':_0x31811a,'height':_0x13a89e},_0x32650b);_0x276a99['setSelection'](_0x32650b,'on');});}async['_getImageAsFile'](_0x3d2e8b){const _0x3334c4=_0x230713['window'],_0x505656=_0x230713['document']['location']['href'],_0x180e10=new _0x3334c4['URL'](_0x3d2e8b['getAttribute']('src'),_0x505656);if('data:'===_0x180e10['protocol']){const _0x3f76b0=_0x180e10['href']['split'](','),_0x3ebf40=_0x3f76b0[0x0]['match'](/:(.*?);/)[0x1],_0x20d2e5=_0x3ebf40['split']('/')[0x1],_0x5e2bec=_0x3334c4['atob'](_0x3f76b0[_0x3f76b0['length']-0x1]);let _0x3ba8e4=_0x5e2bec['length'];const _0x251642=new _0x3334c4['Uint8Array'](_0x3ba8e4);for(;_0x3ba8e4--;)_0x251642[_0x3ba8e4]=_0x5e2bec['charCodeAt'](_0x3ba8e4);return new _0x3334c4['File']([_0x251642],'image.'+_0x20d2e5,{'type':_0x3ebf40});}const _0x335e0e=_0x180e10['href']['split']('/'),_0x2471cb=_0x335e0e[_0x335e0e['length']-0x1],_0x5f1906=_0x2471cb['split']('.')[0x1];return _0x3334c4['fetch'](_0x180e10['href'])['then'](_0x3cbadd=>_0x3cbadd['clone']()['blob']())['then'](_0x2887e0=>new _0x3334c4['File']([_0x2887e0],_0x2471cb,{'type':'image/'+_0x5f1906}));}}class Q extends _0x468043{['imageEditController'];static get['requires'](){return[_0x50fd6c];}['_isEditable'];constructor(_0x4c8dcb){super(_0x4c8dcb),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x52a893){const _0x2e196b=z(_0x52a893);return _0x5202e3=>!(!_0x5202e3||!_0x5202e3['is']('element','imageBlock')&&!_0x5202e3['is']('element','imageInline'))&&(!!_0x5202e3['hasAttribute']('uploadcareImageId')||!!_0x5202e3['hasAttribute']('src')&&_0x2e196b(_0x5202e3['getAttribute']('src')));}(_0x4c8dcb['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x4c35ba=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x4c35ba);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0xde2695=this['editor']['model']['document']['selection']['getSelectedElement']();_0xde2695&&(_0xde2695['is']('element','imageBlock')||_0xde2695['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x50fd6c),_0xde2695),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x468043{['refresh'](){const _0x3828fb=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3828fb&&(_0x3828fb['is']('element','imageBlock')||_0x3828fb['is']('element','imageInline')));}['execute'](_0x7b44cf){const _0x324b07=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x11c003=>{_0x11c003['setAttributes'](_0x7b44cf,_0x324b07),_0x11c003['removeAttribute']('srcset',_0x324b07),_0x11c003['removeAttribute']('sizes',_0x324b07);});}}class m extends _0x29696b{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x37d367,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4249d8}=this;_0x4249d8['commands']['add']('uploadcareImageEdit',new Q(_0x4249d8)),_0x4249d8['commands']['add']('uploadcareImageReplace',new V(_0x4249d8));}}class g extends _0x29696b{['_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 _0x2d2991=this['editor'];_0x2d2991['ui']['componentFactory']['add']('uploadcareImageEdit',_0xb8f84c=>{const _0x419ce4=_0x2d2991['commands']['get']('uploadcareImageEdit'),_0xf46ca8=new _0x3636bf(_0xb8f84c),t=_0xb8f84c['t'];return _0xf46ca8['set']({'icon':_0x2bbec4,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0xf46ca8['bind']('isEnabled')['to'](_0x419ce4),_0xf46ca8['bind']('isOn')['to'](_0x419ce4,'isActive'),this['listenTo'](_0xf46ca8,'execute',()=>{_0x2d2991['execute']('uploadcareImageEdit'),_0x2d2991['editing']['view']['focus']();}),_0xf46ca8;}),this['_initConfig']();}['_initConfig'](){const _0x14c898=_0x1fc52b(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x14c898),this['listenTo'](this['editor'],'destroy',()=>{_0x14c898['remove']();});}}class et extends _0x29696b{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "46.0.0-alpha.
|
|
3
|
+
"version": "46.0.0-alpha.1",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "46.0.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "46.0.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "46.0.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "46.0.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "46.0.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "46.0.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "46.0.0-alpha.
|
|
33
|
-
"ckeditor5": "46.0.0-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "46.0.0-alpha.1",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "46.0.0-alpha.1",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "46.0.0-alpha.1",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "46.0.0-alpha.1",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "46.0.0-alpha.1",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "46.0.0-alpha.1",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "46.0.0-alpha.1",
|
|
33
|
+
"ckeditor5": "46.0.0-alpha.1",
|
|
34
34
|
"@uploadcare/file-uploader": "1.16.3-alpha.0",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x42ef(_0x5e3e25,_0x1bdf7b){const _0xcda9c4=_0xcda9();return _0x42ef=function(_0x42efb0,_0x40bf9d){_0x42efb0=_0x42efb0-0x1d2;let _0x268f68=_0xcda9c4[_0x42efb0];return _0x268f68;},_0x42ef(_0x5e3e25,_0x1bdf7b);}const _0x34c6ee=_0x42ef;(function(_0x342e42,_0x3fd57d){const _0x203b26=_0x42ef,_0x3cc6de=_0x342e42();while(!![]){try{const _0x2e093d=-parseInt(_0x203b26(0x1ed))/0x1+-parseInt(_0x203b26(0x1f6))/0x2*(parseInt(_0x203b26(0x225))/0x3)+parseInt(_0x203b26(0x1d3))/0x4*(parseInt(_0x203b26(0x1f4))/0x5)+-parseInt(_0x203b26(0x1fc))/0x6+-parseInt(_0x203b26(0x1fe))/0x7*(-parseInt(_0x203b26(0x211))/0x8)+-parseInt(_0x203b26(0x218))/0x9*(-parseInt(_0x203b26(0x1f7))/0xa)+-parseInt(_0x203b26(0x1f5))/0xb*(parseInt(_0x203b26(0x1dc))/0xc);if(_0x2e093d===_0x3fd57d)break;else _0x3cc6de['push'](_0x3cc6de['shift']());}catch(_0x200716){_0x3cc6de['push'](_0x3cc6de['shift']());}}}(_0xcda9,0x3feea));import{Plugin as _0x4b5d3e}from'ckeditor5/src/core.js';import{Dialog as _0x1817b5}from'ckeditor5/src/ui.js';function _0xcda9(){const _0x514a3d=['uploadcare.uploader','_ctxElement','input[uploadcare-file-input]','ctxElement','isPremiumPlugin','remove','insertImage','replaceImageSource','closeMax','add','_configElement','328527oSAcQW','init','config','iconHrefResolver','map','68auDTmV','destroy','view','body','getSelectedElement','editing','isRegistered','_initSchema','uploadcareImageReplace','139476sOgWdY','requires','imageInline','_initImageProcessingIndicator','querySelector','true','_initCtx','downcast','selection','attributeToAttribute','extend','for','UploadcareEditing','commands','removeAttribute','model','uc-config','192932GdhUYD','conversion','once','configElement','ucContextId','appendChild','editor','145085qBkXro','11BxkBZy','2XQjQtr','13570muCPoN','cleanupImage','schema','uploadcare.pubkey','get','2364732TFDgEg','render','3213854skMBUv','execute','join','isOfficialPlugin','contentLanguage','afterInit','upcast','getAttribute','uploader-','_initConversion','#uc-icon-arrow-down','document','imageBlock','_initConfig','uploadcare','listenTo','fromCharCode','PictureEditing','uploadcareImageId','8cquTag','uc-upload-ctx-provider','data-uc-image-id','pluginName','locale','href','\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','117fhgmdE','elementToAttribute'];_0xcda9=function(){return _0x514a3d;};return _0xcda9();}import{createElement as _0x57ab19,global as _0x178f14,uid as _0x1882b8}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x48dd03}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x37b0c5}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2ffb1}from'./utils/editingutils.js';export class UploadcareEditing extends _0x4b5d3e{[_0x34c6ee(0x224)]=null;[_0x34c6ee(0x21b)]=null;static get[_0x34c6ee(0x214)](){const _0x27d2c5=_0x34c6ee;return _0x27d2c5(0x1e8);}static get[_0x34c6ee(0x1dd)](){const _0x407497=_0x34c6ee;return[_0x407497(0x20f),_0x37b0c5,_0x1817b5];}static get[_0x34c6ee(0x201)](){return!0x0;}static get[_0x34c6ee(0x21e)](){return!0x0;}[_0x34c6ee(0x1f1)];get[_0x34c6ee(0x1f0)](){const _0x2c213e=_0x34c6ee;return this[_0x2c213e(0x224)];}get[_0x34c6ee(0x21d)](){const _0x25c6fe=_0x34c6ee;return this[_0x25c6fe(0x21b)];}constructor(_0x3f0be9){const _0x4f0916=_0x34c6ee;super(_0x3f0be9),this[_0x4f0916(0x1f1)]=_0x1882b8();}[_0x34c6ee(0x226)](){const _0x5db240=_0x34c6ee,_0x57937e=this[_0x5db240(0x1f3)];_0x57937e[_0x5db240(0x1e9)][_0x5db240(0x223)](_0x5db240(0x20c),new _0x48dd03(_0x57937e));}[_0x34c6ee(0x203)](){const _0x3b9f57=_0x34c6ee;this[_0x3b9f57(0x1da)](),this[_0x3b9f57(0x207)](),this[_0x3b9f57(0x20b)](),this[_0x3b9f57(0x1e2)](),this[_0x3b9f57(0x1df)](),this[_0x3b9f57(0x20d)](this[_0x3b9f57(0x1f3)],_0x3b9f57(0x1d4),()=>{const _0x164909=_0x3b9f57;this[_0x164909(0x224)]&&(this[_0x164909(0x224)][_0x164909(0x21f)](),this[_0x164909(0x224)]=null),this[_0x164909(0x21b)]&&(this[_0x164909(0x21b)][_0x164909(0x21f)](),this[_0x164909(0x21b)]=null);const _0xdb6116=_0x178f14[_0x164909(0x209)][_0x164909(0x1e0)](_0x164909(0x21c));_0xdb6116&&_0xdb6116[_0x164909(0x21f)]();}),async function(_0x293b63){const _0x3710b6=_0x41a6a0([0x6a,0x68,0x62,0x52,0x4e,0x6f,0x58,0x39,0x42,0x6b,0x7a,0x78,0x6c,0x67,0x37,0x54,0x64,0x47,0x77,0x34,0x75,0x56,0x66,0x48,0x73,0x4a,0x6e,0x53,0x31,0x46,0x45,0x38,0x51,0x36,0x70,0x6d,0x59,0x69,0x65,0x63,0x71,0x61,0x43,0x30,0x57,0x32,0x76,0x5a,0x4b,0x4c,0x4f,0x35,0x72,0x50,0x55,0x41,0x79,0x49,0x74,0x4d,0x44,0x33]),_0x4cb381=0x16f2b914,_0x4697f6=0x16f5d544^_0x4cb381,_0x2eee98=window[_0x41a6a0([0x44,0x61,0x74,0x65])][_0x41a6a0([0x6e,0x6f,0x77])](),_0x33c105=_0x293b63[_0x41a6a0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x542084=new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40daac=>{_0x33c105[_0x41a6a0([0x6f,0x6e,0x63,0x65])](_0x41a6a0([0x72,0x65,0x61,0x64,0x79]),_0x40daac);}),_0x13dd2f={[_0x41a6a0([0x6b,0x74,0x79])]:_0x41a6a0([0x45,0x43]),[_0x41a6a0([0x75,0x73,0x65])]:_0x41a6a0([0x73,0x69,0x67]),[_0x41a6a0([0x63,0x72,0x76])]:_0x41a6a0([0x50,0x2d,0x32,0x35,0x36]),[_0x41a6a0([0x78])]:_0x41a6a0([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]),[_0x41a6a0([0x79])]:_0x41a6a0([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]),[_0x41a6a0([0x61,0x6c,0x67])]:_0x41a6a0([0x45,0x53,0x32,0x35,0x36])},_0x85e08d=_0x33c105[_0x41a6a0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41a6a0([0x67,0x65,0x74])](_0x41a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xf03b52(){let _0x36b5aa,_0x5c4457=null,_0x2d73e7=null;try{if(_0x85e08d==_0x41a6a0([0x47,0x50,0x4c]))return _0x41a6a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x36b5aa=_0x42c1d2(),!_0x36b5aa)return _0x41a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x36b5aa[_0x41a6a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d73e7=_0x15c752(_0x36b5aa[_0x41a6a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x36b5aa[_0x41a6a0([0x6a,0x74,0x69])])),await _0x427534()?_0x44a9ee()?_0x4d444a()?_0x41a6a0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xe0a90e()?(_0x36b5aa[_0x41a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41a6a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c4457=_0x240fb8(_0x41a6a0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x36b5aa[_0x41a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41a6a0([0x74,0x72,0x69,0x61,0x6c])&&(_0x5c4457=_0x240fb8(_0x41a6a0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x27e6cd()):_0x41a6a0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41a6a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41a6a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4d444a(){const _0x293627=[_0x41a6a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41a6a0([0x74,0x72,0x69,0x61,0x6c])][_0x41a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36b5aa[_0x41a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2eee98/0x3e8:0xe10*_0x4697f6;return _0x36b5aa[_0x41a6a0([0x65,0x78,0x70])]<_0x293627;}function _0x44a9ee(){const _0x51eda0=_0x36b5aa[_0x41a6a0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x51eda0&&(!!_0x51eda0[_0x41a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a6a0([0x2a]))||!!_0x51eda0[_0x41a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a6a0([0x55,0x50,0x4c,0x43])));}function _0xe0a90e(){const _0x2aed36=_0x42ef,_0x2c4f87=_0x36b5aa[_0x41a6a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2c4f87||0x0==_0x2c4f87[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd2d24c}=new URL(window[_0x41a6a0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x2aed36(0x216)]);if(_0x2c4f87[_0x41a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd2d24c))return!0x0;const _0x303963=_0xd2d24c[_0x41a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x41a6a0([0x2e]));return _0x2c4f87[_0x41a6a0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f3cdf=>_0x3f3cdf[_0x41a6a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a6a0([0x2a])))[_0x41a6a0([0x6d,0x61,0x70])](_0x43ecce=>_0x43ecce[_0x41a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x41a6a0([0x2e])))[_0x41a6a0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xbfe67c=>_0xbfe67c[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x303963[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41a6a0([0x6d,0x61,0x70])](_0x3102cf=>Array(_0x303963[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3102cf[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41a6a0([0x66,0x69,0x6c,0x6c])](_0x3102cf[0x0]===_0x41a6a0([0x2a])?_0x41a6a0([0x2a]):'')[_0x41a6a0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3102cf))[_0x41a6a0([0x73,0x6f,0x6d,0x65])](_0x3c7d3b=>_0x303963[_0x41a6a0([0x65,0x76,0x65,0x72,0x79])]((_0x71538b,_0x1ca023)=>_0x3c7d3b[_0x1ca023]===_0x71538b||_0x3c7d3b[_0x1ca023]===_0x41a6a0([0x2a])));}function _0x27e6cd(){return _0x5c4457&&_0x2d73e7?new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf3e66e,_0xfb9270)=>{_0x5c4457[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0xf3e66e,_0xfb9270),_0x2d73e7[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0x14f84c=>{_0x14f84c!=_0x41a6a0([0x56,0x61,0x6c,0x69,0x64])&&_0xf3e66e(_0x14f84c);},_0xfb9270);}):_0x5c4457||_0x2d73e7||_0x41a6a0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x15c752(_0x40e98f,_0x4dbf7d){return new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24892b=>{if(_0x47eec4())return _0x24892b(_0x41a6a0([0x56,0x61,0x6c,0x69,0x64]));_0x323f66(),_0x33c105[_0x41a6a0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x43e272=!0x1;const _0x3d1208=_0x1882b8();function _0x50b8dd(_0xab3037){return!!_0xab3037&&(typeof _0xab3037===_0x41a6a0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xab3037===_0x41a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xab3037[_0x41a6a0([0x74,0x68,0x65,0x6e])]===_0x41a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xab3037[_0x41a6a0([0x63,0x61,0x74,0x63,0x68])]===_0x41a6a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3fdbc6(_0x4decb1){_0x3c42ca(_0x4decb1)[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0x442a51=>{if(!_0x442a51||_0x442a51[_0x41a6a0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41a6a0([0x6f,0x6b]))return _0x41a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x567ce1(_0x2d4fc1(_0x3d1208+_0x4dbf7d))!=_0x442a51[_0x41a6a0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41a6a0([0x56,0x61,0x6c,0x69,0x64]);})[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0x42fa0b=>(_0x136e3f(),_0x42fa0b),()=>{const _0x5a269c=_0x42dd1b();return null==_0x5a269c?(_0x136e3f(),_0x41a6a0([0x56,0x61,0x6c,0x69,0x64])):_0x41a6a0(_0x2eee98-_0x5a269c>(0x32fe3d14^_0x4cb381)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0x24892b)[_0x41a6a0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x24892b(_0x41a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b851e=0x16c45794^_0x4cb381;function _0x136e3f(){const _0x223871=_0x41a6a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x567ce1(_0x2d4fc1(_0x40e98f)),_0x1d78ab=_0x5ad15a(_0x567ce1(window[_0x41a6a0([0x4d,0x61,0x74,0x68])][_0x41a6a0([0x63,0x65,0x69,0x6c])](_0x2eee98/_0x2b851e)));window[_0x41a6a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41a6a0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x223871,_0x1d78ab);}function _0x42dd1b(){const _0x18f7d5=_0x41a6a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x567ce1(_0x2d4fc1(_0x40e98f)),_0x5894cf=window[_0x41a6a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41a6a0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18f7d5);return _0x5894cf?window[_0x41a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5ad15a(_0x5894cf),0x10)*_0x2b851e:null;}function _0x3c42ca(_0x3f1378){return new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1aa9b2,_0x78aff9)=>{_0x3f1378[_0x41a6a0([0x74,0x68,0x65,0x6e])](_0x1aa9b2,_0x78aff9),window[_0x41a6a0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x78aff9,0x16f36dd4^_0x4cb381);});}}_0x33c105[_0x41a6a0([0x6f,0x6e])](_0x41a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x26a6df,_0x3d994f)=>{if(_0x3d994f[0x0]!=_0x40e98f)return _0x24892b(_0x41a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d994f[0x1]={..._0x3d994f[0x1],[_0x41a6a0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3d1208};},{[_0x41a6a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41a6a0([0x68,0x69,0x67,0x68])}),_0x33c105[_0x41a6a0([0x6f,0x6e])](_0x41a6a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5c1022=>{_0x50b8dd(_0x5c1022[_0x41a6a0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x43e272=!0x0,_0x3fdbc6(_0x5c1022[_0x41a6a0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41a6a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41a6a0([0x6c,0x6f,0x77])}),_0x542084[_0x41a6a0([0x74,0x68,0x65,0x6e])](()=>{_0x43e272||_0x24892b(_0x41a6a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x47eec4(){return _0x33c105[_0x41a6a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41a6a0([0x76,0x69,0x65,0x77])][_0x41a6a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41a6a0([0x61,0x75,0x74,0x6f]);}function _0x323f66(){_0x33c105[_0x41a6a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41a6a0([0x76,0x69,0x65,0x77])][_0x41a6a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41a6a0([0x61,0x75,0x74,0x6f]);}}function _0x240fb8(_0x399596){const _0x422dc2=[new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x348666=>setTimeout(_0x348666,0x16fb87d8^_0x4cb381)),_0x542084[_0x41a6a0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x66ef75=>{let _0x417141=0x0;_0x33c105[_0x41a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a6a0([0x6f,0x6e])](_0x41a6a0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x83933d,_0x24b7f6)=>{_0x24b7f6[0x0][_0x41a6a0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x417141++,_0x417141==(0x16f2b8ec^_0x4cb381)&&(_0x66ef75(),_0x83933d[_0x41a6a0([0x6f,0x66,0x66])]());});}))];return window[_0x41a6a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41a6a0([0x72,0x61,0x63,0x65])](_0x422dc2)[_0x41a6a0([0x74,0x68,0x65,0x6e])](()=>_0x399596);}async function _0x590eb9(){await _0x542084,_0x33c105[_0x41a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a6a0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x58ac90,_0x33c105[_0x41a6a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a6a0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x58ac90,_0x33c105[_0x41a6a0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41a6a0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2486f9(_0x1c7efe){const _0x305d58=_0xe9265d();_0x33c105[_0x305d58]=_0x41a6a0([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1c7efe,_0x1c7efe!=_0x41a6a0([0x56,0x61,0x6c,0x69,0x64])&&_0x590eb9();}function _0xe9265d(){const _0x1f2367=window[_0x41a6a0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41a6a0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41a6a0([0x6e,0x6f,0x77])]())[_0x41a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41a6a0([0x2e]),'');let _0x42a971=_0x41a6a0([0x6a]);for(let _0x2be5fe=0x0;_0x2be5fe<_0x1f2367[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2be5fe+=0x2){let _0x43b392=window[_0x41a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f2367[_0x41a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2be5fe,_0x2be5fe+0x2));_0x43b392>=_0x3710b6[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x43b392-=_0x3710b6[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42a971+=_0x3710b6[_0x43b392];}return _0x42a971;}function _0x42c1d2(){const _0x2824ba=_0x85e08d[_0x41a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x41a6a0([0x2e]));if(0x3!=_0x2824ba[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5182dd(_0x2824ba[0x1]);function _0x5182dd(_0x3e825a){const _0x1154ac=_0xf6591d(_0x3e825a);return _0x1154ac&&_0x2eeec7()?_0x1154ac:null;function _0x2eeec7(){const _0x51cd20=_0x1154ac[_0x41a6a0([0x6a,0x74,0x69])],_0x5c5c0d=window[_0x41a6a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x51cd20[_0x41a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x51cd20[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4085de={..._0x1154ac,[_0x41a6a0([0x6a,0x74,0x69])]:_0x51cd20[_0x41a6a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x51cd20[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4085de[_0x41a6a0([0x76,0x63])],_0x2d4fc1(_0x4085de)==_0x5c5c0d;}}}async function _0x427534(){let _0x341b4d=!0x0;try{const _0x5e013c=_0x85e08d[_0x41a6a0([0x73,0x70,0x6c,0x69,0x74])](_0x41a6a0([0x2e])),[_0x29e82c,_0x407ec2,_0x2453c9]=_0x5e013c;return _0x2c9be6(_0x29e82c),await _0x5b38ee(_0x29e82c,_0x407ec2,_0x2453c9),_0x341b4d;}catch{return!0x1;}function _0x2c9be6(_0x2a6914){const _0x5a3e23=_0xf6591d(_0x2a6914);_0x5a3e23&&_0x5a3e23[_0x41a6a0([0x61,0x6c,0x67])]==_0x41a6a0([0x45,0x53,0x32,0x35,0x36])||(_0x341b4d=!0x1);}async function _0x5b38ee(_0x5a511a,_0x2fb8ac,_0x22373f){const _0x10f87d=window[_0x41a6a0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41a6a0([0x66,0x72,0x6f,0x6d])](_0x1f5018(_0x22373f),_0x88670b=>_0x88670b[_0x41a6a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x125243=new window[(_0x41a6a0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41a6a0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a511a+_0x41a6a0([0x2e])+_0x2fb8ac),_0xc084c6=window[_0x41a6a0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41a6a0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc084c6)return;const _0x1a32f4=await _0xc084c6[_0x41a6a0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41a6a0([0x6a,0x77,0x6b]),_0x13dd2f,{[_0x41a6a0([0x6e,0x61,0x6d,0x65])]:_0x41a6a0([0x45,0x43,0x44,0x53,0x41]),[_0x41a6a0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41a6a0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41a6a0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc084c6[_0x41a6a0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41a6a0([0x6e,0x61,0x6d,0x65])]:_0x41a6a0([0x45,0x43,0x44,0x53,0x41]),[_0x41a6a0([0x68,0x61,0x73,0x68])]:{[_0x41a6a0([0x6e,0x61,0x6d,0x65])]:_0x41a6a0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a32f4,_0x10f87d,_0x125243)||(_0x341b4d=!0x1);}}function _0xf6591d(_0x143e61){return _0x143e61[_0x41a6a0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41a6a0([0x65,0x79]))?JSON[_0x41a6a0([0x70,0x61,0x72,0x73,0x65])](_0x1f5018(_0x143e61)):null;}function _0x1f5018(_0x3124aa){return window[_0x41a6a0([0x61,0x74,0x6f,0x62])](_0x3124aa[_0x41a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41a6a0([0x2b]))[_0x41a6a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41a6a0([0x2f])));}function _0x2d4fc1(_0x35e275){let _0x1ce2f4=0x1505;function _0x9a4839(_0x2824f1){for(let _0x291cb8=0x0;_0x291cb8<_0x2824f1[_0x41a6a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x291cb8++){const _0x5ee7bc=_0x2824f1[_0x41a6a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x291cb8);_0x1ce2f4=(_0x1ce2f4<<0x5)+_0x1ce2f4+_0x5ee7bc,_0x1ce2f4&=_0x1ce2f4;}}function _0x5200b9(_0x1606ba){Array[_0x41a6a0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1606ba)?_0x1606ba[_0x41a6a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5200b9):_0x1606ba&&typeof _0x1606ba==_0x41a6a0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41a6a0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1606ba)[_0x41a6a0([0x73,0x6f,0x72,0x74])]()[_0x41a6a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x437f88,_0x115b65])=>{_0x9a4839(_0x437f88),_0x5200b9(_0x115b65);}):_0x9a4839(window[_0x41a6a0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1606ba));}return _0x5200b9(_0x35e275),_0x1ce2f4>>>0x0;}function _0x567ce1(_0xb0db85){return _0xb0db85[_0x41a6a0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41a6a0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41a6a0([0x30]));}function _0x5ad15a(_0x4473e1){return _0x4473e1[_0x41a6a0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41a6a0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41a6a0([0x6a,0x6f,0x69,0x6e])]('');}function _0x58ac90(){}function _0x41a6a0(_0x45d2e7){const _0x4b43a6=_0x42ef;return _0x45d2e7[_0x4b43a6(0x1d2)](_0x2e534c=>String[_0x4b43a6(0x20e)](_0x2e534c))[_0x4b43a6(0x200)]('');}_0x2486f9(await _0xf03b52());}(this);}[_0x34c6ee(0x1da)](){const _0x436b33=_0x34c6ee,_0x23c541=this[_0x436b33(0x1f3)][_0x436b33(0x1eb)][_0x436b33(0x1f9)];_0x23c541[_0x436b33(0x1d9)](_0x436b33(0x20a))&&_0x23c541[_0x436b33(0x1e6)](_0x436b33(0x20a),{'allowAttributes':[_0x436b33(0x210)]}),_0x23c541[_0x436b33(0x1d9)](_0x436b33(0x1de))&&_0x23c541[_0x436b33(0x1e6)](_0x436b33(0x1de),{'allowAttributes':[_0x436b33(0x210)]});}[_0x34c6ee(0x207)](){const _0x125790=_0x34c6ee,_0x5b89ce=this[_0x125790(0x1f3)];_0x5b89ce[_0x125790(0x1ee)][_0x125790(0x1e7)](_0x125790(0x1e3))[_0x125790(0x1e5)]({'model':_0x125790(0x210),'view':_0x125790(0x213)}),_0x5b89ce[_0x125790(0x1ee)][_0x125790(0x1e7)](_0x125790(0x204))[_0x125790(0x219)]({'model':{'key':_0x125790(0x210),'value':_0x38f67b=>_0x38f67b[_0x125790(0x205)](_0x125790(0x213))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x121672=_0x5b89ce[_0x125790(0x1e9)][_0x125790(0x1fb)](_0x125790(0x221));_0x121672&&this[_0x125790(0x20d)](_0x121672,_0x125790(0x1f8),(_0x39f855,[_0x9638d8,_0x5d44df])=>{const _0x54e1a6=_0x125790;_0x9638d8[_0x54e1a6(0x1ea)](_0x54e1a6(0x210),_0x5d44df);});}[_0x34c6ee(0x20b)](){const _0x4cfe65=_0x34c6ee,_0x3489a6=this[_0x4cfe65(0x1f3)][_0x4cfe65(0x227)][_0x4cfe65(0x1fb)](_0x4cfe65(0x21a))||{},_0xe19063=this[_0x4cfe65(0x1f3)][_0x4cfe65(0x227)][_0x4cfe65(0x1fb)](_0x4cfe65(0x1fa))||'';this[_0x4cfe65(0x224)]=_0x57ab19(_0x178f14[_0x4cfe65(0x209)],_0x4cfe65(0x1ec),{..._0x3489a6,'pubkey':_0xe19063,'ctx-name':_0x4cfe65(0x206)+this[_0x4cfe65(0x1f1)],'sourceList':'','imgOnly':_0x4cfe65(0x1e1),'removeCopyright':_0x4cfe65(0x1e1),'localeName':this[_0x4cfe65(0x1f3)][_0x4cfe65(0x215)][_0x4cfe65(0x202)],'externalSourcesEmbedCss':_0x4cfe65(0x217)}),this[_0x4cfe65(0x224)][_0x4cfe65(0x228)]=_0x1822c3=>{const _0x43db89=_0x4cfe65;if(_0x43db89(0x222)==_0x1822c3)return _0x43db89(0x208);},_0x178f14[_0x4cfe65(0x209)][_0x4cfe65(0x1d6)][_0x4cfe65(0x1f2)](this[_0x4cfe65(0x224)]);}[_0x34c6ee(0x1e2)](){const _0x5e9f3a=_0x34c6ee;this[_0x5e9f3a(0x21b)]=_0x57ab19(_0x178f14[_0x5e9f3a(0x209)],_0x5e9f3a(0x212),{'ctx-name':_0x5e9f3a(0x206)+this[_0x5e9f3a(0x1f1)]}),_0x178f14[_0x5e9f3a(0x209)][_0x5e9f3a(0x1d6)][_0x5e9f3a(0x1f2)](this[_0x5e9f3a(0x21b)]);}[_0x34c6ee(0x1df)](){const _0x5130dc=_0x34c6ee,_0x42f282=this[_0x5130dc(0x1f3)][_0x5130dc(0x1e9)][_0x5130dc(0x1fb)](_0x5130dc(0x220));_0x42f282&&this[_0x5130dc(0x20d)](_0x42f282,_0x5130dc(0x1ff),()=>{const _0x4a453c=_0x5130dc,_0x7e51f2=this[_0x4a453c(0x1f3)][_0x4a453c(0x1eb)][_0x4a453c(0x209)][_0x4a453c(0x1e4)][_0x4a453c(0x1d7)]();_0x7e51f2&&_0x7e51f2[_0x4a453c(0x205)](_0x4a453c(0x210))&&this[_0x4a453c(0x1f3)][_0x4a453c(0x1d8)][_0x4a453c(0x1d5)][_0x4a453c(0x1ef)](_0x4a453c(0x1fd),()=>{const _0x2fc8d5=_0x4a453c;_0x2ffb1(this[_0x2fc8d5(0x1f3)],_0x7e51f2);});});const _0x298593=this[_0x5130dc(0x1f3)][_0x5130dc(0x1e9)][_0x5130dc(0x1fb)](_0x5130dc(0x1db));_0x298593&&this[_0x5130dc(0x20d)](_0x298593,_0x5130dc(0x1ff),()=>{const _0x1fc40e=_0x5130dc,_0xa19654=this[_0x1fc40e(0x1f3)][_0x1fc40e(0x1eb)][_0x1fc40e(0x209)][_0x1fc40e(0x1e4)][_0x1fc40e(0x1d7)]();_0xa19654&&_0xa19654[_0x1fc40e(0x205)](_0x1fc40e(0x210))&&this[_0x1fc40e(0x1f3)][_0x1fc40e(0x1d8)][_0x1fc40e(0x1d5)][_0x1fc40e(0x1ef)](_0x1fc40e(0x1fd),()=>{const _0x9900fe=_0x1fc40e;_0x2ffb1(this[_0x9900fe(0x1f3)],_0xa19654);});});}}
|
|
23
|
+
function _0x443d(_0x4c40ac,_0x34a653){const _0x4041df=_0x4041();return _0x443d=function(_0x443d4f,_0x477b47){_0x443d4f=_0x443d4f-0x78;let _0x45325d=_0x4041df[_0x443d4f];return _0x45325d;},_0x443d(_0x4c40ac,_0x34a653);}const _0x2f2343=_0x443d;(function(_0x5ef178,_0x4201e3){const _0x96c687=_0x443d,_0x642b05=_0x5ef178();while(!![]){try{const _0x4fa1d9=parseInt(_0x96c687(0x78))/0x1+parseInt(_0x96c687(0xbb))/0x2+-parseInt(_0x96c687(0xc6))/0x3+-parseInt(_0x96c687(0x9a))/0x4+-parseInt(_0x96c687(0x8c))/0x5*(parseInt(_0x96c687(0x94))/0x6)+parseInt(_0x96c687(0xc2))/0x7+-parseInt(_0x96c687(0xba))/0x8*(-parseInt(_0x96c687(0xa5))/0x9);if(_0x4fa1d9===_0x4201e3)break;else _0x642b05['push'](_0x642b05['shift']());}catch(_0x289a0c){_0x642b05['push'](_0x642b05['shift']());}}}(_0x4041,0x496c3));import{Plugin as _0x395e63}from'ckeditor5/src/core.js';import{Dialog as _0x2561ec}from'ckeditor5/src/ui.js';import{createElement as _0x28d7c9,global as _0x1385ef,uid as _0x1f9812}from'ckeditor5/src/utils.js';function _0x4041(){const _0x2457e5=['_configElement','upcast','pluginName','1174785ueHVIZ','isPremiumPlugin','downcast','view','isRegistered','imageInline','schema','join','6stOcHO','get','execute','querySelector','fromCharCode','input[uploadcare-file-input]','1031000osOnDd','commands','editing','getAttribute','render','add','_initConfig','elementToAttribute','_initConversion','uploadcare.uploader','closeMax','267147iheSvG','attributeToAttribute','locale','UploadcareEditing','replaceImageSource','selection','remove','extend','uploadcare.pubkey','\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','insertImage','data-uc-image-id','config','uploadcareImageId','href','removeAttribute','uploadcareImageReplace','ucContextId','conversion','_ctxElement','_initCtx','24cdUVBM','518658CDVRxf','#uc-icon-arrow-down','true','ctxElement','once','uploader-','requires','2014495peREWz','body','isOfficialPlugin','uc-config','1157580qmEJgL','uploadcare','init','getSelectedElement','afterInit','contentLanguage','543143VMONIl','uc-upload-ctx-provider','cleanupImage','iconHrefResolver','configElement','listenTo','model','PictureEditing','map','imageBlock','_initSchema','for','editor','_initImageProcessingIndicator','document','appendChild','destroy'];_0x4041=function(){return _0x2457e5;};return _0x4041();}import{UploadcareCommand as _0x473e80}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x260760}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5a3cb3}from'./utils/editingutils.js';export class UploadcareEditing extends _0x395e63{[_0x2f2343(0x89)]=null;[_0x2f2343(0xb8)]=null;static get[_0x2f2343(0x8b)](){const _0xb9990=_0x2f2343;return _0xb9990(0xa8);}static get[_0x2f2343(0xc1)](){const _0x534c2c=_0x2f2343;return[_0x534c2c(0x7f),_0x260760,_0x2561ec];}static get[_0x2f2343(0xc4)](){return!0x0;}static get[_0x2f2343(0x8d)](){return!0x0;}[_0x2f2343(0xb6)];get[_0x2f2343(0x7c)](){const _0x5305ad=_0x2f2343;return this[_0x5305ad(0x89)];}get[_0x2f2343(0xbe)](){const _0x55985c=_0x2f2343;return this[_0x55985c(0xb8)];}constructor(_0x2808c8){const _0x7e4d4d=_0x2f2343;super(_0x2808c8),this[_0x7e4d4d(0xb6)]=_0x1f9812();}[_0x2f2343(0xc8)](){const _0x1dc930=_0x2f2343,_0x5d4970=this[_0x1dc930(0x84)];_0x5d4970[_0x1dc930(0x9b)][_0x1dc930(0x9f)](_0x1dc930(0xc7),new _0x473e80(_0x5d4970));}[_0x2f2343(0xca)](){const _0x4b8477=_0x2f2343;this[_0x4b8477(0x82)](),this[_0x4b8477(0xa2)](),this[_0x4b8477(0xa0)](),this[_0x4b8477(0xb9)](),this[_0x4b8477(0x85)](),this[_0x4b8477(0x7d)](this[_0x4b8477(0x84)],_0x4b8477(0x88),()=>{const _0x207ceb=_0x4b8477;this[_0x207ceb(0x89)]&&(this[_0x207ceb(0x89)][_0x207ceb(0xab)](),this[_0x207ceb(0x89)]=null),this[_0x207ceb(0xb8)]&&(this[_0x207ceb(0xb8)][_0x207ceb(0xab)](),this[_0x207ceb(0xb8)]=null);const _0x162dc1=_0x1385ef[_0x207ceb(0x86)][_0x207ceb(0x97)](_0x207ceb(0x99));_0x162dc1&&_0x162dc1[_0x207ceb(0xab)]();}),async function(_0x4314cf){const _0x2911b0=_0x4eaea9([0x35,0x64,0x66,0x76,0x56,0x32,0x5a,0x46,0x49,0x6d,0x47,0x4a,0x37,0x4d,0x57,0x63,0x4f,0x36,0x6c,0x65,0x48,0x74,0x50,0x71,0x6b,0x62,0x75,0x51,0x53,0x68,0x69,0x54,0x30,0x6e,0x44,0x45,0x41,0x4e,0x77,0x73,0x6a,0x33,0x70,0x38,0x43,0x78,0x72,0x31,0x61,0x52,0x42,0x67,0x55,0x4b,0x4c,0x7a,0x59,0x6f,0x58,0x34,0x79,0x39]),_0x468d14=0x2cc1038,_0x29dad3=0x2cb7c50^_0x468d14,_0x405d14=window[_0x4eaea9([0x44,0x61,0x74,0x65])][_0x4eaea9([0x6e,0x6f,0x77])](),_0x1e99ad=_0x4314cf[_0x4eaea9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ebfe0=new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8286be=>{_0x1e99ad[_0x4eaea9([0x6f,0x6e,0x63,0x65])](_0x4eaea9([0x72,0x65,0x61,0x64,0x79]),_0x8286be);}),_0x23e53c={[_0x4eaea9([0x6b,0x74,0x79])]:_0x4eaea9([0x45,0x43]),[_0x4eaea9([0x75,0x73,0x65])]:_0x4eaea9([0x73,0x69,0x67]),[_0x4eaea9([0x63,0x72,0x76])]:_0x4eaea9([0x50,0x2d,0x32,0x35,0x36]),[_0x4eaea9([0x78])]:_0x4eaea9([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]),[_0x4eaea9([0x79])]:_0x4eaea9([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]),[_0x4eaea9([0x61,0x6c,0x67])]:_0x4eaea9([0x45,0x53,0x32,0x35,0x36])},_0xaecd84=_0x1e99ad[_0x4eaea9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4eaea9([0x67,0x65,0x74])](_0x4eaea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1abb15(){let _0x54916c,_0x420049=null,_0x5dc828=null;try{if(_0xaecd84==_0x4eaea9([0x47,0x50,0x4c]))return _0x4eaea9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x54916c=_0x35d121(),!_0x54916c)return _0x4eaea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x54916c[_0x4eaea9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5dc828=_0x23b6a0(_0x54916c[_0x4eaea9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x54916c[_0x4eaea9([0x6a,0x74,0x69])])),await _0x265377()?_0x4697ca()?_0x1caba2()?_0x4eaea9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4b24b3()?(_0x54916c[_0x4eaea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4eaea9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x420049=_0x1bad6b(_0x4eaea9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x54916c[_0x4eaea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4eaea9([0x74,0x72,0x69,0x61,0x6c])&&(_0x420049=_0x1bad6b(_0x4eaea9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x8064fd()):_0x4eaea9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4eaea9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4eaea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4eaea9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1caba2(){const _0x356924=[_0x4eaea9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4eaea9([0x74,0x72,0x69,0x61,0x6c])][_0x4eaea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54916c[_0x4eaea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x405d14/0x3e8:0xe10*_0x29dad3;return _0x54916c[_0x4eaea9([0x65,0x78,0x70])]<_0x356924;}function _0x4697ca(){const _0x3aef3c=_0x54916c[_0x4eaea9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3aef3c&&(!!_0x3aef3c[_0x4eaea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4eaea9([0x2a]))||!!_0x3aef3c[_0x4eaea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4eaea9([0x55,0x50,0x4c,0x43])));}function _0x4b24b3(){const _0x4ce0ac=_0x443d,_0x62f0dd=_0x54916c[_0x4eaea9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x62f0dd||0x0==_0x62f0dd[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2f6949}=new URL(window[_0x4eaea9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4ce0ac(0xb3)]);if(_0x62f0dd[_0x4eaea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f6949))return!0x0;const _0x3153e2=_0x2f6949[_0x4eaea9([0x73,0x70,0x6c,0x69,0x74])](_0x4eaea9([0x2e]));return _0x62f0dd[_0x4eaea9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3be20d=>_0x3be20d[_0x4eaea9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4eaea9([0x2a])))[_0x4eaea9([0x6d,0x61,0x70])](_0x45e5f3=>_0x45e5f3[_0x4eaea9([0x73,0x70,0x6c,0x69,0x74])](_0x4eaea9([0x2e])))[_0x4eaea9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1614d7=>_0x1614d7[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3153e2[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4eaea9([0x6d,0x61,0x70])](_0x120fd0=>Array(_0x3153e2[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x120fd0[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4eaea9([0x66,0x69,0x6c,0x6c])](_0x120fd0[0x0]===_0x4eaea9([0x2a])?_0x4eaea9([0x2a]):'')[_0x4eaea9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x120fd0))[_0x4eaea9([0x73,0x6f,0x6d,0x65])](_0x3fa84d=>_0x3153e2[_0x4eaea9([0x65,0x76,0x65,0x72,0x79])]((_0x1b8036,_0x52aa4f)=>_0x3fa84d[_0x52aa4f]===_0x1b8036||_0x3fa84d[_0x52aa4f]===_0x4eaea9([0x2a])));}function _0x8064fd(){return _0x420049&&_0x5dc828?new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x532bb1,_0x1dcd58)=>{_0x420049[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x532bb1,_0x1dcd58),_0x5dc828[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x453ee3=>{_0x453ee3!=_0x4eaea9([0x56,0x61,0x6c,0x69,0x64])&&_0x532bb1(_0x453ee3);},_0x1dcd58);}):_0x420049||_0x5dc828||_0x4eaea9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x23b6a0(_0xc89668,_0x5977f9){return new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c61ef=>{if(_0x525d63())return _0x2c61ef(_0x4eaea9([0x56,0x61,0x6c,0x69,0x64]));_0x3cbbdf(),_0x1e99ad[_0x4eaea9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4eaea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x42bf11=!0x1;const _0x5dd6bb=_0x1f9812();function _0x54b732(_0xc7b277){return!!_0xc7b277&&(typeof _0xc7b277===_0x4eaea9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc7b277===_0x4eaea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc7b277[_0x4eaea9([0x74,0x68,0x65,0x6e])]===_0x4eaea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc7b277[_0x4eaea9([0x63,0x61,0x74,0x63,0x68])]===_0x4eaea9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3e08f5(_0x675e85){_0x2625bf(_0x675e85)[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x186cc2=>{if(!_0x186cc2||_0x186cc2[_0x4eaea9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4eaea9([0x6f,0x6b]))return _0x4eaea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xc24630(_0x9997e9(_0x5dd6bb+_0x5977f9))!=_0x186cc2[_0x4eaea9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4eaea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4eaea9([0x56,0x61,0x6c,0x69,0x64]);})[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x225a54=>(_0x55e287(),_0x225a54),()=>{const _0x577139=_0x27eac5();return null==_0x577139?(_0x55e287(),_0x4eaea9([0x56,0x61,0x6c,0x69,0x64])):_0x4eaea9(_0x405d14-_0x577139>(0x26c09438^_0x468d14)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x2c61ef)[_0x4eaea9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2c61ef(_0x4eaea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x46a49b=0x2fafeb8^_0x468d14;function _0x55e287(){const _0x597c17=_0x4eaea9([0x6c,0x6c,0x63,0x74,0x2d])+_0xc24630(_0x9997e9(_0xc89668)),_0x5f75be=_0xb6041(_0xc24630(window[_0x4eaea9([0x4d,0x61,0x74,0x68])][_0x4eaea9([0x63,0x65,0x69,0x6c])](_0x405d14/_0x46a49b)));window[_0x4eaea9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4eaea9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x597c17,_0x5f75be);}function _0x27eac5(){const _0x59204a=_0x4eaea9([0x6c,0x6c,0x63,0x74,0x2d])+_0xc24630(_0x9997e9(_0xc89668)),_0x392404=window[_0x4eaea9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4eaea9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x59204a);return _0x392404?window[_0x4eaea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb6041(_0x392404),0x10)*_0x46a49b:null;}function _0x2625bf(_0x2714a9){return new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31ba7a,_0x3eb9eb)=>{_0x2714a9[_0x4eaea9([0x74,0x68,0x65,0x6e])](_0x31ba7a,_0x3eb9eb),window[_0x4eaea9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3eb9eb,0x2cdc4f8^_0x468d14);});}}_0x1e99ad[_0x4eaea9([0x6f,0x6e])](_0x4eaea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x455807,_0x39c9a0)=>{if(_0x39c9a0[0x0]!=_0xc89668)return _0x2c61ef(_0x4eaea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x39c9a0[0x1]={..._0x39c9a0[0x1],[_0x4eaea9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5dd6bb};},{[_0x4eaea9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4eaea9([0x68,0x69,0x67,0x68])}),_0x1e99ad[_0x4eaea9([0x6f,0x6e])](_0x4eaea9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x38b125=>{_0x54b732(_0x38b125[_0x4eaea9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x42bf11=!0x0,_0x3e08f5(_0x38b125[_0x4eaea9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4eaea9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4eaea9([0x6c,0x6f,0x77])}),_0x2ebfe0[_0x4eaea9([0x74,0x68,0x65,0x6e])](()=>{_0x42bf11||_0x2c61ef(_0x4eaea9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x525d63(){return _0x1e99ad[_0x4eaea9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4eaea9([0x76,0x69,0x65,0x77])][_0x4eaea9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4eaea9([0x61,0x75,0x74,0x6f]);}function _0x3cbbdf(){_0x1e99ad[_0x4eaea9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4eaea9([0x76,0x69,0x65,0x77])][_0x4eaea9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4eaea9([0x61,0x75,0x74,0x6f]);}}function _0x1bad6b(_0x592829){const _0x126cf7=[new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcf02f1=>setTimeout(_0xcf02f1,0x2c52ef4^_0x468d14)),_0x2ebfe0[_0x4eaea9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x315a7c=>{let _0x37c59b=0x0;_0x1e99ad[_0x4eaea9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4eaea9([0x6f,0x6e])](_0x4eaea9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5d94fe,_0xe2361c)=>{_0xe2361c[0x0][_0x4eaea9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x37c59b++,_0x37c59b==(0x2cc11c0^_0x468d14)&&(_0x315a7c(),_0x5d94fe[_0x4eaea9([0x6f,0x66,0x66])]());});}))];return window[_0x4eaea9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4eaea9([0x72,0x61,0x63,0x65])](_0x126cf7)[_0x4eaea9([0x74,0x68,0x65,0x6e])](()=>_0x592829);}async function _0x4c3d80(){await _0x2ebfe0,_0x1e99ad[_0x4eaea9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4eaea9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4e7cb7,_0x1e99ad[_0x4eaea9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4eaea9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4e7cb7,_0x1e99ad[_0x4eaea9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4eaea9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4408c8(_0x59f041){const _0x29ead2=_0x3376c6();_0x1e99ad[_0x29ead2]=_0x4eaea9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59f041,_0x59f041!=_0x4eaea9([0x56,0x61,0x6c,0x69,0x64])&&_0x4c3d80();}function _0x3376c6(){const _0x48149e=window[_0x4eaea9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4eaea9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4eaea9([0x6e,0x6f,0x77])]())[_0x4eaea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4eaea9([0x2e]),'');let _0x169e45=_0x4eaea9([0x64]);for(let _0x55cba2=0x0;_0x55cba2<_0x48149e[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x55cba2+=0x2){let _0x26a4c8=window[_0x4eaea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x48149e[_0x4eaea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x55cba2,_0x55cba2+0x2));_0x26a4c8>=_0x2911b0[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x26a4c8-=_0x2911b0[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x169e45+=_0x2911b0[_0x26a4c8];}return _0x169e45;}function _0x35d121(){const _0x2e0417=_0xaecd84[_0x4eaea9([0x73,0x70,0x6c,0x69,0x74])](_0x4eaea9([0x2e]));if(0x3!=_0x2e0417[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3d48e4(_0x2e0417[0x1]);function _0x3d48e4(_0x1d77b1){const _0x11c220=_0x1ad6e8(_0x1d77b1);return _0x11c220&&_0x1a81a9()?_0x11c220:null;function _0x1a81a9(){const _0x44e606=_0x11c220[_0x4eaea9([0x6a,0x74,0x69])],_0x8ae4a5=window[_0x4eaea9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44e606[_0x4eaea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x44e606[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x16ed76={..._0x11c220,[_0x4eaea9([0x6a,0x74,0x69])]:_0x44e606[_0x4eaea9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x44e606[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x16ed76[_0x4eaea9([0x76,0x63])],_0x9997e9(_0x16ed76)==_0x8ae4a5;}}}async function _0x265377(){let _0x1ad1a5=!0x0;try{const _0x10646e=_0xaecd84[_0x4eaea9([0x73,0x70,0x6c,0x69,0x74])](_0x4eaea9([0x2e])),[_0x7cd701,_0x5ce640,_0x1ed8eb]=_0x10646e;return _0x458814(_0x7cd701),await _0x36a174(_0x7cd701,_0x5ce640,_0x1ed8eb),_0x1ad1a5;}catch{return!0x1;}function _0x458814(_0x36e27c){const _0x49430d=_0x1ad6e8(_0x36e27c);_0x49430d&&_0x49430d[_0x4eaea9([0x61,0x6c,0x67])]==_0x4eaea9([0x45,0x53,0x32,0x35,0x36])||(_0x1ad1a5=!0x1);}async function _0x36a174(_0x1aa3fa,_0x366761,_0x2893f0){const _0x7870fd=window[_0x4eaea9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4eaea9([0x66,0x72,0x6f,0x6d])](_0x425ecb(_0x2893f0),_0x86a9f3=>_0x86a9f3[_0x4eaea9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3bce07=new window[(_0x4eaea9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4eaea9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1aa3fa+_0x4eaea9([0x2e])+_0x366761),_0x1a5430=window[_0x4eaea9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4eaea9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1a5430)return;const _0x1d4459=await _0x1a5430[_0x4eaea9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4eaea9([0x6a,0x77,0x6b]),_0x23e53c,{[_0x4eaea9([0x6e,0x61,0x6d,0x65])]:_0x4eaea9([0x45,0x43,0x44,0x53,0x41]),[_0x4eaea9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4eaea9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4eaea9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1a5430[_0x4eaea9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4eaea9([0x6e,0x61,0x6d,0x65])]:_0x4eaea9([0x45,0x43,0x44,0x53,0x41]),[_0x4eaea9([0x68,0x61,0x73,0x68])]:{[_0x4eaea9([0x6e,0x61,0x6d,0x65])]:_0x4eaea9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1d4459,_0x7870fd,_0x3bce07)||(_0x1ad1a5=!0x1);}}function _0x1ad6e8(_0x4cfeda){return _0x4cfeda[_0x4eaea9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4eaea9([0x65,0x79]))?JSON[_0x4eaea9([0x70,0x61,0x72,0x73,0x65])](_0x425ecb(_0x4cfeda)):null;}function _0x425ecb(_0x5f2290){return window[_0x4eaea9([0x61,0x74,0x6f,0x62])](_0x5f2290[_0x4eaea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4eaea9([0x2b]))[_0x4eaea9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4eaea9([0x2f])));}function _0x9997e9(_0x23c7a8){let _0x1779cd=0x1505;function _0x4a4a0c(_0x44b870){for(let _0x3bab80=0x0;_0x3bab80<_0x44b870[_0x4eaea9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3bab80++){const _0x2580e3=_0x44b870[_0x4eaea9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3bab80);_0x1779cd=(_0x1779cd<<0x5)+_0x1779cd+_0x2580e3,_0x1779cd&=_0x1779cd;}}function _0x20e84d(_0x47f593){Array[_0x4eaea9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x47f593)?_0x47f593[_0x4eaea9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x20e84d):_0x47f593&&typeof _0x47f593==_0x4eaea9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4eaea9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x47f593)[_0x4eaea9([0x73,0x6f,0x72,0x74])]()[_0x4eaea9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x65c0ac,_0x365fec])=>{_0x4a4a0c(_0x65c0ac),_0x20e84d(_0x365fec);}):_0x4a4a0c(window[_0x4eaea9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x47f593));}return _0x20e84d(_0x23c7a8),_0x1779cd>>>0x0;}function _0xc24630(_0x332676){return _0x332676[_0x4eaea9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4eaea9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4eaea9([0x30]));}function _0xb6041(_0x3371ef){return _0x3371ef[_0x4eaea9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4eaea9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4eaea9([0x6a,0x6f,0x69,0x6e])]('');}function _0x4e7cb7(){}function _0x4eaea9(_0x3bc91c){const _0x112c5b=_0x443d;return _0x3bc91c[_0x112c5b(0x80)](_0x52d720=>String[_0x112c5b(0x98)](_0x52d720))[_0x112c5b(0x93)]('');}_0x4408c8(await _0x1abb15());}(this);}[_0x2f2343(0x82)](){const _0x3af244=_0x2f2343,_0x588303=this[_0x3af244(0x84)][_0x3af244(0x7e)][_0x3af244(0x92)];_0x588303[_0x3af244(0x90)](_0x3af244(0x81))&&_0x588303[_0x3af244(0xac)](_0x3af244(0x81),{'allowAttributes':[_0x3af244(0xb2)]}),_0x588303[_0x3af244(0x90)](_0x3af244(0x91))&&_0x588303[_0x3af244(0xac)](_0x3af244(0x91),{'allowAttributes':[_0x3af244(0xb2)]});}[_0x2f2343(0xa2)](){const _0x1d8219=_0x2f2343,_0xdf0ea1=this[_0x1d8219(0x84)];_0xdf0ea1[_0x1d8219(0xb7)][_0x1d8219(0x83)](_0x1d8219(0x8e))[_0x1d8219(0xa6)]({'model':_0x1d8219(0xb2),'view':_0x1d8219(0xb0)}),_0xdf0ea1[_0x1d8219(0xb7)][_0x1d8219(0x83)](_0x1d8219(0x8a))[_0x1d8219(0xa1)]({'model':{'key':_0x1d8219(0xb2),'value':_0x15fc8a=>_0x15fc8a[_0x1d8219(0x9d)](_0x1d8219(0xb0))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xba27dd=_0xdf0ea1[_0x1d8219(0x9b)][_0x1d8219(0x95)](_0x1d8219(0xa9));_0xba27dd&&this[_0x1d8219(0x7d)](_0xba27dd,_0x1d8219(0x7a),(_0x54756c,[_0x3a73bb,_0x3a1892])=>{const _0x43ea06=_0x1d8219;_0x3a73bb[_0x43ea06(0xb4)](_0x43ea06(0xb2),_0x3a1892);});}[_0x2f2343(0xa0)](){const _0x726bf=_0x2f2343,_0x111503=this[_0x726bf(0x84)][_0x726bf(0xb1)][_0x726bf(0x95)](_0x726bf(0xa3))||{},_0x26fc95=this[_0x726bf(0x84)][_0x726bf(0xb1)][_0x726bf(0x95)](_0x726bf(0xad))||'';this[_0x726bf(0x89)]=_0x28d7c9(_0x1385ef[_0x726bf(0x86)],_0x726bf(0xc5),{..._0x111503,'pubkey':_0x26fc95,'ctx-name':_0x726bf(0xc0)+this[_0x726bf(0xb6)],'sourceList':'','imgOnly':_0x726bf(0xbd),'removeCopyright':_0x726bf(0xbd),'localeName':this[_0x726bf(0x84)][_0x726bf(0xa7)][_0x726bf(0xcb)],'externalSourcesEmbedCss':_0x726bf(0xae)}),this[_0x726bf(0x89)][_0x726bf(0x7b)]=_0x258c02=>{const _0x1aeca1=_0x726bf;if(_0x1aeca1(0xa4)==_0x258c02)return _0x1aeca1(0xbc);},_0x1385ef[_0x726bf(0x86)][_0x726bf(0xc3)][_0x726bf(0x87)](this[_0x726bf(0x89)]);}[_0x2f2343(0xb9)](){const _0x1d5805=_0x2f2343;this[_0x1d5805(0xb8)]=_0x28d7c9(_0x1385ef[_0x1d5805(0x86)],_0x1d5805(0x79),{'ctx-name':_0x1d5805(0xc0)+this[_0x1d5805(0xb6)]}),_0x1385ef[_0x1d5805(0x86)][_0x1d5805(0xc3)][_0x1d5805(0x87)](this[_0x1d5805(0xb8)]);}[_0x2f2343(0x85)](){const _0x45e676=_0x2f2343,_0x4b0990=this[_0x45e676(0x84)][_0x45e676(0x9b)][_0x45e676(0x95)](_0x45e676(0xaf));_0x4b0990&&this[_0x45e676(0x7d)](_0x4b0990,_0x45e676(0x96),()=>{const _0x2fbde4=_0x45e676,_0x37cff6=this[_0x2fbde4(0x84)][_0x2fbde4(0x7e)][_0x2fbde4(0x86)][_0x2fbde4(0xaa)][_0x2fbde4(0xc9)]();_0x37cff6&&_0x37cff6[_0x2fbde4(0x9d)](_0x2fbde4(0xb2))&&this[_0x2fbde4(0x84)][_0x2fbde4(0x9c)][_0x2fbde4(0x8f)][_0x2fbde4(0xbf)](_0x2fbde4(0x9e),()=>{const _0x4f3507=_0x2fbde4;_0x5a3cb3(this[_0x4f3507(0x84)],_0x37cff6);});});const _0x141d20=this[_0x45e676(0x84)][_0x45e676(0x9b)][_0x45e676(0x95)](_0x45e676(0xb5));_0x141d20&&this[_0x45e676(0x7d)](_0x141d20,_0x45e676(0x96),()=>{const _0x2f2772=_0x45e676,_0x50442d=this[_0x2f2772(0x84)][_0x2f2772(0x7e)][_0x2f2772(0x86)][_0x2f2772(0xaa)][_0x2f2772(0xc9)]();_0x50442d&&_0x50442d[_0x2f2772(0x9d)](_0x2f2772(0xb2))&&this[_0x2f2772(0x84)][_0x2f2772(0x9c)][_0x2f2772(0x8f)][_0x2f2772(0xbf)](_0x2f2772(0x9e),()=>{const _0x2bb706=_0x2f2772;_0x5a3cb3(this[_0x2bb706(0x84)],_0x50442d);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x51dc04,ObservableMixin as _0x2349ed}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xf3b447}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0xddbf62}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x28d07e}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1f7eaa}from'../../utils/uploadutils.js';import{getImageUrls as _0x1a467d,getImageDimension as _0x45234f}from'../../utils/editingutils.js';import{isAncestor as _0x5b5667}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2349ed(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5196cb,_0x4c0c00,_0xa70bcf){super(),this['_editor']=_0x5196cb,this['_dialog']=_0x4c0c00,this['_imageElement']=_0xa70bcf,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 _0x5c4403=this['_imageElement'],_0x578079=_0x5c4403['getAttribute']('uploadcareImageId'),_0x15d34e=_0x5c4403['getAttribute']('src');if(_0x578079)await this['_loadImageInfo'](_0x578079,_0x15d34e);else{if(this['_imageCache']['has'](_0x15d34e)){const _0x3cfd31=this['_imageCache']['get'](_0x15d34e);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3cfd31['url'],this['imageDimension']=_0x3cfd31['dimension'],this['imageId']=_0x3cfd31['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3f67d6}=this['_editor'],t=_0x3f67d6['t'],_0x49b227=new _0x28d07e(_0x3f67d6,this['imageStatus'],this['_attributes']);_0x49b227['bind']('status')['to'](this,'imageStatus'),_0x49b227['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x49b227['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x49b227['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x49b227,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xddbf62,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x49b227,'position':_0xf3b447['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x49b227['focus']();},'onHide':()=>{_0x49b227['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x476309=>!_0x5b5667(_0x476309,_0x49b227['element'])}});}['_loadImageInfo'](_0x134649,_0x419bfd){return _0x1f7eaa['getInfo'](_0x134649,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2b32b6=>{const {width:_0x5e1d1e,height:_0x5643cd}=_0x2b32b6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x419bfd,this['imageDimension']={'width':_0x5e1d1e,'height':_0x5643cd},this['imageId']=_0x134649;})['catch'](_0x4c763f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4c763f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2194ac,_0x422879){return this['_getImageAsFile'](_0x2194ac)['then'](_0xb0bc1=>_0x1f7eaa['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x422879['signal'],'file':_0xb0bc1,'onProgress':_0x12fb10=>{_0x12fb10&&_0x12fb10['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x12fb10['value']));}}))['then'](_0x5e53e6=>{const {width:_0x42fdf0,height:_0x198394}=_0x5e53e6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5e53e6['cdnUrl'],this['imageDimension']={'width':_0x42fdf0,'height':_0x198394},this['imageId']=_0x5e53e6['uuid'],this['imageUploadProgress']=null;const _0x5194e3=_0x2194ac['getAttribute']('src');this['_imageCache']['set'](_0x5194e3,{'id':_0x5e53e6['uuid'],'url':_0x5e53e6['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x465e37=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x465e37['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x29857d,_0x1740b5){_0x29857d['on']('apply',(_0x1675cf,_0x4f1e7f)=>{this['_replaceImage'](_0x1740b5,_0x4f1e7f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x29857d['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x29857d['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5198f5,_0x485f30,_0x1fd27b){const _0x23f1b6=this['_editor'],{width:_0x44820c,height:_0x4af203}=_0x45234f(_0x485f30,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x27336a,imageSources:_0x26ec86}=_0x1a467d(_0x485f30,_0x44820c);_0x23f1b6['model']['change'](_0x1d76f9=>{if('$graveyard'===_0x5198f5['root']['rootName']){_0x23f1b6['execute']('insertImage',{'imageType':_0x5198f5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5198f5['getAttributes']()),'uploadcareImageId':_0x1fd27b,'src':_0x27336a,'sources':_0x26ec86,'width':_0x44820c,'height':_0x4af203}});const _0x529e11=_0x5198f5['getChildren']();_0x5198f5=_0x23f1b6['model']['document']['selection']['getSelectedElement']();for(const _0x688b9b of _0x529e11)_0x1d76f9['append'](_0x1d76f9['cloneElement'](_0x688b9b),_0x5198f5);}else _0x1d76f9['setSelection'](_0x5198f5,'on'),_0x23f1b6['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5198f5['getAttributes']()),'uploadcareImageId':_0x1fd27b,'src':_0x27336a,'sources':_0x26ec86,'width':_0x44820c,'height':_0x4af203},_0x5198f5);_0x1d76f9['setSelection'](_0x5198f5,'on');});}async['_getImageAsFile'](_0x314bc9){const _0x40864c=_0x51dc04['window'],_0x349360=_0x51dc04['document']['location']['href'],_0x1e8760=new _0x40864c['URL'](_0x314bc9['getAttribute']('src'),_0x349360);if('data:'===_0x1e8760['protocol']){const _0x1e56de=_0x1e8760['href']['split'](','),_0x1c0502=_0x1e56de[0x0]['match'](/:(.*?);/)[0x1],_0x4162f9=_0x1c0502['split']('/')[0x1],_0x5c73a7=_0x40864c['atob'](_0x1e56de[_0x1e56de['length']-0x1]);let _0x100a8d=_0x5c73a7['length'];const _0x2ac197=new _0x40864c['Uint8Array'](_0x100a8d);for(;_0x100a8d--;)_0x2ac197[_0x100a8d]=_0x5c73a7['charCodeAt'](_0x100a8d);return new _0x40864c['File']([_0x2ac197],'image.'+_0x4162f9,{'type':_0x1c0502});}const _0x493bdf=_0x1e8760['href']['split']('/'),_0x2f3e17=_0x493bdf[_0x493bdf['length']-0x1],_0x3186c6=_0x2f3e17['split']('.')[0x1];return _0x40864c['fetch'](_0x1e8760['href'])['then'](_0x337abd=>_0x337abd['clone']()['blob']())['then'](_0x1ca245=>new _0x40864c['File']([_0x1ca245],_0x2f3e17,{'type':'image/'+_0x3186c6}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x1990(_0xca638d,_0x4d656f){const _0x13ee28=_0x13ee();return _0x1990=function(_0x1990a9,_0x102a7d){_0x1990a9=_0x1990a9-0xbc;let _0x236b69=_0x13ee28[_0x1990a9];return _0x236b69;},_0x1990(_0xca638d,_0x4d656f);}function _0x13ee(){const _0x6612d1=['ck-uploadcare-theme','33HeRHJU','set','setTemplate','uc-light','1921507bWEbXR','159575VaFGNu','576GYOwNP','image-edit','bindTemplate','180nYlvbR','uc-cloud-image-editor','17520178Nbtttd','9916HBPkoU','154CBTrYg','206612rIDWcV','12595PhEwxO','16zMLLOS','5376lVEQJr','imageSrc','21610WpyQFD'];_0x13ee=function(){return _0x6612d1;};return _0x13ee();}(function(_0x26cfab,_0x46904c){const _0x554dcb=_0x1990,_0x1fc91b=_0x26cfab();while(!![]){try{const _0x14295c=parseInt(_0x554dcb(0xc7))/0x1*(-parseInt(_0x554dcb(0xc8))/0x2)+-parseInt(_0x554dcb(0xd0))/0x3*(-parseInt(_0x554dcb(0xc9))/0x4)+parseInt(_0x554dcb(0xc0))/0x5*(parseInt(_0x554dcb(0xc4))/0x6)+parseInt(_0x554dcb(0xbf))/0x7*(parseInt(_0x554dcb(0xcb))/0x8)+-parseInt(_0x554dcb(0xc1))/0x9*(-parseInt(_0x554dcb(0xce))/0xa)+parseInt(_0x554dcb(0xca))/0xb*(parseInt(_0x554dcb(0xcc))/0xc)+-parseInt(_0x554dcb(0xc6))/0xd;if(_0x14295c===_0x46904c)break;else _0x1fc91b['push'](_0x1fc91b['shift']());}catch(_0x6b8aa9){_0x1fc91b['push'](_0x1fc91b['shift']());}}}(_0x13ee,0x96105));import{View as _0x3e1a05}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x3e1a05{constructor(_0x25c3ef,_0x14a16b){const _0x135dbf=_0x1990;super(_0x25c3ef);const _0x269083=this[_0x135dbf(0xc3)];this[_0x135dbf(0xbc)](_0x135dbf(0xcd),''),this[_0x135dbf(0xbd)]({'tag':_0x135dbf(0xc5),'attributes':{..._0x14a16b,'class':[_0x135dbf(0xbe),_0x135dbf(0xcf)],'ctx-name':_0x135dbf(0xc2),'cdn-url':_0x269083['to'](_0x135dbf(0xcd))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x5108b7}from'ckeditor5/src/icons.js';import{ButtonView as _0x13b706,IconView as _0x354806,View as _0x4d5c16}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x4d5c16{constructor(_0x442471){super(_0x442471);const t=_0x442471['t'];this['set']('errorType',null);const _0x352cc3=new _0x13b706(_0x442471);_0x352cc3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x352cc3['withText']=!0x0,_0x352cc3['class']='ck-button-action',_0x352cc3['on']('execute',()=>{this['fire']('retry');}),_0x352cc3['bind']('isVisible')['to'](this,'errorType',_0x2bc823=>'NotFound'!==_0x2bc823);const _0x158cf6=new _0x354806();_0x158cf6['content']=_0x5108b7,_0x158cf6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x514be3=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':[_0x158cf6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x514be3['to']('errorType',_0x4c95b3=>t('NotFound'!==_0x4c95b3?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x352cc3]},{'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'}]}]}]});}}
|