@genpact/genome.mfe.mgtwin-app 1.1.430-alpha → 1.1.431-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/AssessmentAMA-af8f434e.mjs +466 -0
  2. package/dist/{AssessmentSimulation-495e95b1.mjs → AssessmentSimulation-fe0b38aa.mjs} +804 -790
  3. package/dist/{EditSkillAdminData-47039d34.mjs → EditSkillAdminData-bafd7905.mjs} +2 -2
  4. package/dist/{EditSkillData-96b20a78.mjs → EditSkillData-2456736b.mjs} +2 -2
  5. package/dist/{HomeView-fe05eb0f.mjs → HomeView-0e0fc042.mjs} +4 -4
  6. package/dist/{Loading-e99281b2.mjs → Loading-d85c9c13.mjs} +1 -1
  7. package/dist/{PaperAirplaneIcon-28b9a844.mjs → PaperAirplaneIcon-e884b45d.mjs} +1 -1
  8. package/dist/{PromptTesting-638d7be3.mjs → PromptTesting-80ae085e.mjs} +3 -3
  9. package/dist/{SkillAutomation-7ac3071a.mjs → SkillAutomation-3f8c086a.mjs} +3 -3
  10. package/dist/{SkillData-603b10cc.mjs → SkillData-60482f4d.mjs} +3 -3
  11. package/dist/{Testcase-304d8a95.mjs → Testcase-daae0cb4.mjs} +3 -3
  12. package/dist/{UnderMaintenance-32c4f20b.mjs → UnderMaintenance-51977504.mjs} +1 -1
  13. package/dist/{VoiceTestcase-f8024200.mjs → VoiceTestcase-61034b5a.mjs} +3 -3
  14. package/dist/{XMarkIcon-7f24a592.mjs → XMarkIcon-c526a964.mjs} +1 -1
  15. package/dist/{api-6dc8b5ac.mjs → api-9371482f.mjs} +1 -1
  16. package/dist/{index.es-cb06cdf3.mjs → index.es-7efa9da3.mjs} +6 -6
  17. package/dist/{main-9832da77.mjs → main-3218ed57.mjs} +2199 -2199
  18. package/dist/mgtwin.es.min.js +1 -1
  19. package/dist/mgtwin.umd.min.js +64 -64
  20. package/dist/native/aiguru-native.css +1 -1
  21. package/dist/native/aiguru-native.umd.min.js +62 -62
  22. package/dist/{simulationPopup.vue_vue_type_script_setup_true_lang-bf56f03d.mjs → simulationPopup.vue_vue_type_script_setup_true_lang-860e5672.mjs} +42 -57
  23. package/dist/style.css +1 -1
  24. package/dist/{voiceServices-04e9727e.mjs → voiceServices-0ba9eb84.mjs} +2 -2
  25. package/package.json +1 -1
  26. package/dist/AssessmentAMA-42b31cb4.mjs +0 -482
@@ -0,0 +1,466 @@
1
+ import { r as P, _ as K, a as Y, b as J, c as X, L as Z } from "./simulationPopup.vue_vue_type_script_setup_true_lang-860e5672.mjs";
2
+ import { _ as ee, Q as E } from "./constants-e0c83ac4.mjs";
3
+ import { o as _, c as h, a as t, d as w, z as q, r as v, G as te, I as se, b as p, u as L, B as F, t as C, p as N, g as Q, h as A, s as V, T as ne, H as G, C as oe, F as ae, e as re, f as S, N as R, J as z, k as U, E as W, q as ie, w as le, m as ce, P as de, n as ue, R as _e, x as me, l as H, i as pe } from "./main-3218ed57.mjs";
4
+ import { _ as M } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ import { u as D, i as O } from "./api-9371482f.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ function he(o, e) {
8
+ return _(), 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
+ const fe = { class: "flex h-14 w-full flex-1 items-center justify-between bg-black md:pr-6 lg:pr-6" }, ge = ["href"], xe = /* @__PURE__ */ t("img", {
24
+ class: "h-16 w-auto cursor-pointer",
25
+ src: K,
26
+ alt: "Genome Logo"
27
+ }, null, -1), ve = [
28
+ xe
29
+ ], Ae = ["href"], ye = /* @__PURE__ */ t("img", {
30
+ class: "h-6 w-28 cursor-pointer md:w-36",
31
+ src: ee,
32
+ alt: "Aiguru Logo"
33
+ }, null, -1), be = [
34
+ ye
35
+ ], we = /* @__PURE__ */ w({
36
+ __name: "headerAMA",
37
+ setup(o) {
38
+ const e = q(), i = v(""), l = v(""), m = P(te(se, void 0), window.location);
39
+ return m === "prod" ? i.value = "https://genome.genpact.com" : i.value = "https://genome-dev.genpact.com", m === "prod" ? l.value = "https://genome.genpact.com/#aiguru" : l.value = "https://genome-dev.genpact.com/#aiguru", (d, r) => (_(), h("nav", fe, [
40
+ t("a", {
41
+ class: "px-2 md:px-0 lg:px-0",
42
+ href: p(e).url(i.value),
43
+ target: "_blank"
44
+ }, ve, 8, ge),
45
+ t("a", {
46
+ class: "px-2 md:px-0 lg:px-0",
47
+ href: p(e).url(l.value),
48
+ target: "_blank"
49
+ }, be, 8, Ae)
50
+ ]));
51
+ }
52
+ }), ke = { class: "fontFormattingAMA py-2" }, $e = { class: "text-base font-semibold text-[#181C23] md:text-lg" }, Fe = { key: 0 }, qe = ["innerHTML"], Me = /* @__PURE__ */ w({
53
+ __name: "greetingsAMA",
54
+ setup(o) {
55
+ const e = L(), i = q(), l = ` Hi ${e.learnerName || "Learner"}! 👋`, m = F(() => l), d = F(() => i.text(l.replace("👋", "👋")));
56
+ return F(() => `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.`), (r, s) => (_(), h("section", null, [
57
+ t("div", ke, [
58
+ t("div", $e, [
59
+ p(i).native ? (_(), h("div", Fe, C(d.value), 1)) : (_(), h("div", {
60
+ key: 1,
61
+ innerHTML: m.value
62
+ }, null, 8, qe))
63
+ ])
64
+ ])
65
+ ]));
66
+ }
67
+ }), Ie = (o) => (N("data-v-684baff4"), o = o(), Q(), o), Se = { class: "fontFormattingAMA flex justify-start py-2" }, Le = { class: "w-full max-w-[92%]" }, Ce = { class: "line-break rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-4 py-4 text-sm leading-6 text-[#3f4451]" }, Ee = ["innerHTML"], Be = /* @__PURE__ */ Ie(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ne = /* @__PURE__ */ w({
68
+ __name: "responseAMA",
69
+ props: {
70
+ answer: {
71
+ type: String,
72
+ required: !0
73
+ }
74
+ },
75
+ setup(o) {
76
+ const e = o, i = q(), l = (r) => r.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>").replace(/\*/g, ""), m = (r) => {
77
+ const s = [];
78
+ let f = [];
79
+ const n = () => {
80
+ f.length && (s.push({ html: `<ul style="list-style: disc; margin: 0 0 0 2.5rem; padding: 0;">${f.join("")}</ul>`, block: !0 }), f = []);
81
+ };
82
+ for (const a of r.split(`
83
+ `)) {
84
+ if (!a.trim()) {
85
+ n();
86
+ const c = s[s.length - 1];
87
+ c && !c.block && c.html !== "" && s.push({ html: "", block: !1 });
88
+ continue;
89
+ }
90
+ const x = a.match(/^\s*[-*•]\s+(.*)$/);
91
+ if (x) {
92
+ f.push(`<li>${l(x[1])}</li>`);
93
+ continue;
94
+ }
95
+ n();
96
+ const u = a.match(/^\s*#{1,6}\s*(.*)$/);
97
+ u ? s.push({ html: `<div style="font-weight: 700;">${l(u[1])}</div>`, block: !0 }) : s.push({ html: l(a), block: !1 });
98
+ }
99
+ n();
100
+ for (let a = s.length - 2; a >= 0; a--)
101
+ s[a].html === "" && !s[a].block && s[a + 1].block && s.splice(a, 1);
102
+ for (; s.length && s[s.length - 1].html === ""; )
103
+ s.pop();
104
+ return s.reduce((a, x, u) => u === 0 ? x.html : a + (x.block || s[u - 1].block ? "" : `
105
+ `) + x.html, "");
106
+ }, d = F(() => {
107
+ const r = m(e.answer).replace(
108
+ /Assessment Rating & Feedback/g,
109
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
110
+ ), s = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, f = r.replace(s, (n, a, x) => `<a href="${i.url(x)}" target="_blank" rel="noopener noreferrer" style="color: #00AECF; text-decoration: underline;">${a}</a>`);
111
+ return i.html(f);
112
+ });
113
+ return (r, s) => (_(), h("div", Se, [
114
+ t("div", Le, [
115
+ t("div", Ce, [
116
+ t("span", {
117
+ class: "fontFormattingAMA answer-link",
118
+ innerHTML: d.value
119
+ }, null, 8, Ee)
120
+ ]),
121
+ Be
122
+ ])
123
+ ]));
124
+ }
125
+ });
126
+ const Qe = /* @__PURE__ */ M(Ne, [["__scopeId", "data-v-684baff4"]]), Re = { class: "fontFormattingAMA flex justify-end py-2" }, Te = { class: "max-w-[80%]" }, je = { 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]" }, Ve = /* @__PURE__ */ t("div", { class: "mt-1 text-right text-xs text-gray-400" }, "You", -1), Ge = /* @__PURE__ */ w({
127
+ __name: "learnerAMA",
128
+ props: {
129
+ question: {
130
+ type: String,
131
+ required: !0
132
+ }
133
+ },
134
+ setup(o) {
135
+ return (e, i) => (_(), h("div", Re, [
136
+ t("div", Te, [
137
+ t("div", je, [
138
+ t("div", He, C(o.question), 1)
139
+ ]),
140
+ Ve
141
+ ])
142
+ ]));
143
+ }
144
+ }), T = (o) => (N("data-v-9fdc3afc"), o = o(), Q(), o), ze = { class: "fontFormattingAMA flex w-full justify-start py-2" }, Ue = { class: "w-full max-w-[92%]" }, We = { class: "rounded-2xl rounded-bl-sm border border-gray-200 bg-gray-50 px-4 py-4" }, De = {
145
+ class: "flex items-center gap-2.5",
146
+ role: "status",
147
+ "aria-live": "polite"
148
+ }, Oe = /* @__PURE__ */ T(() => /* @__PURE__ */ t("span", {
149
+ class: "dots flex shrink-0 items-center gap-1",
150
+ "aria-hidden": "true"
151
+ }, [
152
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
153
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" }),
154
+ /* @__PURE__ */ t("span", { class: "h-1.5 w-1.5 rounded-full bg-[#FFAB28]" })
155
+ ], -1)), Pe = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "mt-4 space-y-2.5" }, [
156
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-full rounded" }),
157
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-11/12 rounded" }),
158
+ /* @__PURE__ */ t("div", { class: "shimmer h-2.5 w-4/6 rounded" })
159
+ ], -1)), Ke = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "mt-1 text-xs text-gray-400" }, "AI Guru", -1)), Ye = /* @__PURE__ */ w({
160
+ __name: "LoadingResponseAMA",
161
+ setup(o) {
162
+ const e = q(), i = [
163
+ "Generating response",
164
+ "Fetching the best response for you",
165
+ "Thinking... give me a moment",
166
+ "One moment while I gather the information",
167
+ "Hang in tight, we are almost there",
168
+ "Almost there... just a bit longer",
169
+ "Compiling a response for you"
170
+ ], l = v(0), m = setInterval(() => {
171
+ var d, r;
172
+ !((r = (d = e.scope) == null ? void 0 : d.isActive) != null && r.call(d)) && e.native || (l.value = (l.value + 1) % i.length);
173
+ }, 5e3);
174
+ return e.own(() => clearInterval(m)), (d, r) => (_(), h("div", ze, [
175
+ t("div", Ue, [
176
+ t("div", We, [
177
+ t("div", De, [
178
+ Oe,
179
+ A(ne, {
180
+ name: "fade",
181
+ mode: "out-in"
182
+ }, {
183
+ default: V(() => [
184
+ (_(), h("span", {
185
+ key: l.value,
186
+ class: "text-xs italic leading-4 text-gray-500"
187
+ }, C(i[l.value]), 1))
188
+ ]),
189
+ _: 1
190
+ })
191
+ ]),
192
+ Pe
193
+ ]),
194
+ Ke
195
+ ])
196
+ ]));
197
+ }
198
+ });
199
+ const Je = /* @__PURE__ */ M(Ye, [["__scopeId", "data-v-9fdc3afc"]]), Xe = { key: 0 }, Ze = { key: 1 }, et = {
200
+ key: 0,
201
+ class: "flex"
202
+ }, tt = /* @__PURE__ */ w({
203
+ __name: "conversationAMA",
204
+ setup(o) {
205
+ let e = v(""), i = v("");
206
+ e.value = '<a style="color:#00AECF;"', i.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
207
+ const l = L(), m = q(), d = v(), r = () => {
208
+ var n;
209
+ const s = m.native && m.root && typeof m.root.querySelectorAll == "function" ? m.root.querySelectorAll('[name="askQuestion"]') : document.getElementsByName("askQuestion"), f = Array.from(s);
210
+ f.length && ((n = f.pop()) == null || n.scrollIntoView({ behavior: "smooth", block: "center" }));
211
+ };
212
+ return G(r), oe(r), (s, f) => (_(), h("div", {
213
+ ref_key: "nestedElement",
214
+ ref: d,
215
+ class: "smooth-scroll overflow-auto md:px-6 px-2"
216
+ }, [
217
+ A(Me),
218
+ (_(!0), h(ae, null, re(p(l).conversations, (n, a) => (_(), h("div", { key: a }, [
219
+ n.question ? (_(), h("div", Xe, [
220
+ A(Ge, {
221
+ question: n.question,
222
+ c2question: n.c2question,
223
+ "show-feedback": n.showFeedback,
224
+ id: `qId${a}`,
225
+ name: "askQuestion",
226
+ "que-id": a
227
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
228
+ ])) : S("", !0),
229
+ n.answer ? (_(), h("div", Ze, [
230
+ A(Qe, {
231
+ question: n == null ? void 0 : n.question,
232
+ c2question: n == null ? void 0 : n.c2question,
233
+ "show-sources": n == null ? void 0 : n.showSources,
234
+ questionId: n.id,
235
+ answer: n.answer.replaceAll("<a", p(e)).replaceAll("<ul", p(i)),
236
+ "show-feedback": n.showFeedback,
237
+ "related-ques": n.relatedQues,
238
+ "options-array": n.optionsArray,
239
+ "ans-id": a
240
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
241
+ ])) : S("", !0)
242
+ ]))), 128)),
243
+ p(l).dotLoader ? (_(), h("div", et, [
244
+ A(Je)
245
+ ])) : S("", !0)
246
+ ], 512));
247
+ }
248
+ });
249
+ const st = /* @__PURE__ */ M(tt, [["__scopeId", "data-v-ee7bc477"]]), B = (o) => String(o.query.amaId ?? "");
250
+ function nt(o, e, i, l, m, d = (r) => !1) {
251
+ const r = v(!1);
252
+ let s = 0, f = !0;
253
+ const n = () => {
254
+ s += 1, r.value = !1, e.dotLoader = !1;
255
+ };
256
+ R(() => B(o), n), z(() => {
257
+ f = !1, n();
258
+ });
259
+ const a = (u, c) => f && u === s && c === B(o);
260
+ return { isWaitingResponse: r, sendQuestion: async () => {
261
+ var k, $, g;
262
+ if (e.question.trim().length < 1) {
263
+ i.setError("Please enter answer!");
264
+ return;
265
+ }
266
+ if (e.amaQuestionsLeft <= 0) {
267
+ i.setError("You have exhausted your question limit!");
268
+ return;
269
+ }
270
+ const u = ++s, c = B(o);
271
+ r.value = !0, e.dotLoader = !0;
272
+ const y = e.question;
273
+ e.conversations.push({ question: y }), e.question = "";
274
+ const I = {
275
+ skillId: c,
276
+ question: y,
277
+ past_messages: e.past_messages
278
+ };
279
+ try {
280
+ const b = await l(I);
281
+ if (!a(u, c))
282
+ return;
283
+ e.addConversation((k = b.data) == null ? void 0 : k.body, "new"), r.value = !1, e.dotLoader = !1;
284
+ } catch (b) {
285
+ if (d(b) || !a(u, c))
286
+ return;
287
+ r.value = !1, e.dotLoader = !1, m(b) ? i.setError((g = ($ = b.response) == null ? void 0 : $.data) == null ? void 0 : g.message) : i.setError("There was an issue, please contact helpmate");
288
+ }
289
+ } };
290
+ }
291
+ const j = (o) => (N("data-v-7c8476bc"), o = o(), Q(), o), ot = { class: "w-full px-2 pb-3 pt-3 md:px-6" }, at = { class: "relative" }, rt = { class: "pointer-events-none absolute inset-y-0 left-3 flex items-center md:left-4" }, it = {
292
+ class: "flex h-8 w-8 items-center justify-center rounded-full bg-[#FFF4E0] text-[#E08A00] md:h-9 md:w-9",
293
+ "aria-hidden": "true"
294
+ }, lt = ["placeholder"], ct = { class: "absolute inset-y-0 right-2 flex items-center md:right-3" }, dt = {
295
+ key: 1,
296
+ class: "flex h-10 w-10 items-center justify-center rounded-full bg-[#FFF4E0]",
297
+ role: "status",
298
+ "aria-label": "Waiting for response",
299
+ title: "Waiting for response"
300
+ }, ut = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", { class: "h-5 w-5 animate-spin rounded-full border-[2.5px] border-[#FFAB28] border-t-transparent" }, null, -1)), _t = [
301
+ ut
302
+ ], mt = { 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" }, pt = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", null, "Note: AI-generated response may not be fully accurate; check with experts for critical information.", -1)), ht = /* @__PURE__ */ j(() => /* @__PURE__ */ t("span", {
303
+ class: "hidden sm:inline",
304
+ "aria-hidden": "true"
305
+ }, "·", -1)), ft = { class: "font-semibold text-[#181C23]" }, gt = /* @__PURE__ */ w({
306
+ __name: "NewQuestionAMA",
307
+ setup(o) {
308
+ const e = L(), i = U();
309
+ e.question = "";
310
+ const l = v(null), m = v(!1), d = v(E), r = W(), s = D(), { isWaitingResponse: f, sendQuestion: n } = nt(
311
+ r,
312
+ e,
313
+ i,
314
+ (u) => s.postApi("/amaBotResponse", u),
315
+ ie.isAxiosError,
316
+ O
317
+ );
318
+ G(() => {
319
+ l.value.focus();
320
+ });
321
+ const a = F(() => e.question.trim().length > 0);
322
+ R(
323
+ () => e.question,
324
+ async () => {
325
+ await _e();
326
+ const u = l.value;
327
+ u && (u.style.height = "auto", u.style.height = `${u.scrollHeight}px`);
328
+ }
329
+ );
330
+ const x = (u) => {
331
+ const c = u.length;
332
+ d.value = E - c, m.value = c >= E;
333
+ };
334
+ return (u, c) => (_(), h("div", ot, [
335
+ t("div", at, [
336
+ t("div", rt, [
337
+ t("span", it, [
338
+ A(p(he), { class: "h-4 w-4 md:h-5 md:w-5" })
339
+ ])
340
+ ]),
341
+ le(t("textarea", {
342
+ ref_key: "AiSearch",
343
+ ref: l,
344
+ "onUpdate:modelValue": c[0] || (c[0] = (y) => p(e).question = y),
345
+ rows: "1",
346
+ class: "fontFormattingAMA block max-h-40 w-full 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",
347
+ placeholder: `Ask me about ${p(e).amaSkillName || "Skill Name"}`,
348
+ onKeydown: c[1] || (c[1] = de(me((y) => p(f) ? "" : p(n)(), ["exact", "prevent"]), ["enter"])),
349
+ onInput: c[2] || (c[2] = (y) => x(p(e).question))
350
+ }, null, 40, lt), [
351
+ [ce, p(e).question]
352
+ ]),
353
+ t("div", ct, [
354
+ p(f) ? (_(), h("span", dt, _t)) : (_(), h("button", {
355
+ key: 0,
356
+ type: "button",
357
+ title: "Send",
358
+ "aria-label": "Send question",
359
+ class: ue([a.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"]),
360
+ onClick: c[3] || (c[3] = (y) => p(n)())
361
+ }, [
362
+ A(p(Y), {
363
+ class: "h-5 w-5",
364
+ "aria-hidden": "true"
365
+ })
366
+ ], 2))
367
+ ])
368
+ ]),
369
+ t("div", mt, [
370
+ A(p(J), {
371
+ class: "h-4 w-4 shrink-0 text-[#E08A00]",
372
+ "aria-hidden": "true"
373
+ }),
374
+ pt,
375
+ ht,
376
+ t("span", ft, C(p(e).amaQuestionsLeft) + " questions remaining for the day", 1)
377
+ ])
378
+ ]));
379
+ }
380
+ });
381
+ const xt = /* @__PURE__ */ M(gt, [["__scopeId", "data-v-7c8476bc"]]), vt = (o) => String(o.query.amaId ?? "");
382
+ function At(o, e, i, l, m = (d) => !1) {
383
+ const d = v(!0), r = v(!1);
384
+ let s = 0;
385
+ const f = (a) => {
386
+ e.amaSkillId = a, e.amaSkillName = "", e.amaQuestionsLeft = 0, e.question = "", e.conversations = [], e.past_messages = [];
387
+ }, n = async (a) => {
388
+ var c, y, I, k, $;
389
+ const x = ++s;
390
+ d.value = !0, r.value = !1, f(a);
391
+ let u = !1;
392
+ try {
393
+ const g = await l(a);
394
+ if (x !== s)
395
+ return;
396
+ e.initialize(g.data), e.amaQuestionsLeft = (c = g == null ? void 0 : g.data) == null ? void 0 : c.questionsLeftAIGC, e.amaSkillName = (y = g == null ? void 0 : g.data) == null ? void 0 : y.skillName;
397
+ } catch (g) {
398
+ if (m(g)) {
399
+ u = !0;
400
+ return;
401
+ }
402
+ if (x !== s)
403
+ return;
404
+ const b = g && typeof g == "object" && ((I = g.response) == null ? void 0 : I.status);
405
+ b === 424 || b === 425 ? r.value = !0 : b ? i.setError(($ = (k = g.response) == null ? void 0 : k.data) == null ? void 0 : $.message) : i.setError("There was an issue, please contact helpmate");
406
+ } finally {
407
+ !u && x === s && (d.value = !1);
408
+ }
409
+ };
410
+ return R(() => vt(o), (a) => {
411
+ n(a);
412
+ }, { immediate: !0 }), z(() => {
413
+ s += 1;
414
+ }), { loaderValue: d, notAllowedModalVisible: r };
415
+ }
416
+ const yt = {
417
+ key: 1,
418
+ class: "flex h-screen flex-col overflow-hidden"
419
+ }, bt = { class: "z-20 shrink-0" }, wt = { class: "min-h-0 flex-1 overflow-hidden pb-1" }, kt = { class: "flex h-full flex-col bg-gray-100 px-2 sm:px-6 md:px-10 lg:px-20" }, $t = { class: "fontFormattingAMA flex min-h-0 flex-1 flex-col border-x border-b border-black bg-white pt-3 md:pt-4" }, Ft = { class: "shrink-0" }, qt = /* @__PURE__ */ w({
420
+ __name: "AssessmentAMA",
421
+ setup(o) {
422
+ const e = L(), i = U(), l = W(), m = D(), { loaderValue: d, notAllowedModalVisible: r } = At(
423
+ l,
424
+ e,
425
+ i,
426
+ (s) => m.getApi(`/getLearnerData?amaSkillId=${s}`),
427
+ O
428
+ );
429
+ return (s, f) => (_(), h("section", null, [
430
+ p(r) ? (_(), H(X, {
431
+ key: 0,
432
+ tone: "error",
433
+ title: "Assessment Access Required"
434
+ }, {
435
+ default: V(() => [
436
+ pe(" You don't have access to this assessment. Please contact to administrator ")
437
+ ]),
438
+ _: 1
439
+ })) : S("", !0),
440
+ t("div", null, [
441
+ p(d) ? (_(), H(Z, {
442
+ key: 0,
443
+ message: "Loading AI Guru"
444
+ })) : (_(), h("main", yt, [
445
+ t("div", bt, [
446
+ A(we)
447
+ ]),
448
+ t("section", wt, [
449
+ t("div", kt, [
450
+ t("div", $t, [
451
+ A(st, { class: "min-h-0 flex-1" }),
452
+ t("div", Ft, [
453
+ A(xt)
454
+ ])
455
+ ])
456
+ ])
457
+ ])
458
+ ]))
459
+ ])
460
+ ]));
461
+ }
462
+ });
463
+ const Bt = /* @__PURE__ */ M(qt, [["__scopeId", "data-v-23039b1d"]]);
464
+ export {
465
+ Bt as default
466
+ };