@1024pix/epreuves-components 1.4.4 → 1.5.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/LLMMessage.ce-CcaSmq0J.js +96 -0
- package/dist/Loading.ce-kO02LfAR.js +14 -0
- package/dist/NavigationButton.ce-BUeEdL4x.js +98 -0
- package/dist/{_plugin-vue_export-helper-CwwQJ1m6.js → _plugin-vue_export-helper-BGEtPlxS.js} +1373 -1355
- package/dist/components/calcul-impact.ce.js.js +91 -85
- package/dist/components/capacity-calculation.ce.js.js +117 -111
- package/dist/components/clickable-image.ce.js.js +83 -59
- package/dist/components/complete-phrase.ce.js.js +62 -56
- package/dist/components/flip-cards.ce.js.js +43 -46
- package/dist/components/image-quiz.ce.js.js +6 -4
- package/dist/components/image-quizzes.ce.js.js +18 -14
- package/dist/components/llm-compare-messages.ce.js.js +17 -17
- package/dist/components/llm-messages.ce.js.js +17 -17
- package/dist/components/llm-prompt-select.ce.js.js +37 -32
- package/dist/components/message-conversation.ce.js.js +61 -52
- package/dist/components/pix-article.ce.js.js +26 -20
- package/dist/components/pix-carousel.ce.js.js +133 -121
- package/dist/components/pix-cursor.ce.js.js +62 -62
- package/dist/components/qcm-deepfake.ce.js.js +97 -91
- package/dist/{i18n-gncqQJ0G.js → i18n-D3E2CT0o.js} +44 -40
- package/dist/image-quiz.ce-Qe3SbGDF.js +141 -0
- package/dist/index.js +1 -1
- package/dist/normalize-props-AlmAfi_u.js +13 -0
- package/dist/schema.js +8 -8
- package/dist/{shadow-dom-MxYtPVXS.js → shadow-dom-Bqt3ZRMI.js} +1 -1
- package/package.json +1 -1
- package/dist/ImageQuiz.ce-BLOWdEiw.js +0 -123
- package/dist/LLMMessage.ce-DnZ8kE2i.js +0 -89
- package/dist/Loading.ce-FI776zdC.js +0 -14
- package/dist/NavigationButton.ce-gp04deGY.js +0 -98
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as $, a as
|
|
3
|
-
|
|
1
|
+
import { d as g, c as p, o as s, D as k, L as O, A as L, t as o, _ as m, f as t, O as B, P as h, r as b, k as f, E as w, b as E, F as V, a as z, G as D, R as F, M as P, y as C, q as R, e as T } from "../_plugin-vue_export-helper-BGEtPlxS.js";
|
|
2
|
+
import { i as $, a as H, b as G } from "../i18n-D3E2CT0o.js";
|
|
3
|
+
import { u as K } from "../normalize-props-AlmAfi_u.js";
|
|
4
|
+
const Z = {}, J = {}, W = {}, X = {
|
|
4
5
|
"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 minute d’un chat qui fait du ski.", "Écris un poème de 10 vers à la manière de Victor Hugo.", "Fais le dessin d’une salle de concert à la manière d’un manga."], userQuestion: "Combien d’utilisateurs font la demande en même temps ?", buttonLabel: { primary: "Observer l'effet", warning: "Recommencer" } }, out: { title: "Impact des demandes", tryAgain: "Essayez avec une autre demande", 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" } } }
|
|
5
|
-
},
|
|
6
|
+
}, Y = {}, aa = {}, ea = ["aria-disabled"], ta = /* @__PURE__ */ g({
|
|
6
7
|
__name: "PixButton.ce",
|
|
7
8
|
props: {
|
|
8
9
|
disabled: { type: Boolean },
|
|
9
10
|
label: { type: String },
|
|
10
11
|
state: { type: String }
|
|
11
12
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return (
|
|
14
|
-
class: k(["pix-button",
|
|
15
|
-
"aria-disabled":
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (n, r) => (s(), p("button", {
|
|
15
|
+
class: k(["pix-button", e.state]),
|
|
16
|
+
"aria-disabled": e.disabled
|
|
16
17
|
}, [
|
|
17
|
-
|
|
18
|
-
L(" " +
|
|
19
|
-
], 10,
|
|
18
|
+
O(n.$slots, "icon"),
|
|
19
|
+
L(" " + o(e.label), 1)
|
|
20
|
+
], 10, ea));
|
|
20
21
|
}
|
|
21
|
-
}),
|
|
22
|
+
}), ca = ".pix-button{--pix-neutral-0: #fff;--pix-primary-500: #613fdd;--pix-primary-700: #452d9d;--pix-primary-900: #291a5d;--pix-secondary-500: #ffcb33;--pix-secondary-700: #a16206;--pix-secondary-900: #5b3808;align-items:center;border:2px solid transparent;border-radius:100px;background-color:var(--pix-primary-500);color:var(--pix-neutral-0);cursor:pointer;display:flex;font-weight:700;gap:8px;justify-content:center;line-height:24px;margin:0 auto;outline:none;padding:8px 24px;text-decoration:none;width:fit-content;white-space:nowrap}.pix-button.primary[aria-disabled=true]{cursor:not-allowed;opacity:.5}.pix-button.primary:not([aria-disabled=true]):hover{background-color:var(--pix-primary-700)}.pix-button.primary:not([aria-disabled=true]):focus,.pix-button.primary:not([aria-disabled=true]):focus-visible{background-color:var(--pix-primary-700);outline:1px solid var(--pix-neutral-0);outline-offset:-5px}.pix-button.primary:not([aria-disabled=true]):active{background-color:var(--pix-primary-900);outline:none}.pix-button.warning{color:#122647;background-color:var(--pix-secondary-500)}.pix-button.warning:not([aria-disabled=true]):hover{color:var(--pix-neutral-0);background-color:var(--pix-secondary-700)}.pix-button.warning:not([aria-disabled=true]):focus,.pix-button.warning:not([aria-disabled=true]):focus-visible{color:var(--pix-neutral-0);background-color:var(--pix-secondary-700);outline:1px solid var(--pix-neutral-0);outline-offset:-4px}.pix-button.warning:not([aria-disabled=true]):active{color:var(--pix-neutral-0);background-color:var(--pix-secondary-900);outline:none}", ia = /* @__PURE__ */ m(ta, [["styles", [ca]]]), la = {}, na = {
|
|
22
23
|
width: "20",
|
|
23
24
|
height: "20",
|
|
24
25
|
viewBox: "0 0 20 20",
|
|
25
26
|
fill: "currentColor",
|
|
26
27
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27
28
|
};
|
|
28
|
-
function
|
|
29
|
-
return s(), p("svg",
|
|
30
|
-
|
|
29
|
+
function oa(e, n) {
|
|
30
|
+
return s(), p("svg", na, [...n[0] || (n[0] = [
|
|
31
|
+
t("path", { d: "M9.98008 16.836C8.07578 16.836 6.46036 16.1728 5.13383 14.8462C3.80731 13.5197 3.14404 11.9043 3.14404 9.99998C3.14404 8.09568 3.80731 6.48026 5.13383 5.15373C6.46036 3.8272 8.07578 3.16394 9.98008 3.16394C10.9684 3.16394 11.9108 3.36686 12.8074 3.77269C13.7039 4.17839 14.4713 4.76095 15.1097 5.5204V4.03707C15.1097 3.7897 15.1933 3.58234 15.3607 3.41498C15.5281 3.24762 15.7354 3.16394 15.9828 3.16394C16.2303 3.16394 16.4377 3.24762 16.6051 3.41498C16.7724 3.58234 16.8561 3.7897 16.8561 4.03707V8.29352C16.8561 8.5595 16.7646 8.78394 16.5815 8.96686C16.3986 9.14991 16.1742 9.24144 15.9082 9.24144H11.6418C11.3958 9.24144 11.1896 9.15776 11.0232 8.9904C10.8568 8.82304 10.7736 8.61561 10.7736 8.36811C10.7736 8.12213 10.8573 7.91595 11.0247 7.74956C11.192 7.58318 11.3994 7.49998 11.6468 7.49998H14.2438C13.7994 6.74207 13.199 6.14589 12.4428 5.71144C11.6867 5.277 10.8658 5.05977 9.98008 5.05977C8.60786 5.05977 7.44147 5.54005 6.48092 6.50061C5.52022 7.4613 5.03988 8.62776 5.03988 9.99998C5.03988 11.3722 5.52022 12.5387 6.48092 13.4994C7.44147 14.4599 8.60786 14.9402 9.98008 14.9402C10.888 14.9402 11.7219 14.713 12.4818 14.2587C13.2416 13.8046 13.8385 13.1963 14.2724 12.4339C14.4021 12.2189 14.5846 12.0692 14.8199 11.9848C15.055 11.9005 15.2896 11.8996 15.5236 11.9823C15.7733 12.0651 15.9535 12.2275 16.064 12.4696C16.1745 12.7118 16.1675 12.9401 16.0432 13.1544C15.4538 14.2688 14.6222 15.161 13.5484 15.831C12.4745 16.501 11.2851 16.836 9.98008 16.836Z" }, null, -1)
|
|
31
32
|
])]);
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
+
const sa = /* @__PURE__ */ m(la, [["render", oa]]), ra = { class: "capacity-calculation__column capacity-calculation__column--questions" }, ua = { class: "capacity-calculation__fieldset capacity-calculation__fieldset--ai" }, da = { class: "capacity-calculation__legend" }, pa = ["aria-disabled", "value", "checked"], _a = {
|
|
34
35
|
key: 0,
|
|
35
36
|
class: "capacity-calculation__fieldset capacity-calculation__fieldset--range"
|
|
36
|
-
},
|
|
37
|
+
}, ma = { class: "capacity-calculation__legend--user-question" }, va = { class: "capacity-calculation__range-wrap" }, ya = ["max", "value", "aria-disabled"], ba = {
|
|
37
38
|
for: "nbUser",
|
|
38
39
|
class: "capacity-calculation__range-label"
|
|
39
|
-
},
|
|
40
|
+
}, fa = /* @__PURE__ */ g({
|
|
40
41
|
__name: "Questions.ce",
|
|
41
|
-
props: /* @__PURE__ */
|
|
42
|
+
props: /* @__PURE__ */ B({
|
|
42
43
|
titleLevel: { type: Number }
|
|
43
44
|
}, {
|
|
44
45
|
selectedAiQuestion: {
|
|
@@ -58,11 +59,11 @@ const ea = /* @__PURE__ */ m(X, [["render", aa]]), ta = { class: "capacity-calcu
|
|
|
58
59
|
currentLevelModifiers: {}
|
|
59
60
|
}),
|
|
60
61
|
emits: ["update:selectedAiQuestion", "update:selectedNbUser", "update:currentLevel"],
|
|
61
|
-
setup(
|
|
62
|
-
const
|
|
63
|
-
state:
|
|
64
|
-
label: $.t(`capacity-calculation.in.buttonLabel.${
|
|
65
|
-
})), _ = [800, 8e3, 14e3, 25e3, 9e4, 15e4],
|
|
62
|
+
setup(e) {
|
|
63
|
+
const r = e.titleLevel + 1, i = h(e, "selectedAiQuestion"), a = h(e, "selectedNbUser"), c = h(e, "currentLevel"), u = b(!1), d = f(() => ({
|
|
64
|
+
state: c.value === "initial" ? "primary" : "warning",
|
|
65
|
+
label: $.t(`capacity-calculation.in.buttonLabel.${c.value === "initial" ? "primary" : "warning"}`)
|
|
66
|
+
})), _ = [800, 8e3, 14e3, 25e3, 9e4, 15e4], q = /* @__PURE__ */ new Set([
|
|
66
67
|
// Valeurs de base
|
|
67
68
|
10,
|
|
68
69
|
20,
|
|
@@ -95,96 +96,96 @@ const ea = /* @__PURE__ */ m(X, [["render", aa]]), ta = { class: "capacity-calcu
|
|
|
95
96
|
75e3,
|
|
96
97
|
1e5,
|
|
97
98
|
125e3
|
|
98
|
-
]), x = Array.from(
|
|
99
|
+
]), x = Array.from(q).sort((l, v) => l - v), A = f(() => {
|
|
99
100
|
const l = x.indexOf(a.value);
|
|
100
101
|
return Math.max(0, l);
|
|
101
|
-
}),
|
|
102
|
+
}), S = (l) => {
|
|
102
103
|
const v = l.target;
|
|
103
104
|
a.value = x[Number(v.value)];
|
|
104
|
-
},
|
|
105
|
-
if (
|
|
105
|
+
}, j = (l) => {
|
|
106
|
+
if (u.value) {
|
|
106
107
|
l.preventDefault();
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
},
|
|
110
|
-
if (
|
|
110
|
+
}, Q = () => {
|
|
111
|
+
if (c.value !== "initial") {
|
|
111
112
|
I();
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
|
-
i.value === 0 ? a.value >= 10 && a.value <= 400 ?
|
|
115
|
+
i.value === 0 ? a.value >= 10 && a.value <= 400 ? c.value = "normal_weak" : a.value >= 401 && a.value <= 700 ? c.value = "normal_medium" : a.value >= 701 && a.value <= 1e3 ? c.value = "warning" : c.value = "error" : i.value === 1 ? a.value >= 10 && a.value <= 4e4 ? c.value = "normal_weak" : a.value >= 40001 && a.value <= 7e4 ? c.value = "normal_medium" : a.value >= 70001 && a.value <= 1e5 ? c.value = "warning" : c.value = "error" : i.value === 2 && (a.value >= 10 && a.value <= 8e3 ? c.value = "normal_weak" : a.value >= 8001 && a.value <= 14e3 ? c.value = "normal_medium" : a.value >= 14001 && a.value <= 2e4 ? c.value = "warning" : c.value = "error"), u.value = !0;
|
|
115
116
|
};
|
|
116
117
|
function U(l) {
|
|
117
|
-
if (
|
|
118
|
+
if (u.value) {
|
|
118
119
|
l.preventDefault();
|
|
119
120
|
return;
|
|
120
121
|
}
|
|
121
122
|
i.value = Number(l.target.value);
|
|
122
123
|
}
|
|
123
124
|
function I() {
|
|
124
|
-
i.value = void 0, a.value = 10,
|
|
125
|
+
i.value = void 0, a.value = 10, c.value = "initial", u.value = !1;
|
|
125
126
|
}
|
|
126
|
-
return (l, v) => (s(), p("div",
|
|
127
|
-
|
|
127
|
+
return (l, v) => (s(), p("div", ra, [
|
|
128
|
+
t("div", {
|
|
128
129
|
role: "heading",
|
|
129
|
-
"aria-level":
|
|
130
|
+
"aria-level": r,
|
|
130
131
|
class: "capacity-calculation__subtitle"
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
(s(!0), p(
|
|
135
|
-
|
|
136
|
-
class: k(["capacity-calculation__ai-option", { "capacity-calculation__ai-option--active": i.value === y, disabled:
|
|
132
|
+
}, o(l.$t("capacity-calculation.in.title")), 1),
|
|
133
|
+
t("fieldset", ua, [
|
|
134
|
+
t("legend", da, o(l.$t("capacity-calculation.in.aiQuestion")), 1),
|
|
135
|
+
(s(!0), p(V, null, z(l.$t("capacity-calculation.in.aiOptions", { returnObjects: !0 }), (M, y) => (s(), p("div", { key: y }, [
|
|
136
|
+
t("label", {
|
|
137
|
+
class: k(["capacity-calculation__ai-option", { "capacity-calculation__ai-option--active": i.value === y, disabled: u.value }])
|
|
137
138
|
}, [
|
|
138
|
-
|
|
139
|
+
t("input", {
|
|
139
140
|
type: "radio",
|
|
140
|
-
"aria-disabled":
|
|
141
|
+
"aria-disabled": u.value,
|
|
141
142
|
name: "ai-answer",
|
|
142
143
|
value: y,
|
|
143
144
|
onClick: U,
|
|
144
145
|
checked: i.value === y
|
|
145
|
-
}, null, 8,
|
|
146
|
-
L(" " +
|
|
146
|
+
}, null, 8, pa),
|
|
147
|
+
L(" " + o(M), 1)
|
|
147
148
|
], 2)
|
|
148
149
|
]))), 128))
|
|
149
150
|
]),
|
|
150
|
-
Number.isInteger(i.value) ? (s(), p("fieldset",
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
Number.isInteger(i.value) ? (s(), p("fieldset", _a, [
|
|
152
|
+
t("legend", ma, o(l.$t("capacity-calculation.in.userQuestion")), 1),
|
|
153
|
+
t("div", va, [
|
|
154
|
+
t("input", {
|
|
154
155
|
type: "range",
|
|
155
156
|
id: "nbUser",
|
|
156
157
|
name: "nbUser",
|
|
157
158
|
min: 0,
|
|
158
159
|
max: D(x).length - 1,
|
|
159
|
-
value:
|
|
160
|
-
onChange:
|
|
161
|
-
onKeydown:
|
|
162
|
-
"aria-disabled":
|
|
160
|
+
value: A.value,
|
|
161
|
+
onChange: S,
|
|
162
|
+
onKeydown: j,
|
|
163
|
+
"aria-disabled": u.value,
|
|
163
164
|
class: "capacity-calculation__range"
|
|
164
|
-
}, null, 40,
|
|
165
|
-
|
|
165
|
+
}, null, 40, ya),
|
|
166
|
+
t("label", ba, o(a.value.toLocaleString()), 1)
|
|
166
167
|
])
|
|
167
168
|
])) : w("", !0),
|
|
168
|
-
Number.isInteger(i.value) ? (s(),
|
|
169
|
+
Number.isInteger(i.value) ? (s(), E(ia, {
|
|
169
170
|
key: 1,
|
|
170
|
-
onClick:
|
|
171
|
+
onClick: R(Q, ["prevent"]),
|
|
171
172
|
label: d.value.label,
|
|
172
173
|
state: d.value.state
|
|
173
|
-
},
|
|
174
|
-
|
|
174
|
+
}, F({ _: 2 }, [
|
|
175
|
+
c.value !== "initial" ? {
|
|
175
176
|
name: "icon",
|
|
176
|
-
fn:
|
|
177
|
-
C(
|
|
177
|
+
fn: P(() => [
|
|
178
|
+
C(sa)
|
|
178
179
|
]),
|
|
179
180
|
key: "0"
|
|
180
181
|
} : void 0
|
|
181
182
|
]), 1032, ["label", "state"])) : w("", !0)
|
|
182
183
|
]));
|
|
183
184
|
}
|
|
184
|
-
}),
|
|
185
|
+
}), ga = ".capacity-calculation__column--questions .capacity-calculation__fieldset[data-v-3ec4ec51]{border:none;display:flex;flex-direction:column;gap:12px;padding:0}.capacity-calculation__column--questions .capacity-calculation__legend[data-v-3ec4ec51]{font-weight:500;margin-bottom:16px}.capacity-calculation__column--questions .capacity-calculation__legend--user-question[data-v-3ec4ec51]{font-weight:500;margin:16px 0}.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-3ec4ec51]{border:1px solid #5e6c84;border-radius:8px;display:block;cursor:pointer;padding:12px;transition:all .2s ease}.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-3ec4ec51]:hover,.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-3ec4ec51]:focus{background-color:#f7f5ff;border-color:#613fdd;color:#291a5d}.capacity-calculation__column--questions .capacity-calculation__ai-option--active[data-v-3ec4ec51]{background-color:#f7f5ff;border-color:#613fdd;color:#291a5d}.capacity-calculation__column--questions .capacity-calculation__ai-option.disabled[data-v-3ec4ec51]{cursor:not-allowed;background:#f1f1f1;border-color:#5b5b5b}.capacity-calculation__column--questions .capacity-calculation__range-wrap[data-v-3ec4ec51]{display:flex;flex-direction:column;gap:8px}.capacity-calculation__column--questions .capacity-calculation__range[data-v-3ec4ec51]{width:100%;accent-color:#613fdd}.capacity-calculation__column--questions .capacity-calculation__range[aria-disabled=true][data-v-3ec4ec51]{opacity:.3;pointer-events:none}.capacity-calculation__column--questions .capacity-calculation__range-label[data-v-3ec4ec51]{display:flex;justify-content:center;font-weight:700;margin-block:-5px 10px}", xa = /* @__PURE__ */ m(fa, [["styles", [ga]], ["__scopeId", "data-v-3ec4ec51"]]), ha = { class: "capacity-calculation__column capacity-calculation__column--answers" }, wa = ["aria-level"], Ca = { class: "capacity-calculation__card" }, $a = { class: "capacity-calculation__text capacity-calculation__text--strong" }, ka = ["src"], La = { class: "capacity-calculation__text" }, Na = { class: "capacity-calculation__answers" }, qa = { class: "capacity-calculation__card" }, Aa = { class: "capacity-calculation__text capacity-calculation__text--strong" }, Sa = ["src"], ja = { class: "capacity-calculation__text" }, Qa = {
|
|
185
186
|
key: 0,
|
|
186
187
|
class: "capacity-calculation__card capacity-calculation__card--retry"
|
|
187
|
-
},
|
|
188
|
+
}, Ua = /* @__PURE__ */ g({
|
|
188
189
|
__name: "Answers.ce",
|
|
189
190
|
props: {
|
|
190
191
|
currentLevel: { type: String },
|
|
@@ -192,83 +193,88 @@ const ea = /* @__PURE__ */ m(X, [["render", aa]]), ta = { class: "capacity-calcu
|
|
|
192
193
|
titleLevel: { type: Number },
|
|
193
194
|
images: { type: Object }
|
|
194
195
|
},
|
|
195
|
-
setup(
|
|
196
|
-
const
|
|
197
|
-
imageSrc:
|
|
198
|
-
label: `capacity-calculation.out.consumption.${
|
|
199
|
-
})), i =
|
|
200
|
-
imageSrc:
|
|
201
|
-
label: `capacity-calculation.out.capacity.${
|
|
196
|
+
setup(e) {
|
|
197
|
+
const n = e, r = f(() => ({
|
|
198
|
+
imageSrc: n.images[n.currentLevel].consumptionImg,
|
|
199
|
+
label: `capacity-calculation.out.consumption.${n.currentLevel}`
|
|
200
|
+
})), i = f(() => ({
|
|
201
|
+
imageSrc: n.images[n.currentLevel].capacityImg,
|
|
202
|
+
label: `capacity-calculation.out.capacity.${n.currentLevel}`
|
|
202
203
|
}));
|
|
203
|
-
return (a,
|
|
204
|
-
|
|
204
|
+
return (a, c) => (s(), p("div", ha, [
|
|
205
|
+
t("div", {
|
|
205
206
|
role: "heading",
|
|
206
|
-
"aria-level":
|
|
207
|
+
"aria-level": e.titleLevel + 1,
|
|
207
208
|
class: "capacity-calculation__subtitle"
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
}, o(a.$t("capacity-calculation.out.title")), 9, wa),
|
|
210
|
+
t("div", Ca, [
|
|
211
|
+
t("p", $a, o(a.$t("capacity-calculation.out.capacity.label")), 1),
|
|
212
|
+
t("img", {
|
|
212
213
|
src: i.value.imageSrc,
|
|
213
214
|
alt: "",
|
|
214
215
|
class: "capacity-calculation__img--capacity"
|
|
215
|
-
}, null, 8,
|
|
216
|
-
|
|
216
|
+
}, null, 8, ka),
|
|
217
|
+
t("p", La, o(a.$t(i.value.label)), 1)
|
|
217
218
|
]),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
src:
|
|
219
|
+
t("div", Na, [
|
|
220
|
+
t("div", qa, [
|
|
221
|
+
t("p", Aa, o(a.$t("capacity-calculation.out.consumption.label")), 1),
|
|
222
|
+
t("img", {
|
|
223
|
+
src: r.value.imageSrc,
|
|
223
224
|
alt: "",
|
|
224
225
|
class: "capacity-calculation__img"
|
|
225
|
-
}, null, 8,
|
|
226
|
-
|
|
226
|
+
}, null, 8, Sa),
|
|
227
|
+
t("p", ja, o(a.$t(r.value.label)), 1)
|
|
227
228
|
]),
|
|
228
|
-
|
|
229
|
+
e.currentLevel !== "initial" ? (s(), p("div", Qa, " 🧐 " + o(a.$t("capacity-calculation.out.tryAgain")), 1)) : w("", !0)
|
|
229
230
|
])
|
|
230
231
|
]));
|
|
231
232
|
}
|
|
232
|
-
}),
|
|
233
|
+
}), Ia = ".capacity-calculation__column--answers[data-v-db0665df]{display:flex;gap:.3rem}.capacity-calculation__column--answers .capacity-calculation__answers[data-v-db0665df]{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-db0665df]{background:#ffefc0;border-radius:4px;display:flex;flex-direction:column;align-items:center;gap:16px;padding:8px}.capacity-calculation__column--answers .capacity-calculation__card--retry[data-v-db0665df]{background:#e8f3ef;border-radius:16px;font-size:1rem;font-weight:700;line-height:1.5rem;text-align:center}.capacity-calculation__column--answers .capacity-calculation__text[data-v-db0665df]{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-db0665df]{font-weight:700;margin:0}.capacity-calculation__column--answers img[data-v-db0665df]{max-width:100%}.capacity-calculation__column--answers .capacity-calculation__img--capacity[data-v-db0665df]{max-width:120px}@media(max-width:720px){.capacity-calculation__column--answers .capacity-calculation__answers[data-v-db0665df]{flex-direction:row;justify-content:center;gap:16px}.capacity-calculation__column--answers .capacity-calculation__answers .capacity-calculation__card--retry[data-v-db0665df]{display:flex;justify-content:center}}", Ma = /* @__PURE__ */ m(Ua, [["styles", [Ia]], ["__scopeId", "data-v-db0665df"]]), Oa = { class: "capacity-calculation" }, Ba = ["aria-level"], Ea = { class: "capacity-calculation__grid" }, Va = /* @__PURE__ */ g({
|
|
233
234
|
__name: "CapacityCalculation.ce",
|
|
234
235
|
props: {
|
|
235
236
|
titleLevel: { default: 2, type: Number },
|
|
236
237
|
images: { type: Object }
|
|
237
238
|
},
|
|
238
|
-
setup(
|
|
239
|
-
const
|
|
240
|
-
function
|
|
241
|
-
|
|
239
|
+
setup(e, { expose: n }) {
|
|
240
|
+
const r = b(void 0), i = b(10), a = b("initial");
|
|
241
|
+
function c() {
|
|
242
|
+
r.value = void 0, i.value = 10, a.value = "initial";
|
|
242
243
|
}
|
|
243
|
-
return
|
|
244
|
-
|
|
244
|
+
return n({ reset: c }), (u, d) => (s(), p("div", Oa, [
|
|
245
|
+
t("div", {
|
|
245
246
|
role: "heading",
|
|
246
|
-
"aria-level":
|
|
247
|
+
"aria-level": e.titleLevel,
|
|
247
248
|
class: "capacity-calculation__title"
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
C(
|
|
251
|
-
"title-level":
|
|
252
|
-
"selected-ai-question":
|
|
253
|
-
"onUpdate:selectedAiQuestion": d[0] || (d[0] = (_) =>
|
|
249
|
+
}, o(u.$t("capacity-calculation.title")), 9, Ba),
|
|
250
|
+
t("div", Ea, [
|
|
251
|
+
C(xa, {
|
|
252
|
+
"title-level": e.titleLevel,
|
|
253
|
+
"selected-ai-question": r.value,
|
|
254
|
+
"onUpdate:selectedAiQuestion": d[0] || (d[0] = (_) => r.value = _),
|
|
254
255
|
"selected-nb-user": i.value,
|
|
255
256
|
"onUpdate:selectedNbUser": d[1] || (d[1] = (_) => i.value = _),
|
|
256
257
|
"current-level": a.value,
|
|
257
258
|
"onUpdate:currentLevel": d[2] || (d[2] = (_) => a.value = _)
|
|
258
259
|
}, null, 8, ["title-level", "selected-ai-question", "selected-nb-user", "current-level"]),
|
|
259
|
-
C(
|
|
260
|
-
"title-level":
|
|
260
|
+
C(Ma, {
|
|
261
|
+
"title-level": e.titleLevel,
|
|
261
262
|
"selected-nb-user": i.value,
|
|
262
263
|
"current-level": a.value,
|
|
263
|
-
images:
|
|
264
|
+
images: e.images
|
|
264
265
|
}, null, 8, ["title-level", "selected-nb-user", "current-level", "images"])
|
|
265
266
|
])
|
|
266
267
|
]));
|
|
267
268
|
}
|
|
268
|
-
}),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
configureApp(
|
|
272
|
-
$.changeLanguage(document?.documentElement?.lang || navigator.language),
|
|
269
|
+
}), za = ".capacity-calculation__title,.capacity-calculation__subtitle{color:#122647;font-family:Nunito,serif;font-weight:700;text-align:center}.capacity-calculation__title{font-size:1.75rem;line-height:2.25rem;margin-bottom:1rem}.capacity-calculation__subtitle{font-size:1.25rem;line-height:1.75rem;margin-bottom:1rem}.capacity-calculation__grid{display:grid;gap:1rem;grid-template-columns:5fr 2.6fr}.capacity-calculation__grid>.capacity-calculation__column{display:flex;background:#fff;border-radius:8px;border:1px solid #b0d3f4;flex-direction:column;padding:16px}@media screen and (max-width:720px){.capacity-calculation__grid{display:flex;flex-direction:column}}", Da = /* @__PURE__ */ m(Va, [["styles", [za]]]);
|
|
270
|
+
H(/* @__PURE__ */ Object.assign({ "./locales/en.json": Z, "./locales/es-419.json": J, "./locales/es.json": W, "./locales/fr.json": X, "./locales/it.json": Y, "./locales/nl.json": aa })).catch((e) => console.error(e));
|
|
271
|
+
const N = T(Da, {
|
|
272
|
+
configureApp(e) {
|
|
273
|
+
$.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(G, { i18next: $ });
|
|
273
274
|
}
|
|
274
|
-
})
|
|
275
|
+
});
|
|
276
|
+
N.prototype.normalizeProps = (e) => ({
|
|
277
|
+
...e,
|
|
278
|
+
titleLevel: K(e.titleLevel)
|
|
279
|
+
});
|
|
280
|
+
window.customElements.define("capacity-calculation", N);
|
|
@@ -1,96 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { d as R, g as B, r as m, h as E, j as N, k as p, c as v, o as f, f as x, l as O, m as P, F as W, a as j, q as k, v as D, t as F, x as L, _ as q, e as T } from "../_plugin-vue_export-helper-BGEtPlxS.js";
|
|
2
|
+
import { u as $ } from "../normalize-props-AlmAfi_u.js";
|
|
3
|
+
const U = { name: "image-map" }, V = ["shape", "coords", "onMouseenter", "onClick"], c = 10, X = /* @__PURE__ */ R({
|
|
3
4
|
__name: "ClickableImage.ce",
|
|
4
5
|
props: {
|
|
5
6
|
image: { type: Object },
|
|
6
7
|
areas: { type: Array }
|
|
7
8
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
|
|
9
|
+
setup(a, { expose: w }) {
|
|
10
|
+
const i = B("image"), r = m(1), g = new ResizeObserver(() => y());
|
|
11
|
+
function y() {
|
|
12
|
+
i.value.naturalWidth && (r.value = i.value.offsetWidth / i.value.naturalWidth);
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
|
|
14
|
+
E(() => {
|
|
15
|
+
g.observe(i.value);
|
|
16
|
+
}), N(() => {
|
|
17
|
+
g.disconnect();
|
|
17
18
|
});
|
|
18
|
-
const
|
|
19
|
+
const h = p(() => a.areas.map((e) => ({
|
|
19
20
|
...e,
|
|
20
|
-
coords:
|
|
21
|
+
coords: C(e.coords)
|
|
21
22
|
})));
|
|
22
|
-
function
|
|
23
|
+
function C(e) {
|
|
23
24
|
return {
|
|
24
|
-
x1: e.x1 *
|
|
25
|
-
y1: e.y1 *
|
|
26
|
-
x2: e.x2 *
|
|
27
|
-
y2: e.y2 *
|
|
25
|
+
x1: e.x1 * r.value,
|
|
26
|
+
y1: e.y1 * r.value,
|
|
27
|
+
x2: e.x2 * r.value,
|
|
28
|
+
y2: e.y2 * r.value
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
function
|
|
32
|
-
|
|
31
|
+
const d = m();
|
|
32
|
+
function z(e) {
|
|
33
|
+
d.value = e;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
35
|
+
function I() {
|
|
36
|
+
d.value = void 0;
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
|
|
38
|
+
const l = m();
|
|
39
|
+
function M(e) {
|
|
40
|
+
l.value = e;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
42
|
+
function A() {
|
|
43
|
+
l.value = void 0;
|
|
43
44
|
}
|
|
44
|
-
const
|
|
45
|
-
const e =
|
|
45
|
+
const u = p(() => {
|
|
46
|
+
const e = l.value ?? d.value;
|
|
46
47
|
if (e !== void 0)
|
|
47
|
-
return
|
|
48
|
-
}),
|
|
49
|
-
if (!
|
|
50
|
-
|
|
48
|
+
return h.value[e];
|
|
49
|
+
}), S = p(() => {
|
|
50
|
+
if (!u.value) return {};
|
|
51
|
+
const { tooltipPosition: e, coords: { x1: t, y1: o, x2: n, y2: s } } = u.value;
|
|
52
|
+
switch (e) {
|
|
53
|
+
case "top":
|
|
54
|
+
return {
|
|
55
|
+
left: `${t + (n - t) / 2}px`,
|
|
56
|
+
transform: "translate(-50%, -100%)",
|
|
57
|
+
top: `${o - c}px`
|
|
58
|
+
};
|
|
51
59
|
case "bottom":
|
|
52
60
|
return {
|
|
53
|
-
left: `${
|
|
54
|
-
|
|
61
|
+
left: `${t + (n - t) / 2}px`,
|
|
62
|
+
transform: "translateX(-50%)",
|
|
63
|
+
top: `${s + c}px`
|
|
64
|
+
};
|
|
65
|
+
case "left":
|
|
66
|
+
return {
|
|
67
|
+
left: `${t - c}px`,
|
|
68
|
+
top: `${o + (s - o) / 2}px`,
|
|
69
|
+
transform: "translate(-100%, -50%)"
|
|
55
70
|
};
|
|
56
71
|
default:
|
|
57
72
|
return {
|
|
58
|
-
left: `${
|
|
59
|
-
top: `${o
|
|
73
|
+
left: `${n + c}px`,
|
|
74
|
+
top: `${o + (s - o) / 2}px`,
|
|
75
|
+
transform: "translateY(-50%)"
|
|
60
76
|
};
|
|
61
77
|
}
|
|
62
78
|
});
|
|
63
|
-
function
|
|
64
|
-
|
|
79
|
+
function _() {
|
|
80
|
+
l.value = void 0;
|
|
65
81
|
}
|
|
66
|
-
return
|
|
82
|
+
return w({ reset: _ }), (e, t) => (f(), v("div", {
|
|
67
83
|
class: "container",
|
|
68
|
-
onClick: t[3] || (t[3] = (
|
|
84
|
+
onClick: t[3] || (t[3] = (o) => A())
|
|
69
85
|
}, [
|
|
70
|
-
|
|
86
|
+
x("img", P(a.image, {
|
|
71
87
|
ref: "image",
|
|
72
88
|
usemap: "#image-map",
|
|
73
|
-
onLoad: t[0] || (t[0] = (
|
|
89
|
+
onLoad: t[0] || (t[0] = (o) => y())
|
|
74
90
|
}), null, 16),
|
|
75
|
-
|
|
76
|
-
(
|
|
77
|
-
key:
|
|
78
|
-
shape:
|
|
79
|
-
coords: `${
|
|
80
|
-
onMouseenter: (
|
|
81
|
-
onMouseleave: t[1] || (t[1] = (
|
|
82
|
-
onClick:
|
|
83
|
-
}, null, 40,
|
|
91
|
+
x("map", U, [
|
|
92
|
+
(f(!0), v(W, null, j(h.value, (o, n) => (f(), v("area", {
|
|
93
|
+
key: n,
|
|
94
|
+
shape: o.shape,
|
|
95
|
+
coords: `${o.coords.x1},${o.coords.y1},${o.coords.x2},${o.coords.y2}`,
|
|
96
|
+
onMouseenter: (s) => z(n),
|
|
97
|
+
onMouseleave: t[1] || (t[1] = (s) => I()),
|
|
98
|
+
onClick: k((s) => M(n), ["stop"])
|
|
99
|
+
}, null, 40, V))), 128))
|
|
84
100
|
]),
|
|
85
|
-
|
|
101
|
+
O(x("div", {
|
|
86
102
|
class: "tooltip",
|
|
87
|
-
style:
|
|
88
|
-
onClick: t[2] || (t[2] =
|
|
103
|
+
style: L(S.value),
|
|
104
|
+
onClick: t[2] || (t[2] = k(() => {
|
|
89
105
|
}, ["stop"]))
|
|
90
|
-
},
|
|
91
|
-
[
|
|
106
|
+
}, F(u.value?.info), 5), [
|
|
107
|
+
[D, u.value]
|
|
92
108
|
])
|
|
93
109
|
]));
|
|
94
110
|
}
|
|
95
|
-
}),
|
|
96
|
-
|
|
111
|
+
}), Y = "*{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}", G = /* @__PURE__ */ q(X, [["styles", [Y]]]), b = T(G);
|
|
112
|
+
b.prototype.normalizeProps = (a) => ({
|
|
113
|
+
...a,
|
|
114
|
+
image: {
|
|
115
|
+
...a.image,
|
|
116
|
+
height: $(a.height),
|
|
117
|
+
width: $(a.width)
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
window.customElements.define("clickable-image", b);
|