@genpact/genome.mfe.mgtwin-app 1.1.262-alpha → 1.1.263-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.
- package/dist/{ArrowLeftCircleIcon-b0ca9ab4.mjs → ArrowLeftCircleIcon-90c09c3b.mjs} +1 -1
- package/dist/AssessmentAMA-a5971ded.mjs +657 -0
- package/dist/AssessmentSimulation-214f98e7.mjs +887 -0
- package/dist/{EditSkillAdminData-1e7cd981.mjs → EditSkillAdminData-8958d33a.mjs} +3 -3
- package/dist/{EditSkillData-198c34a7.mjs → EditSkillData-9acc72d0.mjs} +3 -3
- package/dist/{HomeView-7246dea2.mjs → HomeView-129bc9cf.mjs} +4 -4
- package/dist/{Loading-f754e5ae.mjs → Loading-eb6770b1.mjs} +1 -1
- package/dist/{AssessmentSimulation-e0b23df3.mjs → LoadingSimulation-b0476671.mjs} +5336 -6206
- package/dist/{Modal-d126e4bf.mjs → Modal-5a6bee7d.mjs} +1 -1
- package/dist/{PromptTesting-849a94e4.mjs → PromptTesting-1bc44386.mjs} +2 -2
- package/dist/{SkillAutomation-8b3e216c.mjs → SkillAutomation-a1967971.mjs} +3 -3
- package/dist/{SkillData-22be1399.mjs → SkillData-019b6452.mjs} +3 -3
- package/dist/{UnderMaintenance-8704b2c9.mjs → UnderMaintenance-9af78ee4.mjs} +1 -1
- package/dist/{api-a503f7af.mjs → api-af435cf6.mjs} +1 -1
- package/dist/{main-1d2231b7.mjs → main-cf7aa8cc.mjs} +1193 -1185
- package/dist/mgtwin.es.min.js +1 -1
- package/dist/mgtwin.umd.min.js +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import { _ as Ke, a as We, b as Ze, c as Je, L as Xe } from "./LoadingSimulation-b0476671.mjs";
|
|
2
|
+
import { _ as et, Q as W, M as Ge, a as tt } from "./Modal-5a6bee7d.mjs";
|
|
3
|
+
import { d as L, r as g, H, o as r, c, a as e, u as G, y as J, t as P, I as ze, b as d, F as X, e as ee, w as He, J as st, f as B, p as Q, g as Y, i as at, G as ot, C as te, z as nt, K as lt, h as R, k as Qe, n as Oe, m as it, L as rt, q as D, s as ct, l as dt } from "./main-cf7aa8cc.mjs";
|
|
4
|
+
import { _ as z } from "./_plugin-vue_export-helper-dad06003.mjs";
|
|
5
|
+
import { p as Ue, g as Z } from "./api-af435cf6.mjs";
|
|
6
|
+
import "./loadernew-ac153a51.mjs";
|
|
7
|
+
const ut = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, mt = ["href"], pt = /* @__PURE__ */ e("img", {
|
|
8
|
+
class: "h-11 w-auto cursor-pointer",
|
|
9
|
+
src: Ke,
|
|
10
|
+
alt: "Genome Logo"
|
|
11
|
+
}, null, -1), gt = [
|
|
12
|
+
pt
|
|
13
|
+
], ht = ["href"], ft = /* @__PURE__ */ e("img", {
|
|
14
|
+
class: "h-9 w-28 cursor-pointer md:w-36",
|
|
15
|
+
src: et,
|
|
16
|
+
alt: "Aiguru Logo"
|
|
17
|
+
}, null, -1), _t = [
|
|
18
|
+
ft
|
|
19
|
+
], vt = /* @__PURE__ */ L({
|
|
20
|
+
__name: "headerAMA",
|
|
21
|
+
setup(i) {
|
|
22
|
+
const s = g(""), u = g("");
|
|
23
|
+
return H === "prod" ? s.value = "https://genome.genpact.com" : s.value = "https://genome-dev.genpact.com", H === "prod" ? u.value = "https://genome.genpact.com/#aiguru" : u.value = "https://genome-dev.genpact.com/#aiguru", (y, t) => (r(), c("nav", ut, [
|
|
24
|
+
e("a", {
|
|
25
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
26
|
+
href: s.value,
|
|
27
|
+
target: "_blank"
|
|
28
|
+
}, gt, 8, mt),
|
|
29
|
+
e("a", {
|
|
30
|
+
class: "px-2 md:px-0 lg:px-0",
|
|
31
|
+
href: u.value,
|
|
32
|
+
target: "_blank"
|
|
33
|
+
}, _t, 8, ht)
|
|
34
|
+
]));
|
|
35
|
+
}
|
|
36
|
+
}), yt = { class: "flex items-end justify-start" }, bt = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, xt = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]" }, wt = { class: "w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]" }, At = /* @__PURE__ */ e("br", null, null, -1), kt = /* @__PURE__ */ L({
|
|
37
|
+
__name: "greetingsAMA",
|
|
38
|
+
setup(i) {
|
|
39
|
+
const s = G(), u = ` Hi ${s.learnerName || "Expert"}, and welcome!`, y = J(() => u), t = ` AI Guru will ask you a few questions on '${s.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.`, n = J(() => t);
|
|
40
|
+
return (b, h) => (r(), c("section", null, [
|
|
41
|
+
e("div", yt, [
|
|
42
|
+
e("div", bt, [
|
|
43
|
+
e("div", xt, P(y.value), 1),
|
|
44
|
+
e("div", wt, P(n.value), 1)
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
At
|
|
48
|
+
]));
|
|
49
|
+
}
|
|
50
|
+
}), se = (i) => (Q("data-v-ebfa4b34"), i = i(), Y(), i), $t = { class: "fontFormattingAMA flex items-end justify-start py-2" }, St = { class: "line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg" }, Mt = ["innerHTML"], Ft = ["innerHTML"], Tt = {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "py-4"
|
|
53
|
+
}, qt = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, It = ["value", "disabled", "name"], Ct = {
|
|
54
|
+
for: "item",
|
|
55
|
+
name: "options-Array",
|
|
56
|
+
id: "index"
|
|
57
|
+
}, Rt = {
|
|
58
|
+
key: 1,
|
|
59
|
+
class: "py-4"
|
|
60
|
+
}, Lt = { class: "fontFormattingAMA px-2 py-1.5 md:px-6" }, Et = ["onClick", "disabled", "name"], Bt = {
|
|
61
|
+
for: "item",
|
|
62
|
+
name: "options-Array",
|
|
63
|
+
id: "index"
|
|
64
|
+
}, Nt = {
|
|
65
|
+
key: 2,
|
|
66
|
+
class: "flex flex-col justify-start py-10"
|
|
67
|
+
}, Pt = /* @__PURE__ */ se(() => /* @__PURE__ */ e("div", { class: "mb-4" }, " Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ", -1)), Vt = /* @__PURE__ */ se(() => /* @__PURE__ */ e("img", {
|
|
68
|
+
class: "h-20 w-20",
|
|
69
|
+
src: We,
|
|
70
|
+
alt: "qr_code"
|
|
71
|
+
}, null, -1)), jt = [
|
|
72
|
+
Pt,
|
|
73
|
+
Vt
|
|
74
|
+
], Dt = {
|
|
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__ */ at(" 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)), zt = { class: "flex justify-start items-center md:gap-[40px] gap-[30px]" }, Ot = /* @__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: s }) {
|
|
123
|
+
const u = i, y = g([]), t = g(!1), n = G(), b = g("");
|
|
124
|
+
let h = [], l = "";
|
|
125
|
+
const q = async () => {
|
|
126
|
+
console.log("startCharByChar "), h = l.split(""), b.value = "";
|
|
127
|
+
for (let o = 0; o < h.length; o++)
|
|
128
|
+
b.value += h[o], o % 30 && s("char-typed"), await new Promise((m) => setTimeout(m, 50));
|
|
129
|
+
}, I = () => {
|
|
130
|
+
n.showSelectTypeConvesation = !1, n.isRestart = !0, n.showModelToggle = !1, n.isSpeechToggle = !1, console.log("text mode", n.isSpeechToggle);
|
|
131
|
+
}, F = () => {
|
|
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 = u.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 m = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
143
|
+
if (o.includes("AI Guru")) {
|
|
144
|
+
if (o.includes("AI Guru"))
|
|
145
|
+
return console.log("aig found"), o.replace(m, (f, _, $) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${_}</a>`);
|
|
146
|
+
} else
|
|
147
|
+
return o.replace(m, (f, _, $) => `<a href="${$}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${_}</a>`);
|
|
148
|
+
if (o.includes("Assessment Rating & Feedback")) {
|
|
149
|
+
const f = o.split("Assessment Rating & Feedback")[0], _ = o.split("Assessment Rating & Feedback")[1];
|
|
150
|
+
n.conversations.push(f), n.conversations.push(_);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
return ze(
|
|
154
|
+
() => u.answer,
|
|
155
|
+
() => {
|
|
156
|
+
let o = u.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 m = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
|
|
161
|
+
if (o.includes("AI Guru") ? o = o.replace(m, (f, _, $) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${_}</a>`) : o = o.replace(m, (f, _, $) => `<a href="${$}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${_}</a>`), o.includes("Assessment Rating & Feedback")) {
|
|
162
|
+
const f = o.split("Assessment Rating & Feedback")[0], _ = o.split("Assessment Rating & Feedback")[1];
|
|
163
|
+
n.conversations.push(f), n.conversations.push(_);
|
|
164
|
+
}
|
|
165
|
+
l = o, n.showVoiceComponent && q(), console.log("watch for startCharByChar");
|
|
166
|
+
},
|
|
167
|
+
{ immediate: !0 }
|
|
168
|
+
), ze(y, (o) => {
|
|
169
|
+
n.question = (o ?? []).join(", "), console.log("selectedOptions", o);
|
|
170
|
+
}), (o, m) => (r(), c("div", $t, [
|
|
171
|
+
e("div", St, [
|
|
172
|
+
d(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && d(n).showVoiceComponent === !0 && d(n).conversations.length - 1 === u.ansId && !u.answer.includes("BEGIN ROLE PLAY") ? (r(), c("span", {
|
|
173
|
+
key: 0,
|
|
174
|
+
class: "fontFormattingAMA",
|
|
175
|
+
innerHTML: b.value
|
|
176
|
+
}, null, 8, Mt)) : (r(), c("span", {
|
|
177
|
+
key: 1,
|
|
178
|
+
class: "fontFormattingAMA",
|
|
179
|
+
innerHTML: w.value
|
|
180
|
+
}, null, 8, Ft)),
|
|
181
|
+
e("div", null, [
|
|
182
|
+
i.optionsArray.length && d(n).mcqType === "multi_choice" ? (r(), c("div", Tt, [
|
|
183
|
+
(r(!0), c(X, null, ee(i.optionsArray, (f, _) => (r(), c("div", {
|
|
184
|
+
key: _,
|
|
185
|
+
class: "italic"
|
|
186
|
+
}, [
|
|
187
|
+
e("div", qt, [
|
|
188
|
+
He(e("input", {
|
|
189
|
+
class: "mr-4 cursor-pointer",
|
|
190
|
+
type: "checkbox",
|
|
191
|
+
value: f,
|
|
192
|
+
"onUpdate:modelValue": m[0] || (m[0] = ($) => y.value = $),
|
|
193
|
+
disabled: d(n).conversations.length - 1 !== u.ansId,
|
|
194
|
+
name: w.value
|
|
195
|
+
}, null, 8, It), [
|
|
196
|
+
[st, y.value]
|
|
197
|
+
]),
|
|
198
|
+
e("label", Ct, P(f), 1)
|
|
199
|
+
])
|
|
200
|
+
]))), 128))
|
|
201
|
+
])) : i.optionsArray.length ? (r(), c("div", Rt, [
|
|
202
|
+
(r(!0), c(X, null, ee(i.optionsArray, (f, _) => (r(), c("div", {
|
|
203
|
+
key: _,
|
|
204
|
+
class: "italic"
|
|
205
|
+
}, [
|
|
206
|
+
e("div", Lt, [
|
|
207
|
+
e("input", {
|
|
208
|
+
class: "mr-4 cursor-pointer",
|
|
209
|
+
type: "radio",
|
|
210
|
+
onClick: ($) => d(n).question = String(i.optionsArray[_]),
|
|
211
|
+
disabled: d(n).conversations.length - 1 !== u.ansId,
|
|
212
|
+
name: w.value
|
|
213
|
+
}, null, 8, Et),
|
|
214
|
+
e("label", Bt, P(f), 1)
|
|
215
|
+
])
|
|
216
|
+
]))), 128))
|
|
217
|
+
])) : B("", !0)
|
|
218
|
+
]),
|
|
219
|
+
t.value && d(n).simulationSkill === "32b7d6d8-f7a8-40a0-ab84-8784f25897ef" ? (r(), c("div", Nt, jt)) : B("", !0),
|
|
220
|
+
d(n).isSpeechToggle && d(n).showSelectTypeConvesation && d(n).simulationSkill === "7bd03cb6-79ad-4e2a-8a8b-88dc16147369" && d(n).conversations.length - 1 === u.ansId ? (r(), c("div", Dt, [
|
|
221
|
+
Gt,
|
|
222
|
+
e("div", zt, [
|
|
223
|
+
e("button", {
|
|
224
|
+
type: "button",
|
|
225
|
+
id: "button",
|
|
226
|
+
onClick: m[1] || (m[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: m[2] || (m[2] = (f) => F()),
|
|
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
|
+
])) : B("", !0)
|
|
237
|
+
])
|
|
238
|
+
]));
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
const Ut = /* @__PURE__ */ z(Ot, [["__scopeId", "data-v-ebfa4b34"]]), Ht = { class: "flex justify-end items-end py-3" }, Qt = { class: "max-w-[80%]" }, Yt = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, Kt = /* @__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 (s, u) => (r(), c("div", Ht, [
|
|
255
|
+
e("div", Qt, [
|
|
256
|
+
e("div", Yt, P(i.question), 1)
|
|
257
|
+
])
|
|
258
|
+
]));
|
|
259
|
+
}
|
|
260
|
+
}), Wt = (i) => (Q("data-v-12a02acf"), i = i(), Y(), i), Zt = { class: "flex w-full flex-col items-start justify-start bg-white" }, Jt = { class: "bot-typing-animation gap-1" }, Xt = { class: "block w-full text-lg italic text-gray-800" }, es = /* @__PURE__ */ Wt(() => /* @__PURE__ */ e("span", { class: "dot-animation" }, [
|
|
261
|
+
/* @__PURE__ */ e("span", null, "."),
|
|
262
|
+
/* @__PURE__ */ e("span", null, "."),
|
|
263
|
+
/* @__PURE__ */ e("span", null, ".")
|
|
264
|
+
], -1)), ts = /* @__PURE__ */ ot('<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), ss = /* @__PURE__ */ L({
|
|
265
|
+
__name: "LoadingResponseAMA",
|
|
266
|
+
setup(i) {
|
|
267
|
+
const s = g("Generating response"), u = g([
|
|
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 y = Math.floor(Math.random() * u.value.length);
|
|
278
|
+
s.value = u.value[y];
|
|
279
|
+
}, 15e3), (y, t) => (r(), c("div", Zt, [
|
|
280
|
+
e("div", Jt, [
|
|
281
|
+
e("div", Xt, P(s.value), 1),
|
|
282
|
+
es
|
|
283
|
+
]),
|
|
284
|
+
ts
|
|
285
|
+
]));
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
const as = /* @__PURE__ */ z(ss, [["__scopeId", "data-v-12a02acf"]]), os = { key: 0 }, ns = { key: 1 }, ls = {
|
|
289
|
+
key: 0,
|
|
290
|
+
class: "flex"
|
|
291
|
+
}, is = /* @__PURE__ */ L({
|
|
292
|
+
__name: "conversationAMA",
|
|
293
|
+
setup(i) {
|
|
294
|
+
let s = g(""), u = g("");
|
|
295
|
+
s.value = '<a style="color:#00AECF;"', u.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
|
|
296
|
+
const y = G(), t = g(), n = () => {
|
|
297
|
+
t.value.scrollTo(0, t.value.scrollHeight);
|
|
298
|
+
};
|
|
299
|
+
return te(() => {
|
|
300
|
+
var l;
|
|
301
|
+
const b = document.getElementsByName("askQuestion"), h = Array.from(b);
|
|
302
|
+
console.log("New array===>", h), b.length && ((l = h == null ? void 0 : h.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" })), window.addEventListener("custom-event", n);
|
|
303
|
+
}), nt(() => {
|
|
304
|
+
var l;
|
|
305
|
+
const b = document.getElementsByName("askQuestion"), h = Array.from(b);
|
|
306
|
+
console.log("New array===>", h), b.length && ((l = h == null ? void 0 : h.pop()) == null || l.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
307
|
+
}), lt(() => {
|
|
308
|
+
window.removeEventListener("custom-event", n);
|
|
309
|
+
}), (b, h) => (r(), c("div", {
|
|
310
|
+
ref_key: "nestedElement",
|
|
311
|
+
ref: t,
|
|
312
|
+
class: "smooth-scroll overflow-auto md:px-6 px-2"
|
|
313
|
+
}, [
|
|
314
|
+
R(kt),
|
|
315
|
+
(r(!0), c(X, null, ee(d(y).conversations, (l, q) => (r(), c("div", { key: q }, [
|
|
316
|
+
l.question ? (r(), c("div", os, [
|
|
317
|
+
R(Kt, {
|
|
318
|
+
question: l.question,
|
|
319
|
+
c2question: l.c2question,
|
|
320
|
+
"show-feedback": l.showFeedback,
|
|
321
|
+
id: `qId${q}`,
|
|
322
|
+
name: "askQuestion",
|
|
323
|
+
"que-id": q
|
|
324
|
+
}, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
|
|
325
|
+
])) : B("", !0),
|
|
326
|
+
l.answer ? (r(), c("div", ns, [
|
|
327
|
+
R(Ut, {
|
|
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", d(s)).replaceAll("<ul", d(u)),
|
|
333
|
+
"show-feedback": l.showFeedback,
|
|
334
|
+
"related-ques": l.relatedQues,
|
|
335
|
+
"options-array": l.optionsArray,
|
|
336
|
+
"ans-id": q,
|
|
337
|
+
onCharTyped: n
|
|
338
|
+
}, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
|
|
339
|
+
])) : B("", !0)
|
|
340
|
+
]))), 128)),
|
|
341
|
+
d(y).dotLoader ? (r(), c("div", ls, [
|
|
342
|
+
R(as)
|
|
343
|
+
])) : B("", !0)
|
|
344
|
+
], 512));
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
const rs = /* @__PURE__ */ z(is, [["__scopeId", "data-v-2a895c05"]]), E = (i) => (Q("data-v-9f5df9a6"), i = i(), Y(), i), cs = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, ds = { class: "py-2" }, us = { class: "flex" }, ms = { class: "z-1 relative w-full" }, ps = { class: "flex justify-between my-2 w-full" }, gs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", null, null, -1)), hs = {
|
|
348
|
+
key: 0,
|
|
349
|
+
class: "flex justify-center bg-genpact-darkest-blue px-4 rounded-full"
|
|
350
|
+
}, fs = { class: "relative w-full" }, _s = { class: "absolute inset-y-0 left-0 flex items-center pl-3" }, vs = { class: "tooltip" }, ys = /* @__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)), xs = /* @__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)), ws = [
|
|
361
|
+
bs,
|
|
362
|
+
xs
|
|
363
|
+
], As = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, ks = { key: 0 }, $s = ["disabled"], 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
|
+
], Fs = {
|
|
366
|
+
key: 1,
|
|
367
|
+
class: "tooltip"
|
|
368
|
+
}, Ts = /* @__PURE__ */ E(() => /* @__PURE__ */ e("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), qs = /* @__PURE__ */ E(() => /* @__PURE__ */ e("img", {
|
|
369
|
+
class: "w-7 h-7",
|
|
370
|
+
src: Je,
|
|
371
|
+
alt: "watingIcon"
|
|
372
|
+
}, null, -1)), Is = [
|
|
373
|
+
Ts,
|
|
374
|
+
qs
|
|
375
|
+
], Cs = { class: "flex justify-start gap-2 md:gap-1" }, Rs = ["disabled"], Ls = /* @__PURE__ */ E(() => /* @__PURE__ */ e("div", { class: "pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm" }, [
|
|
376
|
+
/* @__PURE__ */ e("div", null, " Note: AI-generated response may not be fully accurate; check with experts for critical information. ")
|
|
377
|
+
], -1)), Es = /* @__PURE__ */ L({
|
|
378
|
+
__name: "NewQuestionAMA",
|
|
379
|
+
setup(i) {
|
|
380
|
+
const s = G(), u = Qe(), y = g(""), t = g("");
|
|
381
|
+
s.question = "";
|
|
382
|
+
const n = g(null), b = g(!1), h = g(W), l = g(!1);
|
|
383
|
+
t.value = s.recognizedText, te(() => {
|
|
384
|
+
n.value.focus();
|
|
385
|
+
});
|
|
386
|
+
const q = () => {
|
|
387
|
+
window.location.reload();
|
|
388
|
+
}, I = (w) => {
|
|
389
|
+
const o = w.length;
|
|
390
|
+
h.value = W - o, b.value = o >= W;
|
|
391
|
+
}, F = async () => {
|
|
392
|
+
var w, o, m, f, _, $, O, U;
|
|
393
|
+
console.log("options fdsfdscdzxfsdv", s.recognizedText);
|
|
394
|
+
try {
|
|
395
|
+
if (console.log("options fdsfdscdzxfsdv", s.recognizedText), s.question.trim().length < 1) {
|
|
396
|
+
console.log("Please enter answer!");
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
l.value = !0, s.dotLoader = !0;
|
|
400
|
+
const x = {
|
|
401
|
+
question: s.question || s.recognizedText
|
|
402
|
+
};
|
|
403
|
+
console.log("ques", x), s.conversations.push(x);
|
|
404
|
+
const A = g("");
|
|
405
|
+
A.value = s.question || s.recognizedText, s.question = "";
|
|
406
|
+
const T = {
|
|
407
|
+
ohr_id: y.value,
|
|
408
|
+
past_messages: s.past_messages,
|
|
409
|
+
question: A.value || s.recognizedText,
|
|
410
|
+
bandCode: s.band_code,
|
|
411
|
+
userGenomeFunction: s.genomeFunctionValue,
|
|
412
|
+
userGenomeRole: s.genomeRoleValue,
|
|
413
|
+
skillId: s.simulationSkill || "937e84ef-e95d-4327-9afe-e7be2bf420eb"
|
|
414
|
+
}, k = await Ue("/sqlTest", T);
|
|
415
|
+
if (y.value = (o = (w = k.data) == null ? void 0 : w.body) == null ? void 0 : o.ohr, ((f = (m = k == null ? void 0 : k.data) == null ? void 0 : m.body) == null ? void 0 : f.answer) === "") {
|
|
416
|
+
console.log("in the if case calling api again");
|
|
417
|
+
const v = await Ue("/sqlTest", T);
|
|
418
|
+
s.addConversation((_ = v.data) == null ? void 0 : _.body, "new");
|
|
419
|
+
} else
|
|
420
|
+
console.log("in the else case"), s.addConversation(($ = k.data) == null ? void 0 : $.body, "new");
|
|
421
|
+
console.log("ohr id asdf", y.value), l.value = !1, s.dotLoader = !1, s.recognizedText = "";
|
|
422
|
+
} catch (x) {
|
|
423
|
+
if (console.error(x), s.dotLoader = !1, D.isAxiosError(x)) {
|
|
424
|
+
const A = x;
|
|
425
|
+
console.log("Error found!"), console.error((O = A.response) == null ? void 0 : O.data), u.setError(((U = A.response) == null ? void 0 : U.data).message);
|
|
426
|
+
} else
|
|
427
|
+
u.setError("There was an issue, please contact helpmate");
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
return (w, o) => (r(), c("div", cs, [
|
|
431
|
+
e("div", ds, [
|
|
432
|
+
e("div", us, [
|
|
433
|
+
e("div", ms, [
|
|
434
|
+
e("div", ps, [
|
|
435
|
+
gs,
|
|
436
|
+
d(s).showVoiceComponent ? (r(), c("div", hs, [
|
|
437
|
+
R(Ze)
|
|
438
|
+
])) : B("", !0)
|
|
439
|
+
]),
|
|
440
|
+
e("div", fs, [
|
|
441
|
+
e("div", _s, [
|
|
442
|
+
e("div", vs, [
|
|
443
|
+
ys,
|
|
444
|
+
(r(), c("svg", {
|
|
445
|
+
onClick: q,
|
|
446
|
+
class: "ml-2 h-7 w-7 rounded",
|
|
447
|
+
id: "newTopicDisable",
|
|
448
|
+
width: "7",
|
|
449
|
+
height: "",
|
|
450
|
+
viewBox: "0 0 24 24",
|
|
451
|
+
fill: "none",
|
|
452
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
453
|
+
title: "restart"
|
|
454
|
+
}, ws))
|
|
455
|
+
])
|
|
456
|
+
]),
|
|
457
|
+
e("div", As, [
|
|
458
|
+
l.value ? (r(), c("div", Fs, Is)) : (r(), c("div", ks, [
|
|
459
|
+
(r(), c("svg", {
|
|
460
|
+
disabled: d(s).beginFlag === !0,
|
|
461
|
+
class: Oe([
|
|
462
|
+
d(s).beginFlag === !0 ? "cursor-not-allowed text-gray-600" : "cursor-pointer",
|
|
463
|
+
"bi bi-send ml-2 h-7 w-7 rotate-45 rounded"
|
|
464
|
+
]),
|
|
465
|
+
onClick: o[0] || (o[0] = (m) => d(s).searchBoxdisable === !1 || d(s).beginFlag === !0 ? "" : F()),
|
|
466
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
467
|
+
fill: "currentColor",
|
|
468
|
+
viewBox: "0 0 16 16"
|
|
469
|
+
}, Ms, 10, $s))
|
|
470
|
+
]))
|
|
471
|
+
]),
|
|
472
|
+
e("div", Cs, [
|
|
473
|
+
He(e("input", {
|
|
474
|
+
onKeyup: [
|
|
475
|
+
o[1] || (o[1] = rt((m) => l.value ? "" : F(), ["enter"])),
|
|
476
|
+
o[3] || (o[3] = (m) => I(d(s).question))
|
|
477
|
+
],
|
|
478
|
+
disabled: d(s).beginFlag === !0 || d(s).searchBoxdisable === !1,
|
|
479
|
+
class: Oe([
|
|
480
|
+
d(s).beginFlag === !0 || d(s).searchBoxdisable === !1 ? "cursor-not-allowed bg-[#e5e7eb]" : "bg-white",
|
|
481
|
+
"fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"
|
|
482
|
+
]),
|
|
483
|
+
"onUpdate:modelValue": o[2] || (o[2] = (m) => d(s).question = m),
|
|
484
|
+
placeholder: "Write your answer here...",
|
|
485
|
+
type: "text",
|
|
486
|
+
ref_key: "AiSearch",
|
|
487
|
+
ref: n
|
|
488
|
+
}, null, 42, Rs), [
|
|
489
|
+
[it, d(s).question]
|
|
490
|
+
])
|
|
491
|
+
])
|
|
492
|
+
]),
|
|
493
|
+
Ls
|
|
494
|
+
])
|
|
495
|
+
])
|
|
496
|
+
])
|
|
497
|
+
]));
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
const Bs = /* @__PURE__ */ z(Es, [["__scopeId", "data-v-9f5df9a6"]]), ae = (i) => (Q("data-v-48a2232d"), 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]" }, [
|
|
501
|
+
/* @__PURE__ */ e("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
|
|
502
|
+
/* @__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 ")
|
|
503
|
+
], -1)), Ps = {
|
|
504
|
+
key: 1,
|
|
505
|
+
className: "h-screen flex flex-col items-stretch"
|
|
506
|
+
}, Vs = { class: "z-20" }, js = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "mt-6" }, null, -1)), Ds = { class: "flex h-full items-stretch overflow-hidden" }, Gs = { class: "mx-auto w-11/12 bg-white" }, zs = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, Os = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "mt-[160px]" }, null, -1)), Us = { class: "relative" }, Hs = /* @__PURE__ */ L({
|
|
507
|
+
__name: "AssessmentAMA",
|
|
508
|
+
setup(i) {
|
|
509
|
+
const s = g(!1), u = g(!1), y = g(!1);
|
|
510
|
+
g(!1), g(!1);
|
|
511
|
+
const t = G(), n = Qe(), b = g(""), h = g(""), l = g(""), q = localStorage.getItem("accessToken");
|
|
512
|
+
let I = "", F = "", w = "";
|
|
513
|
+
const o = g(!1), m = new URL(window.location.href), f = m.searchParams.get("skillId") || m.searchParams.get("assessmentId") || "937e84ef-e95d-4327-9afe-e7be2bf420eb";
|
|
514
|
+
h.value = m.searchParams.get("mode") ?? "", t.simulationSkill = f ?? "";
|
|
515
|
+
const _ = ["703331197", "703380812", "703331909", "703363051", "703319578"];
|
|
516
|
+
te(async () => {
|
|
517
|
+
console.log("uuid. value", f), await O(), await U(), await $();
|
|
518
|
+
});
|
|
519
|
+
const $ = async () => {
|
|
520
|
+
var x, A, T, k, C, v, M, V, S, j, oe, ne, le, ie, re, ce, de, ue, me, pe, ge, he, fe, _e, ve, ye, be, xe, we, Ae, ke, $e, Se, Me, Fe, Te, qe, Ie, Ce, Re, Le, Ee, Be, Ne, Pe, Ve, je, De;
|
|
521
|
+
console.log("Start getAssessmentDetails");
|
|
522
|
+
try {
|
|
523
|
+
I = "https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=d9828d76-cfab-4563-8ff4-1e86a9d3bc8f";
|
|
524
|
+
const a = await Z(I);
|
|
525
|
+
console.log("response from GetAMA", a), b.value = (A = (x = a == null ? void 0 : a.data) == null ? void 0 : x.data) == null ? void 0 : A.name, console.log("response from GetAMA skill Name", b.value), t.skillNameForSimulation = b.value, t.generatedPrompt = (k = (T = a == null ? void 0 : a.data) == null ? void 0 : T.data) == null ? void 0 : k.generatedPrompt, t.assessmentType = (v = (C = a == null ? void 0 : a.data) == null ? void 0 : C.data) == null ? void 0 : v.assessmentType, l.value = (V = (M = a == null ? void 0 : a.data) == null ? void 0 : M.data) == null ? void 0 : V.status, o.value = (j = (S = a == null ? void 0 : a.data) == null ? void 0 : S.data) == null ? void 0 : j.editMode, t.empSeniority = (ne = (oe = a == null ? void 0 : a.data) == null ? void 0 : oe.data) == null ? void 0 : ne.empSeniority, t.functionRole = (ie = (le = a == null ? void 0 : a.data) == null ? void 0 : le.data) == null ? void 0 : ie.functionRole, F = (ce = (re = a == null ? void 0 : a.data) == null ? void 0 : re.data) == null ? void 0 : ce.accessBand, w = (ue = (de = a == null ? void 0 : a.data) == null ? void 0 : de.data) == null ? void 0 : ue.accessOhrList;
|
|
526
|
+
const N = (pe = (me = a == null ? void 0 : a.data) == null ? void 0 : me.data) == null ? void 0 : pe.createdBy;
|
|
527
|
+
if (t.mcqType = (he = (ge = a == null ? void 0 : a.data) == null ? void 0 : ge.data) == null ? void 0 : he.mcqTypes, t.storeFinalFeedback = (_e = (fe = a == null ? void 0 : a.data) == null ? void 0 : fe.data) == null ? void 0 : _e.storeFinalFeedback, t.storeFinalScore = (ye = (ve = a == null ? void 0 : a.data) == null ? void 0 : ve.data) == null ? void 0 : ye.storeFinalScore, l.value === "inactive")
|
|
528
|
+
u.value = !0;
|
|
529
|
+
else if (l.value === "draft")
|
|
530
|
+
h.value !== Ge.DRAFT && (u.value = !0);
|
|
531
|
+
else if (l.value === "active" && o.value && h.value === Ge.DRAFT) {
|
|
532
|
+
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}`;
|
|
533
|
+
const p = await Z(I);
|
|
534
|
+
t.generatedPrompt = (xe = (be = p == null ? void 0 : p.data) == null ? void 0 : be.data) == null ? void 0 : xe.generatedPrompt, t.assessmentType = (Ae = (we = p == null ? void 0 : p.data) == null ? void 0 : we.data) == null ? void 0 : Ae.assessmentType, t.empSeniority = ($e = (ke = p == null ? void 0 : p.data) == null ? void 0 : ke.data) == null ? void 0 : $e.empSeniority, t.functionRole = (Me = (Se = p == null ? void 0 : p.data) == null ? void 0 : Se.data) == null ? void 0 : Me.functionRole, t.storeFinalFeedback = (Te = (Fe = p == null ? void 0 : p.data) == null ? void 0 : Fe.data) == null ? void 0 : Te.storeFinalFeedback, t.storeFinalScore = (Ie = (qe = p == null ? void 0 : p.data) == null ? void 0 : qe.data) == null ? void 0 : Ie.storeFinalScore, F = (Re = (Ce = p == null ? void 0 : p.data) == null ? void 0 : Ce.data) == null ? void 0 : Re.accessBand, w = (Ee = (Le = p == null ? void 0 : p.data) == null ? void 0 : Le.data) == null ? void 0 : Ee.accessOhrList;
|
|
535
|
+
}
|
|
536
|
+
console.log("store mcqType====>", t.mcqType);
|
|
537
|
+
const Ye = t == null ? void 0 : t.band_code;
|
|
538
|
+
console.log("accessBand , accessOhrList====>", F, w);
|
|
539
|
+
const K = (Be = F == null ? void 0 : F.split(",")) == null ? void 0 : Be.map((p) => p.trim());
|
|
540
|
+
if (console.log("bands ,====>", K), N === (t == null ? void 0 : t.ohr) || _.includes(t == null ? void 0 : t.ohr))
|
|
541
|
+
console.log("User has access to this assessment.");
|
|
542
|
+
else {
|
|
543
|
+
if (K.length === 0 && w.length === 0)
|
|
544
|
+
throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
|
|
545
|
+
response: {
|
|
546
|
+
status: 424,
|
|
547
|
+
data: {
|
|
548
|
+
message: "You don't have access to this assessment. Please contact to administrator"
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
if (K.includes(Ye) || w.includes(t == null ? void 0 : t.ohr))
|
|
553
|
+
console.log("User has access to this assessment.");
|
|
554
|
+
else
|
|
555
|
+
throw console.log("User does not have access to this assessment."), {
|
|
556
|
+
response: {
|
|
557
|
+
status: 424,
|
|
558
|
+
data: {
|
|
559
|
+
message: "You don't have access to this assessment. Please contact to administrator"
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
console.log("end getAssessmentDetails");
|
|
565
|
+
} catch (a) {
|
|
566
|
+
if (console.error(a), D.isAxiosError(a) && ((Ne = a.response) != null && Ne.status) || a && typeof a == "object" && "response" in a && a.response && typeof a.response == "object" && "status" in a.response && a.response.status) {
|
|
567
|
+
const N = a;
|
|
568
|
+
if (console.log("Error found!"), console.error((Pe = N.response) == null ? void 0 : Pe.data), ((Ve = N.response) == null ? void 0 : Ve.status) === 424 || ((je = N.response) == null ? void 0 : je.status) === 425) {
|
|
569
|
+
y.value = !0;
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
n.setError(((De = N.response) == null ? void 0 : De.data).message);
|
|
573
|
+
} else
|
|
574
|
+
n.setError("There was an issue, please contact helpmate");
|
|
575
|
+
}
|
|
576
|
+
}, O = async () => {
|
|
577
|
+
var x, A, T, k, C;
|
|
578
|
+
try {
|
|
579
|
+
if (f === null)
|
|
580
|
+
throw {
|
|
581
|
+
response: {
|
|
582
|
+
status: 424,
|
|
583
|
+
data: {
|
|
584
|
+
message: "Invalid URL"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
const v = new URLSearchParams(window.location.search);
|
|
589
|
+
t.simulationSkill = v.get("skillId") || t.simulationSkill, console.log("before calling get learner");
|
|
590
|
+
const M = await Z(
|
|
591
|
+
`/getLearnerData?forSimulation=true&skillForSimulation=${t.simulationSkill}`
|
|
592
|
+
);
|
|
593
|
+
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");
|
|
594
|
+
} catch (v) {
|
|
595
|
+
if (console.error(v), D.isAxiosError(v) && ((x = v.response) != null && x.status) || v && typeof v == "object" && "response" in v && v.response && typeof v.response == "object" && "status" in v.response && v.response.status) {
|
|
596
|
+
const M = v;
|
|
597
|
+
if (console.log("Error found!"), console.error((A = M.response) == null ? void 0 : A.data), ((T = M.response) == null ? void 0 : T.status) === 424 || ((k = M.response) == null ? void 0 : k.status) === 425) {
|
|
598
|
+
y.value = !0;
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
n.setError(((C = M.response) == null ? void 0 : C.data).message);
|
|
602
|
+
} else
|
|
603
|
+
n.setError("There was an issue, please contact helpmate");
|
|
604
|
+
}
|
|
605
|
+
}, U = async () => {
|
|
606
|
+
var x, A, T, k, C, v, M, V;
|
|
607
|
+
try {
|
|
608
|
+
const S = await D({
|
|
609
|
+
url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
|
|
610
|
+
headers: {
|
|
611
|
+
authorization: `Bearer ${q}`,
|
|
612
|
+
"content-type": "application/json"
|
|
613
|
+
},
|
|
614
|
+
method: "get"
|
|
615
|
+
});
|
|
616
|
+
t.genomeFunctionValue = (T = (A = (x = S == null ? void 0 : S.data) == null ? void 0 : x.role_function) == null ? void 0 : A.function) == null ? void 0 : T.name, t.genomeRoleValue = (v = (C = (k = S == null ? void 0 : S.data) == null ? void 0 : k.role_function) == null ? void 0 : C.role) == null ? void 0 : v.name, console.log("profile data", t.genomeFunctionValue, t.genomeRoleValue);
|
|
617
|
+
} catch (S) {
|
|
618
|
+
if (console.error(S), D.isAxiosError(S)) {
|
|
619
|
+
const j = S;
|
|
620
|
+
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);
|
|
621
|
+
} else
|
|
622
|
+
n.setError("There was an issue, please contact helpmate");
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
return (x, A) => (r(), c("section", null, [
|
|
626
|
+
R(tt, { "is-visible": y.value }, {
|
|
627
|
+
default: ct(() => [
|
|
628
|
+
Ns
|
|
629
|
+
]),
|
|
630
|
+
_: 1
|
|
631
|
+
}, 8, ["is-visible"]),
|
|
632
|
+
e("div", null, [
|
|
633
|
+
s.value ? (r(), dt(Xe, { key: 0 })) : (r(), c("main", Ps, [
|
|
634
|
+
e("div", Vs, [
|
|
635
|
+
R(vt)
|
|
636
|
+
]),
|
|
637
|
+
js,
|
|
638
|
+
e("div", Ds, [
|
|
639
|
+
e("div", Gs, [
|
|
640
|
+
e("div", zs, [
|
|
641
|
+
R(rs),
|
|
642
|
+
Os
|
|
643
|
+
]),
|
|
644
|
+
e("div", Us, [
|
|
645
|
+
R(Bs)
|
|
646
|
+
])
|
|
647
|
+
])
|
|
648
|
+
])
|
|
649
|
+
]))
|
|
650
|
+
])
|
|
651
|
+
]));
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
const Xs = /* @__PURE__ */ z(Hs, [["__scopeId", "data-v-48a2232d"]]);
|
|
655
|
+
export {
|
|
656
|
+
Xs as default
|
|
657
|
+
};
|