@uipath/apollo-react 3.27.0 → 3.28.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/dist/material/components/ap-chat/components/input/chat-input-editor.cjs +13 -6
- package/dist/material/components/ap-chat/components/input/chat-input-editor.d.ts +0 -1
- package/dist/material/components/ap-chat/components/input/chat-input-editor.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input-editor.js +14 -7
- package/dist/material/components/ap-chat/components/input/chat-input-resource-picker.cjs +236 -193
- package/dist/material/components/ap-chat/components/input/chat-input-resource-picker.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input-resource-picker.js +238 -195
- package/dist/material/components/ap-chat/components/input/chat-input.cjs +1 -2
- package/dist/material/components/ap-chat/components/input/chat-input.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/chat-input.js +1 -2
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.cjs +12 -3
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.js +13 -4
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.cjs +25 -3
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.d.ts +1 -0
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.js +26 -4
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.cjs +2 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.js +2 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.cjs +24 -14
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.d.ts +5 -2
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.js +21 -14
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.cjs +25 -0
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.d.ts +5 -0
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.js +23 -1
- package/dist/material/components/ap-chat/components/message/chat-message.cjs +2 -0
- package/dist/material/components/ap-chat/components/message/chat-message.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/chat-message.js +2 -0
- package/dist/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.cjs +11 -2
- package/dist/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.d.ts +1 -0
- package/dist/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.d.ts.map +1 -1
- package/dist/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.js +7 -1
- package/dist/material/components/ap-chat/hooks/use-resource-picker-state.cjs +13 -4
- package/dist/material/components/ap-chat/hooks/use-resource-picker-state.d.ts.map +1 -1
- package/dist/material/components/ap-chat/hooks/use-resource-picker-state.js +13 -4
- package/dist/material/components/ap-chat/providers/resource-picker-provider.cjs +54 -19
- package/dist/material/components/ap-chat/providers/resource-picker-provider.d.ts +4 -1
- package/dist/material/components/ap-chat/providers/resource-picker-provider.d.ts.map +1 -1
- package/dist/material/components/ap-chat/providers/resource-picker-provider.js +55 -20
- package/dist/material/components/ap-chat/service/ChatConstants.cjs +16 -4
- package/dist/material/components/ap-chat/service/ChatConstants.d.ts +4 -1
- package/dist/material/components/ap-chat/service/ChatConstants.d.ts.map +1 -1
- package/dist/material/components/ap-chat/service/ChatConstants.js +5 -2
- package/package.json +2 -1
|
@@ -49,6 +49,7 @@ var extension_text_default = /*#__PURE__*/ __webpack_require__.n(extension_text_
|
|
|
49
49
|
const extensions_namespaceObject = require("@tiptap/extensions");
|
|
50
50
|
const model_namespaceObject = require("@tiptap/pm/model");
|
|
51
51
|
const react_namespaceObject = require("@tiptap/react");
|
|
52
|
+
const suggestion_namespaceObject = require("@tiptap/suggestion");
|
|
52
53
|
const external_react_namespaceObject = require("react");
|
|
53
54
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
54
55
|
const external_resource_chip_node_view_cjs_namespaceObject = require("./resource-chip-node-view.cjs");
|
|
@@ -87,6 +88,7 @@ function TipTapEditorInner(props, ref) {
|
|
|
87
88
|
onMentionQueryChange
|
|
88
89
|
});
|
|
89
90
|
const mentionRangeRef = external_react_default().useRef(null);
|
|
91
|
+
const suppressSuggestionRef = external_react_default().useRef(false);
|
|
90
92
|
external_react_default().useLayoutEffect(()=>{
|
|
91
93
|
callbacksRef.current = {
|
|
92
94
|
onChange,
|
|
@@ -115,7 +117,7 @@ function TipTapEditorInner(props, ref) {
|
|
|
115
117
|
mentionRangeRef.current = range;
|
|
116
118
|
callbacksRef.current.onMentionQueryChange?.(query, range);
|
|
117
119
|
}
|
|
118
|
-
}), []);
|
|
120
|
+
}, suppressSuggestionRef), []);
|
|
119
121
|
const extensions = external_react_default().useMemo(()=>[
|
|
120
122
|
extension_document_default(),
|
|
121
123
|
extension_paragraph_default(),
|
|
@@ -153,6 +155,16 @@ function TipTapEditorInner(props, ref) {
|
|
|
153
155
|
},
|
|
154
156
|
editorProps: {
|
|
155
157
|
handleKeyDown: (_view, event)=>callbacksRef.current.onKeyDown?.(event) ?? false,
|
|
158
|
+
handleDOMEvents: {
|
|
159
|
+
mousedown: ()=>{
|
|
160
|
+
suppressSuggestionRef.current = false;
|
|
161
|
+
return false;
|
|
162
|
+
},
|
|
163
|
+
keydown: ()=>{
|
|
164
|
+
suppressSuggestionRef.current = false;
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
156
168
|
attributes: {
|
|
157
169
|
'data-testid': 'tiptap-editor'
|
|
158
170
|
},
|
|
@@ -249,24 +261,34 @@ function TipTapEditorInner(props, ref) {
|
|
|
249
261
|
]);
|
|
250
262
|
const triggerMention = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
251
263
|
if (!editor) return;
|
|
264
|
+
suppressSuggestionRef.current = false;
|
|
252
265
|
editor.chain().focus().insertContent('@').run();
|
|
253
266
|
}, [
|
|
254
267
|
editor
|
|
255
268
|
]);
|
|
269
|
+
const exitMention = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
270
|
+
if (!editor) return;
|
|
271
|
+
suppressSuggestionRef.current = true;
|
|
272
|
+
(0, suggestion_namespaceObject.exitSuggestion)(editor.view, external_tiptap_resource_suggestion_cjs_namespaceObject.ResourceMentionPluginKey);
|
|
273
|
+
}, [
|
|
274
|
+
editor
|
|
275
|
+
]);
|
|
256
276
|
external_react_default().useImperativeHandle(ref, ()=>({
|
|
257
277
|
focus,
|
|
258
278
|
insertResource,
|
|
259
279
|
getSerializedContent,
|
|
260
280
|
clear,
|
|
261
281
|
clearMentionQuery,
|
|
262
|
-
triggerMention
|
|
282
|
+
triggerMention,
|
|
283
|
+
exitMention
|
|
263
284
|
}), [
|
|
264
285
|
focus,
|
|
265
286
|
insertResource,
|
|
266
287
|
getSerializedContent,
|
|
267
288
|
clear,
|
|
268
289
|
clearMentionQuery,
|
|
269
|
-
triggerMention
|
|
290
|
+
triggerMention,
|
|
291
|
+
exitMention
|
|
270
292
|
]);
|
|
271
293
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tiptap_editor_styles_cjs_namespaceObject.EditorContainer, {
|
|
272
294
|
minRows: minRows,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-editor.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"tiptap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AU,CAAC,EAAE,MAAM,CAAC;CACrB;AAiQD,eAAO,MAAM,YAAY,yFAA4C,CAAC"}
|
|
@@ -7,11 +7,12 @@ import extension_text from "@tiptap/extension-text";
|
|
|
7
7
|
import { Placeholder, UndoRedo } from "@tiptap/extensions";
|
|
8
8
|
import { Fragment, Node, Slice } from "@tiptap/pm/model";
|
|
9
9
|
import { EditorContent, ReactNodeViewRenderer, useEditor } from "@tiptap/react";
|
|
10
|
+
import { exitSuggestion } from "@tiptap/suggestion";
|
|
10
11
|
import react, { forwardRef, useCallback } from "react";
|
|
11
12
|
import { ResourceChipNodeView } from "./resource-chip-node-view.js";
|
|
12
13
|
import { textToDocument } from "./tiptap.utils.js";
|
|
13
14
|
import { EditorContainer } from "./tiptap-editor.styles.js";
|
|
14
|
-
import { createResourceSuggestion } from "./tiptap-resource-suggestion.js";
|
|
15
|
+
import { ResourceMentionPluginKey, createResourceSuggestion } from "./tiptap-resource-suggestion.js";
|
|
15
16
|
const ResourceMention = extension_mention.extend({
|
|
16
17
|
addAttributes () {
|
|
17
18
|
return {
|
|
@@ -44,6 +45,7 @@ function TipTapEditorInner(props, ref) {
|
|
|
44
45
|
onMentionQueryChange
|
|
45
46
|
});
|
|
46
47
|
const mentionRangeRef = react.useRef(null);
|
|
48
|
+
const suppressSuggestionRef = react.useRef(false);
|
|
47
49
|
react.useLayoutEffect(()=>{
|
|
48
50
|
callbacksRef.current = {
|
|
49
51
|
onChange,
|
|
@@ -72,7 +74,7 @@ function TipTapEditorInner(props, ref) {
|
|
|
72
74
|
mentionRangeRef.current = range;
|
|
73
75
|
callbacksRef.current.onMentionQueryChange?.(query, range);
|
|
74
76
|
}
|
|
75
|
-
}), []);
|
|
77
|
+
}, suppressSuggestionRef), []);
|
|
76
78
|
const extensions = react.useMemo(()=>[
|
|
77
79
|
extension_document,
|
|
78
80
|
extension_paragraph,
|
|
@@ -110,6 +112,16 @@ function TipTapEditorInner(props, ref) {
|
|
|
110
112
|
},
|
|
111
113
|
editorProps: {
|
|
112
114
|
handleKeyDown: (_view, event)=>callbacksRef.current.onKeyDown?.(event) ?? false,
|
|
115
|
+
handleDOMEvents: {
|
|
116
|
+
mousedown: ()=>{
|
|
117
|
+
suppressSuggestionRef.current = false;
|
|
118
|
+
return false;
|
|
119
|
+
},
|
|
120
|
+
keydown: ()=>{
|
|
121
|
+
suppressSuggestionRef.current = false;
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
},
|
|
113
125
|
attributes: {
|
|
114
126
|
'data-testid': 'tiptap-editor'
|
|
115
127
|
},
|
|
@@ -206,24 +218,34 @@ function TipTapEditorInner(props, ref) {
|
|
|
206
218
|
]);
|
|
207
219
|
const triggerMention = useCallback(()=>{
|
|
208
220
|
if (!editor) return;
|
|
221
|
+
suppressSuggestionRef.current = false;
|
|
209
222
|
editor.chain().focus().insertContent('@').run();
|
|
210
223
|
}, [
|
|
211
224
|
editor
|
|
212
225
|
]);
|
|
226
|
+
const exitMention = useCallback(()=>{
|
|
227
|
+
if (!editor) return;
|
|
228
|
+
suppressSuggestionRef.current = true;
|
|
229
|
+
exitSuggestion(editor.view, ResourceMentionPluginKey);
|
|
230
|
+
}, [
|
|
231
|
+
editor
|
|
232
|
+
]);
|
|
213
233
|
react.useImperativeHandle(ref, ()=>({
|
|
214
234
|
focus,
|
|
215
235
|
insertResource,
|
|
216
236
|
getSerializedContent,
|
|
217
237
|
clear,
|
|
218
238
|
clearMentionQuery,
|
|
219
|
-
triggerMention
|
|
239
|
+
triggerMention,
|
|
240
|
+
exitMention
|
|
220
241
|
}), [
|
|
221
242
|
focus,
|
|
222
243
|
insertResource,
|
|
223
244
|
getSerializedContent,
|
|
224
245
|
clear,
|
|
225
246
|
clearMentionQuery,
|
|
226
|
-
triggerMention
|
|
247
|
+
triggerMention,
|
|
248
|
+
exitMention
|
|
227
249
|
]);
|
|
228
250
|
return /*#__PURE__*/ jsx(EditorContainer, {
|
|
229
251
|
minRows: minRows,
|
|
@@ -51,7 +51,8 @@ const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ theme, minR
|
|
|
51
51
|
paddingBottom: EDITOR_PADDING,
|
|
52
52
|
'& p': {
|
|
53
53
|
margin: 0,
|
|
54
|
-
minHeight: lineHeight
|
|
54
|
+
minHeight: lineHeight,
|
|
55
|
+
lineHeight: lineHeight
|
|
55
56
|
},
|
|
56
57
|
'& p.is-editor-empty:first-of-type::before': {
|
|
57
58
|
content: 'attr(data-placeholder)',
|
package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;
|
|
1
|
+
{"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;yGA2BjB,CAAC"}
|
|
@@ -13,7 +13,8 @@ const EditorContainer = styled('div')(({ theme, minRows, maxRows, lineHeight })=
|
|
|
13
13
|
paddingBottom: EDITOR_PADDING,
|
|
14
14
|
'& p': {
|
|
15
15
|
margin: 0,
|
|
16
|
-
minHeight: lineHeight
|
|
16
|
+
minHeight: lineHeight,
|
|
17
|
+
lineHeight: lineHeight
|
|
17
18
|
},
|
|
18
19
|
'& p.is-editor-empty:first-of-type::before': {
|
|
19
20
|
content: 'attr(data-placeholder)',
|
package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.cjs
CHANGED
|
@@ -24,8 +24,14 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
createResourceSuggestion: ()=>createResourceSuggestion
|
|
27
|
+
createResourceSuggestion: ()=>createResourceSuggestion,
|
|
28
|
+
ResourceMentionPluginKey: ()=>ResourceMentionPluginKey
|
|
28
29
|
});
|
|
30
|
+
const state_namespaceObject = require("@tiptap/pm/state");
|
|
31
|
+
const index_cjs_namespaceObject = require("../../../service/index.cjs");
|
|
32
|
+
const external_tiptap_utils_cjs_namespaceObject = require("./tiptap.utils.cjs");
|
|
33
|
+
const ResourceMentionPluginKey = new state_namespaceObject.PluginKey('resourceMention');
|
|
34
|
+
const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
|
|
29
35
|
function getCursorCoordinates(editor, pos) {
|
|
30
36
|
const coords = editor.view.coordsAtPos(pos);
|
|
31
37
|
return {
|
|
@@ -33,41 +39,45 @@ function getCursorCoordinates(editor, pos) {
|
|
|
33
39
|
left: coords.left
|
|
34
40
|
};
|
|
35
41
|
}
|
|
36
|
-
function createResourceSuggestion(callbacks) {
|
|
37
|
-
let isActive = false;
|
|
42
|
+
function createResourceSuggestion(callbacks, suppressRef) {
|
|
38
43
|
return {
|
|
44
|
+
pluginKey: ResourceMentionPluginKey,
|
|
39
45
|
allowSpaces: true,
|
|
40
46
|
allow: ({ state, range })=>{
|
|
47
|
+
if (suppressRef.current) return false;
|
|
41
48
|
const textFrom = range.from + 1;
|
|
42
49
|
const textTo = range.to;
|
|
43
50
|
const query = textFrom < textTo ? state.doc.textBetween(textFrom, textTo) : '';
|
|
44
|
-
if (query.
|
|
51
|
+
if (query.length > 0 && !RESOURCE_QUERY_START_PATTERN.test(query.charAt(0))) return false;
|
|
52
|
+
if (query.includes(index_cjs_namespaceObject.CHAT_RESOURCE_MENTION_TERMINATOR)) return false;
|
|
53
|
+
if (0 === query.length && textFrom < state.doc.resolve(textFrom).end()) {
|
|
54
|
+
const nextChar = state.doc.textBetween(textFrom, textFrom + 1, '', '');
|
|
55
|
+
const isSpecialChar = nextChar.length > 0 && ' ' !== nextChar && !RESOURCE_QUERY_START_PATTERN.test(nextChar);
|
|
56
|
+
if (isSpecialChar) return false;
|
|
57
|
+
}
|
|
45
58
|
return true;
|
|
46
59
|
},
|
|
47
|
-
items: ()=>[],
|
|
48
60
|
render: ()=>({
|
|
49
61
|
onStart: (props)=>{
|
|
50
|
-
isActive = true;
|
|
51
62
|
const coords = getCursorCoordinates(props.editor, props.range.from);
|
|
52
|
-
|
|
53
|
-
callbacks.
|
|
63
|
+
const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
|
|
64
|
+
callbacks.onStart?.(fullRange, coords);
|
|
65
|
+
callbacks.onQueryChange?.(query, fullRange);
|
|
54
66
|
},
|
|
55
67
|
onUpdate: (props)=>{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onKeyDown: (props)=>{
|
|
59
|
-
if (!isActive) return false;
|
|
60
|
-
return callbacks.onKeyDown?.(props.event) ?? false;
|
|
68
|
+
const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
|
|
69
|
+
callbacks.onQueryChange?.(query, fullRange);
|
|
61
70
|
},
|
|
62
71
|
onExit: ()=>{
|
|
63
|
-
isActive = false;
|
|
64
72
|
callbacks.onExit?.();
|
|
65
73
|
}
|
|
66
74
|
})
|
|
67
75
|
};
|
|
68
76
|
}
|
|
77
|
+
exports.ResourceMentionPluginKey = __webpack_exports__.ResourceMentionPluginKey;
|
|
69
78
|
exports.createResourceSuggestion = __webpack_exports__.createResourceSuggestion;
|
|
70
79
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
80
|
+
"ResourceMentionPluginKey",
|
|
71
81
|
"createResourceSuggestion"
|
|
72
82
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
73
83
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Range } from '@tiptap/core';
|
|
2
2
|
import type { MentionOptions } from '@tiptap/extension-mention';
|
|
3
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
4
|
+
export declare const ResourceMentionPluginKey: PluginKey<any>;
|
|
3
5
|
export interface CursorCoordinates {
|
|
4
6
|
top: number;
|
|
5
7
|
left: number;
|
|
@@ -8,8 +10,9 @@ interface ResourceSuggestionCallbacks {
|
|
|
8
10
|
onStart?: (range: Range, coords: CursorCoordinates) => void;
|
|
9
11
|
onExit?: () => void;
|
|
10
12
|
onQueryChange?: (query: string, range: Range) => void;
|
|
11
|
-
onKeyDown?: (event: KeyboardEvent) => boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare function createResourceSuggestion(callbacks: ResourceSuggestionCallbacks
|
|
14
|
+
export declare function createResourceSuggestion(callbacks: ResourceSuggestionCallbacks, suppressRef: {
|
|
15
|
+
current: boolean;
|
|
16
|
+
}): MentionOptions['suggestion'];
|
|
14
17
|
export {};
|
|
15
18
|
//# sourceMappingURL=tiptap-resource-suggestion.d.ts.map
|
package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,eAAO,MAAM,wBAAwB,gBAAmC,CAAC;AAKzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAUD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,EACtC,WAAW,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,cAAc,CAAC,YAAY,CAAC,CAmD9B"}
|
package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { PluginKey } from "@tiptap/pm/state";
|
|
2
|
+
import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
|
|
3
|
+
import { getFullMentionQuery } from "./tiptap.utils.js";
|
|
4
|
+
const ResourceMentionPluginKey = new PluginKey('resourceMention');
|
|
5
|
+
const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
|
|
1
6
|
function getCursorCoordinates(editor, pos) {
|
|
2
7
|
const coords = editor.view.coordsAtPos(pos);
|
|
3
8
|
return {
|
|
@@ -5,37 +10,39 @@ function getCursorCoordinates(editor, pos) {
|
|
|
5
10
|
left: coords.left
|
|
6
11
|
};
|
|
7
12
|
}
|
|
8
|
-
function createResourceSuggestion(callbacks) {
|
|
9
|
-
let isActive = false;
|
|
13
|
+
function createResourceSuggestion(callbacks, suppressRef) {
|
|
10
14
|
return {
|
|
15
|
+
pluginKey: ResourceMentionPluginKey,
|
|
11
16
|
allowSpaces: true,
|
|
12
17
|
allow: ({ state, range })=>{
|
|
18
|
+
if (suppressRef.current) return false;
|
|
13
19
|
const textFrom = range.from + 1;
|
|
14
20
|
const textTo = range.to;
|
|
15
21
|
const query = textFrom < textTo ? state.doc.textBetween(textFrom, textTo) : '';
|
|
16
|
-
if (query.
|
|
22
|
+
if (query.length > 0 && !RESOURCE_QUERY_START_PATTERN.test(query.charAt(0))) return false;
|
|
23
|
+
if (query.includes(CHAT_RESOURCE_MENTION_TERMINATOR)) return false;
|
|
24
|
+
if (0 === query.length && textFrom < state.doc.resolve(textFrom).end()) {
|
|
25
|
+
const nextChar = state.doc.textBetween(textFrom, textFrom + 1, '', '');
|
|
26
|
+
const isSpecialChar = nextChar.length > 0 && ' ' !== nextChar && !RESOURCE_QUERY_START_PATTERN.test(nextChar);
|
|
27
|
+
if (isSpecialChar) return false;
|
|
28
|
+
}
|
|
17
29
|
return true;
|
|
18
30
|
},
|
|
19
|
-
items: ()=>[],
|
|
20
31
|
render: ()=>({
|
|
21
32
|
onStart: (props)=>{
|
|
22
|
-
isActive = true;
|
|
23
33
|
const coords = getCursorCoordinates(props.editor, props.range.from);
|
|
24
|
-
|
|
25
|
-
callbacks.
|
|
34
|
+
const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
|
|
35
|
+
callbacks.onStart?.(fullRange, coords);
|
|
36
|
+
callbacks.onQueryChange?.(query, fullRange);
|
|
26
37
|
},
|
|
27
38
|
onUpdate: (props)=>{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onKeyDown: (props)=>{
|
|
31
|
-
if (!isActive) return false;
|
|
32
|
-
return callbacks.onKeyDown?.(props.event) ?? false;
|
|
39
|
+
const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
|
|
40
|
+
callbacks.onQueryChange?.(query, fullRange);
|
|
33
41
|
},
|
|
34
42
|
onExit: ()=>{
|
|
35
|
-
isActive = false;
|
|
36
43
|
callbacks.onExit?.();
|
|
37
44
|
}
|
|
38
45
|
})
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
|
-
export { createResourceSuggestion };
|
|
48
|
+
export { ResourceMentionPluginKey, createResourceSuggestion };
|
|
@@ -24,8 +24,31 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getFullMentionQuery: ()=>getFullMentionQuery,
|
|
27
28
|
textToDocument: ()=>textToDocument
|
|
28
29
|
});
|
|
30
|
+
const index_cjs_namespaceObject = require("../../../service/index.cjs");
|
|
31
|
+
function getFullMentionQuery(editor, range) {
|
|
32
|
+
const textFrom = range.from + 1;
|
|
33
|
+
const parentEnd = editor.state.doc.resolve(textFrom).end();
|
|
34
|
+
if (textFrom >= parentEnd) return {
|
|
35
|
+
query: '',
|
|
36
|
+
fullRange: range
|
|
37
|
+
};
|
|
38
|
+
const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
|
|
39
|
+
if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
|
|
40
|
+
query: '',
|
|
41
|
+
fullRange: range
|
|
42
|
+
};
|
|
43
|
+
const query = fullText.split(index_cjs_namespaceObject.CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
|
|
44
|
+
return {
|
|
45
|
+
query,
|
|
46
|
+
fullRange: {
|
|
47
|
+
from: range.from,
|
|
48
|
+
to: textFrom + query.length
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
29
52
|
function textToDocument(text) {
|
|
30
53
|
if (!text) return {
|
|
31
54
|
type: 'doc',
|
|
@@ -48,8 +71,10 @@ function textToDocument(text) {
|
|
|
48
71
|
content: paragraphs
|
|
49
72
|
};
|
|
50
73
|
}
|
|
74
|
+
exports.getFullMentionQuery = __webpack_exports__.getFullMentionQuery;
|
|
51
75
|
exports.textToDocument = __webpack_exports__.textToDocument;
|
|
52
76
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
77
|
+
"getFullMentionQuery",
|
|
53
78
|
"textToDocument"
|
|
54
79
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
55
80
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AASlD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,CAiBrC;AAOD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF,CAaA"}
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
|
|
2
|
+
function getFullMentionQuery(editor, range) {
|
|
3
|
+
const textFrom = range.from + 1;
|
|
4
|
+
const parentEnd = editor.state.doc.resolve(textFrom).end();
|
|
5
|
+
if (textFrom >= parentEnd) return {
|
|
6
|
+
query: '',
|
|
7
|
+
fullRange: range
|
|
8
|
+
};
|
|
9
|
+
const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
|
|
10
|
+
if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
|
|
11
|
+
query: '',
|
|
12
|
+
fullRange: range
|
|
13
|
+
};
|
|
14
|
+
const query = fullText.split(CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
|
|
15
|
+
return {
|
|
16
|
+
query,
|
|
17
|
+
fullRange: {
|
|
18
|
+
from: range.from,
|
|
19
|
+
to: textFrom + query.length
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
1
23
|
function textToDocument(text) {
|
|
2
24
|
if (!text) return {
|
|
3
25
|
type: 'doc',
|
|
@@ -20,4 +42,4 @@ function textToDocument(text) {
|
|
|
20
42
|
content: paragraphs
|
|
21
43
|
};
|
|
22
44
|
}
|
|
23
|
-
export { textToDocument };
|
|
45
|
+
export { getFullMentionQuery, textToDocument };
|
|
@@ -50,6 +50,7 @@ const external_chat_message_content_cjs_namespaceObject = require("./chat-messag
|
|
|
50
50
|
const chat_fre_cjs_namespaceObject = require("./first-run-experience/chat-fre.cjs");
|
|
51
51
|
const chat_loading_cjs_namespaceObject = require("./loader/chat-loading.cjs");
|
|
52
52
|
const chat_loading_messages_cjs_namespaceObject = require("./loader/chat-loading-messages.cjs");
|
|
53
|
+
const resource_token_parser_cjs_namespaceObject = require("./markdown/parsers/resource-token-parser.cjs");
|
|
53
54
|
const chat_suggestions_cjs_namespaceObject = require("./suggestions/chat-suggestions.cjs");
|
|
54
55
|
const MessageContainer = (0, material_namespaceObject.styled)('div')(({ isOverflow, isContainerWide, gap })=>({
|
|
55
56
|
display: 'flex',
|
|
@@ -128,6 +129,7 @@ function AutopilotChatMessagesComponent({ isOverflow, isContainerWide }) {
|
|
|
128
129
|
const onCopy = external_react_default().useCallback(({ group, message })=>{
|
|
129
130
|
let finalString = '';
|
|
130
131
|
finalString = 0 === group.length ? message.toCopy ?? message.content : group.map((msg)=>msg.toCopy ?? msg.content).join('\n');
|
|
132
|
+
finalString = (0, resource_token_parser_cjs_namespaceObject.stripResourceTokens)(finalString);
|
|
131
133
|
if (navigator.clipboard && finalString) navigator.clipboard.writeText(finalString).catch(()=>{});
|
|
132
134
|
}, []);
|
|
133
135
|
external_react_default().useEffect(()=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/message/chat-message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../../../../src/material/components/ap-chat/components/message/chat-message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAgGvC,iBAAS,8BAA8B,CAAC,EACtC,UAAU,EACV,eAAe,GAChB,EAAE;IACD,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;CAC1B,2CA2JA;AAED,eAAO,MAAM,qBAAqB,kEAA6C,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { AutopilotChatMessageContent } from "./chat-message-content.js";
|
|
|
11
11
|
import { AutopilotChatFRE } from "./first-run-experience/chat-fre.js";
|
|
12
12
|
import { AutopilotChatLoading } from "./loader/chat-loading.js";
|
|
13
13
|
import { AutopilotChatLoadingMessages } from "./loader/chat-loading-messages.js";
|
|
14
|
+
import { stripResourceTokens } from "./markdown/parsers/resource-token-parser.js";
|
|
14
15
|
import { AutopilotChatSuggestions } from "./suggestions/chat-suggestions.js";
|
|
15
16
|
const MessageContainer = styled('div')(({ isOverflow, isContainerWide, gap })=>({
|
|
16
17
|
display: 'flex',
|
|
@@ -89,6 +90,7 @@ function AutopilotChatMessagesComponent({ isOverflow, isContainerWide }) {
|
|
|
89
90
|
const onCopy = react.useCallback(({ group, message })=>{
|
|
90
91
|
let finalString = '';
|
|
91
92
|
finalString = 0 === group.length ? message.toCopy ?? message.content : group.map((msg)=>msg.toCopy ?? msg.content).join('\n');
|
|
93
|
+
finalString = stripResourceTokens(finalString);
|
|
92
94
|
if (navigator.clipboard && finalString) navigator.clipboard.writeText(finalString).catch(()=>{});
|
|
93
95
|
}, []);
|
|
94
96
|
react.useEffect(()=>{
|
|
@@ -24,7 +24,8 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
resourceTokenPlugin: ()=>resourceTokenPlugin
|
|
27
|
+
resourceTokenPlugin: ()=>resourceTokenPlugin,
|
|
28
|
+
stripResourceTokens: ()=>stripResourceTokens
|
|
28
29
|
});
|
|
29
30
|
const external_unist_util_visit_namespaceObject = require("unist-util-visit");
|
|
30
31
|
const RESOURCE_TOKEN_PATTERN = /\[\[resource-token:(.*?)\]\]/g;
|
|
@@ -54,6 +55,12 @@ const parseResourceData = (json)=>{
|
|
|
54
55
|
return null;
|
|
55
56
|
}
|
|
56
57
|
};
|
|
58
|
+
function stripResourceTokens(text) {
|
|
59
|
+
return text.replace(RESOURCE_TOKEN_PATTERN, (match, json)=>{
|
|
60
|
+
const resource = parseResourceData(json);
|
|
61
|
+
return resource?.displayName ?? match;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
57
64
|
function resourceTokenPlugin() {
|
|
58
65
|
return (tree)=>{
|
|
59
66
|
(0, external_unist_util_visit_namespaceObject.visit)(tree, 'text', (node, _index, parent)=>{
|
|
@@ -81,8 +88,10 @@ function resourceTokenPlugin() {
|
|
|
81
88
|
};
|
|
82
89
|
}
|
|
83
90
|
exports.resourceTokenPlugin = __webpack_exports__.resourceTokenPlugin;
|
|
91
|
+
exports.stripResourceTokens = __webpack_exports__.stripResourceTokens;
|
|
84
92
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
85
|
-
"resourceTokenPlugin"
|
|
93
|
+
"resourceTokenPlugin",
|
|
94
|
+
"stripResourceTokens"
|
|
86
95
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
87
96
|
Object.defineProperty(exports, '__esModule', {
|
|
88
97
|
value: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-token-parser.d.ts","sourceRoot":"","sources":["../../../../../../../../src/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,OAAO,CAAC;AA+DxC,wBAAgB,mBAAmB,KACzB,MAAM,IAAI,UA2CnB"}
|
|
1
|
+
{"version":3,"file":"resource-token-parser.d.ts","sourceRoot":"","sources":["../../../../../../../../src/material/components/ap-chat/components/message/markdown/parsers/resource-token-parser.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,OAAO,CAAC;AA+DxC,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKxD;AAKD,wBAAgB,mBAAmB,KACzB,MAAM,IAAI,UA2CnB"}
|
|
@@ -26,6 +26,12 @@ const parseResourceData = (json)=>{
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
+
function stripResourceTokens(text) {
|
|
30
|
+
return text.replace(RESOURCE_TOKEN_PATTERN, (match, json)=>{
|
|
31
|
+
const resource = parseResourceData(json);
|
|
32
|
+
return resource?.displayName ?? match;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
29
35
|
function resourceTokenPlugin() {
|
|
30
36
|
return (tree)=>{
|
|
31
37
|
visit(tree, 'text', (node, _index, parent)=>{
|
|
@@ -52,4 +58,4 @@ function resourceTokenPlugin() {
|
|
|
52
58
|
});
|
|
53
59
|
};
|
|
54
60
|
}
|
|
55
|
-
export { resourceTokenPlugin };
|
|
61
|
+
export { resourceTokenPlugin, stripResourceTokens };
|
|
@@ -50,12 +50,20 @@ function pickerReducer(state, action) {
|
|
|
50
50
|
anchorPosition: action.coords
|
|
51
51
|
};
|
|
52
52
|
case 'CLOSE':
|
|
53
|
-
return initialPickerState;
|
|
54
|
-
case 'SET_QUERY':
|
|
55
53
|
return {
|
|
56
54
|
...state,
|
|
57
|
-
|
|
55
|
+
anchorPosition: null
|
|
58
56
|
};
|
|
57
|
+
case 'SET_QUERY':
|
|
58
|
+
{
|
|
59
|
+
const newTrimmed = action.query.trim();
|
|
60
|
+
if (action.query === state.query || newTrimmed === state.query.trim()) return state;
|
|
61
|
+
return {
|
|
62
|
+
...state,
|
|
63
|
+
query: action.query,
|
|
64
|
+
searchInProgress: !!newTrimmed
|
|
65
|
+
};
|
|
66
|
+
}
|
|
59
67
|
case 'LOAD_START':
|
|
60
68
|
return {
|
|
61
69
|
...state,
|
|
@@ -135,7 +143,8 @@ function pickerReducer(state, action) {
|
|
|
135
143
|
return {
|
|
136
144
|
...state,
|
|
137
145
|
searchResults: [],
|
|
138
|
-
searchDone: true
|
|
146
|
+
searchDone: true,
|
|
147
|
+
searchInProgress: false
|
|
139
148
|
};
|
|
140
149
|
default:
|
|
141
150
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-resource-picker-state.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/hooks/use-resource-picker-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EAEvC,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,iCAAiC,CAAC;IAC5C,SAAS,EAAE,yBAAyB,EAAE,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAC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CAAC;AAE7B,eAAO,MAAM,kBAAkB,EAAE,WAWhC,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"use-resource-picker-state.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-chat/hooks/use-resource-picker-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EAEvC,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,iCAAiC,CAAC;IAC5C,SAAS,EAAE,yBAAyB,EAAE,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,yBAAyB,EAAE,CAAC;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,iBAAiB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