UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.93 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0xc845(){const _0x77bc0f=['type','Home','2644270hcYWhj','signal','stop','touchstart','bind','scrollTo','auto','45BjvEIP','key','addEventListener','animationFrameId','61229UCmTxE','_rafUpdate','8156XlNnCZ','PageDown','isRunning','106190KNLSfp','_onUserEvent','keydown','deltaY','ArrowUp','21uCtuwg','End','2694320xocluF','1942228mLiUxm','element','3126414sHcbgj','ArrowDown','PageUp','360KGObQg','start','isUserPaused','destroy','pointerdown','_stop','_isAtBottom','includes','wheel','abortController','scrollHeight','abort'];_0xc845=function(){return _0x77bc0f;};return _0xc845();}function _0x51c9(_0x3e259c,_0x179967){const _0xc8455e=_0xc845();return _0x51c9=function(_0x51c910,_0x430e18){_0x51c910=_0x51c910-0x1cd;let _0x445af4=_0xc8455e[_0x51c910];return _0x445af4;},_0x51c9(_0x3e259c,_0x179967);}const _0x3f35b6=_0x51c9;(function(_0x32b4d2,_0x2625c9){const _0x5bab94=_0x51c9,_0x50f2e5=_0x32b4d2();while(!![]){try{const _0x3f0ef1=-parseInt(_0x5bab94(0x1e6))/0x1+-parseInt(_0x5bab94(0x1e3))/0x2*(-parseInt(_0x5bab94(0x1eb))/0x3)+-parseInt(_0x5bab94(0x1ee))/0x4+parseInt(_0x5bab94(0x1ed))/0x5+-parseInt(_0x5bab94(0x1f0))/0x6+-parseInt(_0x5bab94(0x1e1))/0x7*(parseInt(_0x5bab94(0x1f3))/0x8)+-parseInt(_0x5bab94(0x1dd))/0x9*(-parseInt(_0x5bab94(0x1d6))/0xa);if(_0x3f0ef1===_0x2625c9)break;else _0x50f2e5['push'](_0x50f2e5['shift']());}catch(_0x103b1c){_0x50f2e5['push'](_0x50f2e5['shift']());}}}(_0xc845,0x5d88a));const ws=[_0x3f35b6(0x1d0),_0x3f35b6(0x1d9),_0x3f35b6(0x1f7),_0x3f35b6(0x1e8)],Fs=[_0x3f35b6(0x1ea),_0x3f35b6(0x1f1),_0x3f35b6(0x1f2),_0x3f35b6(0x1e4),_0x3f35b6(0x1d5),_0x3f35b6(0x1ec),'\x20'];export class ScrollManager{[_0x3f35b6(0x1ef)];[_0x3f35b6(0x1e0)];[_0x3f35b6(0x1e5)];[_0x3f35b6(0x1d1)];[_0x3f35b6(0x1f5)];constructor(_0x114651){const _0x2e95e8=_0x3f35b6;this[_0x2e95e8(0x1ef)]=_0x114651,this[_0x2e95e8(0x1e0)]=null,this[_0x2e95e8(0x1e5)]=!0x1,this[_0x2e95e8(0x1d1)]=new AbortController(),this[_0x2e95e8(0x1f5)]=!0x1;for(const _0x1d924f of ws){const _0x526170=_0x2e95e8(0x1e8)!==_0x1d924f;this[_0x2e95e8(0x1ef)][_0x2e95e8(0x1df)](_0x1d924f,this[_0x2e95e8(0x1e7)][_0x2e95e8(0x1da)](this),{'passive':_0x526170,'signal':this[_0x2e95e8(0x1d1)][_0x2e95e8(0x1d7)]});}}[_0x3f35b6(0x1f4)](){const _0x297062=_0x3f35b6;this[_0x297062(0x1e5)]||(this[_0x297062(0x1e5)]=!0x0,this[_0x297062(0x1f5)]=!0x1,this[_0x297062(0x1e0)]=requestAnimationFrame(this[_0x297062(0x1e2)][_0x297062(0x1da)](this)));}[_0x3f35b6(0x1d8)](){requestAnimationFrame(()=>{const _0x298a21=_0x51c9;this[_0x298a21(0x1cd)]();});}[_0x3f35b6(0x1f6)](){const _0x19de68=_0x3f35b6;this[_0x19de68(0x1cd)](),this[_0x19de68(0x1d1)][_0x19de68(0x1d3)]();}[_0x3f35b6(0x1cd)](){const _0x1495c1=_0x3f35b6;null!==this[_0x1495c1(0x1e0)]&&(cancelAnimationFrame(this[_0x1495c1(0x1e0)]),this[_0x1495c1(0x1e0)]=null),this[_0x1495c1(0x1e5)]&&(this[_0x1495c1(0x1e5)]=!0x1),this[_0x1495c1(0x1f5)]=!0x1;}[_0x3f35b6(0x1e7)](_0x3f3399){const _0x3358cd=_0x3f35b6;if(this[_0x3358cd(0x1e5)]){if(_0x3358cd(0x1e8)===_0x3f3399[_0x3358cd(0x1d4)]){const _0x527024=_0x3f3399[_0x3358cd(0x1de)];if(!Fs[_0x3358cd(0x1cf)](_0x527024))return;}_0x3f3399 instanceof WheelEvent?_0x3f3399[_0x3358cd(0x1e9)]<0x0?this[_0x3358cd(0x1f5)]=!0x0:this[_0x3358cd(0x1f5)]=!this[_0x3358cd(0x1ce)]():this[_0x3358cd(0x1f5)]=!0x0;}}[_0x3f35b6(0x1ce)](){const _0x1ff4c2=_0x3f35b6,{scrollTop:_0x50beb6,scrollHeight:_0x25946a,clientHeight:_0x240c01}=this[_0x1ff4c2(0x1ef)];return _0x25946a-_0x50beb6-_0x240c01<=0x5;}[_0x3f35b6(0x1e2)](){const _0x66e2a9=_0x3f35b6;this[_0x66e2a9(0x1e5)]&&(this[_0x66e2a9(0x1f5)]||this[_0x66e2a9(0x1ef)][_0x66e2a9(0x1db)]({'top':this[_0x66e2a9(0x1ef)][_0x66e2a9(0x1d2)],'behavior':_0x66e2a9(0x1dc)}),this[_0x66e2a9(0x1e0)]=requestAnimationFrame(this[_0x66e2a9(0x1e2)][_0x66e2a9(0x1da)](this)));}}