@genpact/genome.mfe.mgtwin-app 1.1.264-alpha → 1.1.266-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-631bb3e0.mjs";
1
+ import { o as e, c as r, a } from "./main-0c8d5b37.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,433 @@
1
+ import { _ as qe, a as Me, L as Te } from "./LoadingSimulation-8fa5519e.mjs";
2
+ import { _ as Se, Q, a as Ie } from "./Modal-8662de90.mjs";
3
+ import { d as q, r as i, H as G, o as d, c as p, a, u as j, y as H, t as V, G as Ee, p as O, g as K, C as W, z as Le, K as Fe, h as $, F as Re, e as Ne, f as D, b as S, k as Ae, w as Ce, m as Be, L as ze, q as F, s as Ve, l as je } from "./main-0c8d5b37.mjs";
4
+ import { _ as R } from "./_plugin-vue_export-helper-dad06003.mjs";
5
+ import { p as we, g as be } from "./api-baf48c0c.mjs";
6
+ import "./loadernew-ac153a51.mjs";
7
+ const Ue = { class: "flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6" }, Pe = ["href"], Qe = /* @__PURE__ */ a("img", {
8
+ class: "h-11 w-auto cursor-pointer",
9
+ src: qe,
10
+ alt: "Genome Logo"
11
+ }, null, -1), De = [
12
+ Qe
13
+ ], Ge = ["href"], He = /* @__PURE__ */ a("img", {
14
+ class: "h-9 w-28 cursor-pointer md:w-36",
15
+ src: Se,
16
+ alt: "Aiguru Logo"
17
+ }, null, -1), Oe = [
18
+ He
19
+ ], Ke = /* @__PURE__ */ q({
20
+ __name: "headerAMA",
21
+ setup(n) {
22
+ const t = i(""), l = i("");
23
+ return G === "prod" ? t.value = "https://genome.genpact.com" : t.value = "https://genome-dev.genpact.com", G === "prod" ? l.value = "https://genome.genpact.com/#aiguru" : l.value = "https://genome-dev.genpact.com/#aiguru", (s, r) => (d(), p("nav", Ue, [
24
+ a("a", {
25
+ class: "px-2 md:px-0 lg:px-0",
26
+ href: t.value,
27
+ target: "_blank"
28
+ }, De, 8, Pe),
29
+ a("a", {
30
+ class: "px-2 md:px-0 lg:px-0",
31
+ href: l.value,
32
+ target: "_blank"
33
+ }, Oe, 8, Ge)
34
+ ]));
35
+ }
36
+ }), We = { class: "flex items-end justify-start" }, Ye = { class: "fontFormattingAMA w-full bg-gray-100 rounded-lg" }, Ze = { class: "w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]" }, Je = { class: "w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]" }, Xe = /* @__PURE__ */ a("br", null, null, -1), et = /* @__PURE__ */ q({
37
+ __name: "greetingsAMA",
38
+ setup(n) {
39
+ const t = j(), l = ` Hi ${t.learnerName || "Expert"}, and welcome!`, s = H(() => l), r = H(() => t.welcomeMessage);
40
+ return (v, f) => (d(), p("section", null, [
41
+ a("div", We, [
42
+ a("div", Ye, [
43
+ a("div", Ze, V(s.value), 1),
44
+ a("div", Je, V(r.value), 1)
45
+ ])
46
+ ]),
47
+ Xe
48
+ ]));
49
+ }
50
+ }), tt = { 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" }, at = ["innerHTML"], ot = /* @__PURE__ */ q({
51
+ __name: "responseAMA",
52
+ props: {
53
+ answer: {
54
+ type: String,
55
+ required: !0
56
+ }
57
+ },
58
+ setup(n) {
59
+ const t = n, l = H(() => {
60
+ const s = t.answer.replace(/[*#]/g, "").replace(
61
+ /Assessment Rating & Feedback/g,
62
+ '<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'
63
+ ), r = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;
64
+ if (s.includes("AI Guru")) {
65
+ if (s.includes("AI Guru"))
66
+ return console.log("aig found"), s.replace(r, (v, f, u) => `<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${f}</a>`);
67
+ } else
68
+ return s.replace(r, (v, f, u) => `<a href="${u}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${f}</a>`);
69
+ });
70
+ return (s, r) => (d(), p("div", tt, [
71
+ a("div", st, [
72
+ a("span", {
73
+ class: "fontFormattingAMA",
74
+ innerHTML: l.value
75
+ }, null, 8, at)
76
+ ])
77
+ ]));
78
+ }
79
+ });
80
+ const nt = /* @__PURE__ */ R(ot, [["__scopeId", "data-v-fa0c60bd"]]), lt = { class: "flex justify-end items-end py-3" }, rt = { class: "max-w-[80%]" }, ct = { class: "w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg" }, it = /* @__PURE__ */ q({
81
+ __name: "learnerAMA",
82
+ props: {
83
+ question: {
84
+ type: String,
85
+ required: !0
86
+ }
87
+ },
88
+ setup(n) {
89
+ return (t, l) => (d(), p("div", lt, [
90
+ a("div", rt, [
91
+ a("div", ct, V(n.question), 1)
92
+ ])
93
+ ]));
94
+ }
95
+ }), dt = (n) => (O("data-v-12a02acf"), n = n(), K(), n), ut = { class: "flex w-full flex-col items-start justify-start bg-white" }, mt = { class: "bot-typing-animation gap-1" }, pt = { class: "block w-full text-lg italic text-gray-800" }, _t = /* @__PURE__ */ dt(() => /* @__PURE__ */ a("span", { class: "dot-animation" }, [
96
+ /* @__PURE__ */ a("span", null, "."),
97
+ /* @__PURE__ */ a("span", null, "."),
98
+ /* @__PURE__ */ a("span", null, ".")
99
+ ], -1)), ft = /* @__PURE__ */ Ee('<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), gt = /* @__PURE__ */ q({
100
+ __name: "LoadingResponseAMA",
101
+ setup(n) {
102
+ const t = i("Generating response"), l = i([
103
+ "This may take a few seconds",
104
+ "Fetching the best response for you",
105
+ "Thinking... give me a moment",
106
+ "One moment while I gather the information",
107
+ "Hang in tight, we are almost there",
108
+ "Almost there... just a bit longer",
109
+ "Compiling a response for you"
110
+ ]);
111
+ return setTimeout(() => {
112
+ const s = Math.floor(Math.random() * l.value.length);
113
+ t.value = l.value[s];
114
+ }, 15e3), (s, r) => (d(), p("div", ut, [
115
+ a("div", mt, [
116
+ a("div", pt, V(t.value), 1),
117
+ _t
118
+ ]),
119
+ ft
120
+ ]));
121
+ }
122
+ });
123
+ const ht = /* @__PURE__ */ R(gt, [["__scopeId", "data-v-12a02acf"]]), vt = { key: 0 }, xt = { key: 1 }, yt = {
124
+ key: 0,
125
+ class: "flex"
126
+ }, wt = /* @__PURE__ */ q({
127
+ __name: "conversationAMA",
128
+ setup(n) {
129
+ let t = i(""), l = i("");
130
+ t.value = '<a style="color:#00AECF;"', l.value = '<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';
131
+ const s = j(), r = i(), v = () => {
132
+ r.value.scrollTo(0, r.value.scrollHeight);
133
+ };
134
+ return W(() => {
135
+ var o;
136
+ const f = document.getElementsByName("askQuestion"), u = Array.from(f);
137
+ console.log("New array===>", u), f.length && ((o = u == null ? void 0 : u.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" })), window.addEventListener("custom-event", v);
138
+ }), Le(() => {
139
+ var o;
140
+ const f = document.getElementsByName("askQuestion"), u = Array.from(f);
141
+ console.log("New array===>", u), f.length && ((o = u == null ? void 0 : u.pop()) == null || o.scrollIntoView({ behavior: "smooth", block: "center" }));
142
+ }), Fe(() => {
143
+ window.removeEventListener("custom-event", v);
144
+ }), (f, u) => (d(), p("div", {
145
+ ref_key: "nestedElement",
146
+ ref: r,
147
+ class: "smooth-scroll overflow-auto md:px-6 px-2"
148
+ }, [
149
+ $(et),
150
+ (d(!0), p(Re, null, Ne(S(s).conversations, (o, y) => (d(), p("div", { key: y }, [
151
+ o.question ? (d(), p("div", vt, [
152
+ $(it, {
153
+ question: o.question,
154
+ c2question: o.c2question,
155
+ "show-feedback": o.showFeedback,
156
+ id: `qId${y}`,
157
+ name: "askQuestion",
158
+ "que-id": y
159
+ }, null, 8, ["question", "c2question", "show-feedback", "id", "que-id"])
160
+ ])) : D("", !0),
161
+ o.answer ? (d(), p("div", xt, [
162
+ $(nt, {
163
+ question: o == null ? void 0 : o.question,
164
+ c2question: o == null ? void 0 : o.c2question,
165
+ "show-sources": o == null ? void 0 : o.showSources,
166
+ questionId: o.id,
167
+ answer: o.answer.replaceAll("<a", S(t)).replaceAll("<ul", S(l)),
168
+ "show-feedback": o.showFeedback,
169
+ "related-ques": o.relatedQues,
170
+ "options-array": o.optionsArray,
171
+ "ans-id": y,
172
+ onCharTyped: v
173
+ }, null, 8, ["question", "c2question", "show-sources", "questionId", "answer", "show-feedback", "related-ques", "options-array", "ans-id"])
174
+ ])) : D("", !0)
175
+ ]))), 128)),
176
+ S(s).dotLoader ? (d(), p("div", yt, [
177
+ $(ht)
178
+ ])) : D("", !0)
179
+ ], 512));
180
+ }
181
+ });
182
+ const bt = /* @__PURE__ */ R(wt, [["__scopeId", "data-v-f92feaf3"]]), U = (n) => (O("data-v-3fa4dc8a"), n = n(), K(), n), At = { class: "z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6" }, kt = { class: "py-2" }, $t = { class: "flex" }, qt = { class: "z-1 relative w-full" }, Mt = { class: "relative w-full" }, Tt = { class: "absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3" }, St = { key: 0 }, It = /* @__PURE__ */ U(() => /* @__PURE__ */ a("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)), Et = [
183
+ It
184
+ ], Lt = {
185
+ key: 1,
186
+ class: "tooltip"
187
+ }, Ft = /* @__PURE__ */ U(() => /* @__PURE__ */ a("span", { class: "tooltiptext fontFormattingAMA" }, "Waiting for response", -1)), Rt = /* @__PURE__ */ U(() => /* @__PURE__ */ a("img", {
188
+ class: "w-7 h-7",
189
+ src: Me,
190
+ alt: "watingIcon"
191
+ }, null, -1)), Nt = [
192
+ Ft,
193
+ Rt
194
+ ], Ct = { class: "flex justify-start gap-2 md:gap-1" }, Bt = /* @__PURE__ */ U(() => /* @__PURE__ */ a("div", { class: "pt-1 text-start font-sans" }, [
195
+ /* @__PURE__ */ a("div", { class: "flex justify-start items-start text-[#161916] italic" }, "10 questions remaining for the day"),
196
+ /* @__PURE__ */ a("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. ")
197
+ ], -1)), zt = /* @__PURE__ */ q({
198
+ __name: "NewQuestionAMA",
199
+ setup(n) {
200
+ const t = j(), l = Ae(), s = i(""), r = i("");
201
+ t.question = "";
202
+ const v = i(null), f = i(!1), u = i(Q), o = i(!1);
203
+ r.value = t.recognizedText, W(() => {
204
+ v.value.focus();
205
+ });
206
+ const y = (T) => {
207
+ const m = T.length;
208
+ u.value = Q - m, f.value = m >= Q;
209
+ }, M = async () => {
210
+ var T, m, A, N, C, B, z, w;
211
+ console.log("options fdsfdscdzxfsdv", t.recognizedText);
212
+ try {
213
+ if (console.log("options fdsfdscdzxfsdv", t.recognizedText), t.question.trim().length < 1) {
214
+ console.log("Please enter answer!");
215
+ return;
216
+ }
217
+ o.value = !0, t.dotLoader = !0;
218
+ const _ = {
219
+ question: t.question || t.recognizedText
220
+ };
221
+ console.log("ques", _), t.conversations.push(_);
222
+ const g = i("");
223
+ g.value = t.question || t.recognizedText, t.question = "";
224
+ const k = {
225
+ ohr_id: s.value,
226
+ past_messages: t.past_messages,
227
+ question: g.value || t.recognizedText,
228
+ bandCode: t.band_code,
229
+ userGenomeFunction: t.genomeFunctionValue,
230
+ userGenomeRole: t.genomeRoleValue,
231
+ skillId: t.simulationSkill || "937e84ef-e95d-4327-9afe-e7be2bf420eb"
232
+ }, h = await we("/sqlTest", k);
233
+ if (s.value = (m = (T = h.data) == null ? void 0 : T.body) == null ? void 0 : m.ohr, ((N = (A = h == null ? void 0 : h.data) == null ? void 0 : A.body) == null ? void 0 : N.answer) === "") {
234
+ console.log("in the if case calling api again");
235
+ const b = await we("/sqlTest", k);
236
+ t.addConversation((C = b.data) == null ? void 0 : C.body, "new");
237
+ } else
238
+ console.log("in the else case"), t.addConversation((B = h.data) == null ? void 0 : B.body, "new");
239
+ console.log("ohr id asdf", s.value), o.value = !1, t.dotLoader = !1, t.recognizedText = "";
240
+ } catch (_) {
241
+ if (console.error(_), t.dotLoader = !1, F.isAxiosError(_)) {
242
+ const g = _;
243
+ console.log("Error found!"), console.error((z = g.response) == null ? void 0 : z.data), l.setError(((w = g.response) == null ? void 0 : w.data).message);
244
+ } else
245
+ l.setError("There was an issue, please contact helpmate");
246
+ }
247
+ };
248
+ return (T, m) => (d(), p("div", At, [
249
+ a("div", kt, [
250
+ a("div", $t, [
251
+ a("div", qt, [
252
+ a("div", Mt, [
253
+ a("div", Tt, [
254
+ o.value ? (d(), p("div", Lt, Nt)) : (d(), p("div", St, [
255
+ (d(), p("svg", {
256
+ onClick: m[0] || (m[0] = (A) => M()),
257
+ xmlns: "http://www.w3.org/2000/svg",
258
+ fill: "currentColor",
259
+ class: "bi bi-send ml-2 h-7 w-7 rotate-45 rounded",
260
+ viewBox: "0 0 16 16"
261
+ }, Et))
262
+ ]))
263
+ ]),
264
+ a("div", Ct, [
265
+ Ce(a("input", {
266
+ onKeyup: [
267
+ m[1] || (m[1] = ze((A) => o.value ? "" : M(), ["enter"])),
268
+ m[3] || (m[3] = (A) => y(S(t).question))
269
+ ],
270
+ "onUpdate:modelValue": m[2] || (m[2] = (A) => S(t).question = A),
271
+ class: "fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",
272
+ placeholder: "Write your answer here...",
273
+ type: "text",
274
+ ref_key: "AiSearch",
275
+ ref: v
276
+ }, null, 544), [
277
+ [Be, S(t).question]
278
+ ])
279
+ ])
280
+ ]),
281
+ Bt
282
+ ])
283
+ ])
284
+ ])
285
+ ]));
286
+ }
287
+ });
288
+ const Vt = /* @__PURE__ */ R(zt, [["__scopeId", "data-v-3fa4dc8a"]]), Y = (n) => (O("data-v-a82b5f45"), n = n(), K(), n), jt = /* @__PURE__ */ Y(() => /* @__PURE__ */ a("div", { class: "max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]" }, [
289
+ /* @__PURE__ */ a("div", { class: "text-2xl font-[700]" }, "Assessment Access Required"),
290
+ /* @__PURE__ */ a("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 ")
291
+ ], -1)), Ut = {
292
+ key: 1,
293
+ className: "h-screen flex flex-col items-stretch"
294
+ }, Pt = { class: "z-20" }, Qt = /* @__PURE__ */ Y(() => /* @__PURE__ */ a("div", { class: "mt-6" }, null, -1)), Dt = { class: "flex h-full items-stretch overflow-hidden" }, Gt = { class: "mx-auto w-11/12 bg-white" }, Ht = { class: "relative flex h-full w-full flex-col items-stretch overflow-hidden" }, Ot = /* @__PURE__ */ Y(() => /* @__PURE__ */ a("div", { class: "mt-[160px]" }, null, -1)), Kt = { class: "relative" }, Wt = /* @__PURE__ */ q({
295
+ __name: "AssessmentAMA",
296
+ setup(n) {
297
+ const t = i(!0), l = i(!1), s = j(), r = Ae(), v = i(""), f = i(""), u = localStorage.getItem("accessToken");
298
+ let o = "", y = "", M = "";
299
+ const T = i(!1), m = new URL(window.location.href), A = m.searchParams.get("amaId");
300
+ s.simulationSkill = A ?? "";
301
+ const N = ["703331197", "703380812", "703331909", "703363051", "703319578"];
302
+ W(async () => {
303
+ console.log("uuid. value", A), t.value = !0, await B(), await z(), await C(), t.value = !1;
304
+ });
305
+ const C = async () => {
306
+ var w, _, g, k, h, c, b, E, x, L, Z, J, X, ee, te, se, ae, oe, ne, le, re, ce, ie, de, ue, me, pe, _e, fe, ge, he, ve, xe, ye;
307
+ console.log("Start getAssessmentDetails");
308
+ try {
309
+ o = "https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=d9828d76-cfab-4563-8ff4-1e86a9d3bc8f";
310
+ const e = await be(o);
311
+ console.log("response from GetAMA", e), v.value = (_ = (w = e == null ? void 0 : e.data) == null ? void 0 : w.data) == null ? void 0 : _.name, s.welcomeMessage = (k = (g = e == null ? void 0 : e.data) == null ? void 0 : g.data) == null ? void 0 : k.displayMsg, console.log("response from GetAMA skill Name", v.value), s.skillNameForSimulation = v.value, s.generatedPrompt = (c = (h = e == null ? void 0 : e.data) == null ? void 0 : h.data) == null ? void 0 : c.generatedPrompt, s.assessmentType = (E = (b = e == null ? void 0 : e.data) == null ? void 0 : b.data) == null ? void 0 : E.assessmentType, f.value = (L = (x = e == null ? void 0 : e.data) == null ? void 0 : x.data) == null ? void 0 : L.status, T.value = (J = (Z = e == null ? void 0 : e.data) == null ? void 0 : Z.data) == null ? void 0 : J.editMode, s.empSeniority = (ee = (X = e == null ? void 0 : e.data) == null ? void 0 : X.data) == null ? void 0 : ee.empSeniority, s.functionRole = (se = (te = e == null ? void 0 : e.data) == null ? void 0 : te.data) == null ? void 0 : se.functionRole, y = (oe = (ae = e == null ? void 0 : e.data) == null ? void 0 : ae.data) == null ? void 0 : oe.accessBand, M = (le = (ne = e == null ? void 0 : e.data) == null ? void 0 : ne.data) == null ? void 0 : le.accessOhrList;
312
+ const I = (ce = (re = e == null ? void 0 : e.data) == null ? void 0 : re.data) == null ? void 0 : ce.createdBy;
313
+ s.mcqType = (de = (ie = e == null ? void 0 : e.data) == null ? void 0 : ie.data) == null ? void 0 : de.mcqTypes, s.storeFinalFeedback = (me = (ue = e == null ? void 0 : e.data) == null ? void 0 : ue.data) == null ? void 0 : me.storeFinalFeedback, s.storeFinalScore = (_e = (pe = e == null ? void 0 : e.data) == null ? void 0 : pe.data) == null ? void 0 : _e.storeFinalScore, console.log("store mcqType====>", s.mcqType);
314
+ const ke = s == null ? void 0 : s.band_code;
315
+ console.log("accessBand , accessOhrList====>", y, M);
316
+ const P = (fe = y == null ? void 0 : y.split(",")) == null ? void 0 : fe.map(($e) => $e.trim());
317
+ if (console.log("bands ,====>", P), I === (s == null ? void 0 : s.ohr) || N.includes(s == null ? void 0 : s.ohr))
318
+ console.log("User has access to this assessment.");
319
+ else {
320
+ if (P.length === 0 && M.length === 0)
321
+ throw console.log("Both bands and exceptionOHR are empty. Access denied."), {
322
+ response: {
323
+ status: 424,
324
+ data: {
325
+ message: "You don't have access to this assessment. Please contact to administrator"
326
+ }
327
+ }
328
+ };
329
+ if (P.includes(ke) || M.includes(s == null ? void 0 : s.ohr))
330
+ console.log("User has access to this assessment.");
331
+ else
332
+ throw console.log("User does not have access to this assessment."), {
333
+ response: {
334
+ status: 424,
335
+ data: {
336
+ message: "You don't have access to this assessment. Please contact to administrator"
337
+ }
338
+ }
339
+ };
340
+ }
341
+ console.log("end getAssessmentDetails");
342
+ } catch (e) {
343
+ if (console.error(e), t.value = !1, F.isAxiosError(e) && ((ge = e.response) != null && ge.status) || e && typeof e == "object" && "response" in e && e.response && typeof e.response == "object" && "status" in e.response && e.response.status) {
344
+ const I = e;
345
+ if (console.log("Error found!"), console.error((he = I.response) == null ? void 0 : he.data), ((ve = I.response) == null ? void 0 : ve.status) === 424 || ((xe = I.response) == null ? void 0 : xe.status) === 425) {
346
+ l.value = !0;
347
+ return;
348
+ }
349
+ r.setError(((ye = I.response) == null ? void 0 : ye.data).message);
350
+ } else
351
+ r.setError("There was an issue, please contact helpmate");
352
+ }
353
+ }, B = async () => {
354
+ var w, _, g, k, h;
355
+ try {
356
+ if (A === null)
357
+ throw {
358
+ response: {
359
+ status: 424,
360
+ data: {
361
+ message: "Invalid URL"
362
+ }
363
+ }
364
+ };
365
+ console.log("before calling get learner"), s.amaSkillId = m.searchParams.get("skillId") || "";
366
+ const c = await be(
367
+ `/getLearnerData?forSimulation=true&skillForSimulation=${s.simulationSkill}`
368
+ );
369
+ s.initialize(c.data);
370
+ } catch (c) {
371
+ if (console.error(c), t.value = !1, F.isAxiosError(c) && ((w = c.response) != null && w.status) || c && typeof c == "object" && "response" in c && c.response && typeof c.response == "object" && "status" in c.response && c.response.status) {
372
+ const b = c;
373
+ if (console.log("Error found!"), console.error((_ = b.response) == null ? void 0 : _.data), ((g = b.response) == null ? void 0 : g.status) === 424 || ((k = b.response) == null ? void 0 : k.status) === 425) {
374
+ l.value = !0;
375
+ return;
376
+ }
377
+ r.setError(((h = b.response) == null ? void 0 : h.data).message);
378
+ } else
379
+ r.setError("There was an issue, please contact helpmate");
380
+ }
381
+ }, z = async () => {
382
+ var w, _, g, k, h, c, b, E;
383
+ try {
384
+ const x = await F({
385
+ url: "https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",
386
+ headers: {
387
+ authorization: `Bearer ${u}`,
388
+ "content-type": "application/json"
389
+ },
390
+ method: "get"
391
+ });
392
+ s.genomeFunctionValue = (g = (_ = (w = x == null ? void 0 : x.data) == null ? void 0 : w.role_function) == null ? void 0 : _.function) == null ? void 0 : g.name, s.genomeRoleValue = (c = (h = (k = x == null ? void 0 : x.data) == null ? void 0 : k.role_function) == null ? void 0 : h.role) == null ? void 0 : c.name, console.log("profile data", s.genomeFunctionValue, s.genomeRoleValue);
393
+ } catch (x) {
394
+ if (console.error(x), t.value = !1, F.isAxiosError(x)) {
395
+ const L = x;
396
+ console.log("Error found!"), console.error((b = L.response) == null ? void 0 : b.data), r.setError(((E = L.response) == null ? void 0 : E.data).message);
397
+ } else
398
+ r.setError("There was an issue, please contact helpmate");
399
+ }
400
+ };
401
+ return (w, _) => (d(), p("section", null, [
402
+ $(Ie, { "is-visible": l.value }, {
403
+ default: Ve(() => [
404
+ jt
405
+ ]),
406
+ _: 1
407
+ }, 8, ["is-visible"]),
408
+ a("div", null, [
409
+ t.value ? (d(), je(Te, { key: 0 })) : (d(), p("main", Ut, [
410
+ a("div", Pt, [
411
+ $(Ke)
412
+ ]),
413
+ Qt,
414
+ a("div", Dt, [
415
+ a("div", Gt, [
416
+ a("div", Ht, [
417
+ $(bt),
418
+ Ot
419
+ ]),
420
+ a("div", Kt, [
421
+ $(Vt)
422
+ ])
423
+ ])
424
+ ])
425
+ ]))
426
+ ])
427
+ ]));
428
+ }
429
+ });
430
+ const ss = /* @__PURE__ */ R(Wt, [["__scopeId", "data-v-a82b5f45"]]);
431
+ export {
432
+ ss as default
433
+ };