UNPKG

@ckeditor/ckeditor5-case-change

Version:

Case change feature for CKEditor 5.

23 lines 6.22 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x54a259=_0x3405;function _0x3405(_0x2cee49,_0x39c00b){const _0x116796=_0x1167();return _0x3405=function(_0x3405ad,_0x15beda){_0x3405ad=_0x3405ad-0x1aa;let _0x2f3190=_0x116796[_0x3405ad];return _0x2f3190;},_0x3405(_0x2cee49,_0x39c00b);}(function(_0x3613ef,_0x2e4a9c){const _0x365e5b=_0x3405,_0x36c4b5=_0x3613ef();while(!![]){try{const _0x441ba1=parseInt(_0x365e5b(0x1b8))/0x1+-parseInt(_0x365e5b(0x1bd))/0x2+-parseInt(_0x365e5b(0x1c6))/0x3*(parseInt(_0x365e5b(0x1d6))/0x4)+-parseInt(_0x365e5b(0x1b2))/0x5+-parseInt(_0x365e5b(0x1ae))/0x6+parseInt(_0x365e5b(0x1c2))/0x7*(-parseInt(_0x365e5b(0x1ad))/0x8)+-parseInt(_0x365e5b(0x1e0))/0x9*(-parseInt(_0x365e5b(0x1d5))/0xa);if(_0x441ba1===_0x2e4a9c)break;else _0x36c4b5['push'](_0x36c4b5['shift']());}catch(_0x49ad7f){_0x36c4b5['push'](_0x36c4b5['shift']());}}}(_0x1167,0x728c3));import{Command as _0x34f85e}from'ckeditor5/src/core.js';function _0x1167(){const _0xa7e117=['startOffset','912065GiCVyQ','_getElementsAllowingText','getAttributes','item','createRangeOn','editor','308475JNjRZG','data','getIntersection','reduce','createRangeIn','702262FWizJR','execute','setSelection','_modifyContent','from','5311362GkmDfM','$textProxy','_getAffectedRanges','selection','16923HIljaD','change','refresh','_getElementTextContent','parent','$text','checkChild','getFirstPosition','document','getChildren','isLimit','insertContent','add','endOffset','schema','110hyfALa','108KhfZAf','_findAncestorTextBlock','has','isCollapsed','createSelection','getRanges','_getTextNodesRangeLimited','_replaceTextNodeData','substring','isEnabled','1720395TFzGhV','getWalker','getItems','model','element','8VqWums','2984256yShlon','createText','_transformCallback'];_0x1167=function(){return _0xa7e117;};return _0x1167();}export class CaseChangeCommand extends _0x34f85e{[_0x54a259(0x1b0)];constructor(_0x153488,_0x198682){const _0x2a7988=_0x54a259;super(_0x153488),this[_0x2a7988(0x1b0)]=_0x198682;}[_0x54a259(0x1be)](){const _0x50dc6e=_0x54a259,_0x371d82=this[_0x50dc6e(0x1b7)][_0x50dc6e(0x1ab)],_0x24dd7e=Array[_0x50dc6e(0x1c1)](this[_0x50dc6e(0x1c4)]()),_0x5bcd4a=Array[_0x50dc6e(0x1c1)](_0x371d82[_0x50dc6e(0x1ce)][_0x50dc6e(0x1c5)][_0x50dc6e(0x1db)]());_0x371d82[_0x50dc6e(0x1c7)](_0x248324=>{const _0x564d0b=_0x50dc6e;for(const _0x236b84 of _0x24dd7e)this[_0x564d0b(0x1c0)](_0x236b84,_0x248324);_0x248324[_0x564d0b(0x1bf)](_0x5bcd4a);});}[_0x54a259(0x1c8)](){const _0x37f1f9=_0x54a259;for(const _0x3dca94 of this[_0x37f1f9(0x1c4)]())for(const _0x13e7fb of _0x3dca94)if(_0x13e7fb[_0x37f1f9(0x1b5)]['is'](_0x37f1f9(0x1c3)))return void(this[_0x37f1f9(0x1df)]=!0x0);this[_0x37f1f9(0x1df)]=!0x1;}[_0x54a259(0x1c4)](){const _0x5838f6=_0x54a259,_0x3cc1db=this[_0x5838f6(0x1b7)][_0x5838f6(0x1ab)],_0x13e1cf=_0x3cc1db[_0x5838f6(0x1ce)][_0x5838f6(0x1c5)];if(_0x13e1cf[_0x5838f6(0x1d9)]){const _0x63e648=this[_0x5838f6(0x1d7)](_0x13e1cf[_0x5838f6(0x1cd)]()[_0x5838f6(0x1ca)]);return _0x63e648?[_0x3cc1db[_0x5838f6(0x1bc)](_0x63e648)]:[];}return _0x13e1cf[_0x5838f6(0x1db)]();}[_0x54a259(0x1c0)](_0x42259b,_0x53e00e){const _0xa597e0=_0x54a259;for(const _0x1beea0 of this[_0xa597e0(0x1b3)](_0x42259b)){const _0x461a43=this[_0xa597e0(0x1c9)](_0x1beea0),_0x5d403a=this[_0xa597e0(0x1b0)](_0x461a43);for(const _0x5a2ac5 of this[_0xa597e0(0x1dc)](_0x1beea0,_0x42259b))this[_0xa597e0(0x1dd)](_0x5a2ac5,_0x5d403a,_0x53e00e);}}[_0x54a259(0x1d7)](_0x230437){const _0x30e05f=_0x54a259,_0x3c38a0=this[_0x30e05f(0x1b7)][_0x30e05f(0x1ab)][_0x30e05f(0x1d4)];if(_0x230437['is'](_0x30e05f(0x1ac))&&_0x3c38a0[_0x30e05f(0x1cc)](_0x230437,_0x30e05f(0x1cb)))return _0x230437;const _0x2f217c=_0x230437[_0x30e05f(0x1ca)];return!_0x2f217c||_0x3c38a0[_0x30e05f(0x1d0)](_0x230437)?null:this[_0x30e05f(0x1d7)](_0x2f217c);}*[_0x54a259(0x1b3)](_0x425bd4){const _0x588c8b=_0x54a259,_0x33663c=new Set();for(const {item:_0x4b7271}of _0x425bd4[_0x588c8b(0x1e1)]()){const _0x18a8c2=this[_0x588c8b(0x1d7)](_0x4b7271);_0x18a8c2&&!_0x33663c[_0x588c8b(0x1d8)](_0x18a8c2)&&(_0x33663c[_0x588c8b(0x1d2)](_0x18a8c2),yield _0x18a8c2);}}[_0x54a259(0x1c9)](_0x515cfd){const _0x518868=_0x54a259;return Array[_0x518868(0x1c1)](_0x515cfd[_0x518868(0x1cf)]())[_0x518868(0x1bb)]((_0x311b04,_0xf8645b)=>_0x311b04+(_0xf8645b['is'](_0x518868(0x1cb))?_0xf8645b[_0x518868(0x1b9)]:'\x20'),'');}*[_0x54a259(0x1dc)](_0x5585d0,_0x2a045d){const _0x1d6626=_0x54a259,_0x36eba3=_0x2a045d[_0x1d6626(0x1ba)](this[_0x1d6626(0x1b7)][_0x1d6626(0x1ab)][_0x1d6626(0x1bc)](_0x5585d0));if(_0x36eba3){for(const _0xde72f7 of _0x36eba3[_0x1d6626(0x1aa)]())_0xde72f7['is'](_0x1d6626(0x1c3))&&_0xde72f7[_0x1d6626(0x1ca)]==_0x5585d0&&(yield _0xde72f7);}}[_0x54a259(0x1dd)](_0x3e09c4,_0x5ad355,_0x645423){const _0x333c78=_0x54a259,_0x1c8cff=_0x5ad355[_0x333c78(0x1de)](_0x3e09c4[_0x333c78(0x1b1)],_0x3e09c4[_0x333c78(0x1d3)]);if(_0x1c8cff===_0x3e09c4[_0x333c78(0x1b9)])return;const _0x5ec54f=_0x3e09c4[_0x333c78(0x1b4)]();this[_0x333c78(0x1b7)][_0x333c78(0x1ab)][_0x333c78(0x1d1)](_0x645423[_0x333c78(0x1af)](_0x1c8cff,_0x5ec54f),_0x645423[_0x333c78(0x1da)](_0x645423[_0x333c78(0x1b6)](_0x3e09c4)));}}