@1024pix/epreuves-components 1.0.1 → 1.1.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,6 +1,6 @@
1
- import { a as w, c as n, o as a, f as e, t as i, K as C, _ as x, r as p, g, F as f, b as v, x as P, e as B, d as A } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { a as M, i as h, b as j } from "../i18n-b8OapH7K.js";
3
- import { L as y } from "../LLMMessage.ce--tBITfVq.js";
1
+ import { a as w, c as n, o as t, f as e, t as r, K as C, _ as x, r as p, g, F as v, b as h, x as P, e as B, d as A } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { a as M, i as f, b as j } from "../i18n-kZiLXTQh.js";
3
+ import { L as y } from "../LLMMessage.ce-ne2mE_8e.js";
4
4
  const z = {}, N = {}, I = {
5
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
6
  }, T = {}, q = {}, E = { class: "probability-bar" }, D = { "aria-hidden": "true" }, F = { class: "sr-only" }, O = /* @__PURE__ */ w({
@@ -9,10 +9,10 @@ const z = {}, N = {}, I = {
9
9
  name: { type: String },
10
10
  percent: { type: Number }
11
11
  },
12
- setup(r) {
13
- return (o, s) => (a(), n("div", E, [
14
- e("p", D, i(o.name), 1),
15
- e("p", F, i(o.$t("complete-phrase.ariaLabelDescription", { name: o.name, percent: o.percent })), 1),
12
+ setup(i) {
13
+ return (o, s) => (t(), n("div", E, [
14
+ e("p", D, r(o.name), 1),
15
+ e("p", F, r(o.$t("complete-phrase.ariaLabelDescription", { name: o.name, percent: o.percent })), 1),
16
16
  e("div", {
17
17
  style: C(`width: ${o.percent}%`),
18
18
  class: "probability-bar__percent",
@@ -24,7 +24,7 @@ const z = {}, N = {}, I = {
24
24
  }, null, -1))
25
25
  ]));
26
26
  }
27
- }), R = ".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}", H = /* @__PURE__ */ x(O, [["styles", [R]], ["__scopeId", "data-v-f5414745"]]), V = { class: "container" }, W = { class: "container__left-side" }, G = { class: "container__conversation" }, K = ["aria-describedby"], J = {
27
+ }), R = ".probability-bar[data-v-d89fc563]{position:relative;padding-bottom:10px;border-bottom:1px solid #cbcbcb}.probability-bar__percent[data-v-d89fc563]{position:absolute;left:0;z-index:2;height:5px;border-radius:5px;background-color:#235386}.probability-bar__background[data-v-d89fc563]{position:absolute;left:0;z-index:1;width:100%;height:5px;border-radius:5px;background-color:#92a1b2}.probability-bar p[data-v-d89fc563]{margin-bottom:0}.sr-only[data-v-d89fc563]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", H = /* @__PURE__ */ x(O, [["styles", [R]], ["__scopeId", "data-v-d89fc563"]]), V = { class: "container" }, W = { class: "container__left-side" }, G = { class: "container__conversation" }, K = ["aria-describedby"], J = {
28
28
  key: 1,
29
29
  class: "container__successSentence"
30
30
  }, Q = { class: "container__right-side" }, U = ["aria-level"], X = { "aria-hidden": "true" }, Y = { class: "probabilities" }, Z = ["id", "aria-hidden"], ee = /* @__PURE__ */ w({
@@ -36,52 +36,52 @@ const z = {}, N = {}, I = {
36
36
  wordsToAdd: { type: Array },
37
37
  titleLevel: { type: Number }
38
38
  },
39
- setup(r, { expose: o }) {
40
- const s = r, l = p(0), u = p(s.llmMessage), _ = p(!1), c = p(s.wordsToAdd);
39
+ setup(i, { expose: o }) {
40
+ const s = i, l = p(0), b = p(s.llmMessage), u = p(!1), c = p(s.wordsToAdd);
41
41
  function k() {
42
- _.value = !1, u.value = s.llmMessage, c.value = s.wordsToAdd, l.value = 0;
42
+ u.value = !1, b.value = s.llmMessage, c.value = s.wordsToAdd, l.value = 0;
43
43
  }
44
44
  function S() {
45
- c.value.length === 1 && (_.value = !0), l.value += 1;
46
- const [t, ...b] = c.value;
47
- c.value = b, u.value += `<span style="font-weight: bold;">${t} </span>`;
45
+ c.value.length === 1 && (u.value = !0), l.value += 1;
46
+ const [a, ..._] = c.value;
47
+ c.value = _, b.value += `<span style="font-weight: bold;">${a} </span>`;
48
48
  }
49
49
  return o({
50
50
  reset: k
51
- }), (t, b) => (a(), n("div", V, [
51
+ }), (a, _) => (t(), n("div", V, [
52
52
  e("div", W, [
53
53
  e("div", G, [
54
54
  g(y, {
55
55
  class: "container__message",
56
- message: { content: t.userMessage, direction: "outbound" }
56
+ message: { content: a.userMessage, direction: "outbound" }
57
57
  }, null, 8, ["message"]),
58
58
  g(y, {
59
59
  class: "container__message",
60
- message: { content: u.value, direction: "inbound" }
60
+ message: { content: b.value, direction: "inbound" }
61
61
  }, null, 8, ["message"])
62
62
  ]),
63
- _.value ? (a(), n("p", J, i(t.$t("complete-phrase.successfullyCompletedSentence")), 1)) : (a(), n("button", {
63
+ u.value ? (t(), n("p", J, r(a.$t("complete-phrase.successfullyCompletedSentence")), 1)) : (t(), n("button", {
64
64
  key: 0,
65
65
  onClick: S,
66
66
  class: "container__button",
67
67
  "aria-describedby": `currentProbability${l.value}`
68
- }, i(t.$t("complete-phrase.clickHereButton")), 9, K))
68
+ }, r(a.$t("complete-phrase.clickHereButton")), 9, K))
69
69
  ]),
70
70
  e("div", Q, [
71
71
  e("div", {
72
72
  class: "container__title",
73
- role: "header",
74
- "aria-level": t.titleLevel
75
- }, i(t.$t("complete-phrase.iaSuggestions")), 9, U),
76
- e("p", X, i(t.$t("complete-phrase.explanation")), 1),
73
+ role: "heading",
74
+ "aria-level": a.titleLevel
75
+ }, r(a.$t("complete-phrase.iaSuggestions")), 9, U),
76
+ e("p", X, r(a.$t("complete-phrase.explanation")), 1),
77
77
  e("div", Y, [
78
- (a(!0), n(f, null, v(t.listOfProbabilityBarsLists, ($, d) => (a(), n("div", {
78
+ (t(!0), n(v, null, h(a.listOfProbabilityBarsLists, ($, d) => (t(), n("div", {
79
79
  class: P(["probability", { hidden: d !== l.value }]),
80
80
  key: d,
81
81
  id: `currentProbability${d}`,
82
82
  "aria-hidden": d !== l.value
83
83
  }, [
84
- (a(!0), n(f, null, v($, (m, L) => (a(), B(H, {
84
+ (t(!0), n(v, null, h($, (m, L) => (t(), B(H, {
85
85
  name: m.name,
86
86
  percent: m.percent,
87
87
  key: L
@@ -91,10 +91,10 @@ const z = {}, N = {}, I = {
91
91
  ])
92
92
  ]));
93
93
  }
94
- }), te = "[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}}", ae = /* @__PURE__ */ x(ee, [["styles", [te]], ["__scopeId", "data-v-f0837864"]]);
95
- M(/* @__PURE__ */ Object.assign({ "./locales/en.json": z, "./locales/es.json": N, "./locales/fr.json": I, "./locales/it.json": T, "./locales/nl.json": q })).catch((r) => console.error(r));
96
- window.customElements.define("complete-phrase", A(ae, {
97
- configureApp(r) {
98
- h.changeLanguage(document?.documentElement?.lang || navigator.language), r.use(j, { i18next: h });
94
+ }), ae = "[data-v-12a26a0b]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.container[data-v-12a26a0b]{display:grid;grid-row:auto;gap:10px}.container__conversation[data-v-12a26a0b]{display:flex;flex-direction:column;background:#fff;padding:1rem;border-radius:10px;margin-bottom:1rem;border:solid 1px lightgrey}.container__title[data-v-12a26a0b]{font-size:1.2rem;font-weight:700}.container .probabilities[data-v-12a26a0b]{display:grid}.container .probability[data-v-12a26a0b]{grid-row:1;grid-column:1}.container__right-side[data-v-12a26a0b]{grid-column:2;grid-row:1}.container__right-side h2[data-v-12a26a0b]{margin-top:0}.container__right-side .hidden[data-v-12a26a0b]{visibility:hidden;grid-row:1;grid-column:1}.container__left-side[data-v-12a26a0b]{grid-column:1;grid-row:1}.container__message[data-v-12a26a0b]{margin-bottom:20px}.container__successSentence[data-v-12a26a0b]{width:90%;background-color:#cec3f4;padding:.8rem .5rem;border-radius:10px}.container__button[data-v-12a26a0b]{width:90%;border:none;padding:1.2rem 1rem;background:#355ac4;color:#fff;border-radius:10px;font-weight:700}.container__button[data-v-12a26a0b]:hover{background:#2b3c77;cursor:pointer}@media (max-width: 600px){.container[data-v-12a26a0b]{display:flex;flex-wrap:wrap}}", te = /* @__PURE__ */ x(ee, [["styles", [ae]], ["__scopeId", "data-v-12a26a0b"]]);
95
+ M(/* @__PURE__ */ Object.assign({ "./locales/en.json": z, "./locales/es.json": N, "./locales/fr.json": I, "./locales/it.json": T, "./locales/nl.json": q })).catch((i) => console.error(i));
96
+ window.customElements.define("complete-phrase", A(te, {
97
+ configureApp(i) {
98
+ f.changeLanguage(document?.documentElement?.lang || navigator.language), i.use(j, { i18next: f });
99
99
  }
100
100
  }));
@@ -1,4 +1,4 @@
1
- import { d as e } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { I as m } from "../ImageQuiz.ce-B7shuhfQ.js";
1
+ import { d as e } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { I as m } from "../ImageQuiz.ce-C3ddinUf.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-DGDsC3jx.js";
2
- import { I as A } from "../ImageQuiz.ce-B7shuhfQ.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-BihDtAH2.js";
2
+ import { I as A } from "../ImageQuiz.ce-C3ddinUf.js";
3
3
  const h = /* @__PURE__ */ l({
4
4
  __name: "ImageQuizzes.ce",
5
5
  props: {
@@ -1,6 +1,6 @@
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-DGDsC3jx.js";
2
- import { L as l } from "../LLMMessage.ce--tBITfVq.js";
3
- import { p as u } from "../shadow-dom-CTg-8Iam.js";
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-BihDtAH2.js";
2
+ import { L as l } from "../LLMMessage.ce-ne2mE_8e.js";
3
+ import { p as u } from "../shadow-dom-D_4brEqV.js";
4
4
  const f = {
5
5
  class: "header",
6
6
  "aria-hidden": "true"
@@ -1,6 +1,6 @@
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-DGDsC3jx.js";
2
- import { L as _ } from "../LLMMessage.ce--tBITfVq.js";
3
- import { p as x } from "../shadow-dom-CTg-8Iam.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-BihDtAH2.js";
2
+ import { L as _ } from "../LLMMessage.ce-ne2mE_8e.js";
3
+ import { p as x } from "../shadow-dom-D_4brEqV.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 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-DGDsC3jx.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-BihDtAH2.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",
@@ -1,5 +1,5 @@
1
- import { a as k, r as b, v as D, E as C, c as r, o as t, x, y as _, f as y, j as w, t as h, g as $, F as v, b as M, _ as N, D as E, e as B, d as T } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { L as V } from "../Loading.ce-DFM6f_1v.js";
1
+ import { a as k, r as b, v as D, E as C, c as r, o as t, x, y as _, f as y, j as w, t as h, g as $, F as v, b as M, _ as N, D as E, e as B, d as T } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { L as V } from "../Loading.ce-DTWU4eXQ.js";
3
3
  const F = ["part"], L = {
4
4
  key: 1,
5
5
  class: "message__loader message__content",
@@ -1,5 +1,5 @@
1
- import { a as d, c as n, o as r, f as a, t as i, F as l, b as h, q as u, _ as p, d as _ } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { a as m, i as o, b as f } from "../i18n-b8OapH7K.js";
1
+ import { a as d, c as n, o as i, f as a, t as r, F as l, b as h, q as u, _ as p, d as _ } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { a as m, i as o, b as f } from "../i18n-kZiLXTQh.js";
3
3
  const y = {
4
4
  "pix-article": { byAuthor: "Par {{author}}" }
5
5
  }, v = ["titleLevel"], S = { class: "article__metadata" }, b = { class: "article__author" }, L = ["innerHTML"], x = /* @__PURE__ */ d({
@@ -17,23 +17,23 @@ const y = {
17
17
  const s = e.paragraphs.join(`
18
18
  `).replace("{{highlightedSentence}}", `<strong style="color: ${e.colorOfHighlightSentence};">${e.highlightedSentence}</strong>`).split(`
19
19
  `);
20
- return (t, H) => (r(), n(l, null, [
20
+ return (t, H) => (i(), n(l, null, [
21
21
  a("div", {
22
22
  class: "article__title",
23
- role: "header",
23
+ role: "heading",
24
24
  titleLevel: t.titleLevel
25
- }, i(t.title), 9, v),
25
+ }, r(t.title), 9, v),
26
26
  a("p", S, [
27
- a("span", b, i(t.$t("pix-article.byAuthor", { author: t.author })), 1),
28
- a("time", null, i(t.date), 1)
27
+ a("span", b, r(t.$t("pix-article.byAuthor", { author: t.author })), 1),
28
+ a("time", null, r(t.date), 1)
29
29
  ]),
30
- (r(!0), n(l, null, h(u(s), (c, g) => (r(), n("p", {
30
+ (i(!0), n(l, null, h(u(s), (c, g) => (i(), n("p", {
31
31
  innerHTML: c,
32
32
  key: g
33
33
  }, null, 8, L))), 128))
34
34
  ], 64));
35
35
  }
36
- }), A = "[data-v-38484447]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.article__title[data-v-38484447]{font-size:1.3rem;font-weight:700}.article__metadata[data-v-38484447]{font-style:italic}.article__author[data-v-38484447]{border-right:solid 1px var(--pix-neutral-800);padding-right:.7rem;margin-right:.5rem}", E = /* @__PURE__ */ p(x, [["styles", [A]], ["__scopeId", "data-v-38484447"]]);
36
+ }), A = "[data-v-30ea36f1]{--pix-neutral-800: #253858;font-family:Nunito,Roboto,sans-serif;color:var(--pix-neutral-800)}.article__title[data-v-30ea36f1]{font-size:1.3rem;font-weight:700}.article__metadata[data-v-30ea36f1]{font-style:italic}.article__author[data-v-30ea36f1]{border-right:solid 1px var(--pix-neutral-800);padding-right:.7rem;margin-right:.5rem}", E = /* @__PURE__ */ p(x, [["styles", [A]], ["__scopeId", "data-v-30ea36f1"]]);
37
37
  m(/* @__PURE__ */ Object.assign({ "./locales/fr.json": y })).catch((e) => console.error(e));
38
38
  window.customElements.define("pix-article", _(E, {
39
39
  configureApp(e) {
@@ -1,6 +1,6 @@
1
- import { a as _, v, c as a, o as n, x as j, f as l, y as z, G as H, j as E, t as m, _ as h, r as y, C as R, g as f, K as $, z as V, H as x, q as u, F as S, b as k, e as A, d as D } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { a as I, i as N, b as P } from "../i18n-b8OapH7K.js";
3
- import { B, N as T } from "../NavigationButton.ce-CF4O2FoQ.js";
1
+ import { a as _, v, c as a, o as n, x as j, f as l, y as z, G as H, j as E, t as m, _ as h, r as y, C as R, g as f, K as $, z as V, H as x, q as u, F as S, b as k, e as A, d as D } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { a as I, i as N, b as P } from "../i18n-kZiLXTQh.js";
3
+ import { B, N as T } from "../NavigationButton.ce-BPCs1QdC.js";
4
4
  const F = {
5
5
  "pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
6
6
  }, G = {
@@ -1,6 +1,6 @@
1
- import { a as H, r as y, z as k, v as m, h as S, c as a, o as i, f as s, I as A, q as c, t as u, F as f, b, J as E, g, x as C, H as L, y as F, B as P, _ as D, d as q } from "../_plugin-vue_export-helper-DGDsC3jx.js";
2
- import { a as G, i as w, b as J } from "../i18n-b8OapH7K.js";
3
- import { N as j } from "../NavigationButton.ce-CF4O2FoQ.js";
1
+ import { a as H, r as y, z as k, v as m, h as S, c as a, o as i, f as s, I as A, q as c, t as u, F as f, b, J as E, g, x as C, H as L, y as F, B as P, _ as D, d as q } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { a as G, i as w, b as J } from "../i18n-kZiLXTQh.js";
3
+ import { N as j } from "../NavigationButton.ce-BPCs1QdC.js";
4
4
  const R = {}, U = {}, K = {
5
5
  "pix-cursor": { confirm: "Valider", next: "Suivant", previous: "Précédent", selectAnOption: "Sélectionnez une option", youHaveChosen: "Vous avez choisi : { choice }" }
6
6
  }, Q = {}, W = {}, X = ["for"], Y = {
@@ -0,0 +1,221 @@
1
+ import { a as k, c, o as r, f as t, y as b, t as d, x as C, _ as w, L as R, M as A, r as y, v as h, I as E, j as V, N as M, D as O, F as _, b as S, e as G, q as j, B as P, g as F, d as H } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
+ import { i as s, a as Q, b as U } from "../i18n-kZiLXTQh.js";
3
+ const W = {
4
+ "qcm-deepfake": { options: ["une photo de sa chanteuse préférée", "une chanson de sa chanteuse préférée", "un enregistrement de Caroline qui chante", "une photo de Caroline", "un enregistrement de Caroline qui dit quelques phrases"], iaResultInfo: "Retrouvez ici les résultats du logiciel d'IA générative :", iaResultGenerated: "Résultat généré par le logiciel d’IA générative :", title: "Recréez la vidéo de Caroline", in: "Entrée", out: "Sortie", selectThreeElements: "Sélectionnez 3 éléments pour générer la vidéo :", generateVideo: "Générer la vidéo !", restart: "Recommencer", element_one: "élément", element_other: "éléments", generateVideoInfo_one: "Plus que {{count}} élément", generateVideoInfo_other: "Plus que {{count}} éléments", restartInfo: "Essayez avec de nouveaux éléments", success: { title: "Super !", description: "C'est bien la vidéo de Caroline? Vous avez utilisé les bons éléments." }, fail: { title: "Pas exactement…", description: "Le résultat ne convient pas. Recommencez en changeant les éléments en entrée." }, searchTitle: "Le logiciel d’IA générative crée la vidéo" }
5
+ }, Z = ["aria-hidden"], J = ["aria-level"], K = ["src"], X = { class: "description" }, Y = ["src"], ee = ["aria-level"], te = /* @__PURE__ */ k({
6
+ __name: "NarrativeAnswer.ce",
7
+ props: {
8
+ messageTitle: { type: String },
9
+ messageDescription: { type: String },
10
+ titleLevel: { type: Number },
11
+ image: { type: String },
12
+ title: { type: String },
13
+ stateAnswer: { type: String },
14
+ type: { type: String }
15
+ },
16
+ setup(a) {
17
+ return (e, l) => (r(), c("div", {
18
+ class: "right-container",
19
+ "aria-hidden": e.type !== e.stateAnswer
20
+ }, [
21
+ t("div", {
22
+ class: "subtitle",
23
+ role: "heading",
24
+ "aria-level": e.titleLevel + 1
25
+ }, d(e.$t("qcm-deepfake.out")), 9, J),
26
+ e.type === "search" ? (r(), c("img", {
27
+ key: 0,
28
+ src: e.image,
29
+ alt: ""
30
+ }, null, 8, K)) : b("", !0),
31
+ t("p", X, d(e.title), 1),
32
+ e.type !== "search" ? (r(), c("img", {
33
+ key: 1,
34
+ src: e.image,
35
+ alt: ""
36
+ }, null, 8, Y)) : b("", !0),
37
+ e.messageTitle ? (r(), c("div", {
38
+ key: 2,
39
+ class: C(["answer-block", e.stateAnswer])
40
+ }, [
41
+ t("div", {
42
+ class: "answer-block__title",
43
+ role: "heading",
44
+ "aria-level": e.titleLevel + 2
45
+ }, d(e.messageTitle), 9, ee),
46
+ t("p", null, d(e.messageDescription), 1)
47
+ ], 2)) : b("", !0)
48
+ ], 8, Z));
49
+ }
50
+ }), ae = ".right-container[data-v-3d782b51]{grid-row:1/1;grid-column:1/1}.right-container[aria-hidden=true][data-v-3d782b51]{visibility:hidden}img[data-v-3d782b51]{margin-block:.5rem}.subtitle[data-v-3d782b51]{font-size:1.25rem;font-weight:700;text-align:center}.description[data-v-3d782b51]{font-weight:700;margin-top:0;margin-bottom:0}img[data-v-3d782b51]{width:200px;height:auto}.answer-block[data-v-3d782b51]{background:#e8e8e8;margin-inline:1rem;padding:.5rem;border-radius:10px}.answer-block p[data-v-3d782b51]{margin-bottom:0}.answer-block.success[data-v-3d782b51]{background:#e8f3ef}.answer-block.fail[data-v-3d782b51]{border-radius:16px;background:#fbecec}", ie = /* @__PURE__ */ w(te, [["styles", [ae]], ["__scopeId", "data-v-3d782b51"]]), se = ["aria-disabled"], ne = /* @__PURE__ */ k({
51
+ __name: "Option.ce",
52
+ props: /* @__PURE__ */ R({
53
+ option: { type: String },
54
+ value: { type: Number },
55
+ readonly: { type: Boolean }
56
+ }, {
57
+ modelValue: {},
58
+ modelModifiers: {}
59
+ }),
60
+ emits: ["update:modelValue"],
61
+ setup(a, { expose: e }) {
62
+ const l = A(a, "modelValue"), u = y(!1), i = h(() => l.value.length === 3 && !u.value || a.readonly);
63
+ function v(m) {
64
+ if (i.value) {
65
+ m.preventDefault();
66
+ return;
67
+ }
68
+ m.target.checked ? l.value.push(a.option) : l.value = l.value.filter((p) => p !== a.option);
69
+ }
70
+ return e({
71
+ isChecked: u
72
+ }), (m, g) => (r(), c("label", {
73
+ class: C({ selected: u.value, disabled: i.value })
74
+ }, [
75
+ E(t("input", {
76
+ type: "checkbox",
77
+ name: "options",
78
+ onClick: v,
79
+ "aria-disabled": i.value,
80
+ "onUpdate:modelValue": g[0] || (g[0] = (p) => u.value = p)
81
+ }, null, 8, se), [
82
+ [M, u.value]
83
+ ]),
84
+ V(d(m.option), 1)
85
+ ], 2));
86
+ }
87
+ }), le = ".selected[data-v-a067b43a]{background:#f7f5ff}.disabled[data-v-a067b43a]{cursor:not-allowed;background:#efefef}.disabled.selected[data-v-a067b43a]{background:#d6d5dd}", oe = /* @__PURE__ */ w(ne, [["styles", [le]], ["__scopeId", "data-v-a067b43a"]]), re = ["aria-level"], de = { class: "container" }, ce = { class: "left-side" }, ue = ["aria-level"], fe = { class: "left-side__description" }, me = { class: "left-side__action" }, pe = ["aria-disabled"], ge = {
88
+ key: 0,
89
+ "aria-hidden": "true",
90
+ width: "20",
91
+ height: "20",
92
+ viewBox: "0 0 20 20",
93
+ fill: "none",
94
+ xmlns: "http://www.w3.org/2000/svg"
95
+ }, ve = {
96
+ id: "optionsSelectedInfo",
97
+ class: "left-side__lower-legend",
98
+ "aria-hidden": "true"
99
+ }, be = {
100
+ class: "right-side",
101
+ "aria-live": "polite"
102
+ }, he = /* @__PURE__ */ k({
103
+ __name: "QcmDeepfake.ce",
104
+ props: {
105
+ titleLevel: { default: 2, type: Number },
106
+ successImage: { type: String },
107
+ failImage: { type: String },
108
+ infoImage: { type: String },
109
+ searchImage: { type: String },
110
+ searchDelay: { default: 2e3, type: Number }
111
+ },
112
+ setup(a, { expose: e }) {
113
+ const l = y([]), u = [2, 4, 5], i = y("info"), v = O("optionsNode"), m = s.t("qcm-deepfake.options", { returnObjects: !0 }), g = ["👩‍🎤", "🎧", "🎤", "👩", "🎙️"], p = m.map((n, o) => `${g[o]} ${n}`), $ = p.filter((n, o) => u.includes(o + 1)), N = [
114
+ {
115
+ type: "info",
116
+ image: a.infoImage,
117
+ title: s.t("qcm-deepfake.iaResultInfo")
118
+ },
119
+ {
120
+ type: "success",
121
+ image: a.successImage,
122
+ title: s.t("qcm-deepfake.iaResultGenerated"),
123
+ messageTitle: `🥳 ${s.t("qcm-deepfake.success.title")}`,
124
+ messageDescription: s.t("qcm-deepfake.success.description")
125
+ },
126
+ {
127
+ type: "fail",
128
+ image: a.failImage,
129
+ title: s.t("qcm-deepfake.iaResultGenerated"),
130
+ messageTitle: `🫤 ${s.t("qcm-deepfake.fail.title")}`,
131
+ messageDescription: s.t("qcm-deepfake.fail.description")
132
+ },
133
+ {
134
+ type: "search",
135
+ image: a.searchImage,
136
+ title: s.t("qcm-deepfake.searchTitle")
137
+ }
138
+ ], q = h(() => l.value.length !== 3), T = h(() => i.value === "info" ? s.t("qcm-deepfake.generateVideo") : s.t("qcm-deepfake.restart")), D = h(() => i.value === "info" ? s.t("qcm-deepfake.generateVideoInfo", { count: u.length - l.value.length }) : s.t("qcm-deepfake.restartInfo"));
139
+ function L() {
140
+ return i.value === "info" ? z() : I();
141
+ }
142
+ function I() {
143
+ v.value.forEach((n) => {
144
+ n.isChecked = !1;
145
+ }), l.value = [], i.value = "info";
146
+ }
147
+ async function z() {
148
+ if (q.value) return;
149
+ const n = l.value.every((o) => $.includes(o.trim()));
150
+ i.value = "search", await new Promise((o) => setTimeout(o, a.searchDelay)), n ? i.value = "success" : i.value = "fail";
151
+ }
152
+ return e({
153
+ reset: I
154
+ }), (n, o) => (r(), c(_, null, [
155
+ t("div", {
156
+ role: "heading",
157
+ "aria-level": n.titleLevel,
158
+ class: "title"
159
+ }, d(n.$t("qcm-deepfake.title")), 9, re),
160
+ t("div", de, [
161
+ t("form", ce, [
162
+ t("div", {
163
+ class: "left-side__subtitle",
164
+ role: "heading",
165
+ "aria-level": n.titleLevel + 1
166
+ }, d(n.$t("qcm-deepfake.in")), 9, ue),
167
+ t("fieldset", null, [
168
+ t("legend", fe, d(n.$t("qcm-deepfake.selectThreeElements")), 1),
169
+ (r(!0), c(_, null, S(j(p), (f, x) => (r(), G(oe, {
170
+ ref_for: !0,
171
+ ref_key: "optionsNode",
172
+ ref: v,
173
+ modelValue: l.value,
174
+ "onUpdate:modelValue": o[0] || (o[0] = (B) => l.value = B),
175
+ key: x,
176
+ class: "left-side__options",
177
+ option: f,
178
+ value: x + 1,
179
+ readonly: i.value !== "info"
180
+ }, null, 8, ["modelValue", "option", "value", "readonly"]))), 128))
181
+ ]),
182
+ t("div", me, [
183
+ t("button", {
184
+ onClick: P(L, ["prevent"]),
185
+ class: C(["left-side__button", { generate: i.value === "info" }]),
186
+ "aria-disabled": q.value,
187
+ "aria-describedby": "optionsSelectedInfo"
188
+ }, [
189
+ i.value !== "info" ? (r(), c("svg", ge, [...o[1] || (o[1] = [
190
+ t("path", {
191
+ d: "M9.98002 16.836C8.07572 16.836 6.4603 16.1728 5.13377 14.8462C3.80725 13.5197 3.14398 11.9043 3.14398 9.99998C3.14398 8.09568 3.80725 6.48026 5.13377 5.15373C6.4603 3.8272 8.07572 3.16394 9.98002 3.16394C10.9684 3.16394 11.9108 3.36686 12.8073 3.77269C13.7038 4.17839 14.4713 4.76095 15.1096 5.5204V4.03707C15.1096 3.7897 15.1933 3.58234 15.3606 3.41498C15.528 3.24762 15.7354 3.16394 15.9827 3.16394C16.2302 3.16394 16.4377 3.24762 16.605 3.41498C16.7724 3.58234 16.8561 3.7897 16.8561 4.03707V8.29352C16.8561 8.5595 16.7645 8.78394 16.5815 8.96686C16.3986 9.14991 16.1741 9.24144 15.9081 9.24144H11.6417C11.3957 9.24144 11.1895 9.15776 11.0231 8.9904C10.8568 8.82304 10.7736 8.61561 10.7736 8.36811C10.7736 8.12213 10.8572 7.91595 11.0246 7.74956C11.192 7.58318 11.3993 7.49998 11.6467 7.49998H14.2438C13.7993 6.74207 13.199 6.14589 12.4427 5.71144C11.6866 5.277 10.8657 5.05977 9.98002 5.05977C8.6078 5.05977 7.44141 5.54005 6.48086 6.50061C5.52016 7.4613 5.03982 8.62776 5.03982 9.99998C5.03982 11.3722 5.52016 12.5387 6.48086 13.4994C7.44141 14.4599 8.6078 14.9402 9.98002 14.9402C10.8879 14.9402 11.7218 14.713 12.4817 14.2587C13.2416 13.8046 13.8384 13.1963 14.2723 12.4339C14.402 12.2189 14.5845 12.0692 14.8198 11.9848C15.055 11.9005 15.2895 11.8996 15.5236 11.9823C15.7733 12.0651 15.9534 12.2275 16.064 12.4696C16.1744 12.7118 16.1675 12.9401 16.0431 13.1544C15.4537 14.2688 14.6221 15.161 13.5484 15.831C12.4745 16.501 11.285 16.836 9.98002 16.836Z",
192
+ fill: "#122647"
193
+ }, null, -1)
194
+ ])])) : b("", !0),
195
+ V(" " + d(T.value), 1)
196
+ ], 10, pe),
197
+ t("p", ve, d(D.value), 1)
198
+ ])
199
+ ]),
200
+ t("div", be, [
201
+ (r(), c(_, null, S(N, (f) => F(ie, {
202
+ key: f,
203
+ "title-level": n.titleLevel,
204
+ type: f.type,
205
+ image: f.image,
206
+ title: f.title,
207
+ "message-title": f.messageTitle,
208
+ "message-description": f.messageDescription,
209
+ "state-answer": i.value
210
+ }, null, 8, ["title-level", "type", "image", "title", "message-title", "message-description", "state-answer"])), 64))
211
+ ])
212
+ ])
213
+ ], 64));
214
+ }
215
+ }), _e = "legend,label,p,div[role=heading]{font-family:Nunito,Roboto,sans-serif;color:#253858}", ye = ".container[data-v-a7a0f3aa]{display:flex;gap:.8rem}.title[data-v-a7a0f3aa]{font-size:1.75rem;font-weight:700;text-align:center;margin-bottom:16px}.left-side[data-v-a7a0f3aa]{min-width:60%;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;border-radius:10px}.left-side__lower-legend[data-v-a7a0f3aa]{font-size:.875rem;color:#5e6c84}.left-side__subtitle[data-v-a7a0f3aa]{font-size:1.25rem;font-weight:700;text-align:center}.left-side__options[data-v-a7a0f3aa]{display:flex;border:solid 1px #5e6c84;padding:.6rem;border-radius:5px;gap:.5rem}.left-side__description[data-v-a7a0f3aa]{font-weight:700}.left-side__button[data-v-a7a0f3aa]{display:flex;gap:.5rem;align-items:center;border:none;padding:.6rem 1.5rem;background:#ffcb33;color:#000;border-radius:25px;font-weight:700;cursor:pointer}.left-side__button.generate[data-v-a7a0f3aa]{background:#613fdd;color:#fff}.left-side__button[aria-disabled=true][data-v-a7a0f3aa]{cursor:not-allowed;background:#d3d3d3}.left-side__action[data-v-a7a0f3aa]{display:flex;flex-direction:column;align-items:center;text-align:center}.right-side[data-v-a7a0f3aa]{display:grid;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;text-align:center;border-radius:10px}fieldset[data-v-a7a0f3aa]{border:none;display:flex;flex-direction:column;gap:.8rem}@media (max-width: 770px){.container[data-v-a7a0f3aa]{flex-wrap:wrap}.left-side[data-v-a7a0f3aa],.right-side[data-v-a7a0f3aa]{width:100%}}", ke = /* @__PURE__ */ w(he, [["styles", [_e, ye]], ["__scopeId", "data-v-a7a0f3aa"]]);
216
+ Q(/* @__PURE__ */ Object.assign({ "./locales/fr.json": W })).catch((a) => console.error(a));
217
+ window.customElements.define("qcm-deepfake", H(ke, {
218
+ configureApp(a) {
219
+ s.changeLanguage(document?.documentElement?.lang || navigator.language), a.use(U, { i18next: s });
220
+ }
221
+ }));
@@ -1,4 +1,4 @@
1
- import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-DGDsC3jx.js";
1
+ import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-BihDtAH2.js";
2
2
  const d = (o) => typeof o == "string", V = () => {
3
3
  let o, e;
4
4
  const t = new Promise((i, s) => {
package/dist/index.js CHANGED
@@ -7,4 +7,5 @@ import "./components/image-quizzes.ce.js.js";
7
7
  import "./components/pix-carousel.ce.js.js";
8
8
  import "./components/pix-cursor.ce.js.js";
9
9
  import "./components/complete-phrase.ce.js.js";
10
+ import "./components/qcm-deepfake.ce.js.js";
10
11
  import "./components/pix-article.ce.js.js";
package/dist/metadata.js CHANGED
@@ -1,7 +1,7 @@
1
- const s = {
1
+ const a = {
2
2
  isInteractive: !0
3
- }, a = !0, i = {
4
- isInteractive: a
3
+ }, s = !0, i = {
4
+ isInteractive: s
5
5
  }, n = !0, c = {
6
6
  isInteractive: n
7
7
  }, o = !1, _ = {
@@ -10,18 +10,20 @@ const s = {
10
10
  isInteractive: r
11
11
  }, m = !0, v = {
12
12
  isInteractive: m
13
- }, I = !0, g = {
13
+ }, I = !0, p = {
14
14
  isInteractive: I
15
- }, p = !1, u = {
16
- isInteractive: p
17
- }, j = !1, b = {
18
- isInteractive: j
19
- }, d = !0, $ = {
20
- isInteractive: d
21
- }, x = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.metadata.json": s, "./image-quiz/image-quiz.metadata.json": i, "./image-quiz/image-quizzes.metadata.json": c, "./message-conversation/message-conversation.metadata.json": _, "./pix-article/pix-article.metadata.json": l, "./pix-carousel/pix-carousel.metadata.json": v, "./pix-cursor/pix-cursor.metadata.json": g, "./pix-llm/llm-compare-messages.metadata.json": u, "./pix-llm/llm-messages.metadata.json": b, "./pix-llm/llm-prompt-select.metadata.json": $ }), f = Object.fromEntries(Object.entries(x).map(([t, e]) => [
15
+ }, g = !1, d = {
16
+ isInteractive: g
17
+ }, u = !1, j = {
18
+ isInteractive: u
19
+ }, b = !0, $ = {
20
+ isInteractive: b
21
+ }, x = !0, f = {
22
+ isInteractive: x
23
+ }, q = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.metadata.json": a, "./image-quiz/image-quiz.metadata.json": i, "./image-quiz/image-quizzes.metadata.json": c, "./message-conversation/message-conversation.metadata.json": _, "./pix-article/pix-article.metadata.json": l, "./pix-carousel/pix-carousel.metadata.json": v, "./pix-cursor/pix-cursor.metadata.json": p, "./pix-llm/llm-compare-messages.metadata.json": d, "./pix-llm/llm-messages.metadata.json": j, "./pix-llm/llm-prompt-select.metadata.json": $, "./qcm-deepfake/qcm-deepfake.metadata.json": f }), z = Object.fromEntries(Object.entries(q).map(([t, e]) => [
22
24
  t.replace(/^.*\/([^/]+)\.metadata\.json$/, "$1"),
23
25
  e
24
26
  ]));
25
27
  export {
26
- f as schema
28
+ z as metadata
27
29
  };
package/dist/schema.js CHANGED
@@ -47,11 +47,11 @@ const n = e.object({
47
47
  paragraphs: e.array().items(e.string().required()),
48
48
  highlightedSentence: e.string().required(),
49
49
  colorOfHighlightSentence: e.string().required()
50
- }), l = e.object({
50
+ }), c = e.object({
51
51
  name: e.string().allow("").required(),
52
52
  attribution: e.string().allow("").required(),
53
53
  url: e.string().allow("").required()
54
- }), c = e.object({
54
+ }), l = e.object({
55
55
  title: e.string().required(),
56
56
  description: e.string().allow("").required(),
57
57
  displayWidth: e.number().min(0).optional(),
@@ -59,7 +59,7 @@ const n = e.object({
59
59
  src: e.string().required(),
60
60
  alt: e.string().required()
61
61
  }).required(),
62
- license: l.optional()
62
+ license: c.optional()
63
63
  }), m = e.object({
64
64
  title: e.string().required(),
65
65
  description: e.string().allow("").required(),
@@ -77,7 +77,7 @@ const n = e.object({
77
77
  type: e.string().valid("image", "image-text", "text").required(),
78
78
  slides: e.alternatives().conditional("type", {
79
79
  switch: [
80
- { is: "image", then: e.array().items(c) },
80
+ { is: "image", then: e.array().items(l) },
81
81
  { is: "image-text", then: e.array().items(g) },
82
82
  { is: "text", then: e.array().items(m) }
83
83
  ]
@@ -125,10 +125,16 @@ const n = e.object({
125
125
  response: e.string().required()
126
126
  }).required()
127
127
  ).required()
128
- }).required(), x = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.schema.js": n, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": a, "./message-conversation/message-conversation.schema.js": d, "./pix-article/pix-article.schema.js": u, "./pix-carousel/pix-carousel.schema.js": q, "./pix-cursor/pix-cursor.schema.js": b, "./pix-llm/llm-compare-messages.schema.js": j, "./pix-llm/llm-messages.schema.js": h, "./pix-llm/llm-prompt-select.schema.js": v }), w = Object.fromEntries(Object.entries(x).map(([s, o]) => [
128
+ }).required(), x = e.object({
129
+ titleLevel: e.number().optional(),
130
+ successImage: e.string().required(),
131
+ failImage: e.string().required(),
132
+ infoImage: e.string().required(),
133
+ searchImage: e.string().required()
134
+ }), y = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.schema.js": n, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": a, "./message-conversation/message-conversation.schema.js": d, "./pix-article/pix-article.schema.js": u, "./pix-carousel/pix-carousel.schema.js": q, "./pix-cursor/pix-cursor.schema.js": b, "./pix-llm/llm-compare-messages.schema.js": j, "./pix-llm/llm-messages.schema.js": h, "./pix-llm/llm-prompt-select.schema.js": v, "./qcm-deepfake/qcm-deepfake.schema.js": x }), w = Object.fromEntries(Object.entries(y).map(([s, o]) => [
129
135
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
130
136
  o
131
137
  ]));
132
138
  export {
133
- w as metadata
139
+ w as schema
134
140
  };
@@ -1,4 +1,4 @@
1
- import { u as t, p as s } from "./_plugin-vue_export-helper-DGDsC3jx.js";
1
+ import { u as t, p as s } from "./_plugin-vue_export-helper-BihDtAH2.js";
2
2
  const a = Symbol("shadowRoot");
3
3
  function r() {
4
4
  const o = t();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",