@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251209.0 → 0.0.0-nightly-20251210.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/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 _0x1b7e05,ObservableMixin as _0x5174fc}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x4dbe7f}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x2d525e}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2ef1c0}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x30ceb4}from'../../utils/uploadutils.js';import{getImageUrls as _0x140580,getImageDimension as _0x41171a}from'../../utils/editingutils.js';import{isAncestor as _0x540a3f}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5174fc(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1996f3,_0x5d7b94,_0x2a14b4){super(),this['_editor']=_0x1996f3,this['_dialog']=_0x5d7b94,this['_imageElement']=_0x2a14b4,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 _0xb14d9=this['_imageElement'],_0x483423=_0xb14d9['getAttribute']('uploadcareImageId'),_0x10c63a=_0xb14d9['getAttribute']('src');if(_0x483423)await this['_loadImageInfo'](_0x483423,_0x10c63a);else{if(this['_imageCache']['has'](_0x10c63a)){const _0x5539e6=this['_imageCache']['get'](_0x10c63a);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5539e6['url'],this['imageDimension']=_0x5539e6['dimension'],this['imageId']=_0x5539e6['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x152241}=this['_editor'],t=_0x152241['t'],_0x4419e7=new _0x2ef1c0(_0x152241,this['imageStatus'],this['_attributes']);_0x4419e7['bind']('status')['to'](this,'imageStatus'),_0x4419e7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4419e7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4419e7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4419e7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2d525e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4419e7,'position':_0x4dbe7f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4419e7['focus']();},'onHide':()=>{_0x4419e7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2ef670=>!_0x540a3f(_0x2ef670,_0x4419e7['element'])}});}['_loadImageInfo'](_0x3159c4,_0x559098){return _0x30ceb4['getInfo'](_0x3159c4,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x361f34=>{const {width:_0x27327c,height:_0x422856}=_0x361f34['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x559098,this['imageDimension']={'width':_0x27327c,'height':_0x422856},this['imageId']=_0x3159c4;})['catch'](_0xd42c30=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xd42c30['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x33c494,_0x11764e){return this['_getImageAsFile'](_0x33c494)['then'](_0x4bbe62=>_0x30ceb4['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':_0x11764e['signal'],'file':_0x4bbe62,'onProgress':_0x3199c0=>{_0x3199c0&&_0x3199c0['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3199c0['value']));}}))['then'](_0xfc0f8a=>{const {width:_0x229509,height:_0x208501}=_0xfc0f8a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xfc0f8a['cdnUrl'],this['imageDimension']={'width':_0x229509,'height':_0x208501},this['imageId']=_0xfc0f8a['uuid'],this['imageUploadProgress']=null;const _0x5a40fa=_0x33c494['getAttribute']('src');this['_imageCache']['set'](_0x5a40fa,{'id':_0xfc0f8a['uuid'],'url':_0xfc0f8a['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4bc91b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4bc91b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x46139d,_0x99b1f7){_0x46139d['on']('apply',(_0x21fe5f,_0x552a82)=>{this['_replaceImage'](_0x99b1f7,_0x552a82['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x46139d['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x46139d['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4b54c7,_0x50f305,_0x266ab5){const _0x457f11=this['_editor'],{width:_0x9f24a5,height:_0x2c42fd}=_0x41171a(_0x50f305,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1a3925,imageSources:_0x25dff4}=_0x140580(_0x50f305,_0x9f24a5);_0x457f11['model']['change'](_0x1c70bd=>{if('$graveyard'===_0x4b54c7['root']['rootName']){_0x457f11['execute']('insertImage',{'imageType':_0x4b54c7['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4b54c7['getAttributes']()),'uploadcareImageId':_0x266ab5,'src':_0x1a3925,'sources':_0x25dff4,'width':_0x9f24a5,'height':_0x2c42fd}});const _0x2b01d6=_0x4b54c7['getChildren']();_0x4b54c7=_0x457f11['model']['document']['selection']['getSelectedElement']();for(const _0x557bf8 of _0x2b01d6)_0x1c70bd['append'](_0x1c70bd['cloneElement'](_0x557bf8),_0x4b54c7);}else _0x1c70bd['setSelection'](_0x4b54c7,'on'),_0x457f11['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4b54c7['getAttributes']()),'uploadcareImageId':_0x266ab5,'src':_0x1a3925,'sources':_0x25dff4,'width':_0x9f24a5,'height':_0x2c42fd},_0x4b54c7);_0x1c70bd['setSelection'](_0x4b54c7,'on');});}async['_getImageAsFile'](_0x4f5582){const _0x351357=_0x1b7e05['window'],_0xed350=_0x1b7e05['document']['location']['href'],_0x4d9148=new _0x351357['URL'](_0x4f5582['getAttribute']('src'),_0xed350);if('data:'===_0x4d9148['protocol']){const _0xe2b598=_0x4d9148['href']['split'](','),_0xb8308b=_0xe2b598[0x0]['match'](/:(.*?);/)[0x1],_0x444319=_0xb8308b['split']('/')[0x1],_0x58011e=_0x351357['atob'](_0xe2b598[_0xe2b598['length']-0x1]);let _0x3046df=_0x58011e['length'];const _0x185af9=new _0x351357['Uint8Array'](_0x3046df);for(;_0x3046df--;)_0x185af9[_0x3046df]=_0x58011e['charCodeAt'](_0x3046df);return new _0x351357['File']([_0x185af9],'image.'+_0x444319,{'type':_0xb8308b});}const _0x3cf716=_0x4d9148['href']['split']('/'),_0x20475b=_0x3cf716[_0x3cf716['length']-0x1],_0x21c400=_0x20475b['split']('.')[0x1];return _0x351357['fetch'](_0x4d9148['href'])['then'](_0x109743=>_0x109743['clone']()['blob']())['then'](_0x431520=>new _0x351357['File']([_0x431520],_0x20475b,{'type':'image/'+_0x21c400}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x1e24(){const _0x51b9cf=['bindTemplate','452534bgzkDp','543760WyRmfo','3bJrhHD','6399045pVgeBn','9431933oBUYle','2805360ghWorD','set','131034EWMHRr','image-edit','7621200flOGez','ck-uploadcare-theme','uc-cloud-image-editor','imageSrc','setTemplate','uc-light'];_0x1e24=function(){return _0x51b9cf;};return _0x1e24();}(function(_0x3efca2,_0x2bac95){const _0x667a4e=_0x5e93,_0x37415c=_0x3efca2();while(!![]){try{const _0x4f1c93=-parseInt(_0x667a4e(0x147))/0x1+parseInt(_0x667a4e(0x13e))/0x2*(parseInt(_0x667a4e(0x139))/0x3)+-parseInt(_0x667a4e(0x138))/0x4+parseInt(_0x667a4e(0x13a))/0x5+-parseInt(_0x667a4e(0x13c))/0x6+parseInt(_0x667a4e(0x13b))/0x7+-parseInt(_0x667a4e(0x140))/0x8;if(_0x4f1c93===_0x2bac95)break;else _0x37415c['push'](_0x37415c['shift']());}catch(_0x58692e){_0x37415c['push'](_0x37415c['shift']());}}}(_0x1e24,0xa701d));import{View as _0x11d7e7}from'ckeditor5/src/ui.js';function _0x5e93(_0x28ee54,_0xf07dc3){const _0x1e244b=_0x1e24();return _0x5e93=function(_0x5e932b,_0x226bf1){_0x5e932b=_0x5e932b-0x138;let _0x4ebe76=_0x1e244b[_0x5e932b];return _0x4ebe76;},_0x5e93(_0x28ee54,_0xf07dc3);}export class UploadcareImageEditFormEditingView extends _0x11d7e7{constructor(_0x2929af,_0x52524b){const _0x41769b=_0x5e93;super(_0x2929af);const _0x4f4cf2=this[_0x41769b(0x146)];this[_0x41769b(0x13d)](_0x41769b(0x143),''),this[_0x41769b(0x144)]({'tag':_0x41769b(0x142),'attributes':{..._0x52524b,'class':[_0x41769b(0x145),_0x41769b(0x141)],'ctx-name':_0x41769b(0x13f),'cdn-url':_0x4f4cf2['to'](_0x41769b(0x143))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x291496}from'ckeditor5/src/icons.js';import{ButtonView as _0x31f964,IconView as _0x536529,View as _0x50415c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x50415c{constructor(_0x3b6c39){super(_0x3b6c39);const t=_0x3b6c39['t'];this['set']('errorType',null);const _0x4821c9=new _0x31f964(_0x3b6c39);_0x4821c9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4821c9['withText']=!0x0,_0x4821c9['class']='ck-button-action',_0x4821c9['on']('execute',()=>{this['fire']('retry');}),_0x4821c9['bind']('isVisible')['to'](this,'errorType',_0x82b129=>'NotFound'!==_0x82b129);const _0x2256eb=new _0x536529();_0x2256eb['content']=_0x291496,_0x2256eb['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x33b0e3=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':[_0x2256eb,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x33b0e3['to']('errorType',_0x4ba346=>t('NotFound'!==_0x4ba346?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4821c9]},{'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 _0x324d53,View as _0x3a6737}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x3a6737{constructor(_0x2637cb){super(_0x2637cb);const t=_0x2637cb['t'],_0x1bfdd7=this['bindTemplate'],_0x4362af=new _0x324d53();_0x4362af['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':[_0x4362af,{'text':_0x1bfdd7['to']('imageUploadProgress',_0x482dea=>t('Loading\x20image...')+'\x20('+(_0x482dea||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 _0x50e03c=_0x4e6f;(function(_0x142045,_0x31e21f){const _0x250446=_0x4e6f,_0x1dae92=_0x142045();while(!![]){try{const _0x406808=parseInt(_0x250446(0x191))/0x1*(parseInt(_0x250446(0x1a0))/0x2)+parseInt(_0x250446(0x186))/0x3+parseInt(_0x250446(0x17d))/0x4+-parseInt(_0x250446(0x17c))/0x5*(parseInt(_0x250446(0x19d))/0x6)+parseInt(_0x250446(0x182))/0x7*(parseInt(_0x250446(0x17e))/0x8)+parseInt(_0x250446(0x174))/0x9+-parseInt(_0x250446(0x18b))/0xa*(parseInt(_0x250446(0x17a))/0xb);if(_0x406808===_0x31e21f)break;else _0x1dae92['push'](_0x1dae92['shift']());}catch(_0x5ab423){_0x1dae92['push'](_0x1dae92['shift']());}}}(_0x4f22,0xd87ff));function _0x4f22(){const _0x2eec3e=['_items','addMany','target','status','setTemplate','createCollection','filter','_errorView','length','observe','focus','3053880GnIvVn','element','apply','disconnect','uploading','detail','44FJgtIy','addEventListener','5EusklI','6289640watZDl','16tvcsjF','once','toLowerCase','fire','4305098IRofBn','_waitForImageEditorComponent','cdnUrl','set','601008ndcGto','_focusableView','cancel','_addErrorViewListeners','getFocusableElement','5743660wUWqqA','div','_setView','add','ready','querySelector','1lzcjhY','_addUploadcareImageEditorListeners','clear','_editingView','_loadingView','render','addedNodes','uc-cloud-image-editor','error','retry','ck-uploadcare-form','nodeName','6300396yvtVZJ','change:status','ck-reset_all-excluded','1784438smDmmd'];_0x4f22=function(){return _0x2eec3e;};return _0x4f22();}import{View as _0x3f12dc}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x38b0cd}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x1c8300}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x469fa9}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x4051cb}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';function _0x4e6f(_0xd3ce0,_0x1a206b){const _0x4f22c9=_0x4f22();return _0x4e6f=function(_0x4e6fca,_0x27e463){_0x4e6fca=_0x4e6fca-0x16a;let _0x535421=_0x4f22c9[_0x4e6fca];return _0x535421;},_0x4e6f(_0xd3ce0,_0x1a206b);}export class UploadcareImageEditFormView extends _0x4051cb{[_0x50e03c(0x1a1)];[_0x50e03c(0x195)];[_0x50e03c(0x170)];[_0x50e03c(0x194)];[_0x50e03c(0x187)];constructor(_0x1da076,_0x44ab8f,_0x311816){const _0x530157=_0x50e03c;super(_0x1da076),this[_0x530157(0x1a1)]=this[_0x530157(0x16e)](),this[_0x530157(0x195)]=new _0x38b0cd(_0x1da076),this[_0x530157(0x170)]=new _0x1c8300(_0x1da076),this[_0x530157(0x194)]=new _0x469fa9(_0x1da076,_0x311816),this[_0x530157(0x187)]=new _0x3f12dc(_0x1da076),this[_0x530157(0x187)][_0x530157(0x16d)](this[_0x530157(0x18a)]()),this[_0x530157(0x185)](_0x530157(0x16c),_0x44ab8f),this[_0x530157(0x16d)]({'tag':_0x530157(0x18c),'attributes':{'class':['ck',_0x530157(0x19f),_0x530157(0x19b)],'tabindex':'-1'},'children':this[_0x530157(0x1a1)]}),this[_0x530157(0x18d)](),this[_0x530157(0x17f)](_0x530157(0x196),()=>{const _0x44f54c=_0x530157;this[_0x44f54c(0x183)](this[_0x44f54c(0x175)],_0x22a6a6=>{const _0xbebf31=_0x44f54c;this[_0xbebf31(0x192)](_0x22a6a6);});}),this['on'](_0x530157(0x19e),()=>{const _0x447cb4=_0x530157;this[_0x447cb4(0x18d)]();}),this[_0x530157(0x189)]();}[_0x50e03c(0x173)](){const _0x4dd4ee=_0x50e03c;this[_0x4dd4ee(0x175)][_0x4dd4ee(0x173)]();}[_0x50e03c(0x18d)](){const _0x194ba8=_0x50e03c;switch(this[_0x194ba8(0x1a1)][_0x194ba8(0x193)](),this[_0x194ba8(0x16c)]){case _0x194ba8(0x178):this[_0x194ba8(0x1a1)][_0x194ba8(0x18e)](this[_0x194ba8(0x195)]);break;case _0x194ba8(0x199):this[_0x194ba8(0x1a1)][_0x194ba8(0x18e)](this[_0x194ba8(0x170)]);break;case _0x194ba8(0x18f):this[_0x194ba8(0x1a1)][_0x194ba8(0x16a)]([this[_0x194ba8(0x194)],this[_0x194ba8(0x187)]]);}}[_0x50e03c(0x183)](_0x548b6e,_0x5bf5cf){const _0x36ef1f=_0x50e03c,_0x32b8a0=_0x36ef1f(0x198),_0x1d9241=_0x548b6e[_0x36ef1f(0x190)](_0x32b8a0);if(_0x1d9241)return _0x5bf5cf(_0x1d9241);const _0x1e2531=new MutationObserver(_0x5b8e47=>{const _0x4425d7=_0x36ef1f,_0x13e187=_0x5b8e47[_0x4425d7(0x16f)](_0xbb12a2=>_0xbb12a2[_0x4425d7(0x16b)]===_0x548b6e&&_0xbb12a2[_0x4425d7(0x197)][_0x4425d7(0x171)]>0x0&&_0xbb12a2[_0x4425d7(0x197)][0x0][_0x4425d7(0x19c)][_0x4425d7(0x180)]()===_0x32b8a0);_0x13e187[_0x4425d7(0x171)]&&(_0x1e2531[_0x4425d7(0x177)](),_0x5bf5cf(_0x13e187[0x0][_0x4425d7(0x197)][0x0]));});_0x1e2531[_0x36ef1f(0x172)](_0x548b6e,{'childList':!0x0,'subtree':!0x0});}[_0x50e03c(0x192)](_0xcadfc0){const _0x32de87=_0x50e03c;_0xcadfc0[_0x32de87(0x17b)](_0x32de87(0x176),_0x226885=>{const _0x3a2327=_0x32de87;this[_0x3a2327(0x181)](_0x3a2327(0x176),{'imageSrc':_0x226885[_0x3a2327(0x179)][_0x3a2327(0x184)]});}),_0xcadfc0[_0x32de87(0x17b)](_0x32de87(0x188),()=>{const _0x5cdd87=_0x32de87;this[_0x5cdd87(0x181)](_0x5cdd87(0x188));});}[_0x50e03c(0x189)](){const _0x412c30=_0x50e03c;this[_0x412c30(0x170)]['on'](_0x412c30(0x19a),()=>{const _0xbee2b0=_0x412c30;this[_0xbee2b0(0x181)](_0xbee2b0(0x19a));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x24324a=_0x3328;(function(_0x28c582,_0x312a30){const _0x504850=_0x3328,_0x42eb97=_0x28c582();while(!![]){try{const _0x3f6266=parseInt(_0x504850(0x122))/0x1+parseInt(_0x504850(0x126))/0x2+-parseInt(_0x504850(0x11c))/0x3*(-parseInt(_0x504850(0x123))/0x4)+-parseInt(_0x504850(0x114))/0x5+parseInt(_0x504850(0x10a))/0x6+-parseInt(_0x504850(0x116))/0x7*(-parseInt(_0x504850(0x11b))/0x8)+-parseInt(_0x504850(0x109))/0x9*(parseInt(_0x504850(0x120))/0xa);if(_0x3f6266===_0x312a30)break;else _0x42eb97['push'](_0x42eb97['shift']());}catch(_0x436684){_0x42eb97['push'](_0x42eb97['shift']());}}}(_0x4c58,0xd933b));import{Command as _0x5da5ec}from'ckeditor5/src/core.js';import{Dialog as _0x4a1d58}from'ckeditor5/src/ui.js';function _0x3328(_0x495580,_0x32957f){const _0x4c5856=_0x4c58();return _0x3328=function(_0x332862,_0xaaf04b){_0x332862=_0x332862-0x108;let _0x589331=_0x4c5856[_0x332862];return _0x589331;},_0x3328(_0x495580,_0x32957f);}import{UploadcareImageEditController as _0x2c8da4}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x27ab0b}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x5da5ec{[_0x24324a(0x113)];static get[_0x24324a(0x118)](){return[_0x4a1d58];}[_0x24324a(0x11f)];constructor(_0x4e6e50){const _0x29fead=_0x24324a;super(_0x4e6e50),this[_0x29fead(0x113)]=void 0x0,this[_0x29fead(0x11f)]=_0x27ab0b(_0x4e6e50[_0x29fead(0x11a)][_0x29fead(0x11e)](_0x29fead(0x124))||[]),this[_0x29fead(0x121)]({'isActive':!0x1});}[_0x24324a(0x10e)](){const _0x5c6305=_0x24324a,_0x132fe1=this[_0x5c6305(0x127)][_0x5c6305(0x115)][_0x5c6305(0x10d)][_0x5c6305(0x108)][_0x5c6305(0x10c)]();this[_0x5c6305(0x112)]=this[_0x5c6305(0x11f)](_0x132fe1);}[_0x24324a(0x117)](){const _0xd2c05a=_0x24324a;this[_0xd2c05a(0x113)]&&(this[_0xd2c05a(0x111)](_0xd2c05a(0x125)),this[_0xd2c05a(0x113)]=void 0x0);const _0x589b1f=this[_0xd2c05a(0x127)][_0xd2c05a(0x115)][_0xd2c05a(0x10d)][_0xd2c05a(0x108)][_0xd2c05a(0x10c)]();_0x589b1f&&(_0x589b1f['is'](_0xd2c05a(0x10b),_0xd2c05a(0x110))||_0x589b1f['is'](_0xd2c05a(0x10b),_0xd2c05a(0x11d)))&&(this[_0xd2c05a(0x113)]=new _0x2c8da4(this[_0xd2c05a(0x127)],this[_0xd2c05a(0x127)][_0xd2c05a(0x119)][_0xd2c05a(0x11e)](_0x4a1d58),_0x589b1f),this[_0xd2c05a(0x10f)](_0xd2c05a(0x125))['to'](this[_0xd2c05a(0x113)],_0xd2c05a(0x125)));}}function _0x4c58(){const _0x4d65c3=['bind','imageBlock','unbind','isEnabled','imageEditController','1270355KrcmhZ','model','61607brQWWh','execute','requires','plugins','config','1296DiXgsR','3726702crHXDj','imageInline','get','_isEditable','47010930tCdzMj','set','407871HzWIeQ','4fUTzMp','uploadcare.allowExternalImagesEditing','isActive','3482882KNXAGW','editor','selection','9CXcBzl','6165090ndrdov','element','getSelectedElement','document','refresh'];_0x4c58=function(){return _0x4d65c3;};return _0x4c58();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2fa11c=_0x2e29;(function(_0x5b4e3b,_0x3c1cc1){const _0xf42a5f=_0x2e29,_0x20a9c8=_0x5b4e3b();while(!![]){try{const _0x1f587f=-parseInt(_0xf42a5f(0xf2))/0x1*(-parseInt(_0xf42a5f(0xf9))/0x2)+-parseInt(_0xf42a5f(0xf4))/0x3*(-parseInt(_0xf42a5f(0xfa))/0x4)+-parseInt(_0xf42a5f(0xee))/0x5+parseInt(_0xf42a5f(0x103))/0x6*(parseInt(_0xf42a5f(0xef))/0x7)+-parseInt(_0xf42a5f(0xfd))/0x8+-parseInt(_0xf42a5f(0x104))/0x9*(-parseInt(_0xf42a5f(0x101))/0xa)+-parseInt(_0xf42a5f(0xf8))/0xb*(parseInt(_0xf42a5f(0x102))/0xc);if(_0x1f587f===_0x3c1cc1)break;else _0x20a9c8['push'](_0x20a9c8['shift']());}catch(_0x3688c2){_0x20a9c8['push'](_0x20a9c8['shift']());}}}(_0xe1f6,0xbd462));import{Plugin as _0x105e00}from'ckeditor5/src/core.js';function _0x2e29(_0x53c1ed,_0x26a8f5){const _0xe1f6d2=_0xe1f6();return _0x2e29=function(_0x2e2924,_0x404883){_0x2e2924=_0x2e2924-0xee;let _0x1274b4=_0xe1f6d2[_0x2e2924];return _0x1274b4;},_0x2e29(_0x53c1ed,_0x26a8f5);}import{Notification as _0x59171a}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x432093}from'./uploadcareimageeditcommand.js';function _0xe1f6(){const _0x3ed3c7=['isPremiumPlugin','1123573jtKOlM','422qdKlJu','996NodVcr','uploadcareImageReplace','ImageEditing','8710544WUOxwu','pluginName','add','init','7137060FapqnU','84sfWpHf','77646SBkXFf','9LeapKy','ImageUtils','2116290KcInMs','49ePhpJJ','UploadcareImageEditEditing','requires','6451VvVVyL','uploadcareImageEdit','10083grgGOY','isOfficialPlugin','commands'];_0xe1f6=function(){return _0x3ed3c7;};return _0xe1f6();}import{UploadcareImageReplaceCommand as _0x46042b}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x28b024}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x105e00{static get[_0x2fa11c(0xfe)](){const _0x376a59=_0x2fa11c;return _0x376a59(0xf0);}static get[_0x2fa11c(0xf1)](){const _0x182f57=_0x2fa11c;return[_0x28b024,_0x59171a,_0x182f57(0x105),_0x182f57(0xfc)];}static get[_0x2fa11c(0xf5)](){return!0x0;}static get[_0x2fa11c(0xf7)](){return!0x0;}[_0x2fa11c(0x100)](){const _0x4089bb=_0x2fa11c,{editor:_0x5525c3}=this;_0x5525c3[_0x4089bb(0xf6)][_0x4089bb(0xff)](_0x4089bb(0xf3),new _0x432093(_0x5525c3)),_0x5525c3[_0x4089bb(0xf6)][_0x4089bb(0xff)](_0x4089bb(0xfb),new _0x46042b(_0x5525c3));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5b23e2}from'ckeditor5/src/core.js';import{ButtonView as _0x7d62e3}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x2db2f3}from'ckeditor5/src/icons.js';import{createElement as _0x20f2a0}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 _0x5b23e2{['_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 _0x3980d2=this['editor'];_0x3980d2['ui']['componentFactory']['add']('uploadcareImageEdit',_0x598241=>{const _0x4a1f00=_0x3980d2['commands']['get']('uploadcareImageEdit'),_0x18f9d=new _0x7d62e3(_0x598241),t=_0x598241['t'];return _0x18f9d['set']({'icon':_0x2db2f3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x18f9d['bind']('isEnabled')['to'](_0x4a1f00),_0x18f9d['bind']('isOn')['to'](_0x4a1f00,'isActive'),this['listenTo'](_0x18f9d,'execute',()=>{_0x3980d2['execute']('uploadcareImageEdit'),_0x3980d2['editing']['view']['focus']();}),_0x18f9d;}),this['_initConfig']();}['_initConfig'](){const _0x144268=_0x20f2a0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x144268),this['listenTo'](this['editor'],'destroy',()=>{_0x144268['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x3105(_0x1d94dd,_0x19af37){var _0x4d2911=_0x4d29();return _0x3105=function(_0x31055a,_0x301070){_0x31055a=_0x31055a-0x1cc;var _0x936c57=_0x4d2911[_0x31055a];return _0x936c57;},_0x3105(_0x1d94dd,_0x19af37);}var _0x4991bb=_0x3105;(function(_0x51f364,_0x580c14){var _0x3db063=_0x3105,_0x3b8926=_0x51f364();while(!![]){try{var _0x15577d=-parseInt(_0x3db063(0x1cf))/0x1+-parseInt(_0x3db063(0x1d4))/0x2+parseInt(_0x3db063(0x1d8))/0x3+-parseInt(_0x3db063(0x1d6))/0x4*(-parseInt(_0x3db063(0x1d0))/0x5)+-parseInt(_0x3db063(0x1ce))/0x6+-parseInt(_0x3db063(0x1db))/0x7+parseInt(_0x3db063(0x1d2))/0x8;if(_0x15577d===_0x580c14)break;else _0x3b8926['push'](_0x3b8926['shift']());}catch(_0x4c9124){_0x3b8926['push'](_0x3b8926['shift']());}}}(_0x4d29,0x5573f));function _0x4d29(){var _0x2e6458=['true','1267128QnKHsu','68205rSeRvz','575mOquvq','focusCycler','12102576UGkHdM','div','1315986zpQFTG','createCollection','4040vJUzJi','focusTracker','430260nyTcUI','bindTemplate','fire','3394937JPqkpt','forwardCycle','getFocusableElement'];_0x4d29=function(){return _0x2e6458;};return _0x4d29();}import{FocusTracker as _0x13e072}from'ckeditor5/src/utils.js';import{View as _0x4f4afd,FocusCycler as _0x106884}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x4f4afd{[_0x4991bb(0x1d7)];[_0x4991bb(0x1d1)];constructor(_0x12edcc){var _0x3294f1=_0x4991bb;super(_0x12edcc),this[_0x3294f1(0x1d7)]=new _0x13e072(),this[_0x3294f1(0x1d1)]=new _0x106884({'focusables':this[_0x3294f1(0x1d5)](),'focusTracker':this[_0x3294f1(0x1d7)]});}[_0x4991bb(0x1cc)](){var _0x36807a=_0x4991bb;return{'tag':_0x36807a(0x1d3),'attributes':{'aria-hidden':_0x36807a(0x1cd),'tabindex':'0'},'on':{'focus':this[_0x36807a(0x1d9)]['to'](()=>{var _0x215ae3=_0x36807a;this[_0x215ae3(0x1d1)][_0x215ae3(0x1da)](_0x215ae3(0x1dc));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x537783,_0x273408){const _0x65d59d=_0x38a7,_0x84efa6=_0x537783();while(!![]){try{const _0x4bb6d4=parseInt(_0x65d59d(0xf3))/0x1*(-parseInt(_0x65d59d(0xf9))/0x2)+-parseInt(_0x65d59d(0xe7))/0x3+-parseInt(_0x65d59d(0xf0))/0x4+-parseInt(_0x65d59d(0xe5))/0x5+parseInt(_0x65d59d(0xdb))/0x6*(-parseInt(_0x65d59d(0x10e))/0x7)+parseInt(_0x65d59d(0xdc))/0x8+-parseInt(_0x65d59d(0xf5))/0x9*(-parseInt(_0x65d59d(0xe2))/0xa);if(_0x4bb6d4===_0x273408)break;else _0x84efa6['push'](_0x84efa6['shift']());}catch(_0x1a18b3){_0x84efa6['push'](_0x84efa6['shift']());}}}(_0x3f40,0x266d3));import{global as _0x3af3e0,DomEmitterMixin as _0x1fedae}from'ckeditor5/src/utils.js';function _0x38a7(_0x33405e,_0x41a4da){const _0x3f4027=_0x3f40();return _0x38a7=function(_0x38a77a,_0x10073d){_0x38a77a=_0x38a77a-0xd6;let _0x245a8e=_0x3f4027[_0x38a77a];return _0x245a8e;},_0x38a7(_0x33405e,_0x41a4da);}export function createEditabilityChecker(_0x517fa7){const _0x39657a=_0x38a7,_0x3f863a=G(_0x517fa7);return _0x24526e=>!(!_0x24526e||!_0x24526e['is'](_0x39657a(0xd9),_0x39657a(0xfa))&&!_0x24526e['is'](_0x39657a(0xd9),_0x39657a(0xe1)))&&(!!_0x24526e[_0x39657a(0x105)](_0x39657a(0xe3))||!!_0x24526e[_0x39657a(0x105)](_0x39657a(0xe0))&&_0x3f863a(_0x24526e[_0x39657a(0x10c)](_0x39657a(0xe0))));}function _0x3f40(){const _0x40898b=['982ogvdaU','mapper','2457TkhZaf','isArray','origin','toViewElement','274mAJkRi','imageBlock','width','x/\x20','px)\x20100vw,\x20','(max-width:\x20','document','view','window','image/webp','location','image-processing','hasAttribute','removeStyle','replace','load','join','filter','findViewImgElement','getAttribute','addClass','14BjfGIq','editing','change','stopListening','element','domConverter','664572yvIfEK','1482552ESqQoc','baseURI','/-/resize/','height','src','imageInline','32570IhoXUX','uploadcareImageId','removeClass','718560oSTwur','match','833115spBNXY','ImageUtils','viewToDom','plugins','map','some','aspect-ratio','function','setStyle','558440nkjtSp','listenTo','get'];_0x3f40=function(){return _0x40898b;};return _0x3f40();}export function getImageUrls(_0x194ffe,_0x412dbd){const _0x17af5a=_0x38a7,_0x499425=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x17af5a(0x10a)](_0x3eb5da=>_0x3eb5da<=_0x412dbd)[_0x17af5a(0xeb)](_0x37f3e6=>_0x194ffe[_0x17af5a(0x107)](/\/$/,'')+_0x17af5a(0xde)+_0x37f3e6+_0x17af5a(0xfc)+_0x37f3e6+'w');return{'imageFallbackUrl':_0x194ffe,'imageSources':[{'srcset':_0x499425[_0x17af5a(0x109)](',\x20'),'sizes':_0x17af5a(0xfe)+_0x412dbd+_0x17af5a(0xfd)+_0x412dbd+'px','type':_0x17af5a(0x102)}]};}export function getImageDimension(_0x5daa34,_0x11f15a,_0x3560fc){const _0x1af404=_0x38a7,_0x39da90=_0x5daa34[_0x1af404(0xe6)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x39da90?parseInt(_0x39da90[0x1],0xa):_0x11f15a,'height':_0x39da90?parseInt(_0x39da90[0x2],0xa):_0x3560fc};}export function showImageProcessingIndicator(_0x3f4cba,_0x366c2a){const _0x947c7f=_0x38a7,_0x5e927d=new(_0x1fedae())(),_0x2bd742=_0x3f4cba[_0x947c7f(0xea)][_0x947c7f(0xf2)](_0x947c7f(0xe8)),_0x1d2545=_0x3f4cba[_0x947c7f(0xd6)][_0x947c7f(0xf4)][_0x947c7f(0xf8)](_0x366c2a),_0x2287fb=_0x2bd742[_0x947c7f(0x10b)](_0x1d2545),_0x4b0c9b=_0x3f4cba[_0x947c7f(0xd6)][_0x947c7f(0x100)][_0x947c7f(0xda)][_0x947c7f(0xe9)](_0x2287fb),_0x4d3f21=_0x366c2a[_0x947c7f(0x10c)](_0x947c7f(0xfb)),_0x42ddb0=_0x366c2a[_0x947c7f(0x10c)](_0x947c7f(0xdf)),_0x56b227=_0x947c7f(0x104);_0x3f4cba[_0x947c7f(0xd6)][_0x947c7f(0x100)][_0x947c7f(0xd7)](_0x532d54=>{const _0x1139b7=_0x947c7f;_0x532d54[_0x1139b7(0x10d)](_0x56b227,_0x1d2545),_0x532d54[_0x1139b7(0xef)](_0x1139b7(0xed),_0x4d3f21+'/'+_0x42ddb0,_0x2287fb);}),_0x5e927d[_0x947c7f(0xf1)](_0x4b0c9b,_0x947c7f(0x108),()=>{const _0x32d9d3=_0x947c7f;_0x5e927d[_0x32d9d3(0xd8)](_0x4b0c9b,_0x32d9d3(0x108)),_0x3f4cba[_0x32d9d3(0xd6)][_0x32d9d3(0x100)][_0x32d9d3(0xd7)](_0x48d697=>{const _0x2004c6=_0x32d9d3;_0x48d697[_0x2004c6(0xe4)](_0x56b227,_0x1d2545),_0x48d697[_0x2004c6(0x106)](_0x2004c6(0xed),_0x2287fb);});});}function G(_0x456bd4){const _0x4d1e82=_0x38a7;if(Array[_0x4d1e82(0xf6)](_0x456bd4)){const _0x4c8de7=_0x456bd4[_0x4d1e82(0xeb)](G);return _0x4c3a91=>_0x4c8de7[_0x4d1e82(0xec)](_0xa44ee2=>_0xa44ee2(_0x4c3a91));}if(_0x4d1e82(0xf7)==_0x456bd4){const _0x4e00bc=_0x3af3e0[_0x4d1e82(0x101)][_0x4d1e82(0x103)][_0x4d1e82(0xf7)];return _0x524b68=>new URL(_0x524b68,_0x3af3e0[_0x4d1e82(0xff)][_0x4d1e82(0xdd)])[_0x4d1e82(0xf7)]==_0x4e00bc;}return _0x4d1e82(0xee)==typeof _0x456bd4?_0x456bd4:_0x456bd4 instanceof RegExp?_0x44fc0d=>!(!_0x44fc0d[_0x4d1e82(0xe6)](_0x456bd4)&&!_0x44fc0d[_0x4d1e82(0x107)](/^https?:\/\//,'')[_0x4d1e82(0xe6)](_0x456bd4)):()=>!0x1;}
|