@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260110.0 → 0.0.0-nightly-next-20260111.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 _0x1b7228,Command as _0x30ceb0}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2d4911,IconGooglePhotos as _0x2fb8a8,IconGoogleDrive as _0x149548,IconFacebook as _0x26fbd9,IconDropbox as _0x54167f,IconUploadcareLink as _0xcc5310,IconUploadcareImageUpload as _0x573c74,IconError as _0x30c07e,IconUploadcareImageEdit as _0x490283}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x3477b3,MenuBarMenuListItemButtonView as _0x314e19,View as _0x5b3c93,FocusCycler as _0x1d6401,Dialog as _0x8c9fa8,DialogViewPosition as _0x4eaec8,SpinnerView as _0x2d1516,IconView as _0x163133,Notification as _0x48afc8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x389ca5,DomEmitterMixin as _0x4b7148,global as _0x4a042a,getAncestors as _0x305865,ObservableMixin as _0x4b88f5,uid as _0x536ef3,createElement as _0x2691ab}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x50e140}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2bcf19,info as _0x2f6ba1}from'@uploadcare/upload-client';import*as _0xb11b3 from'@uploadcare/file-uploader';var S=function(_0x12b7a4){return _0x12b7a4['Local']='local',_0x12b7a4['URL']='url',_0x12b7a4['Dropbox']='dropbox',_0x12b7a4['GDrive']='gdrive',_0x12b7a4['Facebook']='facebook',_0x12b7a4['GPhotos']='gphotos',_0x12b7a4['OneDrive']='onedrive',_0x12b7a4;}({});function T(_0x21dfd4,_0x92b6f8,_0xb7ecec){const t=_0x21dfd4['t'],_0x7d8506=_0x21dfd4['t'];switch(_0x92b6f8){case S['Local']:return{'text':_0x7d8506('Insert'===_0xb7ecec?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x7d8506('From\x20computer')};case S['URL']:return{'text':'Insert'===_0xb7ecec?_0x7d8506('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x7d8506('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0xb7ecec?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0xb7ecec?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0xb7ecec?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0xb7ecec?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0xb7ecec?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x92b6f8;}}class A extends _0x1b7228{['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 _0x368b23=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1427ec;for(const _0x4bff36 in _0x368b23){const _0xdfef89=_0x4bff36,_0x36cace=_0x368b23[_0xdfef89];if('uploadcareLicenseKeyValid'==_0x36cace||'uploadcareLicenseKeyInvalid'==_0x36cace||'uploadcareLicenseKeyExpired'==_0x36cace||'uploadcareLicenseKeyDomainLimit'==_0x36cace||'uploadcareLicenseKeyNotAllowed'==_0x36cace||'uploadcareLicenseKeyEvaluationLimit'==_0x36cace||'uploadcareLicenseKeyUsageLimit'==_0x36cace){delete _0x368b23[_0xdfef89],_0x1427ec=_0x36cace,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1427ec&&_0x368b23['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1427ec&&_0x368b23['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1427ec&&_0x368b23['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1427ec&&_0x368b23['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1427ec&&_0x368b23['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1427ec&&_0x368b23['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3122af}=this,_0x496a1d=_0x3122af['commands']['get']('uploadcare');if(!_0x496a1d)return;const _0x2b49fc=this['_normalizeConfigSourceList'](_0x3122af['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0xaa1523,_0x441f59)=>{const _0x300530=this['_getIntegrationKey'](_0x441f59['type']);return _0xaa1523[_0x300530]||(_0xaa1523[_0x300530]=[]),_0xaa1523[_0x300530]['push'](_0x441f59),_0xaa1523;},{});_0x3122af['plugins']['has']('ImageInsertUI')&&_0x3122af['commands']['get']('uploadcare')&&Object['entries'](_0x2b49fc)['forEach'](([_0x2b2697,_0x2d2f55])=>{_0x3122af['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2b2697,'observable':()=>_0x496a1d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2d2f55),'formViewCreator':()=>this['_createDropdownButtons'](_0x2d2f55),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2d2f55),'override':'assetManager'!==_0x2b2697});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x594076){const {locale:_0x3fc7d4}=this['editor'];return _0x594076['map'](_0x310eaa=>{const _0x3da119=T(_0x3fc7d4,_0x310eaa,'Insert');switch(_0x310eaa){case S['Local']:return{'icon':_0x573c74,'type':S['Local'],..._0x3da119};case S['URL']:return{'icon':_0xcc5310,'type':S['URL'],..._0x3da119};case S['Dropbox']:return{'icon':_0x54167f,'type':S['Dropbox'],..._0x3da119};case S['Facebook']:return{'icon':_0x26fbd9,'type':S['Facebook'],..._0x3da119};case S['GDrive']:return{'icon':_0x149548,'type':S['GDrive'],..._0x3da119};case S['GPhotos']:return{'icon':_0x2fb8a8,'type':S['GPhotos'],..._0x3da119};case S['OneDrive']:return{'icon':_0x2d4911,'type':S['OneDrive'],..._0x3da119};}});}['_getIntegrationKey'](_0xcf271){switch(_0xcf271){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x7cae4d,_0x491ee6){const _0x501291=this['editor'],_0x1e3b1a=new _0x7cae4d(_0x501291['locale']),_0x4374a7=_0x501291['commands']['get']('uploadcare');return _0x1e3b1a['bind']('isEnabled')['to'](_0x4374a7),_0x1e3b1a['on']('execute',()=>{_0x4374a7['execute'](_0x491ee6);}),_0x1e3b1a;}['_createToolbarButton'](_0xd7abb5){const {locale:_0x53997c}=this['editor'],_0x1d6e49=this['editor']['plugins']['get']('ImageInsertUI'),_0x2e9e2d=_0xd7abb5[0x0],_0x5681d4=this['_createButton'](_0x3477b3,_0x2e9e2d['type']);return _0x5681d4['icon']=_0x2e9e2d['icon'],_0x5681d4['bind']('label')['to'](_0x1d6e49,'isImageSelected',_0x445772=>T(_0x53997c,_0x2e9e2d['type'],_0x445772?'Replace':'Insert')['text']),_0x5681d4['tooltip']=!0x0,_0x5681d4;}['_createDropdownButtons'](_0x2e09c2){const {locale:_0x4d3123}=this['editor'],_0x1940e6=this['editor']['plugins']['get']('ImageInsertUI');return _0x2e09c2['map'](_0x1b325a=>{const _0x37e2f5=this['_createButton'](_0x3477b3,_0x1b325a['type']);return _0x37e2f5['withText']=!0x0,_0x37e2f5['icon']=_0x1b325a['icon'],_0x37e2f5['bind']('label')['to'](_0x1940e6,'isImageSelected',_0x456b2b=>T(_0x4d3123,_0x1b325a['type'],_0x456b2b?'Replace':'Insert')['text']),_0x37e2f5;});}['_createMenuBarButtons'](_0x181510){return _0x181510['map'](_0x72a975=>{const _0x3bda67=this['_createButton'](_0x314e19,_0x72a975['type']);return _0x3bda67['icon']=_0x72a975['icon'],_0x3bda67['label']=_0x72a975['shortText'],_0x3bda67;});}}class K extends _0x5b3c93{['focusTracker'];['focusCycler'];constructor(_0x322cf5){super(_0x322cf5),this['focusTracker']=new _0x389ca5(),this['focusCycler']=new _0x1d6401({'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(_0xd59fea,_0x36c349){super(_0xd59fea),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-'+_0x36c349}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x4d0a50,_0x3f8d50){const _0x4d9005=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5c03ff=>_0x5c03ff<=_0x3f8d50)['map'](_0x1f6459=>_0x4d0a50['replace'](/\/$/,'')+'/-/resize/'+_0x1f6459+'x/\x20'+_0x1f6459+'w');return{'imageFallbackUrl':_0x4d0a50,'imageSources':[{'srcset':_0x4d9005['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3f8d50+'px)\x20100vw,\x20'+_0x3f8d50+'px','type':'image/webp'}]};}function F(_0x3e2ab2,_0x5af8b3,_0x3e938a){const _0x567b55=_0x3e2ab2['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x567b55?parseInt(_0x567b55[0x1],0xa):_0x5af8b3,'height':_0x567b55?parseInt(_0x567b55[0x2],0xa):_0x3e938a};}function $(_0x262f63,_0x4a1464){const _0x3a040d=new(_0x4b7148())(),_0x573bc9=_0x262f63['plugins']['get']('ImageUtils'),_0x2c4efb=_0x262f63['editing']['mapper']['toViewElement'](_0x4a1464),_0x45b5fb=_0x573bc9['findViewImgElement'](_0x2c4efb),_0x3529e7=_0x262f63['editing']['view']['domConverter']['viewToDom'](_0x45b5fb),_0x5b5e0f=_0x4a1464['getAttribute']('width'),_0x86c8e1=_0x4a1464['getAttribute']('height'),_0x298b3d='image-processing';_0x262f63['editing']['view']['change'](_0x339482=>{_0x339482['addClass'](_0x298b3d,_0x2c4efb),_0x339482['setStyle']('aspect-ratio',_0x5b5e0f+'/'+_0x86c8e1,_0x45b5fb);}),_0x3a040d['listenTo'](_0x3529e7,'load',()=>{_0x3a040d['stopListening'](_0x3529e7,'load'),_0x262f63['editing']['view']['change'](_0x4c292d=>{_0x4c292d['removeClass'](_0x298b3d,_0x2c4efb),_0x4c292d['removeStyle']('aspect-ratio',_0x45b5fb);});});}function B(_0x1cbb87){if(Array['isArray'](_0x1cbb87)){const _0x19cbbd=_0x1cbb87['map'](B);return _0x36257f=>_0x19cbbd['some'](_0x24b14a=>_0x24b14a(_0x36257f));}if('origin'==_0x1cbb87){const _0x387057=_0x4a042a['window']['location']['origin'];return _0x3c407f=>new URL(_0x3c407f,_0x4a042a['document']['baseURI'])['origin']==_0x387057;}return'function'==typeof _0x1cbb87?_0x1cbb87:_0x1cbb87 instanceof RegExp?_0x47b397=>!(!_0x47b397['match'](_0x1cbb87)&&!_0x47b397['replace'](/^https?:\/\//,'')['match'](_0x1cbb87)):()=>!0x1;}function V(_0xcbef6e,_0x7f0756){return _0x305865(_0xcbef6e['target'])['includes'](_0x7f0756);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x4b88f5(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x49380c,_0x2928d8,_0x3776fb){super(),this['_editor']=_0x49380c,this['_editing']=_0x2928d8,this['_dialog']=_0x49380c['plugins']['get'](_0x8c9fa8),this['_api']=_0x2928d8['ctxElement']['getAPI'](),this['_type']=_0x3776fb,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:_0x5509b5,model:_0x2ea744}=this['_editor'],_0x32f448=_0x2ea744['document']['selection']['getSelectedElement'](),_0x4bad5f=_0x32f448&&(_0x32f448['is']('element','imageBlock')||_0x32f448['is']('element','imageInline'));this['_formView']=new O(_0x5509b5,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x573c74,'title':T(_0x5509b5,this['_type'],_0x4bad5f?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4eaec8['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x478318=>!V(_0x478318,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x47abf4}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x82af2=>{const _0x223c05=_0x47abf4['length'];for(const _0x4f4afb of _0x47abf4){const _0x5265ba=_0x4f4afb===_0x47abf4[_0x223c05-0x1],{cdnUrl:_0x2658e5,fileInfo:_0x10bb7e}=_0x4f4afb;if(!_0x2658e5||!_0x10bb7e)continue;const {width:_0x4c957c,height:_0x1b599c}=_0x10bb7e['imageInfo'],_0x504e22=F(_0x2658e5,_0x4c957c,_0x1b599c),_0x272f60=D(_0x2658e5,_0x504e22['width']),_0x1f8e39={'id':_0x10bb7e['uuid'],'type':'image','attributes':{'imageDimension':_0x504e22,..._0x272f60}};this['_insertAsset'](_0x1f8e39,_0x5265ba,_0x82af2);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x180a73=>{'idle'===_0x180a73['detail']['status']&&!_0x180a73['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x33c1e2,_0x25f90d,_0x37b14e){const _0x509b81=this['_editor']['model']['document']['selection'],_0x130106=_0x509b81['getSelectedElement'](),_0x4fc8ac=!(!_0x130106||!_0x130106['is']('element','imageInline'));_0x37b14e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x33c1e2,_0x4fc8ac),_0x25f90d||_0x37b14e['setSelection'](_0x509b81['getLastPosition']());}['_insertImage'](_0x57d153,_0x3e6905){const _0x3ea4e3=this['_editor'],{imageDimension:_0x13ae53,imageFallbackUrl:_0x58c1f8,imageSources:_0xd261b8}=_0x57d153['attributes'];_0x3ea4e3['execute']('insertImage',{'imageType':_0x3e6905?'imageInline':null,'source':{'uploadcareImageId':_0x57d153['id'],'src':_0x58c1f8,'sources':_0xd261b8,..._0x13ae53}});}}class M extends _0x30ceb0{['_editing'];['_controller']=null;static get['requires'](){return[_0x8c9fa8,z];}constructor(_0x2ba100){super(_0x2ba100),this['_editing']=_0x2ba100['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4a1117){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x4a1117);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x3b4929,..._0x26a1c5}){return _0x2bcf19(_0x3b4929,_0x26a1c5);}static['getInfo'](_0x4c4a25,_0x53938c){return _0x2f6ba1(_0x4c4a25,_0x53938c);}}class W extends _0x1b7228{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x50e140,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2a9e2d=this['editor'];if(!!!_0x2a9e2d['config']['get']('uploadcare'))return;_0x2a9e2d['plugins']['get'](_0x50e140)['createUploadAdapter']=_0x4893cc=>new G(_0x4893cc,_0x2a9e2d),_0x2a9e2d['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x181105,{imageElement:_0x22b534,data:_0x1c667b})=>{_0x2a9e2d['model']['change'](_0x34dd6f=>{_0x34dd6f['setAttribute']('uploadcareImageId',_0x1c667b['uploadcareImageId'],_0x22b534);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x4683d5,_0x26ae24){this['loader']=_0x4683d5,this['editor']=_0x26ae24,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x462f6d=await this['loader']['file'];return q['upload']({'file':_0x462f6d,'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':_0x462420=>{_0x462420&&_0x462420['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x462420['value']);}})['then'](async _0x243258=>{const {imageFallbackUrl:_0x2d297d,imageSources:_0xd51c9c}=D(_0x243258['cdnUrl'],_0x243258['imageInfo']['width']);return{'uploadcareImageId':_0x243258['uuid'],'default':_0x2d297d,'sources':_0xd51c9c};})['catch'](()=>{const _0x54f458=t('Cannot\x20upload\x20file:')+('\x20'+_0x462f6d['name']+'.');return Promise['reject'](_0x54f458);});}['abort'](){this['controller']['abort']();}}class z extends _0x1b7228{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x8c9fa8];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xd0a2d0){super(_0xd0a2d0),this['ucContextId']=_0x536ef3();}['init'](){const _0x3e0c78=this['editor'];_0x3e0c78['commands']['add']('uploadcare',new M(_0x3e0c78));}['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 _0x18761b=_0x4a042a['document']['querySelector']('input[uploadcare-file-input]');_0x18761b&&_0x18761b['remove']();}),async function(_0x36c09f){const _0x40d3e0=_0x18810b([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]),_0x502a26=0x535f8c3a,_0x85b91f=0x5358f252^_0x502a26,_0x51d590=window[_0x18810b([0x44,0x61,0x74,0x65])][_0x18810b([0x6e,0x6f,0x77])](),_0x56b6c6=_0x36c09f[_0x18810b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2bdca0=new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dc2ea=>{_0x56b6c6[_0x18810b([0x6f,0x6e,0x63,0x65])](_0x18810b([0x72,0x65,0x61,0x64,0x79]),_0x3dc2ea);}),_0x38c6c9={[_0x18810b([0x6b,0x74,0x79])]:_0x18810b([0x45,0x43]),[_0x18810b([0x75,0x73,0x65])]:_0x18810b([0x73,0x69,0x67]),[_0x18810b([0x63,0x72,0x76])]:_0x18810b([0x50,0x2d,0x32,0x35,0x36]),[_0x18810b([0x78])]:_0x18810b([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]),[_0x18810b([0x79])]:_0x18810b([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]),[_0x18810b([0x61,0x6c,0x67])]:_0x18810b([0x45,0x53,0x32,0x35,0x36])},_0x61667d=_0x56b6c6[_0x18810b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18810b([0x67,0x65,0x74])](_0x18810b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe52b2(){let _0x3263e8,_0x2c5bac=null,_0x15391d=null;try{if(_0x61667d==_0x18810b([0x47,0x50,0x4c]))return _0x18810b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3263e8=_0x26ebb7(),!_0x3263e8)return _0x18810b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3263e8[_0x18810b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x15391d=_0x48590f(_0x3263e8[_0x18810b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3263e8[_0x18810b([0x6a,0x74,0x69])])),await _0x365d4d()?_0x5bc0d7()?_0x183ab1()?_0x18810b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xef3119()?(_0x3263e8[_0x18810b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18810b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2c5bac=_0x4f93c5(_0x18810b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4d7110()):_0x18810b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18810b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18810b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18810b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x183ab1(){const _0x34dfe3=[_0x18810b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18810b([0x74,0x72,0x69,0x61,0x6c])][_0x18810b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3263e8[_0x18810b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x51d590/0x3e8:0xe10*_0x85b91f;return _0x3263e8[_0x18810b([0x65,0x78,0x70])]<_0x34dfe3;}function _0x5bc0d7(){const _0x5f0e47=_0x3263e8[_0x18810b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5f0e47&&(!!_0x5f0e47[_0x18810b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18810b([0x2a]))||!!_0x5f0e47[_0x18810b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18810b([0x55,0x50,0x4c,0x43])));}function _0xef3119(){const _0x3f7b89=_0x3263e8[_0x18810b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3f7b89||0x0==_0x3f7b89[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c673c}=new URL(window[_0x18810b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3f7b89[_0x18810b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c673c))return!0x0;const _0x5d3231=_0x2c673c[_0x18810b([0x73,0x70,0x6c,0x69,0x74])](_0x18810b([0x2e]));return _0x3f7b89[_0x18810b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x44c7b3=>_0x44c7b3[_0x18810b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18810b([0x2a])))[_0x18810b([0x6d,0x61,0x70])](_0x992788=>_0x992788[_0x18810b([0x73,0x70,0x6c,0x69,0x74])](_0x18810b([0x2e])))[_0x18810b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x353d25=>_0x353d25[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5d3231[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18810b([0x6d,0x61,0x70])](_0x5a0f92=>Array(_0x5d3231[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5a0f92[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18810b([0x66,0x69,0x6c,0x6c])](_0x5a0f92[0x0]===_0x18810b([0x2a])?_0x18810b([0x2a]):'')[_0x18810b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5a0f92))[_0x18810b([0x73,0x6f,0x6d,0x65])](_0x766cb=>_0x5d3231[_0x18810b([0x65,0x76,0x65,0x72,0x79])]((_0x560a4f,_0x4440aa)=>_0x766cb[_0x4440aa]===_0x560a4f||_0x766cb[_0x4440aa]===_0x18810b([0x2a])));}function _0x4d7110(){return _0x2c5bac&&_0x15391d?new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x210f5c,_0x578e55)=>{_0x2c5bac[_0x18810b([0x74,0x68,0x65,0x6e])](_0x210f5c,_0x578e55),_0x15391d[_0x18810b([0x74,0x68,0x65,0x6e])](_0x129894=>{_0x129894!=_0x18810b([0x56,0x61,0x6c,0x69,0x64])&&_0x210f5c(_0x129894);},_0x578e55);}):_0x2c5bac||_0x15391d||_0x18810b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48590f(_0x10d78b,_0x8e4fcc){return new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x126a33=>{if(_0x4a170e())return _0x126a33(_0x18810b([0x56,0x61,0x6c,0x69,0x64]));_0x841b3(),_0x56b6c6[_0x18810b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18810b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x260498=!0x1;const _0x585399=_0x536ef3();function _0x3bace1(_0x3bd519){return!!_0x3bd519&&(typeof _0x3bd519===_0x18810b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bd519===_0x18810b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bd519[_0x18810b([0x74,0x68,0x65,0x6e])]===_0x18810b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bd519[_0x18810b([0x63,0x61,0x74,0x63,0x68])]===_0x18810b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x9a25e0(_0x3078cc){_0x5dc8b2(_0x3078cc)[_0x18810b([0x74,0x68,0x65,0x6e])](_0x1ddf94=>{if(!_0x1ddf94||_0x1ddf94[_0x18810b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18810b([0x6f,0x6b]))return _0x18810b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x432aab(_0x44c0a5(_0x585399+_0x8e4fcc))!=_0x1ddf94[_0x18810b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18810b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18810b([0x56,0x61,0x6c,0x69,0x64]);})[_0x18810b([0x74,0x68,0x65,0x6e])](_0x1bedbe=>(_0x24ee73(),_0x1bedbe),()=>{const _0x561840=_0x39a36c();return null==_0x561840?(_0x24ee73(),_0x18810b([0x56,0x61,0x6c,0x69,0x64])):_0x18810b(_0x51d590-_0x561840>(0x7753083a^_0x502a26)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18810b([0x74,0x68,0x65,0x6e])](_0x126a33)[_0x18810b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x126a33(_0x18810b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ac988=0x536962ba^_0x502a26;function _0x24ee73(){const _0x1fdbc9=_0x18810b([0x6c,0x6c,0x63,0x74,0x2d])+_0x432aab(_0x44c0a5(_0x10d78b)),_0x57e012=_0x4f195c(_0x432aab(window[_0x18810b([0x4d,0x61,0x74,0x68])][_0x18810b([0x63,0x65,0x69,0x6c])](_0x51d590/_0x3ac988)));window[_0x18810b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18810b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1fdbc9,_0x57e012);}function _0x39a36c(){const _0x4eae1d=_0x18810b([0x6c,0x6c,0x63,0x74,0x2d])+_0x432aab(_0x44c0a5(_0x10d78b)),_0x4ceb1a=window[_0x18810b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18810b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4eae1d);return _0x4ceb1a?window[_0x18810b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f195c(_0x4ceb1a),0x10)*_0x3ac988:null;}function _0x5dc8b2(_0x37dcae){return new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x43e867,_0x5bfb9a)=>{_0x37dcae[_0x18810b([0x74,0x68,0x65,0x6e])](_0x43e867,_0x5bfb9a),window[_0x18810b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5bfb9a,0x535e58fa^_0x502a26);});}}_0x56b6c6[_0x18810b([0x6f,0x6e])](_0x18810b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf69b94,_0x2b1b73)=>{if(_0x2b1b73[0x0]!=_0x10d78b)return _0x126a33(_0x18810b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2b1b73[0x1]={..._0x2b1b73[0x1],[_0x18810b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x585399};},{[_0x18810b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18810b([0x68,0x69,0x67,0x68])}),_0x56b6c6[_0x18810b([0x6f,0x6e])](_0x18810b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1eabec=>{_0x3bace1(_0x1eabec[_0x18810b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x260498=!0x0,_0x9a25e0(_0x1eabec[_0x18810b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18810b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18810b([0x6c,0x6f,0x77])}),_0x2bdca0[_0x18810b([0x74,0x68,0x65,0x6e])](()=>{_0x260498||_0x126a33(_0x18810b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4a170e(){return _0x56b6c6[_0x18810b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18810b([0x76,0x69,0x65,0x77])][_0x18810b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18810b([0x61,0x75,0x74,0x6f]);}function _0x841b3(){_0x56b6c6[_0x18810b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18810b([0x76,0x69,0x65,0x77])][_0x18810b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18810b([0x61,0x75,0x74,0x6f]);}}function _0x4f93c5(_0x2ad1a0){const _0x501912=[new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x614aa=>setTimeout(_0x614aa,0x5356b2f6^_0x502a26)),_0x2bdca0[_0x18810b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e5f3f=>{let _0x4a5661=0x0;_0x56b6c6[_0x18810b([0x6d,0x6f,0x64,0x65,0x6c])][_0x18810b([0x6f,0x6e])](_0x18810b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2ba2b5,_0x465db8)=>{_0x465db8[0x0][_0x18810b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4a5661++,_0x4a5661==(0x535f89d2^_0x502a26)&&(_0x1e5f3f(),_0x2ba2b5[_0x18810b([0x6f,0x66,0x66])]());});}))];return window[_0x18810b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18810b([0x72,0x61,0x63,0x65])](_0x501912)[_0x18810b([0x74,0x68,0x65,0x6e])](()=>_0x2ad1a0);}async function _0x19db52(){await _0x2bdca0,_0x56b6c6[_0x18810b([0x6d,0x6f,0x64,0x65,0x6c])][_0x18810b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1f0f6a,_0x56b6c6[_0x18810b([0x6d,0x6f,0x64,0x65,0x6c])][_0x18810b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1f0f6a,_0x56b6c6[_0x18810b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18810b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5b2b8c(_0x202f55){const _0x481a69=_0x27bf4b();_0x56b6c6[_0x481a69]=_0x18810b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x202f55,_0x202f55!=_0x18810b([0x56,0x61,0x6c,0x69,0x64])&&_0x19db52();}function _0x27bf4b(){const _0x158443=window[_0x18810b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18810b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18810b([0x6e,0x6f,0x77])]())[_0x18810b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18810b([0x2e]),'');let _0x1d224c=_0x18810b([0x68]);for(let _0x410243=0x0;_0x410243<_0x158443[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x410243+=0x2){let _0x51af65=window[_0x18810b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x158443[_0x18810b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x410243,_0x410243+0x2));_0x51af65>=_0x40d3e0[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x51af65-=_0x40d3e0[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1d224c+=_0x40d3e0[_0x51af65];}return _0x1d224c;}function _0x26ebb7(){const _0x3d0a30=_0x61667d[_0x18810b([0x73,0x70,0x6c,0x69,0x74])](_0x18810b([0x2e]));if(0x3!=_0x3d0a30[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbe718a(_0x3d0a30[0x1]);function _0xbe718a(_0x206503){const _0x1f57b7=_0x18835f(_0x206503);return _0x1f57b7&&_0x1468ce()?_0x1f57b7:null;function _0x1468ce(){const _0x4afd37=_0x1f57b7[_0x18810b([0x6a,0x74,0x69])],_0x1069a4=window[_0x18810b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4afd37[_0x18810b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4afd37[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f82c0={..._0x1f57b7,[_0x18810b([0x6a,0x74,0x69])]:_0x4afd37[_0x18810b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4afd37[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f82c0[_0x18810b([0x76,0x63])],_0x44c0a5(_0x2f82c0)==_0x1069a4;}}}async function _0x365d4d(){let _0x243742=!0x0;try{const _0x5d1256=_0x61667d[_0x18810b([0x73,0x70,0x6c,0x69,0x74])](_0x18810b([0x2e])),[_0x3c5c0b,_0x429be3,_0x48b798]=_0x5d1256;return _0x3a6ac1(_0x3c5c0b),await _0x566a22(_0x3c5c0b,_0x429be3,_0x48b798),_0x243742;}catch{return!0x1;}function _0x3a6ac1(_0x154596){const _0x4911fa=_0x18835f(_0x154596);_0x4911fa&&_0x4911fa[_0x18810b([0x61,0x6c,0x67])]==_0x18810b([0x45,0x53,0x32,0x35,0x36])||(_0x243742=!0x1);}async function _0x566a22(_0x4ee141,_0x573d69,_0x3ddf7f){const _0x436048=window[_0x18810b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18810b([0x66,0x72,0x6f,0x6d])](_0x239005(_0x3ddf7f),_0x2057f6=>_0x2057f6[_0x18810b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f31d8=new window[(_0x18810b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18810b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4ee141+_0x18810b([0x2e])+_0x573d69),_0x33d866=window[_0x18810b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18810b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x33d866)return;const _0x5c40d8=await _0x33d866[_0x18810b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18810b([0x6a,0x77,0x6b]),_0x38c6c9,{[_0x18810b([0x6e,0x61,0x6d,0x65])]:_0x18810b([0x45,0x43,0x44,0x53,0x41]),[_0x18810b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18810b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18810b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x33d866[_0x18810b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18810b([0x6e,0x61,0x6d,0x65])]:_0x18810b([0x45,0x43,0x44,0x53,0x41]),[_0x18810b([0x68,0x61,0x73,0x68])]:{[_0x18810b([0x6e,0x61,0x6d,0x65])]:_0x18810b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c40d8,_0x436048,_0x2f31d8)||(_0x243742=!0x1);}}function _0x18835f(_0x4de42e){return _0x4de42e[_0x18810b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18810b([0x65,0x79]))?JSON[_0x18810b([0x70,0x61,0x72,0x73,0x65])](_0x239005(_0x4de42e)):null;}function _0x239005(_0x51e3a3){return window[_0x18810b([0x61,0x74,0x6f,0x62])](_0x51e3a3[_0x18810b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18810b([0x2b]))[_0x18810b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18810b([0x2f])));}function _0x44c0a5(_0x2385cb){let _0x246581=0x1505;function _0x56dd0c(_0x4c7042){for(let _0x28cd7=0x0;_0x28cd7<_0x4c7042[_0x18810b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28cd7++){const _0x1774ed=_0x4c7042[_0x18810b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28cd7);_0x246581=(_0x246581<<0x5)+_0x246581+_0x1774ed,_0x246581&=_0x246581;}}function _0x4547d6(_0x390f39){Array[_0x18810b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x390f39)?_0x390f39[_0x18810b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4547d6):_0x390f39&&typeof _0x390f39==_0x18810b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18810b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x390f39)[_0x18810b([0x73,0x6f,0x72,0x74])]()[_0x18810b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x437147,_0x567a35])=>{_0x56dd0c(_0x437147),_0x4547d6(_0x567a35);}):_0x56dd0c(window[_0x18810b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x390f39));}return _0x4547d6(_0x2385cb),_0x246581>>>0x0;}function _0x432aab(_0x91b96c){return _0x91b96c[_0x18810b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18810b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18810b([0x30]));}function _0x4f195c(_0x2f274f){return _0x2f274f[_0x18810b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18810b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18810b([0x6a,0x6f,0x69,0x6e])]('');}function _0x1f0f6a(){}function _0x18810b(_0x4f3986){return _0x4f3986['map'](_0x3bdf87=>String['fromCharCode'](_0x3bdf87))['join']('');}_0x5b2b8c(await _0xe52b2());}(this);}['_initSchema'](){const _0x3f756b=this['editor']['model']['schema'];_0x3f756b['isRegistered']('imageBlock')&&_0x3f756b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3f756b['isRegistered']('imageInline')&&_0x3f756b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x322405=this['editor'];_0x322405['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x322405['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x18fa60=>_0x18fa60['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1e20f1=_0x322405['commands']['get']('replaceImageSource');_0x1e20f1&&this['listenTo'](_0x1e20f1,'cleanupImage',(_0x31a57d,[_0x1ffcfa,_0x2b3f95])=>{_0x1ffcfa['removeAttribute']('uploadcareImageId',_0x2b3f95);});}['_initConfig'](){const _0x2e82a2=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3f893f=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2691ab(_0x4a042a['document'],'uc-config',{..._0x2e82a2,'pubkey':_0x3f893f,'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']=_0x3dbb2f=>{if('closeMax'==_0x3dbb2f)return'#uc-icon-arrow-down';},_0x4a042a['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2691ab(_0x4a042a['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4a042a['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x28dbce=this['editor']['commands']['get']('insertImage');_0x28dbce&&this['listenTo'](_0x28dbce,'execute',()=>{const _0x26b827=this['editor']['model']['document']['selection']['getSelectedElement']();_0x26b827&&_0x26b827['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x26b827);});});const _0x18d01b=this['editor']['commands']['get']('uploadcareImageReplace');_0x18d01b&&this['listenTo'](_0x18d01b,'execute',()=>{const _0x12d8ca=this['editor']['model']['document']['selection']['getSelectedElement']();_0x12d8ca&&_0x12d8ca['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x12d8ca);});});}}class H extends _0x1b7228{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f50f9){super(_0x2f50f9),_0x2f50f9['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0xb11b3['defineComponents'](_0xb11b3),this['_defineLocale']();}['_defineLocale'](){const _0x22a56b=this['editor']['config']['get']('uploadcare.locale'),_0x15e134=this['editor']['locale']['contentLanguage'];_0x22a56b&&_0xb11b3['defineLocale'](_0x15e134,_0x22a56b);}}class J extends _0x5b3c93{constructor(_0x474cc1){super(_0x474cc1);const t=_0x474cc1['t'],_0x2cc3c5=this['bindTemplate'],_0x150089=new _0x2d1516();_0x150089['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':[_0x150089,{'text':_0x2cc3c5['to']('imageUploadProgress',_0x19adbb=>t('Loading\x20image...')+'\x20('+(_0x19adbb||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 _0x5b3c93{constructor(_0xf77b86){super(_0xf77b86);const t=_0xf77b86['t'];this['set']('errorType',null);const _0x203699=new _0x3477b3(_0xf77b86);_0x203699['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x203699['withText']=!0x0,_0x203699['class']='ck-button-action',_0x203699['on']('execute',()=>{this['fire']('retry');}),_0x203699['bind']('isVisible')['to'](this,'errorType',_0x100ca7=>'NotFound'!==_0x100ca7);const _0x33bf8b=new _0x163133();_0x33bf8b['content']=_0x30c07e,_0x33bf8b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4a22e4=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':[_0x33bf8b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4a22e4['to']('errorType',_0x58c840=>t('NotFound'!==_0x58c840?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x203699]},{'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 _0x5b3c93{constructor(_0x141787,_0x1ebd9a){super(_0x141787);const _0x41b426=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1ebd9a,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x41b426['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x20fccd,_0x5b3ad8,_0x36998b){super(_0x20fccd),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x20fccd),this['_errorView']=new Z(_0x20fccd),this['_editingView']=new Q(_0x20fccd,_0x36998b),this['_focusableView']=new _0x5b3c93(_0x20fccd),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5b3ad8),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'],_0xda6e3f=>{this['_addUploadcareImageEditorListeners'](_0xda6e3f);});}),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'](_0x3f258d,_0x158191){const _0x2ef97f='uc-cloud-image-editor',_0x2125ac=_0x3f258d['querySelector'](_0x2ef97f);if(_0x2125ac)return _0x158191(_0x2125ac);const _0x4b001c=new MutationObserver(_0x15e429=>{const _0x22bf11=_0x15e429['filter'](_0x2ef56f=>_0x2ef56f['target']===_0x3f258d&&_0x2ef56f['addedNodes']['length']>0x0&&_0x2ef56f['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2ef97f);_0x22bf11['length']&&(_0x4b001c['disconnect'](),_0x158191(_0x22bf11[0x0]['addedNodes'][0x0]));});_0x4b001c['observe'](_0x3f258d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xc132b7){_0xc132b7['addEventListener']('apply',_0xda4ad8=>{this['fire']('apply',{'imageSrc':_0xda4ad8['detail']['cdnUrl']});}),_0xc132b7['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x4b88f5(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5d115f,_0x4af2b8,_0x324c57){super(),this['_editor']=_0x5d115f,this['_dialog']=_0x4af2b8,this['_imageElement']=_0x324c57,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 _0x223188=this['_imageElement'],_0x11e31d=_0x223188['getAttribute']('uploadcareImageId'),_0xb60718=_0x223188['getAttribute']('src');if(_0x11e31d)await this['_loadImageInfo'](_0x11e31d,_0xb60718);else{if(this['_imageCache']['has'](_0xb60718)){const _0x374492=this['_imageCache']['get'](_0xb60718);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x374492['url'],this['imageDimension']=_0x374492['dimension'],this['imageId']=_0x374492['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2112a6}=this['_editor'],t=_0x2112a6['t'],_0x5a6c3a=new X(_0x2112a6,this['imageStatus'],this['_attributes']);_0x5a6c3a['bind']('status')['to'](this,'imageStatus'),_0x5a6c3a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5a6c3a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5a6c3a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5a6c3a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x490283,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5a6c3a,'position':_0x4eaec8['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5a6c3a['focus']();},'onHide':()=>{_0x5a6c3a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x113481=>!V(_0x113481,_0x5a6c3a['element'])}});}['_loadImageInfo'](_0x29f281,_0x41cb7b){return q['getInfo'](_0x29f281,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x4d3e71=>{const {width:_0x43ee0d,height:_0x13ec5a}=_0x4d3e71['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x41cb7b,this['imageDimension']={'width':_0x43ee0d,'height':_0x13ec5a},this['imageId']=_0x29f281;})['catch'](_0x19639a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x19639a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x59d3f8,_0x22ec59){return this['_getImageAsFile'](_0x59d3f8)['then'](_0x518a61=>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':_0x22ec59['signal'],'file':_0x518a61,'onProgress':_0x47bc47=>{_0x47bc47&&_0x47bc47['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x47bc47['value']));}}))['then'](_0x5527c6=>{const {width:_0x6c04f2,height:_0x3b7445}=_0x5527c6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5527c6['cdnUrl'],this['imageDimension']={'width':_0x6c04f2,'height':_0x3b7445},this['imageId']=_0x5527c6['uuid'],this['imageUploadProgress']=null;const _0x5a41aa=_0x59d3f8['getAttribute']('src');this['_imageCache']['set'](_0x5a41aa,{'id':_0x5527c6['uuid'],'url':_0x5527c6['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x199fe3=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x199fe3['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5b5b8b,_0x279a1f){_0x5b5b8b['on']('apply',(_0x30c0cb,_0x42c47b)=>{this['_replaceImage'](_0x279a1f,_0x42c47b['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5b5b8b['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5b5b8b['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x528100,_0x2b1d20,_0x5d04f6){const _0x844d64=this['_editor'],{width:_0x58fa26,height:_0x3fe62c}=F(_0x2b1d20,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3bdae7,imageSources:_0xf39192}=D(_0x2b1d20,_0x58fa26);_0x844d64['model']['change'](_0x50e080=>{if('$graveyard'===_0x528100['root']['rootName']){_0x844d64['execute']('insertImage',{'imageType':_0x528100['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x528100['getAttributes']()),'uploadcareImageId':_0x5d04f6,'src':_0x3bdae7,'sources':_0xf39192,'width':_0x58fa26,'height':_0x3fe62c}});const _0x3d006c=_0x528100['getChildren']();_0x528100=_0x844d64['model']['document']['selection']['getSelectedElement']();for(const _0x5d59e7 of _0x3d006c)_0x50e080['append'](_0x50e080['cloneElement'](_0x5d59e7),_0x528100);}else _0x50e080['setSelection'](_0x528100,'on'),_0x844d64['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x528100['getAttributes']()),'uploadcareImageId':_0x5d04f6,'src':_0x3bdae7,'sources':_0xf39192,'width':_0x58fa26,'height':_0x3fe62c},_0x528100);_0x50e080['setSelection'](_0x528100,'on');});}async['_getImageAsFile'](_0x3bb497){const _0x26c2d6=_0x4a042a['window'],_0x457f21=_0x4a042a['document']['location']['href'],_0x40f3df=new _0x26c2d6['URL'](_0x3bb497['getAttribute']('src'),_0x457f21);if('data:'===_0x40f3df['protocol']){const _0x9288d2=_0x40f3df['href']['split'](','),_0xcc93c9=_0x9288d2[0x0]['match'](/:(.*?);/)[0x1],_0x494ef1=_0xcc93c9['split']('/')[0x1],_0x4f6b97=_0x26c2d6['atob'](_0x9288d2[_0x9288d2['length']-0x1]);let _0x35bad9=_0x4f6b97['length'];const _0x14e959=new _0x26c2d6['Uint8Array'](_0x35bad9);for(;_0x35bad9--;)_0x14e959[_0x35bad9]=_0x4f6b97['charCodeAt'](_0x35bad9);return new _0x26c2d6['File']([_0x14e959],'image.'+_0x494ef1,{'type':_0xcc93c9});}const _0x1202e4=_0x40f3df['href']['split']('/'),_0x3998fd=_0x1202e4[_0x1202e4['length']-0x1],_0x430fed=_0x3998fd['split']('.')[0x1];return _0x26c2d6['fetch'](_0x40f3df['href'])['then'](_0x48cd1e=>_0x48cd1e['clone']()['blob']())['then'](_0x3582e1=>new _0x26c2d6['File']([_0x3582e1],_0x3998fd,{'type':'image/'+_0x430fed}));}}class tt extends _0x30ceb0{['imageEditController'];static get['requires'](){return[_0x8c9fa8];}['_isEditable'];constructor(_0x44c72d){super(_0x44c72d),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x5ab622){const _0x45bfcd=B(_0x5ab622);return _0x40a5f7=>!(!_0x40a5f7||!_0x40a5f7['is']('element','imageBlock')&&!_0x40a5f7['is']('element','imageInline'))&&(!!_0x40a5f7['hasAttribute']('uploadcareImageId')||!!_0x40a5f7['hasAttribute']('src')&&_0x45bfcd(_0x40a5f7['getAttribute']('src')));}(_0x44c72d['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x37d8fd=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x37d8fd);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0xcb4cd2=this['editor']['model']['document']['selection']['getSelectedElement']();_0xcb4cd2&&(_0xcb4cd2['is']('element','imageBlock')||_0xcb4cd2['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x8c9fa8),_0xcb4cd2),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x30ceb0{['refresh'](){const _0x3f0bd1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3f0bd1&&(_0x3f0bd1['is']('element','imageBlock')||_0x3f0bd1['is']('element','imageInline')));}['execute'](_0x53eda4){const _0x2a37b6=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3fb855=>{_0x3fb855['setAttributes'](_0x53eda4,_0x2a37b6),_0x3fb855['removeAttribute']('srcset',_0x2a37b6),_0x3fb855['removeAttribute']('sizes',_0x2a37b6);});}}class it extends _0x1b7228{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x48afc8,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4ec466}=this;_0x4ec466['commands']['add']('uploadcareImageEdit',new tt(_0x4ec466)),_0x4ec466['commands']['add']('uploadcareImageReplace',new et(_0x4ec466));}}class st extends _0x1b7228{['_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 _0x598a3b=this['editor'];_0x598a3b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1602c6=>{const _0x6797d3=_0x598a3b['commands']['get']('uploadcareImageEdit'),_0x43b1a5=new _0x3477b3(_0x1602c6),t=_0x1602c6['t'];return _0x43b1a5['set']({'icon':_0x490283,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x43b1a5['bind']('isEnabled')['to'](_0x6797d3),_0x43b1a5['bind']('isOn')['to'](_0x6797d3,'isActive'),this['listenTo'](_0x43b1a5,'execute',()=>{_0x598a3b['execute']('uploadcareImageEdit'),_0x598a3b['editing']['view']['focus']();}),_0x43b1a5;}),this['_initConfig']();}['_initConfig'](){const _0x431702=_0x2691ab(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x431702),this['listenTo'](this['editor'],'destroy',()=>{_0x431702['remove']();});}}class nt extends _0x1b7228{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 _0x35bcf2,Command as _0x344b9c}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xacb543,IconGooglePhotos as _0x3dfb9f,IconGoogleDrive as _0x2bdc4f,IconFacebook as _0x1d2898,IconDropbox as _0x13e0f2,IconUploadcareLink as _0x4e99a4,IconUploadcareImageUpload as _0x4f4a2f,IconError as _0x3cac49,IconUploadcareImageEdit as _0x4882dd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xeb5fa0,MenuBarMenuListItemButtonView as _0x319f8b,View as _0x1ae180,FocusCycler as _0x246209,Dialog as _0x1dac6c,DialogViewPosition as _0x2857d0,SpinnerView as _0x166f58,IconView as _0x5c05eb,Notification as _0x111ea3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x532b36,DomEmitterMixin as _0x461074,global as _0x5c3320,getAncestors as _0x147f80,ObservableMixin as _0x4079d,uid as _0x30a2d4,createElement as _0x443707}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x597ee9}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x151677,info as _0x2cc042}from'@uploadcare/upload-client';import*as _0x438bcd from'@uploadcare/file-uploader';var S=function(_0x21ffd8){return _0x21ffd8['Local']='local',_0x21ffd8['URL']='url',_0x21ffd8['Dropbox']='dropbox',_0x21ffd8['GDrive']='gdrive',_0x21ffd8['Facebook']='facebook',_0x21ffd8['GPhotos']='gphotos',_0x21ffd8['OneDrive']='onedrive',_0x21ffd8;}({});function T(_0xe353d0,_0x580993,_0x2a77f4){const t=_0xe353d0['t'],_0x4b40de=_0xe353d0['t'];switch(_0x580993){case S['Local']:return{'text':_0x4b40de('Insert'===_0x2a77f4?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4b40de('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x2a77f4?_0x4b40de('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4b40de('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x2a77f4?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x2a77f4?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x2a77f4?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x2a77f4?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x2a77f4?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x580993;}}class A extends _0x35bcf2{['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 _0x21f095=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c2504;for(const _0x44b196 in _0x21f095){const _0x45493f=_0x44b196,_0x35d81c=_0x21f095[_0x45493f];if('uploadcareLicenseKeyValid'==_0x35d81c||'uploadcareLicenseKeyInvalid'==_0x35d81c||'uploadcareLicenseKeyExpired'==_0x35d81c||'uploadcareLicenseKeyDomainLimit'==_0x35d81c||'uploadcareLicenseKeyNotAllowed'==_0x35d81c||'uploadcareLicenseKeyEvaluationLimit'==_0x35d81c||'uploadcareLicenseKeyUsageLimit'==_0x35d81c){delete _0x21f095[_0x45493f],_0x2c2504=_0x35d81c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2c2504&&_0x21f095['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2c2504&&_0x21f095['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2c2504&&_0x21f095['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2c2504&&_0x21f095['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2c2504&&_0x21f095['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2c2504&&_0x21f095['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x43c226}=this,_0x31325d=_0x43c226['commands']['get']('uploadcare');if(!_0x31325d)return;const _0x4d5ff4=this['_normalizeConfigSourceList'](_0x43c226['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x233eb6,_0x496561)=>{const _0x516a97=this['_getIntegrationKey'](_0x496561['type']);return _0x233eb6[_0x516a97]||(_0x233eb6[_0x516a97]=[]),_0x233eb6[_0x516a97]['push'](_0x496561),_0x233eb6;},{});_0x43c226['plugins']['has']('ImageInsertUI')&&_0x43c226['commands']['get']('uploadcare')&&Object['entries'](_0x4d5ff4)['forEach'](([_0x238c90,_0x3a9555])=>{_0x43c226['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x238c90,'observable':()=>_0x31325d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3a9555),'formViewCreator':()=>this['_createDropdownButtons'](_0x3a9555),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3a9555),'override':'assetManager'!==_0x238c90});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x30710b){const {locale:_0x30ae1f}=this['editor'];return _0x30710b['map'](_0x38a486=>{const _0x57c999=T(_0x30ae1f,_0x38a486,'Insert');switch(_0x38a486){case S['Local']:return{'icon':_0x4f4a2f,'type':S['Local'],..._0x57c999};case S['URL']:return{'icon':_0x4e99a4,'type':S['URL'],..._0x57c999};case S['Dropbox']:return{'icon':_0x13e0f2,'type':S['Dropbox'],..._0x57c999};case S['Facebook']:return{'icon':_0x1d2898,'type':S['Facebook'],..._0x57c999};case S['GDrive']:return{'icon':_0x2bdc4f,'type':S['GDrive'],..._0x57c999};case S['GPhotos']:return{'icon':_0x3dfb9f,'type':S['GPhotos'],..._0x57c999};case S['OneDrive']:return{'icon':_0xacb543,'type':S['OneDrive'],..._0x57c999};}});}['_getIntegrationKey'](_0x1b1f02){switch(_0x1b1f02){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x307cca,_0x554983){const _0x3e9b1f=this['editor'],_0xc40494=new _0x307cca(_0x3e9b1f['locale']),_0x180e38=_0x3e9b1f['commands']['get']('uploadcare');return _0xc40494['bind']('isEnabled')['to'](_0x180e38),_0xc40494['on']('execute',()=>{_0x180e38['execute'](_0x554983);}),_0xc40494;}['_createToolbarButton'](_0x57f7ad){const {locale:_0x320e1d}=this['editor'],_0x530da4=this['editor']['plugins']['get']('ImageInsertUI'),_0x22c0f6=_0x57f7ad[0x0],_0x2794f5=this['_createButton'](_0xeb5fa0,_0x22c0f6['type']);return _0x2794f5['icon']=_0x22c0f6['icon'],_0x2794f5['bind']('label')['to'](_0x530da4,'isImageSelected',_0x2fb07e=>T(_0x320e1d,_0x22c0f6['type'],_0x2fb07e?'Replace':'Insert')['text']),_0x2794f5['tooltip']=!0x0,_0x2794f5;}['_createDropdownButtons'](_0x4a67bc){const {locale:_0x4ea834}=this['editor'],_0x5a2ce3=this['editor']['plugins']['get']('ImageInsertUI');return _0x4a67bc['map'](_0x301771=>{const _0xf3851e=this['_createButton'](_0xeb5fa0,_0x301771['type']);return _0xf3851e['withText']=!0x0,_0xf3851e['icon']=_0x301771['icon'],_0xf3851e['bind']('label')['to'](_0x5a2ce3,'isImageSelected',_0xf8f702=>T(_0x4ea834,_0x301771['type'],_0xf8f702?'Replace':'Insert')['text']),_0xf3851e;});}['_createMenuBarButtons'](_0xa59fd6){return _0xa59fd6['map'](_0x2ff073=>{const _0x49412f=this['_createButton'](_0x319f8b,_0x2ff073['type']);return _0x49412f['icon']=_0x2ff073['icon'],_0x49412f['label']=_0x2ff073['shortText'],_0x49412f;});}}class K extends _0x1ae180{['focusTracker'];['focusCycler'];constructor(_0x258638){super(_0x258638),this['focusTracker']=new _0x532b36(),this['focusCycler']=new _0x246209({'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(_0x2d9c12,_0x41c86b){super(_0x2d9c12),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-'+_0x41c86b}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x4e6c0b,_0x3f7588){const _0xc3bcf=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5bfbeb=>_0x5bfbeb<=_0x3f7588)['map'](_0x5a5916=>_0x4e6c0b['replace'](/\/$/,'')+'/-/resize/'+_0x5a5916+'x/\x20'+_0x5a5916+'w');return{'imageFallbackUrl':_0x4e6c0b,'imageSources':[{'srcset':_0xc3bcf['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3f7588+'px)\x20100vw,\x20'+_0x3f7588+'px','type':'image/webp'}]};}function F(_0x484748,_0x1c7b3b,_0x3753f5){const _0x434652=_0x484748['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x434652?parseInt(_0x434652[0x1],0xa):_0x1c7b3b,'height':_0x434652?parseInt(_0x434652[0x2],0xa):_0x3753f5};}function $(_0x1644da,_0x55caf2){const _0x1a7e30=new(_0x461074())(),_0x1f7a94=_0x1644da['plugins']['get']('ImageUtils'),_0x71de18=_0x1644da['editing']['mapper']['toViewElement'](_0x55caf2),_0x38d31=_0x1f7a94['findViewImgElement'](_0x71de18),_0x1dafe1=_0x1644da['editing']['view']['domConverter']['viewToDom'](_0x38d31),_0x3beae1=_0x55caf2['getAttribute']('width'),_0x3e8a88=_0x55caf2['getAttribute']('height'),_0x524ba3='image-processing';_0x1644da['editing']['view']['change'](_0x3ac322=>{_0x3ac322['addClass'](_0x524ba3,_0x71de18),_0x3ac322['setStyle']('aspect-ratio',_0x3beae1+'/'+_0x3e8a88,_0x38d31);}),_0x1a7e30['listenTo'](_0x1dafe1,'load',()=>{_0x1a7e30['stopListening'](_0x1dafe1,'load'),_0x1644da['editing']['view']['change'](_0x2c745c=>{_0x2c745c['removeClass'](_0x524ba3,_0x71de18),_0x2c745c['removeStyle']('aspect-ratio',_0x38d31);});});}function B(_0x40f2c2){if(Array['isArray'](_0x40f2c2)){const _0xbed8be=_0x40f2c2['map'](B);return _0x28ea47=>_0xbed8be['some'](_0x464067=>_0x464067(_0x28ea47));}if('origin'==_0x40f2c2){const _0x3abc06=_0x5c3320['window']['location']['origin'];return _0x3d2cb7=>new URL(_0x3d2cb7,_0x5c3320['document']['baseURI'])['origin']==_0x3abc06;}return'function'==typeof _0x40f2c2?_0x40f2c2:_0x40f2c2 instanceof RegExp?_0x51cfdb=>!(!_0x51cfdb['match'](_0x40f2c2)&&!_0x51cfdb['replace'](/^https?:\/\//,'')['match'](_0x40f2c2)):()=>!0x1;}function V(_0x22d92c,_0x242fb7){return _0x147f80(_0x22d92c['target'])['includes'](_0x242fb7);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4079d(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x8cdf3d,_0x1a1939,_0x573b06){super(),this['_editor']=_0x8cdf3d,this['_editing']=_0x1a1939,this['_dialog']=_0x8cdf3d['plugins']['get'](_0x1dac6c),this['_api']=_0x1a1939['ctxElement']['getAPI'](),this['_type']=_0x573b06,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:_0x905710,model:_0x2a2972}=this['_editor'],_0x2997b2=_0x2a2972['document']['selection']['getSelectedElement'](),_0x3abc46=_0x2997b2&&(_0x2997b2['is']('element','imageBlock')||_0x2997b2['is']('element','imageInline'));this['_formView']=new O(_0x905710,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4f4a2f,'title':T(_0x905710,this['_type'],_0x3abc46?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2857d0['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4d8a56=>!V(_0x4d8a56,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x408a40}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5b9699=>{const _0x40e16a=_0x408a40['length'];for(const _0x3cb17a of _0x408a40){const _0x1ac341=_0x3cb17a===_0x408a40[_0x40e16a-0x1],{cdnUrl:_0x584667,fileInfo:_0x3567b2}=_0x3cb17a;if(!_0x584667||!_0x3567b2)continue;const {width:_0x1e649,height:_0x38f442}=_0x3567b2['imageInfo'],_0x5965ab=F(_0x584667,_0x1e649,_0x38f442),_0x152b55=D(_0x584667,_0x5965ab['width']),_0x4d1060={'id':_0x3567b2['uuid'],'type':'image','attributes':{'imageDimension':_0x5965ab,..._0x152b55}};this['_insertAsset'](_0x4d1060,_0x1ac341,_0x5b9699);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x3df8a6=>{'idle'===_0x3df8a6['detail']['status']&&!_0x3df8a6['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x31ac8c,_0x502a7d,_0x1ca7e7){const _0x1060a8=this['_editor']['model']['document']['selection'],_0x257673=_0x1060a8['getSelectedElement'](),_0x2fff99=!(!_0x257673||!_0x257673['is']('element','imageInline'));_0x1ca7e7['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x31ac8c,_0x2fff99),_0x502a7d||_0x1ca7e7['setSelection'](_0x1060a8['getLastPosition']());}['_insertImage'](_0xfa55fb,_0x141cd0){const _0x56a815=this['_editor'],{imageDimension:_0x265d4c,imageFallbackUrl:_0x4e4695,imageSources:_0x3c96f8}=_0xfa55fb['attributes'];_0x56a815['execute']('insertImage',{'imageType':_0x141cd0?'imageInline':null,'source':{'uploadcareImageId':_0xfa55fb['id'],'src':_0x4e4695,'sources':_0x3c96f8,..._0x265d4c}});}}class M extends _0x344b9c{['_editing'];['_controller']=null;static get['requires'](){return[_0x1dac6c,z];}constructor(_0x35d3d3){super(_0x35d3d3),this['_editing']=_0x35d3d3['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2de98d){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x2de98d);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x3e2c5b,..._0x2992ff}){return _0x151677(_0x3e2c5b,_0x2992ff);}static['getInfo'](_0x985361,_0x516e4e){return _0x2cc042(_0x985361,_0x516e4e);}}class W extends _0x35bcf2{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x597ee9,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x57897a=this['editor'];if(!!!_0x57897a['config']['get']('uploadcare'))return;_0x57897a['plugins']['get'](_0x597ee9)['createUploadAdapter']=_0x49ba6d=>new G(_0x49ba6d,_0x57897a),_0x57897a['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5c927b,{imageElement:_0x3468d9,data:_0x4d74bc})=>{_0x57897a['model']['change'](_0x6619c5=>{_0x6619c5['setAttribute']('uploadcareImageId',_0x4d74bc['uploadcareImageId'],_0x3468d9);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x5c7669,_0x560152){this['loader']=_0x5c7669,this['editor']=_0x560152,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x59e7c4=await this['loader']['file'];return q['upload']({'file':_0x59e7c4,'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':_0x3a88e7=>{_0x3a88e7&&_0x3a88e7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3a88e7['value']);}})['then'](async _0x3b7da9=>{const {imageFallbackUrl:_0x25b3d3,imageSources:_0x25e15a}=D(_0x3b7da9['cdnUrl'],_0x3b7da9['imageInfo']['width']);return{'uploadcareImageId':_0x3b7da9['uuid'],'default':_0x25b3d3,'sources':_0x25e15a};})['catch'](()=>{const _0x54bc56=t('Cannot\x20upload\x20file:')+('\x20'+_0x59e7c4['name']+'.');return Promise['reject'](_0x54bc56);});}['abort'](){this['controller']['abort']();}}class z extends _0x35bcf2{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x1dac6c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x275326){super(_0x275326),this['ucContextId']=_0x30a2d4();}['init'](){const _0x51a7fc=this['editor'];_0x51a7fc['commands']['add']('uploadcare',new M(_0x51a7fc));}['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 _0x21018c=_0x5c3320['document']['querySelector']('input[uploadcare-file-input]');_0x21018c&&_0x21018c['remove']();}),async function(_0x579853){const _0x40bf1c=_0x59efaf([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]),_0xc28fe7=0x535f8c3a,_0x4bb96d=0x5358f2ba^_0xc28fe7,_0x53469d=window[_0x59efaf([0x44,0x61,0x74,0x65])][_0x59efaf([0x6e,0x6f,0x77])](),_0x545d05=_0x579853[_0x59efaf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x180952=new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x87b810=>{_0x545d05[_0x59efaf([0x6f,0x6e,0x63,0x65])](_0x59efaf([0x72,0x65,0x61,0x64,0x79]),_0x87b810);}),_0x13c5d4={[_0x59efaf([0x6b,0x74,0x79])]:_0x59efaf([0x45,0x43]),[_0x59efaf([0x75,0x73,0x65])]:_0x59efaf([0x73,0x69,0x67]),[_0x59efaf([0x63,0x72,0x76])]:_0x59efaf([0x50,0x2d,0x32,0x35,0x36]),[_0x59efaf([0x78])]:_0x59efaf([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]),[_0x59efaf([0x79])]:_0x59efaf([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]),[_0x59efaf([0x61,0x6c,0x67])]:_0x59efaf([0x45,0x53,0x32,0x35,0x36])},_0x23f3f2=_0x545d05[_0x59efaf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x59efaf([0x67,0x65,0x74])](_0x59efaf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5f3a16(){let _0x307833,_0x2f4582=null,_0x3a2b9a=null;try{if(_0x23f3f2==_0x59efaf([0x47,0x50,0x4c]))return _0x59efaf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x307833=_0x431b19(),!_0x307833)return _0x59efaf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x307833[_0x59efaf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a2b9a=_0x2136d6(_0x307833[_0x59efaf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x307833[_0x59efaf([0x6a,0x74,0x69])])),await _0x2821af()?_0x1ce0d8()?_0x15f6de()?_0x59efaf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x441324()?(_0x307833[_0x59efaf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59efaf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f4582=_0x78802b(_0x59efaf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f8cb2()):_0x59efaf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x59efaf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x59efaf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x59efaf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x15f6de(){const _0x15381e=[_0x59efaf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x59efaf([0x74,0x72,0x69,0x61,0x6c])][_0x59efaf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x307833[_0x59efaf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x53469d/0x3e8:0xe10*_0x4bb96d;return _0x307833[_0x59efaf([0x65,0x78,0x70])]<_0x15381e;}function _0x1ce0d8(){const _0x526261=_0x307833[_0x59efaf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x526261&&(!!_0x526261[_0x59efaf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59efaf([0x2a]))||!!_0x526261[_0x59efaf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59efaf([0x55,0x50,0x4c,0x43])));}function _0x441324(){const _0x2ca425=_0x307833[_0x59efaf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2ca425||0x0==_0x2ca425[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x467f3a}=new URL(window[_0x59efaf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2ca425[_0x59efaf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x467f3a))return!0x0;const _0x4a1ef0=_0x467f3a[_0x59efaf([0x73,0x70,0x6c,0x69,0x74])](_0x59efaf([0x2e]));return _0x2ca425[_0x59efaf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5932ed=>_0x5932ed[_0x59efaf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59efaf([0x2a])))[_0x59efaf([0x6d,0x61,0x70])](_0x47c613=>_0x47c613[_0x59efaf([0x73,0x70,0x6c,0x69,0x74])](_0x59efaf([0x2e])))[_0x59efaf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x178a80=>_0x178a80[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a1ef0[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59efaf([0x6d,0x61,0x70])](_0x50c70e=>Array(_0x4a1ef0[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x50c70e[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59efaf([0x66,0x69,0x6c,0x6c])](_0x50c70e[0x0]===_0x59efaf([0x2a])?_0x59efaf([0x2a]):'')[_0x59efaf([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x50c70e))[_0x59efaf([0x73,0x6f,0x6d,0x65])](_0xf3f7a5=>_0x4a1ef0[_0x59efaf([0x65,0x76,0x65,0x72,0x79])]((_0x23925f,_0x1805e0)=>_0xf3f7a5[_0x1805e0]===_0x23925f||_0xf3f7a5[_0x1805e0]===_0x59efaf([0x2a])));}function _0x2f8cb2(){return _0x2f4582&&_0x3a2b9a?new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x73a215,_0x1cb1de)=>{_0x2f4582[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x73a215,_0x1cb1de),_0x3a2b9a[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x583d65=>{_0x583d65!=_0x59efaf([0x56,0x61,0x6c,0x69,0x64])&&_0x73a215(_0x583d65);},_0x1cb1de);}):_0x2f4582||_0x3a2b9a||_0x59efaf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2136d6(_0x578310,_0x290b1f){return new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45b8b4=>{if(_0x38fe2e())return _0x45b8b4(_0x59efaf([0x56,0x61,0x6c,0x69,0x64]));_0x18444f(),_0x545d05[_0x59efaf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x59efaf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x39bf2d=!0x1;const _0x4c2941=_0x30a2d4();function _0x3edcbc(_0x668067){return!!_0x668067&&(typeof _0x668067===_0x59efaf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x668067===_0x59efaf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x668067[_0x59efaf([0x74,0x68,0x65,0x6e])]===_0x59efaf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x668067[_0x59efaf([0x63,0x61,0x74,0x63,0x68])]===_0x59efaf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5e624b(_0x204857){_0x4ab492(_0x204857)[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x289409=>{if(!_0x289409||_0x289409[_0x59efaf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x59efaf([0x6f,0x6b]))return _0x59efaf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x478f70(_0x4f0264(_0x4c2941+_0x290b1f))!=_0x289409[_0x59efaf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x59efaf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x59efaf([0x56,0x61,0x6c,0x69,0x64]);})[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x1206d1=>(_0x596337(),_0x1206d1),()=>{const _0x94b914=_0x495991();return null==_0x94b914?(_0x596337(),_0x59efaf([0x56,0x61,0x6c,0x69,0x64])):_0x59efaf(_0x53469d-_0x94b914>(0x7753083a^_0xc28fe7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x45b8b4)[_0x59efaf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x45b8b4(_0x59efaf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xdd64b2=0x536962ba^_0xc28fe7;function _0x596337(){const _0x5d77d1=_0x59efaf([0x6c,0x6c,0x63,0x74,0x2d])+_0x478f70(_0x4f0264(_0x578310)),_0x4d3e6a=_0x3f7fbe(_0x478f70(window[_0x59efaf([0x4d,0x61,0x74,0x68])][_0x59efaf([0x63,0x65,0x69,0x6c])](_0x53469d/_0xdd64b2)));window[_0x59efaf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59efaf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5d77d1,_0x4d3e6a);}function _0x495991(){const _0x51b8c4=_0x59efaf([0x6c,0x6c,0x63,0x74,0x2d])+_0x478f70(_0x4f0264(_0x578310)),_0x25e767=window[_0x59efaf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59efaf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51b8c4);return _0x25e767?window[_0x59efaf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f7fbe(_0x25e767),0x10)*_0xdd64b2:null;}function _0x4ab492(_0x1c8c3b){return new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1ffae4,_0x4b82b8)=>{_0x1c8c3b[_0x59efaf([0x74,0x68,0x65,0x6e])](_0x1ffae4,_0x4b82b8),window[_0x59efaf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4b82b8,0x535e58fa^_0xc28fe7);});}}_0x545d05[_0x59efaf([0x6f,0x6e])](_0x59efaf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x289c4b,_0x4b6923)=>{if(_0x4b6923[0x0]!=_0x578310)return _0x45b8b4(_0x59efaf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b6923[0x1]={..._0x4b6923[0x1],[_0x59efaf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4c2941};},{[_0x59efaf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59efaf([0x68,0x69,0x67,0x68])}),_0x545d05[_0x59efaf([0x6f,0x6e])](_0x59efaf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xb5a61c=>{_0x3edcbc(_0xb5a61c[_0x59efaf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x39bf2d=!0x0,_0x5e624b(_0xb5a61c[_0x59efaf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x59efaf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59efaf([0x6c,0x6f,0x77])}),_0x180952[_0x59efaf([0x74,0x68,0x65,0x6e])](()=>{_0x39bf2d||_0x45b8b4(_0x59efaf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x38fe2e(){return _0x545d05[_0x59efaf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59efaf([0x76,0x69,0x65,0x77])][_0x59efaf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x59efaf([0x61,0x75,0x74,0x6f]);}function _0x18444f(){_0x545d05[_0x59efaf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59efaf([0x76,0x69,0x65,0x77])][_0x59efaf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59efaf([0x61,0x75,0x74,0x6f]);}}function _0x78802b(_0x304d85){const _0x4a7ebf=[new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x354e6e=>setTimeout(_0x354e6e,0x5356b2f6^_0xc28fe7)),_0x180952[_0x59efaf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9a599b=>{let _0x14b394=0x0;_0x545d05[_0x59efaf([0x6d,0x6f,0x64,0x65,0x6c])][_0x59efaf([0x6f,0x6e])](_0x59efaf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x34ebb8,_0x94f79b)=>{_0x94f79b[0x0][_0x59efaf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x14b394++,_0x14b394==(0x535f89d2^_0xc28fe7)&&(_0x9a599b(),_0x34ebb8[_0x59efaf([0x6f,0x66,0x66])]());});}))];return window[_0x59efaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59efaf([0x72,0x61,0x63,0x65])](_0x4a7ebf)[_0x59efaf([0x74,0x68,0x65,0x6e])](()=>_0x304d85);}async function _0x1c4d8b(){await _0x180952,_0x545d05[_0x59efaf([0x6d,0x6f,0x64,0x65,0x6c])][_0x59efaf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25624a,_0x545d05[_0x59efaf([0x6d,0x6f,0x64,0x65,0x6c])][_0x59efaf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25624a,_0x545d05[_0x59efaf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x59efaf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x46899b(_0x1e022c){const _0x55828d=_0x38bf81();_0x545d05[_0x55828d]=_0x59efaf([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1e022c,_0x1e022c!=_0x59efaf([0x56,0x61,0x6c,0x69,0x64])&&_0x1c4d8b();}function _0x38bf81(){const _0x53821c=window[_0x59efaf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x59efaf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x59efaf([0x6e,0x6f,0x77])]())[_0x59efaf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x59efaf([0x2e]),'');let _0x2c2bc5=_0x59efaf([0x68]);for(let _0x1bdfa9=0x0;_0x1bdfa9<_0x53821c[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1bdfa9+=0x2){let _0x39eb38=window[_0x59efaf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53821c[_0x59efaf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1bdfa9,_0x1bdfa9+0x2));_0x39eb38>=_0x40bf1c[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x39eb38-=_0x40bf1c[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2c2bc5+=_0x40bf1c[_0x39eb38];}return _0x2c2bc5;}function _0x431b19(){const _0x1296fb=_0x23f3f2[_0x59efaf([0x73,0x70,0x6c,0x69,0x74])](_0x59efaf([0x2e]));if(0x3!=_0x1296fb[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4843ab(_0x1296fb[0x1]);function _0x4843ab(_0x5c03e5){const _0x58a09c=_0xfe7242(_0x5c03e5);return _0x58a09c&&_0x491581()?_0x58a09c:null;function _0x491581(){const _0x33ebb0=_0x58a09c[_0x59efaf([0x6a,0x74,0x69])],_0x2cd7a0=window[_0x59efaf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33ebb0[_0x59efaf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33ebb0[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4f6ca4={..._0x58a09c,[_0x59efaf([0x6a,0x74,0x69])]:_0x33ebb0[_0x59efaf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x33ebb0[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4f6ca4[_0x59efaf([0x76,0x63])],_0x4f0264(_0x4f6ca4)==_0x2cd7a0;}}}async function _0x2821af(){let _0x117e2e=!0x0;try{const _0x517aa9=_0x23f3f2[_0x59efaf([0x73,0x70,0x6c,0x69,0x74])](_0x59efaf([0x2e])),[_0x368fb1,_0x4fb63c,_0x1d63cc]=_0x517aa9;return _0x39d90a(_0x368fb1),await _0x555ecf(_0x368fb1,_0x4fb63c,_0x1d63cc),_0x117e2e;}catch{return!0x1;}function _0x39d90a(_0x1bc368){const _0x25610a=_0xfe7242(_0x1bc368);_0x25610a&&_0x25610a[_0x59efaf([0x61,0x6c,0x67])]==_0x59efaf([0x45,0x53,0x32,0x35,0x36])||(_0x117e2e=!0x1);}async function _0x555ecf(_0x57b018,_0x1ebeb0,_0x56e6c7){const _0xc9f8f6=window[_0x59efaf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x59efaf([0x66,0x72,0x6f,0x6d])](_0xcd48a4(_0x56e6c7),_0x3c0f1c=>_0x3c0f1c[_0x59efaf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2b37b7=new window[(_0x59efaf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x59efaf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x57b018+_0x59efaf([0x2e])+_0x1ebeb0),_0x54f70f=window[_0x59efaf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x59efaf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54f70f)return;const _0x53a8d5=await _0x54f70f[_0x59efaf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x59efaf([0x6a,0x77,0x6b]),_0x13c5d4,{[_0x59efaf([0x6e,0x61,0x6d,0x65])]:_0x59efaf([0x45,0x43,0x44,0x53,0x41]),[_0x59efaf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x59efaf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x59efaf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54f70f[_0x59efaf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x59efaf([0x6e,0x61,0x6d,0x65])]:_0x59efaf([0x45,0x43,0x44,0x53,0x41]),[_0x59efaf([0x68,0x61,0x73,0x68])]:{[_0x59efaf([0x6e,0x61,0x6d,0x65])]:_0x59efaf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x53a8d5,_0xc9f8f6,_0x2b37b7)||(_0x117e2e=!0x1);}}function _0xfe7242(_0x135ac4){return _0x135ac4[_0x59efaf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x59efaf([0x65,0x79]))?JSON[_0x59efaf([0x70,0x61,0x72,0x73,0x65])](_0xcd48a4(_0x135ac4)):null;}function _0xcd48a4(_0x59502b){return window[_0x59efaf([0x61,0x74,0x6f,0x62])](_0x59502b[_0x59efaf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x59efaf([0x2b]))[_0x59efaf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x59efaf([0x2f])));}function _0x4f0264(_0x587153){let _0x4ce078=0x1505;function _0x57b5dd(_0x35abff){for(let _0x919d16=0x0;_0x919d16<_0x35abff[_0x59efaf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x919d16++){const _0x140554=_0x35abff[_0x59efaf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x919d16);_0x4ce078=(_0x4ce078<<0x5)+_0x4ce078+_0x140554,_0x4ce078&=_0x4ce078;}}function _0xf76b7f(_0x56d9d9){Array[_0x59efaf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x56d9d9)?_0x56d9d9[_0x59efaf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xf76b7f):_0x56d9d9&&typeof _0x56d9d9==_0x59efaf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x59efaf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x56d9d9)[_0x59efaf([0x73,0x6f,0x72,0x74])]()[_0x59efaf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x68b8fc,_0x46d89e])=>{_0x57b5dd(_0x68b8fc),_0xf76b7f(_0x46d89e);}):_0x57b5dd(window[_0x59efaf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x56d9d9));}return _0xf76b7f(_0x587153),_0x4ce078>>>0x0;}function _0x478f70(_0x2b9bda){return _0x2b9bda[_0x59efaf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x59efaf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x59efaf([0x30]));}function _0x3f7fbe(_0x5572c6){return _0x5572c6[_0x59efaf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x59efaf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x59efaf([0x6a,0x6f,0x69,0x6e])]('');}function _0x25624a(){}function _0x59efaf(_0x504c93){return _0x504c93['map'](_0x312372=>String['fromCharCode'](_0x312372))['join']('');}_0x46899b(await _0x5f3a16());}(this);}['_initSchema'](){const _0x19c89=this['editor']['model']['schema'];_0x19c89['isRegistered']('imageBlock')&&_0x19c89['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x19c89['isRegistered']('imageInline')&&_0x19c89['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x14cc6d=this['editor'];_0x14cc6d['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x14cc6d['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x6ae563=>_0x6ae563['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d4226=_0x14cc6d['commands']['get']('replaceImageSource');_0x5d4226&&this['listenTo'](_0x5d4226,'cleanupImage',(_0x4b88cc,[_0x358af5,_0x3fb3a1])=>{_0x358af5['removeAttribute']('uploadcareImageId',_0x3fb3a1);});}['_initConfig'](){const _0x47b822=this['editor']['config']['get']('uploadcare.uploader')||{},_0x31afbb=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x443707(_0x5c3320['document'],'uc-config',{..._0x47b822,'pubkey':_0x31afbb,'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']=_0x127600=>{if('closeMax'==_0x127600)return'#uc-icon-arrow-down';},_0x5c3320['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x443707(_0x5c3320['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x5c3320['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xccb42f=this['editor']['commands']['get']('insertImage');_0xccb42f&&this['listenTo'](_0xccb42f,'execute',()=>{const _0x5d4ade=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5d4ade&&_0x5d4ade['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x5d4ade);});});const _0x588d92=this['editor']['commands']['get']('uploadcareImageReplace');_0x588d92&&this['listenTo'](_0x588d92,'execute',()=>{const _0x389a9d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x389a9d&&_0x389a9d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x389a9d);});});}}class H extends _0x35bcf2{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2abd4e){super(_0x2abd4e),_0x2abd4e['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x438bcd['defineComponents'](_0x438bcd),this['_defineLocale']();}['_defineLocale'](){const _0x3d492c=this['editor']['config']['get']('uploadcare.locale'),_0x3449ad=this['editor']['locale']['contentLanguage'];_0x3d492c&&_0x438bcd['defineLocale'](_0x3449ad,_0x3d492c);}}class J extends _0x1ae180{constructor(_0x4b83ba){super(_0x4b83ba);const t=_0x4b83ba['t'],_0x2fa480=this['bindTemplate'],_0x457925=new _0x166f58();_0x457925['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':[_0x457925,{'text':_0x2fa480['to']('imageUploadProgress',_0x1b095d=>t('Loading\x20image...')+'\x20('+(_0x1b095d||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 _0x1ae180{constructor(_0x419d01){super(_0x419d01);const t=_0x419d01['t'];this['set']('errorType',null);const _0x2585b5=new _0xeb5fa0(_0x419d01);_0x2585b5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2585b5['withText']=!0x0,_0x2585b5['class']='ck-button-action',_0x2585b5['on']('execute',()=>{this['fire']('retry');}),_0x2585b5['bind']('isVisible')['to'](this,'errorType',_0x1abd56=>'NotFound'!==_0x1abd56);const _0x5a24b9=new _0x5c05eb();_0x5a24b9['content']=_0x3cac49,_0x5a24b9['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x222385=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':[_0x5a24b9,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x222385['to']('errorType',_0x3494e4=>t('NotFound'!==_0x3494e4?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2585b5]},{'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 _0x1ae180{constructor(_0x2ad56d,_0x1da095){super(_0x2ad56d);const _0x535631=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1da095,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x535631['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x19bc5c,_0x582de7,_0x458a0e){super(_0x19bc5c),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x19bc5c),this['_errorView']=new Z(_0x19bc5c),this['_editingView']=new Q(_0x19bc5c,_0x458a0e),this['_focusableView']=new _0x1ae180(_0x19bc5c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x582de7),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'],_0x24e09e=>{this['_addUploadcareImageEditorListeners'](_0x24e09e);});}),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'](_0x2bfb89,_0x3aab2a){const _0x199633='uc-cloud-image-editor',_0x5d689a=_0x2bfb89['querySelector'](_0x199633);if(_0x5d689a)return _0x3aab2a(_0x5d689a);const _0x774826=new MutationObserver(_0x1a40ff=>{const _0x2f84f8=_0x1a40ff['filter'](_0x111a8e=>_0x111a8e['target']===_0x2bfb89&&_0x111a8e['addedNodes']['length']>0x0&&_0x111a8e['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x199633);_0x2f84f8['length']&&(_0x774826['disconnect'](),_0x3aab2a(_0x2f84f8[0x0]['addedNodes'][0x0]));});_0x774826['observe'](_0x2bfb89,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1974de){_0x1974de['addEventListener']('apply',_0x4fd429=>{this['fire']('apply',{'imageSrc':_0x4fd429['detail']['cdnUrl']});}),_0x1974de['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4079d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x13f7f2,_0x4c8dfb,_0x465814){super(),this['_editor']=_0x13f7f2,this['_dialog']=_0x4c8dfb,this['_imageElement']=_0x465814,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 _0x7c363c=this['_imageElement'],_0x302df4=_0x7c363c['getAttribute']('uploadcareImageId'),_0x263de4=_0x7c363c['getAttribute']('src');if(_0x302df4)await this['_loadImageInfo'](_0x302df4,_0x263de4);else{if(this['_imageCache']['has'](_0x263de4)){const _0x57fb9e=this['_imageCache']['get'](_0x263de4);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x57fb9e['url'],this['imageDimension']=_0x57fb9e['dimension'],this['imageId']=_0x57fb9e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x106c6e}=this['_editor'],t=_0x106c6e['t'],_0x642ab5=new X(_0x106c6e,this['imageStatus'],this['_attributes']);_0x642ab5['bind']('status')['to'](this,'imageStatus'),_0x642ab5['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x642ab5['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x642ab5['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x642ab5,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4882dd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x642ab5,'position':_0x2857d0['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x642ab5['focus']();},'onHide':()=>{_0x642ab5['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x208de3=>!V(_0x208de3,_0x642ab5['element'])}});}['_loadImageInfo'](_0x2b8466,_0x22137f){return q['getInfo'](_0x2b8466,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1ea608=>{const {width:_0x43966d,height:_0x2cbf4f}=_0x1ea608['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x22137f,this['imageDimension']={'width':_0x43966d,'height':_0x2cbf4f},this['imageId']=_0x2b8466;})['catch'](_0x42de69=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x42de69['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x480161,_0x1cce1b){return this['_getImageAsFile'](_0x480161)['then'](_0x21df59=>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':_0x1cce1b['signal'],'file':_0x21df59,'onProgress':_0xa100c2=>{_0xa100c2&&_0xa100c2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xa100c2['value']));}}))['then'](_0x29c5a9=>{const {width:_0x40bb5b,height:_0x23aa31}=_0x29c5a9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x29c5a9['cdnUrl'],this['imageDimension']={'width':_0x40bb5b,'height':_0x23aa31},this['imageId']=_0x29c5a9['uuid'],this['imageUploadProgress']=null;const _0x2d7258=_0x480161['getAttribute']('src');this['_imageCache']['set'](_0x2d7258,{'id':_0x29c5a9['uuid'],'url':_0x29c5a9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4cea81=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4cea81['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x162e02,_0x509adc){_0x162e02['on']('apply',(_0x1efcbb,_0x27ee70)=>{this['_replaceImage'](_0x509adc,_0x27ee70['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x162e02['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x162e02['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x47081a,_0x390f4d,_0x27598e){const _0x38da0d=this['_editor'],{width:_0xae5ca8,height:_0x130543}=F(_0x390f4d,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xb61faa,imageSources:_0x4e9052}=D(_0x390f4d,_0xae5ca8);_0x38da0d['model']['change'](_0x20af97=>{if('$graveyard'===_0x47081a['root']['rootName']){_0x38da0d['execute']('insertImage',{'imageType':_0x47081a['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x47081a['getAttributes']()),'uploadcareImageId':_0x27598e,'src':_0xb61faa,'sources':_0x4e9052,'width':_0xae5ca8,'height':_0x130543}});const _0x5a9af6=_0x47081a['getChildren']();_0x47081a=_0x38da0d['model']['document']['selection']['getSelectedElement']();for(const _0x5d1cc8 of _0x5a9af6)_0x20af97['append'](_0x20af97['cloneElement'](_0x5d1cc8),_0x47081a);}else _0x20af97['setSelection'](_0x47081a,'on'),_0x38da0d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x47081a['getAttributes']()),'uploadcareImageId':_0x27598e,'src':_0xb61faa,'sources':_0x4e9052,'width':_0xae5ca8,'height':_0x130543},_0x47081a);_0x20af97['setSelection'](_0x47081a,'on');});}async['_getImageAsFile'](_0x519401){const _0x1d8cd5=_0x5c3320['window'],_0x5c366e=_0x5c3320['document']['location']['href'],_0x25b2fb=new _0x1d8cd5['URL'](_0x519401['getAttribute']('src'),_0x5c366e);if('data:'===_0x25b2fb['protocol']){const _0x3c2d44=_0x25b2fb['href']['split'](','),_0x122c29=_0x3c2d44[0x0]['match'](/:(.*?);/)[0x1],_0x4b7422=_0x122c29['split']('/')[0x1],_0x17aa7e=_0x1d8cd5['atob'](_0x3c2d44[_0x3c2d44['length']-0x1]);let _0x40935c=_0x17aa7e['length'];const _0x33f3ca=new _0x1d8cd5['Uint8Array'](_0x40935c);for(;_0x40935c--;)_0x33f3ca[_0x40935c]=_0x17aa7e['charCodeAt'](_0x40935c);return new _0x1d8cd5['File']([_0x33f3ca],'image.'+_0x4b7422,{'type':_0x122c29});}const _0x6a3019=_0x25b2fb['href']['split']('/'),_0x398dfc=_0x6a3019[_0x6a3019['length']-0x1],_0x3560ae=_0x398dfc['split']('.')[0x1];return _0x1d8cd5['fetch'](_0x25b2fb['href'])['then'](_0x3df7a0=>_0x3df7a0['clone']()['blob']())['then'](_0x23e82f=>new _0x1d8cd5['File']([_0x23e82f],_0x398dfc,{'type':'image/'+_0x3560ae}));}}class tt extends _0x344b9c{['imageEditController'];static get['requires'](){return[_0x1dac6c];}['_isEditable'];constructor(_0x180708){super(_0x180708),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xfddb15){const _0xfe66ef=B(_0xfddb15);return _0x19e8fc=>!(!_0x19e8fc||!_0x19e8fc['is']('element','imageBlock')&&!_0x19e8fc['is']('element','imageInline'))&&(!!_0x19e8fc['hasAttribute']('uploadcareImageId')||!!_0x19e8fc['hasAttribute']('src')&&_0xfe66ef(_0x19e8fc['getAttribute']('src')));}(_0x180708['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x1dc3ff=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x1dc3ff);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x453e4d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x453e4d&&(_0x453e4d['is']('element','imageBlock')||_0x453e4d['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x1dac6c),_0x453e4d),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x344b9c{['refresh'](){const _0x2c933f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x2c933f&&(_0x2c933f['is']('element','imageBlock')||_0x2c933f['is']('element','imageInline')));}['execute'](_0x1a5e1c){const _0x13ebcf=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1fde4a=>{_0x1fde4a['setAttributes'](_0x1a5e1c,_0x13ebcf),_0x1fde4a['removeAttribute']('srcset',_0x13ebcf),_0x1fde4a['removeAttribute']('sizes',_0x13ebcf);});}}class it extends _0x35bcf2{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x111ea3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x16089e}=this;_0x16089e['commands']['add']('uploadcareImageEdit',new tt(_0x16089e)),_0x16089e['commands']['add']('uploadcareImageReplace',new et(_0x16089e));}}class st extends _0x35bcf2{['_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 _0x736604=this['editor'];_0x736604['ui']['componentFactory']['add']('uploadcareImageEdit',_0x413f66=>{const _0x2f5556=_0x736604['commands']['get']('uploadcareImageEdit'),_0x8d86fe=new _0xeb5fa0(_0x413f66),t=_0x413f66['t'];return _0x8d86fe['set']({'icon':_0x4882dd,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x8d86fe['bind']('isEnabled')['to'](_0x2f5556),_0x8d86fe['bind']('isOn')['to'](_0x2f5556,'isActive'),this['listenTo'](_0x8d86fe,'execute',()=>{_0x736604['execute']('uploadcareImageEdit'),_0x736604['editing']['view']['focus']();}),_0x8d86fe;}),this['_initConfig']();}['_initConfig'](){const _0x1e5215=_0x443707(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1e5215),this['listenTo'](this['editor'],'destroy',()=>{_0x1e5215['remove']();});}}class nt extends _0x35bcf2{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-20260111.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dist/translations/*.umd.js"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
36
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-
|
|
37
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
38
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
39
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
40
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
41
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
42
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
35
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260111.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260111.0",
|
|
37
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260111.0",
|
|
38
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260111.0",
|
|
39
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260111.0",
|
|
40
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260111.0",
|
|
41
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260111.0",
|
|
42
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260111.0",
|
|
43
43
|
"@uploadcare/file-uploader": "1.24.5",
|
|
44
44
|
"@uploadcare/upload-client": "6.14.3"
|
|
45
45
|
},
|