@ckeditor/ckeditor5-uploadcare 46.0.1-alpha.11 → 46.0.1-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x29a0bc,Command as _0x10354e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x56d4cd,IconGooglePhotos as _0x21148e,IconGoogleDrive as _0x1047d0,IconFacebook as _0x453530,IconDropbox as _0x55d99b,IconUploadcareLink as _0x3f9dc5,IconUploadcareImageUpload as _0x2711cc,IconError as _0xd502a6,IconUploadcareImageEdit as _0x3d6c5f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1d4a1e,MenuBarMenuListItemButtonView as _0x394a09,View as _0x2109bd,FocusCycler as _0x21b226,Dialog as _0x1c0e49,DialogViewPosition as _0x190573,SpinnerView as _0x2395ff,IconView as _0x1b8027,Notification as _0x19a146}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x41409c,DomEmitterMixin as _0x398419,global as _0x1b1233,getAncestors as _0x4c58cc,ObservableMixin as _0x3d136f,uid as _0x3fb264,createElement as _0x26a26b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x348d39}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x338941,info as _0x4c11db}from'@uploadcare/upload-client';import*as _0x2b4456 from'@uploadcare/file-uploader';var i=function(_0x45ab1d){return _0x45ab1d['Local']='local',_0x45ab1d['URL']='url',_0x45ab1d['Dropbox']='dropbox',_0x45ab1d['GDrive']='gdrive',_0x45ab1d['Facebook']='facebook',_0x45ab1d['GPhotos']='gphotos',_0x45ab1d['OneDrive']='onedrive',_0x45ab1d;}({});function _(_0x28b4e6,_0x1c6753,_0x11fc1b){const t=_0x28b4e6['t'],_0xcaad7a=_0x28b4e6['t'];switch(_0x1c6753){case i['Local']:return{'text':_0xcaad7a('Insert'===_0x11fc1b?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xcaad7a('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x11fc1b?_0xcaad7a('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xcaad7a('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x11fc1b?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x11fc1b?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x11fc1b?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x11fc1b?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x11fc1b?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1c6753;}}class e extends _0x29a0bc{['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 _0x28f148=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x556c45;for(const _0x399209 in _0x28f148){const _0x404860=_0x399209,_0x1707b8=_0x28f148[_0x404860];if('uploadcareLicenseKeyValid'==_0x1707b8||'uploadcareLicenseKeyInvalid'==_0x1707b8||'uploadcareLicenseKeyExpired'==_0x1707b8||'uploadcareLicenseKeyDomainLimit'==_0x1707b8||'uploadcareLicenseKeyNotAllowed'==_0x1707b8||'uploadcareLicenseKeyEvaluationLimit'==_0x1707b8||'uploadcareLicenseKeyTrialLimit'==_0x1707b8||'uploadcareLicenseKeyUsageLimit'==_0x1707b8){delete _0x28f148[_0x404860],_0x556c45=_0x1707b8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x556c45&&_0x28f148['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x556c45&&_0x28f148['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x556c45&&_0x28f148['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x556c45&&_0x28f148['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x556c45&&_0x28f148['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x556c45&&_0x28f148['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x556c45&&_0x28f148['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2cc2ab}=this,_0x1f16fc=_0x2cc2ab['commands']['get']('uploadcare');if(!_0x1f16fc)return;const _0x12a3a5=this['_normalizeConfigSourceList'](_0x2cc2ab['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3f2ba4,_0x6ea21e)=>{const _0x178575=this['_getIntegrationKey'](_0x6ea21e['type']);return _0x3f2ba4[_0x178575]||(_0x3f2ba4[_0x178575]=[]),_0x3f2ba4[_0x178575]['push'](_0x6ea21e),_0x3f2ba4;},{});_0x2cc2ab['plugins']['has']('ImageInsertUI')&&_0x2cc2ab['commands']['get']('uploadcare')&&Object['entries'](_0x12a3a5)['forEach'](([_0x2cd106,_0x558ce9])=>{_0x2cc2ab['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2cd106,'observable':()=>_0x1f16fc,'buttonViewCreator':()=>this['_createToolbarButton'](_0x558ce9),'formViewCreator':()=>this['_createDropdownButtons'](_0x558ce9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x558ce9),'override':'assetManager'!==_0x2cd106});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x36a299){const {locale:_0x3bedd8}=this['editor'];return _0x36a299['map'](_0x56b914=>{const _0x20c260=_(_0x3bedd8,_0x56b914,'Insert');switch(_0x56b914){case i['Local']:return{'icon':_0x2711cc,'type':i['Local'],..._0x20c260};case i['URL']:return{'icon':_0x3f9dc5,'type':i['URL'],..._0x20c260};case i['Dropbox']:return{'icon':_0x55d99b,'type':i['Dropbox'],..._0x20c260};case i['Facebook']:return{'icon':_0x453530,'type':i['Facebook'],..._0x20c260};case i['GDrive']:return{'icon':_0x1047d0,'type':i['GDrive'],..._0x20c260};case i['GPhotos']:return{'icon':_0x21148e,'type':i['GPhotos'],..._0x20c260};case i['OneDrive']:return{'icon':_0x56d4cd,'type':i['OneDrive'],..._0x20c260};}});}['_getIntegrationKey'](_0x2c6177){switch(_0x2c6177){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x682459,_0x91680a){const _0x4555f8=this['editor'],_0x191933=new _0x682459(_0x4555f8['locale']),_0x544f69=_0x4555f8['commands']['get']('uploadcare');return _0x191933['bind']('isEnabled')['to'](_0x544f69),_0x191933['on']('execute',()=>{_0x544f69['execute'](_0x91680a);}),_0x191933;}['_createToolbarButton'](_0x4bf051){const {locale:_0x585f25}=this['editor'],_0x4f995c=this['editor']['plugins']['get']('ImageInsertUI'),_0x4aa081=_0x4bf051[0x0],_0xfa5234=this['_createButton'](_0x1d4a1e,_0x4aa081['type']);return _0xfa5234['icon']=_0x4aa081['icon'],_0xfa5234['bind']('label')['to'](_0x4f995c,'isImageSelected',_0x34474c=>_(_0x585f25,_0x4aa081['type'],_0x34474c?'Replace':'Insert')['text']),_0xfa5234['tooltip']=!0x0,_0xfa5234;}['_createDropdownButtons'](_0x10707a){const {locale:_0xb5f27a}=this['editor'],_0x3361d9=this['editor']['plugins']['get']('ImageInsertUI');return _0x10707a['map'](_0x398f8b=>{const _0x38c8f0=this['_createButton'](_0x1d4a1e,_0x398f8b['type']);return _0x38c8f0['withText']=!0x0,_0x38c8f0['icon']=_0x398f8b['icon'],_0x38c8f0['bind']('label')['to'](_0x3361d9,'isImageSelected',_0x4397fd=>_(_0xb5f27a,_0x398f8b['type'],_0x4397fd?'Replace':'Insert')['text']),_0x38c8f0;});}['_createMenuBarButtons'](_0xd0d43c){return _0xd0d43c['map'](_0xc1e74d=>{const _0x5eee50=this['_createButton'](_0x394a09,_0xc1e74d['type']);return _0x5eee50['icon']=_0xc1e74d['icon'],_0x5eee50['label']=_0xc1e74d['shortText'],_0x5eee50;});}}class F extends _0x2109bd{['focusTracker'];['focusCycler'];constructor(_0x559273){super(_0x559273),this['focusTracker']=new _0x41409c(),this['focusCycler']=new _0x21b226({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0xe99bdb,_0x33b7c6){super(_0xe99bdb),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-'+_0x33b7c6}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x2f03e9,_0x57282f){const _0x41e189=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x2dcc2b=>_0x2dcc2b<=_0x57282f)['map'](_0x277d12=>_0x2f03e9['replace'](/\/$/,'')+'/-/resize/'+_0x277d12+'x/\x20'+_0x277d12+'w');return{'imageFallbackUrl':_0x2f03e9,'imageSources':[{'srcset':_0x41e189['join'](',\x20'),'sizes':'(max-width:\x20'+_0x57282f+'px)\x20100vw,\x20'+_0x57282f+'px','type':'image/webp'}]};}function C(_0x118ce1,_0x699b89,_0x30d09e){const _0x43177f=_0x118ce1['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x43177f?parseInt(_0x43177f[0x1],0xa):_0x699b89,'height':_0x43177f?parseInt(_0x43177f[0x2],0xa):_0x30d09e};}function p(_0x25a6cc,_0x2e531f){const _0x5d8414=new(_0x398419())(),_0x1be97e=_0x25a6cc['plugins']['get']('ImageUtils'),_0x31e2a0=_0x25a6cc['editing']['mapper']['toViewElement'](_0x2e531f),_0x1c392f=_0x1be97e['findViewImgElement'](_0x31e2a0),_0x3fa47e=_0x25a6cc['editing']['view']['domConverter']['viewToDom'](_0x1c392f),_0x3470b3=_0x2e531f['getAttribute']('width'),_0x3cb857=_0x2e531f['getAttribute']('height'),_0x3e261d='image-processing';_0x25a6cc['editing']['view']['change'](_0x34ad91=>{_0x34ad91['addClass'](_0x3e261d,_0x31e2a0),_0x34ad91['setStyle']('aspect-ratio',_0x3470b3+'/'+_0x3cb857,_0x1c392f);}),_0x5d8414['listenTo'](_0x3fa47e,'load',()=>{_0x5d8414['stopListening'](_0x3fa47e,'load'),_0x25a6cc['editing']['view']['change'](_0x42d678=>{_0x42d678['removeClass'](_0x3e261d,_0x31e2a0),_0x42d678['removeStyle']('aspect-ratio',_0x1c392f);});});}function G(_0x55bb28){if(Array['isArray'](_0x55bb28)){const _0x2c27b8=_0x55bb28['map'](G);return _0xa52dad=>_0x2c27b8['some'](_0x1b4c55=>_0x1b4c55(_0xa52dad));}if('origin'==_0x55bb28){const _0x51e698=_0x1b1233['window']['location']['origin'];return _0x1ce64a=>new URL(_0x1ce64a,_0x1b1233['document']['baseURI'])['origin']==_0x51e698;}return'function'==typeof _0x55bb28?_0x55bb28:_0x55bb28 instanceof RegExp?_0x25a7ec=>!(!_0x25a7ec['match'](_0x55bb28)&&!_0x25a7ec['replace'](/^https?:\/\//,'')['match'](_0x55bb28)):()=>!0x1;}function S(_0x8f7409,_0x106e8f){return _0x4c58cc(_0x8f7409['target'])['includes'](_0x106e8f);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x3d136f(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2e299f,_0x5e979a,_0x5df51a){super(),this['_editor']=_0x2e299f,this['_editing']=_0x5e979a,this['_dialog']=_0x2e299f['plugins']['get'](_0x1c0e49),this['_api']=_0x5e979a['ctxElement']['getAPI'](),this['_type']=_0x5df51a,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:_0x21b66c,model:_0x47b40e}=this['_editor'],_0x540104=_0x47b40e['document']['selection']['getSelectedElement'](),_0x3285cf=_0x540104&&(_0x540104['is']('element','imageBlock')||_0x540104['is']('element','imageInline'));this['_formView']=new x(_0x21b66c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2711cc,'title':_(_0x21b66c,this['_type'],_0x3285cf?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x190573['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4b4b67=>!S(_0x4b4b67,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x44fc97}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4990cf=>{const _0x16cea4=_0x44fc97['length'];for(const _0x2edd48 of _0x44fc97){const _0x36dc94=_0x2edd48===_0x44fc97[_0x16cea4-0x1],{cdnUrl:_0x402fa2,fileInfo:_0x27e8b0}=_0x2edd48;if(!_0x402fa2||!_0x27e8b0)continue;const {width:_0x5bdfbf,height:_0x173315}=_0x27e8b0['imageInfo'],_0x56da44=C(_0x402fa2,_0x5bdfbf,_0x173315),_0x2ad445=k(_0x402fa2,_0x56da44['width']),_0x3ceba5={'id':_0x27e8b0['uuid'],'type':'image','attributes':{'imageDimension':_0x56da44,..._0x2ad445}};this['_insertAsset'](_0x3ceba5,_0x36dc94,_0x4990cf);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1afdfd=>{'idle'===_0x1afdfd['detail']['status']&&!_0x1afdfd['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x506be3,_0x370ee0,_0x1cd864){const _0x3f8df7=this['_editor']['model']['document']['selection'],_0x54a44a=_0x3f8df7['getSelectedElement'](),_0xd3de55=!(!_0x54a44a||!_0x54a44a['is']('element','imageInline'));_0x1cd864['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x506be3,_0xd3de55),_0x370ee0||_0x1cd864['setSelection'](_0x3f8df7['getLastPosition']());}['_insertImage'](_0x777e0a,_0x4aecd4){const _0x518f39=this['_editor'],{imageDimension:_0x3ba11d,imageFallbackUrl:_0x402eec,imageSources:_0x3523b8}=_0x777e0a['attributes'];_0x518f39['execute']('insertImage',{'imageType':_0x4aecd4?'imageInline':null,'source':{'uploadcareImageId':_0x777e0a['id'],'src':_0x402eec,'sources':_0x3523b8,..._0x3ba11d}});}}class w extends _0x10354e{['_editing'];['_controller']=null;static get['requires'](){return[_0x1c0e49,o];}constructor(_0x4535b4){super(_0x4535b4),this['_editing']=_0x4535b4['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xd8fc60){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xd8fc60);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x51b326,publicKey:_0x20152b,signal:_0x1892fc,onProgress:_0x47d237}){return _0x338941(_0x51b326,{'publicKey':_0x20152b,'store':'auto','signal':_0x1892fc,'onProgress':_0x47d237});}static['getInfo'](_0x4c9fee,_0x47a509){return _0x4c11db(_0x4c9fee,_0x47a509);}}class f extends _0x29a0bc{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x348d39,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1f1229=this['editor'];if(!!!_0x1f1229['config']['get']('uploadcare'))return;_0x1f1229['plugins']['get'](_0x348d39)['createUploadAdapter']=_0x40a11c=>new A(_0x40a11c,_0x1f1229),_0x1f1229['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x32e050,{imageElement:_0x45a3ed,data:_0x3f4680})=>{_0x1f1229['model']['change'](_0x58494e=>{_0x58494e['setAttribute']('uploadcareImageId',_0x3f4680['uploadcareImageId'],_0x45a3ed);});});}}class A{['loader'];['editor'];['controller'];constructor(_0xe813b1,_0x22be7a){this['loader']=_0xe813b1,this['editor']=_0x22be7a,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x5bb9cd=this['editor']['config']['get']('uploadcare.pubkey'),_0x3d9d47=await this['loader']['file'];return j['upload']({'file':_0x3d9d47,'publicKey':_0x5bb9cd,'signal':this['controller']['signal'],'onProgress':_0x3917d7=>{_0x3917d7&&_0x3917d7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3917d7['value']);}})['then'](async _0x2cf80f=>{const {imageFallbackUrl:_0x9b0d2,imageSources:_0x4f9fbb}=k(_0x2cf80f['cdnUrl'],_0x2cf80f['imageInfo']['width']);return{'uploadcareImageId':_0x2cf80f['uuid'],'default':_0x9b0d2,'sources':_0x4f9fbb};})['catch'](()=>{const _0x3b3e22=t('Cannot\x20upload\x20file:')+('\x20'+_0x3d9d47['name']+'.');return Promise['reject'](_0x3b3e22);});}['abort'](){this['controller']['abort']();}}class o extends _0x29a0bc{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1c0e49];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1d4eba){super(_0x1d4eba),this['ucContextId']=_0x3fb264();}['init'](){const _0x3777f7=this['editor'];_0x3777f7['commands']['add']('uploadcare',new w(_0x3777f7));}['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 _0x955525=_0x1b1233['document']['querySelector']('input[uploadcare-file-input]');_0x955525&&_0x955525['remove']();}),async function(_0x25f729){const _0x2d3d28=_0x2ccb2d([0x38,0x31,0x34,0x75,0x58,0x70,0x46,0x36,0x76,0x4b,0x66,0x59,0x72,0x74,0x57,0x4f,0x41,0x5a,0x4a,0x33,0x43,0x64,0x6e,0x50,0x52,0x69,0x49,0x6d,0x77,0x35,0x4e,0x30,0x6b,0x42,0x65,0x37,0x7a,0x51,0x53,0x62,0x78,0x56,0x45,0x71,0x44,0x61,0x32,0x68,0x63,0x6a,0x6c,0x47,0x55,0x6f,0x54,0x39,0x48,0x73,0x79,0x4d,0x4c,0x67]),_0x30b15f=0x4bda1088,_0x6291b=0x4bdd7f68^_0x30b15f,_0x5f17b4=window[_0x2ccb2d([0x44,0x61,0x74,0x65])][_0x2ccb2d([0x6e,0x6f,0x77])](),_0x3ae547=_0x25f729[_0x2ccb2d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x21843c=new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e54e6=>{_0x3ae547[_0x2ccb2d([0x6f,0x6e,0x63,0x65])](_0x2ccb2d([0x72,0x65,0x61,0x64,0x79]),_0x3e54e6);}),_0x340c9e={[_0x2ccb2d([0x6b,0x74,0x79])]:_0x2ccb2d([0x45,0x43]),[_0x2ccb2d([0x75,0x73,0x65])]:_0x2ccb2d([0x73,0x69,0x67]),[_0x2ccb2d([0x63,0x72,0x76])]:_0x2ccb2d([0x50,0x2d,0x32,0x35,0x36]),[_0x2ccb2d([0x78])]:_0x2ccb2d([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]),[_0x2ccb2d([0x79])]:_0x2ccb2d([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]),[_0x2ccb2d([0x61,0x6c,0x67])]:_0x2ccb2d([0x45,0x53,0x32,0x35,0x36])},_0x3a2c39=_0x3ae547[_0x2ccb2d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2ccb2d([0x67,0x65,0x74])](_0x2ccb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x47dc4e(){let _0x1ba408,_0x5390f2=null,_0x3a7ff2=null;try{if(_0x3a2c39==_0x2ccb2d([0x47,0x50,0x4c]))return _0x2ccb2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ba408=_0x44a93c(),!_0x1ba408)return _0x2ccb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ba408[_0x2ccb2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a7ff2=_0x17d93a(_0x1ba408[_0x2ccb2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ba408[_0x2ccb2d([0x6a,0x74,0x69])])),await _0x4aa14d()?_0x4f1b45()?_0x4bd87b()?_0x2ccb2d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x38a3b7()?(_0x1ba408[_0x2ccb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2ccb2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5390f2=_0x1d81c0(_0x2ccb2d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ba408[_0x2ccb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2ccb2d([0x74,0x72,0x69,0x61,0x6c])&&(_0x5390f2=_0x1d81c0(_0x2ccb2d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x379447()):_0x2ccb2d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2ccb2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2ccb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2ccb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4bd87b(){const _0x4f7481=[_0x2ccb2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2ccb2d([0x74,0x72,0x69,0x61,0x6c])][_0x2ccb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ba408[_0x2ccb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5f17b4/0x3e8:0xe10*_0x6291b;return _0x1ba408[_0x2ccb2d([0x65,0x78,0x70])]<_0x4f7481;}function _0x4f1b45(){const _0x2f6be9=_0x1ba408[_0x2ccb2d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2f6be9&&(!!_0x2f6be9[_0x2ccb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ccb2d([0x2a]))||!!_0x2f6be9[_0x2ccb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ccb2d([0x55,0x50,0x4c,0x43])));}function _0x38a3b7(){const _0x2d2411=_0x1ba408[_0x2ccb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2d2411||0x0==_0x2d2411[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xa7f131}=new URL(window[_0x2ccb2d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2d2411[_0x2ccb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa7f131))return!0x0;const _0x9ed4f7=_0xa7f131[_0x2ccb2d([0x73,0x70,0x6c,0x69,0x74])](_0x2ccb2d([0x2e]));return _0x2d2411[_0x2ccb2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4d3d12=>_0x4d3d12[_0x2ccb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2ccb2d([0x2a])))[_0x2ccb2d([0x6d,0x61,0x70])](_0x4d9826=>_0x4d9826[_0x2ccb2d([0x73,0x70,0x6c,0x69,0x74])](_0x2ccb2d([0x2e])))[_0x2ccb2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35732b=>_0x35732b[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x9ed4f7[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2ccb2d([0x6d,0x61,0x70])](_0x5b048f=>Array(_0x9ed4f7[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5b048f[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2ccb2d([0x66,0x69,0x6c,0x6c])](_0x5b048f[0x0]===_0x2ccb2d([0x2a])?_0x2ccb2d([0x2a]):'')[_0x2ccb2d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5b048f))[_0x2ccb2d([0x73,0x6f,0x6d,0x65])](_0x25547a=>_0x9ed4f7[_0x2ccb2d([0x65,0x76,0x65,0x72,0x79])]((_0x135a03,_0x1e74a7)=>_0x25547a[_0x1e74a7]===_0x135a03||_0x25547a[_0x1e74a7]===_0x2ccb2d([0x2a])));}function _0x379447(){return _0x5390f2&&_0x3a7ff2?new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9b9e54,_0x34dcc6)=>{_0x5390f2[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0x9b9e54,_0x34dcc6),_0x3a7ff2[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0x13413c=>{_0x13413c!=_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64])&&_0x9b9e54(_0x13413c);},_0x34dcc6);}):_0x5390f2||_0x3a7ff2||_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x17d93a(_0xd385d1,_0x47b519){return new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x204e2e=>{if(_0x58af95())return _0x204e2e(_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64]));_0x5a6731(),_0x3ae547[_0x2ccb2d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2ccb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x90f1ee=!0x1;const _0x1f6458=_0x3fb264();function _0x526632(_0x340ecd){return!!_0x340ecd&&(typeof _0x340ecd===_0x2ccb2d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x340ecd===_0x2ccb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x340ecd[_0x2ccb2d([0x74,0x68,0x65,0x6e])]===_0x2ccb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x340ecd[_0x2ccb2d([0x63,0x61,0x74,0x63,0x68])]===_0x2ccb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x975975(_0x4209b5){_0x35a1ad(_0x4209b5)[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0x23c650=>{if(!_0x23c650||_0x23c650[_0x2ccb2d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2ccb2d([0x6f,0x6b]))return _0x2ccb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1a33fb(_0x27891c(_0x1f6458+_0x47b519))!=_0x23c650[_0x2ccb2d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2ccb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64]);})[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0x30a7f6=>(_0x3c074a(),_0x30a7f6),()=>{const _0x421f0c=_0x44ca5c();return null==_0x421f0c?(_0x3c074a(),_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64])):_0x2ccb2d(_0x5f17b4-_0x421f0c>(0x6fd69488^_0x30b15f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0x204e2e)[_0x2ccb2d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x204e2e(_0x2ccb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xf18355=0x4becfe08^_0x30b15f;function _0x3c074a(){const _0x4dcb35=_0x2ccb2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a33fb(_0x27891c(_0xd385d1)),_0x1ae89c=_0x6be146(_0x1a33fb(window[_0x2ccb2d([0x4d,0x61,0x74,0x68])][_0x2ccb2d([0x63,0x65,0x69,0x6c])](_0x5f17b4/_0xf18355)));window[_0x2ccb2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2ccb2d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4dcb35,_0x1ae89c);}function _0x44ca5c(){const _0x268e3e=_0x2ccb2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a33fb(_0x27891c(_0xd385d1)),_0x297f14=window[_0x2ccb2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2ccb2d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x268e3e);return _0x297f14?window[_0x2ccb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6be146(_0x297f14),0x10)*_0xf18355:null;}function _0x35a1ad(_0x27392d){return new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xebbff7,_0x26fa9e)=>{_0x27392d[_0x2ccb2d([0x74,0x68,0x65,0x6e])](_0xebbff7,_0x26fa9e),window[_0x2ccb2d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26fa9e,0x4bdbc448^_0x30b15f);});}}_0x3ae547[_0x2ccb2d([0x6f,0x6e])](_0x2ccb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x370f4f,_0x43e516)=>{if(_0x43e516[0x0]!=_0xd385d1)return _0x204e2e(_0x2ccb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x43e516[0x1]={..._0x43e516[0x1],[_0x2ccb2d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1f6458};},{[_0x2ccb2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2ccb2d([0x68,0x69,0x67,0x68])}),_0x3ae547[_0x2ccb2d([0x6f,0x6e])](_0x2ccb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1c4f7a=>{_0x526632(_0x1c4f7a[_0x2ccb2d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x90f1ee=!0x0,_0x975975(_0x1c4f7a[_0x2ccb2d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2ccb2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2ccb2d([0x6c,0x6f,0x77])}),_0x21843c[_0x2ccb2d([0x74,0x68,0x65,0x6e])](()=>{_0x90f1ee||_0x204e2e(_0x2ccb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x58af95(){return _0x3ae547[_0x2ccb2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ccb2d([0x76,0x69,0x65,0x77])][_0x2ccb2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2ccb2d([0x61,0x75,0x74,0x6f]);}function _0x5a6731(){_0x3ae547[_0x2ccb2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ccb2d([0x76,0x69,0x65,0x77])][_0x2ccb2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2ccb2d([0x61,0x75,0x74,0x6f]);}}function _0x1d81c0(_0x570712){const _0x5b47f5=[new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13bbd4=>setTimeout(_0x13bbd4,0x4bd32e44^_0x30b15f)),_0x21843c[_0x2ccb2d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e8d20=>{let _0x258b64=0x0;_0x3ae547[_0x2ccb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ccb2d([0x6f,0x6e])](_0x2ccb2d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4c766a,_0xc351ea)=>{_0xc351ea[0x0][_0x2ccb2d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x258b64++,_0x258b64==(0x4bda1170^_0x30b15f)&&(_0x4e8d20(),_0x4c766a[_0x2ccb2d([0x6f,0x66,0x66])]());});}))];return window[_0x2ccb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2ccb2d([0x72,0x61,0x63,0x65])](_0x5b47f5)[_0x2ccb2d([0x74,0x68,0x65,0x6e])](()=>_0x570712);}async function _0xc0f9fe(){await _0x21843c,_0x3ae547[_0x2ccb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ccb2d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x36068c,_0x3ae547[_0x2ccb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x2ccb2d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x36068c,_0x3ae547[_0x2ccb2d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2ccb2d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x26da8f(_0x533e96){const _0x5141d9=_0x2de96c();_0x3ae547[_0x5141d9]=_0x2ccb2d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x533e96,_0x533e96!=_0x2ccb2d([0x56,0x61,0x6c,0x69,0x64])&&_0xc0f9fe();}function _0x2de96c(){const _0x3baa77=window[_0x2ccb2d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2ccb2d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2ccb2d([0x6e,0x6f,0x77])]())[_0x2ccb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2ccb2d([0x2e]),'');let _0xcbce46=_0x2ccb2d([0x75]);for(let _0x2f4bda=0x0;_0x2f4bda<_0x3baa77[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f4bda+=0x2){let _0x6e239a=window[_0x2ccb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3baa77[_0x2ccb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2f4bda,_0x2f4bda+0x2));_0x6e239a>=_0x2d3d28[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x6e239a-=_0x2d3d28[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xcbce46+=_0x2d3d28[_0x6e239a];}return _0xcbce46;}function _0x44a93c(){const _0x370214=_0x3a2c39[_0x2ccb2d([0x73,0x70,0x6c,0x69,0x74])](_0x2ccb2d([0x2e]));if(0x3!=_0x370214[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3fb4e3(_0x370214[0x1]);function _0x3fb4e3(_0x2ec1b9){const _0x3290a9=_0x4af9d9(_0x2ec1b9);return _0x3290a9&&_0x153cef()?_0x3290a9:null;function _0x153cef(){const _0x31b7e3=_0x3290a9[_0x2ccb2d([0x6a,0x74,0x69])],_0xca008e=window[_0x2ccb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31b7e3[_0x2ccb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31b7e3[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x329d83={..._0x3290a9,[_0x2ccb2d([0x6a,0x74,0x69])]:_0x31b7e3[_0x2ccb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x31b7e3[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x329d83[_0x2ccb2d([0x76,0x63])],_0x27891c(_0x329d83)==_0xca008e;}}}async function _0x4aa14d(){let _0x3d5d82=!0x0;try{const _0x55fb5e=_0x3a2c39[_0x2ccb2d([0x73,0x70,0x6c,0x69,0x74])](_0x2ccb2d([0x2e])),[_0x4a5b0b,_0x3f1b2f,_0x38f988]=_0x55fb5e;return _0x50b478(_0x4a5b0b),await _0x3d231a(_0x4a5b0b,_0x3f1b2f,_0x38f988),_0x3d5d82;}catch{return!0x1;}function _0x50b478(_0x23198f){const _0x123b17=_0x4af9d9(_0x23198f);_0x123b17&&_0x123b17[_0x2ccb2d([0x61,0x6c,0x67])]==_0x2ccb2d([0x45,0x53,0x32,0x35,0x36])||(_0x3d5d82=!0x1);}async function _0x3d231a(_0x1dccd2,_0x54001a,_0x224a49){const _0x51d8ed=window[_0x2ccb2d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2ccb2d([0x66,0x72,0x6f,0x6d])](_0x9738be(_0x224a49),_0x31dcc0=>_0x31dcc0[_0x2ccb2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xb272d2=new window[(_0x2ccb2d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2ccb2d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1dccd2+_0x2ccb2d([0x2e])+_0x54001a),_0x29c4fc=window[_0x2ccb2d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2ccb2d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29c4fc)return;const _0xfb1c72=await _0x29c4fc[_0x2ccb2d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2ccb2d([0x6a,0x77,0x6b]),_0x340c9e,{[_0x2ccb2d([0x6e,0x61,0x6d,0x65])]:_0x2ccb2d([0x45,0x43,0x44,0x53,0x41]),[_0x2ccb2d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2ccb2d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2ccb2d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29c4fc[_0x2ccb2d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2ccb2d([0x6e,0x61,0x6d,0x65])]:_0x2ccb2d([0x45,0x43,0x44,0x53,0x41]),[_0x2ccb2d([0x68,0x61,0x73,0x68])]:{[_0x2ccb2d([0x6e,0x61,0x6d,0x65])]:_0x2ccb2d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xfb1c72,_0x51d8ed,_0xb272d2)||(_0x3d5d82=!0x1);}}function _0x4af9d9(_0x22d8e8){return _0x22d8e8[_0x2ccb2d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2ccb2d([0x65,0x79]))?JSON[_0x2ccb2d([0x70,0x61,0x72,0x73,0x65])](_0x9738be(_0x22d8e8)):null;}function _0x9738be(_0x5349b3){return window[_0x2ccb2d([0x61,0x74,0x6f,0x62])](_0x5349b3[_0x2ccb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2ccb2d([0x2b]))[_0x2ccb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2ccb2d([0x2f])));}function _0x27891c(_0x399c82){let _0x5cbd03=0x1505;function _0x4a6498(_0x558010){for(let _0x19ce88=0x0;_0x19ce88<_0x558010[_0x2ccb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19ce88++){const _0x30ba15=_0x558010[_0x2ccb2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x19ce88);_0x5cbd03=(_0x5cbd03<<0x5)+_0x5cbd03+_0x30ba15,_0x5cbd03&=_0x5cbd03;}}function _0x1a1a72(_0x828a4){Array[_0x2ccb2d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x828a4)?_0x828a4[_0x2ccb2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a1a72):_0x828a4&&typeof _0x828a4==_0x2ccb2d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2ccb2d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x828a4)[_0x2ccb2d([0x73,0x6f,0x72,0x74])]()[_0x2ccb2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xad8ec2,_0x33e0f4])=>{_0x4a6498(_0xad8ec2),_0x1a1a72(_0x33e0f4);}):_0x4a6498(window[_0x2ccb2d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x828a4));}return _0x1a1a72(_0x399c82),_0x5cbd03>>>0x0;}function _0x1a33fb(_0x381f97){return _0x381f97[_0x2ccb2d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2ccb2d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2ccb2d([0x30]));}function _0x6be146(_0x5cf1c1){return _0x5cf1c1[_0x2ccb2d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2ccb2d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2ccb2d([0x6a,0x6f,0x69,0x6e])]('');}function _0x36068c(){}function _0x2ccb2d(_0x50887a){return _0x50887a['map'](_0x2906ef=>String['fromCharCode'](_0x2906ef))['join']('');}_0x26da8f(await _0x47dc4e());}(this);}['_initSchema'](){const _0x265587=this['editor']['model']['schema'];_0x265587['isRegistered']('imageBlock')&&_0x265587['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x265587['isRegistered']('imageInline')&&_0x265587['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x46fea6=this['editor'];_0x46fea6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x46fea6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2d0671=>_0x2d0671['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x6fddee=_0x46fea6['commands']['get']('replaceImageSource');_0x6fddee&&this['listenTo'](_0x6fddee,'cleanupImage',(_0x3e8299,[_0x4c03b5,_0x48d106])=>{_0x4c03b5['removeAttribute']('uploadcareImageId',_0x48d106);});}['_initConfig'](){const _0x5c1eb4=this['editor']['config']['get']('uploadcare.uploader')||{},_0x489e02=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x26a26b(_0x1b1233['document'],'uc-config',{..._0x5c1eb4,'pubkey':_0x489e02,'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']=_0xfbc971=>{if('closeMax'==_0xfbc971)return'#uc-icon-arrow-down';},_0x1b1233['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x26a26b(_0x1b1233['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x1b1233['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x466d2b=this['editor']['commands']['get']('insertImage');_0x466d2b&&this['listenTo'](_0x466d2b,'execute',()=>{const _0x5db985=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5db985&&_0x5db985['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5db985);});});const _0x588e5b=this['editor']['commands']['get']('uploadcareImageReplace');_0x588e5b&&this['listenTo'](_0x588e5b,'execute',()=>{const _0x51f816=this['editor']['model']['document']['selection']['getSelectedElement']();_0x51f816&&_0x51f816['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x51f816);});});}}class tt extends _0x29a0bc{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26fd6a){super(_0x26fd6a),_0x26fd6a['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2b4456['defineComponents'](_0x2b4456);}}class ii extends _0x2109bd{constructor(_0xe0b3fc){super(_0xe0b3fc);const t=_0xe0b3fc['t'],_0x3b87c4=this['bindTemplate'],_0x3e6b09=new _0x2395ff();_0x3e6b09['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':[_0x3e6b09,{'text':_0x3b87c4['to']('imageUploadProgress',_0x4ad566=>t('Loading\x20image...')+'\x20('+(_0x4ad566||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x2109bd{constructor(_0x4d1a54){super(_0x4d1a54);const t=_0x4d1a54['t'];this['set']('errorType',null);const _0x1da7fe=new _0x1d4a1e(_0x4d1a54);_0x1da7fe['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1da7fe['withText']=!0x0,_0x1da7fe['class']='ck-button-action',_0x1da7fe['on']('execute',()=>{this['fire']('retry');}),_0x1da7fe['bind']('isVisible')['to'](this,'errorType',_0x43dafb=>'NotFound'!==_0x43dafb);const _0x43ed26=new _0x1b8027();_0x43ed26['content']=_0xd502a6,_0x43ed26['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3dbfbf=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':[_0x43ed26,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3dbfbf['to']('errorType',_0x105485=>t('NotFound'!==_0x105485?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1da7fe]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x2109bd{constructor(_0x2e7ce2,_0x2629ab){super(_0x2e7ce2);const _0x3d58a6=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2629ab,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3d58a6['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2fab21,_0x5657fc,_0xe044b8){super(_0x2fab21),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2fab21),this['_errorView']=new ti(_0x2fab21),this['_editingView']=new ei(_0x2fab21,_0xe044b8),this['_focusableView']=new _0x2109bd(_0x2fab21),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5657fc),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'],_0x346e2b=>{this['_addUploadcareImageEditorListeners'](_0x346e2b);});}),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'](_0x5d4302,_0x362fcd){const _0x41ec76='uc-cloud-image-editor',_0x38286b=_0x5d4302['querySelector'](_0x41ec76);if(_0x38286b)return _0x362fcd(_0x38286b);const _0x563539=new MutationObserver(_0x25090c=>{const _0x4d9acc=_0x25090c['filter'](_0x51526a=>_0x51526a['target']===_0x5d4302&&_0x51526a['addedNodes']['length']>0x0&&_0x51526a['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x41ec76);_0x4d9acc['length']&&(_0x563539['disconnect'](),_0x362fcd(_0x4d9acc[0x0]['addedNodes'][0x0]));});_0x563539['observe'](_0x5d4302,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x35658a){_0x35658a['addEventListener']('apply',_0x222b9a=>{this['fire']('apply',{'imageSrc':_0x222b9a['detail']['cdnUrl']});}),_0x35658a['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x3d136f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x37e186,_0x10c13d,_0x1acabb){super(),this['_editor']=_0x37e186,this['_dialog']=_0x10c13d,this['_imageElement']=_0x1acabb,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 _0xb8224b=this['_imageElement'],_0x24a29d=_0xb8224b['getAttribute']('uploadcareImageId'),_0xc547e5=_0xb8224b['getAttribute']('src');if(_0x24a29d)await this['_loadImageInfo'](_0x24a29d,_0xc547e5);else{if(this['_imageCache']['has'](_0xc547e5)){const _0x4a6975=this['_imageCache']['get'](_0xc547e5);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a6975['url'],this['imageDimension']=_0x4a6975['dimension'],this['imageId']=_0x4a6975['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3e1350}=this['_editor'],t=_0x3e1350['t'],_0x281b7f=new X(_0x3e1350,this['imageStatus'],this['_attributes']);_0x281b7f['bind']('status')['to'](this,'imageStatus'),_0x281b7f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x281b7f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x281b7f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x281b7f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3d6c5f,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x281b7f,'position':_0x190573['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x281b7f['focus']();},'onHide':()=>{_0x281b7f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4c1b87=>!S(_0x4c1b87,_0x281b7f['element'])}});}['_loadImageInfo'](_0x5c5f0d,_0x3043fe){return j['getInfo'](_0x5c5f0d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0xd1077b=>{const {width:_0x26a117,height:_0x18646b}=_0xd1077b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3043fe,this['imageDimension']={'width':_0x26a117,'height':_0x18646b},this['imageId']=_0x5c5f0d;})['catch'](_0x403dcc=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x403dcc['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x25ae88,_0x21ee93){return this['_getImageAsFile'](_0x25ae88)['then'](_0x528a0d=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x21ee93['signal'],'file':_0x528a0d,'onProgress':_0x295887=>{_0x295887&&_0x295887['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x295887['value']));}}))['then'](_0x31f29e=>{const {width:_0x5a4692,height:_0x3e20c4}=_0x31f29e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x31f29e['cdnUrl'],this['imageDimension']={'width':_0x5a4692,'height':_0x3e20c4},this['imageId']=_0x31f29e['uuid'],this['imageUploadProgress']=null;const _0x2f93cb=_0x25ae88['getAttribute']('src');this['_imageCache']['set'](_0x2f93cb,{'id':_0x31f29e['uuid'],'url':_0x31f29e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x36b39f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36b39f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1b5115,_0x5168e4){_0x1b5115['on']('apply',(_0x51cba0,_0x2ac8c1)=>{this['_replaceImage'](_0x5168e4,_0x2ac8c1['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1b5115['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1b5115['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x6c47d3,_0x43e7dc,_0x339bfb){const _0x1e77fa=this['_editor'],{width:_0x2f6a7b,height:_0x2f9964}=C(_0x43e7dc,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4aacea,imageSources:_0x229124}=k(_0x43e7dc,_0x2f6a7b);_0x1e77fa['model']['change'](_0x18c0f1=>{if('$graveyard'===_0x6c47d3['root']['rootName']){_0x1e77fa['execute']('insertImage',{'imageType':_0x6c47d3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x6c47d3['getAttributes']()),'uploadcareImageId':_0x339bfb,'src':_0x4aacea,'sources':_0x229124,'width':_0x2f6a7b,'height':_0x2f9964}});const _0x4fa50e=_0x6c47d3['getChildren']();_0x6c47d3=_0x1e77fa['model']['document']['selection']['getSelectedElement']();for(const _0x326e1f of _0x4fa50e)_0x18c0f1['append'](_0x18c0f1['cloneElement'](_0x326e1f),_0x6c47d3);}else _0x18c0f1['setSelection'](_0x6c47d3,'on'),_0x1e77fa['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x6c47d3['getAttributes']()),'uploadcareImageId':_0x339bfb,'src':_0x4aacea,'sources':_0x229124,'width':_0x2f6a7b,'height':_0x2f9964},_0x6c47d3);_0x18c0f1['setSelection'](_0x6c47d3,'on');});}async['_getImageAsFile'](_0x342202){const _0x55af7f=_0x1b1233['window'],_0x448f93=_0x1b1233['document']['location']['href'],_0x3938ec=new _0x55af7f['URL'](_0x342202['getAttribute']('src'),_0x448f93);if('data:'===_0x3938ec['protocol']){const _0x36b665=_0x3938ec['href']['split'](','),_0x1db996=_0x36b665[0x0]['match'](/:(.*?);/)[0x1],_0x54d221=_0x1db996['split']('/')[0x1],_0x131780=_0x55af7f['atob'](_0x36b665[_0x36b665['length']-0x1]);let _0x515ec4=_0x131780['length'];const _0x2ef40e=new _0x55af7f['Uint8Array'](_0x515ec4);for(;_0x515ec4--;)_0x2ef40e[_0x515ec4]=_0x131780['charCodeAt'](_0x515ec4);return new _0x55af7f['File']([_0x2ef40e],'image.'+_0x54d221,{'type':_0x1db996});}const _0x35a5da=_0x3938ec['href']['split']('/'),_0x327a54=_0x35a5da[_0x35a5da['length']-0x1],_0x1cd615=_0x327a54['split']('.')[0x1];return _0x55af7f['fetch'](_0x3938ec['href'])['then'](_0x7acbfb=>_0x7acbfb['clone']()['blob']())['then'](_0x2d52a1=>new _0x55af7f['File']([_0x2d52a1],_0x327a54,{'type':'image/'+_0x1cd615}));}}class O extends _0x10354e{['imageEditController'];static get['requires'](){return[_0x1c0e49];}['_isEditable'];constructor(_0x14ccf8){super(_0x14ccf8),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x379d95){const _0x533d9b=G(_0x379d95);return _0x3ec715=>!(!_0x3ec715||!_0x3ec715['is']('element','imageBlock')&&!_0x3ec715['is']('element','imageInline'))&&(!!_0x3ec715['hasAttribute']('uploadcareImageId')||!!_0x3ec715['hasAttribute']('src')&&_0x533d9b(_0x3ec715['getAttribute']('src')));}(_0x14ccf8['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x30f63b=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x30f63b);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x35523f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x35523f&&(_0x35523f['is']('element','imageBlock')||_0x35523f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x1c0e49),_0x35523f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x10354e{['refresh'](){const _0x8de183=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x8de183&&(_0x8de183['is']('element','imageBlock')||_0x8de183['is']('element','imageInline')));}['execute'](_0x23b6d7){const _0x16fdc3=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x11531e=>{_0x11531e['setAttributes'](_0x23b6d7,_0x16fdc3),_0x11531e['removeAttribute']('srcset',_0x16fdc3),_0x11531e['removeAttribute']('sizes',_0x16fdc3);});}}class m extends _0x29a0bc{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x19a146,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x23521a}=this;_0x23521a['commands']['add']('uploadcareImageEdit',new O(_0x23521a)),_0x23521a['commands']['add']('uploadcareImageReplace',new R(_0x23521a));}}class g extends _0x29a0bc{['_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 _0x28f09f=this['editor'];_0x28f09f['ui']['componentFactory']['add']('uploadcareImageEdit',_0x360d7a=>{const _0x1c825d=_0x28f09f['commands']['get']('uploadcareImageEdit'),_0x110946=new _0x1d4a1e(_0x360d7a),t=_0x360d7a['t'];return _0x110946['set']({'icon':_0x3d6c5f,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x110946['bind']('isEnabled')['to'](_0x1c825d),_0x110946['bind']('isOn')['to'](_0x1c825d,'isActive'),this['listenTo'](_0x110946,'execute',()=>{_0x28f09f['execute']('uploadcareImageEdit'),_0x28f09f['editing']['view']['focus']();}),_0x110946;}),this['_initConfig']();}['_initConfig'](){const _0x49ee14=_0x26a26b(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x49ee14),this['listenTo'](this['editor'],'destroy',()=>{_0x49ee14['remove']();});}}class et extends _0x29a0bc{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x2cf13a,Command as _0x46f6ad}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2fdab6,IconGooglePhotos as _0x5628ad,IconGoogleDrive as _0xb1866d,IconFacebook as _0x3f5b14,IconDropbox as _0x2e6df2,IconUploadcareLink as _0x34906c,IconUploadcareImageUpload as _0x17a9a4,IconError as _0x279a7d,IconUploadcareImageEdit as _0x3da54a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x54eaf0,MenuBarMenuListItemButtonView as _0x3ca89c,View as _0x19ec15,FocusCycler as _0x121575,Dialog as _0x1fb372,DialogViewPosition as _0x537efb,SpinnerView as _0x17d250,IconView as _0x1c2f63,Notification as _0x2a8bc8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x526bed,DomEmitterMixin as _0x3c4eb0,global as _0x5db020,getAncestors as _0x226a00,ObservableMixin as _0x5df921,uid as _0x13dfba,createElement as _0x18589a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x483f69}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4e396f,info as _0x64964e}from'@uploadcare/upload-client';import*as _0x3c7763 from'@uploadcare/file-uploader';var i=function(_0x5ac3a8){return _0x5ac3a8['Local']='local',_0x5ac3a8['URL']='url',_0x5ac3a8['Dropbox']='dropbox',_0x5ac3a8['GDrive']='gdrive',_0x5ac3a8['Facebook']='facebook',_0x5ac3a8['GPhotos']='gphotos',_0x5ac3a8['OneDrive']='onedrive',_0x5ac3a8;}({});function _(_0x13f038,_0x9f826a,_0x329134){const t=_0x13f038['t'],_0x4bead1=_0x13f038['t'];switch(_0x9f826a){case i['Local']:return{'text':_0x4bead1('Insert'===_0x329134?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4bead1('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x329134?_0x4bead1('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4bead1('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x329134?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x9f826a;}}class e extends _0x2cf13a{['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 _0x854ce8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x344ab1;for(const _0x405f93 in _0x854ce8){const _0x3785a1=_0x405f93,_0x106d73=_0x854ce8[_0x3785a1];if('uploadcareLicenseKeyValid'==_0x106d73||'uploadcareLicenseKeyInvalid'==_0x106d73||'uploadcareLicenseKeyExpired'==_0x106d73||'uploadcareLicenseKeyDomainLimit'==_0x106d73||'uploadcareLicenseKeyNotAllowed'==_0x106d73||'uploadcareLicenseKeyEvaluationLimit'==_0x106d73||'uploadcareLicenseKeyTrialLimit'==_0x106d73||'uploadcareLicenseKeyUsageLimit'==_0x106d73){delete _0x854ce8[_0x3785a1],_0x344ab1=_0x106d73,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x344ab1&&_0x854ce8['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x344ab1&&_0x854ce8['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x344ab1&&_0x854ce8['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x344ab1&&_0x854ce8['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x18bbdc}=this,_0x177cb8=_0x18bbdc['commands']['get']('uploadcare');if(!_0x177cb8)return;const _0x21ed83=this['_normalizeConfigSourceList'](_0x18bbdc['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x45b77c,_0x4748de)=>{const _0x4748ee=this['_getIntegrationKey'](_0x4748de['type']);return _0x45b77c[_0x4748ee]||(_0x45b77c[_0x4748ee]=[]),_0x45b77c[_0x4748ee]['push'](_0x4748de),_0x45b77c;},{});_0x18bbdc['plugins']['has']('ImageInsertUI')&&_0x18bbdc['commands']['get']('uploadcare')&&Object['entries'](_0x21ed83)['forEach'](([_0xaba372,_0x2acff6])=>{_0x18bbdc['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xaba372,'observable':()=>_0x177cb8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2acff6),'formViewCreator':()=>this['_createDropdownButtons'](_0x2acff6),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2acff6),'override':'assetManager'!==_0xaba372});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x368421){const {locale:_0x21f95d}=this['editor'];return _0x368421['map'](_0x581e5c=>{const _0x233c1d=_(_0x21f95d,_0x581e5c,'Insert');switch(_0x581e5c){case i['Local']:return{'icon':_0x17a9a4,'type':i['Local'],..._0x233c1d};case i['URL']:return{'icon':_0x34906c,'type':i['URL'],..._0x233c1d};case i['Dropbox']:return{'icon':_0x2e6df2,'type':i['Dropbox'],..._0x233c1d};case i['Facebook']:return{'icon':_0x3f5b14,'type':i['Facebook'],..._0x233c1d};case i['GDrive']:return{'icon':_0xb1866d,'type':i['GDrive'],..._0x233c1d};case i['GPhotos']:return{'icon':_0x5628ad,'type':i['GPhotos'],..._0x233c1d};case i['OneDrive']:return{'icon':_0x2fdab6,'type':i['OneDrive'],..._0x233c1d};}});}['_getIntegrationKey'](_0x4ccc0e){switch(_0x4ccc0e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x52951e,_0x26228f){const _0x29e6a2=this['editor'],_0x36986f=new _0x52951e(_0x29e6a2['locale']),_0x4f97d1=_0x29e6a2['commands']['get']('uploadcare');return _0x36986f['bind']('isEnabled')['to'](_0x4f97d1),_0x36986f['on']('execute',()=>{_0x4f97d1['execute'](_0x26228f);}),_0x36986f;}['_createToolbarButton'](_0x480ec5){const {locale:_0x3342a2}=this['editor'],_0x567f05=this['editor']['plugins']['get']('ImageInsertUI'),_0x3c6f73=_0x480ec5[0x0],_0xc9be53=this['_createButton'](_0x54eaf0,_0x3c6f73['type']);return _0xc9be53['icon']=_0x3c6f73['icon'],_0xc9be53['bind']('label')['to'](_0x567f05,'isImageSelected',_0x55f8fb=>_(_0x3342a2,_0x3c6f73['type'],_0x55f8fb?'Replace':'Insert')['text']),_0xc9be53['tooltip']=!0x0,_0xc9be53;}['_createDropdownButtons'](_0x53ea78){const {locale:_0x250d2c}=this['editor'],_0x38d7cf=this['editor']['plugins']['get']('ImageInsertUI');return _0x53ea78['map'](_0x5c924=>{const _0x149516=this['_createButton'](_0x54eaf0,_0x5c924['type']);return _0x149516['withText']=!0x0,_0x149516['icon']=_0x5c924['icon'],_0x149516['bind']('label')['to'](_0x38d7cf,'isImageSelected',_0x48d699=>_(_0x250d2c,_0x5c924['type'],_0x48d699?'Replace':'Insert')['text']),_0x149516;});}['_createMenuBarButtons'](_0x328b0c){return _0x328b0c['map'](_0x3c12fb=>{const _0xb0a459=this['_createButton'](_0x3ca89c,_0x3c12fb['type']);return _0xb0a459['icon']=_0x3c12fb['icon'],_0xb0a459['label']=_0x3c12fb['shortText'],_0xb0a459;});}}class F extends _0x19ec15{['focusTracker'];['focusCycler'];constructor(_0x58f050){super(_0x58f050),this['focusTracker']=new _0x526bed(),this['focusCycler']=new _0x121575({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x165599,_0x4d6322){super(_0x165599),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-'+_0x4d6322}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x5893fd,_0x21c5ec){const _0xe68e26=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4aae83=>_0x4aae83<=_0x21c5ec)['map'](_0x4e6e4a=>_0x5893fd['replace'](/\/$/,'')+'/-/resize/'+_0x4e6e4a+'x/\x20'+_0x4e6e4a+'w');return{'imageFallbackUrl':_0x5893fd,'imageSources':[{'srcset':_0xe68e26['join'](',\x20'),'sizes':'(max-width:\x20'+_0x21c5ec+'px)\x20100vw,\x20'+_0x21c5ec+'px','type':'image/webp'}]};}function C(_0x34275d,_0xb2327e,_0x3f9278){const _0x540923=_0x34275d['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x540923?parseInt(_0x540923[0x1],0xa):_0xb2327e,'height':_0x540923?parseInt(_0x540923[0x2],0xa):_0x3f9278};}function p(_0x3b2084,_0x849118){const _0x3a8c94=new(_0x3c4eb0())(),_0x4ff1a2=_0x3b2084['plugins']['get']('ImageUtils'),_0x1d60fa=_0x3b2084['editing']['mapper']['toViewElement'](_0x849118),_0x481ee0=_0x4ff1a2['findViewImgElement'](_0x1d60fa),_0x4ecc92=_0x3b2084['editing']['view']['domConverter']['viewToDom'](_0x481ee0),_0x4f8e4c=_0x849118['getAttribute']('width'),_0x2c332e=_0x849118['getAttribute']('height'),_0x565669='image-processing';_0x3b2084['editing']['view']['change'](_0x458bc9=>{_0x458bc9['addClass'](_0x565669,_0x1d60fa),_0x458bc9['setStyle']('aspect-ratio',_0x4f8e4c+'/'+_0x2c332e,_0x481ee0);}),_0x3a8c94['listenTo'](_0x4ecc92,'load',()=>{_0x3a8c94['stopListening'](_0x4ecc92,'load'),_0x3b2084['editing']['view']['change'](_0x37fdad=>{_0x37fdad['removeClass'](_0x565669,_0x1d60fa),_0x37fdad['removeStyle']('aspect-ratio',_0x481ee0);});});}function z(_0x5330eb){if(Array['isArray'](_0x5330eb)){const _0x361e4f=_0x5330eb['map'](z);return _0x345a1d=>_0x361e4f['some'](_0x457922=>_0x457922(_0x345a1d));}if('origin'==_0x5330eb){const _0xa9e509=_0x5db020['window']['location']['origin'];return _0x357e9a=>new URL(_0x357e9a,_0x5db020['document']['baseURI'])['origin']==_0xa9e509;}return'function'==typeof _0x5330eb?_0x5330eb:_0x5330eb instanceof RegExp?_0x2ce444=>!(!_0x2ce444['match'](_0x5330eb)&&!_0x2ce444['replace'](/^https?:\/\//,'')['match'](_0x5330eb)):()=>!0x1;}function S(_0x4096c7,_0x308f80){return _0x226a00(_0x4096c7['target'])['includes'](_0x308f80);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5df921(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x48893a,_0x3f2faf,_0x3a8dc0){super(),this['_editor']=_0x48893a,this['_editing']=_0x3f2faf,this['_dialog']=_0x48893a['plugins']['get'](_0x1fb372),this['_api']=_0x3f2faf['ctxElement']['getAPI'](),this['_type']=_0x3a8dc0,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:_0x30d6e2,model:_0x4254e2}=this['_editor'],_0x4d0221=_0x4254e2['document']['selection']['getSelectedElement'](),_0x28bca9=_0x4d0221&&(_0x4d0221['is']('element','imageBlock')||_0x4d0221['is']('element','imageInline'));this['_formView']=new x(_0x30d6e2,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x17a9a4,'title':_(_0x30d6e2,this['_type'],_0x28bca9?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x537efb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5d9f70=>!S(_0x5d9f70,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1c9ba7}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2ff4bb=>{const _0x42382c=_0x1c9ba7['length'];for(const _0x267a5b of _0x1c9ba7){const _0x2672f3=_0x267a5b===_0x1c9ba7[_0x42382c-0x1],{cdnUrl:_0x452b20,fileInfo:_0x3a2c9c}=_0x267a5b;if(!_0x452b20||!_0x3a2c9c)continue;const {width:_0x17f94b,height:_0x213ad6}=_0x3a2c9c['imageInfo'],_0x23e680=C(_0x452b20,_0x17f94b,_0x213ad6),_0x4fdc15=k(_0x452b20,_0x23e680['width']),_0x1ac9c3={'id':_0x3a2c9c['uuid'],'type':'image','attributes':{'imageDimension':_0x23e680,..._0x4fdc15}};this['_insertAsset'](_0x1ac9c3,_0x2672f3,_0x2ff4bb);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1a2557=>{'idle'===_0x1a2557['detail']['status']&&!_0x1a2557['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4444c9,_0x32d016,_0x44082b){const _0x148a1a=this['_editor']['model']['document']['selection'],_0x5fc17b=_0x148a1a['getSelectedElement'](),_0x56d16d=!(!_0x5fc17b||!_0x5fc17b['is']('element','imageInline'));_0x44082b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4444c9,_0x56d16d),_0x32d016||_0x44082b['setSelection'](_0x148a1a['getLastPosition']());}['_insertImage'](_0x45121e,_0xfa3faf){const _0x90039c=this['_editor'],{imageDimension:_0x5f1464,imageFallbackUrl:_0x137da9,imageSources:_0x5af647}=_0x45121e['attributes'];_0x90039c['execute']('insertImage',{'imageType':_0xfa3faf?'imageInline':null,'source':{'uploadcareImageId':_0x45121e['id'],'src':_0x137da9,'sources':_0x5af647,..._0x5f1464}});}}class w extends _0x46f6ad{['_editing'];['_controller']=null;static get['requires'](){return[_0x1fb372,o];}constructor(_0x1301a5){super(_0x1301a5),this['_editing']=_0x1301a5['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2e9948){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x2e9948);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5a3033,publicKey:_0x45f6a1,signal:_0xae21ca,onProgress:_0x257e1d}){return _0x4e396f(_0x5a3033,{'publicKey':_0x45f6a1,'store':'auto','signal':_0xae21ca,'onProgress':_0x257e1d});}static['getInfo'](_0x9ef49d,_0x1f8f47){return _0x64964e(_0x9ef49d,_0x1f8f47);}}class f extends _0x2cf13a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x483f69,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1e1ffd=this['editor'];if(!!!_0x1e1ffd['config']['get']('uploadcare'))return;_0x1e1ffd['plugins']['get'](_0x483f69)['createUploadAdapter']=_0x4b7a09=>new A(_0x4b7a09,_0x1e1ffd),_0x1e1ffd['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4ab8ce,{imageElement:_0x2a5d01,data:_0x48797c})=>{_0x1e1ffd['model']['change'](_0xf1eb08=>{_0xf1eb08['setAttribute']('uploadcareImageId',_0x48797c['uploadcareImageId'],_0x2a5d01);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x160730,_0x21e562){this['loader']=_0x160730,this['editor']=_0x21e562,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x2f08f9=this['editor']['config']['get']('uploadcare.pubkey'),_0x430ac4=await this['loader']['file'];return j['upload']({'file':_0x430ac4,'publicKey':_0x2f08f9,'signal':this['controller']['signal'],'onProgress':_0x3ab792=>{_0x3ab792&&_0x3ab792['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3ab792['value']);}})['then'](async _0x312d37=>{const {imageFallbackUrl:_0x17ca1e,imageSources:_0x373c32}=k(_0x312d37['cdnUrl'],_0x312d37['imageInfo']['width']);return{'uploadcareImageId':_0x312d37['uuid'],'default':_0x17ca1e,'sources':_0x373c32};})['catch'](()=>{const _0x24c8d5=t('Cannot\x20upload\x20file:')+('\x20'+_0x430ac4['name']+'.');return Promise['reject'](_0x24c8d5);});}['abort'](){this['controller']['abort']();}}class o extends _0x2cf13a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1fb372];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3f9846){super(_0x3f9846),this['ucContextId']=_0x13dfba();}['init'](){const _0x4a2519=this['editor'];_0x4a2519['commands']['add']('uploadcare',new w(_0x4a2519));}['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 _0x52e0ab=_0x5db020['document']['querySelector']('input[uploadcare-file-input]');_0x52e0ab&&_0x52e0ab['remove']();}),async function(_0x43786a){const _0xa765dd=_0x43656b([0x45,0x43,0x34,0x55,0x69,0x35,0x4c,0x71,0x65,0x6f,0x41,0x33,0x36,0x74,0x68,0x67,0x53,0x44,0x75,0x79,0x4b,0x32,0x6c,0x5a,0x66,0x78,0x52,0x6a,0x7a,0x49,0x58,0x56,0x47,0x42,0x6e,0x54,0x46,0x59,0x39,0x30,0x38,0x62,0x4a,0x4d,0x76,0x73,0x57,0x6b,0x70,0x72,0x77,0x4f,0x50,0x48,0x31,0x64,0x6d,0x63,0x61,0x37,0x4e,0x51]),_0x3cde35=0x9ff086f,_0x8904a1=0x9f86797^_0x3cde35,_0x1891fb=window[_0x43656b([0x44,0x61,0x74,0x65])][_0x43656b([0x6e,0x6f,0x77])](),_0x4b7fc2=_0x43786a[_0x43656b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xd3cb34=new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57cd73=>{_0x4b7fc2[_0x43656b([0x6f,0x6e,0x63,0x65])](_0x43656b([0x72,0x65,0x61,0x64,0x79]),_0x57cd73);}),_0x3f0416={[_0x43656b([0x6b,0x74,0x79])]:_0x43656b([0x45,0x43]),[_0x43656b([0x75,0x73,0x65])]:_0x43656b([0x73,0x69,0x67]),[_0x43656b([0x63,0x72,0x76])]:_0x43656b([0x50,0x2d,0x32,0x35,0x36]),[_0x43656b([0x78])]:_0x43656b([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]),[_0x43656b([0x79])]:_0x43656b([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]),[_0x43656b([0x61,0x6c,0x67])]:_0x43656b([0x45,0x53,0x32,0x35,0x36])},_0x9f8af1=_0x4b7fc2[_0x43656b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x43656b([0x67,0x65,0x74])](_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xd8f75(){let _0x15a0d2,_0x1fe725=null,_0x41e89b=null;try{if(_0x9f8af1==_0x43656b([0x47,0x50,0x4c]))return _0x43656b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x15a0d2=_0x70eac9(),!_0x15a0d2)return _0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x15a0d2[_0x43656b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x41e89b=_0x1a6b9f(_0x15a0d2[_0x43656b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x15a0d2[_0x43656b([0x6a,0x74,0x69])])),await _0x50816b()?_0xecb46e()?_0x3c05aa()?_0x43656b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x592ce7()?(_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43656b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1fe725=_0x44c40b(_0x43656b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43656b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1fe725=_0x44c40b(_0x43656b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x37b087()):_0x43656b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x43656b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x43656b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c05aa(){const _0x4c94d4=[_0x43656b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x43656b([0x74,0x72,0x69,0x61,0x6c])][_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1891fb/0x3e8:0xe10*_0x8904a1;return _0x15a0d2[_0x43656b([0x65,0x78,0x70])]<_0x4c94d4;}function _0xecb46e(){const _0x5479aa=_0x15a0d2[_0x43656b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5479aa&&(!!_0x5479aa[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x2a]))||!!_0x5479aa[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x55,0x50,0x4c,0x43])));}function _0x592ce7(){const _0x61880c=_0x15a0d2[_0x43656b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x61880c||0x0==_0x61880c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5952f4}=new URL(window[_0x43656b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x61880c[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5952f4))return!0x0;const _0x4a62a8=_0x5952f4[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e]));return _0x61880c[_0x43656b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xff2754=>_0xff2754[_0x43656b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43656b([0x2a])))[_0x43656b([0x6d,0x61,0x70])](_0x5d9a85=>_0x5d9a85[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e])))[_0x43656b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b0ad1=>_0x5b0ad1[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4a62a8[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x43656b([0x6d,0x61,0x70])](_0x162088=>Array(_0x4a62a8[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x162088[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x43656b([0x66,0x69,0x6c,0x6c])](_0x162088[0x0]===_0x43656b([0x2a])?_0x43656b([0x2a]):'')[_0x43656b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x162088))[_0x43656b([0x73,0x6f,0x6d,0x65])](_0x83c0c4=>_0x4a62a8[_0x43656b([0x65,0x76,0x65,0x72,0x79])]((_0x11d826,_0xc2b9f)=>_0x83c0c4[_0xc2b9f]===_0x11d826||_0x83c0c4[_0xc2b9f]===_0x43656b([0x2a])));}function _0x37b087(){return _0x1fe725&&_0x41e89b?new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x276d84,_0x1abf3a)=>{_0x1fe725[_0x43656b([0x74,0x68,0x65,0x6e])](_0x276d84,_0x1abf3a),_0x41e89b[_0x43656b([0x74,0x68,0x65,0x6e])](_0x1b3659=>{_0x1b3659!=_0x43656b([0x56,0x61,0x6c,0x69,0x64])&&_0x276d84(_0x1b3659);},_0x1abf3a);}):_0x1fe725||_0x41e89b||_0x43656b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1a6b9f(_0x467443,_0x35a33c){return new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5435a1=>{if(_0x1c75d0())return _0x5435a1(_0x43656b([0x56,0x61,0x6c,0x69,0x64]));_0x2db518(),_0x4b7fc2[_0x43656b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x29ed14=!0x1;const _0x4c113f=_0x13dfba();function _0x4a230a(_0x3037b8){return!!_0x3037b8&&(typeof _0x3037b8===_0x43656b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3037b8===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3037b8[_0x43656b([0x74,0x68,0x65,0x6e])]===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3037b8[_0x43656b([0x63,0x61,0x74,0x63,0x68])]===_0x43656b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5a46f9(_0xef5a58){_0x41d1ce(_0xef5a58)[_0x43656b([0x74,0x68,0x65,0x6e])](_0x2fce02=>{if(!_0x2fce02||_0x2fce02[_0x43656b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x43656b([0x6f,0x6b]))return _0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x400c45(_0x4d503d(_0x4c113f+_0x35a33c))!=_0x2fce02[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x43656b([0x56,0x61,0x6c,0x69,0x64]);})[_0x43656b([0x74,0x68,0x65,0x6e])](_0x4b1ffc=>(_0x41ab67(),_0x4b1ffc),()=>{const _0x2021ad=_0x4d4a92();return null==_0x2021ad?(_0x41ab67(),_0x43656b([0x56,0x61,0x6c,0x69,0x64])):_0x43656b(_0x1891fb-_0x2021ad>(0x2df38c6f^_0x3cde35)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x43656b([0x74,0x68,0x65,0x6e])](_0x5435a1)[_0x43656b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x89c47d=0x9c9e6ef^_0x3cde35;function _0x41ab67(){const _0x350af7=_0x43656b([0x6c,0x6c,0x63,0x74,0x2d])+_0x400c45(_0x4d503d(_0x467443)),_0x169485=_0x5c4cac(_0x400c45(window[_0x43656b([0x4d,0x61,0x74,0x68])][_0x43656b([0x63,0x65,0x69,0x6c])](_0x1891fb/_0x89c47d)));window[_0x43656b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43656b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x350af7,_0x169485);}function _0x4d4a92(){const _0x48ea2e=_0x43656b([0x6c,0x6c,0x63,0x74,0x2d])+_0x400c45(_0x4d503d(_0x467443)),_0x1a0e13=window[_0x43656b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43656b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48ea2e);return _0x1a0e13?window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c4cac(_0x1a0e13),0x10)*_0x89c47d:null;}function _0x41d1ce(_0x4663c4){return new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x478211,_0x51791b)=>{_0x4663c4[_0x43656b([0x74,0x68,0x65,0x6e])](_0x478211,_0x51791b),window[_0x43656b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x51791b,0x9fedcaf^_0x3cde35);});}}_0x4b7fc2[_0x43656b([0x6f,0x6e])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5338a7,_0x37d0eb)=>{if(_0x37d0eb[0x0]!=_0x467443)return _0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x37d0eb[0x1]={..._0x37d0eb[0x1],[_0x43656b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4c113f};},{[_0x43656b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43656b([0x68,0x69,0x67,0x68])}),_0x4b7fc2[_0x43656b([0x6f,0x6e])](_0x43656b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x55fe5c=>{_0x4a230a(_0x55fe5c[_0x43656b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x29ed14=!0x0,_0x5a46f9(_0x55fe5c[_0x43656b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x43656b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43656b([0x6c,0x6f,0x77])}),_0xd3cb34[_0x43656b([0x74,0x68,0x65,0x6e])](()=>{_0x29ed14||_0x5435a1(_0x43656b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c75d0(){return _0x4b7fc2[_0x43656b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43656b([0x76,0x69,0x65,0x77])][_0x43656b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x43656b([0x61,0x75,0x74,0x6f]);}function _0x2db518(){_0x4b7fc2[_0x43656b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43656b([0x76,0x69,0x65,0x77])][_0x43656b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x43656b([0x61,0x75,0x74,0x6f]);}}function _0x44c40b(_0xb8d5a2){const _0x3130fc=[new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9a10=>setTimeout(_0x5c9a10,0x9f636a3^_0x3cde35)),_0xd3cb34[_0x43656b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5aac15=>{let _0x309899=0x0;_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x6f,0x6e])](_0x43656b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x302731,_0x1c89b7)=>{_0x1c89b7[0x0][_0x43656b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x309899++,_0x309899==(0x9ff0997^_0x3cde35)&&(_0x5aac15(),_0x302731[_0x43656b([0x6f,0x66,0x66])]());});}))];return window[_0x43656b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x43656b([0x72,0x61,0x63,0x65])](_0x3130fc)[_0x43656b([0x74,0x68,0x65,0x6e])](()=>_0xb8d5a2);}async function _0x440d3e(){await _0xd3cb34,_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x53afc8,_0x4b7fc2[_0x43656b([0x6d,0x6f,0x64,0x65,0x6c])][_0x43656b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x53afc8,_0x4b7fc2[_0x43656b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x43656b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x39dceb(_0xf486fe){const _0x17586d=_0x6437c2();_0x4b7fc2[_0x17586d]=_0x43656b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xf486fe,_0xf486fe!=_0x43656b([0x56,0x61,0x6c,0x69,0x64])&&_0x440d3e();}function _0x6437c2(){const _0x54852c=window[_0x43656b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x43656b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x43656b([0x6e,0x6f,0x77])]())[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x43656b([0x2e]),'');let _0x16fa56=_0x43656b([0x45]);for(let _0x350b7c=0x0;_0x350b7c<_0x54852c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x350b7c+=0x2){let _0x8774a3=window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54852c[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x350b7c,_0x350b7c+0x2));_0x8774a3>=_0xa765dd[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x8774a3-=_0xa765dd[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x16fa56+=_0xa765dd[_0x8774a3];}return _0x16fa56;}function _0x70eac9(){const _0x516a8d=_0x9f8af1[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e]));if(0x3!=_0x516a8d[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xa808a7(_0x516a8d[0x1]);function _0xa808a7(_0x3868a6){const _0x539f93=_0x5c0961(_0x3868a6);return _0x539f93&&_0x414bbe()?_0x539f93:null;function _0x414bbe(){const _0x57ccd9=_0x539f93[_0x43656b([0x6a,0x74,0x69])],_0x66e813=window[_0x43656b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57ccd9[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57ccd9[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x485bba={..._0x539f93,[_0x43656b([0x6a,0x74,0x69])]:_0x57ccd9[_0x43656b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57ccd9[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x485bba[_0x43656b([0x76,0x63])],_0x4d503d(_0x485bba)==_0x66e813;}}}async function _0x50816b(){let _0xaa2c69=!0x0;try{const _0x1eb25a=_0x9f8af1[_0x43656b([0x73,0x70,0x6c,0x69,0x74])](_0x43656b([0x2e])),[_0x2ab9c3,_0x1bca09,_0x2ec29a]=_0x1eb25a;return _0x1187a1(_0x2ab9c3),await _0x43b3d3(_0x2ab9c3,_0x1bca09,_0x2ec29a),_0xaa2c69;}catch{return!0x1;}function _0x1187a1(_0x16b98b){const _0x408cea=_0x5c0961(_0x16b98b);_0x408cea&&_0x408cea[_0x43656b([0x61,0x6c,0x67])]==_0x43656b([0x45,0x53,0x32,0x35,0x36])||(_0xaa2c69=!0x1);}async function _0x43b3d3(_0xdb35c4,_0x50a654,_0x4f278b){const _0x14794d=window[_0x43656b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x43656b([0x66,0x72,0x6f,0x6d])](_0x4a8234(_0x4f278b),_0x4e53d0=>_0x4e53d0[_0x43656b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fc243=new window[(_0x43656b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x43656b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xdb35c4+_0x43656b([0x2e])+_0x50a654),_0x61e286=window[_0x43656b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x43656b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x61e286)return;const _0x2793cd=await _0x61e286[_0x43656b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x43656b([0x6a,0x77,0x6b]),_0x3f0416,{[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x45,0x43,0x44,0x53,0x41]),[_0x43656b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x43656b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x61e286[_0x43656b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x45,0x43,0x44,0x53,0x41]),[_0x43656b([0x68,0x61,0x73,0x68])]:{[_0x43656b([0x6e,0x61,0x6d,0x65])]:_0x43656b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2793cd,_0x14794d,_0x2fc243)||(_0xaa2c69=!0x1);}}function _0x5c0961(_0x561da1){return _0x561da1[_0x43656b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x43656b([0x65,0x79]))?JSON[_0x43656b([0x70,0x61,0x72,0x73,0x65])](_0x4a8234(_0x561da1)):null;}function _0x4a8234(_0x27c3ff){return window[_0x43656b([0x61,0x74,0x6f,0x62])](_0x27c3ff[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x43656b([0x2b]))[_0x43656b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x43656b([0x2f])));}function _0x4d503d(_0x2d2f25){let _0x4c58dc=0x1505;function _0x4fd9d1(_0x1d4d0c){for(let _0x22a5a1=0x0;_0x22a5a1<_0x1d4d0c[_0x43656b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22a5a1++){const _0x402c34=_0x1d4d0c[_0x43656b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x22a5a1);_0x4c58dc=(_0x4c58dc<<0x5)+_0x4c58dc+_0x402c34,_0x4c58dc&=_0x4c58dc;}}function _0x1ad783(_0x4dae1c){Array[_0x43656b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4dae1c)?_0x4dae1c[_0x43656b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ad783):_0x4dae1c&&typeof _0x4dae1c==_0x43656b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x43656b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4dae1c)[_0x43656b([0x73,0x6f,0x72,0x74])]()[_0x43656b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x371ac1,_0x5e3d03])=>{_0x4fd9d1(_0x371ac1),_0x1ad783(_0x5e3d03);}):_0x4fd9d1(window[_0x43656b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4dae1c));}return _0x1ad783(_0x2d2f25),_0x4c58dc>>>0x0;}function _0x400c45(_0x50520c){return _0x50520c[_0x43656b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x43656b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x43656b([0x30]));}function _0x5c4cac(_0xc13279){return _0xc13279[_0x43656b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x43656b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x43656b([0x6a,0x6f,0x69,0x6e])]('');}function _0x53afc8(){}function _0x43656b(_0x460680){return _0x460680['map'](_0x3671e3=>String['fromCharCode'](_0x3671e3))['join']('');}_0x39dceb(await _0xd8f75());}(this);}['_initSchema'](){const _0x50523d=this['editor']['model']['schema'];_0x50523d['isRegistered']('imageBlock')&&_0x50523d['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x50523d['isRegistered']('imageInline')&&_0x50523d['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2407a4=this['editor'];_0x2407a4['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2407a4['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bcab5=>_0x4bcab5['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x57b71=_0x2407a4['commands']['get']('replaceImageSource');_0x57b71&&this['listenTo'](_0x57b71,'cleanupImage',(_0x2652bd,[_0x1d1944,_0x5627ff])=>{_0x1d1944['removeAttribute']('uploadcareImageId',_0x5627ff);});}['_initConfig'](){const _0x16544d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x47635a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x18589a(_0x5db020['document'],'uc-config',{..._0x16544d,'pubkey':_0x47635a,'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']=_0x4740cd=>{if('closeMax'==_0x4740cd)return'#uc-icon-arrow-down';},_0x5db020['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x18589a(_0x5db020['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x5db020['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x51d5ea=this['editor']['commands']['get']('insertImage');_0x51d5ea&&this['listenTo'](_0x51d5ea,'execute',()=>{const _0x507749=this['editor']['model']['document']['selection']['getSelectedElement']();_0x507749&&_0x507749['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x507749);});});const _0x4dc536=this['editor']['commands']['get']('uploadcareImageReplace');_0x4dc536&&this['listenTo'](_0x4dc536,'execute',()=>{const _0x3764c9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3764c9&&_0x3764c9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3764c9);});});}}class tt extends _0x2cf13a{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ac30b){super(_0x3ac30b),_0x3ac30b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3c7763['defineComponents'](_0x3c7763);}}class ii extends _0x19ec15{constructor(_0x3e5747){super(_0x3e5747);const t=_0x3e5747['t'],_0x5a7125=this['bindTemplate'],_0x280470=new _0x17d250();_0x280470['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':[_0x280470,{'text':_0x5a7125['to']('imageUploadProgress',_0x46244b=>t('Loading\x20image...')+'\x20('+(_0x46244b||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x19ec15{constructor(_0x62fcff){super(_0x62fcff);const t=_0x62fcff['t'];this['set']('errorType',null);const _0x50b5de=new _0x54eaf0(_0x62fcff);_0x50b5de['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x50b5de['withText']=!0x0,_0x50b5de['class']='ck-button-action',_0x50b5de['on']('execute',()=>{this['fire']('retry');}),_0x50b5de['bind']('isVisible')['to'](this,'errorType',_0x17234e=>'NotFound'!==_0x17234e);const _0xb81072=new _0x1c2f63();_0xb81072['content']=_0x279a7d,_0xb81072['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x17735e=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':[_0xb81072,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x17735e['to']('errorType',_0x373dd7=>t('NotFound'!==_0x373dd7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x50b5de]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x19ec15{constructor(_0x56b0d0,_0x5810ba){super(_0x56b0d0);const _0x1ac924=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5810ba,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1ac924['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2d4571,_0x3aa452,_0x185665){super(_0x2d4571),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2d4571),this['_errorView']=new ti(_0x2d4571),this['_editingView']=new ei(_0x2d4571,_0x185665),this['_focusableView']=new _0x19ec15(_0x2d4571),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3aa452),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'],_0x1e22f5=>{this['_addUploadcareImageEditorListeners'](_0x1e22f5);});}),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'](_0x3f5752,_0x1b427f){const _0x17c1f1='uc-cloud-image-editor',_0x52f40d=_0x3f5752['querySelector'](_0x17c1f1);if(_0x52f40d)return _0x1b427f(_0x52f40d);const _0x1ccad8=new MutationObserver(_0x24d4e6=>{const _0x2446f0=_0x24d4e6['filter'](_0x180d8d=>_0x180d8d['target']===_0x3f5752&&_0x180d8d['addedNodes']['length']>0x0&&_0x180d8d['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x17c1f1);_0x2446f0['length']&&(_0x1ccad8['disconnect'](),_0x1b427f(_0x2446f0[0x0]['addedNodes'][0x0]));});_0x1ccad8['observe'](_0x3f5752,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xfffebd){_0xfffebd['addEventListener']('apply',_0x2709cb=>{this['fire']('apply',{'imageSrc':_0x2709cb['detail']['cdnUrl']});}),_0xfffebd['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x5df921(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5240f5,_0x15ce37,_0x2a1c91){super(),this['_editor']=_0x5240f5,this['_dialog']=_0x15ce37,this['_imageElement']=_0x2a1c91,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 _0x4d01fe=this['_imageElement'],_0x5cf550=_0x4d01fe['getAttribute']('uploadcareImageId'),_0x52f1b0=_0x4d01fe['getAttribute']('src');if(_0x5cf550)await this['_loadImageInfo'](_0x5cf550,_0x52f1b0);else{if(this['_imageCache']['has'](_0x52f1b0)){const _0xf042c2=this['_imageCache']['get'](_0x52f1b0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xf042c2['url'],this['imageDimension']=_0xf042c2['dimension'],this['imageId']=_0xf042c2['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1ae352}=this['_editor'],t=_0x1ae352['t'],_0x474ada=new X(_0x1ae352,this['imageStatus'],this['_attributes']);_0x474ada['bind']('status')['to'](this,'imageStatus'),_0x474ada['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x474ada['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x474ada['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x474ada,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3da54a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x474ada,'position':_0x537efb['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x474ada['focus']();},'onHide':()=>{_0x474ada['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3f0e3a=>!S(_0x3f0e3a,_0x474ada['element'])}});}['_loadImageInfo'](_0x3bd2cb,_0x4ac55a){return j['getInfo'](_0x3bd2cb,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3ad55a=>{const {width:_0x53bc80,height:_0x4d8255}=_0x3ad55a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ac55a,this['imageDimension']={'width':_0x53bc80,'height':_0x4d8255},this['imageId']=_0x3bd2cb;})['catch'](_0x2d93b6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d93b6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x37d41f,_0x4f1a29){return this['_getImageAsFile'](_0x37d41f)['then'](_0x33b965=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4f1a29['signal'],'file':_0x33b965,'onProgress':_0x51798b=>{_0x51798b&&_0x51798b['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x51798b['value']));}}))['then'](_0x5f3766=>{const {width:_0x47ab8c,height:_0x489ed2}=_0x5f3766['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5f3766['cdnUrl'],this['imageDimension']={'width':_0x47ab8c,'height':_0x489ed2},this['imageId']=_0x5f3766['uuid'],this['imageUploadProgress']=null;const _0x2b8298=_0x37d41f['getAttribute']('src');this['_imageCache']['set'](_0x2b8298,{'id':_0x5f3766['uuid'],'url':_0x5f3766['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x59489c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x59489c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x14a9ea,_0x9d8df0){_0x14a9ea['on']('apply',(_0x19609c,_0x1fd0f2)=>{this['_replaceImage'](_0x9d8df0,_0x1fd0f2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x14a9ea['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x14a9ea['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x760689,_0x3e084a,_0x1139ce){const _0x2a6587=this['_editor'],{width:_0x19e56c,height:_0x1bf488}=C(_0x3e084a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x57dd66,imageSources:_0x43d76c}=k(_0x3e084a,_0x19e56c);_0x2a6587['model']['change'](_0x124d50=>{if('$graveyard'===_0x760689['root']['rootName']){_0x2a6587['execute']('insertImage',{'imageType':_0x760689['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x760689['getAttributes']()),'uploadcareImageId':_0x1139ce,'src':_0x57dd66,'sources':_0x43d76c,'width':_0x19e56c,'height':_0x1bf488}});const _0x3e16c2=_0x760689['getChildren']();_0x760689=_0x2a6587['model']['document']['selection']['getSelectedElement']();for(const _0x4df713 of _0x3e16c2)_0x124d50['append'](_0x124d50['cloneElement'](_0x4df713),_0x760689);}else _0x124d50['setSelection'](_0x760689,'on'),_0x2a6587['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x760689['getAttributes']()),'uploadcareImageId':_0x1139ce,'src':_0x57dd66,'sources':_0x43d76c,'width':_0x19e56c,'height':_0x1bf488},_0x760689);_0x124d50['setSelection'](_0x760689,'on');});}async['_getImageAsFile'](_0x44ed6d){const _0xe089b7=_0x5db020['window'],_0x181a4c=_0x5db020['document']['location']['href'],_0x4316e4=new _0xe089b7['URL'](_0x44ed6d['getAttribute']('src'),_0x181a4c);if('data:'===_0x4316e4['protocol']){const _0x356784=_0x4316e4['href']['split'](','),_0x56362f=_0x356784[0x0]['match'](/:(.*?);/)[0x1],_0x56396f=_0x56362f['split']('/')[0x1],_0x434f7e=_0xe089b7['atob'](_0x356784[_0x356784['length']-0x1]);let _0x43cda4=_0x434f7e['length'];const _0x5d60f7=new _0xe089b7['Uint8Array'](_0x43cda4);for(;_0x43cda4--;)_0x5d60f7[_0x43cda4]=_0x434f7e['charCodeAt'](_0x43cda4);return new _0xe089b7['File']([_0x5d60f7],'image.'+_0x56396f,{'type':_0x56362f});}const _0xcd52=_0x4316e4['href']['split']('/'),_0x2a2311=_0xcd52[_0xcd52['length']-0x1],_0x47418b=_0x2a2311['split']('.')[0x1];return _0xe089b7['fetch'](_0x4316e4['href'])['then'](_0x34f524=>_0x34f524['clone']()['blob']())['then'](_0x17c73d=>new _0xe089b7['File']([_0x17c73d],_0x2a2311,{'type':'image/'+_0x47418b}));}}class Q extends _0x46f6ad{['imageEditController'];static get['requires'](){return[_0x1fb372];}['_isEditable'];constructor(_0x5b569a){super(_0x5b569a),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x39ca2a){const _0x34dae5=z(_0x39ca2a);return _0x1d3ca3=>!(!_0x1d3ca3||!_0x1d3ca3['is']('element','imageBlock')&&!_0x1d3ca3['is']('element','imageInline'))&&(!!_0x1d3ca3['hasAttribute']('uploadcareImageId')||!!_0x1d3ca3['hasAttribute']('src')&&_0x34dae5(_0x1d3ca3['getAttribute']('src')));}(_0x5b569a['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2cfbd0=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2cfbd0);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x384b44=this['editor']['model']['document']['selection']['getSelectedElement']();_0x384b44&&(_0x384b44['is']('element','imageBlock')||_0x384b44['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x1fb372),_0x384b44),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x46f6ad{['refresh'](){const _0x500bbc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x500bbc&&(_0x500bbc['is']('element','imageBlock')||_0x500bbc['is']('element','imageInline')));}['execute'](_0xc04652){const _0x353909=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4eef2d=>{_0x4eef2d['setAttributes'](_0xc04652,_0x353909),_0x4eef2d['removeAttribute']('srcset',_0x353909),_0x4eef2d['removeAttribute']('sizes',_0x353909);});}}class m extends _0x2cf13a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2a8bc8,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4ea926}=this;_0x4ea926['commands']['add']('uploadcareImageEdit',new Q(_0x4ea926)),_0x4ea926['commands']['add']('uploadcareImageReplace',new V(_0x4ea926));}}class g extends _0x2cf13a{['_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 _0x2f1efe=this['editor'];_0x2f1efe['ui']['componentFactory']['add']('uploadcareImageEdit',_0x56f87e=>{const _0x55ce46=_0x2f1efe['commands']['get']('uploadcareImageEdit'),_0x428554=new _0x54eaf0(_0x56f87e),t=_0x56f87e['t'];return _0x428554['set']({'icon':_0x3da54a,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x428554['bind']('isEnabled')['to'](_0x55ce46),_0x428554['bind']('isOn')['to'](_0x55ce46,'isActive'),this['listenTo'](_0x428554,'execute',()=>{_0x2f1efe['execute']('uploadcareImageEdit'),_0x2f1efe['editing']['view']['focus']();}),_0x428554;}),this['_initConfig']();}['_initConfig'](){const _0x42eeaa=_0x18589a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x42eeaa),this['listenTo'](this['editor'],'destroy',()=>{_0x42eeaa['remove']();});}}class et extends _0x2cf13a{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "46.0.1-alpha.
|
|
3
|
+
"version": "46.0.1-alpha.12",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "46.0.1-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "46.0.1-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.
|
|
33
|
-
"ckeditor5": "46.0.1-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "46.0.1-alpha.12",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.12",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "46.0.1-alpha.12",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.12",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.12",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.12",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.12",
|
|
33
|
+
"ckeditor5": "46.0.1-alpha.12",
|
|
34
34
|
"@uploadcare/file-uploader": "1.17.1",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x44c891=_0x5a90;(function(_0xe19174,_0x2751bf){const _0x2c4763=_0x5a90,_0xf8ca63=_0xe19174();while(!![]){try{const _0x296c04=parseInt(_0x2c4763(0x15c))/0x1+-parseInt(_0x2c4763(0x167))/0x2+parseInt(_0x2c4763(0x161))/0x3+parseInt(_0x2c4763(0x1a1))/0x4+-parseInt(_0x2c4763(0x194))/0x5+-parseInt(_0x2c4763(0x18e))/0x6*(-parseInt(_0x2c4763(0x17f))/0x7)+-parseInt(_0x2c4763(0x185))/0x8;if(_0x296c04===_0x2751bf)break;else _0xf8ca63['push'](_0xf8ca63['shift']());}catch(_0x3314ea){_0xf8ca63['push'](_0xf8ca63['shift']());}}}(_0x1167,0xa9981));import{Plugin as _0x35a118}from'ckeditor5/src/core.js';import{Dialog as _0x4f2df3}from'ckeditor5/src/ui.js';function _0x1167(){const _0x5193a2=['isRegistered','7mAoNNd','ctxElement','map','uploadcare','upcast','schema','11972360WvcmGL','render','configElement','_ctxElement','PictureEditing','init','true','replaceImageSource','pluginName','2341176wBqOpt','document','UploadcareEditing','\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','for','add','2732500XsSrzl','uploader-','appendChild','href','ucContextId','uploadcare.uploader','uploadcare.pubkey','_initConfig','model','uc-config','iconHrefResolver','imageBlock','input[uploadcare-file-input]','2527352dcfecg','cleanupImage','editing','body','locale','afterInit','remove','getSelectedElement','imageInline','_initSchema','attributeToAttribute','downcast','uc-upload-ctx-provider','uploadcareImageReplace','1328678IijmSL','closeMax','removeAttribute','get','editor','3604980YehNjE','conversion','elementToAttribute','once','selection','querySelector','1629340rPLIwL','isOfficialPlugin','getAttribute','fromCharCode','listenTo','_initImageProcessingIndicator','config','uploadcareImageId','isPremiumPlugin','view','requires','destroy','execute','_initCtx','join','_configElement','_initConversion','commands','extend','contentLanguage','data-uc-image-id','#uc-icon-arrow-down','insertImage'];_0x1167=function(){return _0x5193a2;};return _0x1167();}import{createElement as _0x3c89c9,global as _0x3b939a,uid as _0x5d22c6}from'ckeditor5/src/utils.js';function _0x5a90(_0x51e3a2,_0x4bd2f8){const _0x116755=_0x1167();return _0x5a90=function(_0x5a904c,_0x33f66b){_0x5a904c=_0x5a904c-0x153;let _0x52822e=_0x116755[_0x5a904c];return _0x52822e;},_0x5a90(_0x51e3a2,_0x4bd2f8);}import{UploadcareCommand as _0x56d449}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x408fdf}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x453ac8}from'./utils/editingutils.js';export class UploadcareEditing extends _0x35a118{[_0x44c891(0x176)]=null;[_0x44c891(0x188)]=null;static get[_0x44c891(0x18d)](){const _0x5b58a6=_0x44c891;return _0x5b58a6(0x190);}static get[_0x44c891(0x171)](){const _0x592e36=_0x44c891;return[_0x592e36(0x189),_0x408fdf,_0x4f2df3];}static get[_0x44c891(0x168)](){return!0x0;}static get[_0x44c891(0x16f)](){return!0x0;}[_0x44c891(0x198)];get[_0x44c891(0x187)](){const _0x376266=_0x44c891;return this[_0x376266(0x176)];}get[_0x44c891(0x180)](){const _0x2d1478=_0x44c891;return this[_0x2d1478(0x188)];}constructor(_0x128bd5){const _0x16b08a=_0x44c891;super(_0x128bd5),this[_0x16b08a(0x198)]=_0x5d22c6();}[_0x44c891(0x18a)](){const _0x50771a=_0x44c891,_0x3e4f0d=this[_0x50771a(0x160)];_0x3e4f0d[_0x50771a(0x178)][_0x50771a(0x193)](_0x50771a(0x182),new _0x56d449(_0x3e4f0d));}[_0x44c891(0x153)](){const _0x6c5158=_0x44c891;this[_0x6c5158(0x157)](),this[_0x6c5158(0x177)](),this[_0x6c5158(0x19b)](),this[_0x6c5158(0x174)](),this[_0x6c5158(0x16c)](),this[_0x6c5158(0x16b)](this[_0x6c5158(0x160)],_0x6c5158(0x172),()=>{const _0x147a63=_0x6c5158;this[_0x147a63(0x176)]&&(this[_0x147a63(0x176)][_0x147a63(0x154)](),this[_0x147a63(0x176)]=null),this[_0x147a63(0x188)]&&(this[_0x147a63(0x188)][_0x147a63(0x154)](),this[_0x147a63(0x188)]=null);const _0x135bfb=_0x3b939a[_0x147a63(0x18f)][_0x147a63(0x166)](_0x147a63(0x1a0));_0x135bfb&&_0x135bfb[_0x147a63(0x154)]();}),async function(_0x4e274b){const _0xe44e7=_0x27f8db([0x38,0x31,0x34,0x75,0x58,0x70,0x46,0x36,0x76,0x4b,0x66,0x59,0x72,0x74,0x57,0x4f,0x41,0x5a,0x4a,0x33,0x43,0x64,0x6e,0x50,0x52,0x69,0x49,0x6d,0x77,0x35,0x4e,0x30,0x6b,0x42,0x65,0x37,0x7a,0x51,0x53,0x62,0x78,0x56,0x45,0x71,0x44,0x61,0x32,0x68,0x63,0x6a,0x6c,0x47,0x55,0x6f,0x54,0x39,0x48,0x73,0x79,0x4d,0x4c,0x67]),_0xe4ba0a=0x4bda1088,_0x3ca562=0x4bdd7f68^_0xe4ba0a,_0x1bc4f9=window[_0x27f8db([0x44,0x61,0x74,0x65])][_0x27f8db([0x6e,0x6f,0x77])](),_0x229612=_0x4e274b[_0x27f8db([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x129f87=new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35c52e=>{_0x229612[_0x27f8db([0x6f,0x6e,0x63,0x65])](_0x27f8db([0x72,0x65,0x61,0x64,0x79]),_0x35c52e);}),_0x2d4707={[_0x27f8db([0x6b,0x74,0x79])]:_0x27f8db([0x45,0x43]),[_0x27f8db([0x75,0x73,0x65])]:_0x27f8db([0x73,0x69,0x67]),[_0x27f8db([0x63,0x72,0x76])]:_0x27f8db([0x50,0x2d,0x32,0x35,0x36]),[_0x27f8db([0x78])]:_0x27f8db([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]),[_0x27f8db([0x79])]:_0x27f8db([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]),[_0x27f8db([0x61,0x6c,0x67])]:_0x27f8db([0x45,0x53,0x32,0x35,0x36])},_0x2ef735=_0x229612[_0x27f8db([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x27f8db([0x67,0x65,0x74])](_0x27f8db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b4fdd(){let _0x2c9a48,_0x40b0f8=null,_0x3fccc3=null;try{if(_0x2ef735==_0x27f8db([0x47,0x50,0x4c]))return _0x27f8db([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c9a48=_0x2291d1(),!_0x2c9a48)return _0x27f8db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c9a48[_0x27f8db([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3fccc3=_0x378c43(_0x2c9a48[_0x27f8db([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c9a48[_0x27f8db([0x6a,0x74,0x69])])),await _0x5ed480()?_0x178eef()?_0x4b7aae()?_0x27f8db([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x59a5dd()?(_0x2c9a48[_0x27f8db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27f8db([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x40b0f8=_0x679bcb(_0x27f8db([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2c9a48[_0x27f8db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27f8db([0x74,0x72,0x69,0x61,0x6c])&&(_0x40b0f8=_0x679bcb(_0x27f8db([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb26d96()):_0x27f8db([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x27f8db([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x27f8db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x27f8db([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4b7aae(){const _0x491ca5=[_0x27f8db([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x27f8db([0x74,0x72,0x69,0x61,0x6c])][_0x27f8db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c9a48[_0x27f8db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1bc4f9/0x3e8:0xe10*_0x3ca562;return _0x2c9a48[_0x27f8db([0x65,0x78,0x70])]<_0x491ca5;}function _0x178eef(){const _0x3de463=_0x2c9a48[_0x27f8db([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3de463&&(!!_0x3de463[_0x27f8db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27f8db([0x2a]))||!!_0x3de463[_0x27f8db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27f8db([0x55,0x50,0x4c,0x43])));}function _0x59a5dd(){const _0x52b5f4=_0x5a90,_0x4b6220=_0x2c9a48[_0x27f8db([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4b6220||0x0==_0x4b6220[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x58e55b}=new URL(window[_0x27f8db([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x52b5f4(0x197)]);if(_0x4b6220[_0x27f8db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58e55b))return!0x0;const _0x2b4e2c=_0x58e55b[_0x27f8db([0x73,0x70,0x6c,0x69,0x74])](_0x27f8db([0x2e]));return _0x4b6220[_0x27f8db([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x74de8c=>_0x74de8c[_0x27f8db([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27f8db([0x2a])))[_0x27f8db([0x6d,0x61,0x70])](_0x4be3a0=>_0x4be3a0[_0x27f8db([0x73,0x70,0x6c,0x69,0x74])](_0x27f8db([0x2e])))[_0x27f8db([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1742e8=>_0x1742e8[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2b4e2c[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27f8db([0x6d,0x61,0x70])](_0x36d296=>Array(_0x2b4e2c[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x36d296[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27f8db([0x66,0x69,0x6c,0x6c])](_0x36d296[0x0]===_0x27f8db([0x2a])?_0x27f8db([0x2a]):'')[_0x27f8db([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x36d296))[_0x27f8db([0x73,0x6f,0x6d,0x65])](_0x1c7a3a=>_0x2b4e2c[_0x27f8db([0x65,0x76,0x65,0x72,0x79])]((_0x17b2c0,_0x255764)=>_0x1c7a3a[_0x255764]===_0x17b2c0||_0x1c7a3a[_0x255764]===_0x27f8db([0x2a])));}function _0xb26d96(){return _0x40b0f8&&_0x3fccc3?new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x874c01,_0x34df91)=>{_0x40b0f8[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x874c01,_0x34df91),_0x3fccc3[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x39f6bb=>{_0x39f6bb!=_0x27f8db([0x56,0x61,0x6c,0x69,0x64])&&_0x874c01(_0x39f6bb);},_0x34df91);}):_0x40b0f8||_0x3fccc3||_0x27f8db([0x56,0x61,0x6c,0x69,0x64]);}}function _0x378c43(_0x303993,_0x164abb){return new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13b86d=>{if(_0xfc3be1())return _0x13b86d(_0x27f8db([0x56,0x61,0x6c,0x69,0x64]));_0x17ed69(),_0x229612[_0x27f8db([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x27f8db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20a582=!0x1;const _0x15877f=_0x5d22c6();function _0x5114dd(_0x384da5){return!!_0x384da5&&(typeof _0x384da5===_0x27f8db([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x384da5===_0x27f8db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x384da5[_0x27f8db([0x74,0x68,0x65,0x6e])]===_0x27f8db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x384da5[_0x27f8db([0x63,0x61,0x74,0x63,0x68])]===_0x27f8db([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4feaf5(_0x4078ff){_0x5b87aa(_0x4078ff)[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x430b24=>{if(!_0x430b24||_0x430b24[_0x27f8db([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x27f8db([0x6f,0x6b]))return _0x27f8db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5b9eb7(_0x5df92e(_0x15877f+_0x164abb))!=_0x430b24[_0x27f8db([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x27f8db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x27f8db([0x56,0x61,0x6c,0x69,0x64]);})[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x6238af=>(_0x228a21(),_0x6238af),()=>{const _0x2ce0ac=_0x260d7e();return null==_0x2ce0ac?(_0x228a21(),_0x27f8db([0x56,0x61,0x6c,0x69,0x64])):_0x27f8db(_0x1bc4f9-_0x2ce0ac>(0x6fd69488^_0xe4ba0a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x13b86d)[_0x27f8db([0x63,0x61,0x74,0x63,0x68])](()=>{_0x13b86d(_0x27f8db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x7cff7a=0x4becfe08^_0xe4ba0a;function _0x228a21(){const _0x10102f=_0x27f8db([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b9eb7(_0x5df92e(_0x303993)),_0x3db09e=_0x23f667(_0x5b9eb7(window[_0x27f8db([0x4d,0x61,0x74,0x68])][_0x27f8db([0x63,0x65,0x69,0x6c])](_0x1bc4f9/_0x7cff7a)));window[_0x27f8db([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27f8db([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10102f,_0x3db09e);}function _0x260d7e(){const _0x4d106e=_0x27f8db([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b9eb7(_0x5df92e(_0x303993)),_0xfc2bf=window[_0x27f8db([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27f8db([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d106e);return _0xfc2bf?window[_0x27f8db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23f667(_0xfc2bf),0x10)*_0x7cff7a:null;}function _0x5b87aa(_0x2ec5cd){return new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1e0398,_0x3ddfeb)=>{_0x2ec5cd[_0x27f8db([0x74,0x68,0x65,0x6e])](_0x1e0398,_0x3ddfeb),window[_0x27f8db([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3ddfeb,0x4bdbc448^_0xe4ba0a);});}}_0x229612[_0x27f8db([0x6f,0x6e])](_0x27f8db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e5ef6,_0x4de1e5)=>{if(_0x4de1e5[0x0]!=_0x303993)return _0x13b86d(_0x27f8db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4de1e5[0x1]={..._0x4de1e5[0x1],[_0x27f8db([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x15877f};},{[_0x27f8db([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27f8db([0x68,0x69,0x67,0x68])}),_0x229612[_0x27f8db([0x6f,0x6e])](_0x27f8db([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x27c762=>{_0x5114dd(_0x27c762[_0x27f8db([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20a582=!0x0,_0x4feaf5(_0x27c762[_0x27f8db([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x27f8db([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27f8db([0x6c,0x6f,0x77])}),_0x129f87[_0x27f8db([0x74,0x68,0x65,0x6e])](()=>{_0x20a582||_0x13b86d(_0x27f8db([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xfc3be1(){return _0x229612[_0x27f8db([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27f8db([0x76,0x69,0x65,0x77])][_0x27f8db([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x27f8db([0x61,0x75,0x74,0x6f]);}function _0x17ed69(){_0x229612[_0x27f8db([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27f8db([0x76,0x69,0x65,0x77])][_0x27f8db([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x27f8db([0x61,0x75,0x74,0x6f]);}}function _0x679bcb(_0x3bf28a){const _0x1cb8a1=[new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3678ef=>setTimeout(_0x3678ef,0x4bd32e44^_0xe4ba0a)),_0x129f87[_0x27f8db([0x74,0x68,0x65,0x6e])](()=>new window[(_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16b16d=>{let _0x3c7629=0x0;_0x229612[_0x27f8db([0x6d,0x6f,0x64,0x65,0x6c])][_0x27f8db([0x6f,0x6e])](_0x27f8db([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3ce76f,_0x26aa5c)=>{_0x26aa5c[0x0][_0x27f8db([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3c7629++,_0x3c7629==(0x4bda1170^_0xe4ba0a)&&(_0x16b16d(),_0x3ce76f[_0x27f8db([0x6f,0x66,0x66])]());});}))];return window[_0x27f8db([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x27f8db([0x72,0x61,0x63,0x65])](_0x1cb8a1)[_0x27f8db([0x74,0x68,0x65,0x6e])](()=>_0x3bf28a);}async function _0x3ef0fe(){await _0x129f87,_0x229612[_0x27f8db([0x6d,0x6f,0x64,0x65,0x6c])][_0x27f8db([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x90bede,_0x229612[_0x27f8db([0x6d,0x6f,0x64,0x65,0x6c])][_0x27f8db([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x90bede,_0x229612[_0x27f8db([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x27f8db([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35b3e5(_0x44045e){const _0xf4d228=_0x150599();_0x229612[_0xf4d228]=_0x27f8db([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x44045e,_0x44045e!=_0x27f8db([0x56,0x61,0x6c,0x69,0x64])&&_0x3ef0fe();}function _0x150599(){const _0x161eb2=window[_0x27f8db([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x27f8db([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x27f8db([0x6e,0x6f,0x77])]())[_0x27f8db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x27f8db([0x2e]),'');let _0x2dd471=_0x27f8db([0x75]);for(let _0x5df708=0x0;_0x5df708<_0x161eb2[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5df708+=0x2){let _0x57785f=window[_0x27f8db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x161eb2[_0x27f8db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5df708,_0x5df708+0x2));_0x57785f>=_0xe44e7[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x57785f-=_0xe44e7[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2dd471+=_0xe44e7[_0x57785f];}return _0x2dd471;}function _0x2291d1(){const _0x616f23=_0x2ef735[_0x27f8db([0x73,0x70,0x6c,0x69,0x74])](_0x27f8db([0x2e]));if(0x3!=_0x616f23[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x190327(_0x616f23[0x1]);function _0x190327(_0x55c43f){const _0x3805c1=_0x1801e0(_0x55c43f);return _0x3805c1&&_0x54d1b9()?_0x3805c1:null;function _0x54d1b9(){const _0x5dba3e=_0x3805c1[_0x27f8db([0x6a,0x74,0x69])],_0xe118cd=window[_0x27f8db([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dba3e[_0x27f8db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dba3e[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x26be1f={..._0x3805c1,[_0x27f8db([0x6a,0x74,0x69])]:_0x5dba3e[_0x27f8db([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5dba3e[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x26be1f[_0x27f8db([0x76,0x63])],_0x5df92e(_0x26be1f)==_0xe118cd;}}}async function _0x5ed480(){let _0x1e8b13=!0x0;try{const _0x17038c=_0x2ef735[_0x27f8db([0x73,0x70,0x6c,0x69,0x74])](_0x27f8db([0x2e])),[_0x49afc,_0x657011,_0x25d7b3]=_0x17038c;return _0x3fb476(_0x49afc),await _0x332388(_0x49afc,_0x657011,_0x25d7b3),_0x1e8b13;}catch{return!0x1;}function _0x3fb476(_0x1f2f6e){const _0x29b091=_0x1801e0(_0x1f2f6e);_0x29b091&&_0x29b091[_0x27f8db([0x61,0x6c,0x67])]==_0x27f8db([0x45,0x53,0x32,0x35,0x36])||(_0x1e8b13=!0x1);}async function _0x332388(_0x35394d,_0x25e90b,_0x360286){const _0x282845=window[_0x27f8db([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x27f8db([0x66,0x72,0x6f,0x6d])](_0x28d616(_0x360286),_0x72a077=>_0x72a077[_0x27f8db([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5a044b=new window[(_0x27f8db([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x27f8db([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x35394d+_0x27f8db([0x2e])+_0x25e90b),_0x1851de=window[_0x27f8db([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x27f8db([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1851de)return;const _0x10b405=await _0x1851de[_0x27f8db([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x27f8db([0x6a,0x77,0x6b]),_0x2d4707,{[_0x27f8db([0x6e,0x61,0x6d,0x65])]:_0x27f8db([0x45,0x43,0x44,0x53,0x41]),[_0x27f8db([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x27f8db([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x27f8db([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1851de[_0x27f8db([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x27f8db([0x6e,0x61,0x6d,0x65])]:_0x27f8db([0x45,0x43,0x44,0x53,0x41]),[_0x27f8db([0x68,0x61,0x73,0x68])]:{[_0x27f8db([0x6e,0x61,0x6d,0x65])]:_0x27f8db([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x10b405,_0x282845,_0x5a044b)||(_0x1e8b13=!0x1);}}function _0x1801e0(_0x3a7261){return _0x3a7261[_0x27f8db([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x27f8db([0x65,0x79]))?JSON[_0x27f8db([0x70,0x61,0x72,0x73,0x65])](_0x28d616(_0x3a7261)):null;}function _0x28d616(_0x34d8bb){return window[_0x27f8db([0x61,0x74,0x6f,0x62])](_0x34d8bb[_0x27f8db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x27f8db([0x2b]))[_0x27f8db([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x27f8db([0x2f])));}function _0x5df92e(_0x7fb643){let _0x53b035=0x1505;function _0xf2c44f(_0x404cb8){for(let _0x28b1a3=0x0;_0x28b1a3<_0x404cb8[_0x27f8db([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28b1a3++){const _0x5236e6=_0x404cb8[_0x27f8db([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28b1a3);_0x53b035=(_0x53b035<<0x5)+_0x53b035+_0x5236e6,_0x53b035&=_0x53b035;}}function _0x124411(_0x3cb4e4){Array[_0x27f8db([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3cb4e4)?_0x3cb4e4[_0x27f8db([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x124411):_0x3cb4e4&&typeof _0x3cb4e4==_0x27f8db([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x27f8db([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3cb4e4)[_0x27f8db([0x73,0x6f,0x72,0x74])]()[_0x27f8db([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x24be16,_0x234a71])=>{_0xf2c44f(_0x24be16),_0x124411(_0x234a71);}):_0xf2c44f(window[_0x27f8db([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3cb4e4));}return _0x124411(_0x7fb643),_0x53b035>>>0x0;}function _0x5b9eb7(_0xe8891c){return _0xe8891c[_0x27f8db([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x27f8db([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x27f8db([0x30]));}function _0x23f667(_0x3f0189){return _0x3f0189[_0x27f8db([0x73,0x70,0x6c,0x69,0x74])]('')[_0x27f8db([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x27f8db([0x6a,0x6f,0x69,0x6e])]('');}function _0x90bede(){}function _0x27f8db(_0x583b95){const _0x5d3141=_0x5a90;return _0x583b95[_0x5d3141(0x181)](_0x47bfcc=>String[_0x5d3141(0x16a)](_0x47bfcc))[_0x5d3141(0x175)]('');}_0x35b3e5(await _0x3b4fdd());}(this);}[_0x44c891(0x157)](){const _0x48a059=_0x44c891,_0x1efe49=this[_0x48a059(0x160)][_0x48a059(0x19c)][_0x48a059(0x184)];_0x1efe49[_0x48a059(0x17e)](_0x48a059(0x19f))&&_0x1efe49[_0x48a059(0x179)](_0x48a059(0x19f),{'allowAttributes':[_0x48a059(0x16e)]}),_0x1efe49[_0x48a059(0x17e)](_0x48a059(0x156))&&_0x1efe49[_0x48a059(0x179)](_0x48a059(0x156),{'allowAttributes':[_0x48a059(0x16e)]});}[_0x44c891(0x177)](){const _0x12a3cb=_0x44c891,_0x111a36=this[_0x12a3cb(0x160)];_0x111a36[_0x12a3cb(0x162)][_0x12a3cb(0x192)](_0x12a3cb(0x159))[_0x12a3cb(0x158)]({'model':_0x12a3cb(0x16e),'view':_0x12a3cb(0x17b)}),_0x111a36[_0x12a3cb(0x162)][_0x12a3cb(0x192)](_0x12a3cb(0x183))[_0x12a3cb(0x163)]({'model':{'key':_0x12a3cb(0x16e),'value':_0x1e0e90=>_0x1e0e90[_0x12a3cb(0x169)](_0x12a3cb(0x17b))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d0cc9=_0x111a36[_0x12a3cb(0x178)][_0x12a3cb(0x15f)](_0x12a3cb(0x18c));_0x5d0cc9&&this[_0x12a3cb(0x16b)](_0x5d0cc9,_0x12a3cb(0x1a2),(_0x2c1671,[_0x21edeb,_0x3b7cb6])=>{const _0x680f6c=_0x12a3cb;_0x21edeb[_0x680f6c(0x15e)](_0x680f6c(0x16e),_0x3b7cb6);});}[_0x44c891(0x19b)](){const _0x59353e=_0x44c891,_0x418ffd=this[_0x59353e(0x160)][_0x59353e(0x16d)][_0x59353e(0x15f)](_0x59353e(0x199))||{},_0x528bc5=this[_0x59353e(0x160)][_0x59353e(0x16d)][_0x59353e(0x15f)](_0x59353e(0x19a))||'';this[_0x59353e(0x176)]=_0x3c89c9(_0x3b939a[_0x59353e(0x18f)],_0x59353e(0x19d),{..._0x418ffd,'pubkey':_0x528bc5,'ctx-name':_0x59353e(0x195)+this[_0x59353e(0x198)],'sourceList':'','imgOnly':_0x59353e(0x18b),'removeCopyright':_0x59353e(0x18b),'localeName':this[_0x59353e(0x160)][_0x59353e(0x1a5)][_0x59353e(0x17a)],'externalSourcesEmbedCss':_0x59353e(0x191)}),this[_0x59353e(0x176)][_0x59353e(0x19e)]=_0x5cf8a2=>{const _0x1d3469=_0x59353e;if(_0x1d3469(0x15d)==_0x5cf8a2)return _0x1d3469(0x17c);},_0x3b939a[_0x59353e(0x18f)][_0x59353e(0x1a4)][_0x59353e(0x196)](this[_0x59353e(0x176)]);}[_0x44c891(0x174)](){const _0x45145e=_0x44c891;this[_0x45145e(0x188)]=_0x3c89c9(_0x3b939a[_0x45145e(0x18f)],_0x45145e(0x15a),{'ctx-name':_0x45145e(0x195)+this[_0x45145e(0x198)]}),_0x3b939a[_0x45145e(0x18f)][_0x45145e(0x1a4)][_0x45145e(0x196)](this[_0x45145e(0x188)]);}[_0x44c891(0x16c)](){const _0x48b5da=_0x44c891,_0x510bbe=this[_0x48b5da(0x160)][_0x48b5da(0x178)][_0x48b5da(0x15f)](_0x48b5da(0x17d));_0x510bbe&&this[_0x48b5da(0x16b)](_0x510bbe,_0x48b5da(0x173),()=>{const _0x45f417=_0x48b5da,_0x279f0e=this[_0x45f417(0x160)][_0x45f417(0x19c)][_0x45f417(0x18f)][_0x45f417(0x165)][_0x45f417(0x155)]();_0x279f0e&&_0x279f0e[_0x45f417(0x169)](_0x45f417(0x16e))&&this[_0x45f417(0x160)][_0x45f417(0x1a3)][_0x45f417(0x170)][_0x45f417(0x164)](_0x45f417(0x186),()=>{const _0x1be854=_0x45f417;_0x453ac8(this[_0x1be854(0x160)],_0x279f0e);});});const _0x3eadde=this[_0x48b5da(0x160)][_0x48b5da(0x178)][_0x48b5da(0x15f)](_0x48b5da(0x15b));_0x3eadde&&this[_0x48b5da(0x16b)](_0x3eadde,_0x48b5da(0x173),()=>{const _0x5b5ebf=_0x48b5da,_0x2f0ffe=this[_0x5b5ebf(0x160)][_0x5b5ebf(0x19c)][_0x5b5ebf(0x18f)][_0x5b5ebf(0x165)][_0x5b5ebf(0x155)]();_0x2f0ffe&&_0x2f0ffe[_0x5b5ebf(0x169)](_0x5b5ebf(0x16e))&&this[_0x5b5ebf(0x160)][_0x5b5ebf(0x1a3)][_0x5b5ebf(0x170)][_0x5b5ebf(0x164)](_0x5b5ebf(0x186),()=>{const _0x5b1f24=_0x5b5ebf;_0x453ac8(this[_0x5b1f24(0x160)],_0x2f0ffe);});});}}
|
|
23
|
+
const _0x30fc21=_0x543e;(function(_0x48fc69,_0x3a98d1){const _0x21a50f=_0x543e,_0x528bc7=_0x48fc69();while(!![]){try{const _0x54e312=-parseInt(_0x21a50f(0x174))/0x1+-parseInt(_0x21a50f(0x18c))/0x2+parseInt(_0x21a50f(0x194))/0x3*(parseInt(_0x21a50f(0x1b3))/0x4)+-parseInt(_0x21a50f(0x192))/0x5+-parseInt(_0x21a50f(0x19e))/0x6*(-parseInt(_0x21a50f(0x18a))/0x7)+parseInt(_0x21a50f(0x16c))/0x8+parseInt(_0x21a50f(0x1b2))/0x9;if(_0x54e312===_0x3a98d1)break;else _0x528bc7['push'](_0x528bc7['shift']());}catch(_0x539899){_0x528bc7['push'](_0x528bc7['shift']());}}}(_0x3b95,0xa6564));function _0x543e(_0x3eeb89,_0x3a8b19){const _0x3b950a=_0x3b95();return _0x543e=function(_0x543e7a,_0xd4961){_0x543e7a=_0x543e7a-0x16b;let _0x1f5386=_0x3b950a[_0x543e7a];return _0x1f5386;},_0x543e(_0x3eeb89,_0x3a8b19);}import{Plugin as _0x270e92}from'ckeditor5/src/core.js';import{Dialog as _0x1caf48}from'ckeditor5/src/ui.js';import{createElement as _0x3c9af7,global as _0x57462c,uid as _0x2bef6e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x37846e}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x28338c}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xeab640}from'./utils/editingutils.js';function _0x3b95(){const _0x4315d5=['_initConfig','uploadcare.uploader','2405165usNPIP','_initConversion','3wsudoB','join','true','_initCtx','UploadcareEditing','editor','view','removeAttribute','body','data-uc-image-id','145542iGsBJP','editing','uploadcareImageId','add','imageInline','isOfficialPlugin','attributeToAttribute','_ctxElement','_configElement','imageBlock','isPremiumPlugin','contentLanguage','locale','config','closeMax','insertImage','selection','upcast','for','document','770454dyRWYE','5062048VIxvCa','map','render','querySelector','configElement','conversion','requires','once','execute','fromCharCode','afterInit','isRegistered','\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','1150736HQVWqv','cleanupImage','PictureEditing','ctxElement','uploadcareImageReplace','listenTo','_initSchema','elementToAttribute','51709OJTDFV','pluginName','init','appendChild','_initImageProcessingIndicator','remove','commands','get','input[uploadcare-file-input]','downcast','destroy','ucContextId','iconHrefResolver','href','model','uc-config','schema','uploader-','extend','replaceImageSource','#uc-icon-arrow-down','getAttribute','28coFBMb','uc-upload-ctx-provider','755860osIwCK','getSelectedElement','uploadcare','uploadcare.pubkey'];_0x3b95=function(){return _0x4315d5;};return _0x3b95();}export class UploadcareEditing extends _0x270e92{[_0x30fc21(0x1a6)]=null;[_0x30fc21(0x1a5)]=null;static get[_0x30fc21(0x175)](){const _0x1337e6=_0x30fc21;return _0x1337e6(0x198);}static get[_0x30fc21(0x1b9)](){const _0x535951=_0x30fc21;return[_0x535951(0x16e),_0x28338c,_0x1caf48];}static get[_0x30fc21(0x1a3)](){return!0x0;}static get[_0x30fc21(0x1a8)](){return!0x0;}[_0x30fc21(0x17f)];get[_0x30fc21(0x1b7)](){const _0x8fbf08=_0x30fc21;return this[_0x8fbf08(0x1a6)];}get[_0x30fc21(0x16f)](){const _0x3b73eb=_0x30fc21;return this[_0x3b73eb(0x1a5)];}constructor(_0x4f91b2){const _0x2ebb58=_0x30fc21;super(_0x4f91b2),this[_0x2ebb58(0x17f)]=_0x2bef6e();}[_0x30fc21(0x176)](){const _0x1f50bb=_0x30fc21,_0x1f1007=this[_0x1f50bb(0x199)];_0x1f1007[_0x1f50bb(0x17a)][_0x1f50bb(0x1a1)](_0x1f50bb(0x18e),new _0x37846e(_0x1f1007));}[_0x30fc21(0x1bd)](){const _0x16b7c7=_0x30fc21;this[_0x16b7c7(0x172)](),this[_0x16b7c7(0x193)](),this[_0x16b7c7(0x190)](),this[_0x16b7c7(0x197)](),this[_0x16b7c7(0x178)](),this[_0x16b7c7(0x171)](this[_0x16b7c7(0x199)],_0x16b7c7(0x17e),()=>{const _0x1c6dee=_0x16b7c7;this[_0x1c6dee(0x1a6)]&&(this[_0x1c6dee(0x1a6)][_0x1c6dee(0x179)](),this[_0x1c6dee(0x1a6)]=null),this[_0x1c6dee(0x1a5)]&&(this[_0x1c6dee(0x1a5)][_0x1c6dee(0x179)](),this[_0x1c6dee(0x1a5)]=null);const _0x54a348=_0x57462c[_0x1c6dee(0x1b1)][_0x1c6dee(0x1b6)](_0x1c6dee(0x17c));_0x54a348&&_0x54a348[_0x1c6dee(0x179)]();}),async function(_0x37a488){const _0x235d7f=_0x1aaefc([0x45,0x43,0x34,0x55,0x69,0x35,0x4c,0x71,0x65,0x6f,0x41,0x33,0x36,0x74,0x68,0x67,0x53,0x44,0x75,0x79,0x4b,0x32,0x6c,0x5a,0x66,0x78,0x52,0x6a,0x7a,0x49,0x58,0x56,0x47,0x42,0x6e,0x54,0x46,0x59,0x39,0x30,0x38,0x62,0x4a,0x4d,0x76,0x73,0x57,0x6b,0x70,0x72,0x77,0x4f,0x50,0x48,0x31,0x64,0x6d,0x63,0x61,0x37,0x4e,0x51]),_0x40f94f=0x9ff086f,_0x31c540=0x9f86797^_0x40f94f,_0xe206d9=window[_0x1aaefc([0x44,0x61,0x74,0x65])][_0x1aaefc([0x6e,0x6f,0x77])](),_0x9ada83=_0x37a488[_0x1aaefc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x396af9=new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ff2af=>{_0x9ada83[_0x1aaefc([0x6f,0x6e,0x63,0x65])](_0x1aaefc([0x72,0x65,0x61,0x64,0x79]),_0x1ff2af);}),_0x339f51={[_0x1aaefc([0x6b,0x74,0x79])]:_0x1aaefc([0x45,0x43]),[_0x1aaefc([0x75,0x73,0x65])]:_0x1aaefc([0x73,0x69,0x67]),[_0x1aaefc([0x63,0x72,0x76])]:_0x1aaefc([0x50,0x2d,0x32,0x35,0x36]),[_0x1aaefc([0x78])]:_0x1aaefc([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]),[_0x1aaefc([0x79])]:_0x1aaefc([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]),[_0x1aaefc([0x61,0x6c,0x67])]:_0x1aaefc([0x45,0x53,0x32,0x35,0x36])},_0x580cef=_0x9ada83[_0x1aaefc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1aaefc([0x67,0x65,0x74])](_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x31f8f4(){let _0x55c7bd,_0x33a6fb=null,_0x3b06c9=null;try{if(_0x580cef==_0x1aaefc([0x47,0x50,0x4c]))return _0x1aaefc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x55c7bd=_0x2e7a16(),!_0x55c7bd)return _0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x55c7bd[_0x1aaefc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3b06c9=_0x1b428a(_0x55c7bd[_0x1aaefc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x55c7bd[_0x1aaefc([0x6a,0x74,0x69])])),await _0x2c8a21()?_0x3c5b29()?_0x2fa1f2()?_0x1aaefc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5a0bae()?(_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1aaefc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x33a6fb=_0x5404f9(_0x1aaefc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1aaefc([0x74,0x72,0x69,0x61,0x6c])&&(_0x33a6fb=_0x5404f9(_0x1aaefc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f7a5b()):_0x1aaefc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1aaefc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1aaefc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2fa1f2(){const _0xc5762f=[_0x1aaefc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1aaefc([0x74,0x72,0x69,0x61,0x6c])][_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe206d9/0x3e8:0xe10*_0x31c540;return _0x55c7bd[_0x1aaefc([0x65,0x78,0x70])]<_0xc5762f;}function _0x3c5b29(){const _0x4fb4e7=_0x55c7bd[_0x1aaefc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4fb4e7&&(!!_0x4fb4e7[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x2a]))||!!_0x4fb4e7[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x55,0x50,0x4c,0x43])));}function _0x5a0bae(){const _0x3d7d59=_0x543e,_0x563327=_0x55c7bd[_0x1aaefc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x563327||0x0==_0x563327[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x596da4}=new URL(window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x3d7d59(0x181)]);if(_0x563327[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x596da4))return!0x0;const _0x5b11d9=_0x596da4[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e]));return _0x563327[_0x1aaefc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32ff=>_0x32ff[_0x1aaefc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1aaefc([0x2a])))[_0x1aaefc([0x6d,0x61,0x70])](_0x389e8e=>_0x389e8e[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e])))[_0x1aaefc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e41bd=>_0x5e41bd[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b11d9[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1aaefc([0x6d,0x61,0x70])](_0x542ad2=>Array(_0x5b11d9[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x542ad2[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1aaefc([0x66,0x69,0x6c,0x6c])](_0x542ad2[0x0]===_0x1aaefc([0x2a])?_0x1aaefc([0x2a]):'')[_0x1aaefc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x542ad2))[_0x1aaefc([0x73,0x6f,0x6d,0x65])](_0x21a6b3=>_0x5b11d9[_0x1aaefc([0x65,0x76,0x65,0x72,0x79])]((_0x2e1e49,_0x4ffc7e)=>_0x21a6b3[_0x4ffc7e]===_0x2e1e49||_0x21a6b3[_0x4ffc7e]===_0x1aaefc([0x2a])));}function _0x1f7a5b(){return _0x33a6fb&&_0x3b06c9?new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x94681e,_0xadcbe3)=>{_0x33a6fb[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x94681e,_0xadcbe3),_0x3b06c9[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x240f90=>{_0x240f90!=_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])&&_0x94681e(_0x240f90);},_0xadcbe3);}):_0x33a6fb||_0x3b06c9||_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1b428a(_0x3ec9a6,_0x32c10d){return new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27bed0=>{if(_0x3fa9fd())return _0x27bed0(_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]));_0x4dbd2c(),_0x9ada83[_0x1aaefc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3bbd7d=!0x1;const _0x32c226=_0x2bef6e();function _0x26de21(_0x227c37){return!!_0x227c37&&(typeof _0x227c37===_0x1aaefc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x227c37===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x227c37[_0x1aaefc([0x74,0x68,0x65,0x6e])]===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x227c37[_0x1aaefc([0x63,0x61,0x74,0x63,0x68])]===_0x1aaefc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1df05b(_0x544ea6){_0x25f5d4(_0x544ea6)[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x22f4e7=>{if(!_0x22f4e7||_0x22f4e7[_0x1aaefc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1aaefc([0x6f,0x6b]))return _0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x130d26(_0x53f649(_0x32c226+_0x32c10d))!=_0x22f4e7[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1aaefc([0x56,0x61,0x6c,0x69,0x64]);})[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x101c83=>(_0xc5f409(),_0x101c83),()=>{const _0x4f248c=_0x424eb8();return null==_0x4f248c?(_0xc5f409(),_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])):_0x1aaefc(_0xe206d9-_0x4f248c>(0x2df38c6f^_0x40f94f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x27bed0)[_0x1aaefc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x195124=0x9c9e6ef^_0x40f94f;function _0xc5f409(){const _0xd0819f=_0x1aaefc([0x6c,0x6c,0x63,0x74,0x2d])+_0x130d26(_0x53f649(_0x3ec9a6)),_0x966f60=_0x52b72b(_0x130d26(window[_0x1aaefc([0x4d,0x61,0x74,0x68])][_0x1aaefc([0x63,0x65,0x69,0x6c])](_0xe206d9/_0x195124)));window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1aaefc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd0819f,_0x966f60);}function _0x424eb8(){const _0x1ee928=_0x1aaefc([0x6c,0x6c,0x63,0x74,0x2d])+_0x130d26(_0x53f649(_0x3ec9a6)),_0x3919a3=window[_0x1aaefc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1aaefc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1ee928);return _0x3919a3?window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52b72b(_0x3919a3),0x10)*_0x195124:null;}function _0x25f5d4(_0x2238c2){return new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x22f3a1,_0x34f6f6)=>{_0x2238c2[_0x1aaefc([0x74,0x68,0x65,0x6e])](_0x22f3a1,_0x34f6f6),window[_0x1aaefc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34f6f6,0x9fedcaf^_0x40f94f);});}}_0x9ada83[_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1bfdeb,_0x2218a8)=>{if(_0x2218a8[0x0]!=_0x3ec9a6)return _0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2218a8[0x1]={..._0x2218a8[0x1],[_0x1aaefc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x32c226};},{[_0x1aaefc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1aaefc([0x68,0x69,0x67,0x68])}),_0x9ada83[_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1d59b0=>{_0x26de21(_0x1d59b0[_0x1aaefc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3bbd7d=!0x0,_0x1df05b(_0x1d59b0[_0x1aaefc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1aaefc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1aaefc([0x6c,0x6f,0x77])}),_0x396af9[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>{_0x3bbd7d||_0x27bed0(_0x1aaefc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3fa9fd(){return _0x9ada83[_0x1aaefc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1aaefc([0x76,0x69,0x65,0x77])][_0x1aaefc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1aaefc([0x61,0x75,0x74,0x6f]);}function _0x4dbd2c(){_0x9ada83[_0x1aaefc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1aaefc([0x76,0x69,0x65,0x77])][_0x1aaefc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1aaefc([0x61,0x75,0x74,0x6f]);}}function _0x5404f9(_0x2d2f37){const _0xffa955=[new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57ece6=>setTimeout(_0x57ece6,0x9f636a3^_0x40f94f)),_0x396af9[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26a575=>{let _0x1e4414=0x0;_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x6f,0x6e])](_0x1aaefc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x228d4d,_0x53dd55)=>{_0x53dd55[0x0][_0x1aaefc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1e4414++,_0x1e4414==(0x9ff0997^_0x40f94f)&&(_0x26a575(),_0x228d4d[_0x1aaefc([0x6f,0x66,0x66])]());});}))];return window[_0x1aaefc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1aaefc([0x72,0x61,0x63,0x65])](_0xffa955)[_0x1aaefc([0x74,0x68,0x65,0x6e])](()=>_0x2d2f37);}async function _0x2e0707(){await _0x396af9,_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25c643,_0x9ada83[_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1aaefc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25c643,_0x9ada83[_0x1aaefc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1aaefc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x44ea0e(_0x51b7ca){const _0x355114=_0x3ba0f2();_0x9ada83[_0x355114]=_0x1aaefc([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51b7ca,_0x51b7ca!=_0x1aaefc([0x56,0x61,0x6c,0x69,0x64])&&_0x2e0707();}function _0x3ba0f2(){const _0x26a108=window[_0x1aaefc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1aaefc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1aaefc([0x6e,0x6f,0x77])]())[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1aaefc([0x2e]),'');let _0x582a94=_0x1aaefc([0x45]);for(let _0x285e88=0x0;_0x285e88<_0x26a108[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x285e88+=0x2){let _0x4e9693=window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26a108[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x285e88,_0x285e88+0x2));_0x4e9693>=_0x235d7f[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4e9693-=_0x235d7f[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x582a94+=_0x235d7f[_0x4e9693];}return _0x582a94;}function _0x2e7a16(){const _0xcfbe30=_0x580cef[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e]));if(0x3!=_0xcfbe30[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4fc5f7(_0xcfbe30[0x1]);function _0x4fc5f7(_0x3aea41){const _0x46e8d7=_0x5ba3b7(_0x3aea41);return _0x46e8d7&&_0x1ae69a()?_0x46e8d7:null;function _0x1ae69a(){const _0x263477=_0x46e8d7[_0x1aaefc([0x6a,0x74,0x69])],_0x4d89e7=window[_0x1aaefc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x263477[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x263477[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5802e2={..._0x46e8d7,[_0x1aaefc([0x6a,0x74,0x69])]:_0x263477[_0x1aaefc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x263477[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5802e2[_0x1aaefc([0x76,0x63])],_0x53f649(_0x5802e2)==_0x4d89e7;}}}async function _0x2c8a21(){let _0x35b717=!0x0;try{const _0x1ebf06=_0x580cef[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])](_0x1aaefc([0x2e])),[_0x537152,_0x1c16f0,_0x34db33]=_0x1ebf06;return _0x5bfce4(_0x537152),await _0x4b171a(_0x537152,_0x1c16f0,_0x34db33),_0x35b717;}catch{return!0x1;}function _0x5bfce4(_0x4e595b){const _0x4b2e68=_0x5ba3b7(_0x4e595b);_0x4b2e68&&_0x4b2e68[_0x1aaefc([0x61,0x6c,0x67])]==_0x1aaefc([0x45,0x53,0x32,0x35,0x36])||(_0x35b717=!0x1);}async function _0x4b171a(_0x426a26,_0x345c64,_0x497ea7){const _0x305636=window[_0x1aaefc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1aaefc([0x66,0x72,0x6f,0x6d])](_0x1ff36f(_0x497ea7),_0xd5ae7c=>_0xd5ae7c[_0x1aaefc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x57ccdf=new window[(_0x1aaefc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1aaefc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x426a26+_0x1aaefc([0x2e])+_0x345c64),_0x583dbe=window[_0x1aaefc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1aaefc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x583dbe)return;const _0x48aaa3=await _0x583dbe[_0x1aaefc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1aaefc([0x6a,0x77,0x6b]),_0x339f51,{[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x45,0x43,0x44,0x53,0x41]),[_0x1aaefc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1aaefc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x583dbe[_0x1aaefc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x45,0x43,0x44,0x53,0x41]),[_0x1aaefc([0x68,0x61,0x73,0x68])]:{[_0x1aaefc([0x6e,0x61,0x6d,0x65])]:_0x1aaefc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48aaa3,_0x305636,_0x57ccdf)||(_0x35b717=!0x1);}}function _0x5ba3b7(_0x23272e){return _0x23272e[_0x1aaefc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1aaefc([0x65,0x79]))?JSON[_0x1aaefc([0x70,0x61,0x72,0x73,0x65])](_0x1ff36f(_0x23272e)):null;}function _0x1ff36f(_0x1012c2){return window[_0x1aaefc([0x61,0x74,0x6f,0x62])](_0x1012c2[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1aaefc([0x2b]))[_0x1aaefc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1aaefc([0x2f])));}function _0x53f649(_0xa9f1dc){let _0x4fd215=0x1505;function _0x104d9c(_0x28cf93){for(let _0x596432=0x0;_0x596432<_0x28cf93[_0x1aaefc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x596432++){const _0x17becf=_0x28cf93[_0x1aaefc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x596432);_0x4fd215=(_0x4fd215<<0x5)+_0x4fd215+_0x17becf,_0x4fd215&=_0x4fd215;}}function _0x44ef91(_0x5dc319){Array[_0x1aaefc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5dc319)?_0x5dc319[_0x1aaefc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x44ef91):_0x5dc319&&typeof _0x5dc319==_0x1aaefc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1aaefc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5dc319)[_0x1aaefc([0x73,0x6f,0x72,0x74])]()[_0x1aaefc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b555e,_0x2b9777])=>{_0x104d9c(_0x4b555e),_0x44ef91(_0x2b9777);}):_0x104d9c(window[_0x1aaefc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5dc319));}return _0x44ef91(_0xa9f1dc),_0x4fd215>>>0x0;}function _0x130d26(_0x5c6f5f){return _0x5c6f5f[_0x1aaefc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1aaefc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1aaefc([0x30]));}function _0x52b72b(_0x39fbe8){return _0x39fbe8[_0x1aaefc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1aaefc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1aaefc([0x6a,0x6f,0x69,0x6e])]('');}function _0x25c643(){}function _0x1aaefc(_0x511d57){const _0x38d9a7=_0x543e;return _0x511d57[_0x38d9a7(0x1b4)](_0x521ea3=>String[_0x38d9a7(0x1bc)](_0x521ea3))[_0x38d9a7(0x195)]('');}_0x44ea0e(await _0x31f8f4());}(this);}[_0x30fc21(0x172)](){const _0x4a068e=_0x30fc21,_0x22f36d=this[_0x4a068e(0x199)][_0x4a068e(0x182)][_0x4a068e(0x184)];_0x22f36d[_0x4a068e(0x1be)](_0x4a068e(0x1a7))&&_0x22f36d[_0x4a068e(0x186)](_0x4a068e(0x1a7),{'allowAttributes':[_0x4a068e(0x1a0)]}),_0x22f36d[_0x4a068e(0x1be)](_0x4a068e(0x1a2))&&_0x22f36d[_0x4a068e(0x186)](_0x4a068e(0x1a2),{'allowAttributes':[_0x4a068e(0x1a0)]});}[_0x30fc21(0x193)](){const _0x943cd9=_0x30fc21,_0x2e4da5=this[_0x943cd9(0x199)];_0x2e4da5[_0x943cd9(0x1b8)][_0x943cd9(0x1b0)](_0x943cd9(0x17d))[_0x943cd9(0x1a4)]({'model':_0x943cd9(0x1a0),'view':_0x943cd9(0x19d)}),_0x2e4da5[_0x943cd9(0x1b8)][_0x943cd9(0x1b0)](_0x943cd9(0x1af))[_0x943cd9(0x173)]({'model':{'key':_0x943cd9(0x1a0),'value':_0x3f7cab=>_0x3f7cab[_0x943cd9(0x189)](_0x943cd9(0x19d))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x31bb73=_0x2e4da5[_0x943cd9(0x17a)][_0x943cd9(0x17b)](_0x943cd9(0x187));_0x31bb73&&this[_0x943cd9(0x171)](_0x31bb73,_0x943cd9(0x16d),(_0x26cf21,[_0x40de24,_0x2fbc25])=>{const _0x3f68bb=_0x943cd9;_0x40de24[_0x3f68bb(0x19b)](_0x3f68bb(0x1a0),_0x2fbc25);});}[_0x30fc21(0x190)](){const _0x1b0c8b=_0x30fc21,_0x31325a=this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1ab)][_0x1b0c8b(0x17b)](_0x1b0c8b(0x191))||{},_0x4f4c28=this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1ab)][_0x1b0c8b(0x17b)](_0x1b0c8b(0x18f))||'';this[_0x1b0c8b(0x1a6)]=_0x3c9af7(_0x57462c[_0x1b0c8b(0x1b1)],_0x1b0c8b(0x183),{..._0x31325a,'pubkey':_0x4f4c28,'ctx-name':_0x1b0c8b(0x185)+this[_0x1b0c8b(0x17f)],'sourceList':'','imgOnly':_0x1b0c8b(0x196),'removeCopyright':_0x1b0c8b(0x196),'localeName':this[_0x1b0c8b(0x199)][_0x1b0c8b(0x1aa)][_0x1b0c8b(0x1a9)],'externalSourcesEmbedCss':_0x1b0c8b(0x16b)}),this[_0x1b0c8b(0x1a6)][_0x1b0c8b(0x180)]=_0xb55261=>{const _0x21d9cd=_0x1b0c8b;if(_0x21d9cd(0x1ac)==_0xb55261)return _0x21d9cd(0x188);},_0x57462c[_0x1b0c8b(0x1b1)][_0x1b0c8b(0x19c)][_0x1b0c8b(0x177)](this[_0x1b0c8b(0x1a6)]);}[_0x30fc21(0x197)](){const _0x47905f=_0x30fc21;this[_0x47905f(0x1a5)]=_0x3c9af7(_0x57462c[_0x47905f(0x1b1)],_0x47905f(0x18b),{'ctx-name':_0x47905f(0x185)+this[_0x47905f(0x17f)]}),_0x57462c[_0x47905f(0x1b1)][_0x47905f(0x19c)][_0x47905f(0x177)](this[_0x47905f(0x1a5)]);}[_0x30fc21(0x178)](){const _0x51ccb8=_0x30fc21,_0x4835f8=this[_0x51ccb8(0x199)][_0x51ccb8(0x17a)][_0x51ccb8(0x17b)](_0x51ccb8(0x1ad));_0x4835f8&&this[_0x51ccb8(0x171)](_0x4835f8,_0x51ccb8(0x1bb),()=>{const _0x5b3462=_0x51ccb8,_0x3f8962=this[_0x5b3462(0x199)][_0x5b3462(0x182)][_0x5b3462(0x1b1)][_0x5b3462(0x1ae)][_0x5b3462(0x18d)]();_0x3f8962&&_0x3f8962[_0x5b3462(0x189)](_0x5b3462(0x1a0))&&this[_0x5b3462(0x199)][_0x5b3462(0x19f)][_0x5b3462(0x19a)][_0x5b3462(0x1ba)](_0x5b3462(0x1b5),()=>{const _0x3b17db=_0x5b3462;_0xeab640(this[_0x3b17db(0x199)],_0x3f8962);});});const _0x136ef8=this[_0x51ccb8(0x199)][_0x51ccb8(0x17a)][_0x51ccb8(0x17b)](_0x51ccb8(0x170));_0x136ef8&&this[_0x51ccb8(0x171)](_0x136ef8,_0x51ccb8(0x1bb),()=>{const _0x341fff=_0x51ccb8,_0x39c611=this[_0x341fff(0x199)][_0x341fff(0x182)][_0x341fff(0x1b1)][_0x341fff(0x1ae)][_0x341fff(0x18d)]();_0x39c611&&_0x39c611[_0x341fff(0x189)](_0x341fff(0x1a0))&&this[_0x341fff(0x199)][_0x341fff(0x19f)][_0x341fff(0x19a)][_0x341fff(0x1ba)](_0x341fff(0x1b5),()=>{const _0x2f8d64=_0x341fff;_0xeab640(this[_0x2f8d64(0x199)],_0x39c611);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x24f5ea,ObservableMixin as _0x275c0b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xb02a3a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3e0249}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4ad7ca}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1968c3}from'../../utils/uploadutils.js';import{getImageUrls as _0xe13659,getImageDimension as _0x595e29}from'../../utils/editingutils.js';import{isAncestor as _0x165ac4}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x275c0b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5f026c,_0x379e60,_0x364211){super(),this['_editor']=_0x5f026c,this['_dialog']=_0x379e60,this['_imageElement']=_0x364211,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 _0x505fd7=this['_imageElement'],_0xb7617e=_0x505fd7['getAttribute']('uploadcareImageId'),_0x4a9ec2=_0x505fd7['getAttribute']('src');if(_0xb7617e)await this['_loadImageInfo'](_0xb7617e,_0x4a9ec2);else{if(this['_imageCache']['has'](_0x4a9ec2)){const _0x5cbc83=this['_imageCache']['get'](_0x4a9ec2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5cbc83['url'],this['imageDimension']=_0x5cbc83['dimension'],this['imageId']=_0x5cbc83['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xa1e495}=this['_editor'],t=_0xa1e495['t'],_0x230194=new _0x4ad7ca(_0xa1e495,this['imageStatus'],this['_attributes']);_0x230194['bind']('status')['to'](this,'imageStatus'),_0x230194['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x230194['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x230194['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x230194,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3e0249,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x230194,'position':_0xb02a3a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x230194['focus']();},'onHide':()=>{_0x230194['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x443f26=>!_0x165ac4(_0x443f26,_0x230194['element'])}});}['_loadImageInfo'](_0x32dba9,_0x1d8fee){return _0x1968c3['getInfo'](_0x32dba9,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x149be2=>{const {width:_0x704cd0,height:_0x55a46a}=_0x149be2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d8fee,this['imageDimension']={'width':_0x704cd0,'height':_0x55a46a},this['imageId']=_0x32dba9;})['catch'](_0x640c90=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x640c90['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x156930,_0x5ae3a2){return this['_getImageAsFile'](_0x156930)['then'](_0x16762f=>_0x1968c3['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x5ae3a2['signal'],'file':_0x16762f,'onProgress':_0x481b5a=>{_0x481b5a&&_0x481b5a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x481b5a['value']));}}))['then'](_0xa22cde=>{const {width:_0x5ac7f4,height:_0x912e68}=_0xa22cde['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa22cde['cdnUrl'],this['imageDimension']={'width':_0x5ac7f4,'height':_0x912e68},this['imageId']=_0xa22cde['uuid'],this['imageUploadProgress']=null;const _0x353435=_0x156930['getAttribute']('src');this['_imageCache']['set'](_0x353435,{'id':_0xa22cde['uuid'],'url':_0xa22cde['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x319c41=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x319c41['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a5d0f,_0x359443){_0x2a5d0f['on']('apply',(_0x4c0ba5,_0x3a0b36)=>{this['_replaceImage'](_0x359443,_0x3a0b36['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a5d0f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a5d0f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x49966c,_0x44b61a,_0x393fa9){const _0xc1d6c0=this['_editor'],{width:_0x25f2ff,height:_0x4685eb}=_0x595e29(_0x44b61a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1165b1,imageSources:_0x226ecc}=_0xe13659(_0x44b61a,_0x25f2ff);_0xc1d6c0['model']['change'](_0x23e262=>{if('$graveyard'===_0x49966c['root']['rootName']){_0xc1d6c0['execute']('insertImage',{'imageType':_0x49966c['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb}});const _0x15f34f=_0x49966c['getChildren']();_0x49966c=_0xc1d6c0['model']['document']['selection']['getSelectedElement']();for(const _0x5d851d of _0x15f34f)_0x23e262['append'](_0x23e262['cloneElement'](_0x5d851d),_0x49966c);}else _0x23e262['setSelection'](_0x49966c,'on'),_0xc1d6c0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb},_0x49966c);_0x23e262['setSelection'](_0x49966c,'on');});}async['_getImageAsFile'](_0x5883e4){const _0x211434=_0x24f5ea['window'],_0x396082=_0x24f5ea['document']['location']['href'],_0x362d45=new _0x211434['URL'](_0x5883e4['getAttribute']('src'),_0x396082);if('data:'===_0x362d45['protocol']){const _0x4cf61f=_0x362d45['href']['split'](','),_0x23f706=_0x4cf61f[0x0]['match'](/:(.*?);/)[0x1],_0x1a56a2=_0x23f706['split']('/')[0x1],_0x2ecbff=_0x211434['atob'](_0x4cf61f[_0x4cf61f['length']-0x1]);let _0x23aec3=_0x2ecbff['length'];const _0x34be92=new _0x211434['Uint8Array'](_0x23aec3);for(;_0x23aec3--;)_0x34be92[_0x23aec3]=_0x2ecbff['charCodeAt'](_0x23aec3);return new _0x211434['File']([_0x34be92],'image.'+_0x1a56a2,{'type':_0x23f706});}const _0x599a22=_0x362d45['href']['split']('/'),_0x45fc76=_0x599a22[_0x599a22['length']-0x1],_0x5cbf51=_0x45fc76['split']('.')[0x1];return _0x211434['fetch'](_0x362d45['href'])['then'](_0x49e943=>_0x49e943['clone']()['blob']())['then'](_0x17a09b=>new _0x211434['File']([_0x17a09b],_0x45fc76,{'type':'image/'+_0x5cbf51}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x263b(_0xaa8ab3,_0x29a8df){const _0x35cc40=_0x35cc();return _0x263b=function(_0x263bc5,_0x1c6aed){_0x263bc5=_0x263bc5-0xbb;let _0xd6ee94=_0x35cc40[_0x263bc5];return _0xd6ee94;},_0x263b(_0xaa8ab3,_0x29a8df);}(function(_0x532cf,_0x2d2890){const _0x101464=_0x263b,_0x126508=_0x532cf();while(!![]){try{const _0xa3b2ff=parseInt(_0x101464(0xc5))/0x1+-parseInt(_0x101464(0xbb))/0x2+parseInt(_0x101464(0xc1))/0x3+parseInt(_0x101464(0xc9))/0x4*(parseInt(_0x101464(0xc6))/0x5)+-parseInt(_0x101464(0xca))/0x6+parseInt(_0x101464(0xbe))/0x7*(parseInt(_0x101464(0xbf))/0x8)+-parseInt(_0x101464(0xc3))/0x9;if(_0xa3b2ff===_0x2d2890)break;else _0x126508['push'](_0x126508['shift']());}catch(_0x25e5e7){_0x126508['push'](_0x126508['shift']());}}}(_0x35cc,0x511ed));function _0x35cc(){const _0x21ed01=['setTemplate','466476RtExhz','uc-cloud-image-editor','set','2395603XIpZKC','8ZztqCz','ck-uploadcare-theme','539880rYzFHT','image-edit','2806227Nzlilt','imageSrc','659693TJfJyz','25WUvQYw','bindTemplate','uc-light','151604ylcDjY','2964462qbcMFD'];_0x35cc=function(){return _0x21ed01;};return _0x35cc();}import{View as _0x4d1692}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x4d1692{constructor(_0x2d2e72,_0x3cfc60){const _0x6a015a=_0x263b;super(_0x2d2e72);const _0x5c8907=this[_0x6a015a(0xc7)];this[_0x6a015a(0xbd)](_0x6a015a(0xc4),''),this[_0x6a015a(0xcb)]({'tag':_0x6a015a(0xbc),'attributes':{..._0x3cfc60,'class':[_0x6a015a(0xc8),_0x6a015a(0xc0)],'ctx-name':_0x6a015a(0xc2),'cdn-url':_0x5c8907['to'](_0x6a015a(0xc4))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x129b51}from'ckeditor5/src/icons.js';import{ButtonView as _0x3372b0,IconView as _0x4bbe7e,View as _0x43a257}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x43a257{constructor(_0x7bec8b){super(_0x7bec8b);const t=_0x7bec8b['t'];this['set']('errorType',null);const _0x1c445d=new _0x3372b0(_0x7bec8b);_0x1c445d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1c445d['withText']=!0x0,_0x1c445d['class']='ck-button-action',_0x1c445d['on']('execute',()=>{this['fire']('retry');}),_0x1c445d['bind']('isVisible')['to'](this,'errorType',_0x267918=>'NotFound'!==_0x267918);const _0x22db96=new _0x4bbe7e();_0x22db96['content']=_0x129b51,_0x22db96['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4083d5=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':[_0x22db96,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4083d5['to']('errorType',_0x1ac7a1=>t('NotFound'!==_0x1ac7a1?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1c445d]},{'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'}]}]}]});}}
|