@ckeditor/ckeditor5-ai 0.0.0-nightly-20231222.0 → 0.0.0-nightly-20231224.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ai",
3
- "version": "0.0.0-nightly-20231222.0",
3
+ "version": "0.0.0-nightly-20231224.0",
4
4
  "description": "AI-powered features for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,9 +23,9 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "ckeditor5": "0.0.0-nightly-20231222.0",
26
+ "ckeditor5": "0.0.0-nightly-20231224.0",
27
27
  "@aws-sdk/client-bedrock-runtime": "3.470.0",
28
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20231222.0",
28
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20231224.0",
29
29
  "lodash-es": "4.17.21"
30
30
  },
31
31
  "type": "module",
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5be9=['AIAdapter','textAdapter','aiadapter-text-adapter-not-set','AIRequestError','afterInit','name'];(function(_0x2c3854,_0x5be9ef){var _0x31791f=function(_0x5ce226){while(--_0x5ce226){_0x2c3854['push'](_0x2c3854['shift']());}};_0x31791f(++_0x5be9ef);}(_0x5be9,0x11d));var _0x3179=function(_0x2c3854,_0x5be9ef){_0x2c3854=_0x2c3854-0x0;var _0x31791f=_0x5be9[_0x2c3854];return _0x31791f;};import{Plugin as _0x44069b}from'ckeditor5/src/core.js';import{CKEditorError as _0x334233}from'ckeditor5/src/utils.js';export default class A extends _0x44069b{static get['pluginName'](){return _0x3179('0x3');}[_0x3179('0x1')](){if(!this[_0x3179('0x4')])throw new _0x334233(_0x3179('0x5'),null);}}export class AIRequestError extends Error{constructor(_0x4a9f3f){super(_0x4a9f3f),this[_0x3179('0x2')]=_0x3179('0x0');}}
23
+ var _0x4536=['aiadapter-text-adapter-not-set','AIAdapter','name','afterInit'];(function(_0x197116,_0x453669){var _0x5493bc=function(_0x330a71){while(--_0x330a71){_0x197116['push'](_0x197116['shift']());}};_0x5493bc(++_0x453669);}(_0x4536,0xce));var _0x5493=function(_0x197116,_0x453669){_0x197116=_0x197116-0x0;var _0x5493bc=_0x4536[_0x197116];return _0x5493bc;};import{Plugin as _0x18963b}from'ckeditor5/src/core.js';import{CKEditorError as _0x1e17ff}from'ckeditor5/src/utils.js';export default class A extends _0x18963b{static get['pluginName'](){return _0x5493('0x3');}[_0x5493('0x1')](){if(!this['textAdapter'])throw new _0x1e17ff(_0x5493('0x2'),null);}}export class AIRequestError extends Error{constructor(_0xf63fdd){super(_0xf63fdd),this[_0x5493('0x0')]='AIRequestError';}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x25cf=['get','_prepareRequestHeaders','plugins','abort','reject','AbortError','_prepareRequestParameters','abortController','makeRequest','editor','locale','aborted','object','assign','error','init'];(function(_0x55a1f9,_0x25cf9e){const _0x22fb1d=function(_0x290e8e){while(--_0x290e8e){_0x55a1f9['push'](_0x55a1f9['shift']());}};_0x22fb1d(++_0x25cf9e);}(_0x25cf,0x1cc));const _0x22fb=function(_0x55a1f9,_0x25cf9e){_0x55a1f9=_0x55a1f9-0x0;let _0x22fb1d=_0x25cf[_0x55a1f9];return _0x22fb1d;};import{Plugin as _0x239b59}from'ckeditor5/src/core.js';import{CKEditorError as _0x1066ec}from'ckeditor5/src/utils.js';import{default as _0x55d40d,AIRequestError as _0x53e201}from'./aiadapter.js';import{getTranslation as _0xda184c}from'../utils/common-translations.js';export default class _ extends _0x239b59{static get['requires'](){return[_0x55d40d];}constructor(_0x332a4a){super(_0x332a4a),this['abortController']=new AbortController();}[_0x22fb('0x3')](){this[_0x22fb('0xd')][_0x22fb('0x6')][_0x22fb('0x4')](_0x55d40d)['textAdapter']=this;}[_0x22fb('0x7')](){this['abortController']['signal'][_0x22fb('0xf')]||(this[_0x22fb('0xb')][_0x22fb('0x7')](),this['abortController']=new AbortController());}async[_0x22fb('0xc')](_0x5e6c4f){return this['sendRequest'](_0x5e6c4f)['catch'](_0x20b56d=>{if(_0x20b56d instanceof _0x53e201)return Promise['reject'](_0x20b56d);if(_0x22fb('0x9')==_0x20b56d['name'])return Promise['resolve']();throw console[_0x22fb('0x2')](_0x20b56d),new _0x1066ec('aitextadapter-send-request-failed',null);});}async[_0x22fb('0x5')](_0x3721c9,_0x3359ea){const _0x16bea4=this[_0x22fb('0xd')][_0x22fb('0xe')],_0x264df8={'Content-Type':'application/json'};if(_0x22fb('0x0')==typeof _0x3721c9)Object[_0x22fb('0x1')](_0x264df8,_0x3721c9);else{if(_0x3721c9)try{const _0x1a2fcf=await _0x3721c9(_0x3359ea);Object['assign'](_0x264df8,_0x1a2fcf);}catch(_0x7358e8){return Promise['reject'](new _0x53e201(_0xda184c(_0x16bea4,'AI_ERROR_GET_HEADERS')));}}return _0x264df8;}async[_0x22fb('0xa')](_0x149541,_0x1e4238){const _0x296630=this[_0x22fb('0xd')][_0x22fb('0xe')];if(_0x22fb('0x0')==typeof _0x149541)return _0x149541;try{return await _0x149541(_0x1e4238);}catch(_0x5974c7){return Promise[_0x22fb('0x8')](new _0x53e201(_0xda184c(_0x296630,'AI_ERROR_GET_PARAMETERS')));}}}
23
+ const _0x1ea6=['_prepareRequestHeaders','init','abortController','application/json','locale','sendRequest','resolve','editor','reject','get','_prepareRequestParameters','aitextadapter-send-request-failed','AI_ERROR_GET_PARAMETERS','signal','requires','object','AI_ERROR_GET_HEADERS','assign','error','plugins'];(function(_0x5dfbbb,_0x1ea618){const _0x528dbb=function(_0x35145d){while(--_0x35145d){_0x5dfbbb['push'](_0x5dfbbb['shift']());}};_0x528dbb(++_0x1ea618);}(_0x1ea6,0x1ef));const _0x528d=function(_0x5dfbbb,_0x1ea618){_0x5dfbbb=_0x5dfbbb-0x0;let _0x528dbb=_0x1ea6[_0x5dfbbb];return _0x528dbb;};import{Plugin as _0x4fb89f}from'ckeditor5/src/core.js';import{CKEditorError as _0x3e7683}from'ckeditor5/src/utils.js';import{default as _0x13779a,AIRequestError as _0x5e888c}from'./aiadapter.js';import{getTranslation as _0xaab3c9}from'../utils/common-translations.js';export default class _ extends _0x4fb89f{static get[_0x528d('0x13')](){return[_0x13779a];}constructor(_0x3cabb8){super(_0x3cabb8),this[_0x528d('0x7')]=new AbortController();}[_0x528d('0x6')](){this[_0x528d('0xc')][_0x528d('0x4')][_0x528d('0xe')](_0x13779a)['textAdapter']=this;}['abort'](){this[_0x528d('0x7')][_0x528d('0x12')]['aborted']||(this[_0x528d('0x7')]['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x22d62c){return this[_0x528d('0xa')](_0x22d62c)['catch'](_0x920bcf=>{if(_0x920bcf instanceof _0x5e888c)return Promise['reject'](_0x920bcf);if('AbortError'==_0x920bcf['name'])return Promise[_0x528d('0xb')]();throw console[_0x528d('0x3')](_0x920bcf),new _0x3e7683(_0x528d('0x10'),null);});}async[_0x528d('0x5')](_0x3798e6,_0x3ed4f4){const _0x2e5e1c=this[_0x528d('0xc')]['locale'],_0x1649b0={'Content-Type':_0x528d('0x8')};if(_0x528d('0x0')==typeof _0x3798e6)Object[_0x528d('0x2')](_0x1649b0,_0x3798e6);else{if(_0x3798e6)try{const _0x44931e=await _0x3798e6(_0x3ed4f4);Object[_0x528d('0x2')](_0x1649b0,_0x44931e);}catch(_0x4d6b28){return Promise['reject'](new _0x5e888c(_0xaab3c9(_0x2e5e1c,_0x528d('0x1'))));}}return _0x1649b0;}async[_0x528d('0xf')](_0x19592a,_0x32514b){const _0x1fd662=this[_0x528d('0xc')][_0x528d('0x9')];if('object'==typeof _0x19592a)return _0x19592a;try{return await _0x19592a(_0x32514b);}catch(_0x13b56f){return Promise[_0x528d('0xd')](new _0x5e888c(_0xaab3c9(_0x1fd662,_0x528d('0x11'))));}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1329=['read','abortController','\x0a<</SYS>>\x0a[INST]\x0a','text','</span>','ai21.j2','_cleanUpData','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','AI_ERROR_UNSUPPORTED_MODEL','resolve','utf8','stringify','config','chunk','_apiUrl','_requestParameters','locale','Human:\x0a','POST','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.','_prepareRequestParameters','ai.aws.apiUrl','anthropic.claude-v2','ai.aws.requestParameters.top_k','_processAWSRequest','signal','preparePrompt','AWSTextAdapter','bytes','send','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.','cohere.command','_processProxyRequest','from','parse','utf-8','data','getModelFamily','ai.aws.requestParameters.top_p','toString','_readAsyncIterableResponse','application/json','ai.aws.requestParameters.max_tokens_to_sample','_requestHeaders','ai.aws.requestParameters.temperature','_prepareRequestHeaders','define','ai.aws.requestHeaders','test','_readStreamableResponse','ai.aws.requestParameters.model','_bedrockClientConfig','<<SYS>>\x0a','sendRequest','pluginName','meta.llama','body','anthropic.claude','\x0a\x0aAssistant:','generations','get','decode','_readStaticResponse','<span>','bedrock-2023-05-31'];(function(_0x332bec,_0x132950){const _0x3b5cc2=function(_0x2965c6){while(--_0x2965c6){_0x332bec['push'](_0x332bec['shift']());}};_0x3b5cc2(++_0x132950);}(_0x1329,0x13b));const _0x3b5c=function(_0x332bec,_0x132950){_0x332bec=_0x332bec-0x0;let _0x3b5cc2=_0x1329[_0x332bec];return _0x3b5cc2;};import{default as _0x44e700}from'./aitextadapter.js';import{AIRequestError as _0x59c410}from'./aiadapter.js';import{BedrockRuntimeClient as _0x360937,InvokeModelCommand as _0x458cd3,InvokeModelWithResponseStreamCommand as _0x8e4501}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x3ce59d}from'../utils/common-translations.js';export default class O extends _0x44e700{static get[_0x3b5c('0x40')](){return _0x3b5c('0x25');}constructor(_0x266b5c){super(_0x266b5c),_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x5')]('ai.aws.requestParameters')||(_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x38')](_0x3b5c('0x3c'),_0x3b5c('0x20')),_0x266b5c[_0x3b5c('0x16')]['define'](_0x3b5c('0x34'),0x7d0),_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x38')](_0x3b5c('0x36'),0x1),_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x38')](_0x3b5c('0x30'),0x1),_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x38')](_0x3b5c('0x21'),0xfa),_0x266b5c['config'][_0x3b5c('0x38')]('ai.aws.requestParameters.anthropic_version',_0x3b5c('0x9')),_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x38')]('ai.aws.requestParameters.stream',!0x0)),this[_0x3b5c('0x18')]=_0x266b5c[_0x3b5c('0x16')]['get'](_0x3b5c('0x1f')),this['_bedrockClientConfig']=_0x266b5c['config'][_0x3b5c('0x5')]('ai.aws.bedrockClientConfig'),this[_0x3b5c('0x35')]=_0x266b5c['config'][_0x3b5c('0x5')](_0x3b5c('0x39')),this[_0x3b5c('0x19')]=_0x266b5c[_0x3b5c('0x16')][_0x3b5c('0x5')]('ai.aws.requestParameters');}async[_0x3b5c('0x3f')]({query:_0x2ce2e7,context:_0x213e7e,onData:_0x306a82,actionId:_0x2a43f7}){const {model:_0x22cc71,stream:_0x346b14,..._0x2de03f}=await this[_0x3b5c('0x1e')](this['_requestParameters'],_0x2a43f7),_0x204a93={'prompt':await this[_0x3b5c('0x24')](_0x2ce2e7,_0x213e7e,_0x22cc71,_0x2a43f7),..._0x2de03f};this[_0x3b5c('0x18')]?await this[_0x3b5c('0x2a')](_0x204a93,_0x22cc71,_0x346b14,_0x306a82,_0x2a43f7):await this[_0x3b5c('0x22')](_0x204a93,_0x22cc71,_0x346b14,_0x306a82);}async[_0x3b5c('0x24')](_0x456d0e,_0x2424cc,_0xf221a5,_0x1874b5){let _0x1501f6,_0x3d2b75;return _0x2424cc?(_0x1501f6=_0x3b5c('0x28'),_0x3d2b75='Instruction:\x0a'+_0x456d0e+_0x3b5c('0x11')+(_0x2424cc['startsWith']('<')?_0x2424cc:_0x3b5c('0x8')+_0x2424cc+_0x3b5c('0xe'))):(_0x1501f6=_0x3b5c('0x1d'),_0x3d2b75=_0x456d0e),_0x3b5c('0x0')==this[_0x3b5c('0x2f')](_0xf221a5)?_0x3b5c('0x3e')+_0x1501f6+_0x3b5c('0xc')+_0x3d2b75+'\x0a[/INST]':_0x3b5c('0x1b')+_0x1501f6+'\x0a'+_0x3d2b75+_0x3b5c('0x3');}[_0x3b5c('0x2f')](_0x1b6ccb){if(/^anthropic\.claude/[_0x3b5c('0x3a')](_0x1b6ccb))return _0x3b5c('0x2');if(/^ai21\.j2/[_0x3b5c('0x3a')](_0x1b6ccb))return _0x3b5c('0xf');if(/^cohere\.command/[_0x3b5c('0x3a')](_0x1b6ccb))return'cohere.command';if(/^meta\.llama/[_0x3b5c('0x3a')](_0x1b6ccb))return _0x3b5c('0x0');throw new _0x59c410(_0x3ce59d(this['editor'][_0x3b5c('0x1a')],_0x3b5c('0x12'),_0x1b6ccb));}async[_0x3b5c('0x2a')](_0x5675c6,_0x194d80,_0x3e97ee,_0xe20a8e,_0x483267){const _0x400eeb={'method':_0x3b5c('0x1c'),'headers':await this[_0x3b5c('0x37')](this[_0x3b5c('0x35')],_0x483267),'body':JSON[_0x3b5c('0x15')]({..._0x5675c6,'model':_0x194d80,'stream':_0x3e97ee}),'signal':this[_0x3b5c('0xb')][_0x3b5c('0x23')]},_0xc06d33=await fetch(this[_0x3b5c('0x18')],_0x400eeb);_0x3e97ee?await this[_0x3b5c('0x3b')](_0xc06d33,_0x194d80,_0xe20a8e):await this['_readStaticResponse'](_0xc06d33,_0x194d80,_0xe20a8e);}async['_processAWSRequest'](_0x398c34,_0x28be1b,_0x21e3d6,_0x51ddf4){const _0x5a8829=new _0x360937(this[_0x3b5c('0x3d')]),_0x5dc893={'body':JSON[_0x3b5c('0x15')](_0x398c34),'contentType':_0x3b5c('0x33'),'accept':'application/json','modelId':_0x28be1b};let _0x35c402;if(_0x21e3d6){const _0x3789cb=new _0x8e4501(_0x5dc893);_0x35c402=await _0x5a8829[_0x3b5c('0x27')](_0x3789cb,{'abortSignal':this[_0x3b5c('0xb')][_0x3b5c('0x23')]}),await this['_readAsyncIterableResponse'](_0x35c402,_0x28be1b,_0x51ddf4);}else{const _0x167452=new _0x458cd3(_0x5dc893);_0x35c402=await _0x5a8829[_0x3b5c('0x27')](_0x167452,{'abortSignal':this['abortController'][_0x3b5c('0x23')]}),await this[_0x3b5c('0x7')](_0x35c402,_0x28be1b,_0x51ddf4);}}async[_0x3b5c('0x32')](_0x5208a2,_0xd1a799,_0x650b1e){const _0xd7dc34=_0x5208a2['body'],_0xf72077=new TextDecoder(_0x3b5c('0x2d'));let _0x282178='';for await(const _0x122e9b of _0xd7dc34)if(_0x122e9b[_0x3b5c('0x17')]){const _0x2c4f07=_0xf72077[_0x3b5c('0x6')](_0x122e9b['chunk'][_0x3b5c('0x26')]),_0x176b54=JSON[_0x3b5c('0x2c')](_0x2c4f07);_0x282178+=this['_cleanUpData'](_0x176b54,_0xd1a799),_0x650b1e(_0x282178);}return Promise[_0x3b5c('0x13')]();}async['_readStreamableResponse'](_0x2b9f02,_0x24c235,_0x2679d5){const _0x508503=_0x2b9f02['body'],_0x429a13=new TextDecoder(_0x3b5c('0x2d'));let _0x4c167d='';const _0x197070=_0x508503['getReader']();let _0x284953=!0x1;for(;!_0x284953;){const {done:_0x5c824a,value:_0x1220c3}=await _0x197070[_0x3b5c('0xa')]();if(_0x284953=_0x5c824a,_0x284953)break;const _0x365de6=_0x429a13[_0x3b5c('0x6')](_0x1220c3),_0x2b5d04=JSON[_0x3b5c('0x2c')](_0x365de6);_0x4c167d+=this[_0x3b5c('0x10')](_0x2b5d04,_0x24c235),_0x2679d5(_0x4c167d);}return Promise[_0x3b5c('0x13')]();}async[_0x3b5c('0x7')](_0x854f76,_0x4bfb75,_0x419648){let _0x59bdb2;return _0x59bdb2=_0x854f76 instanceof Response?await _0x854f76['json']():JSON[_0x3b5c('0x2c')](Buffer[_0x3b5c('0x2b')](_0x854f76[_0x3b5c('0x1')])[_0x3b5c('0x31')](_0x3b5c('0x14'))),(_0x419648(this[_0x3b5c('0x10')](_0x59bdb2,_0x4bfb75)),Promise[_0x3b5c('0x13')]());}[_0x3b5c('0x10')](_0x285555,_0x266c19){switch(this[_0x3b5c('0x2f')](_0x266c19)){case'anthropic.claude':return _0x285555['completion'];case'ai21.j2':return _0x285555['completions'][0x0][_0x3b5c('0x2e')][_0x3b5c('0xd')];case _0x3b5c('0x29'):return _0x285555[_0x3b5c('0x4')][0x0][_0x3b5c('0xd')];case _0x3b5c('0x0'):return _0x285555['generation'];}}}
23
+ const _0x342a=['sendRequest','_prepareRequestParameters','Instruction:\x0a','send','<<SYS>>\x0a','completions','meta.llama','_bedrockClientConfig','signal','editor','ai.aws.requestParameters.model','bedrock-2023-05-31','body','abortController','completion','_processProxyRequest','\x0a\x0aAssistant:','ai.aws.requestParameters','toString','preparePrompt','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.','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','parse','ai.aws.requestParameters.max_tokens_to_sample','test','<span>','text','_apiUrl','read','ai21.j2','anthropic.claude-v2','_cleanUpData','ai.aws.requestHeaders','config','getModelFamily','_processAWSRequest','_prepareRequestHeaders','resolve','ai.aws.bedrockClientConfig','_readStaticResponse','stringify','application/json','bytes','ai.aws.requestParameters.top_p','utf-8','AI_ERROR_UNSUPPORTED_MODEL','POST','chunk','generations','ai.aws.requestParameters.anthropic_version','get','getReader','\x0a[/INST]','_requestHeaders','_readStreamableResponse','ai.aws.requestParameters.top_k','define','from','decode','startsWith','_readAsyncIterableResponse','utf8','cohere.command'];(function(_0x5bdcb2,_0x342a77){const _0x5c790a=function(_0x329bf1){while(--_0x329bf1){_0x5bdcb2['push'](_0x5bdcb2['shift']());}};_0x5c790a(++_0x342a77);}(_0x342a,0x1e6));const _0x5c79=function(_0x5bdcb2,_0x342a77){_0x5bdcb2=_0x5bdcb2-0x0;let _0x5c790a=_0x342a[_0x5bdcb2];return _0x5c790a;};import{default as _0x4cd7d9}from'./aitextadapter.js';import{AIRequestError as _0x41bf4a}from'./aiadapter.js';import{BedrockRuntimeClient as _0x4ffd4c,InvokeModelCommand as _0x3ba99c,InvokeModelWithResponseStreamCommand as _0x780fed}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x5b7406}from'../utils/common-translations.js';export default class O extends _0x4cd7d9{static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x4aac9d){super(_0x4aac9d),_0x4aac9d[_0x5c79('0x33')]['get'](_0x5c79('0x23'))||(_0x4aac9d[_0x5c79('0x33')]['define'](_0x5c79('0x1c'),_0x5c79('0x30')),_0x4aac9d[_0x5c79('0x33')][_0x5c79('0xb')](_0x5c79('0x29'),0x7d0),_0x4aac9d[_0x5c79('0x33')][_0x5c79('0xb')]('ai.aws.requestParameters.temperature',0x1),_0x4aac9d[_0x5c79('0x33')][_0x5c79('0xb')](_0x5c79('0x3d'),0x1),_0x4aac9d['config'][_0x5c79('0xb')](_0x5c79('0xa'),0xfa),_0x4aac9d[_0x5c79('0x33')][_0x5c79('0xb')](_0x5c79('0x4'),_0x5c79('0x1d')),_0x4aac9d[_0x5c79('0x33')][_0x5c79('0xb')]('ai.aws.requestParameters.stream',!0x0)),this[_0x5c79('0x2d')]=_0x4aac9d[_0x5c79('0x33')]['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x4aac9d[_0x5c79('0x33')][_0x5c79('0x5')](_0x5c79('0x38')),this[_0x5c79('0x8')]=_0x4aac9d[_0x5c79('0x33')][_0x5c79('0x5')](_0x5c79('0x32')),this['_requestParameters']=_0x4aac9d[_0x5c79('0x33')][_0x5c79('0x5')](_0x5c79('0x23'));}async[_0x5c79('0x12')]({query:_0x5415f9,context:_0x540663,onData:_0x5a26a1,actionId:_0x3f3df4}){const {model:_0x2d4689,stream:_0x2fff03,..._0x18c685}=await this[_0x5c79('0x13')](this['_requestParameters'],_0x3f3df4),_0x54a682={'prompt':await this[_0x5c79('0x25')](_0x5415f9,_0x540663,_0x2d4689,_0x3f3df4),..._0x18c685};this['_apiUrl']?await this[_0x5c79('0x21')](_0x54a682,_0x2d4689,_0x2fff03,_0x5a26a1,_0x3f3df4):await this[_0x5c79('0x35')](_0x54a682,_0x2d4689,_0x2fff03,_0x5a26a1);}async[_0x5c79('0x25')](_0xab2cbf,_0x3b24c5,_0x484bab,_0x3342b4){let _0x3c53d9,_0x1f55cf;return _0x3b24c5?(_0x3c53d9=_0x5c79('0x26'),_0x1f55cf=_0x5c79('0x14')+_0xab2cbf+_0x5c79('0x27')+(_0x3b24c5[_0x5c79('0xe')]('<')?_0x3b24c5:_0x5c79('0x2b')+_0x3b24c5+'</span>')):(_0x3c53d9='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.',_0x1f55cf=_0xab2cbf),_0x5c79('0x18')==this['getModelFamily'](_0x484bab)?_0x5c79('0x16')+_0x3c53d9+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1f55cf+_0x5c79('0x7'):'Human:\x0a'+_0x3c53d9+'\x0a'+_0x1f55cf+_0x5c79('0x22');}['getModelFamily'](_0x5463f3){if(/^anthropic\.claude/[_0x5c79('0x2a')](_0x5463f3))return'anthropic.claude';if(/^ai21\.j2/[_0x5c79('0x2a')](_0x5463f3))return _0x5c79('0x2f');if(/^cohere\.command/[_0x5c79('0x2a')](_0x5463f3))return _0x5c79('0x11');if(/^meta\.llama/[_0x5c79('0x2a')](_0x5463f3))return'meta.llama';throw new _0x41bf4a(_0x5b7406(this[_0x5c79('0x1b')]['locale'],_0x5c79('0x0'),_0x5463f3));}async[_0x5c79('0x21')](_0x343e12,_0x2ffa15,_0x153615,_0x5811c6,_0x5adefa){const _0x4a1730={'method':_0x5c79('0x1'),'headers':await this[_0x5c79('0x36')](this[_0x5c79('0x8')],_0x5adefa),'body':JSON[_0x5c79('0x3a')]({..._0x343e12,'model':_0x2ffa15,'stream':_0x153615}),'signal':this[_0x5c79('0x1f')][_0x5c79('0x1a')]},_0x44f195=await fetch(this['_apiUrl'],_0x4a1730);_0x153615?await this[_0x5c79('0x9')](_0x44f195,_0x2ffa15,_0x5811c6):await this[_0x5c79('0x39')](_0x44f195,_0x2ffa15,_0x5811c6);}async[_0x5c79('0x35')](_0x247056,_0x4a44b8,_0x530aa1,_0x56970a){const _0x55a161=new _0x4ffd4c(this[_0x5c79('0x19')]),_0x3c3c23={'body':JSON[_0x5c79('0x3a')](_0x247056),'contentType':_0x5c79('0x3b'),'accept':'application/json','modelId':_0x4a44b8};let _0x49968d;if(_0x530aa1){const _0x24a447=new _0x780fed(_0x3c3c23);_0x49968d=await _0x55a161[_0x5c79('0x15')](_0x24a447,{'abortSignal':this[_0x5c79('0x1f')][_0x5c79('0x1a')]}),await this[_0x5c79('0xf')](_0x49968d,_0x4a44b8,_0x56970a);}else{const _0x47152d=new _0x3ba99c(_0x3c3c23);_0x49968d=await _0x55a161[_0x5c79('0x15')](_0x47152d,{'abortSignal':this[_0x5c79('0x1f')]['signal']}),await this[_0x5c79('0x39')](_0x49968d,_0x4a44b8,_0x56970a);}}async[_0x5c79('0xf')](_0x59f861,_0x2ab90d,_0x5ca86b){const _0x23279b=_0x59f861[_0x5c79('0x1e')],_0x3b9cd5=new TextDecoder(_0x5c79('0x3e'));let _0x35934c='';for await(const _0x5ba912 of _0x23279b)if(_0x5ba912[_0x5c79('0x2')]){const _0x115cd8=_0x3b9cd5['decode'](_0x5ba912[_0x5c79('0x2')][_0x5c79('0x3c')]),_0x258939=JSON[_0x5c79('0x28')](_0x115cd8);_0x35934c+=this[_0x5c79('0x31')](_0x258939,_0x2ab90d),_0x5ca86b(_0x35934c);}return Promise[_0x5c79('0x37')]();}async['_readStreamableResponse'](_0x822390,_0x56b846,_0x41d888){const _0xc53e9a=_0x822390['body'],_0x52e9de=new TextDecoder(_0x5c79('0x3e'));let _0xf10b21='';const _0xfd8b00=_0xc53e9a[_0x5c79('0x6')]();let _0x4402a9=!0x1;for(;!_0x4402a9;){const {done:_0xbdd5eb,value:_0x4730c8}=await _0xfd8b00[_0x5c79('0x2e')]();if(_0x4402a9=_0xbdd5eb,_0x4402a9)break;const _0x2502d5=_0x52e9de[_0x5c79('0xd')](_0x4730c8),_0x486573=JSON[_0x5c79('0x28')](_0x2502d5);_0xf10b21+=this[_0x5c79('0x31')](_0x486573,_0x56b846),_0x41d888(_0xf10b21);}return Promise['resolve']();}async[_0x5c79('0x39')](_0x34dc12,_0x514a1b,_0x48746a){let _0x763ff8;return _0x763ff8=_0x34dc12 instanceof Response?await _0x34dc12['json']():JSON[_0x5c79('0x28')](Buffer[_0x5c79('0xc')](_0x34dc12[_0x5c79('0x1e')])[_0x5c79('0x24')](_0x5c79('0x10'))),(_0x48746a(this[_0x5c79('0x31')](_0x763ff8,_0x514a1b)),Promise[_0x5c79('0x37')]());}[_0x5c79('0x31')](_0x586dee,_0x5fb76a){switch(this[_0x5c79('0x34')](_0x5fb76a)){case'anthropic.claude':return _0x586dee[_0x5c79('0x20')];case'ai21.j2':return _0x586dee[_0x5c79('0x17')][0x0]['data']['text'];case _0x5c79('0x11'):return _0x586dee[_0x5c79('0x3')][0x0][_0x5c79('0x2c')];case _0x5c79('0x18'):return _0x586dee['generation'];}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xea40=['content','filter','read','_isBufferIncomplete','resolve','getReader','editor','reject','_readStreamableResponse','ai.openAI.requestParameters','text','ai.openAI.requestParameters.temperature','ai.openAI.requestParameters.max_tokens','data:\x20','POST','Moderation','AI_ERROR_CONTEXT_LENGTH','_requestParameters','body','decode','json','gpt-3.5-turbo','_prepareRequestParameters','stringify','<span>','ai.openAI.apiUrl','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.','split','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.','delta','startsWith','replace','stream','define','https://api.openai.com/v1/chat/completions','_readStaticResponse','ai.openAI.requestParameters.model','Instruction:\x0a','user','length','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','get','locale','includes','ai.openAI.requestParameters.stream','prepareMessages','signal','config','system','context_length_exceeded','map','AI_ERROR_MODERATION','_apiUrl','sendRequest'];(function(_0x43cd7b,_0xea40c2){const _0x36d4f8=function(_0x3e4347){while(--_0x3e4347){_0x43cd7b['push'](_0x43cd7b['shift']());}};_0x36d4f8(++_0xea40c2);}(_0xea40,0x75));const _0x36d4=function(_0x43cd7b,_0xea40c2){_0x43cd7b=_0x43cd7b-0x0;let _0x36d4f8=_0xea40[_0x43cd7b];return _0x36d4f8;};import{default as _0xf5c815}from'./aitextadapter.js';import{AIRequestError as _0x98f69d}from'./aiadapter.js';import{getTranslation as _0xc27c61}from'../utils/common-translations.js';export default class M extends _0xf5c815{static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1f265d){super(_0x1f265d),_0x1f265d[_0x36d4('0x26')]['define'](_0x36d4('0x10'),_0x36d4('0x19')),_0x1f265d[_0x36d4('0x26')][_0x36d4('0x18')](_0x36d4('0x1b'),_0x36d4('0xc')),_0x1f265d['config'][_0x36d4('0x18')](_0x36d4('0x3'),0x7d0),_0x1f265d['config']['define'](_0x36d4('0x2'),0x1),_0x1f265d['config'][_0x36d4('0x18')]('ai.openAI.requestParameters.top_p',0x1),_0x1f265d[_0x36d4('0x26')][_0x36d4('0x18')](_0x36d4('0x23'),!0x0),this['_apiUrl']=_0x1f265d[_0x36d4('0x26')][_0x36d4('0x20')]('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1f265d[_0x36d4('0x26')][_0x36d4('0x20')]('ai.openAI.requestHeaders')||{},this[_0x36d4('0x8')]=_0x1f265d[_0x36d4('0x26')][_0x36d4('0x20')](_0x36d4('0x0'));}async[_0x36d4('0x2c')]({query:_0x328c48,context:_0x322060,onData:_0x1fe2c6,actionId:_0x9e4564}){const _0x212d5f=this[_0x36d4('0x33')][_0x36d4('0x21')],_0x430f09=await this[_0x36d4('0x24')](_0x328c48,_0x322060,_0x9e4564),_0x20b63b=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x9e4564),_0x21a3da=await this[_0x36d4('0xd')](this['_requestParameters'],_0x9e4564),_0x1985df={'messages':_0x430f09,..._0x21a3da},_0x34eda3={'method':_0x36d4('0x5'),'headers':_0x20b63b,'body':JSON[_0x36d4('0xe')](_0x1985df),'signal':this['abortController'][_0x36d4('0x25')]},_0x5a4151=await fetch(this[_0x36d4('0x2b')],_0x34eda3);if(_0x5a4151['ok'])return _0x21a3da[_0x36d4('0x17')]?await this['_readStreamableResponse'](_0x5a4151,_0x1fe2c6):await this[_0x36d4('0x1a')](_0x5a4151,_0x1fe2c6),Promise[_0x36d4('0x31')]();{const _0x4fd1b4=await _0x5a4151[_0x36d4('0x1')]();return _0x4fd1b4[_0x36d4('0x22')](_0x36d4('0x28'))?Promise[_0x36d4('0x34')](new _0x98f69d(_0xc27c61(_0x212d5f,_0x36d4('0x7')))):_0x4fd1b4['includes'](_0x36d4('0x6'))?Promise[_0x36d4('0x34')](new _0x98f69d(_0xc27c61(_0x212d5f,_0x36d4('0x2a')))):Promise[_0x36d4('0x34')](new Error(_0x4fd1b4));}}async[_0x36d4('0x24')](_0x31d3e2,_0x1cc85c,_0xce63e6){let _0xf7d793,_0xc6e910;return _0x1cc85c?(_0xf7d793=_0x36d4('0x13'),_0xc6e910=_0x36d4('0x1c')+_0x31d3e2+_0x36d4('0x1f')+(_0x1cc85c[_0x36d4('0x15')]('<')?_0x1cc85c:_0x36d4('0xf')+_0x1cc85c+'</span>')):(_0xf7d793=_0x36d4('0x11'),_0xc6e910=_0x31d3e2),[{'role':_0x36d4('0x27'),'content':_0xf7d793},{'role':_0x36d4('0x1d'),'content':_0xc6e910}];}async[_0x36d4('0x35')](_0x645019,_0x56ae18){const _0x4e0f13=_0x645019[_0x36d4('0x9')][_0x36d4('0x32')](),_0x1a2417=new TextDecoder();let _0x5afb29='',_0x4dec27='',_0x1817c6='',_0x1a5a34=!0x1;for(;!_0x1a5a34;){const {done:_0x33d758,value:_0x2ba389}=await _0x4e0f13[_0x36d4('0x2f')](),_0x331db1=_0x5afb29+_0x1a2417[_0x36d4('0xa')](_0x2ba389);let _0x519d6b='';_0x1a5a34=_0x33d758;try{_0x519d6b=this['_cleanUpData'](_0x331db1),_0x5afb29='';}catch(_0x9f15c0){_0x5afb29=_0x331db1;continue;}_0x4dec27+=_0x519d6b,!_0x1a5a34&&this['_isBufferIncomplete'](_0x4dec27)||_0x4dec27&&(_0x1817c6+=_0x4dec27,_0x4dec27='',_0x56ae18(_0x1817c6));}return Promise[_0x36d4('0x31')]();}async[_0x36d4('0x1a')](_0x540e88,_0x7b8c90){return _0x7b8c90((await _0x540e88[_0x36d4('0xb')]())['choices'][0x0]['message'][_0x36d4('0x2d')]),Promise[_0x36d4('0x31')]();}[_0x36d4('0x30')](_0x5dd491){const _0x59e021=_0x5dd491[_0x36d4('0x12')]('<')[_0x36d4('0x1e')]!==_0x5dd491[_0x36d4('0x12')]('>')[_0x36d4('0x1e')],_0x32926a=_0x5dd491[_0x36d4('0x1e')]<0x1e;return _0x59e021&&_0x32926a;}['_cleanUpData'](_0xc422c5){return _0xc422c5['split'](/\n(?![^{]*\})/g)['map'](_0x176713=>_0x176713[_0x36d4('0x16')](_0x36d4('0x4'),''))[_0x36d4('0x2e')](_0x16539d=>_0x16539d&&_0x16539d[_0x36d4('0x1e')]>0x0&&'[DONE]'!==_0x16539d)[_0x36d4('0x29')](_0x59c38a=>{const {choices:_0x3c9085}=JSON['parse'](_0x59c38a);if(_0x3c9085[0x0]&&_0x3c9085[0x0]['delta']&&_0x3c9085[0x0][_0x36d4('0x14')]['content'])return _0x3c9085[0x0][_0x36d4('0x14')]['content'];})[_0x36d4('0x2e')](_0x4c965c=>_0x4c965c)['join']('');}}
23
+ const _0x2dbe=['startsWith','stringify','_prepareRequestHeaders','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.','<span>','POST','Instruction:\x0a','ai.openAI.requestParameters.stream','config','sendRequest','_readStreamableResponse','gpt-3.5-turbo','OpenAITextAdapter','https://api.openai.com/v1/chat/completions','ai.openAI.apiUrl','replace','abortController','body','ai.openAI.requestParameters','editor','text','delta','_prepareRequestParameters','decode','map','get','data:\x20','includes','_cleanUpData','locale','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','define','_requestHeaders','user','_apiUrl','split','message','_isBufferIncomplete','context_length_exceeded','length','reject','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.','parse','_readStaticResponse','prepareMessages','choices','[DONE]','ai.openAI.requestParameters.max_tokens','ai.openAI.requestParameters.model','read','content','resolve','ai.openAI.requestParameters.temperature','</span>','filter','system','ai.openAI.requestHeaders','_requestParameters','Moderation'];(function(_0x5d77ee,_0x2dbe3b){const _0x314645=function(_0x25f5c5){while(--_0x25f5c5){_0x5d77ee['push'](_0x5d77ee['shift']());}};_0x314645(++_0x2dbe3b);}(_0x2dbe,0x1ed));const _0x3146=function(_0x5d77ee,_0x2dbe3b){_0x5d77ee=_0x5d77ee-0x0;let _0x314645=_0x2dbe[_0x5d77ee];return _0x314645;};import{default as _0x135288}from'./aitextadapter.js';import{AIRequestError as _0x2f0657}from'./aiadapter.js';import{getTranslation as _0x3c9587}from'../utils/common-translations.js';export default class M extends _0x135288{static get['pluginName'](){return _0x3146('0x32');}constructor(_0x60746d){super(_0x60746d),_0x60746d[_0x3146('0x2e')][_0x3146('0xa')]('ai.openAI.apiUrl',_0x3146('0x33')),_0x60746d[_0x3146('0x2e')][_0x3146('0xa')](_0x3146('0x1b'),_0x3146('0x31')),_0x60746d[_0x3146('0x2e')][_0x3146('0xa')](_0x3146('0x1a'),0x7d0),_0x60746d['config'][_0x3146('0xa')](_0x3146('0x1f'),0x1),_0x60746d['config'][_0x3146('0xa')]('ai.openAI.requestParameters.top_p',0x1),_0x60746d[_0x3146('0x2e')][_0x3146('0xa')](_0x3146('0x2d'),!0x0),this['_apiUrl']=_0x60746d[_0x3146('0x2e')][_0x3146('0x4')](_0x3146('0x34')),this[_0x3146('0xb')]=_0x60746d[_0x3146('0x2e')]['get'](_0x3146('0x23'))||{},this[_0x3146('0x24')]=_0x60746d[_0x3146('0x2e')][_0x3146('0x4')](_0x3146('0x38'));}async[_0x3146('0x2f')]({query:_0x53b1e7,context:_0x5f47c4,onData:_0x11076b,actionId:_0x59035d}){const _0x35e632=this[_0x3146('0x39')][_0x3146('0x8')],_0x1b8761=await this[_0x3146('0x17')](_0x53b1e7,_0x5f47c4,_0x59035d),_0x20d82a=await this[_0x3146('0x28')](this[_0x3146('0xb')],_0x59035d),_0x331e47=await this[_0x3146('0x1')](this['_requestParameters'],_0x59035d),_0x3719ad={'messages':_0x1b8761,..._0x331e47},_0x756605={'method':_0x3146('0x2b'),'headers':_0x20d82a,'body':JSON[_0x3146('0x27')](_0x3719ad),'signal':this[_0x3146('0x36')]['signal']},_0x1c75e9=await fetch(this[_0x3146('0xd')],_0x756605);if(_0x1c75e9['ok'])return _0x331e47['stream']?await this[_0x3146('0x30')](_0x1c75e9,_0x11076b):await this[_0x3146('0x16')](_0x1c75e9,_0x11076b),Promise[_0x3146('0x1e')]();{const _0x596c82=await _0x1c75e9[_0x3146('0x3a')]();return _0x596c82[_0x3146('0x6')](_0x3146('0x11'))?Promise[_0x3146('0x13')](new _0x2f0657(_0x3c9587(_0x35e632,'AI_ERROR_CONTEXT_LENGTH'))):_0x596c82[_0x3146('0x6')](_0x3146('0x25'))?Promise[_0x3146('0x13')](new _0x2f0657(_0x3c9587(_0x35e632,'AI_ERROR_MODERATION'))):Promise[_0x3146('0x13')](new Error(_0x596c82));}}async['prepareMessages'](_0x3fd810,_0x40b09f,_0x1f0efd){let _0xd681be,_0x266f5a;return _0x40b09f?(_0xd681be=_0x3146('0x14'),_0x266f5a=_0x3146('0x2c')+_0x3fd810+_0x3146('0x9')+(_0x40b09f[_0x3146('0x26')]('<')?_0x40b09f:_0x3146('0x2a')+_0x40b09f+_0x3146('0x20'))):(_0xd681be=_0x3146('0x29'),_0x266f5a=_0x3fd810),[{'role':_0x3146('0x22'),'content':_0xd681be},{'role':_0x3146('0xc'),'content':_0x266f5a}];}async[_0x3146('0x30')](_0xad4a57,_0xc79640){const _0x332a3b=_0xad4a57[_0x3146('0x37')]['getReader'](),_0x408cba=new TextDecoder();let _0x4195c8='',_0x2036d3='',_0xd6227b='',_0xd1e4c7=!0x1;for(;!_0xd1e4c7;){const {done:_0x4ca07f,value:_0x49584f}=await _0x332a3b[_0x3146('0x1c')](),_0x377cb2=_0x4195c8+_0x408cba[_0x3146('0x2')](_0x49584f);let _0xdf71dc='';_0xd1e4c7=_0x4ca07f;try{_0xdf71dc=this['_cleanUpData'](_0x377cb2),_0x4195c8='';}catch(_0x4b5f7d){_0x4195c8=_0x377cb2;continue;}_0x2036d3+=_0xdf71dc,!_0xd1e4c7&&this[_0x3146('0x10')](_0x2036d3)||_0x2036d3&&(_0xd6227b+=_0x2036d3,_0x2036d3='',_0xc79640(_0xd6227b));}return Promise['resolve']();}async[_0x3146('0x16')](_0x17da94,_0x6b8af2){return _0x6b8af2((await _0x17da94['json']())[_0x3146('0x18')][0x0][_0x3146('0xf')][_0x3146('0x1d')]),Promise[_0x3146('0x1e')]();}[_0x3146('0x10')](_0x2a4600){const _0xc88f3c=_0x2a4600[_0x3146('0xe')]('<')[_0x3146('0x12')]!==_0x2a4600[_0x3146('0xe')]('>')[_0x3146('0x12')],_0x2c017c=_0x2a4600[_0x3146('0x12')]<0x1e;return _0xc88f3c&&_0x2c017c;}[_0x3146('0x7')](_0x2d366d){return _0x2d366d[_0x3146('0xe')](/\n(?![^{]*\})/g)[_0x3146('0x3')](_0x1141d1=>_0x1141d1[_0x3146('0x35')](_0x3146('0x5'),''))['filter'](_0x5a9c4d=>_0x5a9c4d&&_0x5a9c4d[_0x3146('0x12')]>0x0&&_0x3146('0x19')!==_0x5a9c4d)[_0x3146('0x3')](_0x575475=>{const {choices:_0x3b1ebc}=JSON[_0x3146('0x15')](_0x575475);if(_0x3b1ebc[0x0]&&_0x3b1ebc[0x0][_0x3146('0x0')]&&_0x3b1ebc[0x0][_0x3146('0x0')][_0x3146('0x1d')])return _0x3b1ebc[0x0][_0x3146('0x0')][_0x3146('0x1d')];})[_0x3146('0x21')](_0x4c9b81=>_0x4c9b81)['join']('');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x22de=['translateSpanish','translateGerman','commands','push','Friendly','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','aiLicenseKeyTrial','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','continue','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','improveWriting','Business','Generate\x20from\x20selection','find','editor','locale','info','translateEnglish','Translate\x20the\x20content\x20to\x20German\x20language.','Casual','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','Edit\x20or\x20review','Translate\x20to\x20%0','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','business','ai-trial-license-key-reached-limit-changes','licenseKey','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Journalism','translateArabic','Summarize','AIAssistant','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','ai.aiAssistant.extraCommandGroups','requires','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.','_licenseKeyCheckInterval','includes','friendly','define','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','Translate\x20the\x20content\x20to\x20Spanish\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','Translate\x20the\x20content\x20to\x20French\x20language.','German','changeStyle','aiLicenseKeyInvalid','direct','Simplified\x20Chinese','get','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','summarize','Translate\x20the\x20content\x20to\x20Hindi\x20language.','concat','Poetic','French','set','journalism','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','editOrReview','generate','ai.aiAssistant.commands','Spanish','Translate\x20the\x20content\x20to\x20Arabic\x20language.','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','translate','pluginName','professional','Legal','groupId','Make\x20shorter','casual','translateChinese','ai.aiAssistant.removeCommands','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Professional','init','confident','poetic','translateHindi','config','makeShorter','makeLonger','aiLicenseKeyTrialLimit:operations'];(function(_0x3ed56f,_0x22de3d){const _0x201814=function(_0x6bc005){while(--_0x6bc005){_0x3ed56f['push'](_0x3ed56f['shift']());}};_0x201814(++_0x22de3d);}(_0x22de,0x16c));const _0x2018=function(_0x3ed56f,_0x22de3d){_0x3ed56f=_0x3ed56f-0x0;let _0x201814=_0x22de[_0x3ed56f];return _0x201814;};import{CKEditorError as _0x1e8f2f}from'ckeditor5/src/utils.js';import{Plugin as _0x244b1d}from'ckeditor5/src/core.js';import _0x443eba from'./aiassistantui.js';import _0x298707 from'./aiassistantediting.js';import{getTranslation as _0x427d61}from'./utils/common-translations.js';export default class r extends _0x244b1d{static get[_0x2018('0xe')](){return[_0x443eba,_0x298707];}static get[_0x2018('0x30')](){return _0x2018('0xb');}constructor(_0x2f06a8){super(_0x2f06a8);const _0x26beb1=_0x2f06a8[_0x2018('0x3e')];_0x26beb1[_0x2018('0x13')](_0x2018('0x2a'),getDefaultCommands(_0x2f06a8[_0x2018('0x51')])),_0x26beb1['define'](_0x2018('0xd'),[]),_0x26beb1[_0x2018('0x13')](_0x2018('0x37'),[]);const _0x4774b5=_0x26beb1[_0x2018('0x1d')](_0x2018('0x2a')),_0x33ec61=_0x26beb1[_0x2018('0x1d')](_0x2018('0xd')),_0x5813aa=_0x26beb1[_0x2018('0x1d')]('ai.aiAssistant.removeCommands');_0x33ec61['forEach'](_0x5f4911=>{const _0x5c1209=_0x4774b5[_0x2018('0x4f')](_0x5960d7=>_0x5960d7[_0x2018('0x33')]===_0x5f4911[_0x2018('0x33')]);_0x5c1209?_0x5c1209['commands']=_0x5c1209['commands'][_0x2018('0x21')](_0x5f4911[_0x2018('0x44')]):_0x4774b5[_0x2018('0x45')](_0x5f4911);}),_0x4774b5['forEach'](_0x4f9b1a=>{_0x4f9b1a[_0x2018('0x44')]=_0x4f9b1a[_0x2018('0x44')]['filter'](_0x1c7e61=>!_0x5813aa[_0x2018('0x11')](_0x1c7e61['id']));}),_0x26beb1[_0x2018('0x24')](_0x2018('0x2a'),_0x4774b5);}[_0x2018('0x3a')](){const _0x1f79a5=this[_0x2018('0x50')];this[_0x2018('0x6')]=_0x1f79a5['config'][_0x2018('0x1d')](_0x2018('0x6')),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b96d9;for(const _0x4dc253 in _0x1f79a5){const _0x2efb8a=_0x4dc253,_0x44f9c0=_0x1f79a5[_0x2efb8a];if(_0x2018('0x48')===_0x44f9c0||_0x2018('0x1a')===_0x44f9c0||'aiLicenseKeyValid'===_0x44f9c0||_0x2018('0x41')===_0x44f9c0){delete _0x1f79a5[_0x2efb8a],_0x2b96d9=_0x44f9c0;break;}}if('aiLicenseKeyInvalid'===_0x2b96d9)throw clearInterval(this[_0x2018('0x10')]),new _0x1e8f2f('ai-invalid-license-key',null);if(_0x2018('0x48')===_0x2b96d9&&console[_0x2018('0x52')](_0x2018('0xf')),_0x2018('0x41')===_0x2b96d9)throw clearInterval(this[_0x2018('0x10')]),new _0x1e8f2f(_0x2018('0x5'),null);'aiLicenseKeyValid'===_0x2b96d9&&clearInterval(this[_0x2018('0x10')]);},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this[_0x2018('0x10')]);}}export function getDefaultCommands(_0x21e92d){return[{'groupId':_0x2018('0x28'),'groupLabel':_0x427d61(_0x21e92d,_0x2018('0x1')),'commands':[{'id':_0x2018('0x4c'),'label':_0x427d61(_0x21e92d,'Improve\x20writing'),'prompt':_0x2018('0x38')},{'id':_0x2018('0x3f'),'label':_0x427d61(_0x21e92d,_0x2018('0x34')),'prompt':_0x2018('0x4b')},{'id':_0x2018('0x40'),'label':_0x427d61(_0x21e92d,'Make\x20longer'),'prompt':_0x2018('0x27')},{'id':'simplifyLanguage','label':_0x427d61(_0x21e92d,'Simplify\x20language'),'prompt':_0x2018('0x26')}]},{'groupId':_0x2018('0x29'),'groupLabel':_0x427d61(_0x21e92d,_0x2018('0x4e')),'commands':[{'id':_0x2018('0x1f'),'label':_0x427d61(_0x21e92d,_0x2018('0xa')),'prompt':_0x2018('0x0')},{'id':_0x2018('0x4a'),'label':_0x427d61(_0x21e92d,'Continue'),'prompt':_0x2018('0x2d')}]},{'groupId':'changeTone','groupLabel':_0x427d61(_0x21e92d,'Change\x20tone'),'commands':[{'id':_0x2018('0x31'),'label':_0x427d61(_0x21e92d,_0x2018('0x39')),'prompt':_0x2018('0x47')},{'id':_0x2018('0x35'),'label':_0x427d61(_0x21e92d,_0x2018('0x55')),'prompt':_0x2018('0x14')},{'id':_0x2018('0x1b'),'label':_0x427d61(_0x21e92d,'Direct'),'prompt':_0x2018('0x7')},{'id':_0x2018('0x3b'),'label':_0x427d61(_0x21e92d,'Confident'),'prompt':_0x2018('0xc')},{'id':_0x2018('0x12'),'label':_0x427d61(_0x21e92d,_0x2018('0x46')),'prompt':_0x2018('0x3')}]},{'groupId':_0x2018('0x19'),'groupLabel':_0x427d61(_0x21e92d,'Change\x20style'),'commands':[{'id':_0x2018('0x4'),'label':_0x427d61(_0x21e92d,_0x2018('0x4d')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':_0x427d61(_0x21e92d,_0x2018('0x32')),'prompt':_0x2018('0x16')},{'id':_0x2018('0x25'),'label':_0x427d61(_0x21e92d,_0x2018('0x8')),'prompt':_0x2018('0x2e')},{'id':_0x2018('0x3c'),'label':_0x427d61(_0x21e92d,_0x2018('0x22')),'prompt':_0x2018('0x49')}]},{'groupId':_0x2018('0x2f'),'groupLabel':_0x427d61(_0x21e92d,'Translate'),'commands':[{'id':_0x2018('0x53'),'label':_0x427d61(_0x21e92d,'Translate\x20to\x20%0',[_0x427d61(_0x21e92d,'English')]),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':_0x2018('0x42'),'label':_0x427d61(_0x21e92d,_0x2018('0x2'),[_0x427d61(_0x21e92d,_0x2018('0x2b'))]),'prompt':_0x2018('0x15')},{'id':'translatePortuguese','label':_0x427d61(_0x21e92d,_0x2018('0x2'),[_0x427d61(_0x21e92d,'Portuguese')]),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':_0x2018('0x43'),'label':_0x427d61(_0x21e92d,'Translate\x20to\x20%0',[_0x427d61(_0x21e92d,_0x2018('0x18'))]),'prompt':_0x2018('0x54')},{'id':'translateFrench','label':_0x427d61(_0x21e92d,_0x2018('0x2'),[_0x427d61(_0x21e92d,_0x2018('0x23'))]),'prompt':_0x2018('0x17')},{'id':_0x2018('0x36'),'label':_0x427d61(_0x21e92d,_0x2018('0x2'),[_0x427d61(_0x21e92d,_0x2018('0x1c'))]),'prompt':_0x2018('0x1e')},{'id':_0x2018('0x3d'),'label':_0x427d61(_0x21e92d,'Translate\x20to\x20%0',[_0x427d61(_0x21e92d,'Hindi')]),'prompt':_0x2018('0x20')},{'id':_0x2018('0x9'),'label':_0x427d61(_0x21e92d,'Translate\x20to\x20%0',[_0x427d61(_0x21e92d,'Arabic')]),'prompt':_0x2018('0x2c')}]}];}
23
+ const _0x2db9=['push','define','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.','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','info','Translate\x20the\x20content\x20to\x20French\x20language.','translateArabic','ai.aiAssistant.extraCommandGroups','German','Summarize','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','translatePortuguese','set','Translate\x20the\x20content\x20to\x20Hindi\x20language.','changeTone','commands','generate','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','translateChinese','business','makeLonger','French','Change\x20style','ai-trial-license-key-reached-limit-changes','Casual','get','groupId','improveWriting','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','journalism','filter','Continue','Change\x20tone','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','editOrReview','editor','simplifyLanguage','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','Improve\x20writing','direct','summarize','poetic','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Arabic','Translate\x20to\x20%0','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Make\x20longer','Translate','forEach','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','Direct','_licenseKeyCheckInterval','ai.aiAssistant.commands','concat','Simplified\x20Chinese','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','config','ai-invalid-license-key','Business','translateEnglish','aiLicenseKeyTrial','licenseKey','aiLicenseKeyTrialLimit:operations','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','find','ai.aiAssistant.removeCommands','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','translateGerman','locale','requires','translateHindi','Legal','changeStyle','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','Hindi','professional','Translate\x20the\x20content\x20to\x20German\x20language.','Journalism','English','Simplify\x20language','Translate\x20the\x20content\x20to\x20Spanish\x20language.','aiLicenseKeyValid','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'];(function(_0x43bfe6,_0x2db9af){const _0x382861=function(_0x3731eb){while(--_0x3731eb){_0x43bfe6['push'](_0x43bfe6['shift']());}};_0x382861(++_0x2db9af);}(_0x2db9,0x180));const _0x3828=function(_0x43bfe6,_0x2db9af){_0x43bfe6=_0x43bfe6-0x0;let _0x382861=_0x2db9[_0x43bfe6];return _0x382861;};import{CKEditorError as _0x4ab972}from'ckeditor5/src/utils.js';import{Plugin as _0x367361}from'ckeditor5/src/core.js';import _0x30e479 from'./aiassistantui.js';import _0x5ddfb4 from'./aiassistantediting.js';import{getTranslation as _0x5e226a}from'./utils/common-translations.js';export default class r extends _0x367361{static get[_0x3828('0x16')](){return[_0x30e479,_0x5ddfb4];}static get['pluginName'](){return'AIAssistant';}constructor(_0x2da4e5){super(_0x2da4e5);const _0x6d6f2=_0x2da4e5[_0x3828('0x9')];_0x6d6f2[_0x3828('0x25')](_0x3828('0x5'),getDefaultCommands(_0x2da4e5[_0x3828('0x15')])),_0x6d6f2[_0x3828('0x25')](_0x3828('0x2b'),[]),_0x6d6f2[_0x3828('0x25')](_0x3828('0x12'),[]);const _0x412832=_0x6d6f2['get']('ai.aiAssistant.commands'),_0x5e78c4=_0x6d6f2[_0x3828('0x3d')](_0x3828('0x2b')),_0x4e361b=_0x6d6f2['get'](_0x3828('0x12'));_0x5e78c4[_0x3828('0x1')](_0x5e1624=>{const _0x41ce5d=_0x412832[_0x3828('0x11')](_0x2711f1=>_0x2711f1['groupId']===_0x5e1624[_0x3828('0x3e')]);_0x41ce5d?_0x41ce5d['commands']=_0x41ce5d[_0x3828('0x33')][_0x3828('0x6')](_0x5e1624[_0x3828('0x33')]):_0x412832[_0x3828('0x24')](_0x5e1624);}),_0x412832[_0x3828('0x1')](_0x3dd411=>{_0x3dd411[_0x3828('0x33')]=_0x3dd411[_0x3828('0x33')][_0x3828('0x42')](_0x5ef245=>!_0x4e361b['includes'](_0x5ef245['id']));}),_0x6d6f2[_0x3828('0x30')]('ai.aiAssistant.commands',_0x412832);}['init'](){const _0x4e8782=this[_0x3828('0x47')];this[_0x3828('0xe')]=_0x4e8782[_0x3828('0x9')]['get'](_0x3828('0xe')),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x57b678;for(const _0x37d541 in _0x4e8782){const _0x56f01c=_0x37d541,_0x5edc97=_0x4e8782[_0x56f01c];if(_0x3828('0xd')===_0x5edc97||'aiLicenseKeyInvalid'===_0x5edc97||_0x3828('0x22')===_0x5edc97||_0x3828('0xf')===_0x5edc97){delete _0x4e8782[_0x56f01c],_0x57b678=_0x5edc97;break;}}if('aiLicenseKeyInvalid'===_0x57b678)throw clearInterval(this[_0x3828('0x4')]),new _0x4ab972(_0x3828('0xa'),null);if(_0x3828('0xd')===_0x57b678&&console[_0x3828('0x28')](_0x3828('0x26')),_0x3828('0xf')===_0x57b678)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x4ab972(_0x3828('0x3b'),null);_0x3828('0x22')===_0x57b678&&clearInterval(this[_0x3828('0x4')]);},0x3e8);}['destroy'](){this[_0x3828('0x4')]&&clearInterval(this[_0x3828('0x4')]);}}export function getDefaultCommands(_0x3245e1){return[{'groupId':_0x3828('0x46'),'groupLabel':_0x5e226a(_0x3245e1,'Edit\x20or\x20review'),'commands':[{'id':_0x3828('0x3f'),'label':_0x5e226a(_0x3245e1,_0x3828('0x4a')),'prompt':_0x3828('0x4f')},{'id':'makeShorter','label':_0x5e226a(_0x3245e1,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':_0x3828('0x38'),'label':_0x5e226a(_0x3245e1,_0x3828('0x53')),'prompt':_0x3828('0x40')},{'id':_0x3828('0x48'),'label':_0x5e226a(_0x3245e1,_0x3828('0x20')),'prompt':_0x3828('0x2e')}]},{'groupId':_0x3828('0x34'),'groupLabel':_0x5e226a(_0x3245e1,'Generate\x20from\x20selection'),'commands':[{'id':_0x3828('0x4c'),'label':_0x5e226a(_0x3245e1,_0x3828('0x2d')),'prompt':_0x3828('0x8')},{'id':'continue','label':_0x5e226a(_0x3245e1,_0x3828('0x43')),'prompt':_0x3828('0x35')}]},{'groupId':_0x3828('0x32'),'groupLabel':_0x5e226a(_0x3245e1,_0x3828('0x44')),'commands':[{'id':_0x3828('0x1c'),'label':_0x5e226a(_0x3245e1,'Professional'),'prompt':_0x3828('0x45')},{'id':'casual','label':_0x5e226a(_0x3245e1,_0x3828('0x3c')),'prompt':_0x3828('0x27')},{'id':_0x3828('0x4b'),'label':_0x5e226a(_0x3245e1,_0x3828('0x3')),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':_0x5e226a(_0x3245e1,'Confident'),'prompt':_0x3828('0x10')},{'id':'friendly','label':_0x5e226a(_0x3245e1,'Friendly'),'prompt':_0x3828('0x2')}]},{'groupId':_0x3828('0x19'),'groupLabel':_0x5e226a(_0x3245e1,_0x3828('0x3a')),'commands':[{'id':_0x3828('0x37'),'label':_0x5e226a(_0x3245e1,_0x3828('0xb')),'prompt':_0x3828('0x23')},{'id':'legal','label':_0x5e226a(_0x3245e1,_0x3828('0x18')),'prompt':_0x3828('0x49')},{'id':_0x3828('0x41'),'label':_0x5e226a(_0x3245e1,_0x3828('0x1e')),'prompt':_0x3828('0x1a')},{'id':_0x3828('0x4d'),'label':_0x5e226a(_0x3245e1,'Poetic'),'prompt':_0x3828('0x4e')}]},{'groupId':'translate','groupLabel':_0x5e226a(_0x3245e1,_0x3828('0x0')),'commands':[{'id':_0x3828('0xc'),'label':_0x5e226a(_0x3245e1,_0x3828('0x51'),[_0x5e226a(_0x3245e1,_0x3828('0x1f'))]),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':_0x5e226a(_0x3245e1,'Translate\x20to\x20%0',[_0x5e226a(_0x3245e1,'Spanish')]),'prompt':_0x3828('0x21')},{'id':_0x3828('0x2f'),'label':_0x5e226a(_0x3245e1,_0x3828('0x51'),[_0x5e226a(_0x3245e1,'Portuguese')]),'prompt':_0x3828('0x13')},{'id':_0x3828('0x14'),'label':_0x5e226a(_0x3245e1,'Translate\x20to\x20%0',[_0x5e226a(_0x3245e1,_0x3828('0x2c'))]),'prompt':_0x3828('0x1d')},{'id':'translateFrench','label':_0x5e226a(_0x3245e1,_0x3828('0x51'),[_0x5e226a(_0x3245e1,_0x3828('0x39'))]),'prompt':_0x3828('0x29')},{'id':_0x3828('0x36'),'label':_0x5e226a(_0x3245e1,_0x3828('0x51'),[_0x5e226a(_0x3245e1,_0x3828('0x7'))]),'prompt':_0x3828('0x52')},{'id':_0x3828('0x17'),'label':_0x5e226a(_0x3245e1,'Translate\x20to\x20%0',[_0x5e226a(_0x3245e1,_0x3828('0x1b'))]),'prompt':_0x3828('0x31')},{'id':_0x3828('0x2a'),'label':_0x5e226a(_0x3245e1,_0x3828('0x51'),[_0x5e226a(_0x3245e1,_0x3828('0x50'))]),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4216=['pluginName','start','toModel','selection','for','span','schema','addMarker','conversion','document','end','model','from','markerToElement','length','getLastMatchingPosition','insertContent','showFakeVisualSelection','processor','getLastPosition','has','markers','createPositionAfter','editor','hideFakeVisualSelection','ck-fake-ai-selection','insertContentBelow','isAtEnd','editingDowncast','isContent','data','getSelectedBlocks','getFirstRange','change','updateMarker'];(function(_0x147966,_0x421619){const _0x18e853=function(_0x322980){while(--_0x322980){_0x147966['push'](_0x147966['shift']());}};_0x18e853(++_0x421619);}(_0x4216,0xba));const _0x18e8=function(_0x147966,_0x421619){_0x147966=_0x147966-0x0;let _0x18e853=_0x4216[_0x147966];return _0x18e853;};import{Plugin as _0xac1250}from'ckeditor5/src/core.js';const s='ai-ui';export default class i extends _0xac1250{static get[_0x18e8('0x18')](){return'AIAssistantEditing';}['init'](){const {editor:_0x1ccbe1}=this;_0x1ccbe1[_0x18e8('0x20')]['for'](_0x18e8('0x11'))['markerToHighlight']({'model':s,'view':{'classes':[_0x18e8('0xe')]}}),_0x1ccbe1[_0x18e8('0x20')][_0x18e8('0x1c')](_0x18e8('0x11'))[_0x18e8('0x2')]({'model':s,'view':{'name':_0x18e8('0x1d'),'classes':[_0x18e8('0xe'),'ck-fake-ai-selection_collapsed']}});}[_0x18e8('0x6')](){const _0x34270c=this[_0x18e8('0xc')][_0x18e8('0x0')];_0x34270c[_0x18e8('0x16')](_0x593a3b=>{const _0x4af2f3=_0x34270c['document']['selection'][_0x18e8('0x15')]();if(_0x34270c[_0x18e8('0xa')][_0x18e8('0x9')](s))_0x593a3b[_0x18e8('0x17')](s,{'range':_0x4af2f3});else{if(_0x4af2f3[_0x18e8('0x19')][_0x18e8('0x10')]){const _0x1f8b13=_0x4af2f3[_0x18e8('0x19')][_0x18e8('0x4')](({item:_0x4bc74b})=>!_0x34270c[_0x18e8('0x1e')][_0x18e8('0x12')](_0x4bc74b),{'boundaries':_0x4af2f3});_0x593a3b[_0x18e8('0x1f')](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x593a3b['createRange'](_0x1f8b13,_0x4af2f3[_0x18e8('0x22')])});}else _0x593a3b[_0x18e8('0x1f')](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4af2f3});}});}[_0x18e8('0xd')](){const _0x233862=this['editor'][_0x18e8('0x0')];_0x233862['markers'][_0x18e8('0x9')](s)&&_0x233862['change'](_0x211839=>{_0x211839['removeMarker'](s);});}[_0x18e8('0x5')](_0x257878,_0x3279ee){const _0x160594=_0x3279ee||this[_0x18e8('0xc')][_0x18e8('0x0')]['document'][_0x18e8('0x1b')];if(!this[_0x18e8('0xc')]['model']['canEditAt'](_0x160594))return;const _0x1364be=this[_0x18e8('0xc')][_0x18e8('0x13')][_0x18e8('0x7')]['toView'](_0x257878),_0x140a86=this[_0x18e8('0xc')][_0x18e8('0x13')][_0x18e8('0x1a')](_0x1364be);this[_0x18e8('0xc')]['model'][_0x18e8('0x16')](_0x5986d3=>{const _0x37f185=this[_0x18e8('0xc')][_0x18e8('0x0')][_0x18e8('0x5')](_0x140a86,_0x160594);_0x37f185&&_0x5986d3['setSelection'](_0x37f185);});}[_0x18e8('0xf')](_0x956adb){const {model:_0x7388f9}=this[_0x18e8('0xc')],_0x13b581=Array[_0x18e8('0x1')](_0x7388f9[_0x18e8('0x21')][_0x18e8('0x1b')][_0x18e8('0x14')]()),_0x5c2aa8=_0x13b581[_0x18e8('0x3')]?_0x7388f9[_0x18e8('0xb')](_0x13b581['pop']()):_0x7388f9[_0x18e8('0x21')][_0x18e8('0x1b')][_0x18e8('0x8')]();this[_0x18e8('0x5')](_0x956adb,_0x5c2aa8);}}
23
+ const _0x241a=['insertContentBelow','markerToHighlight','addMarker','editingDowncast','selection','has','insertContent','from','length','getFirstRange','isContent','showFakeVisualSelection','processor','editor','init','document','change','updateMarker','end','pop','data','setSelection','createPositionAfter','toView','getSelectedBlocks','markers','model','AIAssistantEditing','span','pluginName','schema','hideFakeVisualSelection','for','createRange','isAtEnd','ai-ui','canEditAt','ck-fake-ai-selection','start','conversion','getLastMatchingPosition'];(function(_0xeeca6f,_0x241ad5){const _0x153ddd=function(_0x141f32){while(--_0x141f32){_0xeeca6f['push'](_0xeeca6f['shift']());}};_0x153ddd(++_0x241ad5);}(_0x241a,0xa2));const _0x153d=function(_0xeeca6f,_0x241ad5){_0xeeca6f=_0xeeca6f-0x0;let _0x153ddd=_0x241a[_0xeeca6f];return _0x153ddd;};import{Plugin as _0x179731}from'ckeditor5/src/core.js';const s=_0x153d('0x25');export default class i extends _0x179731{static get[_0x153d('0x1f')](){return _0x153d('0x1d');}[_0x153d('0x10')](){const {editor:_0x561932}=this;_0x561932[_0x153d('0x0')][_0x153d('0x22')]('editingDowncast')[_0x153d('0x3')]({'model':s,'view':{'classes':[_0x153d('0x27')]}}),_0x561932[_0x153d('0x0')]['for'](_0x153d('0x5'))['markerToElement']({'model':s,'view':{'name':_0x153d('0x1e'),'classes':['ck-fake-ai-selection','ck-fake-ai-selection_collapsed']}});}[_0x153d('0xd')](){const _0x3a99a5=this[_0x153d('0xf')][_0x153d('0x1c')];_0x3a99a5[_0x153d('0x12')](_0x4ca88a=>{const _0x5ca25e=_0x3a99a5['document'][_0x153d('0x6')][_0x153d('0xb')]();if(_0x3a99a5['markers'][_0x153d('0x7')](s))_0x4ca88a[_0x153d('0x13')](s,{'range':_0x5ca25e});else{if(_0x5ca25e[_0x153d('0x28')][_0x153d('0x24')]){const _0x2822d0=_0x5ca25e[_0x153d('0x28')][_0x153d('0x1')](({item:_0x593520})=>!_0x3a99a5[_0x153d('0x20')][_0x153d('0xc')](_0x593520),{'boundaries':_0x5ca25e});_0x4ca88a[_0x153d('0x4')](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4ca88a[_0x153d('0x23')](_0x2822d0,_0x5ca25e[_0x153d('0x14')])});}else _0x4ca88a[_0x153d('0x4')](s,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5ca25e});}});}[_0x153d('0x21')](){const _0x2f9441=this[_0x153d('0xf')][_0x153d('0x1c')];_0x2f9441[_0x153d('0x1b')][_0x153d('0x7')](s)&&_0x2f9441[_0x153d('0x12')](_0x558600=>{_0x558600['removeMarker'](s);});}[_0x153d('0x8')](_0x4ef535,_0x468603){const _0x5da483=_0x468603||this[_0x153d('0xf')][_0x153d('0x1c')]['document'][_0x153d('0x6')];if(!this[_0x153d('0xf')][_0x153d('0x1c')][_0x153d('0x26')](_0x5da483))return;const _0x3857f3=this[_0x153d('0xf')][_0x153d('0x16')][_0x153d('0xe')][_0x153d('0x19')](_0x4ef535),_0x16bdfd=this[_0x153d('0xf')][_0x153d('0x16')]['toModel'](_0x3857f3);this[_0x153d('0xf')][_0x153d('0x1c')][_0x153d('0x12')](_0x5620fa=>{const _0x51a4ab=this[_0x153d('0xf')][_0x153d('0x1c')][_0x153d('0x8')](_0x16bdfd,_0x5da483);_0x51a4ab&&_0x5620fa[_0x153d('0x17')](_0x51a4ab);});}[_0x153d('0x2')](_0x4c06d2){const {model:_0x5912c9}=this['editor'],_0x31a77f=Array[_0x153d('0x9')](_0x5912c9[_0x153d('0x11')][_0x153d('0x6')][_0x153d('0x1a')]()),_0xc57d99=_0x31a77f[_0x153d('0xa')]?_0x5912c9[_0x153d('0x18')](_0x31a77f[_0x153d('0x15')]()):_0x5912c9['document'][_0x153d('0x6')]['getLastPosition']();this[_0x153d('0x8')](_0x4c06d2,_0xc57d99);}}