@1024pix/epreuves-components 1.2.0 → 1.3.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.
- package/dist/{ImageQuiz.ce-BpbKbNe3.js → ImageQuiz.ce-DtarwFF1.js} +13 -13
- package/dist/{LLMMessage.ce-BXgLZdHB.js → LLMMessage.ce-CnMf3mGa.js} +4 -4
- package/dist/{Loading.ce-BaqTP6QH.js → Loading.ce-BLJllV22.js} +1 -1
- package/dist/{NavigationButton.ce-CJGPfdW7.js → NavigationButton.ce-Cz9511sV.js} +10 -10
- package/dist/_plugin-vue_export-helper-DK91u00G.js +4756 -0
- package/dist/components/calcul-impact.ce.js.js +54 -54
- package/dist/components/clickable-image.ce.js.js +96 -0
- package/dist/components/complete-phrase.ce.js.js +11 -11
- package/dist/components/image-quiz.ce.js.js +2 -2
- package/dist/components/image-quizzes.ce.js.js +2 -2
- package/dist/components/llm-compare-messages.ce.js.js +3 -3
- package/dist/components/llm-messages.ce.js.js +3 -3
- package/dist/components/llm-prompt-select.ce.js.js +7 -7
- package/dist/components/message-conversation.ce.js.js +16 -16
- package/dist/components/pix-article.ce.js.js +16 -16
- package/dist/components/pix-carousel.ce.js.js +19 -19
- package/dist/components/pix-cursor.ce.js.js +24 -24
- package/dist/components/qcm-deepfake.ce.js.js +44 -44
- package/dist/{i18n-CnN3ours.js → i18n-Gv3Ze5vF.js} +1 -1
- package/dist/index.js +8 -7
- package/dist/metadata.js +43 -26
- package/dist/schema.js +39 -21
- package/dist/{shadow-dom-BPtJYPTL.js → shadow-dom-DTRtrvgC.js} +1 -1
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-CXkSGj2f.js +0 -4717
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
const
|
|
1
|
+
import { a as z, z as T, c as p, o as v, F as U, y as u, M as s, E as C, f as e, t, A as _, T as D, _ as Y, r as l, l as E, e as K, I as N, N as V, d as G } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { a as H, i as j, b as Q } from "../i18n-Gv3Ze5vF.js";
|
|
3
|
+
const x = {}, J = {}, X = {
|
|
4
4
|
"calcul-impact": { title: "Calculez votre impact IA", subtitle: "Quels ont été vos usages de l'IA la semaine dernière ?", numberOfConversationLabel: "Nombre de conversations courtes :", numberOfImagesLabel: "Nombre de créations d’images :", seePersonalImpact: "Voir votre impact personnel sur une semaine", seeCollectiveImpact: "Si 1 million de personnes faisaient comme vous toutes les semaines pendant un an", legals: "Estimations basées sur l'étude Hugging Face, Carnegie Mellon University, Allen Institute for AI, Oct 2024", yourPersonalImpact: "Votre impact personnel", consumptionForAWeek: "Votre consommation sur une semaine", consumptionForAYear: "1 million de personnes toutes les semaines pendant un an", personalConsumption: "Vous avez consommé environ {{energy}} Wh", personalDuration: "Cela équivaut à {{number}} minutes de micro-ondes", collectiveConsumption: "Cela représenterait {{energy}} kWh, soit l'équivalent de {{homes}} foyers français", collectiveDuration: "Équivalent à {{number}} minutes de micro-ondes", planeKilometers: "Et {{kilometers}} km parcourus en avion", yourCollectiveImpact: "Impact collectif simulé" }
|
|
5
|
-
},
|
|
5
|
+
}, Z = {}, ee = {}, ae = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "result-calculation"
|
|
8
|
-
},
|
|
8
|
+
}, te = ["aria-level"], le = { class: "consumption" }, oe = { style: { "font-weight": "bold" } }, ne = { style: { "font-weight": "bold" } }, ie = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "result-calculation"
|
|
11
|
-
},
|
|
11
|
+
}, se = ["titleLevel"], re = { class: "consumption" }, ce = { style: { "font-weight": "bold" } }, ue = { style: { "font-weight": "bold" } }, ve = { style: { "font-weight": "bold" } }, de = { style: { "font-weight": "bold" } }, me = /* @__PURE__ */ z({
|
|
12
12
|
__name: "ImpactsResults.ce",
|
|
13
13
|
props: {
|
|
14
14
|
titleLevel: { type: Number },
|
|
@@ -17,118 +17,118 @@ const Q = {
|
|
|
17
17
|
isPersonal: { type: Boolean },
|
|
18
18
|
isCollective: { type: Boolean }
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
20
|
+
setup(d) {
|
|
21
21
|
return (a, o) => {
|
|
22
22
|
const n = T("i18next");
|
|
23
|
-
return
|
|
23
|
+
return v(), p(U, null, [
|
|
24
24
|
u(D, { name: "fade-perso" }, {
|
|
25
25
|
default: s(() => [
|
|
26
|
-
a.isPersonal ? (
|
|
26
|
+
a.isPersonal ? (v(), p("div", ae, [
|
|
27
27
|
e("div", {
|
|
28
28
|
class: "header",
|
|
29
29
|
role: "heading",
|
|
30
30
|
"aria-level": a.titleLevel + 1
|
|
31
|
-
}, "📌 " + t(a.$t("calcul-impact.yourPersonalImpact")), 9,
|
|
32
|
-
e("p",
|
|
31
|
+
}, "📌 " + t(a.$t("calcul-impact.yourPersonalImpact")), 9, te),
|
|
32
|
+
e("p", le, t(a.$t("calcul-impact.consumptionForAWeek")), 1),
|
|
33
33
|
e("p", null, [
|
|
34
|
-
o[0] || (o[0] =
|
|
34
|
+
o[0] || (o[0] = _("⚡ ", -1)),
|
|
35
35
|
u(n, {
|
|
36
36
|
translation: a.$t("calcul-impact.personalConsumption")
|
|
37
37
|
}, {
|
|
38
38
|
energy: s(() => [
|
|
39
|
-
e("span",
|
|
39
|
+
e("span", oe, t(a.byWeekForOne.energyByWeek), 1)
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
42
|
}, 8, ["translation"])
|
|
43
43
|
]),
|
|
44
44
|
e("p", null, [
|
|
45
|
-
o[1] || (o[1] =
|
|
45
|
+
o[1] || (o[1] = _("🍽️ ", -1)),
|
|
46
46
|
u(n, {
|
|
47
47
|
translation: a.$t("calcul-impact.personalDuration")
|
|
48
48
|
}, {
|
|
49
49
|
number: s(() => [
|
|
50
|
-
e("span",
|
|
50
|
+
e("span", ne, t(a.byWeekForOne.personalMicrowavesDuration), 1)
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
53
|
}, 8, ["translation"])
|
|
54
54
|
])
|
|
55
|
-
])) :
|
|
55
|
+
])) : C("", !0)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
}),
|
|
59
59
|
u(D, { name: "fade-collectif" }, {
|
|
60
60
|
default: s(() => [
|
|
61
|
-
a.isCollective ? (
|
|
61
|
+
a.isCollective ? (v(), p("div", ie, [
|
|
62
62
|
e("div", {
|
|
63
63
|
class: "header",
|
|
64
64
|
role: "heading",
|
|
65
65
|
titleLevel: a.titleLevel + 1
|
|
66
|
-
}, "🌍 " + t(a.$t("calcul-impact.yourCollectiveImpact")), 9,
|
|
67
|
-
e("p",
|
|
66
|
+
}, "🌍 " + t(a.$t("calcul-impact.yourCollectiveImpact")), 9, se),
|
|
67
|
+
e("p", re, t(a.$t("calcul-impact.consumptionForAYear")), 1),
|
|
68
68
|
e("p", null, [
|
|
69
|
-
o[2] || (o[2] =
|
|
69
|
+
o[2] || (o[2] = _("⚡ ", -1)),
|
|
70
70
|
u(n, {
|
|
71
71
|
translation: a.$t("calcul-impact.collectiveConsumption")
|
|
72
72
|
}, {
|
|
73
73
|
energy: s(() => [
|
|
74
|
-
e("span",
|
|
74
|
+
e("span", ce, t(a.byYearForAMillion.collectiveAnnualEnergy), 1)
|
|
75
75
|
]),
|
|
76
76
|
homes: s(() => [
|
|
77
|
-
e("span",
|
|
77
|
+
e("span", ue, t(a.byYearForAMillion.equivalentPopulationByCity), 1)
|
|
78
78
|
]),
|
|
79
79
|
_: 1
|
|
80
80
|
}, 8, ["translation"])
|
|
81
81
|
]),
|
|
82
82
|
e("p", null, [
|
|
83
|
-
o[3] || (o[3] =
|
|
83
|
+
o[3] || (o[3] = _("🍽️ ", -1)),
|
|
84
84
|
u(n, {
|
|
85
85
|
translation: a.$t("calcul-impact.collectiveDuration")
|
|
86
86
|
}, {
|
|
87
87
|
number: s(() => [
|
|
88
|
-
e("span",
|
|
88
|
+
e("span", ve, t(a.byYearForAMillion.collectiveMicrowavesDuration), 1)
|
|
89
89
|
]),
|
|
90
90
|
_: 1
|
|
91
91
|
}, 8, ["translation"])
|
|
92
92
|
]),
|
|
93
93
|
e("p", null, [
|
|
94
|
-
o[4] || (o[4] =
|
|
94
|
+
o[4] || (o[4] = _("✈️ ", -1)),
|
|
95
95
|
u(n, {
|
|
96
96
|
translation: a.$t("calcul-impact.planeKilometers")
|
|
97
97
|
}, {
|
|
98
98
|
kilometers: s(() => [
|
|
99
|
-
e("span",
|
|
99
|
+
e("span", de, t(a.byYearForAMillion.kilometerByPlane), 1)
|
|
100
100
|
]),
|
|
101
101
|
_: 1
|
|
102
102
|
}, 8, ["translation"])
|
|
103
103
|
])
|
|
104
|
-
])) :
|
|
104
|
+
])) : C("", !0)
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
107
|
})
|
|
108
108
|
], 64);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
111
|
+
}), pe = ".result-calculation[data-v-350a9de7]{background:#e0f7fa;border-left:solid 3px #00796b;padding:1rem;border-radius:10px}.header[data-v-350a9de7]{font-size:1.125rem;font-weight:700}.consumption[data-v-350a9de7]{font-style:italic}.fade-perso-enter-active[data-v-350a9de7],.fade-collectif-enter-active[data-v-350a9de7]{transition:all .3s ease-out}.fade-perso-leave-active[data-v-350a9de7],.fade-collectif-leave-active[data-v-350a9de7]{transition:all .8s cubic-bezier(1,.5,.8,1)}.fade-perso-enter-from[data-v-350a9de7],.fade-collectif-enter-from[data-v-350a9de7],.fade-perso-leave-to[data-v-350a9de7],.fade-collectif-leave-to[data-v-350a9de7]{transform:translate(20px);opacity:0}", be = /* @__PURE__ */ Y(me, [["styles", [pe]], ["__scopeId", "data-v-350a9de7"]]), fe = { class: "container" }, ye = ["arial-level"], ge = { for: "numberOfConversation" }, _e = { for: "numberOfImage" }, Ce = { class: "legals" }, he = /* @__PURE__ */ z({
|
|
112
112
|
__name: "CalculImpact.ce",
|
|
113
113
|
props: {
|
|
114
114
|
titleLevel: { type: Number }
|
|
115
115
|
},
|
|
116
|
-
setup(
|
|
117
|
-
const n =
|
|
118
|
-
function
|
|
119
|
-
b.value = 10, f.value = 2, c.value = {}, m.value = {}, w.value = 0, $.value = 0, B.value = 0, r.value = !1, y.value = !1,
|
|
116
|
+
setup(d, { expose: a }) {
|
|
117
|
+
const n = d.titleLevel ?? 2, b = l(10), f = l(2), w = l(0), $ = l(0), B = l(0), r = l(!1), y = l(!1);
|
|
118
|
+
function q() {
|
|
119
|
+
b.value = 10, f.value = 2, c.value = {}, m.value = {}, w.value = 0, $.value = 0, B.value = 0, r.value = !1, y.value = !1, k.value = 0, F.value = 0, g.value = 0, A.value = 0, O.value = 0;
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const h = {
|
|
122
122
|
text: { energy: 2.9, co2: 1.5 },
|
|
123
123
|
image: { energy: 32, co2: 20 }
|
|
124
|
-
}, c = l({}), m = l({}),
|
|
124
|
+
}, c = l({}), m = l({}), k = l(0), F = l(0), g = l(0), A = l(0), O = l(0);
|
|
125
125
|
function P() {
|
|
126
|
-
|
|
126
|
+
k.value = b.value * h.text.energy + f.value * h.image.energy, F.value = b.value * h.text.co2 + f.value * h.image.co2, w.value = Number((k.value / 0.8).toFixed(1)), c.value.energyByWeek = k.value.toFixed(1), c.value.personalMicrowavesDuration = w.value, c.value.co2ByWeek = F.value.toFixed(1);
|
|
127
127
|
}
|
|
128
128
|
function M() {
|
|
129
129
|
g.value = c.value.energyByWeek * 52 * 1e6 / 1e3, A.value = c.value.co2ByWeek * 52 * 1e6 / 1e6, O.value = Math.round(g.value / 2300), $.value = g.value / 0.8, B.value = A.value * 2410, m.value.collectiveMicrowavesDuration = $.value.toLocaleString(), m.value.kilometerByPlane = B.value.toLocaleString(), m.value.equivalentPopulationByCity = O.value.toLocaleString(), m.value.collectiveAnnualEnergy = g.value.toLocaleString();
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function S() {
|
|
132
132
|
P(), r.value = !0;
|
|
133
133
|
}
|
|
134
134
|
function R() {
|
|
@@ -138,15 +138,15 @@ const Q = {
|
|
|
138
138
|
r.value && y.value && (P(), M());
|
|
139
139
|
}
|
|
140
140
|
return a({
|
|
141
|
-
reset:
|
|
142
|
-
}), (i, I) => (
|
|
141
|
+
reset: q
|
|
142
|
+
}), (i, I) => (v(), p("div", fe, [
|
|
143
143
|
e("div", {
|
|
144
144
|
class: "title",
|
|
145
145
|
role: "heading",
|
|
146
146
|
"arial-level": N(n)
|
|
147
|
-
}, "📊 " + t(i.$t("calcul-impact.title")), 9,
|
|
147
|
+
}, "📊 " + t(i.$t("calcul-impact.title")), 9, ye),
|
|
148
148
|
e("p", null, t(i.$t("calcul-impact.subtitle")), 1),
|
|
149
|
-
e("label",
|
|
149
|
+
e("label", ge, "🤖 " + t(i.$t("calcul-impact.numberOfConversationLabel")), 1),
|
|
150
150
|
E(e("input", {
|
|
151
151
|
onChange: W,
|
|
152
152
|
type: "number",
|
|
@@ -155,7 +155,7 @@ const Q = {
|
|
|
155
155
|
}, null, 544), [
|
|
156
156
|
[V, b.value]
|
|
157
157
|
]),
|
|
158
|
-
e("label",
|
|
158
|
+
e("label", _e, "🖼️ " + t(i.$t("calcul-impact.numberOfImagesLabel")), 1),
|
|
159
159
|
E(e("input", {
|
|
160
160
|
onChange: W,
|
|
161
161
|
type: "number",
|
|
@@ -164,31 +164,31 @@ const Q = {
|
|
|
164
164
|
}, null, 544), [
|
|
165
165
|
[V, f.value]
|
|
166
166
|
]),
|
|
167
|
-
r.value ? (
|
|
167
|
+
r.value ? (v(), K(be, {
|
|
168
168
|
key: 0,
|
|
169
169
|
"is-collective": y.value,
|
|
170
170
|
"is-personal": r.value,
|
|
171
171
|
"title-level": N(n),
|
|
172
172
|
"by-week-for-one": c.value,
|
|
173
173
|
"by-year-for-a-million": m.value
|
|
174
|
-
}, null, 8, ["is-collective", "is-personal", "title-level", "by-week-for-one", "by-year-for-a-million"])) :
|
|
175
|
-
r.value ?
|
|
174
|
+
}, null, 8, ["is-collective", "is-personal", "title-level", "by-week-for-one", "by-year-for-a-million"])) : C("", !0),
|
|
175
|
+
r.value ? C("", !0) : (v(), p("button", {
|
|
176
176
|
key: 1,
|
|
177
|
-
onClick:
|
|
177
|
+
onClick: S
|
|
178
178
|
}, "📌 " + t(i.$t("calcul-impact.seePersonalImpact")), 1)),
|
|
179
|
-
r.value && !y.value ? (
|
|
179
|
+
r.value && !y.value ? (v(), p("button", {
|
|
180
180
|
key: 2,
|
|
181
181
|
onClick: R
|
|
182
|
-
}, "🌍 " + t(i.$t("calcul-impact.seeCollectiveImpact")), 1)) :
|
|
183
|
-
e("p",
|
|
182
|
+
}, "🌍 " + t(i.$t("calcul-impact.seeCollectiveImpact")), 1)) : C("", !0),
|
|
183
|
+
e("p", Ce, "📝 " + t(i.$t("calcul-impact.legals")), 1)
|
|
184
184
|
]));
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
187
|
-
|
|
188
|
-
window.customElements.define("calcul-impact",
|
|
189
|
-
configureApp(
|
|
190
|
-
|
|
191
|
-
i18next:
|
|
186
|
+
}), ke = "[data-v-9b2dbaaa]{font-family:Nunito,Roboto,sans-serif;color:#253858}p[data-v-9b2dbaaa]{padding:0}.container[data-v-9b2dbaaa]{display:flex;flex-direction:column;gap:1rem}.container button[data-v-9b2dbaaa]{border:0;border-radius:5px;font-size:.9rem;background:#357abd;color:#fff;width:50%;padding:.4rem .8rem;margin:auto;cursor:pointer}.container button[data-v-9b2dbaaa]:hover{background:#225d93}.container input[data-v-9b2dbaaa]{border:solid 1px lightgrey;border-radius:5px;padding-block:.2rem;width:40%}.container label[data-v-9b2dbaaa]{font-weight:700}.container .legals[data-v-9b2dbaaa]{font-size:.9rem;font-style:italic}.container .title[data-v-9b2dbaaa]{font-size:1.3rem;font-weight:700}@media only screen and (max-width: 768px){.container button[data-v-9b2dbaaa]{width:100%}.container input[data-v-9b2dbaaa]{width:80%}}", Ie = /* @__PURE__ */ Y(he, [["styles", [ke]], ["__scopeId", "data-v-9b2dbaaa"]]);
|
|
187
|
+
H(/* @__PURE__ */ Object.assign({ "./locales/en.json": x, "./locales/es.json": J, "./locales/fr.json": X, "./locales/it.json": Z, "./locales/nl.json": ee })).catch((d) => console.error(d));
|
|
188
|
+
window.customElements.define("calcul-impact", G(Ie, {
|
|
189
|
+
configureApp(d) {
|
|
190
|
+
j.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(Q, {
|
|
191
|
+
i18next: j,
|
|
192
192
|
slotStart: "{{",
|
|
193
193
|
slotEnd: "}}"
|
|
194
194
|
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { a as I, g as M, r as u, h as S, j as R, k as c, c as d, o as v, f as p, l as B, m as E, F as O, b as W, q as g, v as j, t as D, x as F, _ as L, d as N } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
const P = { name: "image-map" }, q = ["shape", "coords", "onMouseenter", "onClick"], T = /* @__PURE__ */ I({
|
|
3
|
+
__name: "ClickableImage.ce",
|
|
4
|
+
props: {
|
|
5
|
+
image: { type: Object },
|
|
6
|
+
areas: { type: Array }
|
|
7
|
+
},
|
|
8
|
+
setup(k, { expose: b }) {
|
|
9
|
+
const n = M("image"), a = u(1), m = new ResizeObserver(() => f());
|
|
10
|
+
function f() {
|
|
11
|
+
n.value.naturalWidth && (a.value = n.value.offsetWidth / n.value.naturalWidth);
|
|
12
|
+
}
|
|
13
|
+
S(() => {
|
|
14
|
+
m.observe(n.value);
|
|
15
|
+
}), R(() => {
|
|
16
|
+
m.disconnect();
|
|
17
|
+
});
|
|
18
|
+
const x = c(() => k.areas.map((e) => ({
|
|
19
|
+
...e,
|
|
20
|
+
coords: $(e.coords)
|
|
21
|
+
})));
|
|
22
|
+
function $(e) {
|
|
23
|
+
return {
|
|
24
|
+
x1: e.x1 * a.value,
|
|
25
|
+
y1: e.y1 * a.value,
|
|
26
|
+
x2: e.x2 * a.value,
|
|
27
|
+
y2: e.y2 * a.value
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const l = u();
|
|
31
|
+
function h(e) {
|
|
32
|
+
l.value = e;
|
|
33
|
+
}
|
|
34
|
+
function w() {
|
|
35
|
+
l.value = void 0;
|
|
36
|
+
}
|
|
37
|
+
const r = u();
|
|
38
|
+
function C(e) {
|
|
39
|
+
r.value = e;
|
|
40
|
+
}
|
|
41
|
+
function _() {
|
|
42
|
+
r.value = void 0;
|
|
43
|
+
}
|
|
44
|
+
const o = c(() => {
|
|
45
|
+
const e = r.value ?? l.value;
|
|
46
|
+
if (e !== void 0)
|
|
47
|
+
return x.value[e];
|
|
48
|
+
}), z = c(() => {
|
|
49
|
+
if (!o.value) return {};
|
|
50
|
+
switch (o.value.tooltipPosition) {
|
|
51
|
+
case "bottom":
|
|
52
|
+
return {
|
|
53
|
+
left: `${o.value.coords.x1}px`,
|
|
54
|
+
top: `${o.value.coords.y2 + 10}px`
|
|
55
|
+
};
|
|
56
|
+
default:
|
|
57
|
+
return {
|
|
58
|
+
left: `${o.value.coords.x2 + 10}px`,
|
|
59
|
+
top: `${o.value.coords.y1}px`
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function A() {
|
|
64
|
+
r.value = void 0;
|
|
65
|
+
}
|
|
66
|
+
return b({ reset: A }), (e, t) => (v(), d("div", {
|
|
67
|
+
class: "container",
|
|
68
|
+
onClick: t[3] || (t[3] = (s) => _())
|
|
69
|
+
}, [
|
|
70
|
+
p("img", E(e.image, {
|
|
71
|
+
ref: "image",
|
|
72
|
+
usemap: "#image-map",
|
|
73
|
+
onLoad: t[0] || (t[0] = (s) => f())
|
|
74
|
+
}), null, 16),
|
|
75
|
+
p("map", P, [
|
|
76
|
+
(v(!0), d(O, null, W(x.value, (s, i) => (v(), d("area", {
|
|
77
|
+
key: i,
|
|
78
|
+
shape: s.shape,
|
|
79
|
+
coords: `${s.coords.x1},${s.coords.y1},${s.coords.x2},${s.coords.y2}`,
|
|
80
|
+
onMouseenter: (y) => h(i),
|
|
81
|
+
onMouseleave: t[1] || (t[1] = (y) => w()),
|
|
82
|
+
onClick: g((y) => C(i), ["stop"])
|
|
83
|
+
}, null, 40, q))), 128))
|
|
84
|
+
]),
|
|
85
|
+
B(p("div", {
|
|
86
|
+
class: "tooltip",
|
|
87
|
+
style: F(z.value),
|
|
88
|
+
onClick: t[2] || (t[2] = g(() => {
|
|
89
|
+
}, ["stop"]))
|
|
90
|
+
}, D(o.value?.info), 5), [
|
|
91
|
+
[j, o.value]
|
|
92
|
+
])
|
|
93
|
+
]));
|
|
94
|
+
}
|
|
95
|
+
}), U = "*{font-family:Nunito,Roboto,sans-serif;color:var(#253858)}.container{position:relative;max-width:100%;border:1px solid #ccc}img{width:100%;height:auto;display:block}area{cursor:pointer}.tooltip{position:absolute;background-color:#000000d9;color:#fff;padding:8px 12px;border-radius:6px;font-size:14px;max-width:260px;z-index:10}", V = /* @__PURE__ */ L(T, [["styles", [U]]]);
|
|
96
|
+
window.customElements.define("clickable-image", N(V));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as w, c as n, o as t, f as e, t as r,
|
|
2
|
-
import { a as M, i as f, b as j } from "../i18n-
|
|
3
|
-
import { L as y } from "../LLMMessage.ce-
|
|
1
|
+
import { a as w, c as n, o as t, f as e, t as r, x as C, _ as x, r as p, y as g, F as v, b as h, D as P, e as B, d as A } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { a as M, i as f, b as j } from "../i18n-Gv3Ze5vF.js";
|
|
3
|
+
import { L as y } from "../LLMMessage.ce-CnMf3mGa.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
|
-
}, T = {}, q = {},
|
|
6
|
+
}, T = {}, q = {}, D = { class: "probability-bar" }, E = { "aria-hidden": "true" }, F = { class: "sr-only" }, O = /* @__PURE__ */ w({
|
|
7
7
|
__name: "ProbabilityBar.ce",
|
|
8
8
|
props: {
|
|
9
9
|
name: { type: String },
|
|
10
10
|
percent: { type: Number }
|
|
11
11
|
},
|
|
12
12
|
setup(i) {
|
|
13
|
-
return (o, s) => (t(), n("div",
|
|
14
|
-
e("p",
|
|
13
|
+
return (o, s) => (t(), n("div", D, [
|
|
14
|
+
e("p", E, r(o.name), 1),
|
|
15
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}%`),
|
|
@@ -41,7 +41,7 @@ const z = {}, N = {}, I = {
|
|
|
41
41
|
function k() {
|
|
42
42
|
u.value = !1, b.value = s.llmMessage, c.value = s.wordsToAdd, l.value = 0;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function S() {
|
|
45
45
|
c.value.length === 1 && (u.value = !0), l.value += 1;
|
|
46
46
|
const [a, ..._] = c.value;
|
|
47
47
|
c.value = _, b.value += `<span style="font-weight: bold;">${a} </span>`;
|
|
@@ -62,7 +62,7 @@ const z = {}, N = {}, I = {
|
|
|
62
62
|
]),
|
|
63
63
|
u.value ? (t(), n("p", K, r(a.$t("complete-phrase.successfullyCompletedSentence")), 1)) : (t(), n("button", {
|
|
64
64
|
key: 0,
|
|
65
|
-
onClick:
|
|
65
|
+
onClick: S,
|
|
66
66
|
class: "container__button",
|
|
67
67
|
"aria-describedby": `currentProbability${l.value}`
|
|
68
68
|
}, r(a.$t("complete-phrase.clickHereButton")), 9, J))
|
|
@@ -75,16 +75,16 @@ const z = {}, N = {}, I = {
|
|
|
75
75
|
}, r(a.$t("complete-phrase.iaSuggestions")), 9, U),
|
|
76
76
|
e("p", X, r(a.$t("complete-phrase.explanation")), 1),
|
|
77
77
|
e("div", Y, [
|
|
78
|
-
(t(!0), n(v, null, h(a.listOfProbabilityBarsLists, (
|
|
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
|
-
(t(!0), n(v, null, h(
|
|
84
|
+
(t(!0), n(v, null, h($, (m, L) => (t(), B(H, {
|
|
85
85
|
name: m.name,
|
|
86
86
|
percent: m.percent,
|
|
87
|
-
key:
|
|
87
|
+
key: L
|
|
88
88
|
}, null, 8, ["name", "percent"]))), 128))
|
|
89
89
|
], 10, Z))), 128))
|
|
90
90
|
])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e } from "../_plugin-vue_export-helper-
|
|
2
|
-
import { I as m } from "../ImageQuiz.ce-
|
|
1
|
+
import { d as e } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { I as m } from "../ImageQuiz.ce-DtarwFF1.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-
|
|
2
|
-
import { I as A } from "../ImageQuiz.ce-
|
|
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-DK91u00G.js";
|
|
2
|
+
import { I as A } from "../ImageQuiz.ce-DtarwFF1.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,
|
|
2
|
-
import { L as l } from "../LLMMessage.ce-
|
|
3
|
-
import { p as u } from "../shadow-dom-
|
|
1
|
+
import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, y as i, _ as c, d as g } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { L as l } from "../LLMMessage.ce-CnMf3mGa.js";
|
|
3
|
+
import { p as u } from "../shadow-dom-DTRtrvgC.js";
|
|
4
4
|
const f = {
|
|
5
5
|
class: "header",
|
|
6
6
|
"aria-hidden": "true"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as m,
|
|
2
|
-
import { L as _ } from "../LLMMessage.ce-
|
|
3
|
-
import { p as x } from "../shadow-dom-
|
|
1
|
+
import { a as m, B as i, C 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-DK91u00G.js";
|
|
2
|
+
import { L as _ } from "../LLMMessage.ce-CnMf3mGa.js";
|
|
3
|
+
import { p as x } from "../shadow-dom-DTRtrvgC.js";
|
|
4
4
|
const b = {
|
|
5
5
|
class: "llm-messages",
|
|
6
6
|
"aria-live": "polite"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as v, r as c,
|
|
1
|
+
import { a as v, r as c, z as y, c as i, o as d, y as h, f as l, A as w, F as f, b as k, t as S, _ as C, d as L } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
2
|
import "./llm-messages.ce.js.js";
|
|
3
|
-
const N = { class: "prompt-select" }, P = { class: "prompt-select__options" },
|
|
3
|
+
const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, A = ["disabled", "onClick"], B = /* @__PURE__ */ v({
|
|
4
4
|
__name: "LLMPromptSelect.ce",
|
|
5
5
|
props: {
|
|
6
6
|
messages: { type: Array },
|
|
@@ -44,9 +44,9 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
|
|
|
44
44
|
r.value = !1;
|
|
45
45
|
}
|
|
46
46
|
return (e, t) => {
|
|
47
|
-
const a =
|
|
47
|
+
const a = y("llm-messages");
|
|
48
48
|
return d(), i(f, null, [
|
|
49
|
-
|
|
49
|
+
h(a, { messages: s.value }, null, 8, ["messages"]),
|
|
50
50
|
l("div", N, [
|
|
51
51
|
t[0] || (t[0] = l("p", { class: "prompt-select__label" }, [
|
|
52
52
|
w(" Sélectionner un des prompts "),
|
|
@@ -57,11 +57,11 @@ const N = { class: "prompt-select" }, P = { class: "prompt-select__options" }, B
|
|
|
57
57
|
key: p,
|
|
58
58
|
disabled: n.disabled || r.value,
|
|
59
59
|
onClick: (u) => x(n)
|
|
60
|
-
}, S(n.prompt), 9,
|
|
60
|
+
}, S(n.prompt), 9, A))), 128))
|
|
61
61
|
])
|
|
62
62
|
])
|
|
63
63
|
], 64);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
67
|
-
window.customElements.define("llm-prompt-select", L(
|
|
66
|
+
}), E = ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}llm-messages{display:block;height:400px}.prompt-select{font-family:Roboto,sans-serif;border-top:solid 1px #253858;padding:16px 24px 24px}.prompt-select__label{margin-top:0;font-weight:700;color:#253858}.prompt-select__options{display:flex;gap:1rem;justify-content:left;flex-wrap:wrap}.prompt-select__options>button{padding:1rem 1.5rem;border:none;background:#cec3f4;border-radius:16px;border:1px solid #ffffff;color:#130261;font-size:.875rem;box-shadow:0 4px 12px -4px #957ee833}.prompt-select__options>button:hover:not(:disabled){background:#9a8dc7;color:#fff;cursor:pointer}.prompt-select__options>button:disabled{cursor:not-allowed;color:#1010104d}", M = /* @__PURE__ */ C(B, [["styles", [E]]]);
|
|
67
|
+
window.customElements.define("llm-prompt-select", L(M));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as D, r as
|
|
2
|
-
import { L } from "../Loading.ce-
|
|
3
|
-
const P = ["part"],
|
|
1
|
+
import { a as D, r as k, k as M, h as $, c as t, o as s, D as w, E as m, f as h, A as x, t as v, y as E, K as B, m as T, F as b, b as N, _ as S, g as V, e as z, d as F } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { L } from "../Loading.ce-BLJllV22.js";
|
|
3
|
+
const P = ["part"], I = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "message__loader message__content",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
|
-
},
|
|
7
|
+
}, j = ["part"], K = { key: 1 }, O = { key: 0 }, R = /* @__PURE__ */ D({
|
|
8
8
|
__name: "Message.ce",
|
|
9
9
|
props: {
|
|
10
10
|
displaySender: { type: Boolean, default: !0 },
|
|
@@ -14,7 +14,7 @@ const P = ["part"], j = {
|
|
|
14
14
|
loadingDuration: { type: Number }
|
|
15
15
|
},
|
|
16
16
|
setup(n, { expose: c }) {
|
|
17
|
-
const i =
|
|
17
|
+
const i = k("hidden"), g = k([]), p = M(() => n.message.content.split(`
|
|
18
18
|
`));
|
|
19
19
|
function d(e) {
|
|
20
20
|
return new Promise((a) => {
|
|
@@ -32,7 +32,7 @@ const P = ["part"], j = {
|
|
|
32
32
|
return c({
|
|
33
33
|
reset: f
|
|
34
34
|
}), (e, a) => (s(), t("div", {
|
|
35
|
-
class:
|
|
35
|
+
class: w(["message", [
|
|
36
36
|
`message--${e.message.direction}`,
|
|
37
37
|
{ "hidden-state": i.value === "hidden" }
|
|
38
38
|
]])
|
|
@@ -43,25 +43,25 @@ const P = ["part"], j = {
|
|
|
43
43
|
part: `sender ${e.message.direction}`
|
|
44
44
|
}, [
|
|
45
45
|
a[0] || (a[0] = h("span", { class: "sr-only" }, "Message de ", -1)),
|
|
46
|
-
|
|
46
|
+
x(v(e.message.userName), 1)
|
|
47
47
|
], 8, P)) : m("", !0),
|
|
48
|
-
i.value === "loading" ? (s(), t("div",
|
|
48
|
+
i.value === "loading" ? (s(), t("div", I, [
|
|
49
49
|
E(L)
|
|
50
50
|
])) : m("", !0),
|
|
51
51
|
h("p", {
|
|
52
|
-
class:
|
|
52
|
+
class: w(["message__content", { "hidden-state": i.value !== "visible" }]),
|
|
53
53
|
part: `message ${e.message.direction}`
|
|
54
54
|
}, [
|
|
55
55
|
e.message.image ? (s(), t("img", B(T({ key: 0 }, e.message.image)), null, 16)) : m("", !0),
|
|
56
|
-
e.message.image ? (s(), t("br",
|
|
56
|
+
e.message.image ? (s(), t("br", K)) : m("", !0),
|
|
57
57
|
(s(!0), t(b, null, N(p.value, (o, r) => (s(), t(b, { key: r }, [
|
|
58
58
|
r > 0 ? (s(), t("br", O)) : m("", !0),
|
|
59
|
-
|
|
59
|
+
x(" " + v(o), 1)
|
|
60
60
|
], 64))), 128))
|
|
61
|
-
], 10,
|
|
61
|
+
], 10, j)
|
|
62
62
|
], 2));
|
|
63
63
|
}
|
|
64
|
-
}), q = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.message__content>img{max-width:100%}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}",
|
|
64
|
+
}), q = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.message__content>img{max-width:100%}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}", G = /* @__PURE__ */ S(R, [["styles", [q]]]), H = { part: "conversation" }, J = { class: "sr-only" }, Q = /* @__PURE__ */ D({
|
|
65
65
|
__name: "MessageConversation.ce",
|
|
66
66
|
props: {
|
|
67
67
|
title: { default: "Conversation par messages", type: String },
|
|
@@ -94,9 +94,9 @@ const P = ["part"], j = {
|
|
|
94
94
|
}
|
|
95
95
|
return c({
|
|
96
96
|
reset: f
|
|
97
|
-
}), (e, a) => (s(), t("figure",
|
|
98
|
-
h("figcaption",
|
|
99
|
-
(s(!0), t(b, null, N(p.value, ({ message: o, displaySender: r, startAnimation: u, animationDuration: y }, _) => (s(), z(
|
|
97
|
+
}), (e, a) => (s(), t("figure", H, [
|
|
98
|
+
h("figcaption", J, v(e.title), 1),
|
|
99
|
+
(s(!0), t(b, null, N(p.value, ({ message: o, displaySender: r, startAnimation: u, animationDuration: y }, _) => (s(), z(G, {
|
|
100
100
|
ref_for: !0,
|
|
101
101
|
ref: "messages",
|
|
102
102
|
message: o,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as m, i as
|
|
3
|
-
const y = {
|
|
1
|
+
import { a as g, c as n, o as i, f as a, t as l, F as o, b as d, I as h, _ as u, d as p } from "../_plugin-vue_export-helper-DK91u00G.js";
|
|
2
|
+
import { a as m, i as r, b as f } from "../i18n-Gv3Ze5vF.js";
|
|
3
|
+
const v = {}, y = {}, b = {
|
|
4
4
|
"pix-article": { byAuthor: "Par {{author}}" }
|
|
5
|
-
},
|
|
5
|
+
}, S = {}, L = {}, j = ["titleLevel"], x = { class: "article__metadata" }, A = { class: "article__author" }, E = ["innerHTML"], H = /* @__PURE__ */ g({
|
|
6
6
|
__name: "PixArticle.ce",
|
|
7
7
|
props: {
|
|
8
8
|
titleLevel: { default: 2, type: Number },
|
|
@@ -17,26 +17,26 @@ 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,
|
|
20
|
+
return (t, B) => (i(), n(o, null, [
|
|
21
21
|
a("div", {
|
|
22
22
|
class: "article__title",
|
|
23
23
|
role: "heading",
|
|
24
24
|
titleLevel: t.titleLevel
|
|
25
|
-
},
|
|
26
|
-
a("p",
|
|
27
|
-
a("span",
|
|
28
|
-
a("time", null,
|
|
25
|
+
}, l(t.title), 9, j),
|
|
26
|
+
a("p", x, [
|
|
27
|
+
a("span", A, l(t.$t("pix-article.byAuthor", { author: t.author })), 1),
|
|
28
|
+
a("time", null, l(t.date), 1)
|
|
29
29
|
]),
|
|
30
|
-
(i(!0), n(
|
|
30
|
+
(i(!0), n(o, null, d(h(s), (c, _) => (i(), n("p", {
|
|
31
31
|
innerHTML: c,
|
|
32
|
-
key:
|
|
33
|
-
}, null, 8,
|
|
32
|
+
key: _
|
|
33
|
+
}, null, 8, E))), 128))
|
|
34
34
|
], 64));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
37
|
-
m(/* @__PURE__ */ Object.assign({ "./locales/
|
|
38
|
-
window.customElements.define("pix-article",
|
|
36
|
+
}), k = "[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}", w = /* @__PURE__ */ u(H, [["styles", [k]], ["__scopeId", "data-v-30ea36f1"]]);
|
|
37
|
+
m(/* @__PURE__ */ Object.assign({ "./locales/en.json": v, "./locales/es.json": y, "./locales/fr.json": b, "./locales/it.json": S, "./locales/nl.json": L })).catch((e) => console.error(e));
|
|
38
|
+
window.customElements.define("pix-article", p(w, {
|
|
39
39
|
configureApp(e) {
|
|
40
|
-
|
|
40
|
+
r.changeLanguage(document?.documentElement?.lang ?? navigator.language), e.use(f, { i18next: r });
|
|
41
41
|
}
|
|
42
42
|
}));
|