@genpact/genome.mfe.mgtwin-app 1.1.262-alpha → 1.1.264-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.
@@ -0,0 +1,887 @@
1
+ import { _ as ot, i as Oe, s as at, p as nt, a as lt, b as it, c as Ze, L as rt } from "./LoadingSimulation-e27f4f26.mjs";
2
+ import { _ as ct, a as Ke, Q as j, M as Ye } from "./Modal-d16761eb.mjs";
3
+ import { d as L, r as p, H as G, o as r, c, a as t, u as D, k as X, y as ae, h as I, s as Je, t as z, b as l, f as E, i as Y, q as V, I as We, F as ne, e as le, w as ie, J as dt, p as K, g as J, G as ut, C as ee, z as pt, K as mt, n as W, m as Xe, L as et, l as gt } from "./main-631bb3e0.mjs";
4
+ import { p as Z, g as oe } from "./api-65ace030.mjs";
5
+ import { _ as H } from "./_plugin-vue_export-helper-dad06003.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ const ht = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, ft = ["href"], _t = /* @__PURE__ */ t("img", {
8
+ class: "h-11 w-auto cursor-pointer",
9
+ src: ot,
10
+ alt: "Genome Logo"
11
+ }, null, -1), vt = [
12
+ _t
13
+ ], yt = ["href"], bt = /* @__PURE__ */ t("img", {
14
+ class: "h-9 w-28 cursor-pointer md:w-36",
15
+ src: ct,
16
+ alt: "Aiguru Logo"
17
+ }, null, -1), xt = [
18
+ bt
19
+ ], wt = /* @__PURE__ */ L({
20
+ __name: "headerSimulation",
21
+ setup(d) {
22
+ const e = p(""), m = p("");
23
+ return G === "prod" ? e.value = "https://genome.genpact.com" : e.value = "https://genome-dev.genpact.com", G === "prod" ? m.value = "https://genome.genpact.com/#aiguru" : m.value = "https://genome-dev.genpact.com/#aiguru", (_, s) => (r(), c("nav", ht, [
24
+ t("a", {
25
+ class: "px-2 md:px-0 lg:px-0",
26
+ href: e.value,
27
+ target: "_blank"
28
+ }, vt, 8, ft),
29
+ t("a", {
30
+ class: "px-2 md:px-0 lg:px-0",
31
+ href: m.value,
32
+ target: "_blank"
33
+ }, xt, 8, yt)
34
+ ]));
35
+ }
36
+ }), kt = { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA" }, $t = /* @__PURE__ */ t("div", { class: "text-[22px] font-[700]" }, "Please Note Before You Begin", -1), At = /* @__PURE__ */ t("ul", { className: "list-disc max-h-[40vh] overflow-auto space-y-3 pl-6 text-[#102345] text-[15px]" }, [
37
+ /* @__PURE__ */ t("li", null, "Stay expressive — this is an interactive role-play."),
38
+ /* @__PURE__ */ t("li", null, [
39
+ /* @__PURE__ */ Y("The session may take up to "),
40
+ /* @__PURE__ */ t("b", { class: "font-[600]" }, "10 minutes"),
41
+ /* @__PURE__ */ Y(".")
42
+ ]),
43
+ /* @__PURE__ */ t("li", null, "Choose a quiet space and ensure your mic and internet are working."),
44
+ /* @__PURE__ */ t("li", null, [
45
+ /* @__PURE__ */ Y("In Voice Mode? Click "),
46
+ /* @__PURE__ */ t("span", { class: "font-[600]" }, "“Turn on Mic”"),
47
+ /* @__PURE__ */ Y(" to begin.")
48
+ ]),
49
+ /* @__PURE__ */ t("li", null, "Don’t mute until your response is fully processed.")
50
+ ], -1), St = { class: "flex items-end justify-start" }, Ft = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, Tt = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]" }, qt = { class: "w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]" }, Ct = {
51
+ key: 0,
52
+ class: "fontFormattingAMA"
53
+ }, Mt = /* @__PURE__ */ t("br", null, null, -1), It = ` You're about to step into a realistic, voice-based client conversation powered by AI.
54
+ This is a role-play simulation designed to mirror real-world scenarios. Just follow the prompts, speak naturally, and let the AI guide you. Based on your responses, you’ll receive personalized feedback to help sharpen your client engagement skills.`, Lt = /* @__PURE__ */ L({
55
+ __name: "greetingsSimulation",
56
+ setup(d) {
57
+ const e = D(), m = X(), _ = p(!1), s = p(!1), n = p(!0), A = `Hi, get ready to test your ${e.skillNameForSimulation || "GenpactNext"} knowledge! Here’s what to expect:`, v = ` Hi ${e.learnerName || "Expert"}, and welcome!`, i = ` Hi, ${e.learnerName || "Expert"}. Get ready to test your ${e.skillNameForSimulation || "GenpactNext"} knowledge! Here’s what to expect:`, q = ae(() => ["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill) ? A : ["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill) ? v : i), F = `Hi, get ready to test your ${e.skillNameForSimulation || "GenpactNext"} knowledge! Here’s what to expect:`, f = ` AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim() || "GenpactNext"} '. Please provide detailed and thoughtful answers to the best of your knowledge. At the end, you'll receive a feedback, outlining your strengths and improvement areas.`, b = ae(() => ["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill) ? F : ["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill) ? It : f), o = async () => {
58
+ var u, g, h, T, B, P;
59
+ console.log("firstQuestion fired==>"), n.value = !1;
60
+ try {
61
+ const x = {
62
+ question: "Hello, let's start"
63
+ };
64
+ if (e.conversations.push(x), e.assessmentQuestion) {
65
+ const w = {
66
+ past_messages: e.past_messages,
67
+ question: "Let's begin",
68
+ bandCode: e.band_code,
69
+ userGenomeFunction: e.genomeFunctionValue,
70
+ userGenomeRole: e.genomeRoleValue,
71
+ skillId: e.simulationSkill || "937e84ef-e95d-4327-9afe-e7be2bf420eb"
72
+ }, S = p("");
73
+ e.dotLoader = !0, Oe.value = "listening";
74
+ const k = await Z("/sqlTest", w);
75
+ e.addConversation((u = k.data) == null ? void 0 : u.body, "new"), S.value = (h = (g = k == null ? void 0 : k.data) == null ? void 0 : g.body) == null ? void 0 : h.answer, e.dotLoader = !1, Oe.value = "bot", e.showVoiceComponent && (e.elevenLabs ? await at(S.value.replace(/[*#]/g, "")) : await nt(S.value.replace(/[*#]/g, "")));
76
+ } else {
77
+ s.value = !0, e.dotLoader = !0, console.log("firstQuestion fired==> else part");
78
+ const w = {
79
+ assessmentId: e.simulationSkill,
80
+ question: "Hello, Let's begin",
81
+ past_messages: e.past_messages,
82
+ prompt: e.generatedPrompt,
83
+ assessmentType: e.assessmentType,
84
+ userFunction: e.genomeFunctionValue,
85
+ empSeniority: e.empSeniority,
86
+ functionRole: e.functionRole,
87
+ userBand: e,
88
+ storeFinalFeedback: e.storeFinalFeedback,
89
+ storeFinalScore: e.storeFinalScore
90
+ };
91
+ let S;
92
+ G === "prod" ? S = "/ManualExportActivity" : S = "/fetchCompletionDemo";
93
+ const k = await Z(S, w);
94
+ e.addConversation((T = k.data) == null ? void 0 : T.body, "assessment"), e.dotLoader = !1;
95
+ }
96
+ } catch (x) {
97
+ if (console.error(x), V.isAxiosError(x)) {
98
+ const w = x;
99
+ console.log("Error found!"), console.error((B = w.response) == null ? void 0 : B.data), m.setError(((P = w.response) == null ? void 0 : P.data).message);
100
+ } else
101
+ m.setError("There was an issue, please contact helpmate");
102
+ }
103
+ };
104
+ return (u, g) => (r(), c("section", null, [
105
+ I(Ke, { "is-visible": _.value }, {
106
+ default: Je(() => [
107
+ t("div", kt, [
108
+ $t,
109
+ At,
110
+ t("button", {
111
+ onClick: g[0] || (g[0] = (h) => {
112
+ _.value = !1, o();
113
+ }),
114
+ class: "bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"
115
+ }, " Proceed ")
116
+ ])
117
+ ]),
118
+ _: 1
119
+ }, 8, ["is-visible"]),
120
+ t("div", St, [
121
+ t("div", Ft, [
122
+ t("div", Tt, z(q.value), 1),
123
+ t("div", qt, z(b.value), 1)
124
+ ])
125
+ ]),
126
+ l(e).beginFlag ? (r(), c("span", Ct, [
127
+ t("button", {
128
+ type: "button",
129
+ id: "button",
130
+ onClick: g[1] || (g[1] = (h) => {
131
+ l(e).beginFlag = !1, _.value = !0;
132
+ }),
133
+ class: "mt-4 bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"
134
+ }, " Let's begin ")
135
+ ])) : E("", !0),
136
+ Mt
137
+ ]));
138
+ }
139
+ }), re = (d) => (K("data-v-5495a945"), d = d(), J(), d), Rt = { class: "fontFormattingAMA flex items-end justify-start py-2" }, Et = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Nt = ["innerHTML"], Bt = ["innerHTML"], Pt = {
140
+ key: 0,
141
+ class: "py-4"
142
+ }, Vt = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, zt = ["value", "disabled", "name"], Dt = {
143
+ for: "item",
144
+ name: "options-Array",
145
+ id: "index"
146
+ }, Qt = {
147
+ key: 1,
148
+ class: "py-4"
149
+ }, jt = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, Gt = ["onClick", "disabled", "name"], Ht = {
150
+ for: "item",
151
+ name: "options-Array",
152
+ id: "index"
153
+ }, Ut = {
154
+ key: 2,
155
+ class: "flex flex-col justify-start py-10"
156
+ }, Ot = /* @__PURE__ */ re(() => /* @__PURE__ */ t("div", { class: "mb-4" }, " Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ", -1)), Yt = /* @__PURE__ */ re(() => /* @__PURE__ */ t("img", {
157
+ class: "h-20 w-20",
158
+ src: lt,
159
+ alt: "qr_code"
160
+ }, null, -1)), Wt = [
161
+ Ot,
162
+ Yt
163
+ ], Zt = {
164
+ key: 3,
165
+ class: "flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"
166
+ }, Kt = /* @__PURE__ */ re(() => /* @__PURE__ */ t("div", { class: "" }, [
167
+ /* @__PURE__ */ Y(" Please select interaction mode below "),
168
+ /* @__PURE__ */ t("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)")
169
+ ], -1)), Jt = { class: "flex justify-start items-center md:gap-[40px] gap-[30px]" }, Xt = /* @__PURE__ */ L({
170
+ __name: "responseSimulation",
171
+ props: {
172
+ question: {
173
+ type: String,
174
+ required: !0
175
+ },
176
+ c2question: {
177
+ type: String,
178
+ required: !0
179
+ },
180
+ answer: {
181
+ type: String,
182
+ required: !0
183
+ },
184
+ questionId: {
185
+ type: String,
186
+ required: !0
187
+ },
188
+ showFeedback: {
189
+ type: Boolean,
190
+ default: !0
191
+ },
192
+ showSources: {
193
+ type: String,
194
+ default: ""
195
+ },
196
+ relatedQues: {
197
+ type: Array,
198
+ required: !0
199
+ },
200
+ optionsArray: {
201
+ type: Array,
202
+ // eslint-disable-next-line vue/require-valid-default-prop
203
+ default: []
204
+ },
205
+ ansId: {
206
+ type: Number,
207
+ default: 0
208
+ }
209
+ },
210
+ emits: ["char-typed"],
211
+ setup(d, { emit: e }) {
212
+ const m = d, _ = p([]), s = p(!1), n = D(), A = p("");
213
+ let v = [], i = "";
214
+ const q = async () => {
215
+ console.log("startCharByChar "), v = i.split(""), A.value = "";
216
+ for (let o = 0; o < v.length; o++)
217
+ A.value += v[o], o % 30 && e("char-typed"), await new Promise((u) => setTimeout(u, 50));
218
+ }, F = () => {
219
+ n.showSelectTypeConvesation = !1, n.isRestart = !0, n.showModelToggle = !1, n.isSpeechToggle = !1, console.log("text mode", n.isSpeechToggle);
220
+ }, f = () => {
221
+ n.isRestart = !0, n.beginFlag = !0, n.showVoiceComponent = !0, n.showSelectTypeConvesation = !1, n.showModelToggle = !0, n.isSpeechToggle = !1, console.log("text mode", n.isSpeechToggle);
222
+ }, b = ae(() => {
223
+ const o = m.answer.replace(/[*#]/g, "").replace(
224
+ /Assessment Rating & Feedback/g,
225
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
226
+ ).replace(
227
+ /BEGIN ROLE PLAY./g,
228
+ '<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>'
229
+ );
230
+ (o.includes("Thank you for your participation!") || o.includes("Thank you for your participation")) && (n.searchBoxdisable = !1, s.value = !0), (o.includes("BEGIN ROLE PLAY") || o.includes("BEGIN ROLE PLAY.")) && (n.showSelectTypeConvesation = !0);
231
+ const u = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
232
+ if (o.includes("AI Guru")) {
233
+ if (o.includes("AI Guru"))
234
+ return console.log("aig found"), o.replace(u, (g, h, T) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${h}</a>`);
235
+ } else
236
+ return o.replace(u, (g, h, T) => `<a href="${T}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${h}</a>`);
237
+ if (o.includes("Assessment Rating & Feedback")) {
238
+ const g = o.split("Assessment Rating & Feedback")[0], h = o.split("Assessment Rating & Feedback")[1];
239
+ n.conversations.push(g), n.conversations.push(h);
240
+ }
241
+ });
242
+ return We(
243
+ () => m.answer,
244
+ () => {
245
+ let o = m.answer.replace(/[*#]/g, "").replace(
246
+ /Assessment Rating & Feedback/g,
247
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
248
+ );
249
+ const u = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
250
+ if (o.includes("AI Guru") ? o = o.replace(u, (g, h, T) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${h}</a>`) : o = o.replace(u, (g, h, T) => `<a href="${T}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${h}</a>`), o.includes("Assessment Rating & Feedback")) {
251
+ const g = o.split("Assessment Rating & Feedback")[0], h = o.split("Assessment Rating & Feedback")[1];
252
+ n.conversations.push(g), n.conversations.push(h);
253
+ }
254
+ i = o, n.showVoiceComponent && q(), console.log("watch for startCharByChar");
255
+ },
256
+ { immediate: !0 }
257
+ ), We(_, (o) => {
258
+ n.question = (o ?? []).join(", "), console.log("selectedOptions", o);
259
+ }), (o, u) => (r(), c("div", Rt, [
260
+ t("div", Et, [
261
+ l(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && l(n).showVoiceComponent === !0 && l(n).conversations.length - 1 === m.ansId && !m.answer.includes("BEGIN ROLE PLAY") ? (r(), c("span", {
262
+ key: 0,
263
+ class: "fontFormattingAMA",
264
+ innerHTML: A.value
265
+ }, null, 8, Nt)) : (r(), c("span", {
266
+ key: 1,
267
+ class: "fontFormattingAMA",
268
+ innerHTML: b.value
269
+ }, null, 8, Bt)),
270
+ t("div", null, [
271
+ d.optionsArray.length && l(n).mcqType === "multi_choice" ? (r(), c("div", Pt, [
272
+ (r(!0), c(ne, null, le(d.optionsArray, (g, h) => (r(), c("div", {
273
+ key: h,
274
+ class: "italic"
275
+ }, [
276
+ t("div", Vt, [
277
+ ie(t("input", {
278
+ class: "mr-4 cursor-pointer",
279
+ type: "checkbox",
280
+ value: g,
281
+ "onUpdate:modelValue": u[0] || (u[0] = (T) => _.value = T),
282
+ disabled: l(n).conversations.length - 1 !== m.ansId,
283
+ name: b.value
284
+ }, null, 8, zt), [
285
+ [dt, _.value]
286
+ ]),
287
+ t("label", Dt, z(g), 1)
288
+ ])
289
+ ]))), 128))
290
+ ])) : d.optionsArray.length ? (r(), c("div", Qt, [
291
+ (r(!0), c(ne, null, le(d.optionsArray, (g, h) => (r(), c("div", {
292
+ key: h,
293
+ class: "italic"
294
+ }, [
295
+ t("div", jt, [
296
+ t("input", {
297
+ class: "mr-4 cursor-pointer",
298
+ type: "radio",
299
+ onClick: (T) => l(n).question = String(d.optionsArray[h]),
300
+ disabled: l(n).conversations.length - 1 !== m.ansId,
301
+ name: b.value
302
+ }, null, 8, Gt),
303
+ t("label", Ht, z(g), 1)
304
+ ])
305
+ ]))), 128))
306
+ ])) : E("", !0)
307
+ ]),
308
+ s.value && l(n).simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ef" ? (r(), c("div", Ut, Wt)) : E("", !0),
309
+ l(n).isSpeechToggle && l(n).showSelectTypeConvesation && l(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && l(n).conversations.length - 1 === m.ansId ? (r(), c("div", Zt, [
310
+ Kt,
311
+ t("div", Jt, [
312
+ t("button", {
313
+ type: "button",
314
+ id: "button",
315
+ onClick: u[1] || (u[1] = (g) => F()),
316
+ 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]"
317
+ }, " Text Mode "),
318
+ t("button", {
319
+ type: "button",
320
+ id: "button",
321
+ onClick: u[2] || (u[2] = (g) => f()),
322
+ 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]"
323
+ }, " Voice Mode ")
324
+ ])
325
+ ])) : E("", !0)
326
+ ])
327
+ ]));
328
+ }
329
+ });
330
+ const es = /* @__PURE__ */ H(Xt, [["__scopeId", "data-v-5495a945"]]), ts = { class: "flex justify-end items-end py-3" }, ss = { class: "max-w-[80%]" }, os = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, as = /* @__PURE__ */ L({
331
+ __name: "learnerSimulation",
332
+ props: {
333
+ question: {
334
+ type: String,
335
+ required: !0
336
+ },
337
+ showFeedback: {
338
+ type: Boolean,
339
+ default: !0
340
+ }
341
+ },
342
+ setup(d) {
343
+ return (e, m) => (r(), c("div", ts, [
344
+ t("div", ss, [
345
+ t("div", os, z(d.question), 1)
346
+ ])
347
+ ]));
348
+ }
349
+ }), ns = (d) => (K("data-v-347ad6de"), d = d(), J(), d), ls = { class: "flex w-full flex-col items-start justify-start bg-white" }, is = { class: "bot-typing-animation gap-1" }, rs = { class: "block w-full text-lg italic text-gray-800" }, cs = /* @__PURE__ */ ns(() => /* @__PURE__ */ t("span", { class: "dot-animation" }, [
350
+ /* @__PURE__ */ t("span", null, "."),
351
+ /* @__PURE__ */ t("span", null, "."),
352
+ /* @__PURE__ */ t("span", null, ".")
353
+ ], -1)), ds = /* @__PURE__ */ ut('<div class="block w-full max-w-full items-stretch" data-v-347ad6de><div class="flex animate-pulse items-start justify-start space-x-4" data-v-347ad6de><div class="flex-1 space-y-6 py-1" data-v-347ad6de><div class="h-2 w-full rounded bg-gray-300" data-v-347ad6de></div><div class="space-y-3" data-v-347ad6de><div class="grid grid-cols-3 gap-4" data-v-347ad6de><div class="col-span-2 h-2 rounded bg-gray-300" data-v-347ad6de></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-347ad6de></div></div><div class="h-2 rounded bg-gray-300" data-v-347ad6de></div></div></div></div></div>', 1), us = /* @__PURE__ */ L({
354
+ __name: "LoadingResponse",
355
+ setup(d) {
356
+ const e = p("Generating response"), m = p([
357
+ "This may take a few seconds",
358
+ "Fetching the best response for you",
359
+ "Thinking... give me a moment",
360
+ "One moment while I gather the information",
361
+ "Hang in tight, we are almost there",
362
+ "Almost there... just a bit longer",
363
+ "Compiling a response for you"
364
+ ]);
365
+ return setTimeout(() => {
366
+ const _ = Math.floor(Math.random() * m.value.length);
367
+ e.value = m.value[_];
368
+ }, 15e3), (_, s) => (r(), c("div", ls, [
369
+ t("div", is, [
370
+ t("div", rs, z(e.value), 1),
371
+ cs
372
+ ]),
373
+ ds
374
+ ]));
375
+ }
376
+ });
377
+ const ps = /* @__PURE__ */ H(us, [["__scopeId", "data-v-347ad6de"]]), ms = { class: "flex mx-auto justify-end items-end py-3" }, gs = { class: "max-w-[80%]" }, hs = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, fs = /* @__PURE__ */ L({
378
+ __name: "QuestionStreaming",
379
+ setup(d) {
380
+ const e = D();
381
+ return (m, _) => (r(), c("div", ms, [
382
+ t("div", gs, [
383
+ t("div", hs, z(l(e).userSpeechText), 1)
384
+ ])
385
+ ]));
386
+ }
387
+ }), _s = { key: 0 }, vs = { key: 1 }, ys = {
388
+ key: 0,
389
+ class: "flex"
390
+ }, bs = {
391
+ key: 1,
392
+ name: "askQuestion"
393
+ }, xs = /* @__PURE__ */ L({
394
+ __name: "conversationSimulation",
395
+ setup(d) {
396
+ let e = p(""), m = p("");
397
+ e.value = '<a style="color:#00AECF;"', m.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
398
+ const _ = D(), s = p(), n = () => {
399
+ s.value.scrollTo(0, s.value.scrollHeight);
400
+ };
401
+ return ee(() => {
402
+ var i;
403
+ const A = document.getElementsByName("askQuestion"), v = Array.from(A);
404
+ console.log("New array===>", v), A.length && ((i = v == null ? void 0 : v.pop()) == null || i.scrollIntoView({ behavior: "smooth", block: "center" })), window.addEventListener("custom-event", n);
405
+ }), pt(() => {
406
+ var i;
407
+ const A = document.getElementsByName("askQuestion"), v = Array.from(A);
408
+ console.log("New array===>", v), A.length && ((i = v == null ? void 0 : v.pop()) == null || i.scrollIntoView({ behavior: "smooth", block: "center" }));
409
+ }), mt(() => {
410
+ window.removeEventListener("custom-event", n);
411
+ }), (A, v) => (r(), c("div", {
412
+ ref_key: "nestedElement",
413
+ ref: s,
414
+ class: "smooth-scroll overflow-auto md:px-6 px-2"
415
+ }, [
416
+ I(Lt),
417
+ (r(!0), c(ne, null, le(l(_).conversations, (i, q) => (r(), c("div", { key: q }, [
418
+ i.question ? (r(), c("div", _s, [
419
+ I(as, {
420
+ question: i.question,
421
+ c2question: i.c2question,
422
+ "show-feedback": i.showFeedback,
423
+ id: `qId${q}`,
424
+ name: "askQuestion",
425
+ "que-id": q
426
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
427
+ ])) : E("", !0),
428
+ i.answer ? (r(), c("div", vs, [
429
+ I(es, {
430
+ question: i == null ? void 0 : i.question,
431
+ c2question: i == null ? void 0 : i.c2question,
432
+ "show-sources": i == null ? void 0 : i.showSources,
433
+ questionId: i.id,
434
+ answer: i.answer.replaceAll("<a", l(e)).replaceAll("<ul", l(m)),
435
+ "show-feedback": i.showFeedback,
436
+ "related-ques": i.relatedQues,
437
+ "options-array": i.optionsArray,
438
+ "ans-id": q,
439
+ onCharTyped: n
440
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
441
+ ])) : E("", !0)
442
+ ]))), 128)),
443
+ l(_).dotLoader ? (r(), c("div", ys, [
444
+ I(ps)
445
+ ])) : E("", !0),
446
+ l(_).userspeaking ? (r(), c("div", bs, [
447
+ I(fs)
448
+ ])) : E("", !0)
449
+ ], 512));
450
+ }
451
+ });
452
+ const ws = /* @__PURE__ */ H(xs, [["__scopeId", "data-v-e55a322f"]]), N = (d) => (K("data-v-e951c0ed"), d = d(), J(), d), ks = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, $s = { class: "py-2" }, As = { class: "flex" }, Ss = { class: "z-1 relative w-full" }, Fs = { class: "flex justify-between my-2 w-full" }, Ts = /* @__PURE__ */ N(() => /* @__PURE__ */ t("div", null, null, -1)), qs = {
453
+ key: 0,
454
+ class: "flex justify-center bg-genpact-darkest-blue px-4 rounded-full"
455
+ }, Cs = { class: "relative w-full" }, Ms = { class: "absolute inset-y-0 left-0 flex items-center pl-3" }, Is = { class: "tooltip" }, Ls = /* @__PURE__ */ N(() => /* @__PURE__ */ t("span", { class: "tooltiptext text-genpact-darkest-teal" }, "Restart", -1)), Rs = /* @__PURE__ */ N(() => /* @__PURE__ */ t("path", {
456
+ 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",
457
+ stroke: "currentColor",
458
+ "stroke-width": "2"
459
+ }, null, -1)), Es = /* @__PURE__ */ N(() => /* @__PURE__ */ t("path", {
460
+ d: "M9 10H15M9 14H12M19 8V2M16 5H22",
461
+ stroke: "currentColor",
462
+ "stroke-width": "2",
463
+ "stroke-linecap": "round",
464
+ "stroke-linejoin": "round"
465
+ }, null, -1)), Ns = [
466
+ Rs,
467
+ Es
468
+ ], Bs = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, Ps = { key: 0 }, Vs = ["disabled"], zs = /* @__PURE__ */ N(() => /* @__PURE__ */ t("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)), Ds = [
469
+ zs
470
+ ], Qs = {
471
+ key: 1,
472
+ class: "tooltip"
473
+ }, js = /* @__PURE__ */ N(() => /* @__PURE__ */ t("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), Gs = /* @__PURE__ */ N(() => /* @__PURE__ */ t("img", {
474
+ class: "w-7 h-7",
475
+ src: Ze,
476
+ alt: "watingIcon"
477
+ }, null, -1)), Hs = [
478
+ js,
479
+ Gs
480
+ ], Us = { class: "flex justify-start gap-2 md:gap-1" }, Os = ["disabled"], Ys = /* @__PURE__ */ N(() => /* @__PURE__ */ t("div", { class: "pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm" }, [
481
+ /* @__PURE__ */ t("div", null, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
482
+ ], -1)), Ws = /* @__PURE__ */ L({
483
+ __name: "NewQuestionSimulation",
484
+ setup(d) {
485
+ const e = D(), m = X(), _ = p(""), s = p("");
486
+ e.question = "";
487
+ const n = p(null), A = p(!1), v = p(j), i = p(!1);
488
+ s.value = e.recognizedText, ee(() => {
489
+ n.value.focus();
490
+ });
491
+ const q = () => {
492
+ window.location.reload();
493
+ }, F = (b) => {
494
+ const o = b.length;
495
+ v.value = j - o, A.value = o >= j;
496
+ }, f = async () => {
497
+ var b, o, u, g, h, T, B, P;
498
+ console.log("options fdsfdscdzxfsdv", e.recognizedText);
499
+ try {
500
+ if (console.log("options fdsfdscdzxfsdv", e.recognizedText), e.question.trim().length < 1) {
501
+ console.log("Please enter answer!");
502
+ return;
503
+ }
504
+ i.value = !0, e.dotLoader = !0;
505
+ const x = {
506
+ question: e.question || e.recognizedText
507
+ };
508
+ console.log("ques", x), e.conversations.push(x);
509
+ const w = p("");
510
+ w.value = e.question || e.recognizedText, e.question = "";
511
+ const S = {
512
+ ohr_id: _.value,
513
+ past_messages: e.past_messages,
514
+ question: w.value || e.recognizedText,
515
+ bandCode: e.band_code,
516
+ userGenomeFunction: e.genomeFunctionValue,
517
+ userGenomeRole: e.genomeRoleValue,
518
+ skillId: e.simulationSkill || "937e84ef-e95d-4327-9afe-e7be2bf420eb"
519
+ }, k = await Z("/sqlTest", S);
520
+ if (_.value = (o = (b = k.data) == null ? void 0 : b.body) == null ? void 0 : o.ohr, ((g = (u = k == null ? void 0 : k.data) == null ? void 0 : u.body) == null ? void 0 : g.answer) === "") {
521
+ console.log("in the if case calling api again");
522
+ const $ = await Z("/sqlTest", S);
523
+ e.addConversation((h = $.data) == null ? void 0 : h.body, "new");
524
+ } else
525
+ console.log("in the else case"), e.addConversation((T = k.data) == null ? void 0 : T.body, "new");
526
+ console.log("ohr id asdf", _.value), i.value = !1, e.dotLoader = !1, e.recognizedText = "";
527
+ } catch (x) {
528
+ if (console.error(x), e.dotLoader = !1, V.isAxiosError(x)) {
529
+ const w = x;
530
+ console.log("Error found!"), console.error((B = w.response) == null ? void 0 : B.data), m.setError(((P = w.response) == null ? void 0 : P.data).message);
531
+ } else
532
+ m.setError("There was an issue, please contact helpmate");
533
+ }
534
+ };
535
+ return (b, o) => (r(), c("div", ks, [
536
+ t("div", $s, [
537
+ t("div", As, [
538
+ t("div", Ss, [
539
+ t("div", Fs, [
540
+ Ts,
541
+ l(e).showVoiceComponent ? (r(), c("div", qs, [
542
+ I(it)
543
+ ])) : E("", !0)
544
+ ]),
545
+ t("div", Cs, [
546
+ t("div", Ms, [
547
+ t("div", Is, [
548
+ Ls,
549
+ (r(), c("svg", {
550
+ onClick: q,
551
+ class: "ml-2 h-7 w-7 rounded",
552
+ id: "newTopicDisable",
553
+ width: "7",
554
+ height: "",
555
+ viewBox: "0 0 24 24",
556
+ fill: "none",
557
+ xmlns: "http://www.w3.org/2000/svg",
558
+ title: "restart"
559
+ }, Ns))
560
+ ])
561
+ ]),
562
+ t("div", Bs, [
563
+ i.value ? (r(), c("div", Qs, Hs)) : (r(), c("div", Ps, [
564
+ (r(), c("svg", {
565
+ disabled: l(e).beginFlag === !0,
566
+ class: W([
567
+ l(e).beginFlag === !0 ? "cursor-not-allowed text-gray-600" : "cursor-pointer",
568
+ "bi bi-send ml-2 h-7 w-7 rotate-45 rounded"
569
+ ]),
570
+ onClick: o[0] || (o[0] = (u) => l(e).searchBoxdisable === !1 || l(e).beginFlag === !0 ? "" : f()),
571
+ xmlns: "http://www.w3.org/2000/svg",
572
+ fill: "currentColor",
573
+ viewBox: "0 0 16 16"
574
+ }, Ds, 10, Vs))
575
+ ]))
576
+ ]),
577
+ t("div", Us, [
578
+ ie(t("input", {
579
+ onKeyup: [
580
+ o[1] || (o[1] = et((u) => i.value ? "" : f(), ["enter"])),
581
+ o[3] || (o[3] = (u) => F(l(e).question))
582
+ ],
583
+ disabled: l(e).beginFlag === !0 || l(e).searchBoxdisable === !1,
584
+ class: W([
585
+ l(e).beginFlag === !0 || l(e).searchBoxdisable === !1 ? "cursor-not-allowed bg-[#e5e7eb]" : "bg-white",
586
+ "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"
587
+ ]),
588
+ "onUpdate:modelValue": o[2] || (o[2] = (u) => l(e).question = u),
589
+ placeholder: "Write your answer here...",
590
+ type: "text",
591
+ ref_key: "AiSearch",
592
+ ref: n
593
+ }, null, 42, Os), [
594
+ [Xe, l(e).question]
595
+ ])
596
+ ])
597
+ ]),
598
+ Ys
599
+ ])
600
+ ])
601
+ ])
602
+ ]));
603
+ }
604
+ });
605
+ const Zs = /* @__PURE__ */ H(Ws, [["__scopeId", "data-v-e951c0ed"]]), te = (d) => (K("data-v-b13dca42"), d = d(), J(), d), Ks = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, Js = { class: "py-2" }, Xs = { class: "flex" }, eo = { class: "z-1 relative w-full" }, to = { class: "-text-blue absolute inset-y-0 bottom-8 right-0 flex cursor-pointer items-center justify-center pr-4 md:bottom-5 md:pr-8 lg:pr-8" }, so = { key: 0 }, oo = ["disabled"], ao = /* @__PURE__ */ te(() => /* @__PURE__ */ t("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)), no = [
606
+ ao
607
+ ], lo = {
608
+ key: 1,
609
+ class: "tooltip"
610
+ }, io = /* @__PURE__ */ te(() => /* @__PURE__ */ t("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), ro = /* @__PURE__ */ te(() => /* @__PURE__ */ t("img", {
611
+ src: Ze,
612
+ alt: "watingIcon",
613
+ class: "ml-2"
614
+ }, null, -1)), co = [
615
+ io,
616
+ ro
617
+ ], uo = { class: "flex justify-start gap-2 md:gap-1" }, po = ["disabled"], mo = /* @__PURE__ */ te(() => /* @__PURE__ */ t("div", { class: "pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm" }, [
618
+ /* @__PURE__ */ t("div", null, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
619
+ ], -1)), go = /* @__PURE__ */ L({
620
+ __name: "NewMDMQuestionSimulation",
621
+ setup(d) {
622
+ const e = D(), m = X(), _ = p("");
623
+ e.question = "";
624
+ const s = p(null), n = p(!1), A = p(j), v = p(!1);
625
+ _.value = e.recognizedText, ee(() => {
626
+ s.value.focus();
627
+ });
628
+ const i = (F) => {
629
+ const f = F.length;
630
+ A.value = j - f, n.value = f >= j;
631
+ }, q = async () => {
632
+ var F, f, b;
633
+ console.log("options fdsfdscdzxfsdv", e.recognizedText);
634
+ try {
635
+ if (console.log("options fdsfdscdzxfsdv", e.recognizedText), e.question.trim().length < 1) {
636
+ console.log("Please enter answer!");
637
+ return;
638
+ }
639
+ v.value = !0, e.dotLoader = !0;
640
+ const o = {
641
+ question: e.question || e.recognizedText
642
+ };
643
+ console.log("ques", o), e.conversations.push(o);
644
+ const u = p("");
645
+ u.value = e.question || e.recognizedText, e.question = "";
646
+ const g = {
647
+ assessmentId: e.simulationSkill,
648
+ question: u.value,
649
+ past_messages: e.past_messages,
650
+ prompt: e.generatedPrompt,
651
+ assessmentType: e.assessmentType,
652
+ userFunction: "HR",
653
+ empSeniority: e.empSeniority,
654
+ functionRole: e.functionRole,
655
+ userBand: e.band_code,
656
+ storeFinalFeedback: e.storeFinalFeedback,
657
+ storeFinalScore: e.storeFinalScore
658
+ };
659
+ console.log("Payload for MDM1==> ", g);
660
+ let h;
661
+ G === "prod" ? h = "/ManualExportActivity" : h = "/fetchCompletionDemo";
662
+ const T = await Z(h, g);
663
+ e.addConversation((F = T.data) == null ? void 0 : F.body, "new"), v.value = !1, e.dotLoader = !1, e.recognizedText = "";
664
+ } catch (o) {
665
+ if (console.error(o), V.isAxiosError(o)) {
666
+ const u = o;
667
+ console.log("Error found!"), console.error((f = u.response) == null ? void 0 : f.data), m.setError(((b = u.response) == null ? void 0 : b.data).message);
668
+ } else
669
+ m.setError("There was an issue, please contact helpmate");
670
+ }
671
+ };
672
+ return (F, f) => (r(), c("div", Ks, [
673
+ t("div", Js, [
674
+ t("div", Xs, [
675
+ t("div", eo, [
676
+ t("div", to, [
677
+ v.value ? (r(), c("div", lo, co)) : (r(), c("div", so, [
678
+ (r(), c("svg", {
679
+ disabled: l(e).beginFlag === !0,
680
+ class: W([
681
+ l(e).beginFlag === !0 ? "cursor-not-allowed text-gray-600" : "pointer -text-blue",
682
+ "bi bi-send ml-2 h-7 w-7 rotate-45 rounded"
683
+ ]),
684
+ onClick: f[0] || (f[0] = (b) => l(e).searchBoxdisable === !1 || l(e).beginFlag === !0 ? "" : q()),
685
+ xmlns: "http://www.w3.org/2000/svg",
686
+ fill: "currentColor",
687
+ viewBox: "0 0 16 16"
688
+ }, no, 10, oo))
689
+ ]))
690
+ ]),
691
+ t("div", uo, [
692
+ ie(t("textarea", {
693
+ rows: "2",
694
+ onKeyup: [
695
+ f[1] || (f[1] = et((b) => q(), ["enter"])),
696
+ f[3] || (f[3] = (b) => i(l(e).question))
697
+ ],
698
+ disabled: l(e).beginFlag === !0,
699
+ class: W([
700
+ l(e).beginFlag === !0 || l(e).searchBoxdisable === !1 ? "cursor-not-allowed bg-[#e5e7eb]" : "",
701
+ "fontFormattingAMA flex w-full border border-genpact-darkest-teal py-2 pl-2 pr-16 focus:outline-none sm:text-[15px] md:py-3 md:pl-6 lg:py-3 lg:pl-6"
702
+ ]),
703
+ "onUpdate:modelValue": f[2] || (f[2] = (b) => l(e).question = b),
704
+ placeholder: "Write your answer here...",
705
+ type: "text",
706
+ ref_key: "AiSearch",
707
+ ref: s
708
+ }, null, 42, po), [
709
+ [Xe, l(e).question]
710
+ ])
711
+ ]),
712
+ mo
713
+ ])
714
+ ])
715
+ ])
716
+ ]));
717
+ }
718
+ });
719
+ const ho = /* @__PURE__ */ H(go, [["__scopeId", "data-v-b13dca42"]]), tt = (d) => (K("data-v-904e6953"), d = d(), J(), d), fo = /* @__PURE__ */ tt(() => /* @__PURE__ */ t("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
720
+ /* @__PURE__ */ t("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
721
+ /* @__PURE__ */ t("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 ")
722
+ ], -1)), _o = {
723
+ key: 1,
724
+ className: "h-screen flex flex-col items-stretch"
725
+ }, vo = { class: "z-20" }, yo = /* @__PURE__ */ tt(() => /* @__PURE__ */ t("div", { class: "mt-6" }, null, -1)), bo = { class: "flex h-full items-stretch overflow-hidden" }, xo = { class: "mx-auto w-11/12 bg-white" }, wo = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, ko = {
726
+ key: 0,
727
+ class: "relative"
728
+ }, $o = {
729
+ key: 1,
730
+ class: "relative"
731
+ }, Ao = /* @__PURE__ */ L({
732
+ __name: "AssessmentSimulation",
733
+ setup(d) {
734
+ const e = p(!0), m = p(!1), _ = p(!1);
735
+ p(!1), p(!1);
736
+ const s = D(), n = X(), A = p(""), v = p(""), i = p(""), q = localStorage.getItem("accessToken");
737
+ let F = "", f = "", b = "";
738
+ const o = p(!1), u = new URL(window.location.href), g = u.searchParams.get("skillId") || u.searchParams.get("assessmentId") || "937e84ef-e95d-4327-9afe-e7be2bf420eb";
739
+ v.value = u.searchParams.get("mode") ?? "", s.simulationSkill = g ?? "";
740
+ const h = ["703331197", "703380812", "703331909", "703363051", "703319578"];
741
+ ee(async () => {
742
+ console.log("uuid. value", g), e.value = !0, await B(), await P(), s.assessmentQuestion || (console.log("getAssessmentDetails========================>"), await T()), e.value = !1;
743
+ });
744
+ const T = async () => {
745
+ var x, w, S, k, R, $, M, U, C, O, ce, de, ue, pe, me, ge, he, fe, _e, ve, ye, be, xe, we, ke, $e, Ae, Se, Fe, Te, qe, Ce, Me, Ie, Le, Re, Ee, Ne, Be, Pe, Ve, ze, De, Qe, je, Ge, He, Ue;
746
+ console.log("Start getAssessmentDetails");
747
+ try {
748
+ G === "prod" ? F = `https://api-v2.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${s.simulationSkill}` : F = `https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${s.simulationSkill}`;
749
+ const a = await oe(F);
750
+ A.value = (w = (x = a == null ? void 0 : a.data) == null ? void 0 : x.data) == null ? void 0 : w.name, s.skillNameForSimulation = A.value, s.generatedPrompt = (k = (S = a == null ? void 0 : a.data) == null ? void 0 : S.data) == null ? void 0 : k.generatedPrompt, s.assessmentType = ($ = (R = a == null ? void 0 : a.data) == null ? void 0 : R.data) == null ? void 0 : $.assessmentType, i.value = (U = (M = a == null ? void 0 : a.data) == null ? void 0 : M.data) == null ? void 0 : U.status, o.value = (O = (C = a == null ? void 0 : a.data) == null ? void 0 : C.data) == null ? void 0 : O.editMode, s.empSeniority = (de = (ce = a == null ? void 0 : a.data) == null ? void 0 : ce.data) == null ? void 0 : de.empSeniority, s.functionRole = (pe = (ue = a == null ? void 0 : a.data) == null ? void 0 : ue.data) == null ? void 0 : pe.functionRole, f = (ge = (me = a == null ? void 0 : a.data) == null ? void 0 : me.data) == null ? void 0 : ge.accessBand, b = (fe = (he = a == null ? void 0 : a.data) == null ? void 0 : he.data) == null ? void 0 : fe.accessOhrList;
751
+ const Q = (ve = (_e = a == null ? void 0 : a.data) == null ? void 0 : _e.data) == null ? void 0 : ve.createdBy;
752
+ if (s.mcqType = (be = (ye = a == null ? void 0 : a.data) == null ? void 0 : ye.data) == null ? void 0 : be.mcqTypes, s.storeFinalFeedback = (we = (xe = a == null ? void 0 : a.data) == null ? void 0 : xe.data) == null ? void 0 : we.storeFinalFeedback, s.storeFinalScore = ($e = (ke = a == null ? void 0 : a.data) == null ? void 0 : ke.data) == null ? void 0 : $e.storeFinalScore, i.value === "inactive")
753
+ m.value = !0;
754
+ else if (i.value === "draft")
755
+ v.value !== Ye.DRAFT && (m.value = !0);
756
+ else if (i.value === "active" && o.value && v.value === Ye.DRAFT) {
757
+ console.log("fetching values from draft table.....", o.value), G === "prod" ? F = `https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${s.simulationSkill}` : F = `https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${s.simulationSkill}`;
758
+ const y = await oe(F);
759
+ s.generatedPrompt = (Se = (Ae = y == null ? void 0 : y.data) == null ? void 0 : Ae.data) == null ? void 0 : Se.generatedPrompt, s.assessmentType = (Te = (Fe = y == null ? void 0 : y.data) == null ? void 0 : Fe.data) == null ? void 0 : Te.assessmentType, s.empSeniority = (Ce = (qe = y == null ? void 0 : y.data) == null ? void 0 : qe.data) == null ? void 0 : Ce.empSeniority, s.functionRole = (Ie = (Me = y == null ? void 0 : y.data) == null ? void 0 : Me.data) == null ? void 0 : Ie.functionRole, s.storeFinalFeedback = (Re = (Le = y == null ? void 0 : y.data) == null ? void 0 : Le.data) == null ? void 0 : Re.storeFinalFeedback, s.storeFinalScore = (Ne = (Ee = y == null ? void 0 : y.data) == null ? void 0 : Ee.data) == null ? void 0 : Ne.storeFinalScore, f = (Pe = (Be = y == null ? void 0 : y.data) == null ? void 0 : Be.data) == null ? void 0 : Pe.accessBand, b = (ze = (Ve = y == null ? void 0 : y.data) == null ? void 0 : Ve.data) == null ? void 0 : ze.accessOhrList;
760
+ }
761
+ console.log("store mcqType====>", s.mcqType);
762
+ const st = s == null ? void 0 : s.band_code;
763
+ console.log("accessBand , accessOhrList====>", f, b);
764
+ const se = (De = f == null ? void 0 : f.split(",")) == null ? void 0 : De.map((y) => y.trim());
765
+ if (console.log("bands ,====>", se), Q === (s == null ? void 0 : s.ohr) || h.includes(s == null ? void 0 : s.ohr))
766
+ console.log("User has access to this assessment.");
767
+ else {
768
+ if (se.length === 0 && b.length === 0)
769
+ throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
770
+ response: {
771
+ status: 424,
772
+ data: {
773
+ message: "You don't have access to this assessment. Please contact to administrator"
774
+ }
775
+ }
776
+ };
777
+ if (se.includes(st) || b.includes(s == null ? void 0 : s.ohr))
778
+ console.log("User has access to this assessment.");
779
+ else
780
+ throw console.log("User does not have access to this assessment."), {
781
+ response: {
782
+ status: 424,
783
+ data: {
784
+ message: "You don't have access to this assessment. Please contact to administrator"
785
+ }
786
+ }
787
+ };
788
+ }
789
+ console.log("end getAssessmentDetails");
790
+ } catch (a) {
791
+ if (console.error(a), e.value = !1, V.isAxiosError(a) && ((Qe = a.response) != null && Qe.status) || a && typeof a == "object" && "response" in a && a.response && typeof a.response == "object" && "status" in a.response && a.response.status) {
792
+ const Q = a;
793
+ if (console.log("Error found!"), console.error((je = Q.response) == null ? void 0 : je.data), ((Ge = Q.response) == null ? void 0 : Ge.status) === 424 || ((He = Q.response) == null ? void 0 : He.status) === 425) {
794
+ _.value = !0;
795
+ return;
796
+ }
797
+ n.setError(((Ue = Q.response) == null ? void 0 : Ue.data).message);
798
+ } else
799
+ n.setError("There was an issue, please contact helpmate");
800
+ }
801
+ }, B = async () => {
802
+ var x, w, S, k, R;
803
+ try {
804
+ if (g === null)
805
+ throw {
806
+ response: {
807
+ status: 424,
808
+ data: {
809
+ message: "Invalid URL"
810
+ }
811
+ }
812
+ };
813
+ e.value = !0;
814
+ const $ = new URLSearchParams(window.location.search);
815
+ s.simulationSkill = $.get("skillId") || s.simulationSkill, console.log("before calling get learner");
816
+ const M = await oe(
817
+ `/getLearnerData?forSimulation=true&skillForSimulation=${s.simulationSkill}`
818
+ );
819
+ s.initialize(M.data), s.simulationSkill === "937e84ef-e95d-4327-9afe-e7be2bf420eb" ? s.skillNameForSimulation = "GenpactNext" : s.simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ea" || s.simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ef" ? s.skillNameForSimulation = "Agentic AI" : s.simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && (s.skillNameForSimulation = "Data");
820
+ } catch ($) {
821
+ if (console.error($), e.value = !1, V.isAxiosError($) && ((x = $.response) != null && x.status) || $ && typeof $ == "object" && "response" in $ && $.response && typeof $.response == "object" && "status" in $.response && $.response.status) {
822
+ const M = $;
823
+ if (console.log("Error found!"), console.error((w = M.response) == null ? void 0 : w.data), ((S = M.response) == null ? void 0 : S.status) === 424 || ((k = M.response) == null ? void 0 : k.status) === 425) {
824
+ _.value = !0;
825
+ return;
826
+ }
827
+ n.setError(((R = M.response) == null ? void 0 : R.data).message);
828
+ } else
829
+ n.setError("There was an issue, please contact helpmate");
830
+ }
831
+ }, P = async () => {
832
+ var x, w, S, k, R, $, M, U;
833
+ try {
834
+ const C = await V({
835
+ url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
836
+ headers: {
837
+ authorization: `Bearer ${q}`,
838
+ "content-type": "application/json"
839
+ },
840
+ method: "get"
841
+ });
842
+ s.genomeFunctionValue = (S = (w = (x = C == null ? void 0 : C.data) == null ? void 0 : x.role_function) == null ? void 0 : w.function) == null ? void 0 : S.name, s.genomeRoleValue = ($ = (R = (k = C == null ? void 0 : C.data) == null ? void 0 : k.role_function) == null ? void 0 : R.role) == null ? void 0 : $.name, console.log("profile data", s.genomeFunctionValue, s.genomeRoleValue);
843
+ } catch (C) {
844
+ if (console.error(C), e.value = !1, V.isAxiosError(C)) {
845
+ const O = C;
846
+ console.log("Error found!"), console.error((M = O.response) == null ? void 0 : M.data), n.setError(((U = O.response) == null ? void 0 : U.data).message);
847
+ } else
848
+ n.setError("There was an issue, please contact helpmate");
849
+ }
850
+ };
851
+ return (x, w) => (r(), c("section", null, [
852
+ I(Ke, { "is-visible": _.value }, {
853
+ default: Je(() => [
854
+ fo
855
+ ]),
856
+ _: 1
857
+ }, 8, ["is-visible"]),
858
+ t("div", null, [
859
+ e.value ? (r(), gt(rt, { key: 0 })) : (r(), c("main", _o, [
860
+ t("div", vo, [
861
+ I(wt)
862
+ ]),
863
+ yo,
864
+ t("div", bo, [
865
+ t("div", xo, [
866
+ t("div", wo, [
867
+ I(ws),
868
+ t("div", {
869
+ class: W(l(s).showVoiceComponent === !0 ? "mt-[160px]" : "mt-[120px]")
870
+ }, null, 2)
871
+ ]),
872
+ l(s).assessmentQuestion ? (r(), c("div", ko, [
873
+ I(Zs)
874
+ ])) : (r(), c("div", $o, [
875
+ I(ho)
876
+ ]))
877
+ ])
878
+ ])
879
+ ]))
880
+ ])
881
+ ]));
882
+ }
883
+ });
884
+ const Io = /* @__PURE__ */ H(Ao, [["__scopeId", "data-v-904e6953"]]);
885
+ export {
886
+ Io as default
887
+ };