@genpact/genome.mfe.mgtwin-app 1.1.436-alpha → 1.1.438-alpha

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.
Files changed (26) hide show
  1. package/dist/AMABot-2996050d.mjs +589 -0
  2. package/dist/{AssessmentSimulation-197ef143.mjs → AssessmentSimulation-f226233f.mjs} +6 -6
  3. package/dist/{EditSkillAdminData-812f108f.mjs → EditSkillAdminData-c446e922.mjs} +2 -2
  4. package/dist/{EditSkillData-9882cc43.mjs → EditSkillData-2ced70f8.mjs} +2 -2
  5. package/dist/{HomeView-c91b4553.mjs → HomeView-0fd8196d.mjs} +4 -4
  6. package/dist/{Loading-903af537.mjs → Loading-3c06ff47.mjs} +1 -1
  7. package/dist/{PaperAirplaneIcon-2ca0ced1.mjs → PaperAirplaneIcon-30c113e4.mjs} +1 -1
  8. package/dist/{PromptTesting-acbf4e58.mjs → PromptTesting-5d587480.mjs} +3 -3
  9. package/dist/{SkillAutomation-d68c4297.mjs → SkillAutomation-b93c1415.mjs} +3 -3
  10. package/dist/{SkillData-e1c7b723.mjs → SkillData-b3a01804.mjs} +3 -3
  11. package/dist/{Testcase-5aa7586d.mjs → Testcase-a3542513.mjs} +3 -3
  12. package/dist/{UnderMaintenance-045e713b.mjs → UnderMaintenance-8e0134c0.mjs} +1 -1
  13. package/dist/{VoiceTestcase-944cf88e.mjs → VoiceTestcase-a2a72ecf.mjs} +3 -3
  14. package/dist/{XMarkIcon-063cfe6f.mjs → XMarkIcon-4edd26bc.mjs} +1 -1
  15. package/dist/{api-9c4050a6.mjs → api-cde7c088.mjs} +1 -1
  16. package/dist/{index.es-f5312a1f.mjs → index.es-6980af98.mjs} +6 -6
  17. package/dist/{main-744c5bec.mjs → main-edc29f63.mjs} +762 -762
  18. package/dist/mgtwin.es.min.js +1 -1
  19. package/dist/mgtwin.umd.min.js +43 -43
  20. package/dist/native/aiguru-native.css +1 -1
  21. package/dist/native/aiguru-native.umd.min.js +43 -43
  22. package/dist/{simulationPopup.vue_vue_type_script_setup_true_lang-4b5c6741.mjs → simulationPopup.vue_vue_type_script_setup_true_lang-000df448.mjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{voiceServices-c10ce998.mjs → voiceServices-62aa7e90.mjs} +2 -2
  25. package/package.json +1 -1
  26. package/dist/AMABot-4c39b3f4.mjs +0 -556
@@ -0,0 +1,589 @@
1
+ import { r as Z, _ as ee, a as te, b as se, d as oe, c as ne, L as ae } from "./simulationPopup.vue_vue_type_script_setup_true_lang-000df448.mjs";
2
+ import { _ as re, Q as j } from "./constants-e0c83ac4.mjs";
3
+ import { o as c, c as h, a as t, d as A, z as C, r as b, G as ie, I as le, b as d, B as L, p as I, g as S, t as $, h as v, s as T, T as P, u as N, H, C as de, i as E, f as k, F as ce, e as ue, N as z, J as W, k as G, E as D, q as pe, w as me, m as _e, P as he, n as fe, R as K, x as O, U as ge, l as R } from "./main-edc29f63.mjs";
4
+ import { _ as F } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ import { u as Y, i as J } from "./api-cde7c088.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ function xe(o, e) {
8
+ return c(), h("svg", {
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ fill: "none",
11
+ viewBox: "0 0 24 24",
12
+ "stroke-width": "1.5",
13
+ stroke: "currentColor",
14
+ "aria-hidden": "true"
15
+ }, [
16
+ t("path", {
17
+ "stroke-linecap": "round",
18
+ "stroke-linejoin": "round",
19
+ d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
20
+ })
21
+ ]);
22
+ }
23
+ function ve(o, e) {
24
+ return c(), h("svg", {
25
+ xmlns: "http://www.w3.org/2000/svg",
26
+ fill: "none",
27
+ viewBox: "0 0 24 24",
28
+ "stroke-width": "1.5",
29
+ stroke: "currentColor",
30
+ "aria-hidden": "true"
31
+ }, [
32
+ t("path", {
33
+ "stroke-linecap": "round",
34
+ "stroke-linejoin": "round",
35
+ d: "M12 4.5v15m7.5-7.5h-15"
36
+ })
37
+ ]);
38
+ }
39
+ function be(o, e) {
40
+ return c(), h("svg", {
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ fill: "none",
43
+ viewBox: "0 0 24 24",
44
+ "stroke-width": "1.5",
45
+ stroke: "currentColor",
46
+ "aria-hidden": "true"
47
+ }, [
48
+ t("path", {
49
+ "stroke-linecap": "round",
50
+ "stroke-linejoin": "round",
51
+ d: "M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"
52
+ })
53
+ ]);
54
+ }
55
+ const we = { class: "flex h-14 w-full flex-1 items-center justify-between bg-black md:pr-6 lg:pr-6" }, ye = ["href"], Ae = /* @__PURE__ */ t("img", {
56
+ class: "h-16 w-auto cursor-pointer",
57
+ src: ee,
58
+ alt: "Genome Logo"
59
+ }, null, -1), ke = [
60
+ Ae
61
+ ], $e = ["href"], Fe = /* @__PURE__ */ t("img", {
62
+ class: "h-6 w-28 cursor-pointer md:w-36",
63
+ src: re,
64
+ alt: "Aiguru Logo"
65
+ }, null, -1), Me = [
66
+ Fe
67
+ ], qe = /* @__PURE__ */ A({
68
+ __name: "headerAMA",
69
+ setup(o) {
70
+ const e = C(), r = b(""), i = b(""), p = Z(ie(le, void 0), window.location);
71
+ return p === "prod" ? r.value = "https://genome.genpact.com" : r.value = "https://genome-dev.genpact.com", p === "prod" ? i.value = "https://genome.genpact.com/#aiguru" : i.value = "https://genome-dev.genpact.com/#aiguru", (u, a) => (c(), h("nav", we, [
72
+ t("a", {
73
+ class: "px-2 md:px-0 lg:px-0",
74
+ href: d(e).url(r.value),
75
+ target: "_blank"
76
+ }, ke, 8, ye),
77
+ t("a", {
78
+ class: "px-2 md:px-0 lg:px-0",
79
+ href: d(e).url(i.value),
80
+ target: "_blank"
81
+ }, Me, 8, $e)
82
+ ]));
83
+ }
84
+ }), Le = (o) => (I("data-v-c2a7fb37"), o = o(), S(), o), Ce = { class: "fontFormattingAMA flex justify-start py-2" }, Ie = { class: "w-full max-w-[92%]" }, Se = { class: "line-break rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-5 py-4 text-sm leading-6 md:px-6 md:py-5 text-[#3f4451]" }, Be = ["innerHTML"], Ee = /* @__PURE__ */ Le(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ne = /* @__PURE__ */ A({
85
+ __name: "responseAMA",
86
+ props: {
87
+ answer: {
88
+ type: String,
89
+ required: !0
90
+ }
91
+ },
92
+ setup(o) {
93
+ const e = o, r = C(), i = (a) => a.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*/g, ""), p = (a) => {
94
+ const s = [];
95
+ let m = [];
96
+ const n = () => {
97
+ m.length && (s.push({ html: `<ul style="list-style: disc; margin: 0 0 0 2.5rem; padding: 0;">${m.join("")}</ul>`, block: !0 }), m = []);
98
+ };
99
+ for (const l of a.split(`
100
+ `)) {
101
+ if (!l.trim()) {
102
+ n();
103
+ const _ = s[s.length - 1];
104
+ _ && !_.block && _.html !== "" && s.push({ html: "", block: !1 });
105
+ continue;
106
+ }
107
+ const x = l.match(/^\s*[-*•]\s+(.*)$/);
108
+ if (x) {
109
+ m.push(`<li>${i(x[1])}</li>`);
110
+ continue;
111
+ }
112
+ n();
113
+ const f = l.match(/^\s*#{1,6}\s*(.*)$/);
114
+ f ? s.push({ html: `<div style="font-weight: 700;">${i(f[1])}</div>`, block: !0 }) : s.push({ html: i(l), block: !1 });
115
+ }
116
+ n();
117
+ for (let l = s.length - 2; l >= 0; l--)
118
+ s[l].html === "" && !s[l].block && s[l + 1].block && s.splice(l, 1);
119
+ for (; s.length && s[s.length - 1].html === ""; )
120
+ s.pop();
121
+ return s.reduce((l, x, f) => f === 0 ? x.html : l + (x.block || s[f - 1].block ? "" : `
122
+ `) + x.html, "");
123
+ }, u = L(() => {
124
+ const a = p(e.answer).replace(
125
+ /Assessment Rating & Feedback/g,
126
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
127
+ ), s = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, m = a.replace(s, (n, l, x) => `<a href="${r.url(x)}" target="_blank" rel="noopener noreferrer" style="color: #00AECF; text-decoration: underline;">${l}</a>`);
128
+ return r.html(m);
129
+ });
130
+ return (a, s) => (c(), h("div", Ce, [
131
+ t("div", Ie, [
132
+ t("div", Se, [
133
+ t("span", {
134
+ class: "fontFormattingAMA answer-link",
135
+ innerHTML: u.value
136
+ }, null, 8, Be)
137
+ ]),
138
+ Ee
139
+ ])
140
+ ]));
141
+ }
142
+ });
143
+ const je = /* @__PURE__ */ F(Ne, [["__scopeId", "data-v-c2a7fb37"]]), Qe = { class: "fontFormattingAMA flex justify-end py-2" }, Re = { class: "max-w-[80%]" }, Te = { class: "rounded-2xl rounded-br-sm bg-[#FFAB28] px-4 py-3" }, He = { class: "fontFormattingAMA whitespace-pre-line break-words text-sm leading-5 text-[#181C23]" }, ze = /* @__PURE__ */ t("div", { class: "mt-1 text-right text-xs text-gray-400" }, "You", -1), Ge = /* @__PURE__ */ A({
144
+ __name: "learnerAMA",
145
+ props: {
146
+ question: {
147
+ type: String,
148
+ required: !0
149
+ }
150
+ },
151
+ setup(o) {
152
+ return (e, r) => (c(), h("div", Qe, [
153
+ t("div", Re, [
154
+ t("div", Te, [
155
+ t("div", He, $(o.question), 1)
156
+ ]),
157
+ ze
158
+ ])
159
+ ]));
160
+ }
161
+ }), V = (o) => (I("data-v-a8911c8a"), o = o(), S(), o), Ve = { class: "fontFormattingAMA flex w-full justify-start py-2" }, Ue = { class: "w-full max-w-[92%]" }, Pe = { class: "rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-5 py-4 md:px-6 md:py-5" }, We = {
162
+ class: "flex items-center gap-2.5",
163
+ role: "status",
164
+ "aria-live": "polite"
165
+ }, De = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", {
166
+ class: "dots flex shrink-0 items-center gap-1",
167
+ "aria-hidden": "true"
168
+ }, [
169
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
170
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
171
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
172
+ ], -1)), Ke = /* @__PURE__ */ V(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
173
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
174
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
175
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
176
+ ], -1)), Oe = /* @__PURE__ */ V(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ye = /* @__PURE__ */ A({
177
+ __name: "LoadingResponseAMA",
178
+ setup(o) {
179
+ const e = C(), r = [
180
+ "Generating response",
181
+ "Fetching the best response for you",
182
+ "Thinking... give me a moment",
183
+ "One moment while I gather the information",
184
+ "Hang in tight, we are almost there",
185
+ "Almost there... just a bit longer",
186
+ "Compiling a response for you"
187
+ ], i = b(0), p = setInterval(() => {
188
+ var u, a;
189
+ !((a = (u = e.scope) == null ? void 0 : u.isActive) != null && a.call(u)) && e.native || (i.value = (i.value + 1) % r.length);
190
+ }, 5e3);
191
+ return e.own(() => clearInterval(p)), (u, a) => (c(), h("div", Ve, [
192
+ t("div", Ue, [
193
+ t("div", Pe, [
194
+ t("div", We, [
195
+ De,
196
+ v(P, {
197
+ name: "fade",
198
+ mode: "out-in"
199
+ }, {
200
+ default: T(() => [
201
+ (c(), h("span", {
202
+ key: i.value,
203
+ class: "text-xs italic leading-4 text-gray-500"
204
+ }, $(r[i.value]), 1))
205
+ ]),
206
+ _: 1
207
+ })
208
+ ]),
209
+ Ke
210
+ ]),
211
+ Oe
212
+ ])
213
+ ]));
214
+ }
215
+ });
216
+ const Je = /* @__PURE__ */ F(Ye, [["__scopeId", "data-v-a8911c8a"]]), X = (o) => (I("data-v-3bded0ae"), o = o(), S(), o), Xe = {
217
+ key: 0,
218
+ class: "fontFormattingAMA flex h-full min-h-[260px] flex-col items-center justify-center px-2 py-8 text-center"
219
+ }, Ze = {
220
+ class: "flex h-14 w-14 items-center justify-center rounded-full bg-[#FFF4E0] ring-8 ring-[#FFF4E0]/50 md:h-16 md:w-16",
221
+ "aria-hidden": "true"
222
+ }, et = /* @__PURE__ */ X(() => /* @__PURE__ */ t("p", { class: "mt-6 text-sm text-gray-500 md:text-base" }, "I'm here and ready to help!", -1)), tt = { class: "mt-1 text-lg font-semibold text-[#181C23] md:text-2xl" }, st = { class: "text-[#B26A00]" }, ot = /* @__PURE__ */ X(() => /* @__PURE__ */ t("p", { class: "mt-2 max-w-md text-sm text-gray-500 md:text-base" }, " Ask me to explain concepts, provide examples, or clarify anything that seems confusing. ", -1)), nt = { key: 0 }, at = { key: 1 }, rt = {
223
+ key: 1,
224
+ class: "flex"
225
+ }, it = /* @__PURE__ */ A({
226
+ __name: "conversationAMA",
227
+ setup(o) {
228
+ let e = b(""), r = b("");
229
+ e.value = '<a style="color:#00AECF;"', r.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
230
+ const i = N(), p = C(), u = b(), a = () => {
231
+ var n;
232
+ const s = p.native && p.root && typeof p.root.querySelectorAll == "function" ? p.root.querySelectorAll('[name="askQuestion"]') : document.getElementsByName("askQuestion"), m = Array.from(s);
233
+ m.length && ((n = m.pop()) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
234
+ };
235
+ return H(a), de(a), (s, m) => (c(), h("div", {
236
+ ref_key: "nestedElement",
237
+ ref: u,
238
+ class: "smooth-scroll overflow-auto px-4 md:px-10 lg:px-12"
239
+ }, [
240
+ !d(i).conversations.length && !d(i).dotLoader ? (c(), h("div", Xe, [
241
+ t("span", Ze, [
242
+ v(d(be), { class: "h-7 w-7 text-[#E08A00] md:h-8 md:w-8" })
243
+ ]),
244
+ et,
245
+ t("p", tt, [
246
+ E(" What would you like to know about "),
247
+ t("span", st, $(d(i).amaSkillName || "Skill"), 1),
248
+ E("? ")
249
+ ]),
250
+ ot
251
+ ])) : k("", !0),
252
+ (c(!0), h(ce, null, ue(d(i).conversations, (n, l) => (c(), h("div", { key: l }, [
253
+ n.question ? (c(), h("div", nt, [
254
+ v(Ge, {
255
+ question: n.question,
256
+ c2question: n.c2question,
257
+ "show-feedback": n.showFeedback,
258
+ id: `qId${l}`,
259
+ name: "askQuestion",
260
+ "que-id": l
261
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
262
+ ])) : k("", !0),
263
+ n.answer ? (c(), h("div", at, [
264
+ v(je, {
265
+ question: n == null ? void 0 : n.question,
266
+ c2question: n == null ? void 0 : n.c2question,
267
+ "show-sources": n == null ? void 0 : n.showSources,
268
+ questionId: n.id,
269
+ answer: n.answer.replaceAll("<a", d(e)).replaceAll("<ul", d(r)),
270
+ "show-feedback": n.showFeedback,
271
+ "related-ques": n.relatedQues,
272
+ "options-array": n.optionsArray,
273
+ "ans-id": l
274
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
275
+ ])) : k("", !0)
276
+ ]))), 128)),
277
+ d(i).dotLoader ? (c(), h("div", rt, [
278
+ v(Je)
279
+ ])) : k("", !0)
280
+ ], 512));
281
+ }
282
+ });
283
+ const lt = /* @__PURE__ */ F(it, [["__scopeId", "data-v-3bded0ae"]]), dt = { class: "fontFormattingAMA flex items-center justify-between gap-3 border-b border-gray-100 px-4 pb-3 pt-1 md:px-10 md:pb-4 lg:px-12" }, ct = { class: "min-w-0 text-base font-semibold text-[#181C23] md:text-lg" }, ut = { key: 0 }, pt = ["innerHTML"], mt = ["disabled"], _t = /* @__PURE__ */ A({
284
+ __name: "greetingsAMA",
285
+ setup(o) {
286
+ const e = N(), r = C(), i = ` Hi ${e.learnerName || "Learner"}! &#128075;`, p = L(() => i), u = L(() => r.text(i.replace("&#128075;", "👋")));
287
+ L(() => `I'm here and ready to help! What would you like to know about <span class='font-[600]'>${e.amaSkillName || "Skill"}</span>? <br/> Ask me to explain concepts, provide examples, or clarify anything that seems confusing.`);
288
+ const a = () => {
289
+ !e.conversations.length || e.dotLoader || (e.conversations = [], e.past_messages = []);
290
+ };
291
+ return (s, m) => (c(), h("section", dt, [
292
+ t("div", ct, [
293
+ d(r).native ? (c(), h("div", ut, $(u.value), 1)) : (c(), h("div", {
294
+ key: 1,
295
+ innerHTML: p.value
296
+ }, null, 8, pt))
297
+ ]),
298
+ t("button", {
299
+ type: "button",
300
+ disabled: !d(e).conversations.length || d(e).dotLoader,
301
+ class: "flex shrink-0 items-center gap-1.5 rounded-full border border-[#FFAB28]/50 bg-[#FFF4E0] px-3.5 py-1.5 text-xs font-semibold text-[#7A4A00] shadow-sm transition hover:-translate-y-0.5 hover:border-[#FFAB28] hover:bg-[#FFAB28] hover:text-[#181C23] hover:shadow-md disabled:pointer-events-none disabled:opacity-50 md:text-sm",
302
+ onClick: m[0] || (m[0] = (n) => a())
303
+ }, [
304
+ v(d(ve), {
305
+ class: "h-4 w-4",
306
+ "aria-hidden": "true"
307
+ }),
308
+ E(" New chat ")
309
+ ], 8, mt)
310
+ ]));
311
+ }
312
+ }), Q = (o) => String(o.query.amaId ?? "");
313
+ function ht(o, e, r, i, p, u = (a) => !1) {
314
+ const a = b(!1);
315
+ let s = 0, m = !0;
316
+ const n = () => {
317
+ s += 1, a.value = !1, e.dotLoader = !1;
318
+ };
319
+ z(() => Q(o), n), W(() => {
320
+ m = !1, n();
321
+ });
322
+ const l = (f, _) => m && f === s && _ === Q(o);
323
+ return { isWaitingResponse: a, sendQuestion: async () => {
324
+ var M, q, g;
325
+ if (e.question.trim().length < 1) {
326
+ r.setError("Please enter question!");
327
+ return;
328
+ }
329
+ if (e.amaQuestionsLeft <= 0) {
330
+ r.setError("You have exhausted your question limit!");
331
+ return;
332
+ }
333
+ const f = ++s, _ = Q(o);
334
+ a.value = !0, e.dotLoader = !0;
335
+ const w = e.question;
336
+ e.conversations.push({ question: w }), e.question = "";
337
+ const B = {
338
+ skillId: _,
339
+ question: w,
340
+ past_messages: e.past_messages
341
+ };
342
+ try {
343
+ const y = await i(B);
344
+ if (!l(f, _))
345
+ return;
346
+ e.addConversation((M = y.data) == null ? void 0 : M.body, "new"), a.value = !1, e.dotLoader = !1;
347
+ } catch (y) {
348
+ if (u(y) || !l(f, _))
349
+ return;
350
+ a.value = !1, e.dotLoader = !1, p(y) ? r.setError((g = (q = y.response) == null ? void 0 : q.data) == null ? void 0 : g.message) : r.setError("There was an issue, please contact helpmate");
351
+ }
352
+ } };
353
+ }
354
+ const U = (o) => (I("data-v-81aaf2f7"), o = o(), S(), o), ft = { class: "w-full px-4 pb-4 pt-3 md:px-10 lg:px-12" }, gt = { class: "relative" }, xt = { class: "pointer-events-none absolute inset-y-0 left-3 flex items-center md:left-4" }, vt = {
355
+ class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
356
+ "aria-hidden": "true"
357
+ }, bt = ["placeholder"], wt = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, yt = {
358
+ key: 1,
359
+ class: "flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF4E0]",
360
+ role: "status",
361
+ "aria-label": "Waiting for response",
362
+ title: "Waiting for response"
363
+ }, At = /* @__PURE__ */ U(() => /* @__PURE__ */ t("span", { class: "h-5 w-5 animate-spin rounded-full border-[2.5px] border-[#FFAB28] border-t-transparent" }, null, -1)), kt = [
364
+ At
365
+ ], $t = { class: "fontFormattingAMA flex flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 pt-2 text-center text-xs text-gray-500 md:text-sm" }, Ft = /* @__PURE__ */ U(() => /* @__PURE__ */ t("span", null, "Note: AI-generated response may not be fully accurate; check with experts for critical information.", -1)), Mt = /* @__PURE__ */ U(() => /* @__PURE__ */ t("span", {
366
+ class: "hidden sm:inline",
367
+ "aria-hidden": "true"
368
+ }, "·", -1)), qt = { class: "font-semibold text-[#181C23]" }, Lt = /* @__PURE__ */ A({
369
+ __name: "NewQuestionAMA",
370
+ setup(o) {
371
+ const e = N(), r = G();
372
+ e.question = "";
373
+ const i = b(null), p = b(!1), u = b(j), a = D(), s = Y(), { isWaitingResponse: m, sendQuestion: n } = ht(
374
+ a,
375
+ e,
376
+ r,
377
+ (f) => s.postApi("/amaBotResponse", f),
378
+ pe.isAxiosError,
379
+ J
380
+ );
381
+ H(() => {
382
+ i.value.focus();
383
+ });
384
+ const l = L(() => e.question.trim().length > 0);
385
+ z(
386
+ () => e.question,
387
+ async () => {
388
+ await K();
389
+ const f = i.value;
390
+ f && (f.style.height = "auto", f.style.height = `${f.scrollHeight}px`);
391
+ }
392
+ );
393
+ const x = (f) => {
394
+ const _ = f.length;
395
+ u.value = j - _, p.value = _ >= j;
396
+ };
397
+ return (f, _) => (c(), h("div", ft, [
398
+ t("div", gt, [
399
+ t("div", xt, [
400
+ t("span", vt, [
401
+ v(d(xe), { class: "h-4 w-4 md:h-5 md:w-5" })
402
+ ])
403
+ ]),
404
+ me(t("textarea", {
405
+ ref_key: "AiSearch",
406
+ ref: i,
407
+ "onUpdate:modelValue": _[0] || (_[0] = (w) => d(e).question = w),
408
+ rows: "1",
409
+ class: "fontFormattingAMA block max-h-40 w-full !cursor-text resize-none overflow-y-auto rounded-2xl border border-[#FFAB28]/40 bg-white py-3 pl-14 pr-16 text-sm leading-6 text-[#181C23] shadow-[0_4px_16px_rgba(7,50,98,0.08)] transition placeholder:text-gray-400 hover:border-[#FFAB28]/70 focus:border-[#FFAB28] focus:outline-none focus:ring-4 focus:ring-[#FFAB28]/20 md:py-4 md:pl-16 md:pr-20 md:text-base",
410
+ placeholder: `Ask me about ${d(e).amaSkillName || "Skill Name"}`,
411
+ onKeydown: _[1] || (_[1] = he(O((w) => d(m) ? "" : d(n)(), ["exact", "prevent"]), ["enter"])),
412
+ onInput: _[2] || (_[2] = (w) => x(d(e).question))
413
+ }, null, 40, bt), [
414
+ [_e, d(e).question]
415
+ ]),
416
+ t("div", wt, [
417
+ d(m) ? (c(), h("span", yt, kt)) : (c(), h("button", {
418
+ key: 0,
419
+ type: "button",
420
+ title: "Send",
421
+ "aria-label": "Send question",
422
+ class: fe([l.value ? "bg-[#FFAB28] text-[#181C23] shadow-md hover:-translate-y-0.5 hover:shadow-lg" : "bg-[#FFAB28]/40 text-[#181C23]/60", "flex h-10 w-10 items-center justify-center rounded-full transition"]),
423
+ onClick: _[3] || (_[3] = (w) => d(n)())
424
+ }, [
425
+ v(d(te), {
426
+ class: "h-5 w-5",
427
+ "aria-hidden": "true"
428
+ })
429
+ ], 2))
430
+ ])
431
+ ]),
432
+ t("div", $t, [
433
+ v(d(se), {
434
+ class: "h-4 w-4 shrink-0 text-[#E08A00]",
435
+ "aria-hidden": "true"
436
+ }),
437
+ Ft,
438
+ Mt,
439
+ t("span", qt, $(d(e).amaQuestionsLeft) + " questions remaining for the day", 1)
440
+ ])
441
+ ]));
442
+ }
443
+ });
444
+ const Ct = /* @__PURE__ */ F(Lt, [["__scopeId", "data-v-81aaf2f7"]]), It = (o) => (I("data-v-fb943644"), o = o(), S(), o), St = {
445
+ class: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#FDF3E1] text-[#C68A16]",
446
+ "aria-hidden": "true"
447
+ }, Bt = /* @__PURE__ */ It(() => /* @__PURE__ */ t("div", { class: "mt-3 text-xs font-bold uppercase tracking-[0.12em] text-[#C68A16]" }, "Heads up", -1)), Et = {
448
+ id: "ama-error-text",
449
+ class: "mt-1.5 text-base font-semibold leading-snug text-[#181C23]"
450
+ }, Nt = /* @__PURE__ */ A({
451
+ __name: "errorPopupAMA",
452
+ setup(o) {
453
+ const e = G(), r = b(""), i = b(null), p = () => {
454
+ r.value = "";
455
+ };
456
+ e.$subscribe(
457
+ (a, s) => {
458
+ s.error && (r.value = s.error, K(() => {
459
+ var m;
460
+ return (m = i.value) == null ? void 0 : m.focus();
461
+ }));
462
+ },
463
+ { flush: "sync" }
464
+ );
465
+ const u = (a) => {
466
+ r.value && a.key === "Escape" && p();
467
+ };
468
+ return H(() => window.addEventListener("keydown", u)), ge(() => window.removeEventListener("keydown", u)), (a, s) => (c(), R(P, { name: "ama-popup" }, {
469
+ default: T(() => [
470
+ r.value ? (c(), h("div", {
471
+ key: 0,
472
+ class: "fixed inset-0 z-[99999] flex items-center justify-center bg-[#181C23]/35 p-4 backdrop-blur-[2px]",
473
+ onClick: p
474
+ }, [
475
+ t("div", {
476
+ role: "alertdialog",
477
+ "aria-modal": "true",
478
+ "aria-labelledby": "ama-error-text",
479
+ class: "ama-popup-card fontFormattingAMA w-full max-w-[360px] rounded-[14px] border border-[#F3E6CF] bg-[#FFFCF7] px-[22px] pb-5 pt-6 text-center shadow-[0_18px_40px_rgba(24,28,35,0.18)]",
480
+ onClick: s[0] || (s[0] = O(() => {
481
+ }, ["stop"]))
482
+ }, [
483
+ t("span", St, [
484
+ v(d(oe), { class: "h-5 w-5" })
485
+ ]),
486
+ Bt,
487
+ t("div", Et, $(r.value), 1),
488
+ t("button", {
489
+ ref_key: "okButton",
490
+ ref: i,
491
+ type: "button",
492
+ class: "mt-5 w-full rounded-lg bg-[#181C23] px-4 py-2.5 text-sm font-semibold text-white transition hover:bg-[#2B313C] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#FFAB28]",
493
+ onClick: p
494
+ }, " Got it ", 512)
495
+ ])
496
+ ])) : k("", !0)
497
+ ]),
498
+ _: 1
499
+ }));
500
+ }
501
+ });
502
+ const jt = /* @__PURE__ */ F(Nt, [["__scopeId", "data-v-fb943644"]]), Qt = (o) => String(o.query.amaId ?? "");
503
+ function Rt(o, e, r, i, p = (u) => !1) {
504
+ const u = b(!0), a = b(!1);
505
+ let s = 0;
506
+ const m = (l) => {
507
+ e.amaSkillId = l, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
508
+ }, n = async (l) => {
509
+ var _, w, B, M, q;
510
+ const x = ++s;
511
+ u.value = !0, a.value = !1, m(l);
512
+ let f = !1;
513
+ try {
514
+ const g = await i(l);
515
+ if (x !== s)
516
+ return;
517
+ e.initialize(g.data), e.amaQuestionsLeft = (_ = g == null ? void 0 : g.data) == null ? void 0 : _.questionsLeftAIGC, e.amaSkillName = (w = g == null ? void 0 : g.data) == null ? void 0 : w.skillName;
518
+ } catch (g) {
519
+ if (p(g)) {
520
+ f = !0;
521
+ return;
522
+ }
523
+ if (x !== s)
524
+ return;
525
+ const y = g && typeof g == "object" && ((B = g.response) == null ? void 0 : B.status);
526
+ y === 424 || y === 425 ? a.value = !0 : y ? r.setError((q = (M = g.response) == null ? void 0 : M.data) == null ? void 0 : q.message) : r.setError("There was an issue, please contact helpmate");
527
+ } finally {
528
+ !f && x === s && (u.value = !1);
529
+ }
530
+ };
531
+ return z(() => Qt(o), (l) => {
532
+ n(l);
533
+ }, { immediate: !0 }), W(() => {
534
+ s += 1;
535
+ }), { loaderValue: u, notAllowedModalVisible: a };
536
+ }
537
+ const Tt = {
538
+ key: 1,
539
+ class: "flex h-screen flex-col overflow-hidden"
540
+ }, Ht = { class: "z-20 shrink-0" }, zt = { class: "min-h-0 flex-1 overflow-hidden pb-1" }, Gt = { class: "flex h-full flex-col bg-gray-100 px-2 sm:px-6 md:px-10 lg:px-20" }, Vt = { class: "fontFormattingAMA flex min-h-0 flex-1 flex-col border-x border-b border-black bg-white pt-3 md:pt-4" }, Ut = { class: "shrink-0" }, Pt = /* @__PURE__ */ A({
541
+ __name: "AMABot",
542
+ setup(o) {
543
+ const e = N(), r = G(), i = D(), p = Y(), { loaderValue: u, notAllowedModalVisible: a } = Rt(
544
+ i,
545
+ e,
546
+ r,
547
+ (s) => p.getApi(`/getLearnerData?amaSkillId=${s}`),
548
+ J
549
+ );
550
+ return (s, m) => (c(), h("section", null, [
551
+ d(a) ? (c(), R(ne, {
552
+ key: 0,
553
+ tone: "error",
554
+ title: "Assessment Access Required"
555
+ }, {
556
+ default: T(() => [
557
+ E(" You don't have access to this assessment. Please contact to administrator ")
558
+ ]),
559
+ _: 1
560
+ })) : k("", !0),
561
+ v(jt),
562
+ t("div", null, [
563
+ d(u) ? (c(), R(ae, {
564
+ key: 0,
565
+ message: "Loading AI Guru"
566
+ })) : (c(), h("main", Tt, [
567
+ t("div", Ht, [
568
+ v(qe)
569
+ ]),
570
+ t("section", zt, [
571
+ t("div", Gt, [
572
+ t("div", Vt, [
573
+ v(_t, { class: "shrink-0" }),
574
+ v(lt, { class: "min-h-0 flex-1 pt-3" }),
575
+ t("div", Ut, [
576
+ v(Ct)
577
+ ])
578
+ ])
579
+ ])
580
+ ])
581
+ ]))
582
+ ])
583
+ ]));
584
+ }
585
+ });
586
+ const Xt = /* @__PURE__ */ F(Pt, [["__scopeId", "data-v-d2dc4f82"]]);
587
+ export {
588
+ Xt as default
589
+ };
@@ -1,13 +1,13 @@
1
1
  var Xh = Object.defineProperty;
2
2
  var Mh = (e, n, t) => n in e ? Xh(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var Ct = (e, n, t) => (Mh(e, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { o as ke, c as Se, a as L, d as Fn, z as ro, r as _e, G as xa, I as Ka, b as Oe, p as Qi, g as Wi, h as bt, s as Tr, T as Fh, f as Xt, n as zn, x as Gs, y as Sd, u as Kr, B as tn, t as Yt, i as Be, F as jr, e as wa, M as Qn, J as _a, N as vi, l as pa, w as Us, O as Bd, P as il, H as Kc, C as Eh, k as ml, L as _c, q as Hd, E as $c, m as Td, Q as Zh, R as $f, S as Ih, v as Gh } from "./main-744c5bec.mjs";
5
- import { r as jd, _ as Rh, a as Cd, b as Xd, c as Md, L as Jh } from "./simulationPopup.vue_vue_type_script_setup_true_lang-4b5c6741.mjs";
4
+ import { o as ke, c as Se, a as L, d as Fn, z as ro, r as _e, G as xa, I as Ka, b as Oe, p as Qi, g as Wi, h as bt, s as Tr, T as Fh, f as Xt, n as zn, x as Gs, y as Sd, u as Kr, B as tn, t as Yt, i as Be, F as jr, e as wa, M as Qn, J as _a, N as vi, l as pa, w as Us, O as Bd, P as il, H as Kc, C as Eh, k as ml, L as _c, q as Hd, E as $c, m as Td, Q as Zh, R as $f, S as Ih, v as Gh } from "./main-edc29f63.mjs";
5
+ import { r as jd, _ as Rh, a as Cd, b as Xd, c as Md, L as Jh } from "./simulationPopup.vue_vue_type_script_setup_true_lang-000df448.mjs";
6
6
  import { _ as Qh, Q as ic, M as eu } from "./constants-e0c83ac4.mjs";
7
7
  import { _ as gi } from "./_plugin-vue_export-helper-dad06003.mjs";
8
- import { u as za, i as Mi, c as Es } from "./api-9c4050a6.mjs";
9
- import { u as Wh, a as Uh } from "./voiceServices-c10ce998.mjs";
10
- import { r as qh } from "./XMarkIcon-063cfe6f.mjs";
8
+ import { u as za, i as Mi, c as Es } from "./api-cde7c088.mjs";
9
+ import { u as Wh, a as Uh } from "./voiceServices-62aa7e90.mjs";
10
+ import { r as qh } from "./XMarkIcon-4edd26bc.mjs";
11
11
  function Yh(e, n) {
12
12
  return ke(), Se("svg", {
13
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -12469,7 +12469,7 @@ function(e) {
12469
12469
  var d = u.getContext("2d");
12470
12470
  d.fillStyle = "#fff", d.fillRect(0, 0, u.width, u.height);
12471
12471
  var v = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, w = this;
12472
- return (at.canvg ? Promise.resolve(at.canvg) : import("./index.es-f5312a1f.mjs")).catch(function(A) {
12472
+ return (at.canvg ? Promise.resolve(at.canvg) : import("./index.es-6980af98.mjs")).catch(function(A) {
12473
12473
  return Promise.reject(new Error("Could not load canvg: " + A));
12474
12474
  }).then(function(A) {
12475
12475
  return A.default ? A.default : A;
@@ -1,6 +1,6 @@
1
- import { d as O, D as P, u as $, k as H, r as c, o as i, c as d, a as e, w as b, m as T, b as n, n as F, v as B, F as G, e as Y, t as f, q as j, p as J, g as Q, i as E } from "./main-744c5bec.mjs";
1
+ import { d as O, D as P, u as $, k as H, r as c, o as i, c as d, a as e, w as b, m as T, b as n, n as F, v as B, F as G, e as Y, t as f, q as j, p as J, g as Q, i as E } from "./main-edc29f63.mjs";
2
2
  import { _ as C } from "./loadernew-ac153a51.mjs";
3
- import { u as X, a as Z, i as A } from "./api-9c4050a6.mjs";
3
+ import { u as X, a as Z, i as A } from "./api-cde7c088.mjs";
4
4
  import { _ as ee } from "./_plugin-vue_export-helper-dad06003.mjs";
5
5
  const a = (_) => (J("data-v-53586205"), _ = _(), Q(), _), te = /* @__PURE__ */ a(() => /* @__PURE__ */ e("nav", { class: "bg-genpact-blue-box w-full px-5 mb-6" }, null, -1)), se = { class: "grid grid-cols-5 gap-8 p-10 items-stretch" }, oe = /* @__PURE__ */ a(() => /* @__PURE__ */ e("div", { class: "col-span-1 text-right" }, [
6
6
  /* @__PURE__ */ e("label", {
@@ -1,6 +1,6 @@
1
- import { o as r, c, a as e, d as z, D as G, h as L, b as a, U as H, u as Y, k as J, r as i, w, m as T, n as F, f as b, F as j, e as Q, v as X, t as m, q, p as Z, g as ee, i as I } from "./main-744c5bec.mjs";
1
+ import { o as r, c, a as e, d as z, D as G, h as L, b as a, U as H, u as Y, k as J, r as i, w, m as T, n as F, f as b, F as j, e as Q, v as X, t as m, q, p as Z, g as ee, i as I } from "./main-edc29f63.mjs";
2
2
  import { _ as R } from "./loadernew-ac153a51.mjs";
3
- import { a as U, u as te, i as M } from "./api-9c4050a6.mjs";
3
+ import { a as U, u as te, i as M } from "./api-cde7c088.mjs";
4
4
  import { _ as se } from "./genome-Logo-white-ffcf2413.mjs";
5
5
  import { _ as oe } from "./_plugin-vue_export-helper-dad06003.mjs";
6
6
  function ae(u, h) {