@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251121.0 → 0.0.0-nightly-20251122.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 _0x2a0412,ObservableMixin as _0x2c8185}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x4c46fa}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x269afb}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4c73e5}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x5ee73b}from'../../utils/uploadutils.js';import{getImageUrls as _0x39cd4d,getImageDimension as _0x86d473}from'../../utils/editingutils.js';import{isAncestor as _0x132c6d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2c8185(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3a69ee,_0x2384e0,_0x87e343){super(),this['_editor']=_0x3a69ee,this['_dialog']=_0x2384e0,this['_imageElement']=_0x87e343,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 _0x1b3be0=this['_imageElement'],_0x2e23a8=_0x1b3be0['getAttribute']('uploadcareImageId'),_0x5d84aa=_0x1b3be0['getAttribute']('src');if(_0x2e23a8)await this['_loadImageInfo'](_0x2e23a8,_0x5d84aa);else{if(this['_imageCache']['has'](_0x5d84aa)){const _0x1d6d13=this['_imageCache']['get'](_0x5d84aa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d6d13['url'],this['imageDimension']=_0x1d6d13['dimension'],this['imageId']=_0x1d6d13['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4f47da}=this['_editor'],t=_0x4f47da['t'],_0x5d093d=new _0x4c73e5(_0x4f47da,this['imageStatus'],this['_attributes']);_0x5d093d['bind']('status')['to'](this,'imageStatus'),_0x5d093d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5d093d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5d093d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5d093d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x269afb,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5d093d,'position':_0x4c46fa['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5d093d['focus']();},'onHide':()=>{_0x5d093d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5aee81=>!_0x132c6d(_0x5aee81,_0x5d093d['element'])}});}['_loadImageInfo'](_0x2fb402,_0x168808){return _0x5ee73b['getInfo'](_0x2fb402,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x37e72d=>{const {width:_0x200889,height:_0x4434c6}=_0x37e72d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x168808,this['imageDimension']={'width':_0x200889,'height':_0x4434c6},this['imageId']=_0x2fb402;})['catch'](_0x168b0a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x168b0a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x175b9f,_0x1e012a){return this['_getImageAsFile'](_0x175b9f)['then'](_0x441172=>_0x5ee73b['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':_0x1e012a['signal'],'file':_0x441172,'onProgress':_0x1cdd75=>{_0x1cdd75&&_0x1cdd75['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1cdd75['value']));}}))['then'](_0x5073f0=>{const {width:_0xc8ce7c,height:_0x1a66bd}=_0x5073f0['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5073f0['cdnUrl'],this['imageDimension']={'width':_0xc8ce7c,'height':_0x1a66bd},this['imageId']=_0x5073f0['uuid'],this['imageUploadProgress']=null;const _0x27b04c=_0x175b9f['getAttribute']('src');this['_imageCache']['set'](_0x27b04c,{'id':_0x5073f0['uuid'],'url':_0x5073f0['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2e54ca=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2e54ca['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2422b7,_0x4664e0){_0x2422b7['on']('apply',(_0x3835e5,_0x4b733d)=>{this['_replaceImage'](_0x4664e0,_0x4b733d['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2422b7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2422b7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x12f4a6,_0x58ff69,_0x46fbc8){const _0x4a60f2=this['_editor'],{width:_0x48a222,height:_0x12acb5}=_0x86d473(_0x58ff69,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x635637,imageSources:_0x543632}=_0x39cd4d(_0x58ff69,_0x48a222);_0x4a60f2['model']['change'](_0x1c2535=>{if('$graveyard'===_0x12f4a6['root']['rootName']){_0x4a60f2['execute']('insertImage',{'imageType':_0x12f4a6['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x12f4a6['getAttributes']()),'uploadcareImageId':_0x46fbc8,'src':_0x635637,'sources':_0x543632,'width':_0x48a222,'height':_0x12acb5}});const _0x53686b=_0x12f4a6['getChildren']();_0x12f4a6=_0x4a60f2['model']['document']['selection']['getSelectedElement']();for(const _0x1c2825 of _0x53686b)_0x1c2535['append'](_0x1c2535['cloneElement'](_0x1c2825),_0x12f4a6);}else _0x1c2535['setSelection'](_0x12f4a6,'on'),_0x4a60f2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x12f4a6['getAttributes']()),'uploadcareImageId':_0x46fbc8,'src':_0x635637,'sources':_0x543632,'width':_0x48a222,'height':_0x12acb5},_0x12f4a6);_0x1c2535['setSelection'](_0x12f4a6,'on');});}async['_getImageAsFile'](_0x35e609){const _0x122b70=_0x2a0412['window'],_0x3d8444=_0x2a0412['document']['location']['href'],_0xb9ad50=new _0x122b70['URL'](_0x35e609['getAttribute']('src'),_0x3d8444);if('data:'===_0xb9ad50['protocol']){const _0x31e9ee=_0xb9ad50['href']['split'](','),_0x295509=_0x31e9ee[0x0]['match'](/:(.*?);/)[0x1],_0x377212=_0x295509['split']('/')[0x1],_0x82782c=_0x122b70['atob'](_0x31e9ee[_0x31e9ee['length']-0x1]);let _0x392537=_0x82782c['length'];const _0x409284=new _0x122b70['Uint8Array'](_0x392537);for(;_0x392537--;)_0x409284[_0x392537]=_0x82782c['charCodeAt'](_0x392537);return new _0x122b70['File']([_0x409284],'image.'+_0x377212,{'type':_0x295509});}const _0x3db12f=_0xb9ad50['href']['split']('/'),_0x5bae66=_0x3db12f[_0x3db12f['length']-0x1],_0x3b3d06=_0x5bae66['split']('.')[0x1];return _0x122b70['fetch'](_0xb9ad50['href'])['then'](_0x2d4ca3=>_0x2d4ca3['clone']()['blob']())['then'](_0x2f0e5a=>new _0x122b70['File']([_0x2f0e5a],_0x5bae66,{'type':'image/'+_0x3b3d06}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x3795(){const _0x11984a=['26196iMlCbP','image-edit','524130SJRpiA','436469zlNjiZ','4355135dHOVSP','2YDjSkH','set','uc-light','imageSrc','ck-uploadcare-theme','198029SntKMK','840oEleQE','uc-cloud-image-editor','setTemplate','68457AGUOIG','413824yqoDKp','144EDxzcK','12ZNCIku','6yIXCTL','4169mNFsVr','bindTemplate','14GjxxAO'];_0x3795=function(){return _0x11984a;};return _0x3795();}(function(_0x5a6064,_0x1ba622){const _0x4083ac=_0xb568,_0x2d0f7e=_0x5a6064();while(!![]){try{const _0x3640df=parseInt(_0x4083ac(0x1a3))/0x1*(parseInt(_0x4083ac(0x1a5))/0x2)+parseInt(_0x4083ac(0x198))/0x3*(-parseInt(_0x4083ac(0x19b))/0x4)+-parseInt(_0x4083ac(0x1a4))/0x5*(-parseInt(_0x4083ac(0x19c))/0x6)+parseInt(_0x4083ac(0x19f))/0x7*(parseInt(_0x4083ac(0x199))/0x8)+-parseInt(_0x4083ac(0x19a))/0x9*(-parseInt(_0x4083ac(0x1a2))/0xa)+-parseInt(_0x4083ac(0x19d))/0xb*(parseInt(_0x4083ac(0x1a0))/0xc)+-parseInt(_0x4083ac(0x1aa))/0xd*(parseInt(_0x4083ac(0x1ab))/0xe);if(_0x3640df===_0x1ba622)break;else _0x2d0f7e['push'](_0x2d0f7e['shift']());}catch(_0x23c4e3){_0x2d0f7e['push'](_0x2d0f7e['shift']());}}}(_0x3795,0x6b5d6));import{View as _0x38cef8}from'ckeditor5/src/ui.js';function _0xb568(_0x4db589,_0x27a89c){const _0x3795c9=_0x3795();return _0xb568=function(_0xb568ad,_0x2ec944){_0xb568ad=_0xb568ad-0x198;let _0x2c4a7f=_0x3795c9[_0xb568ad];return _0x2c4a7f;},_0xb568(_0x4db589,_0x27a89c);}export class UploadcareImageEditFormEditingView extends _0x38cef8{constructor(_0x5672fd,_0x5e0713){const _0x287aa3=_0xb568;super(_0x5672fd);const _0x369e06=this[_0x287aa3(0x19e)];this[_0x287aa3(0x1a6)](_0x287aa3(0x1a8),''),this[_0x287aa3(0x1ad)]({'tag':_0x287aa3(0x1ac),'attributes':{..._0x5e0713,'class':[_0x287aa3(0x1a7),_0x287aa3(0x1a9)],'ctx-name':_0x287aa3(0x1a1),'cdn-url':_0x369e06['to'](_0x287aa3(0x1a8))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4d1836}from'ckeditor5/src/icons.js';import{ButtonView as _0x421073,IconView as _0x1c4aba,View as _0x1ec44a}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1ec44a{constructor(_0x30f85b){super(_0x30f85b);const t=_0x30f85b['t'];this['set']('errorType',null);const _0x44656c=new _0x421073(_0x30f85b);_0x44656c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x44656c['withText']=!0x0,_0x44656c['class']='ck-button-action',_0x44656c['on']('execute',()=>{this['fire']('retry');}),_0x44656c['bind']('isVisible')['to'](this,'errorType',_0x4c4812=>'NotFound'!==_0x4c4812);const _0x31c105=new _0x1c4aba();_0x31c105['content']=_0x4d1836,_0x31c105['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xb44d16=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':[_0x31c105,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xb44d16['to']('errorType',_0x26b60e=>t('NotFound'!==_0x26b60e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x44656c]},{'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 _0x19185a,View as _0x37c5c6}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x37c5c6{constructor(_0x1e17a9){super(_0x1e17a9);const t=_0x1e17a9['t'],_0x16e4cb=this['bindTemplate'],_0x2f0f61=new _0x19185a();_0x2f0f61['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':[_0x2f0f61,{'text':_0x16e4cb['to']('imageUploadProgress',_0x24e939=>t('Loading\x20image...')+'\x20('+(_0x24e939||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 _0x124c40=_0xdec2;(function(_0x3309e5,_0x3a4611){const _0x2ef983=_0xdec2,_0xb5fd67=_0x3309e5();while(!![]){try{const _0x1e1550=-parseInt(_0x2ef983(0xcb))/0x1+-parseInt(_0x2ef983(0xac))/0x2+-parseInt(_0x2ef983(0xc7))/0x3*(-parseInt(_0x2ef983(0xcd))/0x4)+-parseInt(_0x2ef983(0xab))/0x5+-parseInt(_0x2ef983(0x9e))/0x6+-parseInt(_0x2ef983(0xa5))/0x7+parseInt(_0x2ef983(0xc8))/0x8;if(_0x1e1550===_0x3a4611)break;else _0xb5fd67['push'](_0xb5fd67['shift']());}catch(_0x331eae){_0xb5fd67['push'](_0xb5fd67['shift']());}}}(_0xde3e,0x7e4b9));import{View as _0x5d32f5}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x596e0a}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x6f4559}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x58629}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x48b37f}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';function _0xdec2(_0x348d1e,_0x43866c){const _0xde3e66=_0xde3e();return _0xdec2=function(_0xdec22,_0x13bcd1){_0xdec22=_0xdec22-0x9c;let _0x2bd205=_0xde3e66[_0xdec22];return _0x2bd205;},_0xdec2(_0x348d1e,_0x43866c);}function _0xde3e(){const _0x81de2=['detail','299836HOCItP','ck-reset_all-excluded','toLowerCase','ready','nodeName','_focusableView','5280798DAJbat','render','error','clear','setTemplate','target','_errorView','4592567kANrLe','addEventListener','add','getFocusableElement','status','div','1965330CoMMeI','388446elBosA','uc-cloud-image-editor','querySelector','addedNodes','_loadingView','length','element','uploading','_addErrorViewListeners','change:status','_setView','retry','apply','filter','set','createCollection','focus','fire','observe','_items','addMany','_addUploadcareImageEditorListeners','cdnUrl','cancel','disconnect','once','ck-uploadcare-form','36lBrYpc','20728248ydGiqj','_editingView','_waitForImageEditorComponent','849731RtMVmD'];_0xde3e=function(){return _0x81de2;};return _0xde3e();}export class UploadcareImageEditFormView extends _0x48b37f{[_0x124c40(0xbf)];[_0x124c40(0xb0)];[_0x124c40(0xa4)];[_0x124c40(0xc9)];[_0x124c40(0x9d)];constructor(_0x2dfc6c,_0x4934cb,_0x3e3fd3){const _0x2e805d=_0x124c40;super(_0x2dfc6c),this[_0x2e805d(0xbf)]=this[_0x2e805d(0xbb)](),this[_0x2e805d(0xb0)]=new _0x596e0a(_0x2dfc6c),this[_0x2e805d(0xa4)]=new _0x6f4559(_0x2dfc6c),this[_0x2e805d(0xc9)]=new _0x58629(_0x2dfc6c,_0x3e3fd3),this[_0x2e805d(0x9d)]=new _0x5d32f5(_0x2dfc6c),this[_0x2e805d(0x9d)][_0x2e805d(0xa2)](this[_0x2e805d(0xa8)]()),this[_0x2e805d(0xba)](_0x2e805d(0xa9),_0x4934cb),this[_0x2e805d(0xa2)]({'tag':_0x2e805d(0xaa),'attributes':{'class':['ck',_0x2e805d(0xce),_0x2e805d(0xc6)],'tabindex':'-1'},'children':this[_0x2e805d(0xbf)]}),this[_0x2e805d(0xb6)](),this[_0x2e805d(0xc5)](_0x2e805d(0x9f),()=>{const _0x5c1643=_0x2e805d;this[_0x5c1643(0xca)](this[_0x5c1643(0xb2)],_0x197ec2=>{const _0x35d536=_0x5c1643;this[_0x35d536(0xc1)](_0x197ec2);});}),this['on'](_0x2e805d(0xb5),()=>{const _0x12365a=_0x2e805d;this[_0x12365a(0xb6)]();}),this[_0x2e805d(0xb4)]();}[_0x124c40(0xbc)](){const _0x26b579=_0x124c40;this[_0x26b579(0xb2)][_0x26b579(0xbc)]();}[_0x124c40(0xb6)](){const _0x756548=_0x124c40;switch(this[_0x756548(0xbf)][_0x756548(0xa1)](),this[_0x756548(0xa9)]){case _0x756548(0xb3):this[_0x756548(0xbf)][_0x756548(0xa7)](this[_0x756548(0xb0)]);break;case _0x756548(0xa0):this[_0x756548(0xbf)][_0x756548(0xa7)](this[_0x756548(0xa4)]);break;case _0x756548(0xd0):this[_0x756548(0xbf)][_0x756548(0xc0)]([this[_0x756548(0xc9)],this[_0x756548(0x9d)]]);}}[_0x124c40(0xca)](_0x26f32e,_0xb7f196){const _0x28be7b=_0x124c40,_0x4706f3=_0x28be7b(0xad),_0x198a57=_0x26f32e[_0x28be7b(0xae)](_0x4706f3);if(_0x198a57)return _0xb7f196(_0x198a57);const _0x544188=new MutationObserver(_0x3774d8=>{const _0x46f1ad=_0x28be7b,_0x5623a0=_0x3774d8[_0x46f1ad(0xb9)](_0x4e2ffc=>_0x4e2ffc[_0x46f1ad(0xa3)]===_0x26f32e&&_0x4e2ffc[_0x46f1ad(0xaf)][_0x46f1ad(0xb1)]>0x0&&_0x4e2ffc[_0x46f1ad(0xaf)][0x0][_0x46f1ad(0x9c)][_0x46f1ad(0xcf)]()===_0x4706f3);_0x5623a0[_0x46f1ad(0xb1)]&&(_0x544188[_0x46f1ad(0xc4)](),_0xb7f196(_0x5623a0[0x0][_0x46f1ad(0xaf)][0x0]));});_0x544188[_0x28be7b(0xbe)](_0x26f32e,{'childList':!0x0,'subtree':!0x0});}[_0x124c40(0xc1)](_0x3f6227){const _0x42dda1=_0x124c40;_0x3f6227[_0x42dda1(0xa6)](_0x42dda1(0xb8),_0x34a2c2=>{const _0x25966e=_0x42dda1;this[_0x25966e(0xbd)](_0x25966e(0xb8),{'imageSrc':_0x34a2c2[_0x25966e(0xcc)][_0x25966e(0xc2)]});}),_0x3f6227[_0x42dda1(0xa6)](_0x42dda1(0xc3),()=>{const _0x1c9a61=_0x42dda1;this[_0x1c9a61(0xbd)](_0x1c9a61(0xc3));});}[_0x124c40(0xb4)](){const _0x346524=_0x124c40;this[_0x346524(0xa4)]['on'](_0x346524(0xb7),()=>{const _0x3513be=_0x346524;this[_0x3513be(0xbd)](_0x3513be(0xb7));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x353dac=_0x470a;(function(_0xbb8e70,_0x18990b){const _0xc2834e=_0x470a,_0x31a276=_0xbb8e70();while(!![]){try{const _0x3efc61=parseInt(_0xc2834e(0xef))/0x1+-parseInt(_0xc2834e(0xdf))/0x2+-parseInt(_0xc2834e(0xfb))/0x3*(parseInt(_0xc2834e(0xea))/0x4)+-parseInt(_0xc2834e(0xeb))/0x5+-parseInt(_0xc2834e(0xe2))/0x6*(-parseInt(_0xc2834e(0xf0))/0x7)+parseInt(_0xc2834e(0xe6))/0x8*(-parseInt(_0xc2834e(0xe1))/0x9)+parseInt(_0xc2834e(0xdb))/0xa*(parseInt(_0xc2834e(0xf4))/0xb);if(_0x3efc61===_0x18990b)break;else _0x31a276['push'](_0x31a276['shift']());}catch(_0x205e57){_0x31a276['push'](_0x31a276['shift']());}}}(_0x315d,0x5ef0d));import{Command as _0x2abf12}from'ckeditor5/src/core.js';import{Dialog as _0x5a1b6b}from'ckeditor5/src/ui.js';function _0x470a(_0x2dee4b,_0x31f2e2){const _0x315da4=_0x315d();return _0x470a=function(_0x470a95,_0x1378f7){_0x470a95=_0x470a95-0xdb;let _0x379374=_0x315da4[_0x470a95];return _0x379374;},_0x470a(_0x2dee4b,_0x31f2e2);}import{UploadcareImageEditController as _0x508a63}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x57fa3c}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x2abf12{[_0x353dac(0xec)];static get[_0x353dac(0xf8)](){return[_0x5a1b6b];}[_0x353dac(0xf5)];constructor(_0x96b05){const _0x1cc85c=_0x353dac;super(_0x96b05),this[_0x1cc85c(0xec)]=void 0x0,this[_0x1cc85c(0xf5)]=_0x57fa3c(_0x96b05[_0x1cc85c(0xe8)][_0x1cc85c(0xf9)](_0x1cc85c(0xf6))||[]),this[_0x1cc85c(0xf7)]({'isActive':!0x1});}[_0x353dac(0xf1)](){const _0x4caa2c=_0x353dac,_0x535c1e=this[_0x4caa2c(0xe3)][_0x4caa2c(0xf2)][_0x4caa2c(0xdc)][_0x4caa2c(0xde)][_0x4caa2c(0xe4)]();this[_0x4caa2c(0xed)]=this[_0x4caa2c(0xf5)](_0x535c1e);}[_0x353dac(0xe7)](){const _0x20f5a1=_0x353dac;this[_0x20f5a1(0xec)]&&(this[_0x20f5a1(0xee)](_0x20f5a1(0xe0)),this[_0x20f5a1(0xec)]=void 0x0);const _0x2404ab=this[_0x20f5a1(0xe3)][_0x20f5a1(0xf2)][_0x20f5a1(0xdc)][_0x20f5a1(0xde)][_0x20f5a1(0xe4)]();_0x2404ab&&(_0x2404ab['is'](_0x20f5a1(0xe9),_0x20f5a1(0xdd))||_0x2404ab['is'](_0x20f5a1(0xe9),_0x20f5a1(0xe5)))&&(this[_0x20f5a1(0xec)]=new _0x508a63(this[_0x20f5a1(0xe3)],this[_0x20f5a1(0xe3)][_0x20f5a1(0xfa)][_0x20f5a1(0xf9)](_0x5a1b6b),_0x2404ab),this[_0x20f5a1(0xf3)](_0x20f5a1(0xe0))['to'](this[_0x20f5a1(0xec)],_0x20f5a1(0xe0)));}}function _0x315d(){const _0x4f6273=['document','imageBlock','selection','333196GisKGl','isActive','9mEeAMP','36NKpzxl','editor','getSelectedElement','imageInline','260600sjPouA','execute','config','element','82972IudaXu','147265JFrmcQ','imageEditController','isEnabled','unbind','90282VXGwjI','805616zMHmwC','refresh','model','bind','11kzVmXL','_isEditable','uploadcare.allowExternalImagesEditing','set','requires','get','plugins','48HAdtfk','1685810rntshN'];_0x315d=function(){return _0x4f6273;};return _0x315d();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x53180d=_0x27be;(function(_0x2f1e57,_0x1825fb){const _0x16a9f7=_0x27be,_0x3a572d=_0x2f1e57();while(!![]){try{const _0x235d0f=parseInt(_0x16a9f7(0x8d))/0x1+-parseInt(_0x16a9f7(0x89))/0x2+parseInt(_0x16a9f7(0x95))/0x3+parseInt(_0x16a9f7(0x88))/0x4*(-parseInt(_0x16a9f7(0x81))/0x5)+parseInt(_0x16a9f7(0x8a))/0x6*(parseInt(_0x16a9f7(0x85))/0x7)+-parseInt(_0x16a9f7(0x82))/0x8+parseInt(_0x16a9f7(0x83))/0x9;if(_0x235d0f===_0x1825fb)break;else _0x3a572d['push'](_0x3a572d['shift']());}catch(_0x29fd8e){_0x3a572d['push'](_0x3a572d['shift']());}}}(_0x2828,0xbefa6));import{Plugin as _0x1472b1}from'ckeditor5/src/core.js';import{Notification as _0x3950a8}from'ckeditor5/src/ui.js';function _0x27be(_0x1eeb2f,_0x13dda7){const _0x2828df=_0x2828();return _0x27be=function(_0x27be8d,_0xd5cccd){_0x27be8d=_0x27be8d-0x81;let _0x5dcb8d=_0x2828df[_0x27be8d];return _0x5dcb8d;},_0x27be(_0x1eeb2f,_0x13dda7);}import{UploadcareImageEditCommand as _0x5463b0}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x3be3a5}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x3becd2}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x1472b1{static get[_0x53180d(0x86)](){const _0x2b0588=_0x53180d;return _0x2b0588(0x8e);}static get[_0x53180d(0x91)](){const _0x56dcd5=_0x53180d;return[_0x3becd2,_0x3950a8,_0x56dcd5(0x8b),_0x56dcd5(0x90)];}static get[_0x53180d(0x87)](){return!0x0;}static get[_0x53180d(0x92)](){return!0x0;}[_0x53180d(0x93)](){const _0x45d2d8=_0x53180d,{editor:_0x1641c6}=this;_0x1641c6[_0x45d2d8(0x84)][_0x45d2d8(0x94)](_0x45d2d8(0x8f),new _0x5463b0(_0x1641c6)),_0x1641c6[_0x45d2d8(0x84)][_0x45d2d8(0x94)](_0x45d2d8(0x8c),new _0x3be3a5(_0x1641c6));}}function _0x2828(){const _0x4fd976=['49NfIQnd','pluginName','isOfficialPlugin','596HCOjBX','830006FRzCxq','112326SYBXyL','ImageUtils','uploadcareImageReplace','49315NdPhKh','UploadcareImageEditEditing','uploadcareImageEdit','ImageEditing','requires','isPremiumPlugin','init','add','3239733TYQfwe','22075KlCSlp','8696720RxaOzj','15137109XSWVxp','commands'];_0x2828=function(){return _0x4fd976;};return _0x2828();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x3aa9e7}from'ckeditor5/src/core.js';import{ButtonView as _0x3f27c2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x49f6b7}from'ckeditor5/src/icons.js';import{createElement as _0xd21a29}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 _0x3aa9e7{['_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 _0x128741=this['editor'];_0x128741['ui']['componentFactory']['add']('uploadcareImageEdit',_0x4ff50d=>{const _0x37f95e=_0x128741['commands']['get']('uploadcareImageEdit'),_0x428668=new _0x3f27c2(_0x4ff50d),t=_0x4ff50d['t'];return _0x428668['set']({'icon':_0x49f6b7,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x428668['bind']('isEnabled')['to'](_0x37f95e),_0x428668['bind']('isOn')['to'](_0x37f95e,'isActive'),this['listenTo'](_0x428668,'execute',()=>{_0x128741['execute']('uploadcareImageEdit'),_0x128741['editing']['view']['focus']();}),_0x428668;}),this['_initConfig']();}['_initConfig'](){const _0x112802=_0xd21a29(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x112802),this['listenTo'](this['editor'],'destroy',()=>{_0x112802['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
var _0x2c2868=_0x1971;function _0x1971(_0x1ce132,_0x3d02a3){var _0x5c16f5=_0x5c16();return _0x1971=function(_0x19718b,_0x458eb6){_0x19718b=_0x19718b-0x197;var _0x12bd38=_0x5c16f5[_0x19718b];return _0x12bd38;},_0x1971(_0x1ce132,_0x3d02a3);}function _0x5c16(){var _0x50034d=['133394RaAtZY','548wqwmOp','13956mngpOi','getFocusableElement','30EQLaFG','focusTracker','956082Pcldji','8dExinZ','div','focusCycler','bindTemplate','true','12284577DHbgse','1022318ZUsOCs','18715znNufA','35TreKKx','1826DhyGiM','2971750jbgOiV','fire','createCollection','forwardCycle'];_0x5c16=function(){return _0x50034d;};return _0x5c16();}(function(_0x5b3764,_0x3ba68c){var _0x1fcf71=_0x1971,_0x5aa5be=_0x5b3764();while(!![]){try{var _0x4bb25b=parseInt(_0x1fcf71(0x1aa))/0x1+-parseInt(_0x1fcf71(0x19d))/0x2*(-parseInt(_0x1fcf71(0x1a1))/0x3)+parseInt(_0x1fcf71(0x19e))/0x4*(-parseInt(_0x1fcf71(0x1ab))/0x5)+parseInt(_0x1fcf71(0x1a3))/0x6*(parseInt(_0x1fcf71(0x197))/0x7)+-parseInt(_0x1fcf71(0x1a4))/0x8*(parseInt(_0x1fcf71(0x1a9))/0x9)+parseInt(_0x1fcf71(0x199))/0xa+-parseInt(_0x1fcf71(0x198))/0xb*(parseInt(_0x1fcf71(0x19f))/0xc);if(_0x4bb25b===_0x3ba68c)break;else _0x5aa5be['push'](_0x5aa5be['shift']());}catch(_0xdb9278){_0x5aa5be['push'](_0x5aa5be['shift']());}}}(_0x5c16,0xadecc));import{FocusTracker as _0x4db950}from'ckeditor5/src/utils.js';import{View as _0x2f8d6d,FocusCycler as _0x1f63be}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x2f8d6d{[_0x2c2868(0x1a2)];[_0x2c2868(0x1a6)];constructor(_0x17830b){var _0x530457=_0x2c2868;super(_0x17830b),this[_0x530457(0x1a2)]=new _0x4db950(),this[_0x530457(0x1a6)]=new _0x1f63be({'focusables':this[_0x530457(0x19b)](),'focusTracker':this[_0x530457(0x1a2)]});}[_0x2c2868(0x1a0)](){var _0x95f600=_0x2c2868;return{'tag':_0x95f600(0x1a5),'attributes':{'aria-hidden':_0x95f600(0x1a8),'tabindex':'0'},'on':{'focus':this[_0x95f600(0x1a7)]['to'](()=>{var _0x5410d5=_0x95f600;this[_0x5410d5(0x1a6)][_0x5410d5(0x19a)](_0x5410d5(0x19c));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x4a25f7,_0x1a31d0){const _0x25e020=_0x4071,_0x864e4e=_0x4a25f7();while(!![]){try{const _0x16853f=parseInt(_0x25e020(0x105))/0x1*(-parseInt(_0x25e020(0xf1))/0x2)+-parseInt(_0x25e020(0xf6))/0x3+parseInt(_0x25e020(0xd6))/0x4+-parseInt(_0x25e020(0xdc))/0x5*(-parseInt(_0x25e020(0xd7))/0x6)+parseInt(_0x25e020(0xf4))/0x7+parseInt(_0x25e020(0xf8))/0x8*(-parseInt(_0x25e020(0xf5))/0x9)+-parseInt(_0x25e020(0xe9))/0xa*(-parseInt(_0x25e020(0xeb))/0xb);if(_0x16853f===_0x1a31d0)break;else _0x864e4e['push'](_0x864e4e['shift']());}catch(_0x54caeb){_0x864e4e['push'](_0x864e4e['shift']());}}}(_0x2877,0xf025c));import{global as _0x5cd670,DomEmitterMixin as _0x293246}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x2d19ce){const _0x10837d=_0x4071,_0x2c57c6=R(_0x2d19ce);return _0x4c62b1=>!(!_0x4c62b1||!_0x4c62b1['is'](_0x10837d(0x104),_0x10837d(0xd1))&&!_0x4c62b1['is'](_0x10837d(0x104),_0x10837d(0xec)))&&(!!_0x4c62b1[_0x10837d(0xf7)](_0x10837d(0x102))||!!_0x4c62b1[_0x10837d(0xf7)](_0x10837d(0xef))&&_0x2c57c6(_0x4c62b1[_0x10837d(0xe1)](_0x10837d(0xef))));}export function getImageUrls(_0x40c9c2,_0x5e8bc4){const _0x45dd95=_0x4071,_0x517303=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x45dd95(0xe2)](_0x36076c=>_0x36076c<=_0x5e8bc4)[_0x45dd95(0xe6)](_0x1bd238=>_0x40c9c2[_0x45dd95(0xcd)](/\/$/,'')+_0x45dd95(0xe0)+_0x1bd238+_0x45dd95(0xee)+_0x1bd238+'w');return{'imageFallbackUrl':_0x40c9c2,'imageSources':[{'srcset':_0x517303[_0x45dd95(0xd9)](',\x20'),'sizes':_0x45dd95(0xdb)+_0x5e8bc4+_0x45dd95(0xde)+_0x5e8bc4+'px','type':_0x45dd95(0xd0)}]};}export function getImageDimension(_0x38deaa,_0x4e4d06,_0x4992db){const _0x2f4a43=_0x4071,_0x3e4f42=_0x38deaa[_0x2f4a43(0xdf)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3e4f42?parseInt(_0x3e4f42[0x1],0xa):_0x4e4d06,'height':_0x3e4f42?parseInt(_0x3e4f42[0x2],0xa):_0x4992db};}function _0x2877(){const _0x3e90a1=['filter','plugins','setStyle','removeClass','map','toViewElement','isArray','64360UaipoD','height','3245meIvPS','imageInline','domConverter','x/\x20','src','document','172610JtSrie','change','baseURI','423717aaawzO','9RUQiWW','5242320bGXxCN','hasAttribute','10184JndzSe','listenTo','load','some','findViewImgElement','width','get','stopListening','ImageUtils','addClass','uploadcareImageId','location','element','7USJdIm','viewToDom','replace','aspect-ratio','view','image/webp','imageBlock','window','mapper','function','origin','5353404cHRMAz','60KHCdwd','removeStyle','join','editing','(max-width:\x20','19495tmMvAX','image-processing','px)\x20100vw,\x20','match','/-/resize/','getAttribute'];_0x2877=function(){return _0x3e90a1;};return _0x2877();}function _0x4071(_0x1ffc04,_0x421f54){const _0x28773e=_0x2877();return _0x4071=function(_0x4071fb,_0x4bcf28){_0x4071fb=_0x4071fb-0xcc;let _0x45cf7c=_0x28773e[_0x4071fb];return _0x45cf7c;},_0x4071(_0x1ffc04,_0x421f54);}export function showImageProcessingIndicator(_0x1a18e4,_0x22dd79){const _0xb301fb=_0x4071,_0x449826=new(_0x293246())(),_0x2b7f50=_0x1a18e4[_0xb301fb(0xe3)][_0xb301fb(0xfe)](_0xb301fb(0x100)),_0xbdb87e=_0x1a18e4[_0xb301fb(0xda)][_0xb301fb(0xd3)][_0xb301fb(0xe7)](_0x22dd79),_0x30bf65=_0x2b7f50[_0xb301fb(0xfc)](_0xbdb87e),_0x461c42=_0x1a18e4[_0xb301fb(0xda)][_0xb301fb(0xcf)][_0xb301fb(0xed)][_0xb301fb(0xcc)](_0x30bf65),_0x3d1a14=_0x22dd79[_0xb301fb(0xe1)](_0xb301fb(0xfd)),_0x410b9e=_0x22dd79[_0xb301fb(0xe1)](_0xb301fb(0xea)),_0x196b59=_0xb301fb(0xdd);_0x1a18e4[_0xb301fb(0xda)][_0xb301fb(0xcf)][_0xb301fb(0xf2)](_0x3d172d=>{const _0x2b66b9=_0xb301fb;_0x3d172d[_0x2b66b9(0x101)](_0x196b59,_0xbdb87e),_0x3d172d[_0x2b66b9(0xe4)](_0x2b66b9(0xce),_0x3d1a14+'/'+_0x410b9e,_0x30bf65);}),_0x449826[_0xb301fb(0xf9)](_0x461c42,_0xb301fb(0xfa),()=>{const _0x1695c5=_0xb301fb;_0x449826[_0x1695c5(0xff)](_0x461c42,_0x1695c5(0xfa)),_0x1a18e4[_0x1695c5(0xda)][_0x1695c5(0xcf)][_0x1695c5(0xf2)](_0x58eed4=>{const _0x5accda=_0x1695c5;_0x58eed4[_0x5accda(0xe5)](_0x196b59,_0xbdb87e),_0x58eed4[_0x5accda(0xd8)](_0x5accda(0xce),_0x30bf65);});});}function R(_0x33051a){const _0x948ee5=_0x4071;if(Array[_0x948ee5(0xe8)](_0x33051a)){const _0x1f43a8=_0x33051a[_0x948ee5(0xe6)](R);return _0x2efe7b=>_0x1f43a8[_0x948ee5(0xfb)](_0xe9cf39=>_0xe9cf39(_0x2efe7b));}if(_0x948ee5(0xd5)==_0x33051a){const _0x34342c=_0x5cd670[_0x948ee5(0xd2)][_0x948ee5(0x103)][_0x948ee5(0xd5)];return _0xa47281=>new URL(_0xa47281,_0x5cd670[_0x948ee5(0xf0)][_0x948ee5(0xf3)])[_0x948ee5(0xd5)]==_0x34342c;}return _0x948ee5(0xd4)==typeof _0x33051a?_0x33051a:_0x33051a instanceof RegExp?_0xd45281=>!(!_0xd45281[_0x948ee5(0xdf)](_0x33051a)&&!_0xd45281[_0x948ee5(0xcd)](/^https?:\/\//,'')[_0x948ee5(0xdf)](_0x33051a)):()=>!0x1;}
|