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