@ckeditor/ckeditor5-ai 41.2.0 → 41.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/content-index.css +332 -0
- package/dist/editor-index.css +573 -0
- package/dist/index.css +1344 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/types/adapters/aiadapter.d.ts +52 -0
- package/dist/types/adapters/aitextadapter.d.ts +150 -0
- package/dist/types/adapters/awstextadapter.d.ts +182 -0
- package/dist/types/adapters/openaitextadapter.d.ts +185 -0
- package/dist/types/aiassistant.d.ts +390 -0
- package/dist/types/aiassistantediting.d.ts +50 -0
- package/dist/types/aiassistantui.d.ts +57 -0
- package/dist/types/aiconfig.d.ts +73 -0
- package/dist/types/augmentation.d.ts +31 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/ui/aiassistantcontroller.d.ts +113 -0
- package/dist/types/ui/dropdown/aicommandslistview.d.ts +37 -0
- package/dist/types/ui/dropdown/buttonlabelwithhighlightview.d.ts +33 -0
- package/dist/types/ui/dropdown/labelwithhighlightview.d.ts +29 -0
- package/dist/types/ui/form/aiformcontentarea.d.ts +52 -0
- package/dist/types/ui/form/aiformerrorview.d.ts +30 -0
- package/dist/types/ui/form/aiformpromptview.d.ts +50 -0
- package/dist/types/ui/form/aiformtoolbarview.d.ts +62 -0
- package/dist/types/ui/form/aiformview.d.ts +145 -0
- package/dist/types/ui/form/aihistorylistitemview.d.ts +22 -0
- package/dist/types/ui/form/aihistorylistview.d.ts +39 -0
- package/dist/types/ui/form/prompthistory.d.ts +24 -0
- package/dist/types/ui/showaiassistantcommand.d.ts +44 -0
- package/dist/types/utils/common-translations.d.ts +13 -0
- package/package.json +5 -4
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.d.ts +0 -5
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.js +1 -1
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ai/utils/common-translations
|
|
11
|
+
*/
|
|
12
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
+
export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ai",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.3.0-alpha.2",
|
|
4
4
|
"description": "AI Assistant feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,15 +23,16 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"ckeditor5": "41.
|
|
27
|
-
"ckeditor5-collaboration": "41.
|
|
26
|
+
"ckeditor5": "41.3.0-alpha.2",
|
|
27
|
+
"ckeditor5-collaboration": "41.3.0-alpha.2",
|
|
28
28
|
"@aws-sdk/client-bedrock-runtime": "3.470.0",
|
|
29
|
-
"@ckeditor/ckeditor5-ui": "41.
|
|
29
|
+
"@ckeditor/ckeditor5-ui": "41.3.0-alpha.2",
|
|
30
30
|
"lodash-es": "4.17.21"
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|
|
33
33
|
"main": "src/index.js",
|
|
34
34
|
"files": [
|
|
35
|
+
"dist",
|
|
35
36
|
"lang",
|
|
36
37
|
"src/**/*.js",
|
|
37
38
|
"src/**/*.d.ts",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x37a0(){var _0x15297e=['4319392lCIOpS','2165YIyIrf','textAdapter','129QzYPcK','AIRequestError','14358dUiViZ','1518473ldzZDt','AIAdapter','7148OeoEpG','afterInit','pluginName','417ucVRUZ','59634hYIgjC','aiadapter-text-adapter-not-set','13828KBLbVa','72mEkvVS','10fNMeUw','name','4374528yxyyur'];_0x37a0=function(){return _0x15297e;};return _0x37a0();}var _0x490af9=_0x5a39;function _0x5a39(_0xdbec47,_0x4e4115){var _0x37a042=_0x37a0();return _0x5a39=function(_0x5a399f,_0x223952){_0x5a399f=_0x5a399f-0x16e;var _0x11871a=_0x37a042[_0x5a399f];return _0x11871a;},_0x5a39(_0xdbec47,_0x4e4115);}(function(_0x321d43,_0x3323ea){var _0x49addb=_0x5a39,_0x56cdde=_0x321d43();while(!![]){try{var _0x3a3979=parseInt(_0x49addb(0x17d))/0x1*(-parseInt(_0x49addb(0x175))/0x2)+parseInt(_0x49addb(0x172))/0x3*(parseInt(_0x49addb(0x16f))/0x4)+-parseInt(_0x49addb(0x17b))/0x5*(-parseInt(_0x49addb(0x17f))/0x6)+parseInt(_0x49addb(0x17a))/0x7+-parseInt(_0x49addb(0x176))/0x8*(-parseInt(_0x49addb(0x173))/0x9)+parseInt(_0x49addb(0x177))/0xa*(-parseInt(_0x49addb(0x180))/0xb)+-parseInt(_0x49addb(0x179))/0xc;if(_0x3a3979===_0x3323ea)break;else _0x56cdde['push'](_0x56cdde['shift']());}catch(_0x30e0a5){_0x56cdde['push'](_0x56cdde['shift']());}}}(_0x37a0,0x8a5e7));import{Plugin as _0x314865}from'ckeditor5/src/core.js';import{CKEditorError as _0x1726a1}from'ckeditor5/src/utils.js';export default class I extends _0x314865{static get[_0x490af9(0x171)](){var _0x5165fc=_0x490af9;return _0x5165fc(0x16e);}[_0x490af9(0x170)](){var _0x3e9dec=_0x490af9;if(!this[_0x3e9dec(0x17c)])throw new _0x1726a1(_0x3e9dec(0x174),null);}}export class AIRequestError extends Error{constructor(_0x5ac124){var _0x2d6652=_0x490af9;super(_0x5ac124),this[_0x2d6652(0x178)]=_0x2d6652(0x17e);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xd96e8f=_0x5748;function _0x5748(_0x355ee1,_0x5d1c26){const _0x1d660a=_0x1d66();return _0x5748=function(_0x574856,_0x594494){_0x574856=_0x574856-0xed;let _0xafdc96=_0x1d660a[_0x574856];return _0xafdc96;},_0x5748(_0x355ee1,_0x5d1c26);}(function(_0x23f4b4,_0x1c30aa){const _0x5807ab=_0x5748,_0x54ce6d=_0x23f4b4();while(!![]){try{const _0x4c2e8d=parseInt(_0x5807ab(0xf4))/0x1*(parseInt(_0x5807ab(0x111))/0x2)+-parseInt(_0x5807ab(0xf8))/0x3*(-parseInt(_0x5807ab(0x114))/0x4)+parseInt(_0x5807ab(0x103))/0x5+parseInt(_0x5807ab(0xf9))/0x6*(parseInt(_0x5807ab(0x109))/0x7)+-parseInt(_0x5807ab(0xfc))/0x8*(-parseInt(_0x5807ab(0xf1))/0x9)+-parseInt(_0x5807ab(0x10a))/0xa*(-parseInt(_0x5807ab(0xee))/0xb)+parseInt(_0x5807ab(0x104))/0xc*(-parseInt(_0x5807ab(0x113))/0xd);if(_0x4c2e8d===_0x1c30aa)break;else _0x54ce6d['push'](_0x54ce6d['shift']());}catch(_0x2d3d3a){_0x54ce6d['push'](_0x54ce6d['shift']());}}}(_0x1d66,0xca63b));import{Plugin as _0x535c45}from'ckeditor5/src/core.js';import{CKEditorError as _0x39d49b}from'ckeditor5/src/utils.js';import{default as _0x56fb28,AIRequestError as _0x26a9d0}from'./aiadapter.js';function _0x1d66(){const _0x18319d=['makeRequest','626271uZDxHB','1821714QnLSgj','application/json','init','738472BIjyib','name','resolve','plugins','get','AI_ERROR_GET_HEADERS','locale','3870330SLXcio','42931128UzgNeg','_prepareRequestParameters','requires','abortController','abort','7lgrhXZ','40390LnCCKx','signal','AbortError','_prepareRequestHeaders','AI_ERROR_GET_PARAMETERS','sendRequest','textAdapter','402NaKoNG','reject','13LaMEdX','8czcVTn','assign','3520eXKgsg','aitextadapter-send-request-failed','editor','81EHHYkc','object','catch','3921FjrFUJ','aborted','error'];_0x1d66=function(){return _0x18319d;};return _0x1d66();}import{getTranslation as _0xea4839}from'../utils/common-translations.js';export default class _ extends _0x535c45{static get[_0xd96e8f(0x106)](){return[_0x56fb28];}constructor(_0x7fc37b){const _0x3603cf=_0xd96e8f;super(_0x7fc37b),this[_0x3603cf(0x107)]=new AbortController();}[_0xd96e8f(0xfb)](){const _0x33c432=_0xd96e8f;this[_0x33c432(0xf0)][_0x33c432(0xff)][_0x33c432(0x100)](_0x56fb28)[_0x33c432(0x110)]=this;}[_0xd96e8f(0x108)](){const _0x14ca0e=_0xd96e8f;this[_0x14ca0e(0x107)][_0x14ca0e(0x10b)][_0x14ca0e(0xf5)]||(this[_0x14ca0e(0x107)][_0x14ca0e(0x108)](),this[_0x14ca0e(0x107)]=new AbortController());}async[_0xd96e8f(0xf7)](_0x43a0fa){const _0x1b4723=_0xd96e8f;return this[_0x1b4723(0x10f)](_0x43a0fa)[_0x1b4723(0xf3)](_0x3c2c1d=>{const _0x4304b0=_0x1b4723;if(_0x3c2c1d instanceof _0x26a9d0)return Promise[_0x4304b0(0x112)](_0x3c2c1d);if(_0x4304b0(0x10c)==_0x3c2c1d[_0x4304b0(0xfd)])return Promise[_0x4304b0(0xfe)]();throw console[_0x4304b0(0xf6)](_0x3c2c1d),new _0x39d49b(_0x4304b0(0xef),null);});}async[_0xd96e8f(0x10d)](_0x4011ec,_0x1f7375){const _0x2f5e50=_0xd96e8f,_0xd0e7ba=this[_0x2f5e50(0xf0)][_0x2f5e50(0x102)],_0x415f6b={'Content-Type':_0x2f5e50(0xfa)};if(_0x2f5e50(0xf2)==typeof _0x4011ec)Object[_0x2f5e50(0xed)](_0x415f6b,_0x4011ec);else{if(_0x4011ec)try{const _0x7e7f4f=await _0x4011ec(_0x1f7375);Object[_0x2f5e50(0xed)](_0x415f6b,_0x7e7f4f);}catch(_0x516bda){return Promise[_0x2f5e50(0x112)](new _0x26a9d0(_0xea4839(_0xd0e7ba,_0x2f5e50(0x101))));}}return _0x415f6b;}async[_0xd96e8f(0x105)](_0x6cf4e5,_0x2f81d9){const _0x29eb3c=_0xd96e8f,_0x309542=this[_0x29eb3c(0xf0)][_0x29eb3c(0x102)];if(_0x29eb3c(0xf2)==typeof _0x6cf4e5)return _0x6cf4e5;try{return await _0x6cf4e5(_0x2f81d9);}catch(_0x4b3ff2){return Promise[_0x29eb3c(0x112)](new _0x26a9d0(_0xea4839(_0x309542,_0x29eb3c(0x10e))));}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x512d(_0x5ccf83,_0x474094){const _0x483669=_0x4836();return _0x512d=function(_0x512d20,_0x2d45c0){_0x512d20=_0x512d20-0x133;let _0x535234=_0x483669[_0x512d20];return _0x535234;},_0x512d(_0x5ccf83,_0x474094);}const _0x37939e=_0x512d;(function(_0x52e485,_0x2c8434){const _0x412d37=_0x512d,_0x5e9ae9=_0x52e485();while(!![]){try{const _0x31edf3=-parseInt(_0x412d37(0x157))/0x1+-parseInt(_0x412d37(0x173))/0x2+-parseInt(_0x412d37(0x13b))/0x3+parseInt(_0x412d37(0x171))/0x4*(parseInt(_0x412d37(0x183))/0x5)+parseInt(_0x412d37(0x181))/0x6*(-parseInt(_0x412d37(0x147))/0x7)+-parseInt(_0x412d37(0x135))/0x8*(parseInt(_0x412d37(0x161))/0x9)+parseInt(_0x412d37(0x137))/0xa;if(_0x31edf3===_0x2c8434)break;else _0x5e9ae9['push'](_0x5e9ae9['shift']());}catch(_0x39a8ae){_0x5e9ae9['push'](_0x5e9ae9['shift']());}}}(_0x4836,0x87b84));function _0x4836(){const _0x2f9819=['AI_ERROR_UNSUPPORTED_MODEL','_bedrockClientConfig','_prepareRequestHeaders','\x0a<</SYS>>\x0a[INST]\x0a','bedrock-2023-05-31','generation','POST','abortController','133SykGkT','\x0a[/INST]','ai.aws.apiUrl','map','_readStaticResponse','body','ai.aws.bedrockClientConfig','data','json','ai.aws.requestParameters','stringify','resolve','get','signal','AWSTextAdapter','_readAsyncIterableResponse','479877aEfbys','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','anthropic.claude-v2','completions','text','config','length','decode','_readStreamableResponse','_processAWSRequest','477459CwAHSm','ai21.j2','_requestHeaders','_getGeneratedText','generations','split','bytes','parse','editor','meta.llama','_processProxyRequest','<<SYS>>\x0a','preparePrompt','\x0a\x0aAssistant:','ai.aws.requestHeaders','_apiUrl','4MlhXHm','anthropic.claude','1215030KuecgN','_prepareRequestParameters','utf-8','sendRequest','utf8','join','application/json','getModelFamily','locale','define','getReader','filter','Instruction:\x0a','test','147522cAuiHG','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','4189755KeifzF','from','cohere.command','completion','Human:\x0a','96VOiCVr','chunk','26778330manlsD','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','toString','read','2306157WubqJf','_requestParameters','send','pluginName'];_0x4836=function(){return _0x2f9819;};return _0x4836();}import{default as _0x3047a1}from'./aitextadapter.js';import{AIRequestError as _0x192726}from'./aiadapter.js';import{BedrockRuntimeClient as _0x5bec33,InvokeModelCommand as _0x4f7774,InvokeModelWithResponseStreamCommand as _0x2a3419}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x1d4a88}from'../utils/common-translations.js';export default class q extends _0x3047a1{static get[_0x37939e(0x13e)](){const _0xe271c8=_0x37939e;return _0xe271c8(0x155);}constructor(_0x843c83){const _0x3f2e2c=_0x37939e;super(_0x843c83),_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x153)](_0x3f2e2c(0x150))||_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x17c)](_0x3f2e2c(0x150),{'model':_0x3f2e2c(0x159),'max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':_0x3f2e2c(0x143),'stream':!0x0}),this[_0x3f2e2c(0x170)]=_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x153)](_0x3f2e2c(0x149)),this[_0x3f2e2c(0x140)]=_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x153)](_0x3f2e2c(0x14d)),this[_0x3f2e2c(0x163)]=_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x153)](_0x3f2e2c(0x16f)),this[_0x3f2e2c(0x13c)]=_0x843c83[_0x3f2e2c(0x15c)][_0x3f2e2c(0x153)](_0x3f2e2c(0x150));}async[_0x37939e(0x176)]({query:_0x454171,context:_0x202444,onData:_0x4c37a3,actionId:_0x52d103}){const _0x501ba2=_0x37939e,{model:_0x1dec5f,stream:_0xa6ac9b,..._0x5f1ce9}=await this[_0x501ba2(0x174)](this[_0x501ba2(0x13c)],_0x52d103),_0x2555d5={'prompt':await this[_0x501ba2(0x16d)](_0x454171,_0x202444,_0x1dec5f,_0x52d103),..._0x5f1ce9};this[_0x501ba2(0x170)]?await this[_0x501ba2(0x16b)](_0x2555d5,_0x1dec5f,_0xa6ac9b,_0x4c37a3,_0x52d103):await this[_0x501ba2(0x160)](_0x2555d5,_0x1dec5f,_0xa6ac9b,_0x4c37a3);}async[_0x37939e(0x16d)](_0x5dd753,_0x2e3106,_0x59f7a6,_0x48c797){const _0x2b8ac2=_0x37939e;let _0x37de6d,_0x1ac60e;return _0x2e3106?(_0x37de6d=_0x2b8ac2(0x158),_0x1ac60e=_0x2b8ac2(0x17f)+_0x5dd753+_0x2b8ac2(0x182)+_0x2e3106):(_0x37de6d=_0x2b8ac2(0x138),_0x1ac60e=_0x5dd753),_0x2b8ac2(0x16a)==this[_0x2b8ac2(0x17a)](_0x59f7a6)?_0x2b8ac2(0x16c)+_0x37de6d+_0x2b8ac2(0x142)+_0x1ac60e+_0x2b8ac2(0x148):_0x2b8ac2(0x134)+_0x37de6d+'\x0a'+_0x1ac60e+_0x2b8ac2(0x16e);}[_0x37939e(0x17a)](_0x594146){const _0x341829=_0x37939e;if(/^anthropic\.claude/[_0x341829(0x180)](_0x594146))return _0x341829(0x172);if(/^ai21\.j2/[_0x341829(0x180)](_0x594146))return _0x341829(0x162);if(/^cohere\.command/[_0x341829(0x180)](_0x594146))return _0x341829(0x185);if(/^meta\.llama/[_0x341829(0x180)](_0x594146))return _0x341829(0x16a);throw new _0x192726(_0x1d4a88(this[_0x341829(0x169)][_0x341829(0x17b)],_0x341829(0x13f),_0x594146));}async[_0x37939e(0x16b)](_0x509831,_0x56abb2,_0x2a7631,_0x4f040e,_0x19f291){const _0x597485=_0x37939e,_0x4d977e={'method':_0x597485(0x145),'headers':await this[_0x597485(0x141)](this[_0x597485(0x163)],_0x19f291),'body':JSON[_0x597485(0x151)]({..._0x509831,'model':_0x56abb2,'stream':_0x2a7631}),'signal':this[_0x597485(0x146)][_0x597485(0x154)]},_0x54ad07=await fetch(this[_0x597485(0x170)],_0x4d977e);_0x2a7631?await this[_0x597485(0x15f)](_0x54ad07,_0x56abb2,_0x4f040e):await this[_0x597485(0x14b)](_0x54ad07,_0x56abb2,_0x4f040e);}async[_0x37939e(0x160)](_0x1063a9,_0x296d49,_0x1848c8,_0x94dae4){const _0x7aad2b=_0x37939e,_0x550a35=new _0x5bec33(this[_0x7aad2b(0x140)]),_0x4237eb={'body':JSON[_0x7aad2b(0x151)](_0x1063a9),'contentType':_0x7aad2b(0x179),'accept':_0x7aad2b(0x179),'modelId':_0x296d49};let _0x1d3916;if(_0x1848c8){const _0x360f1f=new _0x2a3419(_0x4237eb);_0x1d3916=await _0x550a35[_0x7aad2b(0x13d)](_0x360f1f,{'abortSignal':this[_0x7aad2b(0x146)][_0x7aad2b(0x154)]}),await this[_0x7aad2b(0x156)](_0x1d3916,_0x296d49,_0x94dae4);}else{const _0x43d7da=new _0x4f7774(_0x4237eb);_0x1d3916=await _0x550a35[_0x7aad2b(0x13d)](_0x43d7da,{'abortSignal':this[_0x7aad2b(0x146)][_0x7aad2b(0x154)]}),await this[_0x7aad2b(0x14b)](_0x1d3916,_0x296d49,_0x94dae4);}}async[_0x37939e(0x156)](_0x3081fb,_0x238754,_0x31dcfa){const _0xa3facb=_0x37939e,_0x506a33=_0x3081fb[_0xa3facb(0x14c)],_0x41c8e9=new TextDecoder(_0xa3facb(0x175));let _0x145496='';for await(const _0x3a38db of _0x506a33)if(_0x3a38db[_0xa3facb(0x136)]){const _0x232514=_0x41c8e9[_0xa3facb(0x15e)](_0x3a38db[_0xa3facb(0x136)][_0xa3facb(0x167)]),_0xaac024=JSON[_0xa3facb(0x168)](_0x232514);_0x145496+=this[_0xa3facb(0x164)](_0xaac024,_0x238754),_0x31dcfa(_0x145496);}return Promise[_0xa3facb(0x152)]();}async[_0x37939e(0x15f)](_0x531891,_0x43683f,_0x4cdab6){const _0x1760cb=_0x37939e,_0x10528e=_0x531891[_0x1760cb(0x14c)],_0x8b18ca=new TextDecoder(_0x1760cb(0x175)),_0x4a776f=_0x10528e[_0x1760cb(0x17d)]();let _0x50bfe0='',_0x2499f3='',_0x525c79=!0x1;for(;!_0x525c79;){const {done:_0x15c3e3,value:_0x1455d2}=await _0x4a776f[_0x1760cb(0x13a)]();if(_0x525c79=_0x15c3e3,_0x525c79)break;const _0x525e38=(_0x50bfe0+_0x8b18ca[_0x1760cb(0x15e)](_0x1455d2))[_0x1760cb(0x166)]('\x0a')[_0x1760cb(0x14a)](_0x333bfc=>{const _0x2b1d1e=_0x1760cb;try{return _0x50bfe0='',JSON[_0x2b1d1e(0x168)](_0x333bfc);}catch(_0x4a0209){return _0x50bfe0=_0x333bfc,null;}})[_0x1760cb(0x17e)](_0x5edb81=>null!==_0x5edb81);_0x525e38[_0x1760cb(0x15d)]&&(_0x2499f3+=_0x525e38[_0x1760cb(0x14a)](_0x3dc663=>this[_0x1760cb(0x164)](_0x3dc663,_0x43683f))[_0x1760cb(0x178)](''),_0x4cdab6(_0x2499f3));}return Promise[_0x1760cb(0x152)]();}async[_0x37939e(0x14b)](_0x1a0fae,_0x3ec9be,_0x17fe07){const _0x3737f6=_0x37939e;let _0x400961;return _0x400961=_0x1a0fae instanceof Response?await _0x1a0fae[_0x3737f6(0x14f)]():JSON[_0x3737f6(0x168)](Buffer[_0x3737f6(0x184)](_0x1a0fae[_0x3737f6(0x14c)])[_0x3737f6(0x139)](_0x3737f6(0x177))),(_0x17fe07(this[_0x3737f6(0x164)](_0x400961,_0x3ec9be)),Promise[_0x3737f6(0x152)]());}[_0x37939e(0x164)](_0x5eebae,_0x2c953f){const _0x429e1e=_0x37939e;switch(this[_0x429e1e(0x17a)](_0x2c953f)){case _0x429e1e(0x172):return _0x5eebae[_0x429e1e(0x133)];case _0x429e1e(0x162):return _0x5eebae[_0x429e1e(0x15a)][0x0][_0x429e1e(0x14e)][_0x429e1e(0x15b)];case _0x429e1e(0x185):return _0x5eebae[_0x429e1e(0x165)][0x0][_0x429e1e(0x15b)];case _0x429e1e(0x16a):return _0x5eebae[_0x429e1e(0x144)];}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x32e2(){const _0x50eb74=['_requestHeaders','_isBufferIncomplete','7944upOuEF','POST','OpenAITextAdapter','ai.openAI.requestParameters','define','_prepareRequestParameters','593244vWuMuR','parse','get','map','ai.openAI.requestHeaders','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','32247wwrmqA','user','1728996cSSmrz','Instruction:\x0a','data:\x20','config','getReader','_apiUrl','split','[DONE]','AI_ERROR_MODERATION','resolve','delta','AI_ERROR_CONTEXT_LENGTH','prepareMessages','10598ZdIhkv','_readStreamableResponse','reject','stream','signal','_prepareRequestHeaders','editor','decode','1874090yWjLVx','pluginName','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','Moderation','length','60mWvkRY','https://api.openai.com/v1/chat/completions','body','filter','locale','262776xepLrS','sendRequest','gpt-3.5-turbo','message','json','choices','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','_readStaticResponse','3400hemoqv','_cleanUpData','stringify','replace','context_length_exceeded','content','28841879lGLzhh','_requestParameters','read','includes','9KNJmdH','system','join','text','ai.openAI.apiUrl','abortController'];_0x32e2=function(){return _0x50eb74;};return _0x32e2();}const _0x4d4538=_0x28e4;(function(_0xf81627,_0x380f3b){const _0x45ce49=_0x28e4,_0x7426d9=_0xf81627();while(!![]){try{const _0x2f279a=parseInt(_0x45ce49(0x7e))/0x1+-parseInt(_0x45ce49(0xa8))/0x2*(parseInt(_0x45ce49(0x9a))/0x3)+-parseInt(_0x45ce49(0xb0))/0x4+-parseInt(_0x45ce49(0x83))/0x5*(-parseInt(_0x45ce49(0x88))/0x6)+parseInt(_0x45ce49(0xbd))/0x7*(-parseInt(_0x45ce49(0xa2))/0x8)+parseInt(_0x45ce49(0xae))/0x9*(-parseInt(_0x45ce49(0x90))/0xa)+parseInt(_0x45ce49(0x96))/0xb;if(_0x2f279a===_0x380f3b)break;else _0x7426d9['push'](_0x7426d9['shift']());}catch(_0xe451c0){_0x7426d9['push'](_0x7426d9['shift']());}}}(_0x32e2,0xeebe6));import{default as _0x802a55}from'./aitextadapter.js';import{AIRequestError as _0x116379}from'./aiadapter.js';import{getTranslation as _0x2e03cb}from'../utils/common-translations.js';function _0x28e4(_0x57e85a,_0x52b7f0){const _0x32e2ba=_0x32e2();return _0x28e4=function(_0x28e43c,_0x9de39c){_0x28e43c=_0x28e43c-0x7b;let _0x28b474=_0x32e2ba[_0x28e43c];return _0x28b474;},_0x28e4(_0x57e85a,_0x52b7f0);}export default class M extends _0x802a55{static get[_0x4d4538(0x7f)](){const _0x436690=_0x4d4538;return _0x436690(0xa4);}constructor(_0x81663e){const _0x498e8c=_0x4d4538;super(_0x81663e),_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xa6)](_0x498e8c(0x9e),_0x498e8c(0x84)),_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xaa)](_0x498e8c(0xa5))||_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xa6)](_0x498e8c(0xa5),{'model':_0x498e8c(0x8a),'max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this[_0x498e8c(0xb5)]=_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xaa)](_0x498e8c(0x9e)),this[_0x498e8c(0xa0)]=_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xaa)](_0x498e8c(0xac))||{},this[_0x498e8c(0x97)]=_0x81663e[_0x498e8c(0xb3)][_0x498e8c(0xaa)](_0x498e8c(0xa5));}async[_0x4d4538(0x89)]({query:_0x389c4f,context:_0x4ae6a5,onData:_0x37b0dc,actionId:_0x495a6c}){const _0x3ead59=_0x4d4538,_0x84a95b=this[_0x3ead59(0x7c)][_0x3ead59(0x87)],_0x520a19=await this[_0x3ead59(0xbc)](_0x389c4f,_0x4ae6a5,_0x495a6c),_0x400eea=await this[_0x3ead59(0x7b)](this[_0x3ead59(0xa0)],_0x495a6c),_0x308de3=await this[_0x3ead59(0xa7)](this[_0x3ead59(0x97)],_0x495a6c),_0x4755df={'messages':_0x520a19,..._0x308de3},_0x58e50d={'method':_0x3ead59(0xa3),'headers':_0x400eea,'body':JSON[_0x3ead59(0x92)](_0x4755df),'signal':this[_0x3ead59(0x9f)][_0x3ead59(0xc1)]},_0x5c7998=await fetch(this[_0x3ead59(0xb5)],_0x58e50d);if(_0x5c7998['ok'])return _0x308de3[_0x3ead59(0xc0)]?await this[_0x3ead59(0xbe)](_0x5c7998,_0x37b0dc):await this[_0x3ead59(0x8f)](_0x5c7998,_0x37b0dc),Promise[_0x3ead59(0xb9)]();{const _0x4a1eb1=await _0x5c7998[_0x3ead59(0x9d)]();return _0x4a1eb1[_0x3ead59(0x99)](_0x3ead59(0x94))?Promise[_0x3ead59(0xbf)](new _0x116379(_0x2e03cb(_0x84a95b,_0x3ead59(0xbb)))):_0x4a1eb1[_0x3ead59(0x99)](_0x3ead59(0x81))?Promise[_0x3ead59(0xbf)](new _0x116379(_0x2e03cb(_0x84a95b,_0x3ead59(0xb8)))):Promise[_0x3ead59(0xbf)](new Error(_0x4a1eb1));}}async[_0x4d4538(0xbc)](_0x1527bb,_0x1a9460,_0x3ea29d){const _0x147632=_0x4d4538;let _0x92f785,_0x4bedef;return _0x1a9460?(_0x92f785=_0x147632(0x80),_0x4bedef=_0x147632(0xb1)+_0x1527bb+_0x147632(0x8e)+_0x1a9460):(_0x92f785=_0x147632(0xad),_0x4bedef=_0x1527bb),[{'role':_0x147632(0x9b),'content':_0x92f785},{'role':_0x147632(0xaf),'content':_0x4bedef}];}async[_0x4d4538(0xbe)](_0x27eb6a,_0x5aafc7){const _0x570939=_0x4d4538,_0x2babdb=_0x27eb6a[_0x570939(0x85)][_0x570939(0xb4)](),_0x28397d=new TextDecoder();let _0x52daff='',_0x217f4e='',_0x251c72='',_0x2477a1=!0x1;for(;!_0x2477a1;){const {done:_0x3cd69e,value:_0x3b0bd8}=await _0x2babdb[_0x570939(0x98)](),_0x423735=_0x52daff+_0x28397d[_0x570939(0x7d)](_0x3b0bd8);let _0x948752='';_0x2477a1=_0x3cd69e;try{_0x948752=this[_0x570939(0x91)](_0x423735),_0x52daff='';}catch(_0x3fc69a){_0x52daff=_0x423735;continue;}_0x217f4e+=_0x948752,!_0x2477a1&&this[_0x570939(0xa1)](_0x217f4e)||_0x217f4e&&(_0x251c72+=_0x217f4e,_0x217f4e='',_0x5aafc7(_0x251c72));}return Promise[_0x570939(0xb9)]();}async[_0x4d4538(0x8f)](_0x47535c,_0x10758c){const _0x32387d=_0x4d4538;return _0x10758c((await _0x47535c[_0x32387d(0x8c)]())[_0x32387d(0x8d)][0x0][_0x32387d(0x8b)][_0x32387d(0x95)]),Promise[_0x32387d(0xb9)]();}[_0x4d4538(0xa1)](_0x35708b){const _0x4c5f6a=_0x4d4538,_0x2c9b5e=_0x35708b[_0x4c5f6a(0xb6)]('<')[_0x4c5f6a(0x82)]!==_0x35708b[_0x4c5f6a(0xb6)]('>')[_0x4c5f6a(0x82)],_0x953c5=_0x35708b[_0x4c5f6a(0x82)]<0x1e;return _0x2c9b5e&&_0x953c5;}[_0x4d4538(0x91)](_0x287c9a){const _0x163575=_0x4d4538;return _0x287c9a[_0x163575(0xb6)](/\n(?![^{]*\})/g)[_0x163575(0xab)](_0x27c165=>_0x27c165[_0x163575(0x93)](_0x163575(0xb2),''))[_0x163575(0x86)](_0x199fd9=>_0x199fd9&&_0x199fd9[_0x163575(0x82)]>0x0&&_0x163575(0xb7)!==_0x199fd9)[_0x163575(0xab)](_0xefaa0d=>{const _0x377f73=_0x163575,{choices:_0x543492}=JSON[_0x377f73(0xa9)](_0xefaa0d);if(_0x543492[0x0]&&_0x543492[0x0][_0x377f73(0xba)]&&_0x543492[0x0][_0x377f73(0xba)][_0x377f73(0x95)])return _0x543492[0x0][_0x377f73(0xba)][_0x377f73(0x95)];})[_0x163575(0x86)](_0x5a094a=>_0x5a094a)[_0x163575(0x9c)]('');}}
|
package/src/aiassistant.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x24f29e=_0x472a;(function(_0x5dcbc1,_0x24fef8){const _0x14a184=_0x472a,_0x4e13ad=_0x5dcbc1();while(!![]){try{const _0x41fcbd=-parseInt(_0x14a184(0x19f))/0x1*(parseInt(_0x14a184(0x1c8))/0x2)+parseInt(_0x14a184(0x1de))/0x3+parseInt(_0x14a184(0x1ec))/0x4*(parseInt(_0x14a184(0x1e6))/0x5)+parseInt(_0x14a184(0x1bf))/0x6+parseInt(_0x14a184(0x1a0))/0x7+parseInt(_0x14a184(0x1d7))/0x8*(parseInt(_0x14a184(0x1b9))/0x9)+parseInt(_0x14a184(0x1a2))/0xa*(-parseInt(_0x14a184(0x1cd))/0xb);if(_0x41fcbd===_0x24fef8)break;else _0x4e13ad['push'](_0x4e13ad['shift']());}catch(_0xe0daaf){_0x4e13ad['push'](_0x4e13ad['shift']());}}}(_0x904d,0xc90ad));import{CKEditorError as _0x3ceac9}from'ckeditor5/src/utils.js';function _0x472a(_0x4616b0,_0x340cb8){const _0x904d6a=_0x904d();return _0x472a=function(_0x472a87,_0xa9d662){_0x472a87=_0x472a87-0x172;let _0x291225=_0x904d6a[_0x472a87];return _0x291225;},_0x472a(_0x4616b0,_0x340cb8);}import{Plugin as _0x5475dc}from'ckeditor5/src/core.js';import _0x586986 from'./aiassistantui.js';import _0x14c82a from'./aiassistantediting.js';import{getTranslation as _0xaefbb3}from'./utils/common-translations.js';export default class r extends _0x5475dc{static get[_0x24f29e(0x1a3)](){return[_0x586986,_0x14c82a];}static get[_0x24f29e(0x1a5)](){const _0xd96c1b=_0x24f29e;return _0xd96c1b(0x176);}constructor(_0x4341bd){const _0x19c520=_0x24f29e;super(_0x4341bd);const _0x4e8495=_0x4341bd[_0x19c520(0x1a6)];_0x4e8495[_0x19c520(0x188)](_0x19c520(0x1c3),getDefaultCommands(_0x4341bd[_0x19c520(0x1d0)])),_0x4e8495[_0x19c520(0x188)](_0x19c520(0x177),[]),_0x4e8495[_0x19c520(0x188)](_0x19c520(0x1d2),[]);const _0x8a1a7a=_0x4e8495[_0x19c520(0x17c)](_0x19c520(0x1c3)),_0x4c42e2=_0x4e8495[_0x19c520(0x17c)](_0x19c520(0x177)),_0x31cb1a=_0x4e8495[_0x19c520(0x17c)](_0x19c520(0x1d2));_0x4c42e2[_0x19c520(0x1d8)](_0x60a09c=>{const _0x1b7fe4=_0x19c520,_0x47df35=_0x8a1a7a[_0x1b7fe4(0x1e5)](_0x3cc629=>_0x3cc629[_0x1b7fe4(0x1b5)]===_0x60a09c[_0x1b7fe4(0x1b5)]);_0x47df35?_0x47df35[_0x1b7fe4(0x1c0)]=_0x47df35[_0x1b7fe4(0x1c0)][_0x1b7fe4(0x1a4)](_0x60a09c[_0x1b7fe4(0x1c0)]):_0x8a1a7a[_0x1b7fe4(0x192)](_0x60a09c);}),_0x8a1a7a[_0x19c520(0x1d8)](_0x30d79c=>{const _0x33dcc3=_0x19c520;_0x30d79c[_0x33dcc3(0x1c0)]=_0x30d79c[_0x33dcc3(0x1c0)][_0x33dcc3(0x186)](_0x1d8c63=>!_0x31cb1a[_0x33dcc3(0x196)](_0x1d8c63['id']));}),_0x4e8495[_0x19c520(0x1b6)](_0x19c520(0x1c3),_0x8a1a7a);}[_0x24f29e(0x189)](){const _0x2c31da=_0x24f29e,_0x8132dd=this[_0x2c31da(0x1ab)];this[_0x2c31da(0x175)]=_0x8132dd[_0x2c31da(0x1a6)][_0x2c31da(0x17c)](_0x2c31da(0x175)),this[_0x2c31da(0x18d)]=setInterval(()=>{const _0x566d2d=_0x2c31da;let _0x17a96d;for(const _0x59befb in _0x8132dd){const _0x1e21cd=_0x59befb,_0x5b64de=_0x8132dd[_0x1e21cd];if(_0x566d2d(0x18c)===_0x5b64de||_0x566d2d(0x190)===_0x5b64de||_0x566d2d(0x1d1)===_0x5b64de||_0x566d2d(0x1be)===_0x5b64de){delete _0x8132dd[_0x1e21cd],_0x17a96d=_0x5b64de;break;}}if(_0x566d2d(0x190)===_0x17a96d)throw clearInterval(this[_0x566d2d(0x18d)]),new _0x3ceac9(_0x566d2d(0x1c4),null);if(_0x566d2d(0x18c)===_0x17a96d&&console[_0x566d2d(0x1c9)](_0x566d2d(0x1d4)),_0x566d2d(0x1be)===_0x17a96d)throw clearInterval(this[_0x566d2d(0x18d)]),new _0x3ceac9(_0x566d2d(0x1a8),null);_0x566d2d(0x1d1)===_0x17a96d&&clearInterval(this[_0x566d2d(0x18d)]);},0x3e8);}[_0x24f29e(0x19a)](){const _0x2c8fda=_0x24f29e;this[_0x2c8fda(0x18d)]&&clearInterval(this[_0x2c8fda(0x18d)]);}}function _0x904d(){const _0x38f8da=['aiLicenseKeyTrial','_licenseKeyCheckInterval','Edit\x20or\x20review','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','aiLicenseKeyInvalid','Translate\x20the\x20content\x20to\x20English\x20language.','push','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','Poetic','includes','Translate','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','Arabic','destroy','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','Translate\x20the\x20content\x20to\x20Arabic\x20language.','Translate\x20the\x20content\x20to\x20Spanish\x20language.','changeStyle','3KhNyhV','8432270BfYvnx','Change\x20style','438320CbsTUz','requires','concat','pluginName','config','Business','ai-trial-license-key-reached-limit-changes','Casual','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','editor','Change\x20tone','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','changeTone','Translate\x20the\x20content\x20to\x20Hindi\x20language.','casual','Confident','translateHindi','Direct','German','groupId','set','direct','Make\x20longer','986688YMlqmC','Continue','Professional','Hindi','Improve\x20writing','aiLicenseKeyTrialLimit:operations','7757922QnfbIb','commands','Legal','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','ai.aiAssistant.commands','ai-invalid-license-key','Simplify\x20language','translateFrench','French','844124Wsuzpx','info','Portuguese','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','translatePortuguese','649AiDfNa','generate','legal','locale','aiLicenseKeyValid','ai.aiAssistant.removeCommands','Friendly','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','makeShorter','64PUosSZ','forEach','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','translateEnglish','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Translate\x20the\x20content\x20to\x20French\x20language.','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','2765430FKTNcy','confident','translateSpanish','Make\x20shorter','professional','business','poetic','find','20pnnave','translateChinese','summarize','Spanish','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','English','379280iucFOr','translateArabic','improveWriting','journalism','licenseKey','AIAssistant','ai.aiAssistant.extraCommandGroups','continue','Journalism','translateGerman','Generate\x20from\x20selection','get','editOrReview','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','friendly','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','translate','Simplified\x20Chinese','simplifyLanguage','makeLonger','filter','Summarize','define','init','Translate\x20to\x20%0','Translate\x20the\x20content\x20to\x20German\x20language.'];_0x904d=function(){return _0x38f8da;};return _0x904d();}export function getDefaultCommands(_0x36ca63){const _0x25e80b=_0x24f29e;return[{'groupId':_0x25e80b(0x17d),'groupLabel':_0xaefbb3(_0x36ca63,_0x25e80b(0x18e)),'commands':[{'id':_0x25e80b(0x173),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1bd)),'prompt':_0x25e80b(0x1db)},{'id':_0x25e80b(0x1d6),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1e1)),'prompt':_0x25e80b(0x193)},{'id':_0x25e80b(0x185),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1b8)),'prompt':_0x25e80b(0x1d9)},{'id':_0x25e80b(0x184),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1c5)),'prompt':_0x25e80b(0x1d5)}]},{'groupId':_0x25e80b(0x1ce),'groupLabel':_0xaefbb3(_0x36ca63,_0x25e80b(0x17b)),'commands':[{'id':_0x25e80b(0x1e8),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x187)),'prompt':_0x25e80b(0x180)},{'id':_0x25e80b(0x178),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1ba)),'prompt':_0x25e80b(0x1ad)}]},{'groupId':_0x25e80b(0x1ae),'groupLabel':_0xaefbb3(_0x36ca63,_0x25e80b(0x1ac)),'commands':[{'id':_0x25e80b(0x1e2),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1bb)),'prompt':_0x25e80b(0x1c2)},{'id':_0x25e80b(0x1b0),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1a9)),'prompt':_0x25e80b(0x17e)},{'id':_0x25e80b(0x1b7),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1b3)),'prompt':_0x25e80b(0x181)},{'id':_0x25e80b(0x1df),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1b1)),'prompt':_0x25e80b(0x1dd)},{'id':_0x25e80b(0x17f),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1d3)),'prompt':_0x25e80b(0x194)}]},{'groupId':_0x25e80b(0x19e),'groupLabel':_0xaefbb3(_0x36ca63,_0x25e80b(0x1a1)),'commands':[{'id':_0x25e80b(0x1e3),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1a7)),'prompt':_0x25e80b(0x1ea)},{'id':_0x25e80b(0x1cf),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x1c1)),'prompt':_0x25e80b(0x19b)},{'id':_0x25e80b(0x174),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x179)),'prompt':_0x25e80b(0x18f)},{'id':_0x25e80b(0x1e4),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x195)),'prompt':_0x25e80b(0x1cb)}]},{'groupId':_0x25e80b(0x182),'groupLabel':_0xaefbb3(_0x36ca63,_0x25e80b(0x197)),'commands':[{'id':_0x25e80b(0x1da),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1eb))]),'prompt':_0x25e80b(0x191)},{'id':_0x25e80b(0x1e0),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1e9))]),'prompt':_0x25e80b(0x19d)},{'id':_0x25e80b(0x1cc),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1ca))]),'prompt':_0x25e80b(0x198)},{'id':_0x25e80b(0x17a),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1b4))]),'prompt':_0x25e80b(0x18b)},{'id':_0x25e80b(0x1c6),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1c7))]),'prompt':_0x25e80b(0x1dc)},{'id':_0x25e80b(0x1e7),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x183))]),'prompt':_0x25e80b(0x1aa)},{'id':_0x25e80b(0x1b2),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x1bc))]),'prompt':_0x25e80b(0x1af)},{'id':_0x25e80b(0x172),'label':_0xaefbb3(_0x36ca63,_0x25e80b(0x18a),[_0xaefbb3(_0x36ca63,_0x25e80b(0x199))]),'prompt':_0x25e80b(0x19c)}]}];}
|
|
23
|
+
const _0xe303db=_0x4d9d;(function(_0x536b95,_0x46e1d4){const _0x5d5aa4=_0x4d9d,_0x559d10=_0x536b95();while(!![]){try{const _0x1590f0=-parseInt(_0x5d5aa4(0x22d))/0x1+-parseInt(_0x5d5aa4(0x1f9))/0x2+parseInt(_0x5d5aa4(0x1ea))/0x3*(parseInt(_0x5d5aa4(0x23d))/0x4)+parseInt(_0x5d5aa4(0x1f0))/0x5+parseInt(_0x5d5aa4(0x21a))/0x6+-parseInt(_0x5d5aa4(0x1e2))/0x7+parseInt(_0x5d5aa4(0x22c))/0x8;if(_0x1590f0===_0x46e1d4)break;else _0x559d10['push'](_0x559d10['shift']());}catch(_0x2c3764){_0x559d10['push'](_0x559d10['shift']());}}}(_0xdf38,0xe30c2));import{CKEditorError as _0x5368a9}from'ckeditor5/src/utils.js';function _0xdf38(){const _0x2d9de2=['Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','aiLicenseKeyTrial','changeTone','Make\x20shorter','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','12MMAbav','Poetic','aiLicenseKeyTrialLimit:operations','Confident','ai.aiAssistant.commands','Friendly','4454745CnfJja','pluginName','English','destroy','forEach','makeLonger','editor','journalism','translate','2116390zHOUXm','translateHindi','translateSpanish','legal','Change\x20tone','casual','Translate\x20to\x20%0','requires','licenseKey','ai-trial-license-key-reached-limit-changes','poetic','translateEnglish','locale','info','Translate','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','confident','Professional','translatePortuguese','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','find','Improve\x20writing','Change\x20style','init','Translate\x20the\x20content\x20to\x20Arabic\x20language.','AIAssistant','Continue','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','get','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','groupId','set','7300698UJoqeT','aiLicenseKeyValid','business','Translate\x20the\x20content\x20to\x20English\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','Casual','French','direct','config','define','editOrReview','translateArabic','Business','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','makeShorter','changeStyle','aiLicenseKeyInvalid','German','10953352CeXTzN','1266091mPigzb','concat','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','_licenseKeyCheckInterval','includes','translateChinese','commands','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','generate','Hindi','Translate\x20the\x20content\x20to\x20French\x20language.','filter','ai-invalid-license-key','Generate\x20from\x20selection','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','professional','1454308Umdgku','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','friendly','Translate\x20the\x20content\x20to\x20German\x20language.','Simplify\x20language','Journalism','Translate\x20the\x20content\x20to\x20Hindi\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','Make\x20longer','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','continue','summarize','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Edit\x20or\x20review','Portuguese','Spanish','Translate\x20the\x20content\x20to\x20Spanish\x20language.','translateGerman','Summarize','ai.aiAssistant.removeCommands','Arabic','simplifyLanguage','ai.aiAssistant.extraCommandGroups','Direct','translateFrench','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','improveWriting','Simplified\x20Chinese','11738559LXBKLj','Legal','push'];_0xdf38=function(){return _0x2d9de2;};return _0xdf38();}import{Plugin as _0x4f8922}from'ckeditor5/src/core.js';import _0x1f7c5a from'./aiassistantui.js';function _0x4d9d(_0xe0a2bc,_0x14ebf3){const _0xdf382a=_0xdf38();return _0x4d9d=function(_0x4d9d08,_0x55f6c8){_0x4d9d08=_0x4d9d08-0x1c9;let _0x5e6100=_0xdf382a[_0x4d9d08];return _0x5e6100;},_0x4d9d(_0xe0a2bc,_0x14ebf3);}import _0x185b2b from'./aiassistantediting.js';import{getTranslation as _0x5afc58}from'./utils/common-translations.js';export default class r extends _0x4f8922{static get[_0xe303db(0x200)](){return[_0x1f7c5a,_0x185b2b];}static get[_0xe303db(0x1f1)](){const _0x233488=_0xe303db;return _0x233488(0x213);}constructor(_0x11963f){const _0x13f6ab=_0xe303db;super(_0x11963f);const _0x4ea40c=_0x11963f[_0x13f6ab(0x222)];_0x4ea40c[_0x13f6ab(0x223)](_0x13f6ab(0x1ee),getDefaultCommands(_0x11963f[_0x13f6ab(0x205)])),_0x4ea40c[_0x13f6ab(0x223)](_0x13f6ab(0x1dc),[]),_0x4ea40c[_0x13f6ab(0x223)](_0x13f6ab(0x1d9),[]);const _0x49f99a=_0x4ea40c[_0x13f6ab(0x216)](_0x13f6ab(0x1ee)),_0x53e3bd=_0x4ea40c[_0x13f6ab(0x216)](_0x13f6ab(0x1dc)),_0x149af4=_0x4ea40c[_0x13f6ab(0x216)](_0x13f6ab(0x1d9));_0x53e3bd[_0x13f6ab(0x1f4)](_0x43aa8f=>{const _0x18da6f=_0x13f6ab,_0x5efde7=_0x49f99a[_0x18da6f(0x20e)](_0x49a5ed=>_0x49a5ed[_0x18da6f(0x218)]===_0x43aa8f[_0x18da6f(0x218)]);_0x5efde7?_0x5efde7[_0x18da6f(0x233)]=_0x5efde7[_0x18da6f(0x233)][_0x18da6f(0x22e)](_0x43aa8f[_0x18da6f(0x233)]):_0x49f99a[_0x18da6f(0x1e4)](_0x43aa8f);}),_0x49f99a[_0x13f6ab(0x1f4)](_0x2f7a28=>{const _0x246485=_0x13f6ab;_0x2f7a28[_0x246485(0x233)]=_0x2f7a28[_0x246485(0x233)][_0x246485(0x238)](_0x4fe540=>!_0x149af4[_0x246485(0x231)](_0x4fe540['id']));}),_0x4ea40c[_0x13f6ab(0x219)](_0x13f6ab(0x1ee),_0x49f99a);}[_0xe303db(0x211)](){const _0x5dc64a=_0xe303db,_0x3447c1=this[_0x5dc64a(0x1f6)];this[_0x5dc64a(0x201)]=_0x3447c1[_0x5dc64a(0x222)][_0x5dc64a(0x216)](_0x5dc64a(0x201)),this[_0x5dc64a(0x230)]=setInterval(()=>{const _0xb65089=_0x5dc64a;let _0x19bba5;for(const _0x470935 in _0x3447c1){const _0x51ea96=_0x470935,_0x5f207a=_0x3447c1[_0x51ea96];if(_0xb65089(0x1e6)===_0x5f207a||_0xb65089(0x22a)===_0x5f207a||_0xb65089(0x21b)===_0x5f207a||_0xb65089(0x1ec)===_0x5f207a){delete _0x3447c1[_0x51ea96],_0x19bba5=_0x5f207a;break;}}if(_0xb65089(0x22a)===_0x19bba5)throw clearInterval(this[_0xb65089(0x230)]),new _0x5368a9(_0xb65089(0x239),null);if(_0xb65089(0x1e6)===_0x19bba5&&console[_0xb65089(0x206)](_0xb65089(0x208)),_0xb65089(0x1ec)===_0x19bba5)throw clearInterval(this[_0xb65089(0x230)]),new _0x5368a9(_0xb65089(0x202),null);_0xb65089(0x21b)===_0x19bba5&&clearInterval(this[_0xb65089(0x230)]);},0x3e8);}[_0xe303db(0x1f3)](){const _0x85bfa=_0xe303db;this[_0x85bfa(0x230)]&&clearInterval(this[_0x85bfa(0x230)]);}}export function getDefaultCommands(_0x2a2657){const _0x33bec8=_0xe303db;return[{'groupId':_0x33bec8(0x224),'groupLabel':_0x5afc58(_0x2a2657,_0x33bec8(0x1d3)),'commands':[{'id':_0x33bec8(0x1e0),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x20f)),'prompt':_0x33bec8(0x1d2)},{'id':_0x33bec8(0x228),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1e8)),'prompt':_0x33bec8(0x1e5)},{'id':_0x33bec8(0x1f5),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1cd)),'prompt':_0x33bec8(0x20d)},{'id':_0x33bec8(0x1db),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1c9)),'prompt':_0x33bec8(0x234)}]},{'groupId':_0x33bec8(0x235),'groupLabel':_0x5afc58(_0x2a2657,_0x33bec8(0x23a)),'commands':[{'id':_0x33bec8(0x1d1),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1d8)),'prompt':_0x33bec8(0x23b)},{'id':_0x33bec8(0x1d0),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x214)),'prompt':_0x33bec8(0x22f)}]},{'groupId':_0x33bec8(0x1e7),'groupLabel':_0x5afc58(_0x2a2657,_0x33bec8(0x1fd)),'commands':[{'id':_0x33bec8(0x23c),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x20a)),'prompt':_0x33bec8(0x20c)},{'id':_0x33bec8(0x1fe),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x21f)),'prompt':_0x33bec8(0x227)},{'id':_0x33bec8(0x221),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1dd)),'prompt':_0x33bec8(0x1e9)},{'id':_0x33bec8(0x209),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ed)),'prompt':_0x33bec8(0x23e)},{'id':_0x33bec8(0x23f),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ef)),'prompt':_0x33bec8(0x215)}]},{'groupId':_0x33bec8(0x229),'groupLabel':_0x5afc58(_0x2a2657,_0x33bec8(0x210)),'commands':[{'id':_0x33bec8(0x21c),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x226)),'prompt':_0x33bec8(0x217)},{'id':_0x33bec8(0x1fc),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1e3)),'prompt':_0x33bec8(0x1cc)},{'id':_0x33bec8(0x1f7),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ca)),'prompt':_0x33bec8(0x21e)},{'id':_0x33bec8(0x203),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1eb)),'prompt':_0x33bec8(0x1df)}]},{'groupId':_0x33bec8(0x1f8),'groupLabel':_0x5afc58(_0x2a2657,_0x33bec8(0x207)),'commands':[{'id':_0x33bec8(0x204),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x1f2))]),'prompt':_0x33bec8(0x21d)},{'id':_0x33bec8(0x1fb),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x1d5))]),'prompt':_0x33bec8(0x1d6)},{'id':_0x33bec8(0x20b),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x1d4))]),'prompt':_0x33bec8(0x1cf)},{'id':_0x33bec8(0x1d7),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x22b))]),'prompt':_0x33bec8(0x240)},{'id':_0x33bec8(0x1de),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x220))]),'prompt':_0x33bec8(0x237)},{'id':_0x33bec8(0x232),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x1e1))]),'prompt':_0x33bec8(0x1ce)},{'id':_0x33bec8(0x1fa),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x236))]),'prompt':_0x33bec8(0x1cb)},{'id':_0x33bec8(0x225),'label':_0x5afc58(_0x2a2657,_0x33bec8(0x1ff),[_0x5afc58(_0x2a2657,_0x33bec8(0x1da))]),'prompt':_0x33bec8(0x212)}]}];}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import type { Position } from 'ckeditor5/src/engine.js';
|
|
10
|
-
import { ClipboardMarkersUtils } from 'ckeditor5/src/clipboard.js';
|
|
11
10
|
/**
|
|
12
11
|
* The AI assistant editing plugin.
|
|
13
12
|
*/
|
|
@@ -16,10 +15,6 @@ export default class AIAssistantEditing extends Plugin {
|
|
|
16
15
|
* @inheritDoc
|
|
17
16
|
*/
|
|
18
17
|
static get pluginName(): "AIAssistantEditing";
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
static get requires(): readonly [typeof ClipboardMarkersUtils];
|
|
23
18
|
/**
|
|
24
19
|
* @inheritDoc
|
|
25
20
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1449f0=_0x362b;(function(_0x2d21f0,_0x28372d){const _0x4e38dd=_0x362b,_0x5a4330=_0x2d21f0();while(!![]){try{const _0x30553b=parseInt(_0x4e38dd(0x17a))/0x1*(parseInt(_0x4e38dd(0x147))/0x2)+-parseInt(_0x4e38dd(0x15a))/0x3*(-parseInt(_0x4e38dd(0x15c))/0x4)+parseInt(_0x4e38dd(0x148))/0x5*(parseInt(_0x4e38dd(0x167))/0x6)+parseInt(_0x4e38dd(0x170))/0x7+-parseInt(_0x4e38dd(0x169))/0x8*(parseInt(_0x4e38dd(0x15e))/0x9)+parseInt(_0x4e38dd(0x185))/0xa+-parseInt(_0x4e38dd(0x171))/0xb;if(_0x30553b===_0x28372d)break;else _0x5a4330['push'](_0x5a4330['shift']());}catch(_0x1efd24){_0x5a4330['push'](_0x5a4330['shift']());}}}(_0x1246,0x2a403));import{Plugin as _0x200de7}from'ckeditor5/src/core.js';function _0x1246(){const _0x1343ba=['ai.useTheme','getRange','145140gfMLGA','getFirstRange','markers','insertContent','10022EvjhgS','210545AxnPQk','getLastPosition','editingDowncast','from','push','document','createSelection','has','canEditAt','config','markerToElement','ck-ai-assistant-ui_theme','model','isContent','pop','ck-fake-ai-selection_collapsed','ck-fake-ai-selection-candidate','get','105bVRxiE','setSelection','12832CLnNyN','addMarker','1160559xxuiCp','ai-ui-candidate','toView','conversion','change','removeMarker','selection','length','data','18kUHZWX','getLastMatchingPosition','8wFTGsJ','processor','AIAssistantEditing','createPositionAfter','toModel','start','updateMarker','96838WduFPl','2756292LExRNK','for','init','pluginName','insertContentBelow','hideFakeVisualSelection','markerToHighlight','isAtEnd','schema','57kIKukj','ck-fake-ai-selection','createRange','editor','ai-ui','end','span','getSelectedBlocks','showFakeVisualSelection'];_0x1246=function(){return _0x1343ba;};return _0x1246();}const s=_0x1449f0(0x17e),c=_0x1449f0(0x15f);function _0x362b(_0x5e2fc8,_0x1d3d0a){const _0x124638=_0x1246();return _0x362b=function(_0x362bd2,_0x560727){_0x362bd2=_0x362bd2-0x145;let _0x560545=_0x124638[_0x362bd2];return _0x560545;},_0x362b(_0x5e2fc8,_0x1d3d0a);}export default class i extends _0x200de7{static get[_0x1449f0(0x174)](){const _0x4756c1=_0x1449f0;return _0x4756c1(0x16b);}[_0x1449f0(0x173)](){const _0x17114e=_0x1449f0,{editor:_0x528c00}=this,_0x59aca4=[_0x17114e(0x17b)];_0x528c00[_0x17114e(0x151)][_0x17114e(0x159)](_0x17114e(0x183))&&_0x59aca4[_0x17114e(0x14c)](_0x17114e(0x153)),_0x528c00[_0x17114e(0x161)][_0x17114e(0x172)](_0x17114e(0x14a))[_0x17114e(0x177)]({'model':s,'view':{'classes':_0x59aca4,'priority':0xc}}),_0x528c00[_0x17114e(0x161)][_0x17114e(0x172)](_0x17114e(0x14a))[_0x17114e(0x152)]({'model':s,'view':{'name':_0x17114e(0x180),'classes':[_0x17114e(0x17b),_0x17114e(0x157)],'priority':0xc}}),_0x528c00[_0x17114e(0x161)][_0x17114e(0x172)](_0x17114e(0x14a))[_0x17114e(0x177)]({'model':c,'view':{'classes':[_0x17114e(0x158)],'priority':0x19}}),_0x528c00[_0x17114e(0x161)][_0x17114e(0x172)](_0x17114e(0x14a))[_0x17114e(0x152)]({'model':c,'view':{'name':_0x17114e(0x180),'classes':[_0x17114e(0x158),_0x17114e(0x157)],'priority':0x19}});}[_0x1449f0(0x182)](_0x4d8677){const _0x3b4f84=_0x1449f0,_0x50926b=this[_0x3b4f84(0x17d)][_0x3b4f84(0x154)],_0x2806b0=_0x4d8677?c:s;_0x50926b[_0x3b4f84(0x162)](_0x48f0d1=>{const _0x5bdedb=_0x3b4f84,_0x3d4587=_0x50926b[_0x5bdedb(0x14d)][_0x5bdedb(0x164)][_0x5bdedb(0x186)]();if(_0x50926b[_0x5bdedb(0x145)][_0x5bdedb(0x14f)](_0x2806b0))_0x48f0d1[_0x5bdedb(0x16f)](_0x2806b0,{'range':_0x3d4587});else{if(_0x3d4587[_0x5bdedb(0x16e)][_0x5bdedb(0x178)]){const _0x73c76b=_0x3d4587[_0x5bdedb(0x16e)][_0x5bdedb(0x168)](({item:_0x54d8f0})=>!_0x50926b[_0x5bdedb(0x179)][_0x5bdedb(0x155)](_0x54d8f0),{'boundaries':_0x3d4587});_0x48f0d1[_0x5bdedb(0x15d)](_0x2806b0,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x48f0d1[_0x5bdedb(0x17c)](_0x73c76b,_0x3d4587[_0x5bdedb(0x17f)])});}else _0x48f0d1[_0x5bdedb(0x15d)](_0x2806b0,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3d4587});}});}[_0x1449f0(0x176)](_0xe0a289){const _0x39f282=_0x1449f0,_0x4c840e=this[_0x39f282(0x17d)][_0x39f282(0x154)],_0x32f5a2=_0xe0a289?c:s;_0x4c840e[_0x39f282(0x145)][_0x39f282(0x14f)](_0x32f5a2)&&_0x4c840e[_0x39f282(0x162)](_0x42e5d8=>{const _0x9e61fd=_0x39f282;_0x42e5d8[_0x9e61fd(0x163)](_0x32f5a2);});}[_0x1449f0(0x146)](_0x3b77f3,_0x3cfdc1){const _0x23090e=_0x1449f0,_0xc6bca5=_0x3cfdc1||this[_0x23090e(0x17d)][_0x23090e(0x154)][_0x23090e(0x145)][_0x23090e(0x159)](s)[_0x23090e(0x184)]();if(!this[_0x23090e(0x17d)][_0x23090e(0x154)][_0x23090e(0x150)](_0xc6bca5))return;const _0x40c9f5=this[_0x23090e(0x17d)][_0x23090e(0x166)][_0x23090e(0x16a)][_0x23090e(0x160)](_0x3b77f3),_0x3dd47d=this[_0x23090e(0x17d)][_0x23090e(0x166)][_0x23090e(0x16d)](_0x40c9f5);this[_0x23090e(0x17d)][_0x23090e(0x154)][_0x23090e(0x162)](_0x47f595=>{const _0x52bf66=_0x23090e;this[_0x52bf66(0x176)]();const _0x3638ed=this[_0x52bf66(0x17d)][_0x52bf66(0x154)][_0x52bf66(0x146)](_0x3dd47d,_0xc6bca5);_0x3638ed&&_0x47f595[_0x52bf66(0x15b)](_0x3638ed);});}[_0x1449f0(0x175)](_0x3704df){const _0xb27e4b=_0x1449f0,{model:_0x88317a}=this[_0xb27e4b(0x17d)],_0x331d13=Array[_0xb27e4b(0x14b)](_0x88317a[_0xb27e4b(0x14e)](this[_0xb27e4b(0x17d)][_0xb27e4b(0x154)][_0xb27e4b(0x145)][_0xb27e4b(0x159)](s)[_0xb27e4b(0x184)]())[_0xb27e4b(0x181)]()),_0x26a8a7=_0x331d13[_0xb27e4b(0x165)]?_0x88317a[_0xb27e4b(0x16c)](_0x331d13[_0xb27e4b(0x156)]()):_0x88317a[_0xb27e4b(0x14d)][_0xb27e4b(0x164)][_0xb27e4b(0x149)]();this[_0xb27e4b(0x146)](_0x3704df,_0x26a8a7);}}
|