UNPKG

@ckeditor/ckeditor5-ai

Version:

AI Assistant feature for CKEditor 5.

23 lines 3.48 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 _0x2179(){const _0x3a2639=['prompt','getItem','1882848JINjWF','CKEditor/AIFormView/PromptHistory','7025148zlVPJx','3300978caAmvL','1GmJngR','stringify','addMany','add','trim','_saveToSessionStorage','_loadFromSessionStorage','5scPFuN','10889480YnhfQJ','last','remove','8WdphLN','length','1197528ENxkcf','setItem','map','toLowerCase','parse','2972852XYaZnJ','734174tRKksq'];_0x2179=function(){return _0x3a2639;};return _0x2179();}const _0x14e11e=_0x4395;(function(_0x582370,_0x1143c7){const _0x171678=_0x4395,_0x1c06d4=_0x582370();while(!![]){try{const _0x34f9ba=parseInt(_0x171678(0x9b))/0x1*(-parseInt(_0x171678(0x93))/0x2)+parseInt(_0x171678(0x97))/0x3+parseInt(_0x171678(0x8e))/0x4+-parseInt(_0x171678(0x88))/0x5*(parseInt(_0x171678(0x9a))/0x6)+parseInt(_0x171678(0x94))/0x7+parseInt(_0x171678(0x8c))/0x8*(parseInt(_0x171678(0x99))/0x9)+parseInt(_0x171678(0x89))/0xa;if(_0x34f9ba===_0x1143c7)break;else _0x1c06d4['push'](_0x1c06d4['shift']());}catch(_0x93156e){_0x1c06d4['push'](_0x1c06d4['shift']());}}}(_0x2179,0xd322b));import{Collection as _0x6d8a4a}from'ckeditor5/src/utils.js';function _0x4395(_0x54310b,_0x3ee433){const _0x2179d7=_0x2179();return _0x4395=function(_0x439532,_0x246eef){_0x439532=_0x439532-0x84;let _0x3e3df6=_0x2179d7[_0x439532];return _0x3e3df6;},_0x4395(_0x54310b,_0x3ee433);}const ts=_0x14e11e(0x98);export class PromptHistory extends _0x6d8a4a{constructor(){const _0x3e533d=_0x14e11e;super(),this[_0x3e533d(0x87)](),this['on'](_0x3e533d(0x84),(_0x44942d,_0x10cbaf)=>{const _0x270570=_0x3e533d,_0x33244a=os(_0x10cbaf[_0x270570(0x95)]);for(const _0x35d0c3 of this)if(_0x35d0c3!=_0x10cbaf&&os(_0x35d0c3[_0x270570(0x95)])===_0x33244a){this[_0x270570(0x8b)](_0x35d0c3);break;}this[_0x270570(0x8d)]>0x14&&this[_0x270570(0x8b)](this[_0x270570(0x8a)]),this[_0x270570(0x86)]();}),this['on'](_0x3e533d(0x8b),()=>{const _0x6da50c=_0x3e533d;this[_0x6da50c(0x86)]();});}[_0x14e11e(0x87)](){const _0x41ae59=_0x14e11e,_0x21105f=sessionStorage[_0x41ae59(0x96)](ts)||'[]';this[_0x41ae59(0x9d)](JSON[_0x41ae59(0x92)](_0x21105f));}[_0x14e11e(0x86)](){const _0x51b344=_0x14e11e;sessionStorage[_0x51b344(0x8f)](ts,JSON[_0x51b344(0x9c)](this[_0x51b344(0x90)](_0x2409b4=>_0x2409b4)));}}function os(_0x58a9a7){const _0x383d2e=_0x14e11e;return _0x58a9a7[_0x383d2e(0x91)]()[_0x383d2e(0x85)]();}