@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20250224.0 → 0.0.0-nightly-next-20250225.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.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 _0x50cf2e,Command as _0x4572c5}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x9aaadb,IconGooglePhotos as _0x7e4aae,IconGoogleDrive as _0x1fec1b,IconFacebook as _0x5a20ca,IconDropbox as _0x389166,IconUploadcareLink as _0x1b49ff,IconUploadcareImageUpload as _0x2fa7d5,IconError as et,IconUploadcareImageEdit as _0x3b8595}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xe906c,MenuBarMenuListItemButtonView as _0x5d371d,View as _0x28c73f,FocusCycler as _0x27d96c,Dialog as _0x4a24e3,DialogViewPosition as _0x15aff8,SpinnerView as _0x378d5f,IconView as at,Notification as _0x37cbd4}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x8439e5,DomEmitterMixin as _0x590b07,global as _0x142ccf,getAncestors as _0x28c87a,ObservableMixin as _0x53f200,createElement as _0x5b2d50,uid as _0x130bac}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x455d1f}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x15bb8a,info as _0x2500a4}from'@uploadcare/upload-client';import*as _0x4be3ec from'@uploadcare/file-uploader';var o=function(_0x2e5187){return _0x2e5187['Local']='local',_0x2e5187['URL']='url',_0x2e5187['Dropbox']='dropbox',_0x2e5187['GDrive']='gdrive',_0x2e5187['Facebook']='facebook',_0x2e5187['GPhotos']='gphotos',_0x2e5187['OneDrive']='onedrive',_0x2e5187;}({});function _(_0x550451,_0x10b02b,_0x5bd560){const t=_0x550451['t'],_0x1b1302=_0x550451['t'];switch(_0x10b02b){case o['Local']:return{'text':_0x1b1302('Insert'===_0x5bd560?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1b1302('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x5bd560?_0x1b1302('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1b1302('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x5bd560?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x5bd560?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x5bd560?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x5bd560?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x5bd560?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x10b02b;}}class e extends _0x50cf2e{['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 _0x6fd507=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3945cc;for(const _0x251b73 in _0x6fd507){const _0x1efeb3=_0x251b73,_0x1b68ac=_0x6fd507[_0x1efeb3];if('uploadcareLicenseKeyValid'==_0x1b68ac||'uploadcareLicenseKeyInvalid'==_0x1b68ac||'uploadcareLicenseKeyExpired'==_0x1b68ac||'uploadcareLicenseKeyDomainLimit'==_0x1b68ac||'uploadcareLicenseKeyNotAllowed'==_0x1b68ac||'uploadcareLicenseKeyEvaluationLimit'==_0x1b68ac||'uploadcareLicenseKeyTrialLimit'==_0x1b68ac||'uploadcareLicenseKeyUsageLimit'==_0x1b68ac){delete _0x6fd507[_0x1efeb3],_0x3945cc=_0x1b68ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3945cc&&_0x6fd507['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3945cc&&_0x6fd507['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3945cc&&_0x6fd507['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3945cc&&_0x6fd507['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3945cc&&_0x6fd507['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3945cc&&_0x6fd507['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3945cc&&_0x6fd507['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2cc52c}=this,_0x3f6bc6=_0x2cc52c['commands']['get']('uploadcare');if(!_0x3f6bc6)return;const _0x1f9e47=this['_normalizeConfigSourceList'](_0x2cc52c['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x157bbc,_0x2c1171)=>{const _0x4b18fc=this['_getIntegrationKey'](_0x2c1171['type']);return _0x157bbc[_0x4b18fc]||(_0x157bbc[_0x4b18fc]=[]),_0x157bbc[_0x4b18fc]['push'](_0x2c1171),_0x157bbc;},{});_0x2cc52c['plugins']['has']('ImageInsertUI')&&_0x2cc52c['commands']['get']('uploadcare')&&Object['entries'](_0x1f9e47)['forEach'](([_0x4e01df,_0x4cde42])=>{_0x2cc52c['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4e01df,'observable':()=>_0x3f6bc6,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4cde42),'formViewCreator':()=>this['_createDropdownButtons'](_0x4cde42),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4cde42),'override':'assetManager'!==_0x4e01df});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x52bfd1){const {locale:_0x30ffec}=this['editor'];return _0x52bfd1['map'](_0x29d8c4=>{const _0x156308=_(_0x30ffec,_0x29d8c4,'Insert');switch(_0x29d8c4){case o['Local']:return{'icon':_0x2fa7d5,'type':o['Local'],..._0x156308};case o['URL']:return{'icon':_0x1b49ff,'type':o['URL'],..._0x156308};case o['Dropbox']:return{'icon':_0x389166,'type':o['Dropbox'],..._0x156308};case o['Facebook']:return{'icon':_0x5a20ca,'type':o['Facebook'],..._0x156308};case o['GDrive']:return{'icon':_0x1fec1b,'type':o['GDrive'],..._0x156308};case o['GPhotos']:return{'icon':_0x7e4aae,'type':o['GPhotos'],..._0x156308};case o['OneDrive']:return{'icon':_0x9aaadb,'type':o['OneDrive'],..._0x156308};}});}['_getIntegrationKey'](_0x489b5b){switch(_0x489b5b){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x272761,_0x447c8f){const _0x3526d1=this['editor'],_0xeecc22=new _0x272761(_0x3526d1['locale']),_0x316c06=_0x3526d1['commands']['get']('uploadcare');return _0xeecc22['bind']('isEnabled')['to'](_0x316c06),_0xeecc22['on']('execute',()=>{_0x316c06['execute'](_0x447c8f);}),_0xeecc22;}['_createToolbarButton'](_0x2cf352){const {locale:_0x53e77c}=this['editor'],_0x3b8cf2=this['editor']['plugins']['get']('ImageInsertUI'),_0x5962c7=_0x2cf352[0x0],_0x20e32f=this['_createButton'](_0xe906c,_0x5962c7['type']);return _0x20e32f['icon']=_0x5962c7['icon'],_0x20e32f['bind']('label')['to'](_0x3b8cf2,'isImageSelected',_0x5624af=>_(_0x53e77c,_0x5962c7['type'],_0x5624af?'Replace':'Insert')['text']),_0x20e32f['tooltip']=!0x0,_0x20e32f;}['_createDropdownButtons'](_0x5a492f){const {locale:_0xe53a1}=this['editor'],_0x2555bd=this['editor']['plugins']['get']('ImageInsertUI');return _0x5a492f['map'](_0x103f2d=>{const _0x1dc937=this['_createButton'](_0xe906c,_0x103f2d['type']);return _0x1dc937['withText']=!0x0,_0x1dc937['icon']=_0x103f2d['icon'],_0x1dc937['bind']('label')['to'](_0x2555bd,'isImageSelected',_0x35bbe3=>_(_0xe53a1,_0x103f2d['type'],_0x35bbe3?'Replace':'Insert')['text']),_0x1dc937;});}['_createMenuBarButtons'](_0x35f141){return _0x35f141['map'](_0x41e5ca=>{const _0x5bea9c=this['_createButton'](_0x5d371d,_0x41e5ca['type']);return _0x5bea9c['icon']=_0x41e5ca['icon'],_0x5bea9c['label']=_0x41e5ca['shortText'],_0x5bea9c;});}}class q extends _0x28c73f{['focusTracker'];['focusCycler'];constructor(_0x375b8d){super(_0x375b8d),this['focusTracker']=new _0x8439e5(),this['focusCycler']=new _0x27d96c({'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 S extends q{constructor(_0x5e8dad){super(_0x5e8dad),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'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x4fb05c,_0x406703){const _0x24d2dd=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x1be1ca=>_0x1be1ca<=_0x406703)['map'](_0x1dde77=>_0x4fb05c['replace'](/\/$/,'')+'/-/resize/'+_0x1dde77+'x/\x20'+_0x1dde77+'w');return{'imageFallbackUrl':_0x4fb05c,'imageSources':[{'srcset':_0x24d2dd['join'](',\x20'),'sizes':'(max-width:\x20'+_0x406703+'px)\x20100vw,\x20'+_0x406703+'px','type':'image/webp'}]};}function A(_0xd9558b,_0xfbfa6c,_0x328fbc){const _0x4a6236=_0xd9558b['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4a6236?parseInt(_0x4a6236[0x1],0xa):_0xfbfa6c,'height':_0x4a6236?parseInt(_0x4a6236[0x2],0xa):_0x328fbc};}function m(_0x1b3d7d,_0x4b12ca){const _0x27acdd=Object['create'](_0x590b07),_0xd8b0d5=_0x1b3d7d['plugins']['get']('ImageUtils'),_0x37f037=_0x1b3d7d['editing']['mapper']['toViewElement'](_0x4b12ca),_0x5398f9=_0xd8b0d5['findViewImgElement'](_0x37f037),_0x1fd987=_0x1b3d7d['editing']['view']['domConverter']['viewToDom'](_0x5398f9),_0x1076a4=_0x4b12ca['getAttribute']('width'),_0x4b3a12=_0x4b12ca['getAttribute']('height'),_0x272ebc='image-processing';_0x1b3d7d['editing']['view']['change'](_0x2e5f98=>{_0x2e5f98['addClass'](_0x272ebc,_0x37f037),_0x2e5f98['setStyle']('aspect-ratio',_0x1076a4+'/'+_0x4b3a12,_0x5398f9);}),_0x27acdd['listenTo'](_0x1fd987,'load',()=>{_0x27acdd['stopListening'](_0x1fd987,'load'),_0x1b3d7d['editing']['view']['change'](_0x58d294=>{_0x58d294['removeClass'](_0x272ebc,_0x37f037),_0x58d294['removeStyle']('aspect-ratio',_0x5398f9);});});}function R(_0x42514a){if(Array['isArray'](_0x42514a)){const _0x1d4a01=_0x42514a['map'](R);return _0x20b005=>_0x1d4a01['some'](_0x3244b5=>_0x3244b5(_0x20b005));}if('origin'==_0x42514a){const _0x2ab78a=_0x142ccf['window']['location']['origin'];return _0x69de71=>new URL(_0x69de71,_0x142ccf['document']['baseURI'])['origin']==_0x2ab78a;}return'function'==typeof _0x42514a?_0x42514a:_0x42514a instanceof RegExp?_0x1257f2=>!(!_0x1257f2['match'](_0x42514a)&&!_0x1257f2['replace'](/^https?:\/\//,'')['match'](_0x42514a)):()=>!0x1;}function F(_0x5af80a,_0x412491){return _0x28c87a(_0x5af80a['target'])['includes'](_0x412491);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x53f200(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2140c1,_0x3d1c3b,_0x11e3dc){super(),this['_editor']=_0x2140c1,this['_editing']=_0x3d1c3b,this['_dialog']=_0x2140c1['plugins']['get'](_0x4a24e3),this['_api']=_0x3d1c3b['ctxElement']['getAPI'](),this['_type']=_0x11e3dc,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:_0x388cdd,model:_0xcc6e22}=this['_editor'],_0x485a24=_0xcc6e22['document']['selection']['getSelectedElement'](),_0x275154=_0x485a24&&(_0x485a24['is']('element','imageBlock')||_0x485a24['is']('element','imageInline'));this['_formView']=new S(_0x388cdd),this['_dialog']['show']({'id':'uploadCare','icon':_0x2fa7d5,'title':_(_0x388cdd,this['_type'],_0x275154?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x15aff8['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x10a7a8=>!F(_0x10a7a8,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x306cdf}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x20d837=>{const _0x169f6c=_0x306cdf['length'];for(const _0x5dcbd2 of _0x306cdf){const _0x51fea5=_0x5dcbd2===_0x306cdf[_0x169f6c-0x1],{cdnUrl:_0x556298,fileInfo:_0x350e20}=_0x5dcbd2;if(!_0x556298||!_0x350e20)continue;const {width:_0x2fe09f,height:_0x12e433}=_0x350e20['imageInfo'],_0x3d7129=A(_0x556298,_0x2fe09f,_0x12e433),_0x4be2fb=E(_0x556298,_0x3d7129['width']),_0x544703={'id':_0x350e20['uuid'],'type':'image','attributes':{'imageDimension':_0x3d7129,..._0x4be2fb}};this['_insertAsset'](_0x544703,_0x51fea5,_0x20d837);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x26ef39=>{'idle'===_0x26ef39['detail']['status']&&!_0x26ef39['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4ff345,_0x18844d,_0x4a37aa){const _0x1f180a=this['_editor']['model']['document']['selection'],_0x4c2cd0=_0x1f180a['getSelectedElement'](),_0xd85ba6=!(!_0x4c2cd0||!_0x4c2cd0['is']('element','imageInline'));_0x4a37aa['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4ff345,_0xd85ba6),_0x18844d||_0x4a37aa['setSelection'](_0x1f180a['getLastPosition']());}['_insertImage'](_0xfae30a,_0x3cecaa){const _0x3fe5f0=this['_editor'],{imageDimension:_0x29b9f1,imageFallbackUrl:_0x2f1390,imageSources:_0x28c593}=_0xfae30a['attributes'];_0x3fe5f0['execute']('insertImage',{'imageType':_0x3cecaa?'imageInline':null,'source':{'uploadcareImageId':_0xfae30a['id'],'src':_0x2f1390,'sources':_0x28c593,..._0x29b9f1}});}}class n extends _0x4572c5{['_editing'];['_controller']=null;static get['requires'](){return[_0x4a24e3,i];}constructor(_0x59ea6b){super(_0x59ea6b),this['_editing']=_0x59ea6b['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4ff326){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x4ff326);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x55fff1,publicKey:_0x891255,signal:_0x2701d0,onProgress:_0x540333}){return _0x15bb8a(_0x55fff1,{'publicKey':_0x891255,'store':'auto','signal':_0x2701d0,'onProgress':_0x540333});}static['getInfo'](_0x35018c,_0x4439e2){return _0x2500a4(_0x35018c,_0x4439e2);}}class p extends _0x50cf2e{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x455d1f,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2a9ec2=this['editor'];if(!!!_0x2a9ec2['config']['get']('uploadcare'))return;_0x2a9ec2['plugins']['get'](_0x455d1f)['createUploadAdapter']=_0x340a48=>new x(_0x340a48,_0x2a9ec2),_0x2a9ec2['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x27a2c3,{imageElement:_0x2744ed,data:_0x231fea})=>{_0x2a9ec2['model']['change'](_0x5df544=>{_0x5df544['setAttribute']('uploadcareImageId',_0x231fea['uploadcareImageId'],_0x2744ed);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x592a98,_0x4dcd6e){this['loader']=_0x592a98,this['editor']=_0x4dcd6e,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x9e1ee8=this['editor']['config']['get']('uploadcare.pubkey'),_0x44cde9=await this['loader']['file'];return C['upload']({'file':_0x44cde9,'publicKey':_0x9e1ee8,'signal':this['controller']['signal'],'onProgress':_0x1cc216=>{_0x1cc216&&_0x1cc216['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1cc216['value']);}})['then'](async _0x1e7101=>{const {imageFallbackUrl:_0x5ab58a,imageSources:_0x5517af}=E(_0x1e7101['cdnUrl'],_0x1e7101['imageInfo']['width']);return{'uploadcareImageId':_0x1e7101['uuid'],'default':_0x5ab58a,'sources':_0x5517af};})['catch'](()=>{const _0x3b5c3b=t('Cannot\x20upload\x20file:')+('\x20'+_0x44cde9['name']+'.');return Promise['reject'](_0x3b5c3b);});}['abort'](){this['controller']['abort']();}}class i extends _0x50cf2e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x4a24e3];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0xa6e4b5=this['editor'];_0xa6e4b5['commands']['add']('uploadcare',new n(_0xa6e4b5));}['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 _0x2c6da6=_0x142ccf['document']['querySelector']('input[uploadcare-file-input]');_0x2c6da6&&_0x2c6da6['remove']();}),async function(_0x5bdff0){const _0x205d6b=_0x5b7fbf([0x34,0x4f,0x33,0x6a,0x65,0x47,0x4a,0x4c,0x61,0x56,0x4d,0x52,0x57,0x6b,0x6c,0x39,0x35,0x48,0x6d,0x4b,0x37,0x59,0x70,0x6f,0x63,0x78,0x49,0x30,0x54,0x58,0x32,0x73,0x68,0x31,0x44,0x41,0x4e,0x43,0x76,0x66,0x55,0x53,0x50,0x51,0x46,0x36,0x75,0x69,0x7a,0x79,0x6e,0x77,0x67,0x42,0x71,0x62,0x45,0x38,0x5a,0x64,0x74,0x72]),_0x2c24a5=0x7a518d21,_0x5a954c=0x7a56ed49^_0x2c24a5,_0x4d726e=window[_0x5b7fbf([0x44,0x61,0x74,0x65])][_0x5b7fbf([0x6e,0x6f,0x77])](),_0xa06bbd=_0x5bdff0[_0x5b7fbf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x598f06=new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5862bf=>{_0xa06bbd[_0x5b7fbf([0x6f,0x6e,0x63,0x65])](_0x5b7fbf([0x72,0x65,0x61,0x64,0x79]),_0x5862bf);}),_0x3c3066={[_0x5b7fbf([0x6b,0x74,0x79])]:_0x5b7fbf([0x45,0x43]),[_0x5b7fbf([0x75,0x73,0x65])]:_0x5b7fbf([0x73,0x69,0x67]),[_0x5b7fbf([0x63,0x72,0x76])]:_0x5b7fbf([0x50,0x2d,0x32,0x35,0x36]),[_0x5b7fbf([0x78])]:_0x5b7fbf([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]),[_0x5b7fbf([0x79])]:_0x5b7fbf([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]),[_0x5b7fbf([0x61,0x6c,0x67])]:_0x5b7fbf([0x45,0x53,0x32,0x35,0x36])},_0x1a2309=_0xa06bbd[_0x5b7fbf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5b7fbf([0x67,0x65,0x74])](_0x5b7fbf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2af6bf(){let _0x4e70b9,_0x4a02eb=null,_0x12768f=null;try{if(_0x1a2309==_0x5b7fbf([0x47,0x50,0x4c]))return _0x5b7fbf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4e70b9=_0x55d6c1(),!_0x4e70b9)return _0x5b7fbf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4e70b9[_0x5b7fbf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12768f=_0x191d22(_0x4e70b9[_0x5b7fbf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4e70b9[_0x5b7fbf([0x6a,0x74,0x69])])),await _0x23fe53()?_0x5e9ce0()?_0x5d449b()?_0x5b7fbf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x52011c()?(_0x4e70b9[_0x5b7fbf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b7fbf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4a02eb=_0x5c9312(_0x5b7fbf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4e70b9[_0x5b7fbf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b7fbf([0x74,0x72,0x69,0x61,0x6c])&&(_0x4a02eb=_0x5c9312(_0x5b7fbf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x54b70f()):_0x5b7fbf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5b7fbf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5b7fbf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xd3d713){return _0x5b7fbf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5d449b(){const _0x5f148b=[_0x5b7fbf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5b7fbf([0x74,0x72,0x69,0x61,0x6c])][_0x5b7fbf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e70b9[_0x5b7fbf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4d726e/0x3e8:0xe10*_0x5a954c;return _0x4e70b9[_0x5b7fbf([0x65,0x78,0x70])]<_0x5f148b;}function _0x5e9ce0(){const _0xc57eb6=_0x4e70b9[_0x5b7fbf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xc57eb6&&(!!_0xc57eb6[_0x5b7fbf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b7fbf([0x2a]))||!!_0xc57eb6[_0x5b7fbf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b7fbf([0x55,0x50,0x4c,0x43])));}function _0x52011c(){const _0x3e17a8=_0x4e70b9[_0x5b7fbf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3e17a8||0x0==_0x3e17a8[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x160fd6}=new URL(window[_0x5b7fbf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3e17a8[_0x5b7fbf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160fd6))return!0x0;const _0x2d2aed=_0x160fd6[_0x5b7fbf([0x73,0x70,0x6c,0x69,0x74])](_0x5b7fbf([0x2e]));return _0x3e17a8[_0x5b7fbf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39cde5=>_0x39cde5[_0x5b7fbf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b7fbf([0x2a])))[_0x5b7fbf([0x6d,0x61,0x70])](_0x31b524=>_0x31b524[_0x5b7fbf([0x73,0x70,0x6c,0x69,0x74])](_0x5b7fbf([0x2e])))[_0x5b7fbf([0x73,0x6f,0x6d,0x65])](_0x57eb17=>_0x2d2aed[_0x5b7fbf([0x65,0x76,0x65,0x72,0x79])]((_0x2a9fe1,_0x27352f)=>_0x57eb17[_0x27352f]===_0x2a9fe1||_0x57eb17[_0x27352f]===_0x5b7fbf([0x2a])));}function _0x54b70f(){return _0x4a02eb&&_0x12768f?new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b9c71,_0x301345)=>{_0x4a02eb[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x5b9c71,_0x301345),_0x12768f[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x1031b0=>{_0x1031b0!=_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64])&&_0x5b9c71(_0x1031b0);},_0x301345);}):_0x4a02eb||_0x12768f||_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x191d22(_0x4c774d,_0x5f3220){return new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f52a7=>{if(_0x2ad99e())return _0x2f52a7(_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64]));_0x57f639(),_0xa06bbd[_0x5b7fbf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5b7fbf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5babd1=!0x1;const _0x101e32=_0x130bac();function _0x173c12(_0x300b84){return!!_0x300b84&&(typeof _0x300b84===_0x5b7fbf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x300b84===_0x5b7fbf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x300b84[_0x5b7fbf([0x74,0x68,0x65,0x6e])]===_0x5b7fbf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x300b84[_0x5b7fbf([0x63,0x61,0x74,0x63,0x68])]===_0x5b7fbf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5ed99d(_0x12042d){_0x847894(_0x12042d)[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x588be6=>{if(!_0x588be6||_0x588be6[_0x5b7fbf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5b7fbf([0x6f,0x6b]))return _0x5b7fbf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x285aad(_0x104aaa(_0x101e32+_0x5f3220))!=_0x588be6[_0x5b7fbf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5b7fbf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64]);})[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x578473=>(_0x1cd7f3(),_0x578473),()=>{const _0x503c71=_0x33fc10();return null==_0x503c71?(_0x1cd7f3(),_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64])):_0x5b7fbf(_0x4d726e-_0x503c71>(0x5e5d0921^_0x2c24a5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x2f52a7)[_0x5b7fbf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2f52a7(_0x5b7fbf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5db847=0x7a6763a1^_0x2c24a5;function _0x1cd7f3(){const _0x3bd147=_0x5b7fbf([0x6c,0x6c,0x63,0x74,0x2d])+_0x285aad(_0x104aaa(_0x4c774d)),_0x2a4c3f=_0x128f07(_0x285aad(window[_0x5b7fbf([0x4d,0x61,0x74,0x68])][_0x5b7fbf([0x63,0x65,0x69,0x6c])](_0x4d726e/_0x5db847)));window[_0x5b7fbf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b7fbf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3bd147,_0x2a4c3f);}function _0x33fc10(){const _0x3cd40b=_0x5b7fbf([0x6c,0x6c,0x63,0x74,0x2d])+_0x285aad(_0x104aaa(_0x4c774d)),_0x4f4da4=window[_0x5b7fbf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b7fbf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3cd40b);return _0x4f4da4?window[_0x5b7fbf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x128f07(_0x4f4da4),0x10)*_0x5db847:null;}function _0x847894(_0x4fa9a9){return new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x61115,_0x114437)=>{_0x4fa9a9[_0x5b7fbf([0x74,0x68,0x65,0x6e])](_0x61115,_0x114437),window[_0x5b7fbf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x114437,0x7a5059e1^_0x2c24a5);});}}_0xa06bbd[_0x5b7fbf([0x6f,0x6e])](_0x5b7fbf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x14c0d0,_0x52c30f)=>{if(_0x52c30f[0x0]!=_0x4c774d)return _0x2f52a7(_0x5b7fbf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x52c30f[0x1]={..._0x52c30f[0x1],[_0x5b7fbf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x101e32};},{[_0x5b7fbf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b7fbf([0x68,0x69,0x67,0x68])}),_0xa06bbd[_0x5b7fbf([0x6f,0x6e])](_0x5b7fbf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2c168f=>{_0x173c12(_0x2c168f[_0x5b7fbf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5babd1=!0x0,_0x5ed99d(_0x2c168f[_0x5b7fbf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5b7fbf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b7fbf([0x6c,0x6f,0x77])}),_0x598f06[_0x5b7fbf([0x74,0x68,0x65,0x6e])](()=>{_0x5babd1||_0x2f52a7(_0x5b7fbf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ad99e(){return _0xa06bbd[_0x5b7fbf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b7fbf([0x76,0x69,0x65,0x77])][_0x5b7fbf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5b7fbf([0x61,0x75,0x74,0x6f]);}function _0x57f639(){_0xa06bbd[_0x5b7fbf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b7fbf([0x76,0x69,0x65,0x77])][_0x5b7fbf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b7fbf([0x61,0x75,0x74,0x6f]);}}function _0x5c9312(_0x10d3c5){const _0x47a450=[new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25f67b=>setTimeout(_0x25f67b,0x7a58b3ed^_0x2c24a5)),_0x598f06[_0x5b7fbf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1025d8=>{let _0x465151=0x0;_0xa06bbd[_0x5b7fbf([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b7fbf([0x6f,0x6e])](_0x5b7fbf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x568945,_0x6c30f7)=>{_0x6c30f7[0x0][_0x5b7fbf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x465151++,_0x465151==(0x7a518cd9^_0x2c24a5)&&(_0x1025d8(),_0x568945[_0x5b7fbf([0x6f,0x66,0x66])]());});}))];return window[_0x5b7fbf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b7fbf([0x72,0x61,0x63,0x65])](_0x47a450)[_0x5b7fbf([0x74,0x68,0x65,0x6e])](()=>_0x10d3c5);}async function _0x206c59(){await _0x598f06,_0xa06bbd[_0x5b7fbf([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b7fbf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4f9d46,_0xa06bbd[_0x5b7fbf([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b7fbf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4f9d46,_0xa06bbd[_0x5b7fbf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5b7fbf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x362605(_0x4acb2d){const _0x28c45d=_0xd867d0();_0xa06bbd[_0x28c45d]=_0x5b7fbf([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4acb2d,_0x4acb2d!=_0x5b7fbf([0x56,0x61,0x6c,0x69,0x64])&&_0x206c59();}function _0xd867d0(){const _0x18e7d0=window[_0x5b7fbf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5b7fbf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5b7fbf([0x6e,0x6f,0x77])]())[_0x5b7fbf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5b7fbf([0x2e]),'');let _0x3dd952=_0x5b7fbf([0x4f]);for(let _0x1fc33f=0x0;_0x1fc33f<_0x18e7d0[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fc33f+=0x2){let _0xb493c3=window[_0x5b7fbf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18e7d0[_0x5b7fbf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1fc33f,_0x1fc33f+0x2));_0xb493c3>=_0x205d6b[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xb493c3-=_0x205d6b[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3dd952+=_0x205d6b[_0xb493c3];}return _0x3dd952;}function _0x55d6c1(){const _0x31c0f6=_0x1a2309[_0x5b7fbf([0x73,0x70,0x6c,0x69,0x74])](_0x5b7fbf([0x2e]));if(0x3!=_0x31c0f6[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3624cf(_0x31c0f6[0x1]);function _0x3624cf(_0x4e51da){const _0x188281=_0x5507be(_0x4e51da);return _0x188281&&_0xa8101e()?_0x188281:null;function _0xa8101e(){const _0x1f11d8=_0x188281[_0x5b7fbf([0x6a,0x74,0x69])],_0x4bef30=window[_0x5b7fbf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f11d8[_0x5b7fbf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f11d8[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x483f35={..._0x188281,[_0x5b7fbf([0x6a,0x74,0x69])]:_0x1f11d8[_0x5b7fbf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1f11d8[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x483f35[_0x5b7fbf([0x76,0x63])],_0x104aaa(_0x483f35)==_0x4bef30;}}}async function _0x23fe53(){let _0x15460c=!0x0;try{const _0x26e5c6=_0x1a2309[_0x5b7fbf([0x73,0x70,0x6c,0x69,0x74])](_0x5b7fbf([0x2e])),[_0x320bd4,_0x4b0689,_0x34793c]=_0x26e5c6;return _0x294b53(_0x320bd4),await _0xc5d55(_0x320bd4,_0x4b0689,_0x34793c),_0x15460c;}catch(_0x45baae){return!0x1;}function _0x294b53(_0x3f8e92){const _0x3bf0ab=_0x5507be(_0x3f8e92);_0x3bf0ab&&_0x3bf0ab[_0x5b7fbf([0x61,0x6c,0x67])]==_0x5b7fbf([0x45,0x53,0x32,0x35,0x36])||(_0x15460c=!0x1);}async function _0xc5d55(_0x2e41b1,_0x2e1036,_0x39a4e6){const _0x44f091=window[_0x5b7fbf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5b7fbf([0x66,0x72,0x6f,0x6d])](_0x8a3ba9(_0x39a4e6),_0x2ab78b=>_0x2ab78b[_0x5b7fbf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x163d96=new window[(_0x5b7fbf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5b7fbf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2e41b1+_0x5b7fbf([0x2e])+_0x2e1036),_0x1a9c85=window[_0x5b7fbf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5b7fbf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1a9c85)return;const _0x5b1537=await _0x1a9c85[_0x5b7fbf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5b7fbf([0x6a,0x77,0x6b]),_0x3c3066,{[_0x5b7fbf([0x6e,0x61,0x6d,0x65])]:_0x5b7fbf([0x45,0x43,0x44,0x53,0x41]),[_0x5b7fbf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5b7fbf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5b7fbf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1a9c85[_0x5b7fbf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5b7fbf([0x6e,0x61,0x6d,0x65])]:_0x5b7fbf([0x45,0x43,0x44,0x53,0x41]),[_0x5b7fbf([0x68,0x61,0x73,0x68])]:{[_0x5b7fbf([0x6e,0x61,0x6d,0x65])]:_0x5b7fbf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5b1537,_0x44f091,_0x163d96)||(_0x15460c=!0x1);}}function _0x5507be(_0x16b1f2){return _0x16b1f2[_0x5b7fbf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5b7fbf([0x65,0x79]))?JSON[_0x5b7fbf([0x70,0x61,0x72,0x73,0x65])](_0x8a3ba9(_0x16b1f2)):null;}function _0x8a3ba9(_0x342373){return window[_0x5b7fbf([0x61,0x74,0x6f,0x62])](_0x342373[_0x5b7fbf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5b7fbf([0x2b]))[_0x5b7fbf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5b7fbf([0x2f])));}function _0x104aaa(_0x28fe71){let _0x19459c=0x1505;function _0x369c42(_0x5efbd9){for(let _0x3074ed=0x0;_0x3074ed<_0x5efbd9[_0x5b7fbf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3074ed++){const _0x34117a=_0x5efbd9[_0x5b7fbf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3074ed);_0x19459c=(_0x19459c<<0x5)+_0x19459c+_0x34117a,_0x19459c&=_0x19459c;}}function _0x35d927(_0x58468c){Array[_0x5b7fbf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x58468c)?_0x58468c[_0x5b7fbf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x35d927):_0x58468c&&typeof _0x58468c==_0x5b7fbf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5b7fbf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x58468c)[_0x5b7fbf([0x73,0x6f,0x72,0x74])]()[_0x5b7fbf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1dd633,_0x2cff95])=>{_0x369c42(_0x1dd633),_0x35d927(_0x2cff95);}):_0x369c42(window[_0x5b7fbf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x58468c));}return _0x35d927(_0x28fe71),_0x19459c>>>0x0;}function _0x285aad(_0x4280e8){return _0x4280e8[_0x5b7fbf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5b7fbf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5b7fbf([0x30]));}function _0x128f07(_0x199b59){return _0x199b59[_0x5b7fbf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5b7fbf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5b7fbf([0x6a,0x6f,0x69,0x6e])]('');}function _0x4f9d46(){}function _0x5b7fbf(_0x2166a2){return _0x2166a2['map'](_0x32dc09=>String['fromCharCode'](_0x32dc09))['join']('');}_0x362605(await _0x2af6bf());}(this);}['_initSchema'](){const _0x95c2c3=this['editor']['model']['schema'];_0x95c2c3['isRegistered']('imageBlock')&&_0x95c2c3['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x95c2c3['isRegistered']('imageInline')&&_0x95c2c3['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5472b8=this['editor'];_0x5472b8['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5472b8['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x51f968=>_0x51f968['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2d6cbf=_0x5472b8['commands']['get']('replaceImageSource');_0x2d6cbf&&this['listenTo'](_0x2d6cbf,'cleanupImage',(_0x66036f,[_0x47cf63,_0x30691a])=>{_0x47cf63['removeAttribute']('uploadcareImageId',_0x30691a);});}['_initConfig'](){const _0x169877=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1e0fad=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x5b2d50(_0x142ccf['document'],'uc-config',{..._0x169877,'pubkey':_0x1e0fad,'ctx-name':'uploader','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']=_0x5ce265=>{if('closeMax'==_0x5ce265)return'#uc-icon-arrow-down';},_0x142ccf['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x5b2d50(_0x142ccf['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x142ccf['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1f4518=this['editor']['commands']['get']('insertImage');_0x1f4518&&this['listenTo'](_0x1f4518,'execute',()=>{const _0xb90d59=this['editor']['model']['document']['selection']['getSelectedElement']();_0xb90d59&&_0xb90d59['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0xb90d59);});});const _0x3d943f=this['editor']['commands']['get']('uploadcareImageReplace');_0x3d943f&&this['listenTo'](_0x3d943f,'execute',()=>{const _0x131723=this['editor']['model']['document']['selection']['getSelectedElement']();_0x131723&&_0x131723['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x131723);});});}}class u extends _0x50cf2e{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34bee0){super(_0x34bee0),_0x34bee0['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x4be3ec['defineComponents'](_0x4be3ec);}}class ta extends _0x28c73f{constructor(_0x5a3bd0){super(_0x5a3bd0);const t=_0x5a3bd0['t'],_0x316f64=this['bindTemplate'],_0x170b3b=new _0x378d5f();_0x170b3b['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':[_0x170b3b,{'text':_0x316f64['to']('imageUploadProgress',_0x8c5fe8=>t('Loading\x20image...')+'\x20('+(_0x8c5fe8||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 rt extends _0x28c73f{constructor(_0x13598d){super(_0x13598d);const t=_0x13598d['t'];this['set']('errorType',null);const _0x27dbdb=new _0xe906c(_0x13598d);_0x27dbdb['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x27dbdb['withText']=!0x0,_0x27dbdb['class']='ck-button-action',_0x27dbdb['on']('execute',()=>{this['fire']('retry');}),_0x27dbdb['bind']('isVisible')['to'](this,'errorType',_0x513ebb=>'NotFound'!==_0x513ebb);const _0x53b0ff=new at();_0x53b0ff['content']=et,_0x53b0ff['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5addc2=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':[_0x53b0ff,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5addc2['to']('errorType',_0x5ed680=>t('NotFound'!==_0x5ed680?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x27dbdb]},{'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 tt extends _0x28c73f{constructor(_0xba4297,_0x1c3128){super(_0xba4297);const _0x3f3699=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1c3128,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3f3699['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x13450c,_0x2fd902,_0x2af5cd){super(_0x13450c),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x13450c),this['_errorView']=new rt(_0x13450c),this['_editingView']=new tt(_0x13450c,_0x2af5cd),this['_focusableView']=new _0x28c73f(_0x13450c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2fd902),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'],_0x156c18=>{this['_addUploadcareImageEditorListeners'](_0x156c18);});}),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'](_0x3750cb,_0x2b3a8f){const _0xea08e2='uc-cloud-image-editor',_0x58446e=_0x3750cb['querySelector'](_0xea08e2);if(_0x58446e)return _0x2b3a8f(_0x58446e);const _0x20326e=new MutationObserver(_0x188351=>{const _0x59703e=_0x188351['filter'](_0x13874b=>_0x13874b['target']===_0x3750cb&&_0x13874b['addedNodes']['length']>0x0&&_0x13874b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xea08e2);_0x59703e['length']&&(_0x20326e['disconnect'](),_0x2b3a8f(_0x59703e[0x0]['addedNodes'][0x0]));});_0x20326e['observe'](_0x3750cb,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x26ad34){_0x26ad34['addEventListener']('apply',_0x2731de=>{this['fire']('apply',{'imageSrc':_0x2731de['detail']['cdnUrl']});}),_0x26ad34['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class O extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x53f200(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0xdacacd,_0xb90e21,_0x3102df){super(),this['_editor']=_0xdacacd,this['_dialog']=_0xb90e21,this['_imageElement']=_0x3102df,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 _0x2cb9e2=this['_imageElement'],_0x19e049=_0x2cb9e2['getAttribute']('uploadcareImageId'),_0x34dea0=_0x2cb9e2['getAttribute']('src');if(_0x19e049)await this['_loadImageInfo'](_0x19e049,_0x34dea0);else{if(this['_imageCache']['has'](_0x34dea0)){const _0x5d75c9=this['_imageCache']['get'](_0x34dea0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5d75c9['url'],this['imageDimension']=_0x5d75c9['dimension'],this['imageId']=_0x5d75c9['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x11e98b}=this['_editor'],t=_0x11e98b['t'],_0x27954e=new Z(_0x11e98b,this['imageStatus'],this['_attributes']);_0x27954e['bind']('status')['to'](this,'imageStatus'),_0x27954e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x27954e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x27954e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x27954e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3b8595,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x27954e,'position':_0x15aff8['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x27954e['focus']();},'onHide':()=>{_0x27954e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2257e4=>!F(_0x2257e4,_0x27954e['element'])}});}['_loadImageInfo'](_0x1674ee,_0x346ba8){return C['getInfo'](_0x1674ee,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x4dbc1e=>{const {width:_0x12b4ed,height:_0x46ea8f}=_0x4dbc1e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x346ba8,this['imageDimension']={'width':_0x12b4ed,'height':_0x46ea8f},this['imageId']=_0x1674ee;})['catch'](_0x72feba=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x72feba['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x28f957,_0x3c59be){return this['_getImageAsFile'](_0x28f957)['then'](_0x2a1545=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x3c59be['signal'],'file':_0x2a1545,'onProgress':_0x3311c5=>{_0x3311c5&&_0x3311c5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3311c5['value']));}}))['then'](_0x3694ec=>{const {width:_0xd611d7,height:_0x378ea1}=_0x3694ec['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3694ec['cdnUrl'],this['imageDimension']={'width':_0xd611d7,'height':_0x378ea1},this['imageId']=_0x3694ec['uuid'],this['imageUploadProgress']=null;const _0x3cf657=_0x28f957['getAttribute']('src');this['_imageCache']['set'](_0x3cf657,{'id':_0x3694ec['uuid'],'url':_0x3694ec['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1a9e9d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1a9e9d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x16be84,_0x42cb7c){_0x16be84['on']('apply',(_0x124b15,_0x40534d)=>{this['_replaceImage'](_0x42cb7c,_0x40534d['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x16be84['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x16be84['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x361e32,_0x5dc35b,_0x400dfa){const _0x431a1e=this['_editor'],{width:_0x37e6bb,height:_0x39ce57}=A(_0x5dc35b,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1e5311,imageSources:_0x34f9d9}=E(_0x5dc35b,_0x37e6bb);_0x431a1e['model']['change'](_0x3679e8=>{if('$graveyard'===_0x361e32['root']['rootName']){_0x431a1e['execute']('insertImage',{'imageType':_0x361e32['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x361e32['getAttributes']()),'uploadcareImageId':_0x400dfa,'src':_0x1e5311,'sources':_0x34f9d9,'width':_0x37e6bb,'height':_0x39ce57}});const _0x2133b6=_0x361e32['getChildren']();_0x361e32=_0x431a1e['model']['document']['selection']['getSelectedElement']();for(const _0x553744 of _0x2133b6)_0x3679e8['append'](_0x3679e8['cloneElement'](_0x553744),_0x361e32);}else _0x3679e8['setSelection'](_0x361e32,'on'),_0x431a1e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x361e32['getAttributes']()),'uploadcareImageId':_0x400dfa,'src':_0x1e5311,'sources':_0x34f9d9,'width':_0x37e6bb,'height':_0x39ce57},_0x361e32);_0x3679e8['setSelection'](_0x361e32,'on');});}async['_getImageAsFile'](_0x5e3cc0){const _0x4dab41=_0x142ccf['window'],_0x2049d7=_0x142ccf['document']['location']['href'],_0xd7602e=new _0x4dab41['URL'](_0x5e3cc0['getAttribute']('src'),_0x2049d7);if('data:'===_0xd7602e['protocol']){const _0x4241be=_0xd7602e['href']['split'](','),_0x4dae8a=_0x4241be[0x0]['match'](/:(.*?);/)[0x1],_0x43c750=_0x4dae8a['split']('/')[0x1],_0x15e2ff=_0x4dab41['atob'](_0x4241be[_0x4241be['length']-0x1]);let _0xd93a61=_0x15e2ff['length'];const _0xe562ab=new _0x4dab41['Uint8Array'](_0xd93a61);for(;_0xd93a61--;)_0xe562ab[_0xd93a61]=_0x15e2ff['charCodeAt'](_0xd93a61);return new _0x4dab41['File']([_0xe562ab],'image.'+_0x43c750,{'type':_0x4dae8a});}const _0x1a592f=_0xd7602e['href']['split']('/'),_0x4c0027=_0x1a592f[_0x1a592f['length']-0x1],_0x54d20d=_0x4c0027['split']('.')[0x1];return _0x4dab41['fetch'](_0xd7602e['href'])['then'](_0x4c2219=>_0x4c2219['clone']()['blob']())['then'](_0x131dc9=>new _0x4dab41['File']([_0x131dc9],_0x4c0027,{'type':'image/'+_0x54d20d}));}}class V extends _0x4572c5{['imageEditController'];static get['requires'](){return[_0x4a24e3];}['_isEditable'];constructor(_0x5ebc3b){super(_0x5ebc3b),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xb2ee7b){const _0x43548c=R(_0xb2ee7b);return _0x4ff00d=>!(!_0x4ff00d||!_0x4ff00d['is']('element','imageBlock')&&!_0x4ff00d['is']('element','imageInline'))&&(!!_0x4ff00d['hasAttribute']('uploadcareImageId')||!!_0x4ff00d['hasAttribute']('src')&&_0x43548c(_0x4ff00d['getAttribute']('src')));}(_0x5ebc3b['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x34dd97=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x34dd97);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x13c800=this['editor']['model']['document']['selection']['getSelectedElement']();_0x13c800&&(_0x13c800['is']('element','imageBlock')||_0x13c800['is']('element','imageInline'))&&(this['imageEditController']=new O(this['editor'],this['editor']['plugins']['get'](_0x4a24e3),_0x13c800),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class X extends _0x4572c5{['refresh'](){const _0xc99ea=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0xc99ea&&(_0xc99ea['is']('element','imageBlock')||_0xc99ea['is']('element','imageInline')));}['execute'](_0x5b6782){const _0x5bd2f5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2b348e=>{_0x2b348e['setAttributes'](_0x5b6782,_0x5bd2f5),_0x2b348e['removeAttribute']('srcset',_0x5bd2f5),_0x2b348e['removeAttribute']('sizes',_0x5bd2f5);});}}class g extends _0x50cf2e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x37cbd4,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x50f2c3}=this;_0x50f2c3['commands']['add']('uploadcareImageEdit',new V(_0x50f2c3)),_0x50f2c3['commands']['add']('uploadcareImageReplace',new X(_0x50f2c3));}}class j extends _0x50cf2e{['_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 _0x4d44e1=this['editor'];_0x4d44e1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x35415a=>{const _0x18cdfc=_0x4d44e1['commands']['get']('uploadcareImageEdit'),_0x4801a9=new _0xe906c(_0x35415a),t=_0x35415a['t'];return _0x4801a9['set']({'icon':_0x3b8595,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4801a9['bind']('isEnabled')['to'](_0x18cdfc),_0x4801a9['bind']('isOn')['to'](_0x18cdfc,'isActive'),this['listenTo'](_0x4801a9,'execute',()=>{_0x4d44e1['execute']('uploadcareImageEdit'),_0x4d44e1['editing']['view']['focus']();}),_0x4801a9;}),this['_initConfig']();}['_initConfig'](){const _0x5637b1=_0x5b2d50(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5637b1),this['listenTo'](this['editor'],'destroy',()=>{_0x5637b1['remove']();});}}class P extends _0x50cf2e{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
|
|
23
|
+
import{Plugin as _0x328155,Command as _0x1f3b5f}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x24b79a,IconGooglePhotos as _0x590c32,IconGoogleDrive as _0x135de3,IconFacebook as _0x931e8,IconDropbox as _0x28680f,IconUploadcareLink as _0x2dce99,IconUploadcareImageUpload as _0x4d592c,IconError as et,IconUploadcareImageEdit as _0x1ef513}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x6dff8b,MenuBarMenuListItemButtonView as _0x4b846e,View as _0x29f688,FocusCycler as _0x269ba0,Dialog as _0x670ea3,DialogViewPosition as _0x325f72,SpinnerView as _0x312ac7,IconView as at,Notification as _0x1db5b7}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x1a9a9a,DomEmitterMixin as _0x65d795,global as _0x2d5cfa,getAncestors as _0x2a9c68,ObservableMixin as _0x54d9c5,createElement as _0x197b5d,uid as _0x2a39f4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x448963}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x309d8f,info as _0x207f05}from'@uploadcare/upload-client';import*as _0x4cf956 from'@uploadcare/file-uploader';var o=function(_0x22e1e6){return _0x22e1e6['Local']='local',_0x22e1e6['URL']='url',_0x22e1e6['Dropbox']='dropbox',_0x22e1e6['GDrive']='gdrive',_0x22e1e6['Facebook']='facebook',_0x22e1e6['GPhotos']='gphotos',_0x22e1e6['OneDrive']='onedrive',_0x22e1e6;}({});function _(_0x1fa29f,_0x303d03,_0x11d352){const t=_0x1fa29f['t'],_0x3f22be=_0x1fa29f['t'];switch(_0x303d03){case o['Local']:return{'text':_0x3f22be('Insert'===_0x11d352?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3f22be('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x11d352?_0x3f22be('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3f22be('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x11d352?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x11d352?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x11d352?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x11d352?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x11d352?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x303d03;}}class e extends _0x328155{['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 _0x41fe8d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x555826;for(const _0x597ed7 in _0x41fe8d){const _0x59036e=_0x597ed7,_0x527676=_0x41fe8d[_0x59036e];if('uploadcareLicenseKeyValid'==_0x527676||'uploadcareLicenseKeyInvalid'==_0x527676||'uploadcareLicenseKeyExpired'==_0x527676||'uploadcareLicenseKeyDomainLimit'==_0x527676||'uploadcareLicenseKeyNotAllowed'==_0x527676||'uploadcareLicenseKeyEvaluationLimit'==_0x527676||'uploadcareLicenseKeyTrialLimit'==_0x527676||'uploadcareLicenseKeyUsageLimit'==_0x527676){delete _0x41fe8d[_0x59036e],_0x555826=_0x527676,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x555826&&_0x41fe8d['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x555826&&_0x41fe8d['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x555826&&_0x41fe8d['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x555826&&_0x41fe8d['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x555826&&_0x41fe8d['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x555826&&_0x41fe8d['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x555826&&_0x41fe8d['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1fc30b}=this,_0x495176=_0x1fc30b['commands']['get']('uploadcare');if(!_0x495176)return;const _0x255b75=this['_normalizeConfigSourceList'](_0x1fc30b['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x27ddbb,_0x1a2b76)=>{const _0x27b780=this['_getIntegrationKey'](_0x1a2b76['type']);return _0x27ddbb[_0x27b780]||(_0x27ddbb[_0x27b780]=[]),_0x27ddbb[_0x27b780]['push'](_0x1a2b76),_0x27ddbb;},{});_0x1fc30b['plugins']['has']('ImageInsertUI')&&_0x1fc30b['commands']['get']('uploadcare')&&Object['entries'](_0x255b75)['forEach'](([_0x58aebb,_0x261038])=>{_0x1fc30b['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x58aebb,'observable':()=>_0x495176,'buttonViewCreator':()=>this['_createToolbarButton'](_0x261038),'formViewCreator':()=>this['_createDropdownButtons'](_0x261038),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x261038),'override':'assetManager'!==_0x58aebb});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4c5481){const {locale:_0x3674d0}=this['editor'];return _0x4c5481['map'](_0x46a000=>{const _0x39f5a1=_(_0x3674d0,_0x46a000,'Insert');switch(_0x46a000){case o['Local']:return{'icon':_0x4d592c,'type':o['Local'],..._0x39f5a1};case o['URL']:return{'icon':_0x2dce99,'type':o['URL'],..._0x39f5a1};case o['Dropbox']:return{'icon':_0x28680f,'type':o['Dropbox'],..._0x39f5a1};case o['Facebook']:return{'icon':_0x931e8,'type':o['Facebook'],..._0x39f5a1};case o['GDrive']:return{'icon':_0x135de3,'type':o['GDrive'],..._0x39f5a1};case o['GPhotos']:return{'icon':_0x590c32,'type':o['GPhotos'],..._0x39f5a1};case o['OneDrive']:return{'icon':_0x24b79a,'type':o['OneDrive'],..._0x39f5a1};}});}['_getIntegrationKey'](_0x2a7580){switch(_0x2a7580){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x2b2ab0,_0x15a3ef){const _0x203362=this['editor'],_0x3e6be7=new _0x2b2ab0(_0x203362['locale']),_0x57e358=_0x203362['commands']['get']('uploadcare');return _0x3e6be7['bind']('isEnabled')['to'](_0x57e358),_0x3e6be7['on']('execute',()=>{_0x57e358['execute'](_0x15a3ef);}),_0x3e6be7;}['_createToolbarButton'](_0x3c1560){const {locale:_0x1fb1b1}=this['editor'],_0x5659bb=this['editor']['plugins']['get']('ImageInsertUI'),_0x5b07d6=_0x3c1560[0x0],_0x4dbfaa=this['_createButton'](_0x6dff8b,_0x5b07d6['type']);return _0x4dbfaa['icon']=_0x5b07d6['icon'],_0x4dbfaa['bind']('label')['to'](_0x5659bb,'isImageSelected',_0x2a7511=>_(_0x1fb1b1,_0x5b07d6['type'],_0x2a7511?'Replace':'Insert')['text']),_0x4dbfaa['tooltip']=!0x0,_0x4dbfaa;}['_createDropdownButtons'](_0x1a32fb){const {locale:_0x3baf9e}=this['editor'],_0x993256=this['editor']['plugins']['get']('ImageInsertUI');return _0x1a32fb['map'](_0x597cc0=>{const _0x4741a3=this['_createButton'](_0x6dff8b,_0x597cc0['type']);return _0x4741a3['withText']=!0x0,_0x4741a3['icon']=_0x597cc0['icon'],_0x4741a3['bind']('label')['to'](_0x993256,'isImageSelected',_0xc9fea8=>_(_0x3baf9e,_0x597cc0['type'],_0xc9fea8?'Replace':'Insert')['text']),_0x4741a3;});}['_createMenuBarButtons'](_0x1ca3eb){return _0x1ca3eb['map'](_0x5e26b9=>{const _0x2fb5d1=this['_createButton'](_0x4b846e,_0x5e26b9['type']);return _0x2fb5d1['icon']=_0x5e26b9['icon'],_0x2fb5d1['label']=_0x5e26b9['shortText'],_0x2fb5d1;});}}class q extends _0x29f688{['focusTracker'];['focusCycler'];constructor(_0x27b80a){super(_0x27b80a),this['focusTracker']=new _0x1a9a9a(),this['focusCycler']=new _0x269ba0({'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 S extends q{constructor(_0x549a50){super(_0x549a50),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'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x1010b,_0x49c1c4){const _0x16957b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x7831c5=>_0x7831c5<=_0x49c1c4)['map'](_0x22cac=>_0x1010b['replace'](/\/$/,'')+'/-/resize/'+_0x22cac+'x/\x20'+_0x22cac+'w');return{'imageFallbackUrl':_0x1010b,'imageSources':[{'srcset':_0x16957b['join'](',\x20'),'sizes':'(max-width:\x20'+_0x49c1c4+'px)\x20100vw,\x20'+_0x49c1c4+'px','type':'image/webp'}]};}function A(_0x4cbbc4,_0x5c0126,_0x87368d){const _0x34c7fd=_0x4cbbc4['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x34c7fd?parseInt(_0x34c7fd[0x1],0xa):_0x5c0126,'height':_0x34c7fd?parseInt(_0x34c7fd[0x2],0xa):_0x87368d};}function m(_0x6f37f9,_0xb7a26b){const _0x22ef25=Object['create'](_0x65d795),_0x59696b=_0x6f37f9['plugins']['get']('ImageUtils'),_0xbef500=_0x6f37f9['editing']['mapper']['toViewElement'](_0xb7a26b),_0x4412da=_0x59696b['findViewImgElement'](_0xbef500),_0x5120b6=_0x6f37f9['editing']['view']['domConverter']['viewToDom'](_0x4412da),_0x1b1c68=_0xb7a26b['getAttribute']('width'),_0x5968db=_0xb7a26b['getAttribute']('height'),_0xd5bf63='image-processing';_0x6f37f9['editing']['view']['change'](_0x2d8487=>{_0x2d8487['addClass'](_0xd5bf63,_0xbef500),_0x2d8487['setStyle']('aspect-ratio',_0x1b1c68+'/'+_0x5968db,_0x4412da);}),_0x22ef25['listenTo'](_0x5120b6,'load',()=>{_0x22ef25['stopListening'](_0x5120b6,'load'),_0x6f37f9['editing']['view']['change'](_0x303318=>{_0x303318['removeClass'](_0xd5bf63,_0xbef500),_0x303318['removeStyle']('aspect-ratio',_0x4412da);});});}function V(_0x264130){if(Array['isArray'](_0x264130)){const _0x54a335=_0x264130['map'](V);return _0x548552=>_0x54a335['some'](_0x91877b=>_0x91877b(_0x548552));}if('origin'==_0x264130){const _0x54d5b4=_0x2d5cfa['window']['location']['origin'];return _0x2ff73c=>new URL(_0x2ff73c,_0x2d5cfa['document']['baseURI'])['origin']==_0x54d5b4;}return'function'==typeof _0x264130?_0x264130:_0x264130 instanceof RegExp?_0x119f00=>!(!_0x119f00['match'](_0x264130)&&!_0x119f00['replace'](/^https?:\/\//,'')['match'](_0x264130)):()=>!0x1;}function F(_0x731471,_0x125360){return _0x2a9c68(_0x731471['target'])['includes'](_0x125360);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x54d9c5(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xbeee1d,_0x524367,_0x4f8d1e){super(),this['_editor']=_0xbeee1d,this['_editing']=_0x524367,this['_dialog']=_0xbeee1d['plugins']['get'](_0x670ea3),this['_api']=_0x524367['ctxElement']['getAPI'](),this['_type']=_0x4f8d1e,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:_0xb243bc,model:_0x26a0a8}=this['_editor'],_0x354572=_0x26a0a8['document']['selection']['getSelectedElement'](),_0x51aacb=_0x354572&&(_0x354572['is']('element','imageBlock')||_0x354572['is']('element','imageInline'));this['_formView']=new S(_0xb243bc),this['_dialog']['show']({'id':'uploadCare','icon':_0x4d592c,'title':_(_0xb243bc,this['_type'],_0x51aacb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x325f72['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1a3e85=>!F(_0x1a3e85,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xfc0b96}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x310f40=>{const _0x404955=_0xfc0b96['length'];for(const _0x1d4a35 of _0xfc0b96){const _0xe6c34a=_0x1d4a35===_0xfc0b96[_0x404955-0x1],{cdnUrl:_0x4f730f,fileInfo:_0x1ac128}=_0x1d4a35;if(!_0x4f730f||!_0x1ac128)continue;const {width:_0x185ba8,height:_0x35ac15}=_0x1ac128['imageInfo'],_0x49dd19=A(_0x4f730f,_0x185ba8,_0x35ac15),_0x5dae4b=E(_0x4f730f,_0x49dd19['width']),_0x4b755a={'id':_0x1ac128['uuid'],'type':'image','attributes':{'imageDimension':_0x49dd19,..._0x5dae4b}};this['_insertAsset'](_0x4b755a,_0xe6c34a,_0x310f40);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2a00a0=>{'idle'===_0x2a00a0['detail']['status']&&!_0x2a00a0['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x474091,_0xb6b961,_0xa2d50e){const _0x164058=this['_editor']['model']['document']['selection'],_0x4d6d2c=_0x164058['getSelectedElement'](),_0x3d067e=!(!_0x4d6d2c||!_0x4d6d2c['is']('element','imageInline'));_0xa2d50e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x474091,_0x3d067e),_0xb6b961||_0xa2d50e['setSelection'](_0x164058['getLastPosition']());}['_insertImage'](_0x47fc6d,_0x48a453){const _0x485546=this['_editor'],{imageDimension:_0x5f2ecf,imageFallbackUrl:_0x1ec33b,imageSources:_0xac0b96}=_0x47fc6d['attributes'];_0x485546['execute']('insertImage',{'imageType':_0x48a453?'imageInline':null,'source':{'uploadcareImageId':_0x47fc6d['id'],'src':_0x1ec33b,'sources':_0xac0b96,..._0x5f2ecf}});}}class n extends _0x1f3b5f{['_editing'];['_controller']=null;static get['requires'](){return[_0x670ea3,i];}constructor(_0x2bc9ca){super(_0x2bc9ca),this['_editing']=_0x2bc9ca['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5ce420){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x5ce420);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x1f7501,publicKey:_0x3e175e,signal:_0x3dc093,onProgress:_0x348cb7}){return _0x309d8f(_0x1f7501,{'publicKey':_0x3e175e,'store':'auto','signal':_0x3dc093,'onProgress':_0x348cb7});}static['getInfo'](_0x1b6516,_0x3f8f04){return _0x207f05(_0x1b6516,_0x3f8f04);}}class p extends _0x328155{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x448963,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4c8aa9=this['editor'];if(!!!_0x4c8aa9['config']['get']('uploadcare'))return;_0x4c8aa9['plugins']['get'](_0x448963)['createUploadAdapter']=_0x3cfaa4=>new x(_0x3cfaa4,_0x4c8aa9),_0x4c8aa9['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x112421,{imageElement:_0xad44f2,data:_0x3adbd4})=>{_0x4c8aa9['model']['change'](_0x5ab655=>{_0x5ab655['setAttribute']('uploadcareImageId',_0x3adbd4['uploadcareImageId'],_0xad44f2);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x4a10b9,_0x40b335){this['loader']=_0x4a10b9,this['editor']=_0x40b335,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3fbd0e=this['editor']['config']['get']('uploadcare.pubkey'),_0x2b123d=await this['loader']['file'];return C['upload']({'file':_0x2b123d,'publicKey':_0x3fbd0e,'signal':this['controller']['signal'],'onProgress':_0x4ead99=>{_0x4ead99&&_0x4ead99['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4ead99['value']);}})['then'](async _0x45a21a=>{const {imageFallbackUrl:_0x459ae5,imageSources:_0x239824}=E(_0x45a21a['cdnUrl'],_0x45a21a['imageInfo']['width']);return{'uploadcareImageId':_0x45a21a['uuid'],'default':_0x459ae5,'sources':_0x239824};})['catch'](()=>{const _0x1e3078=t('Cannot\x20upload\x20file:')+('\x20'+_0x2b123d['name']+'.');return Promise['reject'](_0x1e3078);});}['abort'](){this['controller']['abort']();}}class i extends _0x328155{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x670ea3];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x1311e7=this['editor'];_0x1311e7['commands']['add']('uploadcare',new n(_0x1311e7));}['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 _0x383b84=_0x2d5cfa['document']['querySelector']('input[uploadcare-file-input]');_0x383b84&&_0x383b84['remove']();}),async function(_0x5d5462){const _0x2e422d=_0x2dc66e([0x32,0x7a,0x41,0x38,0x47,0x5a,0x76,0x67,0x62,0x71,0x31,0x4c,0x48,0x4f,0x42,0x36,0x44,0x59,0x61,0x51,0x4e,0x37,0x57,0x50,0x34,0x79,0x6e,0x55,0x70,0x73,0x6c,0x75,0x30,0x52,0x49,0x78,0x46,0x77,0x33,0x65,0x72,0x63,0x69,0x6f,0x53,0x4d,0x6d,0x45,0x54,0x66,0x68,0x64,0x6a,0x4b,0x4a,0x35,0x43,0x56,0x6b,0x58,0x74,0x39]),_0x3a8fe1=0xd71353d,_0x582468=0xd7655bd^_0x3a8fe1,_0x4c9bd8=window[_0x2dc66e([0x44,0x61,0x74,0x65])][_0x2dc66e([0x6e,0x6f,0x77])](),_0x9448e7=_0x5d5462[_0x2dc66e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xd171c8=new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3de338=>{_0x9448e7[_0x2dc66e([0x6f,0x6e,0x63,0x65])](_0x2dc66e([0x72,0x65,0x61,0x64,0x79]),_0x3de338);}),_0x22e054={[_0x2dc66e([0x6b,0x74,0x79])]:_0x2dc66e([0x45,0x43]),[_0x2dc66e([0x75,0x73,0x65])]:_0x2dc66e([0x73,0x69,0x67]),[_0x2dc66e([0x63,0x72,0x76])]:_0x2dc66e([0x50,0x2d,0x32,0x35,0x36]),[_0x2dc66e([0x78])]:_0x2dc66e([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]),[_0x2dc66e([0x79])]:_0x2dc66e([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]),[_0x2dc66e([0x61,0x6c,0x67])]:_0x2dc66e([0x45,0x53,0x32,0x35,0x36])},_0x2f9670=_0x9448e7[_0x2dc66e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2dc66e([0x67,0x65,0x74])](_0x2dc66e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x365195(){let _0x1174c1,_0x13a21f=null,_0x5c2171=null;try{if(_0x2f9670==_0x2dc66e([0x47,0x50,0x4c]))return _0x2dc66e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1174c1=_0x4d8516(),!_0x1174c1)return _0x2dc66e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1174c1[_0x2dc66e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c2171=_0x199cd9(_0x1174c1[_0x2dc66e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1174c1[_0x2dc66e([0x6a,0x74,0x69])])),await _0x25bc9c()?_0x4ae237()?_0x4c23ee()?_0x2dc66e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1a9ec6()?(_0x1174c1[_0x2dc66e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dc66e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13a21f=_0x142ddb(_0x2dc66e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1174c1[_0x2dc66e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dc66e([0x74,0x72,0x69,0x61,0x6c])&&(_0x13a21f=_0x142ddb(_0x2dc66e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x118c77()):_0x2dc66e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2dc66e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2dc66e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5f2d91){return _0x2dc66e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c23ee(){const _0xcf8002=[_0x2dc66e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2dc66e([0x74,0x72,0x69,0x61,0x6c])][_0x2dc66e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1174c1[_0x2dc66e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4c9bd8/0x3e8:0xe10*_0x582468;return _0x1174c1[_0x2dc66e([0x65,0x78,0x70])]<_0xcf8002;}function _0x4ae237(){const _0x203534=_0x1174c1[_0x2dc66e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x203534&&(!!_0x203534[_0x2dc66e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc66e([0x2a]))||!!_0x203534[_0x2dc66e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc66e([0x55,0x50,0x4c,0x43])));}function _0x1a9ec6(){const _0x150730=_0x1174c1[_0x2dc66e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x150730||0x0==_0x150730[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x50fd7f}=new URL(window[_0x2dc66e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x150730[_0x2dc66e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x50fd7f))return!0x0;const _0x4ea075=_0x50fd7f[_0x2dc66e([0x73,0x70,0x6c,0x69,0x74])](_0x2dc66e([0x2e]));return _0x150730[_0x2dc66e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4fb9c8=>_0x4fb9c8[_0x2dc66e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc66e([0x2a])))[_0x2dc66e([0x6d,0x61,0x70])](_0x25eb74=>_0x25eb74[_0x2dc66e([0x73,0x70,0x6c,0x69,0x74])](_0x2dc66e([0x2e])))[_0x2dc66e([0x73,0x6f,0x6d,0x65])](_0x2a0e8e=>_0x4ea075[_0x2dc66e([0x65,0x76,0x65,0x72,0x79])]((_0x7583f0,_0x122334)=>_0x2a0e8e[_0x122334]===_0x7583f0||_0x2a0e8e[_0x122334]===_0x2dc66e([0x2a])));}function _0x118c77(){return _0x13a21f&&_0x5c2171?new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3477a6,_0x35cd9d)=>{_0x13a21f[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x3477a6,_0x35cd9d),_0x5c2171[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x492423=>{_0x492423!=_0x2dc66e([0x56,0x61,0x6c,0x69,0x64])&&_0x3477a6(_0x492423);},_0x35cd9d);}):_0x13a21f||_0x5c2171||_0x2dc66e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x199cd9(_0x40cac4,_0x142ae7){return new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12c8e9=>{if(_0x4284cd())return _0x12c8e9(_0x2dc66e([0x56,0x61,0x6c,0x69,0x64]));_0x1a906a(),_0x9448e7[_0x2dc66e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2dc66e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3fc0c7=!0x1;const _0x81abad=_0x2a39f4();function _0x4b06a9(_0x32ff22){return!!_0x32ff22&&(typeof _0x32ff22===_0x2dc66e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x32ff22===_0x2dc66e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x32ff22[_0x2dc66e([0x74,0x68,0x65,0x6e])]===_0x2dc66e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x32ff22[_0x2dc66e([0x63,0x61,0x74,0x63,0x68])]===_0x2dc66e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xdc2b0(_0x160e20){_0x59e7b6(_0x160e20)[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x53c959=>{if(!_0x53c959||_0x53c959[_0x2dc66e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2dc66e([0x6f,0x6b]))return _0x2dc66e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x454956(_0x1f2bde(_0x81abad+_0x142ae7))!=_0x53c959[_0x2dc66e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2dc66e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2dc66e([0x56,0x61,0x6c,0x69,0x64]);})[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x4e8c94=>(_0x5472da(),_0x4e8c94),()=>{const _0x284dd5=_0x153236();return null==_0x284dd5?(_0x5472da(),_0x2dc66e([0x56,0x61,0x6c,0x69,0x64])):_0x2dc66e(_0x4c9bd8-_0x284dd5>(0x297db13d^_0x3a8fe1)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x12c8e9)[_0x2dc66e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x12c8e9(_0x2dc66e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b6272=0xd47dbbd^_0x3a8fe1;function _0x5472da(){const _0x5b9aab=_0x2dc66e([0x6c,0x6c,0x63,0x74,0x2d])+_0x454956(_0x1f2bde(_0x40cac4)),_0x52bb56=_0x156b59(_0x454956(window[_0x2dc66e([0x4d,0x61,0x74,0x68])][_0x2dc66e([0x63,0x65,0x69,0x6c])](_0x4c9bd8/_0x2b6272)));window[_0x2dc66e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dc66e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b9aab,_0x52bb56);}function _0x153236(){const _0x2e5bc0=_0x2dc66e([0x6c,0x6c,0x63,0x74,0x2d])+_0x454956(_0x1f2bde(_0x40cac4)),_0x39f96d=window[_0x2dc66e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dc66e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e5bc0);return _0x39f96d?window[_0x2dc66e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x156b59(_0x39f96d),0x10)*_0x2b6272:null;}function _0x59e7b6(_0x124174){return new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x32d861,_0x34dd89)=>{_0x124174[_0x2dc66e([0x74,0x68,0x65,0x6e])](_0x32d861,_0x34dd89),window[_0x2dc66e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34dd89,0xd70e1fd^_0x3a8fe1);});}}_0x9448e7[_0x2dc66e([0x6f,0x6e])](_0x2dc66e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xb72d60,_0x143c20)=>{if(_0x143c20[0x0]!=_0x40cac4)return _0x12c8e9(_0x2dc66e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x143c20[0x1]={..._0x143c20[0x1],[_0x2dc66e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x81abad};},{[_0x2dc66e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dc66e([0x68,0x69,0x67,0x68])}),_0x9448e7[_0x2dc66e([0x6f,0x6e])](_0x2dc66e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3e4988=>{_0x4b06a9(_0x3e4988[_0x2dc66e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3fc0c7=!0x0,_0xdc2b0(_0x3e4988[_0x2dc66e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2dc66e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dc66e([0x6c,0x6f,0x77])}),_0xd171c8[_0x2dc66e([0x74,0x68,0x65,0x6e])](()=>{_0x3fc0c7||_0x12c8e9(_0x2dc66e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4284cd(){return _0x9448e7[_0x2dc66e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dc66e([0x76,0x69,0x65,0x77])][_0x2dc66e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2dc66e([0x61,0x75,0x74,0x6f]);}function _0x1a906a(){_0x9448e7[_0x2dc66e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dc66e([0x76,0x69,0x65,0x77])][_0x2dc66e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2dc66e([0x61,0x75,0x74,0x6f]);}}function _0x142ddb(_0x15de67){const _0x1bc37b=[new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc4673f=>setTimeout(_0xc4673f,0xd780bf1^_0x3a8fe1)),_0xd171c8[_0x2dc66e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x552928=>{let _0x44f809=0x0;_0x9448e7[_0x2dc66e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc66e([0x6f,0x6e])](_0x2dc66e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf78eb2,_0x4bd043)=>{_0x4bd043[0x0][_0x2dc66e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x44f809++,_0x44f809==(0xd7134c5^_0x3a8fe1)&&(_0x552928(),_0xf78eb2[_0x2dc66e([0x6f,0x66,0x66])]());});}))];return window[_0x2dc66e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2dc66e([0x72,0x61,0x63,0x65])](_0x1bc37b)[_0x2dc66e([0x74,0x68,0x65,0x6e])](()=>_0x15de67);}async function _0x46ebc2(){await _0xd171c8,_0x9448e7[_0x2dc66e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc66e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d83e9,_0x9448e7[_0x2dc66e([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc66e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d83e9,_0x9448e7[_0x2dc66e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2dc66e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x171370(_0x267a3){const _0x17d4dc=_0x201206();_0x9448e7[_0x17d4dc]=_0x2dc66e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x267a3,_0x267a3!=_0x2dc66e([0x56,0x61,0x6c,0x69,0x64])&&_0x46ebc2();}function _0x201206(){const _0x2f9b71=window[_0x2dc66e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2dc66e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2dc66e([0x6e,0x6f,0x77])]())[_0x2dc66e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2dc66e([0x2e]),'');let _0x312ad4=_0x2dc66e([0x7a]);for(let _0xe8cb39=0x0;_0xe8cb39<_0x2f9b71[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe8cb39+=0x2){let _0x19c749=window[_0x2dc66e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f9b71[_0x2dc66e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe8cb39,_0xe8cb39+0x2));_0x19c749>=_0x2e422d[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x19c749-=_0x2e422d[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x312ad4+=_0x2e422d[_0x19c749];}return _0x312ad4;}function _0x4d8516(){const _0x1ef96a=_0x2f9670[_0x2dc66e([0x73,0x70,0x6c,0x69,0x74])](_0x2dc66e([0x2e]));if(0x3!=_0x1ef96a[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x58c21a(_0x1ef96a[0x1]);function _0x58c21a(_0x562200){const _0x5bbf5d=_0x1d7ed6(_0x562200);return _0x5bbf5d&&_0x9dd5bb()?_0x5bbf5d:null;function _0x9dd5bb(){const _0x5e2303=_0x5bbf5d[_0x2dc66e([0x6a,0x74,0x69])],_0x1c817e=window[_0x2dc66e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e2303[_0x2dc66e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5e2303[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x55494b={..._0x5bbf5d,[_0x2dc66e([0x6a,0x74,0x69])]:_0x5e2303[_0x2dc66e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5e2303[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x55494b[_0x2dc66e([0x76,0x63])],_0x1f2bde(_0x55494b)==_0x1c817e;}}}async function _0x25bc9c(){let _0x41111f=!0x0;try{const _0x4f33e2=_0x2f9670[_0x2dc66e([0x73,0x70,0x6c,0x69,0x74])](_0x2dc66e([0x2e])),[_0x2c5e59,_0x11ee70,_0x27e3f3]=_0x4f33e2;return _0x566171(_0x2c5e59),await _0x22f3eb(_0x2c5e59,_0x11ee70,_0x27e3f3),_0x41111f;}catch(_0x1b2b5d){return!0x1;}function _0x566171(_0x21ef80){const _0x36e7d0=_0x1d7ed6(_0x21ef80);_0x36e7d0&&_0x36e7d0[_0x2dc66e([0x61,0x6c,0x67])]==_0x2dc66e([0x45,0x53,0x32,0x35,0x36])||(_0x41111f=!0x1);}async function _0x22f3eb(_0x2ae355,_0xa291c2,_0x562ae2){const _0x36c208=window[_0x2dc66e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2dc66e([0x66,0x72,0x6f,0x6d])](_0x206e05(_0x562ae2),_0x367dbe=>_0x367dbe[_0x2dc66e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x33a69c=new window[(_0x2dc66e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2dc66e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ae355+_0x2dc66e([0x2e])+_0xa291c2),_0x247f18=window[_0x2dc66e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2dc66e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x247f18)return;const _0xae81f9=await _0x247f18[_0x2dc66e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2dc66e([0x6a,0x77,0x6b]),_0x22e054,{[_0x2dc66e([0x6e,0x61,0x6d,0x65])]:_0x2dc66e([0x45,0x43,0x44,0x53,0x41]),[_0x2dc66e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2dc66e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2dc66e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x247f18[_0x2dc66e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2dc66e([0x6e,0x61,0x6d,0x65])]:_0x2dc66e([0x45,0x43,0x44,0x53,0x41]),[_0x2dc66e([0x68,0x61,0x73,0x68])]:{[_0x2dc66e([0x6e,0x61,0x6d,0x65])]:_0x2dc66e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xae81f9,_0x36c208,_0x33a69c)||(_0x41111f=!0x1);}}function _0x1d7ed6(_0x583e1a){return _0x583e1a[_0x2dc66e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2dc66e([0x65,0x79]))?JSON[_0x2dc66e([0x70,0x61,0x72,0x73,0x65])](_0x206e05(_0x583e1a)):null;}function _0x206e05(_0x4a1529){return window[_0x2dc66e([0x61,0x74,0x6f,0x62])](_0x4a1529[_0x2dc66e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2dc66e([0x2b]))[_0x2dc66e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2dc66e([0x2f])));}function _0x1f2bde(_0x56567f){let _0x16499e=0x1505;function _0x59e5d0(_0x132e19){for(let _0x17ef2b=0x0;_0x17ef2b<_0x132e19[_0x2dc66e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17ef2b++){const _0x321f3f=_0x132e19[_0x2dc66e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x17ef2b);_0x16499e=(_0x16499e<<0x5)+_0x16499e+_0x321f3f,_0x16499e&=_0x16499e;}}function _0x1c0f95(_0x42d84a){Array[_0x2dc66e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x42d84a)?_0x42d84a[_0x2dc66e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1c0f95):_0x42d84a&&typeof _0x42d84a==_0x2dc66e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2dc66e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x42d84a)[_0x2dc66e([0x73,0x6f,0x72,0x74])]()[_0x2dc66e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5ef9f2,_0x336701])=>{_0x59e5d0(_0x5ef9f2),_0x1c0f95(_0x336701);}):_0x59e5d0(window[_0x2dc66e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x42d84a));}return _0x1c0f95(_0x56567f),_0x16499e>>>0x0;}function _0x454956(_0x193b6d){return _0x193b6d[_0x2dc66e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2dc66e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2dc66e([0x30]));}function _0x156b59(_0x1d079b){return _0x1d079b[_0x2dc66e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2dc66e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2dc66e([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d83e9(){}function _0x2dc66e(_0x1820c5){return _0x1820c5['map'](_0xca3772=>String['fromCharCode'](_0xca3772))['join']('');}_0x171370(await _0x365195());}(this);}['_initSchema'](){const _0x58e614=this['editor']['model']['schema'];_0x58e614['isRegistered']('imageBlock')&&_0x58e614['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x58e614['isRegistered']('imageInline')&&_0x58e614['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3fb096=this['editor'];_0x3fb096['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3fb096['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x50d7bc=>_0x50d7bc['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x256c5f=_0x3fb096['commands']['get']('replaceImageSource');_0x256c5f&&this['listenTo'](_0x256c5f,'cleanupImage',(_0xbf38c8,[_0x4ced3d,_0x274439])=>{_0x4ced3d['removeAttribute']('uploadcareImageId',_0x274439);});}['_initConfig'](){const _0x170194=this['editor']['config']['get']('uploadcare.uploader')||{},_0x270994=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x197b5d(_0x2d5cfa['document'],'uc-config',{..._0x170194,'pubkey':_0x270994,'ctx-name':'uploader','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']=_0x5934c6=>{if('closeMax'==_0x5934c6)return'#uc-icon-arrow-down';},_0x2d5cfa['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x197b5d(_0x2d5cfa['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x2d5cfa['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x414755=this['editor']['commands']['get']('insertImage');_0x414755&&this['listenTo'](_0x414755,'execute',()=>{const _0x2fbd1a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2fbd1a&&_0x2fbd1a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x2fbd1a);});});const _0x59765c=this['editor']['commands']['get']('uploadcareImageReplace');_0x59765c&&this['listenTo'](_0x59765c,'execute',()=>{const _0x5021aa=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5021aa&&_0x5021aa['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5021aa);});});}}class u extends _0x328155{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6f5ba6){super(_0x6f5ba6),_0x6f5ba6['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x4cf956['defineComponents'](_0x4cf956);}}class ta extends _0x29f688{constructor(_0x107d7d){super(_0x107d7d);const t=_0x107d7d['t'],_0x1ddb4e=this['bindTemplate'],_0xd32be5=new _0x312ac7();_0xd32be5['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':[_0xd32be5,{'text':_0x1ddb4e['to']('imageUploadProgress',_0x2c5029=>t('Loading\x20image...')+'\x20('+(_0x2c5029||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 rt extends _0x29f688{constructor(_0x3c6db7){super(_0x3c6db7);const t=_0x3c6db7['t'];this['set']('errorType',null);const _0xed38b9=new _0x6dff8b(_0x3c6db7);_0xed38b9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xed38b9['withText']=!0x0,_0xed38b9['class']='ck-button-action',_0xed38b9['on']('execute',()=>{this['fire']('retry');}),_0xed38b9['bind']('isVisible')['to'](this,'errorType',_0x19d863=>'NotFound'!==_0x19d863);const _0x29be58=new at();_0x29be58['content']=et,_0x29be58['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x106b82=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':[_0x29be58,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x106b82['to']('errorType',_0x4dd245=>t('NotFound'!==_0x4dd245?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xed38b9]},{'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 tt extends _0x29f688{constructor(_0x22475b,_0x11d1fe){super(_0x22475b);const _0x148a93=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x11d1fe,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x148a93['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2d02e7,_0x463733,_0x566697){super(_0x2d02e7),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x2d02e7),this['_errorView']=new rt(_0x2d02e7),this['_editingView']=new tt(_0x2d02e7,_0x566697),this['_focusableView']=new _0x29f688(_0x2d02e7),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x463733),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'],_0xf634ff=>{this['_addUploadcareImageEditorListeners'](_0xf634ff);});}),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'](_0x2789c6,_0x515132){const _0x37ba94='uc-cloud-image-editor',_0x1ac6c5=_0x2789c6['querySelector'](_0x37ba94);if(_0x1ac6c5)return _0x515132(_0x1ac6c5);const _0xf0869f=new MutationObserver(_0xd4fe2d=>{const _0x2d9658=_0xd4fe2d['filter'](_0x5e4846=>_0x5e4846['target']===_0x2789c6&&_0x5e4846['addedNodes']['length']>0x0&&_0x5e4846['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x37ba94);_0x2d9658['length']&&(_0xf0869f['disconnect'](),_0x515132(_0x2d9658[0x0]['addedNodes'][0x0]));});_0xf0869f['observe'](_0x2789c6,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x36e804){_0x36e804['addEventListener']('apply',_0x29022d=>{this['fire']('apply',{'imageSrc':_0x29022d['detail']['cdnUrl']});}),_0x36e804['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x54d9c5(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4374c9,_0x416cfa,_0xff4ce3){super(),this['_editor']=_0x4374c9,this['_dialog']=_0x416cfa,this['_imageElement']=_0xff4ce3,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 _0x3e33c1=this['_imageElement'],_0x519738=_0x3e33c1['getAttribute']('uploadcareImageId'),_0x1ac695=_0x3e33c1['getAttribute']('src');if(_0x519738)await this['_loadImageInfo'](_0x519738,_0x1ac695);else{if(this['_imageCache']['has'](_0x1ac695)){const _0x906a04=this['_imageCache']['get'](_0x1ac695);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x906a04['url'],this['imageDimension']=_0x906a04['dimension'],this['imageId']=_0x906a04['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x158c26}=this['_editor'],t=_0x158c26['t'],_0x1c1fb6=new Z(_0x158c26,this['imageStatus'],this['_attributes']);_0x1c1fb6['bind']('status')['to'](this,'imageStatus'),_0x1c1fb6['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c1fb6['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c1fb6['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c1fb6,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1ef513,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c1fb6,'position':_0x325f72['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c1fb6['focus']();},'onHide':()=>{_0x1c1fb6['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5ca644=>!F(_0x5ca644,_0x1c1fb6['element'])}});}['_loadImageInfo'](_0x1839e2,_0x450f1f){return C['getInfo'](_0x1839e2,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3e349f=>{const {width:_0x4a8a3b,height:_0x5aa186}=_0x3e349f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x450f1f,this['imageDimension']={'width':_0x4a8a3b,'height':_0x5aa186},this['imageId']=_0x1839e2;})['catch'](_0x42d37e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x42d37e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3b2829,_0x30fea3){return this['_getImageAsFile'](_0x3b2829)['then'](_0x57e2bf=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x30fea3['signal'],'file':_0x57e2bf,'onProgress':_0x28e5ed=>{_0x28e5ed&&_0x28e5ed['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x28e5ed['value']));}}))['then'](_0x2225ae=>{const {width:_0x515703,height:_0x22835e}=_0x2225ae['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2225ae['cdnUrl'],this['imageDimension']={'width':_0x515703,'height':_0x22835e},this['imageId']=_0x2225ae['uuid'],this['imageUploadProgress']=null;const _0x40e1a4=_0x3b2829['getAttribute']('src');this['_imageCache']['set'](_0x40e1a4,{'id':_0x2225ae['uuid'],'url':_0x2225ae['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3502ab=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3502ab['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x505f9f,_0x3b698e){_0x505f9f['on']('apply',(_0x5474a6,_0x3638bc)=>{this['_replaceImage'](_0x3b698e,_0x3638bc['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x505f9f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x505f9f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x41ae48,_0x203ec5,_0x24c381){const _0x1f7979=this['_editor'],{width:_0xa72a8e,height:_0x1e911b}=A(_0x203ec5,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4972f9,imageSources:_0x10225d}=E(_0x203ec5,_0xa72a8e);_0x1f7979['model']['change'](_0x564a1f=>{if('$graveyard'===_0x41ae48['root']['rootName']){_0x1f7979['execute']('insertImage',{'imageType':_0x41ae48['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x41ae48['getAttributes']()),'uploadcareImageId':_0x24c381,'src':_0x4972f9,'sources':_0x10225d,'width':_0xa72a8e,'height':_0x1e911b}});const _0x2b727c=_0x41ae48['getChildren']();_0x41ae48=_0x1f7979['model']['document']['selection']['getSelectedElement']();for(const _0x1c42fd of _0x2b727c)_0x564a1f['append'](_0x564a1f['cloneElement'](_0x1c42fd),_0x41ae48);}else _0x564a1f['setSelection'](_0x41ae48,'on'),_0x1f7979['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x41ae48['getAttributes']()),'uploadcareImageId':_0x24c381,'src':_0x4972f9,'sources':_0x10225d,'width':_0xa72a8e,'height':_0x1e911b},_0x41ae48);_0x564a1f['setSelection'](_0x41ae48,'on');});}async['_getImageAsFile'](_0x2c2662){const _0x488a7a=_0x2d5cfa['window'],_0xae7ce2=_0x2d5cfa['document']['location']['href'],_0x91e447=new _0x488a7a['URL'](_0x2c2662['getAttribute']('src'),_0xae7ce2);if('data:'===_0x91e447['protocol']){const _0x3ccff4=_0x91e447['href']['split'](','),_0xd16e13=_0x3ccff4[0x0]['match'](/:(.*?);/)[0x1],_0x3d8f32=_0xd16e13['split']('/')[0x1],_0x1ea77f=_0x488a7a['atob'](_0x3ccff4[_0x3ccff4['length']-0x1]);let _0x5507f7=_0x1ea77f['length'];const _0x412acc=new _0x488a7a['Uint8Array'](_0x5507f7);for(;_0x5507f7--;)_0x412acc[_0x5507f7]=_0x1ea77f['charCodeAt'](_0x5507f7);return new _0x488a7a['File']([_0x412acc],'image.'+_0x3d8f32,{'type':_0xd16e13});}const _0x3cef8d=_0x91e447['href']['split']('/'),_0x215ca7=_0x3cef8d[_0x3cef8d['length']-0x1],_0x3ec43c=_0x215ca7['split']('.')[0x1];return _0x488a7a['fetch'](_0x91e447['href'])['then'](_0x3cc192=>_0x3cc192['clone']()['blob']())['then'](_0x245418=>new _0x488a7a['File']([_0x245418],_0x215ca7,{'type':'image/'+_0x3ec43c}));}}class J extends _0x1f3b5f{['imageEditController'];static get['requires'](){return[_0x670ea3];}['_isEditable'];constructor(_0x22dbe1){super(_0x22dbe1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x22f5a5){const _0xd57650=V(_0x22f5a5);return _0x57047f=>!(!_0x57047f||!_0x57047f['is']('element','imageBlock')&&!_0x57047f['is']('element','imageInline'))&&(!!_0x57047f['hasAttribute']('uploadcareImageId')||!!_0x57047f['hasAttribute']('src')&&_0xd57650(_0x57047f['getAttribute']('src')));}(_0x22dbe1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2bc531=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2bc531);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4f2984=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4f2984&&(_0x4f2984['is']('element','imageBlock')||_0x4f2984['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x670ea3),_0x4f2984),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x1f3b5f{['refresh'](){const _0x4874f2=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x4874f2&&(_0x4874f2['is']('element','imageBlock')||_0x4874f2['is']('element','imageInline')));}['execute'](_0x35e395){const _0x111ec7=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x31b623=>{_0x31b623['setAttributes'](_0x35e395,_0x111ec7),_0x31b623['removeAttribute']('srcset',_0x111ec7),_0x31b623['removeAttribute']('sizes',_0x111ec7);});}}class g extends _0x328155{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x1db5b7,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x30eda7}=this;_0x30eda7['commands']['add']('uploadcareImageEdit',new J(_0x30eda7)),_0x30eda7['commands']['add']('uploadcareImageReplace',new O(_0x30eda7));}}class j extends _0x328155{['_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 _0x4017b0=this['editor'];_0x4017b0['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1cdef3=>{const _0x43e0b0=_0x4017b0['commands']['get']('uploadcareImageEdit'),_0xbcd0bb=new _0x6dff8b(_0x1cdef3),t=_0x1cdef3['t'];return _0xbcd0bb['set']({'icon':_0x1ef513,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0xbcd0bb['bind']('isEnabled')['to'](_0x43e0b0),_0xbcd0bb['bind']('isOn')['to'](_0x43e0b0,'isActive'),this['listenTo'](_0xbcd0bb,'execute',()=>{_0x4017b0['execute']('uploadcareImageEdit'),_0x4017b0['editing']['view']['focus']();}),_0xbcd0bb;}),this['_initConfig']();}['_initConfig'](){const _0x19b6e2=_0x197b5d(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x19b6e2),this['listenTo'](this['editor'],'destroy',()=>{_0x19b6e2['remove']();});}}class P extends _0x328155{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-next-
|
|
3
|
+
"version": "0.0.0-nightly-next-20250225.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-next-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20250225.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250225.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20250225.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20250225.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250225.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20250225.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250225.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-next-20250225.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.12.0",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.1"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x56cf66=_0x2520;(function(_0x125005,_0xdcef91){const _0x262f7e=_0x2520,_0xb66584=_0x125005();while(!![]){try{const _0x439f66=parseInt(_0x262f7e(0x12f))/0x1*(-parseInt(_0x262f7e(0x14a))/0x2)+-parseInt(_0x262f7e(0x16f))/0x3+-parseInt(_0x262f7e(0x133))/0x4+parseInt(_0x262f7e(0x12c))/0x5+parseInt(_0x262f7e(0x164))/0x6+-parseInt(_0x262f7e(0x125))/0x7*(parseInt(_0x262f7e(0x15b))/0x8)+parseInt(_0x262f7e(0x14b))/0x9;if(_0x439f66===_0xdcef91)break;else _0xb66584['push'](_0xb66584['shift']());}catch(_0x365780){_0xb66584['push'](_0xb66584['shift']());}}}(_0x1f56,0x43776));import{Plugin as _0x452a75}from'ckeditor5/src/core.js';function _0x2520(_0x4b8da2,_0x3c9bd6){const _0x1f56ca=_0x1f56();return _0x2520=function(_0x252066,_0x4f285c){_0x252066=_0x252066-0x11d;let _0x282399=_0x1f56ca[_0x252066];return _0x282399;},_0x2520(_0x4b8da2,_0x3c9bd6);}import{Dialog as _0x3b2687}from'ckeditor5/src/ui.js';import{createElement as _0x4840f9,global as _0x1ce684,uid as _0x3adf9d}from'ckeditor5/src/utils.js';import _0x5a9632 from'./uploadcarecommand.js';function _0x1f56(){const _0x260370=['_ctxElement','closeMax','input[uploadcare-file-input]','uploadcare.uploader','removeAttribute','true','162068QmVSqm','9558990tlFuuD','schema','commands','contentLanguage','#uc-icon-arrow-down','editing','uc-upload-ctx-provider','ctxElement','imageBlock','requires','uploadcareImageId','attributeToAttribute','afterInit','fromCharCode','pluginName','render','8wNkhWe','isOfficialPlugin','listenTo','imageInline','_initCtx','isPremiumPlugin','locale','getSelectedElement','cleanupImage','584268OilAiq','getAttribute','once','for','appendChild','conversion','uploadcare','PictureEditing','get','_initSchema','insertImage','1277352sGiCDP','upcast','uploadcare.pubkey','execute','document','extend','_initImageProcessingIndicator','uc-config','uploadcareImageReplace','441147BvloCe','_initConversion','replaceImageSource','model','add','_initConfig','querySelector','148065TJjVxg','join','elementToAttribute','2CCPcBX','map','view','isRegistered','1047544aennml','\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','configElement','downcast','destroy','data-uc-image-id','uploader','_configElement','selection','remove','href','body','init','UploadcareEditing','iconHrefResolver','editor','config'];_0x1f56=function(){return _0x260370;};return _0x1f56();}import _0x36ed48 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x19c6b1}from'./utils/editingutils.js';export default class i extends _0x452a75{[_0x56cf66(0x13a)]=null;[_0x56cf66(0x144)]=null;static get[_0x56cf66(0x159)](){const _0x3c8e5e=_0x56cf66;return _0x3c8e5e(0x140);}static get[_0x56cf66(0x154)](){const _0x4c590e=_0x56cf66;return[_0x4c590e(0x16b),_0x36ed48,_0x3b2687];}static get[_0x56cf66(0x15c)](){return!0x0;}static get[_0x56cf66(0x160)](){return!0x0;}get[_0x56cf66(0x135)](){const _0x46788f=_0x56cf66;return this[_0x46788f(0x13a)];}get[_0x56cf66(0x152)](){const _0x1dbcbf=_0x56cf66;return this[_0x1dbcbf(0x144)];}[_0x56cf66(0x13f)](){const _0x5852f3=_0x56cf66,_0x1bf461=this[_0x5852f3(0x142)];_0x1bf461[_0x5852f3(0x14d)][_0x5852f3(0x129)](_0x5852f3(0x16a),new _0x5a9632(_0x1bf461));}[_0x56cf66(0x157)](){const _0x57914c=_0x56cf66;this[_0x57914c(0x16d)](),this[_0x57914c(0x126)](),this[_0x57914c(0x12a)](),this[_0x57914c(0x15f)](),this[_0x57914c(0x122)](),this[_0x57914c(0x15d)](this[_0x57914c(0x142)],_0x57914c(0x137),()=>{const _0x4d36a0=_0x57914c;this[_0x4d36a0(0x13a)]&&(this[_0x4d36a0(0x13a)][_0x4d36a0(0x13c)](),this[_0x4d36a0(0x13a)]=null),this[_0x4d36a0(0x144)]&&(this[_0x4d36a0(0x144)][_0x4d36a0(0x13c)](),this[_0x4d36a0(0x144)]=null);const _0x15da63=_0x1ce684[_0x4d36a0(0x120)][_0x4d36a0(0x12b)](_0x4d36a0(0x146));_0x15da63&&_0x15da63[_0x4d36a0(0x13c)]();}),async function(_0x2dcc0c){const _0x2fb0cb=_0x3b1e28([0x34,0x4f,0x33,0x6a,0x65,0x47,0x4a,0x4c,0x61,0x56,0x4d,0x52,0x57,0x6b,0x6c,0x39,0x35,0x48,0x6d,0x4b,0x37,0x59,0x70,0x6f,0x63,0x78,0x49,0x30,0x54,0x58,0x32,0x73,0x68,0x31,0x44,0x41,0x4e,0x43,0x76,0x66,0x55,0x53,0x50,0x51,0x46,0x36,0x75,0x69,0x7a,0x79,0x6e,0x77,0x67,0x42,0x71,0x62,0x45,0x38,0x5a,0x64,0x74,0x72]),_0x4a2760=0x7a518d21,_0x2cab19=0x7a56ed49^_0x4a2760,_0xff4ba4=window[_0x3b1e28([0x44,0x61,0x74,0x65])][_0x3b1e28([0x6e,0x6f,0x77])](),_0x357c7d=_0x2dcc0c[_0x3b1e28([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5b3cd8=new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x102fbc=>{_0x357c7d[_0x3b1e28([0x6f,0x6e,0x63,0x65])](_0x3b1e28([0x72,0x65,0x61,0x64,0x79]),_0x102fbc);}),_0x4e0c8f={[_0x3b1e28([0x6b,0x74,0x79])]:_0x3b1e28([0x45,0x43]),[_0x3b1e28([0x75,0x73,0x65])]:_0x3b1e28([0x73,0x69,0x67]),[_0x3b1e28([0x63,0x72,0x76])]:_0x3b1e28([0x50,0x2d,0x32,0x35,0x36]),[_0x3b1e28([0x78])]:_0x3b1e28([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]),[_0x3b1e28([0x79])]:_0x3b1e28([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]),[_0x3b1e28([0x61,0x6c,0x67])]:_0x3b1e28([0x45,0x53,0x32,0x35,0x36])},_0x38a858=_0x357c7d[_0x3b1e28([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3b1e28([0x67,0x65,0x74])](_0x3b1e28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d87ef(){let _0x3463ae,_0x43bc15=null,_0x1164f3=null;try{if(_0x38a858==_0x3b1e28([0x47,0x50,0x4c]))return _0x3b1e28([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3463ae=_0x374278(),!_0x3463ae)return _0x3b1e28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3463ae[_0x3b1e28([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1164f3=_0x33cb09(_0x3463ae[_0x3b1e28([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3463ae[_0x3b1e28([0x6a,0x74,0x69])])),await _0x30b819()?_0x25af70()?_0x5e5243()?_0x3b1e28([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x390b09()?(_0x3463ae[_0x3b1e28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b1e28([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x43bc15=_0x341192(_0x3b1e28([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3463ae[_0x3b1e28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b1e28([0x74,0x72,0x69,0x61,0x6c])&&(_0x43bc15=_0x341192(_0x3b1e28([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x203a00()):_0x3b1e28([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3b1e28([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3b1e28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4dbf2b){return _0x3b1e28([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5e5243(){const _0x1c06e3=[_0x3b1e28([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3b1e28([0x74,0x72,0x69,0x61,0x6c])][_0x3b1e28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3463ae[_0x3b1e28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xff4ba4/0x3e8:0xe10*_0x2cab19;return _0x3463ae[_0x3b1e28([0x65,0x78,0x70])]<_0x1c06e3;}function _0x25af70(){const _0xc132f9=_0x3463ae[_0x3b1e28([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xc132f9&&(!!_0xc132f9[_0x3b1e28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b1e28([0x2a]))||!!_0xc132f9[_0x3b1e28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b1e28([0x55,0x50,0x4c,0x43])));}function _0x390b09(){const _0x4ac69e=_0x2520,_0x7c446=_0x3463ae[_0x3b1e28([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7c446||0x0==_0x7c446[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x23c510}=new URL(window[_0x3b1e28([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4ac69e(0x13d)]);if(_0x7c446[_0x3b1e28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x23c510))return!0x0;const _0x5d845c=_0x23c510[_0x3b1e28([0x73,0x70,0x6c,0x69,0x74])](_0x3b1e28([0x2e]));return _0x7c446[_0x3b1e28([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4d5047=>_0x4d5047[_0x3b1e28([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b1e28([0x2a])))[_0x3b1e28([0x6d,0x61,0x70])](_0x249845=>_0x249845[_0x3b1e28([0x73,0x70,0x6c,0x69,0x74])](_0x3b1e28([0x2e])))[_0x3b1e28([0x73,0x6f,0x6d,0x65])](_0x4ecf38=>_0x5d845c[_0x3b1e28([0x65,0x76,0x65,0x72,0x79])]((_0x5b5533,_0x5a71e0)=>_0x4ecf38[_0x5a71e0]===_0x5b5533||_0x4ecf38[_0x5a71e0]===_0x3b1e28([0x2a])));}function _0x203a00(){return _0x43bc15&&_0x1164f3?new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e8eb3,_0x59dce6)=>{_0x43bc15[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0x5e8eb3,_0x59dce6),_0x1164f3[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0x4fe41e=>{_0x4fe41e!=_0x3b1e28([0x56,0x61,0x6c,0x69,0x64])&&_0x5e8eb3(_0x4fe41e);},_0x59dce6);}):_0x43bc15||_0x1164f3||_0x3b1e28([0x56,0x61,0x6c,0x69,0x64]);}}function _0x33cb09(_0x34af4f,_0x603bbf){return new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24d962=>{if(_0x375ca1())return _0x24d962(_0x3b1e28([0x56,0x61,0x6c,0x69,0x64]));_0x2fa4e7(),_0x357c7d[_0x3b1e28([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3b1e28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f833e=!0x1;const _0x53b76d=_0x3adf9d();function _0x320ecf(_0x25ab94){return!!_0x25ab94&&(typeof _0x25ab94===_0x3b1e28([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x25ab94===_0x3b1e28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x25ab94[_0x3b1e28([0x74,0x68,0x65,0x6e])]===_0x3b1e28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x25ab94[_0x3b1e28([0x63,0x61,0x74,0x63,0x68])]===_0x3b1e28([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2fe33b(_0x22840e){_0x3cd40c(_0x22840e)[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0x7b30f3=>{if(!_0x7b30f3||_0x7b30f3[_0x3b1e28([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3b1e28([0x6f,0x6b]))return _0x3b1e28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2130f(_0x13c3a8(_0x53b76d+_0x603bbf))!=_0x7b30f3[_0x3b1e28([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3b1e28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3b1e28([0x56,0x61,0x6c,0x69,0x64]);})[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0x244ccc=>(_0x582259(),_0x244ccc),()=>{const _0x553540=_0x2e2bab();return null==_0x553540?(_0x582259(),_0x3b1e28([0x56,0x61,0x6c,0x69,0x64])):_0x3b1e28(_0xff4ba4-_0x553540>(0x5e5d0921^_0x4a2760)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0x24d962)[_0x3b1e28([0x63,0x61,0x74,0x63,0x68])](()=>{_0x24d962(_0x3b1e28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2d3dee=0x7a6763a1^_0x4a2760;function _0x582259(){const _0x5da311=_0x3b1e28([0x6c,0x6c,0x63,0x74,0x2d])+_0x2130f(_0x13c3a8(_0x34af4f)),_0x4fdcdb=_0x35beaa(_0x2130f(window[_0x3b1e28([0x4d,0x61,0x74,0x68])][_0x3b1e28([0x63,0x65,0x69,0x6c])](_0xff4ba4/_0x2d3dee)));window[_0x3b1e28([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b1e28([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5da311,_0x4fdcdb);}function _0x2e2bab(){const _0x52220d=_0x3b1e28([0x6c,0x6c,0x63,0x74,0x2d])+_0x2130f(_0x13c3a8(_0x34af4f)),_0x47ca8c=window[_0x3b1e28([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b1e28([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x52220d);return _0x47ca8c?window[_0x3b1e28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x35beaa(_0x47ca8c),0x10)*_0x2d3dee:null;}function _0x3cd40c(_0x33b01d){return new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xec4bcf,_0x3de029)=>{_0x33b01d[_0x3b1e28([0x74,0x68,0x65,0x6e])](_0xec4bcf,_0x3de029),window[_0x3b1e28([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3de029,0x7a5059e1^_0x4a2760);});}}_0x357c7d[_0x3b1e28([0x6f,0x6e])](_0x3b1e28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e786c,_0x3d5f57)=>{if(_0x3d5f57[0x0]!=_0x34af4f)return _0x24d962(_0x3b1e28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d5f57[0x1]={..._0x3d5f57[0x1],[_0x3b1e28([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x53b76d};},{[_0x3b1e28([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b1e28([0x68,0x69,0x67,0x68])}),_0x357c7d[_0x3b1e28([0x6f,0x6e])](_0x3b1e28([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17f417=>{_0x320ecf(_0x17f417[_0x3b1e28([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f833e=!0x0,_0x2fe33b(_0x17f417[_0x3b1e28([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3b1e28([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b1e28([0x6c,0x6f,0x77])}),_0x5b3cd8[_0x3b1e28([0x74,0x68,0x65,0x6e])](()=>{_0x3f833e||_0x24d962(_0x3b1e28([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x375ca1(){return _0x357c7d[_0x3b1e28([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b1e28([0x76,0x69,0x65,0x77])][_0x3b1e28([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3b1e28([0x61,0x75,0x74,0x6f]);}function _0x2fa4e7(){_0x357c7d[_0x3b1e28([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b1e28([0x76,0x69,0x65,0x77])][_0x3b1e28([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3b1e28([0x61,0x75,0x74,0x6f]);}}function _0x341192(_0x38b8ff){const _0x47ee29=[new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f4384=>setTimeout(_0x1f4384,0x7a58b3ed^_0x4a2760)),_0x5b3cd8[_0x3b1e28([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x523aaf=>{let _0x51b0da=0x0;_0x357c7d[_0x3b1e28([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b1e28([0x6f,0x6e])](_0x3b1e28([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3bcaeb,_0x17ae68)=>{_0x17ae68[0x0][_0x3b1e28([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x51b0da++,_0x51b0da==(0x7a518cd9^_0x4a2760)&&(_0x523aaf(),_0x3bcaeb[_0x3b1e28([0x6f,0x66,0x66])]());});}))];return window[_0x3b1e28([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3b1e28([0x72,0x61,0x63,0x65])](_0x47ee29)[_0x3b1e28([0x74,0x68,0x65,0x6e])](()=>_0x38b8ff);}async function _0x3f4ec1(){await _0x5b3cd8,_0x357c7d[_0x3b1e28([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b1e28([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5cd869,_0x357c7d[_0x3b1e28([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b1e28([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5cd869,_0x357c7d[_0x3b1e28([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3b1e28([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x14ad2f(_0x298588){const _0x2e8281=_0x243508();_0x357c7d[_0x2e8281]=_0x3b1e28([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x298588,_0x298588!=_0x3b1e28([0x56,0x61,0x6c,0x69,0x64])&&_0x3f4ec1();}function _0x243508(){const _0x543475=window[_0x3b1e28([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3b1e28([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3b1e28([0x6e,0x6f,0x77])]())[_0x3b1e28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3b1e28([0x2e]),'');let _0x1e5078=_0x3b1e28([0x4f]);for(let _0x5b16dd=0x0;_0x5b16dd<_0x543475[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b16dd+=0x2){let _0x45e6ad=window[_0x3b1e28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x543475[_0x3b1e28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b16dd,_0x5b16dd+0x2));_0x45e6ad>=_0x2fb0cb[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45e6ad-=_0x2fb0cb[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1e5078+=_0x2fb0cb[_0x45e6ad];}return _0x1e5078;}function _0x374278(){const _0xc2dcf1=_0x38a858[_0x3b1e28([0x73,0x70,0x6c,0x69,0x74])](_0x3b1e28([0x2e]));if(0x3!=_0xc2dcf1[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x8ad042(_0xc2dcf1[0x1]);function _0x8ad042(_0x5e9aeb){const _0x55d0fa=_0xf65741(_0x5e9aeb);return _0x55d0fa&&_0x3e061c()?_0x55d0fa:null;function _0x3e061c(){const _0x497922=_0x55d0fa[_0x3b1e28([0x6a,0x74,0x69])],_0x3b9a38=window[_0x3b1e28([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x497922[_0x3b1e28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x497922[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e3c8a={..._0x55d0fa,[_0x3b1e28([0x6a,0x74,0x69])]:_0x497922[_0x3b1e28([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x497922[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e3c8a[_0x3b1e28([0x76,0x63])],_0x13c3a8(_0x2e3c8a)==_0x3b9a38;}}}async function _0x30b819(){let _0x408964=!0x0;try{const _0x5b4a41=_0x38a858[_0x3b1e28([0x73,0x70,0x6c,0x69,0x74])](_0x3b1e28([0x2e])),[_0x4aa57b,_0x41ef84,_0x4f5a3a]=_0x5b4a41;return _0x5faaa(_0x4aa57b),await _0x274132(_0x4aa57b,_0x41ef84,_0x4f5a3a),_0x408964;}catch(_0x15a5fe){return!0x1;}function _0x5faaa(_0x76119d){const _0x183424=_0xf65741(_0x76119d);_0x183424&&_0x183424[_0x3b1e28([0x61,0x6c,0x67])]==_0x3b1e28([0x45,0x53,0x32,0x35,0x36])||(_0x408964=!0x1);}async function _0x274132(_0x417a2d,_0x5a209e,_0x11f067){const _0x177717=window[_0x3b1e28([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3b1e28([0x66,0x72,0x6f,0x6d])](_0x15da3c(_0x11f067),_0x1ab005=>_0x1ab005[_0x3b1e28([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x189d10=new window[(_0x3b1e28([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3b1e28([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x417a2d+_0x3b1e28([0x2e])+_0x5a209e),_0x3a7bc8=window[_0x3b1e28([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3b1e28([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a7bc8)return;const _0x1b7a70=await _0x3a7bc8[_0x3b1e28([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3b1e28([0x6a,0x77,0x6b]),_0x4e0c8f,{[_0x3b1e28([0x6e,0x61,0x6d,0x65])]:_0x3b1e28([0x45,0x43,0x44,0x53,0x41]),[_0x3b1e28([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3b1e28([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3b1e28([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a7bc8[_0x3b1e28([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3b1e28([0x6e,0x61,0x6d,0x65])]:_0x3b1e28([0x45,0x43,0x44,0x53,0x41]),[_0x3b1e28([0x68,0x61,0x73,0x68])]:{[_0x3b1e28([0x6e,0x61,0x6d,0x65])]:_0x3b1e28([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1b7a70,_0x177717,_0x189d10)||(_0x408964=!0x1);}}function _0xf65741(_0x2ac001){return _0x2ac001[_0x3b1e28([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3b1e28([0x65,0x79]))?JSON[_0x3b1e28([0x70,0x61,0x72,0x73,0x65])](_0x15da3c(_0x2ac001)):null;}function _0x15da3c(_0x4ceafe){return window[_0x3b1e28([0x61,0x74,0x6f,0x62])](_0x4ceafe[_0x3b1e28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3b1e28([0x2b]))[_0x3b1e28([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3b1e28([0x2f])));}function _0x13c3a8(_0x2cf3ea){let _0x25bcc7=0x1505;function _0x229d9c(_0x5ed81e){for(let _0x4c8fcd=0x0;_0x4c8fcd<_0x5ed81e[_0x3b1e28([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c8fcd++){const _0x25161d=_0x5ed81e[_0x3b1e28([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4c8fcd);_0x25bcc7=(_0x25bcc7<<0x5)+_0x25bcc7+_0x25161d,_0x25bcc7&=_0x25bcc7;}}function _0x33b03b(_0x21ef6a){Array[_0x3b1e28([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x21ef6a)?_0x21ef6a[_0x3b1e28([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x33b03b):_0x21ef6a&&typeof _0x21ef6a==_0x3b1e28([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3b1e28([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x21ef6a)[_0x3b1e28([0x73,0x6f,0x72,0x74])]()[_0x3b1e28([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1e8dc7,_0x4e4f32])=>{_0x229d9c(_0x1e8dc7),_0x33b03b(_0x4e4f32);}):_0x229d9c(window[_0x3b1e28([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x21ef6a));}return _0x33b03b(_0x2cf3ea),_0x25bcc7>>>0x0;}function _0x2130f(_0x41219d){return _0x41219d[_0x3b1e28([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3b1e28([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3b1e28([0x30]));}function _0x35beaa(_0x3333c6){return _0x3333c6[_0x3b1e28([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3b1e28([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3b1e28([0x6a,0x6f,0x69,0x6e])]('');}function _0x5cd869(){}function _0x3b1e28(_0x5dfc01){const _0x9c80ad=_0x2520;return _0x5dfc01[_0x9c80ad(0x130)](_0x55c866=>String[_0x9c80ad(0x158)](_0x55c866))[_0x9c80ad(0x12d)]('');}_0x14ad2f(await _0x5d87ef());}(this);}[_0x56cf66(0x16d)](){const _0x1c9e51=_0x56cf66,_0x4ef7d1=this[_0x1c9e51(0x142)][_0x1c9e51(0x128)][_0x1c9e51(0x14c)];_0x4ef7d1[_0x1c9e51(0x132)](_0x1c9e51(0x153))&&_0x4ef7d1[_0x1c9e51(0x121)](_0x1c9e51(0x153),{'allowAttributes':[_0x1c9e51(0x155)]}),_0x4ef7d1[_0x1c9e51(0x132)](_0x1c9e51(0x15e))&&_0x4ef7d1[_0x1c9e51(0x121)](_0x1c9e51(0x15e),{'allowAttributes':[_0x1c9e51(0x155)]});}[_0x56cf66(0x126)](){const _0x9bb09=_0x56cf66,_0x7f4561=this[_0x9bb09(0x142)];_0x7f4561[_0x9bb09(0x169)][_0x9bb09(0x167)](_0x9bb09(0x136))[_0x9bb09(0x156)]({'model':_0x9bb09(0x155),'view':_0x9bb09(0x138)}),_0x7f4561[_0x9bb09(0x169)][_0x9bb09(0x167)](_0x9bb09(0x11d))[_0x9bb09(0x12e)]({'model':{'key':_0x9bb09(0x155),'value':_0x21adc8=>_0x21adc8[_0x9bb09(0x165)](_0x9bb09(0x138))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x232c22=_0x7f4561[_0x9bb09(0x14d)][_0x9bb09(0x16c)](_0x9bb09(0x127));_0x232c22&&this[_0x9bb09(0x15d)](_0x232c22,_0x9bb09(0x163),(_0x5d8102,[_0x173a89,_0x4dd1b2])=>{const _0x2edd28=_0x9bb09;_0x173a89[_0x2edd28(0x148)](_0x2edd28(0x155),_0x4dd1b2);});}[_0x56cf66(0x12a)](){const _0x14c046=_0x56cf66,_0x4fb57f=this[_0x14c046(0x142)][_0x14c046(0x143)][_0x14c046(0x16c)](_0x14c046(0x147))||{},_0x1ea874=this[_0x14c046(0x142)][_0x14c046(0x143)][_0x14c046(0x16c)](_0x14c046(0x11e))||'';this[_0x14c046(0x13a)]=_0x4840f9(_0x1ce684[_0x14c046(0x120)],_0x14c046(0x123),{..._0x4fb57f,'pubkey':_0x1ea874,'ctx-name':_0x14c046(0x139),'sourceList':'','imgOnly':_0x14c046(0x149),'removeCopyright':_0x14c046(0x149),'localeName':this[_0x14c046(0x142)][_0x14c046(0x161)][_0x14c046(0x14e)],'externalSourcesEmbedCss':_0x14c046(0x134)}),this[_0x14c046(0x13a)][_0x14c046(0x141)]=_0x2a1618=>{const _0x319ef3=_0x14c046;if(_0x319ef3(0x145)==_0x2a1618)return _0x319ef3(0x14f);},_0x1ce684[_0x14c046(0x120)][_0x14c046(0x13e)][_0x14c046(0x168)](this[_0x14c046(0x13a)]);}[_0x56cf66(0x15f)](){const _0x2c741b=_0x56cf66;this[_0x2c741b(0x144)]=_0x4840f9(_0x1ce684[_0x2c741b(0x120)],_0x2c741b(0x151),{'ctx-name':_0x2c741b(0x139)}),_0x1ce684[_0x2c741b(0x120)][_0x2c741b(0x13e)][_0x2c741b(0x168)](this[_0x2c741b(0x144)]);}[_0x56cf66(0x122)](){const _0x522ce5=_0x56cf66,_0x449fb7=this[_0x522ce5(0x142)][_0x522ce5(0x14d)][_0x522ce5(0x16c)](_0x522ce5(0x16e));_0x449fb7&&this[_0x522ce5(0x15d)](_0x449fb7,_0x522ce5(0x11f),()=>{const _0xdea683=_0x522ce5,_0x1c1063=this[_0xdea683(0x142)][_0xdea683(0x128)][_0xdea683(0x120)][_0xdea683(0x13b)][_0xdea683(0x162)]();_0x1c1063&&_0x1c1063[_0xdea683(0x165)](_0xdea683(0x155))&&this[_0xdea683(0x142)][_0xdea683(0x150)][_0xdea683(0x131)][_0xdea683(0x166)](_0xdea683(0x15a),()=>{const _0x3c3fcb=_0xdea683;_0x19c6b1(this[_0x3c3fcb(0x142)],_0x1c1063);});});const _0x2fac61=this[_0x522ce5(0x142)][_0x522ce5(0x14d)][_0x522ce5(0x16c)](_0x522ce5(0x124));_0x2fac61&&this[_0x522ce5(0x15d)](_0x2fac61,_0x522ce5(0x11f),()=>{const _0x26de24=_0x522ce5,_0x5e2655=this[_0x26de24(0x142)][_0x26de24(0x128)][_0x26de24(0x120)][_0x26de24(0x13b)][_0x26de24(0x162)]();_0x5e2655&&_0x5e2655[_0x26de24(0x165)](_0x26de24(0x155))&&this[_0x26de24(0x142)][_0x26de24(0x150)][_0x26de24(0x131)][_0x26de24(0x166)](_0x26de24(0x15a),()=>{const _0x1e0bd8=_0x26de24;_0x19c6b1(this[_0x1e0bd8(0x142)],_0x5e2655);});});}}
|
|
23
|
+
const _0x3d3102=_0x33c8;function _0x5d90(){const _0xacb727=['selection','998360RMGqIh','_initImageProcessingIndicator','isOfficialPlugin','_initSchema','cleanupImage','iconHrefResolver','execute','init','PictureEditing','downcast','uc-upload-ctx-provider','closeMax','_initConversion','uploadcare.uploader','conversion','\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','uc-config','10feAacK','render','requires','data-uc-image-id','522948ygSbSI','remove','commands','get','UploadcareEditing','6767368XsOTYC','attributeToAttribute','uploadcare.pubkey','ctxElement','join','elementToAttribute','842TmvUEn','destroy','input[uploadcare-file-input]','href','add','true','querySelector','document','for','locale','63ifpljr','84Avppyk','config','appendChild','156BwgVMc','configElement','#uc-icon-arrow-down','extend','model','fromCharCode','isRegistered','listenTo','_initConfig','461747ZnsVHg','upcast','pluginName','uploadcare','uploadcareImageId','replaceImageSource','view','editing','removeAttribute','70473VTLxnf','imageInline','map','uploader','body','once','_ctxElement','contentLanguage','imageBlock','insertImage','_initCtx','uploadcareImageReplace','schema','getAttribute','getSelectedElement','isPremiumPlugin','4731KoHvVR','310709LInURY','editor','_configElement','afterInit'];_0x5d90=function(){return _0xacb727;};return _0x5d90();}(function(_0x430cf3,_0x48eeac){const _0x407ad3=_0x33c8,_0x350556=_0x430cf3();while(!![]){try{const _0x47c971=parseInt(_0x407ad3(0x1d7))/0x1+parseInt(_0x407ad3(0x1b7))/0x2*(-parseInt(_0x407ad3(0x1e7))/0x3)+-parseInt(_0x407ad3(0x1ac))/0x4*(parseInt(_0x407ad3(0x1fe))/0x5)+-parseInt(_0x407ad3(0x1c2))/0x6*(-parseInt(_0x407ad3(0x1e8))/0x7)+parseInt(_0x407ad3(0x1b1))/0x8+parseInt(_0x407ad3(0x1c1))/0x9*(-parseInt(_0x407ad3(0x1ed))/0xa)+parseInt(_0x407ad3(0x1ce))/0xb*(parseInt(_0x407ad3(0x1c5))/0xc);if(_0x47c971===_0x48eeac)break;else _0x350556['push'](_0x350556['shift']());}catch(_0x440482){_0x350556['push'](_0x350556['shift']());}}}(_0x5d90,0x70206));import{Plugin as _0x24c59d}from'ckeditor5/src/core.js';import{Dialog as _0x4a7804}from'ckeditor5/src/ui.js';import{createElement as _0x2d789a,global as _0xa425db,uid as _0x4b64e2}from'ckeditor5/src/utils.js';import _0x38c8e6 from'./uploadcarecommand.js';function _0x33c8(_0x37621c,_0x5f10c0){const _0x5d9004=_0x5d90();return _0x33c8=function(_0x33c8d1,_0x154cd1){_0x33c8d1=_0x33c8d1-0x1ab;let _0x24f4fa=_0x5d9004[_0x33c8d1];return _0x24f4fa;},_0x33c8(_0x37621c,_0x5f10c0);}import _0x1ee81c from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x33e57f}from'./utils/editingutils.js';export default class i extends _0x24c59d{[_0x3d3102(0x1ea)]=null;[_0x3d3102(0x1dd)]=null;static get[_0x3d3102(0x1d0)](){const _0x55f6fa=_0x3d3102;return _0x55f6fa(0x1b0);}static get[_0x3d3102(0x200)](){const _0x1ad675=_0x3d3102;return[_0x1ad675(0x1f5),_0x1ee81c,_0x4a7804];}static get[_0x3d3102(0x1ef)](){return!0x0;}static get[_0x3d3102(0x1e6)](){return!0x0;}get[_0x3d3102(0x1c6)](){const _0x27d98a=_0x3d3102;return this[_0x27d98a(0x1ea)];}get[_0x3d3102(0x1b4)](){const _0x1108be=_0x3d3102;return this[_0x1108be(0x1dd)];}[_0x3d3102(0x1f4)](){const _0x3ee8e1=_0x3d3102,_0x8c25f8=this[_0x3ee8e1(0x1e9)];_0x8c25f8[_0x3ee8e1(0x1ae)][_0x3ee8e1(0x1bb)](_0x3ee8e1(0x1d1),new _0x38c8e6(_0x8c25f8));}[_0x3d3102(0x1eb)](){const _0x59ec3e=_0x3d3102;this[_0x59ec3e(0x1f0)](),this[_0x59ec3e(0x1f9)](),this[_0x59ec3e(0x1cd)](),this[_0x59ec3e(0x1e1)](),this[_0x59ec3e(0x1ee)](),this[_0x59ec3e(0x1cc)](this[_0x59ec3e(0x1e9)],_0x59ec3e(0x1b8),()=>{const _0x696ee0=_0x59ec3e;this[_0x696ee0(0x1ea)]&&(this[_0x696ee0(0x1ea)][_0x696ee0(0x1ad)](),this[_0x696ee0(0x1ea)]=null),this[_0x696ee0(0x1dd)]&&(this[_0x696ee0(0x1dd)][_0x696ee0(0x1ad)](),this[_0x696ee0(0x1dd)]=null);const _0x24f2c8=_0xa425db[_0x696ee0(0x1be)][_0x696ee0(0x1bd)](_0x696ee0(0x1b9));_0x24f2c8&&_0x24f2c8[_0x696ee0(0x1ad)]();}),async function(_0x2dbd1b){const _0x40bce8=_0x3819cb([0x32,0x7a,0x41,0x38,0x47,0x5a,0x76,0x67,0x62,0x71,0x31,0x4c,0x48,0x4f,0x42,0x36,0x44,0x59,0x61,0x51,0x4e,0x37,0x57,0x50,0x34,0x79,0x6e,0x55,0x70,0x73,0x6c,0x75,0x30,0x52,0x49,0x78,0x46,0x77,0x33,0x65,0x72,0x63,0x69,0x6f,0x53,0x4d,0x6d,0x45,0x54,0x66,0x68,0x64,0x6a,0x4b,0x4a,0x35,0x43,0x56,0x6b,0x58,0x74,0x39]),_0x5b9613=0xd71353d,_0x39629b=0xd7655bd^_0x5b9613,_0x56994e=window[_0x3819cb([0x44,0x61,0x74,0x65])][_0x3819cb([0x6e,0x6f,0x77])](),_0x1ecb09=_0x2dbd1b[_0x3819cb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x254d8a=new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1a947c=>{_0x1ecb09[_0x3819cb([0x6f,0x6e,0x63,0x65])](_0x3819cb([0x72,0x65,0x61,0x64,0x79]),_0x1a947c);}),_0x19fda0={[_0x3819cb([0x6b,0x74,0x79])]:_0x3819cb([0x45,0x43]),[_0x3819cb([0x75,0x73,0x65])]:_0x3819cb([0x73,0x69,0x67]),[_0x3819cb([0x63,0x72,0x76])]:_0x3819cb([0x50,0x2d,0x32,0x35,0x36]),[_0x3819cb([0x78])]:_0x3819cb([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]),[_0x3819cb([0x79])]:_0x3819cb([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]),[_0x3819cb([0x61,0x6c,0x67])]:_0x3819cb([0x45,0x53,0x32,0x35,0x36])},_0x2d4372=_0x1ecb09[_0x3819cb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3819cb([0x67,0x65,0x74])](_0x3819cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2bb6b0(){let _0x1d7e1c,_0x959179=null,_0x440175=null;try{if(_0x2d4372==_0x3819cb([0x47,0x50,0x4c]))return _0x3819cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d7e1c=_0x33d058(),!_0x1d7e1c)return _0x3819cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d7e1c[_0x3819cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x440175=_0x5d23cd(_0x1d7e1c[_0x3819cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d7e1c[_0x3819cb([0x6a,0x74,0x69])])),await _0x878dca()?_0x10ff9e()?_0x1c5db9()?_0x3819cb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4f5cf7()?(_0x1d7e1c[_0x3819cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3819cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x959179=_0x453c6e(_0x3819cb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d7e1c[_0x3819cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3819cb([0x74,0x72,0x69,0x61,0x6c])&&(_0x959179=_0x453c6e(_0x3819cb([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x536b9()):_0x3819cb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3819cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3819cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5828fe){return _0x3819cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1c5db9(){const _0x40dd88=[_0x3819cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3819cb([0x74,0x72,0x69,0x61,0x6c])][_0x3819cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7e1c[_0x3819cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56994e/0x3e8:0xe10*_0x39629b;return _0x1d7e1c[_0x3819cb([0x65,0x78,0x70])]<_0x40dd88;}function _0x10ff9e(){const _0x3a1da9=_0x1d7e1c[_0x3819cb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3a1da9&&(!!_0x3a1da9[_0x3819cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3819cb([0x2a]))||!!_0x3a1da9[_0x3819cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3819cb([0x55,0x50,0x4c,0x43])));}function _0x4f5cf7(){const _0x2f0041=_0x33c8,_0x766593=_0x1d7e1c[_0x3819cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x766593||0x0==_0x766593[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x100c9d}=new URL(window[_0x3819cb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x2f0041(0x1ba)]);if(_0x766593[_0x3819cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x100c9d))return!0x0;const _0x563dae=_0x100c9d[_0x3819cb([0x73,0x70,0x6c,0x69,0x74])](_0x3819cb([0x2e]));return _0x766593[_0x3819cb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22af04=>_0x22af04[_0x3819cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3819cb([0x2a])))[_0x3819cb([0x6d,0x61,0x70])](_0x1abd04=>_0x1abd04[_0x3819cb([0x73,0x70,0x6c,0x69,0x74])](_0x3819cb([0x2e])))[_0x3819cb([0x73,0x6f,0x6d,0x65])](_0x3d4a1f=>_0x563dae[_0x3819cb([0x65,0x76,0x65,0x72,0x79])]((_0x33e92c,_0x4c6378)=>_0x3d4a1f[_0x4c6378]===_0x33e92c||_0x3d4a1f[_0x4c6378]===_0x3819cb([0x2a])));}function _0x536b9(){return _0x959179&&_0x440175?new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xbcf8c9,_0x4ab987)=>{_0x959179[_0x3819cb([0x74,0x68,0x65,0x6e])](_0xbcf8c9,_0x4ab987),_0x440175[_0x3819cb([0x74,0x68,0x65,0x6e])](_0x3d6dcb=>{_0x3d6dcb!=_0x3819cb([0x56,0x61,0x6c,0x69,0x64])&&_0xbcf8c9(_0x3d6dcb);},_0x4ab987);}):_0x959179||_0x440175||_0x3819cb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d23cd(_0x2cc580,_0x867a67){return new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ece7b=>{if(_0x554fb8())return _0x3ece7b(_0x3819cb([0x56,0x61,0x6c,0x69,0x64]));_0xeaf8a6(),_0x1ecb09[_0x3819cb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3819cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f4b79=!0x1;const _0x27c06a=_0x4b64e2();function _0x2d060c(_0x5939c1){return!!_0x5939c1&&(typeof _0x5939c1===_0x3819cb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5939c1===_0x3819cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5939c1[_0x3819cb([0x74,0x68,0x65,0x6e])]===_0x3819cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5939c1[_0x3819cb([0x63,0x61,0x74,0x63,0x68])]===_0x3819cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x466050(_0x5881d4){_0x5a407c(_0x5881d4)[_0x3819cb([0x74,0x68,0x65,0x6e])](_0x12a29d=>{if(!_0x12a29d||_0x12a29d[_0x3819cb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3819cb([0x6f,0x6b]))return _0x3819cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x352ba5(_0x2d3e60(_0x27c06a+_0x867a67))!=_0x12a29d[_0x3819cb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3819cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3819cb([0x56,0x61,0x6c,0x69,0x64]);})[_0x3819cb([0x74,0x68,0x65,0x6e])](_0x1ca9b9=>(_0x2bcd0b(),_0x1ca9b9),()=>{const _0x5ef319=_0x4c57f7();return null==_0x5ef319?(_0x2bcd0b(),_0x3819cb([0x56,0x61,0x6c,0x69,0x64])):_0x3819cb(_0x56994e-_0x5ef319>(0x297db13d^_0x5b9613)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3819cb([0x74,0x68,0x65,0x6e])](_0x3ece7b)[_0x3819cb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3ece7b(_0x3819cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ca777=0xd47dbbd^_0x5b9613;function _0x2bcd0b(){const _0x26852a=_0x3819cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x352ba5(_0x2d3e60(_0x2cc580)),_0x5a586c=_0x56877a(_0x352ba5(window[_0x3819cb([0x4d,0x61,0x74,0x68])][_0x3819cb([0x63,0x65,0x69,0x6c])](_0x56994e/_0x3ca777)));window[_0x3819cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3819cb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26852a,_0x5a586c);}function _0x4c57f7(){const _0x3fd2f9=_0x3819cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x352ba5(_0x2d3e60(_0x2cc580)),_0x47be66=window[_0x3819cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3819cb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fd2f9);return _0x47be66?window[_0x3819cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56877a(_0x47be66),0x10)*_0x3ca777:null;}function _0x5a407c(_0x1b1bc8){return new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x423f7c,_0x2a9ef9)=>{_0x1b1bc8[_0x3819cb([0x74,0x68,0x65,0x6e])](_0x423f7c,_0x2a9ef9),window[_0x3819cb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2a9ef9,0xd70e1fd^_0x5b9613);});}}_0x1ecb09[_0x3819cb([0x6f,0x6e])](_0x3819cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4788d4,_0x40d515)=>{if(_0x40d515[0x0]!=_0x2cc580)return _0x3ece7b(_0x3819cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40d515[0x1]={..._0x40d515[0x1],[_0x3819cb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x27c06a};},{[_0x3819cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3819cb([0x68,0x69,0x67,0x68])}),_0x1ecb09[_0x3819cb([0x6f,0x6e])](_0x3819cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1297ab=>{_0x2d060c(_0x1297ab[_0x3819cb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f4b79=!0x0,_0x466050(_0x1297ab[_0x3819cb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3819cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3819cb([0x6c,0x6f,0x77])}),_0x254d8a[_0x3819cb([0x74,0x68,0x65,0x6e])](()=>{_0x3f4b79||_0x3ece7b(_0x3819cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x554fb8(){return _0x1ecb09[_0x3819cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3819cb([0x76,0x69,0x65,0x77])][_0x3819cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3819cb([0x61,0x75,0x74,0x6f]);}function _0xeaf8a6(){_0x1ecb09[_0x3819cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3819cb([0x76,0x69,0x65,0x77])][_0x3819cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3819cb([0x61,0x75,0x74,0x6f]);}}function _0x453c6e(_0x48285c){const _0x2c22db=[new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52f6d6=>setTimeout(_0x52f6d6,0xd780bf1^_0x5b9613)),_0x254d8a[_0x3819cb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x592a47=>{let _0x340832=0x0;_0x1ecb09[_0x3819cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3819cb([0x6f,0x6e])](_0x3819cb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x388b3b,_0x35e350)=>{_0x35e350[0x0][_0x3819cb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x340832++,_0x340832==(0xd7134c5^_0x5b9613)&&(_0x592a47(),_0x388b3b[_0x3819cb([0x6f,0x66,0x66])]());});}))];return window[_0x3819cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3819cb([0x72,0x61,0x63,0x65])](_0x2c22db)[_0x3819cb([0x74,0x68,0x65,0x6e])](()=>_0x48285c);}async function _0x352705(){await _0x254d8a,_0x1ecb09[_0x3819cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3819cb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x41bd4a,_0x1ecb09[_0x3819cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3819cb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x41bd4a,_0x1ecb09[_0x3819cb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3819cb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x327e0b(_0x5dcebf){const _0xce6dc8=_0x6cb473();_0x1ecb09[_0xce6dc8]=_0x3819cb([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5dcebf,_0x5dcebf!=_0x3819cb([0x56,0x61,0x6c,0x69,0x64])&&_0x352705();}function _0x6cb473(){const _0x137308=window[_0x3819cb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3819cb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3819cb([0x6e,0x6f,0x77])]())[_0x3819cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3819cb([0x2e]),'');let _0x2ff431=_0x3819cb([0x7a]);for(let _0x122cd5=0x0;_0x122cd5<_0x137308[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x122cd5+=0x2){let _0x446d7a=window[_0x3819cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x137308[_0x3819cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x122cd5,_0x122cd5+0x2));_0x446d7a>=_0x40bce8[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x446d7a-=_0x40bce8[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ff431+=_0x40bce8[_0x446d7a];}return _0x2ff431;}function _0x33d058(){const _0x449a07=_0x2d4372[_0x3819cb([0x73,0x70,0x6c,0x69,0x74])](_0x3819cb([0x2e]));if(0x3!=_0x449a07[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3168f6(_0x449a07[0x1]);function _0x3168f6(_0x2eff84){const _0x4d0782=_0x453dbb(_0x2eff84);return _0x4d0782&&_0x1b0d7d()?_0x4d0782:null;function _0x1b0d7d(){const _0x4963f3=_0x4d0782[_0x3819cb([0x6a,0x74,0x69])],_0x386422=window[_0x3819cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4963f3[_0x3819cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4963f3[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xce1018={..._0x4d0782,[_0x3819cb([0x6a,0x74,0x69])]:_0x4963f3[_0x3819cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4963f3[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xce1018[_0x3819cb([0x76,0x63])],_0x2d3e60(_0xce1018)==_0x386422;}}}async function _0x878dca(){let _0x4aea50=!0x0;try{const _0x123f87=_0x2d4372[_0x3819cb([0x73,0x70,0x6c,0x69,0x74])](_0x3819cb([0x2e])),[_0x16feeb,_0x34c42f,_0x4f0fb6]=_0x123f87;return _0x498359(_0x16feeb),await _0x30e602(_0x16feeb,_0x34c42f,_0x4f0fb6),_0x4aea50;}catch(_0x391ff9){return!0x1;}function _0x498359(_0x3849b9){const _0x49684b=_0x453dbb(_0x3849b9);_0x49684b&&_0x49684b[_0x3819cb([0x61,0x6c,0x67])]==_0x3819cb([0x45,0x53,0x32,0x35,0x36])||(_0x4aea50=!0x1);}async function _0x30e602(_0x20a11e,_0x10d6a9,_0xa3f548){const _0x54407c=window[_0x3819cb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3819cb([0x66,0x72,0x6f,0x6d])](_0x1eb886(_0xa3f548),_0x3fbc61=>_0x3fbc61[_0x3819cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5e999c=new window[(_0x3819cb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3819cb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20a11e+_0x3819cb([0x2e])+_0x10d6a9),_0xfb2b66=window[_0x3819cb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3819cb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xfb2b66)return;const _0x2252d5=await _0xfb2b66[_0x3819cb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3819cb([0x6a,0x77,0x6b]),_0x19fda0,{[_0x3819cb([0x6e,0x61,0x6d,0x65])]:_0x3819cb([0x45,0x43,0x44,0x53,0x41]),[_0x3819cb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3819cb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3819cb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xfb2b66[_0x3819cb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3819cb([0x6e,0x61,0x6d,0x65])]:_0x3819cb([0x45,0x43,0x44,0x53,0x41]),[_0x3819cb([0x68,0x61,0x73,0x68])]:{[_0x3819cb([0x6e,0x61,0x6d,0x65])]:_0x3819cb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2252d5,_0x54407c,_0x5e999c)||(_0x4aea50=!0x1);}}function _0x453dbb(_0x3571bd){return _0x3571bd[_0x3819cb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3819cb([0x65,0x79]))?JSON[_0x3819cb([0x70,0x61,0x72,0x73,0x65])](_0x1eb886(_0x3571bd)):null;}function _0x1eb886(_0x109714){return window[_0x3819cb([0x61,0x74,0x6f,0x62])](_0x109714[_0x3819cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3819cb([0x2b]))[_0x3819cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3819cb([0x2f])));}function _0x2d3e60(_0x4503db){let _0x3f0f89=0x1505;function _0x57d246(_0x188b27){for(let _0x2f9ea7=0x0;_0x2f9ea7<_0x188b27[_0x3819cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f9ea7++){const _0xe1c60c=_0x188b27[_0x3819cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2f9ea7);_0x3f0f89=(_0x3f0f89<<0x5)+_0x3f0f89+_0xe1c60c,_0x3f0f89&=_0x3f0f89;}}function _0x585976(_0xd64f7c){Array[_0x3819cb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xd64f7c)?_0xd64f7c[_0x3819cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x585976):_0xd64f7c&&typeof _0xd64f7c==_0x3819cb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3819cb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xd64f7c)[_0x3819cb([0x73,0x6f,0x72,0x74])]()[_0x3819cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x488500,_0x2c5a87])=>{_0x57d246(_0x488500),_0x585976(_0x2c5a87);}):_0x57d246(window[_0x3819cb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xd64f7c));}return _0x585976(_0x4503db),_0x3f0f89>>>0x0;}function _0x352ba5(_0x462bf8){return _0x462bf8[_0x3819cb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3819cb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3819cb([0x30]));}function _0x56877a(_0xbd6c67){return _0xbd6c67[_0x3819cb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3819cb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3819cb([0x6a,0x6f,0x69,0x6e])]('');}function _0x41bd4a(){}function _0x3819cb(_0x3686f7){const _0x289091=_0x33c8;return _0x3686f7[_0x289091(0x1d9)](_0x422d76=>String[_0x289091(0x1ca)](_0x422d76))[_0x289091(0x1b5)]('');}_0x327e0b(await _0x2bb6b0());}(this);}[_0x3d3102(0x1f0)](){const _0x45056e=_0x3d3102,_0x8bd245=this[_0x45056e(0x1e9)][_0x45056e(0x1c9)][_0x45056e(0x1e3)];_0x8bd245[_0x45056e(0x1cb)](_0x45056e(0x1df))&&_0x8bd245[_0x45056e(0x1c8)](_0x45056e(0x1df),{'allowAttributes':[_0x45056e(0x1d2)]}),_0x8bd245[_0x45056e(0x1cb)](_0x45056e(0x1d8))&&_0x8bd245[_0x45056e(0x1c8)](_0x45056e(0x1d8),{'allowAttributes':[_0x45056e(0x1d2)]});}[_0x3d3102(0x1f9)](){const _0x479b77=_0x3d3102,_0x3d16e5=this[_0x479b77(0x1e9)];_0x3d16e5[_0x479b77(0x1fb)][_0x479b77(0x1bf)](_0x479b77(0x1f6))[_0x479b77(0x1b2)]({'model':_0x479b77(0x1d2),'view':_0x479b77(0x1ab)}),_0x3d16e5[_0x479b77(0x1fb)][_0x479b77(0x1bf)](_0x479b77(0x1cf))[_0x479b77(0x1b6)]({'model':{'key':_0x479b77(0x1d2),'value':_0x50f389=>_0x50f389[_0x479b77(0x1e4)](_0x479b77(0x1ab))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x359f9f=_0x3d16e5[_0x479b77(0x1ae)][_0x479b77(0x1af)](_0x479b77(0x1d3));_0x359f9f&&this[_0x479b77(0x1cc)](_0x359f9f,_0x479b77(0x1f1),(_0x4e9394,[_0x499a46,_0x9d5a7a])=>{const _0x365c05=_0x479b77;_0x499a46[_0x365c05(0x1d6)](_0x365c05(0x1d2),_0x9d5a7a);});}[_0x3d3102(0x1cd)](){const _0x21700a=_0x3d3102,_0x534568=this[_0x21700a(0x1e9)][_0x21700a(0x1c3)][_0x21700a(0x1af)](_0x21700a(0x1fa))||{},_0x2ebcae=this[_0x21700a(0x1e9)][_0x21700a(0x1c3)][_0x21700a(0x1af)](_0x21700a(0x1b3))||'';this[_0x21700a(0x1ea)]=_0x2d789a(_0xa425db[_0x21700a(0x1be)],_0x21700a(0x1fd),{..._0x534568,'pubkey':_0x2ebcae,'ctx-name':_0x21700a(0x1da),'sourceList':'','imgOnly':_0x21700a(0x1bc),'removeCopyright':_0x21700a(0x1bc),'localeName':this[_0x21700a(0x1e9)][_0x21700a(0x1c0)][_0x21700a(0x1de)],'externalSourcesEmbedCss':_0x21700a(0x1fc)}),this[_0x21700a(0x1ea)][_0x21700a(0x1f2)]=_0x3939d9=>{const _0x7c99f1=_0x21700a;if(_0x7c99f1(0x1f8)==_0x3939d9)return _0x7c99f1(0x1c7);},_0xa425db[_0x21700a(0x1be)][_0x21700a(0x1db)][_0x21700a(0x1c4)](this[_0x21700a(0x1ea)]);}[_0x3d3102(0x1e1)](){const _0x488645=_0x3d3102;this[_0x488645(0x1dd)]=_0x2d789a(_0xa425db[_0x488645(0x1be)],_0x488645(0x1f7),{'ctx-name':_0x488645(0x1da)}),_0xa425db[_0x488645(0x1be)][_0x488645(0x1db)][_0x488645(0x1c4)](this[_0x488645(0x1dd)]);}[_0x3d3102(0x1ee)](){const _0xf7cfea=_0x3d3102,_0x28993a=this[_0xf7cfea(0x1e9)][_0xf7cfea(0x1ae)][_0xf7cfea(0x1af)](_0xf7cfea(0x1e0));_0x28993a&&this[_0xf7cfea(0x1cc)](_0x28993a,_0xf7cfea(0x1f3),()=>{const _0x291299=_0xf7cfea,_0x4e05f5=this[_0x291299(0x1e9)][_0x291299(0x1c9)][_0x291299(0x1be)][_0x291299(0x1ec)][_0x291299(0x1e5)]();_0x4e05f5&&_0x4e05f5[_0x291299(0x1e4)](_0x291299(0x1d2))&&this[_0x291299(0x1e9)][_0x291299(0x1d5)][_0x291299(0x1d4)][_0x291299(0x1dc)](_0x291299(0x1ff),()=>{const _0x127a7b=_0x291299;_0x33e57f(this[_0x127a7b(0x1e9)],_0x4e05f5);});});const _0xefb62e=this[_0xf7cfea(0x1e9)][_0xf7cfea(0x1ae)][_0xf7cfea(0x1af)](_0xf7cfea(0x1e2));_0xefb62e&&this[_0xf7cfea(0x1cc)](_0xefb62e,_0xf7cfea(0x1f3),()=>{const _0x3f8a80=_0xf7cfea,_0x127941=this[_0x3f8a80(0x1e9)][_0x3f8a80(0x1c9)][_0x3f8a80(0x1be)][_0x3f8a80(0x1ec)][_0x3f8a80(0x1e5)]();_0x127941&&_0x127941[_0x3f8a80(0x1e4)](_0x3f8a80(0x1d2))&&this[_0x3f8a80(0x1e9)][_0x3f8a80(0x1d5)][_0x3f8a80(0x1d4)][_0x3f8a80(0x1dc)](_0x3f8a80(0x1ff),()=>{const _0x59da62=_0x3f8a80;_0x33e57f(this[_0x59da62(0x1e9)],_0x127941);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x23d08a,ObservableMixin as _0x59d929}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x381f3d}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x312bdc}from'ckeditor5/src/icons.js';import _0xaa60b1 from'./uploadcareimageeditformview.js';import _0x1f7297 from'../../utils/uploadutils.js';import{getImageUrls as _0x590b11,getImageDimension as _0x17ee1f}from'../../utils/editingutils.js';import{isAncestor as _0xe418cf}from'../../utils/isancestor.js';export default class z extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x59d929(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x345048,_0x226a99,_0x28e337){super(),this['_editor']=_0x345048,this['_dialog']=_0x226a99,this['_imageElement']=_0x28e337,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 _0x3820a5=this['_imageElement'],_0x52a3c6=_0x3820a5['getAttribute']('uploadcareImageId'),_0x37dfb0=_0x3820a5['getAttribute']('src');if(_0x52a3c6)await this['_loadImageInfo'](_0x52a3c6,_0x37dfb0);else{if(this['_imageCache']['has'](_0x37dfb0)){const _0x2d544f=this['_imageCache']['get'](_0x37dfb0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2d544f['url'],this['imageDimension']=_0x2d544f['dimension'],this['imageId']=_0x2d544f['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2c4f86}=this['_editor'],t=_0x2c4f86['t'],_0x9003d2=new _0xaa60b1(_0x2c4f86,this['imageStatus'],this['_attributes']);_0x9003d2['bind']('status')['to'](this,'imageStatus'),_0x9003d2['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x9003d2['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x9003d2['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x9003d2,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x312bdc,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x9003d2,'position':_0x381f3d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x9003d2['focus']();},'onHide':()=>{_0x9003d2['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5d3960=>!_0xe418cf(_0x5d3960,_0x9003d2['element'])}});}['_loadImageInfo'](_0x5cc8b1,_0x28c6c2){return _0x1f7297['getInfo'](_0x5cc8b1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x40eaf3=>{const {width:_0x57dd5c,height:_0x4a5505}=_0x40eaf3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x28c6c2,this['imageDimension']={'width':_0x57dd5c,'height':_0x4a5505},this['imageId']=_0x5cc8b1;})['catch'](_0x125067=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x125067['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5d8c87,_0x558ab0){return this['_getImageAsFile'](_0x5d8c87)['then'](_0x3202a2=>_0x1f7297['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x558ab0['signal'],'file':_0x3202a2,'onProgress':_0x5ed1e1=>{_0x5ed1e1&&_0x5ed1e1['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5ed1e1['value']));}}))['then'](_0x4ed48a=>{const {width:_0x2cad1d,height:_0x8407b5}=_0x4ed48a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ed48a['cdnUrl'],this['imageDimension']={'width':_0x2cad1d,'height':_0x8407b5},this['imageId']=_0x4ed48a['uuid'],this['imageUploadProgress']=null;const _0x37c229=_0x5d8c87['getAttribute']('src');this['_imageCache']['set'](_0x37c229,{'id':_0x4ed48a['uuid'],'url':_0x4ed48a['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x187c31=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x187c31['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1eb002,_0x212608){_0x1eb002['on']('apply',(_0x2c1e65,_0x388469)=>{this['_replaceImage'](_0x212608,_0x388469['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1eb002['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1eb002['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x16f2cd,_0x359bfa,_0x4bf22b){const _0x42509f=this['_editor'],{width:_0x5b7b50,height:_0x21d6a2}=_0x17ee1f(_0x359bfa,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x9c2b9b,imageSources:_0x40cc9e}=_0x590b11(_0x359bfa,_0x5b7b50);_0x42509f['model']['change'](_0x50966d=>{if('$graveyard'===_0x16f2cd['root']['rootName']){_0x42509f['execute']('insertImage',{'imageType':_0x16f2cd['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x16f2cd['getAttributes']()),'uploadcareImageId':_0x4bf22b,'src':_0x9c2b9b,'sources':_0x40cc9e,'width':_0x5b7b50,'height':_0x21d6a2}});const _0x95e1f7=_0x16f2cd['getChildren']();_0x16f2cd=_0x42509f['model']['document']['selection']['getSelectedElement']();for(const _0x8bfa21 of _0x95e1f7)_0x50966d['append'](_0x50966d['cloneElement'](_0x8bfa21),_0x16f2cd);}else _0x50966d['setSelection'](_0x16f2cd,'on'),_0x42509f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x16f2cd['getAttributes']()),'uploadcareImageId':_0x4bf22b,'src':_0x9c2b9b,'sources':_0x40cc9e,'width':_0x5b7b50,'height':_0x21d6a2},_0x16f2cd);_0x50966d['setSelection'](_0x16f2cd,'on');});}async['_getImageAsFile'](_0x90f52a){const _0x579058=_0x23d08a['window'],_0x14020a=_0x23d08a['document']['location']['href'],_0x243dc1=new _0x579058['URL'](_0x90f52a['getAttribute']('src'),_0x14020a);if('data:'===_0x243dc1['protocol']){const _0x52310c=_0x243dc1['href']['split'](','),_0x413e82=_0x52310c[0x0]['match'](/:(.*?);/)[0x1],_0x166f46=_0x413e82['split']('/')[0x1],_0x2a9afa=_0x579058['atob'](_0x52310c[_0x52310c['length']-0x1]);let _0x1a21d5=_0x2a9afa['length'];const _0x1f0443=new _0x579058['Uint8Array'](_0x1a21d5);for(;_0x1a21d5--;)_0x1f0443[_0x1a21d5]=_0x2a9afa['charCodeAt'](_0x1a21d5);return new _0x579058['File']([_0x1f0443],'image.'+_0x166f46,{'type':_0x413e82});}const _0x28444d=_0x243dc1['href']['split']('/'),_0x8f827c=_0x28444d[_0x28444d['length']-0x1],_0xd2e9=_0x8f827c['split']('.')[0x1];return _0x579058['fetch'](_0x243dc1['href'])['then'](_0x388f45=>_0x388f45['clone']()['blob']())['then'](_0x225d44=>new _0x579058['File']([_0x225d44],_0x8f827c,{'type':'image/'+_0xd2e9}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x1dc9(_0x5816b4,_0x3d5a4a){const _0x4ef9da=_0x4ef9();return _0x1dc9=function(_0x1dc943,_0x411cbe){_0x1dc943=_0x1dc943-0x93;let _0x1b5588=_0x4ef9da[_0x1dc943];return _0x1b5588;},_0x1dc9(_0x5816b4,_0x3d5a4a);}(function(_0x14beff,_0x4038ae){const _0x3f2b60=_0x1dc9,_0x34c499=_0x14beff();while(!![]){try{const _0x141093=parseInt(_0x3f2b60(0xa0))/0x1+-parseInt(_0x3f2b60(0x94))/0x2*(parseInt(_0x3f2b60(0x9e))/0x3)+parseInt(_0x3f2b60(0x9a))/0x4+-parseInt(_0x3f2b60(0x9d))/0x5*(-parseInt(_0x3f2b60(0x9c))/0x6)+-parseInt(_0x3f2b60(0xa2))/0x7+parseInt(_0x3f2b60(0x99))/0x8+parseInt(_0x3f2b60(0xa1))/0x9*(-parseInt(_0x3f2b60(0x97))/0xa);if(_0x141093===_0x4038ae)break;else _0x34c499['push'](_0x34c499['shift']());}catch(_0x4547ff){_0x34c499['push'](_0x34c499['shift']());}}}(_0x4ef9,0x2c6ea));import{View as _0x58fe2e}from'ckeditor5/src/ui.js';function _0x4ef9(){const _0x1d23ec=['132pCjZMk','setTemplate','133341cgJMmm','135EZvgqu','1360051VKtluP','set','image-edit','bindTemplate','5136tOereB','uc-light','imageSrc','222660ccoKic','uc-cloud-image-editor','2731568PCyYnC','202824kfRdgp','ck-uploadcare-theme','111666RaoAPF','80loQEhi'];_0x4ef9=function(){return _0x1d23ec;};return _0x4ef9();}export default class tt extends _0x58fe2e{constructor(_0x31d98f,_0x525397){const _0x27d933=_0x1dc9;super(_0x31d98f);const _0x2dcafa=this[_0x27d933(0x93)];this[_0x27d933(0xa3)](_0x27d933(0x96),''),this[_0x27d933(0x9f)]({'tag':_0x27d933(0x98),'attributes':{..._0x525397,'class':[_0x27d933(0x95),_0x27d933(0x9b)],'ctx-name':_0x27d933(0xa4),'cdn-url':_0x2dcafa['to'](_0x27d933(0x96))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as
|
|
23
|
+
import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x2c213b,IconView as at,View as _0x1ae52a}from'ckeditor5/src/ui.js';export default class rt extends _0x1ae52a{constructor(_0x4ad58e){super(_0x4ad58e);const t=_0x4ad58e['t'];this['set']('errorType',null);const _0x2edd8b=new _0x2c213b(_0x4ad58e);_0x2edd8b['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2edd8b['withText']=!0x0,_0x2edd8b['class']='ck-button-action',_0x2edd8b['on']('execute',()=>{this['fire']('retry');}),_0x2edd8b['bind']('isVisible')['to'](this,'errorType',_0x4cb6d7=>'NotFound'!==_0x4cb6d7);const _0x5a2f4e=new at();_0x5a2f4e['content']=et,_0x5a2f4e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x380982=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':[_0x5a2f4e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x380982['to']('errorType',_0x35161b=>t('NotFound'!==_0x35161b?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2edd8b]},{'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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x4bbf5b,View as _0x156729}from'ckeditor5/src/ui.js';export default class ta extends _0x156729{constructor(_0x23fa74){super(_0x23fa74);const t=_0x23fa74['t'],_0x22b992=this['bindTemplate'],_0x10fa81=new _0x4bbf5b();_0x10fa81['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':[_0x10fa81,{'text':_0x22b992['to']('imageUploadProgress',_0x2845f0=>t('Loading\x20image...')+'\x20('+(_0x2845f0||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'}]}]}]});}}
|