@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251128.0 → 0.0.0-nightly-20251130.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 _0x35bcdb,Command as _0x45201e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4caf60,IconGooglePhotos as _0x10fdba,IconGoogleDrive as _0x5329b5,IconFacebook as _0x502ce8,IconDropbox as _0x4a783b,IconUploadcareLink as _0x53f76f,IconUploadcareImageUpload as _0x181c64,IconError as _0x4be8ac,IconUploadcareImageEdit as _0x24a86c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xca984,MenuBarMenuListItemButtonView as _0x345aac,View as _0x25a3d4,FocusCycler as _0x496d6c,Dialog as _0x18f095,DialogViewPosition as _0x5ea1b7,SpinnerView as _0x36630e,IconView as _0xedde6c,Notification as _0x2c0336}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x11e928,DomEmitterMixin as _0x156864,global as _0x3155b2,getAncestors as _0x283c5e,ObservableMixin as _0x768f9c,uid as _0x19f593,createElement as _0x3fc350}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x26f3c6}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x55429f,info as _0xc3156f}from'@uploadcare/upload-client';import*as _0xc1a756 from'@uploadcare/file-uploader';var i=function(_0x190a3d){return _0x190a3d['Local']='local',_0x190a3d['URL']='url',_0x190a3d['Dropbox']='dropbox',_0x190a3d['GDrive']='gdrive',_0x190a3d['Facebook']='facebook',_0x190a3d['GPhotos']='gphotos',_0x190a3d['OneDrive']='onedrive',_0x190a3d;}({});function _(_0x463521,_0x32569a,_0x37f614){const t=_0x463521['t'],_0x8c92ef=_0x463521['t'];switch(_0x32569a){case i['Local']:return{'text':_0x8c92ef('Insert'===_0x37f614?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x8c92ef('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x37f614?_0x8c92ef('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x8c92ef('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x32569a;}}class e extends _0x35bcdb{['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 _0x1f0bfd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x13247c;for(const _0x4c98b1 in _0x1f0bfd){const _0x529145=_0x4c98b1,_0x156532=_0x1f0bfd[_0x529145];if('uploadcareLicenseKeyValid'==_0x156532||'uploadcareLicenseKeyInvalid'==_0x156532||'uploadcareLicenseKeyExpired'==_0x156532||'uploadcareLicenseKeyDomainLimit'==_0x156532||'uploadcareLicenseKeyNotAllowed'==_0x156532||'uploadcareLicenseKeyEvaluationLimit'==_0x156532||'uploadcareLicenseKeyTrialLimit'==_0x156532||'uploadcareLicenseKeyUsageLimit'==_0x156532){delete _0x1f0bfd[_0x529145],_0x13247c=_0x156532,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x13247c&&_0x1f0bfd['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x13247c&&_0x1f0bfd['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x13247c&&_0x1f0bfd['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x355c90}=this,_0x4ddefd=_0x355c90['commands']['get']('uploadcare');if(!_0x4ddefd)return;const _0x404252=this['_normalizeConfigSourceList'](_0x355c90['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x32310c,_0x294a64)=>{const _0x473928=this['_getIntegrationKey'](_0x294a64['type']);return _0x32310c[_0x473928]||(_0x32310c[_0x473928]=[]),_0x32310c[_0x473928]['push'](_0x294a64),_0x32310c;},{});_0x355c90['plugins']['has']('ImageInsertUI')&&_0x355c90['commands']['get']('uploadcare')&&Object['entries'](_0x404252)['forEach'](([_0x4984ed,_0x2e4116])=>{_0x355c90['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4984ed,'observable':()=>_0x4ddefd,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2e4116),'formViewCreator':()=>this['_createDropdownButtons'](_0x2e4116),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2e4116),'override':'assetManager'!==_0x4984ed});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5dc259){const {locale:_0x5ab8c4}=this['editor'];return _0x5dc259['map'](_0x357950=>{const _0x1b25f7=_(_0x5ab8c4,_0x357950,'Insert');switch(_0x357950){case i['Local']:return{'icon':_0x181c64,'type':i['Local'],..._0x1b25f7};case i['URL']:return{'icon':_0x53f76f,'type':i['URL'],..._0x1b25f7};case i['Dropbox']:return{'icon':_0x4a783b,'type':i['Dropbox'],..._0x1b25f7};case i['Facebook']:return{'icon':_0x502ce8,'type':i['Facebook'],..._0x1b25f7};case i['GDrive']:return{'icon':_0x5329b5,'type':i['GDrive'],..._0x1b25f7};case i['GPhotos']:return{'icon':_0x10fdba,'type':i['GPhotos'],..._0x1b25f7};case i['OneDrive']:return{'icon':_0x4caf60,'type':i['OneDrive'],..._0x1b25f7};}});}['_getIntegrationKey'](_0x1d5ddc){switch(_0x1d5ddc){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x51105b,_0x52d826){const _0x3eac16=this['editor'],_0x3d441b=new _0x51105b(_0x3eac16['locale']),_0x2de297=_0x3eac16['commands']['get']('uploadcare');return _0x3d441b['bind']('isEnabled')['to'](_0x2de297),_0x3d441b['on']('execute',()=>{_0x2de297['execute'](_0x52d826);}),_0x3d441b;}['_createToolbarButton'](_0x2c1437){const {locale:_0x2ff5ae}=this['editor'],_0x2179e0=this['editor']['plugins']['get']('ImageInsertUI'),_0x186a92=_0x2c1437[0x0],_0x46f572=this['_createButton'](_0xca984,_0x186a92['type']);return _0x46f572['icon']=_0x186a92['icon'],_0x46f572['bind']('label')['to'](_0x2179e0,'isImageSelected',_0x5c2106=>_(_0x2ff5ae,_0x186a92['type'],_0x5c2106?'Replace':'Insert')['text']),_0x46f572['tooltip']=!0x0,_0x46f572;}['_createDropdownButtons'](_0x335959){const {locale:_0x3f43e8}=this['editor'],_0x1290b1=this['editor']['plugins']['get']('ImageInsertUI');return _0x335959['map'](_0x44e867=>{const _0x4cfcb8=this['_createButton'](_0xca984,_0x44e867['type']);return _0x4cfcb8['withText']=!0x0,_0x4cfcb8['icon']=_0x44e867['icon'],_0x4cfcb8['bind']('label')['to'](_0x1290b1,'isImageSelected',_0x850b6=>_(_0x3f43e8,_0x44e867['type'],_0x850b6?'Replace':'Insert')['text']),_0x4cfcb8;});}['_createMenuBarButtons'](_0x3eca99){return _0x3eca99['map'](_0x14f714=>{const _0x56c096=this['_createButton'](_0x345aac,_0x14f714['type']);return _0x56c096['icon']=_0x14f714['icon'],_0x56c096['label']=_0x14f714['shortText'],_0x56c096;});}}class F extends _0x25a3d4{['focusTracker'];['focusCycler'];constructor(_0x3ba2dc){super(_0x3ba2dc),this['focusTracker']=new _0x11e928(),this['focusCycler']=new _0x496d6c({'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(_0x4539ac,_0x56b66c){super(_0x4539ac),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-'+_0x56b66c}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0xcc5fdb,_0x521001){const _0x4a36b6=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4e4762=>_0x4e4762<=_0x521001)['map'](_0x3b236e=>_0xcc5fdb['replace'](/\/$/,'')+'/-/resize/'+_0x3b236e+'x/\x20'+_0x3b236e+'w');return{'imageFallbackUrl':_0xcc5fdb,'imageSources':[{'srcset':_0x4a36b6['join'](',\x20'),'sizes':'(max-width:\x20'+_0x521001+'px)\x20100vw,\x20'+_0x521001+'px','type':'image/webp'}]};}function S(_0x41be23,_0x204a88,_0x4654b3){const _0x1bc902=_0x41be23['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1bc902?parseInt(_0x1bc902[0x1],0xa):_0x204a88,'height':_0x1bc902?parseInt(_0x1bc902[0x2],0xa):_0x4654b3};}function p(_0x4c836d,_0x45a089){const _0x2bbaf3=new(_0x156864())(),_0x432e31=_0x4c836d['plugins']['get']('ImageUtils'),_0xebd8ec=_0x4c836d['editing']['mapper']['toViewElement'](_0x45a089),_0x60eca2=_0x432e31['findViewImgElement'](_0xebd8ec),_0x11955e=_0x4c836d['editing']['view']['domConverter']['viewToDom'](_0x60eca2),_0x403214=_0x45a089['getAttribute']('width'),_0x2d9b4f=_0x45a089['getAttribute']('height'),_0x4068c4='image-processing';_0x4c836d['editing']['view']['change'](_0x41dfe1=>{_0x41dfe1['addClass'](_0x4068c4,_0xebd8ec),_0x41dfe1['setStyle']('aspect-ratio',_0x403214+'/'+_0x2d9b4f,_0x60eca2);}),_0x2bbaf3['listenTo'](_0x11955e,'load',()=>{_0x2bbaf3['stopListening'](_0x11955e,'load'),_0x4c836d['editing']['view']['change'](_0x417527=>{_0x417527['removeClass'](_0x4068c4,_0xebd8ec),_0x417527['removeStyle']('aspect-ratio',_0x60eca2);});});}function G(_0x51ee84){if(Array['isArray'](_0x51ee84)){const _0x2031c0=_0x51ee84['map'](G);return _0x4e2658=>_0x2031c0['some'](_0x2bb1cd=>_0x2bb1cd(_0x4e2658));}if('origin'==_0x51ee84){const _0x489e77=_0x3155b2['window']['location']['origin'];return _0x74733a=>new URL(_0x74733a,_0x3155b2['document']['baseURI'])['origin']==_0x489e77;}return'function'==typeof _0x51ee84?_0x51ee84:_0x51ee84 instanceof RegExp?_0xe40af3=>!(!_0xe40af3['match'](_0x51ee84)&&!_0xe40af3['replace'](/^https?:\/\//,'')['match'](_0x51ee84)):()=>!0x1;}function A(_0x40de4e,_0x2f5999){return _0x283c5e(_0x40de4e['target'])['includes'](_0x2f5999);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x768f9c(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x42be52,_0x4f20e7,_0x5ba3b6){super(),this['_editor']=_0x42be52,this['_editing']=_0x4f20e7,this['_dialog']=_0x42be52['plugins']['get'](_0x18f095),this['_api']=_0x4f20e7['ctxElement']['getAPI'](),this['_type']=_0x5ba3b6,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:_0x5eee2c,model:_0x59404b}=this['_editor'],_0x180412=_0x59404b['document']['selection']['getSelectedElement'](),_0x498e64=_0x180412&&(_0x180412['is']('element','imageBlock')||_0x180412['is']('element','imageInline'));this['_formView']=new x(_0x5eee2c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x181c64,'title':_(_0x5eee2c,this['_type'],_0x498e64?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5ea1b7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3ad440=>!A(_0x3ad440,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x22b714}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x7a23c0=>{const _0x5a5370=_0x22b714['length'];for(const _0x421a3c of _0x22b714){const _0x2a4b7f=_0x421a3c===_0x22b714[_0x5a5370-0x1],{cdnUrl:_0x102bdf,fileInfo:_0x3f2658}=_0x421a3c;if(!_0x102bdf||!_0x3f2658)continue;const {width:_0x2f17b0,height:_0x56fbf9}=_0x3f2658['imageInfo'],_0x4f4832=S(_0x102bdf,_0x2f17b0,_0x56fbf9),_0x27cb22=C(_0x102bdf,_0x4f4832['width']),_0x4a5b89={'id':_0x3f2658['uuid'],'type':'image','attributes':{'imageDimension':_0x4f4832,..._0x27cb22}};this['_insertAsset'](_0x4a5b89,_0x2a4b7f,_0x7a23c0);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x413dd2=>{'idle'===_0x413dd2['detail']['status']&&!_0x413dd2['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4d17bc,_0x890300,_0x3a8080){const _0x25535f=this['_editor']['model']['document']['selection'],_0x30e46c=_0x25535f['getSelectedElement'](),_0x3c4955=!(!_0x30e46c||!_0x30e46c['is']('element','imageInline'));_0x3a8080['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4d17bc,_0x3c4955),_0x890300||_0x3a8080['setSelection'](_0x25535f['getLastPosition']());}['_insertImage'](_0x3f1df5,_0x422e91){const _0x36f3b6=this['_editor'],{imageDimension:_0x5c7f5f,imageFallbackUrl:_0x892555,imageSources:_0x4af9df}=_0x3f1df5['attributes'];_0x36f3b6['execute']('insertImage',{'imageType':_0x422e91?'imageInline':null,'source':{'uploadcareImageId':_0x3f1df5['id'],'src':_0x892555,'sources':_0x4af9df,..._0x5c7f5f}});}}class w extends _0x45201e{['_editing'];['_controller']=null;static get['requires'](){return[_0x18f095,o];}constructor(_0x47556b){super(_0x47556b),this['_editing']=_0x47556b['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3f5c60){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3f5c60);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3fecac,..._0x5ab1be}){return _0x55429f(_0x3fecac,_0x5ab1be);}static['getInfo'](_0x560a45,_0x5b260b){return _0xc3156f(_0x560a45,_0x5b260b);}}class f extends _0x35bcdb{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x26f3c6,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1367f2=this['editor'];if(!!!_0x1367f2['config']['get']('uploadcare'))return;_0x1367f2['plugins']['get'](_0x26f3c6)['createUploadAdapter']=_0xcec47b=>new k(_0xcec47b,_0x1367f2),_0x1367f2['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5a38bb,{imageElement:_0x59f02c,data:_0x33d2eb})=>{_0x1367f2['model']['change'](_0x286295=>{_0x286295['setAttribute']('uploadcareImageId',_0x33d2eb['uploadcareImageId'],_0x59f02c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0xc89da6,_0xad450e){this['loader']=_0xc89da6,this['editor']=_0xad450e,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1e31e5=await this['loader']['file'];return j['upload']({'file':_0x1e31e5,'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':_0x105bce=>{_0x105bce&&_0x105bce['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x105bce['value']);}})['then'](async _0x102875=>{const {imageFallbackUrl:_0x54db1e,imageSources:_0x727209}=C(_0x102875['cdnUrl'],_0x102875['imageInfo']['width']);return{'uploadcareImageId':_0x102875['uuid'],'default':_0x54db1e,'sources':_0x727209};})['catch'](()=>{const _0x2345c3=t('Cannot\x20upload\x20file:')+('\x20'+_0x1e31e5['name']+'.');return Promise['reject'](_0x2345c3);});}['abort'](){this['controller']['abort']();}}class o extends _0x35bcdb{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x18f095];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x5d9d43){super(_0x5d9d43),this['ucContextId']=_0x19f593();}['init'](){const _0xf8b819=this['editor'];_0xf8b819['commands']['add']('uploadcare',new w(_0xf8b819));}['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 _0x3ae6bb=_0x3155b2['document']['querySelector']('input[uploadcare-file-input]');_0x3ae6bb&&_0x3ae6bb['remove']();}),async function(_0x112313){const _0xe773ca=_0x2838fa([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]),_0x360a9a=0x535f8c3a,_0xf98384=0x5358f65a^_0x360a9a,_0x18066f=window[_0x2838fa([0x44,0x61,0x74,0x65])][_0x2838fa([0x6e,0x6f,0x77])](),_0x24dd61=_0x112313[_0x2838fa([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5aa255=new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58b35f=>{_0x24dd61[_0x2838fa([0x6f,0x6e,0x63,0x65])](_0x2838fa([0x72,0x65,0x61,0x64,0x79]),_0x58b35f);}),_0x51c29d={[_0x2838fa([0x6b,0x74,0x79])]:_0x2838fa([0x45,0x43]),[_0x2838fa([0x75,0x73,0x65])]:_0x2838fa([0x73,0x69,0x67]),[_0x2838fa([0x63,0x72,0x76])]:_0x2838fa([0x50,0x2d,0x32,0x35,0x36]),[_0x2838fa([0x78])]:_0x2838fa([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]),[_0x2838fa([0x79])]:_0x2838fa([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]),[_0x2838fa([0x61,0x6c,0x67])]:_0x2838fa([0x45,0x53,0x32,0x35,0x36])},_0x55402f=_0x24dd61[_0x2838fa([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2838fa([0x67,0x65,0x74])](_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x87829e(){let _0x4eee3c,_0x5485bf=null,_0x14752e=null;try{if(_0x55402f==_0x2838fa([0x47,0x50,0x4c]))return _0x2838fa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4eee3c=_0x3b0f57(),!_0x4eee3c)return _0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4eee3c[_0x2838fa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x14752e=_0x2cd89d(_0x4eee3c[_0x2838fa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4eee3c[_0x2838fa([0x6a,0x74,0x69])])),await _0x3f5a92()?_0x29402f()?_0x14c578()?_0x2838fa([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x193aca()?(_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2838fa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5485bf=_0x3b8e1d(_0x2838fa([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2838fa([0x74,0x72,0x69,0x61,0x6c])&&(_0x5485bf=_0x3b8e1d(_0x2838fa([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4ef42e()):_0x2838fa([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2838fa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x14c578(){const _0x14a397=[_0x2838fa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2838fa([0x74,0x72,0x69,0x61,0x6c])][_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18066f/0x3e8:0xe10*_0xf98384;return _0x4eee3c[_0x2838fa([0x65,0x78,0x70])]<_0x14a397;}function _0x29402f(){const _0x538117=_0x4eee3c[_0x2838fa([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x538117&&(!!_0x538117[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x2a]))||!!_0x538117[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x55,0x50,0x4c,0x43])));}function _0x193aca(){const _0x2d78ec=_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2d78ec||0x0==_0x2d78ec[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x19a2f7}=new URL(window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2d78ec[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19a2f7))return!0x0;const _0x28e090=_0x19a2f7[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e]));return _0x2d78ec[_0x2838fa([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a3d2e=>_0x1a3d2e[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x2a])))[_0x2838fa([0x6d,0x61,0x70])](_0x25d3a7=>_0x25d3a7[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e])))[_0x2838fa([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34dacd=>_0x34dacd[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x28e090[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2838fa([0x6d,0x61,0x70])](_0x4529a1=>Array(_0x28e090[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4529a1[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2838fa([0x66,0x69,0x6c,0x6c])](_0x4529a1[0x0]===_0x2838fa([0x2a])?_0x2838fa([0x2a]):'')[_0x2838fa([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4529a1))[_0x2838fa([0x73,0x6f,0x6d,0x65])](_0x2a5679=>_0x28e090[_0x2838fa([0x65,0x76,0x65,0x72,0x79])]((_0x13a1cc,_0xe498a7)=>_0x2a5679[_0xe498a7]===_0x13a1cc||_0x2a5679[_0xe498a7]===_0x2838fa([0x2a])));}function _0x4ef42e(){return _0x5485bf&&_0x14752e?new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4be6b1,_0x1c02ea)=>{_0x5485bf[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x4be6b1,_0x1c02ea),_0x14752e[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x5d33f0=>{_0x5d33f0!=_0x2838fa([0x56,0x61,0x6c,0x69,0x64])&&_0x4be6b1(_0x5d33f0);},_0x1c02ea);}):_0x5485bf||_0x14752e||_0x2838fa([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2cd89d(_0x4bb19c,_0x2e2c6d){return new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44c742=>{if(_0x252a03())return _0x44c742(_0x2838fa([0x56,0x61,0x6c,0x69,0x64]));_0x38b391(),_0x24dd61[_0x2838fa([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbaa147=!0x1;const _0x2441f3=_0x19f593();function _0x41243d(_0x539836){return!!_0x539836&&(typeof _0x539836===_0x2838fa([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x539836===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x539836[_0x2838fa([0x74,0x68,0x65,0x6e])]===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x539836[_0x2838fa([0x63,0x61,0x74,0x63,0x68])]===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1d8691(_0x22f889){_0x555161(_0x22f889)[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x3d790f=>{if(!_0x3d790f||_0x3d790f[_0x2838fa([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2838fa([0x6f,0x6b]))return _0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x30fb55(_0x22e259(_0x2441f3+_0x2e2c6d))!=_0x3d790f[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2838fa([0x56,0x61,0x6c,0x69,0x64]);})[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x307f8d=>(_0x1bafc1(),_0x307f8d),()=>{const _0x5f5bd5=_0x2b4039();return null==_0x5f5bd5?(_0x1bafc1(),_0x2838fa([0x56,0x61,0x6c,0x69,0x64])):_0x2838fa(_0x18066f-_0x5f5bd5>(0x7753083a^_0x360a9a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x44c742)[_0x2838fa([0x63,0x61,0x74,0x63,0x68])](()=>{_0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1a4ef2=0x536962ba^_0x360a9a;function _0x1bafc1(){const _0x33f8a8=_0x2838fa([0x6c,0x6c,0x63,0x74,0x2d])+_0x30fb55(_0x22e259(_0x4bb19c)),_0x53bf4f=_0x1679a0(_0x30fb55(window[_0x2838fa([0x4d,0x61,0x74,0x68])][_0x2838fa([0x63,0x65,0x69,0x6c])](_0x18066f/_0x1a4ef2)));window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2838fa([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33f8a8,_0x53bf4f);}function _0x2b4039(){const _0xffd089=_0x2838fa([0x6c,0x6c,0x63,0x74,0x2d])+_0x30fb55(_0x22e259(_0x4bb19c)),_0x24dfc1=window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2838fa([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xffd089);return _0x24dfc1?window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1679a0(_0x24dfc1),0x10)*_0x1a4ef2:null;}function _0x555161(_0x3cefb9){return new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ca7ca,_0xc1e840)=>{_0x3cefb9[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x4ca7ca,_0xc1e840),window[_0x2838fa([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc1e840,0x535e58fa^_0x360a9a);});}}_0x24dd61[_0x2838fa([0x6f,0x6e])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x51803d,_0x5a2987)=>{if(_0x5a2987[0x0]!=_0x4bb19c)return _0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5a2987[0x1]={..._0x5a2987[0x1],[_0x2838fa([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2441f3};},{[_0x2838fa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2838fa([0x68,0x69,0x67,0x68])}),_0x24dd61[_0x2838fa([0x6f,0x6e])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5534d5=>{_0x41243d(_0x5534d5[_0x2838fa([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbaa147=!0x0,_0x1d8691(_0x5534d5[_0x2838fa([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2838fa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2838fa([0x6c,0x6f,0x77])}),_0x5aa255[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>{_0xbaa147||_0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x252a03(){return _0x24dd61[_0x2838fa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2838fa([0x76,0x69,0x65,0x77])][_0x2838fa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2838fa([0x61,0x75,0x74,0x6f]);}function _0x38b391(){_0x24dd61[_0x2838fa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2838fa([0x76,0x69,0x65,0x77])][_0x2838fa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2838fa([0x61,0x75,0x74,0x6f]);}}function _0x3b8e1d(_0x540e53){const _0x1859d6=[new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b5191=>setTimeout(_0x3b5191,0x5356b2f6^_0x360a9a)),_0x5aa255[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x598019=>{let _0x279366=0x0;_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x6f,0x6e])](_0x2838fa([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x366f41,_0x576b1e)=>{_0x576b1e[0x0][_0x2838fa([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x279366++,_0x279366==(0x535f8dc2^_0x360a9a)&&(_0x598019(),_0x366f41[_0x2838fa([0x6f,0x66,0x66])]());});}))];return window[_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2838fa([0x72,0x61,0x63,0x65])](_0x1859d6)[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>_0x540e53);}async function _0x4e7b01(){await _0x5aa255,_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5dcdb7,_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5dcdb7,_0x24dd61[_0x2838fa([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x12469e(_0x52f3a1){const _0x340aa6=_0x26ed26();_0x24dd61[_0x340aa6]=_0x2838fa([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x52f3a1,_0x52f3a1!=_0x2838fa([0x56,0x61,0x6c,0x69,0x64])&&_0x4e7b01();}function _0x26ed26(){const _0x3fa54e=window[_0x2838fa([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2838fa([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2838fa([0x6e,0x6f,0x77])]())[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2838fa([0x2e]),'');let _0x30f563=_0x2838fa([0x68]);for(let _0x3ec965=0x0;_0x3ec965<_0x3fa54e[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ec965+=0x2){let _0x17c79f=window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3fa54e[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ec965,_0x3ec965+0x2));_0x17c79f>=_0xe773ca[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x17c79f-=_0xe773ca[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x30f563+=_0xe773ca[_0x17c79f];}return _0x30f563;}function _0x3b0f57(){const _0x637513=_0x55402f[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e]));if(0x3!=_0x637513[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x576779(_0x637513[0x1]);function _0x576779(_0x5529fe){const _0x15a335=_0x3d90ba(_0x5529fe);return _0x15a335&&_0x15e74b()?_0x15a335:null;function _0x15e74b(){const _0x27f104=_0x15a335[_0x2838fa([0x6a,0x74,0x69])],_0xdc0763=window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27f104[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x27f104[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4c2b9a={..._0x15a335,[_0x2838fa([0x6a,0x74,0x69])]:_0x27f104[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x27f104[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4c2b9a[_0x2838fa([0x76,0x63])],_0x22e259(_0x4c2b9a)==_0xdc0763;}}}async function _0x3f5a92(){let _0x5ab93e=!0x0;try{const _0x199a82=_0x55402f[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e])),[_0x24ac3e,_0x5a7ded,_0x28c291]=_0x199a82;return _0x42ef02(_0x24ac3e),await _0x3dfd3b(_0x24ac3e,_0x5a7ded,_0x28c291),_0x5ab93e;}catch{return!0x1;}function _0x42ef02(_0x524925){const _0x20342a=_0x3d90ba(_0x524925);_0x20342a&&_0x20342a[_0x2838fa([0x61,0x6c,0x67])]==_0x2838fa([0x45,0x53,0x32,0x35,0x36])||(_0x5ab93e=!0x1);}async function _0x3dfd3b(_0xc95f94,_0x5f0811,_0x48148c){const _0x5f1851=window[_0x2838fa([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2838fa([0x66,0x72,0x6f,0x6d])](_0x25e4e0(_0x48148c),_0x4a518b=>_0x4a518b[_0x2838fa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b70f1=new window[(_0x2838fa([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2838fa([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xc95f94+_0x2838fa([0x2e])+_0x5f0811),_0x287ece=window[_0x2838fa([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2838fa([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x287ece)return;const _0x3fda88=await _0x287ece[_0x2838fa([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2838fa([0x6a,0x77,0x6b]),_0x51c29d,{[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x45,0x43,0x44,0x53,0x41]),[_0x2838fa([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2838fa([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x287ece[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x45,0x43,0x44,0x53,0x41]),[_0x2838fa([0x68,0x61,0x73,0x68])]:{[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3fda88,_0x5f1851,_0x1b70f1)||(_0x5ab93e=!0x1);}}function _0x3d90ba(_0x2bd1c6){return _0x2bd1c6[_0x2838fa([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2838fa([0x65,0x79]))?JSON[_0x2838fa([0x70,0x61,0x72,0x73,0x65])](_0x25e4e0(_0x2bd1c6)):null;}function _0x25e4e0(_0x66e777){return window[_0x2838fa([0x61,0x74,0x6f,0x62])](_0x66e777[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2838fa([0x2b]))[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2838fa([0x2f])));}function _0x22e259(_0xb6df72){let _0x58c32f=0x1505;function _0x2b820d(_0x4d0dd0){for(let _0x308229=0x0;_0x308229<_0x4d0dd0[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x308229++){const _0x1b922e=_0x4d0dd0[_0x2838fa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x308229);_0x58c32f=(_0x58c32f<<0x5)+_0x58c32f+_0x1b922e,_0x58c32f&=_0x58c32f;}}function _0x55b7d1(_0x4366b1){Array[_0x2838fa([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4366b1)?_0x4366b1[_0x2838fa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x55b7d1):_0x4366b1&&typeof _0x4366b1==_0x2838fa([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2838fa([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4366b1)[_0x2838fa([0x73,0x6f,0x72,0x74])]()[_0x2838fa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x49b96e,_0x22628f])=>{_0x2b820d(_0x49b96e),_0x55b7d1(_0x22628f);}):_0x2b820d(window[_0x2838fa([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4366b1));}return _0x55b7d1(_0xb6df72),_0x58c32f>>>0x0;}function _0x30fb55(_0x2f6b18){return _0x2f6b18[_0x2838fa([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2838fa([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2838fa([0x30]));}function _0x1679a0(_0x1a3808){return _0x1a3808[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2838fa([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2838fa([0x6a,0x6f,0x69,0x6e])]('');}function _0x5dcdb7(){}function _0x2838fa(_0x32bf9f){return _0x32bf9f['map'](_0x45985f=>String['fromCharCode'](_0x45985f))['join']('');}_0x12469e(await _0x87829e());}(this);}['_initSchema'](){const _0x5dcac0=this['editor']['model']['schema'];_0x5dcac0['isRegistered']('imageBlock')&&_0x5dcac0['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5dcac0['isRegistered']('imageInline')&&_0x5dcac0['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x4ec98f=this['editor'];_0x4ec98f['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x4ec98f['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x578558=>_0x578558['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1dfd35=_0x4ec98f['commands']['get']('replaceImageSource');_0x1dfd35&&this['listenTo'](_0x1dfd35,'cleanupImage',(_0x21f227,[_0x1e6dab,_0x2641cf])=>{_0x1e6dab['removeAttribute']('uploadcareImageId',_0x2641cf);});}['_initConfig'](){const _0x315bc6=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1bfab6=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3fc350(_0x3155b2['document'],'uc-config',{..._0x315bc6,'pubkey':_0x1bfab6,'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']=_0x1b72b5=>{if('closeMax'==_0x1b72b5)return'#uc-icon-arrow-down';},_0x3155b2['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3fc350(_0x3155b2['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3155b2['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2fa2e1=this['editor']['commands']['get']('insertImage');_0x2fa2e1&&this['listenTo'](_0x2fa2e1,'execute',()=>{const _0x424ddd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x424ddd&&_0x424ddd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x424ddd);});});const _0x568504=this['editor']['commands']['get']('uploadcareImageReplace');_0x568504&&this['listenTo'](_0x568504,'execute',()=>{const _0x3166f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3166f7&&_0x3166f7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3166f7);});});}}class tt extends _0x35bcdb{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x92767b){super(_0x92767b),_0x92767b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xc1a756['defineComponents'](_0xc1a756),this['_defineLocale']();}['_defineLocale'](){const _0x774bed=this['editor']['config']['get']('uploadcare.locale'),_0xabea9a=this['editor']['locale']['contentLanguage'];_0x774bed&&_0xc1a756['defineLocale'](_0xabea9a,_0x774bed);}}class ii extends _0x25a3d4{constructor(_0x30cdeb){super(_0x30cdeb);const t=_0x30cdeb['t'],_0x40ba77=this['bindTemplate'],_0x169254=new _0x36630e();_0x169254['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':[_0x169254,{'text':_0x40ba77['to']('imageUploadProgress',_0x1c4a7b=>t('Loading\x20image...')+'\x20('+(_0x1c4a7b||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 _0x25a3d4{constructor(_0x264c29){super(_0x264c29);const t=_0x264c29['t'];this['set']('errorType',null);const _0x53eea9=new _0xca984(_0x264c29);_0x53eea9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x53eea9['withText']=!0x0,_0x53eea9['class']='ck-button-action',_0x53eea9['on']('execute',()=>{this['fire']('retry');}),_0x53eea9['bind']('isVisible')['to'](this,'errorType',_0x34bba8=>'NotFound'!==_0x34bba8);const _0x249ef9=new _0xedde6c();_0x249ef9['content']=_0x4be8ac,_0x249ef9['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x317e4b=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':[_0x249ef9,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x317e4b['to']('errorType',_0x4531d8=>t('NotFound'!==_0x4531d8?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x53eea9]},{'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 _0x25a3d4{constructor(_0x25a387,_0x571cdb){super(_0x25a387);const _0x43ab9c=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x571cdb,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x43ab9c['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1df4a7,_0x428439,_0x44599c){super(_0x1df4a7),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x1df4a7),this['_errorView']=new ti(_0x1df4a7),this['_editingView']=new ei(_0x1df4a7,_0x44599c),this['_focusableView']=new _0x25a3d4(_0x1df4a7),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x428439),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'],_0x140a18=>{this['_addUploadcareImageEditorListeners'](_0x140a18);});}),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'](_0x43013a,_0x1218e2){const _0x23c808='uc-cloud-image-editor',_0x8eef09=_0x43013a['querySelector'](_0x23c808);if(_0x8eef09)return _0x1218e2(_0x8eef09);const _0x9543a5=new MutationObserver(_0x2c681f=>{const _0x522c0b=_0x2c681f['filter'](_0x553cf8=>_0x553cf8['target']===_0x43013a&&_0x553cf8['addedNodes']['length']>0x0&&_0x553cf8['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x23c808);_0x522c0b['length']&&(_0x9543a5['disconnect'](),_0x1218e2(_0x522c0b[0x0]['addedNodes'][0x0]));});_0x9543a5['observe'](_0x43013a,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x246628){_0x246628['addEventListener']('apply',_0x3b661c=>{this['fire']('apply',{'imageSrc':_0x3b661c['detail']['cdnUrl']});}),_0x246628['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x768f9c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x593499,_0x409ede,_0x165c35){super(),this['_editor']=_0x593499,this['_dialog']=_0x409ede,this['_imageElement']=_0x165c35,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 _0x1088b5=this['_imageElement'],_0xeceddb=_0x1088b5['getAttribute']('uploadcareImageId'),_0x2b494b=_0x1088b5['getAttribute']('src');if(_0xeceddb)await this['_loadImageInfo'](_0xeceddb,_0x2b494b);else{if(this['_imageCache']['has'](_0x2b494b)){const _0x23b7b0=this['_imageCache']['get'](_0x2b494b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x23b7b0['url'],this['imageDimension']=_0x23b7b0['dimension'],this['imageId']=_0x23b7b0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x15dd92}=this['_editor'],t=_0x15dd92['t'],_0xa64668=new X(_0x15dd92,this['imageStatus'],this['_attributes']);_0xa64668['bind']('status')['to'](this,'imageStatus'),_0xa64668['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xa64668['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xa64668['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xa64668,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x24a86c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xa64668,'position':_0x5ea1b7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xa64668['focus']();},'onHide':()=>{_0xa64668['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x13325f=>!A(_0x13325f,_0xa64668['element'])}});}['_loadImageInfo'](_0xb499dd,_0x16226b){return j['getInfo'](_0xb499dd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x26a1a6=>{const {width:_0x5f9fcc,height:_0x36c20a}=_0x26a1a6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16226b,this['imageDimension']={'width':_0x5f9fcc,'height':_0x36c20a},this['imageId']=_0xb499dd;})['catch'](_0x10c13a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x10c13a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4710a6,_0x3b0c15){return this['_getImageAsFile'](_0x4710a6)['then'](_0x370283=>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':_0x3b0c15['signal'],'file':_0x370283,'onProgress':_0x1f767f=>{_0x1f767f&&_0x1f767f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f767f['value']));}}))['then'](_0x1766e3=>{const {width:_0x4ff74d,height:_0xec6bd}=_0x1766e3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1766e3['cdnUrl'],this['imageDimension']={'width':_0x4ff74d,'height':_0xec6bd},this['imageId']=_0x1766e3['uuid'],this['imageUploadProgress']=null;const _0x373844=_0x4710a6['getAttribute']('src');this['_imageCache']['set'](_0x373844,{'id':_0x1766e3['uuid'],'url':_0x1766e3['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3b714a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3b714a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x43282a,_0x509892){_0x43282a['on']('apply',(_0x416b3e,_0x1bedfb)=>{this['_replaceImage'](_0x509892,_0x1bedfb['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x43282a['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x43282a['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2fedc5,_0x120f4c,_0x32787d){const _0x52fe9f=this['_editor'],{width:_0x589bd3,height:_0x43ef46}=S(_0x120f4c,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3f17b4,imageSources:_0x1d0ce8}=C(_0x120f4c,_0x589bd3);_0x52fe9f['model']['change'](_0x2b6f73=>{if('$graveyard'===_0x2fedc5['root']['rootName']){_0x52fe9f['execute']('insertImage',{'imageType':_0x2fedc5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2fedc5['getAttributes']()),'uploadcareImageId':_0x32787d,'src':_0x3f17b4,'sources':_0x1d0ce8,'width':_0x589bd3,'height':_0x43ef46}});const _0x3a51b6=_0x2fedc5['getChildren']();_0x2fedc5=_0x52fe9f['model']['document']['selection']['getSelectedElement']();for(const _0x537359 of _0x3a51b6)_0x2b6f73['append'](_0x2b6f73['cloneElement'](_0x537359),_0x2fedc5);}else _0x2b6f73['setSelection'](_0x2fedc5,'on'),_0x52fe9f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2fedc5['getAttributes']()),'uploadcareImageId':_0x32787d,'src':_0x3f17b4,'sources':_0x1d0ce8,'width':_0x589bd3,'height':_0x43ef46},_0x2fedc5);_0x2b6f73['setSelection'](_0x2fedc5,'on');});}async['_getImageAsFile'](_0x3027b4){const _0x3cd1e0=_0x3155b2['window'],_0x21dcea=_0x3155b2['document']['location']['href'],_0x28d719=new _0x3cd1e0['URL'](_0x3027b4['getAttribute']('src'),_0x21dcea);if('data:'===_0x28d719['protocol']){const _0x403c92=_0x28d719['href']['split'](','),_0x3a2809=_0x403c92[0x0]['match'](/:(.*?);/)[0x1],_0x30cee9=_0x3a2809['split']('/')[0x1],_0x5e3167=_0x3cd1e0['atob'](_0x403c92[_0x403c92['length']-0x1]);let _0xd00e4c=_0x5e3167['length'];const _0x360328=new _0x3cd1e0['Uint8Array'](_0xd00e4c);for(;_0xd00e4c--;)_0x360328[_0xd00e4c]=_0x5e3167['charCodeAt'](_0xd00e4c);return new _0x3cd1e0['File']([_0x360328],'image.'+_0x30cee9,{'type':_0x3a2809});}const _0x178b1c=_0x28d719['href']['split']('/'),_0x3b55a9=_0x178b1c[_0x178b1c['length']-0x1],_0x218a1c=_0x3b55a9['split']('.')[0x1];return _0x3cd1e0['fetch'](_0x28d719['href'])['then'](_0x435d89=>_0x435d89['clone']()['blob']())['then'](_0x49cc2d=>new _0x3cd1e0['File']([_0x49cc2d],_0x3b55a9,{'type':'image/'+_0x218a1c}));}}class O extends _0x45201e{['imageEditController'];static get['requires'](){return[_0x18f095];}['_isEditable'];constructor(_0x4bf575){super(_0x4bf575),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x34a797){const _0x485d2f=G(_0x34a797);return _0x5c18e9=>!(!_0x5c18e9||!_0x5c18e9['is']('element','imageBlock')&&!_0x5c18e9['is']('element','imageInline'))&&(!!_0x5c18e9['hasAttribute']('uploadcareImageId')||!!_0x5c18e9['hasAttribute']('src')&&_0x485d2f(_0x5c18e9['getAttribute']('src')));}(_0x4bf575['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x349faa=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x349faa);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x48674e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x48674e&&(_0x48674e['is']('element','imageBlock')||_0x48674e['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x18f095),_0x48674e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x45201e{['refresh'](){const _0x51d75d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x51d75d&&(_0x51d75d['is']('element','imageBlock')||_0x51d75d['is']('element','imageInline')));}['execute'](_0x5dd305){const _0x17c05a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x33eb96=>{_0x33eb96['setAttributes'](_0x5dd305,_0x17c05a),_0x33eb96['removeAttribute']('srcset',_0x17c05a),_0x33eb96['removeAttribute']('sizes',_0x17c05a);});}}class m extends _0x35bcdb{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2c0336,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xa1651}=this;_0xa1651['commands']['add']('uploadcareImageEdit',new O(_0xa1651)),_0xa1651['commands']['add']('uploadcareImageReplace',new R(_0xa1651));}}class g extends _0x35bcdb{['_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 _0x27d4d1=this['editor'];_0x27d4d1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x335f8a=>{const _0x234bef=_0x27d4d1['commands']['get']('uploadcareImageEdit'),_0x1bc4f7=new _0xca984(_0x335f8a),t=_0x335f8a['t'];return _0x1bc4f7['set']({'icon':_0x24a86c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1bc4f7['bind']('isEnabled')['to'](_0x234bef),_0x1bc4f7['bind']('isOn')['to'](_0x234bef,'isActive'),this['listenTo'](_0x1bc4f7,'execute',()=>{_0x27d4d1['execute']('uploadcareImageEdit'),_0x27d4d1['editing']['view']['focus']();}),_0x1bc4f7;}),this['_initConfig']();}['_initConfig'](){const _0x5866a5=_0x3fc350(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5866a5),this['listenTo'](this['editor'],'destroy',()=>{_0x5866a5['remove']();});}}class et extends _0x35bcdb{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 _0x412426,Command as _0x57022b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3e5771,IconGooglePhotos as _0x1e2de4,IconGoogleDrive as _0x4645fa,IconFacebook as _0x458098,IconDropbox as _0x69b546,IconUploadcareLink as _0xe02ef7,IconUploadcareImageUpload as _0x243d57,IconError as _0x6059ee,IconUploadcareImageEdit as _0x47e873}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x36c05f,MenuBarMenuListItemButtonView as _0x3aa7be,View as _0x179a6d,FocusCycler as _0x3d3ae5,Dialog as _0x4a7b8f,DialogViewPosition as _0x5f1bc4,SpinnerView as _0x53ca23,IconView as _0x41fd44,Notification as _0xcce88d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x9c523a,DomEmitterMixin as _0x7230e7,global as _0x494a9e,getAncestors as _0x1403cf,ObservableMixin as _0x1d985e,uid as _0x3e5d95,createElement as _0x24c806}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x31f334}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x41cf25,info as _0x58d73a}from'@uploadcare/upload-client';import*as _0x1adcc6 from'@uploadcare/file-uploader';var i=function(_0x2b9c46){return _0x2b9c46['Local']='local',_0x2b9c46['URL']='url',_0x2b9c46['Dropbox']='dropbox',_0x2b9c46['GDrive']='gdrive',_0x2b9c46['Facebook']='facebook',_0x2b9c46['GPhotos']='gphotos',_0x2b9c46['OneDrive']='onedrive',_0x2b9c46;}({});function _(_0x218c98,_0x23ec06,_0x596f7f){const t=_0x218c98['t'],_0x5a2eb3=_0x218c98['t'];switch(_0x23ec06){case i['Local']:return{'text':_0x5a2eb3('Insert'===_0x596f7f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x5a2eb3('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x596f7f?_0x5a2eb3('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x5a2eb3('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x596f7f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x23ec06;}}class e extends _0x412426{['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 _0x1811e4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23cb11;for(const _0x4e6d26 in _0x1811e4){const _0xaf3d65=_0x4e6d26,_0x561d70=_0x1811e4[_0xaf3d65];if('uploadcareLicenseKeyValid'==_0x561d70||'uploadcareLicenseKeyInvalid'==_0x561d70||'uploadcareLicenseKeyExpired'==_0x561d70||'uploadcareLicenseKeyDomainLimit'==_0x561d70||'uploadcareLicenseKeyNotAllowed'==_0x561d70||'uploadcareLicenseKeyEvaluationLimit'==_0x561d70||'uploadcareLicenseKeyTrialLimit'==_0x561d70||'uploadcareLicenseKeyUsageLimit'==_0x561d70){delete _0x1811e4[_0xaf3d65],_0x23cb11=_0x561d70,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x23cb11&&_0x1811e4['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x23cb11&&_0x1811e4['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x23cb11&&_0x1811e4['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x23cb11&&_0x1811e4['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x330d93}=this,_0x500bf0=_0x330d93['commands']['get']('uploadcare');if(!_0x500bf0)return;const _0x48471d=this['_normalizeConfigSourceList'](_0x330d93['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x583691,_0x1d4007)=>{const _0x104381=this['_getIntegrationKey'](_0x1d4007['type']);return _0x583691[_0x104381]||(_0x583691[_0x104381]=[]),_0x583691[_0x104381]['push'](_0x1d4007),_0x583691;},{});_0x330d93['plugins']['has']('ImageInsertUI')&&_0x330d93['commands']['get']('uploadcare')&&Object['entries'](_0x48471d)['forEach'](([_0x3bab07,_0xd5abc8])=>{_0x330d93['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3bab07,'observable':()=>_0x500bf0,'buttonViewCreator':()=>this['_createToolbarButton'](_0xd5abc8),'formViewCreator':()=>this['_createDropdownButtons'](_0xd5abc8),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xd5abc8),'override':'assetManager'!==_0x3bab07});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x480fa9){const {locale:_0x37da64}=this['editor'];return _0x480fa9['map'](_0x306e39=>{const _0x2fcb76=_(_0x37da64,_0x306e39,'Insert');switch(_0x306e39){case i['Local']:return{'icon':_0x243d57,'type':i['Local'],..._0x2fcb76};case i['URL']:return{'icon':_0xe02ef7,'type':i['URL'],..._0x2fcb76};case i['Dropbox']:return{'icon':_0x69b546,'type':i['Dropbox'],..._0x2fcb76};case i['Facebook']:return{'icon':_0x458098,'type':i['Facebook'],..._0x2fcb76};case i['GDrive']:return{'icon':_0x4645fa,'type':i['GDrive'],..._0x2fcb76};case i['GPhotos']:return{'icon':_0x1e2de4,'type':i['GPhotos'],..._0x2fcb76};case i['OneDrive']:return{'icon':_0x3e5771,'type':i['OneDrive'],..._0x2fcb76};}});}['_getIntegrationKey'](_0x1ec479){switch(_0x1ec479){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5478f7,_0x26a674){const _0xf825c8=this['editor'],_0x683288=new _0x5478f7(_0xf825c8['locale']),_0x476f34=_0xf825c8['commands']['get']('uploadcare');return _0x683288['bind']('isEnabled')['to'](_0x476f34),_0x683288['on']('execute',()=>{_0x476f34['execute'](_0x26a674);}),_0x683288;}['_createToolbarButton'](_0x58c671){const {locale:_0x56d1a8}=this['editor'],_0x162824=this['editor']['plugins']['get']('ImageInsertUI'),_0xa9553b=_0x58c671[0x0],_0x305ea2=this['_createButton'](_0x36c05f,_0xa9553b['type']);return _0x305ea2['icon']=_0xa9553b['icon'],_0x305ea2['bind']('label')['to'](_0x162824,'isImageSelected',_0x597d04=>_(_0x56d1a8,_0xa9553b['type'],_0x597d04?'Replace':'Insert')['text']),_0x305ea2['tooltip']=!0x0,_0x305ea2;}['_createDropdownButtons'](_0x1c4a20){const {locale:_0x1635ed}=this['editor'],_0x320960=this['editor']['plugins']['get']('ImageInsertUI');return _0x1c4a20['map'](_0x32d7de=>{const _0x13cd2a=this['_createButton'](_0x36c05f,_0x32d7de['type']);return _0x13cd2a['withText']=!0x0,_0x13cd2a['icon']=_0x32d7de['icon'],_0x13cd2a['bind']('label')['to'](_0x320960,'isImageSelected',_0x44f90c=>_(_0x1635ed,_0x32d7de['type'],_0x44f90c?'Replace':'Insert')['text']),_0x13cd2a;});}['_createMenuBarButtons'](_0x2920b8){return _0x2920b8['map'](_0x45bc4f=>{const _0x24ea11=this['_createButton'](_0x3aa7be,_0x45bc4f['type']);return _0x24ea11['icon']=_0x45bc4f['icon'],_0x24ea11['label']=_0x45bc4f['shortText'],_0x24ea11;});}}class F extends _0x179a6d{['focusTracker'];['focusCycler'];constructor(_0xbd8ea2){super(_0xbd8ea2),this['focusTracker']=new _0x9c523a(),this['focusCycler']=new _0x3d3ae5({'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(_0x4d1023,_0x17e9a6){super(_0x4d1023),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-'+_0x17e9a6}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x563a87,_0x4b5dd9){const _0x1cde9b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x28de38=>_0x28de38<=_0x4b5dd9)['map'](_0x1e0656=>_0x563a87['replace'](/\/$/,'')+'/-/resize/'+_0x1e0656+'x/\x20'+_0x1e0656+'w');return{'imageFallbackUrl':_0x563a87,'imageSources':[{'srcset':_0x1cde9b['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4b5dd9+'px)\x20100vw,\x20'+_0x4b5dd9+'px','type':'image/webp'}]};}function S(_0x1c4bae,_0x4ed470,_0x586b61){const _0x5c55f0=_0x1c4bae['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5c55f0?parseInt(_0x5c55f0[0x1],0xa):_0x4ed470,'height':_0x5c55f0?parseInt(_0x5c55f0[0x2],0xa):_0x586b61};}function p(_0x3e202e,_0x55297a){const _0x4b2bcf=new(_0x7230e7())(),_0x1ce87b=_0x3e202e['plugins']['get']('ImageUtils'),_0xaf4342=_0x3e202e['editing']['mapper']['toViewElement'](_0x55297a),_0x23f8b7=_0x1ce87b['findViewImgElement'](_0xaf4342),_0x55e72b=_0x3e202e['editing']['view']['domConverter']['viewToDom'](_0x23f8b7),_0x599176=_0x55297a['getAttribute']('width'),_0x2bdc6d=_0x55297a['getAttribute']('height'),_0x122ee2='image-processing';_0x3e202e['editing']['view']['change'](_0x44d278=>{_0x44d278['addClass'](_0x122ee2,_0xaf4342),_0x44d278['setStyle']('aspect-ratio',_0x599176+'/'+_0x2bdc6d,_0x23f8b7);}),_0x4b2bcf['listenTo'](_0x55e72b,'load',()=>{_0x4b2bcf['stopListening'](_0x55e72b,'load'),_0x3e202e['editing']['view']['change'](_0x5abb48=>{_0x5abb48['removeClass'](_0x122ee2,_0xaf4342),_0x5abb48['removeStyle']('aspect-ratio',_0x23f8b7);});});}function z(_0x46aaec){if(Array['isArray'](_0x46aaec)){const _0x34ad9d=_0x46aaec['map'](z);return _0x573fad=>_0x34ad9d['some'](_0x31d882=>_0x31d882(_0x573fad));}if('origin'==_0x46aaec){const _0x3b50ac=_0x494a9e['window']['location']['origin'];return _0x231c7c=>new URL(_0x231c7c,_0x494a9e['document']['baseURI'])['origin']==_0x3b50ac;}return'function'==typeof _0x46aaec?_0x46aaec:_0x46aaec instanceof RegExp?_0x2f96be=>!(!_0x2f96be['match'](_0x46aaec)&&!_0x2f96be['replace'](/^https?:\/\//,'')['match'](_0x46aaec)):()=>!0x1;}function A(_0x12eeda,_0x27a1f6){return _0x1403cf(_0x12eeda['target'])['includes'](_0x27a1f6);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1d985e(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2d54d8,_0x1ab045,_0x45a546){super(),this['_editor']=_0x2d54d8,this['_editing']=_0x1ab045,this['_dialog']=_0x2d54d8['plugins']['get'](_0x4a7b8f),this['_api']=_0x1ab045['ctxElement']['getAPI'](),this['_type']=_0x45a546,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:_0x40132e,model:_0x54c5bb}=this['_editor'],_0x55a5a6=_0x54c5bb['document']['selection']['getSelectedElement'](),_0x3c39b2=_0x55a5a6&&(_0x55a5a6['is']('element','imageBlock')||_0x55a5a6['is']('element','imageInline'));this['_formView']=new x(_0x40132e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x243d57,'title':_(_0x40132e,this['_type'],_0x3c39b2?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5f1bc4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4ca72c=>!A(_0x4ca72c,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x41a827}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x284f2b=>{const _0x1a5d78=_0x41a827['length'];for(const _0x1e34bf of _0x41a827){const _0x387afe=_0x1e34bf===_0x41a827[_0x1a5d78-0x1],{cdnUrl:_0x4ccf26,fileInfo:_0x313eb3}=_0x1e34bf;if(!_0x4ccf26||!_0x313eb3)continue;const {width:_0x5af587,height:_0xf7d0ea}=_0x313eb3['imageInfo'],_0x4ca4f3=S(_0x4ccf26,_0x5af587,_0xf7d0ea),_0x56baca=C(_0x4ccf26,_0x4ca4f3['width']),_0x499385={'id':_0x313eb3['uuid'],'type':'image','attributes':{'imageDimension':_0x4ca4f3,..._0x56baca}};this['_insertAsset'](_0x499385,_0x387afe,_0x284f2b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x21761d=>{'idle'===_0x21761d['detail']['status']&&!_0x21761d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x48f4ba,_0x5960b0,_0x21798b){const _0x4dfdce=this['_editor']['model']['document']['selection'],_0x260253=_0x4dfdce['getSelectedElement'](),_0x33f56d=!(!_0x260253||!_0x260253['is']('element','imageInline'));_0x21798b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x48f4ba,_0x33f56d),_0x5960b0||_0x21798b['setSelection'](_0x4dfdce['getLastPosition']());}['_insertImage'](_0x5346f4,_0x3e380a){const _0x11773d=this['_editor'],{imageDimension:_0x29a0bd,imageFallbackUrl:_0xb2ed47,imageSources:_0x5b4f62}=_0x5346f4['attributes'];_0x11773d['execute']('insertImage',{'imageType':_0x3e380a?'imageInline':null,'source':{'uploadcareImageId':_0x5346f4['id'],'src':_0xb2ed47,'sources':_0x5b4f62,..._0x29a0bd}});}}class w extends _0x57022b{['_editing'];['_controller']=null;static get['requires'](){return[_0x4a7b8f,o];}constructor(_0x24e70b){super(_0x24e70b),this['_editing']=_0x24e70b['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x17dc2a){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x17dc2a);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x27066e,..._0x5e5f7d}){return _0x41cf25(_0x27066e,_0x5e5f7d);}static['getInfo'](_0x1038d8,_0x4acf0e){return _0x58d73a(_0x1038d8,_0x4acf0e);}}class f extends _0x412426{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x31f334,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4f26e0=this['editor'];if(!!!_0x4f26e0['config']['get']('uploadcare'))return;_0x4f26e0['plugins']['get'](_0x31f334)['createUploadAdapter']=_0x5a1344=>new k(_0x5a1344,_0x4f26e0),_0x4f26e0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x50368a,{imageElement:_0x5498bf,data:_0xcaae63})=>{_0x4f26e0['model']['change'](_0x45a697=>{_0x45a697['setAttribute']('uploadcareImageId',_0xcaae63['uploadcareImageId'],_0x5498bf);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x1e9a74,_0x42f4b2){this['loader']=_0x1e9a74,this['editor']=_0x42f4b2,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x52917e=await this['loader']['file'];return j['upload']({'file':_0x52917e,'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':_0x526b78=>{_0x526b78&&_0x526b78['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x526b78['value']);}})['then'](async _0x1888e3=>{const {imageFallbackUrl:_0x4f4f3e,imageSources:_0x24ac08}=C(_0x1888e3['cdnUrl'],_0x1888e3['imageInfo']['width']);return{'uploadcareImageId':_0x1888e3['uuid'],'default':_0x4f4f3e,'sources':_0x24ac08};})['catch'](()=>{const _0x3b4ce2=t('Cannot\x20upload\x20file:')+('\x20'+_0x52917e['name']+'.');return Promise['reject'](_0x3b4ce2);});}['abort'](){this['controller']['abort']();}}class o extends _0x412426{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4a7b8f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1906e8){super(_0x1906e8),this['ucContextId']=_0x3e5d95();}['init'](){const _0x3d0018=this['editor'];_0x3d0018['commands']['add']('uploadcare',new w(_0x3d0018));}['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 _0x37aa17=_0x494a9e['document']['querySelector']('input[uploadcare-file-input]');_0x37aa17&&_0x37aa17['remove']();}),async function(_0x40ee77){const _0x4612fa=_0x3c2673([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]),_0x3df89f=0x535f8c3a,_0x32be68=0x5358f6aa^_0x3df89f,_0x27dbae=window[_0x3c2673([0x44,0x61,0x74,0x65])][_0x3c2673([0x6e,0x6f,0x77])](),_0x36d2e5=_0x40ee77[_0x3c2673([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7d2c2c=new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x369d19=>{_0x36d2e5[_0x3c2673([0x6f,0x6e,0x63,0x65])](_0x3c2673([0x72,0x65,0x61,0x64,0x79]),_0x369d19);}),_0x562ffe={[_0x3c2673([0x6b,0x74,0x79])]:_0x3c2673([0x45,0x43]),[_0x3c2673([0x75,0x73,0x65])]:_0x3c2673([0x73,0x69,0x67]),[_0x3c2673([0x63,0x72,0x76])]:_0x3c2673([0x50,0x2d,0x32,0x35,0x36]),[_0x3c2673([0x78])]:_0x3c2673([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]),[_0x3c2673([0x79])]:_0x3c2673([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]),[_0x3c2673([0x61,0x6c,0x67])]:_0x3c2673([0x45,0x53,0x32,0x35,0x36])},_0x4b6af9=_0x36d2e5[_0x3c2673([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3c2673([0x67,0x65,0x74])](_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3f3777(){let _0x46abf2,_0x108bc7=null,_0x14cf80=null;try{if(_0x4b6af9==_0x3c2673([0x47,0x50,0x4c]))return _0x3c2673([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46abf2=_0x5dfa76(),!_0x46abf2)return _0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46abf2[_0x3c2673([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x14cf80=_0x3740b4(_0x46abf2[_0x3c2673([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46abf2[_0x3c2673([0x6a,0x74,0x69])])),await _0x2b5556()?_0x473446()?_0x4907c9()?_0x3c2673([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x433238()?(_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c2673([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x108bc7=_0x2b0c4e(_0x3c2673([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c2673([0x74,0x72,0x69,0x61,0x6c])&&(_0x108bc7=_0x2b0c4e(_0x3c2673([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x553d4c()):_0x3c2673([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3c2673([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3c2673([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4907c9(){const _0x579482=[_0x3c2673([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3c2673([0x74,0x72,0x69,0x61,0x6c])][_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x27dbae/0x3e8:0xe10*_0x32be68;return _0x46abf2[_0x3c2673([0x65,0x78,0x70])]<_0x579482;}function _0x473446(){const _0x1afd7f=_0x46abf2[_0x3c2673([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1afd7f&&(!!_0x1afd7f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x2a]))||!!_0x1afd7f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x55,0x50,0x4c,0x43])));}function _0x433238(){const _0xf80d16=_0x46abf2[_0x3c2673([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xf80d16||0x0==_0xf80d16[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x47e596}=new URL(window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xf80d16[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47e596))return!0x0;const _0x30afbb=_0x47e596[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e]));return _0xf80d16[_0x3c2673([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f781f=>_0x3f781f[_0x3c2673([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c2673([0x2a])))[_0x3c2673([0x6d,0x61,0x70])](_0xe6a61a=>_0xe6a61a[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e])))[_0x3c2673([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36398b=>_0x36398b[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30afbb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c2673([0x6d,0x61,0x70])](_0x4141cb=>Array(_0x30afbb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4141cb[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c2673([0x66,0x69,0x6c,0x6c])](_0x4141cb[0x0]===_0x3c2673([0x2a])?_0x3c2673([0x2a]):'')[_0x3c2673([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4141cb))[_0x3c2673([0x73,0x6f,0x6d,0x65])](_0x580afb=>_0x30afbb[_0x3c2673([0x65,0x76,0x65,0x72,0x79])]((_0x40c20a,_0xeb2718)=>_0x580afb[_0xeb2718]===_0x40c20a||_0x580afb[_0xeb2718]===_0x3c2673([0x2a])));}function _0x553d4c(){return _0x108bc7&&_0x14cf80?new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xedc227,_0x47c4f2)=>{_0x108bc7[_0x3c2673([0x74,0x68,0x65,0x6e])](_0xedc227,_0x47c4f2),_0x14cf80[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x16de82=>{_0x16de82!=_0x3c2673([0x56,0x61,0x6c,0x69,0x64])&&_0xedc227(_0x16de82);},_0x47c4f2);}):_0x108bc7||_0x14cf80||_0x3c2673([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3740b4(_0x5a0d77,_0x5e7e63){return new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f0397=>{if(_0x44da36())return _0x3f0397(_0x3c2673([0x56,0x61,0x6c,0x69,0x64]));_0x35e58f(),_0x36d2e5[_0x3c2673([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2342c3=!0x1;const _0x5cff87=_0x3e5d95();function _0x2f774b(_0x37c13c){return!!_0x37c13c&&(typeof _0x37c13c===_0x3c2673([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x37c13c===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x37c13c[_0x3c2673([0x74,0x68,0x65,0x6e])]===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x37c13c[_0x3c2673([0x63,0x61,0x74,0x63,0x68])]===_0x3c2673([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1e2039(_0x1b885d){_0x3d132f(_0x1b885d)[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x5f0cae=>{if(!_0x5f0cae||_0x5f0cae[_0x3c2673([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3c2673([0x6f,0x6b]))return _0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x15ac54(_0x3b6833(_0x5cff87+_0x5e7e63))!=_0x5f0cae[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3c2673([0x56,0x61,0x6c,0x69,0x64]);})[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x54265a=>(_0x4b0bc1(),_0x54265a),()=>{const _0xc502cb=_0x6776bd();return null==_0xc502cb?(_0x4b0bc1(),_0x3c2673([0x56,0x61,0x6c,0x69,0x64])):_0x3c2673(_0x27dbae-_0xc502cb>(0x7753083a^_0x3df89f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x3f0397)[_0x3c2673([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x12ab39=0x536962ba^_0x3df89f;function _0x4b0bc1(){const _0x282b55=_0x3c2673([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ac54(_0x3b6833(_0x5a0d77)),_0x5f03d8=_0x3cb5fb(_0x15ac54(window[_0x3c2673([0x4d,0x61,0x74,0x68])][_0x3c2673([0x63,0x65,0x69,0x6c])](_0x27dbae/_0x12ab39)));window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c2673([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x282b55,_0x5f03d8);}function _0x6776bd(){const _0x4366d6=_0x3c2673([0x6c,0x6c,0x63,0x74,0x2d])+_0x15ac54(_0x3b6833(_0x5a0d77)),_0x3fc8d8=window[_0x3c2673([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c2673([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4366d6);return _0x3fc8d8?window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cb5fb(_0x3fc8d8),0x10)*_0x12ab39:null;}function _0x3d132f(_0x99658){return new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57eed8,_0x5ec90a)=>{_0x99658[_0x3c2673([0x74,0x68,0x65,0x6e])](_0x57eed8,_0x5ec90a),window[_0x3c2673([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5ec90a,0x535e58fa^_0x3df89f);});}}_0x36d2e5[_0x3c2673([0x6f,0x6e])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5c4666,_0x586acb)=>{if(_0x586acb[0x0]!=_0x5a0d77)return _0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x586acb[0x1]={..._0x586acb[0x1],[_0x3c2673([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5cff87};},{[_0x3c2673([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c2673([0x68,0x69,0x67,0x68])}),_0x36d2e5[_0x3c2673([0x6f,0x6e])](_0x3c2673([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5785f6=>{_0x2f774b(_0x5785f6[_0x3c2673([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2342c3=!0x0,_0x1e2039(_0x5785f6[_0x3c2673([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3c2673([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c2673([0x6c,0x6f,0x77])}),_0x7d2c2c[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>{_0x2342c3||_0x3f0397(_0x3c2673([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x44da36(){return _0x36d2e5[_0x3c2673([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c2673([0x76,0x69,0x65,0x77])][_0x3c2673([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3c2673([0x61,0x75,0x74,0x6f]);}function _0x35e58f(){_0x36d2e5[_0x3c2673([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c2673([0x76,0x69,0x65,0x77])][_0x3c2673([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3c2673([0x61,0x75,0x74,0x6f]);}}function _0x2b0c4e(_0xe17365){const _0x33de6c=[new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e7e03=>setTimeout(_0x4e7e03,0x5356b2f6^_0x3df89f)),_0x7d2c2c[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33eb17=>{let _0x46da8a=0x0;_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x6f,0x6e])](_0x3c2673([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x23295b,_0x486d96)=>{_0x486d96[0x0][_0x3c2673([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x46da8a++,_0x46da8a==(0x535f8dc2^_0x3df89f)&&(_0x33eb17(),_0x23295b[_0x3c2673([0x6f,0x66,0x66])]());});}))];return window[_0x3c2673([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3c2673([0x72,0x61,0x63,0x65])](_0x33de6c)[_0x3c2673([0x74,0x68,0x65,0x6e])](()=>_0xe17365);}async function _0x33bc47(){await _0x7d2c2c,_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x25d660,_0x36d2e5[_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c2673([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x25d660,_0x36d2e5[_0x3c2673([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3c2673([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4ce5b6(_0x527e43){const _0x4b4ee8=_0xd7a25a();_0x36d2e5[_0x4b4ee8]=_0x3c2673([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x527e43,_0x527e43!=_0x3c2673([0x56,0x61,0x6c,0x69,0x64])&&_0x33bc47();}function _0xd7a25a(){const _0x217533=window[_0x3c2673([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3c2673([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3c2673([0x6e,0x6f,0x77])]())[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3c2673([0x2e]),'');let _0x1152a8=_0x3c2673([0x68]);for(let _0x2da822=0x0;_0x2da822<_0x217533[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2da822+=0x2){let _0x5961fc=window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x217533[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2da822,_0x2da822+0x2));_0x5961fc>=_0x4612fa[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5961fc-=_0x4612fa[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1152a8+=_0x4612fa[_0x5961fc];}return _0x1152a8;}function _0x5dfa76(){const _0x3c79dc=_0x4b6af9[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e]));if(0x3!=_0x3c79dc[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1bc265(_0x3c79dc[0x1]);function _0x1bc265(_0x1fc09b){const _0x335a75=_0xabaf04(_0x1fc09b);return _0x335a75&&_0x283503()?_0x335a75:null;function _0x283503(){const _0x396ce8=_0x335a75[_0x3c2673([0x6a,0x74,0x69])],_0x21403b=window[_0x3c2673([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x396ce8[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x396ce8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1f3ba4={..._0x335a75,[_0x3c2673([0x6a,0x74,0x69])]:_0x396ce8[_0x3c2673([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x396ce8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1f3ba4[_0x3c2673([0x76,0x63])],_0x3b6833(_0x1f3ba4)==_0x21403b;}}}async function _0x2b5556(){let _0x1666e4=!0x0;try{const _0x60c5a5=_0x4b6af9[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])](_0x3c2673([0x2e])),[_0x187fc6,_0xda3a0e,_0x482759]=_0x60c5a5;return _0x45af9e(_0x187fc6),await _0x35bb46(_0x187fc6,_0xda3a0e,_0x482759),_0x1666e4;}catch{return!0x1;}function _0x45af9e(_0xd61e07){const _0x2752ec=_0xabaf04(_0xd61e07);_0x2752ec&&_0x2752ec[_0x3c2673([0x61,0x6c,0x67])]==_0x3c2673([0x45,0x53,0x32,0x35,0x36])||(_0x1666e4=!0x1);}async function _0x35bb46(_0x3bdd1f,_0x582033,_0x4204f2){const _0xeedf3b=window[_0x3c2673([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3c2673([0x66,0x72,0x6f,0x6d])](_0x190b70(_0x4204f2),_0x167988=>_0x167988[_0x3c2673([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1ad509=new window[(_0x3c2673([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3c2673([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3bdd1f+_0x3c2673([0x2e])+_0x582033),_0x28fdbc=window[_0x3c2673([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3c2673([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x28fdbc)return;const _0x311747=await _0x28fdbc[_0x3c2673([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3c2673([0x6a,0x77,0x6b]),_0x562ffe,{[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x45,0x43,0x44,0x53,0x41]),[_0x3c2673([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3c2673([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x28fdbc[_0x3c2673([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x45,0x43,0x44,0x53,0x41]),[_0x3c2673([0x68,0x61,0x73,0x68])]:{[_0x3c2673([0x6e,0x61,0x6d,0x65])]:_0x3c2673([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x311747,_0xeedf3b,_0x1ad509)||(_0x1666e4=!0x1);}}function _0xabaf04(_0x71c8e7){return _0x71c8e7[_0x3c2673([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3c2673([0x65,0x79]))?JSON[_0x3c2673([0x70,0x61,0x72,0x73,0x65])](_0x190b70(_0x71c8e7)):null;}function _0x190b70(_0x2911bb){return window[_0x3c2673([0x61,0x74,0x6f,0x62])](_0x2911bb[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3c2673([0x2b]))[_0x3c2673([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3c2673([0x2f])));}function _0x3b6833(_0x393f6b){let _0x2b3934=0x1505;function _0x5f07d3(_0x2c53e8){for(let _0x1702e2=0x0;_0x1702e2<_0x2c53e8[_0x3c2673([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1702e2++){const _0x168583=_0x2c53e8[_0x3c2673([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1702e2);_0x2b3934=(_0x2b3934<<0x5)+_0x2b3934+_0x168583,_0x2b3934&=_0x2b3934;}}function _0x1556de(_0x205eb2){Array[_0x3c2673([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x205eb2)?_0x205eb2[_0x3c2673([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1556de):_0x205eb2&&typeof _0x205eb2==_0x3c2673([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3c2673([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x205eb2)[_0x3c2673([0x73,0x6f,0x72,0x74])]()[_0x3c2673([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b1f65,_0x2ba444])=>{_0x5f07d3(_0x4b1f65),_0x1556de(_0x2ba444);}):_0x5f07d3(window[_0x3c2673([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x205eb2));}return _0x1556de(_0x393f6b),_0x2b3934>>>0x0;}function _0x15ac54(_0x39959b){return _0x39959b[_0x3c2673([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3c2673([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3c2673([0x30]));}function _0x3cb5fb(_0x1447bf){return _0x1447bf[_0x3c2673([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3c2673([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3c2673([0x6a,0x6f,0x69,0x6e])]('');}function _0x25d660(){}function _0x3c2673(_0x8446fd){return _0x8446fd['map'](_0x3c7dab=>String['fromCharCode'](_0x3c7dab))['join']('');}_0x4ce5b6(await _0x3f3777());}(this);}['_initSchema'](){const _0x1f8aaf=this['editor']['model']['schema'];_0x1f8aaf['isRegistered']('imageBlock')&&_0x1f8aaf['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1f8aaf['isRegistered']('imageInline')&&_0x1f8aaf['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x200f59=this['editor'];_0x200f59['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x200f59['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3ac28b=>_0x3ac28b['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xaf84d3=_0x200f59['commands']['get']('replaceImageSource');_0xaf84d3&&this['listenTo'](_0xaf84d3,'cleanupImage',(_0x5cf3ce,[_0x505327,_0xbf327e])=>{_0x505327['removeAttribute']('uploadcareImageId',_0xbf327e);});}['_initConfig'](){const _0x27d9a9=this['editor']['config']['get']('uploadcare.uploader')||{},_0x37e086=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x24c806(_0x494a9e['document'],'uc-config',{..._0x27d9a9,'pubkey':_0x37e086,'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']=_0x43e78b=>{if('closeMax'==_0x43e78b)return'#uc-icon-arrow-down';},_0x494a9e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x24c806(_0x494a9e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x494a9e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x34742e=this['editor']['commands']['get']('insertImage');_0x34742e&&this['listenTo'](_0x34742e,'execute',()=>{const _0x4b6fcd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4b6fcd&&_0x4b6fcd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4b6fcd);});});const _0x53f923=this['editor']['commands']['get']('uploadcareImageReplace');_0x53f923&&this['listenTo'](_0x53f923,'execute',()=>{const _0x508cb9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x508cb9&&_0x508cb9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x508cb9);});});}}class tt extends _0x412426{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ca54d){super(_0x3ca54d),_0x3ca54d['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x1adcc6['defineComponents'](_0x1adcc6),this['_defineLocale']();}['_defineLocale'](){const _0x2173ed=this['editor']['config']['get']('uploadcare.locale'),_0x4d8bc7=this['editor']['locale']['contentLanguage'];_0x2173ed&&_0x1adcc6['defineLocale'](_0x4d8bc7,_0x2173ed);}}class ii extends _0x179a6d{constructor(_0x1d60e3){super(_0x1d60e3);const t=_0x1d60e3['t'],_0x424e7d=this['bindTemplate'],_0x5a030b=new _0x53ca23();_0x5a030b['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':[_0x5a030b,{'text':_0x424e7d['to']('imageUploadProgress',_0x47b5f7=>t('Loading\x20image...')+'\x20('+(_0x47b5f7||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 _0x179a6d{constructor(_0x6708bf){super(_0x6708bf);const t=_0x6708bf['t'];this['set']('errorType',null);const _0x412975=new _0x36c05f(_0x6708bf);_0x412975['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x412975['withText']=!0x0,_0x412975['class']='ck-button-action',_0x412975['on']('execute',()=>{this['fire']('retry');}),_0x412975['bind']('isVisible')['to'](this,'errorType',_0x585afd=>'NotFound'!==_0x585afd);const _0x153ed3=new _0x41fd44();_0x153ed3['content']=_0x6059ee,_0x153ed3['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x205f99=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':[_0x153ed3,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x205f99['to']('errorType',_0x12c1c0=>t('NotFound'!==_0x12c1c0?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x412975]},{'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 _0x179a6d{constructor(_0x4af643,_0x5ae8a5){super(_0x4af643);const _0x506d3=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5ae8a5,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x506d3['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x32330c,_0x60df68,_0x598d21){super(_0x32330c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x32330c),this['_errorView']=new ti(_0x32330c),this['_editingView']=new ei(_0x32330c,_0x598d21),this['_focusableView']=new _0x179a6d(_0x32330c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x60df68),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'],_0x158741=>{this['_addUploadcareImageEditorListeners'](_0x158741);});}),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'](_0x330eab,_0x58fba6){const _0x2c8f31='uc-cloud-image-editor',_0x47f3db=_0x330eab['querySelector'](_0x2c8f31);if(_0x47f3db)return _0x58fba6(_0x47f3db);const _0x20d926=new MutationObserver(_0x3085c1=>{const _0x27fabf=_0x3085c1['filter'](_0xa309d0=>_0xa309d0['target']===_0x330eab&&_0xa309d0['addedNodes']['length']>0x0&&_0xa309d0['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x2c8f31);_0x27fabf['length']&&(_0x20d926['disconnect'](),_0x58fba6(_0x27fabf[0x0]['addedNodes'][0x0]));});_0x20d926['observe'](_0x330eab,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x43c1a8){_0x43c1a8['addEventListener']('apply',_0x4b0ed2=>{this['fire']('apply',{'imageSrc':_0x4b0ed2['detail']['cdnUrl']});}),_0x43c1a8['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1d985e(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5b21a0,_0x14d385,_0x5abe02){super(),this['_editor']=_0x5b21a0,this['_dialog']=_0x14d385,this['_imageElement']=_0x5abe02,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 _0x4e4076=this['_imageElement'],_0x383891=_0x4e4076['getAttribute']('uploadcareImageId'),_0x5f15c0=_0x4e4076['getAttribute']('src');if(_0x383891)await this['_loadImageInfo'](_0x383891,_0x5f15c0);else{if(this['_imageCache']['has'](_0x5f15c0)){const _0x525a47=this['_imageCache']['get'](_0x5f15c0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x525a47['url'],this['imageDimension']=_0x525a47['dimension'],this['imageId']=_0x525a47['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5a062b}=this['_editor'],t=_0x5a062b['t'],_0x4085bf=new X(_0x5a062b,this['imageStatus'],this['_attributes']);_0x4085bf['bind']('status')['to'](this,'imageStatus'),_0x4085bf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4085bf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4085bf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4085bf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x47e873,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4085bf,'position':_0x5f1bc4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4085bf['focus']();},'onHide':()=>{_0x4085bf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2d5bb2=>!A(_0x2d5bb2,_0x4085bf['element'])}});}['_loadImageInfo'](_0x4b843a,_0x10272a){return j['getInfo'](_0x4b843a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x31b73f=>{const {width:_0xc966ac,height:_0x27244a}=_0x31b73f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x10272a,this['imageDimension']={'width':_0xc966ac,'height':_0x27244a},this['imageId']=_0x4b843a;})['catch'](_0x52cdaf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x52cdaf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x47ddd5,_0x14eeca){return this['_getImageAsFile'](_0x47ddd5)['then'](_0x19aaa6=>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':_0x14eeca['signal'],'file':_0x19aaa6,'onProgress':_0x2d81f5=>{_0x2d81f5&&_0x2d81f5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2d81f5['value']));}}))['then'](_0x5c9852=>{const {width:_0x11ca62,height:_0x5731cf}=_0x5c9852['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5c9852['cdnUrl'],this['imageDimension']={'width':_0x11ca62,'height':_0x5731cf},this['imageId']=_0x5c9852['uuid'],this['imageUploadProgress']=null;const _0x30eb0a=_0x47ddd5['getAttribute']('src');this['_imageCache']['set'](_0x30eb0a,{'id':_0x5c9852['uuid'],'url':_0x5c9852['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x262992=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x262992['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1b8461,_0x5726eb){_0x1b8461['on']('apply',(_0x255071,_0x4bfd13)=>{this['_replaceImage'](_0x5726eb,_0x4bfd13['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1b8461['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1b8461['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2dac4d,_0x325233,_0x2e12d5){const _0x3a2936=this['_editor'],{width:_0x45e7f3,height:_0x2b5f9f}=S(_0x325233,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4c6bb1,imageSources:_0x2d4ccd}=C(_0x325233,_0x45e7f3);_0x3a2936['model']['change'](_0x50fa81=>{if('$graveyard'===_0x2dac4d['root']['rootName']){_0x3a2936['execute']('insertImage',{'imageType':_0x2dac4d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2dac4d['getAttributes']()),'uploadcareImageId':_0x2e12d5,'src':_0x4c6bb1,'sources':_0x2d4ccd,'width':_0x45e7f3,'height':_0x2b5f9f}});const _0x12cdd2=_0x2dac4d['getChildren']();_0x2dac4d=_0x3a2936['model']['document']['selection']['getSelectedElement']();for(const _0x4ec842 of _0x12cdd2)_0x50fa81['append'](_0x50fa81['cloneElement'](_0x4ec842),_0x2dac4d);}else _0x50fa81['setSelection'](_0x2dac4d,'on'),_0x3a2936['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2dac4d['getAttributes']()),'uploadcareImageId':_0x2e12d5,'src':_0x4c6bb1,'sources':_0x2d4ccd,'width':_0x45e7f3,'height':_0x2b5f9f},_0x2dac4d);_0x50fa81['setSelection'](_0x2dac4d,'on');});}async['_getImageAsFile'](_0x10bd21){const _0x6d649b=_0x494a9e['window'],_0x1fa7d3=_0x494a9e['document']['location']['href'],_0x3d4df8=new _0x6d649b['URL'](_0x10bd21['getAttribute']('src'),_0x1fa7d3);if('data:'===_0x3d4df8['protocol']){const _0x48a992=_0x3d4df8['href']['split'](','),_0x389049=_0x48a992[0x0]['match'](/:(.*?);/)[0x1],_0x13d52e=_0x389049['split']('/')[0x1],_0x5d038c=_0x6d649b['atob'](_0x48a992[_0x48a992['length']-0x1]);let _0x44acf4=_0x5d038c['length'];const _0x19ca80=new _0x6d649b['Uint8Array'](_0x44acf4);for(;_0x44acf4--;)_0x19ca80[_0x44acf4]=_0x5d038c['charCodeAt'](_0x44acf4);return new _0x6d649b['File']([_0x19ca80],'image.'+_0x13d52e,{'type':_0x389049});}const _0x18a618=_0x3d4df8['href']['split']('/'),_0x32c933=_0x18a618[_0x18a618['length']-0x1],_0x5a1e38=_0x32c933['split']('.')[0x1];return _0x6d649b['fetch'](_0x3d4df8['href'])['then'](_0x5a20b8=>_0x5a20b8['clone']()['blob']())['then'](_0x45c38f=>new _0x6d649b['File']([_0x45c38f],_0x32c933,{'type':'image/'+_0x5a1e38}));}}class Q extends _0x57022b{['imageEditController'];static get['requires'](){return[_0x4a7b8f];}['_isEditable'];constructor(_0x457306){super(_0x457306),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4f318a){const _0x137da5=z(_0x4f318a);return _0x322d1c=>!(!_0x322d1c||!_0x322d1c['is']('element','imageBlock')&&!_0x322d1c['is']('element','imageInline'))&&(!!_0x322d1c['hasAttribute']('uploadcareImageId')||!!_0x322d1c['hasAttribute']('src')&&_0x137da5(_0x322d1c['getAttribute']('src')));}(_0x457306['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17efce=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17efce);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0xebaa16=this['editor']['model']['document']['selection']['getSelectedElement']();_0xebaa16&&(_0xebaa16['is']('element','imageBlock')||_0xebaa16['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4a7b8f),_0xebaa16),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x57022b{['refresh'](){const _0x1d6a42=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1d6a42&&(_0x1d6a42['is']('element','imageBlock')||_0x1d6a42['is']('element','imageInline')));}['execute'](_0x30b474){const _0x497b8e=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2ef515=>{_0x2ef515['setAttributes'](_0x30b474,_0x497b8e),_0x2ef515['removeAttribute']('srcset',_0x497b8e),_0x2ef515['removeAttribute']('sizes',_0x497b8e);});}}class m extends _0x412426{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0xcce88d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1cd438}=this;_0x1cd438['commands']['add']('uploadcareImageEdit',new Q(_0x1cd438)),_0x1cd438['commands']['add']('uploadcareImageReplace',new V(_0x1cd438));}}class g extends _0x412426{['_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 _0x588ba3=this['editor'];_0x588ba3['ui']['componentFactory']['add']('uploadcareImageEdit',_0xb7ad5d=>{const _0x34a000=_0x588ba3['commands']['get']('uploadcareImageEdit'),_0x59e068=new _0x36c05f(_0xb7ad5d),t=_0xb7ad5d['t'];return _0x59e068['set']({'icon':_0x47e873,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x59e068['bind']('isEnabled')['to'](_0x34a000),_0x59e068['bind']('isOn')['to'](_0x34a000,'isActive'),this['listenTo'](_0x59e068,'execute',()=>{_0x588ba3['execute']('uploadcareImageEdit'),_0x588ba3['editing']['view']['focus']();}),_0x59e068;}),this['_initConfig']();}['_initConfig'](){const _0x463be0=_0x24c806(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x463be0),this['listenTo'](this['editor'],'destroy',()=>{_0x463be0['remove']();});}}class et extends _0x412426{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-20251130.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-20251130.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251130.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251130.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251130.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251130.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251130.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251130.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251130.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 _0x4a1cc1=_0x5826;(function(_0xca48cc,_0x2b1d0f){const _0x1db391=_0x5826,_0x40f9f7=_0xca48cc();while(!![]){try{const _0x5e051e=parseInt(_0x1db391(0x109))/0x1*(parseInt(_0x1db391(0x150))/0x2)+parseInt(_0x1db391(0x138))/0x3+parseInt(_0x1db391(0xfd))/0x4*(-parseInt(_0x1db391(0x14b))/0x5)+parseInt(_0x1db391(0x11e))/0x6*(parseInt(_0x1db391(0x122))/0x7)+-parseInt(_0x1db391(0x119))/0x8*(parseInt(_0x1db391(0x14a))/0x9)+parseInt(_0x1db391(0x13a))/0xa*(-parseInt(_0x1db391(0x12e))/0xb)+-parseInt(_0x1db391(0x10d))/0xc*(-parseInt(_0x1db391(0x140))/0xd);if(_0x5e051e===_0x2b1d0f)break;else _0x40f9f7['push'](_0x40f9f7['shift']());}catch(_0xbca40a){_0x40f9f7['push'](_0x40f9f7['shift']());}}}(_0x9817,0x9441f));import{Plugin as _0x2f4312}from'ckeditor5/src/core.js';function _0x5826(_0x1a8bc6,_0x15f203){const _0x9817f6=_0x9817();return _0x5826=function(_0x582657,_0x4d0fb5){_0x582657=_0x582657-0xfb;let _0x3e4eca=_0x9817f6[_0x582657];return _0x3e4eca;},_0x5826(_0x1a8bc6,_0x15f203);}import{Dialog as _0x5de10e}from'ckeditor5/src/ui.js';import{createElement as _0xd6594a,global as _0x24807b,uid as _0x2cf95e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x129629}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x576ce4}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x188869}from'./utils/editingutils.js';function _0x9817(){const _0x2abb71=['943551cutGxj','body','configElement','once','join','removeAttribute','ctxElement','_initConfig','conversion','selection','iconHrefResolver','appendChild','53042WwmIwl','uploadcare','_configElement','getAttribute','schema','imageInline','for','_initImageProcessingIndicator','uploadcare.pubkey','fromCharCode','1750635qydVtq','uploader-','2270WWnGTM','map','PictureEditing','#uc-icon-arrow-down','isOfficialPlugin','elementToAttribute','94211igWmki','init','input[uploadcare-file-input]','querySelector','href','editor','downcast','contentLanguage','_ctxElement','isRegistered','13563tAYbSi','1205LDnmto','add','insertImage','getSelectedElement','uploadcare.uploader','1154BzExml','attributeToAttribute','pluginName','remove','true','18580NSmLNv','locale','commands','closeMax','upcast','_initSchema','render','uc-upload-ctx-provider','editing','\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','execute','isPremiumPlugin','758kBcdIR','config','model','replaceImageSource','2364xOByci','view','_initConversion','afterInit','uploadcareImageId','ucContextId','document','imageBlock','UploadcareEditing','cleanupImage','data-uc-image-id','get','168ckUqDO','uc-config','uploadcareImageReplace','requires','_initCtx','18nyQwVg','listenTo','destroy','extend'];_0x9817=function(){return _0x2abb71;};return _0x9817();}export class UploadcareEditing extends _0x2f4312{[_0x4a1cc1(0x130)]=null;[_0x4a1cc1(0x148)]=null;static get[_0x4a1cc1(0x152)](){const _0x4dcfcf=_0x4a1cc1;return _0x4dcfcf(0x115);}static get[_0x4a1cc1(0x11c)](){const _0x30f2ab=_0x4a1cc1;return[_0x30f2ab(0x13c),_0x576ce4,_0x5de10e];}static get[_0x4a1cc1(0x13e)](){return!0x0;}static get[_0x4a1cc1(0x108)](){return!0x0;}[_0x4a1cc1(0x112)];get[_0x4a1cc1(0x124)](){const _0x54ea06=_0x4a1cc1;return this[_0x54ea06(0x130)];}get[_0x4a1cc1(0x128)](){const _0x28e856=_0x4a1cc1;return this[_0x28e856(0x148)];}constructor(_0x41f01a){const _0x1cd469=_0x4a1cc1;super(_0x41f01a),this[_0x1cd469(0x112)]=_0x2cf95e();}[_0x4a1cc1(0x141)](){const _0x1f60a7=_0x4a1cc1,_0xff4b3b=this[_0x1f60a7(0x145)];_0xff4b3b[_0x1f60a7(0xff)][_0x1f60a7(0x14c)](_0x1f60a7(0x12f),new _0x129629(_0xff4b3b));}[_0x4a1cc1(0x110)](){const _0x6ceedb=_0x4a1cc1;this[_0x6ceedb(0x102)](),this[_0x6ceedb(0x10f)](),this[_0x6ceedb(0x129)](),this[_0x6ceedb(0x11d)](),this[_0x6ceedb(0x135)](),this[_0x6ceedb(0x11f)](this[_0x6ceedb(0x145)],_0x6ceedb(0x120),()=>{const _0x14d7c3=_0x6ceedb;this[_0x14d7c3(0x130)]&&(this[_0x14d7c3(0x130)][_0x14d7c3(0xfb)](),this[_0x14d7c3(0x130)]=null),this[_0x14d7c3(0x148)]&&(this[_0x14d7c3(0x148)][_0x14d7c3(0xfb)](),this[_0x14d7c3(0x148)]=null);const _0x51fe03=_0x24807b[_0x14d7c3(0x113)][_0x14d7c3(0x143)](_0x14d7c3(0x142));_0x51fe03&&_0x51fe03[_0x14d7c3(0xfb)]();}),async function(_0x4d1049){const _0x435325=_0x22f3ea([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]),_0x67f665=0x535f8c3a,_0x2d5ee6=0x5358f65a^_0x67f665,_0xe7d4a7=window[_0x22f3ea([0x44,0x61,0x74,0x65])][_0x22f3ea([0x6e,0x6f,0x77])](),_0x522703=_0x4d1049[_0x22f3ea([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5a1fec=new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51b2cb=>{_0x522703[_0x22f3ea([0x6f,0x6e,0x63,0x65])](_0x22f3ea([0x72,0x65,0x61,0x64,0x79]),_0x51b2cb);}),_0x356ca9={[_0x22f3ea([0x6b,0x74,0x79])]:_0x22f3ea([0x45,0x43]),[_0x22f3ea([0x75,0x73,0x65])]:_0x22f3ea([0x73,0x69,0x67]),[_0x22f3ea([0x63,0x72,0x76])]:_0x22f3ea([0x50,0x2d,0x32,0x35,0x36]),[_0x22f3ea([0x78])]:_0x22f3ea([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]),[_0x22f3ea([0x79])]:_0x22f3ea([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]),[_0x22f3ea([0x61,0x6c,0x67])]:_0x22f3ea([0x45,0x53,0x32,0x35,0x36])},_0x344b73=_0x522703[_0x22f3ea([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x22f3ea([0x67,0x65,0x74])](_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2b4875(){let _0x2962d8,_0x30e817=null,_0x4afea5=null;try{if(_0x344b73==_0x22f3ea([0x47,0x50,0x4c]))return _0x22f3ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2962d8=_0x2f6edf(),!_0x2962d8)return _0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2962d8[_0x22f3ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4afea5=_0x5b4d6b(_0x2962d8[_0x22f3ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2962d8[_0x22f3ea([0x6a,0x74,0x69])])),await _0x25a46a()?_0x5011fa()?_0xd98959()?_0x22f3ea([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ebdfd()?(_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22f3ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x30e817=_0x426174(_0x22f3ea([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22f3ea([0x74,0x72,0x69,0x61,0x6c])&&(_0x30e817=_0x426174(_0x22f3ea([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5ec652()):_0x22f3ea([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x22f3ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd98959(){const _0x1082c3=[_0x22f3ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x22f3ea([0x74,0x72,0x69,0x61,0x6c])][_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe7d4a7/0x3e8:0xe10*_0x2d5ee6;return _0x2962d8[_0x22f3ea([0x65,0x78,0x70])]<_0x1082c3;}function _0x5011fa(){const _0xf84a28=_0x2962d8[_0x22f3ea([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xf84a28&&(!!_0xf84a28[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x2a]))||!!_0xf84a28[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x55,0x50,0x4c,0x43])));}function _0x1ebdfd(){const _0xc39492=_0x5826,_0x3875d3=_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3875d3||0x0==_0x3875d3[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x483520}=new URL(window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xc39492(0x144)]);if(_0x3875d3[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x483520))return!0x0;const _0x67a10e=_0x483520[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e]));return _0x3875d3[_0x22f3ea([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b4b06=>_0x2b4b06[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x2a])))[_0x22f3ea([0x6d,0x61,0x70])](_0x5d6d79=>_0x5d6d79[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e])))[_0x22f3ea([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23cc25=>_0x23cc25[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x67a10e[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22f3ea([0x6d,0x61,0x70])](_0x3919a3=>Array(_0x67a10e[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3919a3[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22f3ea([0x66,0x69,0x6c,0x6c])](_0x3919a3[0x0]===_0x22f3ea([0x2a])?_0x22f3ea([0x2a]):'')[_0x22f3ea([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3919a3))[_0x22f3ea([0x73,0x6f,0x6d,0x65])](_0x15248e=>_0x67a10e[_0x22f3ea([0x65,0x76,0x65,0x72,0x79])]((_0x11b38c,_0x327ccb)=>_0x15248e[_0x327ccb]===_0x11b38c||_0x15248e[_0x327ccb]===_0x22f3ea([0x2a])));}function _0x5ec652(){return _0x30e817&&_0x4afea5?new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x12b3ae,_0xab2933)=>{_0x30e817[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x12b3ae,_0xab2933),_0x4afea5[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x22880e=>{_0x22880e!=_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])&&_0x12b3ae(_0x22880e);},_0xab2933);}):_0x30e817||_0x4afea5||_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5b4d6b(_0x49d80d,_0x22e6e6){return new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x428066=>{if(_0x319eb0())return _0x428066(_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]));_0x1a40e5(),_0x522703[_0x22f3ea([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a9bb5=!0x1;const _0x5a1b2a=_0x2cf95e();function _0x1c3595(_0x4a9fdd){return!!_0x4a9fdd&&(typeof _0x4a9fdd===_0x22f3ea([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4a9fdd===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4a9fdd[_0x22f3ea([0x74,0x68,0x65,0x6e])]===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4a9fdd[_0x22f3ea([0x63,0x61,0x74,0x63,0x68])]===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5bf200(_0x11b3f2){_0x3da6ed(_0x11b3f2)[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x3ee034=>{if(!_0x3ee034||_0x3ee034[_0x22f3ea([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x22f3ea([0x6f,0x6b]))return _0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4fe6d1(_0x2631ba(_0x5a1b2a+_0x22e6e6))!=_0x3ee034[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]);})[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x20d73e=>(_0x4f9ba4(),_0x20d73e),()=>{const _0x947091=_0x5f7aa8();return null==_0x947091?(_0x4f9ba4(),_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])):_0x22f3ea(_0xe7d4a7-_0x947091>(0x7753083a^_0x67f665)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x428066)[_0x22f3ea([0x63,0x61,0x74,0x63,0x68])](()=>{_0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xedbd2d=0x536962ba^_0x67f665;function _0x4f9ba4(){const _0x160146=_0x22f3ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fe6d1(_0x2631ba(_0x49d80d)),_0xfb2b00=_0x32c8b0(_0x4fe6d1(window[_0x22f3ea([0x4d,0x61,0x74,0x68])][_0x22f3ea([0x63,0x65,0x69,0x6c])](_0xe7d4a7/_0xedbd2d)));window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22f3ea([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x160146,_0xfb2b00);}function _0x5f7aa8(){const _0x11c6be=_0x22f3ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fe6d1(_0x2631ba(_0x49d80d)),_0x2def5b=window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22f3ea([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11c6be);return _0x2def5b?window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32c8b0(_0x2def5b),0x10)*_0xedbd2d:null;}function _0x3da6ed(_0x2c3128){return new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a9788,_0x12ee0f)=>{_0x2c3128[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x5a9788,_0x12ee0f),window[_0x22f3ea([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x12ee0f,0x535e58fa^_0x67f665);});}}_0x522703[_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f941d,_0x375bee)=>{if(_0x375bee[0x0]!=_0x49d80d)return _0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x375bee[0x1]={..._0x375bee[0x1],[_0x22f3ea([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5a1b2a};},{[_0x22f3ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22f3ea([0x68,0x69,0x67,0x68])}),_0x522703[_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1b7576=>{_0x1c3595(_0x1b7576[_0x22f3ea([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a9bb5=!0x0,_0x5bf200(_0x1b7576[_0x22f3ea([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x22f3ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22f3ea([0x6c,0x6f,0x77])}),_0x5a1fec[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>{_0x1a9bb5||_0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x319eb0(){return _0x522703[_0x22f3ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22f3ea([0x76,0x69,0x65,0x77])][_0x22f3ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x22f3ea([0x61,0x75,0x74,0x6f]);}function _0x1a40e5(){_0x522703[_0x22f3ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22f3ea([0x76,0x69,0x65,0x77])][_0x22f3ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22f3ea([0x61,0x75,0x74,0x6f]);}}function _0x426174(_0x124e97){const _0x249f75=[new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53e095=>setTimeout(_0x53e095,0x5356b2f6^_0x67f665)),_0x5a1fec[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10128e=>{let _0x4bbb35=0x0;_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x8ffd2d,_0x4d6fe4)=>{_0x4d6fe4[0x0][_0x22f3ea([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4bbb35++,_0x4bbb35==(0x535f8dc2^_0x67f665)&&(_0x10128e(),_0x8ffd2d[_0x22f3ea([0x6f,0x66,0x66])]());});}))];return window[_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22f3ea([0x72,0x61,0x63,0x65])](_0x249f75)[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>_0x124e97);}async function _0x40f14f(){await _0x5a1fec,_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x103e31,_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x103e31,_0x522703[_0x22f3ea([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x414ca8(_0x41987e){const _0x3d2884=_0xdecef0();_0x522703[_0x3d2884]=_0x22f3ea([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x41987e,_0x41987e!=_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])&&_0x40f14f();}function _0xdecef0(){const _0x5c1225=window[_0x22f3ea([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x22f3ea([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x22f3ea([0x6e,0x6f,0x77])]())[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x22f3ea([0x2e]),'');let _0xce7cf5=_0x22f3ea([0x68]);for(let _0x1ddebd=0x0;_0x1ddebd<_0x5c1225[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ddebd+=0x2){let _0x1288a9=window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c1225[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ddebd,_0x1ddebd+0x2));_0x1288a9>=_0x435325[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1288a9-=_0x435325[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xce7cf5+=_0x435325[_0x1288a9];}return _0xce7cf5;}function _0x2f6edf(){const _0x2e625b=_0x344b73[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e]));if(0x3!=_0x2e625b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x57531f(_0x2e625b[0x1]);function _0x57531f(_0x47eff6){const _0x15dbb1=_0x2826d9(_0x47eff6);return _0x15dbb1&&_0x2aece5()?_0x15dbb1:null;function _0x2aece5(){const _0x184e6b=_0x15dbb1[_0x22f3ea([0x6a,0x74,0x69])],_0x2f35bb=window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x184e6b[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x184e6b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x432222={..._0x15dbb1,[_0x22f3ea([0x6a,0x74,0x69])]:_0x184e6b[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x184e6b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x432222[_0x22f3ea([0x76,0x63])],_0x2631ba(_0x432222)==_0x2f35bb;}}}async function _0x25a46a(){let _0x234cb6=!0x0;try{const _0x4647cf=_0x344b73[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e])),[_0x55dff4,_0x2e5ff9,_0x231859]=_0x4647cf;return _0x1c9dc9(_0x55dff4),await _0x2d032b(_0x55dff4,_0x2e5ff9,_0x231859),_0x234cb6;}catch{return!0x1;}function _0x1c9dc9(_0x5b0ae6){const _0xcf00c7=_0x2826d9(_0x5b0ae6);_0xcf00c7&&_0xcf00c7[_0x22f3ea([0x61,0x6c,0x67])]==_0x22f3ea([0x45,0x53,0x32,0x35,0x36])||(_0x234cb6=!0x1);}async function _0x2d032b(_0x1dc24c,_0x562d2e,_0x5f4d2d){const _0x846bd8=window[_0x22f3ea([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x22f3ea([0x66,0x72,0x6f,0x6d])](_0x2f98f7(_0x5f4d2d),_0x118f02=>_0x118f02[_0x22f3ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xcd7899=new window[(_0x22f3ea([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x22f3ea([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1dc24c+_0x22f3ea([0x2e])+_0x562d2e),_0x16c863=window[_0x22f3ea([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x22f3ea([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x16c863)return;const _0x3b577f=await _0x16c863[_0x22f3ea([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x22f3ea([0x6a,0x77,0x6b]),_0x356ca9,{[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x45,0x43,0x44,0x53,0x41]),[_0x22f3ea([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x22f3ea([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x16c863[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x45,0x43,0x44,0x53,0x41]),[_0x22f3ea([0x68,0x61,0x73,0x68])]:{[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3b577f,_0x846bd8,_0xcd7899)||(_0x234cb6=!0x1);}}function _0x2826d9(_0x4f4200){return _0x4f4200[_0x22f3ea([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x22f3ea([0x65,0x79]))?JSON[_0x22f3ea([0x70,0x61,0x72,0x73,0x65])](_0x2f98f7(_0x4f4200)):null;}function _0x2f98f7(_0x4e24d5){return window[_0x22f3ea([0x61,0x74,0x6f,0x62])](_0x4e24d5[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x22f3ea([0x2b]))[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x22f3ea([0x2f])));}function _0x2631ba(_0x28248b){let _0xad72af=0x1505;function _0x38cf4f(_0x563f23){for(let _0x194ca2=0x0;_0x194ca2<_0x563f23[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x194ca2++){const _0xde2207=_0x563f23[_0x22f3ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x194ca2);_0xad72af=(_0xad72af<<0x5)+_0xad72af+_0xde2207,_0xad72af&=_0xad72af;}}function _0x335d6d(_0x5af6ef){Array[_0x22f3ea([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5af6ef)?_0x5af6ef[_0x22f3ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x335d6d):_0x5af6ef&&typeof _0x5af6ef==_0x22f3ea([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x22f3ea([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5af6ef)[_0x22f3ea([0x73,0x6f,0x72,0x74])]()[_0x22f3ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc3bbf,_0x5f9f92])=>{_0x38cf4f(_0xc3bbf),_0x335d6d(_0x5f9f92);}):_0x38cf4f(window[_0x22f3ea([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5af6ef));}return _0x335d6d(_0x28248b),_0xad72af>>>0x0;}function _0x4fe6d1(_0x16aaf3){return _0x16aaf3[_0x22f3ea([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x22f3ea([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x22f3ea([0x30]));}function _0x32c8b0(_0x442b57){return _0x442b57[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])]('')[_0x22f3ea([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x22f3ea([0x6a,0x6f,0x69,0x6e])]('');}function _0x103e31(){}function _0x22f3ea(_0x1ab051){const _0x364bec=_0x5826;return _0x1ab051[_0x364bec(0x13b)](_0x16d47a=>String[_0x364bec(0x137)](_0x16d47a))[_0x364bec(0x126)]('');}_0x414ca8(await _0x2b4875());}(this);}[_0x4a1cc1(0x102)](){const _0x53fec0=_0x4a1cc1,_0x57b813=this[_0x53fec0(0x145)][_0x53fec0(0x10b)][_0x53fec0(0x132)];_0x57b813[_0x53fec0(0x149)](_0x53fec0(0x114))&&_0x57b813[_0x53fec0(0x121)](_0x53fec0(0x114),{'allowAttributes':[_0x53fec0(0x111)]}),_0x57b813[_0x53fec0(0x149)](_0x53fec0(0x133))&&_0x57b813[_0x53fec0(0x121)](_0x53fec0(0x133),{'allowAttributes':[_0x53fec0(0x111)]});}[_0x4a1cc1(0x10f)](){const _0x16f095=_0x4a1cc1,_0x13e105=this[_0x16f095(0x145)];_0x13e105[_0x16f095(0x12a)][_0x16f095(0x134)](_0x16f095(0x146))[_0x16f095(0x151)]({'model':_0x16f095(0x111),'view':_0x16f095(0x117)}),_0x13e105[_0x16f095(0x12a)][_0x16f095(0x134)](_0x16f095(0x101))[_0x16f095(0x13f)]({'model':{'key':_0x16f095(0x111),'value':_0x41c3b0=>_0x41c3b0[_0x16f095(0x131)](_0x16f095(0x117))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x90508c=_0x13e105[_0x16f095(0xff)][_0x16f095(0x118)](_0x16f095(0x10c));_0x90508c&&this[_0x16f095(0x11f)](_0x90508c,_0x16f095(0x116),(_0x1164fc,[_0x205e0b,_0x32f56e])=>{const _0x417819=_0x16f095;_0x205e0b[_0x417819(0x127)](_0x417819(0x111),_0x32f56e);});}[_0x4a1cc1(0x129)](){const _0x5721a2=_0x4a1cc1,_0x40f86a=this[_0x5721a2(0x145)][_0x5721a2(0x10a)][_0x5721a2(0x118)](_0x5721a2(0x14f))||{},_0x5c11ba=this[_0x5721a2(0x145)][_0x5721a2(0x10a)][_0x5721a2(0x118)](_0x5721a2(0x136))||'';this[_0x5721a2(0x130)]=_0xd6594a(_0x24807b[_0x5721a2(0x113)],_0x5721a2(0x11a),{..._0x40f86a,'pubkey':_0x5c11ba,'ctx-name':_0x5721a2(0x139)+this[_0x5721a2(0x112)],'sourceList':'','imgOnly':_0x5721a2(0xfc),'removeCopyright':_0x5721a2(0xfc),'localeName':this[_0x5721a2(0x145)][_0x5721a2(0xfe)][_0x5721a2(0x147)],'externalSourcesEmbedCss':_0x5721a2(0x106)}),this[_0x5721a2(0x130)][_0x5721a2(0x12c)]=_0x512452=>{const _0x3e7c18=_0x5721a2;if(_0x3e7c18(0x100)==_0x512452)return _0x3e7c18(0x13d);},_0x24807b[_0x5721a2(0x113)][_0x5721a2(0x123)][_0x5721a2(0x12d)](this[_0x5721a2(0x130)]);}[_0x4a1cc1(0x11d)](){const _0x590b34=_0x4a1cc1;this[_0x590b34(0x148)]=_0xd6594a(_0x24807b[_0x590b34(0x113)],_0x590b34(0x104),{'ctx-name':_0x590b34(0x139)+this[_0x590b34(0x112)]}),_0x24807b[_0x590b34(0x113)][_0x590b34(0x123)][_0x590b34(0x12d)](this[_0x590b34(0x148)]);}[_0x4a1cc1(0x135)](){const _0xc27ca0=_0x4a1cc1,_0x54c255=this[_0xc27ca0(0x145)][_0xc27ca0(0xff)][_0xc27ca0(0x118)](_0xc27ca0(0x14d));_0x54c255&&this[_0xc27ca0(0x11f)](_0x54c255,_0xc27ca0(0x107),()=>{const _0x1f2f4a=_0xc27ca0,_0x3af93d=this[_0x1f2f4a(0x145)][_0x1f2f4a(0x10b)][_0x1f2f4a(0x113)][_0x1f2f4a(0x12b)][_0x1f2f4a(0x14e)]();_0x3af93d&&_0x3af93d[_0x1f2f4a(0x131)](_0x1f2f4a(0x111))&&this[_0x1f2f4a(0x145)][_0x1f2f4a(0x105)][_0x1f2f4a(0x10e)][_0x1f2f4a(0x125)](_0x1f2f4a(0x103),()=>{const _0x53605b=_0x1f2f4a;_0x188869(this[_0x53605b(0x145)],_0x3af93d);});});const _0x3d328e=this[_0xc27ca0(0x145)][_0xc27ca0(0xff)][_0xc27ca0(0x118)](_0xc27ca0(0x11b));_0x3d328e&&this[_0xc27ca0(0x11f)](_0x3d328e,_0xc27ca0(0x107),()=>{const _0x16dc91=_0xc27ca0,_0x36ea7f=this[_0x16dc91(0x145)][_0x16dc91(0x10b)][_0x16dc91(0x113)][_0x16dc91(0x12b)][_0x16dc91(0x14e)]();_0x36ea7f&&_0x36ea7f[_0x16dc91(0x131)](_0x16dc91(0x111))&&this[_0x16dc91(0x145)][_0x16dc91(0x105)][_0x16dc91(0x10e)][_0x16dc91(0x125)](_0x16dc91(0x103),()=>{const _0x37a796=_0x16dc91;_0x188869(this[_0x37a796(0x145)],_0x36ea7f);});});}}
|
|
23
|
+
const _0xf2a2c8=_0x3acb;(function(_0x36424b,_0x3f51ca){const _0xb6a03d=_0x3acb,_0x1a6674=_0x36424b();while(!![]){try{const _0x4f918f=parseInt(_0xb6a03d(0x1f9))/0x1*(parseInt(_0xb6a03d(0x1c7))/0x2)+-parseInt(_0xb6a03d(0x202))/0x3+-parseInt(_0xb6a03d(0x1cc))/0x4+-parseInt(_0xb6a03d(0x1da))/0x5+-parseInt(_0xb6a03d(0x1e4))/0x6+-parseInt(_0xb6a03d(0x1e7))/0x7*(parseInt(_0xb6a03d(0x1b8))/0x8)+parseInt(_0xb6a03d(0x1ee))/0x9;if(_0x4f918f===_0x3f51ca)break;else _0x1a6674['push'](_0x1a6674['shift']());}catch(_0x5751fd){_0x1a6674['push'](_0x1a6674['shift']());}}}(_0x4ed9,0xa2292));import{Plugin as _0x2dd013}from'ckeditor5/src/core.js';import{Dialog as _0xf03c9f}from'ckeditor5/src/ui.js';import{createElement as _0x4c3e96,global as _0x3caf4e,uid as _0x3c700d}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0xbe07d2}from'./uploadcarecommand.js';function _0x4ed9(){const _0x239bc7=['commands','join','32wGQOtx','for','uploadcareImageReplace','uploadcare.pubkey','input[uploadcare-file-input]','config','isPremiumPlugin','getAttribute','replaceImageSource','fromCharCode','cleanupImage','imageInline','model','selection','uploader-','553218jqfmKU','conversion','editor','imageBlock','editing','2127132RPwRdr','destroy','_initImageProcessingIndicator','getSelectedElement','#uc-icon-arrow-down','href','UploadcareEditing','attributeToAttribute','removeAttribute','schema','requires','afterInit','data-uc-image-id','add','685130LUhwAQ','map','configElement','PictureEditing','pluginName','contentLanguage','querySelector','execute','listenTo','_initConfig','2643456sTiYtX','uc-config','insertImage','1689422HfNIMv','upcast','\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','downcast','_initCtx','_initSchema','remove','25701066ByGxlt','locale','closeMax','ctxElement','_ctxElement','init','extend','document','_configElement','appendChild','elementToAttribute','2vxQsgF','view','render','_initConversion','uc-upload-ctx-provider','uploadcare.uploader','get','iconHrefResolver','isRegistered','2009739gqJkQz','ucContextId','isOfficialPlugin','body','uploadcare','once','true','uploadcareImageId'];_0x4ed9=function(){return _0x239bc7;};return _0x4ed9();}import{UploadcareUploadAdapter as _0xa13693}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x1901df}from'./utils/editingutils.js';function _0x3acb(_0x11ca0f,_0x5cf93f){const _0x4ed9b9=_0x4ed9();return _0x3acb=function(_0x3acbcc,_0x244012){_0x3acbcc=_0x3acbcc-0x1af;let _0x51d2b5=_0x4ed9b9[_0x3acbcc];return _0x51d2b5;},_0x3acb(_0x11ca0f,_0x5cf93f);}export class UploadcareEditing extends _0x2dd013{[_0xf2a2c8(0x1f6)]=null;[_0xf2a2c8(0x1f2)]=null;static get[_0xf2a2c8(0x1de)](){const _0x1e96c1=_0xf2a2c8;return _0x1e96c1(0x1d2);}static get[_0xf2a2c8(0x1d6)](){const _0x39a792=_0xf2a2c8;return[_0x39a792(0x1dd),_0xa13693,_0xf03c9f];}static get[_0xf2a2c8(0x1b0)](){return!0x0;}static get[_0xf2a2c8(0x1be)](){return!0x0;}[_0xf2a2c8(0x1af)];get[_0xf2a2c8(0x1dc)](){const _0xfb14f=_0xf2a2c8;return this[_0xfb14f(0x1f6)];}get[_0xf2a2c8(0x1f1)](){const _0x3a369a=_0xf2a2c8;return this[_0x3a369a(0x1f2)];}constructor(_0x5239ff){const _0x5e9067=_0xf2a2c8;super(_0x5239ff),this[_0x5e9067(0x1af)]=_0x3c700d();}[_0xf2a2c8(0x1f3)](){const _0x40c7f4=_0xf2a2c8,_0x94c347=this[_0x40c7f4(0x1c9)];_0x94c347[_0x40c7f4(0x1b6)][_0x40c7f4(0x1d9)](_0x40c7f4(0x1b2),new _0xbe07d2(_0x94c347));}[_0xf2a2c8(0x1d7)](){const _0x3fdbf6=_0xf2a2c8;this[_0x3fdbf6(0x1ec)](),this[_0x3fdbf6(0x1fc)](),this[_0x3fdbf6(0x1e3)](),this[_0x3fdbf6(0x1eb)](),this[_0x3fdbf6(0x1ce)](),this[_0x3fdbf6(0x1e2)](this[_0x3fdbf6(0x1c9)],_0x3fdbf6(0x1cd),()=>{const _0x3cf1c7=_0x3fdbf6;this[_0x3cf1c7(0x1f6)]&&(this[_0x3cf1c7(0x1f6)][_0x3cf1c7(0x1ed)](),this[_0x3cf1c7(0x1f6)]=null),this[_0x3cf1c7(0x1f2)]&&(this[_0x3cf1c7(0x1f2)][_0x3cf1c7(0x1ed)](),this[_0x3cf1c7(0x1f2)]=null);const _0x5632cf=_0x3caf4e[_0x3cf1c7(0x1f5)][_0x3cf1c7(0x1e0)](_0x3cf1c7(0x1bc));_0x5632cf&&_0x5632cf[_0x3cf1c7(0x1ed)]();}),async function(_0x305e17){const _0x24ed8f=_0x160d58([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]),_0x51afae=0x535f8c3a,_0x5c5f13=0x5358f6aa^_0x51afae,_0x3bcfb6=window[_0x160d58([0x44,0x61,0x74,0x65])][_0x160d58([0x6e,0x6f,0x77])](),_0x3015f3=_0x305e17[_0x160d58([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xdffc44=new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ff662=>{_0x3015f3[_0x160d58([0x6f,0x6e,0x63,0x65])](_0x160d58([0x72,0x65,0x61,0x64,0x79]),_0x4ff662);}),_0x10b01e={[_0x160d58([0x6b,0x74,0x79])]:_0x160d58([0x45,0x43]),[_0x160d58([0x75,0x73,0x65])]:_0x160d58([0x73,0x69,0x67]),[_0x160d58([0x63,0x72,0x76])]:_0x160d58([0x50,0x2d,0x32,0x35,0x36]),[_0x160d58([0x78])]:_0x160d58([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]),[_0x160d58([0x79])]:_0x160d58([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]),[_0x160d58([0x61,0x6c,0x67])]:_0x160d58([0x45,0x53,0x32,0x35,0x36])},_0x4b5855=_0x3015f3[_0x160d58([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x160d58([0x67,0x65,0x74])](_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22005f(){let _0xc24155,_0x46b587=null,_0x1935aa=null;try{if(_0x4b5855==_0x160d58([0x47,0x50,0x4c]))return _0x160d58([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc24155=_0x35d48e(),!_0xc24155)return _0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc24155[_0x160d58([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1935aa=_0x38ada2(_0xc24155[_0x160d58([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc24155[_0x160d58([0x6a,0x74,0x69])])),await _0x9072f0()?_0x5f314d()?_0x51bdd3()?_0x160d58([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xb520c9()?(_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x160d58([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x46b587=_0x25c514(_0x160d58([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x160d58([0x74,0x72,0x69,0x61,0x6c])&&(_0x46b587=_0x25c514(_0x160d58([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c80f8()):_0x160d58([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x160d58([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x160d58([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51bdd3(){const _0x4bdae6=[_0x160d58([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x160d58([0x74,0x72,0x69,0x61,0x6c])][_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3bcfb6/0x3e8:0xe10*_0x5c5f13;return _0xc24155[_0x160d58([0x65,0x78,0x70])]<_0x4bdae6;}function _0x5f314d(){const _0x534406=_0xc24155[_0x160d58([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x534406&&(!!_0x534406[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x2a]))||!!_0x534406[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x55,0x50,0x4c,0x43])));}function _0xb520c9(){const _0x417a2a=_0x3acb,_0x4ee9b1=_0xc24155[_0x160d58([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4ee9b1||0x0==_0x4ee9b1[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3be2aa}=new URL(window[_0x160d58([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x417a2a(0x1d1)]);if(_0x4ee9b1[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3be2aa))return!0x0;const _0xe73018=_0x3be2aa[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e]));return _0x4ee9b1[_0x160d58([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2675f1=>_0x2675f1[_0x160d58([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x160d58([0x2a])))[_0x160d58([0x6d,0x61,0x70])](_0x46e925=>_0x46e925[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e])))[_0x160d58([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x481198=>_0x481198[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe73018[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x160d58([0x6d,0x61,0x70])](_0x1151dc=>Array(_0xe73018[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1151dc[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x160d58([0x66,0x69,0x6c,0x6c])](_0x1151dc[0x0]===_0x160d58([0x2a])?_0x160d58([0x2a]):'')[_0x160d58([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1151dc))[_0x160d58([0x73,0x6f,0x6d,0x65])](_0x17f485=>_0xe73018[_0x160d58([0x65,0x76,0x65,0x72,0x79])]((_0x4852f0,_0x2fd8f3)=>_0x17f485[_0x2fd8f3]===_0x4852f0||_0x17f485[_0x2fd8f3]===_0x160d58([0x2a])));}function _0x4c80f8(){return _0x46b587&&_0x1935aa?new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9d73c1,_0x1994ca)=>{_0x46b587[_0x160d58([0x74,0x68,0x65,0x6e])](_0x9d73c1,_0x1994ca),_0x1935aa[_0x160d58([0x74,0x68,0x65,0x6e])](_0x50ef79=>{_0x50ef79!=_0x160d58([0x56,0x61,0x6c,0x69,0x64])&&_0x9d73c1(_0x50ef79);},_0x1994ca);}):_0x46b587||_0x1935aa||_0x160d58([0x56,0x61,0x6c,0x69,0x64]);}}function _0x38ada2(_0x3e054a,_0x44b547){return new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x581312=>{if(_0x204e03())return _0x581312(_0x160d58([0x56,0x61,0x6c,0x69,0x64]));_0x26276a(),_0x3015f3[_0x160d58([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x41cdaa=!0x1;const _0x594c43=_0x3c700d();function _0x4dedb2(_0x2ebe1d){return!!_0x2ebe1d&&(typeof _0x2ebe1d===_0x160d58([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ebe1d===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ebe1d[_0x160d58([0x74,0x68,0x65,0x6e])]===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ebe1d[_0x160d58([0x63,0x61,0x74,0x63,0x68])]===_0x160d58([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x20054a(_0x4ac2b4){_0xc95a81(_0x4ac2b4)[_0x160d58([0x74,0x68,0x65,0x6e])](_0x4a48dd=>{if(!_0x4a48dd||_0x4a48dd[_0x160d58([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x160d58([0x6f,0x6b]))return _0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x316ffe(_0x5c0eb8(_0x594c43+_0x44b547))!=_0x4a48dd[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x160d58([0x56,0x61,0x6c,0x69,0x64]);})[_0x160d58([0x74,0x68,0x65,0x6e])](_0x170693=>(_0x2c8f4f(),_0x170693),()=>{const _0x4f9abb=_0xfffcc0();return null==_0x4f9abb?(_0x2c8f4f(),_0x160d58([0x56,0x61,0x6c,0x69,0x64])):_0x160d58(_0x3bcfb6-_0x4f9abb>(0x7753083a^_0x51afae)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x160d58([0x74,0x68,0x65,0x6e])](_0x581312)[_0x160d58([0x63,0x61,0x74,0x63,0x68])](()=>{_0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x237b4b=0x536962ba^_0x51afae;function _0x2c8f4f(){const _0x1b3162=_0x160d58([0x6c,0x6c,0x63,0x74,0x2d])+_0x316ffe(_0x5c0eb8(_0x3e054a)),_0x2d45bb=_0x5d8852(_0x316ffe(window[_0x160d58([0x4d,0x61,0x74,0x68])][_0x160d58([0x63,0x65,0x69,0x6c])](_0x3bcfb6/_0x237b4b)));window[_0x160d58([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x160d58([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b3162,_0x2d45bb);}function _0xfffcc0(){const _0x4cbb59=_0x160d58([0x6c,0x6c,0x63,0x74,0x2d])+_0x316ffe(_0x5c0eb8(_0x3e054a)),_0x3ac332=window[_0x160d58([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x160d58([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cbb59);return _0x3ac332?window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d8852(_0x3ac332),0x10)*_0x237b4b:null;}function _0xc95a81(_0x1776a9){return new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21787e,_0x1688c6)=>{_0x1776a9[_0x160d58([0x74,0x68,0x65,0x6e])](_0x21787e,_0x1688c6),window[_0x160d58([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1688c6,0x535e58fa^_0x51afae);});}}_0x3015f3[_0x160d58([0x6f,0x6e])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x269f4a,_0x1de5b8)=>{if(_0x1de5b8[0x0]!=_0x3e054a)return _0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1de5b8[0x1]={..._0x1de5b8[0x1],[_0x160d58([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x594c43};},{[_0x160d58([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x160d58([0x68,0x69,0x67,0x68])}),_0x3015f3[_0x160d58([0x6f,0x6e])](_0x160d58([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbcaac2=>{_0x4dedb2(_0xbcaac2[_0x160d58([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x41cdaa=!0x0,_0x20054a(_0xbcaac2[_0x160d58([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x160d58([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x160d58([0x6c,0x6f,0x77])}),_0xdffc44[_0x160d58([0x74,0x68,0x65,0x6e])](()=>{_0x41cdaa||_0x581312(_0x160d58([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x204e03(){return _0x3015f3[_0x160d58([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x160d58([0x76,0x69,0x65,0x77])][_0x160d58([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x160d58([0x61,0x75,0x74,0x6f]);}function _0x26276a(){_0x3015f3[_0x160d58([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x160d58([0x76,0x69,0x65,0x77])][_0x160d58([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x160d58([0x61,0x75,0x74,0x6f]);}}function _0x25c514(_0x51ca06){const _0x334a2f=[new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf3c938=>setTimeout(_0xf3c938,0x5356b2f6^_0x51afae)),_0xdffc44[_0x160d58([0x74,0x68,0x65,0x6e])](()=>new window[(_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ef6ca=>{let _0x7d47c=0x0;_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x6f,0x6e])](_0x160d58([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x7ff92a,_0x10f0dd)=>{_0x10f0dd[0x0][_0x160d58([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x7d47c++,_0x7d47c==(0x535f8dc2^_0x51afae)&&(_0x2ef6ca(),_0x7ff92a[_0x160d58([0x6f,0x66,0x66])]());});}))];return window[_0x160d58([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x160d58([0x72,0x61,0x63,0x65])](_0x334a2f)[_0x160d58([0x74,0x68,0x65,0x6e])](()=>_0x51ca06);}async function _0x171934(){await _0xdffc44,_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5afc3f,_0x3015f3[_0x160d58([0x6d,0x6f,0x64,0x65,0x6c])][_0x160d58([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5afc3f,_0x3015f3[_0x160d58([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x160d58([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x511a8f(_0xd0d406){const _0xa0201a=_0xf2b1ba();_0x3015f3[_0xa0201a]=_0x160d58([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xd0d406,_0xd0d406!=_0x160d58([0x56,0x61,0x6c,0x69,0x64])&&_0x171934();}function _0xf2b1ba(){const _0x97898a=window[_0x160d58([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x160d58([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x160d58([0x6e,0x6f,0x77])]())[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x160d58([0x2e]),'');let _0x43064e=_0x160d58([0x68]);for(let _0x14f58a=0x0;_0x14f58a<_0x97898a[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14f58a+=0x2){let _0x512144=window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x97898a[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14f58a,_0x14f58a+0x2));_0x512144>=_0x24ed8f[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x512144-=_0x24ed8f[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43064e+=_0x24ed8f[_0x512144];}return _0x43064e;}function _0x35d48e(){const _0x5e4729=_0x4b5855[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e]));if(0x3!=_0x5e4729[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x423aff(_0x5e4729[0x1]);function _0x423aff(_0x30e435){const _0x38b78f=_0x5e023a(_0x30e435);return _0x38b78f&&_0x35fa40()?_0x38b78f:null;function _0x35fa40(){const _0x23100c=_0x38b78f[_0x160d58([0x6a,0x74,0x69])],_0x5c4347=window[_0x160d58([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23100c[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x23100c[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x546e2a={..._0x38b78f,[_0x160d58([0x6a,0x74,0x69])]:_0x23100c[_0x160d58([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x23100c[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x546e2a[_0x160d58([0x76,0x63])],_0x5c0eb8(_0x546e2a)==_0x5c4347;}}}async function _0x9072f0(){let _0x5708d5=!0x0;try{const _0x2a1aa2=_0x4b5855[_0x160d58([0x73,0x70,0x6c,0x69,0x74])](_0x160d58([0x2e])),[_0x4f542f,_0x4e0b9a,_0x2106f3]=_0x2a1aa2;return _0x25097c(_0x4f542f),await _0x39c6ec(_0x4f542f,_0x4e0b9a,_0x2106f3),_0x5708d5;}catch{return!0x1;}function _0x25097c(_0x20a74a){const _0x4d2f24=_0x5e023a(_0x20a74a);_0x4d2f24&&_0x4d2f24[_0x160d58([0x61,0x6c,0x67])]==_0x160d58([0x45,0x53,0x32,0x35,0x36])||(_0x5708d5=!0x1);}async function _0x39c6ec(_0x41f999,_0x4deef9,_0xdf3bb2){const _0xcf0d65=window[_0x160d58([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x160d58([0x66,0x72,0x6f,0x6d])](_0x6def42(_0xdf3bb2),_0x4ce971=>_0x4ce971[_0x160d58([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x47e949=new window[(_0x160d58([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x160d58([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x41f999+_0x160d58([0x2e])+_0x4deef9),_0x5875b0=window[_0x160d58([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x160d58([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5875b0)return;const _0x4163ad=await _0x5875b0[_0x160d58([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x160d58([0x6a,0x77,0x6b]),_0x10b01e,{[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x45,0x43,0x44,0x53,0x41]),[_0x160d58([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x160d58([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5875b0[_0x160d58([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x45,0x43,0x44,0x53,0x41]),[_0x160d58([0x68,0x61,0x73,0x68])]:{[_0x160d58([0x6e,0x61,0x6d,0x65])]:_0x160d58([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4163ad,_0xcf0d65,_0x47e949)||(_0x5708d5=!0x1);}}function _0x5e023a(_0x154210){return _0x154210[_0x160d58([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x160d58([0x65,0x79]))?JSON[_0x160d58([0x70,0x61,0x72,0x73,0x65])](_0x6def42(_0x154210)):null;}function _0x6def42(_0x43f0ca){return window[_0x160d58([0x61,0x74,0x6f,0x62])](_0x43f0ca[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x160d58([0x2b]))[_0x160d58([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x160d58([0x2f])));}function _0x5c0eb8(_0x48975a){let _0x1939b6=0x1505;function _0x5767be(_0x49a2b1){for(let _0x36694b=0x0;_0x36694b<_0x49a2b1[_0x160d58([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x36694b++){const _0x5021aa=_0x49a2b1[_0x160d58([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x36694b);_0x1939b6=(_0x1939b6<<0x5)+_0x1939b6+_0x5021aa,_0x1939b6&=_0x1939b6;}}function _0x1bce29(_0x195201){Array[_0x160d58([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x195201)?_0x195201[_0x160d58([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1bce29):_0x195201&&typeof _0x195201==_0x160d58([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x160d58([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x195201)[_0x160d58([0x73,0x6f,0x72,0x74])]()[_0x160d58([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4e31b3,_0x236200])=>{_0x5767be(_0x4e31b3),_0x1bce29(_0x236200);}):_0x5767be(window[_0x160d58([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x195201));}return _0x1bce29(_0x48975a),_0x1939b6>>>0x0;}function _0x316ffe(_0x15841a){return _0x15841a[_0x160d58([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x160d58([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x160d58([0x30]));}function _0x5d8852(_0x141ddd){return _0x141ddd[_0x160d58([0x73,0x70,0x6c,0x69,0x74])]('')[_0x160d58([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x160d58([0x6a,0x6f,0x69,0x6e])]('');}function _0x5afc3f(){}function _0x160d58(_0x4b4dfc){const _0xfc0f1a=_0x3acb;return _0x4b4dfc[_0xfc0f1a(0x1db)](_0x3378f1=>String[_0xfc0f1a(0x1c1)](_0x3378f1))[_0xfc0f1a(0x1b7)]('');}_0x511a8f(await _0x22005f());}(this);}[_0xf2a2c8(0x1ec)](){const _0x29ad93=_0xf2a2c8,_0x28daec=this[_0x29ad93(0x1c9)][_0x29ad93(0x1c4)][_0x29ad93(0x1d5)];_0x28daec[_0x29ad93(0x201)](_0x29ad93(0x1ca))&&_0x28daec[_0x29ad93(0x1f4)](_0x29ad93(0x1ca),{'allowAttributes':[_0x29ad93(0x1b5)]}),_0x28daec[_0x29ad93(0x201)](_0x29ad93(0x1c3))&&_0x28daec[_0x29ad93(0x1f4)](_0x29ad93(0x1c3),{'allowAttributes':[_0x29ad93(0x1b5)]});}[_0xf2a2c8(0x1fc)](){const _0x22daa5=_0xf2a2c8,_0x5f10d0=this[_0x22daa5(0x1c9)];_0x5f10d0[_0x22daa5(0x1c8)][_0x22daa5(0x1b9)](_0x22daa5(0x1ea))[_0x22daa5(0x1d3)]({'model':_0x22daa5(0x1b5),'view':_0x22daa5(0x1d8)}),_0x5f10d0[_0x22daa5(0x1c8)][_0x22daa5(0x1b9)](_0x22daa5(0x1e8))[_0x22daa5(0x1f8)]({'model':{'key':_0x22daa5(0x1b5),'value':_0xb6e77d=>_0xb6e77d[_0x22daa5(0x1bf)](_0x22daa5(0x1d8))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x239b11=_0x5f10d0[_0x22daa5(0x1b6)][_0x22daa5(0x1ff)](_0x22daa5(0x1c0));_0x239b11&&this[_0x22daa5(0x1e2)](_0x239b11,_0x22daa5(0x1c2),(_0xdf5a,[_0x2fed67,_0x5f5dde])=>{const _0x421478=_0x22daa5;_0x2fed67[_0x421478(0x1d4)](_0x421478(0x1b5),_0x5f5dde);});}[_0xf2a2c8(0x1e3)](){const _0x22054c=_0xf2a2c8,_0x215cd7=this[_0x22054c(0x1c9)][_0x22054c(0x1bd)][_0x22054c(0x1ff)](_0x22054c(0x1fe))||{},_0x445a6f=this[_0x22054c(0x1c9)][_0x22054c(0x1bd)][_0x22054c(0x1ff)](_0x22054c(0x1bb))||'';this[_0x22054c(0x1f6)]=_0x4c3e96(_0x3caf4e[_0x22054c(0x1f5)],_0x22054c(0x1e5),{..._0x215cd7,'pubkey':_0x445a6f,'ctx-name':_0x22054c(0x1c6)+this[_0x22054c(0x1af)],'sourceList':'','imgOnly':_0x22054c(0x1b4),'removeCopyright':_0x22054c(0x1b4),'localeName':this[_0x22054c(0x1c9)][_0x22054c(0x1ef)][_0x22054c(0x1df)],'externalSourcesEmbedCss':_0x22054c(0x1e9)}),this[_0x22054c(0x1f6)][_0x22054c(0x200)]=_0x497e42=>{const _0x5b1308=_0x22054c;if(_0x5b1308(0x1f0)==_0x497e42)return _0x5b1308(0x1d0);},_0x3caf4e[_0x22054c(0x1f5)][_0x22054c(0x1b1)][_0x22054c(0x1f7)](this[_0x22054c(0x1f6)]);}[_0xf2a2c8(0x1eb)](){const _0x307716=_0xf2a2c8;this[_0x307716(0x1f2)]=_0x4c3e96(_0x3caf4e[_0x307716(0x1f5)],_0x307716(0x1fd),{'ctx-name':_0x307716(0x1c6)+this[_0x307716(0x1af)]}),_0x3caf4e[_0x307716(0x1f5)][_0x307716(0x1b1)][_0x307716(0x1f7)](this[_0x307716(0x1f2)]);}[_0xf2a2c8(0x1ce)](){const _0x9297bf=_0xf2a2c8,_0x443a88=this[_0x9297bf(0x1c9)][_0x9297bf(0x1b6)][_0x9297bf(0x1ff)](_0x9297bf(0x1e6));_0x443a88&&this[_0x9297bf(0x1e2)](_0x443a88,_0x9297bf(0x1e1),()=>{const _0x242b09=_0x9297bf,_0x512d17=this[_0x242b09(0x1c9)][_0x242b09(0x1c4)][_0x242b09(0x1f5)][_0x242b09(0x1c5)][_0x242b09(0x1cf)]();_0x512d17&&_0x512d17[_0x242b09(0x1bf)](_0x242b09(0x1b5))&&this[_0x242b09(0x1c9)][_0x242b09(0x1cb)][_0x242b09(0x1fa)][_0x242b09(0x1b3)](_0x242b09(0x1fb),()=>{const _0x55bf4f=_0x242b09;_0x1901df(this[_0x55bf4f(0x1c9)],_0x512d17);});});const _0x534293=this[_0x9297bf(0x1c9)][_0x9297bf(0x1b6)][_0x9297bf(0x1ff)](_0x9297bf(0x1ba));_0x534293&&this[_0x9297bf(0x1e2)](_0x534293,_0x9297bf(0x1e1),()=>{const _0x3bee03=_0x9297bf,_0x14fb60=this[_0x3bee03(0x1c9)][_0x3bee03(0x1c4)][_0x3bee03(0x1f5)][_0x3bee03(0x1c5)][_0x3bee03(0x1cf)]();_0x14fb60&&_0x14fb60[_0x3bee03(0x1bf)](_0x3bee03(0x1b5))&&this[_0x3bee03(0x1c9)][_0x3bee03(0x1cb)][_0x3bee03(0x1fa)][_0x3bee03(0x1b3)](_0x3bee03(0x1fb),()=>{const _0x39cf1c=_0x3bee03;_0x1901df(this[_0x39cf1c(0x1c9)],_0x14fb60);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x1e9db3,ObservableMixin as _0x56487f}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x497de4}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4bd577}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x91f81c}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x43d646}from'../../utils/uploadutils.js';import{getImageUrls as _0x9c86eb,getImageDimension as _0x529ef2}from'../../utils/editingutils.js';import{isAncestor as _0x4de160}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x56487f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x420d7a,_0x1fd110,_0x39ec1d){super(),this['_editor']=_0x420d7a,this['_dialog']=_0x1fd110,this['_imageElement']=_0x39ec1d,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 _0x1c0d01=this['_imageElement'],_0x65796a=_0x1c0d01['getAttribute']('uploadcareImageId'),_0x3aedaa=_0x1c0d01['getAttribute']('src');if(_0x65796a)await this['_loadImageInfo'](_0x65796a,_0x3aedaa);else{if(this['_imageCache']['has'](_0x3aedaa)){const _0x1319ce=this['_imageCache']['get'](_0x3aedaa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1319ce['url'],this['imageDimension']=_0x1319ce['dimension'],this['imageId']=_0x1319ce['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x41d339}=this['_editor'],t=_0x41d339['t'],_0x1ad18f=new _0x91f81c(_0x41d339,this['imageStatus'],this['_attributes']);_0x1ad18f['bind']('status')['to'](this,'imageStatus'),_0x1ad18f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1ad18f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1ad18f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1ad18f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4bd577,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1ad18f,'position':_0x497de4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1ad18f['focus']();},'onHide':()=>{_0x1ad18f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x241553=>!_0x4de160(_0x241553,_0x1ad18f['element'])}});}['_loadImageInfo'](_0x4b555c,_0x3e4856){return _0x43d646['getInfo'](_0x4b555c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x250fdb=>{const {width:_0x5496c4,height:_0x3e4303}=_0x250fdb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3e4856,this['imageDimension']={'width':_0x5496c4,'height':_0x3e4303},this['imageId']=_0x4b555c;})['catch'](_0xe85cf9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xe85cf9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x43016f,_0x295a8d){return this['_getImageAsFile'](_0x43016f)['then'](_0x110699=>_0x43d646['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':_0x295a8d['signal'],'file':_0x110699,'onProgress':_0x1f1178=>{_0x1f1178&&_0x1f1178['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f1178['value']));}}))['then'](_0x4a932b=>{const {width:_0x47e09d,height:_0x598e75}=_0x4a932b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a932b['cdnUrl'],this['imageDimension']={'width':_0x47e09d,'height':_0x598e75},this['imageId']=_0x4a932b['uuid'],this['imageUploadProgress']=null;const _0x5a1dbd=_0x43016f['getAttribute']('src');this['_imageCache']['set'](_0x5a1dbd,{'id':_0x4a932b['uuid'],'url':_0x4a932b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9ceb57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9ceb57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x288af6,_0x204bc0){_0x288af6['on']('apply',(_0x4fda38,_0x4df4cf)=>{this['_replaceImage'](_0x204bc0,_0x4df4cf['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x288af6['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x288af6['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x54835e,_0x540fff,_0x212ae6){const _0x21fd9e=this['_editor'],{width:_0x2f3504,height:_0x43a366}=_0x529ef2(_0x540fff,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3d92dd,imageSources:_0x5321a2}=_0x9c86eb(_0x540fff,_0x2f3504);_0x21fd9e['model']['change'](_0x565296=>{if('$graveyard'===_0x54835e['root']['rootName']){_0x21fd9e['execute']('insertImage',{'imageType':_0x54835e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366}});const _0x2f590c=_0x54835e['getChildren']();_0x54835e=_0x21fd9e['model']['document']['selection']['getSelectedElement']();for(const _0x31c4c9 of _0x2f590c)_0x565296['append'](_0x565296['cloneElement'](_0x31c4c9),_0x54835e);}else _0x565296['setSelection'](_0x54835e,'on'),_0x21fd9e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366},_0x54835e);_0x565296['setSelection'](_0x54835e,'on');});}async['_getImageAsFile'](_0x6dcb6e){const _0x40dbf6=_0x1e9db3['window'],_0x3405ed=_0x1e9db3['document']['location']['href'],_0x2036fc=new _0x40dbf6['URL'](_0x6dcb6e['getAttribute']('src'),_0x3405ed);if('data:'===_0x2036fc['protocol']){const _0x4becbe=_0x2036fc['href']['split'](','),_0x3d92e8=_0x4becbe[0x0]['match'](/:(.*?);/)[0x1],_0x3e1900=_0x3d92e8['split']('/')[0x1],_0x20a502=_0x40dbf6['atob'](_0x4becbe[_0x4becbe['length']-0x1]);let _0x988cec=_0x20a502['length'];const _0x48ec90=new _0x40dbf6['Uint8Array'](_0x988cec);for(;_0x988cec--;)_0x48ec90[_0x988cec]=_0x20a502['charCodeAt'](_0x988cec);return new _0x40dbf6['File']([_0x48ec90],'image.'+_0x3e1900,{'type':_0x3d92e8});}const _0x30c5b3=_0x2036fc['href']['split']('/'),_0x25a753=_0x30c5b3[_0x30c5b3['length']-0x1],_0xfaf17=_0x25a753['split']('.')[0x1];return _0x40dbf6['fetch'](_0x2036fc['href'])['then'](_0x3b1e9f=>_0x3b1e9f['clone']()['blob']())['then'](_0x32200a=>new _0x40dbf6['File']([_0x32200a],_0x25a753,{'type':'image/'+_0xfaf17}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x5b1c29,_0x48157f){const _0x12cc1c=_0x89d1,_0x1eaf59=_0x5b1c29();while(!![]){try{const _0x22c240=-parseInt(_0x12cc1c(0x118))/0x1+-parseInt(_0x12cc1c(0x10a))/0x2*(parseInt(_0x12cc1c(0x11a))/0x3)+parseInt(_0x12cc1c(0x113))/0x4+-parseInt(_0x12cc1c(0x119))/0x5*(-parseInt(_0x12cc1c(0x110))/0x6)+parseInt(_0x12cc1c(0x10b))/0x7*(parseInt(_0x12cc1c(0x111))/0x8)+parseInt(_0x12cc1c(0x112))/0x9+-parseInt(_0x12cc1c(0x10d))/0xa;if(_0x22c240===_0x48157f)break;else _0x1eaf59['push'](_0x1eaf59['shift']());}catch(_0x567a5a){_0x1eaf59['push'](_0x1eaf59['shift']());}}}(_0x356b,0xefcf7));import{View as _0x40202e}from'ckeditor5/src/ui.js';function _0x356b(){const _0x1e1e23=['18EKzwlB','7Ajkqcl','bindTemplate','12580380pCKkSI','imageSrc','setTemplate','30qBYzDz','5003896yXtKDT','807534XCsaLr','2704804bLzpQN','ck-uploadcare-theme','uc-cloud-image-editor','uc-light','set','357163bCDpLV','1224995YAFXis','6315NnmZwz','image-edit'];_0x356b=function(){return _0x1e1e23;};return _0x356b();}function _0x89d1(_0x362980,_0x3a07e2){const _0x356b3d=_0x356b();return _0x89d1=function(_0x89d13c,_0x3c93d1){_0x89d13c=_0x89d13c-0x10a;let _0x14ab7e=_0x356b3d[_0x89d13c];return _0x14ab7e;},_0x89d1(_0x362980,_0x3a07e2);}export class UploadcareImageEditFormEditingView extends _0x40202e{constructor(_0x9d88ff,_0x167e33){const _0x14accd=_0x89d1;super(_0x9d88ff);const _0x275d5b=this[_0x14accd(0x10c)];this[_0x14accd(0x117)](_0x14accd(0x10e),''),this[_0x14accd(0x10f)]({'tag':_0x14accd(0x115),'attributes':{..._0x167e33,'class':[_0x14accd(0x116),_0x14accd(0x114)],'ctx-name':_0x14accd(0x11b),'cdn-url':_0x275d5b['to'](_0x14accd(0x10e))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x152b5e}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a3afe,IconView as _0x47c0b5,View as _0x5c1bb7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5c1bb7{constructor(_0x3ea8a8){super(_0x3ea8a8);const t=_0x3ea8a8['t'];this['set']('errorType',null);const _0x2a03ea=new _0x3a3afe(_0x3ea8a8);_0x2a03ea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2a03ea['withText']=!0x0,_0x2a03ea['class']='ck-button-action',_0x2a03ea['on']('execute',()=>{this['fire']('retry');}),_0x2a03ea['bind']('isVisible')['to'](this,'errorType',_0xe5bf86=>'NotFound'!==_0xe5bf86);const _0x5df61e=new _0x47c0b5();_0x5df61e['content']=_0x152b5e,_0x5df61e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x7e7db4=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':[_0x5df61e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x7e7db4['to']('errorType',_0x1f76fa=>t('NotFound'!==_0x1f76fa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2a03ea]},{'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'}]}]}]});}}
|