@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250329.0 → 0.0.0-nightly-20250330.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 _0x1a05d5,Command as _0x596e43}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x55c448,IconGooglePhotos as _0x4e8d2c,IconGoogleDrive as _0x5d7af3,IconFacebook as _0x3fe10b,IconDropbox as _0x21bf0f,IconUploadcareLink as _0x246e00,IconUploadcareImageUpload as _0x895ebc,IconError as et,IconUploadcareImageEdit as _0x2b374f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xd42893,MenuBarMenuListItemButtonView as _0x5b73c0,View as _0xcab268,FocusCycler as _0xf7db89,Dialog as _0x4b6953,DialogViewPosition as _0x5d271d,SpinnerView as _0x2defba,IconView as at,Notification as _0x5bd683}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x343c82,DomEmitterMixin as _0x4886d9,global as _0x3118f5,getAncestors as _0x24c676,ObservableMixin as _0x230d99,createElement as _0x2091cc,uid as _0x224029}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5071ea}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x58b4ed,info as _0x518e70}from'@uploadcare/upload-client';import*as _0x3774a5 from'@uploadcare/file-uploader';var o=function(_0x27605a){return _0x27605a['Local']='local',_0x27605a['URL']='url',_0x27605a['Dropbox']='dropbox',_0x27605a['GDrive']='gdrive',_0x27605a['Facebook']='facebook',_0x27605a['GPhotos']='gphotos',_0x27605a['OneDrive']='onedrive',_0x27605a;}({});function _(_0x12fdde,_0x4f01ea,_0x58f3f6){const t=_0x12fdde['t'],_0x33e6ba=_0x12fdde['t'];switch(_0x4f01ea){case o['Local']:return{'text':_0x33e6ba('Insert'===_0x58f3f6?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x33e6ba('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x58f3f6?_0x33e6ba('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x33e6ba('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x58f3f6?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x58f3f6?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x58f3f6?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x58f3f6?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x58f3f6?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4f01ea;}}class e extends _0x1a05d5{['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 _0x2c2323=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x538d71;for(const _0x2ce212 in _0x2c2323){const _0x33e62e=_0x2ce212,_0x46635e=_0x2c2323[_0x33e62e];if('uploadcareLicenseKeyValid'==_0x46635e||'uploadcareLicenseKeyInvalid'==_0x46635e||'uploadcareLicenseKeyExpired'==_0x46635e||'uploadcareLicenseKeyDomainLimit'==_0x46635e||'uploadcareLicenseKeyNotAllowed'==_0x46635e||'uploadcareLicenseKeyEvaluationLimit'==_0x46635e||'uploadcareLicenseKeyTrialLimit'==_0x46635e||'uploadcareLicenseKeyUsageLimit'==_0x46635e){delete _0x2c2323[_0x33e62e],_0x538d71=_0x46635e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x538d71&&_0x2c2323['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x538d71&&_0x2c2323['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x538d71&&_0x2c2323['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x538d71&&_0x2c2323['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x538d71&&_0x2c2323['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x538d71&&_0x2c2323['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x538d71&&_0x2c2323['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2bec99}=this,_0x9001bb=_0x2bec99['commands']['get']('uploadcare');if(!_0x9001bb)return;const _0x523501=this['_normalizeConfigSourceList'](_0x2bec99['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2f2499,_0x4a75d8)=>{const _0xbba1a3=this['_getIntegrationKey'](_0x4a75d8['type']);return _0x2f2499[_0xbba1a3]||(_0x2f2499[_0xbba1a3]=[]),_0x2f2499[_0xbba1a3]['push'](_0x4a75d8),_0x2f2499;},{});_0x2bec99['plugins']['has']('ImageInsertUI')&&_0x2bec99['commands']['get']('uploadcare')&&Object['entries'](_0x523501)['forEach'](([_0x4cd5ac,_0x3f01b8])=>{_0x2bec99['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4cd5ac,'observable':()=>_0x9001bb,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3f01b8),'formViewCreator':()=>this['_createDropdownButtons'](_0x3f01b8),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3f01b8),'override':'assetManager'!==_0x4cd5ac});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3e4253){const {locale:_0x419da7}=this['editor'];return _0x3e4253['map'](_0x101698=>{const _0x4b0744=_(_0x419da7,_0x101698,'Insert');switch(_0x101698){case o['Local']:return{'icon':_0x895ebc,'type':o['Local'],..._0x4b0744};case o['URL']:return{'icon':_0x246e00,'type':o['URL'],..._0x4b0744};case o['Dropbox']:return{'icon':_0x21bf0f,'type':o['Dropbox'],..._0x4b0744};case o['Facebook']:return{'icon':_0x3fe10b,'type':o['Facebook'],..._0x4b0744};case o['GDrive']:return{'icon':_0x5d7af3,'type':o['GDrive'],..._0x4b0744};case o['GPhotos']:return{'icon':_0x4e8d2c,'type':o['GPhotos'],..._0x4b0744};case o['OneDrive']:return{'icon':_0x55c448,'type':o['OneDrive'],..._0x4b0744};}});}['_getIntegrationKey'](_0x2b4aa3){switch(_0x2b4aa3){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4926be,_0x46d867){const _0x53bc87=this['editor'],_0x35fa6b=new _0x4926be(_0x53bc87['locale']),_0x177a6d=_0x53bc87['commands']['get']('uploadcare');return _0x35fa6b['bind']('isEnabled')['to'](_0x177a6d),_0x35fa6b['on']('execute',()=>{_0x177a6d['execute'](_0x46d867);}),_0x35fa6b;}['_createToolbarButton'](_0x2945d1){const {locale:_0x12ca08}=this['editor'],_0x1788fa=this['editor']['plugins']['get']('ImageInsertUI'),_0x1dda68=_0x2945d1[0x0],_0x1cb1c2=this['_createButton'](_0xd42893,_0x1dda68['type']);return _0x1cb1c2['icon']=_0x1dda68['icon'],_0x1cb1c2['bind']('label')['to'](_0x1788fa,'isImageSelected',_0x45de8a=>_(_0x12ca08,_0x1dda68['type'],_0x45de8a?'Replace':'Insert')['text']),_0x1cb1c2['tooltip']=!0x0,_0x1cb1c2;}['_createDropdownButtons'](_0x4b5e83){const {locale:_0x57983d}=this['editor'],_0x5d8143=this['editor']['plugins']['get']('ImageInsertUI');return _0x4b5e83['map'](_0x25d89c=>{const _0x398c39=this['_createButton'](_0xd42893,_0x25d89c['type']);return _0x398c39['withText']=!0x0,_0x398c39['icon']=_0x25d89c['icon'],_0x398c39['bind']('label')['to'](_0x5d8143,'isImageSelected',_0x3e118c=>_(_0x57983d,_0x25d89c['type'],_0x3e118c?'Replace':'Insert')['text']),_0x398c39;});}['_createMenuBarButtons'](_0x561dd4){return _0x561dd4['map'](_0x149c3d=>{const _0x1e4198=this['_createButton'](_0x5b73c0,_0x149c3d['type']);return _0x1e4198['icon']=_0x149c3d['icon'],_0x1e4198['label']=_0x149c3d['shortText'],_0x1e4198;});}}class q extends _0xcab268{['focusTracker'];['focusCycler'];constructor(_0x459d42){super(_0x459d42),this['focusTracker']=new _0x343c82(),this['focusCycler']=new _0xf7db89({'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(_0x64186d){super(_0x64186d),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(_0x2a9dee,_0x12df1c){const _0x300a32=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5be002=>_0x5be002<=_0x12df1c)['map'](_0x2d6d62=>_0x2a9dee['replace'](/\/$/,'')+'/-/resize/'+_0x2d6d62+'x/\x20'+_0x2d6d62+'w');return{'imageFallbackUrl':_0x2a9dee,'imageSources':[{'srcset':_0x300a32['join'](',\x20'),'sizes':'(max-width:\x20'+_0x12df1c+'px)\x20100vw,\x20'+_0x12df1c+'px','type':'image/webp'}]};}function A(_0x58b1b5,_0x2e981d,_0x57a7e8){const _0x3bbd7e=_0x58b1b5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3bbd7e?parseInt(_0x3bbd7e[0x1],0xa):_0x2e981d,'height':_0x3bbd7e?parseInt(_0x3bbd7e[0x2],0xa):_0x57a7e8};}function m(_0x4d6563,_0x24f2e8){const _0x32aac4=Object['create'](_0x4886d9),_0x11b9c2=_0x4d6563['plugins']['get']('ImageUtils'),_0xc2dca=_0x4d6563['editing']['mapper']['toViewElement'](_0x24f2e8),_0x1b32e9=_0x11b9c2['findViewImgElement'](_0xc2dca),_0x2fd9eb=_0x4d6563['editing']['view']['domConverter']['viewToDom'](_0x1b32e9),_0x14baa9=_0x24f2e8['getAttribute']('width'),_0x1aae25=_0x24f2e8['getAttribute']('height'),_0x4281eb='image-processing';_0x4d6563['editing']['view']['change'](_0x417b8e=>{_0x417b8e['addClass'](_0x4281eb,_0xc2dca),_0x417b8e['setStyle']('aspect-ratio',_0x14baa9+'/'+_0x1aae25,_0x1b32e9);}),_0x32aac4['listenTo'](_0x2fd9eb,'load',()=>{_0x32aac4['stopListening'](_0x2fd9eb,'load'),_0x4d6563['editing']['view']['change'](_0x2b4b4f=>{_0x2b4b4f['removeClass'](_0x4281eb,_0xc2dca),_0x2b4b4f['removeStyle']('aspect-ratio',_0x1b32e9);});});}function V(_0x98c07a){if(Array['isArray'](_0x98c07a)){const _0x1ce0bd=_0x98c07a['map'](V);return _0x29ea42=>_0x1ce0bd['some'](_0xcb053a=>_0xcb053a(_0x29ea42));}if('origin'==_0x98c07a){const _0x282a12=_0x3118f5['window']['location']['origin'];return _0xf9acd5=>new URL(_0xf9acd5,_0x3118f5['document']['baseURI'])['origin']==_0x282a12;}return'function'==typeof _0x98c07a?_0x98c07a:_0x98c07a instanceof RegExp?_0x320b0a=>!(!_0x320b0a['match'](_0x98c07a)&&!_0x320b0a['replace'](/^https?:\/\//,'')['match'](_0x98c07a)):()=>!0x1;}function F(_0x7c7a2f,_0x2df25d){return _0x24c676(_0x7c7a2f['target'])['includes'](_0x2df25d);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x230d99(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x359e56,_0xbd06c2,_0x270dd0){super(),this['_editor']=_0x359e56,this['_editing']=_0xbd06c2,this['_dialog']=_0x359e56['plugins']['get'](_0x4b6953),this['_api']=_0xbd06c2['ctxElement']['getAPI'](),this['_type']=_0x270dd0,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:_0x405ba7,model:_0x2c9b1f}=this['_editor'],_0x18344d=_0x2c9b1f['document']['selection']['getSelectedElement'](),_0x5332bb=_0x18344d&&(_0x18344d['is']('element','imageBlock')||_0x18344d['is']('element','imageInline'));this['_formView']=new S(_0x405ba7),this['_dialog']['show']({'id':'uploadCare','icon':_0x895ebc,'title':_(_0x405ba7,this['_type'],_0x5332bb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5d271d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1b8f11=>!F(_0x1b8f11,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5a7260}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2909b9=>{const _0x525c08=_0x5a7260['length'];for(const _0x3bd122 of _0x5a7260){const _0x47792b=_0x3bd122===_0x5a7260[_0x525c08-0x1],{cdnUrl:_0x5bb055,fileInfo:_0x360731}=_0x3bd122;if(!_0x5bb055||!_0x360731)continue;const {width:_0x4fa312,height:_0x3b2a41}=_0x360731['imageInfo'],_0x1a50ed=A(_0x5bb055,_0x4fa312,_0x3b2a41),_0x3f1347=E(_0x5bb055,_0x1a50ed['width']),_0x4d2673={'id':_0x360731['uuid'],'type':'image','attributes':{'imageDimension':_0x1a50ed,..._0x3f1347}};this['_insertAsset'](_0x4d2673,_0x47792b,_0x2909b9);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x37b1ab=>{'idle'===_0x37b1ab['detail']['status']&&!_0x37b1ab['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x47896e,_0x351c39,_0x1dbf98){const _0x3dd35d=this['_editor']['model']['document']['selection'],_0x5bb553=_0x3dd35d['getSelectedElement'](),_0x434bf2=!(!_0x5bb553||!_0x5bb553['is']('element','imageInline'));_0x1dbf98['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x47896e,_0x434bf2),_0x351c39||_0x1dbf98['setSelection'](_0x3dd35d['getLastPosition']());}['_insertImage'](_0x172eb6,_0x4ba962){const _0x5c28f0=this['_editor'],{imageDimension:_0x4259e7,imageFallbackUrl:_0x5215bd,imageSources:_0x231954}=_0x172eb6['attributes'];_0x5c28f0['execute']('insertImage',{'imageType':_0x4ba962?'imageInline':null,'source':{'uploadcareImageId':_0x172eb6['id'],'src':_0x5215bd,'sources':_0x231954,..._0x4259e7}});}}class n extends _0x596e43{['_editing'];['_controller']=null;static get['requires'](){return[_0x4b6953,i];}constructor(_0x4ddfac){super(_0x4ddfac),this['_editing']=_0x4ddfac['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4c3972){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x4c3972);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x3b65b6,publicKey:_0x426559,signal:_0x3eaf7d,onProgress:_0x5046d2}){return _0x58b4ed(_0x3b65b6,{'publicKey':_0x426559,'store':'auto','signal':_0x3eaf7d,'onProgress':_0x5046d2});}static['getInfo'](_0x5adc43,_0x161c74){return _0x518e70(_0x5adc43,_0x161c74);}}class p extends _0x1a05d5{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5071ea,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1fb7f3=this['editor'];if(!!!_0x1fb7f3['config']['get']('uploadcare'))return;_0x1fb7f3['plugins']['get'](_0x5071ea)['createUploadAdapter']=_0x31a73f=>new x(_0x31a73f,_0x1fb7f3),_0x1fb7f3['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x2f6d5c,{imageElement:_0x316ca2,data:_0x5c4d22})=>{_0x1fb7f3['model']['change'](_0x590293=>{_0x590293['setAttribute']('uploadcareImageId',_0x5c4d22['uploadcareImageId'],_0x316ca2);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x365134,_0x55df90){this['loader']=_0x365134,this['editor']=_0x55df90,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1469f2=this['editor']['config']['get']('uploadcare.pubkey'),_0x298817=await this['loader']['file'];return C['upload']({'file':_0x298817,'publicKey':_0x1469f2,'signal':this['controller']['signal'],'onProgress':_0x8a6ebd=>{_0x8a6ebd&&_0x8a6ebd['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x8a6ebd['value']);}})['then'](async _0x54b096=>{const {imageFallbackUrl:_0x3774c1,imageSources:_0x13eba9}=E(_0x54b096['cdnUrl'],_0x54b096['imageInfo']['width']);return{'uploadcareImageId':_0x54b096['uuid'],'default':_0x3774c1,'sources':_0x13eba9};})['catch'](()=>{const _0x16eba8=t('Cannot\x20upload\x20file:')+('\x20'+_0x298817['name']+'.');return Promise['reject'](_0x16eba8);});}['abort'](){this['controller']['abort']();}}class i extends _0x1a05d5{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x4b6953];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x39e57b=this['editor'];_0x39e57b['commands']['add']('uploadcare',new n(_0x39e57b));}['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 _0xa49ad7=_0x3118f5['document']['querySelector']('input[uploadcare-file-input]');_0xa49ad7&&_0xa49ad7['remove']();}),async function(_0x1da38b){const _0x135c96=_0x4ec4d9([0x47,0x6d,0x45,0x68,0x4b,0x72,0x74,0x54,0x46,0x34,0x30,0x59,0x78,0x66,0x51,0x61,0x7a,0x52,0x69,0x4c,0x6a,0x5a,0x37,0x76,0x79,0x33,0x62,0x75,0x49,0x39,0x4e,0x6c,0x48,0x77,0x6e,0x65,0x71,0x44,0x50,0x4d,0x35,0x56,0x42,0x41,0x36,0x6f,0x63,0x67,0x53,0x4f,0x38,0x64,0x32,0x55,0x31,0x6b,0x70,0x58,0x4a,0x73,0x43,0x57]),_0x25dd8a=0x22527a8e,_0x1ecb41=0x2255190e^_0x25dd8a,_0x373c97=window[_0x4ec4d9([0x44,0x61,0x74,0x65])][_0x4ec4d9([0x6e,0x6f,0x77])](),_0x43b563=_0x1da38b[_0x4ec4d9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x13c8c0=new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x483410=>{_0x43b563[_0x4ec4d9([0x6f,0x6e,0x63,0x65])](_0x4ec4d9([0x72,0x65,0x61,0x64,0x79]),_0x483410);}),_0xb2125f={[_0x4ec4d9([0x6b,0x74,0x79])]:_0x4ec4d9([0x45,0x43]),[_0x4ec4d9([0x75,0x73,0x65])]:_0x4ec4d9([0x73,0x69,0x67]),[_0x4ec4d9([0x63,0x72,0x76])]:_0x4ec4d9([0x50,0x2d,0x32,0x35,0x36]),[_0x4ec4d9([0x78])]:_0x4ec4d9([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]),[_0x4ec4d9([0x79])]:_0x4ec4d9([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]),[_0x4ec4d9([0x61,0x6c,0x67])]:_0x4ec4d9([0x45,0x53,0x32,0x35,0x36])},_0xca32a3=_0x43b563[_0x4ec4d9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4ec4d9([0x67,0x65,0x74])](_0x4ec4d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4bdaae(){let _0x376fd9,_0x3cc194=null,_0x24dc51=null;try{if(_0xca32a3==_0x4ec4d9([0x47,0x50,0x4c]))return _0x4ec4d9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x376fd9=_0x461b79(),!_0x376fd9)return _0x4ec4d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x376fd9[_0x4ec4d9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x24dc51=_0x172215(_0x376fd9[_0x4ec4d9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x376fd9[_0x4ec4d9([0x6a,0x74,0x69])])),await _0x573962()?_0x1b4641()?_0x5ee1be()?_0x4ec4d9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x36755d()?(_0x376fd9[_0x4ec4d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ec4d9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3cc194=_0x823c2d(_0x4ec4d9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x376fd9[_0x4ec4d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ec4d9([0x74,0x72,0x69,0x61,0x6c])&&(_0x3cc194=_0x823c2d(_0x4ec4d9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14d3e5()):_0x4ec4d9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4ec4d9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4ec4d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5cf6a1){return _0x4ec4d9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5ee1be(){const _0x5d51c7=[_0x4ec4d9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4ec4d9([0x74,0x72,0x69,0x61,0x6c])][_0x4ec4d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x376fd9[_0x4ec4d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x373c97/0x3e8:0xe10*_0x1ecb41;return _0x376fd9[_0x4ec4d9([0x65,0x78,0x70])]<_0x5d51c7;}function _0x1b4641(){const _0x86a946=_0x376fd9[_0x4ec4d9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x86a946&&(!!_0x86a946[_0x4ec4d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec4d9([0x2a]))||!!_0x86a946[_0x4ec4d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec4d9([0x55,0x50,0x4c,0x43])));}function _0x36755d(){const _0x227335=_0x376fd9[_0x4ec4d9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x227335||0x0==_0x227335[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x19f52a}=new URL(window[_0x4ec4d9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x227335[_0x4ec4d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19f52a))return!0x0;const _0x23aeb9=_0x19f52a[_0x4ec4d9([0x73,0x70,0x6c,0x69,0x74])](_0x4ec4d9([0x2e]));return _0x227335[_0x4ec4d9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32a9c9=>_0x32a9c9[_0x4ec4d9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec4d9([0x2a])))[_0x4ec4d9([0x6d,0x61,0x70])](_0x25526e=>_0x25526e[_0x4ec4d9([0x73,0x70,0x6c,0x69,0x74])](_0x4ec4d9([0x2e])))[_0x4ec4d9([0x73,0x6f,0x6d,0x65])](_0x4000b3=>_0x23aeb9[_0x4ec4d9([0x65,0x76,0x65,0x72,0x79])]((_0x16163a,_0x2d3304)=>_0x4000b3[_0x2d3304]===_0x16163a||_0x4000b3[_0x2d3304]===_0x4ec4d9([0x2a])));}function _0x14d3e5(){return _0x3cc194&&_0x24dc51?new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x514065,_0x4c40a0)=>{_0x3cc194[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0x514065,_0x4c40a0),_0x24dc51[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0x3045cc=>{_0x3045cc!=_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64])&&_0x514065(_0x3045cc);},_0x4c40a0);}):_0x3cc194||_0x24dc51||_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x172215(_0x437823,_0x18f08d){return new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x101897=>{if(_0x7afbe3())return _0x101897(_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64]));_0x53403e(),_0x43b563[_0x4ec4d9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4ec4d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x62adcf=!0x1;const _0x134c3d=_0x224029();function _0x44f8b2(_0x148315){return!!_0x148315&&(typeof _0x148315===_0x4ec4d9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x148315===_0x4ec4d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x148315[_0x4ec4d9([0x74,0x68,0x65,0x6e])]===_0x4ec4d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x148315[_0x4ec4d9([0x63,0x61,0x74,0x63,0x68])]===_0x4ec4d9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf96242(_0x3c3a1a){_0x47b748(_0x3c3a1a)[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0x33709f=>{if(!_0x33709f||_0x33709f[_0x4ec4d9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4ec4d9([0x6f,0x6b]))return _0x4ec4d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e441f(_0x27ede9(_0x134c3d+_0x18f08d))!=_0x33709f[_0x4ec4d9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4ec4d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64]);})[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0xe538c8=>(_0x3a4f9c(),_0xe538c8),()=>{const _0x42b3fc=_0x5e4851();return null==_0x42b3fc?(_0x3a4f9c(),_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64])):_0x4ec4d9(_0x373c97-_0x42b3fc>(0x65efe8e^_0x25dd8a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0x101897)[_0x4ec4d9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x101897(_0x4ec4d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x56713e=0x2264940e^_0x25dd8a;function _0x3a4f9c(){const _0x5314af=_0x4ec4d9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e441f(_0x27ede9(_0x437823)),_0x2013c7=_0x2bc51e(_0x4e441f(window[_0x4ec4d9([0x4d,0x61,0x74,0x68])][_0x4ec4d9([0x63,0x65,0x69,0x6c])](_0x373c97/_0x56713e)));window[_0x4ec4d9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ec4d9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5314af,_0x2013c7);}function _0x5e4851(){const _0x452ef8=_0x4ec4d9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e441f(_0x27ede9(_0x437823)),_0xa99e3b=window[_0x4ec4d9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ec4d9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x452ef8);return _0xa99e3b?window[_0x4ec4d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2bc51e(_0xa99e3b),0x10)*_0x56713e:null;}function _0x47b748(_0x1af949){return new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3ac077,_0x5a8fb2)=>{_0x1af949[_0x4ec4d9([0x74,0x68,0x65,0x6e])](_0x3ac077,_0x5a8fb2),window[_0x4ec4d9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5a8fb2,0x2253ae4e^_0x25dd8a);});}}_0x43b563[_0x4ec4d9([0x6f,0x6e])](_0x4ec4d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2bc614,_0x5bdf56)=>{if(_0x5bdf56[0x0]!=_0x437823)return _0x101897(_0x4ec4d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5bdf56[0x1]={..._0x5bdf56[0x1],[_0x4ec4d9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x134c3d};},{[_0x4ec4d9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ec4d9([0x68,0x69,0x67,0x68])}),_0x43b563[_0x4ec4d9([0x6f,0x6e])](_0x4ec4d9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5ca80e=>{_0x44f8b2(_0x5ca80e[_0x4ec4d9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x62adcf=!0x0,_0xf96242(_0x5ca80e[_0x4ec4d9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4ec4d9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ec4d9([0x6c,0x6f,0x77])}),_0x13c8c0[_0x4ec4d9([0x74,0x68,0x65,0x6e])](()=>{_0x62adcf||_0x101897(_0x4ec4d9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x7afbe3(){return _0x43b563[_0x4ec4d9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ec4d9([0x76,0x69,0x65,0x77])][_0x4ec4d9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4ec4d9([0x61,0x75,0x74,0x6f]);}function _0x53403e(){_0x43b563[_0x4ec4d9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ec4d9([0x76,0x69,0x65,0x77])][_0x4ec4d9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4ec4d9([0x61,0x75,0x74,0x6f]);}}function _0x823c2d(_0x5e70e1){const _0x5e496f=[new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x107478=>setTimeout(_0x107478,0x225b4442^_0x25dd8a)),_0x13c8c0[_0x4ec4d9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x267539=>{let _0x490c35=0x0;_0x43b563[_0x4ec4d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ec4d9([0x6f,0x6e])](_0x4ec4d9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2b133a,_0x3deda8)=>{_0x3deda8[0x0][_0x4ec4d9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x490c35++,_0x490c35==(0x22527b76^_0x25dd8a)&&(_0x267539(),_0x2b133a[_0x4ec4d9([0x6f,0x66,0x66])]());});}))];return window[_0x4ec4d9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4ec4d9([0x72,0x61,0x63,0x65])](_0x5e496f)[_0x4ec4d9([0x74,0x68,0x65,0x6e])](()=>_0x5e70e1);}async function _0x3d9fa5(){await _0x13c8c0,_0x43b563[_0x4ec4d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ec4d9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x38620c,_0x43b563[_0x4ec4d9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ec4d9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x38620c,_0x43b563[_0x4ec4d9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4ec4d9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x306bc2(_0x3cfc6e){const _0x434897=_0x531701();_0x43b563[_0x434897]=_0x4ec4d9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3cfc6e,_0x3cfc6e!=_0x4ec4d9([0x56,0x61,0x6c,0x69,0x64])&&_0x3d9fa5();}function _0x531701(){const _0x3d7d3c=window[_0x4ec4d9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4ec4d9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4ec4d9([0x6e,0x6f,0x77])]())[_0x4ec4d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4ec4d9([0x2e]),'');let _0x72232e=_0x4ec4d9([0x47]);for(let _0x55d2fa=0x0;_0x55d2fa<_0x3d7d3c[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x55d2fa+=0x2){let _0x27c209=window[_0x4ec4d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d7d3c[_0x4ec4d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x55d2fa,_0x55d2fa+0x2));_0x27c209>=_0x135c96[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x27c209-=_0x135c96[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x72232e+=_0x135c96[_0x27c209];}return _0x72232e;}function _0x461b79(){const _0x2e20c0=_0xca32a3[_0x4ec4d9([0x73,0x70,0x6c,0x69,0x74])](_0x4ec4d9([0x2e]));if(0x3!=_0x2e20c0[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x13c7b1(_0x2e20c0[0x1]);function _0x13c7b1(_0x3901cd){const _0x2abda2=_0x289049(_0x3901cd);return _0x2abda2&&_0x502788()?_0x2abda2:null;function _0x502788(){const _0x573436=_0x2abda2[_0x4ec4d9([0x6a,0x74,0x69])],_0xd4a59f=window[_0x4ec4d9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x573436[_0x4ec4d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x573436[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5333f6={..._0x2abda2,[_0x4ec4d9([0x6a,0x74,0x69])]:_0x573436[_0x4ec4d9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x573436[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5333f6[_0x4ec4d9([0x76,0x63])],_0x27ede9(_0x5333f6)==_0xd4a59f;}}}async function _0x573962(){let _0x44a9e0=!0x0;try{const _0x2ce1d2=_0xca32a3[_0x4ec4d9([0x73,0x70,0x6c,0x69,0x74])](_0x4ec4d9([0x2e])),[_0x5a420b,_0x1d2f57,_0x786e02]=_0x2ce1d2;return _0x43f543(_0x5a420b),await _0x543b2e(_0x5a420b,_0x1d2f57,_0x786e02),_0x44a9e0;}catch(_0x5575dd){return!0x1;}function _0x43f543(_0xdda71e){const _0x365968=_0x289049(_0xdda71e);_0x365968&&_0x365968[_0x4ec4d9([0x61,0x6c,0x67])]==_0x4ec4d9([0x45,0x53,0x32,0x35,0x36])||(_0x44a9e0=!0x1);}async function _0x543b2e(_0x496fca,_0x47246a,_0x4e6a41){const _0x3b0f96=window[_0x4ec4d9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4ec4d9([0x66,0x72,0x6f,0x6d])](_0x12ea68(_0x4e6a41),_0x44b4df=>_0x44b4df[_0x4ec4d9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25af3b=new window[(_0x4ec4d9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4ec4d9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x496fca+_0x4ec4d9([0x2e])+_0x47246a),_0x41500c=window[_0x4ec4d9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4ec4d9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x41500c)return;const _0x4ad50a=await _0x41500c[_0x4ec4d9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4ec4d9([0x6a,0x77,0x6b]),_0xb2125f,{[_0x4ec4d9([0x6e,0x61,0x6d,0x65])]:_0x4ec4d9([0x45,0x43,0x44,0x53,0x41]),[_0x4ec4d9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4ec4d9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4ec4d9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x41500c[_0x4ec4d9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4ec4d9([0x6e,0x61,0x6d,0x65])]:_0x4ec4d9([0x45,0x43,0x44,0x53,0x41]),[_0x4ec4d9([0x68,0x61,0x73,0x68])]:{[_0x4ec4d9([0x6e,0x61,0x6d,0x65])]:_0x4ec4d9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ad50a,_0x3b0f96,_0x25af3b)||(_0x44a9e0=!0x1);}}function _0x289049(_0x287245){return _0x287245[_0x4ec4d9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4ec4d9([0x65,0x79]))?JSON[_0x4ec4d9([0x70,0x61,0x72,0x73,0x65])](_0x12ea68(_0x287245)):null;}function _0x12ea68(_0x2e2795){return window[_0x4ec4d9([0x61,0x74,0x6f,0x62])](_0x2e2795[_0x4ec4d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4ec4d9([0x2b]))[_0x4ec4d9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4ec4d9([0x2f])));}function _0x27ede9(_0x1253e7){let _0x3063f1=0x1505;function _0x584552(_0x3d7f67){for(let _0x29810=0x0;_0x29810<_0x3d7f67[_0x4ec4d9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x29810++){const _0x528fdc=_0x3d7f67[_0x4ec4d9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x29810);_0x3063f1=(_0x3063f1<<0x5)+_0x3063f1+_0x528fdc,_0x3063f1&=_0x3063f1;}}function _0x35b8e0(_0x13a799){Array[_0x4ec4d9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x13a799)?_0x13a799[_0x4ec4d9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x35b8e0):_0x13a799&&typeof _0x13a799==_0x4ec4d9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4ec4d9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x13a799)[_0x4ec4d9([0x73,0x6f,0x72,0x74])]()[_0x4ec4d9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4c766b,_0xade12c])=>{_0x584552(_0x4c766b),_0x35b8e0(_0xade12c);}):_0x584552(window[_0x4ec4d9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x13a799));}return _0x35b8e0(_0x1253e7),_0x3063f1>>>0x0;}function _0x4e441f(_0x398d9c){return _0x398d9c[_0x4ec4d9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4ec4d9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4ec4d9([0x30]));}function _0x2bc51e(_0x3ac6af){return _0x3ac6af[_0x4ec4d9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4ec4d9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4ec4d9([0x6a,0x6f,0x69,0x6e])]('');}function _0x38620c(){}function _0x4ec4d9(_0x3f48d7){return _0x3f48d7['map'](_0x38c681=>String['fromCharCode'](_0x38c681))['join']('');}_0x306bc2(await _0x4bdaae());}(this);}['_initSchema'](){const _0x3b2572=this['editor']['model']['schema'];_0x3b2572['isRegistered']('imageBlock')&&_0x3b2572['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3b2572['isRegistered']('imageInline')&&_0x3b2572['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x33bae0=this['editor'];_0x33bae0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x33bae0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x123bb3=>_0x123bb3['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xdb24b4=_0x33bae0['commands']['get']('replaceImageSource');_0xdb24b4&&this['listenTo'](_0xdb24b4,'cleanupImage',(_0x3ba77c,[_0x21302d,_0x340505])=>{_0x21302d['removeAttribute']('uploadcareImageId',_0x340505);});}['_initConfig'](){const _0x341735=this['editor']['config']['get']('uploadcare.uploader')||{},_0x499834=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x2091cc(_0x3118f5['document'],'uc-config',{..._0x341735,'pubkey':_0x499834,'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']=_0x2dcf65=>{if('closeMax'==_0x2dcf65)return'#uc-icon-arrow-down';},_0x3118f5['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x2091cc(_0x3118f5['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x3118f5['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x14e4f3=this['editor']['commands']['get']('insertImage');_0x14e4f3&&this['listenTo'](_0x14e4f3,'execute',()=>{const _0x19baab=this['editor']['model']['document']['selection']['getSelectedElement']();_0x19baab&&_0x19baab['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x19baab);});});const _0x433389=this['editor']['commands']['get']('uploadcareImageReplace');_0x433389&&this['listenTo'](_0x433389,'execute',()=>{const _0xddcf58=this['editor']['model']['document']['selection']['getSelectedElement']();_0xddcf58&&_0xddcf58['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0xddcf58);});});}}class u extends _0x1a05d5{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c14f9){super(_0x2c14f9),_0x2c14f9['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x3774a5['defineComponents'](_0x3774a5);}}class ta extends _0xcab268{constructor(_0x2efa04){super(_0x2efa04);const t=_0x2efa04['t'],_0x1c940d=this['bindTemplate'],_0x17d4f8=new _0x2defba();_0x17d4f8['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':[_0x17d4f8,{'text':_0x1c940d['to']('imageUploadProgress',_0x5e2585=>t('Loading\x20image...')+'\x20('+(_0x5e2585||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 _0xcab268{constructor(_0x194b1a){super(_0x194b1a);const t=_0x194b1a['t'];this['set']('errorType',null);const _0x9b49c8=new _0xd42893(_0x194b1a);_0x9b49c8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x9b49c8['withText']=!0x0,_0x9b49c8['class']='ck-button-action',_0x9b49c8['on']('execute',()=>{this['fire']('retry');}),_0x9b49c8['bind']('isVisible')['to'](this,'errorType',_0xca8422=>'NotFound'!==_0xca8422);const _0x47f656=new at();_0x47f656['content']=et,_0x47f656['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x31ca9b=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':[_0x47f656,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x31ca9b['to']('errorType',_0xb973e8=>t('NotFound'!==_0xb973e8?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x9b49c8]},{'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 _0xcab268{constructor(_0x2a553b,_0x4611dd){super(_0x2a553b);const _0x772ffa=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4611dd,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x772ffa['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4f1403,_0xcae9d4,_0x1836ba){super(_0x4f1403),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x4f1403),this['_errorView']=new rt(_0x4f1403),this['_editingView']=new tt(_0x4f1403,_0x1836ba),this['_focusableView']=new _0xcab268(_0x4f1403),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xcae9d4),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'],_0x81d149=>{this['_addUploadcareImageEditorListeners'](_0x81d149);});}),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'](_0x589c3d,_0x30f36e){const _0x47f76b='uc-cloud-image-editor',_0x4938c3=_0x589c3d['querySelector'](_0x47f76b);if(_0x4938c3)return _0x30f36e(_0x4938c3);const _0x2eb0a4=new MutationObserver(_0x54beed=>{const _0x447bb9=_0x54beed['filter'](_0x3fb103=>_0x3fb103['target']===_0x589c3d&&_0x3fb103['addedNodes']['length']>0x0&&_0x3fb103['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x47f76b);_0x447bb9['length']&&(_0x2eb0a4['disconnect'](),_0x30f36e(_0x447bb9[0x0]['addedNodes'][0x0]));});_0x2eb0a4['observe'](_0x589c3d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x5aab35){_0x5aab35['addEventListener']('apply',_0x83eb85=>{this['fire']('apply',{'imageSrc':_0x83eb85['detail']['cdnUrl']});}),_0x5aab35['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x230d99(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1b5b0d,_0x52d598,_0x4316a9){super(),this['_editor']=_0x1b5b0d,this['_dialog']=_0x52d598,this['_imageElement']=_0x4316a9,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 _0xbfed4d=this['_imageElement'],_0x1e0cdf=_0xbfed4d['getAttribute']('uploadcareImageId'),_0x1b1d0a=_0xbfed4d['getAttribute']('src');if(_0x1e0cdf)await this['_loadImageInfo'](_0x1e0cdf,_0x1b1d0a);else{if(this['_imageCache']['has'](_0x1b1d0a)){const _0x1b708b=this['_imageCache']['get'](_0x1b1d0a);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1b708b['url'],this['imageDimension']=_0x1b708b['dimension'],this['imageId']=_0x1b708b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x144b29}=this['_editor'],t=_0x144b29['t'],_0x1c6b1b=new Z(_0x144b29,this['imageStatus'],this['_attributes']);_0x1c6b1b['bind']('status')['to'](this,'imageStatus'),_0x1c6b1b['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c6b1b['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c6b1b['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c6b1b,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2b374f,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c6b1b,'position':_0x5d271d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c6b1b['focus']();},'onHide':()=>{_0x1c6b1b['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x37f5ba=>!F(_0x37f5ba,_0x1c6b1b['element'])}});}['_loadImageInfo'](_0x358722,_0x4c38b1){return C['getInfo'](_0x358722,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1ac489=>{const {width:_0x2ed0df,height:_0x393944}=_0x1ac489['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4c38b1,this['imageDimension']={'width':_0x2ed0df,'height':_0x393944},this['imageId']=_0x358722;})['catch'](_0x13e6a2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x13e6a2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x41fa48,_0x530261){return this['_getImageAsFile'](_0x41fa48)['then'](_0x4ca997=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x530261['signal'],'file':_0x4ca997,'onProgress':_0x44ea4d=>{_0x44ea4d&&_0x44ea4d['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x44ea4d['value']));}}))['then'](_0x5410b3=>{const {width:_0x1e5c95,height:_0x4f0f34}=_0x5410b3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5410b3['cdnUrl'],this['imageDimension']={'width':_0x1e5c95,'height':_0x4f0f34},this['imageId']=_0x5410b3['uuid'],this['imageUploadProgress']=null;const _0x10121d=_0x41fa48['getAttribute']('src');this['_imageCache']['set'](_0x10121d,{'id':_0x5410b3['uuid'],'url':_0x5410b3['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x570782=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x570782['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x216d84,_0x40e338){_0x216d84['on']('apply',(_0x1bb191,_0x3d386a)=>{this['_replaceImage'](_0x40e338,_0x3d386a['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x216d84['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x216d84['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2b9a7f,_0x521d3,_0x1680a9){const _0xae7112=this['_editor'],{width:_0x3cf139,height:_0xb20df}=A(_0x521d3,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x43dc50,imageSources:_0x4233ec}=E(_0x521d3,_0x3cf139);_0xae7112['model']['change'](_0x2d3be9=>{if('$graveyard'===_0x2b9a7f['root']['rootName']){_0xae7112['execute']('insertImage',{'imageType':_0x2b9a7f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2b9a7f['getAttributes']()),'uploadcareImageId':_0x1680a9,'src':_0x43dc50,'sources':_0x4233ec,'width':_0x3cf139,'height':_0xb20df}});const _0x1d73f6=_0x2b9a7f['getChildren']();_0x2b9a7f=_0xae7112['model']['document']['selection']['getSelectedElement']();for(const _0x3cf97b of _0x1d73f6)_0x2d3be9['append'](_0x2d3be9['cloneElement'](_0x3cf97b),_0x2b9a7f);}else _0x2d3be9['setSelection'](_0x2b9a7f,'on'),_0xae7112['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2b9a7f['getAttributes']()),'uploadcareImageId':_0x1680a9,'src':_0x43dc50,'sources':_0x4233ec,'width':_0x3cf139,'height':_0xb20df},_0x2b9a7f);_0x2d3be9['setSelection'](_0x2b9a7f,'on');});}async['_getImageAsFile'](_0x2e1f49){const _0x303cd1=_0x3118f5['window'],_0x316acd=_0x3118f5['document']['location']['href'],_0x65073b=new _0x303cd1['URL'](_0x2e1f49['getAttribute']('src'),_0x316acd);if('data:'===_0x65073b['protocol']){const _0x160e43=_0x65073b['href']['split'](','),_0x1bbba0=_0x160e43[0x0]['match'](/:(.*?);/)[0x1],_0x4d18d2=_0x1bbba0['split']('/')[0x1],_0x33cf12=_0x303cd1['atob'](_0x160e43[_0x160e43['length']-0x1]);let _0x589b05=_0x33cf12['length'];const _0x50c3d4=new _0x303cd1['Uint8Array'](_0x589b05);for(;_0x589b05--;)_0x50c3d4[_0x589b05]=_0x33cf12['charCodeAt'](_0x589b05);return new _0x303cd1['File']([_0x50c3d4],'image.'+_0x4d18d2,{'type':_0x1bbba0});}const _0x7142d4=_0x65073b['href']['split']('/'),_0xafbb1f=_0x7142d4[_0x7142d4['length']-0x1],_0x176674=_0xafbb1f['split']('.')[0x1];return _0x303cd1['fetch'](_0x65073b['href'])['then'](_0x409fdb=>_0x409fdb['clone']()['blob']())['then'](_0x229afb=>new _0x303cd1['File']([_0x229afb],_0xafbb1f,{'type':'image/'+_0x176674}));}}class J extends _0x596e43{['imageEditController'];static get['requires'](){return[_0x4b6953];}['_isEditable'];constructor(_0xbf71b2){super(_0xbf71b2),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x50b963){const _0xbdb4e0=V(_0x50b963);return _0x55cb2b=>!(!_0x55cb2b||!_0x55cb2b['is']('element','imageBlock')&&!_0x55cb2b['is']('element','imageInline'))&&(!!_0x55cb2b['hasAttribute']('uploadcareImageId')||!!_0x55cb2b['hasAttribute']('src')&&_0xbdb4e0(_0x55cb2b['getAttribute']('src')));}(_0xbf71b2['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x58e55b=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x58e55b);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4e56f5=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4e56f5&&(_0x4e56f5['is']('element','imageBlock')||_0x4e56f5['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x4b6953),_0x4e56f5),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x596e43{['refresh'](){const _0x3daf17=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3daf17&&(_0x3daf17['is']('element','imageBlock')||_0x3daf17['is']('element','imageInline')));}['execute'](_0x4fb893){const _0x5d817e=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x220932=>{_0x220932['setAttributes'](_0x4fb893,_0x5d817e),_0x220932['removeAttribute']('srcset',_0x5d817e),_0x220932['removeAttribute']('sizes',_0x5d817e);});}}class g extends _0x1a05d5{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x5bd683,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x52c2c7}=this;_0x52c2c7['commands']['add']('uploadcareImageEdit',new J(_0x52c2c7)),_0x52c2c7['commands']['add']('uploadcareImageReplace',new O(_0x52c2c7));}}class j extends _0x1a05d5{['_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 _0x177df5=this['editor'];_0x177df5['ui']['componentFactory']['add']('uploadcareImageEdit',_0xf72a63=>{const _0x32f947=_0x177df5['commands']['get']('uploadcareImageEdit'),_0x2562eb=new _0xd42893(_0xf72a63),t=_0xf72a63['t'];return _0x2562eb['set']({'icon':_0x2b374f,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2562eb['bind']('isEnabled')['to'](_0x32f947),_0x2562eb['bind']('isOn')['to'](_0x32f947,'isActive'),this['listenTo'](_0x2562eb,'execute',()=>{_0x177df5['execute']('uploadcareImageEdit'),_0x177df5['editing']['view']['focus']();}),_0x2562eb;}),this['_initConfig']();}['_initConfig'](){const _0x5b95ab=_0x2091cc(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5b95ab),this['listenTo'](this['editor'],'destroy',()=>{_0x5b95ab['remove']();});}}class P extends _0x1a05d5{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 _0x1d1957,Command as _0x2cac3d}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xf69ae1,IconGooglePhotos as _0xe77442,IconGoogleDrive as _0xf94095,IconFacebook as _0x5f0976,IconDropbox as _0x23cbd3,IconUploadcareLink as _0x427f3a,IconUploadcareImageUpload as _0x507491,IconError as et,IconUploadcareImageEdit as _0x1a92b4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x120647,MenuBarMenuListItemButtonView as _0x2f4499,View as _0x443efe,FocusCycler as _0xdd2b6b,Dialog as _0x4fae02,DialogViewPosition as _0x18206f,SpinnerView as _0x53eee9,IconView as at,Notification as _0x2d9987}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x173ea9,DomEmitterMixin as _0x3572e0,global as _0x5454bb,getAncestors as _0x258636,ObservableMixin as _0xd4fbee,createElement as _0x40bb46,uid as _0x3e6133}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3a13d0}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0xf4123b,info as _0x5eafb7}from'@uploadcare/upload-client';import*as _0xdec13a from'@uploadcare/file-uploader';var o=function(_0x4d391c){return _0x4d391c['Local']='local',_0x4d391c['URL']='url',_0x4d391c['Dropbox']='dropbox',_0x4d391c['GDrive']='gdrive',_0x4d391c['Facebook']='facebook',_0x4d391c['GPhotos']='gphotos',_0x4d391c['OneDrive']='onedrive',_0x4d391c;}({});function _(_0x341cb1,_0x1efd2e,_0x2b46aa){const t=_0x341cb1['t'],_0x1bc8ce=_0x341cb1['t'];switch(_0x1efd2e){case o['Local']:return{'text':_0x1bc8ce('Insert'===_0x2b46aa?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1bc8ce('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x2b46aa?_0x1bc8ce('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1bc8ce('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x2b46aa?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x2b46aa?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x2b46aa?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x2b46aa?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x2b46aa?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1efd2e;}}class e extends _0x1d1957{['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 _0x1f2057=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x354fe6;for(const _0x3a4b25 in _0x1f2057){const _0x58a691=_0x3a4b25,_0x6bcb22=_0x1f2057[_0x58a691];if('uploadcareLicenseKeyValid'==_0x6bcb22||'uploadcareLicenseKeyInvalid'==_0x6bcb22||'uploadcareLicenseKeyExpired'==_0x6bcb22||'uploadcareLicenseKeyDomainLimit'==_0x6bcb22||'uploadcareLicenseKeyNotAllowed'==_0x6bcb22||'uploadcareLicenseKeyEvaluationLimit'==_0x6bcb22||'uploadcareLicenseKeyTrialLimit'==_0x6bcb22||'uploadcareLicenseKeyUsageLimit'==_0x6bcb22){delete _0x1f2057[_0x58a691],_0x354fe6=_0x6bcb22,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x354fe6&&_0x1f2057['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x354fe6&&_0x1f2057['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x354fe6&&_0x1f2057['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x354fe6&&_0x1f2057['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x354fe6&&_0x1f2057['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x354fe6&&_0x1f2057['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x354fe6&&_0x1f2057['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4cdc77}=this,_0x35dbd9=_0x4cdc77['commands']['get']('uploadcare');if(!_0x35dbd9)return;const _0x1cf375=this['_normalizeConfigSourceList'](_0x4cdc77['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x49580e,_0x5637ae)=>{const _0x1ebe07=this['_getIntegrationKey'](_0x5637ae['type']);return _0x49580e[_0x1ebe07]||(_0x49580e[_0x1ebe07]=[]),_0x49580e[_0x1ebe07]['push'](_0x5637ae),_0x49580e;},{});_0x4cdc77['plugins']['has']('ImageInsertUI')&&_0x4cdc77['commands']['get']('uploadcare')&&Object['entries'](_0x1cf375)['forEach'](([_0x21d3ce,_0x28d43c])=>{_0x4cdc77['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x21d3ce,'observable':()=>_0x35dbd9,'buttonViewCreator':()=>this['_createToolbarButton'](_0x28d43c),'formViewCreator':()=>this['_createDropdownButtons'](_0x28d43c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x28d43c),'override':'assetManager'!==_0x21d3ce});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x500657){const {locale:_0x3f813a}=this['editor'];return _0x500657['map'](_0x16c6e9=>{const _0x353107=_(_0x3f813a,_0x16c6e9,'Insert');switch(_0x16c6e9){case o['Local']:return{'icon':_0x507491,'type':o['Local'],..._0x353107};case o['URL']:return{'icon':_0x427f3a,'type':o['URL'],..._0x353107};case o['Dropbox']:return{'icon':_0x23cbd3,'type':o['Dropbox'],..._0x353107};case o['Facebook']:return{'icon':_0x5f0976,'type':o['Facebook'],..._0x353107};case o['GDrive']:return{'icon':_0xf94095,'type':o['GDrive'],..._0x353107};case o['GPhotos']:return{'icon':_0xe77442,'type':o['GPhotos'],..._0x353107};case o['OneDrive']:return{'icon':_0xf69ae1,'type':o['OneDrive'],..._0x353107};}});}['_getIntegrationKey'](_0x41aef7){switch(_0x41aef7){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x56e2d0,_0x138451){const _0x96bf8e=this['editor'],_0x3aa313=new _0x56e2d0(_0x96bf8e['locale']),_0x2943ab=_0x96bf8e['commands']['get']('uploadcare');return _0x3aa313['bind']('isEnabled')['to'](_0x2943ab),_0x3aa313['on']('execute',()=>{_0x2943ab['execute'](_0x138451);}),_0x3aa313;}['_createToolbarButton'](_0x4a7448){const {locale:_0x392ede}=this['editor'],_0x2435b5=this['editor']['plugins']['get']('ImageInsertUI'),_0x3e1a03=_0x4a7448[0x0],_0x860b87=this['_createButton'](_0x120647,_0x3e1a03['type']);return _0x860b87['icon']=_0x3e1a03['icon'],_0x860b87['bind']('label')['to'](_0x2435b5,'isImageSelected',_0x4f6e8b=>_(_0x392ede,_0x3e1a03['type'],_0x4f6e8b?'Replace':'Insert')['text']),_0x860b87['tooltip']=!0x0,_0x860b87;}['_createDropdownButtons'](_0x5285c6){const {locale:_0x1a212d}=this['editor'],_0x3c8834=this['editor']['plugins']['get']('ImageInsertUI');return _0x5285c6['map'](_0x253529=>{const _0x35a51a=this['_createButton'](_0x120647,_0x253529['type']);return _0x35a51a['withText']=!0x0,_0x35a51a['icon']=_0x253529['icon'],_0x35a51a['bind']('label')['to'](_0x3c8834,'isImageSelected',_0x68267a=>_(_0x1a212d,_0x253529['type'],_0x68267a?'Replace':'Insert')['text']),_0x35a51a;});}['_createMenuBarButtons'](_0x58494a){return _0x58494a['map'](_0x569e12=>{const _0x5ee15d=this['_createButton'](_0x2f4499,_0x569e12['type']);return _0x5ee15d['icon']=_0x569e12['icon'],_0x5ee15d['label']=_0x569e12['shortText'],_0x5ee15d;});}}class q extends _0x443efe{['focusTracker'];['focusCycler'];constructor(_0x49f57c){super(_0x49f57c),this['focusTracker']=new _0x173ea9(),this['focusCycler']=new _0xdd2b6b({'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(_0x4ee4d0){super(_0x4ee4d0),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(_0x1b27e7,_0x846822){const _0x493c3f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x35e232=>_0x35e232<=_0x846822)['map'](_0x39cc19=>_0x1b27e7['replace'](/\/$/,'')+'/-/resize/'+_0x39cc19+'x/\x20'+_0x39cc19+'w');return{'imageFallbackUrl':_0x1b27e7,'imageSources':[{'srcset':_0x493c3f['join'](',\x20'),'sizes':'(max-width:\x20'+_0x846822+'px)\x20100vw,\x20'+_0x846822+'px','type':'image/webp'}]};}function A(_0x31eb77,_0x56a618,_0x571ef1){const _0x703031=_0x31eb77['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x703031?parseInt(_0x703031[0x1],0xa):_0x56a618,'height':_0x703031?parseInt(_0x703031[0x2],0xa):_0x571ef1};}function m(_0x17053e,_0x12a41e){const _0x291612=Object['create'](_0x3572e0),_0x341e83=_0x17053e['plugins']['get']('ImageUtils'),_0x1b1783=_0x17053e['editing']['mapper']['toViewElement'](_0x12a41e),_0x3bf339=_0x341e83['findViewImgElement'](_0x1b1783),_0x2b888c=_0x17053e['editing']['view']['domConverter']['viewToDom'](_0x3bf339),_0x49ac2d=_0x12a41e['getAttribute']('width'),_0x5b1fd0=_0x12a41e['getAttribute']('height'),_0x525eb1='image-processing';_0x17053e['editing']['view']['change'](_0x41a718=>{_0x41a718['addClass'](_0x525eb1,_0x1b1783),_0x41a718['setStyle']('aspect-ratio',_0x49ac2d+'/'+_0x5b1fd0,_0x3bf339);}),_0x291612['listenTo'](_0x2b888c,'load',()=>{_0x291612['stopListening'](_0x2b888c,'load'),_0x17053e['editing']['view']['change'](_0x1855a9=>{_0x1855a9['removeClass'](_0x525eb1,_0x1b1783),_0x1855a9['removeStyle']('aspect-ratio',_0x3bf339);});});}function R(_0x566d5){if(Array['isArray'](_0x566d5)){const _0x54ed0f=_0x566d5['map'](R);return _0x1610aa=>_0x54ed0f['some'](_0x283e22=>_0x283e22(_0x1610aa));}if('origin'==_0x566d5){const _0x301562=_0x5454bb['window']['location']['origin'];return _0x1ae952=>new URL(_0x1ae952,_0x5454bb['document']['baseURI'])['origin']==_0x301562;}return'function'==typeof _0x566d5?_0x566d5:_0x566d5 instanceof RegExp?_0x4b9b2a=>!(!_0x4b9b2a['match'](_0x566d5)&&!_0x4b9b2a['replace'](/^https?:\/\//,'')['match'](_0x566d5)):()=>!0x1;}function F(_0x488df1,_0xcebec5){return _0x258636(_0x488df1['target'])['includes'](_0xcebec5);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xd4fbee(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x54fc1d,_0x4df595,_0x2b1f51){super(),this['_editor']=_0x54fc1d,this['_editing']=_0x4df595,this['_dialog']=_0x54fc1d['plugins']['get'](_0x4fae02),this['_api']=_0x4df595['ctxElement']['getAPI'](),this['_type']=_0x2b1f51,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:_0x2c0703,model:_0x2a5dcb}=this['_editor'],_0x46146c=_0x2a5dcb['document']['selection']['getSelectedElement'](),_0xdaa769=_0x46146c&&(_0x46146c['is']('element','imageBlock')||_0x46146c['is']('element','imageInline'));this['_formView']=new S(_0x2c0703),this['_dialog']['show']({'id':'uploadCare','icon':_0x507491,'title':_(_0x2c0703,this['_type'],_0xdaa769?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x18206f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x558319=>!F(_0x558319,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xea7645}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0xe24658=>{const _0xeafe92=_0xea7645['length'];for(const _0x7e6ec8 of _0xea7645){const _0x1d033b=_0x7e6ec8===_0xea7645[_0xeafe92-0x1],{cdnUrl:_0x588411,fileInfo:_0x418058}=_0x7e6ec8;if(!_0x588411||!_0x418058)continue;const {width:_0x2af73d,height:_0x2b401c}=_0x418058['imageInfo'],_0x40359e=A(_0x588411,_0x2af73d,_0x2b401c),_0x216e62=E(_0x588411,_0x40359e['width']),_0x4faba6={'id':_0x418058['uuid'],'type':'image','attributes':{'imageDimension':_0x40359e,..._0x216e62}};this['_insertAsset'](_0x4faba6,_0x1d033b,_0xe24658);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0xe58bf6=>{'idle'===_0xe58bf6['detail']['status']&&!_0xe58bf6['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1bbc16,_0x115c9e,_0x4e85a7){const _0x511ebf=this['_editor']['model']['document']['selection'],_0x39e015=_0x511ebf['getSelectedElement'](),_0x28f58f=!(!_0x39e015||!_0x39e015['is']('element','imageInline'));_0x4e85a7['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1bbc16,_0x28f58f),_0x115c9e||_0x4e85a7['setSelection'](_0x511ebf['getLastPosition']());}['_insertImage'](_0x3f80a9,_0xa22c5b){const _0x374535=this['_editor'],{imageDimension:_0x5858d2,imageFallbackUrl:_0xd27011,imageSources:_0x12843e}=_0x3f80a9['attributes'];_0x374535['execute']('insertImage',{'imageType':_0xa22c5b?'imageInline':null,'source':{'uploadcareImageId':_0x3f80a9['id'],'src':_0xd27011,'sources':_0x12843e,..._0x5858d2}});}}class n extends _0x2cac3d{['_editing'];['_controller']=null;static get['requires'](){return[_0x4fae02,i];}constructor(_0x2b095a){super(_0x2b095a),this['_editing']=_0x2b095a['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1ab085){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x1ab085);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x53070e,publicKey:_0x5aab9b,signal:_0x238397,onProgress:_0x1bb49a}){return _0xf4123b(_0x53070e,{'publicKey':_0x5aab9b,'store':'auto','signal':_0x238397,'onProgress':_0x1bb49a});}static['getInfo'](_0x44acd8,_0x834cb0){return _0x5eafb7(_0x44acd8,_0x834cb0);}}class p extends _0x1d1957{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3a13d0,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x18dd41=this['editor'];if(!!!_0x18dd41['config']['get']('uploadcare'))return;_0x18dd41['plugins']['get'](_0x3a13d0)['createUploadAdapter']=_0x3557c2=>new x(_0x3557c2,_0x18dd41),_0x18dd41['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5a422d,{imageElement:_0x32546b,data:_0x313669})=>{_0x18dd41['model']['change'](_0xfdcd67=>{_0xfdcd67['setAttribute']('uploadcareImageId',_0x313669['uploadcareImageId'],_0x32546b);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x40f8a1,_0x3c7350){this['loader']=_0x40f8a1,this['editor']=_0x3c7350,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x30c544=this['editor']['config']['get']('uploadcare.pubkey'),_0x38b31c=await this['loader']['file'];return C['upload']({'file':_0x38b31c,'publicKey':_0x30c544,'signal':this['controller']['signal'],'onProgress':_0x368793=>{_0x368793&&_0x368793['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x368793['value']);}})['then'](async _0x594a7e=>{const {imageFallbackUrl:_0x57a69c,imageSources:_0x4b8575}=E(_0x594a7e['cdnUrl'],_0x594a7e['imageInfo']['width']);return{'uploadcareImageId':_0x594a7e['uuid'],'default':_0x57a69c,'sources':_0x4b8575};})['catch'](()=>{const _0xfc5ca=t('Cannot\x20upload\x20file:')+('\x20'+_0x38b31c['name']+'.');return Promise['reject'](_0xfc5ca);});}['abort'](){this['controller']['abort']();}}class i extends _0x1d1957{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x4fae02];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x3fe3d1=this['editor'];_0x3fe3d1['commands']['add']('uploadcare',new n(_0x3fe3d1));}['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 _0x4cf2d9=_0x5454bb['document']['querySelector']('input[uploadcare-file-input]');_0x4cf2d9&&_0x4cf2d9['remove']();}),async function(_0x202584){const _0x21a187=_0x1f6a91([0x34,0x4a,0x30,0x68,0x56,0x50,0x64,0x4b,0x7a,0x65,0x73,0x53,0x5a,0x35,0x55,0x6a,0x70,0x59,0x46,0x44,0x31,0x51,0x61,0x6f,0x54,0x62,0x79,0x69,0x57,0x47,0x49,0x45,0x38,0x6e,0x66,0x36,0x6b,0x67,0x4d,0x37,0x43,0x6c,0x4e,0x63,0x32,0x4c,0x78,0x74,0x41,0x48,0x42,0x76,0x52,0x72,0x33,0x4f,0x71,0x77,0x6d,0x75,0x39,0x58]),_0x3cf627=0x64d774be,_0x3cf165=0x64d01726^_0x3cf627,_0x16af07=window[_0x1f6a91([0x44,0x61,0x74,0x65])][_0x1f6a91([0x6e,0x6f,0x77])](),_0x168f10=_0x202584[_0x1f6a91([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x344615=new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d2011=>{_0x168f10[_0x1f6a91([0x6f,0x6e,0x63,0x65])](_0x1f6a91([0x72,0x65,0x61,0x64,0x79]),_0x5d2011);}),_0x809faf={[_0x1f6a91([0x6b,0x74,0x79])]:_0x1f6a91([0x45,0x43]),[_0x1f6a91([0x75,0x73,0x65])]:_0x1f6a91([0x73,0x69,0x67]),[_0x1f6a91([0x63,0x72,0x76])]:_0x1f6a91([0x50,0x2d,0x32,0x35,0x36]),[_0x1f6a91([0x78])]:_0x1f6a91([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]),[_0x1f6a91([0x79])]:_0x1f6a91([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]),[_0x1f6a91([0x61,0x6c,0x67])]:_0x1f6a91([0x45,0x53,0x32,0x35,0x36])},_0x1d3e7a=_0x168f10[_0x1f6a91([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1f6a91([0x67,0x65,0x74])](_0x1f6a91([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1acaa4(){let _0x320939,_0x3f1865=null,_0xa26183=null;try{if(_0x1d3e7a==_0x1f6a91([0x47,0x50,0x4c]))return _0x1f6a91([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x320939=_0x3bc25f(),!_0x320939)return _0x1f6a91([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x320939[_0x1f6a91([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa26183=_0x483db1(_0x320939[_0x1f6a91([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x320939[_0x1f6a91([0x6a,0x74,0x69])])),await _0x1c0d2d()?_0x2dfa5c()?_0x530586()?_0x1f6a91([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4329cc()?(_0x320939[_0x1f6a91([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1f6a91([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f1865=_0x57b0ce(_0x1f6a91([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x320939[_0x1f6a91([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1f6a91([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f1865=_0x57b0ce(_0x1f6a91([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1e15f9()):_0x1f6a91([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1f6a91([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1f6a91([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x5480af){return _0x1f6a91([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x530586(){const _0x231b20=[_0x1f6a91([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1f6a91([0x74,0x72,0x69,0x61,0x6c])][_0x1f6a91([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x320939[_0x1f6a91([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x16af07/0x3e8:0xe10*_0x3cf165;return _0x320939[_0x1f6a91([0x65,0x78,0x70])]<_0x231b20;}function _0x2dfa5c(){const _0x5991aa=_0x320939[_0x1f6a91([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5991aa&&(!!_0x5991aa[_0x1f6a91([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f6a91([0x2a]))||!!_0x5991aa[_0x1f6a91([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f6a91([0x55,0x50,0x4c,0x43])));}function _0x4329cc(){const _0x53a92d=_0x320939[_0x1f6a91([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53a92d||0x0==_0x53a92d[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x194ed6}=new URL(window[_0x1f6a91([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53a92d[_0x1f6a91([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x194ed6))return!0x0;const _0x19e8b1=_0x194ed6[_0x1f6a91([0x73,0x70,0x6c,0x69,0x74])](_0x1f6a91([0x2e]));return _0x53a92d[_0x1f6a91([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b16b9=>_0x2b16b9[_0x1f6a91([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f6a91([0x2a])))[_0x1f6a91([0x6d,0x61,0x70])](_0x5f08ae=>_0x5f08ae[_0x1f6a91([0x73,0x70,0x6c,0x69,0x74])](_0x1f6a91([0x2e])))[_0x1f6a91([0x73,0x6f,0x6d,0x65])](_0x560e1b=>_0x19e8b1[_0x1f6a91([0x65,0x76,0x65,0x72,0x79])]((_0x4d8f08,_0xefe0d7)=>_0x560e1b[_0xefe0d7]===_0x4d8f08||_0x560e1b[_0xefe0d7]===_0x1f6a91([0x2a])));}function _0x1e15f9(){return _0x3f1865&&_0xa26183?new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c94a7,_0x422923)=>{_0x3f1865[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0x5c94a7,_0x422923),_0xa26183[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0xb75eca=>{_0xb75eca!=_0x1f6a91([0x56,0x61,0x6c,0x69,0x64])&&_0x5c94a7(_0xb75eca);},_0x422923);}):_0x3f1865||_0xa26183||_0x1f6a91([0x56,0x61,0x6c,0x69,0x64]);}}function _0x483db1(_0x2df9e4,_0x3d38bd){return new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33e024=>{if(_0x186b8f())return _0x33e024(_0x1f6a91([0x56,0x61,0x6c,0x69,0x64]));_0x38999a(),_0x168f10[_0x1f6a91([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1f6a91([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2c5296=!0x1;const _0x59a866=_0x3e6133();function _0x153637(_0x4d7e4f){return!!_0x4d7e4f&&(typeof _0x4d7e4f===_0x1f6a91([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4d7e4f===_0x1f6a91([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4d7e4f[_0x1f6a91([0x74,0x68,0x65,0x6e])]===_0x1f6a91([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4d7e4f[_0x1f6a91([0x63,0x61,0x74,0x63,0x68])]===_0x1f6a91([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4bd134(_0x2f715e){_0x4e7506(_0x2f715e)[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0x54ab9b=>{if(!_0x54ab9b||_0x54ab9b[_0x1f6a91([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1f6a91([0x6f,0x6b]))return _0x1f6a91([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x26ce96(_0x22c075(_0x59a866+_0x3d38bd))!=_0x54ab9b[_0x1f6a91([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1f6a91([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1f6a91([0x56,0x61,0x6c,0x69,0x64]);})[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0x278c66=>(_0x2d59a3(),_0x278c66),()=>{const _0x3c5dfb=_0xd833b0();return null==_0x3c5dfb?(_0x2d59a3(),_0x1f6a91([0x56,0x61,0x6c,0x69,0x64])):_0x1f6a91(_0x16af07-_0x3c5dfb>(0x40dbf0be^_0x3cf627)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0x33e024)[_0x1f6a91([0x63,0x61,0x74,0x63,0x68])](()=>{_0x33e024(_0x1f6a91([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x54d839=0x64e19a3e^_0x3cf627;function _0x2d59a3(){const _0x16ebf5=_0x1f6a91([0x6c,0x6c,0x63,0x74,0x2d])+_0x26ce96(_0x22c075(_0x2df9e4)),_0xb6fa93=_0x2284e6(_0x26ce96(window[_0x1f6a91([0x4d,0x61,0x74,0x68])][_0x1f6a91([0x63,0x65,0x69,0x6c])](_0x16af07/_0x54d839)));window[_0x1f6a91([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1f6a91([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x16ebf5,_0xb6fa93);}function _0xd833b0(){const _0x2f8873=_0x1f6a91([0x6c,0x6c,0x63,0x74,0x2d])+_0x26ce96(_0x22c075(_0x2df9e4)),_0x116b6d=window[_0x1f6a91([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1f6a91([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f8873);return _0x116b6d?window[_0x1f6a91([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2284e6(_0x116b6d),0x10)*_0x54d839:null;}function _0x4e7506(_0x55b65b){return new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46180c,_0x23810b)=>{_0x55b65b[_0x1f6a91([0x74,0x68,0x65,0x6e])](_0x46180c,_0x23810b),window[_0x1f6a91([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23810b,0x64d6a07e^_0x3cf627);});}}_0x168f10[_0x1f6a91([0x6f,0x6e])](_0x1f6a91([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x400daf,_0x539ef1)=>{if(_0x539ef1[0x0]!=_0x2df9e4)return _0x33e024(_0x1f6a91([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x539ef1[0x1]={..._0x539ef1[0x1],[_0x1f6a91([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x59a866};},{[_0x1f6a91([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1f6a91([0x68,0x69,0x67,0x68])}),_0x168f10[_0x1f6a91([0x6f,0x6e])](_0x1f6a91([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15900a=>{_0x153637(_0x15900a[_0x1f6a91([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2c5296=!0x0,_0x4bd134(_0x15900a[_0x1f6a91([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1f6a91([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1f6a91([0x6c,0x6f,0x77])}),_0x344615[_0x1f6a91([0x74,0x68,0x65,0x6e])](()=>{_0x2c5296||_0x33e024(_0x1f6a91([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x186b8f(){return _0x168f10[_0x1f6a91([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1f6a91([0x76,0x69,0x65,0x77])][_0x1f6a91([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1f6a91([0x61,0x75,0x74,0x6f]);}function _0x38999a(){_0x168f10[_0x1f6a91([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1f6a91([0x76,0x69,0x65,0x77])][_0x1f6a91([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1f6a91([0x61,0x75,0x74,0x6f]);}}function _0x57b0ce(_0x3d7efa){const _0x261168=[new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4fe895=>setTimeout(_0x4fe895,0x64de4a72^_0x3cf627)),_0x344615[_0x1f6a91([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10410c=>{let _0x344ba9=0x0;_0x168f10[_0x1f6a91([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f6a91([0x6f,0x6e])](_0x1f6a91([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1a0e4f,_0x52d8c9)=>{_0x52d8c9[0x0][_0x1f6a91([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x344ba9++,_0x344ba9==(0x64d77546^_0x3cf627)&&(_0x10410c(),_0x1a0e4f[_0x1f6a91([0x6f,0x66,0x66])]());});}))];return window[_0x1f6a91([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1f6a91([0x72,0x61,0x63,0x65])](_0x261168)[_0x1f6a91([0x74,0x68,0x65,0x6e])](()=>_0x3d7efa);}async function _0x50739d(){await _0x344615,_0x168f10[_0x1f6a91([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f6a91([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x310ad8,_0x168f10[_0x1f6a91([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f6a91([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x310ad8,_0x168f10[_0x1f6a91([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1f6a91([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x291a2e(_0x29bcf6){const _0x149d91=_0x3f51bd();_0x168f10[_0x149d91]=_0x1f6a91([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x29bcf6,_0x29bcf6!=_0x1f6a91([0x56,0x61,0x6c,0x69,0x64])&&_0x50739d();}function _0x3f51bd(){const _0x1b49eb=window[_0x1f6a91([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1f6a91([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1f6a91([0x6e,0x6f,0x77])]())[_0x1f6a91([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1f6a91([0x2e]),'');let _0x57f94d=_0x1f6a91([0x4a]);for(let _0xe0789=0x0;_0xe0789<_0x1b49eb[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe0789+=0x2){let _0x11fa45=window[_0x1f6a91([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b49eb[_0x1f6a91([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe0789,_0xe0789+0x2));_0x11fa45>=_0x21a187[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x11fa45-=_0x21a187[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x57f94d+=_0x21a187[_0x11fa45];}return _0x57f94d;}function _0x3bc25f(){const _0x4d4161=_0x1d3e7a[_0x1f6a91([0x73,0x70,0x6c,0x69,0x74])](_0x1f6a91([0x2e]));if(0x3!=_0x4d4161[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x124908(_0x4d4161[0x1]);function _0x124908(_0x523c9e){const _0x82f9e2=_0x165acf(_0x523c9e);return _0x82f9e2&&_0x1999db()?_0x82f9e2:null;function _0x1999db(){const _0x1757a6=_0x82f9e2[_0x1f6a91([0x6a,0x74,0x69])],_0x45e36c=window[_0x1f6a91([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1757a6[_0x1f6a91([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1757a6[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x419dd5={..._0x82f9e2,[_0x1f6a91([0x6a,0x74,0x69])]:_0x1757a6[_0x1f6a91([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1757a6[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x419dd5[_0x1f6a91([0x76,0x63])],_0x22c075(_0x419dd5)==_0x45e36c;}}}async function _0x1c0d2d(){let _0x3b1d1b=!0x0;try{const _0x2bb5fb=_0x1d3e7a[_0x1f6a91([0x73,0x70,0x6c,0x69,0x74])](_0x1f6a91([0x2e])),[_0xbda235,_0x33b519,_0x16be1a]=_0x2bb5fb;return _0x434054(_0xbda235),await _0x141606(_0xbda235,_0x33b519,_0x16be1a),_0x3b1d1b;}catch(_0x98edf3){return!0x1;}function _0x434054(_0x5c1ce9){const _0x17cbfb=_0x165acf(_0x5c1ce9);_0x17cbfb&&_0x17cbfb[_0x1f6a91([0x61,0x6c,0x67])]==_0x1f6a91([0x45,0x53,0x32,0x35,0x36])||(_0x3b1d1b=!0x1);}async function _0x141606(_0xfeebb3,_0x5da111,_0x5ddf2c){const _0xba5122=window[_0x1f6a91([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1f6a91([0x66,0x72,0x6f,0x6d])](_0x59d7c0(_0x5ddf2c),_0x100ded=>_0x100ded[_0x1f6a91([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x43e38b=new window[(_0x1f6a91([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1f6a91([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xfeebb3+_0x1f6a91([0x2e])+_0x5da111),_0x5961d5=window[_0x1f6a91([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1f6a91([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5961d5)return;const _0x1a26b3=await _0x5961d5[_0x1f6a91([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1f6a91([0x6a,0x77,0x6b]),_0x809faf,{[_0x1f6a91([0x6e,0x61,0x6d,0x65])]:_0x1f6a91([0x45,0x43,0x44,0x53,0x41]),[_0x1f6a91([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1f6a91([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1f6a91([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5961d5[_0x1f6a91([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1f6a91([0x6e,0x61,0x6d,0x65])]:_0x1f6a91([0x45,0x43,0x44,0x53,0x41]),[_0x1f6a91([0x68,0x61,0x73,0x68])]:{[_0x1f6a91([0x6e,0x61,0x6d,0x65])]:_0x1f6a91([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a26b3,_0xba5122,_0x43e38b)||(_0x3b1d1b=!0x1);}}function _0x165acf(_0xd900a6){return _0xd900a6[_0x1f6a91([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1f6a91([0x65,0x79]))?JSON[_0x1f6a91([0x70,0x61,0x72,0x73,0x65])](_0x59d7c0(_0xd900a6)):null;}function _0x59d7c0(_0x3b87e7){return window[_0x1f6a91([0x61,0x74,0x6f,0x62])](_0x3b87e7[_0x1f6a91([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1f6a91([0x2b]))[_0x1f6a91([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1f6a91([0x2f])));}function _0x22c075(_0x41f51c){let _0x260520=0x1505;function _0x1ee3fb(_0x1c1e30){for(let _0x289c9c=0x0;_0x289c9c<_0x1c1e30[_0x1f6a91([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x289c9c++){const _0x48eec7=_0x1c1e30[_0x1f6a91([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x289c9c);_0x260520=(_0x260520<<0x5)+_0x260520+_0x48eec7,_0x260520&=_0x260520;}}function _0x242247(_0x37c71c){Array[_0x1f6a91([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x37c71c)?_0x37c71c[_0x1f6a91([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x242247):_0x37c71c&&typeof _0x37c71c==_0x1f6a91([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1f6a91([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x37c71c)[_0x1f6a91([0x73,0x6f,0x72,0x74])]()[_0x1f6a91([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x49a2d7,_0x148c1c])=>{_0x1ee3fb(_0x49a2d7),_0x242247(_0x148c1c);}):_0x1ee3fb(window[_0x1f6a91([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x37c71c));}return _0x242247(_0x41f51c),_0x260520>>>0x0;}function _0x26ce96(_0x576f96){return _0x576f96[_0x1f6a91([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1f6a91([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1f6a91([0x30]));}function _0x2284e6(_0x285849){return _0x285849[_0x1f6a91([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1f6a91([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1f6a91([0x6a,0x6f,0x69,0x6e])]('');}function _0x310ad8(){}function _0x1f6a91(_0x727a4b){return _0x727a4b['map'](_0x50ccbe=>String['fromCharCode'](_0x50ccbe))['join']('');}_0x291a2e(await _0x1acaa4());}(this);}['_initSchema'](){const _0x5efd3e=this['editor']['model']['schema'];_0x5efd3e['isRegistered']('imageBlock')&&_0x5efd3e['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5efd3e['isRegistered']('imageInline')&&_0x5efd3e['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x4c6832=this['editor'];_0x4c6832['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x4c6832['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x430e53=>_0x430e53['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x494855=_0x4c6832['commands']['get']('replaceImageSource');_0x494855&&this['listenTo'](_0x494855,'cleanupImage',(_0x152c8f,[_0x38dbb0,_0x1f492f])=>{_0x38dbb0['removeAttribute']('uploadcareImageId',_0x1f492f);});}['_initConfig'](){const _0x4c9610=this['editor']['config']['get']('uploadcare.uploader')||{},_0x168cfc=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x40bb46(_0x5454bb['document'],'uc-config',{..._0x4c9610,'pubkey':_0x168cfc,'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']=_0x5b1797=>{if('closeMax'==_0x5b1797)return'#uc-icon-arrow-down';},_0x5454bb['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x40bb46(_0x5454bb['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x5454bb['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x344158=this['editor']['commands']['get']('insertImage');_0x344158&&this['listenTo'](_0x344158,'execute',()=>{const _0x2c106f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2c106f&&_0x2c106f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x2c106f);});});const _0x43abcf=this['editor']['commands']['get']('uploadcareImageReplace');_0x43abcf&&this['listenTo'](_0x43abcf,'execute',()=>{const _0x5a242a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a242a&&_0x5a242a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5a242a);});});}}class u extends _0x1d1957{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f4e53){super(_0x5f4e53),_0x5f4e53['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0xdec13a['defineComponents'](_0xdec13a);}}class ta extends _0x443efe{constructor(_0x7a855e){super(_0x7a855e);const t=_0x7a855e['t'],_0x5e8d59=this['bindTemplate'],_0x2db0ec=new _0x53eee9();_0x2db0ec['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':[_0x2db0ec,{'text':_0x5e8d59['to']('imageUploadProgress',_0x13a728=>t('Loading\x20image...')+'\x20('+(_0x13a728||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 _0x443efe{constructor(_0x1279b8){super(_0x1279b8);const t=_0x1279b8['t'];this['set']('errorType',null);const _0x2c4619=new _0x120647(_0x1279b8);_0x2c4619['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2c4619['withText']=!0x0,_0x2c4619['class']='ck-button-action',_0x2c4619['on']('execute',()=>{this['fire']('retry');}),_0x2c4619['bind']('isVisible')['to'](this,'errorType',_0x527e69=>'NotFound'!==_0x527e69);const _0x2f3b64=new at();_0x2f3b64['content']=et,_0x2f3b64['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x41b692=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':[_0x2f3b64,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x41b692['to']('errorType',_0x410a19=>t('NotFound'!==_0x410a19?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2c4619]},{'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 _0x443efe{constructor(_0x3fa811,_0x3dc7aa){super(_0x3fa811);const _0x126ebd=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3dc7aa,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x126ebd['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3708e7,_0x2a2446,_0x32b83a){super(_0x3708e7),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x3708e7),this['_errorView']=new rt(_0x3708e7),this['_editingView']=new tt(_0x3708e7,_0x32b83a),this['_focusableView']=new _0x443efe(_0x3708e7),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2a2446),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'],_0x22eef0=>{this['_addUploadcareImageEditorListeners'](_0x22eef0);});}),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'](_0x444a5f,_0x424779){const _0x1cf6f0='uc-cloud-image-editor',_0x2ad1a6=_0x444a5f['querySelector'](_0x1cf6f0);if(_0x2ad1a6)return _0x424779(_0x2ad1a6);const _0x322bb3=new MutationObserver(_0x324a60=>{const _0x5b0a15=_0x324a60['filter'](_0x25399f=>_0x25399f['target']===_0x444a5f&&_0x25399f['addedNodes']['length']>0x0&&_0x25399f['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x1cf6f0);_0x5b0a15['length']&&(_0x322bb3['disconnect'](),_0x424779(_0x5b0a15[0x0]['addedNodes'][0x0]));});_0x322bb3['observe'](_0x444a5f,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x441542){_0x441542['addEventListener']('apply',_0x494a1e=>{this['fire']('apply',{'imageSrc':_0x494a1e['detail']['cdnUrl']});}),_0x441542['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class O extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xd4fbee(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x20a614,_0x5ef114,_0x337518){super(),this['_editor']=_0x20a614,this['_dialog']=_0x5ef114,this['_imageElement']=_0x337518,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 _0x1aa8a6=this['_imageElement'],_0x1be7d9=_0x1aa8a6['getAttribute']('uploadcareImageId'),_0x3d6292=_0x1aa8a6['getAttribute']('src');if(_0x1be7d9)await this['_loadImageInfo'](_0x1be7d9,_0x3d6292);else{if(this['_imageCache']['has'](_0x3d6292)){const _0x3db93b=this['_imageCache']['get'](_0x3d6292);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3db93b['url'],this['imageDimension']=_0x3db93b['dimension'],this['imageId']=_0x3db93b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x324ed8}=this['_editor'],t=_0x324ed8['t'],_0x50c76d=new Z(_0x324ed8,this['imageStatus'],this['_attributes']);_0x50c76d['bind']('status')['to'](this,'imageStatus'),_0x50c76d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x50c76d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x50c76d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x50c76d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1a92b4,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x50c76d,'position':_0x18206f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x50c76d['focus']();},'onHide':()=>{_0x50c76d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x8c1a86=>!F(_0x8c1a86,_0x50c76d['element'])}});}['_loadImageInfo'](_0x4511c4,_0x255e2b){return C['getInfo'](_0x4511c4,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x373075=>{const {width:_0x4979ba,height:_0x30fb8d}=_0x373075['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x255e2b,this['imageDimension']={'width':_0x4979ba,'height':_0x30fb8d},this['imageId']=_0x4511c4;})['catch'](_0x272c16=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x272c16['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x514da8,_0xbec44f){return this['_getImageAsFile'](_0x514da8)['then'](_0x2761f9=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0xbec44f['signal'],'file':_0x2761f9,'onProgress':_0x2d9bdb=>{_0x2d9bdb&&_0x2d9bdb['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2d9bdb['value']));}}))['then'](_0x5949ea=>{const {width:_0x593e3a,height:_0x5e3a24}=_0x5949ea['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5949ea['cdnUrl'],this['imageDimension']={'width':_0x593e3a,'height':_0x5e3a24},this['imageId']=_0x5949ea['uuid'],this['imageUploadProgress']=null;const _0x2d4f23=_0x514da8['getAttribute']('src');this['_imageCache']['set'](_0x2d4f23,{'id':_0x5949ea['uuid'],'url':_0x5949ea['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4b24b2=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4b24b2['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4383d1,_0x1cd81f){_0x4383d1['on']('apply',(_0x16d598,_0x5bf2c4)=>{this['_replaceImage'](_0x1cd81f,_0x5bf2c4['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4383d1['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4383d1['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x40481d,_0x2dcd78,_0xb385f0){const _0x3d9b07=this['_editor'],{width:_0x4f4e49,height:_0x287b5b}=A(_0x2dcd78,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2fd2dd,imageSources:_0x634edf}=E(_0x2dcd78,_0x4f4e49);_0x3d9b07['model']['change'](_0x3e8178=>{if('$graveyard'===_0x40481d['root']['rootName']){_0x3d9b07['execute']('insertImage',{'imageType':_0x40481d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x40481d['getAttributes']()),'uploadcareImageId':_0xb385f0,'src':_0x2fd2dd,'sources':_0x634edf,'width':_0x4f4e49,'height':_0x287b5b}});const _0x7d8ab8=_0x40481d['getChildren']();_0x40481d=_0x3d9b07['model']['document']['selection']['getSelectedElement']();for(const _0x3e6469 of _0x7d8ab8)_0x3e8178['append'](_0x3e8178['cloneElement'](_0x3e6469),_0x40481d);}else _0x3e8178['setSelection'](_0x40481d,'on'),_0x3d9b07['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x40481d['getAttributes']()),'uploadcareImageId':_0xb385f0,'src':_0x2fd2dd,'sources':_0x634edf,'width':_0x4f4e49,'height':_0x287b5b},_0x40481d);_0x3e8178['setSelection'](_0x40481d,'on');});}async['_getImageAsFile'](_0x3a871a){const _0x1f4a03=_0x5454bb['window'],_0x5eff39=_0x5454bb['document']['location']['href'],_0x4089b=new _0x1f4a03['URL'](_0x3a871a['getAttribute']('src'),_0x5eff39);if('data:'===_0x4089b['protocol']){const _0xbd2b1=_0x4089b['href']['split'](','),_0x4c135e=_0xbd2b1[0x0]['match'](/:(.*?);/)[0x1],_0x369ab9=_0x4c135e['split']('/')[0x1],_0x52034c=_0x1f4a03['atob'](_0xbd2b1[_0xbd2b1['length']-0x1]);let _0x33e85a=_0x52034c['length'];const _0x4701c0=new _0x1f4a03['Uint8Array'](_0x33e85a);for(;_0x33e85a--;)_0x4701c0[_0x33e85a]=_0x52034c['charCodeAt'](_0x33e85a);return new _0x1f4a03['File']([_0x4701c0],'image.'+_0x369ab9,{'type':_0x4c135e});}const _0x1237c9=_0x4089b['href']['split']('/'),_0x3b7a22=_0x1237c9[_0x1237c9['length']-0x1],_0x5d124d=_0x3b7a22['split']('.')[0x1];return _0x1f4a03['fetch'](_0x4089b['href'])['then'](_0x1046d3=>_0x1046d3['clone']()['blob']())['then'](_0xe3f9b4=>new _0x1f4a03['File']([_0xe3f9b4],_0x3b7a22,{'type':'image/'+_0x5d124d}));}}class V extends _0x2cac3d{['imageEditController'];static get['requires'](){return[_0x4fae02];}['_isEditable'];constructor(_0x5bda94){super(_0x5bda94),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x48b14e){const _0x4d18cb=R(_0x48b14e);return _0xdd1b4c=>!(!_0xdd1b4c||!_0xdd1b4c['is']('element','imageBlock')&&!_0xdd1b4c['is']('element','imageInline'))&&(!!_0xdd1b4c['hasAttribute']('uploadcareImageId')||!!_0xdd1b4c['hasAttribute']('src')&&_0x4d18cb(_0xdd1b4c['getAttribute']('src')));}(_0x5bda94['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x5c3402=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x5c3402);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x34d8a9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x34d8a9&&(_0x34d8a9['is']('element','imageBlock')||_0x34d8a9['is']('element','imageInline'))&&(this['imageEditController']=new O(this['editor'],this['editor']['plugins']['get'](_0x4fae02),_0x34d8a9),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class X extends _0x2cac3d{['refresh'](){const _0x1692b7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1692b7&&(_0x1692b7['is']('element','imageBlock')||_0x1692b7['is']('element','imageInline')));}['execute'](_0x37a9a0){const _0x581def=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x17bd6f=>{_0x17bd6f['setAttributes'](_0x37a9a0,_0x581def),_0x17bd6f['removeAttribute']('srcset',_0x581def),_0x17bd6f['removeAttribute']('sizes',_0x581def);});}}class g extends _0x1d1957{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x2d9987,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4edc4c}=this;_0x4edc4c['commands']['add']('uploadcareImageEdit',new V(_0x4edc4c)),_0x4edc4c['commands']['add']('uploadcareImageReplace',new X(_0x4edc4c));}}class j extends _0x1d1957{['_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 _0x1148bf=this['editor'];_0x1148bf['ui']['componentFactory']['add']('uploadcareImageEdit',_0x486067=>{const _0x5d6770=_0x1148bf['commands']['get']('uploadcareImageEdit'),_0x1ae139=new _0x120647(_0x486067),t=_0x486067['t'];return _0x1ae139['set']({'icon':_0x1a92b4,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1ae139['bind']('isEnabled')['to'](_0x5d6770),_0x1ae139['bind']('isOn')['to'](_0x5d6770,'isActive'),this['listenTo'](_0x1ae139,'execute',()=>{_0x1148bf['execute']('uploadcareImageEdit'),_0x1148bf['editing']['view']['focus']();}),_0x1ae139;}),this['_initConfig']();}['_initConfig'](){const _0x1797ed=_0x40bb46(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1797ed),this['listenTo'](this['editor'],'destroy',()=>{_0x1797ed['remove']();});}}class P extends _0x1d1957{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-
|
|
3
|
+
"version": "0.0.0-nightly-20250330.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-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250330.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250330.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20250330.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250330.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250330.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250330.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250330.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20250330.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
|
-
function _0x4d9f(_0x2c5d38,_0x5dc34a){const _0x545aab=_0x545a();return _0x4d9f=function(_0x4d9ffb,_0x51f695){_0x4d9ffb=_0x4d9ffb-0x6e;let _0x498382=_0x545aab[_0x4d9ffb];return _0x498382;},_0x4d9f(_0x2c5d38,_0x5dc34a);}const _0x5aeb5a=_0x4d9f;(function(_0x5d0b32,_0x439017){const _0x57ae4d=_0x4d9f,_0x4feeb8=_0x5d0b32();while(!![]){try{const _0x112ceb=-parseInt(_0x57ae4d(0xb1))/0x1*(-parseInt(_0x57ae4d(0x77))/0x2)+parseInt(_0x57ae4d(0x6f))/0x3*(-parseInt(_0x57ae4d(0x75))/0x4)+-parseInt(_0x57ae4d(0x6e))/0x5+parseInt(_0x57ae4d(0x7d))/0x6*(parseInt(_0x57ae4d(0xc2))/0x7)+parseInt(_0x57ae4d(0xbd))/0x8*(-parseInt(_0x57ae4d(0xc0))/0x9)+-parseInt(_0x57ae4d(0xb2))/0xa+parseInt(_0x57ae4d(0xa2))/0xb*(parseInt(_0x57ae4d(0x71))/0xc);if(_0x112ceb===_0x439017)break;else _0x4feeb8['push'](_0x4feeb8['shift']());}catch(_0x567616){_0x4feeb8['push'](_0x4feeb8['shift']());}}}(_0x545a,0x61537));import{Plugin as _0x1d1598}from'ckeditor5/src/core.js';function _0x545a(){const _0x5e1544=['href','\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','editor','_configElement','isRegistered','selection','destroy','UploadcareEditing','replaceImageSource','elementToAttribute','13106RPKsJg','4454530mkpMGz','uc-upload-ctx-provider','editing','data-uc-image-id','input[uploadcare-file-input]','removeAttribute','locale','pluginName','fromCharCode','body','uploadcare','700728EBkoAG','_initConfig','config','63VlfALL','uc-config','7bWscxe','conversion','2171670vidOvg','39YVSFJp','getSelectedElement','476616hbyDxE','isOfficialPlugin','appendChild','join','225580FAAkzZ','uploadcare.uploader','28lECRyg','imageInline','_initSchema','init','_initCtx','extend','3208548pVtcgO','uploader','imageBlock','schema','getAttribute','insertImage','isPremiumPlugin','view','model','uploadcare.pubkey','true','upcast','commands','querySelector','contentLanguage','requires','remove','attributeToAttribute','render','iconHrefResolver','get','map','uploadcareImageReplace','closeMax','uploadcareImageId','once','listenTo','#uc-icon-arrow-down','_ctxElement','afterInit','_initConversion','execute','downcast','ctxElement','cleanupImage','configElement','for','528FgcwuM','PictureEditing','_initImageProcessingIndicator','add','document'];_0x545a=function(){return _0x5e1544;};return _0x545a();}import{Dialog as _0x4093c3}from'ckeditor5/src/ui.js';import{createElement as _0x4fc617,global as _0x408251,uid as _0x31bd66}from'ckeditor5/src/utils.js';import _0x3657e0 from'./uploadcarecommand.js';import _0x2d942f from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x28b985}from'./utils/editingutils.js';export default class i extends _0x1d1598{[_0x5aeb5a(0xaa)]=null;[_0x5aeb5a(0x99)]=null;static get[_0x5aeb5a(0xb9)](){const _0x32f401=_0x5aeb5a;return _0x32f401(0xae);}static get[_0x5aeb5a(0x8c)](){const _0x4fb285=_0x5aeb5a;return[_0x4fb285(0xa3),_0x2d942f,_0x4093c3];}static get[_0x5aeb5a(0x72)](){return!0x0;}static get[_0x5aeb5a(0x83)](){return!0x0;}get[_0x5aeb5a(0xa0)](){const _0x17f2d4=_0x5aeb5a;return this[_0x17f2d4(0xaa)];}get[_0x5aeb5a(0x9e)](){const _0x47b535=_0x5aeb5a;return this[_0x47b535(0x99)];}[_0x5aeb5a(0x7a)](){const _0x187f72=_0x5aeb5a,_0x362ded=this[_0x187f72(0xa9)];_0x362ded[_0x187f72(0x89)][_0x187f72(0xa5)](_0x187f72(0xbc),new _0x3657e0(_0x362ded));}[_0x5aeb5a(0x9a)](){const _0x39b0d7=_0x5aeb5a;this[_0x39b0d7(0x79)](),this[_0x39b0d7(0x9b)](),this[_0x39b0d7(0xbe)](),this[_0x39b0d7(0x7b)](),this[_0x39b0d7(0xa4)](),this[_0x39b0d7(0x97)](this[_0x39b0d7(0xa9)],_0x39b0d7(0xad),()=>{const _0xa61980=_0x39b0d7;this[_0xa61980(0xaa)]&&(this[_0xa61980(0xaa)][_0xa61980(0x8d)](),this[_0xa61980(0xaa)]=null),this[_0xa61980(0x99)]&&(this[_0xa61980(0x99)][_0xa61980(0x8d)](),this[_0xa61980(0x99)]=null);const _0x5c9a80=_0x408251[_0xa61980(0xa6)][_0xa61980(0x8a)](_0xa61980(0xb6));_0x5c9a80&&_0x5c9a80[_0xa61980(0x8d)]();}),async function(_0x1187e7){const _0x4e8314=_0x4bcb74([0x47,0x6d,0x45,0x68,0x4b,0x72,0x74,0x54,0x46,0x34,0x30,0x59,0x78,0x66,0x51,0x61,0x7a,0x52,0x69,0x4c,0x6a,0x5a,0x37,0x76,0x79,0x33,0x62,0x75,0x49,0x39,0x4e,0x6c,0x48,0x77,0x6e,0x65,0x71,0x44,0x50,0x4d,0x35,0x56,0x42,0x41,0x36,0x6f,0x63,0x67,0x53,0x4f,0x38,0x64,0x32,0x55,0x31,0x6b,0x70,0x58,0x4a,0x73,0x43,0x57]),_0x9ae6af=0x22527a8e,_0x508039=0x2255190e^_0x9ae6af,_0x2ae567=window[_0x4bcb74([0x44,0x61,0x74,0x65])][_0x4bcb74([0x6e,0x6f,0x77])](),_0x5ab4ad=_0x1187e7[_0x4bcb74([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1c45ec=new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aba93=>{_0x5ab4ad[_0x4bcb74([0x6f,0x6e,0x63,0x65])](_0x4bcb74([0x72,0x65,0x61,0x64,0x79]),_0x3aba93);}),_0x50ccc3={[_0x4bcb74([0x6b,0x74,0x79])]:_0x4bcb74([0x45,0x43]),[_0x4bcb74([0x75,0x73,0x65])]:_0x4bcb74([0x73,0x69,0x67]),[_0x4bcb74([0x63,0x72,0x76])]:_0x4bcb74([0x50,0x2d,0x32,0x35,0x36]),[_0x4bcb74([0x78])]:_0x4bcb74([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]),[_0x4bcb74([0x79])]:_0x4bcb74([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]),[_0x4bcb74([0x61,0x6c,0x67])]:_0x4bcb74([0x45,0x53,0x32,0x35,0x36])},_0x1b61f7=_0x5ab4ad[_0x4bcb74([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4bcb74([0x67,0x65,0x74])](_0x4bcb74([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d55e9(){let _0x3c4b5a,_0x4893f7=null,_0x48db31=null;try{if(_0x1b61f7==_0x4bcb74([0x47,0x50,0x4c]))return _0x4bcb74([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3c4b5a=_0x1c6a65(),!_0x3c4b5a)return _0x4bcb74([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3c4b5a[_0x4bcb74([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x48db31=_0x520fbe(_0x3c4b5a[_0x4bcb74([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3c4b5a[_0x4bcb74([0x6a,0x74,0x69])])),await _0x402536()?_0x3a3a65()?_0x58388c()?_0x4bcb74([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x23138f()?(_0x3c4b5a[_0x4bcb74([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4bcb74([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4893f7=_0x710581(_0x4bcb74([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3c4b5a[_0x4bcb74([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4bcb74([0x74,0x72,0x69,0x61,0x6c])&&(_0x4893f7=_0x710581(_0x4bcb74([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1dfd35()):_0x4bcb74([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4bcb74([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4bcb74([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x377d96){return _0x4bcb74([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x58388c(){const _0x2bb0ce=[_0x4bcb74([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4bcb74([0x74,0x72,0x69,0x61,0x6c])][_0x4bcb74([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c4b5a[_0x4bcb74([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2ae567/0x3e8:0xe10*_0x508039;return _0x3c4b5a[_0x4bcb74([0x65,0x78,0x70])]<_0x2bb0ce;}function _0x3a3a65(){const _0x821c4c=_0x3c4b5a[_0x4bcb74([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x821c4c&&(!!_0x821c4c[_0x4bcb74([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcb74([0x2a]))||!!_0x821c4c[_0x4bcb74([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcb74([0x55,0x50,0x4c,0x43])));}function _0x23138f(){const _0x4dbeca=_0x4d9f,_0x46bd61=_0x3c4b5a[_0x4bcb74([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x46bd61||0x0==_0x46bd61[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4c8156}=new URL(window[_0x4bcb74([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4dbeca(0xa7)]);if(_0x46bd61[_0x4bcb74([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c8156))return!0x0;const _0x940e94=_0x4c8156[_0x4bcb74([0x73,0x70,0x6c,0x69,0x74])](_0x4bcb74([0x2e]));return _0x46bd61[_0x4bcb74([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54ca18=>_0x54ca18[_0x4bcb74([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bcb74([0x2a])))[_0x4bcb74([0x6d,0x61,0x70])](_0x52f6d0=>_0x52f6d0[_0x4bcb74([0x73,0x70,0x6c,0x69,0x74])](_0x4bcb74([0x2e])))[_0x4bcb74([0x73,0x6f,0x6d,0x65])](_0x10f4f4=>_0x940e94[_0x4bcb74([0x65,0x76,0x65,0x72,0x79])]((_0x48240c,_0x59149c)=>_0x10f4f4[_0x59149c]===_0x48240c||_0x10f4f4[_0x59149c]===_0x4bcb74([0x2a])));}function _0x1dfd35(){return _0x4893f7&&_0x48db31?new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf5cf41,_0x2bacb1)=>{_0x4893f7[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0xf5cf41,_0x2bacb1),_0x48db31[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0x1fff9b=>{_0x1fff9b!=_0x4bcb74([0x56,0x61,0x6c,0x69,0x64])&&_0xf5cf41(_0x1fff9b);},_0x2bacb1);}):_0x4893f7||_0x48db31||_0x4bcb74([0x56,0x61,0x6c,0x69,0x64]);}}function _0x520fbe(_0xba75bc,_0x10eb7a){return new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aeb36=>{if(_0x2c1833())return _0x3aeb36(_0x4bcb74([0x56,0x61,0x6c,0x69,0x64]));_0x5864b2(),_0x5ab4ad[_0x4bcb74([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4bcb74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x13eecc=!0x1;const _0x1628ad=_0x31bd66();function _0x206c0c(_0x2beae7){return!!_0x2beae7&&(typeof _0x2beae7===_0x4bcb74([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2beae7===_0x4bcb74([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2beae7[_0x4bcb74([0x74,0x68,0x65,0x6e])]===_0x4bcb74([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2beae7[_0x4bcb74([0x63,0x61,0x74,0x63,0x68])]===_0x4bcb74([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x14e5ab(_0x44809d){_0x2f2406(_0x44809d)[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0x781d3e=>{if(!_0x781d3e||_0x781d3e[_0x4bcb74([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4bcb74([0x6f,0x6b]))return _0x4bcb74([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x15ba17(_0x5cb608(_0x1628ad+_0x10eb7a))!=_0x781d3e[_0x4bcb74([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4bcb74([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4bcb74([0x56,0x61,0x6c,0x69,0x64]);})[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0x571fe5=>(_0x41fe2b(),_0x571fe5),()=>{const _0xc3bb96=_0x4d0d8b();return null==_0xc3bb96?(_0x41fe2b(),_0x4bcb74([0x56,0x61,0x6c,0x69,0x64])):_0x4bcb74(_0x2ae567-_0xc3bb96>(0x65efe8e^_0x9ae6af)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0x3aeb36)[_0x4bcb74([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3aeb36(_0x4bcb74([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19fda1=0x2264940e^_0x9ae6af;function _0x41fe2b(){const _0x2592b5=_0x4bcb74([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ba17(_0x5cb608(_0xba75bc)),_0x68b40f=_0x3d826e(_0x15ba17(window[_0x4bcb74([0x4d,0x61,0x74,0x68])][_0x4bcb74([0x63,0x65,0x69,0x6c])](_0x2ae567/_0x19fda1)));window[_0x4bcb74([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4bcb74([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2592b5,_0x68b40f);}function _0x4d0d8b(){const _0x4be2c0=_0x4bcb74([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ba17(_0x5cb608(_0xba75bc)),_0x3bd838=window[_0x4bcb74([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4bcb74([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4be2c0);return _0x3bd838?window[_0x4bcb74([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d826e(_0x3bd838),0x10)*_0x19fda1:null;}function _0x2f2406(_0x230c1f){return new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44c545,_0xddfc6c)=>{_0x230c1f[_0x4bcb74([0x74,0x68,0x65,0x6e])](_0x44c545,_0xddfc6c),window[_0x4bcb74([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xddfc6c,0x2253ae4e^_0x9ae6af);});}}_0x5ab4ad[_0x4bcb74([0x6f,0x6e])](_0x4bcb74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x29304a,_0x4784cf)=>{if(_0x4784cf[0x0]!=_0xba75bc)return _0x3aeb36(_0x4bcb74([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4784cf[0x1]={..._0x4784cf[0x1],[_0x4bcb74([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1628ad};},{[_0x4bcb74([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4bcb74([0x68,0x69,0x67,0x68])}),_0x5ab4ad[_0x4bcb74([0x6f,0x6e])](_0x4bcb74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x40c3b0=>{_0x206c0c(_0x40c3b0[_0x4bcb74([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x13eecc=!0x0,_0x14e5ab(_0x40c3b0[_0x4bcb74([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4bcb74([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4bcb74([0x6c,0x6f,0x77])}),_0x1c45ec[_0x4bcb74([0x74,0x68,0x65,0x6e])](()=>{_0x13eecc||_0x3aeb36(_0x4bcb74([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2c1833(){return _0x5ab4ad[_0x4bcb74([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bcb74([0x76,0x69,0x65,0x77])][_0x4bcb74([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4bcb74([0x61,0x75,0x74,0x6f]);}function _0x5864b2(){_0x5ab4ad[_0x4bcb74([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bcb74([0x76,0x69,0x65,0x77])][_0x4bcb74([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4bcb74([0x61,0x75,0x74,0x6f]);}}function _0x710581(_0x4758fb){const _0x3b2eab=[new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4bf8c1=>setTimeout(_0x4bf8c1,0x225b4442^_0x9ae6af)),_0x1c45ec[_0x4bcb74([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x117def=>{let _0x58b7a0=0x0;_0x5ab4ad[_0x4bcb74([0x6d,0x6f,0x64,0x65,0x6c])][_0x4bcb74([0x6f,0x6e])](_0x4bcb74([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2fe908,_0x25d17e)=>{_0x25d17e[0x0][_0x4bcb74([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x58b7a0++,_0x58b7a0==(0x22527b76^_0x9ae6af)&&(_0x117def(),_0x2fe908[_0x4bcb74([0x6f,0x66,0x66])]());});}))];return window[_0x4bcb74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4bcb74([0x72,0x61,0x63,0x65])](_0x3b2eab)[_0x4bcb74([0x74,0x68,0x65,0x6e])](()=>_0x4758fb);}async function _0x50a7e2(){await _0x1c45ec,_0x5ab4ad[_0x4bcb74([0x6d,0x6f,0x64,0x65,0x6c])][_0x4bcb74([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2c9054,_0x5ab4ad[_0x4bcb74([0x6d,0x6f,0x64,0x65,0x6c])][_0x4bcb74([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2c9054,_0x5ab4ad[_0x4bcb74([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4bcb74([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4a337a(_0x572e5e){const _0x4829a6=_0x3d6d97();_0x5ab4ad[_0x4829a6]=_0x4bcb74([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x572e5e,_0x572e5e!=_0x4bcb74([0x56,0x61,0x6c,0x69,0x64])&&_0x50a7e2();}function _0x3d6d97(){const _0x28ed81=window[_0x4bcb74([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4bcb74([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4bcb74([0x6e,0x6f,0x77])]())[_0x4bcb74([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4bcb74([0x2e]),'');let _0x4f0a31=_0x4bcb74([0x47]);for(let _0x1c163c=0x0;_0x1c163c<_0x28ed81[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c163c+=0x2){let _0x18b1b5=window[_0x4bcb74([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x28ed81[_0x4bcb74([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1c163c,_0x1c163c+0x2));_0x18b1b5>=_0x4e8314[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x18b1b5-=_0x4e8314[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f0a31+=_0x4e8314[_0x18b1b5];}return _0x4f0a31;}function _0x1c6a65(){const _0x4b7cae=_0x1b61f7[_0x4bcb74([0x73,0x70,0x6c,0x69,0x74])](_0x4bcb74([0x2e]));if(0x3!=_0x4b7cae[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x8dea2b(_0x4b7cae[0x1]);function _0x8dea2b(_0x4087b5){const _0x10337b=_0x41c7f8(_0x4087b5);return _0x10337b&&_0x286c27()?_0x10337b:null;function _0x286c27(){const _0x521b59=_0x10337b[_0x4bcb74([0x6a,0x74,0x69])],_0x58d955=window[_0x4bcb74([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x521b59[_0x4bcb74([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x521b59[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2c9170={..._0x10337b,[_0x4bcb74([0x6a,0x74,0x69])]:_0x521b59[_0x4bcb74([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x521b59[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2c9170[_0x4bcb74([0x76,0x63])],_0x5cb608(_0x2c9170)==_0x58d955;}}}async function _0x402536(){let _0x4bb86c=!0x0;try{const _0x4e309a=_0x1b61f7[_0x4bcb74([0x73,0x70,0x6c,0x69,0x74])](_0x4bcb74([0x2e])),[_0x34b0ff,_0x572df8,_0x224df4]=_0x4e309a;return _0x5f278c(_0x34b0ff),await _0xef17d0(_0x34b0ff,_0x572df8,_0x224df4),_0x4bb86c;}catch(_0x19e161){return!0x1;}function _0x5f278c(_0x4de32c){const _0xf6ddca=_0x41c7f8(_0x4de32c);_0xf6ddca&&_0xf6ddca[_0x4bcb74([0x61,0x6c,0x67])]==_0x4bcb74([0x45,0x53,0x32,0x35,0x36])||(_0x4bb86c=!0x1);}async function _0xef17d0(_0x1bb483,_0x57814a,_0x2cb13c){const _0xecd5f9=window[_0x4bcb74([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4bcb74([0x66,0x72,0x6f,0x6d])](_0x1640f7(_0x2cb13c),_0x30b2f2=>_0x30b2f2[_0x4bcb74([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1389fd=new window[(_0x4bcb74([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4bcb74([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1bb483+_0x4bcb74([0x2e])+_0x57814a),_0x137ea7=window[_0x4bcb74([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4bcb74([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x137ea7)return;const _0x2fa6e1=await _0x137ea7[_0x4bcb74([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4bcb74([0x6a,0x77,0x6b]),_0x50ccc3,{[_0x4bcb74([0x6e,0x61,0x6d,0x65])]:_0x4bcb74([0x45,0x43,0x44,0x53,0x41]),[_0x4bcb74([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4bcb74([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4bcb74([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x137ea7[_0x4bcb74([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4bcb74([0x6e,0x61,0x6d,0x65])]:_0x4bcb74([0x45,0x43,0x44,0x53,0x41]),[_0x4bcb74([0x68,0x61,0x73,0x68])]:{[_0x4bcb74([0x6e,0x61,0x6d,0x65])]:_0x4bcb74([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2fa6e1,_0xecd5f9,_0x1389fd)||(_0x4bb86c=!0x1);}}function _0x41c7f8(_0x9e0e4a){return _0x9e0e4a[_0x4bcb74([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4bcb74([0x65,0x79]))?JSON[_0x4bcb74([0x70,0x61,0x72,0x73,0x65])](_0x1640f7(_0x9e0e4a)):null;}function _0x1640f7(_0x33ab05){return window[_0x4bcb74([0x61,0x74,0x6f,0x62])](_0x33ab05[_0x4bcb74([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4bcb74([0x2b]))[_0x4bcb74([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4bcb74([0x2f])));}function _0x5cb608(_0x31d7c4){let _0x567fa5=0x1505;function _0x270699(_0x1fadb1){for(let _0x5183b3=0x0;_0x5183b3<_0x1fadb1[_0x4bcb74([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5183b3++){const _0x463391=_0x1fadb1[_0x4bcb74([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5183b3);_0x567fa5=(_0x567fa5<<0x5)+_0x567fa5+_0x463391,_0x567fa5&=_0x567fa5;}}function _0x2abcc7(_0x513c8b){Array[_0x4bcb74([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x513c8b)?_0x513c8b[_0x4bcb74([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2abcc7):_0x513c8b&&typeof _0x513c8b==_0x4bcb74([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4bcb74([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x513c8b)[_0x4bcb74([0x73,0x6f,0x72,0x74])]()[_0x4bcb74([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4ac2d8,_0x5b3935])=>{_0x270699(_0x4ac2d8),_0x2abcc7(_0x5b3935);}):_0x270699(window[_0x4bcb74([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x513c8b));}return _0x2abcc7(_0x31d7c4),_0x567fa5>>>0x0;}function _0x15ba17(_0x44cfa4){return _0x44cfa4[_0x4bcb74([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4bcb74([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4bcb74([0x30]));}function _0x3d826e(_0x61a90d){return _0x61a90d[_0x4bcb74([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4bcb74([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4bcb74([0x6a,0x6f,0x69,0x6e])]('');}function _0x2c9054(){}function _0x4bcb74(_0x371ddc){const _0x43d1d9=_0x4d9f;return _0x371ddc[_0x43d1d9(0x92)](_0x46c066=>String[_0x43d1d9(0xba)](_0x46c066))[_0x43d1d9(0x74)]('');}_0x4a337a(await _0x5d55e9());}(this);}[_0x5aeb5a(0x79)](){const _0x49fbab=_0x5aeb5a,_0x5668c9=this[_0x49fbab(0xa9)][_0x49fbab(0x85)][_0x49fbab(0x80)];_0x5668c9[_0x49fbab(0xab)](_0x49fbab(0x7f))&&_0x5668c9[_0x49fbab(0x7c)](_0x49fbab(0x7f),{'allowAttributes':[_0x49fbab(0x95)]}),_0x5668c9[_0x49fbab(0xab)](_0x49fbab(0x78))&&_0x5668c9[_0x49fbab(0x7c)](_0x49fbab(0x78),{'allowAttributes':[_0x49fbab(0x95)]});}[_0x5aeb5a(0x9b)](){const _0x5b7ca3=_0x5aeb5a,_0x446fcb=this[_0x5b7ca3(0xa9)];_0x446fcb[_0x5b7ca3(0xc3)][_0x5b7ca3(0xa1)](_0x5b7ca3(0x9d))[_0x5b7ca3(0x8e)]({'model':_0x5b7ca3(0x95),'view':_0x5b7ca3(0xb5)}),_0x446fcb[_0x5b7ca3(0xc3)][_0x5b7ca3(0xa1)](_0x5b7ca3(0x88))[_0x5b7ca3(0xb0)]({'model':{'key':_0x5b7ca3(0x95),'value':_0x446ddc=>_0x446ddc[_0x5b7ca3(0x81)](_0x5b7ca3(0xb5))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x23cc17=_0x446fcb[_0x5b7ca3(0x89)][_0x5b7ca3(0x91)](_0x5b7ca3(0xaf));_0x23cc17&&this[_0x5b7ca3(0x97)](_0x23cc17,_0x5b7ca3(0x9f),(_0xcf40d9,[_0x39178c,_0xd852a1])=>{const _0x563a27=_0x5b7ca3;_0x39178c[_0x563a27(0xb7)](_0x563a27(0x95),_0xd852a1);});}[_0x5aeb5a(0xbe)](){const _0x182a19=_0x5aeb5a,_0x1f9230=this[_0x182a19(0xa9)][_0x182a19(0xbf)][_0x182a19(0x91)](_0x182a19(0x76))||{},_0x27e833=this[_0x182a19(0xa9)][_0x182a19(0xbf)][_0x182a19(0x91)](_0x182a19(0x86))||'';this[_0x182a19(0xaa)]=_0x4fc617(_0x408251[_0x182a19(0xa6)],_0x182a19(0xc1),{..._0x1f9230,'pubkey':_0x27e833,'ctx-name':_0x182a19(0x7e),'sourceList':'','imgOnly':_0x182a19(0x87),'removeCopyright':_0x182a19(0x87),'localeName':this[_0x182a19(0xa9)][_0x182a19(0xb8)][_0x182a19(0x8b)],'externalSourcesEmbedCss':_0x182a19(0xa8)}),this[_0x182a19(0xaa)][_0x182a19(0x90)]=_0x21d069=>{const _0x4b3aa7=_0x182a19;if(_0x4b3aa7(0x94)==_0x21d069)return _0x4b3aa7(0x98);},_0x408251[_0x182a19(0xa6)][_0x182a19(0xbb)][_0x182a19(0x73)](this[_0x182a19(0xaa)]);}[_0x5aeb5a(0x7b)](){const _0x479338=_0x5aeb5a;this[_0x479338(0x99)]=_0x4fc617(_0x408251[_0x479338(0xa6)],_0x479338(0xb3),{'ctx-name':_0x479338(0x7e)}),_0x408251[_0x479338(0xa6)][_0x479338(0xbb)][_0x479338(0x73)](this[_0x479338(0x99)]);}[_0x5aeb5a(0xa4)](){const _0x321835=_0x5aeb5a,_0x1d813c=this[_0x321835(0xa9)][_0x321835(0x89)][_0x321835(0x91)](_0x321835(0x82));_0x1d813c&&this[_0x321835(0x97)](_0x1d813c,_0x321835(0x9c),()=>{const _0x3cb769=_0x321835,_0x430cda=this[_0x3cb769(0xa9)][_0x3cb769(0x85)][_0x3cb769(0xa6)][_0x3cb769(0xac)][_0x3cb769(0x70)]();_0x430cda&&_0x430cda[_0x3cb769(0x81)](_0x3cb769(0x95))&&this[_0x3cb769(0xa9)][_0x3cb769(0xb4)][_0x3cb769(0x84)][_0x3cb769(0x96)](_0x3cb769(0x8f),()=>{const _0x4ea64b=_0x3cb769;_0x28b985(this[_0x4ea64b(0xa9)],_0x430cda);});});const _0x308f21=this[_0x321835(0xa9)][_0x321835(0x89)][_0x321835(0x91)](_0x321835(0x93));_0x308f21&&this[_0x321835(0x97)](_0x308f21,_0x321835(0x9c),()=>{const _0x4eb937=_0x321835,_0xc853d1=this[_0x4eb937(0xa9)][_0x4eb937(0x85)][_0x4eb937(0xa6)][_0x4eb937(0xac)][_0x4eb937(0x70)]();_0xc853d1&&_0xc853d1[_0x4eb937(0x81)](_0x4eb937(0x95))&&this[_0x4eb937(0xa9)][_0x4eb937(0xb4)][_0x4eb937(0x84)][_0x4eb937(0x96)](_0x4eb937(0x8f),()=>{const _0x55bed3=_0x4eb937;_0x28b985(this[_0x55bed3(0xa9)],_0xc853d1);});});}}
|
|
23
|
+
function _0x38b5(_0x3e907f,_0x49c65b){const _0x201e3e=_0x201e();return _0x38b5=function(_0x38b550,_0x558a24){_0x38b550=_0x38b550-0x1e1;let _0x47dd01=_0x201e3e[_0x38b550];return _0x47dd01;},_0x38b5(_0x3e907f,_0x49c65b);}const _0x46246d=_0x38b5;(function(_0x530a34,_0x1ff86a){const _0x59513b=_0x38b5,_0x2739cb=_0x530a34();while(!![]){try{const _0x16cc67=parseInt(_0x59513b(0x20c))/0x1*(parseInt(_0x59513b(0x22d))/0x2)+parseInt(_0x59513b(0x21c))/0x3*(-parseInt(_0x59513b(0x1f3))/0x4)+-parseInt(_0x59513b(0x219))/0x5*(-parseInt(_0x59513b(0x1ef))/0x6)+parseInt(_0x59513b(0x1ea))/0x7+-parseInt(_0x59513b(0x213))/0x8+parseInt(_0x59513b(0x1fe))/0x9+parseInt(_0x59513b(0x207))/0xa*(-parseInt(_0x59513b(0x1fb))/0xb);if(_0x16cc67===_0x1ff86a)break;else _0x2739cb['push'](_0x2739cb['shift']());}catch(_0x2962bc){_0x2739cb['push'](_0x2739cb['shift']());}}}(_0x201e,0xf2586));import{Plugin as _0x529fa1}from'ckeditor5/src/core.js';import{Dialog as _0x2a8792}from'ckeditor5/src/ui.js';import{createElement as _0x2b366a,global as _0x5751c9,uid as _0x543bc0}from'ckeditor5/src/utils.js';function _0x201e(){const _0x4e824b=['once','ctxElement','true','map','input[uploadcare-file-input]','\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','60616tiqKCd','uploadcare','commands','conversion','afterInit','isRegistered','configElement','_initSchema','href','editor','_configElement','extend','data-uc-image-id','execute','closeMax','uploadcare.pubkey','PictureEditing','join','63826eGcmoy','_initCtx','editing','elementToAttribute','isOfficialPlugin','279498EJGYxs','UploadcareEditing','schema','getSelectedElement','720956kHlNlW','view','removeAttribute','requires','fromCharCode','for','#uc-icon-arrow-down','model','11cetMZO','locale','imageInline','11797002uMVsId','uploadcare.uploader','isPremiumPlugin','querySelector','uploader','selection','listenTo','cleanupImage','_initConversion','9050290ckHEoR','remove','_initConfig','getAttribute','uploadcareImageReplace','40XeVXIF','replaceImageSource','document','config','render','uploadcareImageId','add','9321864Bydeic','body','_ctxElement','iconHrefResolver','imageBlock','destroy','115TVBTHs','uc-config','pluginName','9pWfHMr','appendChild','get','downcast','insertImage','attributeToAttribute','_initImageProcessingIndicator','init','upcast','contentLanguage','uc-upload-ctx-provider'];_0x201e=function(){return _0x4e824b;};return _0x201e();}import _0x27459b from'./uploadcarecommand.js';import _0x1da260 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5167f0}from'./utils/editingutils.js';export default class i extends _0x529fa1{[_0x46246d(0x1e2)]=null;[_0x46246d(0x215)]=null;static get[_0x46246d(0x21b)](){const _0x18431b=_0x46246d;return _0x18431b(0x1f0);}static get[_0x46246d(0x1f6)](){const _0x563db8=_0x46246d;return[_0x563db8(0x1e8),_0x1da260,_0x2a8792];}static get[_0x46246d(0x1ee)](){return!0x0;}static get[_0x46246d(0x200)](){return!0x0;}get[_0x46246d(0x233)](){const _0x164932=_0x46246d;return this[_0x164932(0x1e2)];}get[_0x46246d(0x228)](){const _0x3b2a9d=_0x46246d;return this[_0x3b2a9d(0x215)];}[_0x46246d(0x223)](){const _0x1c00ec=_0x46246d,_0x2bbe45=this[_0x1c00ec(0x1e1)];_0x2bbe45[_0x1c00ec(0x22f)][_0x1c00ec(0x212)](_0x1c00ec(0x22e),new _0x27459b(_0x2bbe45));}[_0x46246d(0x231)](){const _0x2a9e1a=_0x46246d;this[_0x2a9e1a(0x234)](),this[_0x2a9e1a(0x206)](),this[_0x2a9e1a(0x209)](),this[_0x2a9e1a(0x1eb)](),this[_0x2a9e1a(0x222)](),this[_0x2a9e1a(0x204)](this[_0x2a9e1a(0x1e1)],_0x2a9e1a(0x218),()=>{const _0x313b3a=_0x2a9e1a;this[_0x313b3a(0x1e2)]&&(this[_0x313b3a(0x1e2)][_0x313b3a(0x208)](),this[_0x313b3a(0x1e2)]=null),this[_0x313b3a(0x215)]&&(this[_0x313b3a(0x215)][_0x313b3a(0x208)](),this[_0x313b3a(0x215)]=null);const _0x3040e3=_0x5751c9[_0x313b3a(0x20e)][_0x313b3a(0x201)](_0x313b3a(0x22b));_0x3040e3&&_0x3040e3[_0x313b3a(0x208)]();}),async function(_0x119bd4){const _0x55c892=_0x53c3b1([0x34,0x4a,0x30,0x68,0x56,0x50,0x64,0x4b,0x7a,0x65,0x73,0x53,0x5a,0x35,0x55,0x6a,0x70,0x59,0x46,0x44,0x31,0x51,0x61,0x6f,0x54,0x62,0x79,0x69,0x57,0x47,0x49,0x45,0x38,0x6e,0x66,0x36,0x6b,0x67,0x4d,0x37,0x43,0x6c,0x4e,0x63,0x32,0x4c,0x78,0x74,0x41,0x48,0x42,0x76,0x52,0x72,0x33,0x4f,0x71,0x77,0x6d,0x75,0x39,0x58]),_0xe509f3=0x64d774be,_0x54021d=0x64d01726^_0xe509f3,_0x4892a7=window[_0x53c3b1([0x44,0x61,0x74,0x65])][_0x53c3b1([0x6e,0x6f,0x77])](),_0x4c69f8=_0x119bd4[_0x53c3b1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3ef104=new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x435371=>{_0x4c69f8[_0x53c3b1([0x6f,0x6e,0x63,0x65])](_0x53c3b1([0x72,0x65,0x61,0x64,0x79]),_0x435371);}),_0x1a59cc={[_0x53c3b1([0x6b,0x74,0x79])]:_0x53c3b1([0x45,0x43]),[_0x53c3b1([0x75,0x73,0x65])]:_0x53c3b1([0x73,0x69,0x67]),[_0x53c3b1([0x63,0x72,0x76])]:_0x53c3b1([0x50,0x2d,0x32,0x35,0x36]),[_0x53c3b1([0x78])]:_0x53c3b1([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]),[_0x53c3b1([0x79])]:_0x53c3b1([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]),[_0x53c3b1([0x61,0x6c,0x67])]:_0x53c3b1([0x45,0x53,0x32,0x35,0x36])},_0x52be59=_0x4c69f8[_0x53c3b1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x53c3b1([0x67,0x65,0x74])](_0x53c3b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4a2dac(){let _0x28fa93,_0x375c1f=null,_0x33d9e0=null;try{if(_0x52be59==_0x53c3b1([0x47,0x50,0x4c]))return _0x53c3b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x28fa93=_0x52d093(),!_0x28fa93)return _0x53c3b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x28fa93[_0x53c3b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x33d9e0=_0x108ab0(_0x28fa93[_0x53c3b1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x28fa93[_0x53c3b1([0x6a,0x74,0x69])])),await _0x8321a2()?_0x22980e()?_0x5346e3()?_0x53c3b1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2ae214()?(_0x28fa93[_0x53c3b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x53c3b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x375c1f=_0xb7376b(_0x53c3b1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x28fa93[_0x53c3b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x53c3b1([0x74,0x72,0x69,0x61,0x6c])&&(_0x375c1f=_0xb7376b(_0x53c3b1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f3c76()):_0x53c3b1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x53c3b1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x53c3b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xb1a23a){return _0x53c3b1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5346e3(){const _0x19e6f1=[_0x53c3b1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x53c3b1([0x74,0x72,0x69,0x61,0x6c])][_0x53c3b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28fa93[_0x53c3b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4892a7/0x3e8:0xe10*_0x54021d;return _0x28fa93[_0x53c3b1([0x65,0x78,0x70])]<_0x19e6f1;}function _0x22980e(){const _0xa8299=_0x28fa93[_0x53c3b1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xa8299&&(!!_0xa8299[_0x53c3b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53c3b1([0x2a]))||!!_0xa8299[_0x53c3b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53c3b1([0x55,0x50,0x4c,0x43])));}function _0x2ae214(){const _0x498d0b=_0x38b5,_0x2f6f9f=_0x28fa93[_0x53c3b1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2f6f9f||0x0==_0x2f6f9f[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x527ba8}=new URL(window[_0x53c3b1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x498d0b(0x235)]);if(_0x2f6f9f[_0x53c3b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x527ba8))return!0x0;const _0x1f10e1=_0x527ba8[_0x53c3b1([0x73,0x70,0x6c,0x69,0x74])](_0x53c3b1([0x2e]));return _0x2f6f9f[_0x53c3b1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x497325=>_0x497325[_0x53c3b1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53c3b1([0x2a])))[_0x53c3b1([0x6d,0x61,0x70])](_0x370c0a=>_0x370c0a[_0x53c3b1([0x73,0x70,0x6c,0x69,0x74])](_0x53c3b1([0x2e])))[_0x53c3b1([0x73,0x6f,0x6d,0x65])](_0x29c636=>_0x1f10e1[_0x53c3b1([0x65,0x76,0x65,0x72,0x79])]((_0x1f2a01,_0x2ea59)=>_0x29c636[_0x2ea59]===_0x1f2a01||_0x29c636[_0x2ea59]===_0x53c3b1([0x2a])));}function _0x2f3c76(){return _0x375c1f&&_0x33d9e0?new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b2f8a,_0x1811f3)=>{_0x375c1f[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x4b2f8a,_0x1811f3),_0x33d9e0[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x37823a=>{_0x37823a!=_0x53c3b1([0x56,0x61,0x6c,0x69,0x64])&&_0x4b2f8a(_0x37823a);},_0x1811f3);}):_0x375c1f||_0x33d9e0||_0x53c3b1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x108ab0(_0x31d92b,_0x22e532){return new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12a326=>{if(_0x16a5a9())return _0x12a326(_0x53c3b1([0x56,0x61,0x6c,0x69,0x64]));_0x43296e(),_0x4c69f8[_0x53c3b1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x53c3b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1e8968=!0x1;const _0x134600=_0x543bc0();function _0x4e7128(_0x298025){return!!_0x298025&&(typeof _0x298025===_0x53c3b1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x298025===_0x53c3b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x298025[_0x53c3b1([0x74,0x68,0x65,0x6e])]===_0x53c3b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x298025[_0x53c3b1([0x63,0x61,0x74,0x63,0x68])]===_0x53c3b1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4fd0c5(_0x3695a8){_0x525ded(_0x3695a8)[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x4db81e=>{if(!_0x4db81e||_0x4db81e[_0x53c3b1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x53c3b1([0x6f,0x6b]))return _0x53c3b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2b80e2(_0x4d3345(_0x134600+_0x22e532))!=_0x4db81e[_0x53c3b1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x53c3b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x53c3b1([0x56,0x61,0x6c,0x69,0x64]);})[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x52c722=>(_0x20e656(),_0x52c722),()=>{const _0x45cd6f=_0x7fcdb4();return null==_0x45cd6f?(_0x20e656(),_0x53c3b1([0x56,0x61,0x6c,0x69,0x64])):_0x53c3b1(_0x4892a7-_0x45cd6f>(0x40dbf0be^_0xe509f3)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x12a326)[_0x53c3b1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x12a326(_0x53c3b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x48ddbe=0x64e19a3e^_0xe509f3;function _0x20e656(){const _0x904fc3=_0x53c3b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2b80e2(_0x4d3345(_0x31d92b)),_0x231ffe=_0x521f52(_0x2b80e2(window[_0x53c3b1([0x4d,0x61,0x74,0x68])][_0x53c3b1([0x63,0x65,0x69,0x6c])](_0x4892a7/_0x48ddbe)));window[_0x53c3b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x53c3b1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x904fc3,_0x231ffe);}function _0x7fcdb4(){const _0x22f8a9=_0x53c3b1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2b80e2(_0x4d3345(_0x31d92b)),_0x6114d3=window[_0x53c3b1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x53c3b1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22f8a9);return _0x6114d3?window[_0x53c3b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x521f52(_0x6114d3),0x10)*_0x48ddbe:null;}function _0x525ded(_0x7304cb){return new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f0760,_0x3b0dff)=>{_0x7304cb[_0x53c3b1([0x74,0x68,0x65,0x6e])](_0x4f0760,_0x3b0dff),window[_0x53c3b1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3b0dff,0x64d6a07e^_0xe509f3);});}}_0x4c69f8[_0x53c3b1([0x6f,0x6e])](_0x53c3b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5092bd,_0x3487dc)=>{if(_0x3487dc[0x0]!=_0x31d92b)return _0x12a326(_0x53c3b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3487dc[0x1]={..._0x3487dc[0x1],[_0x53c3b1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x134600};},{[_0x53c3b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x53c3b1([0x68,0x69,0x67,0x68])}),_0x4c69f8[_0x53c3b1([0x6f,0x6e])](_0x53c3b1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x16a437=>{_0x4e7128(_0x16a437[_0x53c3b1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1e8968=!0x0,_0x4fd0c5(_0x16a437[_0x53c3b1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x53c3b1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x53c3b1([0x6c,0x6f,0x77])}),_0x3ef104[_0x53c3b1([0x74,0x68,0x65,0x6e])](()=>{_0x1e8968||_0x12a326(_0x53c3b1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x16a5a9(){return _0x4c69f8[_0x53c3b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x53c3b1([0x76,0x69,0x65,0x77])][_0x53c3b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x53c3b1([0x61,0x75,0x74,0x6f]);}function _0x43296e(){_0x4c69f8[_0x53c3b1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x53c3b1([0x76,0x69,0x65,0x77])][_0x53c3b1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x53c3b1([0x61,0x75,0x74,0x6f]);}}function _0xb7376b(_0x45e590){const _0xa5fce=[new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56bca1=>setTimeout(_0x56bca1,0x64de4a72^_0xe509f3)),_0x3ef104[_0x53c3b1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20910=>{let _0x405a9f=0x0;_0x4c69f8[_0x53c3b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x53c3b1([0x6f,0x6e])](_0x53c3b1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x54fc29,_0x3df2f8)=>{_0x3df2f8[0x0][_0x53c3b1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x405a9f++,_0x405a9f==(0x64d77546^_0xe509f3)&&(_0x20910(),_0x54fc29[_0x53c3b1([0x6f,0x66,0x66])]());});}))];return window[_0x53c3b1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x53c3b1([0x72,0x61,0x63,0x65])](_0xa5fce)[_0x53c3b1([0x74,0x68,0x65,0x6e])](()=>_0x45e590);}async function _0x38da27(){await _0x3ef104,_0x4c69f8[_0x53c3b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x53c3b1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x388696,_0x4c69f8[_0x53c3b1([0x6d,0x6f,0x64,0x65,0x6c])][_0x53c3b1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x388696,_0x4c69f8[_0x53c3b1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x53c3b1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x41dbdb(_0x4c0ad6){const _0x3b69e6=_0x5ddcfe();_0x4c69f8[_0x3b69e6]=_0x53c3b1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4c0ad6,_0x4c0ad6!=_0x53c3b1([0x56,0x61,0x6c,0x69,0x64])&&_0x38da27();}function _0x5ddcfe(){const _0x1ea102=window[_0x53c3b1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x53c3b1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x53c3b1([0x6e,0x6f,0x77])]())[_0x53c3b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x53c3b1([0x2e]),'');let _0x201941=_0x53c3b1([0x4a]);for(let _0x3fead8=0x0;_0x3fead8<_0x1ea102[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3fead8+=0x2){let _0x1de252=window[_0x53c3b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ea102[_0x53c3b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3fead8,_0x3fead8+0x2));_0x1de252>=_0x55c892[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1de252-=_0x55c892[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x201941+=_0x55c892[_0x1de252];}return _0x201941;}function _0x52d093(){const _0x4b447c=_0x52be59[_0x53c3b1([0x73,0x70,0x6c,0x69,0x74])](_0x53c3b1([0x2e]));if(0x3!=_0x4b447c[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xac558b(_0x4b447c[0x1]);function _0xac558b(_0x1ac3b6){const _0x5a2cb1=_0x282de6(_0x1ac3b6);return _0x5a2cb1&&_0x6bd8eb()?_0x5a2cb1:null;function _0x6bd8eb(){const _0x57e4c1=_0x5a2cb1[_0x53c3b1([0x6a,0x74,0x69])],_0x2b8edd=window[_0x53c3b1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57e4c1[_0x53c3b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57e4c1[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x324fae={..._0x5a2cb1,[_0x53c3b1([0x6a,0x74,0x69])]:_0x57e4c1[_0x53c3b1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57e4c1[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x324fae[_0x53c3b1([0x76,0x63])],_0x4d3345(_0x324fae)==_0x2b8edd;}}}async function _0x8321a2(){let _0x4ffd74=!0x0;try{const _0x511530=_0x52be59[_0x53c3b1([0x73,0x70,0x6c,0x69,0x74])](_0x53c3b1([0x2e])),[_0x28bdeb,_0x5dbdae,_0x623462]=_0x511530;return _0x547759(_0x28bdeb),await _0x300e54(_0x28bdeb,_0x5dbdae,_0x623462),_0x4ffd74;}catch(_0x592e35){return!0x1;}function _0x547759(_0x3c9be2){const _0x1c5ef3=_0x282de6(_0x3c9be2);_0x1c5ef3&&_0x1c5ef3[_0x53c3b1([0x61,0x6c,0x67])]==_0x53c3b1([0x45,0x53,0x32,0x35,0x36])||(_0x4ffd74=!0x1);}async function _0x300e54(_0x3947af,_0x5859e2,_0x41fab8){const _0x336b93=window[_0x53c3b1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x53c3b1([0x66,0x72,0x6f,0x6d])](_0x39de23(_0x41fab8),_0xc3457e=>_0xc3457e[_0x53c3b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4970c5=new window[(_0x53c3b1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x53c3b1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3947af+_0x53c3b1([0x2e])+_0x5859e2),_0x3855c4=window[_0x53c3b1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x53c3b1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3855c4)return;const _0x49df70=await _0x3855c4[_0x53c3b1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x53c3b1([0x6a,0x77,0x6b]),_0x1a59cc,{[_0x53c3b1([0x6e,0x61,0x6d,0x65])]:_0x53c3b1([0x45,0x43,0x44,0x53,0x41]),[_0x53c3b1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x53c3b1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x53c3b1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3855c4[_0x53c3b1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x53c3b1([0x6e,0x61,0x6d,0x65])]:_0x53c3b1([0x45,0x43,0x44,0x53,0x41]),[_0x53c3b1([0x68,0x61,0x73,0x68])]:{[_0x53c3b1([0x6e,0x61,0x6d,0x65])]:_0x53c3b1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x49df70,_0x336b93,_0x4970c5)||(_0x4ffd74=!0x1);}}function _0x282de6(_0x463000){return _0x463000[_0x53c3b1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x53c3b1([0x65,0x79]))?JSON[_0x53c3b1([0x70,0x61,0x72,0x73,0x65])](_0x39de23(_0x463000)):null;}function _0x39de23(_0x52f847){return window[_0x53c3b1([0x61,0x74,0x6f,0x62])](_0x52f847[_0x53c3b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x53c3b1([0x2b]))[_0x53c3b1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x53c3b1([0x2f])));}function _0x4d3345(_0x4e28a0){let _0x4a8a06=0x1505;function _0xd7e869(_0x3433c0){for(let _0x2723c7=0x0;_0x2723c7<_0x3433c0[_0x53c3b1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2723c7++){const _0x5e0f77=_0x3433c0[_0x53c3b1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2723c7);_0x4a8a06=(_0x4a8a06<<0x5)+_0x4a8a06+_0x5e0f77,_0x4a8a06&=_0x4a8a06;}}function _0x4549ba(_0x78bfc4){Array[_0x53c3b1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x78bfc4)?_0x78bfc4[_0x53c3b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4549ba):_0x78bfc4&&typeof _0x78bfc4==_0x53c3b1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x53c3b1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x78bfc4)[_0x53c3b1([0x73,0x6f,0x72,0x74])]()[_0x53c3b1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x378a90,_0x50fc4b])=>{_0xd7e869(_0x378a90),_0x4549ba(_0x50fc4b);}):_0xd7e869(window[_0x53c3b1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x78bfc4));}return _0x4549ba(_0x4e28a0),_0x4a8a06>>>0x0;}function _0x2b80e2(_0x25576c){return _0x25576c[_0x53c3b1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x53c3b1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x53c3b1([0x30]));}function _0x521f52(_0x2fa173){return _0x2fa173[_0x53c3b1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x53c3b1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x53c3b1([0x6a,0x6f,0x69,0x6e])]('');}function _0x388696(){}function _0x53c3b1(_0x183abb){const _0x4e28b9=_0x38b5;return _0x183abb[_0x4e28b9(0x22a)](_0x568cb9=>String[_0x4e28b9(0x1f7)](_0x568cb9))[_0x4e28b9(0x1e9)]('');}_0x41dbdb(await _0x4a2dac());}(this);}[_0x46246d(0x234)](){const _0x5722d6=_0x46246d,_0x5578d7=this[_0x5722d6(0x1e1)][_0x5722d6(0x1fa)][_0x5722d6(0x1f1)];_0x5578d7[_0x5722d6(0x232)](_0x5722d6(0x217))&&_0x5578d7[_0x5722d6(0x1e3)](_0x5722d6(0x217),{'allowAttributes':[_0x5722d6(0x211)]}),_0x5578d7[_0x5722d6(0x232)](_0x5722d6(0x1fd))&&_0x5578d7[_0x5722d6(0x1e3)](_0x5722d6(0x1fd),{'allowAttributes':[_0x5722d6(0x211)]});}[_0x46246d(0x206)](){const _0x47faec=_0x46246d,_0x456fc1=this[_0x47faec(0x1e1)];_0x456fc1[_0x47faec(0x230)][_0x47faec(0x1f8)](_0x47faec(0x21f))[_0x47faec(0x221)]({'model':_0x47faec(0x211),'view':_0x47faec(0x1e4)}),_0x456fc1[_0x47faec(0x230)][_0x47faec(0x1f8)](_0x47faec(0x224))[_0x47faec(0x1ed)]({'model':{'key':_0x47faec(0x211),'value':_0x394a15=>_0x394a15[_0x47faec(0x20a)](_0x47faec(0x1e4))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xd6dd9f=_0x456fc1[_0x47faec(0x22f)][_0x47faec(0x21e)](_0x47faec(0x20d));_0xd6dd9f&&this[_0x47faec(0x204)](_0xd6dd9f,_0x47faec(0x205),(_0x5c945f,[_0x3c0447,_0x4b31e3])=>{const _0x5dcf40=_0x47faec;_0x3c0447[_0x5dcf40(0x1f5)](_0x5dcf40(0x211),_0x4b31e3);});}[_0x46246d(0x209)](){const _0x1e2f9c=_0x46246d,_0x247917=this[_0x1e2f9c(0x1e1)][_0x1e2f9c(0x20f)][_0x1e2f9c(0x21e)](_0x1e2f9c(0x1ff))||{},_0x29f186=this[_0x1e2f9c(0x1e1)][_0x1e2f9c(0x20f)][_0x1e2f9c(0x21e)](_0x1e2f9c(0x1e7))||'';this[_0x1e2f9c(0x1e2)]=_0x2b366a(_0x5751c9[_0x1e2f9c(0x20e)],_0x1e2f9c(0x21a),{..._0x247917,'pubkey':_0x29f186,'ctx-name':_0x1e2f9c(0x202),'sourceList':'','imgOnly':_0x1e2f9c(0x229),'removeCopyright':_0x1e2f9c(0x229),'localeName':this[_0x1e2f9c(0x1e1)][_0x1e2f9c(0x1fc)][_0x1e2f9c(0x225)],'externalSourcesEmbedCss':_0x1e2f9c(0x22c)}),this[_0x1e2f9c(0x1e2)][_0x1e2f9c(0x216)]=_0x29d884=>{const _0x2b285c=_0x1e2f9c;if(_0x2b285c(0x1e6)==_0x29d884)return _0x2b285c(0x1f9);},_0x5751c9[_0x1e2f9c(0x20e)][_0x1e2f9c(0x214)][_0x1e2f9c(0x21d)](this[_0x1e2f9c(0x1e2)]);}[_0x46246d(0x1eb)](){const _0x320a67=_0x46246d;this[_0x320a67(0x215)]=_0x2b366a(_0x5751c9[_0x320a67(0x20e)],_0x320a67(0x226),{'ctx-name':_0x320a67(0x202)}),_0x5751c9[_0x320a67(0x20e)][_0x320a67(0x214)][_0x320a67(0x21d)](this[_0x320a67(0x215)]);}[_0x46246d(0x222)](){const _0x1bdf0d=_0x46246d,_0x532648=this[_0x1bdf0d(0x1e1)][_0x1bdf0d(0x22f)][_0x1bdf0d(0x21e)](_0x1bdf0d(0x220));_0x532648&&this[_0x1bdf0d(0x204)](_0x532648,_0x1bdf0d(0x1e5),()=>{const _0xd124ee=_0x1bdf0d,_0x3fbea2=this[_0xd124ee(0x1e1)][_0xd124ee(0x1fa)][_0xd124ee(0x20e)][_0xd124ee(0x203)][_0xd124ee(0x1f2)]();_0x3fbea2&&_0x3fbea2[_0xd124ee(0x20a)](_0xd124ee(0x211))&&this[_0xd124ee(0x1e1)][_0xd124ee(0x1ec)][_0xd124ee(0x1f4)][_0xd124ee(0x227)](_0xd124ee(0x210),()=>{const _0x9bd8f=_0xd124ee;_0x5167f0(this[_0x9bd8f(0x1e1)],_0x3fbea2);});});const _0x4c6305=this[_0x1bdf0d(0x1e1)][_0x1bdf0d(0x22f)][_0x1bdf0d(0x21e)](_0x1bdf0d(0x20b));_0x4c6305&&this[_0x1bdf0d(0x204)](_0x4c6305,_0x1bdf0d(0x1e5),()=>{const _0x467ac6=_0x1bdf0d,_0x4943c3=this[_0x467ac6(0x1e1)][_0x467ac6(0x1fa)][_0x467ac6(0x20e)][_0x467ac6(0x203)][_0x467ac6(0x1f2)]();_0x4943c3&&_0x4943c3[_0x467ac6(0x20a)](_0x467ac6(0x211))&&this[_0x467ac6(0x1e1)][_0x467ac6(0x1ec)][_0x467ac6(0x1f4)][_0x467ac6(0x227)](_0x467ac6(0x210),()=>{const _0x3190e1=_0x467ac6;_0x5167f0(this[_0x3190e1(0x1e1)],_0x4943c3);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x53374e,ObservableMixin as _0x4e01e3}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x5185a1}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x368286}from'ckeditor5/src/icons.js';import _0x474811 from'./uploadcareimageeditformview.js';import _0x4c46fe from'../../utils/uploadutils.js';import{getImageUrls as _0x74c04d,getImageDimension as _0x58cf34}from'../../utils/editingutils.js';import{isAncestor as _0xb6f1da}from'../../utils/isancestor.js';export default class O extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4e01e3(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2c3aab,_0x5336d7,_0x27a155){super(),this['_editor']=_0x2c3aab,this['_dialog']=_0x5336d7,this['_imageElement']=_0x27a155,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 _0x3bd799=this['_imageElement'],_0x19dfd6=_0x3bd799['getAttribute']('uploadcareImageId'),_0x501dd2=_0x3bd799['getAttribute']('src');if(_0x19dfd6)await this['_loadImageInfo'](_0x19dfd6,_0x501dd2);else{if(this['_imageCache']['has'](_0x501dd2)){const _0x4dc41c=this['_imageCache']['get'](_0x501dd2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4dc41c['url'],this['imageDimension']=_0x4dc41c['dimension'],this['imageId']=_0x4dc41c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x396f62}=this['_editor'],t=_0x396f62['t'],_0x2a4ef8=new _0x474811(_0x396f62,this['imageStatus'],this['_attributes']);_0x2a4ef8['bind']('status')['to'](this,'imageStatus'),_0x2a4ef8['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2a4ef8['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2a4ef8['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2a4ef8,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x368286,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2a4ef8,'position':_0x5185a1['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2a4ef8['focus']();},'onHide':()=>{_0x2a4ef8['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5e6bb4=>!_0xb6f1da(_0x5e6bb4,_0x2a4ef8['element'])}});}['_loadImageInfo'](_0x297fe0,_0x1f9a81){return _0x4c46fe['getInfo'](_0x297fe0,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1b3380=>{const {width:_0x4b1e32,height:_0x2a4495}=_0x1b3380['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f9a81,this['imageDimension']={'width':_0x4b1e32,'height':_0x2a4495},this['imageId']=_0x297fe0;})['catch'](_0x3df18e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3df18e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x11dcae,_0x4e8c9b){return this['_getImageAsFile'](_0x11dcae)['then'](_0x28b753=>_0x4c46fe['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4e8c9b['signal'],'file':_0x28b753,'onProgress':_0xfe4275=>{_0xfe4275&&_0xfe4275['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xfe4275['value']));}}))['then'](_0x1ddfe1=>{const {width:_0x43f551,height:_0xde24f7}=_0x1ddfe1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1ddfe1['cdnUrl'],this['imageDimension']={'width':_0x43f551,'height':_0xde24f7},this['imageId']=_0x1ddfe1['uuid'],this['imageUploadProgress']=null;const _0x3e4561=_0x11dcae['getAttribute']('src');this['_imageCache']['set'](_0x3e4561,{'id':_0x1ddfe1['uuid'],'url':_0x1ddfe1['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x15a8e4=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x15a8e4['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2f05ca,_0xbc7f54){_0x2f05ca['on']('apply',(_0x25c27d,_0x3dd9f9)=>{this['_replaceImage'](_0xbc7f54,_0x3dd9f9['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2f05ca['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2f05ca['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xbbc939,_0x588ff1,_0x5927e5){const _0x1953ae=this['_editor'],{width:_0x159b2f,height:_0x81fc72}=_0x58cf34(_0x588ff1,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1a4ffc,imageSources:_0x57130a}=_0x74c04d(_0x588ff1,_0x159b2f);_0x1953ae['model']['change'](_0x302ff2=>{if('$graveyard'===_0xbbc939['root']['rootName']){_0x1953ae['execute']('insertImage',{'imageType':_0xbbc939['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xbbc939['getAttributes']()),'uploadcareImageId':_0x5927e5,'src':_0x1a4ffc,'sources':_0x57130a,'width':_0x159b2f,'height':_0x81fc72}});const _0x48416b=_0xbbc939['getChildren']();_0xbbc939=_0x1953ae['model']['document']['selection']['getSelectedElement']();for(const _0x4502b0 of _0x48416b)_0x302ff2['append'](_0x302ff2['cloneElement'](_0x4502b0),_0xbbc939);}else _0x302ff2['setSelection'](_0xbbc939,'on'),_0x1953ae['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xbbc939['getAttributes']()),'uploadcareImageId':_0x5927e5,'src':_0x1a4ffc,'sources':_0x57130a,'width':_0x159b2f,'height':_0x81fc72},_0xbbc939);_0x302ff2['setSelection'](_0xbbc939,'on');});}async['_getImageAsFile'](_0x19bf9c){const _0x1b3dbe=_0x53374e['window'],_0x155bd6=_0x53374e['document']['location']['href'],_0x1e7265=new _0x1b3dbe['URL'](_0x19bf9c['getAttribute']('src'),_0x155bd6);if('data:'===_0x1e7265['protocol']){const _0x1cca85=_0x1e7265['href']['split'](','),_0x5eaa3d=_0x1cca85[0x0]['match'](/:(.*?);/)[0x1],_0x4d9e72=_0x5eaa3d['split']('/')[0x1],_0x454d4c=_0x1b3dbe['atob'](_0x1cca85[_0x1cca85['length']-0x1]);let _0x2e6cd3=_0x454d4c['length'];const _0xe3e637=new _0x1b3dbe['Uint8Array'](_0x2e6cd3);for(;_0x2e6cd3--;)_0xe3e637[_0x2e6cd3]=_0x454d4c['charCodeAt'](_0x2e6cd3);return new _0x1b3dbe['File']([_0xe3e637],'image.'+_0x4d9e72,{'type':_0x5eaa3d});}const _0x20eb82=_0x1e7265['href']['split']('/'),_0x11a44d=_0x20eb82[_0x20eb82['length']-0x1],_0x3f5111=_0x11a44d['split']('.')[0x1];return _0x1b3dbe['fetch'](_0x1e7265['href'])['then'](_0x68e2a3=>_0x68e2a3['clone']()['blob']())['then'](_0x4f4291=>new _0x1b3dbe['File']([_0x4f4291],_0x11a44d,{'type':'image/'+_0x3f5111}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x354d(_0x2d2b36,_0x4a448f){const _0x53b0db=_0x53b0();return _0x354d=function(_0x354d83,_0x4d41a0){_0x354d83=_0x354d83-0x1dd;let _0x3bb8d4=_0x53b0db[_0x354d83];return _0x3bb8d4;},_0x354d(_0x2d2b36,_0x4a448f);}(function(_0x4f52df,_0x537e65){const _0x4e8298=_0x354d,_0x32eb32=_0x4f52df();while(!![]){try{const _0x1c72a4=-parseInt(_0x4e8298(0x1e8))/0x1*(-parseInt(_0x4e8298(0x1e9))/0x2)+-parseInt(_0x4e8298(0x1e4))/0x3*(parseInt(_0x4e8298(0x1e7))/0x4)+-parseInt(_0x4e8298(0x1e5))/0x5*(-parseInt(_0x4e8298(0x1dd))/0x6)+parseInt(_0x4e8298(0x1ed))/0x7*(-parseInt(_0x4e8298(0x1e2))/0x8)+parseInt(_0x4e8298(0x1e1))/0x9+parseInt(_0x4e8298(0x1de))/0xa+parseInt(_0x4e8298(0x1ee))/0xb;if(_0x1c72a4===_0x537e65)break;else _0x32eb32['push'](_0x32eb32['shift']());}catch(_0x354d1d){_0x32eb32['push'](_0x32eb32['shift']());}}}(_0x53b0,0x35d65));function _0x53b0(){const _0x2df24f=['3DbpgYM','51616fuLNNj','bindTemplate','image-edit','uc-light','86030diIRMV','443894cqRbwd','uc-cloud-image-editor','945138KIxXfs','3612800jUSryx','set','setTemplate','1955718NBNDGc','168AnktTq','ck-uploadcare-theme','36rduRoY','5fDKprW','imageSrc','125092qJdUAh'];_0x53b0=function(){return _0x2df24f;};return _0x53b0();}import{View as _0x371297}from'ckeditor5/src/ui.js';export default class tt extends _0x371297{constructor(_0x5e9efe,_0x1e6b30){const _0x5cccb5=_0x354d;super(_0x5e9efe);const _0x42d6a6=this[_0x5cccb5(0x1ea)];this[_0x5cccb5(0x1df)](_0x5cccb5(0x1e6),''),this[_0x5cccb5(0x1e0)]({'tag':_0x5cccb5(0x1ef),'attributes':{..._0x1e6b30,'class':[_0x5cccb5(0x1ec),_0x5cccb5(0x1e3)],'ctx-name':_0x5cccb5(0x1eb),'cdn-url':_0x42d6a6['to'](_0x5cccb5(0x1e6))}});}}
|
|
@@ -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 _0x1d6738,IconView as at,View as _0xbf795d}from'ckeditor5/src/ui.js';export default class rt extends _0xbf795d{constructor(_0x2ef7ca){super(_0x2ef7ca);const t=_0x2ef7ca['t'];this['set']('errorType',null);const _0x59f5c=new _0x1d6738(_0x2ef7ca);_0x59f5c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x59f5c['withText']=!0x0,_0x59f5c['class']='ck-button-action',_0x59f5c['on']('execute',()=>{this['fire']('retry');}),_0x59f5c['bind']('isVisible')['to'](this,'errorType',_0x302ca9=>'NotFound'!==_0x302ca9);const _0x3824bd=new at();_0x3824bd['content']=et,_0x3824bd['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x48dd24=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':[_0x3824bd,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x48dd24['to']('errorType',_0x1de8cc=>t('NotFound'!==_0x1de8cc?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x59f5c]},{'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 _0x267c57,View as _0x179272}from'ckeditor5/src/ui.js';export default class ta extends _0x179272{constructor(_0x413629){super(_0x413629);const t=_0x413629['t'],_0x150ce5=this['bindTemplate'],_0x554a2d=new _0x267c57();_0x554a2d['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':[_0x554a2d,{'text':_0x150ce5['to']('imageUploadProgress',_0x357358=>t('Loading\x20image...')+'\x20('+(_0x357358||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'}]}]}]});}}
|