@1024pix/epreuves-components 0.9.7 → 0.10.0

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,5 +1,5 @@
1
- import { a as B, r as N, v as I, c as d, o as m, D as b, z as f, y as g, x as y, f as h, m as L, t as x, _ as P, B as p, E as q, G as F, F as k, b as O, e as M } from "./_plugin-vue_export-helper-OrrhezDE.js";
2
- function T(i, u = A) {
1
+ import { a as B, r as N, y as I, c as d, o as m, z as b, A as f, B as g, v as y, f as h, m as q, t as x, _ as P, q as p, C as L, D as F, F as k, b as O, e as A } from "./_plugin-vue_export-helper-CGpZIhKK.js";
2
+ function M(i, u = T) {
3
3
  const a = [...i];
4
4
  for (let n = a.length - 1; n > 0; n--) {
5
5
  const l = u() % (n + 1);
@@ -7,10 +7,10 @@ function T(i, u = A) {
7
7
  }
8
8
  return a;
9
9
  }
10
- function A() {
10
+ function T() {
11
11
  return Math.floor(Math.random() * 2 ** 32);
12
12
  }
13
- const D = ["aria-labelledby", "aria-selected", "tabindex"], E = { key: 0 }, K = ["id"], Q = ["id"], R = /* @__PURE__ */ B({
13
+ const D = ["aria-labelledby", "aria-selected", "tabindex"], K = { key: 0 }, Q = ["id"], R = ["id"], E = /* @__PURE__ */ B({
14
14
  __name: "ImageOption.ce",
15
15
  props: {
16
16
  choice: { type: Object },
@@ -43,22 +43,22 @@ const D = ["aria-labelledby", "aria-selected", "tabindex"], E = { key: 0 }, K =
43
43
  t[3] || (t[3] = b(f((r) => o.$emit("next"), ["stop", "prevent"]), ["down", "right"]))
44
44
  ]
45
45
  }, [
46
- o.choice.image ? (m(), d("figure", E, [
47
- h("img", L(o.choice.image, {
46
+ o.choice.image ? (m(), d("figure", K, [
47
+ h("img", q(o.choice.image, {
48
48
  class: o.imageClass,
49
49
  alt: ""
50
50
  }), null, 16),
51
51
  h("figcaption", {
52
52
  class: y(o.nameClass),
53
53
  id: g(s)
54
- }, x(o.choice.name), 11, K)
54
+ }, x(o.choice.name), 11, Q)
55
55
  ])) : (m(), d("span", {
56
56
  key: 1,
57
57
  id: g(s)
58
- }, x(o.choice.name), 9, Q))
58
+ }, x(o.choice.name), 9, R))
59
59
  ], 42, D));
60
60
  }
61
- }), G = '.image-option{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;margin:.5rem;border:solid 2px #c1c7d0;border-radius:10px;background:#fff;width:calc(20% - 2em);min-width:150px;padding:1rem}.image-option--max4{width:calc(25% - 2em);min-width:175px}.image-option--max3{width:calc(33% - 2em)}.image-option--max2{width:calc(50% - 2em);min-width:300px}.image-option--max1{width:calc(100% - 4em);min-width:300px}.image-option:hover{cursor:pointer;box-shadow:0 3px 10px #0000001a;transform:scale(1.04);transition:transform ease-in .1s}.image-option:focus{outline:none;box-shadow:5px 5px #ffbe00,-5px 5px #ffbe00,5px -5px #ffbe00,-5px -5px #ffbe00}.image-option[aria-selected=true]{border-color:#3d68ff}.image-option[aria-selected=true]:after{content:"";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);background:#3d68ff4d;border-radius:10px;z-index:3}.image-option figure{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;margin:0;text-align:center;width:100%}.image-option figure img{max-width:100%;height:auto}.image-option figure img.icon{max-height:100px;width:auto}.image-option figure img.medium{max-width:50%;height:auto}.image-option figure figcaption{margin:1ex}', V = /* @__PURE__ */ P(R, [["styles", [G]]]), H = ["id"], J = ["aria-multiselectable", "aria-labelledby"], U = /* @__PURE__ */ B({
61
+ }), V = '.image-option{display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;margin:.5rem;border:solid 2px #c1c7d0;border-radius:10px;background:#fff;width:calc(20% - 2em);min-width:150px;padding:1rem}.image-option--max4{width:calc(25% - 2em);min-width:175px}.image-option--max3{width:calc(33% - 2em)}.image-option--max2{width:calc(50% - 2em);min-width:300px}.image-option--max1{width:calc(100% - 4em);min-width:300px}.image-option:hover{cursor:pointer;box-shadow:0 3px 10px #0000001a;transform:scale(1.04);transition:transform ease-in .1s}.image-option:focus{outline:none;box-shadow:5px 5px #ffbe00,-5px 5px #ffbe00,5px -5px #ffbe00,-5px -5px #ffbe00}.image-option[aria-selected=true]{border-color:#3d68ff}.image-option[aria-selected=true]:after{content:"";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);background:#3d68ff4d;border-radius:10px;z-index:3}.image-option figure{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;margin:0;text-align:center;width:100%}.image-option figure img{max-width:100%;height:auto}.image-option figure img.icon{max-height:100px;width:auto}.image-option figure img.medium{max-width:50%;height:auto}.image-option figure figcaption{margin:1ex}', G = /* @__PURE__ */ P(E, [["styles", [V]]]), H = ["id"], J = ["aria-multiselectable", "aria-labelledby"], U = /* @__PURE__ */ B({
62
62
  __name: "ImageQuiz.ce",
63
63
  props: {
64
64
  multiple: { type: Boolean, default: !1 },
@@ -72,8 +72,8 @@ const D = ["aria-labelledby", "aria-selected", "tabindex"], E = { key: 0 }, K =
72
72
  },
73
73
  emits: ["answer"],
74
74
  setup(i, { emit: u }) {
75
- const a = u, n = p(() => i.hideChoicesName ? "sr-only" : ""), l = p(() => i.orderChoices ? i.choices : T(i.choices)), s = N(new Array(i.choices.length).fill(!1)), o = p(() => l.value.filter((e, $) => s.value[$])), t = p(() => o.value.map((e) => e.response ?? e.name).sort().join(",")), r = I();
76
- q(t, () => {
75
+ const a = u, n = p(() => i.hideChoicesName ? "sr-only" : ""), l = p(() => i.orderChoices ? i.choices : M(i.choices)), s = N(new Array(i.choices.length).fill(!1)), o = p(() => l.value.filter((e, $) => s.value[$])), t = p(() => o.value.map((e) => e.response ?? e.name).sort().join(",")), r = I();
76
+ L(t, () => {
77
77
  a("answer", t.value);
78
78
  }, { immediate: !1 });
79
79
  const S = p(() => {
@@ -98,7 +98,7 @@ const D = ["aria-labelledby", "aria-selected", "tabindex"], E = { key: 0 }, K =
98
98
  "aria-labelledby": g(r),
99
99
  "aria-orientation": "horizontal"
100
100
  }, [
101
- (m(!0), d(k, null, O(l.value, (j, c) => (m(), M(V, {
101
+ (m(!0), d(k, null, O(l.value, (j, c) => (m(), A(G, {
102
102
  ref_for: !0,
103
103
  ref_key: "options",
104
104
  ref: v,
@@ -1,5 +1,5 @@
1
- import { _ as b, c as n, o as t, f as s, a as m, B as d, x as g, e as r, C as l, g as u, t as p } from "./_plugin-vue_export-helper-OrrhezDE.js";
2
- import { L as f } from "./Loading.ce-B_mSjXBH.js";
1
+ import { _ as b, c as n, o as t, f as s, a as m, q as d, v as g, e as r, x as l, g as u, t as p } from "./_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { L as f } from "./Loading.ce-BRzyhDRe.js";
3
3
  const h = {}, C = {
4
4
  height: "1rem",
5
5
  width: "auto",
@@ -46,7 +46,7 @@ function $(o, e) {
46
46
  }, null, -1)
47
47
  ]));
48
48
  }
49
- const z = /* @__PURE__ */ b(L, [["render", $]]), B = { class: "avatar" }, q = { class: "bubble" }, Z = ["innerHTML"], N = {
49
+ const z = /* @__PURE__ */ b(L, [["render", $]]), q = { class: "avatar" }, B = { class: "bubble" }, Z = ["innerHTML"], N = {
50
50
  key: 1,
51
51
  class: "attachment-label"
52
52
  }, H = /* @__PURE__ */ m({
@@ -63,14 +63,14 @@ const z = /* @__PURE__ */ b(L, [["render", $]]), B = { class: "avatar" }, q = {
63
63
  return (a, A) => (t(), n("div", {
64
64
  class: g(["message", a.message.direction])
65
65
  }, [
66
- s("span", B, [
66
+ s("span", q, [
67
67
  c.value ? (t(), r(k, { key: 0 })) : (t(), r(z, { key: 1 }))
68
68
  ]),
69
69
  a.message.isLoading ? (t(), r(f, {
70
70
  key: 0,
71
71
  class: "loader"
72
72
  })) : l("", !0),
73
- s("div", q, [
73
+ s("div", B, [
74
74
  i.value ? (t(), n("div", {
75
75
  key: 0,
76
76
  innerHTML: i.value,
@@ -1,4 +1,4 @@
1
- import { _ as o, c as a, o as r, f as s } from "./_plugin-vue_export-helper-OrrhezDE.js";
1
+ import { _ as o, c as a, o as r, f as s } from "./_plugin-vue_export-helper-CGpZIhKK.js";
2
2
  const n = ".loader{width:8px;aspect-ratio:1;border-radius:50%;animation:l5 1s infinite linear alternate;transform:translate(100%)}@keyframes l5{0%{box-shadow:13px 0 #000,-13px 0 #0002;background:#000}33%{box-shadow:13px 0 #000,-13px 0 #0002;background:#0002}66%{box-shadow:13px 0 #0002,-13px 0 #000;background:#0002}to{box-shadow:13px 0 #0002,-13px 0 #000;background:#000}}@media (prefers-reduced-motion: reduce){.loader{display:none}}", t = {}, d = {
3
3
  class: "loader",
4
4
  role: "alert"
@@ -0,0 +1,98 @@
1
+ import { a as f, r as g, y as w, c as h, o as i, f as l, v as C, B as b, t as m, m as x, A as y, H as _, _ as s, e as c, I as k } from "./_plugin-vue_export-helper-CGpZIhKK.js";
2
+ const $ = { class: "tooltip-container" }, B = ["id"], L = ["aria-labelledby", "aria-disabled"], z = /* @__PURE__ */ f({
3
+ inheritAttrs: !1,
4
+ __name: "ButtonTooltip.ce",
5
+ props: {
6
+ disabled: { type: Boolean, default: !1 },
7
+ label: { type: String },
8
+ tooltipPosition: { default: "top", type: String }
9
+ },
10
+ emits: ["click"],
11
+ setup(a, { emit: t }) {
12
+ const e = g(!0), p = w(), u = t;
13
+ function n(o) {
14
+ e.value = o;
15
+ }
16
+ function v() {
17
+ a.disabled || u("click");
18
+ }
19
+ return (o, r) => (i(), h("div", $, [
20
+ l("p", {
21
+ id: b(p),
22
+ class: C(["tooltip", {
23
+ "sr-only": e.value || o.disabled,
24
+ [`${o.tooltipPosition}`]: !0
25
+ }])
26
+ }, m(o.label), 11, B),
27
+ l("button", x(o.$attrs, {
28
+ onMouseenter: r[0] || (r[0] = (d) => n(!1)),
29
+ onMouseleave: r[1] || (r[1] = (d) => n(!0)),
30
+ onFocusin: r[2] || (r[2] = (d) => n(!1)),
31
+ onFocusout: r[3] || (r[3] = (d) => n(!0)),
32
+ onClick: y(v, ["stop"]),
33
+ "aria-labelledby": b(p),
34
+ "aria-disabled": o.disabled,
35
+ class: { disabled: o.disabled }
36
+ }), [
37
+ _(o.$slots, "default")
38
+ ], 16, L)
39
+ ]));
40
+ }
41
+ }), S = '*{--pix-neutral-800: #253858}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tooltip-container{position:relative;display:grid}.tooltip-container .tooltip{position:absolute;padding:5px 7px;background:var(--pix-neutral-800);color:#fff;border-radius:4px;z-index:400;margin:0;--horizontal-shift: 12px;--tooltip-gap: 1px;--arrow-height: 6px;--arrow-width: 5px}.tooltip-container .tooltip:before{content:"";position:absolute}.tooltip-container .tooltip.top{bottom:calc(100% + var(--tooltip-gap) + var(--arrow-height));left:50%;transform:translate(calc(var(--horizontal-shift) * -1))}.tooltip-container .tooltip.top:before{top:100%;left:calc(var(--horizontal-shift) - var(--arrow-width));border-right:var(--arrow-width) solid transparent;border-left:var(--arrow-width) solid transparent;border-top:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.bottom{top:calc(100% + var(--tooltip-gap) + var(--arrow-height));left:50%;transform:translate(calc(var(--horizontal-shift) * -1))}.tooltip-container .tooltip.bottom:before{bottom:100%;left:calc(var(--horizontal-shift) - var(--arrow-width));border-right:var(--arrow-width) solid transparent;border-left:var(--arrow-width) solid transparent;border-bottom:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.left{right:calc(100% + var(--tooltip-gap) + var(--arrow-height));top:50%;transform:translateY(-50%)}.tooltip-container .tooltip.left:before{left:100%;top:50%;transform:translateY(-50%);border-top:var(--arrow-width) solid transparent;border-bottom:var(--arrow-width) solid transparent;border-left:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container .tooltip.right{left:calc(100% + var(--tooltip-gap) + var(--arrow-height));top:50%;transform:translateY(-50%)}.tooltip-container .tooltip.right:before{right:100%;top:50%;transform:translateY(-50%);border-top:var(--arrow-width) solid transparent;border-bottom:var(--arrow-width) solid transparent;border-right:var(--arrow-height) solid var(--pix-neutral-800)}.tooltip-container button:hover{cursor:pointer}.tooltip-container button.disabled{color:#797e89;cursor:not-allowed;border-color:transparent;background:transparent}', H = /* @__PURE__ */ s(z, [["styles", [S]]]), M = {}, P = {
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ width: "16",
44
+ height: "16",
45
+ viewBox: "0 0 16 16",
46
+ fill: "inherit"
47
+ };
48
+ function A(a, t) {
49
+ return i(), h("svg", P, t[0] || (t[0] = [
50
+ l("path", {
51
+ d: "M10.5642 8.75826H3.28958C3.07681 8.75826 2.89719 8.68509 2.75075 8.53875C2.60442 8.39231 2.53125 8.2127 2.53125 7.99992C2.53125 7.78714 2.60442 7.60753 2.75075 7.46109C2.89719 7.31475 3.07681 7.24159 3.28958 7.24159H10.5642L7.45292 4.13042C7.30103 3.97842 7.22719 3.80025 7.23142 3.59592C7.23564 3.39159 7.31369 3.21348 7.46558 3.06159C7.61758 2.9207 7.79575 2.84814 8.00008 2.84392C8.20442 2.8397 8.38258 2.91353 8.53458 3.06542L12.9346 7.46542C13.0091 7.54009 13.0636 7.62298 13.0981 7.71409C13.1325 7.80509 13.1498 7.90037 13.1498 7.99992C13.1498 8.09948 13.1325 8.19475 13.0981 8.28575C13.0636 8.37687 13.0091 8.45975 12.9346 8.53442L8.53058 12.9383C8.38703 13.0818 8.21164 13.1536 8.00442 13.1536C7.79719 13.1536 7.61758 13.0818 7.46558 12.9383C7.31369 12.7864 7.23775 12.6061 7.23775 12.3976C7.23775 12.189 7.31369 12.0088 7.46558 11.8568L10.5642 8.75826Z",
52
+ fill: "inherit"
53
+ }, null, -1)
54
+ ]));
55
+ }
56
+ const N = /* @__PURE__ */ s(M, [["render", A]]), Y = {}, T = {
57
+ xmlns: "http://www.w3.org/2000/svg",
58
+ width: "16",
59
+ height: "16",
60
+ viewBox: "0 0 16 16",
61
+ fill: "inherit"
62
+ };
63
+ function F(a, t) {
64
+ return i(), h("svg", T, t[0] || (t[0] = [
65
+ l("path", {
66
+ d: "M5.4356 8.75868L8.54693 11.8698C8.69882 12.0218 8.77265 12.2 8.76843 12.4043C8.76421 12.6087 8.68615 12.7868 8.53426 12.9387C8.38226 13.0796 8.2041 13.1521 7.99976 13.1563C7.79543 13.1606 7.61726 13.0867 7.46526 12.9348L3.06526 8.53485C2.99071 8.46018 2.93621 8.37729 2.90176 8.28618C2.86732 8.19518 2.8501 8.0999 2.8501 8.00035C2.8501 7.90079 2.86732 7.80551 2.90176 7.71451C2.93621 7.6234 2.99071 7.54051 3.06526 7.46585L7.46926 3.06201C7.61282 2.91846 7.78821 2.84668 7.99543 2.84668C8.20265 2.84668 8.38226 2.91846 8.53426 3.06201C8.68615 3.2139 8.7621 3.39412 8.7621 3.60268C8.7621 3.81124 8.68615 3.99151 8.53426 4.14351L5.4356 7.24201H12.7103C12.923 7.24201 13.1027 7.31518 13.2491 7.46151C13.3954 7.60796 13.4686 7.78757 13.4686 8.00035C13.4686 8.21312 13.3954 8.39274 13.2491 8.53918C13.1027 8.68551 12.923 8.75868 12.7103 8.75868H5.4356Z",
67
+ fill: "inherit"
68
+ }, null, -1)
69
+ ]));
70
+ }
71
+ const I = /* @__PURE__ */ s(Y, [["render", F]]), Z = /* @__PURE__ */ f({
72
+ __name: "NavigationButton.ce",
73
+ props: {
74
+ disabled: { type: Boolean },
75
+ label: { type: String },
76
+ tooltipPosition: { type: String },
77
+ direction: { type: String }
78
+ },
79
+ emits: ["click"],
80
+ setup(a) {
81
+ return (t, e) => (i(), c(H, {
82
+ class: "button",
83
+ onClick: e[0] || (e[0] = (p) => t.$emit("click")),
84
+ "tooltip-position": t.tooltipPosition,
85
+ label: t.label,
86
+ disabled: t.disabled
87
+ }, {
88
+ default: k(() => [
89
+ t.direction === "next" ? (i(), c(N, { key: 0 })) : (i(), c(I, { key: 1 }))
90
+ ]),
91
+ _: 1
92
+ }, 8, ["tooltip-position", "label", "disabled"]));
93
+ }
94
+ }), j = "*{--pix-neutral-800: #253858;color:var(--pix-neutral-800)}.button{border-radius:100%;padding:4px;width:32px;height:32px;background:transparent;border:1px var(--pix-neutral-800) solid;aspect-ratio:1/1;fill:var(--pix-neutral-800);display:flex;align-items:center;justify-content:center}.button:hover{background:#c3d0ff}.button:active{background:#cdd1d9}", E = /* @__PURE__ */ s(Z, [["styles", [j]]]);
95
+ export {
96
+ H as B,
97
+ E as N
98
+ };
@@ -4137,15 +4137,15 @@ const jl = (e, t) => {
4137
4137
  return s;
4138
4138
  };
4139
4139
  export {
4140
- El as A,
4141
- Uo as B,
4142
- Rl as C,
4143
- Dl as D,
4144
- as as E,
4140
+ Nl as A,
4141
+ ri as B,
4142
+ as as C,
4143
+ Sl as D,
4144
+ Kr as E,
4145
4145
  he as F,
4146
- Sl as G,
4147
- Kr as H,
4148
- Ns as I,
4146
+ Ns as G,
4147
+ El as H,
4148
+ Fr as I,
4149
4149
  vl as J,
4150
4150
  Fl as K,
4151
4151
  jl as _,
@@ -4157,22 +4157,22 @@ export {
4157
4157
  ji as f,
4158
4158
  ge as g,
4159
4159
  Cl as h,
4160
- Mo as i,
4161
- ul as j,
4162
- Pl as k,
4163
- Fr as l,
4160
+ Ft as i,
4161
+ Mo as j,
4162
+ ul as k,
4163
+ Pl as l,
4164
4164
  Io as m,
4165
4165
  ci as n,
4166
4166
  Es as o,
4167
4167
  oo as p,
4168
- Ft as q,
4168
+ Uo as q,
4169
4169
  xl as r,
4170
4170
  Sr as s,
4171
4171
  er as t,
4172
4172
  Il as u,
4173
- wl as v,
4173
+ Ds as v,
4174
4174
  Al as w,
4175
- Ds as x,
4176
- ri as y,
4177
- Nl as z
4175
+ Rl as x,
4176
+ wl as y,
4177
+ Dl as z
4178
4178
  };
@@ -1,102 +1,100 @@
1
- import { a as x, c as r, o as t, f as e, t as i, I as L, _ as k, r as d, e as _, g as f, l as P, i as A, F as v, b as h, x as M, d as T } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { B as I, a as N, i as y, b as z } from "../ButtonTooltip.ce-DJWPmZEW.js";
3
- import { L as w } from "../LLMMessage.ce-DHyl5CcV.js";
4
- const q = {
5
- "complete-phrase": { iaSuggestions: "🧠 Suggestions de l'IA", explanation: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le nom {{name}} a une probabilité de {{percent}}%", clickHereButton: "Cliquez ici pour voir ce que l'IA va compléter", successfullyCompletedSentence: "🎉 Phrase complétée avec succès !" }
6
- }, E = { class: "probability-bar" }, D = ["aria-label"], F = /* @__PURE__ */ x({
1
+ import { a as w, c as i, o as a, f as e, t as s, G as C, _ as x, r as p, g, F as f, b as v, v as P, e as B, d as A } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { a as M, i as h, b as z } from "../i18n-DZYcdfDF.js";
3
+ import { L as y } from "../LLMMessage.ce-DBgXmxn9.js";
4
+ const N = {
5
+ "complete-phrase": { iaSuggestions: "🧠 Suggestions de l'IA", explanation: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le mot {{name}} a une probabilité de {{percent}}%", clickHereButton: "Cliquez ici pour voir ce que l'IA va compléter", successfullyCompletedSentence: "🎉 Phrase complétée avec succès !" }
6
+ }, I = { class: "probability-bar" }, T = { "aria-hidden": "true" }, q = { class: "sr-only" }, E = /* @__PURE__ */ w({
7
7
  __name: "ProbabilityBar.ce",
8
8
  props: {
9
9
  name: { type: String },
10
10
  percent: { type: Number }
11
11
  },
12
- setup(s) {
13
- return (o, n) => (t(), r("div", E, [
14
- e("p", null, i(o.name), 1),
12
+ setup(n) {
13
+ return (o, r) => (a(), i("div", I, [
14
+ e("p", T, s(o.name), 1),
15
+ e("p", q, s(o.$t("complete-phrase.ariaLabelDescription", { name: o.name, percent: o.percent })), 1),
15
16
  e("div", {
16
- style: L(`width: ${o.percent}%`),
17
+ style: C(`width: ${o.percent}%`),
17
18
  class: "probability-bar__percent",
18
- "aria-label": o.$t("complete-phrase.ariaLabelDescription", { name: o.name, percent: o.percent })
19
- }, null, 12, D),
20
- n[0] || (n[0] = e("div", { class: "probability-bar__background" }, null, -1))
19
+ "aria-hidden": "true"
20
+ }, null, 4),
21
+ r[0] || (r[0] = e("div", {
22
+ class: "probability-bar__background",
23
+ "aria-hidden": "true"
24
+ }, null, -1))
21
25
  ]));
22
26
  }
23
- }), H = ".probability-bar[data-v-609dbc19]{position:relative;padding-bottom:10px;border-bottom:1px solid #cbcbcb}.probability-bar__percent[data-v-609dbc19]{position:absolute;left:0;z-index:2;height:5px;border-radius:5px;background-color:#235386}.probability-bar__background[data-v-609dbc19]{position:absolute;left:0;z-index:1;width:100%;height:5px;border-radius:5px;background-color:#92a1b2}.probability-bar p[data-v-609dbc19]{margin-bottom:0}", O = /* @__PURE__ */ k(F, [["styles", [H]], ["__scopeId", "data-v-609dbc19"]]), R = { class: "container" }, V = { class: "container__left-side" }, j = {
27
+ }), D = ".probability-bar[data-v-f5414745]{position:relative;padding-bottom:10px;border-bottom:1px solid #cbcbcb}.probability-bar__percent[data-v-f5414745]{position:absolute;left:0;z-index:2;height:5px;border-radius:5px;background-color:#235386}.probability-bar__background[data-v-f5414745]{position:absolute;left:0;z-index:1;width:100%;height:5px;border-radius:5px;background-color:#92a1b2}.probability-bar p[data-v-f5414745]{margin-bottom:0}.sr-only[data-v-f5414745]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", F = /* @__PURE__ */ x(E, [["styles", [D]], ["__scopeId", "data-v-f5414745"]]), O = { class: "container" }, R = { class: "container__left-side" }, j = { class: "container__conversation" }, G = ["aria-describedby"], H = {
24
28
  key: 1,
25
29
  class: "container__successSentence"
26
- }, W = { class: "container__right-side" }, G = { class: "probabilities" }, J = ["aria-hidden"], K = /* @__PURE__ */ x({
30
+ }, V = { class: "container__right-side" }, W = ["aria-level"], J = { "aria-hidden": "true" }, K = { class: "probabilities" }, Q = ["id", "aria-hidden"], U = /* @__PURE__ */ w({
27
31
  __name: "CompletePhrase.ce",
28
32
  props: {
29
33
  listOfProbabilityBarsLists: { type: Array },
30
34
  userMessage: { type: String },
31
35
  llmMessage: { type: String },
32
- wordsToAdd: { type: Array }
36
+ wordsToAdd: { type: Array },
37
+ titleLevel: { type: Number }
33
38
  },
34
- setup(s, { expose: o }) {
35
- const n = s, l = d(0), p = d(n.llmMessage), b = d(!1), c = d(n.wordsToAdd);
36
- function S() {
37
- b.value = !1, p.value = n.llmMessage, c.value = n.wordsToAdd, l.value = 0;
39
+ setup(n, { expose: o }) {
40
+ const r = n, l = p(0), u = p(r.llmMessage), b = p(!1), d = p(r.wordsToAdd);
41
+ function k() {
42
+ b.value = !1, u.value = r.llmMessage, d.value = r.wordsToAdd, l.value = 0;
38
43
  }
39
- function B() {
40
- if (c.value.length <= 0) {
41
- b.value = !0;
42
- return;
43
- }
44
- l.value += 1;
45
- const [a, ...m] = c.value;
46
- c.value = m, p.value += `<span style="font-weight: bold;">${a} </span>`;
44
+ function S() {
45
+ d.value.length === 1 && (b.value = !0), l.value += 1;
46
+ const [t, ...m] = d.value;
47
+ d.value = m, u.value += `<span style="font-weight: bold;">${t} </span>`;
47
48
  }
48
49
  return o({
49
- reset: S
50
- }), (a, m) => (t(), r("div", R, [
51
- e("div", V, [
52
- e("div", null, [
53
- f(w, {
50
+ reset: k
51
+ }), (t, m) => (a(), i("div", O, [
52
+ e("div", R, [
53
+ e("div", j, [
54
+ g(y, {
54
55
  class: "container__message",
55
- message: { content: a.userMessage, direction: "outbound" }
56
- }, null, 8, ["message"])
57
- ]),
58
- e("div", null, [
59
- f(w, {
56
+ message: { content: t.userMessage, direction: "outbound" }
57
+ }, null, 8, ["message"]),
58
+ g(y, {
60
59
  class: "container__message",
61
- message: { content: p.value, direction: "inbound" }
60
+ message: { content: u.value, direction: "inbound" }
62
61
  }, null, 8, ["message"])
63
62
  ]),
64
- b.value ? (t(), r("p", j, i(a.$t("complete-phrase.successfullyCompletedSentence")), 1)) : (t(), _(I, {
63
+ b.value ? (a(), i("p", H, s(t.$t("complete-phrase.successfullyCompletedSentence")), 1)) : (a(), i("button", {
65
64
  key: 0,
66
- onClick: B,
65
+ onClick: S,
67
66
  class: "container__button",
68
- label: a.$t("complete-phrase.clickHereButton"),
69
- "tooltip-position": "bottom"
70
- }, {
71
- default: P(() => [
72
- A(i(a.$t("complete-phrase.clickHereButton")), 1)
73
- ]),
74
- _: 1
75
- }, 8, ["label"]))
67
+ "aria-describedby": `currentProbability${l.value}`
68
+ }, s(t.$t("complete-phrase.clickHereButton")), 9, G))
76
69
  ]),
77
- e("div", W, [
78
- e("h2", null, i(a.$t("complete-phrase.iaSuggestions")), 1),
79
- e("p", null, i(a.$t("complete-phrase.explanation")), 1),
80
- e("div", G, [
81
- (t(!0), r(v, null, h(a.listOfProbabilityBarsLists, (C, u) => (t(), r("div", {
82
- class: M(["probability", { hidden: u !== l.value }]),
83
- key: u,
84
- "aria-hidden": u !== l.value
70
+ e("div", V, [
71
+ e("div", {
72
+ class: "container__title",
73
+ role: "header",
74
+ "aria-level": t.titleLevel
75
+ }, s(t.$t("complete-phrase.iaSuggestions")), 9, W),
76
+ e("p", J, s(t.$t("complete-phrase.explanation")), 1),
77
+ e("div", K, [
78
+ (a(!0), i(f, null, v(t.listOfProbabilityBarsLists, ($, c) => (a(), i("div", {
79
+ class: P(["probability", { hidden: c !== l.value }]),
80
+ key: c,
81
+ id: `currentProbability${c}`,
82
+ "aria-hidden": c !== l.value
85
83
  }, [
86
- (t(!0), r(v, null, h(C, (g, $) => (t(), _(O, {
87
- name: g.name,
88
- percent: g.percent,
89
- key: $
84
+ (a(!0), i(f, null, v($, (_, L) => (a(), B(F, {
85
+ name: _.name,
86
+ percent: _.percent,
87
+ key: L
90
88
  }, null, 8, ["name", "percent"]))), 128))
91
- ], 10, J))), 128))
89
+ ], 10, Q))), 128))
92
90
  ])
93
91
  ])
94
92
  ]));
95
93
  }
96
- }), Q = "[data-v-7541b9af]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.container[data-v-7541b9af]{display:grid;grid-row:auto;gap:10px}.container .probabilities[data-v-7541b9af]{display:grid}.container .probability[data-v-7541b9af]{grid-row:1;grid-column:1}.container__right-side[data-v-7541b9af]{grid-column:2;grid-row:1}.container__right-side h2[data-v-7541b9af]{margin-top:0}.container__right-side .hidden[data-v-7541b9af]{visibility:hidden;grid-row:1;grid-column:1}.container__left-side[data-v-7541b9af]{grid-column:1;grid-row:1}.container__left-side>div[data-v-7541b9af]{display:flex;flex-direction:column}.container__message[data-v-7541b9af]{margin-bottom:20px}.container__successSentence[data-v-7541b9af]{width:90%;background-color:#cec3f4;padding:.8rem .5rem;border-radius:10px}[data-v-7541b9af] .container__button{width:90%;border:none;padding:1.2rem 1rem;background:#355ac4;color:#fff;border-radius:10px;font-weight:700}[data-v-7541b9af] .container__button:hover{background:#2b3c77}@media (max-width: 600px){.container[data-v-7541b9af]{display:flex;flex-wrap:wrap}}", U = /* @__PURE__ */ k(K, [["styles", [Q]], ["__scopeId", "data-v-7541b9af"]]);
97
- N(/* @__PURE__ */ Object.assign({ "./locales/fr.json": q })).catch((s) => console.error(s));
98
- window.customElements.define("complete-phrase", T(U, {
99
- configureApp(s) {
100
- y.changeLanguage(document?.documentElement?.lang || navigator.language), s.use(z, { i18next: y });
94
+ }), X = "[data-v-f0837864]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.container[data-v-f0837864]{display:grid;grid-row:auto;gap:10px}.container__conversation[data-v-f0837864]{display:flex;flex-direction:column;background:#fff;padding:1rem;border-radius:10px;margin-bottom:1rem;border:solid 1px lightgrey}.container__title[data-v-f0837864]{font-size:1.2rem;font-weight:700}.container .probabilities[data-v-f0837864]{display:grid}.container .probability[data-v-f0837864]{grid-row:1;grid-column:1}.container__right-side[data-v-f0837864]{grid-column:2;grid-row:1}.container__right-side h2[data-v-f0837864]{margin-top:0}.container__right-side .hidden[data-v-f0837864]{visibility:hidden;grid-row:1;grid-column:1}.container__left-side[data-v-f0837864]{grid-column:1;grid-row:1}.container__message[data-v-f0837864]{margin-bottom:20px}.container__successSentence[data-v-f0837864]{width:90%;background-color:#cec3f4;padding:.8rem .5rem;border-radius:10px}.container__button[data-v-f0837864]{width:90%;border:none;padding:1.2rem 1rem;background:#355ac4;color:#fff;border-radius:10px;font-weight:700}.container__button[data-v-f0837864]:hover{background:#2b3c77;cursor:pointer}@media (max-width: 600px){.container[data-v-f0837864]{display:flex;flex-wrap:wrap}}", Y = /* @__PURE__ */ x(U, [["styles", [X]], ["__scopeId", "data-v-f0837864"]]);
95
+ M(/* @__PURE__ */ Object.assign({ "./locales/fr.json": N })).catch((n) => console.error(n));
96
+ window.customElements.define("complete-phrase", A(Y, {
97
+ configureApp(n) {
98
+ h.changeLanguage(document?.documentElement?.lang || navigator.language), n.use(z, { i18next: h });
101
99
  }
102
100
  }));
@@ -1,4 +1,4 @@
1
- import { d as e } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { I as m } from "../ImageQuiz.ce-CoHr8kTK.js";
1
+ import { d as e } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { I as m } from "../ImageQuiz.ce-BbfMcldf.js";
3
3
  window.customElements.define("image-quiz", e(m));
4
4
  window.customElements.define("qcu-image", e(m));
@@ -1,5 +1,5 @@
1
- import { a as l, r as f, w, c as z, o as t, b as p, e as d, m as g, F as v, d as _ } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { I as A } from "../ImageQuiz.ce-CoHr8kTK.js";
1
+ import { a as l, r as f, w, c as z, o as t, b as p, e as d, m as g, F as v, d as _ } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { I as A } from "../ImageQuiz.ce-BbfMcldf.js";
3
3
  const h = /* @__PURE__ */ l({
4
4
  __name: "ImageQuizzes.ce",
5
5
  props: {
@@ -1,10 +1,10 @@
1
- import { a as d, c as o, o as n, f as s, t, F as l, b as p, g as r, _ as c, d as f } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { L as i } from "../LLMMessage.ce-DHyl5CcV.js";
3
- import { p as u } from "../shadow-dom-Bfma-Uia.js";
4
- const g = {
1
+ import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, g as i, _ as c, d as g } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { L as l } from "../LLMMessage.ce-DBgXmxn9.js";
3
+ import { p as u } from "../shadow-dom-BdDj1I6f.js";
4
+ const f = {
5
5
  class: "header",
6
6
  "aria-hidden": "true"
7
- }, h = { class: "sr-only" }, y = { class: "llm-compare-messages" }, v = { "aria-hidden": "true" }, _ = /* @__PURE__ */ d({
7
+ }, h = { class: "title-1" }, v = { class: "title-2" }, y = { class: "sr-only" }, _ = { class: "llm-compare-messages" }, w = { "aria-hidden": "true" }, b = /* @__PURE__ */ m({
8
8
  __name: "LLMCompareMessages.ce",
9
9
  props: {
10
10
  conversation1: { type: Object },
@@ -12,42 +12,46 @@ const g = {
12
12
  userName: { type: String },
13
13
  messages: { type: Array }
14
14
  },
15
- setup(x) {
16
- return u(), (e, L) => (n(), o(l, null, [
17
- s("div", g, [
18
- s("p", null, t(e.conversation1.title), 1),
19
- s("p", null, t(e.conversation2.title), 1)
15
+ setup(L) {
16
+ return u(), (o, N) => (a(), r(t, null, [
17
+ e("div", f, [
18
+ e("div", null, [
19
+ e("p", h, n(o.conversation1.title), 1)
20
+ ]),
21
+ e("div", null, [
22
+ e("p", v, n(o.conversation2.title), 1)
23
+ ])
20
24
  ]),
21
- s("p", h, " Comparaison entre la conversation " + t(e.conversation1.title) + " et la conversation " + t(e.conversation2.title), 1),
22
- s("div", y, [
23
- (n(!0), o(l, null, p(e.messages, (a, m) => (n(), o("div", {
24
- key: m,
25
+ e("p", y, " Comparaison entre la conversation " + n(o.conversation1.title) + " et la conversation " + n(o.conversation2.title), 1),
26
+ e("div", _, [
27
+ (a(!0), r(t, null, p(o.messages, (s, d) => (a(), r("div", {
28
+ key: d,
25
29
  class: "llm-compare-messages__row"
26
30
  }, [
27
- Array.isArray(a) ? (n(), o(l, { key: 0 }, [
28
- s("div", null, [
29
- r(i, {
30
- message: a[0],
31
- name: e.conversation1.llmName
31
+ Array.isArray(s) ? (a(), r(t, { key: 0 }, [
32
+ e("div", null, [
33
+ i(l, {
34
+ message: s[0],
35
+ name: o.conversation1.llmName
32
36
  }, null, 8, ["message", "name"])
33
37
  ]),
34
- s("div", null, [
35
- r(i, {
36
- message: a[1],
37
- name: e.conversation2.llmName
38
+ e("div", null, [
39
+ i(l, {
40
+ message: s[1],
41
+ name: o.conversation2.llmName
38
42
  }, null, 8, ["message", "name"])
39
43
  ])
40
- ], 64)) : (n(), o(l, { key: 1 }, [
41
- s("div", null, [
42
- r(i, {
43
- message: a,
44
- name: e.userName
44
+ ], 64)) : (a(), r(t, { key: 1 }, [
45
+ e("div", null, [
46
+ i(l, {
47
+ message: s,
48
+ name: o.userName
45
49
  }, null, 8, ["message", "name"])
46
50
  ]),
47
- s("div", v, [
48
- r(i, {
49
- message: a,
50
- name: e.userName
51
+ e("div", w, [
52
+ i(l, {
53
+ message: s,
54
+ name: o.userName
51
55
  }, null, 8, ["message", "name"])
52
56
  ])
53
57
  ], 64))
@@ -55,5 +59,5 @@ const g = {
55
59
  ])
56
60
  ], 64));
57
61
  }
58
- }), w = '*{box-sizing:border-box}:host{display:flex;flex-direction:column}.llm-compare-messages{display:flex;flex-direction:column;padding:24px 0;gap:24px;position:relative;height:100%;overflow:auto}.llm-compare-messages:after{content:"";position:absolute;height:100%;top:0;left:50%;border-left:dashed 1px grey}.llm-compare-messages__row{display:flex;flex-direction:row;justify-content:space-between}.llm-compare-messages__row>div{display:flex;flex-direction:column;width:calc(50% - 12px)}.header{display:flex}.header p{background:#e6eaf2;display:flex;width:50%;justify-content:center;align-items:center;padding:1rem;margin:0;font-size:1.2rem;font-weight:700}.header p:first-child{background:#fff7da}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}', b = /* @__PURE__ */ c(_, [["styles", [w]]]);
59
- window.customElements.define("llm-compare-messages", f(b));
62
+ }), x = '*{box-sizing:border-box}:host{display:grid;gap:8px;grid-template-columns:1fr 1fr;grid-template-rows:auto auto}:host:after{content:"";grid-row:2;grid-column:1;border-radius:8px;border:1px solid #452D9D;background:#fff}:host:before{content:"";grid-row:2;grid-column:2;border-radius:8px;border:solid 1px #a16207;background:#fff}.llm-compare-messages{grid-row:2;grid-column:1/span 2;display:flex;flex-direction:column;gap:24px;position:relative;overflow-y:scroll;padding:6px;max-height:460px}.llm-compare-messages__row{display:flex;flex-direction:row;gap:32px}.llm-compare-messages__row>div{display:flex;flex-direction:column;width:50%}.header{display:flex;grid-row:1;grid-column:1/span 2}.header div{display:flex;width:50%;justify-content:center;align-items:center;padding:0 1rem}.header p{font-family:Nunito,sans-serif;font-size:1.25rem;font-style:normal;font-weight:700;line-height:1.75rem;margin:0;padding:8px 32px;background:#cec3f4;width:fit-content;border:1px solid #452D9D;border-radius:8px;text-align:center}.header p.title-2{border-color:#a16207;background:#fffec0}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}', k = /* @__PURE__ */ c(b, [["styles", [x]]]);
63
+ window.customElements.define("llm-compare-messages", g(k));
@@ -1,6 +1,6 @@
1
- import { a as m, j as i, k as p, c as o, o as e, F as d, b as g, e as u, _ as f, d as h } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { L as _ } from "../LLMMessage.ce-DHyl5CcV.js";
3
- import { p as x } from "../shadow-dom-Bfma-Uia.js";
1
+ import { a as m, k as i, l as p, c as o, o as e, F as d, b as g, e as u, _ as f, d as h } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { L as _ } from "../LLMMessage.ce-DBgXmxn9.js";
3
+ import { p as x } from "../shadow-dom-BdDj1I6f.js";
4
4
  const b = {
5
5
  class: "llm-messages",
6
6
  "aria-live": "polite"
@@ -1,4 +1,4 @@
1
- import { a as v, r as i, h, c, o as d, g as y, f as l, i as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-OrrhezDE.js";
1
+ import { a as v, r as c, h, c as i, o as d, g as y, f as l, j as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
2
  import "./llm-messages.ce.js.js";
3
3
  const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B = ["disabled", "onClick"], E = /* @__PURE__ */ v({
4
4
  __name: "LLMPromptSelect.ce",
@@ -8,10 +8,10 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
8
8
  speed: { type: Number }
9
9
  },
10
10
  setup(_, { expose: b }) {
11
- const o = _, s = i(o.messages), m = i(o.prompts.map((e) => ({
11
+ const o = _, s = c(o.messages), m = c(o.prompts.map((e) => ({
12
12
  ...e,
13
13
  disabled: !1
14
- }))), r = i(!1);
14
+ }))), r = c(!1);
15
15
  function g() {
16
16
  s.value = o.messages, m.value = o.prompts.map((e) => ({
17
17
  ...e,
@@ -45,7 +45,7 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
45
45
  }
46
46
  return (e, t) => {
47
47
  const a = h("llm-messages");
48
- return d(), c(f, null, [
48
+ return d(), i(f, null, [
49
49
  y(a, { messages: s.value }, null, 8, ["messages"]),
50
50
  l("div", N, [
51
51
  t[0] || (t[0] = l("p", { class: "prompt-select__label" }, [
@@ -53,7 +53,7 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
53
53
  l("span", { class: "sr-only" }, "  une fois sélectionnés, les prompts ne sont plus disponibles. ")
54
54
  ], -1)),
55
55
  l("div", P, [
56
- (d(!0), c(f, null, k(m.value, (n, p) => (d(), c("button", {
56
+ (d(!0), i(f, null, k(m.value, (n, p) => (d(), i("button", {
57
57
  key: p,
58
58
  disabled: n.disabled || r.value,
59
59
  onClick: (u) => x(n)