@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250618.0 → 0.0.0-nightly-20250620.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 _0x3b8fd4,Command as _0x408a34}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3f266d,IconGooglePhotos as _0x4e6070,IconGoogleDrive as _0xebf2b2,IconFacebook as _0x3b8ed6,IconDropbox as _0x48374d,IconUploadcareLink as _0x398b2e,IconUploadcareImageUpload as _0x2d5487,IconError as _0x1a6cda,IconUploadcareImageEdit as _0x1b431c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1408d8,MenuBarMenuListItemButtonView as _0x48fa69,View as _0x15ccb4,FocusCycler as _0x2f5877,Dialog as _0x4188d0,DialogViewPosition as _0x2cece5,SpinnerView as _0x234043,IconView as _0xebe885,Notification as _0x398ded}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x35b0e5,DomEmitterMixin as _0x2b9be7,global as _0x39fc81,getAncestors as _0x4b8854,ObservableMixin as _0x2a058a,uid as _0x113c55,createElement as _0x5ea37a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x220fa9}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x6a223f,info as _0x39d56d}from'@uploadcare/upload-client';import*as _0x359d49 from'@uploadcare/file-uploader';var i=function(_0x5b2b43){return _0x5b2b43['Local']='local',_0x5b2b43['URL']='url',_0x5b2b43['Dropbox']='dropbox',_0x5b2b43['GDrive']='gdrive',_0x5b2b43['Facebook']='facebook',_0x5b2b43['GPhotos']='gphotos',_0x5b2b43['OneDrive']='onedrive',_0x5b2b43;}({});function _(_0x1b0530,_0x16ac67,_0x19d02e){const t=_0x1b0530['t'],_0x21b655=_0x1b0530['t'];switch(_0x16ac67){case i['Local']:return{'text':_0x21b655('Insert'===_0x19d02e?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x21b655('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x19d02e?_0x21b655('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x21b655('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x16ac67;}}class e extends _0x3b8fd4{['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 _0x5d5b42=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22d4ab;for(const _0x274f5d in _0x5d5b42){const _0x61adfa=_0x274f5d,_0x2f6663=_0x5d5b42[_0x61adfa];if('uploadcareLicenseKeyValid'==_0x2f6663||'uploadcareLicenseKeyInvalid'==_0x2f6663||'uploadcareLicenseKeyExpired'==_0x2f6663||'uploadcareLicenseKeyDomainLimit'==_0x2f6663||'uploadcareLicenseKeyNotAllowed'==_0x2f6663||'uploadcareLicenseKeyEvaluationLimit'==_0x2f6663||'uploadcareLicenseKeyTrialLimit'==_0x2f6663||'uploadcareLicenseKeyUsageLimit'==_0x2f6663){delete _0x5d5b42[_0x61adfa],_0x22d4ab=_0x2f6663,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x206bca}=this,_0x1c0e41=_0x206bca['commands']['get']('uploadcare');if(!_0x1c0e41)return;const _0x360033=this['_normalizeConfigSourceList'](_0x206bca['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1bbfb0,_0xb77f68)=>{const _0x1a358f=this['_getIntegrationKey'](_0xb77f68['type']);return _0x1bbfb0[_0x1a358f]||(_0x1bbfb0[_0x1a358f]=[]),_0x1bbfb0[_0x1a358f]['push'](_0xb77f68),_0x1bbfb0;},{});_0x206bca['plugins']['has']('ImageInsertUI')&&_0x206bca['commands']['get']('uploadcare')&&Object['entries'](_0x360033)['forEach'](([_0x322688,_0x206f28])=>{_0x206bca['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x322688,'observable':()=>_0x1c0e41,'buttonViewCreator':()=>this['_createToolbarButton'](_0x206f28),'formViewCreator':()=>this['_createDropdownButtons'](_0x206f28),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x206f28),'override':'assetManager'!==_0x322688});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4a83f1){const {locale:_0x813cfc}=this['editor'];return _0x4a83f1['map'](_0x12aae4=>{const _0x4d818f=_(_0x813cfc,_0x12aae4,'Insert');switch(_0x12aae4){case i['Local']:return{'icon':_0x2d5487,'type':i['Local'],..._0x4d818f};case i['URL']:return{'icon':_0x398b2e,'type':i['URL'],..._0x4d818f};case i['Dropbox']:return{'icon':_0x48374d,'type':i['Dropbox'],..._0x4d818f};case i['Facebook']:return{'icon':_0x3b8ed6,'type':i['Facebook'],..._0x4d818f};case i['GDrive']:return{'icon':_0xebf2b2,'type':i['GDrive'],..._0x4d818f};case i['GPhotos']:return{'icon':_0x4e6070,'type':i['GPhotos'],..._0x4d818f};case i['OneDrive']:return{'icon':_0x3f266d,'type':i['OneDrive'],..._0x4d818f};}});}['_getIntegrationKey'](_0x59d089){switch(_0x59d089){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4d3d4e,_0x3db7ff){const _0x2c183c=this['editor'],_0x3b01ce=new _0x4d3d4e(_0x2c183c['locale']),_0xe63e93=_0x2c183c['commands']['get']('uploadcare');return _0x3b01ce['bind']('isEnabled')['to'](_0xe63e93),_0x3b01ce['on']('execute',()=>{_0xe63e93['execute'](_0x3db7ff);}),_0x3b01ce;}['_createToolbarButton'](_0x228c3c){const {locale:_0x2b08b8}=this['editor'],_0x58526f=this['editor']['plugins']['get']('ImageInsertUI'),_0x260487=_0x228c3c[0x0],_0x383ef1=this['_createButton'](_0x1408d8,_0x260487['type']);return _0x383ef1['icon']=_0x260487['icon'],_0x383ef1['bind']('label')['to'](_0x58526f,'isImageSelected',_0x347fb1=>_(_0x2b08b8,_0x260487['type'],_0x347fb1?'Replace':'Insert')['text']),_0x383ef1['tooltip']=!0x0,_0x383ef1;}['_createDropdownButtons'](_0x14b0e1){const {locale:_0x3ec8d7}=this['editor'],_0x5999e8=this['editor']['plugins']['get']('ImageInsertUI');return _0x14b0e1['map'](_0x21354f=>{const _0x429b1d=this['_createButton'](_0x1408d8,_0x21354f['type']);return _0x429b1d['withText']=!0x0,_0x429b1d['icon']=_0x21354f['icon'],_0x429b1d['bind']('label')['to'](_0x5999e8,'isImageSelected',_0x2ab48e=>_(_0x3ec8d7,_0x21354f['type'],_0x2ab48e?'Replace':'Insert')['text']),_0x429b1d;});}['_createMenuBarButtons'](_0x3ac418){return _0x3ac418['map'](_0x40e3df=>{const _0x2cdf59=this['_createButton'](_0x48fa69,_0x40e3df['type']);return _0x2cdf59['icon']=_0x40e3df['icon'],_0x2cdf59['label']=_0x40e3df['shortText'],_0x2cdf59;});}}class F extends _0x15ccb4{['focusTracker'];['focusCycler'];constructor(_0x1402d6){super(_0x1402d6),this['focusTracker']=new _0x35b0e5(),this['focusCycler']=new _0x2f5877({'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(_0x35dfce,_0x155510){super(_0x35dfce),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-'+_0x155510}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x209b25,_0x3542ec){const _0x116ec9=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x34bb51=>_0x34bb51<=_0x3542ec)['map'](_0x18349c=>_0x209b25['replace'](/\/$/,'')+'/-/resize/'+_0x18349c+'x/\x20'+_0x18349c+'w');return{'imageFallbackUrl':_0x209b25,'imageSources':[{'srcset':_0x116ec9['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3542ec+'px)\x20100vw,\x20'+_0x3542ec+'px','type':'image/webp'}]};}function C(_0x255f47,_0x12325d,_0x31b57d){const _0x5d4129=_0x255f47['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5d4129?parseInt(_0x5d4129[0x1],0xa):_0x12325d,'height':_0x5d4129?parseInt(_0x5d4129[0x2],0xa):_0x31b57d};}function p(_0x471807,_0xf1a5d7){const _0x40f0e3=new(_0x2b9be7())(),_0x48c6ab=_0x471807['plugins']['get']('ImageUtils'),_0x10fee8=_0x471807['editing']['mapper']['toViewElement'](_0xf1a5d7),_0x4f973c=_0x48c6ab['findViewImgElement'](_0x10fee8),_0x4195da=_0x471807['editing']['view']['domConverter']['viewToDom'](_0x4f973c),_0x2d78ad=_0xf1a5d7['getAttribute']('width'),_0x162af7=_0xf1a5d7['getAttribute']('height'),_0x3753a2='image-processing';_0x471807['editing']['view']['change'](_0x485aef=>{_0x485aef['addClass'](_0x3753a2,_0x10fee8),_0x485aef['setStyle']('aspect-ratio',_0x2d78ad+'/'+_0x162af7,_0x4f973c);}),_0x40f0e3['listenTo'](_0x4195da,'load',()=>{_0x40f0e3['stopListening'](_0x4195da,'load'),_0x471807['editing']['view']['change'](_0x2f7296=>{_0x2f7296['removeClass'](_0x3753a2,_0x10fee8),_0x2f7296['removeStyle']('aspect-ratio',_0x4f973c);});});}function z(_0x329bdf){if(Array['isArray'](_0x329bdf)){const _0x384478=_0x329bdf['map'](z);return _0x271325=>_0x384478['some'](_0x31c02f=>_0x31c02f(_0x271325));}if('origin'==_0x329bdf){const _0x5559c9=_0x39fc81['window']['location']['origin'];return _0x38ec7e=>new URL(_0x38ec7e,_0x39fc81['document']['baseURI'])['origin']==_0x5559c9;}return'function'==typeof _0x329bdf?_0x329bdf:_0x329bdf instanceof RegExp?_0x41b432=>!(!_0x41b432['match'](_0x329bdf)&&!_0x41b432['replace'](/^https?:\/\//,'')['match'](_0x329bdf)):()=>!0x1;}function S(_0x2e5057,_0x3aa072){return _0x4b8854(_0x2e5057['target'])['includes'](_0x3aa072);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2a058a(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x47758d,_0xed786d,_0x57d491){super(),this['_editor']=_0x47758d,this['_editing']=_0xed786d,this['_dialog']=_0x47758d['plugins']['get'](_0x4188d0),this['_api']=_0xed786d['ctxElement']['getAPI'](),this['_type']=_0x57d491,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:_0xf42729,model:_0x130991}=this['_editor'],_0xd56b19=_0x130991['document']['selection']['getSelectedElement'](),_0x47483e=_0xd56b19&&(_0xd56b19['is']('element','imageBlock')||_0xd56b19['is']('element','imageInline'));this['_formView']=new x(_0xf42729,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2d5487,'title':_(_0xf42729,this['_type'],_0x47483e?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2cece5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xd91bee=>!S(_0xd91bee,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2feb11}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2af6d1=>{const _0xa4e960=_0x2feb11['length'];for(const _0x291f42 of _0x2feb11){const _0x15d331=_0x291f42===_0x2feb11[_0xa4e960-0x1],{cdnUrl:_0x2b46e0,fileInfo:_0x90b78f}=_0x291f42;if(!_0x2b46e0||!_0x90b78f)continue;const {width:_0x37a429,height:_0x42b06e}=_0x90b78f['imageInfo'],_0x258ac4=C(_0x2b46e0,_0x37a429,_0x42b06e),_0x288556=k(_0x2b46e0,_0x258ac4['width']),_0xd5ad97={'id':_0x90b78f['uuid'],'type':'image','attributes':{'imageDimension':_0x258ac4,..._0x288556}};this['_insertAsset'](_0xd5ad97,_0x15d331,_0x2af6d1);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x209bf3=>{'idle'===_0x209bf3['detail']['status']&&!_0x209bf3['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x10f076,_0x34ebd0,_0x13e4f3){const _0x216fd3=this['_editor']['model']['document']['selection'],_0x2f0851=_0x216fd3['getSelectedElement'](),_0x1b1717=!(!_0x2f0851||!_0x2f0851['is']('element','imageInline'));_0x13e4f3['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x10f076,_0x1b1717),_0x34ebd0||_0x13e4f3['setSelection'](_0x216fd3['getLastPosition']());}['_insertImage'](_0x1ce86e,_0x4ea8db){const _0x428f90=this['_editor'],{imageDimension:_0x49c187,imageFallbackUrl:_0x4b19b5,imageSources:_0x52dbd3}=_0x1ce86e['attributes'];_0x428f90['execute']('insertImage',{'imageType':_0x4ea8db?'imageInline':null,'source':{'uploadcareImageId':_0x1ce86e['id'],'src':_0x4b19b5,'sources':_0x52dbd3,..._0x49c187}});}}class w extends _0x408a34{['_editing'];['_controller']=null;static get['requires'](){return[_0x4188d0,o];}constructor(_0x54d0e9){super(_0x54d0e9),this['_editing']=_0x54d0e9['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5961a9){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x5961a9);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1eec86,publicKey:_0x11630e,signal:_0x2ec33c,onProgress:_0x338ef8}){return _0x6a223f(_0x1eec86,{'publicKey':_0x11630e,'store':'auto','signal':_0x2ec33c,'onProgress':_0x338ef8});}static['getInfo'](_0x2955f5,_0x21c11a){return _0x39d56d(_0x2955f5,_0x21c11a);}}class f extends _0x3b8fd4{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x220fa9,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2eb03b=this['editor'];if(!!!_0x2eb03b['config']['get']('uploadcare'))return;_0x2eb03b['plugins']['get'](_0x220fa9)['createUploadAdapter']=_0x1a92d5=>new A(_0x1a92d5,_0x2eb03b),_0x2eb03b['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5ba4a3,{imageElement:_0x16c37d,data:_0x2e14d0})=>{_0x2eb03b['model']['change'](_0x3cc8af=>{_0x3cc8af['setAttribute']('uploadcareImageId',_0x2e14d0['uploadcareImageId'],_0x16c37d);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x359c62,_0x46ec67){this['loader']=_0x359c62,this['editor']=_0x46ec67,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4345f9=this['editor']['config']['get']('uploadcare.pubkey'),_0x5623db=await this['loader']['file'];return j['upload']({'file':_0x5623db,'publicKey':_0x4345f9,'signal':this['controller']['signal'],'onProgress':_0x28436b=>{_0x28436b&&_0x28436b['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x28436b['value']);}})['then'](async _0x26ba7a=>{const {imageFallbackUrl:_0x47a568,imageSources:_0x2204e6}=k(_0x26ba7a['cdnUrl'],_0x26ba7a['imageInfo']['width']);return{'uploadcareImageId':_0x26ba7a['uuid'],'default':_0x47a568,'sources':_0x2204e6};})['catch'](()=>{const _0x20697d=t('Cannot\x20upload\x20file:')+('\x20'+_0x5623db['name']+'.');return Promise['reject'](_0x20697d);});}['abort'](){this['controller']['abort']();}}class o extends _0x3b8fd4{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4188d0];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x366865){super(_0x366865),this['ucContextId']=_0x113c55();}['init'](){const _0x13d8fe=this['editor'];_0x13d8fe['commands']['add']('uploadcare',new w(_0x13d8fe));}['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 _0xf7d7c3=_0x39fc81['document']['querySelector']('input[uploadcare-file-input]');_0xf7d7c3&&_0xf7d7c3['remove']();}),async function(_0x47844c){const _0x28a3ee=_0x5e4764([0x53,0x4a,0x71,0x63,0x57,0x72,0x58,0x6a,0x56,0x79,0x45,0x70,0x4d,0x6f,0x39,0x67,0x61,0x69,0x48,0x64,0x73,0x31,0x33,0x6d,0x32,0x51,0x77,0x75,0x66,0x5a,0x50,0x38,0x55,0x4b,0x65,0x59,0x4e,0x68,0x52,0x62,0x37,0x44,0x54,0x4f,0x6b,0x47,0x6e,0x43,0x30,0x46,0x76,0x6c,0x34,0x49,0x42,0x78,0x41,0x4c,0x36,0x35,0x74,0x7a]),_0x9a6bdd=0x667c0cb1,_0x180d87=0x667b67a9^_0x9a6bdd,_0x1a8e05=window[_0x5e4764([0x44,0x61,0x74,0x65])][_0x5e4764([0x6e,0x6f,0x77])](),_0x4b10e1=_0x47844c[_0x5e4764([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2a86a5=new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56bfc2=>{_0x4b10e1[_0x5e4764([0x6f,0x6e,0x63,0x65])](_0x5e4764([0x72,0x65,0x61,0x64,0x79]),_0x56bfc2);}),_0x2bb309={[_0x5e4764([0x6b,0x74,0x79])]:_0x5e4764([0x45,0x43]),[_0x5e4764([0x75,0x73,0x65])]:_0x5e4764([0x73,0x69,0x67]),[_0x5e4764([0x63,0x72,0x76])]:_0x5e4764([0x50,0x2d,0x32,0x35,0x36]),[_0x5e4764([0x78])]:_0x5e4764([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]),[_0x5e4764([0x79])]:_0x5e4764([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]),[_0x5e4764([0x61,0x6c,0x67])]:_0x5e4764([0x45,0x53,0x32,0x35,0x36])},_0x34aff0=_0x4b10e1[_0x5e4764([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5e4764([0x67,0x65,0x74])](_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x39b555(){let _0x420ea3,_0x44dd00=null,_0x5713ff=null;try{if(_0x34aff0==_0x5e4764([0x47,0x50,0x4c]))return _0x5e4764([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x420ea3=_0x297c6c(),!_0x420ea3)return _0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x420ea3[_0x5e4764([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5713ff=_0x206408(_0x420ea3[_0x5e4764([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x420ea3[_0x5e4764([0x6a,0x74,0x69])])),await _0x66485a()?_0x484e6d()?_0x264391()?_0x5e4764([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x237aab()?(_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e4764([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x44dd00=_0x33983f(_0x5e4764([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e4764([0x74,0x72,0x69,0x61,0x6c])&&(_0x44dd00=_0x33983f(_0x5e4764([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x114eea()):_0x5e4764([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5e4764([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x264391(){const _0x581562=[_0x5e4764([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5e4764([0x74,0x72,0x69,0x61,0x6c])][_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a8e05/0x3e8:0xe10*_0x180d87;return _0x420ea3[_0x5e4764([0x65,0x78,0x70])]<_0x581562;}function _0x484e6d(){const _0x50d4e3=_0x420ea3[_0x5e4764([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x50d4e3&&(!!_0x50d4e3[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x2a]))||!!_0x50d4e3[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x55,0x50,0x4c,0x43])));}function _0x237aab(){const _0x55d92e=_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x55d92e||0x0==_0x55d92e[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x333703}=new URL(window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x55d92e[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x333703))return!0x0;const _0x143b95=_0x333703[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e]));return _0x55d92e[_0x5e4764([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x532971=>_0x532971[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x2a])))[_0x5e4764([0x6d,0x61,0x70])](_0x206e08=>_0x206e08[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e])))[_0x5e4764([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x536a95=>_0x536a95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x143b95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e4764([0x6d,0x61,0x70])](_0x3b13fa=>Array(_0x143b95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3b13fa[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e4764([0x66,0x69,0x6c,0x6c])](_0x3b13fa[0x0]===_0x5e4764([0x2a])?_0x5e4764([0x2a]):'')[_0x5e4764([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3b13fa))[_0x5e4764([0x73,0x6f,0x6d,0x65])](_0x431699=>_0x143b95[_0x5e4764([0x65,0x76,0x65,0x72,0x79])]((_0x2ccd7f,_0x2b49f1)=>_0x431699[_0x2b49f1]===_0x2ccd7f||_0x431699[_0x2b49f1]===_0x5e4764([0x2a])));}function _0x114eea(){return _0x44dd00&&_0x5713ff?new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x289083,_0x34299a)=>{_0x44dd00[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x289083,_0x34299a),_0x5713ff[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x38c562=>{_0x38c562!=_0x5e4764([0x56,0x61,0x6c,0x69,0x64])&&_0x289083(_0x38c562);},_0x34299a);}):_0x44dd00||_0x5713ff||_0x5e4764([0x56,0x61,0x6c,0x69,0x64]);}}function _0x206408(_0x544fd5,_0x18e2e2){return new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31a4d0=>{if(_0x3340e5())return _0x31a4d0(_0x5e4764([0x56,0x61,0x6c,0x69,0x64]));_0x311ed9(),_0x4b10e1[_0x5e4764([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x56c6ae=!0x1;const _0x154898=_0x113c55();function _0x4ccaa5(_0x534d46){return!!_0x534d46&&(typeof _0x534d46===_0x5e4764([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x534d46===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x534d46[_0x5e4764([0x74,0x68,0x65,0x6e])]===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x534d46[_0x5e4764([0x63,0x61,0x74,0x63,0x68])]===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x515d8b(_0x487a9c){_0x564d0f(_0x487a9c)[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x5278ae=>{if(!_0x5278ae||_0x5278ae[_0x5e4764([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5e4764([0x6f,0x6b]))return _0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x14ab6a(_0x49b313(_0x154898+_0x18e2e2))!=_0x5278ae[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5e4764([0x56,0x61,0x6c,0x69,0x64]);})[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x165d3c=>(_0x7e4607(),_0x165d3c),()=>{const _0x28b5e3=_0x571372();return null==_0x28b5e3?(_0x7e4607(),_0x5e4764([0x56,0x61,0x6c,0x69,0x64])):_0x5e4764(_0x1a8e05-_0x28b5e3>(0x427088b1^_0x9a6bdd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x31a4d0)[_0x5e4764([0x63,0x61,0x74,0x63,0x68])](()=>{_0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x231351=0x664ae231^_0x9a6bdd;function _0x7e4607(){const _0x487b7e=_0x5e4764([0x6c,0x6c,0x63,0x74,0x2d])+_0x14ab6a(_0x49b313(_0x544fd5)),_0x5e3656=_0x1ae957(_0x14ab6a(window[_0x5e4764([0x4d,0x61,0x74,0x68])][_0x5e4764([0x63,0x65,0x69,0x6c])](_0x1a8e05/_0x231351)));window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e4764([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x487b7e,_0x5e3656);}function _0x571372(){const _0x121256=_0x5e4764([0x6c,0x6c,0x63,0x74,0x2d])+_0x14ab6a(_0x49b313(_0x544fd5)),_0x5e7eb2=window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e4764([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x121256);return _0x5e7eb2?window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ae957(_0x5e7eb2),0x10)*_0x231351:null;}function _0x564d0f(_0x6322d2){return new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5efd65,_0x34e112)=>{_0x6322d2[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x5efd65,_0x34e112),window[_0x5e4764([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34e112,0x667dd871^_0x9a6bdd);});}}_0x4b10e1[_0x5e4764([0x6f,0x6e])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f391a,_0x4f85e6)=>{if(_0x4f85e6[0x0]!=_0x544fd5)return _0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f85e6[0x1]={..._0x4f85e6[0x1],[_0x5e4764([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x154898};},{[_0x5e4764([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e4764([0x68,0x69,0x67,0x68])}),_0x4b10e1[_0x5e4764([0x6f,0x6e])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d7aa5=>{_0x4ccaa5(_0x5d7aa5[_0x5e4764([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x56c6ae=!0x0,_0x515d8b(_0x5d7aa5[_0x5e4764([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5e4764([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e4764([0x6c,0x6f,0x77])}),_0x2a86a5[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>{_0x56c6ae||_0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3340e5(){return _0x4b10e1[_0x5e4764([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e4764([0x76,0x69,0x65,0x77])][_0x5e4764([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5e4764([0x61,0x75,0x74,0x6f]);}function _0x311ed9(){_0x4b10e1[_0x5e4764([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e4764([0x76,0x69,0x65,0x77])][_0x5e4764([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e4764([0x61,0x75,0x74,0x6f]);}}function _0x33983f(_0x132c6a){const _0x41c55b=[new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x525268=>setTimeout(_0x525268,0x6675327d^_0x9a6bdd)),_0x2a86a5[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5168b7=>{let _0x15cc2e=0x0;_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x6f,0x6e])](_0x5e4764([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5621c1,_0x798a7e)=>{_0x798a7e[0x0][_0x5e4764([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x15cc2e++,_0x15cc2e==(0x667c0d49^_0x9a6bdd)&&(_0x5168b7(),_0x5621c1[_0x5e4764([0x6f,0x66,0x66])]());});}))];return window[_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e4764([0x72,0x61,0x63,0x65])](_0x41c55b)[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>_0x132c6a);}async function _0x561f66(){await _0x2a86a5,_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34a055,_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34a055,_0x4b10e1[_0x5e4764([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x32a7da(_0x4cf19b){const _0xed06d8=_0x10014a();_0x4b10e1[_0xed06d8]=_0x5e4764([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4cf19b,_0x4cf19b!=_0x5e4764([0x56,0x61,0x6c,0x69,0x64])&&_0x561f66();}function _0x10014a(){const _0x3842a4=window[_0x5e4764([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5e4764([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5e4764([0x6e,0x6f,0x77])]())[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5e4764([0x2e]),'');let _0x10bfda=_0x5e4764([0x53]);for(let _0x22a0d4=0x0;_0x22a0d4<_0x3842a4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22a0d4+=0x2){let _0x6b4398=window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3842a4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22a0d4,_0x22a0d4+0x2));_0x6b4398>=_0x28a3ee[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x6b4398-=_0x28a3ee[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x10bfda+=_0x28a3ee[_0x6b4398];}return _0x10bfda;}function _0x297c6c(){const _0x98acfb=_0x34aff0[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e]));if(0x3!=_0x98acfb[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x52f04d(_0x98acfb[0x1]);function _0x52f04d(_0x31fc28){const _0x49462b=_0xb4ef6e(_0x31fc28);return _0x49462b&&_0x58c333()?_0x49462b:null;function _0x58c333(){const _0x243ab4=_0x49462b[_0x5e4764([0x6a,0x74,0x69])],_0x3e24d4=window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x243ab4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x243ab4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x39d4c6={..._0x49462b,[_0x5e4764([0x6a,0x74,0x69])]:_0x243ab4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x243ab4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x39d4c6[_0x5e4764([0x76,0x63])],_0x49b313(_0x39d4c6)==_0x3e24d4;}}}async function _0x66485a(){let _0x559593=!0x0;try{const _0x84eac5=_0x34aff0[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e])),[_0x2dbc6d,_0x505b65,_0x5950b8]=_0x84eac5;return _0x1441db(_0x2dbc6d),await _0x1a3b2d(_0x2dbc6d,_0x505b65,_0x5950b8),_0x559593;}catch{return!0x1;}function _0x1441db(_0x14e9d7){const _0x2e956d=_0xb4ef6e(_0x14e9d7);_0x2e956d&&_0x2e956d[_0x5e4764([0x61,0x6c,0x67])]==_0x5e4764([0x45,0x53,0x32,0x35,0x36])||(_0x559593=!0x1);}async function _0x1a3b2d(_0x23e08,_0x4a1348,_0x13cc0d){const _0x59ab82=window[_0x5e4764([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5e4764([0x66,0x72,0x6f,0x6d])](_0x285f59(_0x13cc0d),_0x2b6298=>_0x2b6298[_0x5e4764([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2ae5e0=new window[(_0x5e4764([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5e4764([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x23e08+_0x5e4764([0x2e])+_0x4a1348),_0x47ecf1=window[_0x5e4764([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5e4764([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47ecf1)return;const _0x1a3998=await _0x47ecf1[_0x5e4764([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5e4764([0x6a,0x77,0x6b]),_0x2bb309,{[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x45,0x43,0x44,0x53,0x41]),[_0x5e4764([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5e4764([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47ecf1[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x45,0x43,0x44,0x53,0x41]),[_0x5e4764([0x68,0x61,0x73,0x68])]:{[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a3998,_0x59ab82,_0x2ae5e0)||(_0x559593=!0x1);}}function _0xb4ef6e(_0xc88e74){return _0xc88e74[_0x5e4764([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5e4764([0x65,0x79]))?JSON[_0x5e4764([0x70,0x61,0x72,0x73,0x65])](_0x285f59(_0xc88e74)):null;}function _0x285f59(_0x506bfa){return window[_0x5e4764([0x61,0x74,0x6f,0x62])](_0x506bfa[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5e4764([0x2b]))[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5e4764([0x2f])));}function _0x49b313(_0x2f8e4e){let _0x4bb407=0x1505;function _0x53eb3a(_0x49fdaa){for(let _0xdaa2b0=0x0;_0xdaa2b0<_0x49fdaa[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdaa2b0++){const _0x14e8fa=_0x49fdaa[_0x5e4764([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdaa2b0);_0x4bb407=(_0x4bb407<<0x5)+_0x4bb407+_0x14e8fa,_0x4bb407&=_0x4bb407;}}function _0x2105e2(_0xb115ff){Array[_0x5e4764([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xb115ff)?_0xb115ff[_0x5e4764([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2105e2):_0xb115ff&&typeof _0xb115ff==_0x5e4764([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5e4764([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xb115ff)[_0x5e4764([0x73,0x6f,0x72,0x74])]()[_0x5e4764([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2789b3,_0x4ed852])=>{_0x53eb3a(_0x2789b3),_0x2105e2(_0x4ed852);}):_0x53eb3a(window[_0x5e4764([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xb115ff));}return _0x2105e2(_0x2f8e4e),_0x4bb407>>>0x0;}function _0x14ab6a(_0x17b4c7){return _0x17b4c7[_0x5e4764([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5e4764([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5e4764([0x30]));}function _0x1ae957(_0x45e391){return _0x45e391[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5e4764([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5e4764([0x6a,0x6f,0x69,0x6e])]('');}function _0x34a055(){}function _0x5e4764(_0x3b7dc0){return _0x3b7dc0['map'](_0x1a87c7=>String['fromCharCode'](_0x1a87c7))['join']('');}_0x32a7da(await _0x39b555());}(this);}['_initSchema'](){const _0x5d517d=this['editor']['model']['schema'];_0x5d517d['isRegistered']('imageBlock')&&_0x5d517d['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5d517d['isRegistered']('imageInline')&&_0x5d517d['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x69c207=this['editor'];_0x69c207['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x69c207['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4395d0=>_0x4395d0['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x39dd4f=_0x69c207['commands']['get']('replaceImageSource');_0x39dd4f&&this['listenTo'](_0x39dd4f,'cleanupImage',(_0xa141bf,[_0x3a5c13,_0x1dcb09])=>{_0x3a5c13['removeAttribute']('uploadcareImageId',_0x1dcb09);});}['_initConfig'](){const _0xb17e13=this['editor']['config']['get']('uploadcare.uploader')||{},_0x160339=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x5ea37a(_0x39fc81['document'],'uc-config',{..._0xb17e13,'pubkey':_0x160339,'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']=_0xa21de=>{if('closeMax'==_0xa21de)return'#uc-icon-arrow-down';},_0x39fc81['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x5ea37a(_0x39fc81['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x39fc81['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x33e05e=this['editor']['commands']['get']('insertImage');_0x33e05e&&this['listenTo'](_0x33e05e,'execute',()=>{const _0x2d1ecb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2d1ecb&&_0x2d1ecb['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2d1ecb);});});const _0xfcfbcd=this['editor']['commands']['get']('uploadcareImageReplace');_0xfcfbcd&&this['listenTo'](_0xfcfbcd,'execute',()=>{const _0x237397=this['editor']['model']['document']['selection']['getSelectedElement']();_0x237397&&_0x237397['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x237397);});});}}class tt extends _0x3b8fd4{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x17c6a5){super(_0x17c6a5),_0x17c6a5['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x359d49['defineComponents'](_0x359d49);}}class ii extends _0x15ccb4{constructor(_0x55ebe6){super(_0x55ebe6);const t=_0x55ebe6['t'],_0x50464d=this['bindTemplate'],_0x25444e=new _0x234043();_0x25444e['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':[_0x25444e,{'text':_0x50464d['to']('imageUploadProgress',_0x4e7629=>t('Loading\x20image...')+'\x20('+(_0x4e7629||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 _0x15ccb4{constructor(_0x4aba66){super(_0x4aba66);const t=_0x4aba66['t'];this['set']('errorType',null);const _0x518c05=new _0x1408d8(_0x4aba66);_0x518c05['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x518c05['withText']=!0x0,_0x518c05['class']='ck-button-action',_0x518c05['on']('execute',()=>{this['fire']('retry');}),_0x518c05['bind']('isVisible')['to'](this,'errorType',_0x504c5a=>'NotFound'!==_0x504c5a);const _0x3b6cdf=new _0xebe885();_0x3b6cdf['content']=_0x1a6cda,_0x3b6cdf['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xfdadd9=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':[_0x3b6cdf,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xfdadd9['to']('errorType',_0x16dcf3=>t('NotFound'!==_0x16dcf3?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x518c05]},{'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 _0x15ccb4{constructor(_0xb1eedd,_0x55d4fd){super(_0xb1eedd);const _0x5e4cfa=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x55d4fd,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5e4cfa['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x13a12e,_0x5af972,_0xca8c29){super(_0x13a12e),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x13a12e),this['_errorView']=new ti(_0x13a12e),this['_editingView']=new ei(_0x13a12e,_0xca8c29),this['_focusableView']=new _0x15ccb4(_0x13a12e),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5af972),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'],_0x3a38cf=>{this['_addUploadcareImageEditorListeners'](_0x3a38cf);});}),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'](_0x4f9493,_0x61f42){const _0x35c231='uc-cloud-image-editor',_0x5647d8=_0x4f9493['querySelector'](_0x35c231);if(_0x5647d8)return _0x61f42(_0x5647d8);const _0x248f98=new MutationObserver(_0x2509bc=>{const _0x376437=_0x2509bc['filter'](_0x4355c6=>_0x4355c6['target']===_0x4f9493&&_0x4355c6['addedNodes']['length']>0x0&&_0x4355c6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x35c231);_0x376437['length']&&(_0x248f98['disconnect'](),_0x61f42(_0x376437[0x0]['addedNodes'][0x0]));});_0x248f98['observe'](_0x4f9493,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2fc2ca){_0x2fc2ca['addEventListener']('apply',_0x41e944=>{this['fire']('apply',{'imageSrc':_0x41e944['detail']['cdnUrl']});}),_0x2fc2ca['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2a058a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x339e51,_0x2dcd19,_0x48f5a5){super(),this['_editor']=_0x339e51,this['_dialog']=_0x2dcd19,this['_imageElement']=_0x48f5a5,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 _0x505b7e=this['_imageElement'],_0x3d07cb=_0x505b7e['getAttribute']('uploadcareImageId'),_0x5188fe=_0x505b7e['getAttribute']('src');if(_0x3d07cb)await this['_loadImageInfo'](_0x3d07cb,_0x5188fe);else{if(this['_imageCache']['has'](_0x5188fe)){const _0x5efd67=this['_imageCache']['get'](_0x5188fe);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5efd67['url'],this['imageDimension']=_0x5efd67['dimension'],this['imageId']=_0x5efd67['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x50589a}=this['_editor'],t=_0x50589a['t'],_0x473df3=new X(_0x50589a,this['imageStatus'],this['_attributes']);_0x473df3['bind']('status')['to'](this,'imageStatus'),_0x473df3['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x473df3['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x473df3['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x473df3,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1b431c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x473df3,'position':_0x2cece5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x473df3['focus']();},'onHide':()=>{_0x473df3['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4126f3=>!S(_0x4126f3,_0x473df3['element'])}});}['_loadImageInfo'](_0x3705c9,_0x263476){return j['getInfo'](_0x3705c9,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x249b29=>{const {width:_0x407808,height:_0x15c8b9}=_0x249b29['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x263476,this['imageDimension']={'width':_0x407808,'height':_0x15c8b9},this['imageId']=_0x3705c9;})['catch'](_0x3e873a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3e873a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x171639,_0x221376){return this['_getImageAsFile'](_0x171639)['then'](_0x131b91=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x221376['signal'],'file':_0x131b91,'onProgress':_0x480344=>{_0x480344&&_0x480344['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x480344['value']));}}))['then'](_0x52cc9c=>{const {width:_0x373496,height:_0x5a2a8e}=_0x52cc9c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x52cc9c['cdnUrl'],this['imageDimension']={'width':_0x373496,'height':_0x5a2a8e},this['imageId']=_0x52cc9c['uuid'],this['imageUploadProgress']=null;const _0x23dad9=_0x171639['getAttribute']('src');this['_imageCache']['set'](_0x23dad9,{'id':_0x52cc9c['uuid'],'url':_0x52cc9c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xf9aa74=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xf9aa74['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x36d739,_0x3cd26e){_0x36d739['on']('apply',(_0x430812,_0x2db4a0)=>{this['_replaceImage'](_0x3cd26e,_0x2db4a0['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x36d739['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x36d739['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x160705,_0x16e602,_0x25b8cc){const _0x3a0696=this['_editor'],{width:_0x1cd34c,height:_0x3f5d5e}=C(_0x16e602,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1d645b,imageSources:_0x591463}=k(_0x16e602,_0x1cd34c);_0x3a0696['model']['change'](_0x487e0e=>{if('$graveyard'===_0x160705['root']['rootName']){_0x3a0696['execute']('insertImage',{'imageType':_0x160705['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x160705['getAttributes']()),'uploadcareImageId':_0x25b8cc,'src':_0x1d645b,'sources':_0x591463,'width':_0x1cd34c,'height':_0x3f5d5e}});const _0x22c6a9=_0x160705['getChildren']();_0x160705=_0x3a0696['model']['document']['selection']['getSelectedElement']();for(const _0x4cabc5 of _0x22c6a9)_0x487e0e['append'](_0x487e0e['cloneElement'](_0x4cabc5),_0x160705);}else _0x487e0e['setSelection'](_0x160705,'on'),_0x3a0696['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x160705['getAttributes']()),'uploadcareImageId':_0x25b8cc,'src':_0x1d645b,'sources':_0x591463,'width':_0x1cd34c,'height':_0x3f5d5e},_0x160705);_0x487e0e['setSelection'](_0x160705,'on');});}async['_getImageAsFile'](_0x366ab0){const _0x2cbe76=_0x39fc81['window'],_0x2858ce=_0x39fc81['document']['location']['href'],_0xde250b=new _0x2cbe76['URL'](_0x366ab0['getAttribute']('src'),_0x2858ce);if('data:'===_0xde250b['protocol']){const _0x11561d=_0xde250b['href']['split'](','),_0x295d2d=_0x11561d[0x0]['match'](/:(.*?);/)[0x1],_0x3f3995=_0x295d2d['split']('/')[0x1],_0x4f7b2b=_0x2cbe76['atob'](_0x11561d[_0x11561d['length']-0x1]);let _0x1dcd0e=_0x4f7b2b['length'];const _0x1f14e0=new _0x2cbe76['Uint8Array'](_0x1dcd0e);for(;_0x1dcd0e--;)_0x1f14e0[_0x1dcd0e]=_0x4f7b2b['charCodeAt'](_0x1dcd0e);return new _0x2cbe76['File']([_0x1f14e0],'image.'+_0x3f3995,{'type':_0x295d2d});}const _0x516294=_0xde250b['href']['split']('/'),_0x5fa327=_0x516294[_0x516294['length']-0x1],_0x6b1f0=_0x5fa327['split']('.')[0x1];return _0x2cbe76['fetch'](_0xde250b['href'])['then'](_0x4ed5a7=>_0x4ed5a7['clone']()['blob']())['then'](_0x252091=>new _0x2cbe76['File']([_0x252091],_0x5fa327,{'type':'image/'+_0x6b1f0}));}}class Q extends _0x408a34{['imageEditController'];static get['requires'](){return[_0x4188d0];}['_isEditable'];constructor(_0x2c5b68){super(_0x2c5b68),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x142742){const _0x28fdc1=z(_0x142742);return _0x9a6ee2=>!(!_0x9a6ee2||!_0x9a6ee2['is']('element','imageBlock')&&!_0x9a6ee2['is']('element','imageInline'))&&(!!_0x9a6ee2['hasAttribute']('uploadcareImageId')||!!_0x9a6ee2['hasAttribute']('src')&&_0x28fdc1(_0x9a6ee2['getAttribute']('src')));}(_0x2c5b68['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x20b983=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x20b983);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x35354c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x35354c&&(_0x35354c['is']('element','imageBlock')||_0x35354c['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4188d0),_0x35354c),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x408a34{['refresh'](){const _0x108ec7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x108ec7&&(_0x108ec7['is']('element','imageBlock')||_0x108ec7['is']('element','imageInline')));}['execute'](_0x2eefb1){const _0x575986=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x471799=>{_0x471799['setAttributes'](_0x2eefb1,_0x575986),_0x471799['removeAttribute']('srcset',_0x575986),_0x471799['removeAttribute']('sizes',_0x575986);});}}class m extends _0x3b8fd4{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x398ded,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3fb506}=this;_0x3fb506['commands']['add']('uploadcareImageEdit',new Q(_0x3fb506)),_0x3fb506['commands']['add']('uploadcareImageReplace',new V(_0x3fb506));}}class g extends _0x3b8fd4{['_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 _0x27aeb4=this['editor'];_0x27aeb4['ui']['componentFactory']['add']('uploadcareImageEdit',_0x395e64=>{const _0x1450d8=_0x27aeb4['commands']['get']('uploadcareImageEdit'),_0x1fc215=new _0x1408d8(_0x395e64),t=_0x395e64['t'];return _0x1fc215['set']({'icon':_0x1b431c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1fc215['bind']('isEnabled')['to'](_0x1450d8),_0x1fc215['bind']('isOn')['to'](_0x1450d8,'isActive'),this['listenTo'](_0x1fc215,'execute',()=>{_0x27aeb4['execute']('uploadcareImageEdit'),_0x27aeb4['editing']['view']['focus']();}),_0x1fc215;}),this['_initConfig']();}['_initConfig'](){const _0x57d100=_0x5ea37a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x57d100),this['listenTo'](this['editor'],'destroy',()=>{_0x57d100['remove']();});}}class et extends _0x3b8fd4{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x18952f,Command as _0x38b82b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x58dc0d,IconGooglePhotos as _0x3df652,IconGoogleDrive as _0x133faf,IconFacebook as _0x684e5f,IconDropbox as _0x25314c,IconUploadcareLink as _0x56c9ce,IconUploadcareImageUpload as _0x2e8149,IconError as _0x44ace3,IconUploadcareImageEdit as _0x3333a3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x21dbfd,MenuBarMenuListItemButtonView as _0x49dc54,View as _0x636533,FocusCycler as _0x4e40ac,Dialog as _0x187092,DialogViewPosition as _0x189a1d,SpinnerView as _0x77302f,IconView as _0x450025,Notification as _0x46bd46}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x3a08c9,DomEmitterMixin as _0x58ef83,global as _0x9ab865,getAncestors as _0x55d6f2,ObservableMixin as _0x4a1c60,uid as _0x3227e0,createElement as _0x211b53}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x374520}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x17bf1e,info as _0x8443a4}from'@uploadcare/upload-client';import*as _0x59180e from'@uploadcare/file-uploader';var i=function(_0x1fb08a){return _0x1fb08a['Local']='local',_0x1fb08a['URL']='url',_0x1fb08a['Dropbox']='dropbox',_0x1fb08a['GDrive']='gdrive',_0x1fb08a['Facebook']='facebook',_0x1fb08a['GPhotos']='gphotos',_0x1fb08a['OneDrive']='onedrive',_0x1fb08a;}({});function _(_0x5040e8,_0x2362ed,_0x427a22){const t=_0x5040e8['t'],_0x47263e=_0x5040e8['t'];switch(_0x2362ed){case i['Local']:return{'text':_0x47263e('Insert'===_0x427a22?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x47263e('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x427a22?_0x47263e('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x47263e('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x427a22?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x427a22?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x427a22?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x427a22?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x427a22?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2362ed;}}class e extends _0x18952f{['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 _0x51e721=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d609b;for(const _0x136f46 in _0x51e721){const _0x43c674=_0x136f46,_0x2941f6=_0x51e721[_0x43c674];if('uploadcareLicenseKeyValid'==_0x2941f6||'uploadcareLicenseKeyInvalid'==_0x2941f6||'uploadcareLicenseKeyExpired'==_0x2941f6||'uploadcareLicenseKeyDomainLimit'==_0x2941f6||'uploadcareLicenseKeyNotAllowed'==_0x2941f6||'uploadcareLicenseKeyEvaluationLimit'==_0x2941f6||'uploadcareLicenseKeyTrialLimit'==_0x2941f6||'uploadcareLicenseKeyUsageLimit'==_0x2941f6){delete _0x51e721[_0x43c674],_0x2d609b=_0x2941f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2d609b&&_0x51e721['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2d609b&&_0x51e721['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2d609b&&_0x51e721['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2d609b&&_0x51e721['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2d609b&&_0x51e721['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x2d609b&&_0x51e721['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2d609b&&_0x51e721['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5126d5}=this,_0x2832c9=_0x5126d5['commands']['get']('uploadcare');if(!_0x2832c9)return;const _0x180448=this['_normalizeConfigSourceList'](_0x5126d5['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x569161,_0x38de82)=>{const _0x1619f6=this['_getIntegrationKey'](_0x38de82['type']);return _0x569161[_0x1619f6]||(_0x569161[_0x1619f6]=[]),_0x569161[_0x1619f6]['push'](_0x38de82),_0x569161;},{});_0x5126d5['plugins']['has']('ImageInsertUI')&&_0x5126d5['commands']['get']('uploadcare')&&Object['entries'](_0x180448)['forEach'](([_0x3c4ba5,_0x3bd8c7])=>{_0x5126d5['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3c4ba5,'observable':()=>_0x2832c9,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3bd8c7),'formViewCreator':()=>this['_createDropdownButtons'](_0x3bd8c7),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3bd8c7),'override':'assetManager'!==_0x3c4ba5});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x33b91f){const {locale:_0x1d5cb4}=this['editor'];return _0x33b91f['map'](_0xeadc85=>{const _0x5968dd=_(_0x1d5cb4,_0xeadc85,'Insert');switch(_0xeadc85){case i['Local']:return{'icon':_0x2e8149,'type':i['Local'],..._0x5968dd};case i['URL']:return{'icon':_0x56c9ce,'type':i['URL'],..._0x5968dd};case i['Dropbox']:return{'icon':_0x25314c,'type':i['Dropbox'],..._0x5968dd};case i['Facebook']:return{'icon':_0x684e5f,'type':i['Facebook'],..._0x5968dd};case i['GDrive']:return{'icon':_0x133faf,'type':i['GDrive'],..._0x5968dd};case i['GPhotos']:return{'icon':_0x3df652,'type':i['GPhotos'],..._0x5968dd};case i['OneDrive']:return{'icon':_0x58dc0d,'type':i['OneDrive'],..._0x5968dd};}});}['_getIntegrationKey'](_0x33a07e){switch(_0x33a07e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3af319,_0x40474b){const _0x362f64=this['editor'],_0x219aec=new _0x3af319(_0x362f64['locale']),_0x4335a1=_0x362f64['commands']['get']('uploadcare');return _0x219aec['bind']('isEnabled')['to'](_0x4335a1),_0x219aec['on']('execute',()=>{_0x4335a1['execute'](_0x40474b);}),_0x219aec;}['_createToolbarButton'](_0x2756ce){const {locale:_0x3141a3}=this['editor'],_0xef2d27=this['editor']['plugins']['get']('ImageInsertUI'),_0x2a315a=_0x2756ce[0x0],_0x1b9de2=this['_createButton'](_0x21dbfd,_0x2a315a['type']);return _0x1b9de2['icon']=_0x2a315a['icon'],_0x1b9de2['bind']('label')['to'](_0xef2d27,'isImageSelected',_0xdd58a1=>_(_0x3141a3,_0x2a315a['type'],_0xdd58a1?'Replace':'Insert')['text']),_0x1b9de2['tooltip']=!0x0,_0x1b9de2;}['_createDropdownButtons'](_0x43ad02){const {locale:_0x2f963b}=this['editor'],_0x2a9864=this['editor']['plugins']['get']('ImageInsertUI');return _0x43ad02['map'](_0x4ddb63=>{const _0x3bd7de=this['_createButton'](_0x21dbfd,_0x4ddb63['type']);return _0x3bd7de['withText']=!0x0,_0x3bd7de['icon']=_0x4ddb63['icon'],_0x3bd7de['bind']('label')['to'](_0x2a9864,'isImageSelected',_0x4bead5=>_(_0x2f963b,_0x4ddb63['type'],_0x4bead5?'Replace':'Insert')['text']),_0x3bd7de;});}['_createMenuBarButtons'](_0x301ebc){return _0x301ebc['map'](_0x15464a=>{const _0x2154a3=this['_createButton'](_0x49dc54,_0x15464a['type']);return _0x2154a3['icon']=_0x15464a['icon'],_0x2154a3['label']=_0x15464a['shortText'],_0x2154a3;});}}class F extends _0x636533{['focusTracker'];['focusCycler'];constructor(_0x2e0e84){super(_0x2e0e84),this['focusTracker']=new _0x3a08c9(),this['focusCycler']=new _0x4e40ac({'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(_0x4b1d8a,_0x5bfa18){super(_0x4b1d8a),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-'+_0x5bfa18}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x39f506,_0x474a93){const _0x2d155f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x115a2a=>_0x115a2a<=_0x474a93)['map'](_0x42a6c4=>_0x39f506['replace'](/\/$/,'')+'/-/resize/'+_0x42a6c4+'x/\x20'+_0x42a6c4+'w');return{'imageFallbackUrl':_0x39f506,'imageSources':[{'srcset':_0x2d155f['join'](',\x20'),'sizes':'(max-width:\x20'+_0x474a93+'px)\x20100vw,\x20'+_0x474a93+'px','type':'image/webp'}]};}function C(_0x1afb04,_0x1d0231,_0x15ef05){const _0x2fb4e3=_0x1afb04['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2fb4e3?parseInt(_0x2fb4e3[0x1],0xa):_0x1d0231,'height':_0x2fb4e3?parseInt(_0x2fb4e3[0x2],0xa):_0x15ef05};}function p(_0x1769cd,_0x1e2d10){const _0x294a1e=new(_0x58ef83())(),_0x174c19=_0x1769cd['plugins']['get']('ImageUtils'),_0xe00582=_0x1769cd['editing']['mapper']['toViewElement'](_0x1e2d10),_0x26522d=_0x174c19['findViewImgElement'](_0xe00582),_0x51b592=_0x1769cd['editing']['view']['domConverter']['viewToDom'](_0x26522d),_0x1bd502=_0x1e2d10['getAttribute']('width'),_0x54e101=_0x1e2d10['getAttribute']('height'),_0x300d42='image-processing';_0x1769cd['editing']['view']['change'](_0x2a23c1=>{_0x2a23c1['addClass'](_0x300d42,_0xe00582),_0x2a23c1['setStyle']('aspect-ratio',_0x1bd502+'/'+_0x54e101,_0x26522d);}),_0x294a1e['listenTo'](_0x51b592,'load',()=>{_0x294a1e['stopListening'](_0x51b592,'load'),_0x1769cd['editing']['view']['change'](_0x43639d=>{_0x43639d['removeClass'](_0x300d42,_0xe00582),_0x43639d['removeStyle']('aspect-ratio',_0x26522d);});});}function G(_0xb915de){if(Array['isArray'](_0xb915de)){const _0x1ec771=_0xb915de['map'](G);return _0x15d4d6=>_0x1ec771['some'](_0x185e16=>_0x185e16(_0x15d4d6));}if('origin'==_0xb915de){const _0x9ecc6e=_0x9ab865['window']['location']['origin'];return _0x321009=>new URL(_0x321009,_0x9ab865['document']['baseURI'])['origin']==_0x9ecc6e;}return'function'==typeof _0xb915de?_0xb915de:_0xb915de instanceof RegExp?_0x3efaf5=>!(!_0x3efaf5['match'](_0xb915de)&&!_0x3efaf5['replace'](/^https?:\/\//,'')['match'](_0xb915de)):()=>!0x1;}function S(_0x5d0d9d,_0x329fcd){return _0x55d6f2(_0x5d0d9d['target'])['includes'](_0x329fcd);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4a1c60(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x252170,_0x4c65d8,_0x2c3261){super(),this['_editor']=_0x252170,this['_editing']=_0x4c65d8,this['_dialog']=_0x252170['plugins']['get'](_0x187092),this['_api']=_0x4c65d8['ctxElement']['getAPI'](),this['_type']=_0x2c3261,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:_0x18958f,model:_0x591b3e}=this['_editor'],_0x4ec3aa=_0x591b3e['document']['selection']['getSelectedElement'](),_0x3559e1=_0x4ec3aa&&(_0x4ec3aa['is']('element','imageBlock')||_0x4ec3aa['is']('element','imageInline'));this['_formView']=new x(_0x18958f,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2e8149,'title':_(_0x18958f,this['_type'],_0x3559e1?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x189a1d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2457a5=>!S(_0x2457a5,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4f7c13}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4fa65f=>{const _0x20448d=_0x4f7c13['length'];for(const _0x49220a of _0x4f7c13){const _0x353542=_0x49220a===_0x4f7c13[_0x20448d-0x1],{cdnUrl:_0x32b52e,fileInfo:_0x4392d3}=_0x49220a;if(!_0x32b52e||!_0x4392d3)continue;const {width:_0x4ad3e6,height:_0x5ab400}=_0x4392d3['imageInfo'],_0x3d7417=C(_0x32b52e,_0x4ad3e6,_0x5ab400),_0x4d7ac3=k(_0x32b52e,_0x3d7417['width']),_0x17f58b={'id':_0x4392d3['uuid'],'type':'image','attributes':{'imageDimension':_0x3d7417,..._0x4d7ac3}};this['_insertAsset'](_0x17f58b,_0x353542,_0x4fa65f);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x563c02=>{'idle'===_0x563c02['detail']['status']&&!_0x563c02['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xcc2069,_0x30ff90,_0x52bd5b){const _0x23fe5b=this['_editor']['model']['document']['selection'],_0x224b5c=_0x23fe5b['getSelectedElement'](),_0x345e1b=!(!_0x224b5c||!_0x224b5c['is']('element','imageInline'));_0x52bd5b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xcc2069,_0x345e1b),_0x30ff90||_0x52bd5b['setSelection'](_0x23fe5b['getLastPosition']());}['_insertImage'](_0x4eb279,_0x2c472d){const _0x599fcc=this['_editor'],{imageDimension:_0x1b98b2,imageFallbackUrl:_0x2c206c,imageSources:_0x55b22d}=_0x4eb279['attributes'];_0x599fcc['execute']('insertImage',{'imageType':_0x2c472d?'imageInline':null,'source':{'uploadcareImageId':_0x4eb279['id'],'src':_0x2c206c,'sources':_0x55b22d,..._0x1b98b2}});}}class w extends _0x38b82b{['_editing'];['_controller']=null;static get['requires'](){return[_0x187092,o];}constructor(_0x47e541){super(_0x47e541),this['_editing']=_0x47e541['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x32dab2){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x32dab2);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x41ebcd,publicKey:_0x5a53c0,signal:_0x4674e8,onProgress:_0x10664b}){return _0x17bf1e(_0x41ebcd,{'publicKey':_0x5a53c0,'store':'auto','signal':_0x4674e8,'onProgress':_0x10664b});}static['getInfo'](_0xa20712,_0x43c90f){return _0x8443a4(_0xa20712,_0x43c90f);}}class f extends _0x18952f{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x374520,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x361a16=this['editor'];if(!!!_0x361a16['config']['get']('uploadcare'))return;_0x361a16['plugins']['get'](_0x374520)['createUploadAdapter']=_0x4ac13f=>new A(_0x4ac13f,_0x361a16),_0x361a16['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3c5df5,{imageElement:_0x51f28d,data:_0x53b14b})=>{_0x361a16['model']['change'](_0x591e75=>{_0x591e75['setAttribute']('uploadcareImageId',_0x53b14b['uploadcareImageId'],_0x51f28d);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x22df9c,_0xd897ab){this['loader']=_0x22df9c,this['editor']=_0xd897ab,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x23957e=this['editor']['config']['get']('uploadcare.pubkey'),_0x1a6c61=await this['loader']['file'];return j['upload']({'file':_0x1a6c61,'publicKey':_0x23957e,'signal':this['controller']['signal'],'onProgress':_0x30c258=>{_0x30c258&&_0x30c258['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x30c258['value']);}})['then'](async _0x28a68b=>{const {imageFallbackUrl:_0x27e7f2,imageSources:_0x38966f}=k(_0x28a68b['cdnUrl'],_0x28a68b['imageInfo']['width']);return{'uploadcareImageId':_0x28a68b['uuid'],'default':_0x27e7f2,'sources':_0x38966f};})['catch'](()=>{const _0x2c7474=t('Cannot\x20upload\x20file:')+('\x20'+_0x1a6c61['name']+'.');return Promise['reject'](_0x2c7474);});}['abort'](){this['controller']['abort']();}}class o extends _0x18952f{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x187092];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x291b3a){super(_0x291b3a),this['ucContextId']=_0x3227e0();}['init'](){const _0x4e4adf=this['editor'];_0x4e4adf['commands']['add']('uploadcare',new w(_0x4e4adf));}['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 _0x462cc4=_0x9ab865['document']['querySelector']('input[uploadcare-file-input]');_0x462cc4&&_0x462cc4['remove']();}),async function(_0x11b77a){const _0x3300b6=_0x48d738([0x46,0x4f,0x4e,0x65,0x30,0x42,0x50,0x72,0x44,0x61,0x52,0x55,0x41,0x34,0x79,0x78,0x73,0x32,0x54,0x67,0x75,0x48,0x74,0x4c,0x47,0x59,0x43,0x63,0x57,0x6d,0x6e,0x64,0x45,0x4a,0x33,0x31,0x6a,0x6f,0x36,0x39,0x56,0x49,0x71,0x51,0x6b,0x66,0x77,0x68,0x7a,0x70,0x4d,0x4b,0x5a,0x69,0x6c,0x62,0x76,0x35,0x38,0x58,0x37,0x53]),_0x3dd649=0x5340cb53,_0x26c123=0x5347a01b^_0x3dd649,_0x248d69=window[_0x48d738([0x44,0x61,0x74,0x65])][_0x48d738([0x6e,0x6f,0x77])](),_0x2406eb=_0x11b77a[_0x48d738([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x50095a=new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1262e7=>{_0x2406eb[_0x48d738([0x6f,0x6e,0x63,0x65])](_0x48d738([0x72,0x65,0x61,0x64,0x79]),_0x1262e7);}),_0x351134={[_0x48d738([0x6b,0x74,0x79])]:_0x48d738([0x45,0x43]),[_0x48d738([0x75,0x73,0x65])]:_0x48d738([0x73,0x69,0x67]),[_0x48d738([0x63,0x72,0x76])]:_0x48d738([0x50,0x2d,0x32,0x35,0x36]),[_0x48d738([0x78])]:_0x48d738([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]),[_0x48d738([0x79])]:_0x48d738([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]),[_0x48d738([0x61,0x6c,0x67])]:_0x48d738([0x45,0x53,0x32,0x35,0x36])},_0x25e016=_0x2406eb[_0x48d738([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x48d738([0x67,0x65,0x74])](_0x48d738([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x476858(){let _0x1c542c,_0x4fb249=null,_0xbe5597=null;try{if(_0x25e016==_0x48d738([0x47,0x50,0x4c]))return _0x48d738([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c542c=_0x41a674(),!_0x1c542c)return _0x48d738([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c542c[_0x48d738([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xbe5597=_0x432b2a(_0x1c542c[_0x48d738([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c542c[_0x48d738([0x6a,0x74,0x69])])),await _0x16bf16()?_0x36fa41()?_0x48c76b()?_0x48d738([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xa294c4()?(_0x1c542c[_0x48d738([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x48d738([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4fb249=_0x1c38d1(_0x48d738([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1c542c[_0x48d738([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x48d738([0x74,0x72,0x69,0x61,0x6c])&&(_0x4fb249=_0x1c38d1(_0x48d738([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x522cba()):_0x48d738([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x48d738([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x48d738([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x48d738([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x48c76b(){const _0x169ea1=[_0x48d738([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x48d738([0x74,0x72,0x69,0x61,0x6c])][_0x48d738([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c542c[_0x48d738([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x248d69/0x3e8:0xe10*_0x26c123;return _0x1c542c[_0x48d738([0x65,0x78,0x70])]<_0x169ea1;}function _0x36fa41(){const _0x36e337=_0x1c542c[_0x48d738([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x36e337&&(!!_0x36e337[_0x48d738([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48d738([0x2a]))||!!_0x36e337[_0x48d738([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48d738([0x55,0x50,0x4c,0x43])));}function _0xa294c4(){const _0x2b52a0=_0x1c542c[_0x48d738([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2b52a0||0x0==_0x2b52a0[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x359c21}=new URL(window[_0x48d738([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2b52a0[_0x48d738([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359c21))return!0x0;const _0x4c5d60=_0x359c21[_0x48d738([0x73,0x70,0x6c,0x69,0x74])](_0x48d738([0x2e]));return _0x2b52a0[_0x48d738([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x79a1a4=>_0x79a1a4[_0x48d738([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48d738([0x2a])))[_0x48d738([0x6d,0x61,0x70])](_0x18593b=>_0x18593b[_0x48d738([0x73,0x70,0x6c,0x69,0x74])](_0x48d738([0x2e])))[_0x48d738([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xc787d5=>_0xc787d5[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4c5d60[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x48d738([0x6d,0x61,0x70])](_0x5bd42e=>Array(_0x4c5d60[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5bd42e[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x48d738([0x66,0x69,0x6c,0x6c])](_0x5bd42e[0x0]===_0x48d738([0x2a])?_0x48d738([0x2a]):'')[_0x48d738([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5bd42e))[_0x48d738([0x73,0x6f,0x6d,0x65])](_0x13d47e=>_0x4c5d60[_0x48d738([0x65,0x76,0x65,0x72,0x79])]((_0x4ef4f5,_0x41a0c8)=>_0x13d47e[_0x41a0c8]===_0x4ef4f5||_0x13d47e[_0x41a0c8]===_0x48d738([0x2a])));}function _0x522cba(){return _0x4fb249&&_0xbe5597?new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10d234,_0x38e746)=>{_0x4fb249[_0x48d738([0x74,0x68,0x65,0x6e])](_0x10d234,_0x38e746),_0xbe5597[_0x48d738([0x74,0x68,0x65,0x6e])](_0x8b4988=>{_0x8b4988!=_0x48d738([0x56,0x61,0x6c,0x69,0x64])&&_0x10d234(_0x8b4988);},_0x38e746);}):_0x4fb249||_0xbe5597||_0x48d738([0x56,0x61,0x6c,0x69,0x64]);}}function _0x432b2a(_0x55353d,_0x1cacc2){return new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x271e87=>{if(_0x707032())return _0x271e87(_0x48d738([0x56,0x61,0x6c,0x69,0x64]));_0x2525de(),_0x2406eb[_0x48d738([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x48d738([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5792d8=!0x1;const _0x11e595=_0x3227e0();function _0x45e332(_0x525ae7){return!!_0x525ae7&&(typeof _0x525ae7===_0x48d738([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x525ae7===_0x48d738([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x525ae7[_0x48d738([0x74,0x68,0x65,0x6e])]===_0x48d738([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x525ae7[_0x48d738([0x63,0x61,0x74,0x63,0x68])]===_0x48d738([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x16eb67(_0x7d3197){_0x23a587(_0x7d3197)[_0x48d738([0x74,0x68,0x65,0x6e])](_0x54538e=>{if(!_0x54538e||_0x54538e[_0x48d738([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x48d738([0x6f,0x6b]))return _0x48d738([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b217b(_0xee2a81(_0x11e595+_0x1cacc2))!=_0x54538e[_0x48d738([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x48d738([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x48d738([0x56,0x61,0x6c,0x69,0x64]);})[_0x48d738([0x74,0x68,0x65,0x6e])](_0x586308=>(_0x4b6631(),_0x586308),()=>{const _0x26e074=_0x2b40f8();return null==_0x26e074?(_0x4b6631(),_0x48d738([0x56,0x61,0x6c,0x69,0x64])):_0x48d738(_0x248d69-_0x26e074>(0x774c4f53^_0x3dd649)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x48d738([0x74,0x68,0x65,0x6e])](_0x271e87)[_0x48d738([0x63,0x61,0x74,0x63,0x68])](()=>{_0x271e87(_0x48d738([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x193d45=0x537625d3^_0x3dd649;function _0x4b6631(){const _0x26fc17=_0x48d738([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b217b(_0xee2a81(_0x55353d)),_0x8c5d2a=_0x15dff6(_0x1b217b(window[_0x48d738([0x4d,0x61,0x74,0x68])][_0x48d738([0x63,0x65,0x69,0x6c])](_0x248d69/_0x193d45)));window[_0x48d738([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x48d738([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26fc17,_0x8c5d2a);}function _0x2b40f8(){const _0x4bf77c=_0x48d738([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b217b(_0xee2a81(_0x55353d)),_0x4d8e71=window[_0x48d738([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x48d738([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4bf77c);return _0x4d8e71?window[_0x48d738([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15dff6(_0x4d8e71),0x10)*_0x193d45:null;}function _0x23a587(_0x1fabff){return new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x468b7c,_0x22fc68)=>{_0x1fabff[_0x48d738([0x74,0x68,0x65,0x6e])](_0x468b7c,_0x22fc68),window[_0x48d738([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22fc68,0x53411f93^_0x3dd649);});}}_0x2406eb[_0x48d738([0x6f,0x6e])](_0x48d738([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1c5056,_0xcb7fa8)=>{if(_0xcb7fa8[0x0]!=_0x55353d)return _0x271e87(_0x48d738([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xcb7fa8[0x1]={..._0xcb7fa8[0x1],[_0x48d738([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x11e595};},{[_0x48d738([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x48d738([0x68,0x69,0x67,0x68])}),_0x2406eb[_0x48d738([0x6f,0x6e])](_0x48d738([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3761e1=>{_0x45e332(_0x3761e1[_0x48d738([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5792d8=!0x0,_0x16eb67(_0x3761e1[_0x48d738([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x48d738([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x48d738([0x6c,0x6f,0x77])}),_0x50095a[_0x48d738([0x74,0x68,0x65,0x6e])](()=>{_0x5792d8||_0x271e87(_0x48d738([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x707032(){return _0x2406eb[_0x48d738([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x48d738([0x76,0x69,0x65,0x77])][_0x48d738([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x48d738([0x61,0x75,0x74,0x6f]);}function _0x2525de(){_0x2406eb[_0x48d738([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x48d738([0x76,0x69,0x65,0x77])][_0x48d738([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x48d738([0x61,0x75,0x74,0x6f]);}}function _0x1c38d1(_0x1e9d3a){const _0x1e2fc0=[new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x417ec4=>setTimeout(_0x417ec4,0x5349f59f^_0x3dd649)),_0x50095a[_0x48d738([0x74,0x68,0x65,0x6e])](()=>new window[(_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x436a85=>{let _0x40cab=0x0;_0x2406eb[_0x48d738([0x6d,0x6f,0x64,0x65,0x6c])][_0x48d738([0x6f,0x6e])](_0x48d738([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x42111b,_0x325daf)=>{_0x325daf[0x0][_0x48d738([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x40cab++,_0x40cab==(0x5340caab^_0x3dd649)&&(_0x436a85(),_0x42111b[_0x48d738([0x6f,0x66,0x66])]());});}))];return window[_0x48d738([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x48d738([0x72,0x61,0x63,0x65])](_0x1e2fc0)[_0x48d738([0x74,0x68,0x65,0x6e])](()=>_0x1e9d3a);}async function _0x562282(){await _0x50095a,_0x2406eb[_0x48d738([0x6d,0x6f,0x64,0x65,0x6c])][_0x48d738([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d7e90,_0x2406eb[_0x48d738([0x6d,0x6f,0x64,0x65,0x6c])][_0x48d738([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d7e90,_0x2406eb[_0x48d738([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x48d738([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3539be(_0x2f05b0){const _0x1e94d6=_0x251703();_0x2406eb[_0x1e94d6]=_0x48d738([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f05b0,_0x2f05b0!=_0x48d738([0x56,0x61,0x6c,0x69,0x64])&&_0x562282();}function _0x251703(){const _0x59c85f=window[_0x48d738([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x48d738([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x48d738([0x6e,0x6f,0x77])]())[_0x48d738([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x48d738([0x2e]),'');let _0x3791c3=_0x48d738([0x46]);for(let _0xd68708=0x0;_0xd68708<_0x59c85f[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd68708+=0x2){let _0x4d9f5e=window[_0x48d738([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59c85f[_0x48d738([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd68708,_0xd68708+0x2));_0x4d9f5e>=_0x3300b6[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4d9f5e-=_0x3300b6[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3791c3+=_0x3300b6[_0x4d9f5e];}return _0x3791c3;}function _0x41a674(){const _0x8520a6=_0x25e016[_0x48d738([0x73,0x70,0x6c,0x69,0x74])](_0x48d738([0x2e]));if(0x3!=_0x8520a6[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x7cafbc(_0x8520a6[0x1]);function _0x7cafbc(_0x91ab69){const _0x32c1be=_0x49eebd(_0x91ab69);return _0x32c1be&&_0x5ad242()?_0x32c1be:null;function _0x5ad242(){const _0x259157=_0x32c1be[_0x48d738([0x6a,0x74,0x69])],_0x119ca2=window[_0x48d738([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x259157[_0x48d738([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x259157[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4f43de={..._0x32c1be,[_0x48d738([0x6a,0x74,0x69])]:_0x259157[_0x48d738([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x259157[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4f43de[_0x48d738([0x76,0x63])],_0xee2a81(_0x4f43de)==_0x119ca2;}}}async function _0x16bf16(){let _0x513c13=!0x0;try{const _0x2f7d6f=_0x25e016[_0x48d738([0x73,0x70,0x6c,0x69,0x74])](_0x48d738([0x2e])),[_0x216aba,_0x345dac,_0x23f410]=_0x2f7d6f;return _0x32dcd4(_0x216aba),await _0x10e65a(_0x216aba,_0x345dac,_0x23f410),_0x513c13;}catch{return!0x1;}function _0x32dcd4(_0x2fbb3e){const _0x4b5036=_0x49eebd(_0x2fbb3e);_0x4b5036&&_0x4b5036[_0x48d738([0x61,0x6c,0x67])]==_0x48d738([0x45,0x53,0x32,0x35,0x36])||(_0x513c13=!0x1);}async function _0x10e65a(_0x3e6ac1,_0x4831a8,_0x3ab223){const _0x299380=window[_0x48d738([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x48d738([0x66,0x72,0x6f,0x6d])](_0x393abe(_0x3ab223),_0x5b983b=>_0x5b983b[_0x48d738([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5e3004=new window[(_0x48d738([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x48d738([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3e6ac1+_0x48d738([0x2e])+_0x4831a8),_0x5aaf3e=window[_0x48d738([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x48d738([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5aaf3e)return;const _0x3a81a8=await _0x5aaf3e[_0x48d738([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x48d738([0x6a,0x77,0x6b]),_0x351134,{[_0x48d738([0x6e,0x61,0x6d,0x65])]:_0x48d738([0x45,0x43,0x44,0x53,0x41]),[_0x48d738([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x48d738([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x48d738([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5aaf3e[_0x48d738([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x48d738([0x6e,0x61,0x6d,0x65])]:_0x48d738([0x45,0x43,0x44,0x53,0x41]),[_0x48d738([0x68,0x61,0x73,0x68])]:{[_0x48d738([0x6e,0x61,0x6d,0x65])]:_0x48d738([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3a81a8,_0x299380,_0x5e3004)||(_0x513c13=!0x1);}}function _0x49eebd(_0x335455){return _0x335455[_0x48d738([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x48d738([0x65,0x79]))?JSON[_0x48d738([0x70,0x61,0x72,0x73,0x65])](_0x393abe(_0x335455)):null;}function _0x393abe(_0x1342e1){return window[_0x48d738([0x61,0x74,0x6f,0x62])](_0x1342e1[_0x48d738([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x48d738([0x2b]))[_0x48d738([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x48d738([0x2f])));}function _0xee2a81(_0x5d763e){let _0x4c3830=0x1505;function _0x204775(_0x4ff8ab){for(let _0x4f6a5d=0x0;_0x4f6a5d<_0x4ff8ab[_0x48d738([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4f6a5d++){const _0x55b8ee=_0x4ff8ab[_0x48d738([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4f6a5d);_0x4c3830=(_0x4c3830<<0x5)+_0x4c3830+_0x55b8ee,_0x4c3830&=_0x4c3830;}}function _0x2e04e5(_0xc54862){Array[_0x48d738([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xc54862)?_0xc54862[_0x48d738([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2e04e5):_0xc54862&&typeof _0xc54862==_0x48d738([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x48d738([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xc54862)[_0x48d738([0x73,0x6f,0x72,0x74])]()[_0x48d738([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2e2023,_0x158fd7])=>{_0x204775(_0x2e2023),_0x2e04e5(_0x158fd7);}):_0x204775(window[_0x48d738([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xc54862));}return _0x2e04e5(_0x5d763e),_0x4c3830>>>0x0;}function _0x1b217b(_0x4a656a){return _0x4a656a[_0x48d738([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x48d738([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x48d738([0x30]));}function _0x15dff6(_0x48f1b3){return _0x48f1b3[_0x48d738([0x73,0x70,0x6c,0x69,0x74])]('')[_0x48d738([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x48d738([0x6a,0x6f,0x69,0x6e])]('');}function _0x1d7e90(){}function _0x48d738(_0x357e9e){return _0x357e9e['map'](_0x93b936=>String['fromCharCode'](_0x93b936))['join']('');}_0x3539be(await _0x476858());}(this);}['_initSchema'](){const _0x3dc867=this['editor']['model']['schema'];_0x3dc867['isRegistered']('imageBlock')&&_0x3dc867['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3dc867['isRegistered']('imageInline')&&_0x3dc867['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1befb7=this['editor'];_0x1befb7['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1befb7['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2a56c0=>_0x2a56c0['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4ca6ea=_0x1befb7['commands']['get']('replaceImageSource');_0x4ca6ea&&this['listenTo'](_0x4ca6ea,'cleanupImage',(_0x99917a,[_0x48268f,_0x2ce214])=>{_0x48268f['removeAttribute']('uploadcareImageId',_0x2ce214);});}['_initConfig'](){const _0x4acb32=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2eda96=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x211b53(_0x9ab865['document'],'uc-config',{..._0x4acb32,'pubkey':_0x2eda96,'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']=_0x198b1a=>{if('closeMax'==_0x198b1a)return'#uc-icon-arrow-down';},_0x9ab865['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x211b53(_0x9ab865['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x9ab865['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x21abe3=this['editor']['commands']['get']('insertImage');_0x21abe3&&this['listenTo'](_0x21abe3,'execute',()=>{const _0x432abd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x432abd&&_0x432abd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x432abd);});});const _0x2a45e3=this['editor']['commands']['get']('uploadcareImageReplace');_0x2a45e3&&this['listenTo'](_0x2a45e3,'execute',()=>{const _0x22d752=this['editor']['model']['document']['selection']['getSelectedElement']();_0x22d752&&_0x22d752['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x22d752);});});}}class tt extends _0x18952f{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10f746){super(_0x10f746),_0x10f746['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x59180e['defineComponents'](_0x59180e);}}class ii extends _0x636533{constructor(_0x1b9977){super(_0x1b9977);const t=_0x1b9977['t'],_0x428844=this['bindTemplate'],_0x1dfac2=new _0x77302f();_0x1dfac2['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':[_0x1dfac2,{'text':_0x428844['to']('imageUploadProgress',_0x502fc4=>t('Loading\x20image...')+'\x20('+(_0x502fc4||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 _0x636533{constructor(_0x3c008b){super(_0x3c008b);const t=_0x3c008b['t'];this['set']('errorType',null);const _0x4a2898=new _0x21dbfd(_0x3c008b);_0x4a2898['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4a2898['withText']=!0x0,_0x4a2898['class']='ck-button-action',_0x4a2898['on']('execute',()=>{this['fire']('retry');}),_0x4a2898['bind']('isVisible')['to'](this,'errorType',_0x35ad90=>'NotFound'!==_0x35ad90);const _0x3366dc=new _0x450025();_0x3366dc['content']=_0x44ace3,_0x3366dc['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x18b335=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':[_0x3366dc,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x18b335['to']('errorType',_0x48e84f=>t('NotFound'!==_0x48e84f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4a2898]},{'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 _0x636533{constructor(_0x510da3,_0x96163e){super(_0x510da3);const _0x3ca51d=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x96163e,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3ca51d['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x45e8c6,_0x21193a,_0x71257e){super(_0x45e8c6),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x45e8c6),this['_errorView']=new ti(_0x45e8c6),this['_editingView']=new ei(_0x45e8c6,_0x71257e),this['_focusableView']=new _0x636533(_0x45e8c6),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x21193a),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'],_0x16d416=>{this['_addUploadcareImageEditorListeners'](_0x16d416);});}),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'](_0x5cea62,_0x317843){const _0x23d352='uc-cloud-image-editor',_0x27494c=_0x5cea62['querySelector'](_0x23d352);if(_0x27494c)return _0x317843(_0x27494c);const _0x552a1e=new MutationObserver(_0x46803d=>{const _0x44ddb4=_0x46803d['filter'](_0x134e38=>_0x134e38['target']===_0x5cea62&&_0x134e38['addedNodes']['length']>0x0&&_0x134e38['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x23d352);_0x44ddb4['length']&&(_0x552a1e['disconnect'](),_0x317843(_0x44ddb4[0x0]['addedNodes'][0x0]));});_0x552a1e['observe'](_0x5cea62,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1bff9){_0x1bff9['addEventListener']('apply',_0x221668=>{this['fire']('apply',{'imageSrc':_0x221668['detail']['cdnUrl']});}),_0x1bff9['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4a1c60(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2c4bbb,_0x62187e,_0x5effd6){super(),this['_editor']=_0x2c4bbb,this['_dialog']=_0x62187e,this['_imageElement']=_0x5effd6,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 _0x5cc5c9=this['_imageElement'],_0x41b775=_0x5cc5c9['getAttribute']('uploadcareImageId'),_0x35d355=_0x5cc5c9['getAttribute']('src');if(_0x41b775)await this['_loadImageInfo'](_0x41b775,_0x35d355);else{if(this['_imageCache']['has'](_0x35d355)){const _0x182dd0=this['_imageCache']['get'](_0x35d355);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x182dd0['url'],this['imageDimension']=_0x182dd0['dimension'],this['imageId']=_0x182dd0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x402d08}=this['_editor'],t=_0x402d08['t'],_0x1f7c1=new X(_0x402d08,this['imageStatus'],this['_attributes']);_0x1f7c1['bind']('status')['to'](this,'imageStatus'),_0x1f7c1['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1f7c1['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1f7c1['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1f7c1,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3333a3,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1f7c1,'position':_0x189a1d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1f7c1['focus']();},'onHide':()=>{_0x1f7c1['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4a2e01=>!S(_0x4a2e01,_0x1f7c1['element'])}});}['_loadImageInfo'](_0x33918a,_0x4ef9cf){return j['getInfo'](_0x33918a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3bf306=>{const {width:_0x46eade,height:_0x1a4317}=_0x3bf306['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ef9cf,this['imageDimension']={'width':_0x46eade,'height':_0x1a4317},this['imageId']=_0x33918a;})['catch'](_0x47be79=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x47be79['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2c0583,_0x24cce0){return this['_getImageAsFile'](_0x2c0583)['then'](_0x2a7234=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x24cce0['signal'],'file':_0x2a7234,'onProgress':_0x5c50a2=>{_0x5c50a2&&_0x5c50a2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5c50a2['value']));}}))['then'](_0x3f9ff4=>{const {width:_0x41afb6,height:_0x41bb22}=_0x3f9ff4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f9ff4['cdnUrl'],this['imageDimension']={'width':_0x41afb6,'height':_0x41bb22},this['imageId']=_0x3f9ff4['uuid'],this['imageUploadProgress']=null;const _0x5c134b=_0x2c0583['getAttribute']('src');this['_imageCache']['set'](_0x5c134b,{'id':_0x3f9ff4['uuid'],'url':_0x3f9ff4['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2c551b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2c551b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1c8646,_0x2a1acc){_0x1c8646['on']('apply',(_0x3c4477,_0x88fdc)=>{this['_replaceImage'](_0x2a1acc,_0x88fdc['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1c8646['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1c8646['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x564e2e,_0xd930f,_0x40fb51){const _0x110476=this['_editor'],{width:_0x170692,height:_0xff909}=C(_0xd930f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x190087,imageSources:_0x19950c}=k(_0xd930f,_0x170692);_0x110476['model']['change'](_0x876c97=>{if('$graveyard'===_0x564e2e['root']['rootName']){_0x110476['execute']('insertImage',{'imageType':_0x564e2e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x564e2e['getAttributes']()),'uploadcareImageId':_0x40fb51,'src':_0x190087,'sources':_0x19950c,'width':_0x170692,'height':_0xff909}});const _0xb6b568=_0x564e2e['getChildren']();_0x564e2e=_0x110476['model']['document']['selection']['getSelectedElement']();for(const _0x3f52c0 of _0xb6b568)_0x876c97['append'](_0x876c97['cloneElement'](_0x3f52c0),_0x564e2e);}else _0x876c97['setSelection'](_0x564e2e,'on'),_0x110476['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x564e2e['getAttributes']()),'uploadcareImageId':_0x40fb51,'src':_0x190087,'sources':_0x19950c,'width':_0x170692,'height':_0xff909},_0x564e2e);_0x876c97['setSelection'](_0x564e2e,'on');});}async['_getImageAsFile'](_0x4d7406){const _0x16a6bf=_0x9ab865['window'],_0x5cbdf2=_0x9ab865['document']['location']['href'],_0x36277b=new _0x16a6bf['URL'](_0x4d7406['getAttribute']('src'),_0x5cbdf2);if('data:'===_0x36277b['protocol']){const _0x79443d=_0x36277b['href']['split'](','),_0x3e8422=_0x79443d[0x0]['match'](/:(.*?);/)[0x1],_0x40dfbb=_0x3e8422['split']('/')[0x1],_0x4949ce=_0x16a6bf['atob'](_0x79443d[_0x79443d['length']-0x1]);let _0xfd2a6b=_0x4949ce['length'];const _0x416f3b=new _0x16a6bf['Uint8Array'](_0xfd2a6b);for(;_0xfd2a6b--;)_0x416f3b[_0xfd2a6b]=_0x4949ce['charCodeAt'](_0xfd2a6b);return new _0x16a6bf['File']([_0x416f3b],'image.'+_0x40dfbb,{'type':_0x3e8422});}const _0x2ca45b=_0x36277b['href']['split']('/'),_0x5c13b4=_0x2ca45b[_0x2ca45b['length']-0x1],_0x46afad=_0x5c13b4['split']('.')[0x1];return _0x16a6bf['fetch'](_0x36277b['href'])['then'](_0xac95d2=>_0xac95d2['clone']()['blob']())['then'](_0x3641bd=>new _0x16a6bf['File']([_0x3641bd],_0x5c13b4,{'type':'image/'+_0x46afad}));}}class O extends _0x38b82b{['imageEditController'];static get['requires'](){return[_0x187092];}['_isEditable'];constructor(_0x5b6df8){super(_0x5b6df8),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2a173b){const _0x1352d3=G(_0x2a173b);return _0x2477ac=>!(!_0x2477ac||!_0x2477ac['is']('element','imageBlock')&&!_0x2477ac['is']('element','imageInline'))&&(!!_0x2477ac['hasAttribute']('uploadcareImageId')||!!_0x2477ac['hasAttribute']('src')&&_0x1352d3(_0x2477ac['getAttribute']('src')));}(_0x5b6df8['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x54db2f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x54db2f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x27259d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x27259d&&(_0x27259d['is']('element','imageBlock')||_0x27259d['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x187092),_0x27259d),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x38b82b{['refresh'](){const _0x1842bc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1842bc&&(_0x1842bc['is']('element','imageBlock')||_0x1842bc['is']('element','imageInline')));}['execute'](_0x5c94a5){const _0x3ef2db=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2a9aca=>{_0x2a9aca['setAttributes'](_0x5c94a5,_0x3ef2db),_0x2a9aca['removeAttribute']('srcset',_0x3ef2db),_0x2a9aca['removeAttribute']('sizes',_0x3ef2db);});}}class m extends _0x18952f{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x46bd46,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3c683b}=this;_0x3c683b['commands']['add']('uploadcareImageEdit',new O(_0x3c683b)),_0x3c683b['commands']['add']('uploadcareImageReplace',new R(_0x3c683b));}}class g extends _0x18952f{['_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 _0x2b3386=this['editor'];_0x2b3386['ui']['componentFactory']['add']('uploadcareImageEdit',_0x30a3cf=>{const _0x312f41=_0x2b3386['commands']['get']('uploadcareImageEdit'),_0x259430=new _0x21dbfd(_0x30a3cf),t=_0x30a3cf['t'];return _0x259430['set']({'icon':_0x3333a3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x259430['bind']('isEnabled')['to'](_0x312f41),_0x259430['bind']('isOn')['to'](_0x312f41,'isActive'),this['listenTo'](_0x259430,'execute',()=>{_0x2b3386['execute']('uploadcareImageEdit'),_0x2b3386['editing']['view']['focus']();}),_0x259430;}),this['_initConfig']();}['_initConfig'](){const _0x243200=_0x211b53(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x243200),this['listenTo'](this['editor'],'destroy',()=>{_0x243200['remove']();});}}class et extends _0x18952f{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250620.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250620.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250620.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20250620.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250620.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250620.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250620.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250620.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20250620.0",
|
|
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
|
-
const _0x5a7dd5=_0x5dc1;(function(_0x1bd708,_0x5cdbaf){const _0x59a980=_0x5dc1,_0x544da3=_0x1bd708();while(!![]){try{const _0xe7f43=-parseInt(_0x59a980(0x1a4))/0x1+parseInt(_0x59a980(0x17c))/0x2+parseInt(_0x59a980(0x19c))/0x3*(-parseInt(_0x59a980(0x178))/0x4)+parseInt(_0x59a980(0x183))/0x5+parseInt(_0x59a980(0x168))/0x6*(-parseInt(_0x59a980(0x195))/0x7)+parseInt(_0x59a980(0x1a3))/0x8*(parseInt(_0x59a980(0x18d))/0x9)+parseInt(_0x59a980(0x170))/0xa;if(_0xe7f43===_0x5cdbaf)break;else _0x544da3['push'](_0x544da3['shift']());}catch(_0x3f0b70){_0x544da3['push'](_0x544da3['shift']());}}}(_0xe0c8,0x65e32));import{Plugin as _0x272503}from'ckeditor5/src/core.js';function _0x5dc1(_0x43d2bc,_0x4afc10){const _0xe0c83b=_0xe0c8();return _0x5dc1=function(_0x5dc14,_0x5d4486){_0x5dc14=_0x5dc14-0x15e;let _0x7cb58f=_0xe0c83b[_0x5dc14];return _0x7cb58f;},_0x5dc1(_0x43d2bc,_0x4afc10);}function _0xe0c8(){const _0x4c9fb1=['extend','\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','getAttribute','1325088uhIScl','isOfficialPlugin','editing','input[uploadcare-file-input]','schema','iconHrefResolver','imageBlock','1399370HmSKoR','_ctxElement','cleanupImage','imageInline','_initConfig','editor','requires','once','init','uploadcareImageId','9DwNwhx','uc-upload-ctx-provider','body','afterInit','isPremiumPlugin','render','#uc-icon-arrow-down','data-uc-image-id','7903eWrMaa','PictureEditing','ctxElement','true','downcast','join','_configElement','1857kASNmj','document','uc-config','_initConversion','insertImage','uploadcare.pubkey','attributeToAttribute','307112tsnMwT','774398TlYMTn','getSelectedElement','configElement','destroy','replaceImageSource','map','add','pluginName','ucContextId','view','_initCtx','uploadcareImageReplace','for','conversion','uploadcare.uploader','href','uploadcare','_initImageProcessingIndicator','model','locale','fromCharCode','config','querySelector','remove','UploadcareEditing','2808tcLoLE','isRegistered','commands','upcast','contentLanguage','selection','uploader-','get','13347710WRviWW','listenTo','closeMax','_initSchema','appendChild','removeAttribute','execute','elementToAttribute','3848iKJMue'];_0xe0c8=function(){return _0x4c9fb1;};return _0xe0c8();}import{Dialog as _0xc10aa}from'ckeditor5/src/ui.js';import{createElement as _0x84b03b,global as _0x46391f,uid as _0x1ace9c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x36cbef}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x53e7be}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x10ad1b}from'./utils/editingutils.js';export class UploadcareEditing extends _0x272503{[_0x5a7dd5(0x19b)]=null;[_0x5a7dd5(0x184)]=null;static get[_0x5a7dd5(0x1ab)](){const _0x69944f=_0x5a7dd5;return _0x69944f(0x167);}static get[_0x5a7dd5(0x189)](){const _0x4f9db0=_0x5a7dd5;return[_0x4f9db0(0x196),_0x53e7be,_0xc10aa];}static get[_0x5a7dd5(0x17d)](){return!0x0;}static get[_0x5a7dd5(0x191)](){return!0x0;}[_0x5a7dd5(0x1ac)];get[_0x5a7dd5(0x1a6)](){const _0x108017=_0x5a7dd5;return this[_0x108017(0x19b)];}get[_0x5a7dd5(0x197)](){const _0x1c375a=_0x5a7dd5;return this[_0x1c375a(0x184)];}constructor(_0x49a582){const _0x46ab97=_0x5a7dd5;super(_0x49a582),this[_0x46ab97(0x1ac)]=_0x1ace9c();}[_0x5a7dd5(0x18b)](){const _0x2df1d5=_0x5a7dd5,_0x423aee=this[_0x2df1d5(0x188)];_0x423aee[_0x2df1d5(0x16a)][_0x2df1d5(0x1aa)](_0x2df1d5(0x15f),new _0x36cbef(_0x423aee));}[_0x5a7dd5(0x190)](){const _0x13960b=_0x5a7dd5;this[_0x13960b(0x173)](),this[_0x13960b(0x19f)](),this[_0x13960b(0x187)](),this[_0x13960b(0x1ae)](),this[_0x13960b(0x160)](),this[_0x13960b(0x171)](this[_0x13960b(0x188)],_0x13960b(0x1a7),()=>{const _0x32e5bf=_0x13960b;this[_0x32e5bf(0x19b)]&&(this[_0x32e5bf(0x19b)][_0x32e5bf(0x166)](),this[_0x32e5bf(0x19b)]=null),this[_0x32e5bf(0x184)]&&(this[_0x32e5bf(0x184)][_0x32e5bf(0x166)](),this[_0x32e5bf(0x184)]=null);const _0xa9a1f=_0x46391f[_0x32e5bf(0x19d)][_0x32e5bf(0x165)](_0x32e5bf(0x17f));_0xa9a1f&&_0xa9a1f[_0x32e5bf(0x166)]();}),async function(_0xa09db6){const _0x4edc2c=_0x54ce0e([0x53,0x4a,0x71,0x63,0x57,0x72,0x58,0x6a,0x56,0x79,0x45,0x70,0x4d,0x6f,0x39,0x67,0x61,0x69,0x48,0x64,0x73,0x31,0x33,0x6d,0x32,0x51,0x77,0x75,0x66,0x5a,0x50,0x38,0x55,0x4b,0x65,0x59,0x4e,0x68,0x52,0x62,0x37,0x44,0x54,0x4f,0x6b,0x47,0x6e,0x43,0x30,0x46,0x76,0x6c,0x34,0x49,0x42,0x78,0x41,0x4c,0x36,0x35,0x74,0x7a]),_0x1406ac=0x667c0cb1,_0x28e463=0x667b67a9^_0x1406ac,_0x18556f=window[_0x54ce0e([0x44,0x61,0x74,0x65])][_0x54ce0e([0x6e,0x6f,0x77])](),_0x1874b6=_0xa09db6[_0x54ce0e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x51e4ea=new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b8652=>{_0x1874b6[_0x54ce0e([0x6f,0x6e,0x63,0x65])](_0x54ce0e([0x72,0x65,0x61,0x64,0x79]),_0x3b8652);}),_0x3c74fa={[_0x54ce0e([0x6b,0x74,0x79])]:_0x54ce0e([0x45,0x43]),[_0x54ce0e([0x75,0x73,0x65])]:_0x54ce0e([0x73,0x69,0x67]),[_0x54ce0e([0x63,0x72,0x76])]:_0x54ce0e([0x50,0x2d,0x32,0x35,0x36]),[_0x54ce0e([0x78])]:_0x54ce0e([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]),[_0x54ce0e([0x79])]:_0x54ce0e([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]),[_0x54ce0e([0x61,0x6c,0x67])]:_0x54ce0e([0x45,0x53,0x32,0x35,0x36])},_0x110fbe=_0x1874b6[_0x54ce0e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x54ce0e([0x67,0x65,0x74])](_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b83c6(){let _0xfc02fd,_0x1051f3=null,_0x3f43b8=null;try{if(_0x110fbe==_0x54ce0e([0x47,0x50,0x4c]))return _0x54ce0e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xfc02fd=_0x1aad2f(),!_0xfc02fd)return _0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xfc02fd[_0x54ce0e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f43b8=_0x28d911(_0xfc02fd[_0x54ce0e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xfc02fd[_0x54ce0e([0x6a,0x74,0x69])])),await _0x1d49ac()?_0x208176()?_0x5eeaeb()?_0x54ce0e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x11885c()?(_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54ce0e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1051f3=_0x62721c(_0x54ce0e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54ce0e([0x74,0x72,0x69,0x61,0x6c])&&(_0x1051f3=_0x62721c(_0x54ce0e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x13d78c()):_0x54ce0e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x54ce0e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5eeaeb(){const _0x1d972a=[_0x54ce0e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x54ce0e([0x74,0x72,0x69,0x61,0x6c])][_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18556f/0x3e8:0xe10*_0x28e463;return _0xfc02fd[_0x54ce0e([0x65,0x78,0x70])]<_0x1d972a;}function _0x208176(){const _0x556374=_0xfc02fd[_0x54ce0e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x556374&&(!!_0x556374[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x2a]))||!!_0x556374[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x55,0x50,0x4c,0x43])));}function _0x11885c(){const _0x4e9b93=_0x5dc1,_0x1f9a2e=_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f9a2e||0x0==_0x1f9a2e[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5d2892}=new URL(window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4e9b93(0x15e)]);if(_0x1f9a2e[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d2892))return!0x0;const _0x2044ed=_0x5d2892[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e]));return _0x1f9a2e[_0x54ce0e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5f3444=>_0x5f3444[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x2a])))[_0x54ce0e([0x6d,0x61,0x70])](_0x36c17e=>_0x36c17e[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e])))[_0x54ce0e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x389fa0=>_0x389fa0[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2044ed[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54ce0e([0x6d,0x61,0x70])](_0x2111ce=>Array(_0x2044ed[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2111ce[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54ce0e([0x66,0x69,0x6c,0x6c])](_0x2111ce[0x0]===_0x54ce0e([0x2a])?_0x54ce0e([0x2a]):'')[_0x54ce0e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2111ce))[_0x54ce0e([0x73,0x6f,0x6d,0x65])](_0x12a855=>_0x2044ed[_0x54ce0e([0x65,0x76,0x65,0x72,0x79])]((_0x1a360d,_0x47e1d6)=>_0x12a855[_0x47e1d6]===_0x1a360d||_0x12a855[_0x47e1d6]===_0x54ce0e([0x2a])));}function _0x13d78c(){return _0x1051f3&&_0x3f43b8?new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42a728,_0x10164a)=>{_0x1051f3[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x42a728,_0x10164a),_0x3f43b8[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x4beb6c=>{_0x4beb6c!=_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])&&_0x42a728(_0x4beb6c);},_0x10164a);}):_0x1051f3||_0x3f43b8||_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28d911(_0x2a8275,_0x41e2cc){return new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e7801=>{if(_0x2e1465())return _0x5e7801(_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]));_0x1ec411(),_0x1874b6[_0x54ce0e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x523f77=!0x1;const _0x44ebcc=_0x1ace9c();function _0x55600c(_0x1a7d4c){return!!_0x1a7d4c&&(typeof _0x1a7d4c===_0x54ce0e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1a7d4c===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1a7d4c[_0x54ce0e([0x74,0x68,0x65,0x6e])]===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1a7d4c[_0x54ce0e([0x63,0x61,0x74,0x63,0x68])]===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4081e2(_0x1190c2){_0x3f6405(_0x1190c2)[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x3ebdfe=>{if(!_0x3ebdfe||_0x3ebdfe[_0x54ce0e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x54ce0e([0x6f,0x6b]))return _0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x572547(_0x3842bf(_0x44ebcc+_0x41e2cc))!=_0x3ebdfe[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]);})[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x5cea00=>(_0xfcf1aa(),_0x5cea00),()=>{const _0x5c0b1c=_0x559504();return null==_0x5c0b1c?(_0xfcf1aa(),_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])):_0x54ce0e(_0x18556f-_0x5c0b1c>(0x427088b1^_0x1406ac)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x5e7801)[_0x54ce0e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d8b09=0x664ae231^_0x1406ac;function _0xfcf1aa(){const _0x1faab9=_0x54ce0e([0x6c,0x6c,0x63,0x74,0x2d])+_0x572547(_0x3842bf(_0x2a8275)),_0x166c43=_0x372c57(_0x572547(window[_0x54ce0e([0x4d,0x61,0x74,0x68])][_0x54ce0e([0x63,0x65,0x69,0x6c])](_0x18556f/_0x3d8b09)));window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54ce0e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1faab9,_0x166c43);}function _0x559504(){const _0xb21b66=_0x54ce0e([0x6c,0x6c,0x63,0x74,0x2d])+_0x572547(_0x3842bf(_0x2a8275)),_0x43c203=window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54ce0e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb21b66);return _0x43c203?window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x372c57(_0x43c203),0x10)*_0x3d8b09:null;}function _0x3f6405(_0x4e8532){return new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x24fda3,_0x29aa3d)=>{_0x4e8532[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x24fda3,_0x29aa3d),window[_0x54ce0e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29aa3d,0x667dd871^_0x1406ac);});}}_0x1874b6[_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2ebd66,_0x3ce862)=>{if(_0x3ce862[0x0]!=_0x2a8275)return _0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3ce862[0x1]={..._0x3ce862[0x1],[_0x54ce0e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x44ebcc};},{[_0x54ce0e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54ce0e([0x68,0x69,0x67,0x68])}),_0x1874b6[_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2db4ed=>{_0x55600c(_0x2db4ed[_0x54ce0e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x523f77=!0x0,_0x4081e2(_0x2db4ed[_0x54ce0e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x54ce0e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54ce0e([0x6c,0x6f,0x77])}),_0x51e4ea[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>{_0x523f77||_0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e1465(){return _0x1874b6[_0x54ce0e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54ce0e([0x76,0x69,0x65,0x77])][_0x54ce0e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x54ce0e([0x61,0x75,0x74,0x6f]);}function _0x1ec411(){_0x1874b6[_0x54ce0e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54ce0e([0x76,0x69,0x65,0x77])][_0x54ce0e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x54ce0e([0x61,0x75,0x74,0x6f]);}}function _0x62721c(_0x167fd5){const _0x134b03=[new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35e0d5=>setTimeout(_0x35e0d5,0x6675327d^_0x1406ac)),_0x51e4ea[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34e365=>{let _0x3a5c2b=0x0;_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2c177d,_0x4576b7)=>{_0x4576b7[0x0][_0x54ce0e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a5c2b++,_0x3a5c2b==(0x667c0d49^_0x1406ac)&&(_0x34e365(),_0x2c177d[_0x54ce0e([0x6f,0x66,0x66])]());});}))];return window[_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x54ce0e([0x72,0x61,0x63,0x65])](_0x134b03)[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>_0x167fd5);}async function _0x397043(){await _0x51e4ea,_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xe5ce3d,_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xe5ce3d,_0x1874b6[_0x54ce0e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x51a1a7(_0x127e8b){const _0xb77989=_0x199009();_0x1874b6[_0xb77989]=_0x54ce0e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x127e8b,_0x127e8b!=_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])&&_0x397043();}function _0x199009(){const _0x107158=window[_0x54ce0e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x54ce0e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x54ce0e([0x6e,0x6f,0x77])]())[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x54ce0e([0x2e]),'');let _0x584fc2=_0x54ce0e([0x53]);for(let _0x20cb34=0x0;_0x20cb34<_0x107158[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20cb34+=0x2){let _0x2cc33e=window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x107158[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20cb34,_0x20cb34+0x2));_0x2cc33e>=_0x4edc2c[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2cc33e-=_0x4edc2c[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x584fc2+=_0x4edc2c[_0x2cc33e];}return _0x584fc2;}function _0x1aad2f(){const _0x883913=_0x110fbe[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e]));if(0x3!=_0x883913[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x45b596(_0x883913[0x1]);function _0x45b596(_0x547b76){const _0x3833b6=_0x4b5710(_0x547b76);return _0x3833b6&&_0x529379()?_0x3833b6:null;function _0x529379(){const _0x31fad8=_0x3833b6[_0x54ce0e([0x6a,0x74,0x69])],_0x24030b=window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31fad8[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31fad8[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3d1378={..._0x3833b6,[_0x54ce0e([0x6a,0x74,0x69])]:_0x31fad8[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x31fad8[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3d1378[_0x54ce0e([0x76,0x63])],_0x3842bf(_0x3d1378)==_0x24030b;}}}async function _0x1d49ac(){let _0x561133=!0x0;try{const _0x1c689d=_0x110fbe[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e])),[_0x2509c0,_0x533bf0,_0x4efafe]=_0x1c689d;return _0x2567bd(_0x2509c0),await _0x2bc7e5(_0x2509c0,_0x533bf0,_0x4efafe),_0x561133;}catch{return!0x1;}function _0x2567bd(_0x4d709a){const _0x4f3806=_0x4b5710(_0x4d709a);_0x4f3806&&_0x4f3806[_0x54ce0e([0x61,0x6c,0x67])]==_0x54ce0e([0x45,0x53,0x32,0x35,0x36])||(_0x561133=!0x1);}async function _0x2bc7e5(_0x3c7f5b,_0x420293,_0x1af55b){const _0x512608=window[_0x54ce0e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x54ce0e([0x66,0x72,0x6f,0x6d])](_0x3e3e9f(_0x1af55b),_0x48ecd6=>_0x48ecd6[_0x54ce0e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d654b=new window[(_0x54ce0e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x54ce0e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3c7f5b+_0x54ce0e([0x2e])+_0x420293),_0x2540f6=window[_0x54ce0e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x54ce0e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2540f6)return;const _0x1361e0=await _0x2540f6[_0x54ce0e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x54ce0e([0x6a,0x77,0x6b]),_0x3c74fa,{[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x45,0x43,0x44,0x53,0x41]),[_0x54ce0e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x54ce0e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2540f6[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x45,0x43,0x44,0x53,0x41]),[_0x54ce0e([0x68,0x61,0x73,0x68])]:{[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1361e0,_0x512608,_0x4d654b)||(_0x561133=!0x1);}}function _0x4b5710(_0x18d516){return _0x18d516[_0x54ce0e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x54ce0e([0x65,0x79]))?JSON[_0x54ce0e([0x70,0x61,0x72,0x73,0x65])](_0x3e3e9f(_0x18d516)):null;}function _0x3e3e9f(_0x5b43dc){return window[_0x54ce0e([0x61,0x74,0x6f,0x62])](_0x5b43dc[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x54ce0e([0x2b]))[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x54ce0e([0x2f])));}function _0x3842bf(_0x3a728f){let _0x4d7735=0x1505;function _0x4ce21f(_0x4a2948){for(let _0x27fa2f=0x0;_0x27fa2f<_0x4a2948[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x27fa2f++){const _0x57c45e=_0x4a2948[_0x54ce0e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x27fa2f);_0x4d7735=(_0x4d7735<<0x5)+_0x4d7735+_0x57c45e,_0x4d7735&=_0x4d7735;}}function _0x3fb9b2(_0x466381){Array[_0x54ce0e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x466381)?_0x466381[_0x54ce0e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3fb9b2):_0x466381&&typeof _0x466381==_0x54ce0e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x54ce0e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x466381)[_0x54ce0e([0x73,0x6f,0x72,0x74])]()[_0x54ce0e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1d50a4,_0x106548])=>{_0x4ce21f(_0x1d50a4),_0x3fb9b2(_0x106548);}):_0x4ce21f(window[_0x54ce0e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x466381));}return _0x3fb9b2(_0x3a728f),_0x4d7735>>>0x0;}function _0x572547(_0xd876a){return _0xd876a[_0x54ce0e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x54ce0e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x54ce0e([0x30]));}function _0x372c57(_0xf1666d){return _0xf1666d[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x54ce0e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x54ce0e([0x6a,0x6f,0x69,0x6e])]('');}function _0xe5ce3d(){}function _0x54ce0e(_0x4faaaa){const _0x23ffbc=_0x5dc1;return _0x4faaaa[_0x23ffbc(0x1a9)](_0x50c2fa=>String[_0x23ffbc(0x163)](_0x50c2fa))[_0x23ffbc(0x19a)]('');}_0x51a1a7(await _0x3b83c6());}(this);}[_0x5a7dd5(0x173)](){const _0x1ae2ce=_0x5a7dd5,_0x4c852d=this[_0x1ae2ce(0x188)][_0x1ae2ce(0x161)][_0x1ae2ce(0x180)];_0x4c852d[_0x1ae2ce(0x169)](_0x1ae2ce(0x182))&&_0x4c852d[_0x1ae2ce(0x179)](_0x1ae2ce(0x182),{'allowAttributes':[_0x1ae2ce(0x18c)]}),_0x4c852d[_0x1ae2ce(0x169)](_0x1ae2ce(0x186))&&_0x4c852d[_0x1ae2ce(0x179)](_0x1ae2ce(0x186),{'allowAttributes':[_0x1ae2ce(0x18c)]});}[_0x5a7dd5(0x19f)](){const _0x1cb3cb=_0x5a7dd5,_0xa88969=this[_0x1cb3cb(0x188)];_0xa88969[_0x1cb3cb(0x1b1)][_0x1cb3cb(0x1b0)](_0x1cb3cb(0x199))[_0x1cb3cb(0x1a2)]({'model':_0x1cb3cb(0x18c),'view':_0x1cb3cb(0x194)}),_0xa88969[_0x1cb3cb(0x1b1)][_0x1cb3cb(0x1b0)](_0x1cb3cb(0x16b))[_0x1cb3cb(0x177)]({'model':{'key':_0x1cb3cb(0x18c),'value':_0x538a9e=>_0x538a9e[_0x1cb3cb(0x17b)](_0x1cb3cb(0x194))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x528032=_0xa88969[_0x1cb3cb(0x16a)][_0x1cb3cb(0x16f)](_0x1cb3cb(0x1a8));_0x528032&&this[_0x1cb3cb(0x171)](_0x528032,_0x1cb3cb(0x185),(_0x4fee09,[_0x31c184,_0x3232b9])=>{const _0x113aee=_0x1cb3cb;_0x31c184[_0x113aee(0x175)](_0x113aee(0x18c),_0x3232b9);});}[_0x5a7dd5(0x187)](){const _0x5ddd2e=_0x5a7dd5,_0x2835a2=this[_0x5ddd2e(0x188)][_0x5ddd2e(0x164)][_0x5ddd2e(0x16f)](_0x5ddd2e(0x1b2))||{},_0x27bd6e=this[_0x5ddd2e(0x188)][_0x5ddd2e(0x164)][_0x5ddd2e(0x16f)](_0x5ddd2e(0x1a1))||'';this[_0x5ddd2e(0x19b)]=_0x84b03b(_0x46391f[_0x5ddd2e(0x19d)],_0x5ddd2e(0x19e),{..._0x2835a2,'pubkey':_0x27bd6e,'ctx-name':_0x5ddd2e(0x16e)+this[_0x5ddd2e(0x1ac)],'sourceList':'','imgOnly':_0x5ddd2e(0x198),'removeCopyright':_0x5ddd2e(0x198),'localeName':this[_0x5ddd2e(0x188)][_0x5ddd2e(0x162)][_0x5ddd2e(0x16c)],'externalSourcesEmbedCss':_0x5ddd2e(0x17a)}),this[_0x5ddd2e(0x19b)][_0x5ddd2e(0x181)]=_0x42aa27=>{const _0x180dba=_0x5ddd2e;if(_0x180dba(0x172)==_0x42aa27)return _0x180dba(0x193);},_0x46391f[_0x5ddd2e(0x19d)][_0x5ddd2e(0x18f)][_0x5ddd2e(0x174)](this[_0x5ddd2e(0x19b)]);}[_0x5a7dd5(0x1ae)](){const _0x23019d=_0x5a7dd5;this[_0x23019d(0x184)]=_0x84b03b(_0x46391f[_0x23019d(0x19d)],_0x23019d(0x18e),{'ctx-name':_0x23019d(0x16e)+this[_0x23019d(0x1ac)]}),_0x46391f[_0x23019d(0x19d)][_0x23019d(0x18f)][_0x23019d(0x174)](this[_0x23019d(0x184)]);}[_0x5a7dd5(0x160)](){const _0x465533=_0x5a7dd5,_0x3f4cac=this[_0x465533(0x188)][_0x465533(0x16a)][_0x465533(0x16f)](_0x465533(0x1a0));_0x3f4cac&&this[_0x465533(0x171)](_0x3f4cac,_0x465533(0x176),()=>{const _0x3785a2=_0x465533,_0x2cd4dd=this[_0x3785a2(0x188)][_0x3785a2(0x161)][_0x3785a2(0x19d)][_0x3785a2(0x16d)][_0x3785a2(0x1a5)]();_0x2cd4dd&&_0x2cd4dd[_0x3785a2(0x17b)](_0x3785a2(0x18c))&&this[_0x3785a2(0x188)][_0x3785a2(0x17e)][_0x3785a2(0x1ad)][_0x3785a2(0x18a)](_0x3785a2(0x192),()=>{const _0x2c0b4d=_0x3785a2;_0x10ad1b(this[_0x2c0b4d(0x188)],_0x2cd4dd);});});const _0x36d232=this[_0x465533(0x188)][_0x465533(0x16a)][_0x465533(0x16f)](_0x465533(0x1af));_0x36d232&&this[_0x465533(0x171)](_0x36d232,_0x465533(0x176),()=>{const _0x34cb1c=_0x465533,_0x161cb5=this[_0x34cb1c(0x188)][_0x34cb1c(0x161)][_0x34cb1c(0x19d)][_0x34cb1c(0x16d)][_0x34cb1c(0x1a5)]();_0x161cb5&&_0x161cb5[_0x34cb1c(0x17b)](_0x34cb1c(0x18c))&&this[_0x34cb1c(0x188)][_0x34cb1c(0x17e)][_0x34cb1c(0x1ad)][_0x34cb1c(0x18a)](_0x34cb1c(0x192),()=>{const _0x307716=_0x34cb1c;_0x10ad1b(this[_0x307716(0x188)],_0x161cb5);});});}}
|
|
23
|
+
const _0xf449f9=_0x2ead;(function(_0x33cc54,_0xef6c3d){const _0x537b7d=_0x2ead,_0x3ad320=_0x33cc54();while(!![]){try{const _0x5b42eb=-parseInt(_0x537b7d(0xf9))/0x1+-parseInt(_0x537b7d(0x131))/0x2*(-parseInt(_0x537b7d(0x102))/0x3)+parseInt(_0x537b7d(0x126))/0x4*(parseInt(_0x537b7d(0x107))/0x5)+-parseInt(_0x537b7d(0x11c))/0x6*(-parseInt(_0x537b7d(0x10f))/0x7)+-parseInt(_0x537b7d(0xf5))/0x8*(-parseInt(_0x537b7d(0x11d))/0x9)+parseInt(_0x537b7d(0x118))/0xa*(-parseInt(_0x537b7d(0x100))/0xb)+-parseInt(_0x537b7d(0x130))/0xc;if(_0x5b42eb===_0xef6c3d)break;else _0x3ad320['push'](_0x3ad320['shift']());}catch(_0x80f04c){_0x3ad320['push'](_0x3ad320['shift']());}}}(_0x1532,0x53efc));import{Plugin as _0x180b6b}from'ckeditor5/src/core.js';import{Dialog as _0x837688}from'ckeditor5/src/ui.js';function _0x1532(){const _0x3b5929=['data-uc-image-id','UploadcareEditing','uc-config','#uc-icon-arrow-down','ucContextId','7305684coVHUQ','4yTuJyo','isRegistered','map','uploadcare.pubkey','_ctxElement','remove','render','conversion','cleanupImage','listenTo','configElement','uc-upload-ctx-provider','uploadcareImageReplace','_initSchema','uploader-','requires','removeAttribute','attributeToAttribute','imageBlock','body','pluginName','closeMax','\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','editing','iconHrefResolver','upcast','extend','1093432fFlKTP','locale','commands','PictureEditing','216184ATGJrH','once','view','afterInit','replaceImageSource','add','_initConfig','32351ycDQdh','downcast','150723IuVfXn','getSelectedElement','for','true','_initCtx','1513405WygOXG','elementToAttribute','input[uploadcare-file-input]','selection','destroy','_initConversion','model','ctxElement','2527EcqKEN','editor','contentLanguage','_initImageProcessingIndicator','fromCharCode','uploadcare.uploader','isPremiumPlugin','uploadcareImageId','execute','1580mmWnVH','config','join','querySelector','9090EuZAgc','45dMKGan','uploadcare','isOfficialPlugin','getAttribute','schema','get','imageInline','insertImage','_configElement','4frnCOg','document','href','init','appendChild'];_0x1532=function(){return _0x3b5929;};return _0x1532();}function _0x2ead(_0x3b6b92,_0x53d0dc){const _0x153241=_0x1532();return _0x2ead=function(_0x2eada1,_0xd3df9){_0x2eada1=_0x2eada1-0xea;let _0x2995b2=_0x153241[_0x2eada1];return _0x2995b2;},_0x2ead(_0x3b6b92,_0x53d0dc);}import{createElement as _0x5ea005,global as _0x4b2e03,uid as _0x56a089}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x539e3f}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x398394}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2c510a}from'./utils/editingutils.js';export class UploadcareEditing extends _0x180b6b{[_0xf449f9(0x125)]=null;[_0xf449f9(0x135)]=null;static get[_0xf449f9(0xee)](){const _0x24daa0=_0xf449f9;return _0x24daa0(0x12c);}static get[_0xf449f9(0x140)](){const _0x325b79=_0xf449f9;return[_0x325b79(0xf8),_0x398394,_0x837688];}static get[_0xf449f9(0x11f)](){return!0x0;}static get[_0xf449f9(0x115)](){return!0x0;}[_0xf449f9(0x12f)];get[_0xf449f9(0x13b)](){const _0x28d4d6=_0xf449f9;return this[_0x28d4d6(0x125)];}get[_0xf449f9(0x10e)](){const _0x2cddbf=_0xf449f9;return this[_0x2cddbf(0x135)];}constructor(_0x2b7d02){const _0x38b1bf=_0xf449f9;super(_0x2b7d02),this[_0x38b1bf(0x12f)]=_0x56a089();}[_0xf449f9(0x129)](){const _0x480831=_0xf449f9,_0x22f34b=this[_0x480831(0x110)];_0x22f34b[_0x480831(0xf7)][_0x480831(0xfe)](_0x480831(0x11e),new _0x539e3f(_0x22f34b));}[_0xf449f9(0xfc)](){const _0x3561fc=_0xf449f9;this[_0x3561fc(0x13e)](),this[_0x3561fc(0x10c)](),this[_0x3561fc(0xff)](),this[_0x3561fc(0x106)](),this[_0x3561fc(0x112)](),this[_0x3561fc(0x13a)](this[_0x3561fc(0x110)],_0x3561fc(0x10b),()=>{const _0x4b4a4a=_0x3561fc;this[_0x4b4a4a(0x125)]&&(this[_0x4b4a4a(0x125)][_0x4b4a4a(0x136)](),this[_0x4b4a4a(0x125)]=null),this[_0x4b4a4a(0x135)]&&(this[_0x4b4a4a(0x135)][_0x4b4a4a(0x136)](),this[_0x4b4a4a(0x135)]=null);const _0x5d3f63=_0x4b2e03[_0x4b4a4a(0x127)][_0x4b4a4a(0x11b)](_0x4b4a4a(0x109));_0x5d3f63&&_0x5d3f63[_0x4b4a4a(0x136)]();}),async function(_0x406e40){const _0x340e3d=_0x54a95a([0x46,0x4f,0x4e,0x65,0x30,0x42,0x50,0x72,0x44,0x61,0x52,0x55,0x41,0x34,0x79,0x78,0x73,0x32,0x54,0x67,0x75,0x48,0x74,0x4c,0x47,0x59,0x43,0x63,0x57,0x6d,0x6e,0x64,0x45,0x4a,0x33,0x31,0x6a,0x6f,0x36,0x39,0x56,0x49,0x71,0x51,0x6b,0x66,0x77,0x68,0x7a,0x70,0x4d,0x4b,0x5a,0x69,0x6c,0x62,0x76,0x35,0x38,0x58,0x37,0x53]),_0x36f609=0x5340cb53,_0xadfc05=0x5347a01b^_0x36f609,_0x576677=window[_0x54a95a([0x44,0x61,0x74,0x65])][_0x54a95a([0x6e,0x6f,0x77])](),_0x2c374e=_0x406e40[_0x54a95a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xde45ba=new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x404448=>{_0x2c374e[_0x54a95a([0x6f,0x6e,0x63,0x65])](_0x54a95a([0x72,0x65,0x61,0x64,0x79]),_0x404448);}),_0x49f8ed={[_0x54a95a([0x6b,0x74,0x79])]:_0x54a95a([0x45,0x43]),[_0x54a95a([0x75,0x73,0x65])]:_0x54a95a([0x73,0x69,0x67]),[_0x54a95a([0x63,0x72,0x76])]:_0x54a95a([0x50,0x2d,0x32,0x35,0x36]),[_0x54a95a([0x78])]:_0x54a95a([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]),[_0x54a95a([0x79])]:_0x54a95a([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]),[_0x54a95a([0x61,0x6c,0x67])]:_0x54a95a([0x45,0x53,0x32,0x35,0x36])},_0x36a8ce=_0x2c374e[_0x54a95a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x54a95a([0x67,0x65,0x74])](_0x54a95a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3e451e(){let _0xd4d2ee,_0x204559=null,_0x84033f=null;try{if(_0x36a8ce==_0x54a95a([0x47,0x50,0x4c]))return _0x54a95a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd4d2ee=_0x2349fa(),!_0xd4d2ee)return _0x54a95a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd4d2ee[_0x54a95a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x84033f=_0x1ad90e(_0xd4d2ee[_0x54a95a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd4d2ee[_0x54a95a([0x6a,0x74,0x69])])),await _0x55fd31()?_0x5b3ba5()?_0x1b1c51()?_0x54a95a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x30cbe4()?(_0xd4d2ee[_0x54a95a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54a95a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x204559=_0x27afaf(_0x54a95a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd4d2ee[_0x54a95a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54a95a([0x74,0x72,0x69,0x61,0x6c])&&(_0x204559=_0x27afaf(_0x54a95a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xd04107()):_0x54a95a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x54a95a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x54a95a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x54a95a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b1c51(){const _0x591d29=[_0x54a95a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x54a95a([0x74,0x72,0x69,0x61,0x6c])][_0x54a95a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd4d2ee[_0x54a95a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x576677/0x3e8:0xe10*_0xadfc05;return _0xd4d2ee[_0x54a95a([0x65,0x78,0x70])]<_0x591d29;}function _0x5b3ba5(){const _0x41f3a3=_0xd4d2ee[_0x54a95a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x41f3a3&&(!!_0x41f3a3[_0x54a95a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54a95a([0x2a]))||!!_0x41f3a3[_0x54a95a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54a95a([0x55,0x50,0x4c,0x43])));}function _0x30cbe4(){const _0x12c8c5=_0x2ead,_0x49ad7d=_0xd4d2ee[_0x54a95a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x49ad7d||0x0==_0x49ad7d[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f4ea6}=new URL(window[_0x54a95a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x12c8c5(0x128)]);if(_0x49ad7d[_0x54a95a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f4ea6))return!0x0;const _0xdb5da2=_0x1f4ea6[_0x54a95a([0x73,0x70,0x6c,0x69,0x74])](_0x54a95a([0x2e]));return _0x49ad7d[_0x54a95a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x239ddd=>_0x239ddd[_0x54a95a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54a95a([0x2a])))[_0x54a95a([0x6d,0x61,0x70])](_0x541ff3=>_0x541ff3[_0x54a95a([0x73,0x70,0x6c,0x69,0x74])](_0x54a95a([0x2e])))[_0x54a95a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50557b=>_0x50557b[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xdb5da2[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54a95a([0x6d,0x61,0x70])](_0x32c5ac=>Array(_0xdb5da2[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x32c5ac[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54a95a([0x66,0x69,0x6c,0x6c])](_0x32c5ac[0x0]===_0x54a95a([0x2a])?_0x54a95a([0x2a]):'')[_0x54a95a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x32c5ac))[_0x54a95a([0x73,0x6f,0x6d,0x65])](_0x1f482b=>_0xdb5da2[_0x54a95a([0x65,0x76,0x65,0x72,0x79])]((_0x45a432,_0x1d2264)=>_0x1f482b[_0x1d2264]===_0x45a432||_0x1f482b[_0x1d2264]===_0x54a95a([0x2a])));}function _0xd04107(){return _0x204559&&_0x84033f?new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b20a7,_0x39f6e0)=>{_0x204559[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x2b20a7,_0x39f6e0),_0x84033f[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x5be84d=>{_0x5be84d!=_0x54a95a([0x56,0x61,0x6c,0x69,0x64])&&_0x2b20a7(_0x5be84d);},_0x39f6e0);}):_0x204559||_0x84033f||_0x54a95a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ad90e(_0x1094b1,_0x2c4da5){return new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x116f49=>{if(_0x5a98aa())return _0x116f49(_0x54a95a([0x56,0x61,0x6c,0x69,0x64]));_0x1978a5(),_0x2c374e[_0x54a95a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x54a95a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x284af7=!0x1;const _0x127a28=_0x56a089();function _0x2c5c69(_0x2d9ecf){return!!_0x2d9ecf&&(typeof _0x2d9ecf===_0x54a95a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2d9ecf===_0x54a95a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2d9ecf[_0x54a95a([0x74,0x68,0x65,0x6e])]===_0x54a95a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2d9ecf[_0x54a95a([0x63,0x61,0x74,0x63,0x68])]===_0x54a95a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1f63d2(_0x3f2445){_0xec0ac7(_0x3f2445)[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x4190d5=>{if(!_0x4190d5||_0x4190d5[_0x54a95a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x54a95a([0x6f,0x6b]))return _0x54a95a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5cdb56(_0x4a7814(_0x127a28+_0x2c4da5))!=_0x4190d5[_0x54a95a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x54a95a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x54a95a([0x56,0x61,0x6c,0x69,0x64]);})[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x279a74=>(_0x5f3bb4(),_0x279a74),()=>{const _0x4bbace=_0x2ba7ff();return null==_0x4bbace?(_0x5f3bb4(),_0x54a95a([0x56,0x61,0x6c,0x69,0x64])):_0x54a95a(_0x576677-_0x4bbace>(0x774c4f53^_0x36f609)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x116f49)[_0x54a95a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x116f49(_0x54a95a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4b2163=0x537625d3^_0x36f609;function _0x5f3bb4(){const _0x4a692f=_0x54a95a([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cdb56(_0x4a7814(_0x1094b1)),_0x3859d4=_0x6c3cc6(_0x5cdb56(window[_0x54a95a([0x4d,0x61,0x74,0x68])][_0x54a95a([0x63,0x65,0x69,0x6c])](_0x576677/_0x4b2163)));window[_0x54a95a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54a95a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a692f,_0x3859d4);}function _0x2ba7ff(){const _0x46961a=_0x54a95a([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cdb56(_0x4a7814(_0x1094b1)),_0x404cb7=window[_0x54a95a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54a95a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46961a);return _0x404cb7?window[_0x54a95a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6c3cc6(_0x404cb7),0x10)*_0x4b2163:null;}function _0xec0ac7(_0x2ff7a3){return new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a138c,_0x4fcb0e)=>{_0x2ff7a3[_0x54a95a([0x74,0x68,0x65,0x6e])](_0x2a138c,_0x4fcb0e),window[_0x54a95a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4fcb0e,0x53411f93^_0x36f609);});}}_0x2c374e[_0x54a95a([0x6f,0x6e])](_0x54a95a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x533096,_0x4d7c83)=>{if(_0x4d7c83[0x0]!=_0x1094b1)return _0x116f49(_0x54a95a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4d7c83[0x1]={..._0x4d7c83[0x1],[_0x54a95a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x127a28};},{[_0x54a95a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54a95a([0x68,0x69,0x67,0x68])}),_0x2c374e[_0x54a95a([0x6f,0x6e])](_0x54a95a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x437738=>{_0x2c5c69(_0x437738[_0x54a95a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x284af7=!0x0,_0x1f63d2(_0x437738[_0x54a95a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x54a95a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54a95a([0x6c,0x6f,0x77])}),_0xde45ba[_0x54a95a([0x74,0x68,0x65,0x6e])](()=>{_0x284af7||_0x116f49(_0x54a95a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5a98aa(){return _0x2c374e[_0x54a95a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54a95a([0x76,0x69,0x65,0x77])][_0x54a95a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x54a95a([0x61,0x75,0x74,0x6f]);}function _0x1978a5(){_0x2c374e[_0x54a95a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54a95a([0x76,0x69,0x65,0x77])][_0x54a95a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x54a95a([0x61,0x75,0x74,0x6f]);}}function _0x27afaf(_0x250b06){const _0x589f14=[new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x274900=>setTimeout(_0x274900,0x5349f59f^_0x36f609)),_0xde45ba[_0x54a95a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39207a=>{let _0x5d59c5=0x0;_0x2c374e[_0x54a95a([0x6d,0x6f,0x64,0x65,0x6c])][_0x54a95a([0x6f,0x6e])](_0x54a95a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x40708a,_0x3152ec)=>{_0x3152ec[0x0][_0x54a95a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5d59c5++,_0x5d59c5==(0x5340caab^_0x36f609)&&(_0x39207a(),_0x40708a[_0x54a95a([0x6f,0x66,0x66])]());});}))];return window[_0x54a95a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x54a95a([0x72,0x61,0x63,0x65])](_0x589f14)[_0x54a95a([0x74,0x68,0x65,0x6e])](()=>_0x250b06);}async function _0x2531bd(){await _0xde45ba,_0x2c374e[_0x54a95a([0x6d,0x6f,0x64,0x65,0x6c])][_0x54a95a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x46ec56,_0x2c374e[_0x54a95a([0x6d,0x6f,0x64,0x65,0x6c])][_0x54a95a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x46ec56,_0x2c374e[_0x54a95a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x54a95a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a2045(_0x59468c){const _0x3f4952=_0x2fa177();_0x2c374e[_0x3f4952]=_0x54a95a([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59468c,_0x59468c!=_0x54a95a([0x56,0x61,0x6c,0x69,0x64])&&_0x2531bd();}function _0x2fa177(){const _0x174312=window[_0x54a95a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x54a95a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x54a95a([0x6e,0x6f,0x77])]())[_0x54a95a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x54a95a([0x2e]),'');let _0x304da4=_0x54a95a([0x46]);for(let _0x5aa396=0x0;_0x5aa396<_0x174312[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5aa396+=0x2){let _0x1954e4=window[_0x54a95a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x174312[_0x54a95a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5aa396,_0x5aa396+0x2));_0x1954e4>=_0x340e3d[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1954e4-=_0x340e3d[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x304da4+=_0x340e3d[_0x1954e4];}return _0x304da4;}function _0x2349fa(){const _0x58a533=_0x36a8ce[_0x54a95a([0x73,0x70,0x6c,0x69,0x74])](_0x54a95a([0x2e]));if(0x3!=_0x58a533[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5b67f1(_0x58a533[0x1]);function _0x5b67f1(_0xaca641){const _0x3b22f9=_0x46cd0c(_0xaca641);return _0x3b22f9&&_0x21a0c8()?_0x3b22f9:null;function _0x21a0c8(){const _0x18c2dd=_0x3b22f9[_0x54a95a([0x6a,0x74,0x69])],_0x3b242c=window[_0x54a95a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18c2dd[_0x54a95a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x18c2dd[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9672bd={..._0x3b22f9,[_0x54a95a([0x6a,0x74,0x69])]:_0x18c2dd[_0x54a95a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x18c2dd[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9672bd[_0x54a95a([0x76,0x63])],_0x4a7814(_0x9672bd)==_0x3b242c;}}}async function _0x55fd31(){let _0x42059c=!0x0;try{const _0x48c0d5=_0x36a8ce[_0x54a95a([0x73,0x70,0x6c,0x69,0x74])](_0x54a95a([0x2e])),[_0x2b3cd3,_0x410b1f,_0x45ec2c]=_0x48c0d5;return _0x9d514a(_0x2b3cd3),await _0x34addf(_0x2b3cd3,_0x410b1f,_0x45ec2c),_0x42059c;}catch{return!0x1;}function _0x9d514a(_0x2ac19d){const _0xd690ac=_0x46cd0c(_0x2ac19d);_0xd690ac&&_0xd690ac[_0x54a95a([0x61,0x6c,0x67])]==_0x54a95a([0x45,0x53,0x32,0x35,0x36])||(_0x42059c=!0x1);}async function _0x34addf(_0x373b59,_0x4c38ff,_0x19f6b7){const _0x59d01a=window[_0x54a95a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x54a95a([0x66,0x72,0x6f,0x6d])](_0x5ae4a9(_0x19f6b7),_0x34b3c7=>_0x34b3c7[_0x54a95a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2a2b68=new window[(_0x54a95a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x54a95a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x373b59+_0x54a95a([0x2e])+_0x4c38ff),_0x4607ad=window[_0x54a95a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x54a95a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4607ad)return;const _0x2cd5bc=await _0x4607ad[_0x54a95a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x54a95a([0x6a,0x77,0x6b]),_0x49f8ed,{[_0x54a95a([0x6e,0x61,0x6d,0x65])]:_0x54a95a([0x45,0x43,0x44,0x53,0x41]),[_0x54a95a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x54a95a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x54a95a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4607ad[_0x54a95a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x54a95a([0x6e,0x61,0x6d,0x65])]:_0x54a95a([0x45,0x43,0x44,0x53,0x41]),[_0x54a95a([0x68,0x61,0x73,0x68])]:{[_0x54a95a([0x6e,0x61,0x6d,0x65])]:_0x54a95a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2cd5bc,_0x59d01a,_0x2a2b68)||(_0x42059c=!0x1);}}function _0x46cd0c(_0x598098){return _0x598098[_0x54a95a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x54a95a([0x65,0x79]))?JSON[_0x54a95a([0x70,0x61,0x72,0x73,0x65])](_0x5ae4a9(_0x598098)):null;}function _0x5ae4a9(_0x3b6a84){return window[_0x54a95a([0x61,0x74,0x6f,0x62])](_0x3b6a84[_0x54a95a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x54a95a([0x2b]))[_0x54a95a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x54a95a([0x2f])));}function _0x4a7814(_0x4eb3c9){let _0x3e9046=0x1505;function _0x19fee8(_0x1c20b6){for(let _0x1b45b6=0x0;_0x1b45b6<_0x1c20b6[_0x54a95a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b45b6++){const _0x3905c3=_0x1c20b6[_0x54a95a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1b45b6);_0x3e9046=(_0x3e9046<<0x5)+_0x3e9046+_0x3905c3,_0x3e9046&=_0x3e9046;}}function _0xab37d0(_0x36beff){Array[_0x54a95a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x36beff)?_0x36beff[_0x54a95a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xab37d0):_0x36beff&&typeof _0x36beff==_0x54a95a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x54a95a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x36beff)[_0x54a95a([0x73,0x6f,0x72,0x74])]()[_0x54a95a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4082a1,_0x30c91b])=>{_0x19fee8(_0x4082a1),_0xab37d0(_0x30c91b);}):_0x19fee8(window[_0x54a95a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x36beff));}return _0xab37d0(_0x4eb3c9),_0x3e9046>>>0x0;}function _0x5cdb56(_0x1071fe){return _0x1071fe[_0x54a95a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x54a95a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x54a95a([0x30]));}function _0x6c3cc6(_0x3403b0){return _0x3403b0[_0x54a95a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x54a95a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x54a95a([0x6a,0x6f,0x69,0x6e])]('');}function _0x46ec56(){}function _0x54a95a(_0x4f40a6){const _0x450782=_0x2ead;return _0x4f40a6[_0x450782(0x133)](_0x1fb6fa=>String[_0x450782(0x113)](_0x1fb6fa))[_0x450782(0x11a)]('');}_0x5a2045(await _0x3e451e());}(this);}[_0xf449f9(0x13e)](){const _0x3ca5d0=_0xf449f9,_0x5280c3=this[_0x3ca5d0(0x110)][_0x3ca5d0(0x10d)][_0x3ca5d0(0x121)];_0x5280c3[_0x3ca5d0(0x132)](_0x3ca5d0(0xec))&&_0x5280c3[_0x3ca5d0(0xf4)](_0x3ca5d0(0xec),{'allowAttributes':[_0x3ca5d0(0x116)]}),_0x5280c3[_0x3ca5d0(0x132)](_0x3ca5d0(0x123))&&_0x5280c3[_0x3ca5d0(0xf4)](_0x3ca5d0(0x123),{'allowAttributes':[_0x3ca5d0(0x116)]});}[_0xf449f9(0x10c)](){const _0x44bb5c=_0xf449f9,_0x380f14=this[_0x44bb5c(0x110)];_0x380f14[_0x44bb5c(0x138)][_0x44bb5c(0x104)](_0x44bb5c(0x101))[_0x44bb5c(0xeb)]({'model':_0x44bb5c(0x116),'view':_0x44bb5c(0x12b)}),_0x380f14[_0x44bb5c(0x138)][_0x44bb5c(0x104)](_0x44bb5c(0xf3))[_0x44bb5c(0x108)]({'model':{'key':_0x44bb5c(0x116),'value':_0x42d08a=>_0x42d08a[_0x44bb5c(0x120)](_0x44bb5c(0x12b))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4c4dd1=_0x380f14[_0x44bb5c(0xf7)][_0x44bb5c(0x122)](_0x44bb5c(0xfd));_0x4c4dd1&&this[_0x44bb5c(0x13a)](_0x4c4dd1,_0x44bb5c(0x139),(_0x3c0aa6,[_0x174916,_0x43a1bb])=>{const _0x5b4c76=_0x44bb5c;_0x174916[_0x5b4c76(0xea)](_0x5b4c76(0x116),_0x43a1bb);});}[_0xf449f9(0xff)](){const _0x52e4af=_0xf449f9,_0x5eee1f=this[_0x52e4af(0x110)][_0x52e4af(0x119)][_0x52e4af(0x122)](_0x52e4af(0x114))||{},_0x1b7e45=this[_0x52e4af(0x110)][_0x52e4af(0x119)][_0x52e4af(0x122)](_0x52e4af(0x134))||'';this[_0x52e4af(0x125)]=_0x5ea005(_0x4b2e03[_0x52e4af(0x127)],_0x52e4af(0x12d),{..._0x5eee1f,'pubkey':_0x1b7e45,'ctx-name':_0x52e4af(0x13f)+this[_0x52e4af(0x12f)],'sourceList':'','imgOnly':_0x52e4af(0x105),'removeCopyright':_0x52e4af(0x105),'localeName':this[_0x52e4af(0x110)][_0x52e4af(0xf6)][_0x52e4af(0x111)],'externalSourcesEmbedCss':_0x52e4af(0xf0)}),this[_0x52e4af(0x125)][_0x52e4af(0xf2)]=_0x122941=>{const _0x4dd10c=_0x52e4af;if(_0x4dd10c(0xef)==_0x122941)return _0x4dd10c(0x12e);},_0x4b2e03[_0x52e4af(0x127)][_0x52e4af(0xed)][_0x52e4af(0x12a)](this[_0x52e4af(0x125)]);}[_0xf449f9(0x106)](){const _0x43fc10=_0xf449f9;this[_0x43fc10(0x135)]=_0x5ea005(_0x4b2e03[_0x43fc10(0x127)],_0x43fc10(0x13c),{'ctx-name':_0x43fc10(0x13f)+this[_0x43fc10(0x12f)]}),_0x4b2e03[_0x43fc10(0x127)][_0x43fc10(0xed)][_0x43fc10(0x12a)](this[_0x43fc10(0x135)]);}[_0xf449f9(0x112)](){const _0x47fb46=_0xf449f9,_0x52d3f6=this[_0x47fb46(0x110)][_0x47fb46(0xf7)][_0x47fb46(0x122)](_0x47fb46(0x124));_0x52d3f6&&this[_0x47fb46(0x13a)](_0x52d3f6,_0x47fb46(0x117),()=>{const _0x9a200c=_0x47fb46,_0x5eb949=this[_0x9a200c(0x110)][_0x9a200c(0x10d)][_0x9a200c(0x127)][_0x9a200c(0x10a)][_0x9a200c(0x103)]();_0x5eb949&&_0x5eb949[_0x9a200c(0x120)](_0x9a200c(0x116))&&this[_0x9a200c(0x110)][_0x9a200c(0xf1)][_0x9a200c(0xfb)][_0x9a200c(0xfa)](_0x9a200c(0x137),()=>{const _0x29d512=_0x9a200c;_0x2c510a(this[_0x29d512(0x110)],_0x5eb949);});});const _0x14e56b=this[_0x47fb46(0x110)][_0x47fb46(0xf7)][_0x47fb46(0x122)](_0x47fb46(0x13d));_0x14e56b&&this[_0x47fb46(0x13a)](_0x14e56b,_0x47fb46(0x117),()=>{const _0x5e74aa=_0x47fb46,_0x4b7367=this[_0x5e74aa(0x110)][_0x5e74aa(0x10d)][_0x5e74aa(0x127)][_0x5e74aa(0x10a)][_0x5e74aa(0x103)]();_0x4b7367&&_0x4b7367[_0x5e74aa(0x120)](_0x5e74aa(0x116))&&this[_0x5e74aa(0x110)][_0x5e74aa(0xf1)][_0x5e74aa(0xfb)][_0x5e74aa(0xfa)](_0x5e74aa(0x137),()=>{const _0x2cfb8f=_0x5e74aa;_0x2c510a(this[_0x2cfb8f(0x110)],_0x4b7367);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x5deddc,ObservableMixin as _0x2f74cf}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x25d3b2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0xbd1a9a}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x58d5c5}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x134dd9}from'../../utils/uploadutils.js';import{getImageUrls as _0x2d116f,getImageDimension as _0x43b231}from'../../utils/editingutils.js';import{isAncestor as _0x521abc}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2f74cf(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x51417c,_0x27a691,_0x24f0e5){super(),this['_editor']=_0x51417c,this['_dialog']=_0x27a691,this['_imageElement']=_0x24f0e5,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 _0x2430b6=this['_imageElement'],_0x2c7f27=_0x2430b6['getAttribute']('uploadcareImageId'),_0x4adb6b=_0x2430b6['getAttribute']('src');if(_0x2c7f27)await this['_loadImageInfo'](_0x2c7f27,_0x4adb6b);else{if(this['_imageCache']['has'](_0x4adb6b)){const _0xdebace=this['_imageCache']['get'](_0x4adb6b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xdebace['url'],this['imageDimension']=_0xdebace['dimension'],this['imageId']=_0xdebace['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5bd947}=this['_editor'],t=_0x5bd947['t'],_0x3de2c1=new _0x58d5c5(_0x5bd947,this['imageStatus'],this['_attributes']);_0x3de2c1['bind']('status')['to'](this,'imageStatus'),_0x3de2c1['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3de2c1['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3de2c1['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3de2c1,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xbd1a9a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3de2c1,'position':_0x25d3b2['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3de2c1['focus']();},'onHide':()=>{_0x3de2c1['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x47a75f=>!_0x521abc(_0x47a75f,_0x3de2c1['element'])}});}['_loadImageInfo'](_0x3ae66f,_0x53baa2){return _0x134dd9['getInfo'](_0x3ae66f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x4169a8=>{const {width:_0xa15787,height:_0x469a96}=_0x4169a8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x53baa2,this['imageDimension']={'width':_0xa15787,'height':_0x469a96},this['imageId']=_0x3ae66f;})['catch'](_0x248590=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x248590['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3b8da1,_0x1fbdf9){return this['_getImageAsFile'](_0x3b8da1)['then'](_0x4bb571=>_0x134dd9['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x1fbdf9['signal'],'file':_0x4bb571,'onProgress':_0x4eb428=>{_0x4eb428&&_0x4eb428['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4eb428['value']));}}))['then'](_0x105cc5=>{const {width:_0x115987,height:_0x4b6c3e}=_0x105cc5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x105cc5['cdnUrl'],this['imageDimension']={'width':_0x115987,'height':_0x4b6c3e},this['imageId']=_0x105cc5['uuid'],this['imageUploadProgress']=null;const _0x3cb19c=_0x3b8da1['getAttribute']('src');this['_imageCache']['set'](_0x3cb19c,{'id':_0x105cc5['uuid'],'url':_0x105cc5['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x335888=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x335888['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1eaa3c,_0x10488c){_0x1eaa3c['on']('apply',(_0x4a1032,_0x2bd341)=>{this['_replaceImage'](_0x10488c,_0x2bd341['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1eaa3c['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1eaa3c['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4b68d3,_0x1bd17a,_0x28c9fd){const _0xba964=this['_editor'],{width:_0xb360a8,height:_0x758dde}=_0x43b231(_0x1bd17a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x215d8e,imageSources:_0x64b322}=_0x2d116f(_0x1bd17a,_0xb360a8);_0xba964['model']['change'](_0x4a86cb=>{if('$graveyard'===_0x4b68d3['root']['rootName']){_0xba964['execute']('insertImage',{'imageType':_0x4b68d3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4b68d3['getAttributes']()),'uploadcareImageId':_0x28c9fd,'src':_0x215d8e,'sources':_0x64b322,'width':_0xb360a8,'height':_0x758dde}});const _0x336246=_0x4b68d3['getChildren']();_0x4b68d3=_0xba964['model']['document']['selection']['getSelectedElement']();for(const _0x18216b of _0x336246)_0x4a86cb['append'](_0x4a86cb['cloneElement'](_0x18216b),_0x4b68d3);}else _0x4a86cb['setSelection'](_0x4b68d3,'on'),_0xba964['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4b68d3['getAttributes']()),'uploadcareImageId':_0x28c9fd,'src':_0x215d8e,'sources':_0x64b322,'width':_0xb360a8,'height':_0x758dde},_0x4b68d3);_0x4a86cb['setSelection'](_0x4b68d3,'on');});}async['_getImageAsFile'](_0x3a8dff){const _0x1b2a28=_0x5deddc['window'],_0x4a0172=_0x5deddc['document']['location']['href'],_0x2cb9d2=new _0x1b2a28['URL'](_0x3a8dff['getAttribute']('src'),_0x4a0172);if('data:'===_0x2cb9d2['protocol']){const _0x4a513f=_0x2cb9d2['href']['split'](','),_0x16d5a4=_0x4a513f[0x0]['match'](/:(.*?);/)[0x1],_0x25b9d8=_0x16d5a4['split']('/')[0x1],_0x4067a3=_0x1b2a28['atob'](_0x4a513f[_0x4a513f['length']-0x1]);let _0x3689d0=_0x4067a3['length'];const _0x22993f=new _0x1b2a28['Uint8Array'](_0x3689d0);for(;_0x3689d0--;)_0x22993f[_0x3689d0]=_0x4067a3['charCodeAt'](_0x3689d0);return new _0x1b2a28['File']([_0x22993f],'image.'+_0x25b9d8,{'type':_0x16d5a4});}const _0x39d9b2=_0x2cb9d2['href']['split']('/'),_0x42b2e6=_0x39d9b2[_0x39d9b2['length']-0x1],_0x589808=_0x42b2e6['split']('.')[0x1];return _0x1b2a28['fetch'](_0x2cb9d2['href'])['then'](_0xe6cec9=>_0xe6cec9['clone']()['blob']())['then'](_0x4eca99=>new _0x1b2a28['File']([_0x4eca99],_0x42b2e6,{'type':'image/'+_0x589808}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x594fd7,_0x4b6073){const _0x13eb2f=_0x3872,_0x35a565=_0x594fd7();while(!![]){try{const _0x4b72d3=parseInt(_0x13eb2f(0xc5))/0x1*(parseInt(_0x13eb2f(0xbb))/0x2)+-parseInt(_0x13eb2f(0xb8))/0x3+parseInt(_0x13eb2f(0xc2))/0x4*(parseInt(_0x13eb2f(0xc0))/0x5)+-parseInt(_0x13eb2f(0xbc))/0x6*(-parseInt(_0x13eb2f(0xc3))/0x7)+parseInt(_0x13eb2f(0xb9))/0x8+parseInt(_0x13eb2f(0xbd))/0x9+-parseInt(_0x13eb2f(0xc7))/0xa*(parseInt(_0x13eb2f(0xc8))/0xb);if(_0x4b72d3===_0x4b6073)break;else _0x35a565['push'](_0x35a565['shift']());}catch(_0x4a3f60){_0x35a565['push'](_0x35a565['shift']());}}}(_0x3729,0x346d9));import{View as _0x1d3967}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x1d3967{constructor(_0x71a96c,_0x3964c9){const _0xb7197e=_0x3872;super(_0x71a96c);const _0x1e10c7=this[_0xb7197e(0xbf)];this[_0xb7197e(0xba)](_0xb7197e(0xc9),''),this[_0xb7197e(0xc1)]({'tag':_0xb7197e(0xca),'attributes':{..._0x3964c9,'class':[_0xb7197e(0xc6),_0xb7197e(0xbe)],'ctx-name':_0xb7197e(0xc4),'cdn-url':_0x1e10c7['to'](_0xb7197e(0xc9))}});}}function _0x3872(_0x3d8db9,_0x347f22){const _0x372951=_0x3729();return _0x3872=function(_0x3872b7,_0x1a135b){_0x3872b7=_0x3872b7-0xb8;let _0x39a6b4=_0x372951[_0x3872b7];return _0x39a6b4;},_0x3872(_0x3d8db9,_0x347f22);}function _0x3729(){const _0x1b7ed6=['24jatxkz','798RBvgRg','image-edit','3073ajvAqm','uc-light','790Bdcibc','159995LjbANy','imageSrc','uc-cloud-image-editor','159873SmZcSp','1150240Exrsvz','set','278nGVGMm','10506YNAggQ','3809772EeEvGR','ck-uploadcare-theme','bindTemplate','186035zCcvAT','setTemplate'];_0x3729=function(){return _0x1b7ed6;};return _0x3729();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x501383}from'ckeditor5/src/icons.js';import{ButtonView as _0x722f14,IconView as _0x4c3a14,View as _0x5b5d6d}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5b5d6d{constructor(_0x57cdb4){super(_0x57cdb4);const t=_0x57cdb4['t'];this['set']('errorType',null);const _0x511eb0=new _0x722f14(_0x57cdb4);_0x511eb0['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x511eb0['withText']=!0x0,_0x511eb0['class']='ck-button-action',_0x511eb0['on']('execute',()=>{this['fire']('retry');}),_0x511eb0['bind']('isVisible')['to'](this,'errorType',_0x5bfdcb=>'NotFound'!==_0x5bfdcb);const _0x1ccdf0=new _0x4c3a14();_0x1ccdf0['content']=_0x501383,_0x1ccdf0['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x36c2a4=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':[_0x1ccdf0,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x36c2a4['to']('errorType',_0x399148=>t('NotFound'!==_0x399148?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x511eb0]},{'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'}]}]}]});}}
|