@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251025.0 → 0.0.0-nightly-20251026.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/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 _0x4d8427,Command as _0x6a843d}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x45d677,IconGooglePhotos as _0x340251,IconGoogleDrive as _0x5a5d3c,IconFacebook as _0x27eeb9,IconDropbox as _0x1dde77,IconUploadcareLink as _0x472620,IconUploadcareImageUpload as _0x369661,IconError as _0x3fab5e,IconUploadcareImageEdit as _0x332183}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x5cfca0,MenuBarMenuListItemButtonView as _0xaaf612,View as _0x19801c,FocusCycler as _0x50b77f,Dialog as _0x342722,DialogViewPosition as _0xb1b3c7,SpinnerView as _0x3710cd,IconView as _0x5f0d0f,Notification as _0x310d11}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x386933,DomEmitterMixin as _0x167f49,global as _0x385085,getAncestors as _0x2f40b4,ObservableMixin as _0xd73486,uid as _0xa4a148,createElement as _0x27340f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3de31c}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x36cdda,info as _0x5f3446}from'@uploadcare/upload-client';import*as _0x168c9e from'@uploadcare/file-uploader';var i=function(_0x177103){return _0x177103['Local']='local',_0x177103['URL']='url',_0x177103['Dropbox']='dropbox',_0x177103['GDrive']='gdrive',_0x177103['Facebook']='facebook',_0x177103['GPhotos']='gphotos',_0x177103['OneDrive']='onedrive',_0x177103;}({});function _(_0x4dd947,_0x24e506,_0x2686ca){const t=_0x4dd947['t'],_0x274181=_0x4dd947['t'];switch(_0x24e506){case i['Local']:return{'text':_0x274181('Insert'===_0x2686ca?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x274181('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x2686ca?_0x274181('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x274181('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x2686ca?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x2686ca?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x2686ca?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x2686ca?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x2686ca?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x24e506;}}class e extends _0x4d8427{['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 _0x104218=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5504a8;for(const _0x1c7241 in _0x104218){const _0x194695=_0x1c7241,_0x5e88b6=_0x104218[_0x194695];if('uploadcareLicenseKeyValid'==_0x5e88b6||'uploadcareLicenseKeyInvalid'==_0x5e88b6||'uploadcareLicenseKeyExpired'==_0x5e88b6||'uploadcareLicenseKeyDomainLimit'==_0x5e88b6||'uploadcareLicenseKeyNotAllowed'==_0x5e88b6||'uploadcareLicenseKeyEvaluationLimit'==_0x5e88b6||'uploadcareLicenseKeyTrialLimit'==_0x5e88b6||'uploadcareLicenseKeyUsageLimit'==_0x5e88b6){delete _0x104218[_0x194695],_0x5504a8=_0x5e88b6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x5504a8&&_0x104218['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x5504a8&&_0x104218['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x5504a8&&_0x104218['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x5504a8&&_0x104218['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x5504a8&&_0x104218['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x5504a8&&_0x104218['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x5504a8&&_0x104218['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2a2030}=this,_0x1181d8=_0x2a2030['commands']['get']('uploadcare');if(!_0x1181d8)return;const _0x1ce43a=this['_normalizeConfigSourceList'](_0x2a2030['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x42c4a7,_0x28417c)=>{const _0x26ef56=this['_getIntegrationKey'](_0x28417c['type']);return _0x42c4a7[_0x26ef56]||(_0x42c4a7[_0x26ef56]=[]),_0x42c4a7[_0x26ef56]['push'](_0x28417c),_0x42c4a7;},{});_0x2a2030['plugins']['has']('ImageInsertUI')&&_0x2a2030['commands']['get']('uploadcare')&&Object['entries'](_0x1ce43a)['forEach'](([_0x3be169,_0x2e173c])=>{_0x2a2030['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3be169,'observable':()=>_0x1181d8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2e173c),'formViewCreator':()=>this['_createDropdownButtons'](_0x2e173c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2e173c),'override':'assetManager'!==_0x3be169});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xe3f4cf){const {locale:_0xe52e08}=this['editor'];return _0xe3f4cf['map'](_0x3ca6a2=>{const _0x2f09d7=_(_0xe52e08,_0x3ca6a2,'Insert');switch(_0x3ca6a2){case i['Local']:return{'icon':_0x369661,'type':i['Local'],..._0x2f09d7};case i['URL']:return{'icon':_0x472620,'type':i['URL'],..._0x2f09d7};case i['Dropbox']:return{'icon':_0x1dde77,'type':i['Dropbox'],..._0x2f09d7};case i['Facebook']:return{'icon':_0x27eeb9,'type':i['Facebook'],..._0x2f09d7};case i['GDrive']:return{'icon':_0x5a5d3c,'type':i['GDrive'],..._0x2f09d7};case i['GPhotos']:return{'icon':_0x340251,'type':i['GPhotos'],..._0x2f09d7};case i['OneDrive']:return{'icon':_0x45d677,'type':i['OneDrive'],..._0x2f09d7};}});}['_getIntegrationKey'](_0x4855fb){switch(_0x4855fb){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x485586,_0x175d90){const _0x380cdd=this['editor'],_0x4bb0db=new _0x485586(_0x380cdd['locale']),_0x3c7114=_0x380cdd['commands']['get']('uploadcare');return _0x4bb0db['bind']('isEnabled')['to'](_0x3c7114),_0x4bb0db['on']('execute',()=>{_0x3c7114['execute'](_0x175d90);}),_0x4bb0db;}['_createToolbarButton'](_0x4d1163){const {locale:_0x3e66c0}=this['editor'],_0x3311ba=this['editor']['plugins']['get']('ImageInsertUI'),_0x1cfc7d=_0x4d1163[0x0],_0x27c55d=this['_createButton'](_0x5cfca0,_0x1cfc7d['type']);return _0x27c55d['icon']=_0x1cfc7d['icon'],_0x27c55d['bind']('label')['to'](_0x3311ba,'isImageSelected',_0x2a9230=>_(_0x3e66c0,_0x1cfc7d['type'],_0x2a9230?'Replace':'Insert')['text']),_0x27c55d['tooltip']=!0x0,_0x27c55d;}['_createDropdownButtons'](_0x1d0620){const {locale:_0x5a9548}=this['editor'],_0x58782c=this['editor']['plugins']['get']('ImageInsertUI');return _0x1d0620['map'](_0x8ada5a=>{const _0x31a680=this['_createButton'](_0x5cfca0,_0x8ada5a['type']);return _0x31a680['withText']=!0x0,_0x31a680['icon']=_0x8ada5a['icon'],_0x31a680['bind']('label')['to'](_0x58782c,'isImageSelected',_0x2d8224=>_(_0x5a9548,_0x8ada5a['type'],_0x2d8224?'Replace':'Insert')['text']),_0x31a680;});}['_createMenuBarButtons'](_0xed5a45){return _0xed5a45['map'](_0x925e01=>{const _0x3b3db7=this['_createButton'](_0xaaf612,_0x925e01['type']);return _0x3b3db7['icon']=_0x925e01['icon'],_0x3b3db7['label']=_0x925e01['shortText'],_0x3b3db7;});}}class F extends _0x19801c{['focusTracker'];['focusCycler'];constructor(_0x191f5e){super(_0x191f5e),this['focusTracker']=new _0x386933(),this['focusCycler']=new _0x50b77f({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x2743a7,_0x369893){super(_0x2743a7),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-'+_0x369893}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0xcda659,_0x515dfa){const _0x7f2acd=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x381715=>_0x381715<=_0x515dfa)['map'](_0x4bfd17=>_0xcda659['replace'](/\/$/,'')+'/-/resize/'+_0x4bfd17+'x/\x20'+_0x4bfd17+'w');return{'imageFallbackUrl':_0xcda659,'imageSources':[{'srcset':_0x7f2acd['join'](',\x20'),'sizes':'(max-width:\x20'+_0x515dfa+'px)\x20100vw,\x20'+_0x515dfa+'px','type':'image/webp'}]};}function S(_0xdfd591,_0x10a067,_0x7307ef){const _0x53742d=_0xdfd591['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x53742d?parseInt(_0x53742d[0x1],0xa):_0x10a067,'height':_0x53742d?parseInt(_0x53742d[0x2],0xa):_0x7307ef};}function p(_0x453261,_0xa1fa04){const _0x7bf21c=new(_0x167f49())(),_0x3ae78c=_0x453261['plugins']['get']('ImageUtils'),_0xafad34=_0x453261['editing']['mapper']['toViewElement'](_0xa1fa04),_0x54aa6c=_0x3ae78c['findViewImgElement'](_0xafad34),_0x914b6f=_0x453261['editing']['view']['domConverter']['viewToDom'](_0x54aa6c),_0x3e2b4a=_0xa1fa04['getAttribute']('width'),_0x502c1e=_0xa1fa04['getAttribute']('height'),_0x441050='image-processing';_0x453261['editing']['view']['change'](_0x1dbb16=>{_0x1dbb16['addClass'](_0x441050,_0xafad34),_0x1dbb16['setStyle']('aspect-ratio',_0x3e2b4a+'/'+_0x502c1e,_0x54aa6c);}),_0x7bf21c['listenTo'](_0x914b6f,'load',()=>{_0x7bf21c['stopListening'](_0x914b6f,'load'),_0x453261['editing']['view']['change'](_0x1994b3=>{_0x1994b3['removeClass'](_0x441050,_0xafad34),_0x1994b3['removeStyle']('aspect-ratio',_0x54aa6c);});});}function G(_0x1c7c26){if(Array['isArray'](_0x1c7c26)){const _0x5acd39=_0x1c7c26['map'](G);return _0x39c4f9=>_0x5acd39['some'](_0x22a777=>_0x22a777(_0x39c4f9));}if('origin'==_0x1c7c26){const _0x44f0d7=_0x385085['window']['location']['origin'];return _0x3142ad=>new URL(_0x3142ad,_0x385085['document']['baseURI'])['origin']==_0x44f0d7;}return'function'==typeof _0x1c7c26?_0x1c7c26:_0x1c7c26 instanceof RegExp?_0x2f0ed7=>!(!_0x2f0ed7['match'](_0x1c7c26)&&!_0x2f0ed7['replace'](/^https?:\/\//,'')['match'](_0x1c7c26)):()=>!0x1;}function A(_0x555b15,_0x4e25f0){return _0x2f40b4(_0x555b15['target'])['includes'](_0x4e25f0);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0xd73486(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x4e04ef,_0x3fa32c,_0x12d0f5){super(),this['_editor']=_0x4e04ef,this['_editing']=_0x3fa32c,this['_dialog']=_0x4e04ef['plugins']['get'](_0x342722),this['_api']=_0x3fa32c['ctxElement']['getAPI'](),this['_type']=_0x12d0f5,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:_0x9414de,model:_0x164f15}=this['_editor'],_0x1ab1fc=_0x164f15['document']['selection']['getSelectedElement'](),_0x461ae2=_0x1ab1fc&&(_0x1ab1fc['is']('element','imageBlock')||_0x1ab1fc['is']('element','imageInline'));this['_formView']=new x(_0x9414de,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x369661,'title':_(_0x9414de,this['_type'],_0x461ae2?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xb1b3c7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x473074=>!A(_0x473074,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x650590}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2a9fe9=>{const _0x1fc0ce=_0x650590['length'];for(const _0x576902 of _0x650590){const _0x2df9e9=_0x576902===_0x650590[_0x1fc0ce-0x1],{cdnUrl:_0x379ba9,fileInfo:_0x107916}=_0x576902;if(!_0x379ba9||!_0x107916)continue;const {width:_0x3ee342,height:_0x1a62fa}=_0x107916['imageInfo'],_0x2d7c40=S(_0x379ba9,_0x3ee342,_0x1a62fa),_0x5441ed=C(_0x379ba9,_0x2d7c40['width']),_0x1e7cd2={'id':_0x107916['uuid'],'type':'image','attributes':{'imageDimension':_0x2d7c40,..._0x5441ed}};this['_insertAsset'](_0x1e7cd2,_0x2df9e9,_0x2a9fe9);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x5ce829=>{'idle'===_0x5ce829['detail']['status']&&!_0x5ce829['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4bcf8a,_0x24d313,_0xbc5897){const _0x458572=this['_editor']['model']['document']['selection'],_0x4ea6cb=_0x458572['getSelectedElement'](),_0x1a7e98=!(!_0x4ea6cb||!_0x4ea6cb['is']('element','imageInline'));_0xbc5897['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4bcf8a,_0x1a7e98),_0x24d313||_0xbc5897['setSelection'](_0x458572['getLastPosition']());}['_insertImage'](_0x1c228b,_0x2add44){const _0x45e7ed=this['_editor'],{imageDimension:_0x191924,imageFallbackUrl:_0x52a391,imageSources:_0x5b2ff4}=_0x1c228b['attributes'];_0x45e7ed['execute']('insertImage',{'imageType':_0x2add44?'imageInline':null,'source':{'uploadcareImageId':_0x1c228b['id'],'src':_0x52a391,'sources':_0x5b2ff4,..._0x191924}});}}class w extends _0x6a843d{['_editing'];['_controller']=null;static get['requires'](){return[_0x342722,o];}constructor(_0x347541){super(_0x347541),this['_editing']=_0x347541['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x26aa2d){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x26aa2d);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5e7600,..._0x25e054}){return _0x36cdda(_0x5e7600,_0x25e054);}static['getInfo'](_0x804a80,_0x40c2ac){return _0x5f3446(_0x804a80,_0x40c2ac);}}class f extends _0x4d8427{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3de31c,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2cb215=this['editor'];if(!!!_0x2cb215['config']['get']('uploadcare'))return;_0x2cb215['plugins']['get'](_0x3de31c)['createUploadAdapter']=_0x416a05=>new k(_0x416a05,_0x2cb215),_0x2cb215['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x488a1b,{imageElement:_0x1b25a5,data:_0x2146ed})=>{_0x2cb215['model']['change'](_0x5b4bf2=>{_0x5b4bf2['setAttribute']('uploadcareImageId',_0x2146ed['uploadcareImageId'],_0x1b25a5);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x467ad7,_0x240864){this['loader']=_0x467ad7,this['editor']=_0x240864,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1de245=await this['loader']['file'];return j['upload']({'file':_0x1de245,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x4be932=>{_0x4be932&&_0x4be932['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4be932['value']);}})['then'](async _0x4905d6=>{const {imageFallbackUrl:_0x3fb83c,imageSources:_0x14fe7b}=C(_0x4905d6['cdnUrl'],_0x4905d6['imageInfo']['width']);return{'uploadcareImageId':_0x4905d6['uuid'],'default':_0x3fb83c,'sources':_0x14fe7b};})['catch'](()=>{const _0x2c46fc=t('Cannot\x20upload\x20file:')+('\x20'+_0x1de245['name']+'.');return Promise['reject'](_0x2c46fc);});}['abort'](){this['controller']['abort']();}}class o extends _0x4d8427{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x342722];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1e1d3c){super(_0x1e1d3c),this['ucContextId']=_0xa4a148();}['init'](){const _0x5a5cab=this['editor'];_0x5a5cab['commands']['add']('uploadcare',new w(_0x5a5cab));}['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 _0x5abd8d=_0x385085['document']['querySelector']('input[uploadcare-file-input]');_0x5abd8d&&_0x5abd8d['remove']();}),async function(_0x5bda66){const _0x18a71a=_0x3d1dad([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x46b6cf=0x535f8c3a,_0x5b5ffc=0x5358fb0a^_0x46b6cf,_0x1a4655=window[_0x3d1dad([0x44,0x61,0x74,0x65])][_0x3d1dad([0x6e,0x6f,0x77])](),_0x1e2f86=_0x5bda66[_0x3d1dad([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x561285=new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1dbea1=>{_0x1e2f86[_0x3d1dad([0x6f,0x6e,0x63,0x65])](_0x3d1dad([0x72,0x65,0x61,0x64,0x79]),_0x1dbea1);}),_0x211976={[_0x3d1dad([0x6b,0x74,0x79])]:_0x3d1dad([0x45,0x43]),[_0x3d1dad([0x75,0x73,0x65])]:_0x3d1dad([0x73,0x69,0x67]),[_0x3d1dad([0x63,0x72,0x76])]:_0x3d1dad([0x50,0x2d,0x32,0x35,0x36]),[_0x3d1dad([0x78])]:_0x3d1dad([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]),[_0x3d1dad([0x79])]:_0x3d1dad([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]),[_0x3d1dad([0x61,0x6c,0x67])]:_0x3d1dad([0x45,0x53,0x32,0x35,0x36])},_0x1b106a=_0x1e2f86[_0x3d1dad([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3d1dad([0x67,0x65,0x74])](_0x3d1dad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x549f07(){let _0x3f0637,_0x3f5467=null,_0x38386b=null;try{if(_0x1b106a==_0x3d1dad([0x47,0x50,0x4c]))return _0x3d1dad([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3f0637=_0x4b2026(),!_0x3f0637)return _0x3d1dad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3f0637[_0x3d1dad([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38386b=_0x2a0ff2(_0x3f0637[_0x3d1dad([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3f0637[_0x3d1dad([0x6a,0x74,0x69])])),await _0x28bcb4()?_0x20253c()?_0x9f5461()?_0x3d1dad([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x364c91()?(_0x3f0637[_0x3d1dad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d1dad([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f5467=_0x3a8ff9(_0x3d1dad([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3f0637[_0x3d1dad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d1dad([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f5467=_0x3a8ff9(_0x3d1dad([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x28a494()):_0x3d1dad([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3d1dad([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3d1dad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3d1dad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x9f5461(){const _0x9cfb31=[_0x3d1dad([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3d1dad([0x74,0x72,0x69,0x61,0x6c])][_0x3d1dad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f0637[_0x3d1dad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a4655/0x3e8:0xe10*_0x5b5ffc;return _0x3f0637[_0x3d1dad([0x65,0x78,0x70])]<_0x9cfb31;}function _0x20253c(){const _0x1e7887=_0x3f0637[_0x3d1dad([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1e7887&&(!!_0x1e7887[_0x3d1dad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d1dad([0x2a]))||!!_0x1e7887[_0x3d1dad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d1dad([0x55,0x50,0x4c,0x43])));}function _0x364c91(){const _0x4eb9c2=_0x3f0637[_0x3d1dad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4eb9c2||0x0==_0x4eb9c2[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x49608}=new URL(window[_0x3d1dad([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4eb9c2[_0x3d1dad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49608))return!0x0;const _0x4e498e=_0x49608[_0x3d1dad([0x73,0x70,0x6c,0x69,0x74])](_0x3d1dad([0x2e]));return _0x4eb9c2[_0x3d1dad([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4d2f80=>_0x4d2f80[_0x3d1dad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d1dad([0x2a])))[_0x3d1dad([0x6d,0x61,0x70])](_0xfd7d3c=>_0xfd7d3c[_0x3d1dad([0x73,0x70,0x6c,0x69,0x74])](_0x3d1dad([0x2e])))[_0x3d1dad([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e17d1=>_0x1e17d1[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4e498e[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d1dad([0x6d,0x61,0x70])](_0x30ab5f=>Array(_0x4e498e[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x30ab5f[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d1dad([0x66,0x69,0x6c,0x6c])](_0x30ab5f[0x0]===_0x3d1dad([0x2a])?_0x3d1dad([0x2a]):'')[_0x3d1dad([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x30ab5f))[_0x3d1dad([0x73,0x6f,0x6d,0x65])](_0x46bd3a=>_0x4e498e[_0x3d1dad([0x65,0x76,0x65,0x72,0x79])]((_0x322968,_0x29c535)=>_0x46bd3a[_0x29c535]===_0x322968||_0x46bd3a[_0x29c535]===_0x3d1dad([0x2a])));}function _0x28a494(){return _0x3f5467&&_0x38386b?new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2faca9,_0x1c2cbf)=>{_0x3f5467[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x2faca9,_0x1c2cbf),_0x38386b[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x2d8ddd=>{_0x2d8ddd!=_0x3d1dad([0x56,0x61,0x6c,0x69,0x64])&&_0x2faca9(_0x2d8ddd);},_0x1c2cbf);}):_0x3f5467||_0x38386b||_0x3d1dad([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2a0ff2(_0x30de3f,_0x374486){return new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b8b36=>{if(_0x452820())return _0x3b8b36(_0x3d1dad([0x56,0x61,0x6c,0x69,0x64]));_0x3891d7(),_0x1e2f86[_0x3d1dad([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3d1dad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x44583d=!0x1;const _0x2a25fe=_0xa4a148();function _0x318978(_0x16e45e){return!!_0x16e45e&&(typeof _0x16e45e===_0x3d1dad([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x16e45e===_0x3d1dad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x16e45e[_0x3d1dad([0x74,0x68,0x65,0x6e])]===_0x3d1dad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x16e45e[_0x3d1dad([0x63,0x61,0x74,0x63,0x68])]===_0x3d1dad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x26af22(_0x3aaa30){_0x365248(_0x3aaa30)[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x36d669=>{if(!_0x36d669||_0x36d669[_0x3d1dad([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3d1dad([0x6f,0x6b]))return _0x3d1dad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xe2b23(_0x204e9d(_0x2a25fe+_0x374486))!=_0x36d669[_0x3d1dad([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3d1dad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3d1dad([0x56,0x61,0x6c,0x69,0x64]);})[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x3e3477=>(_0x448a46(),_0x3e3477),()=>{const _0x46cbbd=_0x50c888();return null==_0x46cbbd?(_0x448a46(),_0x3d1dad([0x56,0x61,0x6c,0x69,0x64])):_0x3d1dad(_0x1a4655-_0x46cbbd>(0x7753083a^_0x46b6cf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x3b8b36)[_0x3d1dad([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3b8b36(_0x3d1dad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2c520c=0x536962ba^_0x46b6cf;function _0x448a46(){const _0x5ccb1d=_0x3d1dad([0x6c,0x6c,0x63,0x74,0x2d])+_0xe2b23(_0x204e9d(_0x30de3f)),_0x26df97=_0x5dcbe3(_0xe2b23(window[_0x3d1dad([0x4d,0x61,0x74,0x68])][_0x3d1dad([0x63,0x65,0x69,0x6c])](_0x1a4655/_0x2c520c)));window[_0x3d1dad([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d1dad([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ccb1d,_0x26df97);}function _0x50c888(){const _0x4d0991=_0x3d1dad([0x6c,0x6c,0x63,0x74,0x2d])+_0xe2b23(_0x204e9d(_0x30de3f)),_0xc65be5=window[_0x3d1dad([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d1dad([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d0991);return _0xc65be5?window[_0x3d1dad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dcbe3(_0xc65be5),0x10)*_0x2c520c:null;}function _0x365248(_0x290d4c){return new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5ac664,_0x4cf7ac)=>{_0x290d4c[_0x3d1dad([0x74,0x68,0x65,0x6e])](_0x5ac664,_0x4cf7ac),window[_0x3d1dad([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4cf7ac,0x535e58fa^_0x46b6cf);});}}_0x1e2f86[_0x3d1dad([0x6f,0x6e])](_0x3d1dad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5d4794,_0x3fa49b)=>{if(_0x3fa49b[0x0]!=_0x30de3f)return _0x3b8b36(_0x3d1dad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3fa49b[0x1]={..._0x3fa49b[0x1],[_0x3d1dad([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2a25fe};},{[_0x3d1dad([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d1dad([0x68,0x69,0x67,0x68])}),_0x1e2f86[_0x3d1dad([0x6f,0x6e])](_0x3d1dad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53c191=>{_0x318978(_0x53c191[_0x3d1dad([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x44583d=!0x0,_0x26af22(_0x53c191[_0x3d1dad([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3d1dad([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d1dad([0x6c,0x6f,0x77])}),_0x561285[_0x3d1dad([0x74,0x68,0x65,0x6e])](()=>{_0x44583d||_0x3b8b36(_0x3d1dad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x452820(){return _0x1e2f86[_0x3d1dad([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d1dad([0x76,0x69,0x65,0x77])][_0x3d1dad([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3d1dad([0x61,0x75,0x74,0x6f]);}function _0x3891d7(){_0x1e2f86[_0x3d1dad([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d1dad([0x76,0x69,0x65,0x77])][_0x3d1dad([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d1dad([0x61,0x75,0x74,0x6f]);}}function _0x3a8ff9(_0x34baf7){const _0x3f7273=[new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16f079=>setTimeout(_0x16f079,0x5356b2f6^_0x46b6cf)),_0x561285[_0x3d1dad([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15e2b0=>{let _0x944e7c=0x0;_0x1e2f86[_0x3d1dad([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d1dad([0x6f,0x6e])](_0x3d1dad([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4fb1ef,_0xdccdf6)=>{_0xdccdf6[0x0][_0x3d1dad([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x944e7c++,_0x944e7c==(0x535f8dc2^_0x46b6cf)&&(_0x15e2b0(),_0x4fb1ef[_0x3d1dad([0x6f,0x66,0x66])]());});}))];return window[_0x3d1dad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d1dad([0x72,0x61,0x63,0x65])](_0x3f7273)[_0x3d1dad([0x74,0x68,0x65,0x6e])](()=>_0x34baf7);}async function _0x137f4d(){await _0x561285,_0x1e2f86[_0x3d1dad([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d1dad([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d6f01,_0x1e2f86[_0x3d1dad([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d1dad([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d6f01,_0x1e2f86[_0x3d1dad([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3d1dad([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x23a823(_0x2e7383){const _0x518fae=_0x4220f6();_0x1e2f86[_0x518fae]=_0x3d1dad([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e7383,_0x2e7383!=_0x3d1dad([0x56,0x61,0x6c,0x69,0x64])&&_0x137f4d();}function _0x4220f6(){const _0x3f3271=window[_0x3d1dad([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3d1dad([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3d1dad([0x6e,0x6f,0x77])]())[_0x3d1dad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3d1dad([0x2e]),'');let _0x4f7614=_0x3d1dad([0x68]);for(let _0x4e84f2=0x0;_0x4e84f2<_0x3f3271[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e84f2+=0x2){let _0x15b8e4=window[_0x3d1dad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f3271[_0x3d1dad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e84f2,_0x4e84f2+0x2));_0x15b8e4>=_0x18a71a[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x15b8e4-=_0x18a71a[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f7614+=_0x18a71a[_0x15b8e4];}return _0x4f7614;}function _0x4b2026(){const _0x19d119=_0x1b106a[_0x3d1dad([0x73,0x70,0x6c,0x69,0x74])](_0x3d1dad([0x2e]));if(0x3!=_0x19d119[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x167cca(_0x19d119[0x1]);function _0x167cca(_0x112c4c){const _0x748d37=_0x15a894(_0x112c4c);return _0x748d37&&_0x408488()?_0x748d37:null;function _0x408488(){const _0x4de4a7=_0x748d37[_0x3d1dad([0x6a,0x74,0x69])],_0x4e5958=window[_0x3d1dad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4de4a7[_0x3d1dad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4de4a7[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x11fdd3={..._0x748d37,[_0x3d1dad([0x6a,0x74,0x69])]:_0x4de4a7[_0x3d1dad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4de4a7[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x11fdd3[_0x3d1dad([0x76,0x63])],_0x204e9d(_0x11fdd3)==_0x4e5958;}}}async function _0x28bcb4(){let _0x25815d=!0x0;try{const _0x2e5bf6=_0x1b106a[_0x3d1dad([0x73,0x70,0x6c,0x69,0x74])](_0x3d1dad([0x2e])),[_0x3ab493,_0x622592,_0x4d9eb7]=_0x2e5bf6;return _0x9de7e1(_0x3ab493),await _0x39087b(_0x3ab493,_0x622592,_0x4d9eb7),_0x25815d;}catch{return!0x1;}function _0x9de7e1(_0x591001){const _0x12b35a=_0x15a894(_0x591001);_0x12b35a&&_0x12b35a[_0x3d1dad([0x61,0x6c,0x67])]==_0x3d1dad([0x45,0x53,0x32,0x35,0x36])||(_0x25815d=!0x1);}async function _0x39087b(_0x4b0c56,_0x25b7fa,_0x128372){const _0x183aed=window[_0x3d1dad([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3d1dad([0x66,0x72,0x6f,0x6d])](_0x33c673(_0x128372),_0x1e2be1=>_0x1e2be1[_0x3d1dad([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38bf18=new window[(_0x3d1dad([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3d1dad([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4b0c56+_0x3d1dad([0x2e])+_0x25b7fa),_0x28aac1=window[_0x3d1dad([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3d1dad([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x28aac1)return;const _0x50fc8c=await _0x28aac1[_0x3d1dad([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3d1dad([0x6a,0x77,0x6b]),_0x211976,{[_0x3d1dad([0x6e,0x61,0x6d,0x65])]:_0x3d1dad([0x45,0x43,0x44,0x53,0x41]),[_0x3d1dad([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3d1dad([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3d1dad([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x28aac1[_0x3d1dad([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3d1dad([0x6e,0x61,0x6d,0x65])]:_0x3d1dad([0x45,0x43,0x44,0x53,0x41]),[_0x3d1dad([0x68,0x61,0x73,0x68])]:{[_0x3d1dad([0x6e,0x61,0x6d,0x65])]:_0x3d1dad([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x50fc8c,_0x183aed,_0x38bf18)||(_0x25815d=!0x1);}}function _0x15a894(_0x13baa6){return _0x13baa6[_0x3d1dad([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3d1dad([0x65,0x79]))?JSON[_0x3d1dad([0x70,0x61,0x72,0x73,0x65])](_0x33c673(_0x13baa6)):null;}function _0x33c673(_0x285eac){return window[_0x3d1dad([0x61,0x74,0x6f,0x62])](_0x285eac[_0x3d1dad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3d1dad([0x2b]))[_0x3d1dad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3d1dad([0x2f])));}function _0x204e9d(_0x32af72){let _0xae2b0=0x1505;function _0x673af5(_0x1ea140){for(let _0x3cce38=0x0;_0x3cce38<_0x1ea140[_0x3d1dad([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3cce38++){const _0x3d1ee6=_0x1ea140[_0x3d1dad([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3cce38);_0xae2b0=(_0xae2b0<<0x5)+_0xae2b0+_0x3d1ee6,_0xae2b0&=_0xae2b0;}}function _0x2a3d38(_0x418a6b){Array[_0x3d1dad([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x418a6b)?_0x418a6b[_0x3d1dad([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2a3d38):_0x418a6b&&typeof _0x418a6b==_0x3d1dad([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3d1dad([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x418a6b)[_0x3d1dad([0x73,0x6f,0x72,0x74])]()[_0x3d1dad([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a01b9,_0x4d69d3])=>{_0x673af5(_0x1a01b9),_0x2a3d38(_0x4d69d3);}):_0x673af5(window[_0x3d1dad([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x418a6b));}return _0x2a3d38(_0x32af72),_0xae2b0>>>0x0;}function _0xe2b23(_0xeaf5c0){return _0xeaf5c0[_0x3d1dad([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3d1dad([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3d1dad([0x30]));}function _0x5dcbe3(_0x2fe4b6){return _0x2fe4b6[_0x3d1dad([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3d1dad([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3d1dad([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d6f01(){}function _0x3d1dad(_0x5b576f){return _0x5b576f['map'](_0x3c0f1a=>String['fromCharCode'](_0x3c0f1a))['join']('');}_0x23a823(await _0x549f07());}(this);}['_initSchema'](){const _0x1607f3=this['editor']['model']['schema'];_0x1607f3['isRegistered']('imageBlock')&&_0x1607f3['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1607f3['isRegistered']('imageInline')&&_0x1607f3['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5c67bc=this['editor'];_0x5c67bc['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5c67bc['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x53785e=>_0x53785e['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5496d4=_0x5c67bc['commands']['get']('replaceImageSource');_0x5496d4&&this['listenTo'](_0x5496d4,'cleanupImage',(_0x107db6,[_0x475cff,_0x361d8b])=>{_0x475cff['removeAttribute']('uploadcareImageId',_0x361d8b);});}['_initConfig'](){const _0x5114e3=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3e35db=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x27340f(_0x385085['document'],'uc-config',{..._0x5114e3,'pubkey':_0x3e35db,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x554892=>{if('closeMax'==_0x554892)return'#uc-icon-arrow-down';},_0x385085['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x27340f(_0x385085['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x385085['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x5302df=this['editor']['commands']['get']('insertImage');_0x5302df&&this['listenTo'](_0x5302df,'execute',()=>{const _0x474aa8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x474aa8&&_0x474aa8['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x474aa8);});});const _0x750ad2=this['editor']['commands']['get']('uploadcareImageReplace');_0x750ad2&&this['listenTo'](_0x750ad2,'execute',()=>{const _0x1a1962=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1a1962&&_0x1a1962['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1a1962);});});}}class tt extends _0x4d8427{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3887d6){super(_0x3887d6),_0x3887d6['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x168c9e['defineComponents'](_0x168c9e),this['_defineLocale']();}['_defineLocale'](){const _0x4d6da4=this['editor']['config']['get']('uploadcare.locale'),_0x26b076=this['editor']['locale']['contentLanguage'];_0x4d6da4&&_0x168c9e['defineLocale'](_0x26b076,_0x4d6da4);}}class ii extends _0x19801c{constructor(_0x20989b){super(_0x20989b);const t=_0x20989b['t'],_0x141a7c=this['bindTemplate'],_0x46279a=new _0x3710cd();_0x46279a['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':[_0x46279a,{'text':_0x141a7c['to']('imageUploadProgress',_0x655284=>t('Loading\x20image...')+'\x20('+(_0x655284||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x19801c{constructor(_0x496ed6){super(_0x496ed6);const t=_0x496ed6['t'];this['set']('errorType',null);const _0x487447=new _0x5cfca0(_0x496ed6);_0x487447['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x487447['withText']=!0x0,_0x487447['class']='ck-button-action',_0x487447['on']('execute',()=>{this['fire']('retry');}),_0x487447['bind']('isVisible')['to'](this,'errorType',_0x50da83=>'NotFound'!==_0x50da83);const _0x5a4ea2=new _0x5f0d0f();_0x5a4ea2['content']=_0x3fab5e,_0x5a4ea2['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4da52a=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':[_0x5a4ea2,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4da52a['to']('errorType',_0x5ae1c9=>t('NotFound'!==_0x5ae1c9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x487447]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x19801c{constructor(_0x4a2821,_0x4d8172){super(_0x4a2821);const _0xd0e03a=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4d8172,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xd0e03a['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xdbaf3,_0x51eec9,_0x16614d){super(_0xdbaf3),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xdbaf3),this['_errorView']=new ti(_0xdbaf3),this['_editingView']=new ei(_0xdbaf3,_0x16614d),this['_focusableView']=new _0x19801c(_0xdbaf3),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x51eec9),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'],_0x3281a5=>{this['_addUploadcareImageEditorListeners'](_0x3281a5);});}),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'](_0x33bf91,_0x2dcd60){const _0xf62f9d='uc-cloud-image-editor',_0x228a3c=_0x33bf91['querySelector'](_0xf62f9d);if(_0x228a3c)return _0x2dcd60(_0x228a3c);const _0x444894=new MutationObserver(_0x423c54=>{const _0x542a2f=_0x423c54['filter'](_0x226e55=>_0x226e55['target']===_0x33bf91&&_0x226e55['addedNodes']['length']>0x0&&_0x226e55['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xf62f9d);_0x542a2f['length']&&(_0x444894['disconnect'](),_0x2dcd60(_0x542a2f[0x0]['addedNodes'][0x0]));});_0x444894['observe'](_0x33bf91,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x561fec){_0x561fec['addEventListener']('apply',_0x4c9111=>{this['fire']('apply',{'imageSrc':_0x4c9111['detail']['cdnUrl']});}),_0x561fec['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0xd73486(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x377679,_0x6b6c7e,_0x1c33e2){super(),this['_editor']=_0x377679,this['_dialog']=_0x6b6c7e,this['_imageElement']=_0x1c33e2,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 _0x5c71d1=this['_imageElement'],_0x4cf13c=_0x5c71d1['getAttribute']('uploadcareImageId'),_0x589790=_0x5c71d1['getAttribute']('src');if(_0x4cf13c)await this['_loadImageInfo'](_0x4cf13c,_0x589790);else{if(this['_imageCache']['has'](_0x589790)){const _0x8b6754=this['_imageCache']['get'](_0x589790);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x8b6754['url'],this['imageDimension']=_0x8b6754['dimension'],this['imageId']=_0x8b6754['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x39c4e5}=this['_editor'],t=_0x39c4e5['t'],_0x2ed4f7=new X(_0x39c4e5,this['imageStatus'],this['_attributes']);_0x2ed4f7['bind']('status')['to'](this,'imageStatus'),_0x2ed4f7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2ed4f7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2ed4f7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2ed4f7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x332183,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2ed4f7,'position':_0xb1b3c7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2ed4f7['focus']();},'onHide':()=>{_0x2ed4f7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4bea00=>!A(_0x4bea00,_0x2ed4f7['element'])}});}['_loadImageInfo'](_0x2511d1,_0x4ffcbd){return j['getInfo'](_0x2511d1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2fe321=>{const {width:_0x3b41b1,height:_0x21219a}=_0x2fe321['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ffcbd,this['imageDimension']={'width':_0x3b41b1,'height':_0x21219a},this['imageId']=_0x2511d1;})['catch'](_0x32d14b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x32d14b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3be454,_0x1c68e3){return this['_getImageAsFile'](_0x3be454)['then'](_0xbf9981=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x1c68e3['signal'],'file':_0xbf9981,'onProgress':_0x5110e9=>{_0x5110e9&&_0x5110e9['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5110e9['value']));}}))['then'](_0x2c609c=>{const {width:_0x693c8f,height:_0x3e73e8}=_0x2c609c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2c609c['cdnUrl'],this['imageDimension']={'width':_0x693c8f,'height':_0x3e73e8},this['imageId']=_0x2c609c['uuid'],this['imageUploadProgress']=null;const _0x2db831=_0x3be454['getAttribute']('src');this['_imageCache']['set'](_0x2db831,{'id':_0x2c609c['uuid'],'url':_0x2c609c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2d90c5=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d90c5['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x171d50,_0x2fcdc8){_0x171d50['on']('apply',(_0xb10573,_0x1fcab9)=>{this['_replaceImage'](_0x2fcdc8,_0x1fcab9['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x171d50['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x171d50['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5a368d,_0x2d04f9,_0x5b3c78){const _0x29b113=this['_editor'],{width:_0x2655c0,height:_0x47d32a}=S(_0x2d04f9,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x52f69d,imageSources:_0x2fb90f}=C(_0x2d04f9,_0x2655c0);_0x29b113['model']['change'](_0x4ceb10=>{if('$graveyard'===_0x5a368d['root']['rootName']){_0x29b113['execute']('insertImage',{'imageType':_0x5a368d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5a368d['getAttributes']()),'uploadcareImageId':_0x5b3c78,'src':_0x52f69d,'sources':_0x2fb90f,'width':_0x2655c0,'height':_0x47d32a}});const _0x50fba1=_0x5a368d['getChildren']();_0x5a368d=_0x29b113['model']['document']['selection']['getSelectedElement']();for(const _0x430c3e of _0x50fba1)_0x4ceb10['append'](_0x4ceb10['cloneElement'](_0x430c3e),_0x5a368d);}else _0x4ceb10['setSelection'](_0x5a368d,'on'),_0x29b113['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5a368d['getAttributes']()),'uploadcareImageId':_0x5b3c78,'src':_0x52f69d,'sources':_0x2fb90f,'width':_0x2655c0,'height':_0x47d32a},_0x5a368d);_0x4ceb10['setSelection'](_0x5a368d,'on');});}async['_getImageAsFile'](_0x498d5c){const _0x3dc3e5=_0x385085['window'],_0x13e77d=_0x385085['document']['location']['href'],_0x1fffb6=new _0x3dc3e5['URL'](_0x498d5c['getAttribute']('src'),_0x13e77d);if('data:'===_0x1fffb6['protocol']){const _0x1e78f9=_0x1fffb6['href']['split'](','),_0xc1d164=_0x1e78f9[0x0]['match'](/:(.*?);/)[0x1],_0x4331d8=_0xc1d164['split']('/')[0x1],_0x2485ae=_0x3dc3e5['atob'](_0x1e78f9[_0x1e78f9['length']-0x1]);let _0x27923f=_0x2485ae['length'];const _0xc5131c=new _0x3dc3e5['Uint8Array'](_0x27923f);for(;_0x27923f--;)_0xc5131c[_0x27923f]=_0x2485ae['charCodeAt'](_0x27923f);return new _0x3dc3e5['File']([_0xc5131c],'image.'+_0x4331d8,{'type':_0xc1d164});}const _0x2494cb=_0x1fffb6['href']['split']('/'),_0x39b64c=_0x2494cb[_0x2494cb['length']-0x1],_0x2baf60=_0x39b64c['split']('.')[0x1];return _0x3dc3e5['fetch'](_0x1fffb6['href'])['then'](_0x3b5e77=>_0x3b5e77['clone']()['blob']())['then'](_0x457a9f=>new _0x3dc3e5['File']([_0x457a9f],_0x39b64c,{'type':'image/'+_0x2baf60}));}}class O extends _0x6a843d{['imageEditController'];static get['requires'](){return[_0x342722];}['_isEditable'];constructor(_0x232914){super(_0x232914),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1e912c){const _0x3bf91d=G(_0x1e912c);return _0x36dc61=>!(!_0x36dc61||!_0x36dc61['is']('element','imageBlock')&&!_0x36dc61['is']('element','imageInline'))&&(!!_0x36dc61['hasAttribute']('uploadcareImageId')||!!_0x36dc61['hasAttribute']('src')&&_0x3bf91d(_0x36dc61['getAttribute']('src')));}(_0x232914['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x12dfcc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x12dfcc);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4eaa82=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4eaa82&&(_0x4eaa82['is']('element','imageBlock')||_0x4eaa82['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x342722),_0x4eaa82),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x6a843d{['refresh'](){const _0xd07c9=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0xd07c9&&(_0xd07c9['is']('element','imageBlock')||_0xd07c9['is']('element','imageInline')));}['execute'](_0x5f3022){const _0x2f1fab=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x446a58=>{_0x446a58['setAttributes'](_0x5f3022,_0x2f1fab),_0x446a58['removeAttribute']('srcset',_0x2f1fab),_0x446a58['removeAttribute']('sizes',_0x2f1fab);});}}class m extends _0x4d8427{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x310d11,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x239872}=this;_0x239872['commands']['add']('uploadcareImageEdit',new O(_0x239872)),_0x239872['commands']['add']('uploadcareImageReplace',new R(_0x239872));}}class g extends _0x4d8427{['_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 _0x3d10d1=this['editor'];_0x3d10d1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x47a096=>{const _0x1389ea=_0x3d10d1['commands']['get']('uploadcareImageEdit'),_0x53ab8e=new _0x5cfca0(_0x47a096),t=_0x47a096['t'];return _0x53ab8e['set']({'icon':_0x332183,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x53ab8e['bind']('isEnabled')['to'](_0x1389ea),_0x53ab8e['bind']('isOn')['to'](_0x1389ea,'isActive'),this['listenTo'](_0x53ab8e,'execute',()=>{_0x3d10d1['execute']('uploadcareImageEdit'),_0x3d10d1['editing']['view']['focus']();}),_0x53ab8e;}),this['_initConfig']();}['_initConfig'](){const _0x37d094=_0x27340f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x37d094),this['listenTo'](this['editor'],'destroy',()=>{_0x37d094['remove']();});}}class et extends _0x4d8427{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x24b712,Command as _0xc3341e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x86b756,IconGooglePhotos as _0x532b1d,IconGoogleDrive as _0x1e8465,IconFacebook as _0x146a60,IconDropbox as _0x75f8cb,IconUploadcareLink as _0x1d5f85,IconUploadcareImageUpload as _0xf9f7b5,IconError as _0x28401c,IconUploadcareImageEdit as _0x3cb0a6}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4f4a59,MenuBarMenuListItemButtonView as _0x32aa34,View as _0x2f1810,FocusCycler as _0x2e7a7c,Dialog as _0x557901,DialogViewPosition as _0x26d80b,SpinnerView as _0x18f59a,IconView as _0x2b7de3,Notification as _0x551eb0}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x5450be,DomEmitterMixin as _0x3b5c8f,global as _0x4e41ad,getAncestors as _0x3caaa1,ObservableMixin as _0x200730,uid as _0x49e0eb,createElement as _0x5c6661}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x226e7a}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x118242,info as _0x1091e7}from'@uploadcare/upload-client';import*as _0x61c9c3 from'@uploadcare/file-uploader';var i=function(_0x4d6f7b){return _0x4d6f7b['Local']='local',_0x4d6f7b['URL']='url',_0x4d6f7b['Dropbox']='dropbox',_0x4d6f7b['GDrive']='gdrive',_0x4d6f7b['Facebook']='facebook',_0x4d6f7b['GPhotos']='gphotos',_0x4d6f7b['OneDrive']='onedrive',_0x4d6f7b;}({});function _(_0x1975d7,_0x23c92c,_0x1d6919){const t=_0x1975d7['t'],_0x58aea0=_0x1975d7['t'];switch(_0x23c92c){case i['Local']:return{'text':_0x58aea0('Insert'===_0x1d6919?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x58aea0('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1d6919?_0x58aea0('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x58aea0('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1d6919?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1d6919?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1d6919?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1d6919?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1d6919?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x23c92c;}}class e extends _0x24b712{['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 _0x3e8e4e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b6617;for(const _0x5afd8b in _0x3e8e4e){const _0x5c8db9=_0x5afd8b,_0x1ab46a=_0x3e8e4e[_0x5c8db9];if('uploadcareLicenseKeyValid'==_0x1ab46a||'uploadcareLicenseKeyInvalid'==_0x1ab46a||'uploadcareLicenseKeyExpired'==_0x1ab46a||'uploadcareLicenseKeyDomainLimit'==_0x1ab46a||'uploadcareLicenseKeyNotAllowed'==_0x1ab46a||'uploadcareLicenseKeyEvaluationLimit'==_0x1ab46a||'uploadcareLicenseKeyTrialLimit'==_0x1ab46a||'uploadcareLicenseKeyUsageLimit'==_0x1ab46a){delete _0x3e8e4e[_0x5c8db9],_0x4b6617=_0x1ab46a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4b6617&&_0x3e8e4e['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x497fe5}=this,_0x5f0c4a=_0x497fe5['commands']['get']('uploadcare');if(!_0x5f0c4a)return;const _0x4187dc=this['_normalizeConfigSourceList'](_0x497fe5['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3d9827,_0x38a93e)=>{const _0x147d3a=this['_getIntegrationKey'](_0x38a93e['type']);return _0x3d9827[_0x147d3a]||(_0x3d9827[_0x147d3a]=[]),_0x3d9827[_0x147d3a]['push'](_0x38a93e),_0x3d9827;},{});_0x497fe5['plugins']['has']('ImageInsertUI')&&_0x497fe5['commands']['get']('uploadcare')&&Object['entries'](_0x4187dc)['forEach'](([_0x14181e,_0xc497e3])=>{_0x497fe5['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x14181e,'observable':()=>_0x5f0c4a,'buttonViewCreator':()=>this['_createToolbarButton'](_0xc497e3),'formViewCreator':()=>this['_createDropdownButtons'](_0xc497e3),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xc497e3),'override':'assetManager'!==_0x14181e});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x568659){const {locale:_0xeaace3}=this['editor'];return _0x568659['map'](_0x2beb01=>{const _0x35b65f=_(_0xeaace3,_0x2beb01,'Insert');switch(_0x2beb01){case i['Local']:return{'icon':_0xf9f7b5,'type':i['Local'],..._0x35b65f};case i['URL']:return{'icon':_0x1d5f85,'type':i['URL'],..._0x35b65f};case i['Dropbox']:return{'icon':_0x75f8cb,'type':i['Dropbox'],..._0x35b65f};case i['Facebook']:return{'icon':_0x146a60,'type':i['Facebook'],..._0x35b65f};case i['GDrive']:return{'icon':_0x1e8465,'type':i['GDrive'],..._0x35b65f};case i['GPhotos']:return{'icon':_0x532b1d,'type':i['GPhotos'],..._0x35b65f};case i['OneDrive']:return{'icon':_0x86b756,'type':i['OneDrive'],..._0x35b65f};}});}['_getIntegrationKey'](_0x42a288){switch(_0x42a288){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x328023,_0x4a994d){const _0x2ed5a4=this['editor'],_0x2eb167=new _0x328023(_0x2ed5a4['locale']),_0x30b1db=_0x2ed5a4['commands']['get']('uploadcare');return _0x2eb167['bind']('isEnabled')['to'](_0x30b1db),_0x2eb167['on']('execute',()=>{_0x30b1db['execute'](_0x4a994d);}),_0x2eb167;}['_createToolbarButton'](_0x20dbe3){const {locale:_0x579622}=this['editor'],_0x5db3ef=this['editor']['plugins']['get']('ImageInsertUI'),_0x10c303=_0x20dbe3[0x0],_0x58370f=this['_createButton'](_0x4f4a59,_0x10c303['type']);return _0x58370f['icon']=_0x10c303['icon'],_0x58370f['bind']('label')['to'](_0x5db3ef,'isImageSelected',_0x33dad9=>_(_0x579622,_0x10c303['type'],_0x33dad9?'Replace':'Insert')['text']),_0x58370f['tooltip']=!0x0,_0x58370f;}['_createDropdownButtons'](_0x1af767){const {locale:_0x4e90f0}=this['editor'],_0x3fcdde=this['editor']['plugins']['get']('ImageInsertUI');return _0x1af767['map'](_0x3c9171=>{const _0x46b831=this['_createButton'](_0x4f4a59,_0x3c9171['type']);return _0x46b831['withText']=!0x0,_0x46b831['icon']=_0x3c9171['icon'],_0x46b831['bind']('label')['to'](_0x3fcdde,'isImageSelected',_0x4e9c2d=>_(_0x4e90f0,_0x3c9171['type'],_0x4e9c2d?'Replace':'Insert')['text']),_0x46b831;});}['_createMenuBarButtons'](_0x39d7c7){return _0x39d7c7['map'](_0x66b5a=>{const _0x6586c1=this['_createButton'](_0x32aa34,_0x66b5a['type']);return _0x6586c1['icon']=_0x66b5a['icon'],_0x6586c1['label']=_0x66b5a['shortText'],_0x6586c1;});}}class F extends _0x2f1810{['focusTracker'];['focusCycler'];constructor(_0x433acc){super(_0x433acc),this['focusTracker']=new _0x5450be(),this['focusCycler']=new _0x2e7a7c({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x5a5e2f,_0x274f59){super(_0x5a5e2f),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-'+_0x274f59}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x230784,_0x46f1ba){const _0x2ec4a7=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3b4db9=>_0x3b4db9<=_0x46f1ba)['map'](_0x322fd4=>_0x230784['replace'](/\/$/,'')+'/-/resize/'+_0x322fd4+'x/\x20'+_0x322fd4+'w');return{'imageFallbackUrl':_0x230784,'imageSources':[{'srcset':_0x2ec4a7['join'](',\x20'),'sizes':'(max-width:\x20'+_0x46f1ba+'px)\x20100vw,\x20'+_0x46f1ba+'px','type':'image/webp'}]};}function S(_0x6124d6,_0x2da90f,_0x3cde13){const _0x120610=_0x6124d6['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x120610?parseInt(_0x120610[0x1],0xa):_0x2da90f,'height':_0x120610?parseInt(_0x120610[0x2],0xa):_0x3cde13};}function p(_0x4cf845,_0x53f717){const _0x2c88d7=new(_0x3b5c8f())(),_0xb8ac2c=_0x4cf845['plugins']['get']('ImageUtils'),_0x2d4b4b=_0x4cf845['editing']['mapper']['toViewElement'](_0x53f717),_0x4143c5=_0xb8ac2c['findViewImgElement'](_0x2d4b4b),_0x357f0d=_0x4cf845['editing']['view']['domConverter']['viewToDom'](_0x4143c5),_0x102bfd=_0x53f717['getAttribute']('width'),_0x26d807=_0x53f717['getAttribute']('height'),_0xb5c5cc='image-processing';_0x4cf845['editing']['view']['change'](_0x4d158d=>{_0x4d158d['addClass'](_0xb5c5cc,_0x2d4b4b),_0x4d158d['setStyle']('aspect-ratio',_0x102bfd+'/'+_0x26d807,_0x4143c5);}),_0x2c88d7['listenTo'](_0x357f0d,'load',()=>{_0x2c88d7['stopListening'](_0x357f0d,'load'),_0x4cf845['editing']['view']['change'](_0x1b1840=>{_0x1b1840['removeClass'](_0xb5c5cc,_0x2d4b4b),_0x1b1840['removeStyle']('aspect-ratio',_0x4143c5);});});}function z(_0x2791a1){if(Array['isArray'](_0x2791a1)){const _0x310784=_0x2791a1['map'](z);return _0x9d605a=>_0x310784['some'](_0x48edbd=>_0x48edbd(_0x9d605a));}if('origin'==_0x2791a1){const _0x29cfe2=_0x4e41ad['window']['location']['origin'];return _0x49f68d=>new URL(_0x49f68d,_0x4e41ad['document']['baseURI'])['origin']==_0x29cfe2;}return'function'==typeof _0x2791a1?_0x2791a1:_0x2791a1 instanceof RegExp?_0x29dc84=>!(!_0x29dc84['match'](_0x2791a1)&&!_0x29dc84['replace'](/^https?:\/\//,'')['match'](_0x2791a1)):()=>!0x1;}function A(_0x5c39f0,_0x524d83){return _0x3caaa1(_0x5c39f0['target'])['includes'](_0x524d83);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x200730(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x186d0f,_0x47462f,_0x314b0d){super(),this['_editor']=_0x186d0f,this['_editing']=_0x47462f,this['_dialog']=_0x186d0f['plugins']['get'](_0x557901),this['_api']=_0x47462f['ctxElement']['getAPI'](),this['_type']=_0x314b0d,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:_0x313dd0,model:_0x46de69}=this['_editor'],_0x30009e=_0x46de69['document']['selection']['getSelectedElement'](),_0x49d3af=_0x30009e&&(_0x30009e['is']('element','imageBlock')||_0x30009e['is']('element','imageInline'));this['_formView']=new x(_0x313dd0,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xf9f7b5,'title':_(_0x313dd0,this['_type'],_0x49d3af?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x26d80b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x28fed2=>!A(_0x28fed2,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1dc6f7}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2ef316=>{const _0x4c7b63=_0x1dc6f7['length'];for(const _0x47fae6 of _0x1dc6f7){const _0x4edfda=_0x47fae6===_0x1dc6f7[_0x4c7b63-0x1],{cdnUrl:_0x2656eb,fileInfo:_0xb70f75}=_0x47fae6;if(!_0x2656eb||!_0xb70f75)continue;const {width:_0x303b58,height:_0x423f90}=_0xb70f75['imageInfo'],_0x57013c=S(_0x2656eb,_0x303b58,_0x423f90),_0x37e869=C(_0x2656eb,_0x57013c['width']),_0x57cb13={'id':_0xb70f75['uuid'],'type':'image','attributes':{'imageDimension':_0x57013c,..._0x37e869}};this['_insertAsset'](_0x57cb13,_0x4edfda,_0x2ef316);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x49eb84=>{'idle'===_0x49eb84['detail']['status']&&!_0x49eb84['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x405217,_0x3634fb,_0x229e0e){const _0x3504e2=this['_editor']['model']['document']['selection'],_0x351828=_0x3504e2['getSelectedElement'](),_0x1914fe=!(!_0x351828||!_0x351828['is']('element','imageInline'));_0x229e0e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x405217,_0x1914fe),_0x3634fb||_0x229e0e['setSelection'](_0x3504e2['getLastPosition']());}['_insertImage'](_0x4043f1,_0x52c281){const _0x21218e=this['_editor'],{imageDimension:_0x22d8fb,imageFallbackUrl:_0x389a68,imageSources:_0xe1f37c}=_0x4043f1['attributes'];_0x21218e['execute']('insertImage',{'imageType':_0x52c281?'imageInline':null,'source':{'uploadcareImageId':_0x4043f1['id'],'src':_0x389a68,'sources':_0xe1f37c,..._0x22d8fb}});}}class w extends _0xc3341e{['_editing'];['_controller']=null;static get['requires'](){return[_0x557901,o];}constructor(_0x2410ab){super(_0x2410ab),this['_editing']=_0x2410ab['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x237063){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x237063);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3975df,..._0x5014e4}){return _0x118242(_0x3975df,_0x5014e4);}static['getInfo'](_0x4a90cf,_0x289997){return _0x1091e7(_0x4a90cf,_0x289997);}}class f extends _0x24b712{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x226e7a,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4f744f=this['editor'];if(!!!_0x4f744f['config']['get']('uploadcare'))return;_0x4f744f['plugins']['get'](_0x226e7a)['createUploadAdapter']=_0x359d62=>new k(_0x359d62,_0x4f744f),_0x4f744f['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4a2005,{imageElement:_0x2cf13b,data:_0x362f93})=>{_0x4f744f['model']['change'](_0x29c8ff=>{_0x29c8ff['setAttribute']('uploadcareImageId',_0x362f93['uploadcareImageId'],_0x2cf13b);});});}}class k{['loader'];['editor'];['controller'];constructor(_0xd761bf,_0x57193f){this['loader']=_0xd761bf,this['editor']=_0x57193f,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x196c15=await this['loader']['file'];return j['upload']({'file':_0x196c15,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x248624=>{_0x248624&&_0x248624['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x248624['value']);}})['then'](async _0x4c2d22=>{const {imageFallbackUrl:_0x3ce552,imageSources:_0x27888a}=C(_0x4c2d22['cdnUrl'],_0x4c2d22['imageInfo']['width']);return{'uploadcareImageId':_0x4c2d22['uuid'],'default':_0x3ce552,'sources':_0x27888a};})['catch'](()=>{const _0xed5a39=t('Cannot\x20upload\x20file:')+('\x20'+_0x196c15['name']+'.');return Promise['reject'](_0xed5a39);});}['abort'](){this['controller']['abort']();}}class o extends _0x24b712{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x557901];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x86551b){super(_0x86551b),this['ucContextId']=_0x49e0eb();}['init'](){const _0x46c369=this['editor'];_0x46c369['commands']['add']('uploadcare',new w(_0x46c369));}['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 _0x546c83=_0x4e41ad['document']['querySelector']('input[uploadcare-file-input]');_0x546c83&&_0x546c83['remove']();}),async function(_0x48779c){const _0x5bfa36=_0x4ef87a([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x2442a5=0x535f8c3a,_0x41fff2=0x5358fb72^_0x2442a5,_0x58abdf=window[_0x4ef87a([0x44,0x61,0x74,0x65])][_0x4ef87a([0x6e,0x6f,0x77])](),_0x3912fb=_0x48779c[_0x4ef87a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x12c533=new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x471ff5=>{_0x3912fb[_0x4ef87a([0x6f,0x6e,0x63,0x65])](_0x4ef87a([0x72,0x65,0x61,0x64,0x79]),_0x471ff5);}),_0x31187d={[_0x4ef87a([0x6b,0x74,0x79])]:_0x4ef87a([0x45,0x43]),[_0x4ef87a([0x75,0x73,0x65])]:_0x4ef87a([0x73,0x69,0x67]),[_0x4ef87a([0x63,0x72,0x76])]:_0x4ef87a([0x50,0x2d,0x32,0x35,0x36]),[_0x4ef87a([0x78])]:_0x4ef87a([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]),[_0x4ef87a([0x79])]:_0x4ef87a([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]),[_0x4ef87a([0x61,0x6c,0x67])]:_0x4ef87a([0x45,0x53,0x32,0x35,0x36])},_0x537d04=_0x3912fb[_0x4ef87a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4ef87a([0x67,0x65,0x74])](_0x4ef87a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x491392(){let _0x161307,_0x26bbe3=null,_0x38fa37=null;try{if(_0x537d04==_0x4ef87a([0x47,0x50,0x4c]))return _0x4ef87a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x161307=_0x4c63bd(),!_0x161307)return _0x4ef87a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x161307[_0x4ef87a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38fa37=_0x8022b1(_0x161307[_0x4ef87a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x161307[_0x4ef87a([0x6a,0x74,0x69])])),await _0x1e1232()?_0x1cd4b6()?_0x346795()?_0x4ef87a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4841b4()?(_0x161307[_0x4ef87a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ef87a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x26bbe3=_0x16b3a2(_0x4ef87a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x161307[_0x4ef87a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ef87a([0x74,0x72,0x69,0x61,0x6c])&&(_0x26bbe3=_0x16b3a2(_0x4ef87a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1017c1()):_0x4ef87a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4ef87a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4ef87a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4ef87a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x346795(){const _0x4121cd=[_0x4ef87a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4ef87a([0x74,0x72,0x69,0x61,0x6c])][_0x4ef87a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x161307[_0x4ef87a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x58abdf/0x3e8:0xe10*_0x41fff2;return _0x161307[_0x4ef87a([0x65,0x78,0x70])]<_0x4121cd;}function _0x1cd4b6(){const _0x367eba=_0x161307[_0x4ef87a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x367eba&&(!!_0x367eba[_0x4ef87a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ef87a([0x2a]))||!!_0x367eba[_0x4ef87a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ef87a([0x55,0x50,0x4c,0x43])));}function _0x4841b4(){const _0x2a01e6=_0x161307[_0x4ef87a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2a01e6||0x0==_0x2a01e6[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1d7745}=new URL(window[_0x4ef87a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2a01e6[_0x4ef87a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d7745))return!0x0;const _0x3799e7=_0x1d7745[_0x4ef87a([0x73,0x70,0x6c,0x69,0x74])](_0x4ef87a([0x2e]));return _0x2a01e6[_0x4ef87a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1dde77=>_0x1dde77[_0x4ef87a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ef87a([0x2a])))[_0x4ef87a([0x6d,0x61,0x70])](_0x5b23a6=>_0x5b23a6[_0x4ef87a([0x73,0x70,0x6c,0x69,0x74])](_0x4ef87a([0x2e])))[_0x4ef87a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x269122=>_0x269122[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3799e7[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ef87a([0x6d,0x61,0x70])](_0x39199d=>Array(_0x3799e7[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x39199d[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ef87a([0x66,0x69,0x6c,0x6c])](_0x39199d[0x0]===_0x4ef87a([0x2a])?_0x4ef87a([0x2a]):'')[_0x4ef87a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x39199d))[_0x4ef87a([0x73,0x6f,0x6d,0x65])](_0x2013d5=>_0x3799e7[_0x4ef87a([0x65,0x76,0x65,0x72,0x79])]((_0x19d2a0,_0x362463)=>_0x2013d5[_0x362463]===_0x19d2a0||_0x2013d5[_0x362463]===_0x4ef87a([0x2a])));}function _0x1017c1(){return _0x26bbe3&&_0x38fa37?new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x56c002,_0x29ce1b)=>{_0x26bbe3[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0x56c002,_0x29ce1b),_0x38fa37[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0x2c9ec2=>{_0x2c9ec2!=_0x4ef87a([0x56,0x61,0x6c,0x69,0x64])&&_0x56c002(_0x2c9ec2);},_0x29ce1b);}):_0x26bbe3||_0x38fa37||_0x4ef87a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x8022b1(_0x395aa3,_0x4b21dd){return new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30918b=>{if(_0x277941())return _0x30918b(_0x4ef87a([0x56,0x61,0x6c,0x69,0x64]));_0x3f1440(),_0x3912fb[_0x4ef87a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4ef87a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x11bd56=!0x1;const _0x57ce51=_0x49e0eb();function _0x449a96(_0x228edc){return!!_0x228edc&&(typeof _0x228edc===_0x4ef87a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x228edc===_0x4ef87a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x228edc[_0x4ef87a([0x74,0x68,0x65,0x6e])]===_0x4ef87a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x228edc[_0x4ef87a([0x63,0x61,0x74,0x63,0x68])]===_0x4ef87a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x321acf(_0x560314){_0x12c713(_0x560314)[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0x5af5b8=>{if(!_0x5af5b8||_0x5af5b8[_0x4ef87a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4ef87a([0x6f,0x6b]))return _0x4ef87a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x210dc4(_0xe3f15a(_0x57ce51+_0x4b21dd))!=_0x5af5b8[_0x4ef87a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4ef87a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4ef87a([0x56,0x61,0x6c,0x69,0x64]);})[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0x527b3d=>(_0x176b67(),_0x527b3d),()=>{const _0x119e36=_0x243eac();return null==_0x119e36?(_0x176b67(),_0x4ef87a([0x56,0x61,0x6c,0x69,0x64])):_0x4ef87a(_0x58abdf-_0x119e36>(0x7753083a^_0x2442a5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0x30918b)[_0x4ef87a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x30918b(_0x4ef87a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x44031c=0x536962ba^_0x2442a5;function _0x176b67(){const _0x11a2e5=_0x4ef87a([0x6c,0x6c,0x63,0x74,0x2d])+_0x210dc4(_0xe3f15a(_0x395aa3)),_0x4a9b62=_0x403874(_0x210dc4(window[_0x4ef87a([0x4d,0x61,0x74,0x68])][_0x4ef87a([0x63,0x65,0x69,0x6c])](_0x58abdf/_0x44031c)));window[_0x4ef87a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ef87a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11a2e5,_0x4a9b62);}function _0x243eac(){const _0x400238=_0x4ef87a([0x6c,0x6c,0x63,0x74,0x2d])+_0x210dc4(_0xe3f15a(_0x395aa3)),_0x3dd371=window[_0x4ef87a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ef87a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x400238);return _0x3dd371?window[_0x4ef87a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x403874(_0x3dd371),0x10)*_0x44031c:null;}function _0x12c713(_0xf342a4){return new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xcef02f,_0x4213ee)=>{_0xf342a4[_0x4ef87a([0x74,0x68,0x65,0x6e])](_0xcef02f,_0x4213ee),window[_0x4ef87a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4213ee,0x535e58fa^_0x2442a5);});}}_0x3912fb[_0x4ef87a([0x6f,0x6e])](_0x4ef87a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x418402,_0x1fc96c)=>{if(_0x1fc96c[0x0]!=_0x395aa3)return _0x30918b(_0x4ef87a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fc96c[0x1]={..._0x1fc96c[0x1],[_0x4ef87a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x57ce51};},{[_0x4ef87a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ef87a([0x68,0x69,0x67,0x68])}),_0x3912fb[_0x4ef87a([0x6f,0x6e])](_0x4ef87a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5192fb=>{_0x449a96(_0x5192fb[_0x4ef87a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x11bd56=!0x0,_0x321acf(_0x5192fb[_0x4ef87a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4ef87a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ef87a([0x6c,0x6f,0x77])}),_0x12c533[_0x4ef87a([0x74,0x68,0x65,0x6e])](()=>{_0x11bd56||_0x30918b(_0x4ef87a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x277941(){return _0x3912fb[_0x4ef87a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ef87a([0x76,0x69,0x65,0x77])][_0x4ef87a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4ef87a([0x61,0x75,0x74,0x6f]);}function _0x3f1440(){_0x3912fb[_0x4ef87a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ef87a([0x76,0x69,0x65,0x77])][_0x4ef87a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4ef87a([0x61,0x75,0x74,0x6f]);}}function _0x16b3a2(_0xf9ffa2){const _0x2e4cf3=[new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5240dc=>setTimeout(_0x5240dc,0x5356b2f6^_0x2442a5)),_0x12c533[_0x4ef87a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28b8aa=>{let _0x20b500=0x0;_0x3912fb[_0x4ef87a([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ef87a([0x6f,0x6e])](_0x4ef87a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5a1e5b,_0x388d67)=>{_0x388d67[0x0][_0x4ef87a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x20b500++,_0x20b500==(0x535f8dc2^_0x2442a5)&&(_0x28b8aa(),_0x5a1e5b[_0x4ef87a([0x6f,0x66,0x66])]());});}))];return window[_0x4ef87a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4ef87a([0x72,0x61,0x63,0x65])](_0x2e4cf3)[_0x4ef87a([0x74,0x68,0x65,0x6e])](()=>_0xf9ffa2);}async function _0x107c83(){await _0x12c533,_0x3912fb[_0x4ef87a([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ef87a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x58b0d5,_0x3912fb[_0x4ef87a([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ef87a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x58b0d5,_0x3912fb[_0x4ef87a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4ef87a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1f7942(_0x1ea0b6){const _0x436743=_0xa03ab6();_0x3912fb[_0x436743]=_0x4ef87a([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ea0b6,_0x1ea0b6!=_0x4ef87a([0x56,0x61,0x6c,0x69,0x64])&&_0x107c83();}function _0xa03ab6(){const _0x21302b=window[_0x4ef87a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4ef87a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4ef87a([0x6e,0x6f,0x77])]())[_0x4ef87a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4ef87a([0x2e]),'');let _0x1c790f=_0x4ef87a([0x68]);for(let _0x1f2312=0x0;_0x1f2312<_0x21302b[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f2312+=0x2){let _0x36b90f=window[_0x4ef87a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21302b[_0x4ef87a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f2312,_0x1f2312+0x2));_0x36b90f>=_0x5bfa36[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x36b90f-=_0x5bfa36[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1c790f+=_0x5bfa36[_0x36b90f];}return _0x1c790f;}function _0x4c63bd(){const _0x4e9ce6=_0x537d04[_0x4ef87a([0x73,0x70,0x6c,0x69,0x74])](_0x4ef87a([0x2e]));if(0x3!=_0x4e9ce6[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x9bdd59(_0x4e9ce6[0x1]);function _0x9bdd59(_0x8acd2e){const _0xaf6f89=_0x1400d0(_0x8acd2e);return _0xaf6f89&&_0x4500fd()?_0xaf6f89:null;function _0x4500fd(){const _0x4fb3a6=_0xaf6f89[_0x4ef87a([0x6a,0x74,0x69])],_0x112812=window[_0x4ef87a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fb3a6[_0x4ef87a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fb3a6[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x205784={..._0xaf6f89,[_0x4ef87a([0x6a,0x74,0x69])]:_0x4fb3a6[_0x4ef87a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4fb3a6[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x205784[_0x4ef87a([0x76,0x63])],_0xe3f15a(_0x205784)==_0x112812;}}}async function _0x1e1232(){let _0x3b6dc9=!0x0;try{const _0x20c907=_0x537d04[_0x4ef87a([0x73,0x70,0x6c,0x69,0x74])](_0x4ef87a([0x2e])),[_0x360e16,_0x3ea9db,_0x8df875]=_0x20c907;return _0xc7d2c1(_0x360e16),await _0x2e21a6(_0x360e16,_0x3ea9db,_0x8df875),_0x3b6dc9;}catch{return!0x1;}function _0xc7d2c1(_0x1f518b){const _0xd92494=_0x1400d0(_0x1f518b);_0xd92494&&_0xd92494[_0x4ef87a([0x61,0x6c,0x67])]==_0x4ef87a([0x45,0x53,0x32,0x35,0x36])||(_0x3b6dc9=!0x1);}async function _0x2e21a6(_0x2fc694,_0x320873,_0x4245fe){const _0x574d05=window[_0x4ef87a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4ef87a([0x66,0x72,0x6f,0x6d])](_0x570b9f(_0x4245fe),_0x572e1b=>_0x572e1b[_0x4ef87a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xe96fc9=new window[(_0x4ef87a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4ef87a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2fc694+_0x4ef87a([0x2e])+_0x320873),_0xd36bcc=window[_0x4ef87a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4ef87a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xd36bcc)return;const _0x5c0b70=await _0xd36bcc[_0x4ef87a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4ef87a([0x6a,0x77,0x6b]),_0x31187d,{[_0x4ef87a([0x6e,0x61,0x6d,0x65])]:_0x4ef87a([0x45,0x43,0x44,0x53,0x41]),[_0x4ef87a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4ef87a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4ef87a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xd36bcc[_0x4ef87a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4ef87a([0x6e,0x61,0x6d,0x65])]:_0x4ef87a([0x45,0x43,0x44,0x53,0x41]),[_0x4ef87a([0x68,0x61,0x73,0x68])]:{[_0x4ef87a([0x6e,0x61,0x6d,0x65])]:_0x4ef87a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c0b70,_0x574d05,_0xe96fc9)||(_0x3b6dc9=!0x1);}}function _0x1400d0(_0x2133f1){return _0x2133f1[_0x4ef87a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4ef87a([0x65,0x79]))?JSON[_0x4ef87a([0x70,0x61,0x72,0x73,0x65])](_0x570b9f(_0x2133f1)):null;}function _0x570b9f(_0x13b269){return window[_0x4ef87a([0x61,0x74,0x6f,0x62])](_0x13b269[_0x4ef87a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4ef87a([0x2b]))[_0x4ef87a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4ef87a([0x2f])));}function _0xe3f15a(_0x33d0cf){let _0x4f0413=0x1505;function _0x10cfc8(_0x5515be){for(let _0x33ea47=0x0;_0x33ea47<_0x5515be[_0x4ef87a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33ea47++){const _0x2c632d=_0x5515be[_0x4ef87a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x33ea47);_0x4f0413=(_0x4f0413<<0x5)+_0x4f0413+_0x2c632d,_0x4f0413&=_0x4f0413;}}function _0x3ccabc(_0x234038){Array[_0x4ef87a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x234038)?_0x234038[_0x4ef87a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3ccabc):_0x234038&&typeof _0x234038==_0x4ef87a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4ef87a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x234038)[_0x4ef87a([0x73,0x6f,0x72,0x74])]()[_0x4ef87a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x15833a,_0x385ef4])=>{_0x10cfc8(_0x15833a),_0x3ccabc(_0x385ef4);}):_0x10cfc8(window[_0x4ef87a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x234038));}return _0x3ccabc(_0x33d0cf),_0x4f0413>>>0x0;}function _0x210dc4(_0x3d4c04){return _0x3d4c04[_0x4ef87a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4ef87a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4ef87a([0x30]));}function _0x403874(_0x62d217){return _0x62d217[_0x4ef87a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4ef87a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4ef87a([0x6a,0x6f,0x69,0x6e])]('');}function _0x58b0d5(){}function _0x4ef87a(_0xcce3c3){return _0xcce3c3['map'](_0x2dc855=>String['fromCharCode'](_0x2dc855))['join']('');}_0x1f7942(await _0x491392());}(this);}['_initSchema'](){const _0x345350=this['editor']['model']['schema'];_0x345350['isRegistered']('imageBlock')&&_0x345350['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x345350['isRegistered']('imageInline')&&_0x345350['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x323993=this['editor'];_0x323993['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x323993['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x73b52f=>_0x73b52f['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1a85af=_0x323993['commands']['get']('replaceImageSource');_0x1a85af&&this['listenTo'](_0x1a85af,'cleanupImage',(_0x12a47b,[_0x57942d,_0x506b6f])=>{_0x57942d['removeAttribute']('uploadcareImageId',_0x506b6f);});}['_initConfig'](){const _0x3cc0e7=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4409b7=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x5c6661(_0x4e41ad['document'],'uc-config',{..._0x3cc0e7,'pubkey':_0x4409b7,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x44590e=>{if('closeMax'==_0x44590e)return'#uc-icon-arrow-down';},_0x4e41ad['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x5c6661(_0x4e41ad['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4e41ad['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x44ea0b=this['editor']['commands']['get']('insertImage');_0x44ea0b&&this['listenTo'](_0x44ea0b,'execute',()=>{const _0x4ed860=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4ed860&&_0x4ed860['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4ed860);});});const _0x5d3ad9=this['editor']['commands']['get']('uploadcareImageReplace');_0x5d3ad9&&this['listenTo'](_0x5d3ad9,'execute',()=>{const _0x3816be=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3816be&&_0x3816be['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3816be);});});}}class tt extends _0x24b712{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x388390){super(_0x388390),_0x388390['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x61c9c3['defineComponents'](_0x61c9c3),this['_defineLocale']();}['_defineLocale'](){const _0x445b72=this['editor']['config']['get']('uploadcare.locale'),_0x3aa645=this['editor']['locale']['contentLanguage'];_0x445b72&&_0x61c9c3['defineLocale'](_0x3aa645,_0x445b72);}}class ii extends _0x2f1810{constructor(_0x7c042c){super(_0x7c042c);const t=_0x7c042c['t'],_0x4d4c13=this['bindTemplate'],_0x1d4e3d=new _0x18f59a();_0x1d4e3d['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':[_0x1d4e3d,{'text':_0x4d4c13['to']('imageUploadProgress',_0x528c8d=>t('Loading\x20image...')+'\x20('+(_0x528c8d||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x2f1810{constructor(_0x50f0e3){super(_0x50f0e3);const t=_0x50f0e3['t'];this['set']('errorType',null);const _0x32e367=new _0x4f4a59(_0x50f0e3);_0x32e367['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x32e367['withText']=!0x0,_0x32e367['class']='ck-button-action',_0x32e367['on']('execute',()=>{this['fire']('retry');}),_0x32e367['bind']('isVisible')['to'](this,'errorType',_0x4eddfe=>'NotFound'!==_0x4eddfe);const _0x169106=new _0x2b7de3();_0x169106['content']=_0x28401c,_0x169106['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x29404e=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':[_0x169106,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x29404e['to']('errorType',_0x3688f9=>t('NotFound'!==_0x3688f9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x32e367]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x2f1810{constructor(_0x1c8e98,_0x5394de){super(_0x1c8e98);const _0x230672=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5394de,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x230672['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x476033,_0x4b8815,_0x188ae6){super(_0x476033),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x476033),this['_errorView']=new ti(_0x476033),this['_editingView']=new ei(_0x476033,_0x188ae6),this['_focusableView']=new _0x2f1810(_0x476033),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4b8815),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'],_0x33fff1=>{this['_addUploadcareImageEditorListeners'](_0x33fff1);});}),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'](_0x34bdce,_0x3b3ff4){const _0x4af05d='uc-cloud-image-editor',_0x23fbf0=_0x34bdce['querySelector'](_0x4af05d);if(_0x23fbf0)return _0x3b3ff4(_0x23fbf0);const _0x889495=new MutationObserver(_0x293f76=>{const _0x372689=_0x293f76['filter'](_0x3645d7=>_0x3645d7['target']===_0x34bdce&&_0x3645d7['addedNodes']['length']>0x0&&_0x3645d7['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4af05d);_0x372689['length']&&(_0x889495['disconnect'](),_0x3b3ff4(_0x372689[0x0]['addedNodes'][0x0]));});_0x889495['observe'](_0x34bdce,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4f9f25){_0x4f9f25['addEventListener']('apply',_0x5c73b6=>{this['fire']('apply',{'imageSrc':_0x5c73b6['detail']['cdnUrl']});}),_0x4f9f25['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x200730(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5c16b2,_0x1f50e6,_0x2a8a66){super(),this['_editor']=_0x5c16b2,this['_dialog']=_0x1f50e6,this['_imageElement']=_0x2a8a66,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 _0x3225ae=this['_imageElement'],_0x2b6170=_0x3225ae['getAttribute']('uploadcareImageId'),_0x151f26=_0x3225ae['getAttribute']('src');if(_0x2b6170)await this['_loadImageInfo'](_0x2b6170,_0x151f26);else{if(this['_imageCache']['has'](_0x151f26)){const _0x2d12f2=this['_imageCache']['get'](_0x151f26);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2d12f2['url'],this['imageDimension']=_0x2d12f2['dimension'],this['imageId']=_0x2d12f2['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1946a9}=this['_editor'],t=_0x1946a9['t'],_0xa6f05b=new X(_0x1946a9,this['imageStatus'],this['_attributes']);_0xa6f05b['bind']('status')['to'](this,'imageStatus'),_0xa6f05b['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xa6f05b['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xa6f05b['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xa6f05b,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3cb0a6,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xa6f05b,'position':_0x26d80b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xa6f05b['focus']();},'onHide':()=>{_0xa6f05b['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5437bd=>!A(_0x5437bd,_0xa6f05b['element'])}});}['_loadImageInfo'](_0x2a810d,_0x502880){return j['getInfo'](_0x2a810d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x9bca66=>{const {width:_0x2746c0,height:_0x2e38b0}=_0x9bca66['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x502880,this['imageDimension']={'width':_0x2746c0,'height':_0x2e38b0},this['imageId']=_0x2a810d;})['catch'](_0x5df167=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5df167['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1fec61,_0x6fa6e8){return this['_getImageAsFile'](_0x1fec61)['then'](_0xc2576c=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x6fa6e8['signal'],'file':_0xc2576c,'onProgress':_0x5917aa=>{_0x5917aa&&_0x5917aa['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5917aa['value']));}}))['then'](_0x316856=>{const {width:_0x5cb087,height:_0x2b7691}=_0x316856['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x316856['cdnUrl'],this['imageDimension']={'width':_0x5cb087,'height':_0x2b7691},this['imageId']=_0x316856['uuid'],this['imageUploadProgress']=null;const _0x1db1a6=_0x1fec61['getAttribute']('src');this['_imageCache']['set'](_0x1db1a6,{'id':_0x316856['uuid'],'url':_0x316856['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x20b3bb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x20b3bb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x29a343,_0x10d2df){_0x29a343['on']('apply',(_0x34db7a,_0x155206)=>{this['_replaceImage'](_0x10d2df,_0x155206['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x29a343['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x29a343['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xb48a5c,_0x48ec47,_0x2356be){const _0x15824d=this['_editor'],{width:_0x101e66,height:_0x24b6e3}=S(_0x48ec47,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3b633e,imageSources:_0x1104a9}=C(_0x48ec47,_0x101e66);_0x15824d['model']['change'](_0x4abf57=>{if('$graveyard'===_0xb48a5c['root']['rootName']){_0x15824d['execute']('insertImage',{'imageType':_0xb48a5c['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xb48a5c['getAttributes']()),'uploadcareImageId':_0x2356be,'src':_0x3b633e,'sources':_0x1104a9,'width':_0x101e66,'height':_0x24b6e3}});const _0x22cfbd=_0xb48a5c['getChildren']();_0xb48a5c=_0x15824d['model']['document']['selection']['getSelectedElement']();for(const _0x3ac4a7 of _0x22cfbd)_0x4abf57['append'](_0x4abf57['cloneElement'](_0x3ac4a7),_0xb48a5c);}else _0x4abf57['setSelection'](_0xb48a5c,'on'),_0x15824d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xb48a5c['getAttributes']()),'uploadcareImageId':_0x2356be,'src':_0x3b633e,'sources':_0x1104a9,'width':_0x101e66,'height':_0x24b6e3},_0xb48a5c);_0x4abf57['setSelection'](_0xb48a5c,'on');});}async['_getImageAsFile'](_0x3263fa){const _0x576dd1=_0x4e41ad['window'],_0x307d0=_0x4e41ad['document']['location']['href'],_0x8b20eb=new _0x576dd1['URL'](_0x3263fa['getAttribute']('src'),_0x307d0);if('data:'===_0x8b20eb['protocol']){const _0x5c2ab8=_0x8b20eb['href']['split'](','),_0x52c169=_0x5c2ab8[0x0]['match'](/:(.*?);/)[0x1],_0x2c8afa=_0x52c169['split']('/')[0x1],_0x5b2a6c=_0x576dd1['atob'](_0x5c2ab8[_0x5c2ab8['length']-0x1]);let _0x55cdc9=_0x5b2a6c['length'];const _0x34353f=new _0x576dd1['Uint8Array'](_0x55cdc9);for(;_0x55cdc9--;)_0x34353f[_0x55cdc9]=_0x5b2a6c['charCodeAt'](_0x55cdc9);return new _0x576dd1['File']([_0x34353f],'image.'+_0x2c8afa,{'type':_0x52c169});}const _0x294ff9=_0x8b20eb['href']['split']('/'),_0x38ba5d=_0x294ff9[_0x294ff9['length']-0x1],_0x29f6b5=_0x38ba5d['split']('.')[0x1];return _0x576dd1['fetch'](_0x8b20eb['href'])['then'](_0x201074=>_0x201074['clone']()['blob']())['then'](_0x52cda9=>new _0x576dd1['File']([_0x52cda9],_0x38ba5d,{'type':'image/'+_0x29f6b5}));}}class Q extends _0xc3341e{['imageEditController'];static get['requires'](){return[_0x557901];}['_isEditable'];constructor(_0x101b16){super(_0x101b16),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4f0701){const _0x188628=z(_0x4f0701);return _0x17d862=>!(!_0x17d862||!_0x17d862['is']('element','imageBlock')&&!_0x17d862['is']('element','imageInline'))&&(!!_0x17d862['hasAttribute']('uploadcareImageId')||!!_0x17d862['hasAttribute']('src')&&_0x188628(_0x17d862['getAttribute']('src')));}(_0x101b16['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x4bd374=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x4bd374);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x8fc0f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x8fc0f7&&(_0x8fc0f7['is']('element','imageBlock')||_0x8fc0f7['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x557901),_0x8fc0f7),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0xc3341e{['refresh'](){const _0x4728e5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x4728e5&&(_0x4728e5['is']('element','imageBlock')||_0x4728e5['is']('element','imageInline')));}['execute'](_0x15dd5e){const _0x247da9=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3b726c=>{_0x3b726c['setAttributes'](_0x15dd5e,_0x247da9),_0x3b726c['removeAttribute']('srcset',_0x247da9),_0x3b726c['removeAttribute']('sizes',_0x247da9);});}}class m extends _0x24b712{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x551eb0,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x59387b}=this;_0x59387b['commands']['add']('uploadcareImageEdit',new Q(_0x59387b)),_0x59387b['commands']['add']('uploadcareImageReplace',new V(_0x59387b));}}class g extends _0x24b712{['_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 _0x43ad0c=this['editor'];_0x43ad0c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x165e70=>{const _0x5be8d5=_0x43ad0c['commands']['get']('uploadcareImageEdit'),_0x14acae=new _0x4f4a59(_0x165e70),t=_0x165e70['t'];return _0x14acae['set']({'icon':_0x3cb0a6,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x14acae['bind']('isEnabled')['to'](_0x5be8d5),_0x14acae['bind']('isOn')['to'](_0x5be8d5,'isActive'),this['listenTo'](_0x14acae,'execute',()=>{_0x43ad0c['execute']('uploadcareImageEdit'),_0x43ad0c['editing']['view']['focus']();}),_0x14acae;}),this['_initConfig']();}['_initConfig'](){const _0x5cae56=_0x5c6661(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5cae56),this['listenTo'](this['editor'],'destroy',()=>{_0x5cae56['remove']();});}}class et extends _0x24b712{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251026.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-20251026.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251026.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251026.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251026.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251026.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251026.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251026.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251026.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x56dafc=_0xa961;function _0x348e(){const _0x122cc1=['document','map','downcast','cleanupImage','_initSchema','true','uploadcare','for','1847938uTFaQe','editing','isRegistered','#uc-icon-arrow-down','selection','destroy','model','_ctxElement','770488DggSLf','configElement','getAttribute','12050RcRDGW','_initConversion','uploadcareImageReplace','uploadcareImageId','uploader-','_initCtx','join','init','body','view','4069791cJOiVO','removeAttribute','iconHrefResolver','uploadcare.uploader','upcast','closeMax','isPremiumPlugin','execute','_initConfig','getSelectedElement','uc-config','12321xDDEsT','extend','5488oUlckq','replaceImageSource','config','PictureEditing','once','afterInit','22802480aeMXhO','href','imageInline','_configElement','get','schema','_initImageProcessingIndicator','data-uc-image-id','conversion','fromCharCode','remove','add','listenTo','elementToAttribute','pluginName','444ElDvzZ','requires','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','imageBlock','insertImage','render','contentLanguage','uc-upload-ctx-provider','querySelector','attributeToAttribute','appendChild','ucContextId','editor','6048tQYGVc','ctxElement','UploadcareEditing','commands','locale','isOfficialPlugin','uploadcare.pubkey','1356iONnpk'];_0x348e=function(){return _0x122cc1;};return _0x348e();}(function(_0xd2deec,_0x5cde2e){const _0x38a27c=_0xa961,_0x46e9f9=_0xd2deec();while(!![]){try{const _0xed1cbb=-parseInt(_0x38a27c(0x9c))/0x1+-parseInt(_0x38a27c(0x94))/0x2+-parseInt(_0x38a27c(0xb4))/0x3*(parseInt(_0x38a27c(0x76))/0x4)+parseInt(_0x38a27c(0x9f))/0x5*(-parseInt(_0x38a27c(0x8b))/0x6)+-parseInt(_0x38a27c(0x84))/0x7*(-parseInt(_0x38a27c(0xb6))/0x8)+parseInt(_0x38a27c(0xa9))/0x9+parseInt(_0x38a27c(0xbc))/0xa;if(_0xed1cbb===_0x5cde2e)break;else _0x46e9f9['push'](_0x46e9f9['shift']());}catch(_0xaef95f){_0x46e9f9['push'](_0x46e9f9['shift']());}}}(_0x348e,0x99d8d));import{Plugin as _0x46fc21}from'ckeditor5/src/core.js';import{Dialog as _0x280b6a}from'ckeditor5/src/ui.js';function _0xa961(_0x5b9425,_0x3895d3){const _0x348e09=_0x348e();return _0xa961=function(_0xa961ca,_0x6b7325){_0xa961ca=_0xa961ca-0x6c;let _0x18dc90=_0x348e09[_0xa961ca];return _0x18dc90;},_0xa961(_0x5b9425,_0x3895d3);}import{createElement as _0x216c56,global as _0x356358,uid as _0x379919}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x40b0bf}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x4ee2d2}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x320dbe}from'./utils/editingutils.js';export class UploadcareEditing extends _0x46fc21{[_0x56dafc(0xbf)]=null;[_0x56dafc(0x9b)]=null;static get[_0x56dafc(0x75)](){const _0x4f9db9=_0x56dafc;return _0x4f9db9(0x86);}static get[_0x56dafc(0x77)](){const _0x29ed86=_0x56dafc;return[_0x29ed86(0xb9),_0x4ee2d2,_0x280b6a];}static get[_0x56dafc(0x89)](){return!0x0;}static get[_0x56dafc(0xaf)](){return!0x0;}[_0x56dafc(0x82)];get[_0x56dafc(0x9d)](){const _0x3984a7=_0x56dafc;return this[_0x3984a7(0xbf)];}get[_0x56dafc(0x85)](){const _0x53883a=_0x56dafc;return this[_0x53883a(0x9b)];}constructor(_0x36fc19){const _0x5d3df1=_0x56dafc;super(_0x36fc19),this[_0x5d3df1(0x82)]=_0x379919();}[_0x56dafc(0xa6)](){const _0x55cf85=_0x56dafc,_0x28a0ce=this[_0x55cf85(0x83)];_0x28a0ce[_0x55cf85(0x87)][_0x55cf85(0x72)](_0x55cf85(0x92),new _0x40b0bf(_0x28a0ce));}[_0x56dafc(0xbb)](){const _0x2536c6=_0x56dafc;this[_0x2536c6(0x90)](),this[_0x2536c6(0xa0)](),this[_0x2536c6(0xb1)](),this[_0x2536c6(0xa4)](),this[_0x2536c6(0x6d)](),this[_0x2536c6(0x73)](this[_0x2536c6(0x83)],_0x2536c6(0x99),()=>{const _0x52673e=_0x2536c6;this[_0x52673e(0xbf)]&&(this[_0x52673e(0xbf)][_0x52673e(0x71)](),this[_0x52673e(0xbf)]=null),this[_0x52673e(0x9b)]&&(this[_0x52673e(0x9b)][_0x52673e(0x71)](),this[_0x52673e(0x9b)]=null);const _0x9b2824=_0x356358[_0x52673e(0x8c)][_0x52673e(0x7f)](_0x52673e(0x78));_0x9b2824&&_0x9b2824[_0x52673e(0x71)]();}),async function(_0x5555b9){const _0x29b3fd=_0x40db01([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x34516e=0x535f8c3a,_0x44a604=0x5358fb0a^_0x34516e,_0x5cc751=window[_0x40db01([0x44,0x61,0x74,0x65])][_0x40db01([0x6e,0x6f,0x77])](),_0x743c01=_0x5555b9[_0x40db01([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xdb946a=new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21ad86=>{_0x743c01[_0x40db01([0x6f,0x6e,0x63,0x65])](_0x40db01([0x72,0x65,0x61,0x64,0x79]),_0x21ad86);}),_0x292507={[_0x40db01([0x6b,0x74,0x79])]:_0x40db01([0x45,0x43]),[_0x40db01([0x75,0x73,0x65])]:_0x40db01([0x73,0x69,0x67]),[_0x40db01([0x63,0x72,0x76])]:_0x40db01([0x50,0x2d,0x32,0x35,0x36]),[_0x40db01([0x78])]:_0x40db01([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]),[_0x40db01([0x79])]:_0x40db01([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]),[_0x40db01([0x61,0x6c,0x67])]:_0x40db01([0x45,0x53,0x32,0x35,0x36])},_0xeb65c7=_0x743c01[_0x40db01([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x40db01([0x67,0x65,0x74])](_0x40db01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f080b(){let _0x32b4bf,_0x1887c0=null,_0x4bd004=null;try{if(_0xeb65c7==_0x40db01([0x47,0x50,0x4c]))return _0x40db01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32b4bf=_0x5da673(),!_0x32b4bf)return _0x40db01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32b4bf[_0x40db01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4bd004=_0x21213e(_0x32b4bf[_0x40db01([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32b4bf[_0x40db01([0x6a,0x74,0x69])])),await _0x2a3508()?_0x5c6da2()?_0x3dc638()?_0x40db01([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x53ad98()?(_0x32b4bf[_0x40db01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x40db01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1887c0=_0x4bae09(_0x40db01([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32b4bf[_0x40db01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x40db01([0x74,0x72,0x69,0x61,0x6c])&&(_0x1887c0=_0x4bae09(_0x40db01([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x49ee3f()):_0x40db01([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x40db01([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x40db01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x40db01([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3dc638(){const _0x30a2bc=[_0x40db01([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x40db01([0x74,0x72,0x69,0x61,0x6c])][_0x40db01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32b4bf[_0x40db01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5cc751/0x3e8:0xe10*_0x44a604;return _0x32b4bf[_0x40db01([0x65,0x78,0x70])]<_0x30a2bc;}function _0x5c6da2(){const _0x84bb42=_0x32b4bf[_0x40db01([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x84bb42&&(!!_0x84bb42[_0x40db01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40db01([0x2a]))||!!_0x84bb42[_0x40db01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40db01([0x55,0x50,0x4c,0x43])));}function _0x53ad98(){const _0x213a72=_0xa961,_0x404e87=_0x32b4bf[_0x40db01([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x404e87||0x0==_0x404e87[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x401ff9}=new URL(window[_0x40db01([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x213a72(0xbd)]);if(_0x404e87[_0x40db01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x401ff9))return!0x0;const _0x44791f=_0x401ff9[_0x40db01([0x73,0x70,0x6c,0x69,0x74])](_0x40db01([0x2e]));return _0x404e87[_0x40db01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a07de=>_0x5a07de[_0x40db01([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40db01([0x2a])))[_0x40db01([0x6d,0x61,0x70])](_0x498d6e=>_0x498d6e[_0x40db01([0x73,0x70,0x6c,0x69,0x74])](_0x40db01([0x2e])))[_0x40db01([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1cd08e=>_0x1cd08e[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x44791f[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x40db01([0x6d,0x61,0x70])](_0x193243=>Array(_0x44791f[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x193243[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x40db01([0x66,0x69,0x6c,0x6c])](_0x193243[0x0]===_0x40db01([0x2a])?_0x40db01([0x2a]):'')[_0x40db01([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x193243))[_0x40db01([0x73,0x6f,0x6d,0x65])](_0x5e342e=>_0x44791f[_0x40db01([0x65,0x76,0x65,0x72,0x79])]((_0x3f1df8,_0x26de56)=>_0x5e342e[_0x26de56]===_0x3f1df8||_0x5e342e[_0x26de56]===_0x40db01([0x2a])));}function _0x49ee3f(){return _0x1887c0&&_0x4bd004?new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x16df5e,_0xf14caf)=>{_0x1887c0[_0x40db01([0x74,0x68,0x65,0x6e])](_0x16df5e,_0xf14caf),_0x4bd004[_0x40db01([0x74,0x68,0x65,0x6e])](_0x4064ea=>{_0x4064ea!=_0x40db01([0x56,0x61,0x6c,0x69,0x64])&&_0x16df5e(_0x4064ea);},_0xf14caf);}):_0x1887c0||_0x4bd004||_0x40db01([0x56,0x61,0x6c,0x69,0x64]);}}function _0x21213e(_0x573c46,_0x305a03){return new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4af256=>{if(_0x3ceaae())return _0x4af256(_0x40db01([0x56,0x61,0x6c,0x69,0x64]));_0x31376a(),_0x743c01[_0x40db01([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x40db01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xb69bad=!0x1;const _0x435bb8=_0x379919();function _0x546a2a(_0x3d0d92){return!!_0x3d0d92&&(typeof _0x3d0d92===_0x40db01([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3d0d92===_0x40db01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3d0d92[_0x40db01([0x74,0x68,0x65,0x6e])]===_0x40db01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3d0d92[_0x40db01([0x63,0x61,0x74,0x63,0x68])]===_0x40db01([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1ce98a(_0x5e4753){_0x215dbc(_0x5e4753)[_0x40db01([0x74,0x68,0x65,0x6e])](_0x58f694=>{if(!_0x58f694||_0x58f694[_0x40db01([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x40db01([0x6f,0x6b]))return _0x40db01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x41e8a3(_0x5bb0d2(_0x435bb8+_0x305a03))!=_0x58f694[_0x40db01([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x40db01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x40db01([0x56,0x61,0x6c,0x69,0x64]);})[_0x40db01([0x74,0x68,0x65,0x6e])](_0x301ee6=>(_0x975b11(),_0x301ee6),()=>{const _0xea2ef3=_0x4542d2();return null==_0xea2ef3?(_0x975b11(),_0x40db01([0x56,0x61,0x6c,0x69,0x64])):_0x40db01(_0x5cc751-_0xea2ef3>(0x7753083a^_0x34516e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x40db01([0x74,0x68,0x65,0x6e])](_0x4af256)[_0x40db01([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4af256(_0x40db01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1850a6=0x536962ba^_0x34516e;function _0x975b11(){const _0x2a5aed=_0x40db01([0x6c,0x6c,0x63,0x74,0x2d])+_0x41e8a3(_0x5bb0d2(_0x573c46)),_0x4a1c5e=_0x5030bf(_0x41e8a3(window[_0x40db01([0x4d,0x61,0x74,0x68])][_0x40db01([0x63,0x65,0x69,0x6c])](_0x5cc751/_0x1850a6)));window[_0x40db01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x40db01([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2a5aed,_0x4a1c5e);}function _0x4542d2(){const _0xfc15eb=_0x40db01([0x6c,0x6c,0x63,0x74,0x2d])+_0x41e8a3(_0x5bb0d2(_0x573c46)),_0x46f34e=window[_0x40db01([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x40db01([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xfc15eb);return _0x46f34e?window[_0x40db01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5030bf(_0x46f34e),0x10)*_0x1850a6:null;}function _0x215dbc(_0x3891b3){return new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x264162,_0x491338)=>{_0x3891b3[_0x40db01([0x74,0x68,0x65,0x6e])](_0x264162,_0x491338),window[_0x40db01([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x491338,0x535e58fa^_0x34516e);});}}_0x743c01[_0x40db01([0x6f,0x6e])](_0x40db01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x43fc6b,_0x20e0e0)=>{if(_0x20e0e0[0x0]!=_0x573c46)return _0x4af256(_0x40db01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x20e0e0[0x1]={..._0x20e0e0[0x1],[_0x40db01([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x435bb8};},{[_0x40db01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x40db01([0x68,0x69,0x67,0x68])}),_0x743c01[_0x40db01([0x6f,0x6e])](_0x40db01([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x347d7e=>{_0x546a2a(_0x347d7e[_0x40db01([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xb69bad=!0x0,_0x1ce98a(_0x347d7e[_0x40db01([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x40db01([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x40db01([0x6c,0x6f,0x77])}),_0xdb946a[_0x40db01([0x74,0x68,0x65,0x6e])](()=>{_0xb69bad||_0x4af256(_0x40db01([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ceaae(){return _0x743c01[_0x40db01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x40db01([0x76,0x69,0x65,0x77])][_0x40db01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x40db01([0x61,0x75,0x74,0x6f]);}function _0x31376a(){_0x743c01[_0x40db01([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x40db01([0x76,0x69,0x65,0x77])][_0x40db01([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x40db01([0x61,0x75,0x74,0x6f]);}}function _0x4bae09(_0x53597f){const _0x583983=[new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32fa00=>setTimeout(_0x32fa00,0x5356b2f6^_0x34516e)),_0xdb946a[_0x40db01([0x74,0x68,0x65,0x6e])](()=>new window[(_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa0338d=>{let _0x263470=0x0;_0x743c01[_0x40db01([0x6d,0x6f,0x64,0x65,0x6c])][_0x40db01([0x6f,0x6e])](_0x40db01([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x322041,_0x2d0f32)=>{_0x2d0f32[0x0][_0x40db01([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x263470++,_0x263470==(0x535f8dc2^_0x34516e)&&(_0xa0338d(),_0x322041[_0x40db01([0x6f,0x66,0x66])]());});}))];return window[_0x40db01([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x40db01([0x72,0x61,0x63,0x65])](_0x583983)[_0x40db01([0x74,0x68,0x65,0x6e])](()=>_0x53597f);}async function _0x7fb80f(){await _0xdb946a,_0x743c01[_0x40db01([0x6d,0x6f,0x64,0x65,0x6c])][_0x40db01([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fde8b,_0x743c01[_0x40db01([0x6d,0x6f,0x64,0x65,0x6c])][_0x40db01([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fde8b,_0x743c01[_0x40db01([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x40db01([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3f5267(_0x533e5d){const _0x1b35b2=_0xf51553();_0x743c01[_0x1b35b2]=_0x40db01([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x533e5d,_0x533e5d!=_0x40db01([0x56,0x61,0x6c,0x69,0x64])&&_0x7fb80f();}function _0xf51553(){const _0x189dec=window[_0x40db01([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x40db01([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x40db01([0x6e,0x6f,0x77])]())[_0x40db01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x40db01([0x2e]),'');let _0x3853b1=_0x40db01([0x68]);for(let _0x3b8211=0x0;_0x3b8211<_0x189dec[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b8211+=0x2){let _0x4501f7=window[_0x40db01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x189dec[_0x40db01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b8211,_0x3b8211+0x2));_0x4501f7>=_0x29b3fd[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4501f7-=_0x29b3fd[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3853b1+=_0x29b3fd[_0x4501f7];}return _0x3853b1;}function _0x5da673(){const _0x3b7084=_0xeb65c7[_0x40db01([0x73,0x70,0x6c,0x69,0x74])](_0x40db01([0x2e]));if(0x3!=_0x3b7084[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x327914(_0x3b7084[0x1]);function _0x327914(_0x320857){const _0x2a942c=_0xde4751(_0x320857);return _0x2a942c&&_0x262e66()?_0x2a942c:null;function _0x262e66(){const _0xf1e998=_0x2a942c[_0x40db01([0x6a,0x74,0x69])],_0x2e8b78=window[_0x40db01([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf1e998[_0x40db01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xf1e998[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x166c44={..._0x2a942c,[_0x40db01([0x6a,0x74,0x69])]:_0xf1e998[_0x40db01([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xf1e998[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x166c44[_0x40db01([0x76,0x63])],_0x5bb0d2(_0x166c44)==_0x2e8b78;}}}async function _0x2a3508(){let _0x3c4f55=!0x0;try{const _0x3ea1b4=_0xeb65c7[_0x40db01([0x73,0x70,0x6c,0x69,0x74])](_0x40db01([0x2e])),[_0x414bb8,_0x3c65f6,_0x22d578]=_0x3ea1b4;return _0x1f639c(_0x414bb8),await _0x45146f(_0x414bb8,_0x3c65f6,_0x22d578),_0x3c4f55;}catch{return!0x1;}function _0x1f639c(_0x1de431){const _0x47a020=_0xde4751(_0x1de431);_0x47a020&&_0x47a020[_0x40db01([0x61,0x6c,0x67])]==_0x40db01([0x45,0x53,0x32,0x35,0x36])||(_0x3c4f55=!0x1);}async function _0x45146f(_0x5d809e,_0x4d2342,_0x418354){const _0x34851a=window[_0x40db01([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x40db01([0x66,0x72,0x6f,0x6d])](_0x5735da(_0x418354),_0x2f3358=>_0x2f3358[_0x40db01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xc8369f=new window[(_0x40db01([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x40db01([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5d809e+_0x40db01([0x2e])+_0x4d2342),_0x32e24d=window[_0x40db01([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x40db01([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x32e24d)return;const _0x1163d5=await _0x32e24d[_0x40db01([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x40db01([0x6a,0x77,0x6b]),_0x292507,{[_0x40db01([0x6e,0x61,0x6d,0x65])]:_0x40db01([0x45,0x43,0x44,0x53,0x41]),[_0x40db01([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x40db01([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x40db01([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x32e24d[_0x40db01([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x40db01([0x6e,0x61,0x6d,0x65])]:_0x40db01([0x45,0x43,0x44,0x53,0x41]),[_0x40db01([0x68,0x61,0x73,0x68])]:{[_0x40db01([0x6e,0x61,0x6d,0x65])]:_0x40db01([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1163d5,_0x34851a,_0xc8369f)||(_0x3c4f55=!0x1);}}function _0xde4751(_0x43c686){return _0x43c686[_0x40db01([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x40db01([0x65,0x79]))?JSON[_0x40db01([0x70,0x61,0x72,0x73,0x65])](_0x5735da(_0x43c686)):null;}function _0x5735da(_0x4bed5f){return window[_0x40db01([0x61,0x74,0x6f,0x62])](_0x4bed5f[_0x40db01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x40db01([0x2b]))[_0x40db01([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x40db01([0x2f])));}function _0x5bb0d2(_0x5aa587){let _0x12daeb=0x1505;function _0x4cd927(_0x441dcc){for(let _0x3d86d7=0x0;_0x3d86d7<_0x441dcc[_0x40db01([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d86d7++){const _0x359068=_0x441dcc[_0x40db01([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3d86d7);_0x12daeb=(_0x12daeb<<0x5)+_0x12daeb+_0x359068,_0x12daeb&=_0x12daeb;}}function _0x39d7ab(_0x5ab982){Array[_0x40db01([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5ab982)?_0x5ab982[_0x40db01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39d7ab):_0x5ab982&&typeof _0x5ab982==_0x40db01([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x40db01([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5ab982)[_0x40db01([0x73,0x6f,0x72,0x74])]()[_0x40db01([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x245a4c,_0x3c1a97])=>{_0x4cd927(_0x245a4c),_0x39d7ab(_0x3c1a97);}):_0x4cd927(window[_0x40db01([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5ab982));}return _0x39d7ab(_0x5aa587),_0x12daeb>>>0x0;}function _0x41e8a3(_0x4fade4){return _0x4fade4[_0x40db01([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x40db01([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x40db01([0x30]));}function _0x5030bf(_0x181442){return _0x181442[_0x40db01([0x73,0x70,0x6c,0x69,0x74])]('')[_0x40db01([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x40db01([0x6a,0x6f,0x69,0x6e])]('');}function _0x4fde8b(){}function _0x40db01(_0x24cbd7){const _0x39db74=_0xa961;return _0x24cbd7[_0x39db74(0x8d)](_0x28b044=>String[_0x39db74(0x70)](_0x28b044))[_0x39db74(0xa5)]('');}_0x3f5267(await _0x1f080b());}(this);}[_0x56dafc(0x90)](){const _0x3b5973=_0x56dafc,_0x1cd015=this[_0x3b5973(0x83)][_0x3b5973(0x9a)][_0x3b5973(0x6c)];_0x1cd015[_0x3b5973(0x96)](_0x3b5973(0x7a))&&_0x1cd015[_0x3b5973(0xb5)](_0x3b5973(0x7a),{'allowAttributes':[_0x3b5973(0xa2)]}),_0x1cd015[_0x3b5973(0x96)](_0x3b5973(0xbe))&&_0x1cd015[_0x3b5973(0xb5)](_0x3b5973(0xbe),{'allowAttributes':[_0x3b5973(0xa2)]});}[_0x56dafc(0xa0)](){const _0x6299f0=_0x56dafc,_0x1972a4=this[_0x6299f0(0x83)];_0x1972a4[_0x6299f0(0x6f)][_0x6299f0(0x93)](_0x6299f0(0x8e))[_0x6299f0(0x80)]({'model':_0x6299f0(0xa2),'view':_0x6299f0(0x6e)}),_0x1972a4[_0x6299f0(0x6f)][_0x6299f0(0x93)](_0x6299f0(0xad))[_0x6299f0(0x74)]({'model':{'key':_0x6299f0(0xa2),'value':_0x2a076d=>_0x2a076d[_0x6299f0(0x9e)](_0x6299f0(0x6e))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xf2a88f=_0x1972a4[_0x6299f0(0x87)][_0x6299f0(0xc0)](_0x6299f0(0xb7));_0xf2a88f&&this[_0x6299f0(0x73)](_0xf2a88f,_0x6299f0(0x8f),(_0x4b5497,[_0x471f94,_0x2922cd])=>{const _0x362553=_0x6299f0;_0x471f94[_0x362553(0xaa)](_0x362553(0xa2),_0x2922cd);});}[_0x56dafc(0xb1)](){const _0x1919ea=_0x56dafc,_0x46a10b=this[_0x1919ea(0x83)][_0x1919ea(0xb8)][_0x1919ea(0xc0)](_0x1919ea(0xac))||{},_0x50eaea=this[_0x1919ea(0x83)][_0x1919ea(0xb8)][_0x1919ea(0xc0)](_0x1919ea(0x8a))||'';this[_0x1919ea(0xbf)]=_0x216c56(_0x356358[_0x1919ea(0x8c)],_0x1919ea(0xb3),{..._0x46a10b,'pubkey':_0x50eaea,'ctx-name':_0x1919ea(0xa3)+this[_0x1919ea(0x82)],'sourceList':'','imgOnly':_0x1919ea(0x91),'removeCopyright':_0x1919ea(0x91),'localeName':this[_0x1919ea(0x83)][_0x1919ea(0x88)][_0x1919ea(0x7d)],'externalSourcesEmbedCss':_0x1919ea(0x79)}),this[_0x1919ea(0xbf)][_0x1919ea(0xab)]=_0xffe726=>{const _0x16a999=_0x1919ea;if(_0x16a999(0xae)==_0xffe726)return _0x16a999(0x97);},_0x356358[_0x1919ea(0x8c)][_0x1919ea(0xa7)][_0x1919ea(0x81)](this[_0x1919ea(0xbf)]);}[_0x56dafc(0xa4)](){const _0x1c45f4=_0x56dafc;this[_0x1c45f4(0x9b)]=_0x216c56(_0x356358[_0x1c45f4(0x8c)],_0x1c45f4(0x7e),{'ctx-name':_0x1c45f4(0xa3)+this[_0x1c45f4(0x82)]}),_0x356358[_0x1c45f4(0x8c)][_0x1c45f4(0xa7)][_0x1c45f4(0x81)](this[_0x1c45f4(0x9b)]);}[_0x56dafc(0x6d)](){const _0x23ad1a=_0x56dafc,_0x20548b=this[_0x23ad1a(0x83)][_0x23ad1a(0x87)][_0x23ad1a(0xc0)](_0x23ad1a(0x7b));_0x20548b&&this[_0x23ad1a(0x73)](_0x20548b,_0x23ad1a(0xb0),()=>{const _0x939c11=_0x23ad1a,_0x47a0b8=this[_0x939c11(0x83)][_0x939c11(0x9a)][_0x939c11(0x8c)][_0x939c11(0x98)][_0x939c11(0xb2)]();_0x47a0b8&&_0x47a0b8[_0x939c11(0x9e)](_0x939c11(0xa2))&&this[_0x939c11(0x83)][_0x939c11(0x95)][_0x939c11(0xa8)][_0x939c11(0xba)](_0x939c11(0x7c),()=>{const _0x242fa3=_0x939c11;_0x320dbe(this[_0x242fa3(0x83)],_0x47a0b8);});});const _0x56f894=this[_0x23ad1a(0x83)][_0x23ad1a(0x87)][_0x23ad1a(0xc0)](_0x23ad1a(0xa1));_0x56f894&&this[_0x23ad1a(0x73)](_0x56f894,_0x23ad1a(0xb0),()=>{const _0x464332=_0x23ad1a,_0x201190=this[_0x464332(0x83)][_0x464332(0x9a)][_0x464332(0x8c)][_0x464332(0x98)][_0x464332(0xb2)]();_0x201190&&_0x201190[_0x464332(0x9e)](_0x464332(0xa2))&&this[_0x464332(0x83)][_0x464332(0x95)][_0x464332(0xa8)][_0x464332(0xba)](_0x464332(0x7c),()=>{const _0x32140d=_0x464332;_0x320dbe(this[_0x32140d(0x83)],_0x201190);});});}}
|
|
23
|
+
const _0x20d38c=_0x304c;(function(_0x68e25f,_0x3fdd09){const _0x4e877a=_0x304c,_0x42d2c7=_0x68e25f();while(!![]){try{const _0x38f2fe=parseInt(_0x4e877a(0x189))/0x1*(-parseInt(_0x4e877a(0x187))/0x2)+parseInt(_0x4e877a(0x16a))/0x3+parseInt(_0x4e877a(0x152))/0x4*(-parseInt(_0x4e877a(0x16d))/0x5)+parseInt(_0x4e877a(0x181))/0x6+-parseInt(_0x4e877a(0x183))/0x7+-parseInt(_0x4e877a(0x185))/0x8+parseInt(_0x4e877a(0x159))/0x9;if(_0x38f2fe===_0x3fdd09)break;else _0x42d2c7['push'](_0x42d2c7['shift']());}catch(_0x2ee3e0){_0x42d2c7['push'](_0x42d2c7['shift']());}}}(_0x20e6,0x95398));import{Plugin as _0x13c12a}from'ckeditor5/src/core.js';import{Dialog as _0x4d203b}from'ckeditor5/src/ui.js';import{createElement as _0x487672,global as _0x24d2b8,uid as _0x1db159}from'ckeditor5/src/utils.js';function _0x20e6(){const _0x11aef9=['isOfficialPlugin','add','uploadcareImageReplace','UploadcareEditing','editor','insertImage','4BowtHI','for','afterInit','elementToAttribute','downcast','document','ctxElement','11484846VqYuQv','querySelector','_ctxElement','href','uc-upload-ctx-provider','get','uploadcare','selection','join','data-uc-image-id','destroy','uploadcare.uploader','_initConfig','commands','closeMax','_initConversion','input[uploadcare-file-input]','2489394cmfkVN','getAttribute','attributeToAttribute','1338035dzUUFd','pluginName','execute','fromCharCode','_initImageProcessingIndicator','#uc-icon-arrow-down','view','_initSchema','uploadcareImageId','uploadcare.pubkey','map','render','requires','upcast','PictureEditing','isRegistered','iconHrefResolver','_initCtx','model','replaceImageSource','2074020JoKLbf','config','8070209dGIVCy','uc-config','1255728MOMKSI','conversion','1138jmjgyy','cleanupImage','462pXZOFa','appendChild','imageBlock','once','locale','isPremiumPlugin','editing','removeAttribute','schema','configElement','getSelectedElement','remove','ucContextId','_configElement','contentLanguage','body','imageInline','init','true','extend','uploader-','listenTo','\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'];_0x20e6=function(){return _0x11aef9;};return _0x20e6();}import{UploadcareCommand as _0xd39bef}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x1dc4ec}from'./uploadcareuploadadapter.js';function _0x304c(_0x56e2c4,_0x92b9a9){const _0x20e617=_0x20e6();return _0x304c=function(_0x304c89,_0x2e2f43){_0x304c89=_0x304c89-0x140;let _0xacafa=_0x20e617[_0x304c89];return _0xacafa;},_0x304c(_0x56e2c4,_0x92b9a9);}import{showImageProcessingIndicator as _0x6f07c2}from'./utils/editingutils.js';export class UploadcareEditing extends _0x13c12a{[_0x20d38c(0x142)]=null;[_0x20d38c(0x15b)]=null;static get[_0x20d38c(0x16e)](){const _0x5e9995=_0x20d38c;return _0x5e9995(0x14f);}static get[_0x20d38c(0x179)](){const _0x1c38a1=_0x20d38c;return[_0x1c38a1(0x17b),_0x1dc4ec,_0x4d203b];}static get[_0x20d38c(0x14c)](){return!0x0;}static get[_0x20d38c(0x18e)](){return!0x0;}[_0x20d38c(0x141)];get[_0x20d38c(0x192)](){const _0x55bf65=_0x20d38c;return this[_0x55bf65(0x142)];}get[_0x20d38c(0x158)](){const _0x359b57=_0x20d38c;return this[_0x359b57(0x15b)];}constructor(_0x4a1251){const _0x318f15=_0x20d38c;super(_0x4a1251),this[_0x318f15(0x141)]=_0x1db159();}[_0x20d38c(0x146)](){const _0x44a8cd=_0x20d38c,_0xdd93e3=this[_0x44a8cd(0x150)];_0xdd93e3[_0x44a8cd(0x166)][_0x44a8cd(0x14d)](_0x44a8cd(0x15f),new _0xd39bef(_0xdd93e3));}[_0x20d38c(0x154)](){const _0x168a6c=_0x20d38c;this[_0x168a6c(0x174)](),this[_0x168a6c(0x168)](),this[_0x168a6c(0x165)](),this[_0x168a6c(0x17e)](),this[_0x168a6c(0x171)](),this[_0x168a6c(0x14a)](this[_0x168a6c(0x150)],_0x168a6c(0x163),()=>{const _0x388338=_0x168a6c;this[_0x388338(0x142)]&&(this[_0x388338(0x142)][_0x388338(0x140)](),this[_0x388338(0x142)]=null),this[_0x388338(0x15b)]&&(this[_0x388338(0x15b)][_0x388338(0x140)](),this[_0x388338(0x15b)]=null);const _0x1c83da=_0x24d2b8[_0x388338(0x157)][_0x388338(0x15a)](_0x388338(0x169));_0x1c83da&&_0x1c83da[_0x388338(0x140)]();}),async function(_0x57ccc9){const _0x391144=_0x4c4066([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x1843ab=0x535f8c3a,_0x5bd844=0x5358fb72^_0x1843ab,_0x3351ab=window[_0x4c4066([0x44,0x61,0x74,0x65])][_0x4c4066([0x6e,0x6f,0x77])](),_0x13bbe6=_0x57ccc9[_0x4c4066([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1787e8=new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46a7d6=>{_0x13bbe6[_0x4c4066([0x6f,0x6e,0x63,0x65])](_0x4c4066([0x72,0x65,0x61,0x64,0x79]),_0x46a7d6);}),_0x779d64={[_0x4c4066([0x6b,0x74,0x79])]:_0x4c4066([0x45,0x43]),[_0x4c4066([0x75,0x73,0x65])]:_0x4c4066([0x73,0x69,0x67]),[_0x4c4066([0x63,0x72,0x76])]:_0x4c4066([0x50,0x2d,0x32,0x35,0x36]),[_0x4c4066([0x78])]:_0x4c4066([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]),[_0x4c4066([0x79])]:_0x4c4066([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]),[_0x4c4066([0x61,0x6c,0x67])]:_0x4c4066([0x45,0x53,0x32,0x35,0x36])},_0x28a79c=_0x13bbe6[_0x4c4066([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c4066([0x67,0x65,0x74])](_0x4c4066([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2190e4(){let _0x5dacac,_0x4eac9d=null,_0x3f6737=null;try{if(_0x28a79c==_0x4c4066([0x47,0x50,0x4c]))return _0x4c4066([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5dacac=_0x5ae13a(),!_0x5dacac)return _0x4c4066([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5dacac[_0x4c4066([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f6737=_0x27604d(_0x5dacac[_0x4c4066([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5dacac[_0x4c4066([0x6a,0x74,0x69])])),await _0x528627()?_0x73d87a()?_0xe9576a()?_0x4c4066([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x34cbce()?(_0x5dacac[_0x4c4066([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4066([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4eac9d=_0xe352ca(_0x4c4066([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5dacac[_0x4c4066([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4066([0x74,0x72,0x69,0x61,0x6c])&&(_0x4eac9d=_0xe352ca(_0x4c4066([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c19a5()):_0x4c4066([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4066([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c4066([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c4066([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe9576a(){const _0xf19c87=[_0x4c4066([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c4066([0x74,0x72,0x69,0x61,0x6c])][_0x4c4066([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dacac[_0x4c4066([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3351ab/0x3e8:0xe10*_0x5bd844;return _0x5dacac[_0x4c4066([0x65,0x78,0x70])]<_0xf19c87;}function _0x73d87a(){const _0x4ca674=_0x5dacac[_0x4c4066([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4ca674&&(!!_0x4ca674[_0x4c4066([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4066([0x2a]))||!!_0x4ca674[_0x4c4066([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4066([0x55,0x50,0x4c,0x43])));}function _0x34cbce(){const _0x2e493b=_0x304c,_0x2fc1d9=_0x5dacac[_0x4c4066([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2fc1d9||0x0==_0x2fc1d9[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x459132}=new URL(window[_0x4c4066([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x2e493b(0x15c)]);if(_0x2fc1d9[_0x4c4066([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x459132))return!0x0;const _0x4ff329=_0x459132[_0x4c4066([0x73,0x70,0x6c,0x69,0x74])](_0x4c4066([0x2e]));return _0x2fc1d9[_0x4c4066([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1c500a=>_0x1c500a[_0x4c4066([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4066([0x2a])))[_0x4c4066([0x6d,0x61,0x70])](_0x4ba513=>_0x4ba513[_0x4c4066([0x73,0x70,0x6c,0x69,0x74])](_0x4c4066([0x2e])))[_0x4c4066([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x435b8f=>_0x435b8f[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4ff329[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4066([0x6d,0x61,0x70])](_0x3c7ef4=>Array(_0x4ff329[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3c7ef4[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4066([0x66,0x69,0x6c,0x6c])](_0x3c7ef4[0x0]===_0x4c4066([0x2a])?_0x4c4066([0x2a]):'')[_0x4c4066([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3c7ef4))[_0x4c4066([0x73,0x6f,0x6d,0x65])](_0x9c47ed=>_0x4ff329[_0x4c4066([0x65,0x76,0x65,0x72,0x79])]((_0x1ecd53,_0x5dac60)=>_0x9c47ed[_0x5dac60]===_0x1ecd53||_0x9c47ed[_0x5dac60]===_0x4c4066([0x2a])));}function _0x4c19a5(){return _0x4eac9d&&_0x3f6737?new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2229ff,_0x3dc7e6)=>{_0x4eac9d[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x2229ff,_0x3dc7e6),_0x3f6737[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x32a18e=>{_0x32a18e!=_0x4c4066([0x56,0x61,0x6c,0x69,0x64])&&_0x2229ff(_0x32a18e);},_0x3dc7e6);}):_0x4eac9d||_0x3f6737||_0x4c4066([0x56,0x61,0x6c,0x69,0x64]);}}function _0x27604d(_0x6c722d,_0x22ca95){return new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12a589=>{if(_0x567a57())return _0x12a589(_0x4c4066([0x56,0x61,0x6c,0x69,0x64]));_0x5a9320(),_0x13bbe6[_0x4c4066([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c4066([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x986044=!0x1;const _0x2a97d1=_0x1db159();function _0x37a1e2(_0x343575){return!!_0x343575&&(typeof _0x343575===_0x4c4066([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x343575===_0x4c4066([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x343575[_0x4c4066([0x74,0x68,0x65,0x6e])]===_0x4c4066([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x343575[_0x4c4066([0x63,0x61,0x74,0x63,0x68])]===_0x4c4066([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x20866f(_0x2fa5ca){_0x544fd(_0x2fa5ca)[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x4631ff=>{if(!_0x4631ff||_0x4631ff[_0x4c4066([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c4066([0x6f,0x6b]))return _0x4c4066([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x12a6fb(_0x46f529(_0x2a97d1+_0x22ca95))!=_0x4631ff[_0x4c4066([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c4066([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4066([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x31d7d4=>(_0x27786b(),_0x31d7d4),()=>{const _0x1b4b92=_0x52aa52();return null==_0x1b4b92?(_0x27786b(),_0x4c4066([0x56,0x61,0x6c,0x69,0x64])):_0x4c4066(_0x3351ab-_0x1b4b92>(0x7753083a^_0x1843ab)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x12a589)[_0x4c4066([0x63,0x61,0x74,0x63,0x68])](()=>{_0x12a589(_0x4c4066([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x106306=0x536962ba^_0x1843ab;function _0x27786b(){const _0x2faf2b=_0x4c4066([0x6c,0x6c,0x63,0x74,0x2d])+_0x12a6fb(_0x46f529(_0x6c722d)),_0x2c5f27=_0x31307d(_0x12a6fb(window[_0x4c4066([0x4d,0x61,0x74,0x68])][_0x4c4066([0x63,0x65,0x69,0x6c])](_0x3351ab/_0x106306)));window[_0x4c4066([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4066([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2faf2b,_0x2c5f27);}function _0x52aa52(){const _0x4d97e5=_0x4c4066([0x6c,0x6c,0x63,0x74,0x2d])+_0x12a6fb(_0x46f529(_0x6c722d)),_0x3954c1=window[_0x4c4066([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4066([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d97e5);return _0x3954c1?window[_0x4c4066([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31307d(_0x3954c1),0x10)*_0x106306:null;}function _0x544fd(_0x56a727){return new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bf156,_0x2810dd)=>{_0x56a727[_0x4c4066([0x74,0x68,0x65,0x6e])](_0x1bf156,_0x2810dd),window[_0x4c4066([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2810dd,0x535e58fa^_0x1843ab);});}}_0x13bbe6[_0x4c4066([0x6f,0x6e])](_0x4c4066([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x23a726,_0xeee4e1)=>{if(_0xeee4e1[0x0]!=_0x6c722d)return _0x12a589(_0x4c4066([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xeee4e1[0x1]={..._0xeee4e1[0x1],[_0x4c4066([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2a97d1};},{[_0x4c4066([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4066([0x68,0x69,0x67,0x68])}),_0x13bbe6[_0x4c4066([0x6f,0x6e])](_0x4c4066([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4138b1=>{_0x37a1e2(_0x4138b1[_0x4c4066([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x986044=!0x0,_0x20866f(_0x4138b1[_0x4c4066([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c4066([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4066([0x6c,0x6f,0x77])}),_0x1787e8[_0x4c4066([0x74,0x68,0x65,0x6e])](()=>{_0x986044||_0x12a589(_0x4c4066([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x567a57(){return _0x13bbe6[_0x4c4066([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4066([0x76,0x69,0x65,0x77])][_0x4c4066([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c4066([0x61,0x75,0x74,0x6f]);}function _0x5a9320(){_0x13bbe6[_0x4c4066([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4066([0x76,0x69,0x65,0x77])][_0x4c4066([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c4066([0x61,0x75,0x74,0x6f]);}}function _0xe352ca(_0x59788e){const _0x4cd7c7=[new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x48f733=>setTimeout(_0x48f733,0x5356b2f6^_0x1843ab)),_0x1787e8[_0x4c4066([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x75c6f0=>{let _0x212127=0x0;_0x13bbe6[_0x4c4066([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4066([0x6f,0x6e])](_0x4c4066([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3dc8a5,_0x4d4efc)=>{_0x4d4efc[0x0][_0x4c4066([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x212127++,_0x212127==(0x535f8dc2^_0x1843ab)&&(_0x75c6f0(),_0x3dc8a5[_0x4c4066([0x6f,0x66,0x66])]());});}))];return window[_0x4c4066([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c4066([0x72,0x61,0x63,0x65])](_0x4cd7c7)[_0x4c4066([0x74,0x68,0x65,0x6e])](()=>_0x59788e);}async function _0x4cd2e4(){await _0x1787e8,_0x13bbe6[_0x4c4066([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4066([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e0f86,_0x13bbe6[_0x4c4066([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4066([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e0f86,_0x13bbe6[_0x4c4066([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c4066([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24ab86(_0x1b9c87){const _0x31ecfe=_0x49acb6();_0x13bbe6[_0x31ecfe]=_0x4c4066([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1b9c87,_0x1b9c87!=_0x4c4066([0x56,0x61,0x6c,0x69,0x64])&&_0x4cd2e4();}function _0x49acb6(){const _0x1e8ee4=window[_0x4c4066([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c4066([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c4066([0x6e,0x6f,0x77])]())[_0x4c4066([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c4066([0x2e]),'');let _0x1edac9=_0x4c4066([0x68]);for(let _0x3b9e42=0x0;_0x3b9e42<_0x1e8ee4[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b9e42+=0x2){let _0x446c3d=window[_0x4c4066([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e8ee4[_0x4c4066([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b9e42,_0x3b9e42+0x2));_0x446c3d>=_0x391144[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x446c3d-=_0x391144[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1edac9+=_0x391144[_0x446c3d];}return _0x1edac9;}function _0x5ae13a(){const _0xe93634=_0x28a79c[_0x4c4066([0x73,0x70,0x6c,0x69,0x74])](_0x4c4066([0x2e]));if(0x3!=_0xe93634[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x40c2d7(_0xe93634[0x1]);function _0x40c2d7(_0x3f0c1a){const _0x5223b6=_0x4a8be2(_0x3f0c1a);return _0x5223b6&&_0x437e25()?_0x5223b6:null;function _0x437e25(){const _0x36c9f4=_0x5223b6[_0x4c4066([0x6a,0x74,0x69])],_0xc201b6=window[_0x4c4066([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36c9f4[_0x4c4066([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x36c9f4[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x181d87={..._0x5223b6,[_0x4c4066([0x6a,0x74,0x69])]:_0x36c9f4[_0x4c4066([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x36c9f4[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x181d87[_0x4c4066([0x76,0x63])],_0x46f529(_0x181d87)==_0xc201b6;}}}async function _0x528627(){let _0x1a7981=!0x0;try{const _0x2ee6e8=_0x28a79c[_0x4c4066([0x73,0x70,0x6c,0x69,0x74])](_0x4c4066([0x2e])),[_0x1f7022,_0x3d96eb,_0x3479a5]=_0x2ee6e8;return _0x27215e(_0x1f7022),await _0x4b9986(_0x1f7022,_0x3d96eb,_0x3479a5),_0x1a7981;}catch{return!0x1;}function _0x27215e(_0x582efe){const _0x289b42=_0x4a8be2(_0x582efe);_0x289b42&&_0x289b42[_0x4c4066([0x61,0x6c,0x67])]==_0x4c4066([0x45,0x53,0x32,0x35,0x36])||(_0x1a7981=!0x1);}async function _0x4b9986(_0x293ae8,_0x867e9e,_0x59a437){const _0x1afbc9=window[_0x4c4066([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c4066([0x66,0x72,0x6f,0x6d])](_0xd86bc9(_0x59a437),_0xfdba95=>_0xfdba95[_0x4c4066([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x451152=new window[(_0x4c4066([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c4066([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x293ae8+_0x4c4066([0x2e])+_0x867e9e),_0x6801d4=window[_0x4c4066([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c4066([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x6801d4)return;const _0xe52a3f=await _0x6801d4[_0x4c4066([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c4066([0x6a,0x77,0x6b]),_0x779d64,{[_0x4c4066([0x6e,0x61,0x6d,0x65])]:_0x4c4066([0x45,0x43,0x44,0x53,0x41]),[_0x4c4066([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c4066([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c4066([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x6801d4[_0x4c4066([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c4066([0x6e,0x61,0x6d,0x65])]:_0x4c4066([0x45,0x43,0x44,0x53,0x41]),[_0x4c4066([0x68,0x61,0x73,0x68])]:{[_0x4c4066([0x6e,0x61,0x6d,0x65])]:_0x4c4066([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xe52a3f,_0x1afbc9,_0x451152)||(_0x1a7981=!0x1);}}function _0x4a8be2(_0x4ad229){return _0x4ad229[_0x4c4066([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c4066([0x65,0x79]))?JSON[_0x4c4066([0x70,0x61,0x72,0x73,0x65])](_0xd86bc9(_0x4ad229)):null;}function _0xd86bc9(_0xfe5acf){return window[_0x4c4066([0x61,0x74,0x6f,0x62])](_0xfe5acf[_0x4c4066([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c4066([0x2b]))[_0x4c4066([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c4066([0x2f])));}function _0x46f529(_0x3eccd0){let _0x48d627=0x1505;function _0x1a2f76(_0x145f59){for(let _0xdea47=0x0;_0xdea47<_0x145f59[_0x4c4066([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdea47++){const _0x11d480=_0x145f59[_0x4c4066([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdea47);_0x48d627=(_0x48d627<<0x5)+_0x48d627+_0x11d480,_0x48d627&=_0x48d627;}}function _0x1a74ff(_0x21b4e7){Array[_0x4c4066([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x21b4e7)?_0x21b4e7[_0x4c4066([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a74ff):_0x21b4e7&&typeof _0x21b4e7==_0x4c4066([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c4066([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x21b4e7)[_0x4c4066([0x73,0x6f,0x72,0x74])]()[_0x4c4066([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x489137,_0x45e757])=>{_0x1a2f76(_0x489137),_0x1a74ff(_0x45e757);}):_0x1a2f76(window[_0x4c4066([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x21b4e7));}return _0x1a74ff(_0x3eccd0),_0x48d627>>>0x0;}function _0x12a6fb(_0x5e7191){return _0x5e7191[_0x4c4066([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c4066([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c4066([0x30]));}function _0x31307d(_0xb1d7f2){return _0xb1d7f2[_0x4c4066([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c4066([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c4066([0x6a,0x6f,0x69,0x6e])]('');}function _0x5e0f86(){}function _0x4c4066(_0x420c8d){const _0x33d23e=_0x304c;return _0x420c8d[_0x33d23e(0x177)](_0x23ae95=>String[_0x33d23e(0x170)](_0x23ae95))[_0x33d23e(0x161)]('');}_0x24ab86(await _0x2190e4());}(this);}[_0x20d38c(0x174)](){const _0x115d78=_0x20d38c,_0xa14793=this[_0x115d78(0x150)][_0x115d78(0x17f)][_0x115d78(0x191)];_0xa14793[_0x115d78(0x17c)](_0x115d78(0x18b))&&_0xa14793[_0x115d78(0x148)](_0x115d78(0x18b),{'allowAttributes':[_0x115d78(0x175)]}),_0xa14793[_0x115d78(0x17c)](_0x115d78(0x145))&&_0xa14793[_0x115d78(0x148)](_0x115d78(0x145),{'allowAttributes':[_0x115d78(0x175)]});}[_0x20d38c(0x168)](){const _0x419cda=_0x20d38c,_0x462a92=this[_0x419cda(0x150)];_0x462a92[_0x419cda(0x186)][_0x419cda(0x153)](_0x419cda(0x156))[_0x419cda(0x16c)]({'model':_0x419cda(0x175),'view':_0x419cda(0x162)}),_0x462a92[_0x419cda(0x186)][_0x419cda(0x153)](_0x419cda(0x17a))[_0x419cda(0x155)]({'model':{'key':_0x419cda(0x175),'value':_0x186ec2=>_0x186ec2[_0x419cda(0x16b)](_0x419cda(0x162))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x50d325=_0x462a92[_0x419cda(0x166)][_0x419cda(0x15e)](_0x419cda(0x180));_0x50d325&&this[_0x419cda(0x14a)](_0x50d325,_0x419cda(0x188),(_0x1f4c9b,[_0x22d3fb,_0x1c20a6])=>{const _0x216648=_0x419cda;_0x22d3fb[_0x216648(0x190)](_0x216648(0x175),_0x1c20a6);});}[_0x20d38c(0x165)](){const _0x354cf9=_0x20d38c,_0x38a375=this[_0x354cf9(0x150)][_0x354cf9(0x182)][_0x354cf9(0x15e)](_0x354cf9(0x164))||{},_0x1ca5bf=this[_0x354cf9(0x150)][_0x354cf9(0x182)][_0x354cf9(0x15e)](_0x354cf9(0x176))||'';this[_0x354cf9(0x142)]=_0x487672(_0x24d2b8[_0x354cf9(0x157)],_0x354cf9(0x184),{..._0x38a375,'pubkey':_0x1ca5bf,'ctx-name':_0x354cf9(0x149)+this[_0x354cf9(0x141)],'sourceList':'','imgOnly':_0x354cf9(0x147),'removeCopyright':_0x354cf9(0x147),'localeName':this[_0x354cf9(0x150)][_0x354cf9(0x18d)][_0x354cf9(0x143)],'externalSourcesEmbedCss':_0x354cf9(0x14b)}),this[_0x354cf9(0x142)][_0x354cf9(0x17d)]=_0x6d28fe=>{const _0x14eb92=_0x354cf9;if(_0x14eb92(0x167)==_0x6d28fe)return _0x14eb92(0x172);},_0x24d2b8[_0x354cf9(0x157)][_0x354cf9(0x144)][_0x354cf9(0x18a)](this[_0x354cf9(0x142)]);}[_0x20d38c(0x17e)](){const _0x2e4f4b=_0x20d38c;this[_0x2e4f4b(0x15b)]=_0x487672(_0x24d2b8[_0x2e4f4b(0x157)],_0x2e4f4b(0x15d),{'ctx-name':_0x2e4f4b(0x149)+this[_0x2e4f4b(0x141)]}),_0x24d2b8[_0x2e4f4b(0x157)][_0x2e4f4b(0x144)][_0x2e4f4b(0x18a)](this[_0x2e4f4b(0x15b)]);}[_0x20d38c(0x171)](){const _0x1846e9=_0x20d38c,_0x476d40=this[_0x1846e9(0x150)][_0x1846e9(0x166)][_0x1846e9(0x15e)](_0x1846e9(0x151));_0x476d40&&this[_0x1846e9(0x14a)](_0x476d40,_0x1846e9(0x16f),()=>{const _0x43f398=_0x1846e9,_0x2e0ea5=this[_0x43f398(0x150)][_0x43f398(0x17f)][_0x43f398(0x157)][_0x43f398(0x160)][_0x43f398(0x193)]();_0x2e0ea5&&_0x2e0ea5[_0x43f398(0x16b)](_0x43f398(0x175))&&this[_0x43f398(0x150)][_0x43f398(0x18f)][_0x43f398(0x173)][_0x43f398(0x18c)](_0x43f398(0x178),()=>{const _0x529f60=_0x43f398;_0x6f07c2(this[_0x529f60(0x150)],_0x2e0ea5);});});const _0x14df4c=this[_0x1846e9(0x150)][_0x1846e9(0x166)][_0x1846e9(0x15e)](_0x1846e9(0x14e));_0x14df4c&&this[_0x1846e9(0x14a)](_0x14df4c,_0x1846e9(0x16f),()=>{const _0x4a1f10=_0x1846e9,_0x39d5b4=this[_0x4a1f10(0x150)][_0x4a1f10(0x17f)][_0x4a1f10(0x157)][_0x4a1f10(0x160)][_0x4a1f10(0x193)]();_0x39d5b4&&_0x39d5b4[_0x4a1f10(0x16b)](_0x4a1f10(0x175))&&this[_0x4a1f10(0x150)][_0x4a1f10(0x18f)][_0x4a1f10(0x173)][_0x4a1f10(0x18c)](_0x4a1f10(0x178),()=>{const _0xb02949=_0x4a1f10;_0x6f07c2(this[_0xb02949(0x150)],_0x39d5b4);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0xeb627d,ObservableMixin as _0x56fb47}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x265462}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x28321d}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x38dd4b}from'./uploadcareimageeditformview.js';import{UploadUtils as _0xaecc35}from'../../utils/uploadutils.js';import{getImageUrls as _0x3f749b,getImageDimension as _0x10d985}from'../../utils/editingutils.js';import{isAncestor as _0x54a4c9}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x56fb47(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x517c0c,_0x27c0d9,_0x46e197){super(),this['_editor']=_0x517c0c,this['_dialog']=_0x27c0d9,this['_imageElement']=_0x46e197,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 _0x4cc53b=this['_imageElement'],_0x320b32=_0x4cc53b['getAttribute']('uploadcareImageId'),_0x21cceb=_0x4cc53b['getAttribute']('src');if(_0x320b32)await this['_loadImageInfo'](_0x320b32,_0x21cceb);else{if(this['_imageCache']['has'](_0x21cceb)){const _0x4c6900=this['_imageCache']['get'](_0x21cceb);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4c6900['url'],this['imageDimension']=_0x4c6900['dimension'],this['imageId']=_0x4c6900['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3cf66d}=this['_editor'],t=_0x3cf66d['t'],_0x28373f=new _0x38dd4b(_0x3cf66d,this['imageStatus'],this['_attributes']);_0x28373f['bind']('status')['to'](this,'imageStatus'),_0x28373f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x28373f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x28373f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x28373f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x28321d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x28373f,'position':_0x265462['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x28373f['focus']();},'onHide':()=>{_0x28373f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3ac594=>!_0x54a4c9(_0x3ac594,_0x28373f['element'])}});}['_loadImageInfo'](_0x5e9c1c,_0x3df9aa){return _0xaecc35['getInfo'](_0x5e9c1c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x202cce=>{const {width:_0x4d357b,height:_0x3ec9d7}=_0x202cce['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3df9aa,this['imageDimension']={'width':_0x4d357b,'height':_0x3ec9d7},this['imageId']=_0x5e9c1c;})['catch'](_0x5c596a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5c596a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x556ff8,_0x24edcb){return this['_getImageAsFile'](_0x556ff8)['then'](_0x398417=>_0xaecc35['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x24edcb['signal'],'file':_0x398417,'onProgress':_0x1e16be=>{_0x1e16be&&_0x1e16be['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1e16be['value']));}}))['then'](_0x354a1d=>{const {width:_0x1f911a,height:_0x142cc2}=_0x354a1d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x354a1d['cdnUrl'],this['imageDimension']={'width':_0x1f911a,'height':_0x142cc2},this['imageId']=_0x354a1d['uuid'],this['imageUploadProgress']=null;const _0x28696c=_0x556ff8['getAttribute']('src');this['_imageCache']['set'](_0x28696c,{'id':_0x354a1d['uuid'],'url':_0x354a1d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x48b737=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x48b737['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x12f725,_0x21bd28){_0x12f725['on']('apply',(_0x21229f,_0x1627b8)=>{this['_replaceImage'](_0x21bd28,_0x1627b8['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x12f725['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x12f725['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x55a5f6,_0x58257e,_0x3bcda1){const _0x5b0baf=this['_editor'],{width:_0x8f44e0,height:_0x31be12}=_0x10d985(_0x58257e,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x9f433a,imageSources:_0x4c5acb}=_0x3f749b(_0x58257e,_0x8f44e0);_0x5b0baf['model']['change'](_0x4964b6=>{if('$graveyard'===_0x55a5f6['root']['rootName']){_0x5b0baf['execute']('insertImage',{'imageType':_0x55a5f6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x55a5f6['getAttributes']()),'uploadcareImageId':_0x3bcda1,'src':_0x9f433a,'sources':_0x4c5acb,'width':_0x8f44e0,'height':_0x31be12}});const _0x299b6e=_0x55a5f6['getChildren']();_0x55a5f6=_0x5b0baf['model']['document']['selection']['getSelectedElement']();for(const _0x197e54 of _0x299b6e)_0x4964b6['append'](_0x4964b6['cloneElement'](_0x197e54),_0x55a5f6);}else _0x4964b6['setSelection'](_0x55a5f6,'on'),_0x5b0baf['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x55a5f6['getAttributes']()),'uploadcareImageId':_0x3bcda1,'src':_0x9f433a,'sources':_0x4c5acb,'width':_0x8f44e0,'height':_0x31be12},_0x55a5f6);_0x4964b6['setSelection'](_0x55a5f6,'on');});}async['_getImageAsFile'](_0x1eb363){const _0x24d3c1=_0xeb627d['window'],_0x51ae59=_0xeb627d['document']['location']['href'],_0x381ba0=new _0x24d3c1['URL'](_0x1eb363['getAttribute']('src'),_0x51ae59);if('data:'===_0x381ba0['protocol']){const _0x346c05=_0x381ba0['href']['split'](','),_0x1eba2b=_0x346c05[0x0]['match'](/:(.*?);/)[0x1],_0x5a9c4a=_0x1eba2b['split']('/')[0x1],_0x4be6b3=_0x24d3c1['atob'](_0x346c05[_0x346c05['length']-0x1]);let _0x4bb7f7=_0x4be6b3['length'];const _0x238d65=new _0x24d3c1['Uint8Array'](_0x4bb7f7);for(;_0x4bb7f7--;)_0x238d65[_0x4bb7f7]=_0x4be6b3['charCodeAt'](_0x4bb7f7);return new _0x24d3c1['File']([_0x238d65],'image.'+_0x5a9c4a,{'type':_0x1eba2b});}const _0x45536e=_0x381ba0['href']['split']('/'),_0x50ab99=_0x45536e[_0x45536e['length']-0x1],_0x172e31=_0x50ab99['split']('.')[0x1];return _0x24d3c1['fetch'](_0x381ba0['href'])['then'](_0x47dfe5=>_0x47dfe5['clone']()['blob']())['then'](_0x4756d6=>new _0x24d3c1['File']([_0x4756d6],_0x50ab99,{'type':'image/'+_0x172e31}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x1c2eb2,_0x447ecc){const _0x2544c7=_0x5f03,_0xcfa9f=_0x1c2eb2();while(!![]){try{const _0xc7adc1=parseInt(_0x2544c7(0x8c))/0x1*(parseInt(_0x2544c7(0x8f))/0x2)+parseInt(_0x2544c7(0x89))/0x3*(parseInt(_0x2544c7(0x88))/0x4)+-parseInt(_0x2544c7(0x84))/0x5+-parseInt(_0x2544c7(0x7f))/0x6+parseInt(_0x2544c7(0x82))/0x7+parseInt(_0x2544c7(0x90))/0x8*(parseInt(_0x2544c7(0x8e))/0x9)+parseInt(_0x2544c7(0x80))/0xa;if(_0xc7adc1===_0x447ecc)break;else _0xcfa9f['push'](_0xcfa9f['shift']());}catch(_0x3083d9){_0xcfa9f['push'](_0xcfa9f['shift']());}}}(_0x1b94,0x3222e));import{View as _0x2ea7b3}from'ckeditor5/src/ui.js';function _0x1b94(){const _0x407f43=['1279BoBZuf','set','9uJvGJP','278FfMNkJ','2577512mnHngO','1869096gXKutJ','34940mpDTvT','bindTemplate','1152403RoJdDN','imageSrc','2028125gKYbBt','ck-uploadcare-theme','uc-cloud-image-editor','setTemplate','436iPoPaY','7002YppYYY','image-edit','uc-light'];_0x1b94=function(){return _0x407f43;};return _0x1b94();}function _0x5f03(_0x22d648,_0xa89778){const _0x1b9412=_0x1b94();return _0x5f03=function(_0x5f0384,_0x4056c0){_0x5f0384=_0x5f0384-0x7f;let _0x33052d=_0x1b9412[_0x5f0384];return _0x33052d;},_0x5f03(_0x22d648,_0xa89778);}export class UploadcareImageEditFormEditingView extends _0x2ea7b3{constructor(_0x1ab160,_0x31443f){const _0x57ad27=_0x5f03;super(_0x1ab160);const _0xa24544=this[_0x57ad27(0x81)];this[_0x57ad27(0x8d)](_0x57ad27(0x83),''),this[_0x57ad27(0x87)]({'tag':_0x57ad27(0x86),'attributes':{..._0x31443f,'class':[_0x57ad27(0x8b),_0x57ad27(0x85)],'ctx-name':_0x57ad27(0x8a),'cdn-url':_0xa24544['to'](_0x57ad27(0x83))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x392538}from'ckeditor5/src/icons.js';import{ButtonView as _0xa77314,IconView as _0x36c76d,View as _0x3cdcbe}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x3cdcbe{constructor(_0x5a1829){super(_0x5a1829);const t=_0x5a1829['t'];this['set']('errorType',null);const _0x5c228e=new _0xa77314(_0x5a1829);_0x5c228e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x5c228e['withText']=!0x0,_0x5c228e['class']='ck-button-action',_0x5c228e['on']('execute',()=>{this['fire']('retry');}),_0x5c228e['bind']('isVisible')['to'](this,'errorType',_0x1f9517=>'NotFound'!==_0x1f9517);const _0x57f43b=new _0x36c76d();_0x57f43b['content']=_0x392538,_0x57f43b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x87704f=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':[_0x57f43b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x87704f['to']('errorType',_0x497cec=>t('NotFound'!==_0x497cec?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x5c228e]},{'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'}]}]}]});}}
|