@1024pix/epreuves-components 1.4.5 → 1.5.1

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.
Files changed (30) hide show
  1. package/dist/LLMMessage.ce-CcaSmq0J.js +96 -0
  2. package/dist/Loading.ce-kO02LfAR.js +14 -0
  3. package/dist/NavigationButton.ce-BUeEdL4x.js +98 -0
  4. package/dist/{_plugin-vue_export-helper-CwwQJ1m6.js → _plugin-vue_export-helper-BGEtPlxS.js} +1373 -1355
  5. package/dist/components/calcul-impact.ce.js.js +91 -85
  6. package/dist/components/capacity-calculation.ce.js.js +117 -111
  7. package/dist/components/clickable-image.ce.js.js +83 -59
  8. package/dist/components/complete-phrase.ce.js.js +57 -51
  9. package/dist/components/flip-cards.ce.js.js +43 -46
  10. package/dist/components/image-quiz.ce.js.js +6 -4
  11. package/dist/components/image-quizzes.ce.js.js +18 -14
  12. package/dist/components/llm-compare-messages.ce.js.js +17 -17
  13. package/dist/components/llm-messages.ce.js.js +17 -17
  14. package/dist/components/llm-prompt-select.ce.js.js +37 -32
  15. package/dist/components/message-conversation.ce.js.js +61 -52
  16. package/dist/components/pix-article.ce.js.js +26 -20
  17. package/dist/components/pix-carousel.ce.js.js +142 -134
  18. package/dist/components/pix-cursor.ce.js.js +62 -62
  19. package/dist/components/qcm-deepfake.ce.js.js +97 -91
  20. package/dist/{i18n-gncqQJ0G.js → i18n-D3E2CT0o.js} +44 -40
  21. package/dist/image-quiz.ce-Qe3SbGDF.js +141 -0
  22. package/dist/index.js +1 -1
  23. package/dist/normalize-props-AlmAfi_u.js +13 -0
  24. package/dist/schema.js +8 -9
  25. package/dist/{shadow-dom-MxYtPVXS.js → shadow-dom-Bqt3ZRMI.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/ImageQuiz.ce-BLOWdEiw.js +0 -123
  28. package/dist/LLMMessage.ce-DnZ8kE2i.js +0 -89
  29. package/dist/Loading.ce-FI776zdC.js +0 -14
  30. package/dist/NavigationButton.ce-gp04deGY.js +0 -98
@@ -1,42 +1,42 @@
1
- import { a as S, r as k, G as y, k as m, z as A, c as a, o as i, f as s, l as B, I as c, t as u, F as f, b, N as H, y as g, D as C, M as L, E as D, q as F, _ as P, d as G } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
- import { a as q, i as w, b as R } from "../i18n-gncqQJ0G.js";
3
- import { N as M } from "../NavigationButton.ce-gp04deGY.js";
4
- const U = {}, J = {}, K = {
1
+ import { d as S, r as k, J as y, k as m, z as A, c as a, o as i, f as s, l as B, G as d, t as u, F as f, a as b, N as H, y as g, D as C, M as L, E as D, q as F, _ as P, e as G } from "../_plugin-vue_export-helper-BGEtPlxS.js";
2
+ import { a as q, i as w, b as J } from "../i18n-D3E2CT0o.js";
3
+ import { N as j } from "../NavigationButton.ce-BUeEdL4x.js";
4
+ const R = {}, U = {}, K = {}, Q = {
5
5
  "pix-cursor": { confirm: "Valider", next: "Suivant", previous: "Précédent", selectAnOption: "Sélectionnez une option", youHaveChosen: "Vous avez choisi : { choice }" }
6
- }, Q = {}, W = {}, X = ["for"], Y = {
6
+ }, W = {}, X = {}, Y = ["for"], Z = {
7
7
  class: "visible-options",
8
8
  "aria-hidden": "true"
9
- }, Z = ["onClick"], ee = ["id"], oe = ["onClick", "value", "label"], te = ["id", "list", "max", "disabled"], ne = { class: "navigation-container" }, ae = { class: "chosen-text-container" }, ie = ["aria-hidden"], re = { class: "chosen-option" }, se = {
9
+ }, ee = ["onClick"], oe = ["id"], te = ["onClick", "value", "label"], ne = ["id", "list", "max", "disabled"], ae = { class: "navigation-container" }, ie = { class: "chosen-text-container" }, re = ["aria-hidden"], se = { class: "chosen-option" }, le = {
10
10
  class: "footer",
11
11
  "aria-live": "polite"
12
- }, le = {
12
+ }, ce = {
13
13
  key: 0,
14
14
  class: "confirm"
15
- }, ce = ["innerHTML", "aria-hidden"], de = /* @__PURE__ */ S({
15
+ }, de = ["innerHTML", "aria-hidden"], ue = /* @__PURE__ */ S({
16
16
  __name: "PixCursor.ce",
17
17
  props: {
18
18
  options: { type: Array }
19
19
  },
20
- setup(d, { expose: j }) {
21
- const p = d, r = k(Math.floor(p.options.length / 2)), o = k(!1), v = y(), _ = y(), I = m(() => r.value === p.options.length - 1), N = m(() => r.value === 0), l = m(() => Number(r.value));
20
+ setup(n, { expose: M }) {
21
+ const p = n, r = k(Math.floor(p.options.length / 2)), o = k(!1), v = y(), x = y(), N = m(() => r.value === p.options.length - 1), I = m(() => r.value === 0), c = m(() => Number(r.value));
22
22
  function z() {
23
23
  o.value = !0;
24
24
  }
25
25
  function $() {
26
- o.value || (r.value = Math.max(0, l.value - 1));
26
+ o.value || (r.value = Math.max(0, c.value - 1));
27
27
  }
28
28
  function O() {
29
- o.value || (r.value = Math.min(p.options.length - 1, l.value + 1));
29
+ o.value || (r.value = Math.min(p.options.length - 1, c.value + 1));
30
30
  }
31
- function h(t) {
32
- o.value || (r.value = t);
31
+ function _(l) {
32
+ o.value || (r.value = l);
33
33
  }
34
34
  function T() {
35
35
  o.value = !1, r.value = Math.floor(p.options.length / 2);
36
36
  }
37
- return j({
37
+ return M({
38
38
  reset: T
39
- }), (t, x) => {
39
+ }), (l, h) => {
40
40
  const V = A("i18next");
41
41
  return i(), a("form", {
42
42
  class: "pix-cursor",
@@ -45,67 +45,67 @@ const U = {}, J = {}, K = {
45
45
  s("div", null, [
46
46
  s("label", {
47
47
  class: "sr-only",
48
- for: c(v)
49
- }, u(t.$t("pix-cursor.selectAnOption")), 9, X),
50
- s("ul", Y, [
51
- (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("li", {
52
- onClick: (E) => h(e),
48
+ for: d(v)
49
+ }, u(l.$t("pix-cursor.selectAnOption")), 9, Y),
50
+ s("ul", Z, [
51
+ (i(!0), a(f, null, b(n.options, (t, e) => (i(), a("li", {
52
+ onClick: (E) => _(e),
53
53
  key: e
54
- }, u(n.label), 9, Z))), 128))
54
+ }, u(t.label), 9, ee))), 128))
55
55
  ]),
56
- s("datalist", { id: c(_) }, [
57
- (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("option", {
58
- onClick: (E) => h(e),
56
+ s("datalist", { id: d(x) }, [
57
+ (i(!0), a(f, null, b(n.options, (t, e) => (i(), a("option", {
58
+ onClick: (E) => _(e),
59
59
  key: e,
60
60
  value: e,
61
- label: n.label
62
- }, u(n.label), 9, oe))), 128))
63
- ], 8, ee),
61
+ label: t.label
62
+ }, u(t.label), 9, te))), 128))
63
+ ], 8, oe),
64
64
  B(s("input", {
65
- "onUpdate:modelValue": x[0] || (x[0] = (n) => r.value = n),
66
- id: c(v),
65
+ "onUpdate:modelValue": h[0] || (h[0] = (t) => r.value = t),
66
+ id: d(v),
67
67
  type: "range",
68
- list: c(_),
68
+ list: d(x),
69
69
  min: "0",
70
- max: t.options.length - 1,
70
+ max: n.options.length - 1,
71
71
  disabled: o.value
72
- }, null, 8, te), [
72
+ }, null, 8, ne), [
73
73
  [H, r.value]
74
74
  ]),
75
- s("div", ne, [
76
- g(M, {
75
+ s("div", ae, [
76
+ g(j, {
77
77
  onClick: $,
78
- disabled: o.value || N.value,
79
- label: t.$t("pix-cursor.previous"),
80
- "aria-controls": c(v),
78
+ disabled: o.value || I.value,
79
+ label: l.$t("pix-cursor.previous"),
80
+ "aria-controls": d(v),
81
81
  "aria-disabled": o.value,
82
82
  "tooltip-position": "bottom",
83
83
  direction: "previous",
84
84
  type: "button"
85
85
  }, null, 8, ["disabled", "label", "aria-controls", "aria-disabled"]),
86
- s("div", ae, [
87
- (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("p", {
86
+ s("div", ie, [
87
+ (i(!0), a(f, null, b(n.options, (t, e) => (i(), a("p", {
88
88
  key: e,
89
89
  class: C({
90
- hidden: e !== l.value
90
+ hidden: e !== c.value
91
91
  }),
92
- "aria-hidden": e !== l.value
92
+ "aria-hidden": e !== c.value
93
93
  }, [
94
94
  g(V, {
95
- translation: t.$t("pix-cursor.youHaveChosen")
95
+ translation: l.$t("pix-cursor.youHaveChosen")
96
96
  }, {
97
97
  choice: L(() => [
98
- s("span", re, u(n.label), 1)
98
+ s("span", se, u(t.label), 1)
99
99
  ]),
100
100
  _: 2
101
101
  }, 1032, ["translation"])
102
- ], 10, ie))), 128))
102
+ ], 10, re))), 128))
103
103
  ]),
104
- g(M, {
104
+ g(j, {
105
105
  onClick: O,
106
- disabled: o.value || I.value,
107
- label: t.$t("pix-cursor.next"),
108
- "aria-controls": c(v),
106
+ disabled: o.value || N.value,
107
+ label: l.$t("pix-cursor.next"),
108
+ "aria-controls": d(v),
109
109
  "aria-disabled": o.value,
110
110
  "tooltip-position": "bottom",
111
111
  direction: "next",
@@ -113,25 +113,25 @@ const U = {}, J = {}, K = {
113
113
  }, null, 8, ["disabled", "label", "aria-controls", "aria-disabled"])
114
114
  ])
115
115
  ]),
116
- s("div", se, [
117
- o.value ? D("", !0) : (i(), a("button", le, u(t.$t("pix-cursor.confirm")), 1)),
118
- (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("p", {
119
- innerHTML: n.feedback.text,
116
+ s("div", le, [
117
+ o.value ? D("", !0) : (i(), a("button", ce, u(l.$t("pix-cursor.confirm")), 1)),
118
+ (i(!0), a(f, null, b(n.options, (t, e) => (i(), a("p", {
119
+ innerHTML: t.feedback.text,
120
120
  key: e,
121
121
  class: C(["feedback", {
122
- [n.feedback.type]: !0,
123
- hidden: !o.value || l.value !== e
122
+ [t.feedback.type]: !0,
123
+ hidden: !o.value || c.value !== e
124
124
  }]),
125
- "aria-hidden": l.value !== e
126
- }, null, 10, ce))), 128))
125
+ "aria-hidden": c.value !== e
126
+ }, null, 10, de))), 128))
127
127
  ])
128
128
  ], 32);
129
129
  };
130
130
  }
131
- }), ue = "[data-v-58e704c5]{--pix-neutral-800: #253858;font-family:Nunito,sans-serif;color:var(--pix-neutral-800)}.pix-cursor[data-v-58e704c5]{display:flex;flex-direction:column;justify-content:center;margin:auto;padding:2rem;gap:1rem;overflow:hidden}.pix-cursor p[data-v-58e704c5]{text-align:center;font-size:1.1rem}.pix-cursor .chosen-option[data-v-58e704c5]{font-weight:700}.pix-cursor .visible-options[data-v-58e704c5]{display:flex;justify-content:space-between;margin:0;padding:0}.pix-cursor .visible-options li[data-v-58e704c5]{cursor:pointer;list-style:none}.pix-cursor input[data-v-58e704c5]{width:100%}.pix-cursor .confirm[data-v-58e704c5]{padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;font-size:1.25rem;letter-spacing:1.1;width:fit-content;margin:auto;border:none;color:#fff;background:#4075ff;grid-row:1;grid-column:1}.pix-cursor .confirm[data-v-58e704c5]:hover{background:#355ac4;transition:background ease .1s}.pix-cursor .navigation-container[data-v-58e704c5]{display:flex;justify-content:center;align-items:center;gap:1rem}.pix-cursor .navigation-container .chosen-text-container[data-v-58e704c5]{display:grid}.pix-cursor .navigation-container .chosen-text-container p[data-v-58e704c5]{grid-row:1;grid-column:1}.pix-cursor .navigation-container .chosen-text-container p.hidden[data-v-58e704c5]{transform:translate(100vw)}.pix-cursor .footer[data-v-58e704c5]{display:grid;grid-template-columns:auto;align-items:center;justify-content:center}.pix-cursor .feedback[data-v-58e704c5]{padding:1rem 1.2rem;border-left:solid 4px;border-radius:8px;grid-column:1;grid-row:1;text-align:start;margin:0}.pix-cursor .feedback.hidden[data-v-58e704c5]{visibility:hidden;transform:translate(100vw)}.pix-cursor .feedback.good[data-v-58e704c5]{background:#e8f5e9;border-left-color:#4caf51}.pix-cursor .feedback.bad[data-v-58e704c5]{background:#ffebee;border-left-color:#f44337}.pix-cursor .feedback.neutral[data-v-58e704c5]{background:#e8f6ff;border-left-color:#464ee0}.pix-cursor .feedback.close[data-v-58e704c5]{background:#fff8e1;border-left-color:#ffc108}", pe = /* @__PURE__ */ P(de, [["styles", [ue]], ["__scopeId", "data-v-58e704c5"]]);
132
- q(/* @__PURE__ */ Object.assign({ "./locales/en.json": U, "./locales/es.json": J, "./locales/fr.json": K, "./locales/it.json": Q, "./locales/nl.json": W })).catch((d) => console.error(d));
133
- window.customElements.define("pix-cursor", G(pe, {
134
- configureApp(d) {
135
- w.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(R, { i18next: w });
131
+ }), pe = "[data-v-58e704c5]{--pix-neutral-800: #253858;font-family:Nunito,sans-serif;color:var(--pix-neutral-800)}.pix-cursor[data-v-58e704c5]{display:flex;flex-direction:column;justify-content:center;margin:auto;padding:2rem;gap:1rem;overflow:hidden}.pix-cursor p[data-v-58e704c5]{text-align:center;font-size:1.1rem}.pix-cursor .chosen-option[data-v-58e704c5]{font-weight:700}.pix-cursor .visible-options[data-v-58e704c5]{display:flex;justify-content:space-between;margin:0;padding:0}.pix-cursor .visible-options li[data-v-58e704c5]{cursor:pointer;list-style:none}.pix-cursor input[data-v-58e704c5]{width:100%}.pix-cursor .confirm[data-v-58e704c5]{padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;font-size:1.25rem;letter-spacing:1.1;width:fit-content;margin:auto;border:none;color:#fff;background:#4075ff;grid-row:1;grid-column:1}.pix-cursor .confirm[data-v-58e704c5]:hover{background:#355ac4;transition:background ease .1s}.pix-cursor .navigation-container[data-v-58e704c5]{display:flex;justify-content:center;align-items:center;gap:1rem}.pix-cursor .navigation-container .chosen-text-container[data-v-58e704c5]{display:grid}.pix-cursor .navigation-container .chosen-text-container p[data-v-58e704c5]{grid-row:1;grid-column:1}.pix-cursor .navigation-container .chosen-text-container p.hidden[data-v-58e704c5]{transform:translate(100vw)}.pix-cursor .footer[data-v-58e704c5]{display:grid;grid-template-columns:auto;align-items:center;justify-content:center}.pix-cursor .feedback[data-v-58e704c5]{padding:1rem 1.2rem;border-left:solid 4px;border-radius:8px;grid-column:1;grid-row:1;text-align:start;margin:0}.pix-cursor .feedback.hidden[data-v-58e704c5]{visibility:hidden;transform:translate(100vw)}.pix-cursor .feedback.good[data-v-58e704c5]{background:#e8f5e9;border-left-color:#4caf51}.pix-cursor .feedback.bad[data-v-58e704c5]{background:#ffebee;border-left-color:#f44337}.pix-cursor .feedback.neutral[data-v-58e704c5]{background:#e8f6ff;border-left-color:#464ee0}.pix-cursor .feedback.close[data-v-58e704c5]{background:#fff8e1;border-left-color:#ffc108}", ve = /* @__PURE__ */ P(ue, [["styles", [pe]], ["__scopeId", "data-v-58e704c5"]]);
132
+ q(/* @__PURE__ */ Object.assign({ "./locales/en.json": R, "./locales/es-419.json": U, "./locales/es.json": K, "./locales/fr.json": Q, "./locales/it.json": W, "./locales/nl.json": X })).catch((n) => console.error(n));
133
+ window.customElements.define("pix-cursor", G(ve, {
134
+ configureApp(n) {
135
+ w.changeLanguage(document?.documentElement?.lang || navigator.language), n.use(J, { i18next: w });
136
136
  }
137
137
  }));
@@ -1,11 +1,12 @@
1
- import { a as y, k as h, c as d, o, f as l, E as p, t as c, D as k, _ as C, O as E, P as L, r as b, l as R, A as V, R as j, g as O, F as x, b as S, e as M, I as G, q as P, y as F, d as H } from "../_plugin-vue_export-helper-CwwQJ1m6.js";
2
- import { i as s, a as Q, b as U } from "../i18n-gncqQJ0G.js";
3
- const W = {}, Z = {}, J = {
1
+ import { d as y, k as b, c as o, o as l, f as s, E as g, t as c, D as k, _ as C, O as E, P as j, r as _, l as R, A as V, Q as O, g as G, F as I, a as S, b as M, G as P, q as Q, y as F, e as H } from "../_plugin-vue_export-helper-BGEtPlxS.js";
2
+ import { i as a, a as U, b as W } from "../i18n-D3E2CT0o.js";
3
+ import { u as Z } from "../normalize-props-AlmAfi_u.js";
4
+ const J = {}, K = {}, X = {}, Y = {
4
5
  "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", in: "Entrée", out: "Sortie", waiting: "Logiciel d'IA générative", selectThreeElements: "Sélectionnez 3 éléments pour générer la vidéo de Caroline :", generateVideo: "Générer la vidéo !", loading: "Chargement…", 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: "Bien joué !", 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." } }
5
- }, K = {}, X = {}, Y = ["aria-hidden"], ee = ["aria-level"], te = ["src"], ae = {
6
+ }, ee = {}, te = {}, ae = ["aria-hidden"], ie = ["aria-level"], ne = ["src"], se = {
6
7
  key: 1,
7
8
  class: "description"
8
- }, se = ["src"], ie = ["aria-level"], ne = /* @__PURE__ */ y({
9
+ }, le = ["src"], oe = ["aria-level"], re = /* @__PURE__ */ y({
9
10
  __name: "NarrativeAnswer.ce",
10
11
  props: {
11
12
  messageTitle: { type: String },
@@ -16,42 +17,42 @@ const W = {}, Z = {}, J = {
16
17
  stateAnswer: { type: String },
17
18
  type: { type: String }
18
19
  },
19
- setup(a) {
20
- const f = a, i = h(() => f.type === "success" || f.type === "fail" ? s.t("qcm-deepfake.out") : s.t("qcm-deepfake.waiting"));
21
- return (e, t) => (o(), d("div", {
20
+ setup(e) {
21
+ const f = e, i = b(() => f.type === "success" || f.type === "fail" ? a.t("qcm-deepfake.out") : a.t("qcm-deepfake.waiting"));
22
+ return (r, t) => (l(), o("div", {
22
23
  class: "right-container",
23
24
  "aria-hidden": e.type !== e.stateAnswer
24
25
  }, [
25
- l("div", {
26
+ s("div", {
26
27
  class: "subtitle",
27
28
  role: "heading",
28
29
  "aria-level": e.titleLevel
29
- }, c(i.value), 9, ee),
30
- e.type === "search" ? (o(), d("img", {
30
+ }, c(i.value), 9, ie),
31
+ e.type === "search" ? (l(), o("img", {
31
32
  key: 0,
32
33
  src: e.image,
33
34
  alt: ""
34
- }, null, 8, te)) : p("", !0),
35
- e.type === "success" || e.type === "fail" ? (o(), d("p", ae, c(e.title), 1)) : p("", !0),
36
- e.type !== "search" ? (o(), d("img", {
35
+ }, null, 8, ne)) : g("", !0),
36
+ e.type === "success" || e.type === "fail" ? (l(), o("p", se, c(e.title), 1)) : g("", !0),
37
+ e.type !== "search" ? (l(), o("img", {
37
38
  key: 2,
38
39
  src: e.image,
39
40
  alt: ""
40
- }, null, 8, se)) : p("", !0),
41
- e.messageTitle ? (o(), d("div", {
41
+ }, null, 8, le)) : g("", !0),
42
+ e.messageTitle ? (l(), o("div", {
42
43
  key: 3,
43
44
  class: k(["answer-block", e.stateAnswer])
44
45
  }, [
45
- l("div", {
46
+ s("div", {
46
47
  class: "answer-block__title",
47
48
  role: "heading",
48
49
  "aria-level": e.titleLevel + 1
49
- }, c(e.messageTitle), 9, ie),
50
- l("p", null, c(e.messageDescription), 1)
51
- ], 2)) : p("", !0)
52
- ], 8, Y));
50
+ }, c(e.messageTitle), 9, oe),
51
+ s("p", null, c(e.messageDescription), 1)
52
+ ], 2)) : g("", !0)
53
+ ], 8, ae));
53
54
  }
54
- }), le = ".right-container[data-v-2a82aa38]{grid-row:1/1;grid-column:1/1}.right-container[aria-hidden=true][data-v-2a82aa38]{visibility:hidden}img[data-v-2a82aa38]{margin-block:.5rem}.subtitle[data-v-2a82aa38]{font-size:1.25rem;font-weight:700;text-align:center}.description[data-v-2a82aa38]{font-weight:700;margin-top:0;margin-bottom:0}img[data-v-2a82aa38]{width:200px;height:auto}.answer-block[data-v-2a82aa38]{background:#e8e8e8;margin-inline:1rem;padding:.5rem;border-radius:10px}.answer-block p[data-v-2a82aa38]{margin-bottom:0}.answer-block.success[data-v-2a82aa38]{background:#e8f3ef}.answer-block.fail[data-v-2a82aa38]{border-radius:16px;background:#fbecec}", oe = /* @__PURE__ */ C(ne, [["styles", [le]], ["__scopeId", "data-v-2a82aa38"]]), re = ["aria-disabled"], de = /* @__PURE__ */ y({
55
+ }), de = ".right-container[data-v-2a82aa38]{grid-row:1/1;grid-column:1/1}.right-container[aria-hidden=true][data-v-2a82aa38]{visibility:hidden}img[data-v-2a82aa38]{margin-block:.5rem}.subtitle[data-v-2a82aa38]{font-size:1.25rem;font-weight:700;text-align:center}.description[data-v-2a82aa38]{font-weight:700;margin-top:0;margin-bottom:0}img[data-v-2a82aa38]{width:200px;height:auto}.answer-block[data-v-2a82aa38]{background:#e8e8e8;margin-inline:1rem;padding:.5rem;border-radius:10px}.answer-block p[data-v-2a82aa38]{margin-bottom:0}.answer-block.success[data-v-2a82aa38]{background:#e8f3ef}.answer-block.fail[data-v-2a82aa38]{border-radius:16px;background:#fbecec}", ce = /* @__PURE__ */ C(re, [["styles", [de]], ["__scopeId", "data-v-2a82aa38"]]), ue = ["aria-disabled"], fe = /* @__PURE__ */ y({
55
56
  __name: "Option.ce",
56
57
  props: /* @__PURE__ */ E({
57
58
  option: { type: String },
@@ -62,33 +63,33 @@ const W = {}, Z = {}, J = {
62
63
  modelModifiers: {}
63
64
  }),
64
65
  emits: ["update:modelValue"],
65
- setup(a, { expose: f }) {
66
- const i = L(a, "modelValue"), e = b(!1), t = h(() => i.value.length === 3 && !e.value || a.readonly);
67
- function _(m) {
66
+ setup(e, { expose: f }) {
67
+ const i = j(e, "modelValue"), r = _(!1), t = b(() => i.value.length === 3 && !r.value || e.readonly);
68
+ function h(v) {
68
69
  if (t.value) {
69
- m.preventDefault();
70
+ v.preventDefault();
70
71
  return;
71
72
  }
72
- m.target.checked ? i.value.push(a.option) : i.value = i.value.filter((g) => g !== a.option);
73
+ v.target.checked ? i.value.push(e.option) : i.value = i.value.filter((m) => m !== e.option);
73
74
  }
74
75
  return f({
75
- isChecked: e
76
- }), (m, v) => (o(), d("label", {
77
- class: k({ selected: e.value, disabled: t.value })
76
+ isChecked: r
77
+ }), (v, p) => (l(), o("label", {
78
+ class: k({ selected: r.value, disabled: t.value })
78
79
  }, [
79
- R(l("input", {
80
+ R(s("input", {
80
81
  type: "checkbox",
81
82
  name: "options",
82
- onClick: _,
83
+ onClick: h,
83
84
  "aria-disabled": t.value,
84
- "onUpdate:modelValue": v[0] || (v[0] = (g) => e.value = g)
85
- }, null, 8, re), [
86
- [j, e.value]
85
+ "onUpdate:modelValue": p[0] || (p[0] = (m) => r.value = m)
86
+ }, null, 8, ue), [
87
+ [O, r.value]
87
88
  ]),
88
- V(c(m.option), 1)
89
+ V(c(e.option), 1)
89
90
  ], 2));
90
91
  }
91
- }), ce = ".selected[data-v-a067b43a]{background:#f7f5ff}.disabled[data-v-a067b43a]{cursor:not-allowed;background:#efefef}.disabled.selected[data-v-a067b43a]{background:#d6d5dd}", ue = /* @__PURE__ */ C(de, [["styles", [ce]], ["__scopeId", "data-v-a067b43a"]]), fe = { class: "container" }, me = { class: "left-side" }, ge = ["aria-level"], pe = { class: "left-side__description" }, ve = { class: "left-side__action" }, he = ["aria-disabled", "aria-describedby"], _e = {
92
+ }), me = ".selected[data-v-a067b43a]{background:#f7f5ff}.disabled[data-v-a067b43a]{cursor:not-allowed;background:#efefef}.disabled.selected[data-v-a067b43a]{background:#d6d5dd}", ge = /* @__PURE__ */ C(fe, [["styles", [me]], ["__scopeId", "data-v-a067b43a"]]), ve = { class: "container" }, pe = { class: "left-side" }, be = ["aria-level"], he = { class: "left-side__description" }, _e = { class: "left-side__action" }, ye = ["aria-disabled", "aria-describedby"], ke = {
92
93
  key: 0,
93
94
  "aria-hidden": "true",
94
95
  width: "20",
@@ -96,15 +97,15 @@ const W = {}, Z = {}, J = {
96
97
  viewBox: "0 0 20 20",
97
98
  fill: "none",
98
99
  xmlns: "http://www.w3.org/2000/svg"
99
- }, be = {
100
+ }, Ce = {
100
101
  key: 0,
101
102
  id: "optionsSelectedInfo",
102
103
  class: "left-side__lower-legend",
103
104
  "aria-hidden": "true"
104
- }, ye = {
105
+ }, we = {
105
106
  class: "right-side",
106
107
  "aria-live": "polite"
107
- }, ke = /* @__PURE__ */ y({
108
+ }, xe = /* @__PURE__ */ y({
108
109
  __name: "QcmDeepfake.ce",
109
110
  props: {
110
111
  titleLevel: { default: 2, type: Number },
@@ -114,90 +115,90 @@ const W = {}, Z = {}, J = {
114
115
  searchImage: { type: String },
115
116
  searchDelay: { default: 4e3, type: Number }
116
117
  },
117
- setup(a, { expose: f }) {
118
- const i = b([]), e = [2, 4, 5], t = b("info"), _ = O("optionsNode"), m = s.t("qcm-deepfake.options", { returnObjects: !0 }), v = ["👩‍🎤", "🎧", "🎤", "👩", "🎙️"], g = m.map((r, n) => `${v[n]} ${r}`), $ = g.filter((r, n) => e.includes(n + 1)), N = [
118
+ setup(e, { expose: f }) {
119
+ const i = _([]), r = [2, 4, 5], t = _("info"), h = G("optionsNode"), v = a.t("qcm-deepfake.options", { returnObjects: !0 }), p = ["👩‍🎤", "🎧", "🎤", "👩", "🎙️"], m = v.map((d, n) => `${p[n]} ${d}`), N = m.filter((d, n) => r.includes(n + 1)), D = [
119
120
  {
120
121
  type: "info",
121
- image: a.infoImage
122
+ image: e.infoImage
122
123
  },
123
124
  {
124
125
  type: "success",
125
- image: a.successImage,
126
- title: s.t("qcm-deepfake.iaResultGenerated"),
127
- messageTitle: `🥳 ${s.t("qcm-deepfake.success.title")}`,
128
- messageDescription: s.t("qcm-deepfake.success.description")
126
+ image: e.successImage,
127
+ title: a.t("qcm-deepfake.iaResultGenerated"),
128
+ messageTitle: `🥳 ${a.t("qcm-deepfake.success.title")}`,
129
+ messageDescription: a.t("qcm-deepfake.success.description")
129
130
  },
130
131
  {
131
132
  type: "fail",
132
- image: a.failImage,
133
- title: s.t("qcm-deepfake.iaResultGenerated"),
134
- messageTitle: `🫤 ${s.t("qcm-deepfake.fail.title")}`,
135
- messageDescription: s.t("qcm-deepfake.fail.description")
133
+ image: e.failImage,
134
+ title: a.t("qcm-deepfake.iaResultGenerated"),
135
+ messageTitle: `🫤 ${a.t("qcm-deepfake.fail.title")}`,
136
+ messageDescription: a.t("qcm-deepfake.fail.description")
136
137
  },
137
138
  {
138
139
  type: "search",
139
- image: a.searchImage
140
+ image: e.searchImage
140
141
  }
141
- ], w = h(() => i.value.length !== 3 || t.value === "search"), D = h(() => t.value === "search" ? s.t("qcm-deepfake.loading") : t.value === "info" ? s.t("qcm-deepfake.generateVideo") : s.t("qcm-deepfake.restart")), T = h(() => t.value === "info" ? s.t("qcm-deepfake.generateVideoInfo", { count: e.length - i.value.length }) : t.value === "fail" ? s.t("qcm-deepfake.restartInfo") : "");
142
- function B() {
142
+ ], w = b(() => i.value.length !== 3 || t.value === "search"), T = b(() => t.value === "search" ? a.t("qcm-deepfake.loading") : t.value === "info" ? a.t("qcm-deepfake.generateVideo") : a.t("qcm-deepfake.restart")), L = b(() => t.value === "info" ? a.t("qcm-deepfake.generateVideoInfo", { count: r.length - i.value.length }) : t.value === "fail" ? a.t("qcm-deepfake.restartInfo") : "");
143
+ function z() {
143
144
  if (!w.value)
144
- return t.value === "info" ? z() : q();
145
+ return t.value === "info" ? B() : x();
145
146
  }
146
- function q() {
147
- _.value.forEach((r) => {
148
- r.isChecked = !1;
147
+ function x() {
148
+ h.value.forEach((d) => {
149
+ d.isChecked = !1;
149
150
  }), i.value = [], t.value = "info";
150
151
  }
151
- async function z() {
152
- const r = i.value.every((n) => $.includes(n.trim()));
153
- t.value = "search", await new Promise((n) => setTimeout(n, a.searchDelay)), r ? t.value = "success" : t.value = "fail";
152
+ async function B() {
153
+ const d = i.value.every((n) => N.includes(n.trim()));
154
+ t.value = "search", await new Promise((n) => setTimeout(n, e.searchDelay)), d ? t.value = "success" : t.value = "fail";
154
155
  }
155
156
  return f({
156
- reset: q
157
- }), (r, n) => (o(), d("div", fe, [
158
- l("form", me, [
159
- l("div", {
157
+ reset: x
158
+ }), (d, n) => (l(), o("div", ve, [
159
+ s("form", pe, [
160
+ s("div", {
160
161
  class: "left-side__subtitle",
161
162
  role: "heading",
162
- "aria-level": r.titleLevel
163
- }, c(r.$t("qcm-deepfake.in")), 9, ge),
164
- l("fieldset", null, [
165
- l("legend", pe, c(r.$t("qcm-deepfake.selectThreeElements")), 1),
166
- (o(!0), d(x, null, S(G(g), (u, I) => (o(), M(ue, {
163
+ "aria-level": e.titleLevel
164
+ }, c(d.$t("qcm-deepfake.in")), 9, be),
165
+ s("fieldset", null, [
166
+ s("legend", he, c(d.$t("qcm-deepfake.selectThreeElements")), 1),
167
+ (l(!0), o(I, null, S(P(m), (u, q) => (l(), M(ge, {
167
168
  ref_for: !0,
168
169
  ref_key: "optionsNode",
169
- ref: _,
170
+ ref: h,
170
171
  modelValue: i.value,
171
172
  "onUpdate:modelValue": n[0] || (n[0] = (A) => i.value = A),
172
- key: I,
173
+ key: q,
173
174
  class: "left-side__options",
174
175
  option: u,
175
- value: I + 1,
176
+ value: q + 1,
176
177
  readonly: t.value !== "info"
177
178
  }, null, 8, ["modelValue", "option", "value", "readonly"]))), 128))
178
179
  ]),
179
- l("div", ve, [
180
- l("button", {
181
- onClick: P(B, ["prevent"]),
180
+ s("div", _e, [
181
+ s("button", {
182
+ onClick: Q(z, ["prevent"]),
182
183
  class: k(["left-side__button", { generate: t.value === "info" }]),
183
184
  "aria-disabled": w.value,
184
185
  "aria-describedby": ["success", "search"].includes(t.value) ? void 0 : "optionsSelectedInfo"
185
186
  }, [
186
- t.value === "success" || t.value === "fail" ? (o(), d("svg", _e, [...n[1] || (n[1] = [
187
- l("path", {
187
+ t.value === "success" || t.value === "fail" ? (l(), o("svg", ke, [...n[1] || (n[1] = [
188
+ s("path", {
188
189
  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",
189
190
  fill: "#122647"
190
191
  }, null, -1)
191
- ])])) : p("", !0),
192
- V(" " + c(D.value), 1)
193
- ], 10, he),
194
- ["success", "search"].includes(t.value) ? p("", !0) : (o(), d("p", be, c(T.value), 1))
192
+ ])])) : g("", !0),
193
+ V(" " + c(T.value), 1)
194
+ ], 10, ye),
195
+ ["success", "search"].includes(t.value) ? g("", !0) : (l(), o("p", Ce, c(L.value), 1))
195
196
  ])
196
197
  ]),
197
- l("div", ye, [
198
- (o(), d(x, null, S(N, (u) => F(oe, {
198
+ s("div", we, [
199
+ (l(), o(I, null, S(D, (u) => F(ce, {
199
200
  key: u,
200
- "title-level": r.titleLevel,
201
+ "title-level": e.titleLevel,
201
202
  type: u.type,
202
203
  image: u.image,
203
204
  title: u.title,
@@ -208,10 +209,15 @@ const W = {}, Z = {}, J = {
208
209
  ])
209
210
  ]));
210
211
  }
211
- }), Ce = "legend,label,p,div[role=heading]{font-family:Nunito,Roboto,sans-serif;color:#253858}", we = ".container[data-v-02f097d7]{display:flex;gap:.8rem}.title[data-v-02f097d7]{font-size:1.75rem;font-weight:700;text-align:center;margin-bottom:16px}.left-side[data-v-02f097d7]{min-width:60%;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;border-radius:10px}.left-side__lower-legend[data-v-02f097d7]{font-size:.875rem;color:#5e6c84}.left-side__subtitle[data-v-02f097d7]{font-size:1.25rem;font-weight:700;text-align:center}.left-side__options[data-v-02f097d7]{display:flex;border:solid 1px #5e6c84;padding:.6rem;border-radius:5px;gap:.5rem}.left-side__description[data-v-02f097d7]{font-weight:700}.left-side__button[data-v-02f097d7]{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-02f097d7]{background:#613fdd;color:#fff}.left-side__button[aria-disabled=true][data-v-02f097d7]{cursor:not-allowed;background:#d3d3d3}.left-side__action[data-v-02f097d7]{display:flex;flex-direction:column;align-items:center;text-align:center}.right-side[data-v-02f097d7]{display:grid;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;text-align:center;border-radius:10px}fieldset[data-v-02f097d7]{border:none;display:flex;flex-direction:column;gap:.8rem}@media (max-width: 770px){.container[data-v-02f097d7]{flex-wrap:wrap}.left-side[data-v-02f097d7],.right-side[data-v-02f097d7]{width:100%}}", qe = /* @__PURE__ */ C(ke, [["styles", [Ce, we]], ["__scopeId", "data-v-02f097d7"]]);
212
- Q(/* @__PURE__ */ Object.assign({ "./locales/en.json": W, "./locales/es.json": Z, "./locales/fr.json": J, "./locales/it.json": K, "./locales/nl.json": X })).catch((a) => console.error(a));
213
- window.customElements.define("qcm-deepfake", H(qe, {
214
- configureApp(a) {
215
- s.changeLanguage(document?.documentElement?.lang || navigator.language), a.use(U, { i18next: s });
212
+ }), qe = "legend,label,p,div[role=heading]{font-family:Nunito,Roboto,sans-serif;color:#253858}", Ie = ".container[data-v-02f097d7]{display:flex;gap:.8rem}.title[data-v-02f097d7]{font-size:1.75rem;font-weight:700;text-align:center;margin-bottom:16px}.left-side[data-v-02f097d7]{min-width:60%;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;border-radius:10px}.left-side__lower-legend[data-v-02f097d7]{font-size:.875rem;color:#5e6c84}.left-side__subtitle[data-v-02f097d7]{font-size:1.25rem;font-weight:700;text-align:center}.left-side__options[data-v-02f097d7]{display:flex;border:solid 1px #5e6c84;padding:.6rem;border-radius:5px;gap:.5rem}.left-side__description[data-v-02f097d7]{font-weight:700}.left-side__button[data-v-02f097d7]{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-02f097d7]{background:#613fdd;color:#fff}.left-side__button[aria-disabled=true][data-v-02f097d7]{cursor:not-allowed;background:#d3d3d3}.left-side__action[data-v-02f097d7]{display:flex;flex-direction:column;align-items:center;text-align:center}.right-side[data-v-02f097d7]{display:grid;border:solid 1px #b0d3f4;background:#fff;padding:.8rem;text-align:center;border-radius:10px}fieldset[data-v-02f097d7]{border:none;display:flex;flex-direction:column;gap:.8rem}@media(max-width:770px){.container[data-v-02f097d7]{flex-wrap:wrap}.left-side[data-v-02f097d7],.right-side[data-v-02f097d7]{width:100%}}", Se = /* @__PURE__ */ C(xe, [["styles", [qe, Ie]], ["__scopeId", "data-v-02f097d7"]]);
213
+ U(/* @__PURE__ */ Object.assign({ "./locales/en.json": J, "./locales/es-419.json": K, "./locales/es.json": X, "./locales/fr.json": Y, "./locales/it.json": ee, "./locales/nl.json": te })).catch((e) => console.error(e));
214
+ const $ = H(Se, {
215
+ configureApp(e) {
216
+ a.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(W, { i18next: a });
216
217
  }
217
- }));
218
+ });
219
+ $.prototype.normalizeProps = (e) => ({
220
+ ...e,
221
+ titleLevel: Z(e.titleLevel)
222
+ });
223
+ window.customElements.define("qcm-deepfake", $);