@genpact/genome.mfe.mgtwin-app 1.1.263-alpha → 1.1.265-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.
@@ -1,4 +1,4 @@
1
- import { o as e, c as r, a } from "./main-cf7aa8cc.mjs";
1
+ import { o as e, c as r, a } from "./main-f2a25acd.mjs";
2
2
  function c(l, o) {
3
3
  return e(), r("svg", {
4
4
  xmlns: "http://www.w3.org/2000/svg",
@@ -0,0 +1,650 @@
1
+ import { _ as We, a as Ze, b as Je, c as Xe, L as et } from "./LoadingSimulation-15902de8.mjs";
2
+ import { _ as tt, Q as W, M as Oe, a as st } from "./Modal-470d6879.mjs";
3
+ import { d as L, r as p, H, o as r, c, a as e, u as z, y as J, t as P, I as Ue, b as y, F as X, e as ee, w as Qe, J as at, f as N, p as Q, g as Y, i as ot, G as nt, C as te, z as lt, K as it, h as R, k as Ye, m as rt, L as ct, q as D, s as dt, l as ut } from "./main-f2a25acd.mjs";
4
+ import { _ as G } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ import { p as He, g as Z } from "./api-5760845b.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ const mt = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, pt = ["href"], ft = /* @__PURE__ */ e("img", {
8
+ class: "h-11 w-auto cursor-pointer",
9
+ src: We,
10
+ alt: "Genome Logo"
11
+ }, null, -1), ht = [
12
+ ft
13
+ ], gt = ["href"], _t = /* @__PURE__ */ e("img", {
14
+ class: "h-9 w-28 cursor-pointer md:w-36",
15
+ src: tt,
16
+ alt: "Aiguru Logo"
17
+ }, null, -1), vt = [
18
+ _t
19
+ ], yt = /* @__PURE__ */ L({
20
+ __name: "headerAMA",
21
+ setup(i) {
22
+ const a = p(""), d = p("");
23
+ return H === "prod" ? a.value = "https://genome.genpact.com" : a.value = "https://genome-dev.genpact.com", H === "prod" ? d.value = "https://genome.genpact.com/#aiguru" : d.value = "https://genome-dev.genpact.com/#aiguru", (_, t) => (r(), c("nav", mt, [
24
+ e("a", {
25
+ class: "px-2 md:px-0 lg:px-0",
26
+ href: a.value,
27
+ target: "_blank"
28
+ }, ht, 8, pt),
29
+ e("a", {
30
+ class: "px-2 md:px-0 lg:px-0",
31
+ href: d.value,
32
+ target: "_blank"
33
+ }, vt, 8, gt)
34
+ ]));
35
+ }
36
+ }), xt = { class: "flex items-end justify-start" }, bt = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, wt = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, At = { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, kt = /* @__PURE__ */ e("br", null, null, -1), $t = /* @__PURE__ */ L({
37
+ __name: "greetingsAMA",
38
+ setup(i) {
39
+ const a = z(), d = ` Hi ${a.learnerName || "Expert"}, and welcome!`, _ = J(() => d), t = J(() => a.welcomeMessage);
40
+ return (n, x) => (r(), c("section", null, [
41
+ e("div", xt, [
42
+ e("div", bt, [
43
+ e("div", wt, P(_.value), 1),
44
+ e("div", At, P(t.value), 1)
45
+ ])
46
+ ]),
47
+ kt
48
+ ]));
49
+ }
50
+ }), se = (i) => (Q("data-v-ebfa4b34"), i = i(), Y(), i), St = { class: "fontFormattingAMA flex items-end justify-start py-2" }, Mt = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Tt = ["innerHTML"], qt = ["innerHTML"], Ft = {
51
+ key: 0,
52
+ class: "py-4"
53
+ }, It = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, Ct = ["value", "disabled", "name"], Rt = {
54
+ for: "item",
55
+ name: "options-Array",
56
+ id: "index"
57
+ }, Lt = {
58
+ key: 1,
59
+ class: "py-4"
60
+ }, Et = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, Nt = ["onClick", "disabled", "name"], Bt = {
61
+ for: "item",
62
+ name: "options-Array",
63
+ id: "index"
64
+ }, Pt = {
65
+ key: 2,
66
+ class: "flex flex-col justify-start py-10"
67
+ }, Vt = /* @__PURE__ */ se(() => /* @__PURE__ */ e("div", { class: "mb-4" }, " Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ", -1)), jt = /* @__PURE__ */ se(() => /* @__PURE__ */ e("img", {
68
+ class: "h-20 w-20",
69
+ src: Ze,
70
+ alt: "qr_code"
71
+ }, null, -1)), Dt = [
72
+ Vt,
73
+ jt
74
+ ], zt = {
75
+ key: 3,
76
+ class: "flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"
77
+ }, Gt = /* @__PURE__ */ se(() => /* @__PURE__ */ e("div", { class: "" }, [
78
+ /* @__PURE__ */ ot(" Please select interaction mode below "),
79
+ /* @__PURE__ */ e("span", { class: "italic" }, "(Note: once selected the mode can't be changed during the interaction. You need to re-start to change the interaction mode)")
80
+ ], -1)), Ot = { class: "flex justify-start items-center md:gap-[40px] gap-[30px]" }, Ut = /* @__PURE__ */ L({
81
+ __name: "responseAMA",
82
+ props: {
83
+ question: {
84
+ type: String,
85
+ required: !0
86
+ },
87
+ c2question: {
88
+ type: String,
89
+ required: !0
90
+ },
91
+ answer: {
92
+ type: String,
93
+ required: !0
94
+ },
95
+ questionId: {
96
+ type: String,
97
+ required: !0
98
+ },
99
+ showFeedback: {
100
+ type: Boolean,
101
+ default: !0
102
+ },
103
+ showSources: {
104
+ type: String,
105
+ default: ""
106
+ },
107
+ relatedQues: {
108
+ type: Array,
109
+ required: !0
110
+ },
111
+ optionsArray: {
112
+ type: Array,
113
+ // eslint-disable-next-line vue/require-valid-default-prop
114
+ default: []
115
+ },
116
+ ansId: {
117
+ type: Number,
118
+ default: 0
119
+ }
120
+ },
121
+ emits: ["char-typed"],
122
+ setup(i, { emit: a }) {
123
+ const d = i, _ = p([]), t = p(!1), n = z(), x = p("");
124
+ let v = [], l = "";
125
+ const F = async () => {
126
+ console.log("startCharByChar "), v = l.split(""), x.value = "";
127
+ for (let o = 0; o < v.length; o++)
128
+ x.value += v[o], o % 30 && a("char-typed"), await new Promise((u) => setTimeout(u, 50));
129
+ }, I = () => {
130
+ n.showSelectTypeConvesation = !1, n.isRestart = !0, n.showModelToggle = !1, n.isSpeechToggle = !1, console.log("text mode", n.isSpeechToggle);
131
+ }, T = () => {
132
+ n.isRestart = !0, n.beginFlag = !0, n.showVoiceComponent = !0, n.showSelectTypeConvesation = !1, n.showModelToggle = !0, n.isSpeechToggle = !1, console.log("text mode", n.isSpeechToggle);
133
+ }, w = J(() => {
134
+ const o = d.answer.replace(/[*#]/g, "").replace(
135
+ /Assessment Rating & Feedback/g,
136
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
137
+ ).replace(
138
+ /BEGIN ROLE PLAY./g,
139
+ '<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>'
140
+ );
141
+ (o.includes("Thank you for your participation!") || o.includes("Thank you for your participation")) && (n.searchBoxdisable = !1, t.value = !0), (o.includes("BEGIN ROLE PLAY") || o.includes("BEGIN ROLE PLAY.")) && (n.showSelectTypeConvesation = !0);
142
+ const u = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
143
+ if (o.includes("AI Guru")) {
144
+ if (o.includes("AI Guru"))
145
+ return console.log("aig found"), o.replace(u, (f, h, $) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${h}</a>`);
146
+ } else
147
+ return o.replace(u, (f, h, $) => `<a href="${$}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${h}</a>`);
148
+ if (o.includes("Assessment Rating & Feedback")) {
149
+ const f = o.split("Assessment Rating & Feedback")[0], h = o.split("Assessment Rating & Feedback")[1];
150
+ n.conversations.push(f), n.conversations.push(h);
151
+ }
152
+ });
153
+ return Ue(
154
+ () => d.answer,
155
+ () => {
156
+ let o = d.answer.replace(/[*#]/g, "").replace(
157
+ /Assessment Rating & Feedback/g,
158
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
159
+ );
160
+ const u = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
161
+ if (o.includes("AI Guru") ? o = o.replace(u, (f, h, $) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${h}</a>`) : o = o.replace(u, (f, h, $) => `<a href="${$}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${h}</a>`), o.includes("Assessment Rating & Feedback")) {
162
+ const f = o.split("Assessment Rating & Feedback")[0], h = o.split("Assessment Rating & Feedback")[1];
163
+ n.conversations.push(f), n.conversations.push(h);
164
+ }
165
+ l = o, n.showVoiceComponent && F(), console.log("watch for startCharByChar");
166
+ },
167
+ { immediate: !0 }
168
+ ), Ue(_, (o) => {
169
+ n.question = (o ?? []).join(", "), console.log("selectedOptions", o);
170
+ }), (o, u) => (r(), c("div", St, [
171
+ e("div", Mt, [
172
+ y(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && y(n).showVoiceComponent === !0 && y(n).conversations.length - 1 === d.ansId && !d.answer.includes("BEGIN ROLE PLAY") ? (r(), c("span", {
173
+ key: 0,
174
+ class: "fontFormattingAMA",
175
+ innerHTML: x.value
176
+ }, null, 8, Tt)) : (r(), c("span", {
177
+ key: 1,
178
+ class: "fontFormattingAMA",
179
+ innerHTML: w.value
180
+ }, null, 8, qt)),
181
+ e("div", null, [
182
+ i.optionsArray.length && y(n).mcqType === "multi_choice" ? (r(), c("div", Ft, [
183
+ (r(!0), c(X, null, ee(i.optionsArray, (f, h) => (r(), c("div", {
184
+ key: h,
185
+ class: "italic"
186
+ }, [
187
+ e("div", It, [
188
+ Qe(e("input", {
189
+ class: "mr-4 cursor-pointer",
190
+ type: "checkbox",
191
+ value: f,
192
+ "onUpdate:modelValue": u[0] || (u[0] = ($) => _.value = $),
193
+ disabled: y(n).conversations.length - 1 !== d.ansId,
194
+ name: w.value
195
+ }, null, 8, Ct), [
196
+ [at, _.value]
197
+ ]),
198
+ e("label", Rt, P(f), 1)
199
+ ])
200
+ ]))), 128))
201
+ ])) : i.optionsArray.length ? (r(), c("div", Lt, [
202
+ (r(!0), c(X, null, ee(i.optionsArray, (f, h) => (r(), c("div", {
203
+ key: h,
204
+ class: "italic"
205
+ }, [
206
+ e("div", Et, [
207
+ e("input", {
208
+ class: "mr-4 cursor-pointer",
209
+ type: "radio",
210
+ onClick: ($) => y(n).question = String(i.optionsArray[h]),
211
+ disabled: y(n).conversations.length - 1 !== d.ansId,
212
+ name: w.value
213
+ }, null, 8, Nt),
214
+ e("label", Bt, P(f), 1)
215
+ ])
216
+ ]))), 128))
217
+ ])) : N("", !0)
218
+ ]),
219
+ t.value && y(n).simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ef" ? (r(), c("div", Pt, Dt)) : N("", !0),
220
+ y(n).isSpeechToggle && y(n).showSelectTypeConvesation && y(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && y(n).conversations.length - 1 === d.ansId ? (r(), c("div", zt, [
221
+ Gt,
222
+ e("div", Ot, [
223
+ e("button", {
224
+ type: "button",
225
+ id: "button",
226
+ onClick: u[1] || (u[1] = (f) => I()),
227
+ class: "mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"
228
+ }, " Text Mode "),
229
+ e("button", {
230
+ type: "button",
231
+ id: "button",
232
+ onClick: u[2] || (u[2] = (f) => T()),
233
+ class: "mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"
234
+ }, " Voice Mode ")
235
+ ])
236
+ ])) : N("", !0)
237
+ ])
238
+ ]));
239
+ }
240
+ });
241
+ const Ht = /* @__PURE__ */ G(Ut, [["__scopeId", "data-v-ebfa4b34"]]), Qt = { class: "flex justify-end items-end py-3" }, Yt = { class: "max-w-[80%]" }, Kt = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, Wt = /* @__PURE__ */ L({
242
+ __name: "learnerAMA",
243
+ props: {
244
+ question: {
245
+ type: String,
246
+ required: !0
247
+ },
248
+ showFeedback: {
249
+ type: Boolean,
250
+ default: !0
251
+ }
252
+ },
253
+ setup(i) {
254
+ return (a, d) => (r(), c("div", Qt, [
255
+ e("div", Yt, [
256
+ e("div", Kt, P(i.question), 1)
257
+ ])
258
+ ]));
259
+ }
260
+ }), Zt = (i) => (Q("data-v-12a02acf"), i = i(), Y(), i), Jt = { class: "flex w-full flex-col items-start justify-start bg-white" }, Xt = { class: "bot-typing-animation gap-1" }, es = { class: "block w-full text-lg italic text-gray-800" }, ts = /* @__PURE__ */ Zt(() => /* @__PURE__ */ e("span", { class: "dot-animation" }, [
261
+ /* @__PURE__ */ e("span", null, "."),
262
+ /* @__PURE__ */ e("span", null, "."),
263
+ /* @__PURE__ */ e("span", null, ".")
264
+ ], -1)), ss = /* @__PURE__ */ nt('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>', 1), as = /* @__PURE__ */ L({
265
+ __name: "LoadingResponseAMA",
266
+ setup(i) {
267
+ const a = p("Generating response"), d = p([
268
+ "This may take a few seconds",
269
+ "Fetching the best response for you",
270
+ "Thinking... give me a moment",
271
+ "One moment while I gather the information",
272
+ "Hang in tight, we are almost there",
273
+ "Almost there... just a bit longer",
274
+ "Compiling a response for you"
275
+ ]);
276
+ return setTimeout(() => {
277
+ const _ = Math.floor(Math.random() * d.value.length);
278
+ a.value = d.value[_];
279
+ }, 15e3), (_, t) => (r(), c("div", Jt, [
280
+ e("div", Xt, [
281
+ e("div", es, P(a.value), 1),
282
+ ts
283
+ ]),
284
+ ss
285
+ ]));
286
+ }
287
+ });
288
+ const os = /* @__PURE__ */ G(as, [["__scopeId", "data-v-12a02acf"]]), ns = { key: 0 }, ls = { key: 1 }, is = {
289
+ key: 0,
290
+ class: "flex"
291
+ }, rs = /* @__PURE__ */ L({
292
+ __name: "conversationAMA",
293
+ setup(i) {
294
+ let a = p(""), d = p("");
295
+ a.value = '<a style="color:#00AECF;"', d.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
296
+ const _ = z(), t = p(), n = () => {
297
+ t.value.scrollTo(0, t.value.scrollHeight);
298
+ };
299
+ return te(() => {
300
+ var l;
301
+ const x = document.getElementsByName("askQuestion"), v = Array.from(x);
302
+ console.log("New array===>", v), x.length && ((l = v == null ? void 0 : v.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" })), window.addEventListener("custom-event", n);
303
+ }), lt(() => {
304
+ var l;
305
+ const x = document.getElementsByName("askQuestion"), v = Array.from(x);
306
+ console.log("New array===>", v), x.length && ((l = v == null ? void 0 : v.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
307
+ }), it(() => {
308
+ window.removeEventListener("custom-event", n);
309
+ }), (x, v) => (r(), c("div", {
310
+ ref_key: "nestedElement",
311
+ ref: t,
312
+ class: "smooth-scroll overflow-auto md:px-6 px-2"
313
+ }, [
314
+ R($t),
315
+ (r(!0), c(X, null, ee(y(_).conversations, (l, F) => (r(), c("div", { key: F }, [
316
+ l.question ? (r(), c("div", ns, [
317
+ R(Wt, {
318
+ question: l.question,
319
+ c2question: l.c2question,
320
+ "show-feedback": l.showFeedback,
321
+ id: `qId${F}`,
322
+ name: "askQuestion",
323
+ "que-id": F
324
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
325
+ ])) : N("", !0),
326
+ l.answer ? (r(), c("div", ls, [
327
+ R(Ht, {
328
+ question: l == null ? void 0 : l.question,
329
+ c2question: l == null ? void 0 : l.c2question,
330
+ "show-sources": l == null ? void 0 : l.showSources,
331
+ questionId: l.id,
332
+ answer: l.answer.replaceAll("<a", y(a)).replaceAll("<ul", y(d)),
333
+ "show-feedback": l.showFeedback,
334
+ "related-ques": l.relatedQues,
335
+ "options-array": l.optionsArray,
336
+ "ans-id": F,
337
+ onCharTyped: n
338
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
339
+ ])) : N("", !0)
340
+ ]))), 128)),
341
+ y(_).dotLoader ? (r(), c("div", is, [
342
+ R(os)
343
+ ])) : N("", !0)
344
+ ], 512));
345
+ }
346
+ });
347
+ const cs = /* @__PURE__ */ G(rs, [["__scopeId", "data-v-f92feaf3"]]), E = (i) => (Q("data-v-1f83b85e"), i = i(), Y(), i), ds = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, us = { class: "py-2" }, ms = { class: "flex" }, ps = { class: "z-1 relative w-full" }, fs = { class: "flex justify-between my-2 w-full" }, hs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", null, null, -1)), gs = {
348
+ key: 0,
349
+ class: "flex justify-center bg-genpact-darkest-blue px-4 rounded-full"
350
+ }, _s = { class: "relative w-full" }, vs = { class: "absolute inset-y-0 left-0 flex items-center pl-3" }, ys = { class: "tooltip" }, xs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("span", { class: "tooltiptext text-genpact-darkest-teal" }, "Restart", -1)), bs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("path", {
351
+ d: "M12 4C8.229 4 6.343 4 5.172 5.172C4.001 6.344 4 8.229 4 12V18C4 18.943 4 19.414 4.293 19.707C4.586 20 5.057 20 6 20H12C15.771 20 17.657 20 18.828 18.828C19.999 17.656 20 15.771 20 12",
352
+ stroke: "currentColor",
353
+ "stroke-width": "2"
354
+ }, null, -1)), ws = /* @__PURE__ */ E(() => /* @__PURE__ */ e("path", {
355
+ d: "M9 10H15M9 14H12M19 8V2M16 5H22",
356
+ stroke: "currentColor",
357
+ "stroke-width": "2",
358
+ "stroke-linecap": "round",
359
+ "stroke-linejoin": "round"
360
+ }, null, -1)), As = [
361
+ bs,
362
+ ws
363
+ ], ks = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, $s = { key: 0 }, Ss = /* @__PURE__ */ E(() => /* @__PURE__ */ e("path", { d: "M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z" }, null, -1)), Ms = [
364
+ Ss
365
+ ], Ts = {
366
+ key: 1,
367
+ class: "tooltip"
368
+ }, qs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), Fs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("img", {
369
+ class: "w-7 h-7",
370
+ src: Xe,
371
+ alt: "watingIcon"
372
+ }, null, -1)), Is = [
373
+ qs,
374
+ Fs
375
+ ], Cs = { class: "flex justify-start gap-2 md:gap-1" }, Rs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", { class: "pt-1 text-start font-sans" }, [
376
+ /* @__PURE__ */ e("div", { class: "flex justify-start items-start text-[#161916] italic" }, "10 questions remaining for the day"),
377
+ /* @__PURE__ */ e("div", { class: "text-xs font-bold text-gray-500 md:text-sm" }, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
378
+ ], -1)), Ls = /* @__PURE__ */ L({
379
+ __name: "NewQuestionAMA",
380
+ setup(i) {
381
+ const a = z(), d = Ye(), _ = p(""), t = p("");
382
+ a.question = "";
383
+ const n = p(null), x = p(!1), v = p(W), l = p(!1);
384
+ t.value = a.recognizedText, te(() => {
385
+ n.value.focus();
386
+ });
387
+ const F = () => {
388
+ window.location.reload();
389
+ }, I = (w) => {
390
+ const o = w.length;
391
+ v.value = W - o, x.value = o >= W;
392
+ }, T = async () => {
393
+ var w, o, u, f, h, $, O, U;
394
+ console.log("options fdsfdscdzxfsdv", a.recognizedText);
395
+ try {
396
+ if (console.log("options fdsfdscdzxfsdv", a.recognizedText), a.question.trim().length < 1) {
397
+ console.log("Please enter answer!");
398
+ return;
399
+ }
400
+ l.value = !0, a.dotLoader = !0;
401
+ const b = {
402
+ question: a.question || a.recognizedText
403
+ };
404
+ console.log("ques", b), a.conversations.push(b);
405
+ const A = p("");
406
+ A.value = a.question || a.recognizedText, a.question = "";
407
+ const q = {
408
+ ohr_id: _.value,
409
+ past_messages: a.past_messages,
410
+ question: A.value || a.recognizedText,
411
+ bandCode: a.band_code,
412
+ userGenomeFunction: a.genomeFunctionValue,
413
+ userGenomeRole: a.genomeRoleValue,
414
+ skillId: a.simulationSkill || "937e84ef-e95d-4327-9afe-e7be2bf420eb"
415
+ }, k = await He("/sqlTest", q);
416
+ if (_.value = (o = (w = k.data) == null ? void 0 : w.body) == null ? void 0 : o.ohr, ((f = (u = k == null ? void 0 : k.data) == null ? void 0 : u.body) == null ? void 0 : f.answer) === "") {
417
+ console.log("in the if case calling api again");
418
+ const g = await He("/sqlTest", q);
419
+ a.addConversation((h = g.data) == null ? void 0 : h.body, "new");
420
+ } else
421
+ console.log("in the else case"), a.addConversation(($ = k.data) == null ? void 0 : $.body, "new");
422
+ console.log("ohr id asdf", _.value), l.value = !1, a.dotLoader = !1, a.recognizedText = "";
423
+ } catch (b) {
424
+ if (console.error(b), a.dotLoader = !1, D.isAxiosError(b)) {
425
+ const A = b;
426
+ console.log("Error found!"), console.error((O = A.response) == null ? void 0 : O.data), d.setError(((U = A.response) == null ? void 0 : U.data).message);
427
+ } else
428
+ d.setError("There was an issue, please contact helpmate");
429
+ }
430
+ };
431
+ return (w, o) => (r(), c("div", ds, [
432
+ e("div", us, [
433
+ e("div", ms, [
434
+ e("div", ps, [
435
+ e("div", fs, [
436
+ hs,
437
+ y(a).showVoiceComponent ? (r(), c("div", gs, [
438
+ R(Je)
439
+ ])) : N("", !0)
440
+ ]),
441
+ e("div", _s, [
442
+ e("div", vs, [
443
+ e("div", ys, [
444
+ xs,
445
+ (r(), c("svg", {
446
+ onClick: F,
447
+ class: "ml-2 h-7 w-7 rounded",
448
+ id: "newTopicDisable",
449
+ width: "7",
450
+ height: "",
451
+ viewBox: "0 0 24 24",
452
+ fill: "none",
453
+ xmlns: "http://www.w3.org/2000/svg",
454
+ title: "restart"
455
+ }, As))
456
+ ])
457
+ ]),
458
+ e("div", ks, [
459
+ l.value ? (r(), c("div", Ts, Is)) : (r(), c("div", $s, [
460
+ (r(), c("svg", {
461
+ onClick: o[0] || (o[0] = (u) => T()),
462
+ xmlns: "http://www.w3.org/2000/svg",
463
+ fill: "currentColor",
464
+ class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
465
+ viewBox: "0 0 16 16"
466
+ }, Ms))
467
+ ]))
468
+ ]),
469
+ e("div", Cs, [
470
+ Qe(e("input", {
471
+ onKeyup: [
472
+ o[1] || (o[1] = ct((u) => l.value ? "" : T(), ["enter"])),
473
+ o[3] || (o[3] = (u) => I(y(a).question))
474
+ ],
475
+ "onUpdate:modelValue": o[2] || (o[2] = (u) => y(a).question = u),
476
+ class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]",
477
+ placeholder: "Write your answer here...",
478
+ type: "text",
479
+ ref_key: "AiSearch",
480
+ ref: n
481
+ }, null, 544), [
482
+ [rt, y(a).question]
483
+ ])
484
+ ])
485
+ ]),
486
+ Rs
487
+ ])
488
+ ])
489
+ ])
490
+ ]));
491
+ }
492
+ });
493
+ const Es = /* @__PURE__ */ G(Ls, [["__scopeId", "data-v-1f83b85e"]]), ae = (i) => (Q("data-v-f73f98a6"), i = i(), Y(), i), Ns = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
494
+ /* @__PURE__ */ e("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
495
+ /* @__PURE__ */ e("h3", { className: "text-lg font-medium my-6 text-center text-gray-500" }, " You don't have access to this assessment. Please contact to administrator ")
496
+ ], -1)), Bs = {
497
+ key: 1,
498
+ className: "h-screen flex flex-col items-stretch"
499
+ }, Ps = { class: "z-20" }, Vs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "mt-6" }, null, -1)), js = { class: "flex h-full items-stretch overflow-hidden" }, Ds = { class: "mx-auto w-11/12 bg-white" }, zs = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, Gs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "mt-[160px]" }, null, -1)), Os = { class: "relative" }, Us = /* @__PURE__ */ L({
500
+ __name: "AssessmentAMA",
501
+ setup(i) {
502
+ const a = p(!0), d = p(!1), _ = p(!1);
503
+ p(!1), p(!1);
504
+ const t = z(), n = Ye(), x = p(""), v = p(""), l = p(""), F = localStorage.getItem("accessToken");
505
+ let I = "", T = "", w = "";
506
+ const o = p(!1), u = new URL(window.location.href), f = u.searchParams.get("amaId") || u.searchParams.get("assessmentId") || "937e84ef-e95d-4327-9afe-e7be2bf420eb";
507
+ v.value = u.searchParams.get("mode") ?? "", t.simulationSkill = f ?? "";
508
+ const h = ["703331197", "703380812", "703331909", "703363051", "703319578"];
509
+ te(async () => {
510
+ console.log("uuid. value", f), a.value = !0, await O(), await U(), await $(), a.value = !1;
511
+ });
512
+ const $ = async () => {
513
+ var b, A, q, k, C, g, M, V, S, j, oe, ne, le, ie, re, ce, de, ue, me, pe, fe, he, ge, _e, ve, ye, xe, be, we, Ae, ke, $e, Se, Me, Te, qe, Fe, Ie, Ce, Re, Le, Ee, Ne, Be, Pe, Ve, je, De, ze, Ge;
514
+ console.log("Start getAssessmentDetails");
515
+ try {
516
+ I = "https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=d9828d76-cfab-4563-8ff4-1e86a9d3bc8f";
517
+ const s = await Z(I);
518
+ console.log("response from GetAMA", s), x.value = (A = (b = s == null ? void 0 : s.data) == null ? void 0 : b.data) == null ? void 0 : A.name, t.welcomeMessage = (k = (q = s == null ? void 0 : s.data) == null ? void 0 : q.data) == null ? void 0 : k.displayMsg, console.log("response from GetAMA skill Name", x.value), t.skillNameForSimulation = x.value, t.generatedPrompt = (g = (C = s == null ? void 0 : s.data) == null ? void 0 : C.data) == null ? void 0 : g.generatedPrompt, t.assessmentType = (V = (M = s == null ? void 0 : s.data) == null ? void 0 : M.data) == null ? void 0 : V.assessmentType, l.value = (j = (S = s == null ? void 0 : s.data) == null ? void 0 : S.data) == null ? void 0 : j.status, o.value = (ne = (oe = s == null ? void 0 : s.data) == null ? void 0 : oe.data) == null ? void 0 : ne.editMode, t.empSeniority = (ie = (le = s == null ? void 0 : s.data) == null ? void 0 : le.data) == null ? void 0 : ie.empSeniority, t.functionRole = (ce = (re = s == null ? void 0 : s.data) == null ? void 0 : re.data) == null ? void 0 : ce.functionRole, T = (ue = (de = s == null ? void 0 : s.data) == null ? void 0 : de.data) == null ? void 0 : ue.accessBand, w = (pe = (me = s == null ? void 0 : s.data) == null ? void 0 : me.data) == null ? void 0 : pe.accessOhrList;
519
+ const B = (he = (fe = s == null ? void 0 : s.data) == null ? void 0 : fe.data) == null ? void 0 : he.createdBy;
520
+ if (t.mcqType = (_e = (ge = s == null ? void 0 : s.data) == null ? void 0 : ge.data) == null ? void 0 : _e.mcqTypes, t.storeFinalFeedback = (ye = (ve = s == null ? void 0 : s.data) == null ? void 0 : ve.data) == null ? void 0 : ye.storeFinalFeedback, t.storeFinalScore = (be = (xe = s == null ? void 0 : s.data) == null ? void 0 : xe.data) == null ? void 0 : be.storeFinalScore, l.value === "inactive")
521
+ d.value = !0;
522
+ else if (l.value === "draft")
523
+ v.value !== Oe.DRAFT && (d.value = !0);
524
+ else if (l.value === "active" && o.value && v.value === Oe.DRAFT) {
525
+ console.log("fetching values from draft table.....", o.value), H === "prod" ? I = `https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${t.simulationSkill}` : I = `https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${t.simulationSkill}`;
526
+ const m = await Z(I);
527
+ t.generatedPrompt = (Ae = (we = m == null ? void 0 : m.data) == null ? void 0 : we.data) == null ? void 0 : Ae.generatedPrompt, t.assessmentType = ($e = (ke = m == null ? void 0 : m.data) == null ? void 0 : ke.data) == null ? void 0 : $e.assessmentType, t.empSeniority = (Me = (Se = m == null ? void 0 : m.data) == null ? void 0 : Se.data) == null ? void 0 : Me.empSeniority, t.functionRole = (qe = (Te = m == null ? void 0 : m.data) == null ? void 0 : Te.data) == null ? void 0 : qe.functionRole, t.storeFinalFeedback = (Ie = (Fe = m == null ? void 0 : m.data) == null ? void 0 : Fe.data) == null ? void 0 : Ie.storeFinalFeedback, t.storeFinalScore = (Re = (Ce = m == null ? void 0 : m.data) == null ? void 0 : Ce.data) == null ? void 0 : Re.storeFinalScore, T = (Ee = (Le = m == null ? void 0 : m.data) == null ? void 0 : Le.data) == null ? void 0 : Ee.accessBand, w = (Be = (Ne = m == null ? void 0 : m.data) == null ? void 0 : Ne.data) == null ? void 0 : Be.accessOhrList;
528
+ }
529
+ console.log("store mcqType====>", t.mcqType);
530
+ const Ke = t == null ? void 0 : t.band_code;
531
+ console.log("accessBand , accessOhrList====>", T, w);
532
+ const K = (Pe = T == null ? void 0 : T.split(",")) == null ? void 0 : Pe.map((m) => m.trim());
533
+ if (console.log("bands ,====>", K), B === (t == null ? void 0 : t.ohr) || h.includes(t == null ? void 0 : t.ohr))
534
+ console.log("User has access to this assessment.");
535
+ else {
536
+ if (K.length === 0 && w.length === 0)
537
+ throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
538
+ response: {
539
+ status: 424,
540
+ data: {
541
+ message: "You don't have access to this assessment. Please contact to administrator"
542
+ }
543
+ }
544
+ };
545
+ if (K.includes(Ke) || w.includes(t == null ? void 0 : t.ohr))
546
+ console.log("User has access to this assessment.");
547
+ else
548
+ throw console.log("User does not have access to this assessment."), {
549
+ response: {
550
+ status: 424,
551
+ data: {
552
+ message: "You don't have access to this assessment. Please contact to administrator"
553
+ }
554
+ }
555
+ };
556
+ }
557
+ console.log("end getAssessmentDetails");
558
+ } catch (s) {
559
+ if (console.error(s), a.value = !1, D.isAxiosError(s) && ((Ve = s.response) != null && Ve.status) || s && typeof s == "object" && "response" in s && s.response && typeof s.response == "object" && "status" in s.response && s.response.status) {
560
+ const B = s;
561
+ if (console.log("Error found!"), console.error((je = B.response) == null ? void 0 : je.data), ((De = B.response) == null ? void 0 : De.status) === 424 || ((ze = B.response) == null ? void 0 : ze.status) === 425) {
562
+ _.value = !0;
563
+ return;
564
+ }
565
+ n.setError(((Ge = B.response) == null ? void 0 : Ge.data).message);
566
+ } else
567
+ n.setError("There was an issue, please contact helpmate");
568
+ }
569
+ }, O = async () => {
570
+ var b, A, q, k, C;
571
+ try {
572
+ if (f === null)
573
+ throw {
574
+ response: {
575
+ status: 424,
576
+ data: {
577
+ message: "Invalid URL"
578
+ }
579
+ }
580
+ };
581
+ const g = new URLSearchParams(window.location.search);
582
+ t.simulationSkill = g.get("amaId") || t.simulationSkill, console.log("before calling get learner");
583
+ const M = await Z(
584
+ `/getLearnerData?forSimulation=true&skillForSimulation=${t.simulationSkill}`
585
+ );
586
+ t.initialize(M.data), t.simulationSkill === "937e84ef-e95d-4327-9afe-e7be2bf420eb" ? t.skillNameForSimulation = "GenpactNext" : t.simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ea" || t.simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ef" ? t.skillNameForSimulation = "Agentic AI" : t.simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && (t.skillNameForSimulation = "Data");
587
+ } catch (g) {
588
+ if (console.error(g), a.value = !1, D.isAxiosError(g) && ((b = g.response) != null && b.status) || g && typeof g == "object" && "response" in g && g.response && typeof g.response == "object" && "status" in g.response && g.response.status) {
589
+ const M = g;
590
+ if (console.log("Error found!"), console.error((A = M.response) == null ? void 0 : A.data), ((q = M.response) == null ? void 0 : q.status) === 424 || ((k = M.response) == null ? void 0 : k.status) === 425) {
591
+ _.value = !0;
592
+ return;
593
+ }
594
+ n.setError(((C = M.response) == null ? void 0 : C.data).message);
595
+ } else
596
+ n.setError("There was an issue, please contact helpmate");
597
+ }
598
+ }, U = async () => {
599
+ var b, A, q, k, C, g, M, V;
600
+ try {
601
+ const S = await D({
602
+ url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
603
+ headers: {
604
+ authorization: `Bearer ${F}`,
605
+ "content-type": "application/json"
606
+ },
607
+ method: "get"
608
+ });
609
+ t.genomeFunctionValue = (q = (A = (b = S == null ? void 0 : S.data) == null ? void 0 : b.role_function) == null ? void 0 : A.function) == null ? void 0 : q.name, t.genomeRoleValue = (g = (C = (k = S == null ? void 0 : S.data) == null ? void 0 : k.role_function) == null ? void 0 : C.role) == null ? void 0 : g.name, console.log("profile data", t.genomeFunctionValue, t.genomeRoleValue);
610
+ } catch (S) {
611
+ if (console.error(S), a.value = !1, D.isAxiosError(S)) {
612
+ const j = S;
613
+ console.log("Error found!"), console.error((M = j.response) == null ? void 0 : M.data), n.setError(((V = j.response) == null ? void 0 : V.data).message);
614
+ } else
615
+ n.setError("There was an issue, please contact helpmate");
616
+ }
617
+ };
618
+ return (b, A) => (r(), c("section", null, [
619
+ R(st, { "is-visible": _.value }, {
620
+ default: dt(() => [
621
+ Ns
622
+ ]),
623
+ _: 1
624
+ }, 8, ["is-visible"]),
625
+ e("div", null, [
626
+ a.value ? (r(), ut(et, { key: 0 })) : (r(), c("main", Bs, [
627
+ e("div", Ps, [
628
+ R(yt)
629
+ ]),
630
+ Vs,
631
+ e("div", js, [
632
+ e("div", Ds, [
633
+ e("div", zs, [
634
+ R(cs),
635
+ Gs
636
+ ]),
637
+ e("div", Os, [
638
+ R(Es)
639
+ ])
640
+ ])
641
+ ])
642
+ ]))
643
+ ])
644
+ ]));
645
+ }
646
+ });
647
+ const Js = /* @__PURE__ */ G(Us, [["__scopeId", "data-v-f73f98a6"]]);
648
+ export {
649
+ Js as default
650
+ };