@simai-studio/chat 0.0.0-stage → 1.1.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/LICENSE.md +182 -0
- package/README.md +67 -2
- package/dist/package-receipt.json +1553 -0
- package/dist/set.json +107 -0
- package/dist/smart/chat-composer/aliases.json +67 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +698 -0
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +223 -0
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +550 -0
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +1028 -0
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +73 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +28 -0
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +28 -0
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +416 -0
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +651 -0
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +20 -0
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +20 -0
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +99 -0
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +20 -0
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +20 -0
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +110 -0
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/studio.fixture.json +18 -0
- package/dist/smart/chat-composer/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-composer/studio.scenario.json +37 -0
- package/dist/smart/chat-composer/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +198 -0
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +109 -0
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +89 -0
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/aliases.json +20 -0
- package/dist/smart/chat-interlocutor/aliases.json.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +436 -0
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +72 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/examples.json +379 -0
- package/dist/smart/chat-interlocutor/examples.json.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +531 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +22 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/en.json +13 -0
- package/dist/smart/chat-interlocutor/lang/en.json.gz +0 -0
- package/dist/smart/chat-interlocutor/lang/ru.json +13 -0
- package/dist/smart/chat-interlocutor/lang/ru.json.gz +0 -0
- package/dist/smart/chat-interlocutor/probe.json +204 -0
- package/dist/smart/chat-interlocutor/probe.json.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +406 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +10 -0
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +110 -0
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json +25 -0
- package/dist/smart/chat-interlocutor/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json +41 -0
- package/dist/smart/chat-interlocutor/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +58 -0
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.js +43 -0
- package/dist/smart/chat-interlocutor/template/default.js.gz +0 -0
- package/dist/smart/chat-message/aliases.json +125 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +850 -0
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +2260 -0
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -0
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +1626 -0
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +5859 -0
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +15 -0
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +176 -0
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +180 -0
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +1051 -0
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +824 -0
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +2 -0
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +2 -0
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +2 -0
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +13 -0
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +2 -0
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +2 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +2 -0
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +40 -0
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +22 -0
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +2 -0
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +2 -0
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +2 -0
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/default/waiting.html +2 -0
- package/dist/smart/chat-message/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +2 -0
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +2 -0
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +12 -0
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +452 -0
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/studio.fixture.json +27 -0
- package/dist/smart/chat-message/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-message/studio.scenario.json +22 -0
- package/dist/smart/chat-message/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +1805 -0
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-message/template/default.js +27 -0
- package/dist/smart/chat-message/template/default.js.gz +0 -0
- package/dist/smart/chat-message/template/person.js +11 -0
- package/dist/smart/chat-message/template/person.js.gz +0 -0
- package/dist/smart/chat-threads/aliases.json +174 -0
- package/dist/smart/chat-threads/aliases.json.gz +0 -0
- package/dist/smart/chat-threads/component.json +1240 -0
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +134 -0
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +689 -0
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +859 -0
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +39 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/lang/en.json +18 -0
- package/dist/smart/chat-threads/lang/en.json.gz +0 -0
- package/dist/smart/chat-threads/lang/ru.json +18 -0
- package/dist/smart/chat-threads/lang/ru.json.gz +0 -0
- package/dist/smart/chat-threads/probe.json +406 -0
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +1159 -0
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +145 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +58 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +116 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +50 -0
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +50 -0
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +104 -0
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +104 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +123 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +99 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +503 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/studio.fixture.json +23 -0
- package/dist/smart/chat-threads/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +113 -0
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/template/default.js +62 -0
- package/dist/smart/chat-threads/template/default.js.gz +0 -0
- package/dist/smart/chat-window/aliases.json +395 -0
- package/dist/smart/chat-window/aliases.json.gz +0 -0
- package/dist/smart/chat-window/component.json +2819 -0
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1509 -0
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -0
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +2798 -0
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +12780 -0
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -0
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/lang/en.json +212 -0
- package/dist/smart/chat-window/lang/en.json.gz +0 -0
- package/dist/smart/chat-window/lang/ru.json +218 -0
- package/dist/smart/chat-window/lang/ru.json.gz +0 -0
- package/dist/smart/chat-window/probe.json +2023 -0
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +2844 -0
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +100 -0
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +125 -0
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +125 -0
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +104 -0
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +161 -0
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +123 -0
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +123 -0
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +526 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/studio.fixture.json +13 -0
- package/dist/smart/chat-window/studio.fixture.json.gz +0 -0
- package/dist/smart/chat-window/studio.scenario.json +95 -0
- package/dist/smart/chat-window/studio.scenario.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1168 -0
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/chat-window/template/default.js +12 -0
- package/dist/smart/chat-window/template/default.js.gz +0 -0
- package/dist/smart/rule.js +193 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,1028 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ "e849f0d25e58"
|
|
6
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
|
|
8
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("deb1a4d61565");
|
|
11
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5b7d7695b41b");
|
|
12
|
+
/* harmony import */ var _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("e92fd2d1a38c");
|
|
13
|
+
/* harmony import */ var _core_js_page_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("43090d1c8307");
|
|
14
|
+
/* harmony import */ var _js_templates_default_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("c790b3e0c605");
|
|
15
|
+
/* harmony import */ var _component_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("78eece9c0d65");
|
|
16
|
+
/* harmony import */ var _aliases_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("c570a02c474e");
|
|
17
|
+
/* harmony import */ var _lang_en_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("018100550391");
|
|
18
|
+
/* harmony import */ var _lang_ru_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("3de0b0ac7d3d");
|
|
19
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__, _core_js_page_language__WEBPACK_IMPORTED_MODULE_3__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_4__]);
|
|
20
|
+
([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__, _core_js_page_language__WEBPACK_IMPORTED_MODULE_3__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_4__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
21
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__);
|
|
22
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__);
|
|
23
|
+
/* harmony import */ var _core_js_instance_path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__);
|
|
24
|
+
/* harmony import */ var _core_js_page_language__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_core_js_page_language__WEBPACK_IMPORTED_MODULE_3__);
|
|
25
|
+
// Where a question is written and files are added. It came from simai/ui-chat
|
|
26
|
+
// (D31: components live in the Framework or in ui-pro, owner 2026-10-26; the
|
|
27
|
+
// move approved 2026-10-27), where the chat window placed it under the feed.
|
|
28
|
+
//
|
|
29
|
+
// The field is the Framework's flush textarea (component/textarea, surface
|
|
30
|
+
// `flush`, auto-grow up to eight rows); the composer's box draws its border,
|
|
31
|
+
// fill and focus. Enter sends, Shift+Enter breaks the line, and an IME
|
|
32
|
+
// composition is never cut short by its own Enter. While an answer is awaited
|
|
33
|
+
// (busy) the send button becomes «Остановить ожидание» and Enter says why it
|
|
34
|
+
// sent nothing -- unless the host queues (`queue`, 1.1.0): then a message of
|
|
35
|
+
// text still goes out as submit while busy, and the host keeps it until the
|
|
36
|
+
// answer is over. A message with files is not queued. Files come from the
|
|
37
|
+
// button, a drop or a paste; the composer only reports them (attach) -- the
|
|
38
|
+
// host uploads them and hands back their chips as `files`, so whether a file
|
|
39
|
+
// is accepted is always the server's word.
|
|
40
|
+
//
|
|
41
|
+
// From its component.json (standard simai.smart-component 1.3.9 §3, §4, §8,
|
|
42
|
+
// §11): the settings and the value are attributes and properties made by
|
|
43
|
+
// core/js/element-manifest.js, its words are lang/<locale>.json, the actions
|
|
44
|
+
// answer outcomes, and the events are the vocabulary's submit, stop, attach
|
|
45
|
+
// and detach; the 0.3 names sf-chat-send, sf-chat-stop, sf-chat-files and
|
|
46
|
+
// sf-chat-action follow until 2026-12-01 (aliases.json).
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// The 0.3 limits when a number attribute says nothing usable.
|
|
56
|
+
|
|
57
|
+
const MAX_CHARS = 4000;
|
|
58
|
+
const MAX_FILES = 5;
|
|
59
|
+
|
|
60
|
+
const applied = () => ({
|
|
61
|
+
outcome: "applied"
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const ChatComposerElement = (0,_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__.elementFromManifest)(_component_json__WEBPACK_IMPORTED_MODULE_5__, {
|
|
65
|
+
base: (_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default()),
|
|
66
|
+
lang: {
|
|
67
|
+
en: _lang_en_json__WEBPACK_IMPORTED_MODULE_7__,
|
|
68
|
+
ru: _lang_ru_json__WEBPACK_IMPORTED_MODULE_8__
|
|
69
|
+
},
|
|
70
|
+
source: "ru",
|
|
71
|
+
aliases: _aliases_json__WEBPACK_IMPORTED_MODULE_6__,
|
|
72
|
+
actions: {
|
|
73
|
+
"set-files"({
|
|
74
|
+
files
|
|
75
|
+
}) {
|
|
76
|
+
this.files = files;
|
|
77
|
+
return applied();
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
clear() {
|
|
81
|
+
this.value = "";
|
|
82
|
+
this.notice = "";
|
|
83
|
+
return applied();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
class SfChatComposer extends ChatComposerElement {
|
|
90
|
+
static get props() {
|
|
91
|
+
return { ...super.props,
|
|
92
|
+
templateName: {
|
|
93
|
+
attribute: "template",
|
|
94
|
+
default: "default"
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
constructor() {
|
|
100
|
+
super();
|
|
101
|
+
this._notice = "";
|
|
102
|
+
this._busyHint = false;
|
|
103
|
+
this._level = "";
|
|
104
|
+
this._said = "";
|
|
105
|
+
this._tallText = false;
|
|
106
|
+
this._dragging = false;
|
|
107
|
+
this._depth = 0;
|
|
108
|
+
this._draft = undefined;
|
|
109
|
+
this._observer = null;
|
|
110
|
+
this._observed = null; // A value set as a property before the element was defined is an own
|
|
111
|
+
// property that would hide the accessor; it is taken through it.
|
|
112
|
+
|
|
113
|
+
for (const name of ["files", "value", "busy", "queue", "disabled"]) {
|
|
114
|
+
if (!Object.prototype.hasOwnProperty.call(this, name)) continue;
|
|
115
|
+
const early = this[name];
|
|
116
|
+
delete this[name];
|
|
117
|
+
this[name] = early;
|
|
118
|
+
}
|
|
119
|
+
} // --- what the element holds -------------------------------------------
|
|
120
|
+
|
|
121
|
+
/** The field, once the element has drawn it (not the printed one). */
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
get field() {
|
|
125
|
+
return this._hasRendered ? this.querySelector("textarea.sf-chat-composer__input") : null;
|
|
126
|
+
}
|
|
127
|
+
/** The text in the field; before the field is drawn, the draft it will get. */
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
get value() {
|
|
131
|
+
const field = this.field;
|
|
132
|
+
if (field) return field.value;
|
|
133
|
+
return this._draft ?? this.getAttribute("value") ?? "";
|
|
134
|
+
}
|
|
135
|
+
/** As if typed: the Framework's auto-grow fits the field to the text. */
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
set value(next) {
|
|
139
|
+
const text = next === null || next === undefined ? "" : String(next);
|
|
140
|
+
const field = this.field;
|
|
141
|
+
|
|
142
|
+
if (!field) {
|
|
143
|
+
this._draft = text;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
field.value = text;
|
|
148
|
+
field.dispatchEvent(new Event("input"));
|
|
149
|
+
}
|
|
150
|
+
/** The chips as given: objects only, a name as text. */
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
get chips() {
|
|
154
|
+
const files = this.files;
|
|
155
|
+
return Array.isArray(files) ? files.filter(one => one && typeof one === "object").map(one => ({ ...one,
|
|
156
|
+
name: String(one.name ?? "")
|
|
157
|
+
})) : [];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
get limit() {
|
|
161
|
+
return this.maxlength > 0 ? this.maxlength : MAX_CHARS;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get fileLimit() {
|
|
165
|
+
return this.maxFiles > 0 ? this.maxFiles : MAX_FILES;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get notice() {
|
|
169
|
+
return this._notice;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
set notice(message) {
|
|
173
|
+
const next = message ? String(message) : "";
|
|
174
|
+
if (next === this._notice) return;
|
|
175
|
+
this._notice = next;
|
|
176
|
+
this.requestComponentUpdate("notice");
|
|
177
|
+
} // The field the base's focus() and blur() go to (focusDelegate).
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
focusDelegate() {
|
|
181
|
+
return this.field;
|
|
182
|
+
} // The 0.3 details of the two renamed events whose detail changed.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
sfAliasAdapters() {
|
|
186
|
+
return {
|
|
187
|
+
"sf-chat-send": detail => detail ? {
|
|
188
|
+
text: detail.text,
|
|
189
|
+
attachmentIds: detail.attachmentIds
|
|
190
|
+
} : undefined,
|
|
191
|
+
"sf-chat-action": detail => detail ? {
|
|
192
|
+
action: "remove-attachment",
|
|
193
|
+
id: detail.id,
|
|
194
|
+
name: detail.name
|
|
195
|
+
} : undefined
|
|
196
|
+
};
|
|
197
|
+
} // --- drawing ------------------------------------------------------------
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
get basePath() {
|
|
201
|
+
return (0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.instancePath)(this, {
|
|
202
|
+
kind: "sf-chat-composer"
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/** 48213 → «47 КБ»: sizes are for reading, in plain units. */
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
formatBytes(bytes) {
|
|
209
|
+
const number = Number(bytes) || 0;
|
|
210
|
+
const locale = (0,_core_js_page_language__WEBPACK_IMPORTED_MODULE_3__.pageLocale)(this);
|
|
211
|
+
|
|
212
|
+
const format = value => new Intl.NumberFormat(locale, {
|
|
213
|
+
maximumFractionDigits: value < 10 ? 1 : 0
|
|
214
|
+
}).format(value);
|
|
215
|
+
|
|
216
|
+
if (number < 1024) return this.sfWord("size-b-text", {
|
|
217
|
+
vars: {
|
|
218
|
+
n: number
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
if (number < 1024 * 1024) return this.sfWord("size-kb-text", {
|
|
222
|
+
vars: {
|
|
223
|
+
n: format(number / 1024)
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
if (number < 1024 ** 3) return this.sfWord("size-mb-text", {
|
|
227
|
+
vars: {
|
|
228
|
+
n: format(number / 1024 / 1024)
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
return this.sfWord("size-gb-text", {
|
|
232
|
+
vars: {
|
|
233
|
+
n: format(number / 1024 ** 3)
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/** Busy, and a message of text may still go out: the host queues it. */
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
get queueing() {
|
|
241
|
+
return this.busy && this.queue && this.chips.length === 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
templateContext() {
|
|
245
|
+
const files = this.chips;
|
|
246
|
+
const busy = this.busy;
|
|
247
|
+
const queueing = this.queueing;
|
|
248
|
+
const disabled = this.disabled;
|
|
249
|
+
const length = this.value.length;
|
|
250
|
+
const limit = this.limit;
|
|
251
|
+
const near = length > limit * 0.8;
|
|
252
|
+
const over = length > limit;
|
|
253
|
+
const countText = near ? over ? this.sfWord("too-long-text", {
|
|
254
|
+
vars: {
|
|
255
|
+
max: limit
|
|
256
|
+
}
|
|
257
|
+
}) : this.sfWord("count-text", {
|
|
258
|
+
vars: {
|
|
259
|
+
count: length,
|
|
260
|
+
max: limit
|
|
261
|
+
}
|
|
262
|
+
}) : ""; // The live line speaks only when a threshold is crossed, not on every key.
|
|
263
|
+
|
|
264
|
+
const level = over ? "over" : near ? "near" : "";
|
|
265
|
+
|
|
266
|
+
if (level !== this._level) {
|
|
267
|
+
this._level = level;
|
|
268
|
+
this._said = level ? countText : "";
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (!busy) this._busyHint = false; // Busy: what Enter does now -- go after the answer, or nothing and why
|
|
272
|
+
// (a message with files waits with the field).
|
|
273
|
+
|
|
274
|
+
const hint = this._busyHint ? this.queue ? "busy-files-text" : "busy-text" : queueing ? "queue-hint-text" : "hint-text";
|
|
275
|
+
const path = this.basePath;
|
|
276
|
+
return {
|
|
277
|
+
component: this,
|
|
278
|
+
files,
|
|
279
|
+
busy,
|
|
280
|
+
disabled,
|
|
281
|
+
noStop: this.noStop,
|
|
282
|
+
attachments: this.attachments,
|
|
283
|
+
accept: this.accept,
|
|
284
|
+
attachDisabled: disabled || files.length >= this.fileLimit,
|
|
285
|
+
ready: this.canSend(),
|
|
286
|
+
near,
|
|
287
|
+
over,
|
|
288
|
+
countText,
|
|
289
|
+
said: this._said,
|
|
290
|
+
notice: this._notice,
|
|
291
|
+
busyHint: this._busyHint,
|
|
292
|
+
hint: this.sfWord(hint),
|
|
293
|
+
queueing,
|
|
294
|
+
tall: files.length > 0 || this._tallText,
|
|
295
|
+
dragging: this._dragging,
|
|
296
|
+
placeholder: this.placeholder || this.sfWord("placeholder-text"),
|
|
297
|
+
fieldLabel: this.sfWord("field-label"),
|
|
298
|
+
attachLabel: this.sfWord("attach-label"),
|
|
299
|
+
sendLabel: this.sfWord(queueing ? "queue-label" : "send-label"),
|
|
300
|
+
stopLabel: this.sfWord("stop-label"),
|
|
301
|
+
dropText: this.sfWord("drop-text"),
|
|
302
|
+
inputId: (0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.partId)(path, "input"),
|
|
303
|
+
statusId: (0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.partId)(path, "status"),
|
|
304
|
+
hintId: (0,_core_js_instance_path__WEBPACK_IMPORTED_MODULE_2__.partId)(path, "hint")
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
template() {
|
|
309
|
+
return (0,_js_templates_default_js__WEBPACK_IMPORTED_MODULE_4__.renderChatComposerTemplate)(this.templateContext());
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
afterRender(changedAttributes) {
|
|
313
|
+
super.afterRender?.(changedAttributes);
|
|
314
|
+
const field = this.field;
|
|
315
|
+
if (!field) return;
|
|
316
|
+
|
|
317
|
+
if (this._draft !== undefined || !this._started) {
|
|
318
|
+
// The first text: a draft set before the field was drawn, else
|
|
319
|
+
// the attribute's.
|
|
320
|
+
this._started = true;
|
|
321
|
+
const text = this._draft ?? this.getAttribute("value") ?? "";
|
|
322
|
+
this._draft = undefined;
|
|
323
|
+
if (text && field.value !== text) this.value = text;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (this._observed !== field) {
|
|
327
|
+
this._observer?.disconnect();
|
|
328
|
+
this._observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => this.shape());
|
|
329
|
+
this._observer?.observe(field.closest(".sf-chat-composer__field") ?? field);
|
|
330
|
+
this._observed = field;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
this.shape();
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
disconnectedCallback() {
|
|
337
|
+
this._observer?.disconnect();
|
|
338
|
+
this._observer = null;
|
|
339
|
+
this._observed = null;
|
|
340
|
+
super.disconnectedCallback();
|
|
341
|
+
} // One line and no files: a capsule. More: the box takes its own radius,
|
|
342
|
+
// and what is inside follows it (nested radii).
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
shape() {
|
|
346
|
+
const field = this.field;
|
|
347
|
+
if (!field) return;
|
|
348
|
+
const style = getComputedStyle(field);
|
|
349
|
+
const line = parseFloat(style.lineHeight) || 24;
|
|
350
|
+
const text = field.scrollHeight - parseFloat(style.paddingBlockStart || 0) - parseFloat(style.paddingBlockEnd || 0);
|
|
351
|
+
const tall = text > line * 1.5;
|
|
352
|
+
if (tall === this._tallText) return;
|
|
353
|
+
this._tallText = tall;
|
|
354
|
+
this.requestComponentUpdate("shape");
|
|
355
|
+
} // --- what a person does -------------------------------------------------
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
onInput() {
|
|
359
|
+
this.requestComponentUpdate("input");
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
onKey(event) {
|
|
363
|
+
if (event.key !== "Enter" || event.shiftKey || event.isComposing || event.keyCode === 229) return;
|
|
364
|
+
event.preventDefault();
|
|
365
|
+
|
|
366
|
+
if (this.busy && !this.queueing && this.value.trim()) {
|
|
367
|
+
this._busyHint = true;
|
|
368
|
+
this.requestComponentUpdate("busy-hint");
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
this.send();
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
onPaste(event) {
|
|
376
|
+
const files = [...(event.clipboardData?.files || [])];
|
|
377
|
+
|
|
378
|
+
if (files.length && this.attachments) {
|
|
379
|
+
event.preventDefault();
|
|
380
|
+
this.offerFiles(files);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
pick() {
|
|
385
|
+
this.querySelector(".sf-chat-composer__picker")?.click();
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
onPicked(picker) {
|
|
389
|
+
this.offerFiles([...(picker.files || [])]);
|
|
390
|
+
picker.value = "";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
canAttach() {
|
|
394
|
+
return this.attachments && !this.disabled;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
onDragEnter(event) {
|
|
398
|
+
if (!this.canAttach() || !event.dataTransfer?.types?.includes("Files")) return;
|
|
399
|
+
event.preventDefault();
|
|
400
|
+
this._depth += 1;
|
|
401
|
+
this.setDragging(true);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
onDragOver(event) {
|
|
405
|
+
if (this.canAttach()) event.preventDefault();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
onDragLeave() {
|
|
409
|
+
this._depth = Math.max(0, this._depth - 1);
|
|
410
|
+
if (!this._depth) this.setDragging(false);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
onDrop(event) {
|
|
414
|
+
this._depth = 0;
|
|
415
|
+
this.setDragging(false);
|
|
416
|
+
if (!this.canAttach()) return;
|
|
417
|
+
event.preventDefault();
|
|
418
|
+
this.offerFiles([...(event.dataTransfer?.files || [])]);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
setDragging(on) {
|
|
422
|
+
if (this._dragging === on) return;
|
|
423
|
+
this._dragging = on;
|
|
424
|
+
this.requestComponentUpdate("dragging");
|
|
425
|
+
}
|
|
426
|
+
/** Checks the files by type, size and count, says the refusals and reports the rest. */
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
offerFiles(files) {
|
|
430
|
+
if (!files.length) return;
|
|
431
|
+
const allowed = String(this.accept || "").split(",").map(one => one.trim().toLowerCase()).filter(Boolean);
|
|
432
|
+
const room = Math.max(0, this.fileLimit - this.chips.length);
|
|
433
|
+
const maxBytes = this.maxBytes > 0 ? this.maxBytes : 0;
|
|
434
|
+
const accepted = [];
|
|
435
|
+
const rejected = [];
|
|
436
|
+
|
|
437
|
+
for (const file of files) {
|
|
438
|
+
const extension = `.${(String(file.name).split(".").pop() || "").toLowerCase()}`;
|
|
439
|
+
if (allowed.length && !allowed.includes(extension)) rejected.push({
|
|
440
|
+
file,
|
|
441
|
+
reason: this.sfWord("bad-type-text")
|
|
442
|
+
});else if (maxBytes && file.size > maxBytes) rejected.push({
|
|
443
|
+
file,
|
|
444
|
+
reason: this.sfWord("too-big-text", {
|
|
445
|
+
vars: {
|
|
446
|
+
size: this.formatBytes(maxBytes)
|
|
447
|
+
}
|
|
448
|
+
})
|
|
449
|
+
});else if (accepted.length >= room) rejected.push({
|
|
450
|
+
file,
|
|
451
|
+
reason: this.sfWord("too-many-text", {
|
|
452
|
+
count: this.fileLimit,
|
|
453
|
+
vars: {
|
|
454
|
+
max: this.fileLimit
|
|
455
|
+
}
|
|
456
|
+
})
|
|
457
|
+
});else accepted.push(file);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
this.notice = rejected.map(one => `${one.file.name}: ${one.reason}`).join("; ");
|
|
461
|
+
this.sfEmit("attach", {
|
|
462
|
+
files: accepted,
|
|
463
|
+
rejected
|
|
464
|
+
}, {
|
|
465
|
+
cancelable: true
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
removeFile(file) {
|
|
470
|
+
this.sfEmit("detach", {
|
|
471
|
+
id: file.id,
|
|
472
|
+
name: file.name
|
|
473
|
+
}, {
|
|
474
|
+
cancelable: true
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
/** «Повторить» on a chip that did not upload (K-08): the host sends the file again. */
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
retryFile(file) {
|
|
481
|
+
this.sfEmit("retry", {
|
|
482
|
+
id: file.id ?? file.localId,
|
|
483
|
+
name: file.name
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
canSend() {
|
|
488
|
+
const text = this.value.trim();
|
|
489
|
+
const files = this.chips;
|
|
490
|
+
const uploading = files.some(file => file.progress !== undefined && file.progress !== null && file.progress < 1 && !file.error);
|
|
491
|
+
const ready = files.some(file => file.id && !file.error);
|
|
492
|
+
return (!this.busy || this.queueing) && !this.disabled && !uploading && (text.length > 0 || ready) && this.value.length <= this.limit;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
send() {
|
|
496
|
+
if (!this.canSend()) return;
|
|
497
|
+
const text = this.value.trim();
|
|
498
|
+
const ids = this.chips.filter(file => file.id && !file.error).map(file => file.id);
|
|
499
|
+
if (this.sfEmit("submit", {
|
|
500
|
+
text,
|
|
501
|
+
attachmentIds: ids,
|
|
502
|
+
"attachment-ids": ids
|
|
503
|
+
}, {
|
|
504
|
+
cancelable: true
|
|
505
|
+
})) this.notice = "";
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
stop() {
|
|
509
|
+
this.sfEmit("stop", {}, {
|
|
510
|
+
cancelable: true
|
|
511
|
+
});
|
|
512
|
+
this.field?.focus();
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
SfChatComposer.define("sf-chat-composer");
|
|
518
|
+
__webpack_async_result__();
|
|
519
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
520
|
+
|
|
521
|
+
/***/ },
|
|
522
|
+
|
|
523
|
+
/***/ "c790b3e0c605"
|
|
524
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
525
|
+
|
|
526
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
527
|
+
__webpack_require__.r(__webpack_exports__);
|
|
528
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
529
|
+
/* harmony export */ renderChatComposerTemplate: () => (/* binding */ renderChatComposerTemplate)
|
|
530
|
+
/* harmony export */ });
|
|
531
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a080a730149");
|
|
532
|
+
/* harmony import */ var lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("efa66f8927d1");
|
|
533
|
+
/* harmony import */ var _parts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("09772fbfb8c4");
|
|
534
|
+
/* harmony import */ var _default_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("4c36dfa55195");
|
|
535
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lit__WEBPACK_IMPORTED_MODULE_0__, lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1__, _parts_js__WEBPACK_IMPORTED_MODULE_2__]);
|
|
536
|
+
([lit__WEBPACK_IMPORTED_MODULE_0__, lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1__, _parts_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
537
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lit__WEBPACK_IMPORTED_MODULE_0__);
|
|
538
|
+
/* harmony import */ var lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
// Where a question is written and files are added: a form with the box (the
|
|
543
|
+
// chips over the line they go with, then attach, the field, the count, send
|
|
544
|
+
// or stop, or both while a typed message would be queued), the notice of
|
|
545
|
+
// refused files, the hint under the field, the hidden file picker and the
|
|
546
|
+
// polite line that speaks a threshold of the count.
|
|
547
|
+
//
|
|
548
|
+
// The field is the Framework's flush sf-textarea with its auto-grow (eight
|
|
549
|
+
// rows). Its value is never bound: a redraw keeps the text, the caret and an
|
|
550
|
+
// IME composition; the element reads and writes the field itself.
|
|
551
|
+
//
|
|
552
|
+
// The first paint is the box with its field and buttons, the chips the host
|
|
553
|
+
// gave, and the hint (§5.4).
|
|
554
|
+
|
|
555
|
+
function renderChatComposerTemplate(context) {
|
|
556
|
+
const {
|
|
557
|
+
component
|
|
558
|
+
} = context;
|
|
559
|
+
const rootClass = ["sf-chat-composer", context.over ? "sf-chat-composer--over" : "", context.disabled ? "sf-chat-composer--disabled" : "", context.dragging ? "sf-chat-composer--dragging" : ""].filter(Boolean).join(" ");
|
|
560
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`
|
|
561
|
+
<form
|
|
562
|
+
class=${rootClass}
|
|
563
|
+
novalidate
|
|
564
|
+
@submit=${event => {
|
|
565
|
+
event.preventDefault();
|
|
566
|
+
component.send();
|
|
567
|
+
}}
|
|
568
|
+
@dragenter=${event => component.onDragEnter(event)}
|
|
569
|
+
@dragover=${event => component.onDragOver(event)}
|
|
570
|
+
@dragleave=${() => component.onDragLeave()}
|
|
571
|
+
@drop=${event => component.onDrop(event)}
|
|
572
|
+
>
|
|
573
|
+
<div class="sf-chat-composer__box${context.tall ? " sf-chat-composer__box--tall" : ""}">
|
|
574
|
+
<div class="sf-chat-composer__files" ?hidden=${!context.files.length}>${(0,lit_directives_repeat_js__WEBPACK_IMPORTED_MODULE_1__.repeat)(context.files, (file, index) => file.localId ?? file.id ?? `#${index}`, file => (0,_parts_js__WEBPACK_IMPORTED_MODULE_2__.renderAttachment)(file, {
|
|
575
|
+
removable: true,
|
|
576
|
+
onRemove: one => component.removeFile(one),
|
|
577
|
+
onRetry: one => component.retryFile(one)
|
|
578
|
+
}))}</div>
|
|
579
|
+
<div class="sf-chat-composer__row">
|
|
580
|
+
${(0,_parts_js__WEBPACK_IMPORTED_MODULE_2__.iconButton)({
|
|
581
|
+
icon: "attach_file",
|
|
582
|
+
label: context.attachLabel,
|
|
583
|
+
size: "1",
|
|
584
|
+
className: "sf-chat-composer__attach",
|
|
585
|
+
hidden: !context.attachments,
|
|
586
|
+
disabled: context.attachDisabled,
|
|
587
|
+
onClick: () => component.pick()
|
|
588
|
+
})}
|
|
589
|
+
<label class="sf-textarea sf-textarea--size-1 sf-textarea--flush sf-chat-composer__field"><textarea
|
|
590
|
+
class="sf-chat-composer__input"
|
|
591
|
+
rows="1"
|
|
592
|
+
data-auto-grow
|
|
593
|
+
data-max-rows="8"
|
|
594
|
+
id=${context.inputId}
|
|
595
|
+
aria-label=${context.fieldLabel}
|
|
596
|
+
aria-describedby=${context.statusId}
|
|
597
|
+
placeholder=${context.placeholder}
|
|
598
|
+
?disabled=${context.disabled}
|
|
599
|
+
@input=${() => component.onInput()}
|
|
600
|
+
@keydown=${event => component.onKey(event)}
|
|
601
|
+
@paste=${event => component.onPaste(event)}
|
|
602
|
+
></textarea></label>
|
|
603
|
+
<span class="sf-chat-composer__count" id=${context.statusId} ?hidden=${!context.near}>${context.countText}</span>
|
|
604
|
+
${(0,_parts_js__WEBPACK_IMPORTED_MODULE_2__.iconButton)({
|
|
605
|
+
icon: "arrow_upward",
|
|
606
|
+
label: context.sendLabel,
|
|
607
|
+
appearance: context.ready ? "default" : "tonal",
|
|
608
|
+
scheme: context.ready ? "primary" : "on-surface",
|
|
609
|
+
size: "1",
|
|
610
|
+
className: "sf-chat-composer__send",
|
|
611
|
+
type: "submit",
|
|
612
|
+
// Busy, it stands beside stop only for a message the host queues.
|
|
613
|
+
hidden: context.busy && !(context.queueing && context.ready),
|
|
614
|
+
disabled: !context.ready
|
|
615
|
+
})}
|
|
616
|
+
${(0,_parts_js__WEBPACK_IMPORTED_MODULE_2__.iconButton)({
|
|
617
|
+
icon: "stop",
|
|
618
|
+
label: context.stopLabel,
|
|
619
|
+
appearance: "default",
|
|
620
|
+
scheme: "on-surface",
|
|
621
|
+
size: "1",
|
|
622
|
+
className: "sf-chat-composer__stop",
|
|
623
|
+
hidden: !context.busy || context.noStop,
|
|
624
|
+
onClick: () => component.stop()
|
|
625
|
+
})}
|
|
626
|
+
</div>
|
|
627
|
+
<div class="sf-chat-composer__drop" aria-hidden="true">${context.dropText}</div>
|
|
628
|
+
</div>
|
|
629
|
+
<p class="sf-chat-composer__notice" role="alert" ?hidden=${!context.notice}>${context.notice}</p>
|
|
630
|
+
<p
|
|
631
|
+
class="sf-chat-composer__hint${context.busyHint ? " sf-chat-composer__hint--busy" : ""}"
|
|
632
|
+
id=${context.hintId}
|
|
633
|
+
aria-live="polite"
|
|
634
|
+
>${context.hint}</p>
|
|
635
|
+
<input
|
|
636
|
+
class="sf-chat-composer__picker"
|
|
637
|
+
type="file"
|
|
638
|
+
multiple
|
|
639
|
+
hidden
|
|
640
|
+
accept=${context.accept || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
641
|
+
@change=${event => component.onPicked(event.currentTarget)}
|
|
642
|
+
>
|
|
643
|
+
<span class="sf-chat-composer__said sr-only" aria-live="polite">${context.said}</span>
|
|
644
|
+
</form>
|
|
645
|
+
`;
|
|
646
|
+
}
|
|
647
|
+
__webpack_async_result__();
|
|
648
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
649
|
+
|
|
650
|
+
/***/ },
|
|
651
|
+
|
|
652
|
+
/***/ "09772fbfb8c4"
|
|
653
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
654
|
+
|
|
655
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
656
|
+
__webpack_require__.r(__webpack_exports__);
|
|
657
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
658
|
+
/* harmony export */ attachmentState: () => (/* binding */ attachmentState),
|
|
659
|
+
/* harmony export */ iconButton: () => (/* binding */ iconButton),
|
|
660
|
+
/* harmony export */ renderAttachment: () => (/* binding */ renderAttachment)
|
|
661
|
+
/* harmony export */ });
|
|
662
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a080a730149");
|
|
663
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lit__WEBPACK_IMPORTED_MODULE_0__]);
|
|
664
|
+
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
665
|
+
lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
|
666
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lit__WEBPACK_IMPORTED_MODULE_0__);
|
|
667
|
+
// The two small pieces the composer draws more than once, as Lit templates:
|
|
668
|
+
// the Framework's icon button and a file chip. In simai/ui-chat they were the
|
|
669
|
+
// base Component's iconButton and renderAttachment (component/chat/js/render.js),
|
|
670
|
+
// plain DOM shared with the site widget; the icon button is the Framework's
|
|
671
|
+
// markup, and since K-08 the chip is the Framework's sf-file-preview (chip).
|
|
672
|
+
// The icon step that sits in a button of each step: 16 in 32, 20 in 40.
|
|
673
|
+
|
|
674
|
+
const ICON_IN_BUTTON = {
|
|
675
|
+
"1/3": "1",
|
|
676
|
+
"1/2": "1",
|
|
677
|
+
"1": "2",
|
|
678
|
+
"2": "2",
|
|
679
|
+
"3": "3"
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* A Framework icon button: one native button, a decorative Smart sf-icon, a
|
|
683
|
+
* required name. The variant classes are the Framework's (appearance, scheme).
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
function iconButton({
|
|
687
|
+
icon,
|
|
688
|
+
label,
|
|
689
|
+
appearance = "link",
|
|
690
|
+
scheme = "on-surface",
|
|
691
|
+
size = "1/2",
|
|
692
|
+
className = "",
|
|
693
|
+
type = "button",
|
|
694
|
+
disabled = false,
|
|
695
|
+
hidden = false,
|
|
696
|
+
onClick = null
|
|
697
|
+
}) {
|
|
698
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`<button
|
|
699
|
+
type=${type}
|
|
700
|
+
class="sf-icon-button sf-icon-button--size-${size} sf-icon-button--icon sf-icon-button--${appearance} sf-icon-button--${scheme} flex items-cross-center content-main-center ${className}"
|
|
701
|
+
aria-label=${label}
|
|
702
|
+
title=${label}
|
|
703
|
+
?disabled=${disabled}
|
|
704
|
+
?hidden=${hidden}
|
|
705
|
+
@click=${onClick ?? lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
706
|
+
><sf-icon icon=${icon} size=${ICON_IN_BUTTON[size] || "1"} aria-hidden="true"></sf-icon></button>`;
|
|
707
|
+
}
|
|
708
|
+
/** Where a chip stands: refused, still uploading, or ready. */
|
|
709
|
+
|
|
710
|
+
function attachmentState(file) {
|
|
711
|
+
if (file.error) return "error";
|
|
712
|
+
const progress = file.progress;
|
|
713
|
+
return progress !== undefined && progress !== null && progress < 1 ? "uploading" : "ready";
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* A file chip (K-08, SIMAI Framework pair ui-73df5d1b4d4c): the Framework's
|
|
717
|
+
* sf-file-preview in its chip look draws the name, the type and the size,
|
|
718
|
+
* the upload's bar and per cent (state uploading, value), the refusal
|
|
719
|
+
* («Не загрузился: …», state error, error-text, with its «Повторить») and «×».
|
|
720
|
+
* The chat only maps its file to the preview's settings and hears its
|
|
721
|
+
* requests: detach («×») and retry («Повторить»), which go no further than
|
|
722
|
+
* the chip -- the host hears the chat's own events.
|
|
723
|
+
*
|
|
724
|
+
* The class sf-chat-attachment (and sf-chat-attachment--<state>) stays on the
|
|
725
|
+
* preview's host until 2027-01-01, a dated alias for a page that finds or
|
|
726
|
+
* styles a chip by it (aliases.json); its inner parts are the preview's.
|
|
727
|
+
*
|
|
728
|
+
* A progress of 0 (or none known) runs the bar without a share; an error that
|
|
729
|
+
* is not text (true) says «Не загрузился» alone.
|
|
730
|
+
*
|
|
731
|
+
* @param {{id?: string, name: string, bytes: number, href?: string, mime?: string, progress?: number|null, error?: string|boolean|null}} file
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
function renderAttachment(file, {
|
|
735
|
+
removable = false,
|
|
736
|
+
href = "",
|
|
737
|
+
onRemove = null,
|
|
738
|
+
onRetry = null,
|
|
739
|
+
onDownload = null,
|
|
740
|
+
className = ""
|
|
741
|
+
} = {}) {
|
|
742
|
+
const state = attachmentState(file);
|
|
743
|
+
const name = String(file.name ?? "");
|
|
744
|
+
const bytes = file.bytes === null || file.bytes === undefined || file.bytes === "" ? NaN : Number(file.bytes);
|
|
745
|
+
const percent = Math.round(Math.min(1, Math.max(0, Number(file.progress) || 0)) * 100);
|
|
746
|
+
|
|
747
|
+
const stop = handler => event => {
|
|
748
|
+
event.stopPropagation();
|
|
749
|
+
event.preventDefault();
|
|
750
|
+
handler?.(file, event);
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`<sf-file-preview
|
|
754
|
+
class="sf-chat-attachment sf-chat-attachment--${state} ${className}"
|
|
755
|
+
appearance="chip"
|
|
756
|
+
file-name=${name}
|
|
757
|
+
file-size=${Number.isFinite(bytes) && bytes >= 0 ? String(bytes) : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
758
|
+
mime-type=${file.mime || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
759
|
+
href=${href || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
760
|
+
state=${state}
|
|
761
|
+
value=${state === "uploading" && Number(file.progress) > 0 ? String(percent) : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
762
|
+
error-text=${state === "error" && typeof file.error === "string" ? file.error : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
763
|
+
remove-action=${removable ? lit__WEBPACK_IMPORTED_MODULE_0__.nothing : "false"}
|
|
764
|
+
@sf-file-preview-detach=${stop(onRemove)}
|
|
765
|
+
@sf-file-preview-retry=${stop(onRetry)}
|
|
766
|
+
@sf-file-preview-download=${onDownload ? event => {
|
|
767
|
+
event.stopPropagation();
|
|
768
|
+
onDownload(file, event);
|
|
769
|
+
} : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
770
|
+
></sf-file-preview>`;
|
|
771
|
+
}
|
|
772
|
+
__webpack_async_result__();
|
|
773
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
774
|
+
|
|
775
|
+
/***/ },
|
|
776
|
+
|
|
777
|
+
/***/ "4c36dfa55195"
|
|
778
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
779
|
+
|
|
780
|
+
__webpack_require__.r(__webpack_exports__);
|
|
781
|
+
// extracted by mini-css-extract-plugin
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
/***/ },
|
|
785
|
+
|
|
786
|
+
/***/ "5b7d7695b41b"
|
|
787
|
+
(module) {
|
|
788
|
+
|
|
789
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("element-manifest", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("element-manifest", 1).then(resolve, reject), { once: true })));
|
|
790
|
+
|
|
791
|
+
/***/ },
|
|
792
|
+
|
|
793
|
+
/***/ "e92fd2d1a38c"
|
|
794
|
+
(module) {
|
|
795
|
+
|
|
796
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("instance-path", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("instance-path", 1).then(resolve, reject), { once: true })));
|
|
797
|
+
|
|
798
|
+
/***/ },
|
|
799
|
+
|
|
800
|
+
/***/ "efa66f8927d1"
|
|
801
|
+
(module) {
|
|
802
|
+
|
|
803
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("lit/directives/repeat.js", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("lit/directives/repeat.js", 1).then(resolve, reject), { once: true })));
|
|
804
|
+
|
|
805
|
+
/***/ },
|
|
806
|
+
|
|
807
|
+
/***/ "2a080a730149"
|
|
808
|
+
(module) {
|
|
809
|
+
|
|
810
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("lit", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("lit", 1).then(resolve, reject), { once: true })));
|
|
811
|
+
|
|
812
|
+
/***/ },
|
|
813
|
+
|
|
814
|
+
/***/ "43090d1c8307"
|
|
815
|
+
(module) {
|
|
816
|
+
|
|
817
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("page-language", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("page-language", 1).then(resolve, reject), { once: true })));
|
|
818
|
+
|
|
819
|
+
/***/ },
|
|
820
|
+
|
|
821
|
+
/***/ "deb1a4d61565"
|
|
822
|
+
(module) {
|
|
823
|
+
|
|
824
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("smart-base", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("smart-base", 1).then(resolve, reject), { once: true })));
|
|
825
|
+
|
|
826
|
+
/***/ },
|
|
827
|
+
|
|
828
|
+
/***/ "c570a02c474e"
|
|
829
|
+
(module) {
|
|
830
|
+
|
|
831
|
+
module.exports = /*#__PURE__*/JSON.parse('{"$comment":"Dated aliases of sf-chat-composer for the shim (core/js/aliases.js, standard §16 item 20). The 0.3 events of simai/ui-chat follow the vocabulary\'s names; two need the element\'s detail adapters (sfAliasAdapters).","component":"sf-chat-composer","since":"2026-10-28","remove_after":"2026-12-01","aliases":[{"from":"sf-chat-send","to":"sf-chat-composer-submit","kind":"event","component":"sf-chat-composer","since":"2026-10-28","remove_after":"2026-12-01","mode":"split","cancelable":true,"section":"§8, vocabulary 1.1.5 §5, §5.1, §7","note":"the 0.3 detail {text, attachmentIds}: the element\'s adapter (sfAliasAdapters) makes it from {text, attachmentIds}"},{"from":"sf-chat-stop","to":"sf-chat-composer-stop","kind":"event","component":"sf-chat-composer","since":"2026-10-28","remove_after":"2026-12-01","mode":"same-detail","cancelable":true,"section":"§8, vocabulary 1.1.5 §5, §5.1, §7","note":"an event takes its tag and a verb; the chat\'s own stop (vocabulary 1.1.3 §5.1); {} is unchanged"},{"from":"sf-chat-files","to":"sf-chat-composer-attach","kind":"event","component":"sf-chat-composer","since":"2026-10-28","remove_after":"2026-12-01","mode":"same-detail","cancelable":true,"section":"§8, vocabulary 1.1.5 §5, §5.1, §7","note":"vocabulary §5 attach; {files, rejected} is unchanged"},{"from":"sf-chat-action","to":"sf-chat-composer-detach","kind":"event","component":"sf-chat-composer","since":"2026-10-28","remove_after":"2026-12-01","mode":"split","cancelable":true,"section":"§8, vocabulary 1.1.5 §5, §5.1, §7","note":"the 0.3 general action event {action: remove-attachment, id, name}: the element\'s adapter puts action back on {id, name}"},{"from":"sf-chat-attachment","to":null,"kind":"attribute","component":"sf-chat-composer","since":"2026-11-26","remove_after":"2027-01-01","mode":"host-attribute","section":"K-08, SIMAI Framework pair ui-73df5d1b4d4c","note":"the chip\'s former class (the chip is now sf-file-preview): sf-chat-attachment and sf-chat-attachment--<ready|uploading|error> stay on the sf-file-preview host until the date, for a page that finds or styles a chip by it (Mirai24 docs/ui-chat/HANDOFF.md names it); no shim. Its inner parts (__icon, __body, __name, __meta, __link, __progress, __remove) are gone: the parts are sf-file-preview\'s"}]}');
|
|
832
|
+
|
|
833
|
+
/***/ },
|
|
834
|
+
|
|
835
|
+
/***/ "78eece9c0d65"
|
|
836
|
+
(module) {
|
|
837
|
+
|
|
838
|
+
module.exports = /*#__PURE__*/JSON.parse('{"id":"smart.chat-composer","tag":"sf-chat-composer","version":"1.3.0","kind":"leaf","settings":{"placeholder":{"type":"string","default-from":"runtime.placeholder-text"},"maxlength":{"type":"number","default":4000,"integer":true,"min":1},"max-files":{"type":"number","default":5,"integer":true,"min":1},"max-bytes":{"type":"number","default":0,"integer":true,"min":0},"accept":{"type":"string","default":""},"attachments":{"type":"boolean","default":false},"busy":{"type":"boolean","default":false},"queue":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"files":{"type":"list","default":[],"of":{"id":"id","localId":{"type":"id","optional":true},"name":"string","bytes":"number","progress":{"type":"number","nullable":true,"optional":true},"error":{"type":"string","nullable":true,"optional":true}},"entries":{"key":"id","changes":"content"}},"no-stop":{"type":"boolean","default":false}},"values":{"value":{"type":"string","default":""}},"events":{"submit":{"carries":{"text":"string","attachment-ids":"list"},"cancelable":true},"stop":{"carries":{},"cancelable":true},"attach":{"carries":{"files":"list","rejected":{"type":"list","schema":{"items":{"type":"object","required":["file","reason"],"properties":{"file":{"type":"object"},"reason":{"type":"string"}}}}}},"cancelable":true},"detach":{"carries":{"id":"id","name":{"type":"string","optional":true}},"cancelable":true},"retry":{"carries":{"id":"id","name":{"type":"string","optional":true}},"cancelable":false}},"actions":{"set-files":{"with":{"files":{"type":"list","schema":{"items":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"localId":{"type":"string"},"name":{"type":"string"},"bytes":{"type":"number"},"progress":{"type":["number","null"]},"error":{"type":["string","null"]}}}}}}},"clear":{}},"host-states":{},"css-variables":{"--sf-chat-composer-background-color":{"type":"color","state":"default"},"--sf-chat-composer-border-color":{"type":"color","state":"default"},"--sf-chat-composer-hint-color":{"type":"color","state":"default"},"--sf-chat-composer-height":{"type":"length","state":"default"}}}');
|
|
839
|
+
|
|
840
|
+
/***/ },
|
|
841
|
+
|
|
842
|
+
/***/ "018100550391"
|
|
843
|
+
(module) {
|
|
844
|
+
|
|
845
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Chat composer","runtime":{"attach-label":"Attach a file","bad-type-text":"this file type is not supported","busy-files-text":"A message with files can be sent once the answer comes","busy-text":"Wait for the answer or stop waiting","count-text":"{count} of {max}","drop-text":"Drop to attach","field-label":"Message","hint-text":"Enter to send, Shift+Enter for a new line","placeholder-text":"Ask anything","queue-hint-text":"Enter to send after the answer, Shift+Enter for a new line","queue-label":"Send after the answer","send-label":"Send","size-b-text":"{n} B","size-gb-text":"{n} GB","size-kb-text":"{n} KB","size-mb-text":"{n} MB","stop-label":"Stop waiting","too-big-text":"the file is larger than {size}","too-long-text":"The message is longer than {max} characters","too-many-text":{"one":"you can attach only {max} file","other":"you can attach up to {max} files"}}}');
|
|
846
|
+
|
|
847
|
+
/***/ },
|
|
848
|
+
|
|
849
|
+
/***/ "3de0b0ac7d3d"
|
|
850
|
+
(module) {
|
|
851
|
+
|
|
852
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Поле вопроса чата","runtime":{"attach-label":"Прикрепить файл","bad-type-text":"этот тип файла не поддерживается","busy-files-text":"Сообщение с файлами можно отправить, когда придёт ответ","busy-text":"Дождитесь ответа или остановите ожидание","count-text":"{count} из {max}","drop-text":"Отпустите, чтобы прикрепить","field-label":"Сообщение","hint-text":"Enter — отправить, Shift+Enter — новая строка","placeholder-text":"Спросите что-нибудь","queue-hint-text":"Enter — отправить после ответа, Shift+Enter — новая строка","queue-label":"Отправить после ответа","send-label":"Отправить","size-b-text":"{n} Б","size-gb-text":"{n} ГБ","size-kb-text":"{n} КБ","size-mb-text":"{n} МБ","stop-label":"Остановить ожидание","too-big-text":"файл больше {size}","too-long-text":"Сообщение длиннее {max} знаков","too-many-text":{"one":"можно прикрепить не больше {max} файла","other":"можно прикрепить не больше {max} файлов"}}}');
|
|
853
|
+
|
|
854
|
+
/***/ }
|
|
855
|
+
|
|
856
|
+
/******/ });
|
|
857
|
+
/************************************************************************/
|
|
858
|
+
/******/ // The module cache
|
|
859
|
+
/******/ const __webpack_module_cache__ = {};
|
|
860
|
+
/******/
|
|
861
|
+
/******/ // The require function
|
|
862
|
+
/******/ function __webpack_require__(moduleId) {
|
|
863
|
+
/******/ // Check if module is in cache
|
|
864
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
865
|
+
/******/ if (cachedModule !== undefined) {
|
|
866
|
+
/******/ return cachedModule.exports;
|
|
867
|
+
/******/ }
|
|
868
|
+
/******/ // Create a new module (and put it into the cache)
|
|
869
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
870
|
+
/******/ // no module.id needed
|
|
871
|
+
/******/ // no module.loaded needed
|
|
872
|
+
/******/ exports: {}
|
|
873
|
+
/******/ };
|
|
874
|
+
/******/
|
|
875
|
+
/******/ // Execute the module function
|
|
876
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
877
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
878
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
879
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
880
|
+
/******/ throw e;
|
|
881
|
+
/******/ }
|
|
882
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
883
|
+
/******/
|
|
884
|
+
/******/ // Return the exports of the module
|
|
885
|
+
/******/ return module.exports;
|
|
886
|
+
/******/ }
|
|
887
|
+
/******/
|
|
888
|
+
/************************************************************************/
|
|
889
|
+
/******/ /* webpack/runtime/async module */
|
|
890
|
+
/******/ (() => {
|
|
891
|
+
/******/ const hasSymbol = typeof Symbol === "function";
|
|
892
|
+
/******/ const webpackQueues = hasSymbol ? Symbol("webpack queues") : "__webpack_queues__";
|
|
893
|
+
/******/ const webpackExports = hasSymbol ? Symbol("webpack exports") : "__webpack_exports__";
|
|
894
|
+
/******/ const webpackError = hasSymbol ? Symbol("webpack error") : "__webpack_error__";
|
|
895
|
+
/******/
|
|
896
|
+
/******/ const resolveQueue = (queue) => {
|
|
897
|
+
/******/ if(queue?.d < 1) {
|
|
898
|
+
/******/ queue.d = 1;
|
|
899
|
+
/******/ queue.forEach((fn) => (fn.r--));
|
|
900
|
+
/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
|
|
901
|
+
/******/ }
|
|
902
|
+
/******/ }
|
|
903
|
+
/******/ const wrapDeps = (deps) => (deps.map((dep) => {
|
|
904
|
+
/******/ if(dep !== null && typeof dep === "object") {
|
|
905
|
+
/******/
|
|
906
|
+
/******/ if(dep[webpackQueues]) return dep;
|
|
907
|
+
/******/ if(dep.then) {
|
|
908
|
+
/******/ const queue = [];
|
|
909
|
+
/******/ queue.d = 0;
|
|
910
|
+
/******/ dep.then((r) => {
|
|
911
|
+
/******/ obj[webpackExports] = r;
|
|
912
|
+
/******/ resolveQueue(queue);
|
|
913
|
+
/******/ }, (e) => {
|
|
914
|
+
/******/ obj[webpackError] = e;
|
|
915
|
+
/******/ resolveQueue(queue);
|
|
916
|
+
/******/ });
|
|
917
|
+
/******/ const obj = {};
|
|
918
|
+
/******/
|
|
919
|
+
/******/ obj[webpackQueues] = (fn) => (fn(queue));
|
|
920
|
+
/******/ return obj;
|
|
921
|
+
/******/ }
|
|
922
|
+
/******/ }
|
|
923
|
+
/******/ const ret = {};
|
|
924
|
+
/******/ ret[webpackQueues] = x => {};
|
|
925
|
+
/******/ ret[webpackExports] = dep;
|
|
926
|
+
/******/ return ret;
|
|
927
|
+
/******/ }));
|
|
928
|
+
/******/ __webpack_require__.a = (module, body, hasAwait) => {
|
|
929
|
+
/******/ let queue;
|
|
930
|
+
/******/ hasAwait && ((queue = []).d = -1);
|
|
931
|
+
/******/ const depQueues = new Set();
|
|
932
|
+
/******/ const exports = module.exports;
|
|
933
|
+
/******/ let currentDeps;
|
|
934
|
+
/******/ let outerResolve;
|
|
935
|
+
/******/ let reject;
|
|
936
|
+
/******/ const promise = new Promise((resolve, rej) => {
|
|
937
|
+
/******/ reject = rej;
|
|
938
|
+
/******/ outerResolve = resolve;
|
|
939
|
+
/******/ });
|
|
940
|
+
/******/ promise[webpackExports] = exports;
|
|
941
|
+
/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
|
|
942
|
+
/******/ module.exports = promise;
|
|
943
|
+
/******/ const handle = (deps) => {
|
|
944
|
+
/******/ currentDeps = wrapDeps(deps);
|
|
945
|
+
/******/ let fn;
|
|
946
|
+
/******/ const getResult = () => (currentDeps.map((d) => {
|
|
947
|
+
/******/
|
|
948
|
+
/******/ if(d[webpackError]) throw d[webpackError];
|
|
949
|
+
/******/ return d[webpackExports];
|
|
950
|
+
/******/ }))
|
|
951
|
+
/******/ const promise = new Promise((resolve) => {
|
|
952
|
+
/******/ fn = () => (resolve(getResult));
|
|
953
|
+
/******/ fn.r = 0;
|
|
954
|
+
/******/ const fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
|
|
955
|
+
/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
|
|
956
|
+
/******/ });
|
|
957
|
+
/******/ return fn.r ? promise : getResult();
|
|
958
|
+
/******/ }
|
|
959
|
+
/******/ const done = (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))
|
|
960
|
+
/******/ body(handle, done);
|
|
961
|
+
/******/ queue?.d < 0 && (queue.d = 0);
|
|
962
|
+
/******/ };
|
|
963
|
+
/******/ })();
|
|
964
|
+
/******/
|
|
965
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
966
|
+
/******/ (() => {
|
|
967
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
968
|
+
/******/ __webpack_require__.n = (module) => {
|
|
969
|
+
/******/ const getter = module && module.__esModule ?
|
|
970
|
+
/******/ () => (module['default']) :
|
|
971
|
+
/******/ () => (module);
|
|
972
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
973
|
+
/******/ return getter;
|
|
974
|
+
/******/ };
|
|
975
|
+
/******/ })();
|
|
976
|
+
/******/
|
|
977
|
+
/******/ /* webpack/runtime/define property getters */
|
|
978
|
+
/******/ (() => {
|
|
979
|
+
/******/ // define getter/value functions for harmony exports
|
|
980
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
981
|
+
/******/ if(Array.isArray(definition)) {
|
|
982
|
+
/******/ var i = 0;
|
|
983
|
+
/******/ while(i < definition.length) {
|
|
984
|
+
/******/ var key = definition[i++];
|
|
985
|
+
/******/ var binding = definition[i++];
|
|
986
|
+
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
987
|
+
/******/ if(binding === 0) {
|
|
988
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
989
|
+
/******/ } else {
|
|
990
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
991
|
+
/******/ }
|
|
992
|
+
/******/ } else if(binding === 0) { i++; }
|
|
993
|
+
/******/ }
|
|
994
|
+
/******/ } else {
|
|
995
|
+
/******/ for(var key in definition) {
|
|
996
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
997
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
998
|
+
/******/ }
|
|
999
|
+
/******/ }
|
|
1000
|
+
/******/ }
|
|
1001
|
+
/******/ };
|
|
1002
|
+
/******/ })();
|
|
1003
|
+
/******/
|
|
1004
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1005
|
+
/******/ (() => {
|
|
1006
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1007
|
+
/******/ })();
|
|
1008
|
+
/******/
|
|
1009
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
1010
|
+
/******/ (() => {
|
|
1011
|
+
/******/ // define __esModule on exports
|
|
1012
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
1013
|
+
/******/ if(Symbol.toStringTag) {
|
|
1014
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1015
|
+
/******/ }
|
|
1016
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
1017
|
+
/******/ };
|
|
1018
|
+
/******/ })();
|
|
1019
|
+
/******/
|
|
1020
|
+
/************************************************************************/
|
|
1021
|
+
/******/
|
|
1022
|
+
/******/ // startup
|
|
1023
|
+
/******/ // Load entry module and return exports
|
|
1024
|
+
/******/ // This entry module used 'module' so it can't be inlined
|
|
1025
|
+
/******/ let __webpack_exports__ = __webpack_require__("e849f0d25e58");
|
|
1026
|
+
/******/
|
|
1027
|
+
/******/ })()
|
|
1028
|
+
;
|