@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20250217.0 → 0.0.0-nightly-next-20250218.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 _0x23d977,Command as _0x432bd7}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x45a5aa,IconInstagram as _0x476165,IconGooglePhotos as _0x4b687,IconGoogleDrive as _0x16efd2,IconFacebook as _0x2e76f7,IconDropbox as _0x47b955,IconUploadcareLink as _0x3caa03,IconUploadcareImageUpload as _0x5e78a6,IconError as et,IconUploadcareImageEdit as _0x108bb3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x497f7,MenuBarMenuListItemButtonView as _0x207b15,View as _0x317d4a,FocusCycler as _0x57a34e,Dialog as _0x250a48,DialogViewPosition as _0x5c449a,SpinnerView as _0x310696,IconView as at,Notification as _0x3f1203}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x306690,DomEmitterMixin as _0x34ecd8,global as _0x56d59c,getAncestors as _0x18fdbe,ObservableMixin as _0x3cd561,createElement as _0xe0d867,uid as _0x40132d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x1c19e8}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x56aae0,info as _0x3bb828}from'@uploadcare/upload-client';import*as _0x2a1aa2 from'@uploadcare/file-uploader';var o=function(_0x9f5778){return _0x9f5778['Local']='local',_0x9f5778['URL']='url',_0x9f5778['Dropbox']='dropbox',_0x9f5778['GDrive']='gdrive',_0x9f5778['Facebook']='facebook',_0x9f5778['GPhotos']='gphotos',_0x9f5778['Instagram']='instagram',_0x9f5778['OneDrive']='onedrive',_0x9f5778;}({});function x(_0x4def2a,_0x35048a,_0x5d80ac){const t=_0x4def2a['t'],_0xeba9a=_0x4def2a['t'];switch(_0x35048a){case o['Local']:return{'text':_0xeba9a('Insert'===_0x5d80ac?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xeba9a('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x5d80ac?_0xeba9a('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xeba9a('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x5d80ac?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x35048a;}}class e extends _0x23d977{['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 _0xcd96e9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4984da;for(const _0x54cd37 in _0xcd96e9){const _0x3cc974=_0x54cd37,_0x271563=_0xcd96e9[_0x3cc974];if('uploadcareLicenseKeyValid'==_0x271563||'uploadcareLicenseKeyInvalid'==_0x271563||'uploadcareLicenseKeyExpired'==_0x271563||'uploadcareLicenseKeyDomainLimit'==_0x271563||'uploadcareLicenseKeyNotAllowed'==_0x271563||'uploadcareLicenseKeyEvaluationLimit'==_0x271563||'uploadcareLicenseKeyTrialLimit'==_0x271563||'uploadcareLicenseKeyUsageLimit'==_0x271563){delete _0xcd96e9[_0x3cc974],_0x4984da=_0x271563,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4984da&&_0xcd96e9['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4984da&&_0xcd96e9['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4984da&&_0xcd96e9['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4984da&&_0xcd96e9['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4984da&&_0xcd96e9['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x4984da&&_0xcd96e9['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4984da&&_0xcd96e9['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x178cce}=this,_0x46720f=_0x178cce['commands']['get']('uploadcare');if(!_0x46720f)return;const _0x3c9fe3=this['_normalizeConfigSourceList'](_0x178cce['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5c40df,_0x517e9e)=>{const _0x430aa1=this['_getIntegrationKey'](_0x517e9e['type']);return _0x5c40df[_0x430aa1]||(_0x5c40df[_0x430aa1]=[]),_0x5c40df[_0x430aa1]['push'](_0x517e9e),_0x5c40df;},{});_0x178cce['plugins']['has']('ImageInsertUI')&&_0x178cce['commands']['get']('uploadcare')&&Object['entries'](_0x3c9fe3)['forEach'](([_0x2875da,_0x53403d])=>{_0x178cce['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2875da,'observable':()=>_0x46720f,'buttonViewCreator':()=>this['_createToolbarButton'](_0x53403d),'formViewCreator':()=>this['_createDropdownButtons'](_0x53403d),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x53403d),'override':'assetManager'!==_0x2875da});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3263f6){const {locale:_0x44f82f}=this['editor'];return _0x3263f6['map'](_0x1be033=>{const _0x57da46=x(_0x44f82f,_0x1be033,'Insert');switch(_0x1be033){case o['Local']:return{'icon':_0x5e78a6,'type':o['Local'],..._0x57da46};case o['URL']:return{'icon':_0x3caa03,'type':o['URL'],..._0x57da46};case o['Dropbox']:return{'icon':_0x47b955,'type':o['Dropbox'],..._0x57da46};case o['Facebook']:return{'icon':_0x2e76f7,'type':o['Facebook'],..._0x57da46};case o['GDrive']:return{'icon':_0x16efd2,'type':o['GDrive'],..._0x57da46};case o['GPhotos']:return{'icon':_0x4b687,'type':o['GPhotos'],..._0x57da46};case o['Instagram']:return{'icon':_0x476165,'type':o['Instagram'],..._0x57da46};case o['OneDrive']:return{'icon':_0x45a5aa,'type':o['OneDrive'],..._0x57da46};}});}['_getIntegrationKey'](_0x20c0f0){switch(_0x20c0f0){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x523cd9,_0x318821){const _0x18ec6f=this['editor'],_0x464809=new _0x523cd9(_0x18ec6f['locale']),_0x378c62=_0x18ec6f['commands']['get']('uploadcare');return _0x464809['bind']('isEnabled')['to'](_0x378c62),_0x464809['on']('execute',()=>{_0x378c62['execute'](_0x318821);}),_0x464809;}['_createToolbarButton'](_0x23be7e){const {locale:_0x2c2145}=this['editor'],_0x12475b=this['editor']['plugins']['get']('ImageInsertUI'),_0xece7bd=_0x23be7e[0x0],_0x3aeefa=this['_createButton'](_0x497f7,_0xece7bd['type']);return _0x3aeefa['icon']=_0xece7bd['icon'],_0x3aeefa['bind']('label')['to'](_0x12475b,'isImageSelected',_0x562ab4=>x(_0x2c2145,_0xece7bd['type'],_0x562ab4?'Replace':'Insert')['text']),_0x3aeefa['tooltip']=!0x0,_0x3aeefa;}['_createDropdownButtons'](_0x1424e7){const {locale:_0xdad098}=this['editor'],_0x2ec4fd=this['editor']['plugins']['get']('ImageInsertUI');return _0x1424e7['map'](_0x371f03=>{const _0x39fca3=this['_createButton'](_0x497f7,_0x371f03['type']);return _0x39fca3['withText']=!0x0,_0x39fca3['icon']=_0x371f03['icon'],_0x39fca3['bind']('label')['to'](_0x2ec4fd,'isImageSelected',_0x1355e3=>x(_0xdad098,_0x371f03['type'],_0x1355e3?'Replace':'Insert')['text']),_0x39fca3;});}['_createMenuBarButtons'](_0x11eae8){return _0x11eae8['map'](_0x1e8b26=>{const _0x53ab95=this['_createButton'](_0x207b15,_0x1e8b26['type']);return _0x53ab95['icon']=_0x1e8b26['icon'],_0x53ab95['label']=_0x1e8b26['shortText'],_0x53ab95;});}}class q extends _0x317d4a{['focusTracker'];['focusCycler'];constructor(_0x1abcea){super(_0x1abcea),this['focusTracker']=new _0x306690(),this['focusCycler']=new _0x57a34e({'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(_0x5712c3){super(_0x5712c3),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(_0x24e0c5,_0x1a959b){const _0x375752=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x45c1c3=>_0x45c1c3<=_0x1a959b)['map'](_0x1c7e5d=>_0x24e0c5['replace'](/\/$/,'')+'/-/resize/'+_0x1c7e5d+'x/\x20'+_0x1c7e5d+'w');return{'imageFallbackUrl':_0x24e0c5,'imageSources':[{'srcset':_0x375752['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1a959b+'px)\x20100vw,\x20'+_0x1a959b+'px','type':'image/webp'}]};}function F(_0x3465f0,_0x5ebc0a,_0x79a2bb){const _0x2707b0=_0x3465f0['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2707b0?parseInt(_0x2707b0[0x1],0xa):_0x5ebc0a,'height':_0x2707b0?parseInt(_0x2707b0[0x2],0xa):_0x79a2bb};}function m(_0x99b90c,_0x5a7190){const _0x33360e=Object['create'](_0x34ecd8),_0xf2647d=_0x99b90c['plugins']['get']('ImageUtils'),_0x5d7b60=_0x99b90c['editing']['mapper']['toViewElement'](_0x5a7190),_0x9b909b=_0xf2647d['findViewImgElement'](_0x5d7b60),_0x27acde=_0x99b90c['editing']['view']['domConverter']['viewToDom'](_0x9b909b),_0x2c5af6=_0x5a7190['getAttribute']('width'),_0x7d5dfb=_0x5a7190['getAttribute']('height'),_0xa3398f='image-processing';_0x99b90c['editing']['view']['change'](_0x93c08e=>{_0x93c08e['addClass'](_0xa3398f,_0x5d7b60),_0x93c08e['setStyle']('aspect-ratio',_0x2c5af6+'/'+_0x7d5dfb,_0x9b909b);}),_0x33360e['listenTo'](_0x27acde,'load',()=>{_0x33360e['stopListening'](_0x27acde,'load'),_0x99b90c['editing']['view']['change'](_0x318d2f=>{_0x318d2f['removeClass'](_0xa3398f,_0x5d7b60),_0x318d2f['removeStyle']('aspect-ratio',_0x9b909b);});});}function W(_0x5926b3){if(Array['isArray'](_0x5926b3)){const _0x4c398c=_0x5926b3['map'](W);return _0x1526fe=>_0x4c398c['some'](_0x38dea3=>_0x38dea3(_0x1526fe));}if('origin'==_0x5926b3){const _0x1bb31b=_0x56d59c['window']['location']['origin'];return _0x206585=>new URL(_0x206585,_0x56d59c['document']['baseURI'])['origin']==_0x1bb31b;}return'function'==typeof _0x5926b3?_0x5926b3:_0x5926b3 instanceof RegExp?_0x2ba9fa=>!(!_0x2ba9fa['match'](_0x5926b3)&&!_0x2ba9fa['replace'](/^https?:\/\//,'')['match'](_0x5926b3)):()=>!0x1;}function M(_0x2d8dae,_0x3d9ff3){return _0x18fdbe(_0x2d8dae['target'])['includes'](_0x3d9ff3);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x3cd561(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xc713b6,_0xe14350,_0x38c69f){super(),this['_editor']=_0xc713b6,this['_editing']=_0xe14350,this['_dialog']=_0xc713b6['plugins']['get'](_0x250a48),this['_api']=_0xe14350['ctxElement']['getAPI'](),this['_type']=_0x38c69f,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:_0x1e6330,model:_0x2d4e6f}=this['_editor'],_0x542bf7=_0x2d4e6f['document']['selection']['getSelectedElement'](),_0x1b5734=_0x542bf7&&(_0x542bf7['is']('element','imageBlock')||_0x542bf7['is']('element','imageInline'));this['_formView']=new S(_0x1e6330),this['_dialog']['show']({'id':'uploadCare','icon':_0x5e78a6,'title':x(_0x1e6330,this['_type'],_0x1b5734?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5c449a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xd3f9d2=>!M(_0xd3f9d2,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x22c66c}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1e30c8=>{const _0x42c2b7=_0x22c66c['length'];for(const _0x10f2ff of _0x22c66c){const _0x190050=_0x10f2ff===_0x22c66c[_0x42c2b7-0x1],{cdnUrl:_0x4dc753,fileInfo:_0x2f7e7e}=_0x10f2ff;if(!_0x4dc753||!_0x2f7e7e)continue;const {width:_0x3d1350,height:_0xf43261}=_0x2f7e7e['imageInfo'],_0x48c5b3=F(_0x4dc753,_0x3d1350,_0xf43261),_0x5f5646=E(_0x4dc753,_0x48c5b3['width']),_0x3ba0e5={'id':_0x2f7e7e['uuid'],'type':'image','attributes':{'imageDimension':_0x48c5b3,..._0x5f5646}};this['_insertAsset'](_0x3ba0e5,_0x190050,_0x1e30c8);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x57bf2a=>{'idle'===_0x57bf2a['detail']['status']&&!_0x57bf2a['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x471a39,_0x311a38,_0x50e54b){const _0x3a6e99=this['_editor']['model']['document']['selection'],_0x418d56=_0x3a6e99['getSelectedElement'](),_0x1a698b=!(!_0x418d56||!_0x418d56['is']('element','imageInline'));_0x50e54b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x471a39,_0x1a698b),_0x311a38||_0x50e54b['setSelection'](_0x3a6e99['getLastPosition']());}['_insertImage'](_0x2f60ce,_0x3c836c){const _0x35b66b=this['_editor'],{imageDimension:_0x435329,imageFallbackUrl:_0x33447c,imageSources:_0x45cb36}=_0x2f60ce['attributes'];_0x35b66b['execute']('insertImage',{'imageType':_0x3c836c?'imageInline':null,'source':{'uploadcareImageId':_0x2f60ce['id'],'src':_0x33447c,'sources':_0x45cb36,..._0x435329}});}}class n extends _0x432bd7{['_editing'];['_controller']=null;static get['requires'](){return[_0x250a48,i];}constructor(_0x4e1ad5){super(_0x4e1ad5),this['_editing']=_0x4e1ad5['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x62647a){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x62647a);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x21fa64,publicKey:_0x4de892,signal:_0x11217b,onProgress:_0x2e4bac}){return _0x56aae0(_0x21fa64,{'publicKey':_0x4de892,'store':'auto','signal':_0x11217b,'onProgress':_0x2e4bac});}static['getInfo'](_0x4ca491,_0x1d8a01){return _0x3bb828(_0x4ca491,_0x1d8a01);}}class p extends _0x23d977{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x1c19e8,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x5a8dde=this['editor'];if(!!!_0x5a8dde['config']['get']('uploadcare'))return;_0x5a8dde['plugins']['get'](_0x1c19e8)['createUploadAdapter']=_0x12d2b2=>new A(_0x12d2b2,_0x5a8dde),_0x5a8dde['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x262e1a,{imageElement:_0x333ded,data:_0x13046e})=>{_0x5a8dde['model']['change'](_0x456762=>{_0x456762['setAttribute']('uploadcareImageId',_0x13046e['uploadcareImageId'],_0x333ded);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x4dc36f,_0x13648f){this['loader']=_0x4dc36f,this['editor']=_0x13648f,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x539bba=this['editor']['config']['get']('uploadcare.pubkey'),_0x550cf1=await this['loader']['file'];return C['upload']({'file':_0x550cf1,'publicKey':_0x539bba,'signal':this['controller']['signal'],'onProgress':_0x229945=>{_0x229945&&_0x229945['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x229945['value']);}})['then'](async _0x32ecee=>{const {imageFallbackUrl:_0x4d1927,imageSources:_0x2f3481}=E(_0x32ecee['cdnUrl'],_0x32ecee['imageInfo']['width']);return{'uploadcareImageId':_0x32ecee['uuid'],'default':_0x4d1927,'sources':_0x2f3481};})['catch'](()=>{const _0x38e719=t('Cannot\x20upload\x20file:')+('\x20'+_0x550cf1['name']+'.');return Promise['reject'](_0x38e719);});}['abort'](){this['controller']['abort']();}}class i extends _0x23d977{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x250a48];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x5a2b4d=this['editor'];_0x5a2b4d['commands']['add']('uploadcare',new n(_0x5a2b4d));}['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 _0x33ad1e=_0x56d59c['document']['querySelector']('input[uploadcare-file-input]');_0x33ad1e&&_0x33ad1e['remove']();}),async function(_0x4c87dd){const _0x1cd39f=_0x13ec45([0x70,0x75,0x79,0x53,0x6f,0x41,0x4f,0x32,0x43,0x76,0x5a,0x55,0x62,0x74,0x71,0x72,0x65,0x46,0x38,0x56,0x39,0x50,0x4a,0x73,0x7a,0x58,0x68,0x6d,0x63,0x64,0x4b,0x59,0x6c,0x78,0x61,0x54,0x44,0x34,0x69,0x33,0x52,0x6a,0x6e,0x77,0x6b,0x35,0x4c,0x49,0x48,0x57,0x31,0x66,0x51,0x36,0x37,0x47,0x30,0x45,0x42,0x4d,0x4e,0x67]),_0x1382a6=0x2a97ded1,_0x1a87c7=0x2a908111^_0x1382a6,_0x559c2a=window[_0x13ec45([0x44,0x61,0x74,0x65])][_0x13ec45([0x6e,0x6f,0x77])](),_0x1005d5=_0x4c87dd[_0x13ec45([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x535367=new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x364da7=>{_0x1005d5[_0x13ec45([0x6f,0x6e,0x63,0x65])](_0x13ec45([0x72,0x65,0x61,0x64,0x79]),_0x364da7);}),_0x38161d={[_0x13ec45([0x6b,0x74,0x79])]:_0x13ec45([0x45,0x43]),[_0x13ec45([0x75,0x73,0x65])]:_0x13ec45([0x73,0x69,0x67]),[_0x13ec45([0x63,0x72,0x76])]:_0x13ec45([0x50,0x2d,0x32,0x35,0x36]),[_0x13ec45([0x78])]:_0x13ec45([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]),[_0x13ec45([0x79])]:_0x13ec45([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]),[_0x13ec45([0x61,0x6c,0x67])]:_0x13ec45([0x45,0x53,0x32,0x35,0x36])},_0x138105=_0x1005d5[_0x13ec45([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x13ec45([0x67,0x65,0x74])](_0x13ec45([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2959d3(){let _0x9bcea7,_0x1c00aa=null,_0x9bdda9=null;try{if(_0x138105==_0x13ec45([0x47,0x50,0x4c]))return _0x13ec45([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x9bcea7=_0x245669(),!_0x9bcea7)return _0x13ec45([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x9bcea7[_0x13ec45([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x9bdda9=_0x3802b6(_0x9bcea7[_0x13ec45([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x9bcea7[_0x13ec45([0x6a,0x74,0x69])])),await _0x2579e9()?_0x101ad5()?_0x4b5667()?_0x13ec45([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x109f6e()?(_0x9bcea7[_0x13ec45([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x13ec45([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1c00aa=_0x4d68a5(_0x13ec45([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x9bcea7[_0x13ec45([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x13ec45([0x74,0x72,0x69,0x61,0x6c])&&(_0x1c00aa=_0x4d68a5(_0x13ec45([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x291b79()):_0x13ec45([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x13ec45([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x13ec45([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x244fb4){return _0x13ec45([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4b5667(){const _0xf104c=[_0x13ec45([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x13ec45([0x74,0x72,0x69,0x61,0x6c])][_0x13ec45([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9bcea7[_0x13ec45([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x559c2a/0x3e8:0xe10*_0x1a87c7;return _0x9bcea7[_0x13ec45([0x65,0x78,0x70])]<_0xf104c;}function _0x101ad5(){const _0x41ed26=_0x9bcea7[_0x13ec45([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x41ed26&&(!!_0x41ed26[_0x13ec45([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec45([0x2a]))||!!_0x41ed26[_0x13ec45([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec45([0x55,0x50,0x4c,0x43])));}function _0x109f6e(){const _0x3c0ef6=_0x9bcea7[_0x13ec45([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3c0ef6||0x0==_0x3c0ef6[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5033bf}=new URL(window[_0x13ec45([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3c0ef6[_0x13ec45([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5033bf))return!0x0;const _0x2ce681=_0x5033bf[_0x13ec45([0x73,0x70,0x6c,0x69,0x74])](_0x13ec45([0x2e]));return _0x3c0ef6[_0x13ec45([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4b9ed2=>_0x4b9ed2[_0x13ec45([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13ec45([0x2a])))[_0x13ec45([0x6d,0x61,0x70])](_0x245d9b=>_0x245d9b[_0x13ec45([0x73,0x70,0x6c,0x69,0x74])](_0x13ec45([0x2e])))[_0x13ec45([0x73,0x6f,0x6d,0x65])](_0x130400=>_0x2ce681[_0x13ec45([0x65,0x76,0x65,0x72,0x79])]((_0x404e12,_0x56a5bd)=>_0x130400[_0x56a5bd]===_0x404e12||_0x130400[_0x56a5bd]===_0x13ec45([0x2a])));}function _0x291b79(){return _0x1c00aa&&_0x9bdda9?new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x150760,_0x3edbc5)=>{_0x1c00aa[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x150760,_0x3edbc5),_0x9bdda9[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x2683f0=>{_0x2683f0!=_0x13ec45([0x56,0x61,0x6c,0x69,0x64])&&_0x150760(_0x2683f0);},_0x3edbc5);}):_0x1c00aa||_0x9bdda9||_0x13ec45([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3802b6(_0x1dfe45,_0x22e88b){return new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13899e=>{if(_0xcb3682())return _0x13899e(_0x13ec45([0x56,0x61,0x6c,0x69,0x64]));_0x1041e6(),_0x1005d5[_0x13ec45([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x13ec45([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x59d6a4=!0x1;const _0x41a341=_0x40132d();function _0x5e8a7f(_0x1aa586){return!!_0x1aa586&&(typeof _0x1aa586===_0x13ec45([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1aa586===_0x13ec45([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1aa586[_0x13ec45([0x74,0x68,0x65,0x6e])]===_0x13ec45([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1aa586[_0x13ec45([0x63,0x61,0x74,0x63,0x68])]===_0x13ec45([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3e76c3(_0x395956){_0x1090ac(_0x395956)[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x2a2b18=>{if(!_0x2a2b18||_0x2a2b18[_0x13ec45([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x13ec45([0x6f,0x6b]))return _0x13ec45([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5a800a(_0x23f4fd(_0x41a341+_0x22e88b))!=_0x2a2b18[_0x13ec45([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x13ec45([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x13ec45([0x56,0x61,0x6c,0x69,0x64]);})[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x55bccd=>(_0x2b01a6(),_0x55bccd),()=>{const _0x53d7e2=_0x313d0e();return null==_0x53d7e2?(_0x2b01a6(),_0x13ec45([0x56,0x61,0x6c,0x69,0x64])):_0x13ec45(_0x559c2a-_0x53d7e2>(0xe9b5ad1^_0x1382a6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x13899e)[_0x13ec45([0x63,0x61,0x74,0x63,0x68])](()=>{_0x13899e(_0x13ec45([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x468789=0x2aa13051^_0x1382a6;function _0x2b01a6(){const _0x997952=_0x13ec45([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a800a(_0x23f4fd(_0x1dfe45)),_0x4bf6bd=_0x57934e(_0x5a800a(window[_0x13ec45([0x4d,0x61,0x74,0x68])][_0x13ec45([0x63,0x65,0x69,0x6c])](_0x559c2a/_0x468789)));window[_0x13ec45([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13ec45([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x997952,_0x4bf6bd);}function _0x313d0e(){const _0x140812=_0x13ec45([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a800a(_0x23f4fd(_0x1dfe45)),_0x76a690=window[_0x13ec45([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x13ec45([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x140812);return _0x76a690?window[_0x13ec45([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57934e(_0x76a690),0x10)*_0x468789:null;}function _0x1090ac(_0x1399b5){return new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x417b75,_0x4631e1)=>{_0x1399b5[_0x13ec45([0x74,0x68,0x65,0x6e])](_0x417b75,_0x4631e1),window[_0x13ec45([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4631e1,0x2a960a11^_0x1382a6);});}}_0x1005d5[_0x13ec45([0x6f,0x6e])](_0x13ec45([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x588ff0,_0x28b05b)=>{if(_0x28b05b[0x0]!=_0x1dfe45)return _0x13899e(_0x13ec45([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28b05b[0x1]={..._0x28b05b[0x1],[_0x13ec45([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x41a341};},{[_0x13ec45([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13ec45([0x68,0x69,0x67,0x68])}),_0x1005d5[_0x13ec45([0x6f,0x6e])](_0x13ec45([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x59cb21=>{_0x5e8a7f(_0x59cb21[_0x13ec45([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x59d6a4=!0x0,_0x3e76c3(_0x59cb21[_0x13ec45([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x13ec45([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x13ec45([0x6c,0x6f,0x77])}),_0x535367[_0x13ec45([0x74,0x68,0x65,0x6e])](()=>{_0x59d6a4||_0x13899e(_0x13ec45([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xcb3682(){return _0x1005d5[_0x13ec45([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13ec45([0x76,0x69,0x65,0x77])][_0x13ec45([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x13ec45([0x61,0x75,0x74,0x6f]);}function _0x1041e6(){_0x1005d5[_0x13ec45([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13ec45([0x76,0x69,0x65,0x77])][_0x13ec45([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13ec45([0x61,0x75,0x74,0x6f]);}}function _0x4d68a5(_0x5b6eac){const _0x4d54b3=[new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dad8e=>setTimeout(_0x3dad8e,0x2a9ee01d^_0x1382a6)),_0x535367[_0x13ec45([0x74,0x68,0x65,0x6e])](()=>new window[(_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x293a64=>{let _0x117aaf=0x0;_0x1005d5[_0x13ec45([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec45([0x6f,0x6e])](_0x13ec45([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x388258,_0x490595)=>{_0x490595[0x0][_0x13ec45([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x117aaf++,_0x117aaf==(0x2a97df29^_0x1382a6)&&(_0x293a64(),_0x388258[_0x13ec45([0x6f,0x66,0x66])]());});}))];return window[_0x13ec45([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13ec45([0x72,0x61,0x63,0x65])](_0x4d54b3)[_0x13ec45([0x74,0x68,0x65,0x6e])](()=>_0x5b6eac);}async function _0x2427f7(){await _0x535367,_0x1005d5[_0x13ec45([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec45([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2a1a0e,_0x1005d5[_0x13ec45([0x6d,0x6f,0x64,0x65,0x6c])][_0x13ec45([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2a1a0e,_0x1005d5[_0x13ec45([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x13ec45([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4900ef(_0x51ff17){const _0x13c57a=_0x5d5456();_0x1005d5[_0x13c57a]=_0x13ec45([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51ff17,_0x51ff17!=_0x13ec45([0x56,0x61,0x6c,0x69,0x64])&&_0x2427f7();}function _0x5d5456(){const _0x21ffec=window[_0x13ec45([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x13ec45([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x13ec45([0x6e,0x6f,0x77])]())[_0x13ec45([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x13ec45([0x2e]),'');let _0x1eeb8a=_0x13ec45([0x70]);for(let _0x2d0049=0x0;_0x2d0049<_0x21ffec[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d0049+=0x2){let _0x4d2fc5=window[_0x13ec45([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21ffec[_0x13ec45([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d0049,_0x2d0049+0x2));_0x4d2fc5>=_0x1cd39f[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4d2fc5-=_0x1cd39f[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1eeb8a+=_0x1cd39f[_0x4d2fc5];}return _0x1eeb8a;}function _0x245669(){const _0x4e68f6=_0x138105[_0x13ec45([0x73,0x70,0x6c,0x69,0x74])](_0x13ec45([0x2e]));if(0x3!=_0x4e68f6[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x240a78(_0x4e68f6[0x1]);function _0x240a78(_0x5e4a3c){const _0x431d8b=_0x2e6528(_0x5e4a3c);return _0x431d8b&&_0x3b754d()?_0x431d8b:null;function _0x3b754d(){const _0x440f54=_0x431d8b[_0x13ec45([0x6a,0x74,0x69])],_0x4dcc2a=window[_0x13ec45([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x440f54[_0x13ec45([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x440f54[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c551e={..._0x431d8b,[_0x13ec45([0x6a,0x74,0x69])]:_0x440f54[_0x13ec45([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x440f54[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c551e[_0x13ec45([0x76,0x63])],_0x23f4fd(_0x3c551e)==_0x4dcc2a;}}}async function _0x2579e9(){let _0x1fee0d=!0x0;try{const _0x348261=_0x138105[_0x13ec45([0x73,0x70,0x6c,0x69,0x74])](_0x13ec45([0x2e])),[_0x3dc922,_0x4283c0,_0xf5f9a7]=_0x348261;return _0x7f4319(_0x3dc922),await _0x4ed5ed(_0x3dc922,_0x4283c0,_0xf5f9a7),_0x1fee0d;}catch(_0x10881a){return!0x1;}function _0x7f4319(_0x4ae913){const _0x29418c=_0x2e6528(_0x4ae913);_0x29418c&&_0x29418c[_0x13ec45([0x61,0x6c,0x67])]==_0x13ec45([0x45,0x53,0x32,0x35,0x36])||(_0x1fee0d=!0x1);}async function _0x4ed5ed(_0x394a38,_0xe738a8,_0xfa7c0c){const _0x359133=window[_0x13ec45([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x13ec45([0x66,0x72,0x6f,0x6d])](_0x2c7678(_0xfa7c0c),_0x12dd0d=>_0x12dd0d[_0x13ec45([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5a21c9=new window[(_0x13ec45([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x13ec45([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x394a38+_0x13ec45([0x2e])+_0xe738a8),_0x520b21=window[_0x13ec45([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x13ec45([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x520b21)return;const _0xf515a6=await _0x520b21[_0x13ec45([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x13ec45([0x6a,0x77,0x6b]),_0x38161d,{[_0x13ec45([0x6e,0x61,0x6d,0x65])]:_0x13ec45([0x45,0x43,0x44,0x53,0x41]),[_0x13ec45([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x13ec45([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x13ec45([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x520b21[_0x13ec45([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x13ec45([0x6e,0x61,0x6d,0x65])]:_0x13ec45([0x45,0x43,0x44,0x53,0x41]),[_0x13ec45([0x68,0x61,0x73,0x68])]:{[_0x13ec45([0x6e,0x61,0x6d,0x65])]:_0x13ec45([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf515a6,_0x359133,_0x5a21c9)||(_0x1fee0d=!0x1);}}function _0x2e6528(_0x204dd0){return _0x204dd0[_0x13ec45([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x13ec45([0x65,0x79]))?JSON[_0x13ec45([0x70,0x61,0x72,0x73,0x65])](_0x2c7678(_0x204dd0)):null;}function _0x2c7678(_0x5091c1){return window[_0x13ec45([0x61,0x74,0x6f,0x62])](_0x5091c1[_0x13ec45([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x13ec45([0x2b]))[_0x13ec45([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x13ec45([0x2f])));}function _0x23f4fd(_0x5ee208){let _0x4cc5f3=0x1505;function _0x314ff0(_0x2a7373){for(let _0x48b4e3=0x0;_0x48b4e3<_0x2a7373[_0x13ec45([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x48b4e3++){const _0x50d14c=_0x2a7373[_0x13ec45([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x48b4e3);_0x4cc5f3=(_0x4cc5f3<<0x5)+_0x4cc5f3+_0x50d14c,_0x4cc5f3&=_0x4cc5f3;}}function _0xaabcd(_0x5d5ea5){Array[_0x13ec45([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5d5ea5)?_0x5d5ea5[_0x13ec45([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xaabcd):_0x5d5ea5&&typeof _0x5d5ea5==_0x13ec45([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x13ec45([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5d5ea5)[_0x13ec45([0x73,0x6f,0x72,0x74])]()[_0x13ec45([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4dbdd6,_0x4e1ec7])=>{_0x314ff0(_0x4dbdd6),_0xaabcd(_0x4e1ec7);}):_0x314ff0(window[_0x13ec45([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5d5ea5));}return _0xaabcd(_0x5ee208),_0x4cc5f3>>>0x0;}function _0x5a800a(_0x52017d){return _0x52017d[_0x13ec45([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x13ec45([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x13ec45([0x30]));}function _0x57934e(_0x4c5299){return _0x4c5299[_0x13ec45([0x73,0x70,0x6c,0x69,0x74])]('')[_0x13ec45([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x13ec45([0x6a,0x6f,0x69,0x6e])]('');}function _0x2a1a0e(){}function _0x13ec45(_0x1be9f7){return _0x1be9f7['map'](_0x1104e9=>String['fromCharCode'](_0x1104e9))['join']('');}_0x4900ef(await _0x2959d3());}(this);}['_initSchema'](){const _0x24b60c=this['editor']['model']['schema'];_0x24b60c['isRegistered']('imageBlock')&&_0x24b60c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x24b60c['isRegistered']('imageInline')&&_0x24b60c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2e5af1=this['editor'];_0x2e5af1['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2e5af1['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x63e7e9=>_0x63e7e9['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2481eb=_0x2e5af1['commands']['get']('replaceImageSource');_0x2481eb&&this['listenTo'](_0x2481eb,'cleanupImage',(_0x229be0,[_0x37f4fc,_0x1b16c6])=>{_0x37f4fc['removeAttribute']('uploadcareImageId',_0x1b16c6);});}['_initConfig'](){const _0x3e601f=this['editor']['config']['get']('uploadcare.uploader')||{},_0x28867f=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0xe0d867(_0x56d59c['document'],'uc-config',{..._0x3e601f,'pubkey':_0x28867f,'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']=_0x3e4dc1=>{if('closeMax'==_0x3e4dc1)return'#uc-icon-arrow-down';},_0x56d59c['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0xe0d867(_0x56d59c['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x56d59c['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2742be=this['editor']['commands']['get']('insertImage');_0x2742be&&this['listenTo'](_0x2742be,'execute',()=>{const _0x5925b8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5925b8&&_0x5925b8['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5925b8);});});const _0x5ee060=this['editor']['commands']['get']('uploadcareImageReplace');_0x5ee060&&this['listenTo'](_0x5ee060,'execute',()=>{const _0x2269da=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2269da&&_0x2269da['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x2269da);});});}}class u extends _0x23d977{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20f61c){super(_0x20f61c),_0x20f61c['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x2a1aa2['defineComponents'](_0x2a1aa2);}}class ta extends _0x317d4a{constructor(_0x2419e8){super(_0x2419e8);const t=_0x2419e8['t'],_0x2f6f1d=this['bindTemplate'],_0x115f73=new _0x310696();_0x115f73['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':[_0x115f73,{'text':_0x2f6f1d['to']('imageUploadProgress',_0x24cf23=>t('Loading\x20image...')+'\x20('+(_0x24cf23||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 _0x317d4a{constructor(_0xeb00e9){super(_0xeb00e9);const t=_0xeb00e9['t'];this['set']('errorType',null);const _0x46b3aa=new _0x497f7(_0xeb00e9);_0x46b3aa['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x46b3aa['withText']=!0x0,_0x46b3aa['class']='ck-button-action',_0x46b3aa['on']('execute',()=>{this['fire']('retry');}),_0x46b3aa['bind']('isVisible')['to'](this,'errorType',_0x3aad58=>'NotFound'!==_0x3aad58);const _0x51b553=new at();_0x51b553['content']=et,_0x51b553['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x34b487=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':[_0x51b553,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x34b487['to']('errorType',_0x499dc9=>t('NotFound'!==_0x499dc9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x46b3aa]},{'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 _0x317d4a{constructor(_0x6356c2,_0x5cfc22){super(_0x6356c2);const _0x42a9b1=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5cfc22,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x42a9b1['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x562d2c,_0x4bdcf8,_0x2bc0e1){super(_0x562d2c),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x562d2c),this['_errorView']=new rt(_0x562d2c),this['_editingView']=new tt(_0x562d2c,_0x2bc0e1),this['_focusableView']=new _0x317d4a(_0x562d2c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4bdcf8),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'],_0x11d79f=>{this['_addUploadcareImageEditorListeners'](_0x11d79f);});}),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'](_0x10c7e0,_0x17c01a){const _0x21ae14='uc-cloud-image-editor',_0x57a317=_0x10c7e0['querySelector'](_0x21ae14);if(_0x57a317)return _0x17c01a(_0x57a317);const _0x3005d0=new MutationObserver(_0x4cb81d=>{const _0x8411cb=_0x4cb81d['filter'](_0x2f2c6b=>_0x2f2c6b['target']===_0x10c7e0&&_0x2f2c6b['addedNodes']['length']>0x0&&_0x2f2c6b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x21ae14);_0x8411cb['length']&&(_0x3005d0['disconnect'](),_0x17c01a(_0x8411cb[0x0]['addedNodes'][0x0]));});_0x3005d0['observe'](_0x10c7e0,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4b5478){_0x4b5478['addEventListener']('apply',_0x5a2ef2=>{this['fire']('apply',{'imageSrc':_0x5a2ef2['detail']['cdnUrl']});}),_0x4b5478['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x3cd561(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3f2cd9,_0x373f8f,_0x1b4f38){super(),this['_editor']=_0x3f2cd9,this['_dialog']=_0x373f8f,this['_imageElement']=_0x1b4f38,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 _0x56976c=this['_imageElement'],_0x3f7a5f=_0x56976c['getAttribute']('uploadcareImageId'),_0x27d1c4=_0x56976c['getAttribute']('src');if(_0x3f7a5f)await this['_loadImageInfo'](_0x3f7a5f,_0x27d1c4);else{if(this['_imageCache']['has'](_0x27d1c4)){const _0x10bed3=this['_imageCache']['get'](_0x27d1c4);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x10bed3['url'],this['imageDimension']=_0x10bed3['dimension'],this['imageId']=_0x10bed3['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x20471e}=this['_editor'],t=_0x20471e['t'],_0x21d10f=new ii(_0x20471e,this['imageStatus'],this['_attributes']);_0x21d10f['bind']('status')['to'](this,'imageStatus'),_0x21d10f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x21d10f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x21d10f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x21d10f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x108bb3,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x21d10f,'position':_0x5c449a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x21d10f['focus']();},'onHide':()=>{_0x21d10f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x17a815=>!M(_0x17a815,_0x21d10f['element'])}});}['_loadImageInfo'](_0x18e83c,_0x534e46){return C['getInfo'](_0x18e83c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x739de3=>{const {width:_0x118ab7,height:_0x1b6cd6}=_0x739de3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x534e46,this['imageDimension']={'width':_0x118ab7,'height':_0x1b6cd6},this['imageId']=_0x18e83c;})['catch'](_0x210082=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x210082['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4dcf25,_0x56c132){return this['_getImageAsFile'](_0x4dcf25)['then'](_0x549c88=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x56c132['signal'],'file':_0x549c88,'onProgress':_0x130ee5=>{_0x130ee5&&_0x130ee5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x130ee5['value']));}}))['then'](_0x3de157=>{const {width:_0x156657,height:_0x510cd3}=_0x3de157['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3de157['cdnUrl'],this['imageDimension']={'width':_0x156657,'height':_0x510cd3},this['imageId']=_0x3de157['uuid'],this['imageUploadProgress']=null;const _0x43b4eb=_0x4dcf25['getAttribute']('src');this['_imageCache']['set'](_0x43b4eb,{'id':_0x3de157['uuid'],'url':_0x3de157['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x31c9c4=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x31c9c4['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x10a336,_0x3e6d19){_0x10a336['on']('apply',(_0x588384,_0x5ed0f2)=>{this['_replaceImage'](_0x3e6d19,_0x5ed0f2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x10a336['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x10a336['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1ebfcd,_0x565fce,_0x471ad7){const _0x2dfb70=this['_editor'],{width:_0x23bb14,height:_0x337a85}=F(_0x565fce,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x172d4c,imageSources:_0xe16546}=E(_0x565fce,_0x23bb14);_0x2dfb70['model']['change'](_0x2f91ee=>{if('$graveyard'===_0x1ebfcd['root']['rootName']){_0x2dfb70['execute']('insertImage',{'imageType':_0x1ebfcd['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1ebfcd['getAttributes']()),'uploadcareImageId':_0x471ad7,'src':_0x172d4c,'sources':_0xe16546,'width':_0x23bb14,'height':_0x337a85}});const _0x287ebf=_0x1ebfcd['getChildren']();_0x1ebfcd=_0x2dfb70['model']['document']['selection']['getSelectedElement']();for(const _0x18ed4d of _0x287ebf)_0x2f91ee['append'](_0x2f91ee['cloneElement'](_0x18ed4d),_0x1ebfcd);}else _0x2f91ee['setSelection'](_0x1ebfcd,'on'),_0x2dfb70['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1ebfcd['getAttributes']()),'uploadcareImageId':_0x471ad7,'src':_0x172d4c,'sources':_0xe16546,'width':_0x23bb14,'height':_0x337a85},_0x1ebfcd);_0x2f91ee['setSelection'](_0x1ebfcd,'on');});}async['_getImageAsFile'](_0x1f15d8){const _0x545508=_0x56d59c['window'],_0x186016=_0x56d59c['document']['location']['href'],_0x4e39b1=new _0x545508['URL'](_0x1f15d8['getAttribute']('src'),_0x186016);if('data:'===_0x4e39b1['protocol']){const _0x5e157b=_0x4e39b1['href']['split'](','),_0x584c5f=_0x5e157b[0x0]['match'](/:(.*?);/)[0x1],_0x26327b=_0x584c5f['split']('/')[0x1],_0x390a16=_0x545508['atob'](_0x5e157b[_0x5e157b['length']-0x1]);let _0x207c1a=_0x390a16['length'];const _0x342cea=new _0x545508['Uint8Array'](_0x207c1a);for(;_0x207c1a--;)_0x342cea[_0x207c1a]=_0x390a16['charCodeAt'](_0x207c1a);return new _0x545508['File']([_0x342cea],'image.'+_0x26327b,{'type':_0x584c5f});}const _0x3451b5=_0x4e39b1['href']['split']('/'),_0x35bb23=_0x3451b5[_0x3451b5['length']-0x1],_0x4c45e2=_0x35bb23['split']('.')[0x1];return _0x545508['fetch'](_0x4e39b1['href'])['then'](_0x4200f6=>_0x4200f6['clone']()['blob']())['then'](_0x3d5f86=>new _0x545508['File']([_0x3d5f86],_0x35bb23,{'type':'image/'+_0x4c45e2}));}}class J extends _0x432bd7{['imageEditController'];static get['requires'](){return[_0x250a48];}['_isEditable'];constructor(_0x3261c3){super(_0x3261c3),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2ad6be){const _0x12373d=W(_0x2ad6be);return _0x38a4fb=>!(!_0x38a4fb||!_0x38a4fb['is']('element','imageBlock')&&!_0x38a4fb['is']('element','imageInline'))&&(!!_0x38a4fb['hasAttribute']('uploadcareImageId')||!!_0x38a4fb['hasAttribute']('src')&&_0x12373d(_0x38a4fb['getAttribute']('src')));}(_0x3261c3['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x4db9e8=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x4db9e8);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x464c94=this['editor']['model']['document']['selection']['getSelectedElement']();_0x464c94&&(_0x464c94['is']('element','imageBlock')||_0x464c94['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x250a48),_0x464c94),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x432bd7{['refresh'](){const _0x3c2b2a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3c2b2a&&(_0x3c2b2a['is']('element','imageBlock')||_0x3c2b2a['is']('element','imageInline')));}['execute'](_0x1dae50){const _0x5e942f=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3acc9d=>{_0x3acc9d['setAttributes'](_0x1dae50,_0x5e942f),_0x3acc9d['removeAttribute']('srcset',_0x5e942f),_0x3acc9d['removeAttribute']('sizes',_0x5e942f);});}}class g extends _0x23d977{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x3f1203,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xcd1ba8}=this;_0xcd1ba8['commands']['add']('uploadcareImageEdit',new J(_0xcd1ba8)),_0xcd1ba8['commands']['add']('uploadcareImageReplace',new O(_0xcd1ba8));}}class j extends _0x23d977{['_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 _0x10e67c=this['editor'];_0x10e67c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1f29de=>{const _0x33b05c=_0x10e67c['commands']['get']('uploadcareImageEdit'),_0xae2d43=new _0x497f7(_0x1f29de),t=_0x1f29de['t'];return _0xae2d43['set']({'icon':_0x108bb3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0xae2d43['bind']('isEnabled')['to'](_0x33b05c),_0xae2d43['bind']('isOn')['to'](_0x33b05c,'isActive'),this['listenTo'](_0xae2d43,'execute',()=>{_0x10e67c['execute']('uploadcareImageEdit'),_0x10e67c['editing']['view']['focus']();}),_0xae2d43;}),this['_initConfig']();}['_initConfig'](){const _0x3f6854=_0xe0d867(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3f6854),this['listenTo'](this['editor'],'destroy',()=>{_0x3f6854['remove']();});}}class P extends _0x23d977{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 _0x218b73,Command as _0x9a5f9a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4891cc,IconInstagram as _0x3c326f,IconGooglePhotos as _0x4f4215,IconGoogleDrive as _0x1a1534,IconFacebook as _0x27e7b5,IconDropbox as _0x12f048,IconUploadcareLink as _0x302662,IconUploadcareImageUpload as _0x2042f1,IconError as et,IconUploadcareImageEdit as _0x1002fd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x103898,MenuBarMenuListItemButtonView as _0x2eaf73,View as _0x1f3011,FocusCycler as _0x365622,Dialog as _0x4f6422,DialogViewPosition as _0x269cab,SpinnerView as _0x156908,IconView as at,Notification as _0x181e2f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x3e97b9,DomEmitterMixin as _0x3f53eb,global as _0x23eea0,getAncestors as _0x4f2191,ObservableMixin as _0xe16356,createElement as _0x4702df,uid as _0x4a776e}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x1e78ce}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x19378f,info as _0x28f280}from'@uploadcare/upload-client';import*as _0x57d744 from'@uploadcare/file-uploader';var o=function(_0x35f174){return _0x35f174['Local']='local',_0x35f174['URL']='url',_0x35f174['Dropbox']='dropbox',_0x35f174['GDrive']='gdrive',_0x35f174['Facebook']='facebook',_0x35f174['GPhotos']='gphotos',_0x35f174['Instagram']='instagram',_0x35f174['OneDrive']='onedrive',_0x35f174;}({});function x(_0x13f944,_0xd75a17,_0x32e477){const t=_0x13f944['t'],_0x367b5d=_0x13f944['t'];switch(_0xd75a17){case o['Local']:return{'text':_0x367b5d('Insert'===_0x32e477?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x367b5d('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x32e477?_0x367b5d('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x367b5d('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0x32e477?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0xd75a17;}}class e extends _0x218b73{['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 _0xb0c82e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xbb19e4;for(const _0x3ad372 in _0xb0c82e){const _0x3428de=_0x3ad372,_0xeef6e2=_0xb0c82e[_0x3428de];if('uploadcareLicenseKeyValid'==_0xeef6e2||'uploadcareLicenseKeyInvalid'==_0xeef6e2||'uploadcareLicenseKeyExpired'==_0xeef6e2||'uploadcareLicenseKeyDomainLimit'==_0xeef6e2||'uploadcareLicenseKeyNotAllowed'==_0xeef6e2||'uploadcareLicenseKeyEvaluationLimit'==_0xeef6e2||'uploadcareLicenseKeyTrialLimit'==_0xeef6e2||'uploadcareLicenseKeyUsageLimit'==_0xeef6e2){delete _0xb0c82e[_0x3428de],_0xbb19e4=_0xeef6e2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0xbb19e4&&_0xb0c82e['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4ead9d}=this,_0x1003d3=_0x4ead9d['commands']['get']('uploadcare');if(!_0x1003d3)return;const _0x317f7a=this['_normalizeConfigSourceList'](_0x4ead9d['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x51fd3e,_0x1df623)=>{const _0xe1f568=this['_getIntegrationKey'](_0x1df623['type']);return _0x51fd3e[_0xe1f568]||(_0x51fd3e[_0xe1f568]=[]),_0x51fd3e[_0xe1f568]['push'](_0x1df623),_0x51fd3e;},{});_0x4ead9d['plugins']['has']('ImageInsertUI')&&_0x4ead9d['commands']['get']('uploadcare')&&Object['entries'](_0x317f7a)['forEach'](([_0x3826bf,_0x3b587c])=>{_0x4ead9d['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3826bf,'observable':()=>_0x1003d3,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3b587c),'formViewCreator':()=>this['_createDropdownButtons'](_0x3b587c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3b587c),'override':'assetManager'!==_0x3826bf});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3123cd){const {locale:_0x4ea815}=this['editor'];return _0x3123cd['map'](_0x209558=>{const _0x4b05dd=x(_0x4ea815,_0x209558,'Insert');switch(_0x209558){case o['Local']:return{'icon':_0x2042f1,'type':o['Local'],..._0x4b05dd};case o['URL']:return{'icon':_0x302662,'type':o['URL'],..._0x4b05dd};case o['Dropbox']:return{'icon':_0x12f048,'type':o['Dropbox'],..._0x4b05dd};case o['Facebook']:return{'icon':_0x27e7b5,'type':o['Facebook'],..._0x4b05dd};case o['GDrive']:return{'icon':_0x1a1534,'type':o['GDrive'],..._0x4b05dd};case o['GPhotos']:return{'icon':_0x4f4215,'type':o['GPhotos'],..._0x4b05dd};case o['Instagram']:return{'icon':_0x3c326f,'type':o['Instagram'],..._0x4b05dd};case o['OneDrive']:return{'icon':_0x4891cc,'type':o['OneDrive'],..._0x4b05dd};}});}['_getIntegrationKey'](_0x258896){switch(_0x258896){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1690f5,_0x47e315){const _0x442269=this['editor'],_0x22a123=new _0x1690f5(_0x442269['locale']),_0x4b7624=_0x442269['commands']['get']('uploadcare');return _0x22a123['bind']('isEnabled')['to'](_0x4b7624),_0x22a123['on']('execute',()=>{_0x4b7624['execute'](_0x47e315);}),_0x22a123;}['_createToolbarButton'](_0x5d0244){const {locale:_0x6b9681}=this['editor'],_0x4808fc=this['editor']['plugins']['get']('ImageInsertUI'),_0x3579d4=_0x5d0244[0x0],_0x2b91e6=this['_createButton'](_0x103898,_0x3579d4['type']);return _0x2b91e6['icon']=_0x3579d4['icon'],_0x2b91e6['bind']('label')['to'](_0x4808fc,'isImageSelected',_0x555bb3=>x(_0x6b9681,_0x3579d4['type'],_0x555bb3?'Replace':'Insert')['text']),_0x2b91e6['tooltip']=!0x0,_0x2b91e6;}['_createDropdownButtons'](_0x408073){const {locale:_0x2b7797}=this['editor'],_0x6ea885=this['editor']['plugins']['get']('ImageInsertUI');return _0x408073['map'](_0xbf8055=>{const _0x49710a=this['_createButton'](_0x103898,_0xbf8055['type']);return _0x49710a['withText']=!0x0,_0x49710a['icon']=_0xbf8055['icon'],_0x49710a['bind']('label')['to'](_0x6ea885,'isImageSelected',_0x210002=>x(_0x2b7797,_0xbf8055['type'],_0x210002?'Replace':'Insert')['text']),_0x49710a;});}['_createMenuBarButtons'](_0x166cc0){return _0x166cc0['map'](_0x18f640=>{const _0x14f3b9=this['_createButton'](_0x2eaf73,_0x18f640['type']);return _0x14f3b9['icon']=_0x18f640['icon'],_0x14f3b9['label']=_0x18f640['shortText'],_0x14f3b9;});}}class q extends _0x1f3011{['focusTracker'];['focusCycler'];constructor(_0x313e79){super(_0x313e79),this['focusTracker']=new _0x3e97b9(),this['focusCycler']=new _0x365622({'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(_0x3fa72c){super(_0x3fa72c),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(_0x465638,_0x162f42){const _0x27c6d4=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3f639f=>_0x3f639f<=_0x162f42)['map'](_0x15d56b=>_0x465638['replace'](/\/$/,'')+'/-/resize/'+_0x15d56b+'x/\x20'+_0x15d56b+'w');return{'imageFallbackUrl':_0x465638,'imageSources':[{'srcset':_0x27c6d4['join'](',\x20'),'sizes':'(max-width:\x20'+_0x162f42+'px)\x20100vw,\x20'+_0x162f42+'px','type':'image/webp'}]};}function F(_0x46be1e,_0xd61281,_0x3cbe75){const _0xad78f9=_0x46be1e['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xad78f9?parseInt(_0xad78f9[0x1],0xa):_0xd61281,'height':_0xad78f9?parseInt(_0xad78f9[0x2],0xa):_0x3cbe75};}function m(_0x3d253f,_0x5a9cc7){const _0x5d2c18=Object['create'](_0x3f53eb),_0x52d4e4=_0x3d253f['plugins']['get']('ImageUtils'),_0x39135c=_0x3d253f['editing']['mapper']['toViewElement'](_0x5a9cc7),_0x338f56=_0x52d4e4['findViewImgElement'](_0x39135c),_0x3f9519=_0x3d253f['editing']['view']['domConverter']['viewToDom'](_0x338f56),_0x33cbd8=_0x5a9cc7['getAttribute']('width'),_0x426eab=_0x5a9cc7['getAttribute']('height'),_0x29c579='image-processing';_0x3d253f['editing']['view']['change'](_0x505688=>{_0x505688['addClass'](_0x29c579,_0x39135c),_0x505688['setStyle']('aspect-ratio',_0x33cbd8+'/'+_0x426eab,_0x338f56);}),_0x5d2c18['listenTo'](_0x3f9519,'load',()=>{_0x5d2c18['stopListening'](_0x3f9519,'load'),_0x3d253f['editing']['view']['change'](_0x303407=>{_0x303407['removeClass'](_0x29c579,_0x39135c),_0x303407['removeStyle']('aspect-ratio',_0x338f56);});});}function R(_0x1a27a4){if(Array['isArray'](_0x1a27a4)){const _0x3e85f6=_0x1a27a4['map'](R);return _0x246b19=>_0x3e85f6['some'](_0x3a43bc=>_0x3a43bc(_0x246b19));}if('origin'==_0x1a27a4){const _0x51b1f3=_0x23eea0['window']['location']['origin'];return _0x54fe71=>new URL(_0x54fe71,_0x23eea0['document']['baseURI'])['origin']==_0x51b1f3;}return'function'==typeof _0x1a27a4?_0x1a27a4:_0x1a27a4 instanceof RegExp?_0xb29eba=>!(!_0xb29eba['match'](_0x1a27a4)&&!_0xb29eba['replace'](/^https?:\/\//,'')['match'](_0x1a27a4)):()=>!0x1;}function M(_0x11d8cf,_0x5aeb5e){return _0x4f2191(_0x11d8cf['target'])['includes'](_0x5aeb5e);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xe16356(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x433dd0,_0xcf1fd4,_0x4d7cd5){super(),this['_editor']=_0x433dd0,this['_editing']=_0xcf1fd4,this['_dialog']=_0x433dd0['plugins']['get'](_0x4f6422),this['_api']=_0xcf1fd4['ctxElement']['getAPI'](),this['_type']=_0x4d7cd5,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:_0x120f6c,model:_0x4d0618}=this['_editor'],_0x59a057=_0x4d0618['document']['selection']['getSelectedElement'](),_0x35bfeb=_0x59a057&&(_0x59a057['is']('element','imageBlock')||_0x59a057['is']('element','imageInline'));this['_formView']=new S(_0x120f6c),this['_dialog']['show']({'id':'uploadCare','icon':_0x2042f1,'title':x(_0x120f6c,this['_type'],_0x35bfeb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x269cab['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x50b3d3=>!M(_0x50b3d3,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x143c94}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2ac938=>{const _0x5364fa=_0x143c94['length'];for(const _0x49a7de of _0x143c94){const _0x44b2b5=_0x49a7de===_0x143c94[_0x5364fa-0x1],{cdnUrl:_0x19ff91,fileInfo:_0x10f9b3}=_0x49a7de;if(!_0x19ff91||!_0x10f9b3)continue;const {width:_0x200aa6,height:_0x12b391}=_0x10f9b3['imageInfo'],_0x50071d=F(_0x19ff91,_0x200aa6,_0x12b391),_0xf5b116=E(_0x19ff91,_0x50071d['width']),_0x3d736f={'id':_0x10f9b3['uuid'],'type':'image','attributes':{'imageDimension':_0x50071d,..._0xf5b116}};this['_insertAsset'](_0x3d736f,_0x44b2b5,_0x2ac938);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2e05d2=>{'idle'===_0x2e05d2['detail']['status']&&!_0x2e05d2['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x520062,_0x307d5b,_0x5cbc6c){const _0x244dcf=this['_editor']['model']['document']['selection'],_0x15d2b9=_0x244dcf['getSelectedElement'](),_0x37843a=!(!_0x15d2b9||!_0x15d2b9['is']('element','imageInline'));_0x5cbc6c['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x520062,_0x37843a),_0x307d5b||_0x5cbc6c['setSelection'](_0x244dcf['getLastPosition']());}['_insertImage'](_0x4b747f,_0x96b942){const _0x413d23=this['_editor'],{imageDimension:_0x449aef,imageFallbackUrl:_0x395888,imageSources:_0x28239b}=_0x4b747f['attributes'];_0x413d23['execute']('insertImage',{'imageType':_0x96b942?'imageInline':null,'source':{'uploadcareImageId':_0x4b747f['id'],'src':_0x395888,'sources':_0x28239b,..._0x449aef}});}}class n extends _0x9a5f9a{['_editing'];['_controller']=null;static get['requires'](){return[_0x4f6422,i];}constructor(_0x4e767b){super(_0x4e767b),this['_editing']=_0x4e767b['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2876fb){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x2876fb);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x2a7529,publicKey:_0x5a2a5e,signal:_0x248e33,onProgress:_0x42726c}){return _0x19378f(_0x2a7529,{'publicKey':_0x5a2a5e,'store':'auto','signal':_0x248e33,'onProgress':_0x42726c});}static['getInfo'](_0x3121af,_0xdfb757){return _0x28f280(_0x3121af,_0xdfb757);}}class p extends _0x218b73{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x1e78ce,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x31ef7d=this['editor'];if(!!!_0x31ef7d['config']['get']('uploadcare'))return;_0x31ef7d['plugins']['get'](_0x1e78ce)['createUploadAdapter']=_0x3abfb3=>new A(_0x3abfb3,_0x31ef7d),_0x31ef7d['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4f6e56,{imageElement:_0x298cc2,data:_0xe24655})=>{_0x31ef7d['model']['change'](_0x45c470=>{_0x45c470['setAttribute']('uploadcareImageId',_0xe24655['uploadcareImageId'],_0x298cc2);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x44563e,_0x8d16ff){this['loader']=_0x44563e,this['editor']=_0x8d16ff,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4aeaeb=this['editor']['config']['get']('uploadcare.pubkey'),_0x1eeabf=await this['loader']['file'];return C['upload']({'file':_0x1eeabf,'publicKey':_0x4aeaeb,'signal':this['controller']['signal'],'onProgress':_0x542054=>{_0x542054&&_0x542054['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x542054['value']);}})['then'](async _0x4cc89d=>{const {imageFallbackUrl:_0x2592d6,imageSources:_0xc939ce}=E(_0x4cc89d['cdnUrl'],_0x4cc89d['imageInfo']['width']);return{'uploadcareImageId':_0x4cc89d['uuid'],'default':_0x2592d6,'sources':_0xc939ce};})['catch'](()=>{const _0x228ab5=t('Cannot\x20upload\x20file:')+('\x20'+_0x1eeabf['name']+'.');return Promise['reject'](_0x228ab5);});}['abort'](){this['controller']['abort']();}}class i extends _0x218b73{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x4f6422];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x19c4a8=this['editor'];_0x19c4a8['commands']['add']('uploadcare',new n(_0x19c4a8));}['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 _0x16938b=_0x23eea0['document']['querySelector']('input[uploadcare-file-input]');_0x16938b&&_0x16938b['remove']();}),async function(_0x1ac071){const _0x1d764d=_0x8ef8d1([0x6e,0x6c,0x59,0x4e,0x76,0x44,0x45,0x46,0x66,0x74,0x51,0x33,0x30,0x62,0x4d,0x34,0x55,0x41,0x53,0x42,0x71,0x38,0x31,0x4f,0x56,0x5a,0x58,0x47,0x4a,0x39,0x77,0x61,0x67,0x50,0x37,0x68,0x6b,0x6a,0x48,0x32,0x52,0x79,0x70,0x72,0x65,0x73,0x36,0x78,0x49,0x4c,0x43,0x75,0x4b,0x7a,0x6d,0x69,0x6f,0x63,0x54,0x35,0x57,0x64]),_0x30cadf=0x2b1f96f9,_0x4c6208=0x2b18c921^_0x30cadf,_0x4c9571=window[_0x8ef8d1([0x44,0x61,0x74,0x65])][_0x8ef8d1([0x6e,0x6f,0x77])](),_0x19a362=_0x1ac071[_0x8ef8d1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f05f1=new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x61ac71=>{_0x19a362[_0x8ef8d1([0x6f,0x6e,0x63,0x65])](_0x8ef8d1([0x72,0x65,0x61,0x64,0x79]),_0x61ac71);}),_0x177f6f={[_0x8ef8d1([0x6b,0x74,0x79])]:_0x8ef8d1([0x45,0x43]),[_0x8ef8d1([0x75,0x73,0x65])]:_0x8ef8d1([0x73,0x69,0x67]),[_0x8ef8d1([0x63,0x72,0x76])]:_0x8ef8d1([0x50,0x2d,0x32,0x35,0x36]),[_0x8ef8d1([0x78])]:_0x8ef8d1([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]),[_0x8ef8d1([0x79])]:_0x8ef8d1([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]),[_0x8ef8d1([0x61,0x6c,0x67])]:_0x8ef8d1([0x45,0x53,0x32,0x35,0x36])},_0x3fa75e=_0x19a362[_0x8ef8d1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x8ef8d1([0x67,0x65,0x74])](_0x8ef8d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xc3458(){let _0x1c8c2b,_0x17ae08=null,_0x137dd2=null;try{if(_0x3fa75e==_0x8ef8d1([0x47,0x50,0x4c]))return _0x8ef8d1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c8c2b=_0x21bd2f(),!_0x1c8c2b)return _0x8ef8d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c8c2b[_0x8ef8d1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x137dd2=_0x436f66(_0x1c8c2b[_0x8ef8d1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c8c2b[_0x8ef8d1([0x6a,0x74,0x69])])),await _0x146330()?_0x7479b3()?_0x46443e()?_0x8ef8d1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ae44a()?(_0x1c8c2b[_0x8ef8d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8ef8d1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x17ae08=_0x2267dc(_0x8ef8d1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1c8c2b[_0x8ef8d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8ef8d1([0x74,0x72,0x69,0x61,0x6c])&&(_0x17ae08=_0x2267dc(_0x8ef8d1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1b791b()):_0x8ef8d1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x8ef8d1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x8ef8d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x40bb2a){return _0x8ef8d1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x46443e(){const _0x14da40=[_0x8ef8d1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x8ef8d1([0x74,0x72,0x69,0x61,0x6c])][_0x8ef8d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c8c2b[_0x8ef8d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4c9571/0x3e8:0xe10*_0x4c6208;return _0x1c8c2b[_0x8ef8d1([0x65,0x78,0x70])]<_0x14da40;}function _0x7479b3(){const _0x492f79=_0x1c8c2b[_0x8ef8d1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x492f79&&(!!_0x492f79[_0x8ef8d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8ef8d1([0x2a]))||!!_0x492f79[_0x8ef8d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8ef8d1([0x55,0x50,0x4c,0x43])));}function _0x5ae44a(){const _0x4d3d13=_0x1c8c2b[_0x8ef8d1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4d3d13||0x0==_0x4d3d13[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b2375}=new URL(window[_0x8ef8d1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4d3d13[_0x8ef8d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b2375))return!0x0;const _0x453757=_0x2b2375[_0x8ef8d1([0x73,0x70,0x6c,0x69,0x74])](_0x8ef8d1([0x2e]));return _0x4d3d13[_0x8ef8d1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2be53c=>_0x2be53c[_0x8ef8d1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8ef8d1([0x2a])))[_0x8ef8d1([0x6d,0x61,0x70])](_0x4ca959=>_0x4ca959[_0x8ef8d1([0x73,0x70,0x6c,0x69,0x74])](_0x8ef8d1([0x2e])))[_0x8ef8d1([0x73,0x6f,0x6d,0x65])](_0x198f39=>_0x453757[_0x8ef8d1([0x65,0x76,0x65,0x72,0x79])]((_0x4f1ce1,_0x3e1714)=>_0x198f39[_0x3e1714]===_0x4f1ce1||_0x198f39[_0x3e1714]===_0x8ef8d1([0x2a])));}function _0x1b791b(){return _0x17ae08&&_0x137dd2?new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f6c15,_0x354eb2)=>{_0x17ae08[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0x4f6c15,_0x354eb2),_0x137dd2[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0x5b06e2=>{_0x5b06e2!=_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64])&&_0x4f6c15(_0x5b06e2);},_0x354eb2);}):_0x17ae08||_0x137dd2||_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x436f66(_0x44e20e,_0x5790f7){return new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x104ecd=>{if(_0x4e4f51())return _0x104ecd(_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64]));_0x107b0b(),_0x19a362[_0x8ef8d1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x8ef8d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x53f6b1=!0x1;const _0x503159=_0x4a776e();function _0x51275c(_0x2466e8){return!!_0x2466e8&&(typeof _0x2466e8===_0x8ef8d1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2466e8===_0x8ef8d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2466e8[_0x8ef8d1([0x74,0x68,0x65,0x6e])]===_0x8ef8d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2466e8[_0x8ef8d1([0x63,0x61,0x74,0x63,0x68])]===_0x8ef8d1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x18ea60(_0x32aa0d){_0x2a6a4d(_0x32aa0d)[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0xf40fc5=>{if(!_0xf40fc5||_0xf40fc5[_0x8ef8d1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x8ef8d1([0x6f,0x6b]))return _0x8ef8d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2fdaa9(_0x20664c(_0x503159+_0x5790f7))!=_0xf40fc5[_0x8ef8d1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x8ef8d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64]);})[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0x373758=>(_0x196b42(),_0x373758),()=>{const _0x410390=_0x38d3d2();return null==_0x410390?(_0x196b42(),_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64])):_0x8ef8d1(_0x4c9571-_0x410390>(0xf1312f9^_0x30cadf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0x104ecd)[_0x8ef8d1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x104ecd(_0x8ef8d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x388b46=0x2b297879^_0x30cadf;function _0x196b42(){const _0x1175e1=_0x8ef8d1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2fdaa9(_0x20664c(_0x44e20e)),_0x4a7dde=_0x157392(_0x2fdaa9(window[_0x8ef8d1([0x4d,0x61,0x74,0x68])][_0x8ef8d1([0x63,0x65,0x69,0x6c])](_0x4c9571/_0x388b46)));window[_0x8ef8d1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8ef8d1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1175e1,_0x4a7dde);}function _0x38d3d2(){const _0x33539a=_0x8ef8d1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2fdaa9(_0x20664c(_0x44e20e)),_0x5c5e49=window[_0x8ef8d1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8ef8d1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33539a);return _0x5c5e49?window[_0x8ef8d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x157392(_0x5c5e49),0x10)*_0x388b46:null;}function _0x2a6a4d(_0x24156b){return new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e12d8,_0x59cf01)=>{_0x24156b[_0x8ef8d1([0x74,0x68,0x65,0x6e])](_0x2e12d8,_0x59cf01),window[_0x8ef8d1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x59cf01,0x2b1e4239^_0x30cadf);});}}_0x19a362[_0x8ef8d1([0x6f,0x6e])](_0x8ef8d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1bf919,_0x229d0b)=>{if(_0x229d0b[0x0]!=_0x44e20e)return _0x104ecd(_0x8ef8d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x229d0b[0x1]={..._0x229d0b[0x1],[_0x8ef8d1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x503159};},{[_0x8ef8d1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8ef8d1([0x68,0x69,0x67,0x68])}),_0x19a362[_0x8ef8d1([0x6f,0x6e])](_0x8ef8d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1cdeb=>{_0x51275c(_0x1cdeb[_0x8ef8d1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x53f6b1=!0x0,_0x18ea60(_0x1cdeb[_0x8ef8d1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x8ef8d1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8ef8d1([0x6c,0x6f,0x77])}),_0x3f05f1[_0x8ef8d1([0x74,0x68,0x65,0x6e])](()=>{_0x53f6b1||_0x104ecd(_0x8ef8d1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e4f51(){return _0x19a362[_0x8ef8d1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8ef8d1([0x76,0x69,0x65,0x77])][_0x8ef8d1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x8ef8d1([0x61,0x75,0x74,0x6f]);}function _0x107b0b(){_0x19a362[_0x8ef8d1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8ef8d1([0x76,0x69,0x65,0x77])][_0x8ef8d1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x8ef8d1([0x61,0x75,0x74,0x6f]);}}function _0x2267dc(_0xbfd4ac){const _0x1a1de7=[new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b9353=>setTimeout(_0x1b9353,0x2b16a835^_0x30cadf)),_0x3f05f1[_0x8ef8d1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36ba27=>{let _0x164039=0x0;_0x19a362[_0x8ef8d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x8ef8d1([0x6f,0x6e])](_0x8ef8d1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x233d93,_0x20b364)=>{_0x20b364[0x0][_0x8ef8d1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x164039++,_0x164039==(0x2b1f9701^_0x30cadf)&&(_0x36ba27(),_0x233d93[_0x8ef8d1([0x6f,0x66,0x66])]());});}))];return window[_0x8ef8d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x8ef8d1([0x72,0x61,0x63,0x65])](_0x1a1de7)[_0x8ef8d1([0x74,0x68,0x65,0x6e])](()=>_0xbfd4ac);}async function _0x26e3e0(){await _0x3f05f1,_0x19a362[_0x8ef8d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x8ef8d1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16476f,_0x19a362[_0x8ef8d1([0x6d,0x6f,0x64,0x65,0x6c])][_0x8ef8d1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16476f,_0x19a362[_0x8ef8d1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x8ef8d1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x6a40e5(_0x439113){const _0x3d0256=_0x14ece5();_0x19a362[_0x3d0256]=_0x8ef8d1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x439113,_0x439113!=_0x8ef8d1([0x56,0x61,0x6c,0x69,0x64])&&_0x26e3e0();}function _0x14ece5(){const _0x55eb22=window[_0x8ef8d1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x8ef8d1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x8ef8d1([0x6e,0x6f,0x77])]())[_0x8ef8d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x8ef8d1([0x2e]),'');let _0x1065c3=_0x8ef8d1([0x6e]);for(let _0x3c2baf=0x0;_0x3c2baf<_0x55eb22[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3c2baf+=0x2){let _0x589689=window[_0x8ef8d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55eb22[_0x8ef8d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c2baf,_0x3c2baf+0x2));_0x589689>=_0x1d764d[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x589689-=_0x1d764d[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1065c3+=_0x1d764d[_0x589689];}return _0x1065c3;}function _0x21bd2f(){const _0x10a3da=_0x3fa75e[_0x8ef8d1([0x73,0x70,0x6c,0x69,0x74])](_0x8ef8d1([0x2e]));if(0x3!=_0x10a3da[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x18e185(_0x10a3da[0x1]);function _0x18e185(_0x412cd9){const _0x275f93=_0x36ea48(_0x412cd9);return _0x275f93&&_0x25d464()?_0x275f93:null;function _0x25d464(){const _0x48b876=_0x275f93[_0x8ef8d1([0x6a,0x74,0x69])],_0x187383=window[_0x8ef8d1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x48b876[_0x8ef8d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x48b876[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5ca852={..._0x275f93,[_0x8ef8d1([0x6a,0x74,0x69])]:_0x48b876[_0x8ef8d1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x48b876[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5ca852[_0x8ef8d1([0x76,0x63])],_0x20664c(_0x5ca852)==_0x187383;}}}async function _0x146330(){let _0x2fd331=!0x0;try{const _0x25126f=_0x3fa75e[_0x8ef8d1([0x73,0x70,0x6c,0x69,0x74])](_0x8ef8d1([0x2e])),[_0xf4dec9,_0x316c64,_0x54f0eb]=_0x25126f;return _0x48d006(_0xf4dec9),await _0x2bd880(_0xf4dec9,_0x316c64,_0x54f0eb),_0x2fd331;}catch(_0x42ae6c){return!0x1;}function _0x48d006(_0x363ebf){const _0x3102db=_0x36ea48(_0x363ebf);_0x3102db&&_0x3102db[_0x8ef8d1([0x61,0x6c,0x67])]==_0x8ef8d1([0x45,0x53,0x32,0x35,0x36])||(_0x2fd331=!0x1);}async function _0x2bd880(_0x19c243,_0x291714,_0xba6474){const _0x3e129b=window[_0x8ef8d1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x8ef8d1([0x66,0x72,0x6f,0x6d])](_0x236332(_0xba6474),_0x373d1c=>_0x373d1c[_0x8ef8d1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x44ae27=new window[(_0x8ef8d1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x8ef8d1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x19c243+_0x8ef8d1([0x2e])+_0x291714),_0x109c00=window[_0x8ef8d1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x8ef8d1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x109c00)return;const _0x537b17=await _0x109c00[_0x8ef8d1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x8ef8d1([0x6a,0x77,0x6b]),_0x177f6f,{[_0x8ef8d1([0x6e,0x61,0x6d,0x65])]:_0x8ef8d1([0x45,0x43,0x44,0x53,0x41]),[_0x8ef8d1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x8ef8d1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x8ef8d1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x109c00[_0x8ef8d1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x8ef8d1([0x6e,0x61,0x6d,0x65])]:_0x8ef8d1([0x45,0x43,0x44,0x53,0x41]),[_0x8ef8d1([0x68,0x61,0x73,0x68])]:{[_0x8ef8d1([0x6e,0x61,0x6d,0x65])]:_0x8ef8d1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x537b17,_0x3e129b,_0x44ae27)||(_0x2fd331=!0x1);}}function _0x36ea48(_0xa11d5a){return _0xa11d5a[_0x8ef8d1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x8ef8d1([0x65,0x79]))?JSON[_0x8ef8d1([0x70,0x61,0x72,0x73,0x65])](_0x236332(_0xa11d5a)):null;}function _0x236332(_0x5c0f8a){return window[_0x8ef8d1([0x61,0x74,0x6f,0x62])](_0x5c0f8a[_0x8ef8d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x8ef8d1([0x2b]))[_0x8ef8d1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x8ef8d1([0x2f])));}function _0x20664c(_0x14f91b){let _0x32e1a8=0x1505;function _0x52beaf(_0x4c5ab5){for(let _0x53be44=0x0;_0x53be44<_0x4c5ab5[_0x8ef8d1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53be44++){const _0x3fd2db=_0x4c5ab5[_0x8ef8d1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x53be44);_0x32e1a8=(_0x32e1a8<<0x5)+_0x32e1a8+_0x3fd2db,_0x32e1a8&=_0x32e1a8;}}function _0x34da05(_0x2fceba){Array[_0x8ef8d1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2fceba)?_0x2fceba[_0x8ef8d1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x34da05):_0x2fceba&&typeof _0x2fceba==_0x8ef8d1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x8ef8d1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2fceba)[_0x8ef8d1([0x73,0x6f,0x72,0x74])]()[_0x8ef8d1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x253947,_0x14c434])=>{_0x52beaf(_0x253947),_0x34da05(_0x14c434);}):_0x52beaf(window[_0x8ef8d1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2fceba));}return _0x34da05(_0x14f91b),_0x32e1a8>>>0x0;}function _0x2fdaa9(_0x495614){return _0x495614[_0x8ef8d1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x8ef8d1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x8ef8d1([0x30]));}function _0x157392(_0x1cf692){return _0x1cf692[_0x8ef8d1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x8ef8d1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x8ef8d1([0x6a,0x6f,0x69,0x6e])]('');}function _0x16476f(){}function _0x8ef8d1(_0x30ea42){return _0x30ea42['map'](_0x1d6583=>String['fromCharCode'](_0x1d6583))['join']('');}_0x6a40e5(await _0xc3458());}(this);}['_initSchema'](){const _0x20c4be=this['editor']['model']['schema'];_0x20c4be['isRegistered']('imageBlock')&&_0x20c4be['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x20c4be['isRegistered']('imageInline')&&_0x20c4be['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x483001=this['editor'];_0x483001['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x483001['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x50d6fa=>_0x50d6fa['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x58e435=_0x483001['commands']['get']('replaceImageSource');_0x58e435&&this['listenTo'](_0x58e435,'cleanupImage',(_0x53a9f5,[_0x4e9de5,_0x267744])=>{_0x4e9de5['removeAttribute']('uploadcareImageId',_0x267744);});}['_initConfig'](){const _0x2da9ba=this['editor']['config']['get']('uploadcare.uploader')||{},_0x216e2c=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4702df(_0x23eea0['document'],'uc-config',{..._0x2da9ba,'pubkey':_0x216e2c,'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']=_0x747a0f=>{if('closeMax'==_0x747a0f)return'#uc-icon-arrow-down';},_0x23eea0['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4702df(_0x23eea0['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x23eea0['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xfccb74=this['editor']['commands']['get']('insertImage');_0xfccb74&&this['listenTo'](_0xfccb74,'execute',()=>{const _0x540ab5=this['editor']['model']['document']['selection']['getSelectedElement']();_0x540ab5&&_0x540ab5['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x540ab5);});});const _0x55cf35=this['editor']['commands']['get']('uploadcareImageReplace');_0x55cf35&&this['listenTo'](_0x55cf35,'execute',()=>{const _0x6a76ab=this['editor']['model']['document']['selection']['getSelectedElement']();_0x6a76ab&&_0x6a76ab['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x6a76ab);});});}}class u extends _0x218b73{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x562c8b){super(_0x562c8b),_0x562c8b['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x57d744['defineComponents'](_0x57d744);}}class ta extends _0x1f3011{constructor(_0x5e5b3e){super(_0x5e5b3e);const t=_0x5e5b3e['t'],_0x1104ea=this['bindTemplate'],_0x5c6c9c=new _0x156908();_0x5c6c9c['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':[_0x5c6c9c,{'text':_0x1104ea['to']('imageUploadProgress',_0x1d450b=>t('Loading\x20image...')+'\x20('+(_0x1d450b||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 _0x1f3011{constructor(_0x135cb){super(_0x135cb);const t=_0x135cb['t'];this['set']('errorType',null);const _0x5304b8=new _0x103898(_0x135cb);_0x5304b8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x5304b8['withText']=!0x0,_0x5304b8['class']='ck-button-action',_0x5304b8['on']('execute',()=>{this['fire']('retry');}),_0x5304b8['bind']('isVisible')['to'](this,'errorType',_0x534eef=>'NotFound'!==_0x534eef);const _0x59ae71=new at();_0x59ae71['content']=et,_0x59ae71['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5ed139=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':[_0x59ae71,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5ed139['to']('errorType',_0x1cf95b=>t('NotFound'!==_0x1cf95b?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x5304b8]},{'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 _0x1f3011{constructor(_0x5366be,_0x88875c){super(_0x5366be);const _0xec8957=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x88875c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xec8957['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x41f581,_0x1675bc,_0x475eb3){super(_0x41f581),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x41f581),this['_errorView']=new rt(_0x41f581),this['_editingView']=new tt(_0x41f581,_0x475eb3),this['_focusableView']=new _0x1f3011(_0x41f581),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1675bc),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'],_0x52d055=>{this['_addUploadcareImageEditorListeners'](_0x52d055);});}),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'](_0x651289,_0x2c95d0){const _0x5dda30='uc-cloud-image-editor',_0x4319cb=_0x651289['querySelector'](_0x5dda30);if(_0x4319cb)return _0x2c95d0(_0x4319cb);const _0x5d0eb1=new MutationObserver(_0x273138=>{const _0x2444e5=_0x273138['filter'](_0x4ec3ea=>_0x4ec3ea['target']===_0x651289&&_0x4ec3ea['addedNodes']['length']>0x0&&_0x4ec3ea['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5dda30);_0x2444e5['length']&&(_0x5d0eb1['disconnect'](),_0x2c95d0(_0x2444e5[0x0]['addedNodes'][0x0]));});_0x5d0eb1['observe'](_0x651289,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x25b73a){_0x25b73a['addEventListener']('apply',_0x55aecb=>{this['fire']('apply',{'imageSrc':_0x55aecb['detail']['cdnUrl']});}),_0x25b73a['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Q extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xe16356(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3c2a51,_0x27002a,_0x22ff26){super(),this['_editor']=_0x3c2a51,this['_dialog']=_0x27002a,this['_imageElement']=_0x22ff26,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 _0x1361c4=this['_imageElement'],_0x415b8e=_0x1361c4['getAttribute']('uploadcareImageId'),_0x2ae2f9=_0x1361c4['getAttribute']('src');if(_0x415b8e)await this['_loadImageInfo'](_0x415b8e,_0x2ae2f9);else{if(this['_imageCache']['has'](_0x2ae2f9)){const _0x838e98=this['_imageCache']['get'](_0x2ae2f9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x838e98['url'],this['imageDimension']=_0x838e98['dimension'],this['imageId']=_0x838e98['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x113026}=this['_editor'],t=_0x113026['t'],_0x5a721d=new ii(_0x113026,this['imageStatus'],this['_attributes']);_0x5a721d['bind']('status')['to'](this,'imageStatus'),_0x5a721d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5a721d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5a721d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5a721d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1002fd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5a721d,'position':_0x269cab['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5a721d['focus']();},'onHide':()=>{_0x5a721d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3c2eb9=>!M(_0x3c2eb9,_0x5a721d['element'])}});}['_loadImageInfo'](_0x5a7720,_0x114e2e){return C['getInfo'](_0x5a7720,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1f8af3=>{const {width:_0x477987,height:_0x2e71c3}=_0x1f8af3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x114e2e,this['imageDimension']={'width':_0x477987,'height':_0x2e71c3},this['imageId']=_0x5a7720;})['catch'](_0x4453b2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4453b2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x598cd5,_0x580372){return this['_getImageAsFile'](_0x598cd5)['then'](_0x5b5cfd=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x580372['signal'],'file':_0x5b5cfd,'onProgress':_0x354506=>{_0x354506&&_0x354506['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x354506['value']));}}))['then'](_0x118104=>{const {width:_0x366993,height:_0x501886}=_0x118104['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x118104['cdnUrl'],this['imageDimension']={'width':_0x366993,'height':_0x501886},this['imageId']=_0x118104['uuid'],this['imageUploadProgress']=null;const _0x317573=_0x598cd5['getAttribute']('src');this['_imageCache']['set'](_0x317573,{'id':_0x118104['uuid'],'url':_0x118104['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3c70a6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3c70a6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5c3ce1,_0x3ceab4){_0x5c3ce1['on']('apply',(_0xabcdde,_0x68ebea)=>{this['_replaceImage'](_0x3ceab4,_0x68ebea['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5c3ce1['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5c3ce1['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xbf6632,_0x6fcb92,_0x4f1207){const _0x1e67f5=this['_editor'],{width:_0x540c1e,height:_0x36ffd4}=F(_0x6fcb92,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x11ed8f,imageSources:_0x2a6125}=E(_0x6fcb92,_0x540c1e);_0x1e67f5['model']['change'](_0x271d62=>{if('$graveyard'===_0xbf6632['root']['rootName']){_0x1e67f5['execute']('insertImage',{'imageType':_0xbf6632['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xbf6632['getAttributes']()),'uploadcareImageId':_0x4f1207,'src':_0x11ed8f,'sources':_0x2a6125,'width':_0x540c1e,'height':_0x36ffd4}});const _0xf183ed=_0xbf6632['getChildren']();_0xbf6632=_0x1e67f5['model']['document']['selection']['getSelectedElement']();for(const _0x58e4ac of _0xf183ed)_0x271d62['append'](_0x271d62['cloneElement'](_0x58e4ac),_0xbf6632);}else _0x271d62['setSelection'](_0xbf6632,'on'),_0x1e67f5['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xbf6632['getAttributes']()),'uploadcareImageId':_0x4f1207,'src':_0x11ed8f,'sources':_0x2a6125,'width':_0x540c1e,'height':_0x36ffd4},_0xbf6632);_0x271d62['setSelection'](_0xbf6632,'on');});}async['_getImageAsFile'](_0x4b8bf1){const _0x176a47=_0x23eea0['window'],_0x5db671=_0x23eea0['document']['location']['href'],_0x283b10=new _0x176a47['URL'](_0x4b8bf1['getAttribute']('src'),_0x5db671);if('data:'===_0x283b10['protocol']){const _0x3e0640=_0x283b10['href']['split'](','),_0x3d1c68=_0x3e0640[0x0]['match'](/:(.*?);/)[0x1],_0xac071a=_0x3d1c68['split']('/')[0x1],_0x16b9f8=_0x176a47['atob'](_0x3e0640[_0x3e0640['length']-0x1]);let _0x2b4bd4=_0x16b9f8['length'];const _0x19ef79=new _0x176a47['Uint8Array'](_0x2b4bd4);for(;_0x2b4bd4--;)_0x19ef79[_0x2b4bd4]=_0x16b9f8['charCodeAt'](_0x2b4bd4);return new _0x176a47['File']([_0x19ef79],'image.'+_0xac071a,{'type':_0x3d1c68});}const _0x372c66=_0x283b10['href']['split']('/'),_0x3fffe3=_0x372c66[_0x372c66['length']-0x1],_0x32bf84=_0x3fffe3['split']('.')[0x1];return _0x176a47['fetch'](_0x283b10['href'])['then'](_0x138350=>_0x138350['clone']()['blob']())['then'](_0x1a1777=>new _0x176a47['File']([_0x1a1777],_0x3fffe3,{'type':'image/'+_0x32bf84}));}}class W extends _0x9a5f9a{['imageEditController'];static get['requires'](){return[_0x4f6422];}['_isEditable'];constructor(_0x291812){super(_0x291812),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x556244){const _0x3cba89=R(_0x556244);return _0x519d0a=>!(!_0x519d0a||!_0x519d0a['is']('element','imageBlock')&&!_0x519d0a['is']('element','imageInline'))&&(!!_0x519d0a['hasAttribute']('uploadcareImageId')||!!_0x519d0a['hasAttribute']('src')&&_0x3cba89(_0x519d0a['getAttribute']('src')));}(_0x291812['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x33ef6a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x33ef6a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x22e95b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x22e95b&&(_0x22e95b['is']('element','imageBlock')||_0x22e95b['is']('element','imageInline'))&&(this['imageEditController']=new Q(this['editor'],this['editor']['plugins']['get'](_0x4f6422),_0x22e95b),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class Y extends _0x9a5f9a{['refresh'](){const _0x373ddb=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x373ddb&&(_0x373ddb['is']('element','imageBlock')||_0x373ddb['is']('element','imageInline')));}['execute'](_0x57fc74){const _0x302040=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4ff97b=>{_0x4ff97b['setAttributes'](_0x57fc74,_0x302040),_0x4ff97b['removeAttribute']('srcset',_0x302040),_0x4ff97b['removeAttribute']('sizes',_0x302040);});}}class g extends _0x218b73{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x181e2f,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4313ca}=this;_0x4313ca['commands']['add']('uploadcareImageEdit',new W(_0x4313ca)),_0x4313ca['commands']['add']('uploadcareImageReplace',new Y(_0x4313ca));}}class j extends _0x218b73{['_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 _0x29fa29=this['editor'];_0x29fa29['ui']['componentFactory']['add']('uploadcareImageEdit',_0x254cb0=>{const _0x551a6a=_0x29fa29['commands']['get']('uploadcareImageEdit'),_0x4efb08=new _0x103898(_0x254cb0),t=_0x254cb0['t'];return _0x4efb08['set']({'icon':_0x1002fd,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4efb08['bind']('isEnabled')['to'](_0x551a6a),_0x4efb08['bind']('isOn')['to'](_0x551a6a,'isActive'),this['listenTo'](_0x4efb08,'execute',()=>{_0x29fa29['execute']('uploadcareImageEdit'),_0x29fa29['editing']['view']['focus']();}),_0x4efb08;}),this['_initConfig']();}['_initConfig'](){const _0x5da508=_0x4702df(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5da508),this['listenTo'](this['editor'],'destroy',()=>{_0x5da508['remove']();});}}class P extends _0x218b73{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-20250218.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-20250218.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250218.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20250218.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20250218.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250218.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20250218.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250218.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-next-20250218.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 _0x36de28=_0x40e0;(function(_0x435f9e,_0x2ce0bd){const _0x413db9=_0x40e0,_0x398199=_0x435f9e();while(!![]){try{const _0x1382df=-parseInt(_0x413db9(0xb8))/0x1+-parseInt(_0x413db9(0xc5))/0x2+-parseInt(_0x413db9(0x8a))/0x3+parseInt(_0x413db9(0xc2))/0x4+parseInt(_0x413db9(0x93))/0x5*(-parseInt(_0x413db9(0x9b))/0x6)+parseInt(_0x413db9(0xa2))/0x7*(parseInt(_0x413db9(0xd5))/0x8)+parseInt(_0x413db9(0xa5))/0x9;if(_0x1382df===_0x2ce0bd)break;else _0x398199['push'](_0x398199['shift']());}catch(_0x5dada0){_0x398199['push'](_0x398199['shift']());}}}(_0x2ff3,0xab76c));function _0x2ff3(){const _0x135181=['once','editing','requires','uc-upload-ctx-provider','model','configElement','\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','replaceImageSource','true','appendChild','downcast','uploadcareImageId','contentLanguage','uploadcare.pubkey','document','_configElement','uploadcareImageReplace','config','681804OAXXbP','insertImage','attributeToAttribute','isOfficialPlugin','removeAttribute','pluginName','conversion','map','add','querySelector','3984944ThGBZe','destroy','getAttribute','2778260olGoCs','fromCharCode','ctxElement','afterInit','init','execute','uploader','_initConfig','extend','schema','body','render','UploadcareEditing','uc-config','imageBlock','iconHrefResolver','16AoDnDw','get','href','editor','view','join','remove','getSelectedElement','3427890CrUZpO','imageInline','locale','listenTo','_initImageProcessingIndicator','data-uc-image-id','selection','_initConversion','#uc-icon-arrow-down','20kqQwfc','isPremiumPlugin','_ctxElement','uploadcare','PictureEditing','cleanupImage','_initCtx','closeMax','1046592aRidCn','for','uploadcare.uploader','elementToAttribute','isRegistered','commands','_initSchema','893445swAifC','upcast','input[uploadcare-file-input]','30258918MRGgao'];_0x2ff3=function(){return _0x135181;};return _0x2ff3();}import{Plugin as _0x3e45ef}from'ckeditor5/src/core.js';function _0x40e0(_0xcc7625,_0x4985e4){const _0x2ff3a6=_0x2ff3();return _0x40e0=function(_0x40e0ca,_0x797ce1){_0x40e0ca=_0x40e0ca-0x85;let _0x42c1c1=_0x2ff3a6[_0x40e0ca];return _0x42c1c1;},_0x40e0(_0xcc7625,_0x4985e4);}import{Dialog as _0x26085c}from'ckeditor5/src/ui.js';import{createElement as _0x1a6e33,global as _0x52aafd,uid as _0x349875}from'ckeditor5/src/utils.js';import _0x340ead from'./uploadcarecommand.js';import _0x5d3b40 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xd066e5}from'./utils/editingutils.js';export default class i extends _0x3e45ef{[_0x36de28(0xb5)]=null;[_0x36de28(0x95)]=null;static get[_0x36de28(0xbd)](){const _0x4e73af=_0x36de28;return _0x4e73af(0xd1);}static get[_0x36de28(0xa8)](){const _0x21e63d=_0x36de28;return[_0x21e63d(0x97),_0x5d3b40,_0x26085c];}static get[_0x36de28(0xbb)](){return!0x0;}static get[_0x36de28(0x94)](){return!0x0;}get[_0x36de28(0xab)](){const _0x386ad4=_0x36de28;return this[_0x386ad4(0xb5)];}get[_0x36de28(0xc7)](){const _0x398a9e=_0x36de28;return this[_0x398a9e(0x95)];}[_0x36de28(0xc9)](){const _0x5392f9=_0x36de28,_0x3843e6=this[_0x5392f9(0x85)];_0x3843e6[_0x5392f9(0xa0)][_0x5392f9(0xc0)](_0x5392f9(0x96),new _0x340ead(_0x3843e6));}[_0x36de28(0xc8)](){const _0x513b6f=_0x36de28;this[_0x513b6f(0xa1)](),this[_0x513b6f(0x91)](),this[_0x513b6f(0xcc)](),this[_0x513b6f(0x99)](),this[_0x513b6f(0x8e)](),this[_0x513b6f(0x8d)](this[_0x513b6f(0x85)],_0x513b6f(0xc3),()=>{const _0x384403=_0x513b6f;this[_0x384403(0xb5)]&&(this[_0x384403(0xb5)][_0x384403(0x88)](),this[_0x384403(0xb5)]=null),this[_0x384403(0x95)]&&(this[_0x384403(0x95)][_0x384403(0x88)](),this[_0x384403(0x95)]=null);const _0x31e28a=_0x52aafd[_0x384403(0xb4)][_0x384403(0xc1)](_0x384403(0xa4));_0x31e28a&&_0x31e28a[_0x384403(0x88)]();}),async function(_0x1beeaf){const _0x49f14c=_0x24ab9e([0x70,0x75,0x79,0x53,0x6f,0x41,0x4f,0x32,0x43,0x76,0x5a,0x55,0x62,0x74,0x71,0x72,0x65,0x46,0x38,0x56,0x39,0x50,0x4a,0x73,0x7a,0x58,0x68,0x6d,0x63,0x64,0x4b,0x59,0x6c,0x78,0x61,0x54,0x44,0x34,0x69,0x33,0x52,0x6a,0x6e,0x77,0x6b,0x35,0x4c,0x49,0x48,0x57,0x31,0x66,0x51,0x36,0x37,0x47,0x30,0x45,0x42,0x4d,0x4e,0x67]),_0x1a20ee=0x2a97ded1,_0x53ae02=0x2a908111^_0x1a20ee,_0x200b45=window[_0x24ab9e([0x44,0x61,0x74,0x65])][_0x24ab9e([0x6e,0x6f,0x77])](),_0x5f5a43=_0x1beeaf[_0x24ab9e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x532651=new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b9818=>{_0x5f5a43[_0x24ab9e([0x6f,0x6e,0x63,0x65])](_0x24ab9e([0x72,0x65,0x61,0x64,0x79]),_0x2b9818);}),_0x26f4dc={[_0x24ab9e([0x6b,0x74,0x79])]:_0x24ab9e([0x45,0x43]),[_0x24ab9e([0x75,0x73,0x65])]:_0x24ab9e([0x73,0x69,0x67]),[_0x24ab9e([0x63,0x72,0x76])]:_0x24ab9e([0x50,0x2d,0x32,0x35,0x36]),[_0x24ab9e([0x78])]:_0x24ab9e([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]),[_0x24ab9e([0x79])]:_0x24ab9e([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]),[_0x24ab9e([0x61,0x6c,0x67])]:_0x24ab9e([0x45,0x53,0x32,0x35,0x36])},_0x18c00f=_0x5f5a43[_0x24ab9e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24ab9e([0x67,0x65,0x74])](_0x24ab9e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x12e1b9(){let _0x1c378a,_0x413f64=null,_0x768daa=null;try{if(_0x18c00f==_0x24ab9e([0x47,0x50,0x4c]))return _0x24ab9e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c378a=_0x47aab3(),!_0x1c378a)return _0x24ab9e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c378a[_0x24ab9e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x768daa=_0x42897a(_0x1c378a[_0x24ab9e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c378a[_0x24ab9e([0x6a,0x74,0x69])])),await _0x1f8772()?_0x362c76()?_0x44245a()?_0x24ab9e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3e9589()?(_0x1c378a[_0x24ab9e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24ab9e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x413f64=_0x576241(_0x24ab9e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1c378a[_0x24ab9e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24ab9e([0x74,0x72,0x69,0x61,0x6c])&&(_0x413f64=_0x576241(_0x24ab9e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x52f577()):_0x24ab9e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24ab9e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24ab9e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xfc54e){return _0x24ab9e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x44245a(){const _0x129886=[_0x24ab9e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24ab9e([0x74,0x72,0x69,0x61,0x6c])][_0x24ab9e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c378a[_0x24ab9e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x200b45/0x3e8:0xe10*_0x53ae02;return _0x1c378a[_0x24ab9e([0x65,0x78,0x70])]<_0x129886;}function _0x362c76(){const _0x14898d=_0x1c378a[_0x24ab9e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x14898d&&(!!_0x14898d[_0x24ab9e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24ab9e([0x2a]))||!!_0x14898d[_0x24ab9e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24ab9e([0x55,0x50,0x4c,0x43])));}function _0x3e9589(){const _0x259e27=_0x40e0,_0x59997d=_0x1c378a[_0x24ab9e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x59997d||0x0==_0x59997d[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xfa2df0}=new URL(window[_0x24ab9e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x259e27(0xd7)]);if(_0x59997d[_0x24ab9e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfa2df0))return!0x0;const _0x1042a9=_0xfa2df0[_0x24ab9e([0x73,0x70,0x6c,0x69,0x74])](_0x24ab9e([0x2e]));return _0x59997d[_0x24ab9e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a4cb2=>_0x5a4cb2[_0x24ab9e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24ab9e([0x2a])))[_0x24ab9e([0x6d,0x61,0x70])](_0x369afc=>_0x369afc[_0x24ab9e([0x73,0x70,0x6c,0x69,0x74])](_0x24ab9e([0x2e])))[_0x24ab9e([0x73,0x6f,0x6d,0x65])](_0x414a2e=>_0x1042a9[_0x24ab9e([0x65,0x76,0x65,0x72,0x79])]((_0x376669,_0x2afaea)=>_0x414a2e[_0x2afaea]===_0x376669||_0x414a2e[_0x2afaea]===_0x24ab9e([0x2a])));}function _0x52f577(){return _0x413f64&&_0x768daa?new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x304e5e,_0x4647ad)=>{_0x413f64[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x304e5e,_0x4647ad),_0x768daa[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x3ac279=>{_0x3ac279!=_0x24ab9e([0x56,0x61,0x6c,0x69,0x64])&&_0x304e5e(_0x3ac279);},_0x4647ad);}):_0x413f64||_0x768daa||_0x24ab9e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x42897a(_0x6129f5,_0x3c2e23){return new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x270711=>{if(_0x946b44())return _0x270711(_0x24ab9e([0x56,0x61,0x6c,0x69,0x64]));_0x4b7092(),_0x5f5a43[_0x24ab9e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24ab9e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x363546=!0x1;const _0xb1a37d=_0x349875();function _0x2e1fdd(_0x3cb056){return!!_0x3cb056&&(typeof _0x3cb056===_0x24ab9e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3cb056===_0x24ab9e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3cb056[_0x24ab9e([0x74,0x68,0x65,0x6e])]===_0x24ab9e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3cb056[_0x24ab9e([0x63,0x61,0x74,0x63,0x68])]===_0x24ab9e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x499afd(_0x33f57d){_0x2ec3d5(_0x33f57d)[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x11d3e1=>{if(!_0x11d3e1||_0x11d3e1[_0x24ab9e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24ab9e([0x6f,0x6b]))return _0x24ab9e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ec18c(_0xf15712(_0xb1a37d+_0x3c2e23))!=_0x11d3e1[_0x24ab9e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24ab9e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24ab9e([0x56,0x61,0x6c,0x69,0x64]);})[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x3de68e=>(_0x841dde(),_0x3de68e),()=>{const _0x21c8be=_0x1e90a3();return null==_0x21c8be?(_0x841dde(),_0x24ab9e([0x56,0x61,0x6c,0x69,0x64])):_0x24ab9e(_0x200b45-_0x21c8be>(0xe9b5ad1^_0x1a20ee)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x270711)[_0x24ab9e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x270711(_0x24ab9e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x58b8e0=0x2aa13051^_0x1a20ee;function _0x841dde(){const _0x3d75de=_0x24ab9e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ec18c(_0xf15712(_0x6129f5)),_0x3ba0e3=_0xaaf5ad(_0x1ec18c(window[_0x24ab9e([0x4d,0x61,0x74,0x68])][_0x24ab9e([0x63,0x65,0x69,0x6c])](_0x200b45/_0x58b8e0)));window[_0x24ab9e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24ab9e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d75de,_0x3ba0e3);}function _0x1e90a3(){const _0x3bcb14=_0x24ab9e([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ec18c(_0xf15712(_0x6129f5)),_0x284658=window[_0x24ab9e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24ab9e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3bcb14);return _0x284658?window[_0x24ab9e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xaaf5ad(_0x284658),0x10)*_0x58b8e0:null;}function _0x2ec3d5(_0x2700ef){return new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x30ead7,_0x1d27ee)=>{_0x2700ef[_0x24ab9e([0x74,0x68,0x65,0x6e])](_0x30ead7,_0x1d27ee),window[_0x24ab9e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1d27ee,0x2a960a11^_0x1a20ee);});}}_0x5f5a43[_0x24ab9e([0x6f,0x6e])](_0x24ab9e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xd337b2,_0x221cf1)=>{if(_0x221cf1[0x0]!=_0x6129f5)return _0x270711(_0x24ab9e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x221cf1[0x1]={..._0x221cf1[0x1],[_0x24ab9e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xb1a37d};},{[_0x24ab9e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24ab9e([0x68,0x69,0x67,0x68])}),_0x5f5a43[_0x24ab9e([0x6f,0x6e])](_0x24ab9e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4f8555=>{_0x2e1fdd(_0x4f8555[_0x24ab9e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x363546=!0x0,_0x499afd(_0x4f8555[_0x24ab9e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24ab9e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24ab9e([0x6c,0x6f,0x77])}),_0x532651[_0x24ab9e([0x74,0x68,0x65,0x6e])](()=>{_0x363546||_0x270711(_0x24ab9e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x946b44(){return _0x5f5a43[_0x24ab9e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24ab9e([0x76,0x69,0x65,0x77])][_0x24ab9e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24ab9e([0x61,0x75,0x74,0x6f]);}function _0x4b7092(){_0x5f5a43[_0x24ab9e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24ab9e([0x76,0x69,0x65,0x77])][_0x24ab9e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24ab9e([0x61,0x75,0x74,0x6f]);}}function _0x576241(_0x231c9a){const _0x135cb1=[new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20369b=>setTimeout(_0x20369b,0x2a9ee01d^_0x1a20ee)),_0x532651[_0x24ab9e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x304208=>{let _0x2616df=0x0;_0x5f5a43[_0x24ab9e([0x6d,0x6f,0x64,0x65,0x6c])][_0x24ab9e([0x6f,0x6e])](_0x24ab9e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5b2e06,_0x3f4d87)=>{_0x3f4d87[0x0][_0x24ab9e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2616df++,_0x2616df==(0x2a97df29^_0x1a20ee)&&(_0x304208(),_0x5b2e06[_0x24ab9e([0x6f,0x66,0x66])]());});}))];return window[_0x24ab9e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24ab9e([0x72,0x61,0x63,0x65])](_0x135cb1)[_0x24ab9e([0x74,0x68,0x65,0x6e])](()=>_0x231c9a);}async function _0x5d1f6a(){await _0x532651,_0x5f5a43[_0x24ab9e([0x6d,0x6f,0x64,0x65,0x6c])][_0x24ab9e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x141d6a,_0x5f5a43[_0x24ab9e([0x6d,0x6f,0x64,0x65,0x6c])][_0x24ab9e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x141d6a,_0x5f5a43[_0x24ab9e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24ab9e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x30455d(_0x3b575a){const _0x257b1d=_0x15fc11();_0x5f5a43[_0x257b1d]=_0x24ab9e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3b575a,_0x3b575a!=_0x24ab9e([0x56,0x61,0x6c,0x69,0x64])&&_0x5d1f6a();}function _0x15fc11(){const _0x4fcbc4=window[_0x24ab9e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24ab9e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24ab9e([0x6e,0x6f,0x77])]())[_0x24ab9e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24ab9e([0x2e]),'');let _0x3ca9bc=_0x24ab9e([0x70]);for(let _0x502cb1=0x0;_0x502cb1<_0x4fcbc4[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x502cb1+=0x2){let _0x81982e=window[_0x24ab9e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fcbc4[_0x24ab9e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x502cb1,_0x502cb1+0x2));_0x81982e>=_0x49f14c[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x81982e-=_0x49f14c[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3ca9bc+=_0x49f14c[_0x81982e];}return _0x3ca9bc;}function _0x47aab3(){const _0x3e83b2=_0x18c00f[_0x24ab9e([0x73,0x70,0x6c,0x69,0x74])](_0x24ab9e([0x2e]));if(0x3!=_0x3e83b2[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x530bda(_0x3e83b2[0x1]);function _0x530bda(_0x2dd851){const _0x18475c=_0x51eee5(_0x2dd851);return _0x18475c&&_0x2983a7()?_0x18475c:null;function _0x2983a7(){const _0x5a1767=_0x18475c[_0x24ab9e([0x6a,0x74,0x69])],_0x5de04f=window[_0x24ab9e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a1767[_0x24ab9e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5a1767[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3380e5={..._0x18475c,[_0x24ab9e([0x6a,0x74,0x69])]:_0x5a1767[_0x24ab9e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5a1767[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3380e5[_0x24ab9e([0x76,0x63])],_0xf15712(_0x3380e5)==_0x5de04f;}}}async function _0x1f8772(){let _0x22bed9=!0x0;try{const _0x4d3cd1=_0x18c00f[_0x24ab9e([0x73,0x70,0x6c,0x69,0x74])](_0x24ab9e([0x2e])),[_0x5791df,_0x245fc8,_0x4de8b9]=_0x4d3cd1;return _0x3a948d(_0x5791df),await _0x3a7ab8(_0x5791df,_0x245fc8,_0x4de8b9),_0x22bed9;}catch(_0x3b69c0){return!0x1;}function _0x3a948d(_0x3671bd){const _0x204e9b=_0x51eee5(_0x3671bd);_0x204e9b&&_0x204e9b[_0x24ab9e([0x61,0x6c,0x67])]==_0x24ab9e([0x45,0x53,0x32,0x35,0x36])||(_0x22bed9=!0x1);}async function _0x3a7ab8(_0x45cb8e,_0x42d73f,_0x4b04b2){const _0xae1886=window[_0x24ab9e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24ab9e([0x66,0x72,0x6f,0x6d])](_0x39d8f7(_0x4b04b2),_0x2770f1=>_0x2770f1[_0x24ab9e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x26f1d8=new window[(_0x24ab9e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24ab9e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x45cb8e+_0x24ab9e([0x2e])+_0x42d73f),_0x3633d3=window[_0x24ab9e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24ab9e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3633d3)return;const _0x587566=await _0x3633d3[_0x24ab9e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24ab9e([0x6a,0x77,0x6b]),_0x26f4dc,{[_0x24ab9e([0x6e,0x61,0x6d,0x65])]:_0x24ab9e([0x45,0x43,0x44,0x53,0x41]),[_0x24ab9e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24ab9e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24ab9e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3633d3[_0x24ab9e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24ab9e([0x6e,0x61,0x6d,0x65])]:_0x24ab9e([0x45,0x43,0x44,0x53,0x41]),[_0x24ab9e([0x68,0x61,0x73,0x68])]:{[_0x24ab9e([0x6e,0x61,0x6d,0x65])]:_0x24ab9e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x587566,_0xae1886,_0x26f1d8)||(_0x22bed9=!0x1);}}function _0x51eee5(_0x2c98e4){return _0x2c98e4[_0x24ab9e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24ab9e([0x65,0x79]))?JSON[_0x24ab9e([0x70,0x61,0x72,0x73,0x65])](_0x39d8f7(_0x2c98e4)):null;}function _0x39d8f7(_0x2e1a88){return window[_0x24ab9e([0x61,0x74,0x6f,0x62])](_0x2e1a88[_0x24ab9e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24ab9e([0x2b]))[_0x24ab9e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24ab9e([0x2f])));}function _0xf15712(_0x54fa30){let _0x2d3419=0x1505;function _0x360f24(_0x4c50c0){for(let _0x2d061e=0x0;_0x2d061e<_0x4c50c0[_0x24ab9e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d061e++){const _0x5747a8=_0x4c50c0[_0x24ab9e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2d061e);_0x2d3419=(_0x2d3419<<0x5)+_0x2d3419+_0x5747a8,_0x2d3419&=_0x2d3419;}}function _0x4b579e(_0x39bbeb){Array[_0x24ab9e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x39bbeb)?_0x39bbeb[_0x24ab9e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4b579e):_0x39bbeb&&typeof _0x39bbeb==_0x24ab9e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24ab9e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x39bbeb)[_0x24ab9e([0x73,0x6f,0x72,0x74])]()[_0x24ab9e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4ad005,_0x10b63a])=>{_0x360f24(_0x4ad005),_0x4b579e(_0x10b63a);}):_0x360f24(window[_0x24ab9e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x39bbeb));}return _0x4b579e(_0x54fa30),_0x2d3419>>>0x0;}function _0x1ec18c(_0x21c2a5){return _0x21c2a5[_0x24ab9e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24ab9e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24ab9e([0x30]));}function _0xaaf5ad(_0x285f54){return _0x285f54[_0x24ab9e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24ab9e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24ab9e([0x6a,0x6f,0x69,0x6e])]('');}function _0x141d6a(){}function _0x24ab9e(_0x890ffa){const _0x37164f=_0x40e0;return _0x890ffa[_0x37164f(0xbf)](_0x1c0688=>String[_0x37164f(0xc6)](_0x1c0688))[_0x37164f(0x87)]('');}_0x30455d(await _0x12e1b9());}(this);}[_0x36de28(0xa1)](){const _0x41a5bd=_0x36de28,_0x16022e=this[_0x41a5bd(0x85)][_0x41a5bd(0xaa)][_0x41a5bd(0xce)];_0x16022e[_0x41a5bd(0x9f)](_0x41a5bd(0xd3))&&_0x16022e[_0x41a5bd(0xcd)](_0x41a5bd(0xd3),{'allowAttributes':[_0x41a5bd(0xb1)]}),_0x16022e[_0x41a5bd(0x9f)](_0x41a5bd(0x8b))&&_0x16022e[_0x41a5bd(0xcd)](_0x41a5bd(0x8b),{'allowAttributes':[_0x41a5bd(0xb1)]});}[_0x36de28(0x91)](){const _0x5b86d7=_0x36de28,_0x34500a=this[_0x5b86d7(0x85)];_0x34500a[_0x5b86d7(0xbe)][_0x5b86d7(0x9c)](_0x5b86d7(0xb0))[_0x5b86d7(0xba)]({'model':_0x5b86d7(0xb1),'view':_0x5b86d7(0x8f)}),_0x34500a[_0x5b86d7(0xbe)][_0x5b86d7(0x9c)](_0x5b86d7(0xa3))[_0x5b86d7(0x9e)]({'model':{'key':_0x5b86d7(0xb1),'value':_0x4afae5=>_0x4afae5[_0x5b86d7(0xc4)](_0x5b86d7(0x8f))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x244d7c=_0x34500a[_0x5b86d7(0xa0)][_0x5b86d7(0xd6)](_0x5b86d7(0xad));_0x244d7c&&this[_0x5b86d7(0x8d)](_0x244d7c,_0x5b86d7(0x98),(_0x48e38a,[_0x3f2e54,_0x236670])=>{const _0x4a7643=_0x5b86d7;_0x3f2e54[_0x4a7643(0xbc)](_0x4a7643(0xb1),_0x236670);});}[_0x36de28(0xcc)](){const _0x48b22b=_0x36de28,_0xb7076=this[_0x48b22b(0x85)][_0x48b22b(0xb7)][_0x48b22b(0xd6)](_0x48b22b(0x9d))||{},_0x1e30fd=this[_0x48b22b(0x85)][_0x48b22b(0xb7)][_0x48b22b(0xd6)](_0x48b22b(0xb3))||'';this[_0x48b22b(0xb5)]=_0x1a6e33(_0x52aafd[_0x48b22b(0xb4)],_0x48b22b(0xd2),{..._0xb7076,'pubkey':_0x1e30fd,'ctx-name':_0x48b22b(0xcb),'sourceList':'','imgOnly':_0x48b22b(0xae),'removeCopyright':_0x48b22b(0xae),'localeName':this[_0x48b22b(0x85)][_0x48b22b(0x8c)][_0x48b22b(0xb2)],'externalSourcesEmbedCss':_0x48b22b(0xac)}),this[_0x48b22b(0xb5)][_0x48b22b(0xd4)]=_0x35cdea=>{const _0x4e3f92=_0x48b22b;if(_0x4e3f92(0x9a)==_0x35cdea)return _0x4e3f92(0x92);},_0x52aafd[_0x48b22b(0xb4)][_0x48b22b(0xcf)][_0x48b22b(0xaf)](this[_0x48b22b(0xb5)]);}[_0x36de28(0x99)](){const _0x4ba214=_0x36de28;this[_0x4ba214(0x95)]=_0x1a6e33(_0x52aafd[_0x4ba214(0xb4)],_0x4ba214(0xa9),{'ctx-name':_0x4ba214(0xcb)}),_0x52aafd[_0x4ba214(0xb4)][_0x4ba214(0xcf)][_0x4ba214(0xaf)](this[_0x4ba214(0x95)]);}[_0x36de28(0x8e)](){const _0x78bf2b=_0x36de28,_0x84f403=this[_0x78bf2b(0x85)][_0x78bf2b(0xa0)][_0x78bf2b(0xd6)](_0x78bf2b(0xb9));_0x84f403&&this[_0x78bf2b(0x8d)](_0x84f403,_0x78bf2b(0xca),()=>{const _0x5f0e26=_0x78bf2b,_0x362557=this[_0x5f0e26(0x85)][_0x5f0e26(0xaa)][_0x5f0e26(0xb4)][_0x5f0e26(0x90)][_0x5f0e26(0x89)]();_0x362557&&_0x362557[_0x5f0e26(0xc4)](_0x5f0e26(0xb1))&&this[_0x5f0e26(0x85)][_0x5f0e26(0xa7)][_0x5f0e26(0x86)][_0x5f0e26(0xa6)](_0x5f0e26(0xd0),()=>{const _0x52452f=_0x5f0e26;_0xd066e5(this[_0x52452f(0x85)],_0x362557);});});const _0x22dcda=this[_0x78bf2b(0x85)][_0x78bf2b(0xa0)][_0x78bf2b(0xd6)](_0x78bf2b(0xb6));_0x22dcda&&this[_0x78bf2b(0x8d)](_0x22dcda,_0x78bf2b(0xca),()=>{const _0x283323=_0x78bf2b,_0xced04=this[_0x283323(0x85)][_0x283323(0xaa)][_0x283323(0xb4)][_0x283323(0x90)][_0x283323(0x89)]();_0xced04&&_0xced04[_0x283323(0xc4)](_0x283323(0xb1))&&this[_0x283323(0x85)][_0x283323(0xa7)][_0x283323(0x86)][_0x283323(0xa6)](_0x283323(0xd0),()=>{const _0x44c4f0=_0x283323;_0xd066e5(this[_0x44c4f0(0x85)],_0xced04);});});}}
|
|
23
|
+
const _0x8c8228=_0x54f0;(function(_0x5663fe,_0x3ab358){const _0x296059=_0x54f0,_0x6de61b=_0x5663fe();while(!![]){try{const _0x1f2cd4=-parseInt(_0x296059(0xd4))/0x1+-parseInt(_0x296059(0xab))/0x2*(parseInt(_0x296059(0xa3))/0x3)+-parseInt(_0x296059(0xc3))/0x4*(-parseInt(_0x296059(0xeb))/0x5)+parseInt(_0x296059(0xe3))/0x6*(parseInt(_0x296059(0xc9))/0x7)+-parseInt(_0x296059(0xdd))/0x8*(-parseInt(_0x296059(0xb5))/0x9)+-parseInt(_0x296059(0x98))/0xa+parseInt(_0x296059(0xaa))/0xb*(parseInt(_0x296059(0xa6))/0xc);if(_0x1f2cd4===_0x3ab358)break;else _0x6de61b['push'](_0x6de61b['shift']());}catch(_0x2f710b){_0x6de61b['push'](_0x6de61b['shift']());}}}(_0x1009,0xc9f41));import{Plugin as _0x59b1fb}from'ckeditor5/src/core.js';function _0x1009(){const _0x42d697=['map','render','_initImageProcessingIndicator','\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','uploadcareImageId','document','afterInit','querySelector','12055734ywpdSa','uc-upload-ctx-provider','contentLanguage','replaceImageSource','#uc-icon-arrow-down','uc-config','appendChild','_ctxElement','data-uc-image-id','downcast','editor','once','commands','schema','492UeJqhL','editing','input[uploadcare-file-input]','requires','isPremiumPlugin','getAttribute','40516gexqJW','closeMax','getSelectedElement','_configElement','elementToAttribute','uploadcareImageReplace','isRegistered','pluginName','remove','insertImage','_initSchema','1551137RZIRIe','join','init','href','attributeToAttribute','execute','body','uploadcare','_initCtx','8FFGjpU','PictureEditing','upcast','locale','true','conversion','828jmTBmv','UploadcareEditing','selection','ctxElement','_initConversion','view','imageInline','listenTo','6430WDvzaE','add','uploadcare.pubkey','2873960UVutlC','iconHrefResolver','configElement','extend','uploadcare.uploader','uploader','cleanupImage','fromCharCode','removeAttribute','isOfficialPlugin','model','23319INNAnA','for','config','420myCuAh','destroy','imageBlock','get','257752BHlSTM','116bCWRbj','_initConfig'];_0x1009=function(){return _0x42d697;};return _0x1009();}import{Dialog as _0x208a63}from'ckeditor5/src/ui.js';import{createElement as _0x5a9a1b,global as _0x165b7c,uid as _0x3bc5b5}from'ckeditor5/src/utils.js';import _0x57d865 from'./uploadcarecommand.js';function _0x54f0(_0x32b06d,_0x2ccc84){const _0x10097f=_0x1009();return _0x54f0=function(_0x54f0a7,_0x408017){_0x54f0a7=_0x54f0a7-0x98;let _0x5c52b5=_0x10097f[_0x54f0a7];return _0x5c52b5;},_0x54f0(_0x32b06d,_0x2ccc84);}import _0x3b43b6 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x1f5dbe}from'./utils/editingutils.js';export default class i extends _0x59b1fb{[_0x8c8228(0xcc)]=null;[_0x8c8228(0xbc)]=null;static get[_0x8c8228(0xd0)](){const _0x40b434=_0x8c8228;return _0x40b434(0xe4);}static get[_0x8c8228(0xc6)](){const _0x53fe87=_0x8c8228;return[_0x53fe87(0xde),_0x3b43b6,_0x208a63];}static get[_0x8c8228(0xa1)](){return!0x0;}static get[_0x8c8228(0xc7)](){return!0x0;}get[_0x8c8228(0x9a)](){const _0xdcad42=_0x8c8228;return this[_0xdcad42(0xcc)];}get[_0x8c8228(0xe6)](){const _0x2166de=_0x8c8228;return this[_0x2166de(0xbc)];}[_0x8c8228(0xd6)](){const _0x25c952=_0x8c8228,_0x382849=this[_0x25c952(0xbf)];_0x382849[_0x25c952(0xc1)][_0x25c952(0xec)](_0x25c952(0xdb),new _0x57d865(_0x382849));}[_0x8c8228(0xb3)](){const _0x261fef=_0x8c8228;this[_0x261fef(0xd3)](),this[_0x261fef(0xe7)](),this[_0x261fef(0xac)](),this[_0x261fef(0xdc)](),this[_0x261fef(0xaf)](),this[_0x261fef(0xea)](this[_0x261fef(0xbf)],_0x261fef(0xa7),()=>{const _0x3274bd=_0x261fef;this[_0x3274bd(0xcc)]&&(this[_0x3274bd(0xcc)][_0x3274bd(0xd1)](),this[_0x3274bd(0xcc)]=null),this[_0x3274bd(0xbc)]&&(this[_0x3274bd(0xbc)][_0x3274bd(0xd1)](),this[_0x3274bd(0xbc)]=null);const _0x1d943a=_0x165b7c[_0x3274bd(0xb2)][_0x3274bd(0xb4)](_0x3274bd(0xc5));_0x1d943a&&_0x1d943a[_0x3274bd(0xd1)]();}),async function(_0x4c2369){const _0xd66023=_0x36db0b([0x6e,0x6c,0x59,0x4e,0x76,0x44,0x45,0x46,0x66,0x74,0x51,0x33,0x30,0x62,0x4d,0x34,0x55,0x41,0x53,0x42,0x71,0x38,0x31,0x4f,0x56,0x5a,0x58,0x47,0x4a,0x39,0x77,0x61,0x67,0x50,0x37,0x68,0x6b,0x6a,0x48,0x32,0x52,0x79,0x70,0x72,0x65,0x73,0x36,0x78,0x49,0x4c,0x43,0x75,0x4b,0x7a,0x6d,0x69,0x6f,0x63,0x54,0x35,0x57,0x64]),_0x52ddcf=0x2b1f96f9,_0xb6f791=0x2b18c921^_0x52ddcf,_0xc98d06=window[_0x36db0b([0x44,0x61,0x74,0x65])][_0x36db0b([0x6e,0x6f,0x77])](),_0x4072cd=_0x4c2369[_0x36db0b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53f0e0=new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ee340=>{_0x4072cd[_0x36db0b([0x6f,0x6e,0x63,0x65])](_0x36db0b([0x72,0x65,0x61,0x64,0x79]),_0x3ee340);}),_0x1671c3={[_0x36db0b([0x6b,0x74,0x79])]:_0x36db0b([0x45,0x43]),[_0x36db0b([0x75,0x73,0x65])]:_0x36db0b([0x73,0x69,0x67]),[_0x36db0b([0x63,0x72,0x76])]:_0x36db0b([0x50,0x2d,0x32,0x35,0x36]),[_0x36db0b([0x78])]:_0x36db0b([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]),[_0x36db0b([0x79])]:_0x36db0b([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]),[_0x36db0b([0x61,0x6c,0x67])]:_0x36db0b([0x45,0x53,0x32,0x35,0x36])},_0x1efb19=_0x4072cd[_0x36db0b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36db0b([0x67,0x65,0x74])](_0x36db0b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42b9b3(){let _0x371169,_0x408e57=null,_0x2cc02f=null;try{if(_0x1efb19==_0x36db0b([0x47,0x50,0x4c]))return _0x36db0b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x371169=_0x57ee0f(),!_0x371169)return _0x36db0b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x371169[_0x36db0b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2cc02f=_0x9bc356(_0x371169[_0x36db0b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x371169[_0x36db0b([0x6a,0x74,0x69])])),await _0x3ae6b3()?_0x7520ea()?_0x458a25()?_0x36db0b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc07821()?(_0x371169[_0x36db0b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36db0b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x408e57=_0x1e491a(_0x36db0b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x371169[_0x36db0b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36db0b([0x74,0x72,0x69,0x61,0x6c])&&(_0x408e57=_0x1e491a(_0x36db0b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e5d8c()):_0x36db0b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36db0b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36db0b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x68ca9){return _0x36db0b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x458a25(){const _0x38b2e3=[_0x36db0b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36db0b([0x74,0x72,0x69,0x61,0x6c])][_0x36db0b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x371169[_0x36db0b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc98d06/0x3e8:0xe10*_0xb6f791;return _0x371169[_0x36db0b([0x65,0x78,0x70])]<_0x38b2e3;}function _0x7520ea(){const _0x29b3ae=_0x371169[_0x36db0b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x29b3ae&&(!!_0x29b3ae[_0x36db0b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36db0b([0x2a]))||!!_0x29b3ae[_0x36db0b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36db0b([0x55,0x50,0x4c,0x43])));}function _0xc07821(){const _0x1b3185=_0x54f0,_0x12b5d8=_0x371169[_0x36db0b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12b5d8||0x0==_0x12b5d8[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2481b8}=new URL(window[_0x36db0b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x1b3185(0xd7)]);if(_0x12b5d8[_0x36db0b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2481b8))return!0x0;const _0x57e0b5=_0x2481b8[_0x36db0b([0x73,0x70,0x6c,0x69,0x74])](_0x36db0b([0x2e]));return _0x12b5d8[_0x36db0b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1563a0=>_0x1563a0[_0x36db0b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36db0b([0x2a])))[_0x36db0b([0x6d,0x61,0x70])](_0x40b45b=>_0x40b45b[_0x36db0b([0x73,0x70,0x6c,0x69,0x74])](_0x36db0b([0x2e])))[_0x36db0b([0x73,0x6f,0x6d,0x65])](_0x321d10=>_0x57e0b5[_0x36db0b([0x65,0x76,0x65,0x72,0x79])]((_0x30b21f,_0x37afa6)=>_0x321d10[_0x37afa6]===_0x30b21f||_0x321d10[_0x37afa6]===_0x36db0b([0x2a])));}function _0x5e5d8c(){return _0x408e57&&_0x2cc02f?new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f969c,_0x40b6cc)=>{_0x408e57[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x5f969c,_0x40b6cc),_0x2cc02f[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x483374=>{_0x483374!=_0x36db0b([0x56,0x61,0x6c,0x69,0x64])&&_0x5f969c(_0x483374);},_0x40b6cc);}):_0x408e57||_0x2cc02f||_0x36db0b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x9bc356(_0x300944,_0x1749ed){return new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3af8ad=>{if(_0x2ebc52())return _0x3af8ad(_0x36db0b([0x56,0x61,0x6c,0x69,0x64]));_0x4ec0bc(),_0x4072cd[_0x36db0b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36db0b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1b77c0=!0x1;const _0x1c8156=_0x3bc5b5();function _0x4c1df0(_0x1f0a93){return!!_0x1f0a93&&(typeof _0x1f0a93===_0x36db0b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f0a93===_0x36db0b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f0a93[_0x36db0b([0x74,0x68,0x65,0x6e])]===_0x36db0b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f0a93[_0x36db0b([0x63,0x61,0x74,0x63,0x68])]===_0x36db0b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2da00e(_0xbf6a5a){_0x363c17(_0xbf6a5a)[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x1de666=>{if(!_0x1de666||_0x1de666[_0x36db0b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36db0b([0x6f,0x6b]))return _0x36db0b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x507766(_0xfee38f(_0x1c8156+_0x1749ed))!=_0x1de666[_0x36db0b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36db0b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36db0b([0x56,0x61,0x6c,0x69,0x64]);})[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x1cb358=>(_0x16e1b8(),_0x1cb358),()=>{const _0x36c8f6=_0xb8b275();return null==_0x36c8f6?(_0x16e1b8(),_0x36db0b([0x56,0x61,0x6c,0x69,0x64])):_0x36db0b(_0xc98d06-_0x36c8f6>(0xf1312f9^_0x52ddcf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x3af8ad)[_0x36db0b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3af8ad(_0x36db0b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1c8c97=0x2b297879^_0x52ddcf;function _0x16e1b8(){const _0x35439f=_0x36db0b([0x6c,0x6c,0x63,0x74,0x2d])+_0x507766(_0xfee38f(_0x300944)),_0x496245=_0x180570(_0x507766(window[_0x36db0b([0x4d,0x61,0x74,0x68])][_0x36db0b([0x63,0x65,0x69,0x6c])](_0xc98d06/_0x1c8c97)));window[_0x36db0b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36db0b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35439f,_0x496245);}function _0xb8b275(){const _0x6c937b=_0x36db0b([0x6c,0x6c,0x63,0x74,0x2d])+_0x507766(_0xfee38f(_0x300944)),_0x31713c=window[_0x36db0b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36db0b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x6c937b);return _0x31713c?window[_0x36db0b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x180570(_0x31713c),0x10)*_0x1c8c97:null;}function _0x363c17(_0x4b0be9){return new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x558d31,_0x3fe062)=>{_0x4b0be9[_0x36db0b([0x74,0x68,0x65,0x6e])](_0x558d31,_0x3fe062),window[_0x36db0b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fe062,0x2b1e4239^_0x52ddcf);});}}_0x4072cd[_0x36db0b([0x6f,0x6e])](_0x36db0b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x782531,_0x2ad6cf)=>{if(_0x2ad6cf[0x0]!=_0x300944)return _0x3af8ad(_0x36db0b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2ad6cf[0x1]={..._0x2ad6cf[0x1],[_0x36db0b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c8156};},{[_0x36db0b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36db0b([0x68,0x69,0x67,0x68])}),_0x4072cd[_0x36db0b([0x6f,0x6e])](_0x36db0b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x18d77d=>{_0x4c1df0(_0x18d77d[_0x36db0b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1b77c0=!0x0,_0x2da00e(_0x18d77d[_0x36db0b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36db0b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36db0b([0x6c,0x6f,0x77])}),_0x53f0e0[_0x36db0b([0x74,0x68,0x65,0x6e])](()=>{_0x1b77c0||_0x3af8ad(_0x36db0b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ebc52(){return _0x4072cd[_0x36db0b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36db0b([0x76,0x69,0x65,0x77])][_0x36db0b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36db0b([0x61,0x75,0x74,0x6f]);}function _0x4ec0bc(){_0x4072cd[_0x36db0b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36db0b([0x76,0x69,0x65,0x77])][_0x36db0b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36db0b([0x61,0x75,0x74,0x6f]);}}function _0x1e491a(_0xea1676){const _0xe91e1a=[new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24c58e=>setTimeout(_0x24c58e,0x2b16a835^_0x52ddcf)),_0x53f0e0[_0x36db0b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19faaf=>{let _0x36db08=0x0;_0x4072cd[_0x36db0b([0x6d,0x6f,0x64,0x65,0x6c])][_0x36db0b([0x6f,0x6e])](_0x36db0b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2aef40,_0x5a4712)=>{_0x5a4712[0x0][_0x36db0b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x36db08++,_0x36db08==(0x2b1f9701^_0x52ddcf)&&(_0x19faaf(),_0x2aef40[_0x36db0b([0x6f,0x66,0x66])]());});}))];return window[_0x36db0b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36db0b([0x72,0x61,0x63,0x65])](_0xe91e1a)[_0x36db0b([0x74,0x68,0x65,0x6e])](()=>_0xea1676);}async function _0x6d022f(){await _0x53f0e0,_0x4072cd[_0x36db0b([0x6d,0x6f,0x64,0x65,0x6c])][_0x36db0b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x52cd8f,_0x4072cd[_0x36db0b([0x6d,0x6f,0x64,0x65,0x6c])][_0x36db0b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x52cd8f,_0x4072cd[_0x36db0b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36db0b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3fe616(_0x1e5da7){const _0x410e4f=_0x3384ae();_0x4072cd[_0x410e4f]=_0x36db0b([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1e5da7,_0x1e5da7!=_0x36db0b([0x56,0x61,0x6c,0x69,0x64])&&_0x6d022f();}function _0x3384ae(){const _0x2092eb=window[_0x36db0b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36db0b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36db0b([0x6e,0x6f,0x77])]())[_0x36db0b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36db0b([0x2e]),'');let _0x266285=_0x36db0b([0x6e]);for(let _0x56440a=0x0;_0x56440a<_0x2092eb[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x56440a+=0x2){let _0x1674e7=window[_0x36db0b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2092eb[_0x36db0b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x56440a,_0x56440a+0x2));_0x1674e7>=_0xd66023[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1674e7-=_0xd66023[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x266285+=_0xd66023[_0x1674e7];}return _0x266285;}function _0x57ee0f(){const _0x54dfd4=_0x1efb19[_0x36db0b([0x73,0x70,0x6c,0x69,0x74])](_0x36db0b([0x2e]));if(0x3!=_0x54dfd4[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xff5222(_0x54dfd4[0x1]);function _0xff5222(_0x13732b){const _0xf1b97b=_0x3fff07(_0x13732b);return _0xf1b97b&&_0x1ca8ee()?_0xf1b97b:null;function _0x1ca8ee(){const _0x3cca70=_0xf1b97b[_0x36db0b([0x6a,0x74,0x69])],_0x3e0c84=window[_0x36db0b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cca70[_0x36db0b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3cca70[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x50188a={..._0xf1b97b,[_0x36db0b([0x6a,0x74,0x69])]:_0x3cca70[_0x36db0b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3cca70[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x50188a[_0x36db0b([0x76,0x63])],_0xfee38f(_0x50188a)==_0x3e0c84;}}}async function _0x3ae6b3(){let _0x4ac84a=!0x0;try{const _0x2cfece=_0x1efb19[_0x36db0b([0x73,0x70,0x6c,0x69,0x74])](_0x36db0b([0x2e])),[_0x2a4fd9,_0x334e4a,_0xcfb0a0]=_0x2cfece;return _0x135db7(_0x2a4fd9),await _0x342d7e(_0x2a4fd9,_0x334e4a,_0xcfb0a0),_0x4ac84a;}catch(_0x395760){return!0x1;}function _0x135db7(_0x2261b8){const _0x57f93b=_0x3fff07(_0x2261b8);_0x57f93b&&_0x57f93b[_0x36db0b([0x61,0x6c,0x67])]==_0x36db0b([0x45,0x53,0x32,0x35,0x36])||(_0x4ac84a=!0x1);}async function _0x342d7e(_0x52f9f0,_0x5c3dac,_0x5d83ea){const _0x59cae0=window[_0x36db0b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36db0b([0x66,0x72,0x6f,0x6d])](_0x4ab9b0(_0x5d83ea),_0x342299=>_0x342299[_0x36db0b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xcab322=new window[(_0x36db0b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36db0b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52f9f0+_0x36db0b([0x2e])+_0x5c3dac),_0xd123e2=window[_0x36db0b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36db0b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xd123e2)return;const _0xa8ee58=await _0xd123e2[_0x36db0b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36db0b([0x6a,0x77,0x6b]),_0x1671c3,{[_0x36db0b([0x6e,0x61,0x6d,0x65])]:_0x36db0b([0x45,0x43,0x44,0x53,0x41]),[_0x36db0b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36db0b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36db0b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xd123e2[_0x36db0b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36db0b([0x6e,0x61,0x6d,0x65])]:_0x36db0b([0x45,0x43,0x44,0x53,0x41]),[_0x36db0b([0x68,0x61,0x73,0x68])]:{[_0x36db0b([0x6e,0x61,0x6d,0x65])]:_0x36db0b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xa8ee58,_0x59cae0,_0xcab322)||(_0x4ac84a=!0x1);}}function _0x3fff07(_0x285af8){return _0x285af8[_0x36db0b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36db0b([0x65,0x79]))?JSON[_0x36db0b([0x70,0x61,0x72,0x73,0x65])](_0x4ab9b0(_0x285af8)):null;}function _0x4ab9b0(_0x48129b){return window[_0x36db0b([0x61,0x74,0x6f,0x62])](_0x48129b[_0x36db0b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36db0b([0x2b]))[_0x36db0b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36db0b([0x2f])));}function _0xfee38f(_0x4d4725){let _0x236cc8=0x1505;function _0x4fad44(_0x42209b){for(let _0x4d89f6=0x0;_0x4d89f6<_0x42209b[_0x36db0b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d89f6++){const _0x110b0e=_0x42209b[_0x36db0b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d89f6);_0x236cc8=(_0x236cc8<<0x5)+_0x236cc8+_0x110b0e,_0x236cc8&=_0x236cc8;}}function _0x35980b(_0xc7e7fa){Array[_0x36db0b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xc7e7fa)?_0xc7e7fa[_0x36db0b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x35980b):_0xc7e7fa&&typeof _0xc7e7fa==_0x36db0b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36db0b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xc7e7fa)[_0x36db0b([0x73,0x6f,0x72,0x74])]()[_0x36db0b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x26bdd3,_0x1276c1])=>{_0x4fad44(_0x26bdd3),_0x35980b(_0x1276c1);}):_0x4fad44(window[_0x36db0b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xc7e7fa));}return _0x35980b(_0x4d4725),_0x236cc8>>>0x0;}function _0x507766(_0x1711ac){return _0x1711ac[_0x36db0b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36db0b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36db0b([0x30]));}function _0x180570(_0x5a7ecc){return _0x5a7ecc[_0x36db0b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36db0b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36db0b([0x6a,0x6f,0x69,0x6e])]('');}function _0x52cd8f(){}function _0x36db0b(_0x1687da){const _0x3025ee=_0x54f0;return _0x1687da[_0x3025ee(0xad)](_0x47761a=>String[_0x3025ee(0x9f)](_0x47761a))[_0x3025ee(0xd5)]('');}_0x3fe616(await _0x42b9b3());}(this);}[_0x8c8228(0xd3)](){const _0x424c52=_0x8c8228,_0x3b464d=this[_0x424c52(0xbf)][_0x424c52(0xa2)][_0x424c52(0xc2)];_0x3b464d[_0x424c52(0xcf)](_0x424c52(0xa8))&&_0x3b464d[_0x424c52(0x9b)](_0x424c52(0xa8),{'allowAttributes':[_0x424c52(0xb1)]}),_0x3b464d[_0x424c52(0xcf)](_0x424c52(0xe9))&&_0x3b464d[_0x424c52(0x9b)](_0x424c52(0xe9),{'allowAttributes':[_0x424c52(0xb1)]});}[_0x8c8228(0xe7)](){const _0x34ebee=_0x8c8228,_0x2f7f0c=this[_0x34ebee(0xbf)];_0x2f7f0c[_0x34ebee(0xe2)][_0x34ebee(0xa4)](_0x34ebee(0xbe))[_0x34ebee(0xd8)]({'model':_0x34ebee(0xb1),'view':_0x34ebee(0xbd)}),_0x2f7f0c[_0x34ebee(0xe2)][_0x34ebee(0xa4)](_0x34ebee(0xdf))[_0x34ebee(0xcd)]({'model':{'key':_0x34ebee(0xb1),'value':_0x283ad8=>_0x283ad8[_0x34ebee(0xc8)](_0x34ebee(0xbd))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x568067=_0x2f7f0c[_0x34ebee(0xc1)][_0x34ebee(0xa9)](_0x34ebee(0xb8));_0x568067&&this[_0x34ebee(0xea)](_0x568067,_0x34ebee(0x9e),(_0x3ce074,[_0x550d13,_0x5abc3b])=>{const _0xc896a7=_0x34ebee;_0x550d13[_0xc896a7(0xa0)](_0xc896a7(0xb1),_0x5abc3b);});}[_0x8c8228(0xac)](){const _0x30d1ba=_0x8c8228,_0x57f97a=this[_0x30d1ba(0xbf)][_0x30d1ba(0xa5)][_0x30d1ba(0xa9)](_0x30d1ba(0x9c))||{},_0x183d6c=this[_0x30d1ba(0xbf)][_0x30d1ba(0xa5)][_0x30d1ba(0xa9)](_0x30d1ba(0xed))||'';this[_0x30d1ba(0xcc)]=_0x5a9a1b(_0x165b7c[_0x30d1ba(0xb2)],_0x30d1ba(0xba),{..._0x57f97a,'pubkey':_0x183d6c,'ctx-name':_0x30d1ba(0x9d),'sourceList':'','imgOnly':_0x30d1ba(0xe1),'removeCopyright':_0x30d1ba(0xe1),'localeName':this[_0x30d1ba(0xbf)][_0x30d1ba(0xe0)][_0x30d1ba(0xb7)],'externalSourcesEmbedCss':_0x30d1ba(0xb0)}),this[_0x30d1ba(0xcc)][_0x30d1ba(0x99)]=_0x4d549c=>{const _0x29af5c=_0x30d1ba;if(_0x29af5c(0xca)==_0x4d549c)return _0x29af5c(0xb9);},_0x165b7c[_0x30d1ba(0xb2)][_0x30d1ba(0xda)][_0x30d1ba(0xbb)](this[_0x30d1ba(0xcc)]);}[_0x8c8228(0xdc)](){const _0x3a8510=_0x8c8228;this[_0x3a8510(0xbc)]=_0x5a9a1b(_0x165b7c[_0x3a8510(0xb2)],_0x3a8510(0xb6),{'ctx-name':_0x3a8510(0x9d)}),_0x165b7c[_0x3a8510(0xb2)][_0x3a8510(0xda)][_0x3a8510(0xbb)](this[_0x3a8510(0xbc)]);}[_0x8c8228(0xaf)](){const _0x182b42=_0x8c8228,_0x5973f9=this[_0x182b42(0xbf)][_0x182b42(0xc1)][_0x182b42(0xa9)](_0x182b42(0xd2));_0x5973f9&&this[_0x182b42(0xea)](_0x5973f9,_0x182b42(0xd9),()=>{const _0x541f11=_0x182b42,_0x3fc34f=this[_0x541f11(0xbf)][_0x541f11(0xa2)][_0x541f11(0xb2)][_0x541f11(0xe5)][_0x541f11(0xcb)]();_0x3fc34f&&_0x3fc34f[_0x541f11(0xc8)](_0x541f11(0xb1))&&this[_0x541f11(0xbf)][_0x541f11(0xc4)][_0x541f11(0xe8)][_0x541f11(0xc0)](_0x541f11(0xae),()=>{const _0x29adc9=_0x541f11;_0x1f5dbe(this[_0x29adc9(0xbf)],_0x3fc34f);});});const _0x241d37=this[_0x182b42(0xbf)][_0x182b42(0xc1)][_0x182b42(0xa9)](_0x182b42(0xce));_0x241d37&&this[_0x182b42(0xea)](_0x241d37,_0x182b42(0xd9),()=>{const _0x703e07=_0x182b42,_0x20d437=this[_0x703e07(0xbf)][_0x703e07(0xa2)][_0x703e07(0xb2)][_0x703e07(0xe5)][_0x703e07(0xcb)]();_0x20d437&&_0x20d437[_0x703e07(0xc8)](_0x703e07(0xb1))&&this[_0x703e07(0xbf)][_0x703e07(0xc4)][_0x703e07(0xe8)][_0x703e07(0xc0)](_0x703e07(0xae),()=>{const _0x939bdd=_0x703e07;_0x1f5dbe(this[_0x939bdd(0xbf)],_0x20d437);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x2c45a9,ObservableMixin as _0x41e4d1}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x58368d}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x5ad650}from'ckeditor5/src/icons.js';import _0x29a778 from'./uploadcareimageeditformview.js';import _0x4dbd31 from'../../utils/uploadutils.js';import{getImageUrls as _0x5bc219,getImageDimension as _0x139fee}from'../../utils/editingutils.js';import{isAncestor as _0x1f097a}from'../../utils/isancestor.js';export default class Q extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x41e4d1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2a1ab1,_0x573b24,_0x39bbc6){super(),this['_editor']=_0x2a1ab1,this['_dialog']=_0x573b24,this['_imageElement']=_0x39bbc6,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 _0xfda93b=this['_imageElement'],_0x2f52ba=_0xfda93b['getAttribute']('uploadcareImageId'),_0x3164ed=_0xfda93b['getAttribute']('src');if(_0x2f52ba)await this['_loadImageInfo'](_0x2f52ba,_0x3164ed);else{if(this['_imageCache']['has'](_0x3164ed)){const _0x4df640=this['_imageCache']['get'](_0x3164ed);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4df640['url'],this['imageDimension']=_0x4df640['dimension'],this['imageId']=_0x4df640['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x34c139}=this['_editor'],t=_0x34c139['t'],_0x252417=new _0x29a778(_0x34c139,this['imageStatus'],this['_attributes']);_0x252417['bind']('status')['to'](this,'imageStatus'),_0x252417['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x252417['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x252417['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x252417,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5ad650,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x252417,'position':_0x58368d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x252417['focus']();},'onHide':()=>{_0x252417['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x175ba8=>!_0x1f097a(_0x175ba8,_0x252417['element'])}});}['_loadImageInfo'](_0xd5255e,_0x4eed5d){return _0x4dbd31['getInfo'](_0xd5255e,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x101780=>{const {width:_0x24b3f4,height:_0x2f0ce8}=_0x101780['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4eed5d,this['imageDimension']={'width':_0x24b3f4,'height':_0x2f0ce8},this['imageId']=_0xd5255e;})['catch'](_0x4d79ae=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4d79ae['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3f0ed0,_0x75bf7){return this['_getImageAsFile'](_0x3f0ed0)['then'](_0x151f01=>_0x4dbd31['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x75bf7['signal'],'file':_0x151f01,'onProgress':_0x47d350=>{_0x47d350&&_0x47d350['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x47d350['value']));}}))['then'](_0xe70caa=>{const {width:_0x53f925,height:_0x54a100}=_0xe70caa['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xe70caa['cdnUrl'],this['imageDimension']={'width':_0x53f925,'height':_0x54a100},this['imageId']=_0xe70caa['uuid'],this['imageUploadProgress']=null;const _0x17db90=_0x3f0ed0['getAttribute']('src');this['_imageCache']['set'](_0x17db90,{'id':_0xe70caa['uuid'],'url':_0xe70caa['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1f7f12=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1f7f12['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2713b8,_0x58d6e5){_0x2713b8['on']('apply',(_0xce8199,_0x263f93)=>{this['_replaceImage'](_0x58d6e5,_0x263f93['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2713b8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2713b8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5485b6,_0x2bc941,_0x151c40){const _0xf9baf=this['_editor'],{width:_0x472822,height:_0x2f8711}=_0x139fee(_0x2bc941,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xe597bb,imageSources:_0x16f60c}=_0x5bc219(_0x2bc941,_0x472822);_0xf9baf['model']['change'](_0x150f88=>{if('$graveyard'===_0x5485b6['root']['rootName']){_0xf9baf['execute']('insertImage',{'imageType':_0x5485b6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5485b6['getAttributes']()),'uploadcareImageId':_0x151c40,'src':_0xe597bb,'sources':_0x16f60c,'width':_0x472822,'height':_0x2f8711}});const _0x19ba51=_0x5485b6['getChildren']();_0x5485b6=_0xf9baf['model']['document']['selection']['getSelectedElement']();for(const _0x6eadef of _0x19ba51)_0x150f88['append'](_0x150f88['cloneElement'](_0x6eadef),_0x5485b6);}else _0x150f88['setSelection'](_0x5485b6,'on'),_0xf9baf['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5485b6['getAttributes']()),'uploadcareImageId':_0x151c40,'src':_0xe597bb,'sources':_0x16f60c,'width':_0x472822,'height':_0x2f8711},_0x5485b6);_0x150f88['setSelection'](_0x5485b6,'on');});}async['_getImageAsFile'](_0x177cb3){const _0x1f0fc5=_0x2c45a9['window'],_0x34eef5=_0x2c45a9['document']['location']['href'],_0x3bfdb9=new _0x1f0fc5['URL'](_0x177cb3['getAttribute']('src'),_0x34eef5);if('data:'===_0x3bfdb9['protocol']){const _0x5caea6=_0x3bfdb9['href']['split'](','),_0x4043bc=_0x5caea6[0x0]['match'](/:(.*?);/)[0x1],_0x467a91=_0x4043bc['split']('/')[0x1],_0x123387=_0x1f0fc5['atob'](_0x5caea6[_0x5caea6['length']-0x1]);let _0x5c244c=_0x123387['length'];const _0xedeec0=new _0x1f0fc5['Uint8Array'](_0x5c244c);for(;_0x5c244c--;)_0xedeec0[_0x5c244c]=_0x123387['charCodeAt'](_0x5c244c);return new _0x1f0fc5['File']([_0xedeec0],'image.'+_0x467a91,{'type':_0x4043bc});}const _0x205848=_0x3bfdb9['href']['split']('/'),_0x462c51=_0x205848[_0x205848['length']-0x1],_0x38d5f9=_0x462c51['split']('.')[0x1];return _0x1f0fc5['fetch'](_0x3bfdb9['href'])['then'](_0x1fb322=>_0x1fb322['clone']()['blob']())['then'](_0x35e4e2=>new _0x1f0fc5['File']([_0x35e4e2],_0x462c51,{'type':'image/'+_0x38d5f9}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x52ea(_0x1a77c8,_0x4bb58e){const _0x29d555=_0x29d5();return _0x52ea=function(_0x52ea1e,_0x223f96){_0x52ea1e=_0x52ea1e-0xa6;let _0x1f3d16=_0x29d555[_0x52ea1e];return _0x1f3d16;},_0x52ea(_0x1a77c8,_0x4bb58e);}function _0x29d5(){const _0x22a4c2=['uc-cloud-image-editor','setTemplate','bindTemplate','ck-uploadcare-theme','12872FeEEWe','6172140YkdPpG','20151thHLvc','uc-light','imageSrc','6878606xnBBrJ','19616VZCqcq','66hvrmKe','4850845RTxhWj','1895636AoRrLS','set','852051XxepCf','image-edit'];_0x29d5=function(){return _0x22a4c2;};return _0x29d5();}(function(_0x1cb8b3,_0x10e275){const _0x16c92a=_0x52ea,_0x751015=_0x1cb8b3();while(!![]){try{const _0x4d6d26=-parseInt(_0x16c92a(0xaa))/0x1+-parseInt(_0x16c92a(0xa8))/0x2+-parseInt(_0x16c92a(0xa6))/0x3*(parseInt(_0x16c92a(0xb6))/0x4)+parseInt(_0x16c92a(0xa7))/0x5+-parseInt(_0x16c92a(0xb1))/0x6+-parseInt(_0x16c92a(0xb5))/0x7+-parseInt(_0x16c92a(0xb0))/0x8*(-parseInt(_0x16c92a(0xb2))/0x9);if(_0x4d6d26===_0x10e275)break;else _0x751015['push'](_0x751015['shift']());}catch(_0x3ac8f4){_0x751015['push'](_0x751015['shift']());}}}(_0x29d5,0x9f92f));import{View as _0x18459f}from'ckeditor5/src/ui.js';export default class tt extends _0x18459f{constructor(_0x5ca59b,_0x36d352){const _0x1d8e1c=_0x52ea;super(_0x5ca59b);const _0x24df5f=this[_0x1d8e1c(0xae)];this[_0x1d8e1c(0xa9)](_0x1d8e1c(0xb4),''),this[_0x1d8e1c(0xad)]({'tag':_0x1d8e1c(0xac),'attributes':{..._0x36d352,'class':[_0x1d8e1c(0xb3),_0x1d8e1c(0xaf)],'ctx-name':_0x1d8e1c(0xab),'cdn-url':_0x24df5f['to'](_0x1d8e1c(0xb4))}});}}
|
|
@@ -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 _0x4e4d56,IconView as at,View as _0x1caad5}from'ckeditor5/src/ui.js';export default class rt extends _0x1caad5{constructor(_0x133fee){super(_0x133fee);const t=_0x133fee['t'];this['set']('errorType',null);const _0x2008a2=new _0x4e4d56(_0x133fee);_0x2008a2['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2008a2['withText']=!0x0,_0x2008a2['class']='ck-button-action',_0x2008a2['on']('execute',()=>{this['fire']('retry');}),_0x2008a2['bind']('isVisible')['to'](this,'errorType',_0x106388=>'NotFound'!==_0x106388);const _0x2d5e4f=new at();_0x2d5e4f['content']=et,_0x2d5e4f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xb6a7e8=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':[_0x2d5e4f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xb6a7e8['to']('errorType',_0x31602e=>t('NotFound'!==_0x31602e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2008a2]},{'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 _0x4ca7a8,View as _0x15282d}from'ckeditor5/src/ui.js';export default class ta extends _0x15282d{constructor(_0x5db058){super(_0x5db058);const t=_0x5db058['t'],_0x5f2625=this['bindTemplate'],_0x5e80c3=new _0x4ca7a8();_0x5e80c3['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':[_0x5e80c3,{'text':_0x5f2625['to']('imageUploadProgress',_0x5856ea=>t('Loading\x20image...')+'\x20('+(_0x5856ea||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'}]}]}]});}}
|