@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250129.1
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/CHANGELOG.md +6 -0
- package/LICENSE.md +17 -0
- package/README.md +36 -0
- package/build/uploadcare.js +4 -0
- package/ckeditor5-metadata.json +47 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +265 -0
- package/dist/index.css +315 -0
- package/dist/index.js +25 -0
- package/lang/contexts.json +27 -0
- package/package.json +80 -0
- package/src/augmentation.d.ts +30 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +16 -0
- package/src/index.js +23 -0
- package/src/ui/uploadcarecontroller.d.ts +30 -0
- package/src/ui/uploadcarecontroller.js +24 -0
- package/src/ui/uploadcareformview.d.ts +23 -0
- package/src/ui/uploadcareformview.js +23 -0
- package/src/uploadcare.d.ts +48 -0
- package/src/uploadcare.js +23 -0
- package/src/uploadcarecommand.d.ts +38 -0
- package/src/uploadcarecommand.js +23 -0
- package/src/uploadcareconfig.d.ts +227 -0
- package/src/uploadcareconfig.js +23 -0
- package/src/uploadcareediting.d.ts +49 -0
- package/src/uploadcareediting.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.d.ts +78 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.d.ts +25 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.d.ts +27 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.d.ts +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.d.ts +32 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.d.ts +49 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.d.ts +38 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.d.ts +48 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.js +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.d.ts +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.js +23 -0
- package/src/uploadcareimageedit.d.ts +32 -0
- package/src/uploadcareimageedit.js +23 -0
- package/src/uploadcareui.d.ts +41 -0
- package/src/uploadcareui.js +23 -0
- package/src/uploadcareuploadadapter.d.ts +39 -0
- package/src/uploadcareuploadadapter.js +23 -0
- package/src/utils/common-translations.d.ts +5 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/dialogfocusmanagerview.d.ts +29 -0
- package/src/utils/dialogfocusmanagerview.js +23 -0
- package/src/utils/editingutils.d.ts +5 -0
- package/src/utils/editingutils.js +23 -0
- package/src/utils/isancestor.d.ts +8 -0
- package/src/utils/isancestor.js +23 -0
- package/src/utils/uploadutils.d.ts +5 -0
- package/src/utils/uploadutils.js +23 -0
- package/theme/icons/dropbox.svg +11 -0
- package/theme/icons/error.svg +1 -0
- package/theme/icons/facebook.svg +11 -0
- package/theme/icons/google-drive.svg +11 -0
- package/theme/icons/google-photos.svg +11 -0
- package/theme/icons/image-upload.svg +11 -0
- package/theme/icons/instagram.svg +11 -0
- package/theme/icons/link.svg +11 -0
- package/theme/icons/local.svg +11 -0
- package/theme/icons/onedrive.svg +11 -0
- package/theme/icons/uploadcare-image-edit.svg +11 -0
- package/theme/uploadcare-form.css +198 -0
- package/theme/uploadcare-theme.css +20 -0
- package/theme/uploadcareimageedit.css +64 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{Plugin as _0x4fa6cf,icons as _0x147efa,Command as _0x3171b5}from'@ckeditor/ckeditor5-core/dist/index.js';import{ButtonView as _0x216df5,MenuBarMenuListItemButtonView as _0x4e86b7,View as _0x57561c,FocusCycler as _0x43946c,Dialog as _0x40a942,DialogViewPosition as _0x25165b,SpinnerView as _0x48ad02,IconView as et,Notification as _0x10443b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x1043f0,global as _0x325487,DomEmitterMixin as _0xf601c7,getAncestors as _0x5ac396,ObservableMixin as _0x2ffc05,createElement as _0x4616ab,uid as _0x39fd06}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2b958c}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x525bb8,info as _0x5a23d8}from'@uploadcare/upload-client';import*as _0x453fd5 from'@uploadcare/file-uploader';var o=function(_0x53a76d){return _0x53a76d['Local']='local',_0x53a76d['URL']='url',_0x53a76d['Dropbox']='dropbox',_0x53a76d['GDrive']='gdrive',_0x53a76d['Facebook']='facebook',_0x53a76d['GPhotos']='gphotos',_0x53a76d['Instagram']='instagram',_0x53a76d['OneDrive']='onedrive',_0x53a76d;}({});function k(_0x580bc3,_0x2eba29,_0xf3d278){const t=_0x580bc3['t'],_0x1388ec=_0x580bc3['t'];switch(_0x2eba29){case o['Local']:return{'text':_0x1388ec('Insert'===_0xf3d278?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1388ec('From\x20computer')};case o['URL']:return{'text':'Insert'===_0xf3d278?_0x1388ec('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1388ec('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['Instagram']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20Instagram':'Replace\x20with\x20Instagram'),'shortText':t('With\x20Instagram')};case o['OneDrive']:return{'text':t('Insert'===_0xf3d278?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2eba29;}}class e extends _0x4fa6cf{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x447690=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3cfbac;for(const _0x114b08 in _0x447690){const _0x36ee79=_0x114b08,_0x48db9d=_0x447690[_0x36ee79];if('uploadcareLicenseKeyValid'==_0x48db9d||'uploadcareLicenseKeyInvalid'==_0x48db9d||'uploadcareLicenseKeyExpired'==_0x48db9d||'uploadcareLicenseKeyDomainLimit'==_0x48db9d||'uploadcareLicenseKeyNotAllowed'==_0x48db9d||'uploadcareLicenseKeyEvaluationLimit'==_0x48db9d||'uploadcareLicenseKeyTrialLimit'==_0x48db9d||'uploadcareLicenseKeyUsageLimit'==_0x48db9d){delete _0x447690[_0x36ee79],_0x3cfbac=_0x48db9d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3cfbac&&_0x447690['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3cfbac&&_0x447690['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3cfbac&&_0x447690['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3cfbac&&_0x447690['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3cfbac&&_0x447690['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3cfbac&&_0x447690['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3cfbac&&_0x447690['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x42747f}=this,_0x4ed0ac=_0x42747f['commands']['get']('uploadcare');if(!_0x4ed0ac)return;const _0x358e27=this['_normalizeConfigSourceList'](_0x42747f['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x21e696,_0x11adb1)=>{const _0x10c0be=this['_getIntegrationKey'](_0x11adb1['type']);return _0x21e696[_0x10c0be]||(_0x21e696[_0x10c0be]=[]),_0x21e696[_0x10c0be]['push'](_0x11adb1),_0x21e696;},{});_0x42747f['plugins']['has']('ImageInsertUI')&&_0x42747f['commands']['get']('uploadcare')&&Object['entries'](_0x358e27)['forEach'](([_0x5e6125,_0x40dd65])=>{_0x42747f['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x5e6125,'observable':()=>_0x4ed0ac,'buttonViewCreator':()=>this['_createToolbarButton'](_0x40dd65),'formViewCreator':()=>this['_createDropdownButtons'](_0x40dd65),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x40dd65),'override':'assetManager'!==_0x5e6125});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x46eaed){const {locale:_0x517cad}=this['editor'];return _0x46eaed['map'](_0x3f4254=>{const _0x3ab026=k(_0x517cad,_0x3f4254,'Insert');switch(_0x3f4254){case o['Local']:return{'icon':_0x147efa['imageUpload'],'type':o['Local'],..._0x3ab026};case o['URL']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M12.748\x202a4.622\x204.622\x200\x200\x200-3.174\x201.362L8.02\x204.915a.783.783\x200\x200\x200\x20.002\x201.11.786.786\x200\x200\x200\x201.11\x200l1.55-1.553c1.185-1.185\x203.024-1.195\x204.116-.104l.851.854c1.092\x201.091\x201.083\x202.927-.101\x204.11l-1.555\x201.554a.787.787\x200\x200\x200\x20.557\x201.34.78.78\x200\x200\x200\x20.553-.23l1.554-1.552c1.758-1.757\x201.838-4.597.102-6.332l-.854-.853A4.31\x204.31\x200\x200\x200\x2012.748\x202Zm-.488\x204.973a.78.78\x200\x200\x200-.553.23L7.2\x2011.71l-.004.002a.784.784\x200\x200\x200\x201.11\x201.107l.003-.002\x204.504-4.505a.785.785\x200\x200\x200-.554-1.339Zm-6.79.815a.791.791\x200\x200\x200-.554.234L3.36\x209.573c-1.757\x201.758-1.836\x204.597-.101\x206.332l.853.852c1.736\x201.734\x204.572\x201.655\x206.33-.102l1.547-1.547.006-.008a.777.777\x200\x200\x200\x20.244-.554.782.782\x200\x200\x200-.799-.797.774.774\x200\x200\x200-.56.248l-1.545\x201.547c-1.184\x201.184-3.021\x201.195-4.113.104l-.854-.854c-1.091-1.091-1.083-2.927.102-4.111l1.552-1.555a.787.787\x200\x200\x200\x20.233-.555.79.79\x200\x200\x200-.06-.3.793.793\x200\x200\x200-.173-.253s-.104-.14-.183-.185c-.051-.03-.133-.047-.37-.047Z\x22/></svg>\x0a','type':o['URL'],..._0x3ab026};case o['Dropbox']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M5.972\x203.115A.746.746\x200\x200\x201\x206.374\x203c.14\x200\x20.28.037.402.115l3.229\x202.059\x203.228-2.057a.75.75\x200\x200\x201\x20.805\x200l3.629\x202.31h.002a.757.757\x200\x200\x201\x200\x201.264h-.002L15.034\x208.37l2.633\x201.678h.002a.756.756\x200\x200\x201\x200\x201.262h-.002l-3.63\x202.312a.746.746\x200\x200\x201-.161.076c.234.08.409.275.482.5a.75.75\x200\x200\x201-.322.854l-3.629\x202.308a.75.75\x200\x200\x201-.805\x200l-3.63-2.31a.75.75\x200\x200\x201-.229-1.031l.076-.122h.022a.746.746\x200\x200\x201\x20.32-.189.75.75\x200\x200\x201-.19-.086l-3.63-2.312a.756.756\x200\x200\x201\x200-1.264l2.632-1.678-2.632-1.676a.757.757\x200\x200\x201\x200-1.263l3.63-2.313Zm2.64\x202.946L6.374\x204.635\x204.136\x206.06l2.238\x201.423\x202.238-1.423Zm7.262\x200-2.236-1.426-2.239\x201.426\x202.237\x201.423\x202.238-1.423Zm-3.637\x202.306-2.232-1.422-2.233\x201.422\x202.235\x201.422\x202.23-1.422Zm-3.625\x202.31L6.374\x209.253l-2.238\x201.426\x202.238\x201.424\x202.238-1.424Zm7.262\x200-2.236-1.425-2.239\x201.426\x202.237\x201.424\x202.238-1.424Zm-2.64\x202.944-3.23-2.056-3.228\x202.056a.75.75\x200\x200\x201-.185.084.724.724\x200\x200\x201\x20.185.08l3.229\x202.057\x203.226-2.055a.827.827\x200\x200\x201\x20.18-.084.746.746\x200\x200\x201-.178-.082Z\x22/></svg>\x0a','type':o['Dropbox'],..._0x3ab026};case o['Facebook']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10.01\x202C5.59\x202\x202\x205.59\x202\x2010.01a8.011\x208.011\x200\x200\x200\x206.775\x207.914.754.754\x200\x200\x200\x20.598-.17.75.75\x200\x200\x200\x20.262-.565v-5.02a.745.745\x200\x200\x200-.22-.524.745.745\x200\x200\x200-.526-.221H7.77v-.627H8.89a.745.745\x200\x200\x200\x20.525-.22c.14-.14.22-.329.22-.526V8.324c0-.466.122-1.083.524-1.48.33-.326\x201.017-.6\x202.332-.43v.408c-.152.012-.305.017-.457.04-.335.048-.662.136-.943.326-.313.21-.497.505-.59.804-.093.3-.107.602-.107.88v1.18a.746.746\x200\x200\x200\x20.744.746h1.158l-.098.63h-1.06a.744.744\x200\x200\x200-.744.744v5.017a.752.752\x200\x200\x200\x20.26.567c.081.07.177.119.28.148a.75.75\x200\x200\x200\x20.319.022A8.012\x208.012\x200\x200\x200\x2010.01\x202Zm0\x201.486a6.52\x206.52\x200\x200\x201\x206.521\x206.524c0\x202.945-1.973\x205.386-4.65\x206.197v-3.291h.951a.749.749\x200\x200\x200\x20.736-.63l.332-2.12a.742.742\x200\x200\x200-.17-.6.745.745\x200\x200\x200-.564-.26h-1.285V8.87c0-.252.024-.384.039-.433.003-.008.002-.012.002-.016.016-.011.104-.055.326-.088a7\x207\x200\x200\x201\x20.984-.05.746.746\x200\x200\x200\x20.528-.218c.14-.139.217-.33.217-.527V5.76a.747.747\x200\x200\x200-.586-.729c-2.04-.438-3.433-.083-4.278.75-.818.807-.968\x201.884-.968\x202.543v.983H7.027a.744.744\x200\x200\x200-.525.22.743.743\x200\x200\x200-.219.526v2.119c0\x20.197.08.386.219.525.14.14.328.221.525.221h1.118v3.291c-2.681-.809-4.659-3.25-4.659-6.197a6.523\x206.523\x200\x200\x201\x206.524-6.526Z\x22/></svg>\x0a','type':o['Facebook'],..._0x3ab026};case o['GDrive']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M7.666\x203a.736.736\x200\x200\x200-.371.1.748.748\x200\x200\x200-.275.267l-4.918\x208.397a.743.743\x200\x200\x200-.006.744l2.46\x204.318a.747.747\x200\x200\x200\x20.65.377h9.606a.754.754\x200\x200\x200\x20.65-.377l2.46-4.318a.74.74\x200\x200\x200\x20.002-.735l-4.688-8.392a.754.754\x200\x200\x200-.654-.38H7.666Zm1.285\x201.492h3.195l3.854\x206.9h-3.1l-3.949-6.9Zm-1.293.742L9.223\x207.97l-4.016\x206.988-1.6-2.813\x204.051-6.91Zm2.424\x204.237\x201.098\x201.922H8.977l1.105-1.922ZM8.12\x2012.885h7.87L14.38\x2015.71H6.494l1.625-2.826Z\x22/></svg>\x0a','type':o['GDrive'],..._0x3ab026};case o['GPhotos']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.258\x203.082c0-.594.486-1.082\x201.08-1.082a4.38\x204.38\x200\x200\x201\x204.239\x205.489c-.18.688-.633\x201.245-1.109\x201.767h3.468c.595\x200\x201.082.488\x201.082\x201.082a4.382\x204.382\x200\x200\x201-5.49\x204.24v-.001c-.689-.18-1.246-.633-1.768-1.109v3.468c0\x20.595-.487\x201.082-1.082\x201.082a4.384\x204.384\x200\x200\x201-4.111-2.866\x204.382\x204.382\x200\x200\x201-.125-2.624c.18-.689.632-1.246\x201.108-1.768H3.082A1.085\x201.085\x200\x200\x201\x202\x209.68a4.382\x204.382\x200\x200\x201\x205.49-4.238c.69.18\x201.246.632\x201.768\x201.108V3.082Zm3.164\x201.32c-.435-.46-1.043-.667-1.662-.767v5.49c.619-.1\x201.227-.307\x201.662-.766a2.875\x202.875\x200\x200\x200\x200-3.958ZM7.21\x206.918a2.876\x202.876\x200\x200\x200-2.93.789c-.396.423-.569.983-.658\x201.55h5.56c-.045-.295-.091-.59-.224-.859a2.879\x202.879\x200\x200\x200-1.748-1.48Zm9.254\x203.841h-5.653l.013.1c.012.098.025.197.053.292a2.873\x202.873\x200\x200\x200\x204.862\x201.158\x202.87\x202.87\x200\x200\x200\x20.398-.54v-.001c.111-.195.2-.403.263-.619.026-.092.038-.188.05-.283l.014-.107Zm-8.872\x204.86c.437.459\x201.045.666\x201.665.766V10.89c-1.369.222-2.456\x201.314-2.456\x202.747\x200\x20.738.283\x201.447.791\x201.981Z\x22/></svg>\x0a','type':o['GPhotos'],..._0x3ab026};case o['Instagram']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M8.978\x202c-.945.004-1.73.02-2.4.086-.906.09-1.66.28-2.318.706A4.95\x204.95\x200\x200\x200\x202.79\x204.26c-.427.66-.615\x201.412-.704\x202.319C1.998\x207.47\x202\x208.57\x202\x209.98v.057c0\x201.41-.003\x202.51.086\x203.402.09.906.278\x201.657.703\x202.316.38.589.882\x201.09\x201.47\x201.471.659.426\x201.413.615\x202.32.705.891.089\x201.991.086\x203.401.086h.057c1.41\x200\x202.51.003\x203.402-.086.907-.089\x201.658-.28\x202.317-.705a4.958\x204.958\x200\x200\x200\x201.47-1.47c.425-.66.614-1.41.704-2.317.088-.892.088-1.992.088-3.402V9.98c0-1.41\x200-2.51-.088-3.402-.09-.907-.278-1.66-.703-2.319a4.95\x204.95\x200\x200\x200-1.471-1.468c-.659-.425-1.41-.616-2.316-.706-.893-.088-1.992-.085-3.403-.085H9.98c-.352\x200-.686-.002-1.002\x200Zm1.028\x201.502c1.444\x200\x202.488.002\x203.283.08.788.079\x201.27.225\x201.652.471.41.265.757.614\x201.022\x201.024.247.381.393.864.47\x201.652.08.795.083\x201.836.083\x203.28\x200\x201.443-.004\x202.487-.082\x203.283-.079.787-.225\x201.27-.471\x201.65-.265.41-.612.759-1.022\x201.023-.381.247-.866.393-1.654.471-.795.08-1.837.08-3.281.08-1.444\x200-2.488-.003-3.283-.082-.787-.078-1.268-.222-1.649-.469a3.438\x203.438\x200\x200\x201-1.021-1.023c-.247-.383-.394-.865-.473-1.652-.079-.795-.08-1.838-.08-3.282\x200-1.443\x200-2.485.08-3.279.079-.788.225-1.27.47-1.65a3.45\x203.45\x200\x200\x201\x201.024-1.026c.383-.246.862-.392\x201.649-.47.795-.08\x201.839-.08\x203.283-.08ZM14.22\x204.62a1.175\x201.175\x200\x200\x200-1.18\x201.178c0\x20.312.123.613.344.833a1.185\x201.185\x200\x200\x200\x201.668\x200c.109-.109.196-.24.256-.382.059-.143.086-.297.086-.452\x200-.154-.029-.308-.086-.45a1.18\x201.18\x200\x200\x200-1.088-.727Zm-4.213\x201.343a4.042\x204.042\x200\x200\x200-4.045\x204.045\x204.047\x204.047\x200\x200\x200\x206.906\x202.862\x204.047\x204.047\x200\x200\x200-2.861-6.907Zm0\x201.504a2.538\x202.538\x200\x200\x201\x202.541\x202.541c0\x20.675-.265\x201.322-.742\x201.8a2.543\x202.543\x200\x200\x201-1.8.741\x202.54\x202.54\x200\x200\x201-1.796-.742\x202.55\x202.55\x200\x200\x201-.55-2.771\x202.54\x202.54\x200\x200\x201\x202.347-1.569Z\x22/></svg>\x0a','type':o['Instagram'],..._0x3ab026};case o['OneDrive']:return{'icon':'<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10.223\x205.001a5.277\x205.277\x200\x200\x200-4.408\x202.258c-3.224.423-4.908\x204.123-3.032\x206.814l.004.008.002.004c.48.627\x201.712\x201.84\x203.588\x201.84h7.936c.667\x200\x201.32-.179\x201.894-.522a3.838\x203.838\x200\x200\x200\x201.381-1.46v-.005c1.13-2.16-.133-4.777-2.488-5.298-.617-1.853-2.177-3.242-4.111-3.565a5.273\x205.273\x200\x200\x200-.766-.074Zm-.092\x201.5c.078\x200\x20.154.001.23.008.077.004.154.014.231.021l.226.035a5.203\x205.203\x200\x200\x201\x20.45.116\x203.31\x203.31\x200\x200\x201\x20.433.166\x204.079\x204.079\x200\x200\x201\x20.606.348\x204.195\x204.195\x200\x200\x201\x20.37.293\x203.54\x203.54\x200\x200\x201\x20.33.348\x203.517\x203.517\x200\x200\x201\x20.505.778\x203.182\x203.182\x200\x200\x200-.42.117c-.082.03-.164.06-.244.094l-1.49.627-2.686-1.61a4.39\x204.39\x200\x200\x200-1.002-.445c.015-.01.032-.026.047-.039a3.744\x203.744\x200\x200\x201\x20.4-.289\x203.713\x203.713\x200\x200\x201\x20.424-.23\x203.02\x203.02\x200\x200\x201\x20.219-.094c.074-.03.15-.053.225-.076a3.77\x203.77\x200\x200\x201\x20.222-.06c.077-.02.157-.035.233-.05.075-.015.15-.025.228-.033.077-.007.154-.015.233-.02.078-.003.154-.005.23-.005Zm-3.8\x202.193h.003c.54.001\x201.111.156\x201.551.428l1.783\x201.07-5.867\x202.471c-.535-1.29-.15-2.788\x201.059-3.537l.007-.004c.441-.271.946-.42\x201.463-.428Zm7.974\x201.33.152.008c.086.008.173.018.258.033a1.956\x201.956\x200\x200\x201\x20.477.145\x202.179\x202.179\x200\x200\x201\x20.918.756c.046.066.09.133.127.2a2.284\x202.284\x200\x200\x201\x20.269.919c.004.081.008.165.002.248-.003.055-.012.111-.02.166l-3.507-2.102.459-.193.015-.008a2.118\x202.118\x200\x200\x201\x20.41-.125\x202.297\x202.297\x200\x200\x201\x20.44-.047Zm-3.008\x201.112\x204.506\x202.699a2.217\x202.217\x200\x200\x201-.338.26\x202.228\x202.228\x200\x200\x201-.668.275c-.078.019-.157.03-.24.04-.081.007-.164.015-.246.015H6.373c-.057\x200-.113-.001-.168-.004a1.904\x201.904\x200\x200\x201-.164-.016l-.154-.023c-.051-.008-.102-.014-.15-.026a2.942\x202.942\x200\x200\x201-.77-.3\x202.889\x202.889\x200\x200\x201-.21-.133c-.012-.008-.019-.016-.03-.024l6.57-2.763Z\x22/></svg>\x0a','type':o['OneDrive'],..._0x3ab026};}});}['_getIntegrationKey'](_0x368104){switch(_0x368104){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x50af7a,_0x333803){const _0x251a84=this['editor'],_0x41754e=new _0x50af7a(_0x251a84['locale']),_0x41edf7=_0x251a84['commands']['get']('uploadcare');return _0x41754e['bind']('isEnabled')['to'](_0x41edf7),_0x41754e['on']('execute',()=>{_0x41edf7['execute'](_0x333803);}),_0x41754e;}['_createToolbarButton'](_0x70e7f1){const {locale:_0x58faee}=this['editor'],_0x5d4f67=this['editor']['plugins']['get']('ImageInsertUI'),_0x297cb5=_0x70e7f1[0x0],_0x14bb04=this['_createButton'](_0x216df5,_0x297cb5['type']);return _0x14bb04['icon']=_0x297cb5['icon'],_0x14bb04['bind']('label')['to'](_0x5d4f67,'isImageSelected',_0x718647=>k(_0x58faee,_0x297cb5['type'],_0x718647?'Replace':'Insert')['text']),_0x14bb04['tooltip']=!0x0,_0x14bb04;}['_createDropdownButtons'](_0x5aaf09){const {locale:_0x45c38c}=this['editor'],_0x4b7edd=this['editor']['plugins']['get']('ImageInsertUI');return _0x5aaf09['map'](_0x2af84a=>{const _0xa19256=this['_createButton'](_0x216df5,_0x2af84a['type']);return _0xa19256['withText']=!0x0,_0xa19256['icon']=_0x2af84a['icon'],_0xa19256['bind']('label')['to'](_0x4b7edd,'isImageSelected',_0x3bcb8a=>k(_0x45c38c,_0x2af84a['type'],_0x3bcb8a?'Replace':'Insert')['text']),_0xa19256;});}['_createMenuBarButtons'](_0x2a32eb){return _0x2a32eb['map'](_0x4f358e=>{const _0x3e149e=this['_createButton'](_0x4e86b7,_0x4f358e['type']);return _0x3e149e['icon']=_0x4f358e['icon'],_0x3e149e['label']=_0x4f358e['shortText'],_0x3e149e;});}}class q extends _0x57561c{['focusTracker'];['focusCycler'];constructor(_0x5bb263){super(_0x5bb263),this['focusTracker']=new _0x1043f0(),this['focusCycler']=new _0x43946c({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class S extends q{constructor(_0x2bbbdd){super(_0x2bbbdd),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x462e57,_0x4b438e){const _0x13f39e=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x492b43=>_0x492b43<=_0x4b438e)['map'](_0x222866=>_0x462e57['replace'](/\/$/,'')+'/-/resize/'+_0x222866+'x/\x20'+_0x222866+'w');return{'imageFallbackUrl':_0x462e57,'imageSources':[{'srcset':_0x13f39e['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4b438e+'px)\x20100vw,\x20'+_0x4b438e+'px','type':'image/webp'}]};}function F(_0x3dff7c,_0x34518a,_0xbd158){const _0x4296e4=_0x3dff7c['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4296e4?parseInt(_0x4296e4[0x1],0xa):_0x34518a,'height':_0x4296e4?parseInt(_0x4296e4[0x2],0xa):_0xbd158};}function p(_0x2652a9,_0x5286cc){const _0x42ff6d=Object['create'](_0xf601c7),_0x1d15cc=_0x2652a9['plugins']['get']('ImageUtils'),_0x34b618=_0x2652a9['editing']['mapper']['toViewElement'](_0x5286cc),_0x4967e5=_0x1d15cc['findViewImgElement'](_0x34b618),_0x3fe776=_0x2652a9['editing']['view']['domConverter']['viewToDom'](_0x4967e5),_0x2bc9d9=_0x5286cc['getAttribute']('width'),_0x4b16e8=_0x5286cc['getAttribute']('height'),_0x24079e='image-processing';_0x2652a9['editing']['view']['change'](_0x231955=>{_0x231955['addClass'](_0x24079e,_0x34b618),_0x231955['setStyle']('aspect-ratio',_0x2bc9d9+'/'+_0x4b16e8,_0x4967e5);}),_0x42ff6d['listenTo'](_0x3fe776,'load',()=>{_0x42ff6d['stopListening'](_0x3fe776,'load'),_0x2652a9['editing']['view']['change'](_0x1ba758=>{_0x1ba758['removeClass'](_0x24079e,_0x34b618),_0x1ba758['removeStyle']('aspect-ratio',_0x4967e5);});});}function R(_0x36c0f8){if(Array['isArray'](_0x36c0f8)){const _0xbfea5c=_0x36c0f8['map'](R);return _0x5bdf1e=>_0xbfea5c['some'](_0x147392=>_0x147392(_0x5bdf1e));}if('origin'==_0x36c0f8){const _0x10dc7a=_0x325487['window']['location']['origin'];return _0x5f2c1e=>new URL(_0x5f2c1e,_0x325487['document']['baseURI'])['origin']==_0x10dc7a;}return'function'==typeof _0x36c0f8?_0x36c0f8:_0x36c0f8 instanceof RegExp?_0x1aa612=>!(!_0x1aa612['match'](_0x36c0f8)&&!_0x1aa612['replace'](/^https?:\/\//,'')['match'](_0x36c0f8)):()=>!0x1;}function M(_0x482dde,_0x255b9d){return _0x5ac396(_0x482dde['target'])['includes'](_0x255b9d);}class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2ffc05(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x348f20,_0x2e95d7,_0x5af577){super(),this['_editor']=_0x348f20,this['_editing']=_0x2e95d7,this['_dialog']=_0x348f20['plugins']['get'](_0x40a942),this['_api']=_0x2e95d7['ctxElement']['getAPI'](),this['_type']=_0x5af577,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x20cfff,model:_0x1aa625}=this['_editor'],_0x495ab1=_0x1aa625['document']['selection']['getSelectedElement'](),_0x9127c1=_0x495ab1&&(_0x495ab1['is']('element','imageBlock')||_0x495ab1['is']('element','imageInline'));this['_formView']=new S(_0x20cfff),this['_dialog']['show']({'id':'uploadCare','icon':_0x147efa['imageUpload'],'title':k(_0x20cfff,this['_type'],_0x9127c1?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x25165b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x34fe95=>!M(_0x34fe95,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xa004a5}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x20a944=>{const _0x18684f=_0xa004a5['length'];for(const _0x27582a of _0xa004a5){const _0x5dabf0=_0x27582a===_0xa004a5[_0x18684f-0x1],{cdnUrl:_0x298f8c,fileInfo:_0xc01b33}=_0x27582a;if(!_0x298f8c||!_0xc01b33)continue;const {width:_0x113b51,height:_0x47ed43}=_0xc01b33['imageInfo'],_0x39e14e=F(_0x298f8c,_0x113b51,_0x47ed43),_0x5b4431=E(_0x298f8c,_0x39e14e['width']),_0x1b76ab={'id':_0xc01b33['uuid'],'type':'image','attributes':{'imageDimension':_0x39e14e,..._0x5b4431}};this['_insertAsset'](_0x1b76ab,_0x5dabf0,_0x20a944);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1751ae=>{'idle'===_0x1751ae['detail']['status']&&!_0x1751ae['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x366346,_0xc3fa69,_0x10cfc){const _0x244844=this['_editor']['model']['document']['selection'],_0x33de0c=_0x244844['getSelectedElement'](),_0x4f3647=!(!_0x33de0c||!_0x33de0c['is']('element','imageInline'));_0x10cfc['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x366346,_0x4f3647),_0xc3fa69||_0x10cfc['setSelection'](_0x244844['getLastPosition']());}['_insertImage'](_0x1a6745,_0xdb83a9){const _0x365e0f=this['_editor'],{imageDimension:_0x4653ec,imageFallbackUrl:_0x501e21,imageSources:_0x247707}=_0x1a6745['attributes'];_0x365e0f['execute']('insertImage',{'imageType':_0xdb83a9?'imageInline':null,'source':{'uploadcareImageId':_0x1a6745['id'],'src':_0x501e21,'sources':_0x247707,..._0x4653ec}});}}class l extends _0x3171b5{['_editing'];['_controller']=null;static get['requires'](){return[_0x40a942,i];}constructor(_0x18eb83){super(_0x18eb83),this['_editing']=_0x18eb83['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x542ca4){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new h(this['editor'],this['_editing'],_0x542ca4);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0xf050af,publicKey:_0x191e10,signal:_0x2cdcf9,onProgress:_0xa459e6}){return _0x525bb8(_0xf050af,{'publicKey':_0x191e10,'store':'auto','signal':_0x2cdcf9,'onProgress':_0xa459e6});}static['getInfo'](_0x2c6619,_0x370c51){return _0x5a23d8(_0x2c6619,_0x370c51);}}class f extends _0x4fa6cf{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2b958c,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3b7bf1=this['editor'];if(!!!_0x3b7bf1['config']['get']('uploadcare'))return;_0x3b7bf1['plugins']['get'](_0x2b958c)['createUploadAdapter']=_0x2cf730=>new A(_0x2cf730,_0x3b7bf1),_0x3b7bf1['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x102972,{imageElement:_0x2cc4fc,data:_0x1047ba})=>{_0x3b7bf1['model']['change'](_0xd8c46f=>{_0xd8c46f['setAttribute']('uploadcareImageId',_0x1047ba['uploadcareImageId'],_0x2cc4fc);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x42bd13,_0x44fda1){this['loader']=_0x42bd13,this['editor']=_0x44fda1,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xb6dfe1=this['editor']['config']['get']('uploadcare.pubkey'),_0x311fd4=await this['loader']['file'];return C['upload']({'file':_0x311fd4,'publicKey':_0xb6dfe1,'signal':this['controller']['signal'],'onProgress':_0x34b95=>{_0x34b95&&_0x34b95['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x34b95['value']);}})['then'](async _0x4804b5=>{const {imageFallbackUrl:_0x5074bf,imageSources:_0x244a84}=E(_0x4804b5['cdnUrl'],_0x4804b5['imageInfo']['width']);return{'uploadcareImageId':_0x4804b5['uuid'],'default':_0x5074bf,'sources':_0x244a84};})['catch'](()=>{const _0x2f3878=t('Cannot\x20upload\x20file:')+('\x20'+_0x311fd4['name']+'.');return Promise['reject'](_0x2f3878);});}['abort'](){this['controller']['abort']();}}class i extends _0x4fa6cf{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x40a942];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x1af203=this['editor'];_0x1af203['commands']['add']('uploadcare',new l(_0x1af203));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x54b987=_0x325487['document']['querySelector']('input[uploadcare-file-input]');_0x54b987&&_0x54b987['remove']();}),async function(_0x1b21a7){const _0x121830=_0x1907cc([0x4a,0x35,0x64,0x49,0x72,0x48,0x7a,0x79,0x78,0x70,0x43,0x37,0x59,0x41,0x38,0x75,0x6d,0x36,0x74,0x46,0x44,0x66,0x55,0x4d,0x50,0x51,0x67,0x6c,0x61,0x4c,0x77,0x52,0x65,0x58,0x34,0x33,0x6b,0x68,0x6e,0x5a,0x69,0x31,0x53,0x45,0x71,0x42,0x4e,0x32,0x47,0x73,0x57,0x62,0x76,0x56,0x4b,0x6a,0x63,0x54,0x4f,0x30,0x6f,0x39]),_0x31f345=0x2a995340,_0x34b5ce=0x2a9e0eb8^_0x31f345,_0xdc18ec=window[_0x1907cc([0x44,0x61,0x74,0x65])][_0x1907cc([0x6e,0x6f,0x77])](),_0x310b15=_0x1b21a7[_0x1907cc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x41f152=new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x85db5c=>{_0x310b15[_0x1907cc([0x6f,0x6e,0x63,0x65])](_0x1907cc([0x72,0x65,0x61,0x64,0x79]),_0x85db5c);}),_0x317e34={[_0x1907cc([0x6b,0x74,0x79])]:_0x1907cc([0x45,0x43]),[_0x1907cc([0x75,0x73,0x65])]:_0x1907cc([0x73,0x69,0x67]),[_0x1907cc([0x63,0x72,0x76])]:_0x1907cc([0x50,0x2d,0x32,0x35,0x36]),[_0x1907cc([0x78])]:_0x1907cc([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x1907cc([0x79])]:_0x1907cc([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x1907cc([0x61,0x6c,0x67])]:_0x1907cc([0x45,0x53,0x32,0x35,0x36])},_0x4156ff=_0x310b15[_0x1907cc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1907cc([0x67,0x65,0x74])](_0x1907cc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f41a0(){let _0x39285a,_0x21a3ed=null,_0x44087b=null;try{if(_0x4156ff==_0x1907cc([0x47,0x50,0x4c]))return _0x1907cc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x39285a=_0x559fe9(),!_0x39285a)return _0x1907cc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x39285a[_0x1907cc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x44087b=_0x27c2a9(_0x39285a[_0x1907cc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x39285a[_0x1907cc([0x6a,0x74,0x69])])),await _0x33cead()?_0x712dd9()?_0x4ed207()?_0x1907cc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1fe271()?(_0x39285a[_0x1907cc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1907cc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21a3ed=_0x5070cc(_0x1907cc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x39285a[_0x1907cc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1907cc([0x74,0x72,0x69,0x61,0x6c])&&(_0x21a3ed=_0x5070cc(_0x1907cc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x46d74d()):_0x1907cc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1907cc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1907cc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x21953d){return _0x1907cc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4ed207(){const _0x547b04=[_0x1907cc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1907cc([0x74,0x72,0x69,0x61,0x6c])][_0x1907cc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39285a[_0x1907cc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xdc18ec/0x3e8:0xe10*_0x34b5ce;return _0x39285a[_0x1907cc([0x65,0x78,0x70])]<_0x547b04;}function _0x712dd9(){const _0x150a25=_0x39285a[_0x1907cc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x150a25&&(!!_0x150a25[_0x1907cc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1907cc([0x2a]))||!!_0x150a25[_0x1907cc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1907cc([0x55,0x50,0x4c,0x43])));}function _0x1fe271(){const _0x12ad0c=_0x39285a[_0x1907cc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12ad0c||0x0==_0x12ad0c[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x55c08d}=new URL(window[_0x1907cc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x12ad0c[_0x1907cc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55c08d))return!0x0;const _0xafdfa5=_0x55c08d[_0x1907cc([0x73,0x70,0x6c,0x69,0x74])](_0x1907cc([0x2e]));return _0x12ad0c[_0x1907cc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x417991=>_0x417991[_0x1907cc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1907cc([0x2a])))[_0x1907cc([0x6d,0x61,0x70])](_0x599830=>_0x599830[_0x1907cc([0x73,0x70,0x6c,0x69,0x74])](_0x1907cc([0x2e])))[_0x1907cc([0x73,0x6f,0x6d,0x65])](_0x2872b5=>_0xafdfa5[_0x1907cc([0x65,0x76,0x65,0x72,0x79])]((_0x5cb7e5,_0x5066b4)=>_0x2872b5[_0x5066b4]===_0x5cb7e5||_0x2872b5[_0x5066b4]===_0x1907cc([0x2a])));}function _0x46d74d(){return _0x21a3ed&&_0x44087b?new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x264980,_0x14aa12)=>{_0x21a3ed[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x264980,_0x14aa12),_0x44087b[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x536c3a=>{_0x536c3a!=_0x1907cc([0x56,0x61,0x6c,0x69,0x64])&&_0x264980(_0x536c3a);},_0x14aa12);}):_0x21a3ed||_0x44087b||_0x1907cc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x27c2a9(_0x40074b,_0x93fd6d){return new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x566e3b=>{if(_0x33e6d6())return _0x566e3b(_0x1907cc([0x56,0x61,0x6c,0x69,0x64]));_0xd5a36e(),_0x310b15[_0x1907cc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1907cc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x220507=!0x1;const _0x475919=_0x39fd06();function _0x2a62c5(_0x357871){return!!_0x357871&&(typeof _0x357871===_0x1907cc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x357871===_0x1907cc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x357871[_0x1907cc([0x74,0x68,0x65,0x6e])]===_0x1907cc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x357871[_0x1907cc([0x63,0x61,0x74,0x63,0x68])]===_0x1907cc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47384f(_0x403ece){_0x1bc34b(_0x403ece)[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x3320b4=>{if(!_0x3320b4||_0x3320b4[_0x1907cc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1907cc([0x6f,0x6b]))return _0x1907cc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x29b673(_0xf0c720(_0x475919+_0x93fd6d))!=_0x3320b4[_0x1907cc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1907cc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1907cc([0x56,0x61,0x6c,0x69,0x64]);})[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x4622fa=>(_0xd4f83d(),_0x4622fa),()=>{const _0x57e637=_0x25660b();return null==_0x57e637?(_0xd4f83d(),_0x1907cc([0x56,0x61,0x6c,0x69,0x64])):_0x1907cc(_0xdc18ec-_0x57e637>(0xe95d740^_0x31f345)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x566e3b)[_0x1907cc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x566e3b(_0x1907cc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x467e51=0x2aafbdc0^_0x31f345;function _0xd4f83d(){const _0x23865a=_0x1907cc([0x6c,0x6c,0x63,0x74,0x2d])+_0x29b673(_0xf0c720(_0x40074b)),_0x12bc4f=_0x633078(_0x29b673(window[_0x1907cc([0x4d,0x61,0x74,0x68])][_0x1907cc([0x63,0x65,0x69,0x6c])](_0xdc18ec/_0x467e51)));window[_0x1907cc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1907cc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x23865a,_0x12bc4f);}function _0x25660b(){const _0x14e889=_0x1907cc([0x6c,0x6c,0x63,0x74,0x2d])+_0x29b673(_0xf0c720(_0x40074b)),_0xaa00d7=window[_0x1907cc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1907cc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x14e889);return _0xaa00d7?window[_0x1907cc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x633078(_0xaa00d7),0x10)*_0x467e51:null;}function _0x1bc34b(_0x2e8f81){return new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4dde6f,_0x3370f4)=>{_0x2e8f81[_0x1907cc([0x74,0x68,0x65,0x6e])](_0x4dde6f,_0x3370f4),window[_0x1907cc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3370f4,0x2a988780^_0x31f345);});}}_0x310b15[_0x1907cc([0x6f,0x6e])](_0x1907cc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39217e,_0x4cf1e7)=>{if(_0x4cf1e7[0x0]!=_0x40074b)return _0x566e3b(_0x1907cc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cf1e7[0x1]={..._0x4cf1e7[0x1],[_0x1907cc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x475919};},{[_0x1907cc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1907cc([0x68,0x69,0x67,0x68])}),_0x310b15[_0x1907cc([0x6f,0x6e])](_0x1907cc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe08677=>{_0x2a62c5(_0xe08677[_0x1907cc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x220507=!0x0,_0x47384f(_0xe08677[_0x1907cc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1907cc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1907cc([0x6c,0x6f,0x77])}),_0x41f152[_0x1907cc([0x74,0x68,0x65,0x6e])](()=>{_0x220507||_0x566e3b(_0x1907cc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x33e6d6(){return _0x310b15[_0x1907cc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1907cc([0x76,0x69,0x65,0x77])][_0x1907cc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1907cc([0x61,0x75,0x74,0x6f]);}function _0xd5a36e(){_0x310b15[_0x1907cc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1907cc([0x76,0x69,0x65,0x77])][_0x1907cc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1907cc([0x61,0x75,0x74,0x6f]);}}function _0x5070cc(_0x5b1e39){const _0x6356d6=[new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x535df0=>setTimeout(_0x535df0,0x2a906d8c^_0x31f345)),_0x41f152[_0x1907cc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22b916=>{let _0x573184=0x0;_0x310b15[_0x1907cc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1907cc([0x6f,0x6e])](_0x1907cc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3bf2be,_0x45e6ee)=>{_0x45e6ee[0x0][_0x1907cc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x573184++,_0x573184==(0x2a9952b8^_0x31f345)&&(_0x22b916(),_0x3bf2be[_0x1907cc([0x6f,0x66,0x66])]());});}))];return window[_0x1907cc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1907cc([0x72,0x61,0x63,0x65])](_0x6356d6)[_0x1907cc([0x74,0x68,0x65,0x6e])](()=>_0x5b1e39);}async function _0x5af434(){await _0x41f152,_0x310b15[_0x1907cc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1907cc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2d981e,_0x310b15[_0x1907cc([0x6d,0x6f,0x64,0x65,0x6c])][_0x1907cc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2d981e,_0x310b15[_0x1907cc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1907cc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xb0ff9c(_0x37a6e7){const _0x57c0e7=_0x1649d4();_0x310b15[_0x57c0e7]=_0x1907cc([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x37a6e7,_0x37a6e7!=_0x1907cc([0x56,0x61,0x6c,0x69,0x64])&&_0x5af434();}function _0x1649d4(){const _0x1744a7=window[_0x1907cc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1907cc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1907cc([0x6e,0x6f,0x77])]())[_0x1907cc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1907cc([0x2e]),'');let _0x41cb07=_0x1907cc([0x4a]);for(let _0x48a870=0x0;_0x48a870<_0x1744a7[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x48a870+=0x2){let _0x23d356=window[_0x1907cc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1744a7[_0x1907cc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x48a870,_0x48a870+0x2));_0x23d356>=_0x121830[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x23d356-=_0x121830[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x41cb07+=_0x121830[_0x23d356];}return _0x41cb07;}function _0x559fe9(){const _0x2edec2=_0x4156ff[_0x1907cc([0x73,0x70,0x6c,0x69,0x74])](_0x1907cc([0x2e]));if(0x3!=_0x2edec2[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4a71e9(_0x2edec2[0x1]);function _0x4a71e9(_0x56ca3b){const _0x37229b=_0x47870c(_0x56ca3b);return _0x37229b&&_0x2b9ff1()?_0x37229b:null;function _0x2b9ff1(){const _0x3117be=_0x37229b[_0x1907cc([0x6a,0x74,0x69])],_0xc7d674=window[_0x1907cc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3117be[_0x1907cc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3117be[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xad7d3a={..._0x37229b,[_0x1907cc([0x6a,0x74,0x69])]:_0x3117be[_0x1907cc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3117be[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xad7d3a[_0x1907cc([0x76,0x63])],_0xf0c720(_0xad7d3a)==_0xc7d674;}}}async function _0x33cead(){let _0x10beb6=!0x0;try{const _0x100500=_0x4156ff[_0x1907cc([0x73,0x70,0x6c,0x69,0x74])](_0x1907cc([0x2e])),[_0x2322b1,_0x22e48b,_0x14c417]=_0x100500;return _0x12f840(_0x2322b1),await _0x521fba(_0x2322b1,_0x22e48b,_0x14c417),_0x10beb6;}catch(_0x19007b){return!0x1;}function _0x12f840(_0x5d1a3b){const _0x7767af=_0x47870c(_0x5d1a3b);_0x7767af&&_0x7767af[_0x1907cc([0x61,0x6c,0x67])]==_0x1907cc([0x45,0x53,0x32,0x35,0x36])||(_0x10beb6=!0x1);}async function _0x521fba(_0x30ad51,_0x512ef2,_0x48d336){const _0x1963d0=window[_0x1907cc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1907cc([0x66,0x72,0x6f,0x6d])](_0x3751fa(_0x48d336),_0x33ba83=>_0x33ba83[_0x1907cc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1d274a=new window[(_0x1907cc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1907cc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x30ad51+_0x1907cc([0x2e])+_0x512ef2),_0x491bba=window[_0x1907cc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1907cc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x491bba)return;const _0x17f5d0=await _0x491bba[_0x1907cc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1907cc([0x6a,0x77,0x6b]),_0x317e34,{[_0x1907cc([0x6e,0x61,0x6d,0x65])]:_0x1907cc([0x45,0x43,0x44,0x53,0x41]),[_0x1907cc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1907cc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1907cc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x491bba[_0x1907cc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1907cc([0x6e,0x61,0x6d,0x65])]:_0x1907cc([0x45,0x43,0x44,0x53,0x41]),[_0x1907cc([0x68,0x61,0x73,0x68])]:{[_0x1907cc([0x6e,0x61,0x6d,0x65])]:_0x1907cc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x17f5d0,_0x1963d0,_0x1d274a)||(_0x10beb6=!0x1);}}function _0x47870c(_0x32a663){return _0x32a663[_0x1907cc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1907cc([0x65,0x79]))?JSON[_0x1907cc([0x70,0x61,0x72,0x73,0x65])](_0x3751fa(_0x32a663)):null;}function _0x3751fa(_0x4bb31a){return window[_0x1907cc([0x61,0x74,0x6f,0x62])](_0x4bb31a[_0x1907cc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1907cc([0x2b]))[_0x1907cc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1907cc([0x2f])));}function _0xf0c720(_0x2f71ed){let _0x1e52e3=0x1505;function _0x7fd57e(_0x242883){for(let _0x273195=0x0;_0x273195<_0x242883[_0x1907cc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x273195++){const _0x2b9cd6=_0x242883[_0x1907cc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x273195);_0x1e52e3=(_0x1e52e3<<0x5)+_0x1e52e3+_0x2b9cd6,_0x1e52e3&=_0x1e52e3;}}function _0x582c09(_0x4627a){Array[_0x1907cc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4627a)?_0x4627a[_0x1907cc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x582c09):_0x4627a&&typeof _0x4627a==_0x1907cc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1907cc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4627a)[_0x1907cc([0x73,0x6f,0x72,0x74])]()[_0x1907cc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4be2d9,_0x5dad3e])=>{_0x7fd57e(_0x4be2d9),_0x582c09(_0x5dad3e);}):_0x7fd57e(window[_0x1907cc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4627a));}return _0x582c09(_0x2f71ed),_0x1e52e3>>>0x0;}function _0x29b673(_0x2c9e82){return _0x2c9e82[_0x1907cc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1907cc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1907cc([0x30]));}function _0x633078(_0x16d649){return _0x16d649[_0x1907cc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1907cc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1907cc([0x6a,0x6f,0x69,0x6e])]('');}function _0x2d981e(){}function _0x1907cc(_0x3fe64a){return _0x3fe64a['map'](_0x49ef96=>String['fromCharCode'](_0x49ef96))['join']('');}_0xb0ff9c(await _0x1f41a0());}(this);}['_initSchema'](){const _0x585fc3=this['editor']['model']['schema'];_0x585fc3['isRegistered']('imageBlock')&&_0x585fc3['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x585fc3['isRegistered']('imageInline')&&_0x585fc3['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3c13c7=this['editor'];_0x3c13c7['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3c13c7['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x300b4e=>_0x300b4e['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xd1004a=_0x3c13c7['commands']['get']('replaceImageSource');_0xd1004a&&this['listenTo'](_0xd1004a,'cleanupImage',(_0xe12bce,[_0x3a25d5,_0x2c2403])=>{_0x3a25d5['removeAttribute']('uploadcareImageId',_0x2c2403);});}['_initConfig'](){const _0x5e85d1=this['editor']['config']['get']('uploadcare.uploader')||{},_0x29603c=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4616ab(_0x325487['document'],'uc-config',{..._0x5e85d1,'pubkey':_0x29603c,'ctx-name':'uploader','sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x7b1721=>{if('closeMax'==_0x7b1721)return'#uc-icon-arrow-down';},_0x325487['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4616ab(_0x325487['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x325487['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x146d41=this['editor']['commands']['get']('insertImage');_0x146d41&&this['listenTo'](_0x146d41,'execute',()=>{const _0x10e1f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x10e1f7&&_0x10e1f7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x10e1f7);});});const _0x27fe8c=this['editor']['commands']['get']('uploadcareImageReplace');_0x27fe8c&&this['listenTo'](_0x27fe8c,'execute',()=>{const _0x5269a5=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5269a5&&_0x5269a5['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5269a5);});});}}class u extends _0x4fa6cf{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e4954){super(_0x3e4954),_0x3e4954['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x453fd5['defineComponents'](_0x453fd5);}}class ta extends _0x57561c{constructor(_0x11bda9){super(_0x11bda9);const t=_0x11bda9['t'],_0x346904=this['bindTemplate'],_0x2eb276=new _0x48ad02();_0x2eb276['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':[_0x2eb276,{'text':_0x346904['to']('imageUploadProgress',_0x5f0cd8=>t('Loading\x20image...')+'\x20('+(_0x5f0cd8||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class rt extends _0x57561c{constructor(_0x2e54d5){super(_0x2e54d5);const t=_0x2e54d5['t'];this['set']('errorType',null);const _0x123f76=new _0x216df5(_0x2e54d5);_0x123f76['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x123f76['withText']=!0x0,_0x123f76['class']='ck-button-action',_0x123f76['on']('execute',()=>{this['fire']('retry');}),_0x123f76['bind']('isVisible')['to'](this,'errorType',_0x1af622=>'NotFound'!==_0x1af622);const _0x7f6622=new et();_0x7f6622['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',_0x7f6622['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x1e37ce=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':[_0x7f6622,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x1e37ce['to']('errorType',_0x1430f6=>t('NotFound'!==_0x1430f6?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x123f76]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class tt extends _0x57561c{constructor(_0x1f4401,_0x175f86){super(_0x1f4401);const _0x56f040=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x175f86,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x56f040['to']('imageSrc')}});}}class ii extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3068b0,_0x196dac,_0x19dc80){super(_0x3068b0),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x3068b0),this['_errorView']=new rt(_0x3068b0),this['_editingView']=new tt(_0x3068b0,_0x19dc80),this['_focusableView']=new _0x57561c(_0x3068b0),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x196dac),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x27995a=>{this['_addUploadcareImageEditorListeners'](_0x27995a);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x5c87a4,_0x28f6a3){const _0x997f8f='uc-cloud-image-editor',_0x200730=_0x5c87a4['querySelector'](_0x997f8f);if(_0x200730)return _0x28f6a3(_0x200730);const _0x149c16=new MutationObserver(_0x2a8390=>{const _0x525917=_0x2a8390['filter'](_0x2b898b=>_0x2b898b['target']===_0x5c87a4&&_0x2b898b['addedNodes']['length']>0x0&&_0x2b898b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x997f8f);_0x525917['length']&&(_0x149c16['disconnect'](),_0x28f6a3(_0x525917[0x0]['addedNodes'][0x0]));});_0x149c16['observe'](_0x5c87a4,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2e4ae7){_0x2e4ae7['addEventListener']('apply',_0x205cb3=>{this['fire']('apply',{'imageSrc':_0x205cb3['detail']['cdnUrl']});}),_0x2e4ae7['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}var Z='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2025,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M1.201\x201C.538\x201\x200\x201.47\x200\x202.1v14.363c0\x20.64.534\x201.037\x201.186\x201.037H5.06l5.058-5.078L6.617\x209.15a.696.696\x200\x200\x200-.957-.033L1.5\x2013.6V2.5h15v4.354a3.478\x203.478\x200\x200\x201\x201.5.049V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.713\x202.803a2.147\x202.147\x200\x200\x200-2.049\x201.992\x202.14\x202.14\x200\x200\x200\x201.28\x202.096\x202.13\x202.13\x200\x200\x200\x202.642-3.11\x202.129\x202.129\x200\x200\x200-1.873-.978ZM8.089\x2017.635v2.388h2.389l7.046-7.046-2.39-2.39-7.045\x207.048Zm11.282-6.507a.637.637\x200\x200\x200\x20.139-.692.603.603\x200\x200\x200-.139-.205l-1.49-1.488a.63.63\x200\x200\x200-.899\x200l-1.166\x201.163\x202.39\x202.39\x201.165-1.168Z\x22/></svg>\x0a';class Q extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2ffc05(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5ca814,_0x4a999a,_0x1a3672){super(),this['_editor']=_0x5ca814,this['_dialog']=_0x4a999a,this['_imageElement']=_0x1a3672,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 _0xf6a11f=this['_imageElement'],_0x1ddc37=_0xf6a11f['getAttribute']('uploadcareImageId'),_0x8705be=_0xf6a11f['getAttribute']('src');if(_0x1ddc37)await this['_loadImageInfo'](_0x1ddc37,_0x8705be);else{if(this['_imageCache']['has'](_0x8705be)){const _0x1c1adb=this['_imageCache']['get'](_0x8705be);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1c1adb['url'],this['imageDimension']=_0x1c1adb['dimension'],this['imageId']=_0x1c1adb['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x40afe9}=this['_editor'],t=_0x40afe9['t'],_0x362606=new ii(_0x40afe9,this['imageStatus'],this['_attributes']);_0x362606['bind']('status')['to'](this,'imageStatus'),_0x362606['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x362606['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x362606['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x362606,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':Z,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x362606,'position':_0x25165b['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x362606['focus']();},'onHide':()=>{_0x362606['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4c36f3=>!M(_0x4c36f3,_0x362606['element'])}});}['_loadImageInfo'](_0x40e2da,_0x2e0e31){return C['getInfo'](_0x40e2da,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1d4361=>{const {width:_0x24991a,height:_0x23e9b6}=_0x1d4361['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2e0e31,this['imageDimension']={'width':_0x24991a,'height':_0x23e9b6},this['imageId']=_0x40e2da;})['catch'](_0x2da5aa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2da5aa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x289368,_0x1bc17c){return this['_getImageAsFile'](_0x289368)['then'](_0x7a21ef=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x1bc17c['signal'],'file':_0x7a21ef,'onProgress':_0x12eac7=>{_0x12eac7&&_0x12eac7['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x12eac7['value']));}}))['then'](_0x2b3c00=>{const {width:_0x470711,height:_0x2b7569}=_0x2b3c00['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2b3c00['cdnUrl'],this['imageDimension']={'width':_0x470711,'height':_0x2b7569},this['imageId']=_0x2b3c00['uuid'],this['imageUploadProgress']=null;const _0x5339ba=_0x289368['getAttribute']('src');this['_imageCache']['set'](_0x5339ba,{'id':_0x2b3c00['uuid'],'url':_0x2b3c00['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x36beac=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36beac['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2650cc,_0x13d9aa){_0x2650cc['on']('apply',(_0x3a1112,_0x2c9fc1)=>{this['_replaceImage'](_0x13d9aa,_0x2c9fc1['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2650cc['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2650cc['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1d1058,_0x217bbe,_0x5c71bb){const _0x113a79=this['_editor'],{width:_0x18443a,height:_0x5721b2}=F(_0x217bbe,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x269803,imageSources:_0x3a105f}=E(_0x217bbe,_0x18443a);_0x113a79['model']['change'](_0x580940=>{if('$graveyard'===_0x1d1058['root']['rootName']){_0x113a79['execute']('insertImage',{'imageType':_0x1d1058['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1d1058['getAttributes']()),'uploadcareImageId':_0x5c71bb,'src':_0x269803,'sources':_0x3a105f,'width':_0x18443a,'height':_0x5721b2}});const _0x2bf00b=_0x1d1058['getChildren']();_0x1d1058=_0x113a79['model']['document']['selection']['getSelectedElement']();for(const _0x4378e4 of _0x2bf00b)_0x580940['append'](_0x580940['cloneElement'](_0x4378e4),_0x1d1058);}else _0x580940['setSelection'](_0x1d1058,'on'),_0x113a79['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1d1058['getAttributes']()),'uploadcareImageId':_0x5c71bb,'src':_0x269803,'sources':_0x3a105f,'width':_0x18443a,'height':_0x5721b2},_0x1d1058);_0x580940['setSelection'](_0x1d1058,'on');});}async['_getImageAsFile'](_0x10bbc5){const _0x234d6b=_0x325487['window'],_0x3bffe8=_0x325487['document']['location']['href'],_0x17868c=new _0x234d6b['URL'](_0x10bbc5['getAttribute']('src'),_0x3bffe8);if('data:'===_0x17868c['protocol']){const _0x20c2c1=_0x17868c['href']['split'](','),_0x4792fd=_0x20c2c1[0x0]['match'](/:(.*?);/)[0x1],_0xe24a27=_0x4792fd['split']('/')[0x1],_0x202513=_0x234d6b['atob'](_0x20c2c1[_0x20c2c1['length']-0x1]);let _0x391c3f=_0x202513['length'];const _0x1da8e1=new _0x234d6b['Uint8Array'](_0x391c3f);for(;_0x391c3f--;)_0x1da8e1[_0x391c3f]=_0x202513['charCodeAt'](_0x391c3f);return new _0x234d6b['File']([_0x1da8e1],'image.'+_0xe24a27,{'type':_0x4792fd});}const _0x50d7ea=_0x17868c['href']['split']('/'),_0xe4cdc=_0x50d7ea[_0x50d7ea['length']-0x1],_0x90b94e=_0xe4cdc['split']('.')[0x1];return _0x234d6b['fetch'](_0x17868c['href'])['then'](_0x4c2721=>_0x4c2721['clone']()['blob']())['then'](_0x244cc1=>new _0x234d6b['File']([_0x244cc1],_0xe4cdc,{'type':'image/'+_0x90b94e}));}}class W extends _0x3171b5{['imageEditController'];static get['requires'](){return[_0x40a942];}['_isEditable'];constructor(_0x47f034){super(_0x47f034),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x824b69){const _0x3f6afb=R(_0x824b69);return _0xb74cf6=>!(!_0xb74cf6||!_0xb74cf6['is']('element','imageBlock')&&!_0xb74cf6['is']('element','imageInline'))&&(!!_0xb74cf6['hasAttribute']('uploadcareImageId')||!!_0xb74cf6['hasAttribute']('src')&&_0x3f6afb(_0xb74cf6['getAttribute']('src')));}(_0x47f034['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x1f6b65=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x1f6b65);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x13d402=this['editor']['model']['document']['selection']['getSelectedElement']();_0x13d402&&(_0x13d402['is']('element','imageBlock')||_0x13d402['is']('element','imageInline'))&&(this['imageEditController']=new Q(this['editor'],this['editor']['plugins']['get'](_0x40a942),_0x13d402),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class Y extends _0x3171b5{['refresh'](){const _0x5950dd=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x5950dd&&(_0x5950dd['is']('element','imageBlock')||_0x5950dd['is']('element','imageInline')));}['execute'](_0x41259c){const _0x3969e8=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x39cca7=>{_0x39cca7['setAttributes'](_0x41259c,_0x3969e8),_0x39cca7['removeAttribute']('srcset',_0x3969e8),_0x39cca7['removeAttribute']('sizes',_0x3969e8);});}}class m extends _0x4fa6cf{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x10443b,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x51fd1}=this;_0x51fd1['commands']['add']('uploadcareImageEdit',new W(_0x51fd1)),_0x51fd1['commands']['add']('uploadcareImageReplace',new Y(_0x51fd1));}}class g extends _0x4fa6cf{['_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 _0x257d48=this['editor'];_0x257d48['ui']['componentFactory']['add']('uploadcareImageEdit',_0x30336c=>{const _0x37d69a=_0x257d48['commands']['get']('uploadcareImageEdit'),_0x154ee0=new _0x216df5(_0x30336c),t=_0x30336c['t'];return _0x154ee0['set']({'icon':Z,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x154ee0['bind']('isEnabled')['to'](_0x37d69a),_0x154ee0['bind']('isOn')['to'](_0x37d69a,'isActive'),this['listenTo'](_0x154ee0,'execute',()=>{_0x257d48['execute']('uploadcareImageEdit'),_0x257d48['editing']['view']['focus']();}),_0x154ee0;}),this['_initConfig']();}['_initConfig'](){const _0xea39f4=_0x4616ab(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xea39f4),this['listenTo'](this['editor'],'destroy',()=>{_0xea39f4['remove']();});}}class j extends _0x4fa6cf{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,j as UploadcareImageEdit,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Insert with Dropbox": "The label for the insert image with Dropbox dropdown button.",
|
|
3
|
+
"Replace with Dropbox": "The label for the replace image with Dropbox dropdown button.",
|
|
4
|
+
"With Dropbox": "The label for the insert image with Dropbox menu bar button (inside 'Image' menu).",
|
|
5
|
+
"Insert with Facebook": "The label for the insert image with Facebook dropdown button.",
|
|
6
|
+
"Replace with Facebook": "The label for the replace image with Facebook dropdown button.",
|
|
7
|
+
"With Facebook": "The label for the insert image with Facebook menu bar button (inside 'Image' menu).",
|
|
8
|
+
"Insert with Google Drive": "The label for the insert image with Google Drive dropdown button.",
|
|
9
|
+
"Replace with Google Drive": "The label for the replace image with Google Drive dropdown button.",
|
|
10
|
+
"With Google Drive": "The label for the insert image with Google Drive menu bar button (inside 'Image' menu).",
|
|
11
|
+
"Insert with Google Photos": "The label for the insert image with Google Photos dropdown button.",
|
|
12
|
+
"Replace with Google Photos": "The label for the replace image with Google Photos dropdown button.",
|
|
13
|
+
"With Google Photos": "The label for the insert image with Google Photos menu bar button (inside 'Image' menu).",
|
|
14
|
+
"Insert with Instagram": "The label for the insert image with Instagram dropdown button.",
|
|
15
|
+
"Replace with Instagram": "The label for the replace image with Instagram dropdown button.",
|
|
16
|
+
"With Instagram": "The label for the insert image with Instagram menu bar button (inside 'Image' menu).",
|
|
17
|
+
"Insert with OneDrive": "The label for the insert image with OneDrive dropdown button.",
|
|
18
|
+
"Replace with OneDrive": "The label for the replace image with OneDrive dropdown button.",
|
|
19
|
+
"With OneDrive": "The label for the insert image with OneDrive menu bar button (inside 'Image' menu).",
|
|
20
|
+
"Replace via URL": "The label for the replace image via URL dropdown button.",
|
|
21
|
+
"Edit Image (Uploadcare)": "The label for the image edit button and dialog.",
|
|
22
|
+
"Loading image...": "The label shown in the image edit dialog when the image is being uploaded.",
|
|
23
|
+
"Unable to load": "The main text shown in the image edit dialog when the image upload failed.",
|
|
24
|
+
"We were unable to load the image due to network connection issues.": "The detailed information shown in the image edit dialog when the image upload failed.",
|
|
25
|
+
"Try again (Uploadcare)": "The label of a button shown in the image edit dialog when the image upload fails.",
|
|
26
|
+
"The image was not found. Its source may have been removed.": "The detailed information shown in the image edit dialog when the image upload fails due to 'NotFound' error."
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
+
"version": "0.0.0-nightly-20250129.1",
|
|
4
|
+
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
+
"author": "CKSource (http://cksource.com/)",
|
|
7
|
+
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"CKEditor",
|
|
10
|
+
"ckeditor5",
|
|
11
|
+
"ckeditor 5",
|
|
12
|
+
"WYSIWYG",
|
|
13
|
+
"WYSIWYW",
|
|
14
|
+
"text",
|
|
15
|
+
"rich-text",
|
|
16
|
+
"richtext",
|
|
17
|
+
"editor",
|
|
18
|
+
"editing",
|
|
19
|
+
"html",
|
|
20
|
+
"operational transformation",
|
|
21
|
+
"ot",
|
|
22
|
+
"Uploadcare",
|
|
23
|
+
"framework"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250129.1",
|
|
27
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20250129.1",
|
|
28
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250129.1",
|
|
29
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250129.1",
|
|
30
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250129.1",
|
|
31
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250129.1",
|
|
32
|
+
"ckeditor5": "0.0.0-nightly-20250129.1",
|
|
33
|
+
"@uploadcare/file-uploader": "1.12.0",
|
|
34
|
+
"@uploadcare/upload-client": "6.14.1"
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": [
|
|
37
|
+
"*.css",
|
|
38
|
+
"build/**/*.js",
|
|
39
|
+
"dist/translations/*.umd.js"
|
|
40
|
+
],
|
|
41
|
+
"type": "module",
|
|
42
|
+
"main": "src/index.js",
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"lang",
|
|
46
|
+
"src/**/*.js",
|
|
47
|
+
"src/**/*.d.ts",
|
|
48
|
+
"theme",
|
|
49
|
+
"build",
|
|
50
|
+
"ckeditor5-metadata.json",
|
|
51
|
+
"CHANGELOG.md"
|
|
52
|
+
],
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://support.ckeditor.com/hc/en-us/requests/new"
|
|
55
|
+
},
|
|
56
|
+
"types": "src/index.d.ts",
|
|
57
|
+
"exports": {
|
|
58
|
+
".": {
|
|
59
|
+
"types": "./src/index.d.ts",
|
|
60
|
+
"import": "./src/index.js",
|
|
61
|
+
"default": "./src/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./dist/*": {
|
|
64
|
+
"types": "./src/index.d.ts",
|
|
65
|
+
"import": "./dist/*",
|
|
66
|
+
"default": "./dist/*"
|
|
67
|
+
},
|
|
68
|
+
"./src/*": {
|
|
69
|
+
"types": "./src/*.d.ts",
|
|
70
|
+
"import": "./src/*",
|
|
71
|
+
"default": "./src/*"
|
|
72
|
+
},
|
|
73
|
+
"./build/*": "./build/*",
|
|
74
|
+
"./lang/*": "./lang/*",
|
|
75
|
+
"./theme/*": "./theme/*",
|
|
76
|
+
"./ckeditor5-metadata.json": "./ckeditor5-metadata.json",
|
|
77
|
+
"./package.json": "./package.json"
|
|
78
|
+
},
|
|
79
|
+
"obfuscated": true
|
|
80
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { Uploadcare, UploadcareEditing, UploadcareCommand, UploadcareConfig } from './index.js';
|
|
6
|
+
import type UploadcareImageEditCommand from './uploadcareimageedit/uploadcareimageeditcommand.js';
|
|
7
|
+
import type UploadcareImageEdit from './uploadcareimageedit.js';
|
|
8
|
+
import type UploadcareImageEditEditing from './uploadcareimageedit/uploadcareimageeditediting.js';
|
|
9
|
+
import type UploadcareImageEditUI from './uploadcareimageedit/uploadcareimageeditui.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the {@link module:uploadcare/uploadcare~Uploadcare Uploadcare feature}.
|
|
14
|
+
*
|
|
15
|
+
* Read more in {@link module:uploadcare/uploadcareconfig~UploadcareConfig}.
|
|
16
|
+
*/
|
|
17
|
+
uploadcare?: UploadcareConfig;
|
|
18
|
+
}
|
|
19
|
+
interface PluginsMap {
|
|
20
|
+
[Uploadcare.pluginName]: Uploadcare;
|
|
21
|
+
[UploadcareEditing.pluginName]: UploadcareEditing;
|
|
22
|
+
[UploadcareImageEdit.pluginName]: UploadcareImageEdit;
|
|
23
|
+
[UploadcareImageEditEditing.pluginName]: UploadcareImageEditEditing;
|
|
24
|
+
[UploadcareImageEditUI.pluginName]: UploadcareImageEditUI;
|
|
25
|
+
}
|
|
26
|
+
interface CommandsMap {
|
|
27
|
+
uploadcare: UploadcareCommand;
|
|
28
|
+
uploadcareImageEdit: UploadcareImageEditCommand;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare
|
|
7
|
+
*/
|
|
8
|
+
export { default as Uploadcare } from './uploadcare.js';
|
|
9
|
+
export { default as UploadcareEditing } from './uploadcareediting.js';
|
|
10
|
+
export { default as UploadcareUI } from './uploadcareui.js';
|
|
11
|
+
export { default as UploadcareImageEdit } from './uploadcareimageedit.js';
|
|
12
|
+
export { default as UploadcareImageEditUI } from './uploadcareimageedit/uploadcareimageeditui.js';
|
|
13
|
+
export { default as UploadcareImageEditEditing } from './uploadcareimageedit/uploadcareimageeditediting.js';
|
|
14
|
+
export type { default as UploadcareCommand } from './uploadcarecommand.js';
|
|
15
|
+
export type { UploadcareConfig, UploadcareSource, UploadcareAssetImageDefinition } from './uploadcareconfig.js';
|
|
16
|
+
import './augmentation.js';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x38d42c,_0x2c4846){var _0x2fc8ee=_0x50ce,_0x165fc9=_0x38d42c();while(!![]){try{var _0x4a7fc6=-parseInt(_0x2fc8ee(0x17b))/0x1*(parseInt(_0x2fc8ee(0x177))/0x2)+-parseInt(_0x2fc8ee(0x176))/0x3+parseInt(_0x2fc8ee(0x172))/0x4*(parseInt(_0x2fc8ee(0x175))/0x5)+-parseInt(_0x2fc8ee(0x178))/0x6+parseInt(_0x2fc8ee(0x17a))/0x7*(parseInt(_0x2fc8ee(0x174))/0x8)+-parseInt(_0x2fc8ee(0x173))/0x9+parseInt(_0x2fc8ee(0x179))/0xa;if(_0x4a7fc6===_0x2c4846)break;else _0x165fc9['push'](_0x165fc9['shift']());}catch(_0x32b686){_0x165fc9['push'](_0x165fc9['shift']());}}}(_0x526b,0xd7166));export{default as Uploadcare}from'./uploadcare.js';function _0x526b(){var _0xcd4607=['1364822LzUNHA','6244848MLNWxP','22387490jpyekI','6013AAhySP','1psybAs','26008FMeqXO','2214378DgIAYR','4648jDHFfV','505TGALOD','1632813itcjwA'];_0x526b=function(){return _0xcd4607;};return _0x526b();}export{default as UploadcareEditing}from'./uploadcareediting.js';export{default as UploadcareUI}from'./uploadcareui.js';export{default as UploadcareImageEdit}from'./uploadcareimageedit.js';export{default as UploadcareImageEditUI}from'./uploadcareimageedit/uploadcareimageeditui.js';export{default as UploadcareImageEditEditing}from'./uploadcareimageedit/uploadcareimageeditediting.js';function _0x50ce(_0x50e180,_0x2cbb68){var _0x526b43=_0x526b();return _0x50ce=function(_0x50ce59,_0x2a7466){_0x50ce59=_0x50ce59-0x172;var _0x5e9a7c=_0x526b43[_0x50ce59];return _0x5e9a7c;},_0x50ce(_0x50e180,_0x2cbb68);}import'./augmentation.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { UploadcareSource } from '../uploadcareconfig.js';
|
|
7
|
+
import type UploadcareEditing from '../uploadcareediting.js';
|
|
8
|
+
declare const UploadcareController_base: {
|
|
9
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
10
|
+
prototype: import("ckeditor5/src/utils.js").Observable; /**
|
|
11
|
+
* Creates the Uploadcare form view and opens a dialog wit it.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The Uploadcare controller. It is used by the {@link module:uploadcare/uploadcarecommand~UploadcareCommand Uploadcare command}
|
|
18
|
+
* to initialize the uploading flow. The controller opens the dialog with the context of the chosen uploading source.
|
|
19
|
+
*/
|
|
20
|
+
export default class UploadcareController extends /* #__PURE__ -- @preserve */ UploadcareController_base {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
constructor(editor: Editor, editing: UploadcareEditing, source: UploadcareSource);
|
|
25
|
+
/**
|
|
26
|
+
* Destroys the controller and its components.
|
|
27
|
+
*/
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0xeec4bf=_0x25d2;(function(_0x1ba72a,_0xe30d5d){const _0x79f147=_0x25d2,_0x208812=_0x1ba72a();while(!![]){try{const _0x4ec13b=-parseInt(_0x79f147(0x121))/0x1+parseInt(_0x79f147(0xfa))/0x2+parseInt(_0x79f147(0xff))/0x3+-parseInt(_0x79f147(0x113))/0x4+-parseInt(_0x79f147(0x127))/0x5*(parseInt(_0x79f147(0x100))/0x6)+parseInt(_0x79f147(0x12f))/0x7*(parseInt(_0x79f147(0x108))/0x8)+parseInt(_0x79f147(0x110))/0x9;if(_0x4ec13b===_0xe30d5d)break;else _0x208812['push'](_0x208812['shift']());}catch(_0x1c698f){_0x208812['push'](_0x208812['shift']());}}}(_0x213c,0xeaaad));import{icons as _0x249a92}from'ckeditor5/src/core.js';import{ObservableMixin as _0x560979}from'ckeditor5/src/utils.js';import{Dialog as _0x43ca1c,DialogViewPosition as _0x39050b}from'ckeditor5/src/ui.js';import _0xf4cbd8 from'./uploadcareformview.js';import{UploadcareSource as _0x25f06e}from'../uploadcareconfig.js';function _0x25d2(_0x33df6a,_0x41d6e8){const _0x213cd7=_0x213c();return _0x25d2=function(_0x25d2a5,_0x23584b){_0x25d2a5=_0x25d2a5-0xed;let _0x4842e5=_0x213cd7[_0x25d2a5];return _0x4842e5;},_0x25d2(_0x33df6a,_0x41d6e8);}import{getTranslation as _0x39af42}from'../utils/common-translations.js';import{getImageUrls as _0x2de285,getImageDimension as _0x3bfd6d}from'../utils/editingutils.js';function _0x213c(){const _0x4dd46c=['_type','Replace','uploadCare','addEventListener','_dialog','initFlow','30709kfeQJq','setAttribute','imageInline','view','image','text','5LLWOnH','model','_insertImage','show','attributes','removeAllFiles','stopDelegating','imageInfo','1218IRANIv','width','imageBlock','insertImage','execute','getSelectedElement','_initListeners','configElement','allEntries','editing','ctxElement','linkHref','done-click','element','destroy','_editing','plugins','get','setSelection','change','2003166MpGuUI','idle','document','isOpen','focus','2456157qosOqd','6964332QPRRIr','length','_initDialog','_editor','doneFlow','imageUpload','status','detail','34360EEXARV','Local','uuid','EDITOR_TOP_CENTER','_insertAsset','Insert','getAPI','_api','3848229ziwDna','hide','source-list','3370340lwGnQY','getOutputCollectionState','stopListening','setCurrentActivity','selection','getLastPosition','_formView','removeSelectionAttribute'];_0x213c=function(){return _0x4dd46c;};return _0x213c();}import{isAncestor as _0x281c68}from'../utils/isancestor.js';export default class h extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x560979(){constructor(_0x328b13,_0x161ec2,_0x4ed566){const _0x11ce7e=_0x25d2;super(),this[_0x11ce7e(0x11b)]=null,this[_0x11ce7e(0x119)]=null,this[_0x11ce7e(0x103)]=_0x328b13,this[_0x11ce7e(0xf5)]=_0x161ec2,this[_0x11ce7e(0x11f)]=_0x328b13[_0x11ce7e(0xf6)][_0x11ce7e(0xf7)](_0x43ca1c),this[_0x11ce7e(0x10f)]=_0x161ec2[_0x11ce7e(0xf0)][_0x11ce7e(0x10e)](),this[_0x11ce7e(0x11b)]=_0x4ed566,this[_0x11ce7e(0xf5)][_0x11ce7e(0xed)][_0x11ce7e(0x122)](_0x11ce7e(0x112),this[_0x11ce7e(0x11b)]),this[_0x11ce7e(0x102)](),this[_0x11ce7e(0x135)](),this[_0x11ce7e(0x10f)][_0x11ce7e(0x120)]();}[_0xeec4bf(0xf4)](){const _0x5d519e=_0xeec4bf;this[_0x5d519e(0x119)]&&(this[_0x5d519e(0x119)][_0x5d519e(0xf4)](),this[_0x5d519e(0x119)]=null),this[_0x5d519e(0x10f)]&&this[_0x5d519e(0x10f)][_0x5d519e(0x104)](),this[_0x5d519e(0x115)](),this[_0x5d519e(0x12d)]();}[_0xeec4bf(0x102)](){const _0x28b3a0=_0xeec4bf,{locale:_0x2e1621,model:_0x15b8d1}=this[_0x28b3a0(0x103)],_0x15f8f8=_0x15b8d1[_0x28b3a0(0xfc)][_0x28b3a0(0x117)][_0x28b3a0(0x134)](),_0x5d77ea=_0x15f8f8&&(_0x15f8f8['is'](_0x28b3a0(0xf3),_0x28b3a0(0x131))||_0x15f8f8['is'](_0x28b3a0(0xf3),_0x28b3a0(0x123)));this[_0x28b3a0(0x119)]=new _0xf4cbd8(_0x2e1621),this[_0x28b3a0(0x11f)][_0x28b3a0(0x12a)]({'id':_0x28b3a0(0x11d),'icon':_0x249a92[_0x28b3a0(0x105)],'title':_0x39af42(_0x2e1621,this[_0x28b3a0(0x11b)],_0x5d77ea?_0x28b3a0(0x11c):_0x28b3a0(0x10d))[_0x28b3a0(0x126)],'content':this[_0x28b3a0(0x119)],'position':_0x39050b[_0x28b3a0(0x10b)],'isModal':!0x0,'onShow':()=>{const _0x2e232e=_0x28b3a0;this[_0x2e232e(0x119)][_0x2e232e(0xfe)]();},'onHide':()=>{const _0x3f1715=_0x28b3a0;this[_0x3f1715(0x10f)][_0x3f1715(0x12c)](),this[_0x3f1715(0x103)][_0x3f1715(0xef)][_0x3f1715(0x124)][_0x3f1715(0xfe)](),this[_0x3f1715(0xf4)]();},'keystrokeHandlerOptions':{'filter':_0x4638f4=>!_0x281c68(_0x4638f4,this[_0x28b3a0(0x119)][_0x28b3a0(0xf3)])}});}[_0xeec4bf(0x135)](){const _0x17f036=_0xeec4bf;this[_0x17f036(0xf5)][_0x17f036(0xf0)][_0x17f036(0x11e)](_0x17f036(0xf2),()=>{const _0x2e2afa=_0x17f036,{allEntries:_0x359cd7}=this[_0x2e2afa(0x10f)][_0x2e2afa(0x114)]();this[_0x2e2afa(0x103)][_0x2e2afa(0x128)][_0x2e2afa(0xf9)](_0x106fa0=>{const _0xd7b4c7=_0x2e2afa,_0x5b6bb6=_0x359cd7[_0xd7b4c7(0x101)];for(const _0x5efcfa of _0x359cd7){const _0x1eb84e=_0x5efcfa===_0x359cd7[_0x5b6bb6-0x1],{cdnUrl:_0x1439db,fileInfo:_0x34eee4}=_0x5efcfa;if(!_0x1439db||!_0x34eee4)continue;const {width:_0x178db8,height:_0x53a803}=_0x34eee4[_0xd7b4c7(0x12e)],_0x58b2da=_0x3bfd6d(_0x1439db,_0x178db8,_0x53a803),_0x2f2d4e=_0x2de285(_0x1439db,_0x58b2da[_0xd7b4c7(0x130)]),_0x2eab43={'id':_0x34eee4[_0xd7b4c7(0x10a)],'type':_0xd7b4c7(0x125),'attributes':{'imageDimension':_0x58b2da,..._0x2f2d4e}};this[_0xd7b4c7(0x10c)](_0x2eab43,_0x1eb84e,_0x106fa0);}}),this[_0x2e2afa(0x11f)][_0x2e2afa(0x111)]();}),this[_0x17f036(0xf5)][_0x17f036(0xf0)][_0x17f036(0x11e)](_0x17f036(0xf9),_0x5a8171=>{const _0x46c1e1=_0x17f036;_0x46c1e1(0xfb)===_0x5a8171[_0x46c1e1(0x107)][_0x46c1e1(0x106)]&&!_0x5a8171[_0x46c1e1(0x107)][_0x46c1e1(0xee)][_0x46c1e1(0x101)]&&this[_0x46c1e1(0x11f)][_0x46c1e1(0xfd)]&&(this[_0x46c1e1(0x11b)]===_0x25f06e[_0x46c1e1(0x109)]?this[_0x46c1e1(0x10f)][_0x46c1e1(0x116)](_0x25f06e[_0x46c1e1(0x109)]):this[_0x46c1e1(0x10f)][_0x46c1e1(0x120)]());});}[_0xeec4bf(0x10c)](_0x38fc79,_0x3f3359,_0x51bdaf){const _0x4b0cf4=_0xeec4bf,_0x14717c=this[_0x4b0cf4(0x103)][_0x4b0cf4(0x128)][_0x4b0cf4(0xfc)][_0x4b0cf4(0x117)],_0x21c98a=_0x14717c[_0x4b0cf4(0x134)](),_0xb7be97=!(!_0x21c98a||!_0x21c98a['is'](_0x4b0cf4(0xf3),_0x4b0cf4(0x123)));_0x51bdaf[_0x4b0cf4(0x11a)](_0x4b0cf4(0xf1)),this[_0x4b0cf4(0x129)](_0x38fc79,_0xb7be97),_0x3f3359||_0x51bdaf[_0x4b0cf4(0xf8)](_0x14717c[_0x4b0cf4(0x118)]());}[_0xeec4bf(0x129)](_0x31ad24,_0x3575aa){const _0x574d56=_0xeec4bf,_0x4fa2e3=this[_0x574d56(0x103)],{imageDimension:_0xdba068,imageFallbackUrl:_0xb35dce,imageSources:_0x79769e}=_0x31ad24[_0x574d56(0x12b)];_0x4fa2e3[_0x574d56(0x133)](_0x574d56(0x132),{'imageType':_0x3575aa?_0x574d56(0x123):null,'source':{'uploadcareImageId':_0x31ad24['id'],'src':_0xb35dce,'sources':_0x79769e,..._0xdba068}});}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/ui/uploadcareformview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import DialogFocusManagerView from '../utils/dialogfocusmanagerview.js';
|
|
10
|
+
import '../../theme/uploadcare-form.css';
|
|
11
|
+
/**
|
|
12
|
+
* A class representing the form view of the Uploadcare feature.
|
|
13
|
+
*/
|
|
14
|
+
export default class UploadcareFormView extends DialogFocusManagerView {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
constructor(locale: Locale);
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
focus(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var _0x13b826=_0x4434;function _0x4434(_0x13be99,_0x2ba1be){var _0x3387d5=_0x3387();return _0x4434=function(_0x4434f5,_0x3dbf4b){_0x4434f5=_0x4434f5-0xbc;var _0x380a62=_0x3387d5[_0x4434f5];return _0x380a62;},_0x4434(_0x13be99,_0x2ba1be);}(function(_0xd964d1,_0x2861d9){var _0x40c6d7=_0x4434,_0x554b1b=_0xd964d1();while(!![]){try{var _0x325cd7=parseInt(_0x40c6d7(0xd2))/0x1*(-parseInt(_0x40c6d7(0xca))/0x2)+-parseInt(_0x40c6d7(0xc9))/0x3*(parseInt(_0x40c6d7(0xbf))/0x4)+parseInt(_0x40c6d7(0xbd))/0x5*(-parseInt(_0x40c6d7(0xc8))/0x6)+-parseInt(_0x40c6d7(0xc5))/0x7*(-parseInt(_0x40c6d7(0xc3))/0x8)+parseInt(_0x40c6d7(0xc7))/0x9+-parseInt(_0x40c6d7(0xcf))/0xa*(-parseInt(_0x40c6d7(0xcd))/0xb)+-parseInt(_0x40c6d7(0xce))/0xc;if(_0x325cd7===_0x2861d9)break;else _0x554b1b['push'](_0x554b1b['shift']());}catch(_0x2a07d7){_0x554b1b['push'](_0x554b1b['shift']());}}}(_0x3387,0x5b3cf));function _0x3387(){var _0x16a203=['ck-uploadcare-theme','div','290609NeDqKO','6929736lZZEWY','90Eyjhin','ck-reset_all-excluded','uc-file-uploader-inline','3PFbMsr','setTemplate','154280cjPFRB','getFocusableElement','3432QxzQsu','element','focus','uc-light','104yeeVqg','ck-uploadcare-form','194593VDyUie','uploader','5485968nFwvce','6yGvXuQ','669lsxttE','23554NrvBNA'];_0x3387=function(){return _0x16a203;};return _0x3387();}import _0xe09b52 from'../utils/dialogfocusmanagerview.js';import'../../theme/uploadcare-form.css';export default class S extends _0xe09b52{constructor(_0x5db7a9){var _0x38f5ae=_0x4434;super(_0x5db7a9),this[_0x38f5ae(0xbc)]({'tag':_0x38f5ae(0xcc),'attributes':{'class':['ck',_0x38f5ae(0xd0),_0x38f5ae(0xc4)],'tabindex':'-1'},'children':[{'tag':_0x38f5ae(0xd1),'attributes':{'class':[_0x38f5ae(0xc2),_0x38f5ae(0xcb)],'ctx-name':_0x38f5ae(0xc6)}},this[_0x38f5ae(0xbe)]()]});}[_0x13b826(0xc1)](){var _0x58bbe7=_0x13b826;this[_0x58bbe7(0xc0)][_0x58bbe7(0xc1)]();}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcare
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import UploadcareUI from './uploadcareui.js';
|
|
11
|
+
import UploadcareEditing from './uploadcareediting.js';
|
|
12
|
+
import * as UC from '@uploadcare/file-uploader';
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
'uc-config': HTMLElement;
|
|
16
|
+
'uc-upload-ctx-provider': UC.UploaderBlock;
|
|
17
|
+
'uc-file-uploader-inline': UC.FileUploaderInline;
|
|
18
|
+
'uc-cloud-image-editor': UC.CloudImageEditor;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The Uploadcare feature, a bridge between the CKEditor 5 WYSIWYG editor and the Uploadcare file uploader.
|
|
23
|
+
*
|
|
24
|
+
* Check out the {@glink features/images/image-upload/image-upload Image upload} guide to learn about other ways to upload
|
|
25
|
+
* images into CKEditor 5.
|
|
26
|
+
*/
|
|
27
|
+
export default class Uploadcare extends Plugin {
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get requires(): readonly [typeof UploadcareEditing, typeof UploadcareUI];
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get pluginName(): "Uploadcare";
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
static get isOfficialPlugin(): true;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
static get isPremiumPlugin(): true;
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
constructor(editor: Editor);
|
|
48
|
+
}
|