@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260118.0 → 0.0.0-nightly-next-20260119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0xda497f,Command as _0x36d902}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2bf284,IconGooglePhotos as _0x58c9d7,IconGoogleDrive as _0x228d99,IconFacebook as _0x11631d,IconDropbox as _0x2556e2,IconUploadcareLink as _0x5705a0,IconUploadcareImageUpload as _0x9ac2eb,IconError as _0x20c50f,IconUploadcareImageEdit as _0x3b97e5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x40b42a,MenuBarMenuListItemButtonView as _0x103c8e,View as _0x2243c0,FocusCycler as _0x2591ac,Dialog as _0x10ba04,DialogViewPosition as _0x42b9b4,SpinnerView as _0x71f267,IconView as _0x136996,Notification as _0x111815}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x39b6ca,DomEmitterMixin as _0x354780,global as _0x30c48a,getAncestors as _0x3b75cf,ObservableMixin as _0x50810f,uid as _0x1731b3,createElement as _0x53f987}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2a96a7}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4c0254,info as _0x31520a}from'@uploadcare/upload-client';import*as _0x2ff0e8 from'@uploadcare/file-uploader';var S=function(_0x54f918){return _0x54f918['Local']='local',_0x54f918['URL']='url',_0x54f918['Dropbox']='dropbox',_0x54f918['GDrive']='gdrive',_0x54f918['Facebook']='facebook',_0x54f918['GPhotos']='gphotos',_0x54f918['OneDrive']='onedrive',_0x54f918;}({});function T(_0x43067c,_0x2090ca,_0x559ae7){const t=_0x43067c['t'],_0x524b7e=_0x43067c['t'];switch(_0x2090ca){case S['Local']:return{'text':_0x524b7e('Insert'===_0x559ae7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x524b7e('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x559ae7?_0x524b7e('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x524b7e('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x559ae7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x559ae7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x559ae7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x559ae7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x559ae7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2090ca;}}class A extends _0xda497f{['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 _0x3d4617=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x54e2ff;for(const _0x10b4af in _0x3d4617){const _0x9cac0c=_0x10b4af,_0x570626=_0x3d4617[_0x9cac0c];if('uploadcareLicenseKeyValid'==_0x570626||'uploadcareLicenseKeyInvalid'==_0x570626||'uploadcareLicenseKeyExpired'==_0x570626||'uploadcareLicenseKeyDomainLimit'==_0x570626||'uploadcareLicenseKeyNotAllowed'==_0x570626||'uploadcareLicenseKeyEvaluationLimit'==_0x570626||'uploadcareLicenseKeyUsageLimit'==_0x570626){delete _0x3d4617[_0x9cac0c],_0x54e2ff=_0x570626,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x54e2ff&&_0x3d4617['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x54e2ff&&_0x3d4617['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x54e2ff&&_0x3d4617['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x54e2ff&&_0x3d4617['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x54e2ff&&_0x3d4617['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x54e2ff&&_0x3d4617['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0xd38bdb}=this,_0x30c7d1=_0xd38bdb['commands']['get']('uploadcare');if(!_0x30c7d1)return;const _0x310233=this['_normalizeConfigSourceList'](_0xd38bdb['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4b649a,_0x212933)=>{const _0x2c4c5c=this['_getIntegrationKey'](_0x212933['type']);return _0x4b649a[_0x2c4c5c]||(_0x4b649a[_0x2c4c5c]=[]),_0x4b649a[_0x2c4c5c]['push'](_0x212933),_0x4b649a;},{});_0xd38bdb['plugins']['has']('ImageInsertUI')&&_0xd38bdb['commands']['get']('uploadcare')&&Object['entries'](_0x310233)['forEach'](([_0x4f9ffb,_0x501a9b])=>{_0xd38bdb['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4f9ffb,'observable':()=>_0x30c7d1,'buttonViewCreator':()=>this['_createToolbarButton'](_0x501a9b),'formViewCreator':()=>this['_createDropdownButtons'](_0x501a9b),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x501a9b),'override':'assetManager'!==_0x4f9ffb});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5b0c08){const {locale:_0x2a954b}=this['editor'];return _0x5b0c08['map'](_0x230e97=>{const _0x478aff=T(_0x2a954b,_0x230e97,'Insert');switch(_0x230e97){case S['Local']:return{'icon':_0x9ac2eb,'type':S['Local'],..._0x478aff};case S['URL']:return{'icon':_0x5705a0,'type':S['URL'],..._0x478aff};case S['Dropbox']:return{'icon':_0x2556e2,'type':S['Dropbox'],..._0x478aff};case S['Facebook']:return{'icon':_0x11631d,'type':S['Facebook'],..._0x478aff};case S['GDrive']:return{'icon':_0x228d99,'type':S['GDrive'],..._0x478aff};case S['GPhotos']:return{'icon':_0x58c9d7,'type':S['GPhotos'],..._0x478aff};case S['OneDrive']:return{'icon':_0x2bf284,'type':S['OneDrive'],..._0x478aff};}});}['_getIntegrationKey'](_0x524ba6){switch(_0x524ba6){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x468766,_0x34c326){const _0x3ce60f=this['editor'],_0x2854a2=new _0x468766(_0x3ce60f['locale']),_0x268c1c=_0x3ce60f['commands']['get']('uploadcare');return _0x2854a2['bind']('isEnabled')['to'](_0x268c1c),_0x2854a2['on']('execute',()=>{_0x268c1c['execute'](_0x34c326);}),_0x2854a2;}['_createToolbarButton'](_0x3b79ed){const {locale:_0x5a4e98}=this['editor'],_0x2cadbb=this['editor']['plugins']['get']('ImageInsertUI'),_0x31d973=_0x3b79ed[0x0],_0x4c34a0=this['_createButton'](_0x40b42a,_0x31d973['type']);return _0x4c34a0['icon']=_0x31d973['icon'],_0x4c34a0['bind']('label')['to'](_0x2cadbb,'isImageSelected',_0x5675ee=>T(_0x5a4e98,_0x31d973['type'],_0x5675ee?'Replace':'Insert')['text']),_0x4c34a0['tooltip']=!0x0,_0x4c34a0;}['_createDropdownButtons'](_0x457102){const {locale:_0x3d0740}=this['editor'],_0x59d0c8=this['editor']['plugins']['get']('ImageInsertUI');return _0x457102['map'](_0x11ad12=>{const _0x30a7bc=this['_createButton'](_0x40b42a,_0x11ad12['type']);return _0x30a7bc['withText']=!0x0,_0x30a7bc['icon']=_0x11ad12['icon'],_0x30a7bc['bind']('label')['to'](_0x59d0c8,'isImageSelected',_0x1afc6=>T(_0x3d0740,_0x11ad12['type'],_0x1afc6?'Replace':'Insert')['text']),_0x30a7bc;});}['_createMenuBarButtons'](_0x927eb9){return _0x927eb9['map'](_0xc1f6e8=>{const _0x51efbf=this['_createButton'](_0x103c8e,_0xc1f6e8['type']);return _0x51efbf['icon']=_0xc1f6e8['icon'],_0x51efbf['label']=_0xc1f6e8['shortText'],_0x51efbf;});}}class K extends _0x2243c0{['focusTracker'];['focusCycler'];constructor(_0x21abe6){super(_0x21abe6),this['focusTracker']=new _0x39b6ca(),this['focusCycler']=new _0x2591ac({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class O extends K{constructor(_0x7312a8,_0x3a88fb){super(_0x7312a8),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-'+_0x3a88fb}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x2ca94d,_0x53137){const _0x3eb8a8=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x1e72f5=>_0x1e72f5<=_0x53137)['map'](_0x418825=>_0x2ca94d['replace'](/\/$/,'')+'/-/resize/'+_0x418825+'x/\x20'+_0x418825+'w');return{'imageFallbackUrl':_0x2ca94d,'imageSources':[{'srcset':_0x3eb8a8['join'](',\x20'),'sizes':'(max-width:\x20'+_0x53137+'px)\x20100vw,\x20'+_0x53137+'px','type':'image/webp'}]};}function F(_0x4755c4,_0x3336a9,_0x429a03){const _0x40d37f=_0x4755c4['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x40d37f?parseInt(_0x40d37f[0x1],0xa):_0x3336a9,'height':_0x40d37f?parseInt(_0x40d37f[0x2],0xa):_0x429a03};}function $(_0x29451e,_0x60d8a1){const _0x3fc5d7=new(_0x354780())(),_0x5cb3ee=_0x29451e['plugins']['get']('ImageUtils'),_0x5defe0=_0x29451e['editing']['mapper']['toViewElement'](_0x60d8a1),_0x19db41=_0x5cb3ee['findViewImgElement'](_0x5defe0),_0x387a85=_0x29451e['editing']['view']['domConverter']['viewToDom'](_0x19db41),_0x523990=_0x60d8a1['getAttribute']('width'),_0x5198cd=_0x60d8a1['getAttribute']('height'),_0x1bcbd7='image-processing';_0x29451e['editing']['view']['change'](_0x443456=>{_0x443456['addClass'](_0x1bcbd7,_0x5defe0),_0x443456['setStyle']('aspect-ratio',_0x523990+'/'+_0x5198cd,_0x19db41);}),_0x3fc5d7['listenTo'](_0x387a85,'load',()=>{_0x3fc5d7['stopListening'](_0x387a85,'load'),_0x29451e['editing']['view']['change'](_0x443f61=>{_0x443f61['removeClass'](_0x1bcbd7,_0x5defe0),_0x443f61['removeStyle']('aspect-ratio',_0x19db41);});});}function B(_0x370ffc){if(Array['isArray'](_0x370ffc)){const _0x1d6d78=_0x370ffc['map'](B);return _0x3c6650=>_0x1d6d78['some'](_0x392453=>_0x392453(_0x3c6650));}if('origin'==_0x370ffc){const _0x538def=_0x30c48a['window']['location']['origin'];return _0x43af8c=>new URL(_0x43af8c,_0x30c48a['document']['baseURI'])['origin']==_0x538def;}return'function'==typeof _0x370ffc?_0x370ffc:_0x370ffc instanceof RegExp?_0x2159d2=>!(!_0x2159d2['match'](_0x370ffc)&&!_0x2159d2['replace'](/^https?:\/\//,'')['match'](_0x370ffc)):()=>!0x1;}function V(_0xc4617a,_0x139944){return _0x3b75cf(_0xc4617a['target'])['includes'](_0x139944);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x50810f(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x12d9c5,_0xc9c547,_0x526daf){super(),this['_editor']=_0x12d9c5,this['_editing']=_0xc9c547,this['_dialog']=_0x12d9c5['plugins']['get'](_0x10ba04),this['_api']=_0xc9c547['ctxElement']['getAPI'](),this['_type']=_0x526daf,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:_0x3ef578,model:_0x285e5c}=this['_editor'],_0x10043d=_0x285e5c['document']['selection']['getSelectedElement'](),_0x5517f4=_0x10043d&&(_0x10043d['is']('element','imageBlock')||_0x10043d['is']('element','imageInline'));this['_formView']=new O(_0x3ef578,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x9ac2eb,'title':T(_0x3ef578,this['_type'],_0x5517f4?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x42b9b4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x542738=>!V(_0x542738,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2b728e}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4230fa=>{const _0x2852ab=_0x2b728e['length'];for(const _0x291ab7 of _0x2b728e){const _0x56b903=_0x291ab7===_0x2b728e[_0x2852ab-0x1],{cdnUrl:_0x359944,fileInfo:_0x482181}=_0x291ab7;if(!_0x359944||!_0x482181)continue;const {width:_0x4b2b48,height:_0x3c36fe}=_0x482181['imageInfo'],_0x2f212f=F(_0x359944,_0x4b2b48,_0x3c36fe),_0x2f4aaf=D(_0x359944,_0x2f212f['width']),_0x46f3d9={'id':_0x482181['uuid'],'type':'image','attributes':{'imageDimension':_0x2f212f,..._0x2f4aaf}};this['_insertAsset'](_0x46f3d9,_0x56b903,_0x4230fa);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x302750=>{'idle'===_0x302750['detail']['status']&&!_0x302750['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x17cedd,_0x22577f,_0x873c4f){const _0x11c530=this['_editor']['model']['document']['selection'],_0x2a2967=_0x11c530['getSelectedElement'](),_0x57fb98=!(!_0x2a2967||!_0x2a2967['is']('element','imageInline'));_0x873c4f['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x17cedd,_0x57fb98),_0x22577f||_0x873c4f['setSelection'](_0x11c530['getLastPosition']());}['_insertImage'](_0xafabc6,_0x2b8f10){const _0x5b8585=this['_editor'],{imageDimension:_0x16ef87,imageFallbackUrl:_0x2e723e,imageSources:_0x104808}=_0xafabc6['attributes'];_0x5b8585['execute']('insertImage',{'imageType':_0x2b8f10?'imageInline':null,'source':{'uploadcareImageId':_0xafabc6['id'],'src':_0x2e723e,'sources':_0x104808,..._0x16ef87}});}}class M extends _0x36d902{['_editing'];['_controller']=null;static get['requires'](){return[_0x10ba04,z];}constructor(_0x256b42){super(_0x256b42),this['_editing']=_0x256b42['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1e3c6f){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x1e3c6f);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x312c0b,..._0x389d5e}){return _0x4c0254(_0x312c0b,_0x389d5e);}static['getInfo'](_0x4066ec,_0xf7cbe0){return _0x31520a(_0x4066ec,_0xf7cbe0);}}class W extends _0xda497f{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2a96a7,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x220282=this['editor'];if(!!!_0x220282['config']['get']('uploadcare'))return;_0x220282['plugins']['get'](_0x2a96a7)['createUploadAdapter']=_0x2e5ce9=>new G(_0x2e5ce9,_0x220282),_0x220282['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x126bb0,{imageElement:_0x2ed43b,data:_0x5e1a53})=>{_0x220282['model']['change'](_0x2acfd3=>{_0x2acfd3['setAttribute']('uploadcareImageId',_0x5e1a53['uploadcareImageId'],_0x2ed43b);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x3aeb6f,_0xa945b6){this['loader']=_0x3aeb6f,this['editor']=_0xa945b6,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x2c3189=await this['loader']['file'];return q['upload']({'file':_0x2c3189,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x3853d9=>{_0x3853d9&&_0x3853d9['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3853d9['value']);}})['then'](async _0x248223=>{const {imageFallbackUrl:_0x35eeff,imageSources:_0x46feef}=D(_0x248223['cdnUrl'],_0x248223['imageInfo']['width']);return{'uploadcareImageId':_0x248223['uuid'],'default':_0x35eeff,'sources':_0x46feef};})['catch'](()=>{const _0x1a55d8=t('Cannot\x20upload\x20file:')+('\x20'+_0x2c3189['name']+'.');return Promise['reject'](_0x1a55d8);});}['abort'](){this['controller']['abort']();}}class z extends _0xda497f{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x10ba04];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x301b92){super(_0x301b92),this['ucContextId']=_0x1731b3();}['init'](){const _0x67a753=this['editor'];_0x67a753['commands']['add']('uploadcare',new M(_0x67a753));}['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 _0x44bcc2=_0x30c48a['document']['querySelector']('input[uploadcare-file-input]');_0x44bcc2&&_0x44bcc2['remove']();}),async function(_0x470ca8){const _0x4e8852=_0x3f0369([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x503d8e=0x535f8c3a,_0x231cfa=0x5358f312^_0x503d8e,_0x2984b0=window[_0x3f0369([0x44,0x61,0x74,0x65])][_0x3f0369([0x6e,0x6f,0x77])](),_0x36f5a3=_0x470ca8[_0x3f0369([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x97283f=new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x811e8d=>{_0x36f5a3[_0x3f0369([0x6f,0x6e,0x63,0x65])](_0x3f0369([0x72,0x65,0x61,0x64,0x79]),_0x811e8d);}),_0x26a716={[_0x3f0369([0x6b,0x74,0x79])]:_0x3f0369([0x45,0x43]),[_0x3f0369([0x75,0x73,0x65])]:_0x3f0369([0x73,0x69,0x67]),[_0x3f0369([0x63,0x72,0x76])]:_0x3f0369([0x50,0x2d,0x32,0x35,0x36]),[_0x3f0369([0x78])]:_0x3f0369([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]),[_0x3f0369([0x79])]:_0x3f0369([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]),[_0x3f0369([0x61,0x6c,0x67])]:_0x3f0369([0x45,0x53,0x32,0x35,0x36])},_0x8b2e0a=_0x36f5a3[_0x3f0369([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3f0369([0x67,0x65,0x74])](_0x3f0369([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x279c11(){let _0x29fb3d,_0x2af5ea=null,_0x2ead5a=null;try{if(_0x8b2e0a==_0x3f0369([0x47,0x50,0x4c]))return _0x3f0369([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x29fb3d=_0x52d5ef(),!_0x29fb3d)return _0x3f0369([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x29fb3d[_0x3f0369([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ead5a=_0x5a4244(_0x29fb3d[_0x3f0369([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x29fb3d[_0x3f0369([0x6a,0x74,0x69])])),await _0x80e231()?_0x240644()?_0x5004e7()?_0x3f0369([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20718e()?(_0x29fb3d[_0x3f0369([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3f0369([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2af5ea=_0xb1c141(_0x3f0369([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x416977()):_0x3f0369([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3f0369([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3f0369([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3f0369([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5004e7(){const _0x215a5a=[_0x3f0369([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3f0369([0x74,0x72,0x69,0x61,0x6c])][_0x3f0369([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29fb3d[_0x3f0369([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2984b0/0x3e8:0xe10*_0x231cfa;return _0x29fb3d[_0x3f0369([0x65,0x78,0x70])]<_0x215a5a;}function _0x240644(){const _0x3f7966=_0x29fb3d[_0x3f0369([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3f7966&&(!!_0x3f7966[_0x3f0369([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f0369([0x2a]))||!!_0x3f7966[_0x3f0369([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f0369([0x55,0x50,0x4c,0x43])));}function _0x20718e(){const _0x4bed2f=_0x29fb3d[_0x3f0369([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bed2f||0x0==_0x4bed2f[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x6c418}=new URL(window[_0x3f0369([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bed2f[_0x3f0369([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6c418))return!0x0;const _0x46967e=_0x6c418[_0x3f0369([0x73,0x70,0x6c,0x69,0x74])](_0x3f0369([0x2e]));return _0x4bed2f[_0x3f0369([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xd91cb9=>_0xd91cb9[_0x3f0369([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f0369([0x2a])))[_0x3f0369([0x6d,0x61,0x70])](_0x117702=>_0x117702[_0x3f0369([0x73,0x70,0x6c,0x69,0x74])](_0x3f0369([0x2e])))[_0x3f0369([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x15d574=>_0x15d574[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46967e[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3f0369([0x6d,0x61,0x70])](_0x45d285=>Array(_0x46967e[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x45d285[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3f0369([0x66,0x69,0x6c,0x6c])](_0x45d285[0x0]===_0x3f0369([0x2a])?_0x3f0369([0x2a]):'')[_0x3f0369([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x45d285))[_0x3f0369([0x73,0x6f,0x6d,0x65])](_0x187494=>_0x46967e[_0x3f0369([0x65,0x76,0x65,0x72,0x79])]((_0xfb93f5,_0x275465)=>_0x187494[_0x275465]===_0xfb93f5||_0x187494[_0x275465]===_0x3f0369([0x2a])));}function _0x416977(){return _0x2af5ea&&_0x2ead5a?new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xecb322,_0x17082e)=>{_0x2af5ea[_0x3f0369([0x74,0x68,0x65,0x6e])](_0xecb322,_0x17082e),_0x2ead5a[_0x3f0369([0x74,0x68,0x65,0x6e])](_0x23dba3=>{_0x23dba3!=_0x3f0369([0x56,0x61,0x6c,0x69,0x64])&&_0xecb322(_0x23dba3);},_0x17082e);}):_0x2af5ea||_0x2ead5a||_0x3f0369([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5a4244(_0x53a238,_0x12df0d){return new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x489262=>{if(_0x59d8d8())return _0x489262(_0x3f0369([0x56,0x61,0x6c,0x69,0x64]));_0x24a3b0(),_0x36f5a3[_0x3f0369([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3f0369([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4edfcc=!0x1;const _0x5cc64a=_0x1731b3();function _0x115460(_0x29763c){return!!_0x29763c&&(typeof _0x29763c===_0x3f0369([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x29763c===_0x3f0369([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x29763c[_0x3f0369([0x74,0x68,0x65,0x6e])]===_0x3f0369([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x29763c[_0x3f0369([0x63,0x61,0x74,0x63,0x68])]===_0x3f0369([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x242d36(_0x509514){_0x1324cf(_0x509514)[_0x3f0369([0x74,0x68,0x65,0x6e])](_0x50cb45=>{if(!_0x50cb45||_0x50cb45[_0x3f0369([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3f0369([0x6f,0x6b]))return _0x3f0369([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xf7079b(_0xf89b1f(_0x5cc64a+_0x12df0d))!=_0x50cb45[_0x3f0369([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3f0369([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3f0369([0x56,0x61,0x6c,0x69,0x64]);})[_0x3f0369([0x74,0x68,0x65,0x6e])](_0x25ac06=>(_0x4ca25f(),_0x25ac06),()=>{const _0x2a69e6=_0x4dfe05();return null==_0x2a69e6?(_0x4ca25f(),_0x3f0369([0x56,0x61,0x6c,0x69,0x64])):_0x3f0369(_0x2984b0-_0x2a69e6>(0x7753083a^_0x503d8e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3f0369([0x74,0x68,0x65,0x6e])](_0x489262)[_0x3f0369([0x63,0x61,0x74,0x63,0x68])](()=>{_0x489262(_0x3f0369([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x113ff3=0x536962ba^_0x503d8e;function _0x4ca25f(){const _0x1e80ad=_0x3f0369([0x6c,0x6c,0x63,0x74,0x2d])+_0xf7079b(_0xf89b1f(_0x53a238)),_0x597a1c=_0x57521c(_0xf7079b(window[_0x3f0369([0x4d,0x61,0x74,0x68])][_0x3f0369([0x63,0x65,0x69,0x6c])](_0x2984b0/_0x113ff3)));window[_0x3f0369([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3f0369([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e80ad,_0x597a1c);}function _0x4dfe05(){const _0x370a17=_0x3f0369([0x6c,0x6c,0x63,0x74,0x2d])+_0xf7079b(_0xf89b1f(_0x53a238)),_0x12efb8=window[_0x3f0369([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3f0369([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x370a17);return _0x12efb8?window[_0x3f0369([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57521c(_0x12efb8),0x10)*_0x113ff3:null;}function _0x1324cf(_0x85bbbf){return new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3dabed,_0x568af4)=>{_0x85bbbf[_0x3f0369([0x74,0x68,0x65,0x6e])](_0x3dabed,_0x568af4),window[_0x3f0369([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x568af4,0x535e58fa^_0x503d8e);});}}_0x36f5a3[_0x3f0369([0x6f,0x6e])](_0x3f0369([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x54150a,_0x20d7f9)=>{if(_0x20d7f9[0x0]!=_0x53a238)return _0x489262(_0x3f0369([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x20d7f9[0x1]={..._0x20d7f9[0x1],[_0x3f0369([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5cc64a};},{[_0x3f0369([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3f0369([0x68,0x69,0x67,0x68])}),_0x36f5a3[_0x3f0369([0x6f,0x6e])](_0x3f0369([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x19ed94=>{_0x115460(_0x19ed94[_0x3f0369([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4edfcc=!0x0,_0x242d36(_0x19ed94[_0x3f0369([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3f0369([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3f0369([0x6c,0x6f,0x77])}),_0x97283f[_0x3f0369([0x74,0x68,0x65,0x6e])](()=>{_0x4edfcc||_0x489262(_0x3f0369([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x59d8d8(){return _0x36f5a3[_0x3f0369([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3f0369([0x76,0x69,0x65,0x77])][_0x3f0369([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3f0369([0x61,0x75,0x74,0x6f]);}function _0x24a3b0(){_0x36f5a3[_0x3f0369([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3f0369([0x76,0x69,0x65,0x77])][_0x3f0369([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3f0369([0x61,0x75,0x74,0x6f]);}}function _0xb1c141(_0x47ce6e){const _0x5700b0=[new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x988978=>setTimeout(_0x988978,0x5356b2f6^_0x503d8e)),_0x97283f[_0x3f0369([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10f180=>{let _0x3c03c9=0x0;_0x36f5a3[_0x3f0369([0x6d,0x6f,0x64,0x65,0x6c])][_0x3f0369([0x6f,0x6e])](_0x3f0369([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x555829,_0x6d95a0)=>{_0x6d95a0[0x0][_0x3f0369([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3c03c9++,_0x3c03c9==(0x535f89d2^_0x503d8e)&&(_0x10f180(),_0x555829[_0x3f0369([0x6f,0x66,0x66])]());});}))];return window[_0x3f0369([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3f0369([0x72,0x61,0x63,0x65])](_0x5700b0)[_0x3f0369([0x74,0x68,0x65,0x6e])](()=>_0x47ce6e);}async function _0xecd50(){await _0x97283f,_0x36f5a3[_0x3f0369([0x6d,0x6f,0x64,0x65,0x6c])][_0x3f0369([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4cca49,_0x36f5a3[_0x3f0369([0x6d,0x6f,0x64,0x65,0x6c])][_0x3f0369([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4cca49,_0x36f5a3[_0x3f0369([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3f0369([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18ff23(_0x33d4c6){const _0xde27b6=_0x535609();_0x36f5a3[_0xde27b6]=_0x3f0369([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33d4c6,_0x33d4c6!=_0x3f0369([0x56,0x61,0x6c,0x69,0x64])&&_0xecd50();}function _0x535609(){const _0x3774ad=window[_0x3f0369([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3f0369([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3f0369([0x6e,0x6f,0x77])]())[_0x3f0369([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3f0369([0x2e]),'');let _0x56ef8=_0x3f0369([0x68]);for(let _0x22efdc=0x0;_0x22efdc<_0x3774ad[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22efdc+=0x2){let _0x5a0028=window[_0x3f0369([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3774ad[_0x3f0369([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22efdc,_0x22efdc+0x2));_0x5a0028>=_0x4e8852[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5a0028-=_0x4e8852[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x56ef8+=_0x4e8852[_0x5a0028];}return _0x56ef8;}function _0x52d5ef(){const _0xe72cd=_0x8b2e0a[_0x3f0369([0x73,0x70,0x6c,0x69,0x74])](_0x3f0369([0x2e]));if(0x3!=_0xe72cd[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2d6df6(_0xe72cd[0x1]);function _0x2d6df6(_0x2b8bd7){const _0x4bfa64=_0x4f63de(_0x2b8bd7);return _0x4bfa64&&_0x2debd7()?_0x4bfa64:null;function _0x2debd7(){const _0x4dc016=_0x4bfa64[_0x3f0369([0x6a,0x74,0x69])],_0x43e09a=window[_0x3f0369([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4dc016[_0x3f0369([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4dc016[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3508cf={..._0x4bfa64,[_0x3f0369([0x6a,0x74,0x69])]:_0x4dc016[_0x3f0369([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4dc016[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3508cf[_0x3f0369([0x76,0x63])],_0xf89b1f(_0x3508cf)==_0x43e09a;}}}async function _0x80e231(){let _0x202584=!0x0;try{const _0x2c60d9=_0x8b2e0a[_0x3f0369([0x73,0x70,0x6c,0x69,0x74])](_0x3f0369([0x2e])),[_0x597529,_0x258d6c,_0x75fd11]=_0x2c60d9;return _0x5b4430(_0x597529),await _0x477356(_0x597529,_0x258d6c,_0x75fd11),_0x202584;}catch{return!0x1;}function _0x5b4430(_0x33b0d6){const _0x496dcf=_0x4f63de(_0x33b0d6);_0x496dcf&&_0x496dcf[_0x3f0369([0x61,0x6c,0x67])]==_0x3f0369([0x45,0x53,0x32,0x35,0x36])||(_0x202584=!0x1);}async function _0x477356(_0x2a8e9d,_0x38de4e,_0x1252d0){const _0x10d13b=window[_0x3f0369([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3f0369([0x66,0x72,0x6f,0x6d])](_0x5e4267(_0x1252d0),_0x1737b6=>_0x1737b6[_0x3f0369([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4e2b70=new window[(_0x3f0369([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3f0369([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2a8e9d+_0x3f0369([0x2e])+_0x38de4e),_0x8da556=window[_0x3f0369([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3f0369([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x8da556)return;const _0x32b2b1=await _0x8da556[_0x3f0369([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3f0369([0x6a,0x77,0x6b]),_0x26a716,{[_0x3f0369([0x6e,0x61,0x6d,0x65])]:_0x3f0369([0x45,0x43,0x44,0x53,0x41]),[_0x3f0369([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3f0369([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3f0369([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x8da556[_0x3f0369([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3f0369([0x6e,0x61,0x6d,0x65])]:_0x3f0369([0x45,0x43,0x44,0x53,0x41]),[_0x3f0369([0x68,0x61,0x73,0x68])]:{[_0x3f0369([0x6e,0x61,0x6d,0x65])]:_0x3f0369([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32b2b1,_0x10d13b,_0x4e2b70)||(_0x202584=!0x1);}}function _0x4f63de(_0x3d7bf6){return _0x3d7bf6[_0x3f0369([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3f0369([0x65,0x79]))?JSON[_0x3f0369([0x70,0x61,0x72,0x73,0x65])](_0x5e4267(_0x3d7bf6)):null;}function _0x5e4267(_0x405608){return window[_0x3f0369([0x61,0x74,0x6f,0x62])](_0x405608[_0x3f0369([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3f0369([0x2b]))[_0x3f0369([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3f0369([0x2f])));}function _0xf89b1f(_0x3c1013){let _0x5a0d55=0x1505;function _0x2c2e62(_0x51b0e9){for(let _0x29d202=0x0;_0x29d202<_0x51b0e9[_0x3f0369([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x29d202++){const _0x3edcb8=_0x51b0e9[_0x3f0369([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x29d202);_0x5a0d55=(_0x5a0d55<<0x5)+_0x5a0d55+_0x3edcb8,_0x5a0d55&=_0x5a0d55;}}function _0xbe72eb(_0x1dd88d){Array[_0x3f0369([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1dd88d)?_0x1dd88d[_0x3f0369([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xbe72eb):_0x1dd88d&&typeof _0x1dd88d==_0x3f0369([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3f0369([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1dd88d)[_0x3f0369([0x73,0x6f,0x72,0x74])]()[_0x3f0369([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x36b798,_0x497810])=>{_0x2c2e62(_0x36b798),_0xbe72eb(_0x497810);}):_0x2c2e62(window[_0x3f0369([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1dd88d));}return _0xbe72eb(_0x3c1013),_0x5a0d55>>>0x0;}function _0xf7079b(_0x1580e8){return _0x1580e8[_0x3f0369([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3f0369([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3f0369([0x30]));}function _0x57521c(_0x10a151){return _0x10a151[_0x3f0369([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3f0369([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3f0369([0x6a,0x6f,0x69,0x6e])]('');}function _0x4cca49(){}function _0x3f0369(_0x827ffc){return _0x827ffc['map'](_0x53c1ca=>String['fromCharCode'](_0x53c1ca))['join']('');}_0x18ff23(await _0x279c11());}(this);}['_initSchema'](){const _0x260f8c=this['editor']['model']['schema'];_0x260f8c['isRegistered']('imageBlock')&&_0x260f8c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x260f8c['isRegistered']('imageInline')&&_0x260f8c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2518f5=this['editor'];_0x2518f5['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2518f5['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x28a5cd=>_0x28a5cd['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x141775=_0x2518f5['commands']['get']('replaceImageSource');_0x141775&&this['listenTo'](_0x141775,'cleanupImage',(_0x5dbb01,[_0x3c092d,_0x225c3d])=>{_0x3c092d['removeAttribute']('uploadcareImageId',_0x225c3d);});}['_initConfig'](){const _0xbaa8e1=this['editor']['config']['get']('uploadcare.uploader')||{},_0x171e22=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x53f987(_0x30c48a['document'],'uc-config',{..._0xbaa8e1,'pubkey':_0x171e22,'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']=_0x1bb2fa=>{if('closeMax'==_0x1bb2fa)return'#uc-icon-arrow-down';},_0x30c48a['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x53f987(_0x30c48a['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x30c48a['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1fedfb=this['editor']['commands']['get']('insertImage');_0x1fedfb&&this['listenTo'](_0x1fedfb,'execute',()=>{const _0x3b207d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3b207d&&_0x3b207d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x3b207d);});});const _0xb06d30=this['editor']['commands']['get']('uploadcareImageReplace');_0xb06d30&&this['listenTo'](_0xb06d30,'execute',()=>{const _0x2b9eb5=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2b9eb5&&_0x2b9eb5['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x2b9eb5);});});}}class H extends _0xda497f{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29a1ac){super(_0x29a1ac),_0x29a1ac['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x2ff0e8['defineComponents'](_0x2ff0e8),this['_defineLocale']();}['_defineLocale'](){const _0x2fac86=this['editor']['config']['get']('uploadcare.locale'),_0x3a74a0=this['editor']['locale']['contentLanguage'];_0x2fac86&&_0x2ff0e8['defineLocale'](_0x3a74a0,_0x2fac86);}}class J extends _0x2243c0{constructor(_0x4c7341){super(_0x4c7341);const t=_0x4c7341['t'],_0x29d2cd=this['bindTemplate'],_0x4a19b7=new _0x71f267();_0x4a19b7['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':[_0x4a19b7,{'text':_0x29d2cd['to']('imageUploadProgress',_0xc238cf=>t('Loading\x20image...')+'\x20('+(_0xc238cf||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class Z extends _0x2243c0{constructor(_0x17d608){super(_0x17d608);const t=_0x17d608['t'];this['set']('errorType',null);const _0x446e99=new _0x40b42a(_0x17d608);_0x446e99['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x446e99['withText']=!0x0,_0x446e99['class']='ck-button-action',_0x446e99['on']('execute',()=>{this['fire']('retry');}),_0x446e99['bind']('isVisible')['to'](this,'errorType',_0x5102ce=>'NotFound'!==_0x5102ce);const _0x29b54f=new _0x136996();_0x29b54f['content']=_0x20c50f,_0x29b54f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5433b2=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':[_0x29b54f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5433b2['to']('errorType',_0x5c38de=>t('NotFound'!==_0x5c38de?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x446e99]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class Q extends _0x2243c0{constructor(_0x5712ac,_0x4fc478){super(_0x5712ac);const _0x3f6951=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4fc478,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3f6951['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2b0b24,_0x38fb93,_0xb625cb){super(_0x2b0b24),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x2b0b24),this['_errorView']=new Z(_0x2b0b24),this['_editingView']=new Q(_0x2b0b24,_0xb625cb),this['_focusableView']=new _0x2243c0(_0x2b0b24),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x38fb93),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'],_0x1fc75f=>{this['_addUploadcareImageEditorListeners'](_0x1fc75f);});}),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'](_0x2e8817,_0x2ba3a3){const _0x50f6cf='uc-cloud-image-editor',_0x25f2c8=_0x2e8817['querySelector'](_0x50f6cf);if(_0x25f2c8)return _0x2ba3a3(_0x25f2c8);const _0x1bf181=new MutationObserver(_0x1565e4=>{const _0x4b4456=_0x1565e4['filter'](_0x26fd7=>_0x26fd7['target']===_0x2e8817&&_0x26fd7['addedNodes']['length']>0x0&&_0x26fd7['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x50f6cf);_0x4b4456['length']&&(_0x1bf181['disconnect'](),_0x2ba3a3(_0x4b4456[0x0]['addedNodes'][0x0]));});_0x1bf181['observe'](_0x2e8817,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x109aad){_0x109aad['addEventListener']('apply',_0x5403a9=>{this['fire']('apply',{'imageSrc':_0x5403a9['detail']['cdnUrl']});}),_0x109aad['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x50810f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2448a9,_0x4dd7e2,_0x1fc418){super(),this['_editor']=_0x2448a9,this['_dialog']=_0x4dd7e2,this['_imageElement']=_0x1fc418,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 _0x33b107=this['_imageElement'],_0x49202d=_0x33b107['getAttribute']('uploadcareImageId'),_0x910ac=_0x33b107['getAttribute']('src');if(_0x49202d)await this['_loadImageInfo'](_0x49202d,_0x910ac);else{if(this['_imageCache']['has'](_0x910ac)){const _0x3fdc67=this['_imageCache']['get'](_0x910ac);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3fdc67['url'],this['imageDimension']=_0x3fdc67['dimension'],this['imageId']=_0x3fdc67['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4cd4d9}=this['_editor'],t=_0x4cd4d9['t'],_0x38683b=new X(_0x4cd4d9,this['imageStatus'],this['_attributes']);_0x38683b['bind']('status')['to'](this,'imageStatus'),_0x38683b['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x38683b['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x38683b['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x38683b,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3b97e5,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x38683b,'position':_0x42b9b4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x38683b['focus']();},'onHide':()=>{_0x38683b['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x58e062=>!V(_0x58e062,_0x38683b['element'])}});}['_loadImageInfo'](_0x750f3c,_0x579286){return q['getInfo'](_0x750f3c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x4f9ac8=>{const {width:_0x1987ff,height:_0x270c1b}=_0x4f9ac8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x579286,this['imageDimension']={'width':_0x1987ff,'height':_0x270c1b},this['imageId']=_0x750f3c;})['catch'](_0x23c4d4=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x23c4d4['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x185987,_0x41d65c){return this['_getImageAsFile'](_0x185987)['then'](_0x412bd7=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x41d65c['signal'],'file':_0x412bd7,'onProgress':_0x15ab0f=>{_0x15ab0f&&_0x15ab0f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x15ab0f['value']));}}))['then'](_0x5b31f5=>{const {width:_0x49c8f2,height:_0x2b6742}=_0x5b31f5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5b31f5['cdnUrl'],this['imageDimension']={'width':_0x49c8f2,'height':_0x2b6742},this['imageId']=_0x5b31f5['uuid'],this['imageUploadProgress']=null;const _0x38ed2b=_0x185987['getAttribute']('src');this['_imageCache']['set'](_0x38ed2b,{'id':_0x5b31f5['uuid'],'url':_0x5b31f5['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x6e212a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x6e212a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1ba7b0,_0x33ca53){_0x1ba7b0['on']('apply',(_0x4b296c,_0x323848)=>{this['_replaceImage'](_0x33ca53,_0x323848['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1ba7b0['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1ba7b0['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3f567a,_0x4d03be,_0x462064){const _0x168619=this['_editor'],{width:_0x237aee,height:_0xe884f4}=F(_0x4d03be,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4da7f5,imageSources:_0x384a78}=D(_0x4d03be,_0x237aee);_0x168619['model']['change'](_0x51a6fa=>{if('$graveyard'===_0x3f567a['root']['rootName']){_0x168619['execute']('insertImage',{'imageType':_0x3f567a['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3f567a['getAttributes']()),'uploadcareImageId':_0x462064,'src':_0x4da7f5,'sources':_0x384a78,'width':_0x237aee,'height':_0xe884f4}});const _0x5e8908=_0x3f567a['getChildren']();_0x3f567a=_0x168619['model']['document']['selection']['getSelectedElement']();for(const _0x49f768 of _0x5e8908)_0x51a6fa['append'](_0x51a6fa['cloneElement'](_0x49f768),_0x3f567a);}else _0x51a6fa['setSelection'](_0x3f567a,'on'),_0x168619['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3f567a['getAttributes']()),'uploadcareImageId':_0x462064,'src':_0x4da7f5,'sources':_0x384a78,'width':_0x237aee,'height':_0xe884f4},_0x3f567a);_0x51a6fa['setSelection'](_0x3f567a,'on');});}async['_getImageAsFile'](_0x16b00c){const _0x2874ac=_0x30c48a['window'],_0x4dab0c=_0x30c48a['document']['location']['href'],_0x179c1d=new _0x2874ac['URL'](_0x16b00c['getAttribute']('src'),_0x4dab0c);if('data:'===_0x179c1d['protocol']){const _0x22bbd3=_0x179c1d['href']['split'](','),_0x23ffc8=_0x22bbd3[0x0]['match'](/:(.*?);/)[0x1],_0x5509a2=_0x23ffc8['split']('/')[0x1],_0x5c8723=_0x2874ac['atob'](_0x22bbd3[_0x22bbd3['length']-0x1]);let _0x4d3dcb=_0x5c8723['length'];const _0x4a90e8=new _0x2874ac['Uint8Array'](_0x4d3dcb);for(;_0x4d3dcb--;)_0x4a90e8[_0x4d3dcb]=_0x5c8723['charCodeAt'](_0x4d3dcb);return new _0x2874ac['File']([_0x4a90e8],'image.'+_0x5509a2,{'type':_0x23ffc8});}const _0x1ffd01=_0x179c1d['href']['split']('/'),_0x30e839=_0x1ffd01[_0x1ffd01['length']-0x1],_0x1c7630=_0x30e839['split']('.')[0x1];return _0x2874ac['fetch'](_0x179c1d['href'])['then'](_0x1b4f19=>_0x1b4f19['clone']()['blob']())['then'](_0x33ccf7=>new _0x2874ac['File']([_0x33ccf7],_0x30e839,{'type':'image/'+_0x1c7630}));}}class tt extends _0x36d902{['imageEditController'];static get['requires'](){return[_0x10ba04];}['_isEditable'];constructor(_0x1321c1){super(_0x1321c1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4e0a8b){const _0x16fe88=B(_0x4e0a8b);return _0x13ec3e=>!(!_0x13ec3e||!_0x13ec3e['is']('element','imageBlock')&&!_0x13ec3e['is']('element','imageInline'))&&(!!_0x13ec3e['hasAttribute']('uploadcareImageId')||!!_0x13ec3e['hasAttribute']('src')&&_0x16fe88(_0x13ec3e['getAttribute']('src')));}(_0x1321c1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x5688a3=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x5688a3);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x182737=this['editor']['model']['document']['selection']['getSelectedElement']();_0x182737&&(_0x182737['is']('element','imageBlock')||_0x182737['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x10ba04),_0x182737),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x36d902{['refresh'](){const _0x3433ce=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3433ce&&(_0x3433ce['is']('element','imageBlock')||_0x3433ce['is']('element','imageInline')));}['execute'](_0x2a0156){const _0x5c8490=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3bed79=>{_0x3bed79['setAttributes'](_0x2a0156,_0x5c8490),_0x3bed79['removeAttribute']('srcset',_0x5c8490),_0x3bed79['removeAttribute']('sizes',_0x5c8490);});}}class it extends _0xda497f{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x111815,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3ab1b2}=this;_0x3ab1b2['commands']['add']('uploadcareImageEdit',new tt(_0x3ab1b2)),_0x3ab1b2['commands']['add']('uploadcareImageReplace',new et(_0x3ab1b2));}}class st extends _0xda497f{['_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 _0x165336=this['editor'];_0x165336['ui']['componentFactory']['add']('uploadcareImageEdit',_0x39674b=>{const _0x1cbecf=_0x165336['commands']['get']('uploadcareImageEdit'),_0x1bf430=new _0x40b42a(_0x39674b),t=_0x39674b['t'];return _0x1bf430['set']({'icon':_0x3b97e5,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1bf430['bind']('isEnabled')['to'](_0x1cbecf),_0x1bf430['bind']('isOn')['to'](_0x1cbecf,'isActive'),this['listenTo'](_0x1bf430,'execute',()=>{_0x165336['execute']('uploadcareImageEdit'),_0x165336['editing']['view']['focus']();}),_0x1bf430;}),this['_initConfig']();}['_initConfig'](){const _0x161a8c=_0x53f987(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x161a8c),this['listenTo'](this['editor'],'destroy',()=>{_0x161a8c['remove']();});}}class nt extends _0xda497f{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x521f17,Command as _0x30df83}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x9247a,IconGooglePhotos as _0x59a9b6,IconGoogleDrive as _0x2de0bf,IconFacebook as _0x63468f,IconDropbox as _0x27b305,IconUploadcareLink as _0x4f8a02,IconUploadcareImageUpload as _0x33152e,IconError as _0x542478,IconUploadcareImageEdit as _0x3f8b15}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1f56d8,MenuBarMenuListItemButtonView as _0x12b511,View as _0x4d5d2c,FocusCycler as _0x3cfafe,Dialog as _0x1a4abd,DialogViewPosition as _0x3cfb73,SpinnerView as _0x54f70c,IconView as _0x55ff67,Notification as _0x454319}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x49d230,DomEmitterMixin as _0x11f777,global as _0xba4554,getAncestors as _0x1368fe,ObservableMixin as _0x241f84,uid as _0x43528f,createElement as _0x3b538e}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xf4f0f4}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2e98ee,info as _0x41f858}from'@uploadcare/upload-client';import*as _0x39459d from'@uploadcare/file-uploader';var S=function(_0x269e33){return _0x269e33['Local']='local',_0x269e33['URL']='url',_0x269e33['Dropbox']='dropbox',_0x269e33['GDrive']='gdrive',_0x269e33['Facebook']='facebook',_0x269e33['GPhotos']='gphotos',_0x269e33['OneDrive']='onedrive',_0x269e33;}({});function T(_0x1cca5b,_0x2a175d,_0xc60196){const t=_0x1cca5b['t'],_0x2d4485=_0x1cca5b['t'];switch(_0x2a175d){case S['Local']:return{'text':_0x2d4485('Insert'===_0xc60196?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x2d4485('From\x20computer')};case S['URL']:return{'text':'Insert'===_0xc60196?_0x2d4485('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x2d4485('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0xc60196?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0xc60196?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0xc60196?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0xc60196?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0xc60196?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2a175d;}}class A extends _0x521f17{['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 _0x4e6021=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1d190e;for(const _0x47debd in _0x4e6021){const _0x12c896=_0x47debd,_0x160146=_0x4e6021[_0x12c896];if('uploadcareLicenseKeyValid'==_0x160146||'uploadcareLicenseKeyInvalid'==_0x160146||'uploadcareLicenseKeyExpired'==_0x160146||'uploadcareLicenseKeyDomainLimit'==_0x160146||'uploadcareLicenseKeyNotAllowed'==_0x160146||'uploadcareLicenseKeyEvaluationLimit'==_0x160146||'uploadcareLicenseKeyUsageLimit'==_0x160146){delete _0x4e6021[_0x12c896],_0x1d190e=_0x160146,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1d190e&&_0x4e6021['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1d190e&&_0x4e6021['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1d190e&&_0x4e6021['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1d190e&&_0x4e6021['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1d190e&&_0x4e6021['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1d190e&&_0x4e6021['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5f2650}=this,_0x4957f8=_0x5f2650['commands']['get']('uploadcare');if(!_0x4957f8)return;const _0x5a9d50=this['_normalizeConfigSourceList'](_0x5f2650['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x22c2d7,_0x244e8c)=>{const _0xc14a06=this['_getIntegrationKey'](_0x244e8c['type']);return _0x22c2d7[_0xc14a06]||(_0x22c2d7[_0xc14a06]=[]),_0x22c2d7[_0xc14a06]['push'](_0x244e8c),_0x22c2d7;},{});_0x5f2650['plugins']['has']('ImageInsertUI')&&_0x5f2650['commands']['get']('uploadcare')&&Object['entries'](_0x5a9d50)['forEach'](([_0x25755b,_0x351e71])=>{_0x5f2650['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x25755b,'observable':()=>_0x4957f8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x351e71),'formViewCreator':()=>this['_createDropdownButtons'](_0x351e71),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x351e71),'override':'assetManager'!==_0x25755b});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x44fa34){const {locale:_0x312ef2}=this['editor'];return _0x44fa34['map'](_0x38c654=>{const _0x2c280b=T(_0x312ef2,_0x38c654,'Insert');switch(_0x38c654){case S['Local']:return{'icon':_0x33152e,'type':S['Local'],..._0x2c280b};case S['URL']:return{'icon':_0x4f8a02,'type':S['URL'],..._0x2c280b};case S['Dropbox']:return{'icon':_0x27b305,'type':S['Dropbox'],..._0x2c280b};case S['Facebook']:return{'icon':_0x63468f,'type':S['Facebook'],..._0x2c280b};case S['GDrive']:return{'icon':_0x2de0bf,'type':S['GDrive'],..._0x2c280b};case S['GPhotos']:return{'icon':_0x59a9b6,'type':S['GPhotos'],..._0x2c280b};case S['OneDrive']:return{'icon':_0x9247a,'type':S['OneDrive'],..._0x2c280b};}});}['_getIntegrationKey'](_0x529bc4){switch(_0x529bc4){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x258df8,_0x1e2f0f){const _0x1d6ddb=this['editor'],_0x418ef6=new _0x258df8(_0x1d6ddb['locale']),_0x44e7d1=_0x1d6ddb['commands']['get']('uploadcare');return _0x418ef6['bind']('isEnabled')['to'](_0x44e7d1),_0x418ef6['on']('execute',()=>{_0x44e7d1['execute'](_0x1e2f0f);}),_0x418ef6;}['_createToolbarButton'](_0x2c6936){const {locale:_0x441630}=this['editor'],_0x30dcaa=this['editor']['plugins']['get']('ImageInsertUI'),_0x8622b6=_0x2c6936[0x0],_0x238a3a=this['_createButton'](_0x1f56d8,_0x8622b6['type']);return _0x238a3a['icon']=_0x8622b6['icon'],_0x238a3a['bind']('label')['to'](_0x30dcaa,'isImageSelected',_0x44b141=>T(_0x441630,_0x8622b6['type'],_0x44b141?'Replace':'Insert')['text']),_0x238a3a['tooltip']=!0x0,_0x238a3a;}['_createDropdownButtons'](_0x40c8f8){const {locale:_0x3aee16}=this['editor'],_0x54ada5=this['editor']['plugins']['get']('ImageInsertUI');return _0x40c8f8['map'](_0xa37dd3=>{const _0x377141=this['_createButton'](_0x1f56d8,_0xa37dd3['type']);return _0x377141['withText']=!0x0,_0x377141['icon']=_0xa37dd3['icon'],_0x377141['bind']('label')['to'](_0x54ada5,'isImageSelected',_0x144c1c=>T(_0x3aee16,_0xa37dd3['type'],_0x144c1c?'Replace':'Insert')['text']),_0x377141;});}['_createMenuBarButtons'](_0x13dc31){return _0x13dc31['map'](_0x3a84d0=>{const _0x14f0cf=this['_createButton'](_0x12b511,_0x3a84d0['type']);return _0x14f0cf['icon']=_0x3a84d0['icon'],_0x14f0cf['label']=_0x3a84d0['shortText'],_0x14f0cf;});}}class K extends _0x4d5d2c{['focusTracker'];['focusCycler'];constructor(_0x4406ef){super(_0x4406ef),this['focusTracker']=new _0x49d230(),this['focusCycler']=new _0x3cfafe({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class O extends K{constructor(_0x454a7d,_0x57e7f7){super(_0x454a7d),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-'+_0x57e7f7}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x235e55,_0x12e383){const _0x5c6295=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4d14b1=>_0x4d14b1<=_0x12e383)['map'](_0x4b0d39=>_0x235e55['replace'](/\/$/,'')+'/-/resize/'+_0x4b0d39+'x/\x20'+_0x4b0d39+'w');return{'imageFallbackUrl':_0x235e55,'imageSources':[{'srcset':_0x5c6295['join'](',\x20'),'sizes':'(max-width:\x20'+_0x12e383+'px)\x20100vw,\x20'+_0x12e383+'px','type':'image/webp'}]};}function F(_0x54ab82,_0x37ee88,_0x436e49){const _0x1ba6bd=_0x54ab82['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1ba6bd?parseInt(_0x1ba6bd[0x1],0xa):_0x37ee88,'height':_0x1ba6bd?parseInt(_0x1ba6bd[0x2],0xa):_0x436e49};}function $(_0x2b7362,_0x1193ad){const _0x5a3c59=new(_0x11f777())(),_0x571135=_0x2b7362['plugins']['get']('ImageUtils'),_0x3eacbb=_0x2b7362['editing']['mapper']['toViewElement'](_0x1193ad),_0x9b9237=_0x571135['findViewImgElement'](_0x3eacbb),_0x158a70=_0x2b7362['editing']['view']['domConverter']['viewToDom'](_0x9b9237),_0x303fb1=_0x1193ad['getAttribute']('width'),_0x2895ce=_0x1193ad['getAttribute']('height'),_0x1912f7='image-processing';_0x2b7362['editing']['view']['change'](_0x507e3c=>{_0x507e3c['addClass'](_0x1912f7,_0x3eacbb),_0x507e3c['setStyle']('aspect-ratio',_0x303fb1+'/'+_0x2895ce,_0x9b9237);}),_0x5a3c59['listenTo'](_0x158a70,'load',()=>{_0x5a3c59['stopListening'](_0x158a70,'load'),_0x2b7362['editing']['view']['change'](_0xb4ff39=>{_0xb4ff39['removeClass'](_0x1912f7,_0x3eacbb),_0xb4ff39['removeStyle']('aspect-ratio',_0x9b9237);});});}function B(_0x4120f9){if(Array['isArray'](_0x4120f9)){const _0xb25b2c=_0x4120f9['map'](B);return _0x4598a2=>_0xb25b2c['some'](_0x12850a=>_0x12850a(_0x4598a2));}if('origin'==_0x4120f9){const _0x53e416=_0xba4554['window']['location']['origin'];return _0x55e145=>new URL(_0x55e145,_0xba4554['document']['baseURI'])['origin']==_0x53e416;}return'function'==typeof _0x4120f9?_0x4120f9:_0x4120f9 instanceof RegExp?_0x21f54e=>!(!_0x21f54e['match'](_0x4120f9)&&!_0x21f54e['replace'](/^https?:\/\//,'')['match'](_0x4120f9)):()=>!0x1;}function V(_0x4e2367,_0x4a33be){return _0x1368fe(_0x4e2367['target'])['includes'](_0x4a33be);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x241f84(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x339d20,_0x519080,_0x140e0c){super(),this['_editor']=_0x339d20,this['_editing']=_0x519080,this['_dialog']=_0x339d20['plugins']['get'](_0x1a4abd),this['_api']=_0x519080['ctxElement']['getAPI'](),this['_type']=_0x140e0c,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:_0x49b123,model:_0x2ad541}=this['_editor'],_0x3d8f1d=_0x2ad541['document']['selection']['getSelectedElement'](),_0x1d97ea=_0x3d8f1d&&(_0x3d8f1d['is']('element','imageBlock')||_0x3d8f1d['is']('element','imageInline'));this['_formView']=new O(_0x49b123,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x33152e,'title':T(_0x49b123,this['_type'],_0x1d97ea?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x3cfb73['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x51d9b2=>!V(_0x51d9b2,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1ea8f9}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1dcafc=>{const _0x1fb8b0=_0x1ea8f9['length'];for(const _0x2c228d of _0x1ea8f9){const _0x515d2a=_0x2c228d===_0x1ea8f9[_0x1fb8b0-0x1],{cdnUrl:_0x492c22,fileInfo:_0x15f3ae}=_0x2c228d;if(!_0x492c22||!_0x15f3ae)continue;const {width:_0x124246,height:_0x451726}=_0x15f3ae['imageInfo'],_0x3ea0f1=F(_0x492c22,_0x124246,_0x451726),_0x1cdaf9=D(_0x492c22,_0x3ea0f1['width']),_0x3c11d2={'id':_0x15f3ae['uuid'],'type':'image','attributes':{'imageDimension':_0x3ea0f1,..._0x1cdaf9}};this['_insertAsset'](_0x3c11d2,_0x515d2a,_0x1dcafc);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x3bf6cb=>{'idle'===_0x3bf6cb['detail']['status']&&!_0x3bf6cb['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1e2bf0,_0x553dca,_0x501465){const _0x14cf1e=this['_editor']['model']['document']['selection'],_0x1ef8f5=_0x14cf1e['getSelectedElement'](),_0x296215=!(!_0x1ef8f5||!_0x1ef8f5['is']('element','imageInline'));_0x501465['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1e2bf0,_0x296215),_0x553dca||_0x501465['setSelection'](_0x14cf1e['getLastPosition']());}['_insertImage'](_0xe75072,_0xebda29){const _0x3bab2a=this['_editor'],{imageDimension:_0x3dc9c5,imageFallbackUrl:_0x482f1b,imageSources:_0x14afc7}=_0xe75072['attributes'];_0x3bab2a['execute']('insertImage',{'imageType':_0xebda29?'imageInline':null,'source':{'uploadcareImageId':_0xe75072['id'],'src':_0x482f1b,'sources':_0x14afc7,..._0x3dc9c5}});}}class M extends _0x30df83{['_editing'];['_controller']=null;static get['requires'](){return[_0x1a4abd,z];}constructor(_0x24b5d1){super(_0x24b5d1),this['_editing']=_0x24b5d1['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x342f34){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x342f34);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x1abfec,..._0x27fb07}){return _0x2e98ee(_0x1abfec,_0x27fb07);}static['getInfo'](_0x44e957,_0x144b52){return _0x41f858(_0x44e957,_0x144b52);}}class W extends _0x521f17{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xf4f0f4,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2c4cbb=this['editor'];if(!!!_0x2c4cbb['config']['get']('uploadcare'))return;_0x2c4cbb['plugins']['get'](_0xf4f0f4)['createUploadAdapter']=_0xa159d=>new G(_0xa159d,_0x2c4cbb),_0x2c4cbb['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4c0949,{imageElement:_0x433eb5,data:_0x1e8fbf})=>{_0x2c4cbb['model']['change'](_0x13d699=>{_0x13d699['setAttribute']('uploadcareImageId',_0x1e8fbf['uploadcareImageId'],_0x433eb5);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x7bf9cb,_0xdc130c){this['loader']=_0x7bf9cb,this['editor']=_0xdc130c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x29acc1=await this['loader']['file'];return q['upload']({'file':_0x29acc1,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x239fe0=>{_0x239fe0&&_0x239fe0['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x239fe0['value']);}})['then'](async _0x4ab4c4=>{const {imageFallbackUrl:_0x2a99e3,imageSources:_0x5e95ff}=D(_0x4ab4c4['cdnUrl'],_0x4ab4c4['imageInfo']['width']);return{'uploadcareImageId':_0x4ab4c4['uuid'],'default':_0x2a99e3,'sources':_0x5e95ff};})['catch'](()=>{const _0x242ab9=t('Cannot\x20upload\x20file:')+('\x20'+_0x29acc1['name']+'.');return Promise['reject'](_0x242ab9);});}['abort'](){this['controller']['abort']();}}class z extends _0x521f17{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x1a4abd];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3492dd){super(_0x3492dd),this['ucContextId']=_0x43528f();}['init'](){const _0x5a56f5=this['editor'];_0x5a56f5['commands']['add']('uploadcare',new M(_0x5a56f5));}['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 _0x1933de=_0xba4554['document']['querySelector']('input[uploadcare-file-input]');_0x1933de&&_0x1933de['remove']();}),async function(_0x3ae001){const _0x469e23=_0x4b08da([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x3692f5=0x535f8c3a,_0x495beb=0x5358f37a^_0x3692f5,_0x34b27f=window[_0x4b08da([0x44,0x61,0x74,0x65])][_0x4b08da([0x6e,0x6f,0x77])](),_0x1bb41d=_0x3ae001[_0x4b08da([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e4466=new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56cb60=>{_0x1bb41d[_0x4b08da([0x6f,0x6e,0x63,0x65])](_0x4b08da([0x72,0x65,0x61,0x64,0x79]),_0x56cb60);}),_0x1fb8e4={[_0x4b08da([0x6b,0x74,0x79])]:_0x4b08da([0x45,0x43]),[_0x4b08da([0x75,0x73,0x65])]:_0x4b08da([0x73,0x69,0x67]),[_0x4b08da([0x63,0x72,0x76])]:_0x4b08da([0x50,0x2d,0x32,0x35,0x36]),[_0x4b08da([0x78])]:_0x4b08da([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]),[_0x4b08da([0x79])]:_0x4b08da([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]),[_0x4b08da([0x61,0x6c,0x67])]:_0x4b08da([0x45,0x53,0x32,0x35,0x36])},_0x48324c=_0x1bb41d[_0x4b08da([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4b08da([0x67,0x65,0x74])](_0x4b08da([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x6af0ab(){let _0x36d145,_0x5ccc35=null,_0x29d639=null;try{if(_0x48324c==_0x4b08da([0x47,0x50,0x4c]))return _0x4b08da([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x36d145=_0x168042(),!_0x36d145)return _0x4b08da([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x36d145[_0x4b08da([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29d639=_0x573b21(_0x36d145[_0x4b08da([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x36d145[_0x4b08da([0x6a,0x74,0x69])])),await _0x1ca6d5()?_0x3fb834()?_0x2436fd()?_0x4b08da([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x255800()?(_0x36d145[_0x4b08da([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4b08da([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5ccc35=_0xf9d275(_0x4b08da([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x38cc59()):_0x4b08da([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4b08da([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4b08da([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4b08da([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2436fd(){const _0x29cf07=[_0x4b08da([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4b08da([0x74,0x72,0x69,0x61,0x6c])][_0x4b08da([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36d145[_0x4b08da([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x34b27f/0x3e8:0xe10*_0x495beb;return _0x36d145[_0x4b08da([0x65,0x78,0x70])]<_0x29cf07;}function _0x3fb834(){const _0x182c64=_0x36d145[_0x4b08da([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x182c64&&(!!_0x182c64[_0x4b08da([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b08da([0x2a]))||!!_0x182c64[_0x4b08da([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b08da([0x55,0x50,0x4c,0x43])));}function _0x255800(){const _0x397f89=_0x36d145[_0x4b08da([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x397f89||0x0==_0x397f89[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2711a5}=new URL(window[_0x4b08da([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x397f89[_0x4b08da([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2711a5))return!0x0;const _0x51c36f=_0x2711a5[_0x4b08da([0x73,0x70,0x6c,0x69,0x74])](_0x4b08da([0x2e]));return _0x397f89[_0x4b08da([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ed34f=>_0x3ed34f[_0x4b08da([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b08da([0x2a])))[_0x4b08da([0x6d,0x61,0x70])](_0x3ad13b=>_0x3ad13b[_0x4b08da([0x73,0x70,0x6c,0x69,0x74])](_0x4b08da([0x2e])))[_0x4b08da([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c9477=>_0x4c9477[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x51c36f[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b08da([0x6d,0x61,0x70])](_0x340b53=>Array(_0x51c36f[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x340b53[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b08da([0x66,0x69,0x6c,0x6c])](_0x340b53[0x0]===_0x4b08da([0x2a])?_0x4b08da([0x2a]):'')[_0x4b08da([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x340b53))[_0x4b08da([0x73,0x6f,0x6d,0x65])](_0x279f10=>_0x51c36f[_0x4b08da([0x65,0x76,0x65,0x72,0x79])]((_0x1e628e,_0x3b612f)=>_0x279f10[_0x3b612f]===_0x1e628e||_0x279f10[_0x3b612f]===_0x4b08da([0x2a])));}function _0x38cc59(){return _0x5ccc35&&_0x29d639?new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc4efdd,_0x233fcd)=>{_0x5ccc35[_0x4b08da([0x74,0x68,0x65,0x6e])](_0xc4efdd,_0x233fcd),_0x29d639[_0x4b08da([0x74,0x68,0x65,0x6e])](_0x5ef75a=>{_0x5ef75a!=_0x4b08da([0x56,0x61,0x6c,0x69,0x64])&&_0xc4efdd(_0x5ef75a);},_0x233fcd);}):_0x5ccc35||_0x29d639||_0x4b08da([0x56,0x61,0x6c,0x69,0x64]);}}function _0x573b21(_0x4384ee,_0x5aa47a){return new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x170ab4=>{if(_0xa205fd())return _0x170ab4(_0x4b08da([0x56,0x61,0x6c,0x69,0x64]));_0x51109b(),_0x1bb41d[_0x4b08da([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4b08da([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xd394cb=!0x1;const _0x4a7fa4=_0x43528f();function _0x566661(_0x31220e){return!!_0x31220e&&(typeof _0x31220e===_0x4b08da([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x31220e===_0x4b08da([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x31220e[_0x4b08da([0x74,0x68,0x65,0x6e])]===_0x4b08da([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x31220e[_0x4b08da([0x63,0x61,0x74,0x63,0x68])]===_0x4b08da([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf4a2a4(_0x29edc9){_0x542fe7(_0x29edc9)[_0x4b08da([0x74,0x68,0x65,0x6e])](_0x2cf303=>{if(!_0x2cf303||_0x2cf303[_0x4b08da([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4b08da([0x6f,0x6b]))return _0x4b08da([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40117a(_0x5aff2d(_0x4a7fa4+_0x5aa47a))!=_0x2cf303[_0x4b08da([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4b08da([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4b08da([0x56,0x61,0x6c,0x69,0x64]);})[_0x4b08da([0x74,0x68,0x65,0x6e])](_0x554eeb=>(_0x56dfa6(),_0x554eeb),()=>{const _0x4dd854=_0x5ebb0f();return null==_0x4dd854?(_0x56dfa6(),_0x4b08da([0x56,0x61,0x6c,0x69,0x64])):_0x4b08da(_0x34b27f-_0x4dd854>(0x7753083a^_0x3692f5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4b08da([0x74,0x68,0x65,0x6e])](_0x170ab4)[_0x4b08da([0x63,0x61,0x74,0x63,0x68])](()=>{_0x170ab4(_0x4b08da([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3db89d=0x536962ba^_0x3692f5;function _0x56dfa6(){const _0x252edc=_0x4b08da([0x6c,0x6c,0x63,0x74,0x2d])+_0x40117a(_0x5aff2d(_0x4384ee)),_0x504bfd=_0x1b2874(_0x40117a(window[_0x4b08da([0x4d,0x61,0x74,0x68])][_0x4b08da([0x63,0x65,0x69,0x6c])](_0x34b27f/_0x3db89d)));window[_0x4b08da([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b08da([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x252edc,_0x504bfd);}function _0x5ebb0f(){const _0x4f61af=_0x4b08da([0x6c,0x6c,0x63,0x74,0x2d])+_0x40117a(_0x5aff2d(_0x4384ee)),_0x42e691=window[_0x4b08da([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b08da([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f61af);return _0x42e691?window[_0x4b08da([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b2874(_0x42e691),0x10)*_0x3db89d:null;}function _0x542fe7(_0x188616){return new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c0192,_0x5be382)=>{_0x188616[_0x4b08da([0x74,0x68,0x65,0x6e])](_0x2c0192,_0x5be382),window[_0x4b08da([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5be382,0x535e58fa^_0x3692f5);});}}_0x1bb41d[_0x4b08da([0x6f,0x6e])](_0x4b08da([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x52f47c,_0x4f2978)=>{if(_0x4f2978[0x0]!=_0x4384ee)return _0x170ab4(_0x4b08da([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f2978[0x1]={..._0x4f2978[0x1],[_0x4b08da([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4a7fa4};},{[_0x4b08da([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b08da([0x68,0x69,0x67,0x68])}),_0x1bb41d[_0x4b08da([0x6f,0x6e])](_0x4b08da([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3e0d34=>{_0x566661(_0x3e0d34[_0x4b08da([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xd394cb=!0x0,_0xf4a2a4(_0x3e0d34[_0x4b08da([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4b08da([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b08da([0x6c,0x6f,0x77])}),_0x2e4466[_0x4b08da([0x74,0x68,0x65,0x6e])](()=>{_0xd394cb||_0x170ab4(_0x4b08da([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xa205fd(){return _0x1bb41d[_0x4b08da([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b08da([0x76,0x69,0x65,0x77])][_0x4b08da([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4b08da([0x61,0x75,0x74,0x6f]);}function _0x51109b(){_0x1bb41d[_0x4b08da([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b08da([0x76,0x69,0x65,0x77])][_0x4b08da([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4b08da([0x61,0x75,0x74,0x6f]);}}function _0xf9d275(_0x4d3aa6){const _0x473ee6=[new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9638be=>setTimeout(_0x9638be,0x5356b2f6^_0x3692f5)),_0x2e4466[_0x4b08da([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50b7a2=>{let _0x458ab0=0x0;_0x1bb41d[_0x4b08da([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b08da([0x6f,0x6e])](_0x4b08da([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x493188,_0x44152e)=>{_0x44152e[0x0][_0x4b08da([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x458ab0++,_0x458ab0==(0x535f89d2^_0x3692f5)&&(_0x50b7a2(),_0x493188[_0x4b08da([0x6f,0x66,0x66])]());});}))];return window[_0x4b08da([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4b08da([0x72,0x61,0x63,0x65])](_0x473ee6)[_0x4b08da([0x74,0x68,0x65,0x6e])](()=>_0x4d3aa6);}async function _0x3547bc(){await _0x2e4466,_0x1bb41d[_0x4b08da([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b08da([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x176296,_0x1bb41d[_0x4b08da([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b08da([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x176296,_0x1bb41d[_0x4b08da([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4b08da([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1fbf62(_0x4c8c8b){const _0x14c133=_0x1867c3();_0x1bb41d[_0x14c133]=_0x4b08da([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4c8c8b,_0x4c8c8b!=_0x4b08da([0x56,0x61,0x6c,0x69,0x64])&&_0x3547bc();}function _0x1867c3(){const _0x3830ad=window[_0x4b08da([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4b08da([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4b08da([0x6e,0x6f,0x77])]())[_0x4b08da([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4b08da([0x2e]),'');let _0x26a888=_0x4b08da([0x68]);for(let _0x5ef5ff=0x0;_0x5ef5ff<_0x3830ad[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5ef5ff+=0x2){let _0x590dfd=window[_0x4b08da([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3830ad[_0x4b08da([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5ef5ff,_0x5ef5ff+0x2));_0x590dfd>=_0x469e23[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x590dfd-=_0x469e23[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x26a888+=_0x469e23[_0x590dfd];}return _0x26a888;}function _0x168042(){const _0x53ec5e=_0x48324c[_0x4b08da([0x73,0x70,0x6c,0x69,0x74])](_0x4b08da([0x2e]));if(0x3!=_0x53ec5e[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x35c614(_0x53ec5e[0x1]);function _0x35c614(_0x20bd47){const _0x8fca8a=_0x2fddf9(_0x20bd47);return _0x8fca8a&&_0x1c1d44()?_0x8fca8a:null;function _0x1c1d44(){const _0x3197c7=_0x8fca8a[_0x4b08da([0x6a,0x74,0x69])],_0xe4d4e=window[_0x4b08da([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3197c7[_0x4b08da([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3197c7[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x516e08={..._0x8fca8a,[_0x4b08da([0x6a,0x74,0x69])]:_0x3197c7[_0x4b08da([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3197c7[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x516e08[_0x4b08da([0x76,0x63])],_0x5aff2d(_0x516e08)==_0xe4d4e;}}}async function _0x1ca6d5(){let _0x492526=!0x0;try{const _0x355b7e=_0x48324c[_0x4b08da([0x73,0x70,0x6c,0x69,0x74])](_0x4b08da([0x2e])),[_0x5bd3da,_0x41253a,_0x1e4e61]=_0x355b7e;return _0x1efaea(_0x5bd3da),await _0x57899d(_0x5bd3da,_0x41253a,_0x1e4e61),_0x492526;}catch{return!0x1;}function _0x1efaea(_0x11fcb6){const _0x4f135c=_0x2fddf9(_0x11fcb6);_0x4f135c&&_0x4f135c[_0x4b08da([0x61,0x6c,0x67])]==_0x4b08da([0x45,0x53,0x32,0x35,0x36])||(_0x492526=!0x1);}async function _0x57899d(_0x777ecd,_0x2612f0,_0x2db491){const _0x13676a=window[_0x4b08da([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4b08da([0x66,0x72,0x6f,0x6d])](_0x42f0b9(_0x2db491),_0x5228fb=>_0x5228fb[_0x4b08da([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2e22af=new window[(_0x4b08da([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4b08da([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x777ecd+_0x4b08da([0x2e])+_0x2612f0),_0x567f0c=window[_0x4b08da([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4b08da([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x567f0c)return;const _0x3391ae=await _0x567f0c[_0x4b08da([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4b08da([0x6a,0x77,0x6b]),_0x1fb8e4,{[_0x4b08da([0x6e,0x61,0x6d,0x65])]:_0x4b08da([0x45,0x43,0x44,0x53,0x41]),[_0x4b08da([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4b08da([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4b08da([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x567f0c[_0x4b08da([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4b08da([0x6e,0x61,0x6d,0x65])]:_0x4b08da([0x45,0x43,0x44,0x53,0x41]),[_0x4b08da([0x68,0x61,0x73,0x68])]:{[_0x4b08da([0x6e,0x61,0x6d,0x65])]:_0x4b08da([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3391ae,_0x13676a,_0x2e22af)||(_0x492526=!0x1);}}function _0x2fddf9(_0x10f5aa){return _0x10f5aa[_0x4b08da([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4b08da([0x65,0x79]))?JSON[_0x4b08da([0x70,0x61,0x72,0x73,0x65])](_0x42f0b9(_0x10f5aa)):null;}function _0x42f0b9(_0x287496){return window[_0x4b08da([0x61,0x74,0x6f,0x62])](_0x287496[_0x4b08da([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4b08da([0x2b]))[_0x4b08da([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4b08da([0x2f])));}function _0x5aff2d(_0x553d5e){let _0x32c520=0x1505;function _0x5405b8(_0x1febd2){for(let _0x1d562c=0x0;_0x1d562c<_0x1febd2[_0x4b08da([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d562c++){const _0x4a13d3=_0x1febd2[_0x4b08da([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1d562c);_0x32c520=(_0x32c520<<0x5)+_0x32c520+_0x4a13d3,_0x32c520&=_0x32c520;}}function _0x39a18c(_0x50cb67){Array[_0x4b08da([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x50cb67)?_0x50cb67[_0x4b08da([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39a18c):_0x50cb67&&typeof _0x50cb67==_0x4b08da([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4b08da([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x50cb67)[_0x4b08da([0x73,0x6f,0x72,0x74])]()[_0x4b08da([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x35ac32,_0x2302a9])=>{_0x5405b8(_0x35ac32),_0x39a18c(_0x2302a9);}):_0x5405b8(window[_0x4b08da([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x50cb67));}return _0x39a18c(_0x553d5e),_0x32c520>>>0x0;}function _0x40117a(_0x4c33a0){return _0x4c33a0[_0x4b08da([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4b08da([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4b08da([0x30]));}function _0x1b2874(_0x58f204){return _0x58f204[_0x4b08da([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4b08da([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4b08da([0x6a,0x6f,0x69,0x6e])]('');}function _0x176296(){}function _0x4b08da(_0x1e3540){return _0x1e3540['map'](_0x2424c0=>String['fromCharCode'](_0x2424c0))['join']('');}_0x1fbf62(await _0x6af0ab());}(this);}['_initSchema'](){const _0x3f4a1f=this['editor']['model']['schema'];_0x3f4a1f['isRegistered']('imageBlock')&&_0x3f4a1f['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3f4a1f['isRegistered']('imageInline')&&_0x3f4a1f['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2fa97a=this['editor'];_0x2fa97a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2fa97a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5ce878=>_0x5ce878['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2ad02c=_0x2fa97a['commands']['get']('replaceImageSource');_0x2ad02c&&this['listenTo'](_0x2ad02c,'cleanupImage',(_0x5f4d1a,[_0x8ddabb,_0x3682cf])=>{_0x8ddabb['removeAttribute']('uploadcareImageId',_0x3682cf);});}['_initConfig'](){const _0x14b647=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2da4de=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3b538e(_0xba4554['document'],'uc-config',{..._0x14b647,'pubkey':_0x2da4de,'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']=_0x125e4f=>{if('closeMax'==_0x125e4f)return'#uc-icon-arrow-down';},_0xba4554['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3b538e(_0xba4554['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0xba4554['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x12b3d4=this['editor']['commands']['get']('insertImage');_0x12b3d4&&this['listenTo'](_0x12b3d4,'execute',()=>{const _0x5b4275=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b4275&&_0x5b4275['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x5b4275);});});const _0x37980b=this['editor']['commands']['get']('uploadcareImageReplace');_0x37980b&&this['listenTo'](_0x37980b,'execute',()=>{const _0x56499a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x56499a&&_0x56499a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x56499a);});});}}class H extends _0x521f17{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x73b341){super(_0x73b341),_0x73b341['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x39459d['defineComponents'](_0x39459d),this['_defineLocale']();}['_defineLocale'](){const _0x4fda1d=this['editor']['config']['get']('uploadcare.locale'),_0x274a2e=this['editor']['locale']['contentLanguage'];_0x4fda1d&&_0x39459d['defineLocale'](_0x274a2e,_0x4fda1d);}}class J extends _0x4d5d2c{constructor(_0xfbb8fc){super(_0xfbb8fc);const t=_0xfbb8fc['t'],_0x321615=this['bindTemplate'],_0x47f98e=new _0x54f70c();_0x47f98e['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':[_0x47f98e,{'text':_0x321615['to']('imageUploadProgress',_0x560a76=>t('Loading\x20image...')+'\x20('+(_0x560a76||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class Z extends _0x4d5d2c{constructor(_0x14e9ce){super(_0x14e9ce);const t=_0x14e9ce['t'];this['set']('errorType',null);const _0x1c19c9=new _0x1f56d8(_0x14e9ce);_0x1c19c9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1c19c9['withText']=!0x0,_0x1c19c9['class']='ck-button-action',_0x1c19c9['on']('execute',()=>{this['fire']('retry');}),_0x1c19c9['bind']('isVisible')['to'](this,'errorType',_0x1350fe=>'NotFound'!==_0x1350fe);const _0x409bfc=new _0x55ff67();_0x409bfc['content']=_0x542478,_0x409bfc['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3a39f1=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':[_0x409bfc,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3a39f1['to']('errorType',_0x433920=>t('NotFound'!==_0x433920?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1c19c9]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class Q extends _0x4d5d2c{constructor(_0x182aef,_0x5603ba){super(_0x182aef);const _0x2f7a86=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5603ba,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2f7a86['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4726fe,_0x207f2c,_0x1a48ee){super(_0x4726fe),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x4726fe),this['_errorView']=new Z(_0x4726fe),this['_editingView']=new Q(_0x4726fe,_0x1a48ee),this['_focusableView']=new _0x4d5d2c(_0x4726fe),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x207f2c),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'],_0x48cd7f=>{this['_addUploadcareImageEditorListeners'](_0x48cd7f);});}),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'](_0x5e8346,_0x50c76b){const _0x4fb83e='uc-cloud-image-editor',_0x37c180=_0x5e8346['querySelector'](_0x4fb83e);if(_0x37c180)return _0x50c76b(_0x37c180);const _0x586aab=new MutationObserver(_0x6ef6fd=>{const _0x2c2e82=_0x6ef6fd['filter'](_0x53096e=>_0x53096e['target']===_0x5e8346&&_0x53096e['addedNodes']['length']>0x0&&_0x53096e['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4fb83e);_0x2c2e82['length']&&(_0x586aab['disconnect'](),_0x50c76b(_0x2c2e82[0x0]['addedNodes'][0x0]));});_0x586aab['observe'](_0x5e8346,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4112da){_0x4112da['addEventListener']('apply',_0x30eff9=>{this['fire']('apply',{'imageSrc':_0x30eff9['detail']['cdnUrl']});}),_0x4112da['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x241f84(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2f9c4b,_0x4613ad,_0x4c3d2c){super(),this['_editor']=_0x2f9c4b,this['_dialog']=_0x4613ad,this['_imageElement']=_0x4c3d2c,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 _0x54aebb=this['_imageElement'],_0x31614c=_0x54aebb['getAttribute']('uploadcareImageId'),_0x5ebf7b=_0x54aebb['getAttribute']('src');if(_0x31614c)await this['_loadImageInfo'](_0x31614c,_0x5ebf7b);else{if(this['_imageCache']['has'](_0x5ebf7b)){const _0x1d8e6a=this['_imageCache']['get'](_0x5ebf7b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d8e6a['url'],this['imageDimension']=_0x1d8e6a['dimension'],this['imageId']=_0x1d8e6a['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x322fa3}=this['_editor'],t=_0x322fa3['t'],_0x31a706=new X(_0x322fa3,this['imageStatus'],this['_attributes']);_0x31a706['bind']('status')['to'](this,'imageStatus'),_0x31a706['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x31a706['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x31a706['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x31a706,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3f8b15,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x31a706,'position':_0x3cfb73['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x31a706['focus']();},'onHide':()=>{_0x31a706['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xc0f6b4=>!V(_0xc0f6b4,_0x31a706['element'])}});}['_loadImageInfo'](_0x215f83,_0x4805ca){return q['getInfo'](_0x215f83,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x52271f=>{const {width:_0x1f95ba,height:_0x1c5938}=_0x52271f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4805ca,this['imageDimension']={'width':_0x1f95ba,'height':_0x1c5938},this['imageId']=_0x215f83;})['catch'](_0x5a0dd2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5a0dd2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x35b4ba,_0x4f3a83){return this['_getImageAsFile'](_0x35b4ba)['then'](_0x11708c=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x4f3a83['signal'],'file':_0x11708c,'onProgress':_0x4d202f=>{_0x4d202f&&_0x4d202f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4d202f['value']));}}))['then'](_0x395d2d=>{const {width:_0x1b6f7a,height:_0x4c7c09}=_0x395d2d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x395d2d['cdnUrl'],this['imageDimension']={'width':_0x1b6f7a,'height':_0x4c7c09},this['imageId']=_0x395d2d['uuid'],this['imageUploadProgress']=null;const _0x470b92=_0x35b4ba['getAttribute']('src');this['_imageCache']['set'](_0x470b92,{'id':_0x395d2d['uuid'],'url':_0x395d2d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x37775a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x37775a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3e5544,_0x38d3f4){_0x3e5544['on']('apply',(_0x499fd8,_0x14a238)=>{this['_replaceImage'](_0x38d3f4,_0x14a238['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3e5544['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3e5544['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1661d3,_0x2c9c67,_0x1d9a12){const _0x1986e2=this['_editor'],{width:_0x1d7857,height:_0x34b4c4}=F(_0x2c9c67,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x74fcc4,imageSources:_0x448fe6}=D(_0x2c9c67,_0x1d7857);_0x1986e2['model']['change'](_0x12a87f=>{if('$graveyard'===_0x1661d3['root']['rootName']){_0x1986e2['execute']('insertImage',{'imageType':_0x1661d3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1661d3['getAttributes']()),'uploadcareImageId':_0x1d9a12,'src':_0x74fcc4,'sources':_0x448fe6,'width':_0x1d7857,'height':_0x34b4c4}});const _0x5a7ce3=_0x1661d3['getChildren']();_0x1661d3=_0x1986e2['model']['document']['selection']['getSelectedElement']();for(const _0x40ddc3 of _0x5a7ce3)_0x12a87f['append'](_0x12a87f['cloneElement'](_0x40ddc3),_0x1661d3);}else _0x12a87f['setSelection'](_0x1661d3,'on'),_0x1986e2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1661d3['getAttributes']()),'uploadcareImageId':_0x1d9a12,'src':_0x74fcc4,'sources':_0x448fe6,'width':_0x1d7857,'height':_0x34b4c4},_0x1661d3);_0x12a87f['setSelection'](_0x1661d3,'on');});}async['_getImageAsFile'](_0x203e82){const _0x51e499=_0xba4554['window'],_0x226b77=_0xba4554['document']['location']['href'],_0xe06933=new _0x51e499['URL'](_0x203e82['getAttribute']('src'),_0x226b77);if('data:'===_0xe06933['protocol']){const _0x1678c6=_0xe06933['href']['split'](','),_0x391e46=_0x1678c6[0x0]['match'](/:(.*?);/)[0x1],_0x504a34=_0x391e46['split']('/')[0x1],_0x4a521d=_0x51e499['atob'](_0x1678c6[_0x1678c6['length']-0x1]);let _0x5cf1e1=_0x4a521d['length'];const _0x7b017e=new _0x51e499['Uint8Array'](_0x5cf1e1);for(;_0x5cf1e1--;)_0x7b017e[_0x5cf1e1]=_0x4a521d['charCodeAt'](_0x5cf1e1);return new _0x51e499['File']([_0x7b017e],'image.'+_0x504a34,{'type':_0x391e46});}const _0x159801=_0xe06933['href']['split']('/'),_0x1307b2=_0x159801[_0x159801['length']-0x1],_0x437009=_0x1307b2['split']('.')[0x1];return _0x51e499['fetch'](_0xe06933['href'])['then'](_0x54843e=>_0x54843e['clone']()['blob']())['then'](_0x189364=>new _0x51e499['File']([_0x189364],_0x1307b2,{'type':'image/'+_0x437009}));}}class tt extends _0x30df83{['imageEditController'];static get['requires'](){return[_0x1a4abd];}['_isEditable'];constructor(_0x417eb0){super(_0x417eb0),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4fe2e7){const _0x391b33=B(_0x4fe2e7);return _0x5a5f43=>!(!_0x5a5f43||!_0x5a5f43['is']('element','imageBlock')&&!_0x5a5f43['is']('element','imageInline'))&&(!!_0x5a5f43['hasAttribute']('uploadcareImageId')||!!_0x5a5f43['hasAttribute']('src')&&_0x391b33(_0x5a5f43['getAttribute']('src')));}(_0x417eb0['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x25206c=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x25206c);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5d8e08=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5d8e08&&(_0x5d8e08['is']('element','imageBlock')||_0x5d8e08['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x1a4abd),_0x5d8e08),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x30df83{['refresh'](){const _0x3ffb54=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3ffb54&&(_0x3ffb54['is']('element','imageBlock')||_0x3ffb54['is']('element','imageInline')));}['execute'](_0x47b8aa){const _0x31b4c7=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x238b65=>{_0x238b65['setAttributes'](_0x47b8aa,_0x31b4c7),_0x238b65['removeAttribute']('srcset',_0x31b4c7),_0x238b65['removeAttribute']('sizes',_0x31b4c7);});}}class it extends _0x521f17{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x454319,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xe80509}=this;_0xe80509['commands']['add']('uploadcareImageEdit',new tt(_0xe80509)),_0xe80509['commands']['add']('uploadcareImageReplace',new et(_0xe80509));}}class st extends _0x521f17{['_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 _0x303ef5=this['editor'];_0x303ef5['ui']['componentFactory']['add']('uploadcareImageEdit',_0x362c70=>{const _0x5dac6c=_0x303ef5['commands']['get']('uploadcareImageEdit'),_0x2c6a0b=new _0x1f56d8(_0x362c70),t=_0x362c70['t'];return _0x2c6a0b['set']({'icon':_0x3f8b15,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2c6a0b['bind']('isEnabled')['to'](_0x5dac6c),_0x2c6a0b['bind']('isOn')['to'](_0x5dac6c,'isActive'),this['listenTo'](_0x2c6a0b,'execute',()=>{_0x303ef5['execute']('uploadcareImageEdit'),_0x303ef5['editing']['view']['focus']();}),_0x2c6a0b;}),this['_initConfig']();}['_initConfig'](){const _0x57f96d=_0x3b538e(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x57f96d),this['listenTo'](this['editor'],'destroy',()=>{_0x57f96d['remove']();});}}class nt extends _0x521f17{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,A as UploadcareUI,W as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-next-
|
|
3
|
+
"version": "0.0.0-nightly-next-20260119.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"dist/translations/*.umd.js"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
43
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
44
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
45
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
46
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
47
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
40
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260119.0",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260119.0",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260119.0",
|
|
43
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260119.0",
|
|
44
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260119.0",
|
|
45
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260119.0",
|
|
46
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260119.0",
|
|
47
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260119.0",
|
|
48
48
|
"@uploadcare/file-uploader": "1.24.5",
|
|
49
49
|
"@uploadcare/upload-client": "6.14.3"
|
|
50
50
|
},
|