@ckeditor/ckeditor5-uploadcare 46.0.0-alpha.4 → 46.0.0-alpha.6
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/ui/uploadcarecontroller.js +2 -2
- package/src/ui/uploadcareformview.js +1 -1
- 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
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0xc46e52,ObservableMixin as _0x50bf1e}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x448995}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x515377}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2f9bcd}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x2f22d5}from'../../utils/uploadutils.js';import{getImageUrls as _0x2e8636,getImageDimension as _0x55d475}from'../../utils/editingutils.js';import{isAncestor as _0x375cbc}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x50bf1e(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3d962e,_0x280d5f,_0x2adb9a){super(),this['_editor']=_0x3d962e,this['_dialog']=_0x280d5f,this['_imageElement']=_0x2adb9a,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 _0x30cdd4=this['_imageElement'],_0x36c99b=_0x30cdd4['getAttribute']('uploadcareImageId'),_0x4e41e5=_0x30cdd4['getAttribute']('src');if(_0x36c99b)await this['_loadImageInfo'](_0x36c99b,_0x4e41e5);else{if(this['_imageCache']['has'](_0x4e41e5)){const _0x42f3e6=this['_imageCache']['get'](_0x4e41e5);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x42f3e6['url'],this['imageDimension']=_0x42f3e6['dimension'],this['imageId']=_0x42f3e6['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5da4dd}=this['_editor'],t=_0x5da4dd['t'],_0x45469a=new _0x2f9bcd(_0x5da4dd,this['imageStatus'],this['_attributes']);_0x45469a['bind']('status')['to'](this,'imageStatus'),_0x45469a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x45469a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x45469a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x45469a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x515377,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x45469a,'position':_0x448995['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x45469a['focus']();},'onHide':()=>{_0x45469a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x24f510=>!_0x375cbc(_0x24f510,_0x45469a['element'])}});}['_loadImageInfo'](_0xa9c426,_0x3548fa){return _0x2f22d5['getInfo'](_0xa9c426,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2ba3cd=>{const {width:_0x34d163,height:_0x110c9d}=_0x2ba3cd['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3548fa,this['imageDimension']={'width':_0x34d163,'height':_0x110c9d},this['imageId']=_0xa9c426;})['catch'](_0x5bc870=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5bc870['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x38db55,_0x28a9a0){return this['_getImageAsFile'](_0x38db55)['then'](_0x185cac=>_0x2f22d5['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x28a9a0['signal'],'file':_0x185cac,'onProgress':_0x4a8912=>{_0x4a8912&&_0x4a8912['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4a8912['value']));}}))['then'](_0x41a37c=>{const {width:_0x3ea2f6,height:_0x5d4ea2}=_0x41a37c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x41a37c['cdnUrl'],this['imageDimension']={'width':_0x3ea2f6,'height':_0x5d4ea2},this['imageId']=_0x41a37c['uuid'],this['imageUploadProgress']=null;const _0x36d0fc=_0x38db55['getAttribute']('src');this['_imageCache']['set'](_0x36d0fc,{'id':_0x41a37c['uuid'],'url':_0x41a37c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x174df0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x174df0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5cbaa2,_0x41935d){_0x5cbaa2['on']('apply',(_0x36e8a4,_0x4c5d4d)=>{this['_replaceImage'](_0x41935d,_0x4c5d4d['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5cbaa2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5cbaa2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x140be9,_0x346f87,_0x225f83){const _0x54b674=this['_editor'],{width:_0x20cc5a,height:_0x412239}=_0x55d475(_0x346f87,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x283a1c,imageSources:_0x57c64d}=_0x2e8636(_0x346f87,_0x20cc5a);_0x54b674['model']['change'](_0xfb01a4=>{if('$graveyard'===_0x140be9['root']['rootName']){_0x54b674['execute']('insertImage',{'imageType':_0x140be9['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x140be9['getAttributes']()),'uploadcareImageId':_0x225f83,'src':_0x283a1c,'sources':_0x57c64d,'width':_0x20cc5a,'height':_0x412239}});const _0x5065c6=_0x140be9['getChildren']();_0x140be9=_0x54b674['model']['document']['selection']['getSelectedElement']();for(const _0x5dba2f of _0x5065c6)_0xfb01a4['append'](_0xfb01a4['cloneElement'](_0x5dba2f),_0x140be9);}else _0xfb01a4['setSelection'](_0x140be9,'on'),_0x54b674['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x140be9['getAttributes']()),'uploadcareImageId':_0x225f83,'src':_0x283a1c,'sources':_0x57c64d,'width':_0x20cc5a,'height':_0x412239},_0x140be9);_0xfb01a4['setSelection'](_0x140be9,'on');});}async['_getImageAsFile'](_0x376a24){const _0x2834b5=_0xc46e52['window'],_0x49a87e=_0xc46e52['document']['location']['href'],_0x152b62=new _0x2834b5['URL'](_0x376a24['getAttribute']('src'),_0x49a87e);if('data:'===_0x152b62['protocol']){const _0x153100=_0x152b62['href']['split'](','),_0x1726a3=_0x153100[0x0]['match'](/:(.*?);/)[0x1],_0x76efb3=_0x1726a3['split']('/')[0x1],_0x1df9f3=_0x2834b5['atob'](_0x153100[_0x153100['length']-0x1]);let _0x50b22b=_0x1df9f3['length'];const _0x49f148=new _0x2834b5['Uint8Array'](_0x50b22b);for(;_0x50b22b--;)_0x49f148[_0x50b22b]=_0x1df9f3['charCodeAt'](_0x50b22b);return new _0x2834b5['File']([_0x49f148],'image.'+_0x76efb3,{'type':_0x1726a3});}const _0x17a3ae=_0x152b62['href']['split']('/'),_0x463f7c=_0x17a3ae[_0x17a3ae['length']-0x1],_0x1396e8=_0x463f7c['split']('.')[0x1];return _0x2834b5['fetch'](_0x152b62['href'])['then'](_0x56e85f=>_0x56e85f['clone']()['blob']())['then'](_0x4f85d4=>new _0x2834b5['File']([_0x4f85d4],_0x463f7c,{'type':'image/'+_0x1396e8}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x13c6a0,_0x30c844){const _0x58b847=_0x236f,_0x33f14b=_0x13c6a0();while(!![]){try{const _0x5aea2b=-parseInt(_0x58b847(0x186))/0x1+-parseInt(_0x58b847(0x193))/0x2+parseInt(_0x58b847(0x18c))/0x3*(-parseInt(_0x58b847(0x18a))/0x4)+-parseInt(_0x58b847(0x187))/0x5+-parseInt(_0x58b847(0x189))/0x6*(parseInt(_0x58b847(0x196))/0x7)+-parseInt(_0x58b847(0x18d))/0x8+parseInt(_0x58b847(0x191))/0x9*(parseInt(_0x58b847(0x18f))/0xa);if(_0x5aea2b===_0x30c844)break;else _0x33f14b['push'](_0x33f14b['shift']());}catch(_0x35baad){_0x33f14b['push'](_0x33f14b['shift']());}}}(_0xf2e5,0xcca9a));import{View as _0x4e5f99}from'ckeditor5/src/ui.js';function _0xf2e5(){const _0x1d3748=['ck-uploadcare-theme','2211182McQrex','imageSrc','image-edit','13153xVfmPV','uc-cloud-image-editor','843771xoWoJV','27240bCjqgZ','uc-light','4842NBTTlq','2976452IjeanB','setTemplate','6KkLtPy','2835904nfcoyJ','bindTemplate','16650UOJjjv','set','33255pISGlR'];_0xf2e5=function(){return _0x1d3748;};return _0xf2e5();}function _0x236f(_0x25b307,_0x1e3a2e){const _0xf2e536=_0xf2e5();return _0x236f=function(_0x236f82,_0x303e4f){_0x236f82=_0x236f82-0x185;let _0x5812df=_0xf2e536[_0x236f82];return _0x5812df;},_0x236f(_0x25b307,_0x1e3a2e);}export class UploadcareImageEditFormEditingView extends _0x4e5f99{constructor(_0x1329ac,_0x31f2af){const _0x4039dd=_0x236f;super(_0x1329ac);const _0x17a40b=this[_0x4039dd(0x18e)];this[_0x4039dd(0x190)](_0x4039dd(0x194),''),this[_0x4039dd(0x18b)]({'tag':_0x4039dd(0x185),'attributes':{..._0x31f2af,'class':[_0x4039dd(0x188),_0x4039dd(0x192)],'ctx-name':_0x4039dd(0x195),'cdn-url':_0x17a40b['to'](_0x4039dd(0x194))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x2440f4}from'ckeditor5/src/icons.js';import{ButtonView as _0x38afd8,IconView as _0x2755c4,View as _0x959435}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x959435{constructor(_0x5adb07){super(_0x5adb07);const t=_0x5adb07['t'];this['set']('errorType',null);const _0x110209=new _0x38afd8(_0x5adb07);_0x110209['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x110209['withText']=!0x0,_0x110209['class']='ck-button-action',_0x110209['on']('execute',()=>{this['fire']('retry');}),_0x110209['bind']('isVisible')['to'](this,'errorType',_0x321ef9=>'NotFound'!==_0x321ef9);const _0x1b0cff=new _0x2755c4();_0x1b0cff['content']=_0x2440f4,_0x1b0cff['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x42ee4d=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':[_0x1b0cff,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x42ee4d['to']('errorType',_0x1b0c62=>t('NotFound'!==_0x1b0c62?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x110209]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x54467d,View as _0x3bd3fe}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x3bd3fe{constructor(_0x44a656){super(_0x44a656);const t=_0x44a656['t'],_0x37bdc0=this['bindTemplate'],_0x21607f=new _0x54467d();_0x21607f['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':[_0x21607f,{'text':_0x37bdc0['to']('imageUploadProgress',_0x145073=>t('Loading\x20image...')+'\x20('+(_0x145073||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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2736a6=_0x22f7;function _0x2133(){const _0x2896fa=['_items','length','observe','createCollection','focus','retry','add','div','target','_waitForImageEditorComponent','905283XnKUXD','16ThgfcT','setTemplate','_errorView','ready','22ofpSTS','once','15670nNFKNy','584331kwrROn','240lPmwGf','addEventListener','disconnect','_addErrorViewListeners','840880fxmmnI','getFocusableElement','change:status','error','filter','cdnUrl','toLowerCase','104165XUoTHA','status','addMany','uploading','20tMMuFt','ck-uploadcare-form','ck-reset_all-excluded','_addUploadcareImageEditorListeners','clear','8668912mNYHla','_editingView','nodeName','uc-cloud-image-editor','apply','render','_loadingView','addedNodes','cancel','element','querySelector','detail','_setView','set','1356NvfFKT','_focusableView','fire','122969oHoREY'];_0x2133=function(){return _0x2896fa;};return _0x2133();}(function(_0x351b97,_0x56ea36){const _0x423146=_0x22f7,_0x5dbe4b=_0x351b97();while(!![]){try{const _0x2b4eeb=-parseInt(_0x423146(0x1f6))/0x1*(parseInt(_0x423146(0x1e7))/0x2)+parseInt(_0x423146(0x1ea))/0x3*(-parseInt(_0x423146(0x1e3))/0x4)+-parseInt(_0x423146(0x1e9))/0x5*(parseInt(_0x423146(0x1eb))/0x6)+parseInt(_0x423146(0x1ff))/0x7+parseInt(_0x423146(0x1ef))/0x8+-parseInt(_0x423146(0x1e2))/0x9*(-parseInt(_0x423146(0x1fa))/0xa)+parseInt(_0x423146(0x1d7))/0xb*(parseInt(_0x423146(0x1d4))/0xc);if(_0x2b4eeb===_0x56ea36)break;else _0x5dbe4b['push'](_0x5dbe4b['shift']());}catch(_0x4f13ef){_0x5dbe4b['push'](_0x5dbe4b['shift']());}}}(_0x2133,0xb8f8c));import{View as _0x178f18}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x24ece8}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0xc20f89}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x25ec52}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x4d66c8}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';function _0x22f7(_0x1fca4b,_0x1b78ac){const _0x213382=_0x2133();return _0x22f7=function(_0x22f7a9,_0x25e7fb){_0x22f7a9=_0x22f7a9-0x1d4;let _0x288fab=_0x213382[_0x22f7a9];return _0x288fab;},_0x22f7(_0x1fca4b,_0x1b78ac);}export class UploadcareImageEditFormView extends _0x4d66c8{[_0x2736a6(0x1d8)];[_0x2736a6(0x205)];[_0x2736a6(0x1e5)];[_0x2736a6(0x200)];[_0x2736a6(0x1d5)];constructor(_0x360c65,_0x26b4a5,_0x319be8){const _0x2c9374=_0x2736a6;super(_0x360c65),this[_0x2c9374(0x1d8)]=this[_0x2c9374(0x1db)](),this[_0x2c9374(0x205)]=new _0x24ece8(_0x360c65),this[_0x2c9374(0x1e5)]=new _0xc20f89(_0x360c65),this[_0x2c9374(0x200)]=new _0x25ec52(_0x360c65,_0x319be8),this[_0x2c9374(0x1d5)]=new _0x178f18(_0x360c65),this[_0x2c9374(0x1d5)][_0x2c9374(0x1e4)](this[_0x2c9374(0x1f0)]()),this[_0x2c9374(0x20c)](_0x2c9374(0x1f7),_0x26b4a5),this[_0x2c9374(0x1e4)]({'tag':_0x2c9374(0x1df),'attributes':{'class':['ck',_0x2c9374(0x1fc),_0x2c9374(0x1fb)],'tabindex':'-1'},'children':this[_0x2c9374(0x1d8)]}),this[_0x2c9374(0x20b)](),this[_0x2c9374(0x1e8)](_0x2c9374(0x204),()=>{const _0x5a4cf9=_0x2c9374;this[_0x5a4cf9(0x1e1)](this[_0x5a4cf9(0x208)],_0x54653c=>{const _0x270fc6=_0x5a4cf9;this[_0x270fc6(0x1fd)](_0x54653c);});}),this['on'](_0x2c9374(0x1f1),()=>{const _0x4f5400=_0x2c9374;this[_0x4f5400(0x20b)]();}),this[_0x2c9374(0x1ee)]();}[_0x2736a6(0x1dc)](){const _0x1b8b23=_0x2736a6;this[_0x1b8b23(0x208)][_0x1b8b23(0x1dc)]();}[_0x2736a6(0x20b)](){const _0x5604a5=_0x2736a6;switch(this[_0x5604a5(0x1d8)][_0x5604a5(0x1fe)](),this[_0x5604a5(0x1f7)]){case _0x5604a5(0x1f9):this[_0x5604a5(0x1d8)][_0x5604a5(0x1de)](this[_0x5604a5(0x205)]);break;case _0x5604a5(0x1f2):this[_0x5604a5(0x1d8)][_0x5604a5(0x1de)](this[_0x5604a5(0x1e5)]);break;case _0x5604a5(0x1e6):this[_0x5604a5(0x1d8)][_0x5604a5(0x1f8)]([this[_0x5604a5(0x200)],this[_0x5604a5(0x1d5)]]);}}[_0x2736a6(0x1e1)](_0x579f63,_0x39d394){const _0x33f1ac=_0x2736a6,_0x4b2837=_0x33f1ac(0x202),_0x272be7=_0x579f63[_0x33f1ac(0x209)](_0x4b2837);if(_0x272be7)return _0x39d394(_0x272be7);const _0x5cdba7=new MutationObserver(_0xdf6be6=>{const _0x76a79f=_0x33f1ac,_0x3af675=_0xdf6be6[_0x76a79f(0x1f3)](_0x1bcd02=>_0x1bcd02[_0x76a79f(0x1e0)]===_0x579f63&&_0x1bcd02[_0x76a79f(0x206)][_0x76a79f(0x1d9)]>0x0&&_0x1bcd02[_0x76a79f(0x206)][0x0][_0x76a79f(0x201)][_0x76a79f(0x1f5)]()===_0x4b2837);_0x3af675[_0x76a79f(0x1d9)]&&(_0x5cdba7[_0x76a79f(0x1ed)](),_0x39d394(_0x3af675[0x0][_0x76a79f(0x206)][0x0]));});_0x5cdba7[_0x33f1ac(0x1da)](_0x579f63,{'childList':!0x0,'subtree':!0x0});}[_0x2736a6(0x1fd)](_0x46c8aa){const _0xcb3b77=_0x2736a6;_0x46c8aa[_0xcb3b77(0x1ec)](_0xcb3b77(0x203),_0x3c7fb2=>{const _0x4e9d1d=_0xcb3b77;this[_0x4e9d1d(0x1d6)](_0x4e9d1d(0x203),{'imageSrc':_0x3c7fb2[_0x4e9d1d(0x20a)][_0x4e9d1d(0x1f4)]});}),_0x46c8aa[_0xcb3b77(0x1ec)](_0xcb3b77(0x207),()=>{const _0x2da893=_0xcb3b77;this[_0x2da893(0x1d6)](_0x2da893(0x207));});}[_0x2736a6(0x1ee)](){const _0x5640c0=_0x2736a6;this[_0x5640c0(0x1e5)]['on'](_0x5640c0(0x1dd),()=>{const _0x172dfe=_0x5640c0;this[_0x172dfe(0x1d6)](_0x172dfe(0x1dd));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x251d01=_0x4abf;(function(_0x12974b,_0x35ac58){const _0xf555cc=_0x4abf,_0x3312fa=_0x12974b();while(!![]){try{const _0x5e0b15=parseInt(_0xf555cc(0x195))/0x1*(parseInt(_0xf555cc(0x1a6))/0x2)+-parseInt(_0xf555cc(0x18f))/0x3*(parseInt(_0xf555cc(0x1a8))/0x4)+-parseInt(_0xf555cc(0x188))/0x5+-parseInt(_0xf555cc(0x1a4))/0x6+-parseInt(_0xf555cc(0x197))/0x7+-parseInt(_0xf555cc(0x193))/0x8*(parseInt(_0xf555cc(0x19a))/0x9)+-parseInt(_0xf555cc(0x19b))/0xa*(-parseInt(_0xf555cc(0x19f))/0xb);if(_0x5e0b15===_0x35ac58)break;else _0x3312fa['push'](_0x3312fa['shift']());}catch(_0x4acf3b){_0x3312fa['push'](_0x3312fa['shift']());}}}(_0x3238,0xa165e));import{Command as _0x2c5c9}from'ckeditor5/src/core.js';function _0x4abf(_0xf6442c,_0x41fb23){const _0x3238ad=_0x3238();return _0x4abf=function(_0x4abf99,_0x426c41){_0x4abf99=_0x4abf99-0x188;let _0x41b930=_0x3238ad[_0x4abf99];return _0x41b930;},_0x4abf(_0xf6442c,_0x41fb23);}function _0x3238(){const _0x3e5b1c=['requires','imageBlock','bind','element','document','imageEditController','2477085MCowCg','unbind','get','editor','8648WqHFar','imageInline','1uJmwNo','getSelectedElement','5975858khknEC','isActive','execute','729mHTpWx','10wYYWJH','_isEditable','model','set','39154291acJVzb','uploadcare.allowExternalImagesEditing','selection','config','plugins','6420864vousAK','refresh','1113670vTQEVe','isEnabled','4egPazp','3090680CjBnbe'];_0x3238=function(){return _0x3e5b1c;};return _0x3238();}import{Dialog as _0x19d0af}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x3f3661}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x257183}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x2c5c9{[_0x251d01(0x18e)];static get[_0x251d01(0x189)](){return[_0x19d0af];}[_0x251d01(0x19c)];constructor(_0x114148){const _0x16bf9c=_0x251d01;super(_0x114148),this[_0x16bf9c(0x18e)]=void 0x0,this[_0x16bf9c(0x19c)]=_0x257183(_0x114148[_0x16bf9c(0x1a2)][_0x16bf9c(0x191)](_0x16bf9c(0x1a0))||[]),this[_0x16bf9c(0x19e)]({'isActive':!0x1});}[_0x251d01(0x1a5)](){const _0x413509=_0x251d01,_0x31fcb5=this[_0x413509(0x192)][_0x413509(0x19d)][_0x413509(0x18d)][_0x413509(0x1a1)][_0x413509(0x196)]();this[_0x413509(0x1a7)]=this[_0x413509(0x19c)](_0x31fcb5);}[_0x251d01(0x199)](){const _0x5786e9=_0x251d01;this[_0x5786e9(0x18e)]&&(this[_0x5786e9(0x190)](_0x5786e9(0x198)),this[_0x5786e9(0x18e)]=void 0x0);const _0x582727=this[_0x5786e9(0x192)][_0x5786e9(0x19d)][_0x5786e9(0x18d)][_0x5786e9(0x1a1)][_0x5786e9(0x196)]();_0x582727&&(_0x582727['is'](_0x5786e9(0x18c),_0x5786e9(0x18a))||_0x582727['is'](_0x5786e9(0x18c),_0x5786e9(0x194)))&&(this[_0x5786e9(0x18e)]=new _0x3f3661(this[_0x5786e9(0x192)],this[_0x5786e9(0x192)][_0x5786e9(0x1a3)][_0x5786e9(0x191)](_0x19d0af),_0x582727),this[_0x5786e9(0x18b)](_0x5786e9(0x198))['to'](this[_0x5786e9(0x18e)],_0x5786e9(0x198)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2dec29=_0x208a;(function(_0x58c32b,_0xe03acf){const _0x19147f=_0x208a,_0x2dd5b6=_0x58c32b();while(!![]){try{const _0x130fbe=-parseInt(_0x19147f(0xd3))/0x1*(-parseInt(_0x19147f(0xd7))/0x2)+-parseInt(_0x19147f(0xd2))/0x3*(-parseInt(_0x19147f(0xce))/0x4)+parseInt(_0x19147f(0xca))/0x5+-parseInt(_0x19147f(0xd9))/0x6+-parseInt(_0x19147f(0xd0))/0x7+-parseInt(_0x19147f(0xcb))/0x8+-parseInt(_0x19147f(0xdb))/0x9*(parseInt(_0x19147f(0xc7))/0xa);if(_0x130fbe===_0xe03acf)break;else _0x2dd5b6['push'](_0x2dd5b6['shift']());}catch(_0x4c8c68){_0x2dd5b6['push'](_0x2dd5b6['shift']());}}}(_0x1527,0xa4999));import{Plugin as _0x57aca9}from'ckeditor5/src/core.js';import{Notification as _0x37c8f7}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x362141}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x387dd0}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x371132}from'../uploadcareediting.js';function _0x208a(_0x4eed0a,_0x5e220e){const _0x152750=_0x1527();return _0x208a=function(_0x208a52,_0x20398a){_0x208a52=_0x208a52-0xc6;let _0x5743ed=_0x152750[_0x208a52];return _0x5743ed;},_0x208a(_0x4eed0a,_0x5e220e);}function _0x1527(){const _0x565d3c=['isOfficialPlugin','pluginName','19906osrbQH','uploadcareImageEdit','7681530rluQNa','add','24363fFnypI','init','820zXdGpW','ImageUtils','requires','5031615JZEfhi','540032XMAUwQ','ImageEditing','UploadcareImageEditEditing','40nSFHLi','isPremiumPlugin','771687lUKGQH','uploadcareImageReplace','123681cdBReN','94tZPEeq','commands'];_0x1527=function(){return _0x565d3c;};return _0x1527();}export class UploadcareImageEditEditing extends _0x57aca9{static get[_0x2dec29(0xd6)](){const _0x3fe0dd=_0x2dec29;return _0x3fe0dd(0xcd);}static get[_0x2dec29(0xc9)](){const _0x3bf382=_0x2dec29;return[_0x371132,_0x37c8f7,_0x3bf382(0xc8),_0x3bf382(0xcc)];}static get[_0x2dec29(0xd5)](){return!0x0;}static get[_0x2dec29(0xcf)](){return!0x0;}[_0x2dec29(0xc6)](){const _0x3e9754=_0x2dec29,{editor:_0xf66729}=this;_0xf66729[_0x3e9754(0xd4)][_0x3e9754(0xda)](_0x3e9754(0xd8),new _0x362141(_0xf66729)),_0xf66729[_0x3e9754(0xd4)][_0x3e9754(0xda)](_0x3e9754(0xd1),new _0x387dd0(_0xf66729));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x59688c}from'ckeditor5/src/core.js';import{ButtonView as _0x3872d3}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4c03c3}from'ckeditor5/src/icons.js';import{createElement as _0x5c1b0f}from'ckeditor5/src/utils.js';import'@uploadcare/file-uploader/web/uc-cloud-image-editor.min.css';import'../../theme/uploadcare-theme.css';export class UploadcareImageEditUI extends _0x59688c{['_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 _0x434d85=this['editor'];_0x434d85['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1b45f7=>{const _0xa92c62=_0x434d85['commands']['get']('uploadcareImageEdit'),_0x4c037e=new _0x3872d3(_0x1b45f7),t=_0x1b45f7['t'];return _0x4c037e['set']({'icon':_0x4c03c3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4c037e['bind']('isEnabled')['to'](_0xa92c62),_0x4c037e['bind']('isOn')['to'](_0xa92c62,'isActive'),this['listenTo'](_0x4c037e,'execute',()=>{_0x434d85['execute']('uploadcareImageEdit'),_0x434d85['editing']['view']['focus']();}),_0x4c037e;}),this['_initConfig']();}['_initConfig'](){const _0xc3e39b=_0x5c1b0f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xc3e39b),this['listenTo'](this['editor'],'destroy',()=>{_0xc3e39b['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x541836=_0x1498;(function(_0x546d22,_0x1ded0f){var _0xcd6c12=_0x1498,_0x4f42d5=_0x546d22();while(!![]){try{var _0x551cd3=parseInt(_0xcd6c12(0x100))/0x1*(parseInt(_0xcd6c12(0xff))/0x2)+parseInt(_0xcd6c12(0xfe))/0x3+-parseInt(_0xcd6c12(0x106))/0x4+parseInt(_0xcd6c12(0xf9))/0x5*(-parseInt(_0xcd6c12(0xf8))/0x6)+parseInt(_0xcd6c12(0x104))/0x7*(parseInt(_0xcd6c12(0x103))/0x8)+-parseInt(_0xcd6c12(0xf7))/0x9+-parseInt(_0xcd6c12(0xfa))/0xa*(-parseInt(_0xcd6c12(0xfd))/0xb);if(_0x551cd3===_0x1ded0f)break;else _0x4f42d5['push'](_0x4f42d5['shift']());}catch(_0x381d35){_0x4f42d5['push'](_0x4f42d5['shift']());}}}(_0x2fce,0x5132c));import{FocusTracker as _0x203026}from'ckeditor5/src/utils.js';import{View as _0x2e723e,FocusCycler as _0x3491fb}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';function _0x1498(_0x74110d,_0x2a5d97){var _0x2fce8a=_0x2fce();return _0x1498=function(_0x1498c2,_0xc0ed87){_0x1498c2=_0x1498c2-0xf5;var _0x55786e=_0x2fce8a[_0x1498c2];return _0x55786e;},_0x1498(_0x74110d,_0x2a5d97);}function _0x2fce(){var _0x543ac7=['div','focusTracker','1007064xcJBiy','6gjlPtZ','2168160yOZGzx','370Dmlhsn','true','bindTemplate','158719MGElbe','558267WlxbKb','2SRpEMJ','334706qQrcpO','createCollection','fire','66872xHXUoM','371sAEuqI','forwardCycle','2478316KLIaeV','getFocusableElement','focusCycler'];_0x2fce=function(){return _0x543ac7;};return _0x2fce();}export class DialogFocusManagerView extends _0x2e723e{[_0x541836(0xf6)];[_0x541836(0x108)];constructor(_0x46bb99){var _0x16ec66=_0x541836;super(_0x46bb99),this[_0x16ec66(0xf6)]=new _0x203026(),this[_0x16ec66(0x108)]=new _0x3491fb({'focusables':this[_0x16ec66(0x101)](),'focusTracker':this[_0x16ec66(0xf6)]});}[_0x541836(0x107)](){var _0xc22557=_0x541836;return{'tag':_0xc22557(0xf5),'attributes':{'aria-hidden':_0xc22557(0xfb),'tabindex':'0'},'on':{'focus':this[_0xc22557(0xfc)]['to'](()=>{var _0x502289=_0xc22557;this[_0x502289(0x108)][_0x502289(0x102)](_0x502289(0x105));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x1853f6,_0x451bdf){const _0x37ca42=_0x5a6c,_0x4203c3=_0x1853f6();while(!![]){try{const _0x2232ea=parseInt(_0x37ca42(0x144))/0x1*(-parseInt(_0x37ca42(0x15d))/0x2)+-parseInt(_0x37ca42(0x153))/0x3*(-parseInt(_0x37ca42(0x161))/0x4)+parseInt(_0x37ca42(0x16d))/0x5*(parseInt(_0x37ca42(0x16a))/0x6)+parseInt(_0x37ca42(0x148))/0x7*(parseInt(_0x37ca42(0x15c))/0x8)+parseInt(_0x37ca42(0x14a))/0x9*(-parseInt(_0x37ca42(0x163))/0xa)+parseInt(_0x37ca42(0x14c))/0xb+-parseInt(_0x37ca42(0x158))/0xc*(-parseInt(_0x37ca42(0x146))/0xd);if(_0x2232ea===_0x451bdf)break;else _0x4203c3['push'](_0x4203c3['shift']());}catch(_0x287d73){_0x4203c3['push'](_0x4203c3['shift']());}}}(_0x178f,0x48df7));import{global as _0x38d05e,DomEmitterMixin as _0x296720}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x1ebaa5){const _0x19ce01=_0x5a6c,_0x43d5d2=G(_0x1ebaa5);return _0x138e6c=>!(!_0x138e6c||!_0x138e6c['is'](_0x19ce01(0x171),_0x19ce01(0x169))&&!_0x138e6c['is'](_0x19ce01(0x171),_0x19ce01(0x16c)))&&(!!_0x138e6c[_0x19ce01(0x141)](_0x19ce01(0x173))||!!_0x138e6c[_0x19ce01(0x141)](_0x19ce01(0x164))&&_0x43d5d2(_0x138e6c[_0x19ce01(0x16b)](_0x19ce01(0x164))));}export function getImageUrls(_0xc73d9f,_0x5163e8){const _0x4ca351=_0x5a6c,_0x520c2b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x4ca351(0x15f)](_0x3becd5=>_0x3becd5<=_0x5163e8)[_0x4ca351(0x162)](_0x55d657=>_0xc73d9f[_0x4ca351(0x154)](/\/$/,'')+_0x4ca351(0x150)+_0x55d657+_0x4ca351(0x157)+_0x55d657+'w');return{'imageFallbackUrl':_0xc73d9f,'imageSources':[{'srcset':_0x520c2b[_0x4ca351(0x15e)](',\x20'),'sizes':_0x4ca351(0x170)+_0x5163e8+_0x4ca351(0x15b)+_0x5163e8+'px','type':_0x4ca351(0x16e)}]};}export function getImageDimension(_0x39e08,_0x1ee8a3,_0x38d5c4){const _0x14109a=_0x5a6c,_0x227566=_0x39e08[_0x14109a(0x156)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x227566?parseInt(_0x227566[0x1],0xa):_0x1ee8a3,'height':_0x227566?parseInt(_0x227566[0x2],0xa):_0x38d5c4};}export function showImageProcessingIndicator(_0x408020,_0x4ebe5c){const _0x1e4cc6=_0x5a6c,_0x26fe04=new(_0x296720())(),_0x4afb51=_0x408020[_0x1e4cc6(0x14d)][_0x1e4cc6(0x177)](_0x1e4cc6(0x176)),_0x5bd238=_0x408020[_0x1e4cc6(0x174)][_0x1e4cc6(0x165)][_0x1e4cc6(0x143)](_0x4ebe5c),_0x393010=_0x4afb51[_0x1e4cc6(0x142)](_0x5bd238),_0x563007=_0x408020[_0x1e4cc6(0x174)][_0x1e4cc6(0x179)][_0x1e4cc6(0x155)][_0x1e4cc6(0x17a)](_0x393010),_0x1fa4a8=_0x4ebe5c[_0x1e4cc6(0x16b)](_0x1e4cc6(0x151)),_0x26f31e=_0x4ebe5c[_0x1e4cc6(0x16b)](_0x1e4cc6(0x13f)),_0x41293a=_0x1e4cc6(0x167);_0x408020[_0x1e4cc6(0x174)][_0x1e4cc6(0x179)][_0x1e4cc6(0x152)](_0x2597d6=>{const _0x4bb473=_0x1e4cc6;_0x2597d6[_0x4bb473(0x14b)](_0x41293a,_0x5bd238),_0x2597d6[_0x4bb473(0x14e)](_0x4bb473(0x159),_0x1fa4a8+'/'+_0x26f31e,_0x393010);}),_0x26fe04[_0x1e4cc6(0x14f)](_0x563007,_0x1e4cc6(0x172),()=>{const _0x427f20=_0x1e4cc6;_0x26fe04[_0x427f20(0x147)](_0x563007,_0x427f20(0x172)),_0x408020[_0x427f20(0x174)][_0x427f20(0x179)][_0x427f20(0x152)](_0x5b62a2=>{const _0x42e4cc=_0x427f20;_0x5b62a2[_0x42e4cc(0x166)](_0x41293a,_0x5bd238),_0x5b62a2[_0x42e4cc(0x15a)](_0x42e4cc(0x159),_0x393010);});});}function _0x178f(){const _0x439f51=['removeClass','image-processing','window','imageBlock','1382862mUIHMQ','getAttribute','imageInline','5QwbEwk','image/webp','location','(max-width:\x20','element','load','uploadcareImageId','editing','function','ImageUtils','get','isArray','view','viewToDom','height','baseURI','hasAttribute','findViewImgElement','toViewElement','3BVHGPY','some','1222UGXIPz','stopListening','2045981fhqkjk','document','97830IlQqLF','addClass','49016uckByt','plugins','setStyle','listenTo','/-/resize/','width','change','143751BzSyOc','replace','domConverter','match','x/\x20','38508IQPPNK','aspect-ratio','removeStyle','px)\x20100vw,\x20','8tlupJb','152304UHXqof','join','filter','origin','12YeIrTt','map','410ZqmraF','src','mapper'];_0x178f=function(){return _0x439f51;};return _0x178f();}function _0x5a6c(_0x2f9622,_0x2e38b2){const _0x178fad=_0x178f();return _0x5a6c=function(_0x5a6c23,_0x3f4bb9){_0x5a6c23=_0x5a6c23-0x13f;let _0x111816=_0x178fad[_0x5a6c23];return _0x111816;},_0x5a6c(_0x2f9622,_0x2e38b2);}function G(_0x38533d){const _0x55c971=_0x5a6c;if(Array[_0x55c971(0x178)](_0x38533d)){const _0x125b00=_0x38533d[_0x55c971(0x162)](G);return _0x476a07=>_0x125b00[_0x55c971(0x145)](_0x13e3b9=>_0x13e3b9(_0x476a07));}if(_0x55c971(0x160)==_0x38533d){const _0x15e41d=_0x38d05e[_0x55c971(0x168)][_0x55c971(0x16f)][_0x55c971(0x160)];return _0x5d07d8=>new URL(_0x5d07d8,_0x38d05e[_0x55c971(0x149)][_0x55c971(0x140)])[_0x55c971(0x160)]==_0x15e41d;}return _0x55c971(0x175)==typeof _0x38533d?_0x38533d:_0x38533d instanceof RegExp?_0x3466ad=>!(!_0x3466ad[_0x55c971(0x156)](_0x38533d)&&!_0x3466ad[_0x55c971(0x154)](/^https?:\/\//,'')[_0x55c971(0x156)](_0x38533d)):()=>!0x1;}
|