@1024pix/epreuves-components 2.2.1 → 2.2.4
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/{LLMMessage.ce-D_SYQOna.js → LLMMessage.ce-qbRxqNxR.js} +10 -10
- package/dist/{Loading.ce-CjAv1WaY.js → Loading.ce-CiVWBT3g.js} +1 -1
- package/dist/{NavigationButton.ce-DlErTyfv.js → NavigationButton.ce-DF5ScHc4.js} +9 -9
- package/dist/{Retry--whpA3a8.js → Retry-CuUMOAZi.js} +1 -1
- package/dist/{_plugin-vue_export-helper-CP5OpzZH.js → _plugin-vue_export-helper-D7ghZaw4.js} +1566 -1541
- package/dist/components/calcul-impact.ce.js.js +6 -6
- package/dist/components/capacity-calculation.ce.js.js +35 -35
- package/dist/components/clickable-image.ce.js.js +72 -71
- package/dist/components/complete-phrase.ce.js.js +54 -54
- package/dist/components/flip-cards.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 +6 -6
- package/dist/components/message-conversation.ce.js.js +22 -22
- package/dist/components/mobile-shell.ce.js.js +27 -0
- package/dist/components/pix-article.ce.js.js +4 -4
- package/dist/components/pix-carousel.ce.js.js +14 -14
- package/dist/components/pix-cursor.ce.js.js +17 -17
- package/dist/components/qcm-deepfake.ce.js.js +29 -29
- package/dist/{i18n-BB4WILwM.js → i18n-DX3ApBSH.js} +53 -53
- package/dist/{image-quiz.ce-UlVFo5Sr.js → image-quiz.ce-3HDl6Z67.js} +24 -24
- package/dist/index.js +1 -1
- package/dist/schema.js +6 -6
- package/dist/{shadow-dom-D3DtD_VO.js → shadow-dom-CFAQERh6.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as j,
|
|
2
|
-
import { a as H, i as V, b as Q } from "../i18n-
|
|
1
|
+
import { d as j, E as T, c as p, o as d, F as U, D as v, N as r, v as C, a as e, A as a, G as _, T as D, _ as z, r as l, l as N, e as G, x, O as E, f as K } from "../_plugin-vue_export-helper-D7ghZaw4.js";
|
|
2
|
+
import { a as H, i as V, b as Q } from "../i18n-DX3ApBSH.js";
|
|
3
3
|
import { u as J } from "../normalize-props-AlmAfi_u.js";
|
|
4
4
|
const X = {}, Z = {}, ee = {}, te = {
|
|
5
5
|
"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 la consommation en électricité de {{homes}} foyers français", collectiveDuration: "Équivalent à {{number}} minutes de micro-ondes", planeKilometers: "Et {{kilometers}} km parcourus en avion", yourCollectiveImpact: "Impact collectif simulé" }
|
|
@@ -144,7 +144,7 @@ const X = {}, Z = {}, ee = {}, te = {
|
|
|
144
144
|
e("div", {
|
|
145
145
|
class: "title",
|
|
146
146
|
role: "heading",
|
|
147
|
-
"arial-level":
|
|
147
|
+
"arial-level": x(i)
|
|
148
148
|
}, "📊 " + a(s.$t("calcul-impact.title")), 9, Ce),
|
|
149
149
|
e("p", null, a(s.$t("calcul-impact.subtitle")), 1),
|
|
150
150
|
e("label", he, "🤖 " + a(s.$t("calcul-impact.numberOfConversationLabel")), 1),
|
|
@@ -154,7 +154,7 @@ const X = {}, Z = {}, ee = {}, te = {
|
|
|
154
154
|
id: "numberOfConversation",
|
|
155
155
|
"onUpdate:modelValue": I[0] || (I[0] = (O) => b.value = O)
|
|
156
156
|
}, null, 544), [
|
|
157
|
-
[
|
|
157
|
+
[E, b.value]
|
|
158
158
|
]),
|
|
159
159
|
e("label", ke, "🖼️ " + a(s.$t("calcul-impact.numberOfImagesLabel")), 1),
|
|
160
160
|
N(e("input", {
|
|
@@ -163,13 +163,13 @@ const X = {}, Z = {}, ee = {}, te = {
|
|
|
163
163
|
id: "numberOfImage",
|
|
164
164
|
"onUpdate:modelValue": I[1] || (I[1] = (O) => f.value = O)
|
|
165
165
|
}, null, 544), [
|
|
166
|
-
[
|
|
166
|
+
[E, f.value]
|
|
167
167
|
]),
|
|
168
168
|
c.value ? (d(), G(ge, {
|
|
169
169
|
key: 0,
|
|
170
170
|
"is-collective": y.value,
|
|
171
171
|
"is-personal": c.value,
|
|
172
|
-
"title-level":
|
|
172
|
+
"title-level": x(i),
|
|
173
173
|
"by-week-for-one": u.value,
|
|
174
174
|
"by-year-for-a-million": m.value
|
|
175
175
|
}, null, 8, ["is-collective", "is-personal", "title-level", "by-week-for-one", "by-year-for-a-million"])) : C("", !0),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as C, c as d, o,
|
|
2
|
-
import { i as
|
|
1
|
+
import { d as C, c as d, o, y as m, C as E, G as $, A as r, _ as v, P as O, Q as h, r as g, k as x, a as t, D as k, F as R, b as V, x as Z, q as z, S as F, N as T, e as f, v as N, f as P } from "../_plugin-vue_export-helper-D7ghZaw4.js";
|
|
2
|
+
import { i as L, a as G, b as W } from "../i18n-DX3ApBSH.js";
|
|
3
3
|
import { u as H } from "../normalize-props-AlmAfi_u.js";
|
|
4
|
-
import { R as K } from "../Retry
|
|
4
|
+
import { R as K } from "../Retry-CuUMOAZi.js";
|
|
5
5
|
const J = {}, X = {}, Y = {}, aa = {
|
|
6
6
|
"capacity-calculation": { title: "Observer l'impact des demandes", in: { title: "Demandes à l'IA", aiQuestion: "Quelle est la demande à l'IA ?", aiOptions: ["Fais une vidéo d’une durée d'une minute.", "Écris un texte de 10 lignes.", "Fais un dessin de haute qualité."], userQuestion: "Combien d’utilisateurs font la demande en même temps ?", buttonLabel: { primary: "Observer l'effet", warning: "Recommencer" } }, out: { title: "Impact des demandes", consumption: { label: "Consommation d’électricité :", normal_weak: "Faible", normal_medium: "Moyenne", warning: "Très forte", error: "Très forte", initial: "À l'arrêt" }, capacity: { label: "État du supercalculateur :", normal_weak: "Normal", normal_medium: "Normal", warning: "Sollicitation maximale", error: "Ne peut pas répondre à la demande", initial: "À l'arrêt" } } }
|
|
7
7
|
}, ea = {}, ta = {}, ca = /* @__PURE__ */ C({
|
|
@@ -14,7 +14,7 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
14
14
|
return (c, _) => (o(), d("button", {
|
|
15
15
|
class: m(["epreuve-button", a.state])
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
E(c.$slots, "icon"),
|
|
18
18
|
$(" " + r(a.label), 1)
|
|
19
19
|
], 2));
|
|
20
20
|
}
|
|
@@ -46,8 +46,8 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
46
46
|
setup(a) {
|
|
47
47
|
const _ = a.titleLevel + 1, n = h(a, "selectedAiQuestion"), e = h(a, "selectedNbUser"), l = h(a, "currentLevel"), s = g(!1), u = x(() => ({
|
|
48
48
|
state: l.value === "initial" ? "primary" : "warning",
|
|
49
|
-
label:
|
|
50
|
-
})), p = x(() => Number.isInteger(n.value)),
|
|
49
|
+
label: L.t(`capacity-calculation.in.buttonLabel.${l.value === "initial" ? "primary" : "warning"}`)
|
|
50
|
+
})), p = x(() => Number.isInteger(n.value)), Q = [800, 8e3, 14e3, 25e3, 9e4, 15e4], S = /* @__PURE__ */ new Set([
|
|
51
51
|
// Valeurs de base
|
|
52
52
|
10,
|
|
53
53
|
20,
|
|
@@ -72,7 +72,7 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
72
72
|
4e3,
|
|
73
73
|
5e3,
|
|
74
74
|
1e4,
|
|
75
|
-
...
|
|
75
|
+
...Q,
|
|
76
76
|
2e4,
|
|
77
77
|
3e4,
|
|
78
78
|
4e4,
|
|
@@ -80,13 +80,13 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
80
80
|
75e3,
|
|
81
81
|
1e5,
|
|
82
82
|
125e3
|
|
83
|
-
]), w = Array.from(
|
|
83
|
+
]), w = Array.from(S).sort((i, y) => i - y), A = x(() => {
|
|
84
84
|
const i = w.indexOf(e.value);
|
|
85
85
|
return Math.max(0, i);
|
|
86
|
-
}),
|
|
86
|
+
}), M = (i) => {
|
|
87
87
|
const y = i.target;
|
|
88
88
|
e.value = w[Number(y.value)];
|
|
89
|
-
},
|
|
89
|
+
}, U = (i) => {
|
|
90
90
|
if (s.value) {
|
|
91
91
|
i.preventDefault();
|
|
92
92
|
return;
|
|
@@ -118,7 +118,7 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
118
118
|
}, r(i.$t("capacity-calculation.in.title")), 1),
|
|
119
119
|
t("fieldset", oa, [
|
|
120
120
|
t("legend", ra, r(i.$t("capacity-calculation.in.aiQuestion")), 1),
|
|
121
|
-
(o(!0), d(R, null,
|
|
121
|
+
(o(!0), d(R, null, V(i.$t("capacity-calculation.in.aiOptions", { returnObjects: !0 }), (D, b) => (o(), d("div", { key: b }, [
|
|
122
122
|
t("label", {
|
|
123
123
|
class: m(["capacity-calculation__ai-option", { "capacity-calculation__ai-option--active": n.value === b, disabled: s.value }])
|
|
124
124
|
}, [
|
|
@@ -130,7 +130,7 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
130
130
|
onClick: j,
|
|
131
131
|
checked: n.value === b
|
|
132
132
|
}, null, 8, sa),
|
|
133
|
-
$(" " + r(
|
|
133
|
+
$(" " + r(D), 1)
|
|
134
134
|
], 2)
|
|
135
135
|
]))), 128))
|
|
136
136
|
]),
|
|
@@ -142,18 +142,18 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
142
142
|
id: "nbUser",
|
|
143
143
|
name: "nbUser",
|
|
144
144
|
min: 0,
|
|
145
|
-
max:
|
|
146
|
-
value:
|
|
147
|
-
onChange:
|
|
148
|
-
onKeydown:
|
|
145
|
+
max: Z(w).length - 1,
|
|
146
|
+
value: A.value,
|
|
147
|
+
onChange: M,
|
|
148
|
+
onKeydown: U,
|
|
149
149
|
"aria-disabled": s.value,
|
|
150
150
|
class: "capacity-calculation__range"
|
|
151
151
|
}, null, 40, _a),
|
|
152
152
|
t("label", va, r(e.value.toLocaleString()), 1)
|
|
153
153
|
])
|
|
154
154
|
]),
|
|
155
|
-
|
|
156
|
-
onClick:
|
|
155
|
+
k(ia, {
|
|
156
|
+
onClick: z(I, ["prevent"]),
|
|
157
157
|
"aria-disabled": !p.value,
|
|
158
158
|
label: u.value.label,
|
|
159
159
|
state: u.value.state
|
|
@@ -161,7 +161,7 @@ const J = {}, X = {}, Y = {}, aa = {
|
|
|
161
161
|
l.value !== "initial" ? {
|
|
162
162
|
name: "icon",
|
|
163
163
|
fn: T(() => [
|
|
164
|
-
|
|
164
|
+
k(K)
|
|
165
165
|
]),
|
|
166
166
|
key: "0"
|
|
167
167
|
} : void 0
|
|
@@ -190,7 +190,7 @@ const wa = /* @__PURE__ */ v(ga, [["render", Ca]]), ha = {}, xa = {
|
|
|
190
190
|
fill: "none",
|
|
191
191
|
xmlns: "http://www.w3.org/2000/svg"
|
|
192
192
|
};
|
|
193
|
-
function
|
|
193
|
+
function ka(a, c) {
|
|
194
194
|
return o(), d("svg", xa, [...c[0] || (c[0] = [
|
|
195
195
|
t("path", {
|
|
196
196
|
d: "M18.9595 24.3502L15.386 20.7767C15.0148 20.4052 14.5468 20.2195 13.9818 20.2195C13.4171 20.2195 12.949 20.4052 12.5776 20.7767C12.2064 21.1479 12.0226 21.6159 12.0262 22.1809C12.0298 22.7456 12.2171 23.2135 12.5883 23.5847L17.5235 28.5198C17.9343 28.928 18.4138 29.1321 18.9617 29.1321C19.5094 29.1321 19.9874 28.928 20.3959 28.5198L30.3581 18.5572C30.7295 18.1861 30.9153 17.7199 30.9153 17.1589C30.9153 16.5975 30.7295 16.1312 30.3581 15.76C29.9869 15.3885 29.5188 15.2028 28.9538 15.2028C28.3892 15.2028 27.9212 15.3885 27.5501 15.76L18.9595 24.3502ZM21.5001 39.7809C18.9646 39.7809 16.5855 39.3013 14.363 38.3422C12.1401 37.383 10.2066 36.0815 8.56244 34.4377C6.91858 32.7935 5.61709 30.86 4.65795 28.6372C3.69881 26.4146 3.21924 24.0356 3.21924 21.5001C3.21924 18.9646 3.69881 16.5855 4.65795 14.363C5.61709 12.1401 6.91858 10.2066 8.56244 8.56244C10.2066 6.91858 12.1401 5.61709 14.363 4.65795C16.5855 3.69881 18.9646 3.21924 21.5001 3.21924C24.0356 3.21924 26.4146 3.69881 28.6372 4.65795C30.86 5.61709 32.7935 6.91858 34.4377 8.56244C36.0815 10.2066 37.383 12.1401 38.3422 14.363C39.3013 16.5855 39.7809 18.9646 39.7809 21.5001C39.7809 24.0356 39.3013 26.4146 38.3422 28.6372C37.383 30.86 36.0815 32.7935 34.4377 34.4377C32.7935 36.0815 30.86 37.383 28.6372 38.3422C26.4146 39.3013 24.0356 39.7809 21.5001 39.7809Z",
|
|
@@ -198,7 +198,7 @@ function La(a, c) {
|
|
|
198
198
|
}, null, -1)
|
|
199
199
|
])]);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const La = /* @__PURE__ */ v(ha, [["render", ka]]), $a = {}, Na = {
|
|
202
202
|
width: "43",
|
|
203
203
|
height: "43",
|
|
204
204
|
viewBox: "0 0 43 43",
|
|
@@ -213,7 +213,7 @@ function qa(a, c) {
|
|
|
213
213
|
}, null, -1)
|
|
214
214
|
])]);
|
|
215
215
|
}
|
|
216
|
-
const
|
|
216
|
+
const Qa = /* @__PURE__ */ v($a, [["render", qa]]), Sa = ["aria-level"], Aa = { class: "capacity-calculation__card" }, Ma = { class: "capacity-calculation__text capacity-calculation__text--strong" }, Ua = { class: "capacity-calculation__img" }, Ia = ["src"], ja = { class: "capacity-calculation__text" }, Ba = { class: "capacity-calculation__answers" }, Da = { class: "capacity-calculation__card" }, Ea = { class: "capacity-calculation__text capacity-calculation__text--strong" }, Oa = { class: "capacity-calculation__text" }, Ra = /* @__PURE__ */ C({
|
|
217
217
|
__name: "Answers.ce",
|
|
218
218
|
props: {
|
|
219
219
|
currentLevel: { type: String },
|
|
@@ -229,18 +229,18 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
229
229
|
role: "heading",
|
|
230
230
|
"aria-level": a.titleLevel + 1,
|
|
231
231
|
class: "capacity-calculation__subtitle"
|
|
232
|
-
}, r(c.$t("capacity-calculation.out.title")), 9,
|
|
233
|
-
t("div",
|
|
234
|
-
t("p",
|
|
235
|
-
t("div",
|
|
232
|
+
}, r(c.$t("capacity-calculation.out.title")), 9, Sa),
|
|
233
|
+
t("div", Aa, [
|
|
234
|
+
t("p", Ma, r(c.$t("capacity-calculation.out.capacity.label")), 1),
|
|
235
|
+
t("div", Ua, [
|
|
236
236
|
t("img", {
|
|
237
237
|
src: a.capacityImage,
|
|
238
238
|
alt: ""
|
|
239
239
|
}, null, 8, Ia),
|
|
240
|
-
a.currentLevel.startsWith("normal_") ? (o(), f(
|
|
240
|
+
a.currentLevel.startsWith("normal_") ? (o(), f(La, {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "capacity-calculation__img--status"
|
|
243
|
-
})) : a.currentLevel === "warning" ? (o(), f(
|
|
243
|
+
})) : a.currentLevel === "warning" ? (o(), f(Qa, {
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "capacity-calculation__img--status"
|
|
246
246
|
})) : a.currentLevel === "error" ? (o(), f(wa, {
|
|
@@ -251,8 +251,8 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
251
251
|
t("p", ja, r(c.$t(`capacity-calculation.out.capacity.${a.currentLevel}`)), 1)
|
|
252
252
|
]),
|
|
253
253
|
t("div", Ba, [
|
|
254
|
-
t("div",
|
|
255
|
-
t("p",
|
|
254
|
+
t("div", Da, [
|
|
255
|
+
t("p", Ea, r(c.$t("capacity-calculation.out.consumption.label")), 1),
|
|
256
256
|
t("div", {
|
|
257
257
|
class: m(["capacity-calculation__progress-bar", a.currentLevel])
|
|
258
258
|
}, null, 2),
|
|
@@ -261,7 +261,7 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
261
261
|
])
|
|
262
262
|
], 2));
|
|
263
263
|
}
|
|
264
|
-
}),
|
|
264
|
+
}), Va = ".capacity-calculation__column--answers[data-v-177ab412]{display:flex;gap:.3rem;border:0px}.capacity-calculation__column--answers--normal_weak[data-v-177ab412],.capacity-calculation__column--answers--normal_medium[data-v-177ab412]{background:#e6f6ef}.capacity-calculation__column--answers--warning[data-v-177ab412]{background:#fffaeb}.capacity-calculation__column--answers--error[data-v-177ab412]{background:#fbebea}.capacity-calculation__column--answers .capacity-calculation__answers[data-v-177ab412]{display:flex;flex-direction:column;align-items:stretch;gap:8px;justify-content:center;margin-bottom:1rem}.capacity-calculation__column--answers .capacity-calculation__card[data-v-177ab412]{border-radius:4px;display:flex;flex-direction:column;align-items:center;gap:16px;padding:8px}.capacity-calculation__column--answers .capacity-calculation__text[data-v-177ab412]{font-size:.875rem;font-weight:400;line-height:1.5rem;text-align:center;margin:0}.capacity-calculation__column--answers .capacity-calculation__text--strong[data-v-177ab412]{font-weight:700;margin:0}.capacity-calculation__column--answers img[data-v-177ab412]{max-width:100%}.capacity-calculation__column--answers .capacity-calculation__img[data-v-177ab412]{position:relative}.capacity-calculation__column--answers .capacity-calculation__img img[data-v-177ab412]{width:100px;height:100px;border-radius:24px}.capacity-calculation__column--answers .capacity-calculation__img--status[data-v-177ab412]{position:absolute;top:0;right:0;transform:translate(30%,-30%)}.capacity-calculation__column--answers .capacity-calculation__progress-bar[data-v-177ab412]{width:100%;height:32px;border-radius:24px;border:solid 2px #253858}.capacity-calculation__column--answers .capacity-calculation__progress-bar.normal_weak[data-v-177ab412],.capacity-calculation__column--answers .capacity-calculation__progress-bar.normal_medium[data-v-177ab412]{background:linear-gradient(90deg,#1c825d 10%,#fff 36%)}.capacity-calculation__column--answers .capacity-calculation__progress-bar.warning[data-v-177ab412]{background:linear-gradient(90deg,#ee6911 30%,#fff 66%)}.capacity-calculation__column--answers .capacity-calculation__progress-bar.error[data-v-177ab412]{background:linear-gradient(90deg,#d24140 51%,#fff 88%)}@media(max-width:720px){.capacity-calculation__column--answers .capacity-calculation__answers[data-v-177ab412]{flex-direction:row;justify-content:center;gap:16px}}", Za = /* @__PURE__ */ v(Ra, [["styles", [Va]], ["__scopeId", "data-v-177ab412"]]), za = { class: "capacity-calculation" }, Fa = ["aria-level"], Ta = {
|
|
265
265
|
class: "capacity-calculation__grid",
|
|
266
266
|
"aria-live": "polite"
|
|
267
267
|
}, Pa = /* @__PURE__ */ C({
|
|
@@ -275,14 +275,14 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
275
275
|
function l() {
|
|
276
276
|
_.value = void 0, n.value = 10, e.value = "initial";
|
|
277
277
|
}
|
|
278
|
-
return c({ reset: l }), (s, u) => (o(), d("div",
|
|
278
|
+
return c({ reset: l }), (s, u) => (o(), d("div", za, [
|
|
279
279
|
t("div", {
|
|
280
280
|
role: "heading",
|
|
281
281
|
"aria-level": a.titleLevel,
|
|
282
282
|
class: "capacity-calculation__title"
|
|
283
283
|
}, r(s.$t("capacity-calculation.title")), 9, Fa),
|
|
284
284
|
t("div", Ta, [
|
|
285
|
-
|
|
285
|
+
k(ba, {
|
|
286
286
|
"title-level": a.titleLevel,
|
|
287
287
|
"selected-ai-question": _.value,
|
|
288
288
|
"onUpdate:selectedAiQuestion": u[0] || (u[0] = (p) => _.value = p),
|
|
@@ -292,7 +292,7 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
292
292
|
"onUpdate:currentLevel": u[2] || (u[2] = (p) => e.value = p),
|
|
293
293
|
class: m({ "initial-state": e.value === "initial" })
|
|
294
294
|
}, null, 8, ["title-level", "selected-ai-question", "selected-nb-user", "current-level", "class"]),
|
|
295
|
-
e.value !== "initial" ? (o(), f(
|
|
295
|
+
e.value !== "initial" ? (o(), f(Za, {
|
|
296
296
|
key: 0,
|
|
297
297
|
"title-level": a.titleLevel,
|
|
298
298
|
"selected-nb-user": n.value,
|
|
@@ -306,7 +306,7 @@ const Ma = /* @__PURE__ */ v($a, [["render", qa]]), Qa = ["aria-level"], Sa = {
|
|
|
306
306
|
G(/* @__PURE__ */ Object.assign({ "./locales/en.json": J, "./locales/es-419.json": X, "./locales/es.json": Y, "./locales/fr.json": aa, "./locales/it.json": ea, "./locales/nl.json": ta })).catch((a) => console.error(a));
|
|
307
307
|
const q = P(Wa, {
|
|
308
308
|
configureApp(a) {
|
|
309
|
-
|
|
309
|
+
L.changeLanguage(document?.documentElement?.lang || navigator.language), a.use(W, { i18next: L });
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
q.prototype.normalizeProps = (a) => ({
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as E, g as O, r as x, h as P, j as W, k as c, c as d, o as p, a as w, l as _, m as j, F as D, b as L, q as V, t as y, v as q, x as T, y as U, z as X, A as Y, _ as G, f as H } from "../_plugin-vue_export-helper-D7ghZaw4.js";
|
|
2
2
|
import { u as C } from "../normalize-props-AlmAfi_u.js";
|
|
3
|
-
const
|
|
3
|
+
const J = { class: "container" }, K = ["onMouseenter", "onFocusin", "onClick", "aria-label"], v = 10, Q = /* @__PURE__ */ E({
|
|
4
4
|
__name: "ClickableImage.ce",
|
|
5
5
|
props: {
|
|
6
6
|
image: { type: Object },
|
|
7
7
|
areas: { type: Array }
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const l =
|
|
11
|
-
function
|
|
9
|
+
setup(n, { expose: S }) {
|
|
10
|
+
const l = O("image"), r = x(1), b = new ResizeObserver(() => g());
|
|
11
|
+
function g() {
|
|
12
12
|
l.value.naturalWidth && (r.value = l.value.offsetWidth / l.value.naturalWidth);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}),
|
|
17
|
-
|
|
14
|
+
P(() => {
|
|
15
|
+
b.observe(l.value);
|
|
16
|
+
}), W(() => {
|
|
17
|
+
b.disconnect();
|
|
18
18
|
});
|
|
19
|
-
const h = c(() =>
|
|
19
|
+
const A = n.areas.some(({ spot: e }) => !!e), h = c(() => n.areas.map((e) => ({
|
|
20
20
|
...e,
|
|
21
|
-
coords:
|
|
22
|
-
spot:
|
|
21
|
+
coords: I(e.coords),
|
|
22
|
+
spot: M(e.spot)
|
|
23
23
|
})));
|
|
24
|
-
function
|
|
24
|
+
function I(e) {
|
|
25
25
|
return {
|
|
26
26
|
x1: e.x1 * r.value,
|
|
27
27
|
y1: e.y1 * r.value,
|
|
@@ -29,109 +29,110 @@ const Y = { class: "container" }, G = ["onMouseenter", "onFocusin", "onClick", "
|
|
|
29
29
|
y2: e.y2 * r.value
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function M({ x: e = 0, y: t = 0 } = {}) {
|
|
33
33
|
return {
|
|
34
|
-
x: e
|
|
35
|
-
y:
|
|
34
|
+
x: e * r.value,
|
|
35
|
+
y: t * r.value
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
function
|
|
40
|
-
|
|
38
|
+
const f = x();
|
|
39
|
+
function $(e) {
|
|
40
|
+
f.value = e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function k() {
|
|
43
|
+
f.value = void 0;
|
|
44
44
|
}
|
|
45
|
-
const i =
|
|
46
|
-
function
|
|
45
|
+
const i = x();
|
|
46
|
+
function F(e) {
|
|
47
47
|
i.value = e;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function N() {
|
|
50
50
|
i.value = void 0;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
return h.value[
|
|
55
|
-
}),
|
|
52
|
+
const m = c(() => i.value ?? f.value), u = c(() => {
|
|
53
|
+
if (m.value !== void 0)
|
|
54
|
+
return h.value[m.value];
|
|
55
|
+
}), R = c(() => {
|
|
56
56
|
if (!u.value) return {};
|
|
57
|
-
const { tooltipPosition: e, coords: { x1:
|
|
57
|
+
const { tooltipPosition: e, coords: { x1: t, y1: o, x2: a, y2: s } } = u.value;
|
|
58
58
|
switch (e) {
|
|
59
59
|
case "top":
|
|
60
60
|
return {
|
|
61
|
-
left: `${
|
|
61
|
+
left: `${t + (a - t) / 2}px`,
|
|
62
62
|
transform: "translate(-50%, -100%)",
|
|
63
|
-
top: `${
|
|
63
|
+
top: `${o - v}px`
|
|
64
64
|
};
|
|
65
65
|
case "bottom":
|
|
66
66
|
return {
|
|
67
|
-
left: `${
|
|
67
|
+
left: `${t + (a - t) / 2}px`,
|
|
68
68
|
transform: "translateX(-50%)",
|
|
69
|
-
top: `${
|
|
69
|
+
top: `${s + v}px`
|
|
70
70
|
};
|
|
71
71
|
case "left":
|
|
72
72
|
return {
|
|
73
|
-
left: `${
|
|
74
|
-
top: `${
|
|
73
|
+
left: `${t - v}px`,
|
|
74
|
+
top: `${o + (s - o) / 2}px`,
|
|
75
75
|
transform: "translate(-100%, -50%)"
|
|
76
76
|
};
|
|
77
77
|
default:
|
|
78
78
|
return {
|
|
79
|
-
left: `${a +
|
|
80
|
-
top: `${
|
|
79
|
+
left: `${a + v}px`,
|
|
80
|
+
top: `${o + (s - o) / 2}px`,
|
|
81
81
|
transform: "translateY(-50%)"
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
function
|
|
85
|
+
function B() {
|
|
86
86
|
i.value = void 0;
|
|
87
87
|
}
|
|
88
|
-
return
|
|
89
|
-
|
|
88
|
+
return S({ reset: B }), (e, t) => (p(), d("div", J, [
|
|
89
|
+
w("img", j(n.image, {
|
|
90
90
|
ref: "image",
|
|
91
|
-
onLoad:
|
|
92
|
-
onClick:
|
|
91
|
+
onLoad: t[0] || (t[0] = (o) => g()),
|
|
92
|
+
onClick: t[1] || (t[1] = (o) => N()),
|
|
93
93
|
alt: ""
|
|
94
94
|
}), null, 16),
|
|
95
|
-
(
|
|
95
|
+
(p(!0), d(D, null, L(h.value, (o, a) => (p(), d("button", {
|
|
96
96
|
key: a,
|
|
97
|
-
style:
|
|
98
|
-
"--y1": `${
|
|
99
|
-
"--y2": `${
|
|
100
|
-
"--x1": `${
|
|
101
|
-
"--x2": `${
|
|
97
|
+
style: y({
|
|
98
|
+
"--y1": `${o.coords.y1}px`,
|
|
99
|
+
"--y2": `${o.coords.y2}px`,
|
|
100
|
+
"--x1": `${o.coords.x1}px`,
|
|
101
|
+
"--x2": `${o.coords.x2}px`
|
|
102
102
|
}),
|
|
103
103
|
class: "area",
|
|
104
|
-
onMouseenter: (
|
|
105
|
-
onMouseleave:
|
|
106
|
-
onFocusin: (
|
|
107
|
-
onFocusout:
|
|
108
|
-
onClick:
|
|
109
|
-
"aria-label":
|
|
104
|
+
onMouseenter: (s) => $(a),
|
|
105
|
+
onMouseleave: t[2] || (t[2] = (s) => k()),
|
|
106
|
+
onFocusin: (s) => $(a),
|
|
107
|
+
onFocusout: t[3] || (t[3] = (s) => k()),
|
|
108
|
+
onClick: V((s) => F(a), ["stop"]),
|
|
109
|
+
"aria-label": o.info
|
|
110
110
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"--s-
|
|
111
|
+
T(A) ? (p(), d("span", {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: U(["spot", { active: m.value === a }]),
|
|
114
|
+
style: y({
|
|
115
|
+
"--s-x": `${o.spot.x}px`,
|
|
116
|
+
"--s-y": `${o.spot.y}px`
|
|
116
117
|
})
|
|
117
|
-
}, null, 6)
|
|
118
|
-
], 44,
|
|
119
|
-
|
|
118
|
+
}, null, 6)) : q("", !0)
|
|
119
|
+
], 44, K))), 128)),
|
|
120
|
+
_(w("p", {
|
|
120
121
|
class: "tooltip",
|
|
121
122
|
"aria-hidden": "true",
|
|
122
|
-
style:
|
|
123
|
-
},
|
|
124
|
-
[
|
|
123
|
+
style: y(R.value)
|
|
124
|
+
}, Y(u.value?.info), 5), [
|
|
125
|
+
[X, u.value]
|
|
125
126
|
])
|
|
126
127
|
]));
|
|
127
128
|
}
|
|
128
|
-
}),
|
|
129
|
-
z.prototype.normalizeProps = (
|
|
130
|
-
...
|
|
129
|
+
}), Z = "*{font-family:Nunito,Roboto,sans-serif;color:var(#253858)}.container{position:relative;max-width:100%;border:1px solid #ccc}.container img{width:100%;height:auto;display:block}.container .area{cursor:pointer;position:absolute;top:var(--y1);left:var(--x1);height:calc(var(--y2) - var(--y1));width:calc(var(--x2) - var(--x1));border:none;background:transparent}.container .spot{cursor:pointer;position:absolute;width:32px;aspect-ratio:1;border:solid 4px #d9d9d9;background:#d9d9d999;border-radius:50%;top:50%;left:50%;transform:translate(calc(-50% + var(--s-x)),calc(-50% + var(--s-y)))}.container .spot.active{border-color:#6495ed}.container .tooltip{position:absolute;background-color:#000000d9;color:#fff;padding:8px 12px;border-radius:6px;font-size:14px;max-width:260px;z-index:10}", ee = /* @__PURE__ */ G(Q, [["styles", [Z]]]), z = H(ee);
|
|
130
|
+
z.prototype.normalizeProps = (n) => ({
|
|
131
|
+
...n,
|
|
131
132
|
image: {
|
|
132
|
-
...
|
|
133
|
-
height: C(
|
|
134
|
-
width: C(
|
|
133
|
+
...n.image,
|
|
134
|
+
height: C(n.height),
|
|
135
|
+
width: C(n.width)
|
|
135
136
|
}
|
|
136
137
|
});
|
|
137
138
|
window.customElements.define("clickable-image", z);
|