@lystech/sections 0.5.0 → 0.6.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/editeur.js CHANGED
@@ -1,47 +1,47 @@
1
- import { jsx as e, jsxs as m, Fragment as ae } from "react/jsx-runtime";
2
- import { createRoot as se } from "react-dom/client";
3
- import { C as ge, s as ie } from "./morceaux/constantes-BPZxUYge.js";
4
- import { useState as M, useRef as j, useEffect as W, useCallback as X, useMemo as ne } from "react";
5
- function xe({
6
- jeton: o,
7
- site: t,
8
- apiBaseUrl: a,
9
- surJetonRefuse: r
1
+ import { jsx as t, jsxs as x, Fragment as ue } from "react/jsx-runtime";
2
+ import { createRoot as de } from "react-dom/client";
3
+ import { C as pe, s as fe } from "./morceaux/constantes-BPZxUYge.js";
4
+ import { useState as q, useRef as Q, useEffect as X, useCallback as Y, useMemo as se } from "react";
5
+ function Ce({
6
+ jeton: n,
7
+ site: e,
8
+ apiBaseUrl: o,
9
+ surJetonRefuse: s
10
10
  }) {
11
- const d = {
11
+ const a = {
12
12
  "Content-Type": "application/json",
13
- Authorization: "Bearer " + o
13
+ Authorization: "Bearer " + n
14
14
  };
15
- function s(n, u) {
16
- if (u && (n.status === 401 || n.status === 403) && r(), !n.ok) throw new Error(String(n.status));
15
+ function c(r, u) {
16
+ if (u && (r.status === 401 || r.status === 403) && s(), !r.ok) throw new Error(String(r.status));
17
17
  }
18
- async function l(n, u = !0) {
19
- const x = await fetch(a + n, {
20
- headers: u ? d : void 0
18
+ async function l(r, u = !0) {
19
+ const A = await fetch(o + r, {
20
+ headers: u ? a : void 0
21
21
  });
22
- return s(x, u), await x.json();
22
+ return c(A, u), await A.json();
23
23
  }
24
- async function g(n, u, x) {
25
- const v = await fetch(a + n, {
24
+ async function y(r, u, A) {
25
+ const S = await fetch(o + r, {
26
26
  method: u,
27
- headers: d,
28
- body: x === void 0 ? void 0 : JSON.stringify(x)
27
+ headers: a,
28
+ body: A === void 0 ? void 0 : JSON.stringify(A)
29
29
  });
30
- return s(v, !0), await v.json();
30
+ return c(S, !0), await S.json();
31
31
  }
32
32
  return {
33
33
  /** Les blocs que le site a déclaré savoir afficher. Route publique. */
34
- schemas: () => l("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
34
+ schemas: () => l("/site-sections/public/" + encodeURIComponent(e) + "/schemas", !1),
35
35
  /** Ce qui existe sur une page, brouillons compris. */
36
- pourPage: (n) => l("/site-sections?page=" + encodeURIComponent(n)),
37
- creer: (n, u, x) => g("/site-sections", "POST", { page: n, blockType: u, draft: x }),
38
- enregistrerBrouillon: (n, u) => g("/site-sections/" + n + "/draft", "PUT", { draft: u }),
39
- publier: (n) => g("/site-sections/" + n + "/publish", "POST"),
36
+ pourPage: (r) => l("/site-sections?page=" + encodeURIComponent(r)),
37
+ creer: (r, u, A) => y("/site-sections", "POST", { page: r, blockType: u, draft: A }),
38
+ enregistrerBrouillon: (r, u) => y("/site-sections/" + r + "/draft", "PUT", { draft: u }),
39
+ publier: (r) => y("/site-sections/" + r + "/publish", "POST"),
40
40
  /** Ramène le brouillon à ce qui est en ligne. */
41
- annuler: (n) => g("/site-sections/" + n + "/revert", "POST")
41
+ annuler: (r) => y("/site-sections/" + r + "/revert", "POST")
42
42
  };
43
43
  }
44
- const he = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAW+UlEQVR42u17aZBc13Xed859r7tnATAASYALqBQlxZZBmaTNRREtagw5VEWyxZJcNVOKHNslRaJlu0I5UbSXaziRUq54VWJbjlwpxrQtx5ph2TJN2YQpGRizxEUiBYjCwg0kABLrEBxgML29d+/58uPe190ARRAbE9vCLXTNYKan+/b3vvOd75xzH3B+nV/n1/l1fp1f59fJFikA5J/i1v/fb3piwuHQOgE2AatXE7OzBoDfz/yRd//sL1/wsY99bJmTl7kiU1OK8fEMU1P6/cOgqSnF9LS9duo33jg/vzDnDh/tqmEevtxDw87c2fYRxy2XdLnjwbvvOM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M1ZQFYuTszPlKD3bs8t6/t2fDlXTzhAgD/HG4Ln5lxmIy3IV394NdvmW+G95V/+cjl3DO/3DJ1zFEilAsawvNSFE8GX+wU7W5//bLw+EOzs+0BgVNMbJd/nreRk1LdsiCoqgsFSXXxwPDLh+r4eAb847td/NVjE2dcf24z4OgnJhzGp7KB++cF3+dLzoNwfp1f59f5dX6dX6/m+r8Cl0QchG1LcQAAAABJRU5ErkJggg==", Ee = {
45
45
  apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
46
46
  authDomain: "lystech.firebaseapp.com",
47
47
  projectId: "lystech",
@@ -49,22 +49,22 @@ const he = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
49
49
  messagingSenderId: "237347321732",
50
50
  appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
51
51
  };
52
- function Ae() {
53
- return /* @__PURE__ */ m("span", { className: "marque", children: [
54
- /* @__PURE__ */ e("img", { src: he, alt: "", width: 22, height: 22 }),
55
- /* @__PURE__ */ e("span", { className: "marque__mot", children: "Lystech" })
52
+ function Ne() {
53
+ return /* @__PURE__ */ x("span", { className: "marque", children: [
54
+ /* @__PURE__ */ t("img", { src: we, alt: "", width: 22, height: 22 }),
55
+ /* @__PURE__ */ t("span", { className: "marque__mot", children: "Lystech" })
56
56
  ] });
57
57
  }
58
- function ye() {
59
- return /* @__PURE__ */ m("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
60
- /* @__PURE__ */ e("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
61
- /* @__PURE__ */ e("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
62
- /* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
63
- /* @__PURE__ */ e("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
58
+ function Se() {
59
+ return /* @__PURE__ */ x("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
60
+ /* @__PURE__ */ t("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
61
+ /* @__PURE__ */ t("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
62
+ /* @__PURE__ */ t("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
63
+ /* @__PURE__ */ t("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
64
64
  ] });
65
65
  }
66
- function ke() {
67
- return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ e(
66
+ function Le() {
67
+ return /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ t(
68
68
  "path",
69
69
  {
70
70
  fill: "#fff",
@@ -72,15 +72,15 @@ function ke() {
72
72
  }
73
73
  ) });
74
74
  }
75
- function Ce({
76
- site: o,
77
- apiBaseUrl: t,
78
- methodes: a = ["google", "facebook"],
79
- surJeton: r,
80
- surFermer: d
75
+ function Te({
76
+ site: n,
77
+ apiBaseUrl: e,
78
+ methodes: o = ["google", "facebook"],
79
+ surJeton: s,
80
+ surFermer: a
81
81
  }) {
82
- const [s, l] = M({ nom: "repos" }), g = (v) => {
83
- switch (v) {
82
+ const [c, l] = q({ nom: "repos" }), y = (S) => {
83
+ switch (S) {
84
84
  case "auth/popup-blocked":
85
85
  return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
86
86
  case "auth/popup-closed-by-user":
@@ -95,32 +95,32 @@ function Ce({
95
95
  default:
96
96
  return "La connexion a échoué. Réessayez dans un instant.";
97
97
  }
98
- }, n = async (v, A = !1) => {
99
- const T = await fetch(t + "/site-sections/edit-login/third-party", {
98
+ }, r = async (S, N = !1) => {
99
+ const I = await fetch(e + "/site-sections/edit-login/third-party", {
100
100
  method: "POST",
101
101
  headers: { "Content-Type": "application/json" },
102
102
  body: JSON.stringify({
103
- site: o,
104
- token: v,
103
+ site: n,
104
+ token: S,
105
105
  tokenType: "firebase",
106
- demanderAcces: A
106
+ demanderAcces: N
107
107
  })
108
108
  });
109
- if (T.status === 429) {
109
+ if (I.status === 429) {
110
110
  l({
111
111
  nom: "erreur",
112
112
  texte: "Trop de tentatives. Réessayez dans quelques minutes."
113
113
  });
114
114
  return;
115
115
  }
116
- const y = await T.json().catch(() => null);
117
- if (y?.ok && y?.token) {
118
- r(y.token);
116
+ const L = await I.json().catch(() => null);
117
+ if (L?.ok && L?.token) {
118
+ s(L.token);
119
119
  return;
120
120
  }
121
- switch (y?.raison) {
121
+ switch (L?.raison) {
122
122
  case "sans_acces":
123
- l({ nom: "sans-acces", jeton: v });
123
+ l({ nom: "sans-acces", jeton: S });
124
124
  return;
125
125
  case "demande_envoyee":
126
126
  l({ nom: "demande-envoyee" });
@@ -146,85 +146,85 @@ function Ce({
146
146
  texte: "La connexion a échoué. Réessayez dans un instant."
147
147
  });
148
148
  }
149
- }, u = async (v) => {
150
- l({ nom: "envoi", quoi: v });
149
+ }, u = async (S) => {
150
+ l({ nom: "envoi", quoi: S });
151
151
  try {
152
- const [{ initializeApp: A, getApps: T }, y] = await Promise.all([
152
+ const [{ initializeApp: N, getApps: I }, L] = await Promise.all([
153
153
  import("./morceaux/index.esm-B4AB50RA.js"),
154
154
  import("./morceaux/index.esm-B4hL1FOE.js")
155
- ]), V = T().find((S) => S.name === "lystech-edition") ?? A(ve, "lystech-edition"), U = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), P = await (await y.signInWithPopup(y.getAuth(V), U)).user.getIdToken();
156
- await n(P);
157
- } catch (A) {
158
- l({ nom: "erreur", texte: g(String(A?.code ?? "")) });
155
+ ]), b = I().find((g) => g.name === "lystech-edition") ?? N(Ee, "lystech-edition"), M = S === "google" ? new L.GoogleAuthProvider() : new L.FacebookAuthProvider(), B = await (await L.signInWithPopup(L.getAuth(b), M)).user.getIdToken();
156
+ await r(B);
157
+ } catch (N) {
158
+ l({ nom: "erreur", texte: y(String(N?.code ?? "")) });
159
159
  }
160
- }, x = s.nom === "envoi";
161
- return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ m("div", { className: "fenetre", children: [
162
- /* @__PURE__ */ e(
160
+ }, A = c.nom === "envoi";
161
+ return /* @__PURE__ */ t("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ x("div", { className: "fenetre", children: [
162
+ /* @__PURE__ */ t(
163
163
  "button",
164
164
  {
165
165
  type: "button",
166
166
  className: "fenetre__fermer",
167
- onClick: d,
167
+ onClick: a,
168
168
  "aria-label": "Fermer",
169
169
  children: "✕"
170
170
  }
171
171
  ),
172
- /* @__PURE__ */ m("div", { className: "fenetre__tete", children: [
173
- /* @__PURE__ */ e(Ae, {}),
174
- /* @__PURE__ */ e("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
175
- /* @__PURE__ */ e("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
172
+ /* @__PURE__ */ x("div", { className: "fenetre__tete", children: [
173
+ /* @__PURE__ */ t(Ne, {}),
174
+ /* @__PURE__ */ t("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
175
+ /* @__PURE__ */ t("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
176
176
  ] }),
177
- /* @__PURE__ */ m("div", { className: "fenetre__corps", children: [
178
- s.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: s.texte }),
179
- s.nom === "aucun-compte" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
180
- s.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
181
- s.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
182
- s.nom === "sans-acces" ? /* @__PURE__ */ e(
177
+ /* @__PURE__ */ x("div", { className: "fenetre__corps", children: [
178
+ c.nom === "erreur" && /* @__PURE__ */ t("p", { className: "message message--erreur", children: c.texte }),
179
+ c.nom === "aucun-compte" && /* @__PURE__ */ t("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
180
+ c.nom === "sans-acces" && /* @__PURE__ */ t("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
181
+ c.nom === "demande-envoyee" && /* @__PURE__ */ t("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
182
+ c.nom === "sans-acces" ? /* @__PURE__ */ t(
183
183
  "button",
184
184
  {
185
185
  type: "button",
186
186
  className: "bouton bouton--principal bouton--large",
187
187
  onClick: () => {
188
- n(s.jeton, !0);
188
+ r(c.jeton, !0);
189
189
  },
190
190
  children: "Demander l'accès"
191
191
  }
192
- ) : s.nom === "demande-envoyee" || s.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
+ ) : c.nom === "demande-envoyee" || c.nom === "aucun-compte" ? /* @__PURE__ */ t(
193
193
  "button",
194
194
  {
195
195
  type: "button",
196
196
  className: "bouton bouton--large",
197
- onClick: d,
197
+ onClick: a,
198
198
  children: "Fermer"
199
199
  }
200
- ) : /* @__PURE__ */ m("div", { className: "fournisseurs", children: [
201
- a.includes("google") && /* @__PURE__ */ m(
200
+ ) : /* @__PURE__ */ x("div", { className: "fournisseurs", children: [
201
+ o.includes("google") && /* @__PURE__ */ x(
202
202
  "button",
203
203
  {
204
204
  type: "button",
205
205
  className: "fournisseur fournisseur--google",
206
- disabled: x,
206
+ disabled: A,
207
207
  onClick: () => {
208
208
  u("google");
209
209
  },
210
210
  children: [
211
- /* @__PURE__ */ e(ye, {}),
212
- /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
211
+ /* @__PURE__ */ t(Se, {}),
212
+ /* @__PURE__ */ t("span", { children: c.nom === "envoi" && c.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
213
213
  ]
214
214
  }
215
215
  ),
216
- a.includes("facebook") && /* @__PURE__ */ m(
216
+ o.includes("facebook") && /* @__PURE__ */ x(
217
217
  "button",
218
218
  {
219
219
  type: "button",
220
220
  className: "fournisseur fournisseur--facebook",
221
- disabled: x,
221
+ disabled: A,
222
222
  onClick: () => {
223
223
  u("facebook");
224
224
  },
225
225
  children: [
226
- /* @__PURE__ */ e(ke, {}),
227
- /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
226
+ /* @__PURE__ */ t(Le, {}),
227
+ /* @__PURE__ */ t("span", { children: c.nom === "envoi" && c.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
228
228
  ]
229
229
  }
230
230
  )
@@ -232,12 +232,12 @@ function Ce({
232
232
  ] })
233
233
  ] }) });
234
234
  }
235
- function Ne(o, t) {
236
- const a = o && typeof o == "object" && !Array.isArray(o) ? Object.keys(o).filter((d) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(d)) : [], r = t.slice(0, 2);
237
- return Array.from(/* @__PURE__ */ new Set([r, ...a]));
235
+ function De(n, e) {
236
+ const o = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], s = e.slice(0, 2);
237
+ return Array.from(/* @__PURE__ */ new Set([s, ...o]));
238
238
  }
239
- function we(o) {
240
- switch (o.type) {
239
+ function ze(n) {
240
+ switch (n.type) {
241
241
  case "number":
242
242
  return 0;
243
243
  case "boolean":
@@ -248,322 +248,472 @@ function we(o) {
248
248
  return "";
249
249
  }
250
250
  }
251
- function oe({ champ: o, valeur: t, changer: a }) {
252
- switch (o.type) {
251
+ function ie({ champ: n, valeur: e, changer: o }) {
252
+ switch (n.type) {
253
253
  case "richText":
254
- return /* @__PURE__ */ e(
254
+ return /* @__PURE__ */ t(
255
255
  "textarea",
256
256
  {
257
- value: String(t ?? ""),
258
- onChange: (r) => a(r.target.value)
257
+ value: String(e ?? ""),
258
+ onChange: (s) => o(s.target.value)
259
259
  }
260
260
  );
261
261
  case "number":
262
- return /* @__PURE__ */ e(
262
+ return /* @__PURE__ */ t(
263
263
  "input",
264
264
  {
265
265
  type: "number",
266
- value: t === "" || t == null ? "" : String(t),
267
- onChange: (r) => a(r.target.value === "" ? "" : Number(r.target.value))
266
+ value: e === "" || e == null ? "" : String(e),
267
+ onChange: (s) => o(s.target.value === "" ? "" : Number(s.target.value))
268
268
  }
269
269
  );
270
270
  case "boolean":
271
- return /* @__PURE__ */ m("label", { className: "bascule", children: [
272
- /* @__PURE__ */ e(
271
+ return /* @__PURE__ */ x("label", { className: "bascule", children: [
272
+ /* @__PURE__ */ t(
273
273
  "input",
274
274
  {
275
275
  type: "checkbox",
276
- checked: t === !0,
277
- onChange: (r) => a(r.target.checked)
276
+ checked: e === !0,
277
+ onChange: (s) => o(s.target.checked)
278
278
  }
279
279
  ),
280
- /* @__PURE__ */ e("span", { children: t === !0 ? "Oui" : "Non" })
280
+ /* @__PURE__ */ t("span", { children: e === !0 ? "Oui" : "Non" })
281
281
  ] });
282
282
  case "date":
283
- return /* @__PURE__ */ e(
283
+ return /* @__PURE__ */ t(
284
284
  "input",
285
285
  {
286
286
  type: "date",
287
- value: String(t ?? "").slice(0, 10),
288
- onChange: (r) => a(r.target.value)
287
+ value: String(e ?? "").slice(0, 10),
288
+ onChange: (s) => o(s.target.value)
289
289
  }
290
290
  );
291
291
  case "choice":
292
- return /* @__PURE__ */ m(
292
+ return /* @__PURE__ */ x(
293
293
  "select",
294
294
  {
295
- value: String(t ?? ""),
296
- onChange: (r) => a(r.target.value),
295
+ value: String(e ?? ""),
296
+ onChange: (s) => o(s.target.value),
297
297
  children: [
298
- /* @__PURE__ */ e("option", { value: "", children: "—" }),
299
- (o.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
298
+ /* @__PURE__ */ t("option", { value: "", children: "—" }),
299
+ (n.options ?? []).map((s) => /* @__PURE__ */ t("option", { value: s, children: s }, s))
300
300
  ]
301
301
  }
302
302
  );
303
303
  case "url":
304
- return /* @__PURE__ */ e(
304
+ return /* @__PURE__ */ t(
305
305
  "input",
306
306
  {
307
307
  type: "url",
308
- value: String(t ?? ""),
309
- onChange: (r) => a(r.target.value),
308
+ value: String(e ?? ""),
309
+ onChange: (s) => o(s.target.value),
310
310
  placeholder: "https://"
311
311
  }
312
312
  );
313
313
  case "image":
314
- return /* @__PURE__ */ m(ae, { children: [
315
- /* @__PURE__ */ e(
314
+ return /* @__PURE__ */ x(ue, { children: [
315
+ /* @__PURE__ */ t(
316
316
  "input",
317
317
  {
318
318
  type: "url",
319
- value: String(t ?? ""),
320
- onChange: (r) => a(r.target.value),
319
+ value: String(e ?? ""),
320
+ onChange: (s) => o(s.target.value),
321
321
  placeholder: "https://…"
322
322
  }
323
323
  ),
324
- String(t ?? "").startsWith("http") && /* @__PURE__ */ e("img", { className: "vignette", src: String(t), alt: "" })
324
+ String(e ?? "").startsWith("http") && /* @__PURE__ */ t("img", { className: "vignette", src: String(e), alt: "" })
325
325
  ] });
326
326
  default:
327
- return /* @__PURE__ */ e(
327
+ return /* @__PURE__ */ t(
328
328
  "input",
329
329
  {
330
330
  type: "text",
331
- value: String(t ?? ""),
332
- onChange: (r) => a(r.target.value)
331
+ value: String(e ?? ""),
332
+ onChange: (s) => o(s.target.value)
333
333
  }
334
334
  );
335
335
  }
336
336
  }
337
- function ce({ champ: o, valeur: t, changer: a, langue: r }) {
338
- if (o.type === "list") {
339
- const d = Array.isArray(t) ? t : [], s = o.of ?? [], l = (g, n, u) => {
340
- const x = d.map((v, A) => A === g ? { ...v, [n]: u } : v);
341
- a(x);
337
+ function me({ champ: n, valeur: e, changer: o, langue: s }) {
338
+ if (n.type === "list") {
339
+ const a = Array.isArray(e) ? e : [], c = n.of ?? [], l = (y, r, u) => {
340
+ const A = a.map((S, N) => N === y ? { ...S, [r]: u } : S);
341
+ o(A);
342
342
  };
343
- return /* @__PURE__ */ m("div", { className: "champ", children: [
344
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: o.label }),
345
- o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help }),
346
- d.map((g, n) => /* @__PURE__ */ m("div", { className: "liste__item", children: [
347
- /* @__PURE__ */ m("div", { className: "liste__tete", children: [
348
- /* @__PURE__ */ e("span", { className: "liste__rang", children: n + 1 }),
349
- /* @__PURE__ */ m("span", { style: { display: "flex", gap: 4 }, children: [
350
- /* @__PURE__ */ e(
343
+ return /* @__PURE__ */ x("div", { className: "champ", children: [
344
+ /* @__PURE__ */ t("span", { className: "champ__etiquette", children: n.label }),
345
+ n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help }),
346
+ a.map((y, r) => /* @__PURE__ */ x("div", { className: "liste__item", children: [
347
+ /* @__PURE__ */ x("div", { className: "liste__tete", children: [
348
+ /* @__PURE__ */ t("span", { className: "liste__rang", children: r + 1 }),
349
+ /* @__PURE__ */ x("span", { style: { display: "flex", gap: 4 }, children: [
350
+ /* @__PURE__ */ t(
351
351
  "button",
352
352
  {
353
353
  type: "button",
354
354
  className: "bouton bouton--icone bouton--discret",
355
355
  title: "Monter",
356
- disabled: n === 0,
356
+ disabled: r === 0,
357
357
  onClick: () => {
358
- const u = [...d];
359
- [u[n - 1], u[n]] = [u[n], u[n - 1]], a(u);
358
+ const u = [...a];
359
+ [u[r - 1], u[r]] = [u[r], u[r - 1]], o(u);
360
360
  },
361
361
  children: "↑"
362
362
  }
363
363
  ),
364
- /* @__PURE__ */ e(
364
+ /* @__PURE__ */ t(
365
365
  "button",
366
366
  {
367
367
  type: "button",
368
368
  className: "bouton bouton--icone bouton--discret",
369
369
  title: "Descendre",
370
- disabled: n === d.length - 1,
370
+ disabled: r === a.length - 1,
371
371
  onClick: () => {
372
- const u = [...d];
373
- [u[n], u[n + 1]] = [u[n + 1], u[n]], a(u);
372
+ const u = [...a];
373
+ [u[r], u[r + 1]] = [u[r + 1], u[r]], o(u);
374
374
  },
375
375
  children: "↓"
376
376
  }
377
377
  ),
378
- /* @__PURE__ */ e(
378
+ /* @__PURE__ */ t(
379
379
  "button",
380
380
  {
381
381
  type: "button",
382
382
  className: "bouton bouton--icone bouton--discret",
383
383
  title: "Retirer",
384
- onClick: () => a(d.filter((u, x) => x !== n)),
384
+ onClick: () => o(a.filter((u, A) => A !== r)),
385
385
  children: "✕"
386
386
  }
387
387
  )
388
388
  ] })
389
389
  ] }),
390
- s.map((u) => /* @__PURE__ */ e(
391
- ce,
390
+ c.map((u) => /* @__PURE__ */ t(
391
+ me,
392
392
  {
393
393
  champ: u,
394
- langue: r,
395
- valeur: g?.[u.key],
396
- changer: (x) => l(n, u.key, x)
394
+ langue: s,
395
+ valeur: y?.[u.key],
396
+ changer: (A) => l(r, u.key, A)
397
397
  },
398
398
  u.key
399
399
  ))
400
- ] }, n)),
401
- /* @__PURE__ */ e(
400
+ ] }, r)),
401
+ /* @__PURE__ */ t(
402
402
  "button",
403
403
  {
404
404
  type: "button",
405
405
  className: "bouton",
406
- onClick: () => a([
407
- ...d,
408
- Object.fromEntries(s.map((g) => [g.key, we(g)]))
406
+ onClick: () => o([
407
+ ...a,
408
+ Object.fromEntries(c.map((y) => [y.key, ze(y)]))
409
409
  ]),
410
410
  children: "+ Ajouter"
411
411
  }
412
412
  )
413
413
  ] });
414
414
  }
415
- if (o.localized) {
416
- const d = Ne(t, r), s = t && typeof t == "object" && !Array.isArray(t) ? t : {};
417
- return /* @__PURE__ */ m("div", { className: "champ", children: [
418
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: o.label }),
419
- o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help }),
420
- d.map((l) => /* @__PURE__ */ m("div", { style: { marginBottom: 8 }, children: [
421
- /* @__PURE__ */ e("span", { className: "champ__langue", children: l }),
422
- /* @__PURE__ */ e(
423
- oe,
415
+ if (n.localized) {
416
+ const a = De(e, s), c = e && typeof e == "object" && !Array.isArray(e) ? e : {};
417
+ return /* @__PURE__ */ x("div", { className: "champ", children: [
418
+ /* @__PURE__ */ t("span", { className: "champ__etiquette", children: n.label }),
419
+ n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help }),
420
+ a.map((l) => /* @__PURE__ */ x("div", { style: { marginBottom: 8 }, children: [
421
+ /* @__PURE__ */ t("span", { className: "champ__langue", children: l }),
422
+ /* @__PURE__ */ t(
423
+ ie,
424
424
  {
425
- champ: o,
426
- valeur: s[l],
427
- changer: (g) => a({ ...s, [l]: g })
425
+ champ: n,
426
+ valeur: c[l],
427
+ changer: (y) => o({ ...c, [l]: y })
428
428
  }
429
429
  )
430
430
  ] }, l))
431
431
  ] });
432
432
  }
433
- return /* @__PURE__ */ m("div", { className: "champ", children: [
434
- /* @__PURE__ */ e("label", { className: "champ__etiquette", children: o.label }),
435
- /* @__PURE__ */ e(oe, { champ: o, valeur: t, changer: a }),
436
- o.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: o.help })
433
+ return /* @__PURE__ */ x("div", { className: "champ", children: [
434
+ /* @__PURE__ */ t("label", { className: "champ__etiquette", children: n.label }),
435
+ /* @__PURE__ */ t(ie, { champ: n, valeur: e, changer: o }),
436
+ n.help && /* @__PURE__ */ t("p", { className: "champ__aide", children: n.help })
437
437
  ] });
438
438
  }
439
- const Ee = ["lystech-editeur-hote", "lystech-connexion-hote"];
440
- function Se(o, t) {
441
- const a = /* @__PURE__ */ new Map();
442
- for (const [r, d] of Object.entries(o))
443
- for (const [s, l] of Object.entries(d)) {
444
- const g = String(l ?? "").trim();
445
- if (g.length < 2 || g.includes("{{") || !t(r, s)) continue;
446
- const n = a.get(g);
447
- n ? n.push({ ns: r, chemin: s }) : a.set(g, [{ ns: r, chemin: s }]);
439
+ const be = "data-lystech-champ", _e = ["lystech-editeur-hote", "lystech-connexion-hote"], Oe = ["number", "text", "url", "date"], Pe = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;";
440
+ function te(n) {
441
+ if (!(n instanceof Element)) return null;
442
+ const e = n.closest(`[${be}]`);
443
+ return !e || e.closest("." + pe) || _e.some((o) => e.closest("#" + o)) ? null : e;
444
+ }
445
+ function ce(n) {
446
+ const e = n.getAttribute(be) ?? "", o = e.lastIndexOf(":");
447
+ return o <= 0 || o === e.length - 1 ? null : { blockType: e.slice(0, o), champ: e.slice(o + 1) };
448
+ }
449
+ function ne(n) {
450
+ const e = n.dataset.lysStyleAvant;
451
+ e !== void 0 && (delete n.dataset.lysStyleAvant, e ? n.setAttribute("style", e) : n.removeAttribute("style"));
452
+ }
453
+ function Ie(n, e) {
454
+ if (n === "number") {
455
+ const o = e.replace(/\s/g, "").replace(",", "."), s = Number(o);
456
+ return o === "" || !Number.isFinite(s) ? { ok: !1, erreur: "Un nombre, en chiffres — par exemple 85 ou 85,50." } : { ok: !0, valeur: s };
457
+ }
458
+ return { ok: !0, valeur: e.trim() };
459
+ }
460
+ function Me({
461
+ actif: n,
462
+ lire: e,
463
+ enregistrer: o,
464
+ ouvrirPanneau: s
465
+ }) {
466
+ const [a, c] = q(null), l = Q(null), y = Q(1), r = Q(null), u = Q(null), A = Q({ lire: e, enregistrer: o, ouvrirPanneau: s });
467
+ A.current = { lire: e, enregistrer: o, ouvrirPanneau: s }, X(() => {
468
+ if (!n) {
469
+ c(null);
470
+ return;
471
+ }
472
+ const b = /* @__PURE__ */ new Set(), M = (v) => {
473
+ const h = te(v.target);
474
+ if (!h) return;
475
+ const z = ce(h);
476
+ !z || !A.current.lire(z.blockType, z.champ) || (h.dataset.lysStyleAvant === void 0 && (h.dataset.lysStyleAvant = h.getAttribute("style") ?? ""), h.setAttribute("style", h.dataset.lysStyleAvant + Pe), b.add(h));
477
+ }, D = (v) => {
478
+ const h = te(v.target);
479
+ if (!h) return;
480
+ const z = v.relatedTarget;
481
+ z instanceof Node && h.contains(z) || (ne(h), b.delete(h));
482
+ }, B = (v) => {
483
+ const h = te(v.target);
484
+ if (!h) return;
485
+ const z = ce(h);
486
+ if (!z) return;
487
+ const R = A.current.lire(z.blockType, z.champ);
488
+ if (!R) return;
489
+ if (v.preventDefault(), v.stopPropagation(), ne(h), b.delete(h), !Oe.includes(R.type)) {
490
+ A.current.ouvrirPanneau(z.blockType);
491
+ return;
492
+ }
493
+ const d = getComputedStyle(h);
494
+ c({
495
+ jeton: y.current++,
496
+ ...z,
497
+ info: R,
498
+ el: h,
499
+ rect: h.getBoundingClientRect(),
500
+ police: {
501
+ fontFamily: d.fontFamily,
502
+ fontSize: d.fontSize,
503
+ fontWeight: d.fontWeight,
504
+ letterSpacing: d.letterSpacing
505
+ },
506
+ texte: R.valeur == null ? "" : String(R.valeur),
507
+ erreur: null,
508
+ envoi: !1
509
+ });
510
+ }, g = () => c((v) => v && { ...v, rect: v.el.getBoundingClientRect() });
511
+ return document.addEventListener("mouseover", M, !0), document.addEventListener("mouseout", D, !0), document.addEventListener("click", B, !0), window.addEventListener("scroll", g, { capture: !0, passive: !0 }), window.addEventListener("resize", g), () => {
512
+ document.removeEventListener("mouseover", M, !0), document.removeEventListener("mouseout", D, !0), document.removeEventListener("click", B, !0), window.removeEventListener("scroll", g, { capture: !0 }), window.removeEventListener("resize", g);
513
+ for (const v of b) ne(v);
514
+ };
515
+ }, [n]);
516
+ const S = a?.jeton;
517
+ if (X(() => {
518
+ S != null && (l.current?.focus(), l.current?.select());
519
+ }, [S]), !a) return null;
520
+ const N = (b) => c((M) => M && M.jeton === b ? null : M);
521
+ async function I(b) {
522
+ if (r.current === b.jeton || u.current === b.jeton) return;
523
+ const M = b.info.valeur == null ? "" : String(b.info.valeur);
524
+ if (b.texte.trim() === M.trim()) {
525
+ N(b.jeton);
526
+ return;
527
+ }
528
+ const D = Ie(b.info.type, b.texte);
529
+ if (!D.ok) {
530
+ c((g) => g && g.jeton === b.jeton ? { ...g, erreur: D.erreur } : g);
531
+ return;
532
+ }
533
+ c((g) => g && g.jeton === b.jeton ? { ...g, envoi: !0, erreur: null } : g), r.current = b.jeton;
534
+ let B = !1;
535
+ try {
536
+ B = await A.current.enregistrer(b.blockType, b.champ, D.valeur);
537
+ } finally {
538
+ r.current = null;
539
+ }
540
+ B ? N(b.jeton) : c(
541
+ (g) => g && g.jeton === b.jeton ? { ...g, envoi: !1, erreur: "Enregistrement impossible — la valeur en ligne n'a pas changé." } : g
542
+ );
543
+ }
544
+ const L = Math.max(a.rect.width + 40, 110);
545
+ return /* @__PURE__ */ x(
546
+ "form",
547
+ {
548
+ className: "saisie",
549
+ style: { top: a.rect.top - 28, left: a.rect.left - 8 },
550
+ onSubmit: (b) => {
551
+ b.preventDefault(), I(a);
552
+ },
553
+ children: [
554
+ /* @__PURE__ */ t("span", { className: "saisie__libelle", children: a.info.libelle }),
555
+ /* @__PURE__ */ t(
556
+ "input",
557
+ {
558
+ ref: l,
559
+ className: "saisie__champ",
560
+ style: { ...a.police, width: L },
561
+ value: a.texte,
562
+ inputMode: a.info.type === "number" ? "decimal" : void 0,
563
+ disabled: a.envoi,
564
+ "aria-label": a.info.libelle,
565
+ onChange: (b) => {
566
+ const M = b.target.value;
567
+ c((D) => D && { ...D, texte: M, erreur: null });
568
+ },
569
+ onKeyDown: (b) => {
570
+ if (b.key === "Enter") {
571
+ b.preventDefault(), I(a);
572
+ return;
573
+ }
574
+ b.key === "Escape" && (b.preventDefault(), u.current = a.jeton, N(a.jeton));
575
+ },
576
+ onBlur: () => {
577
+ I(a);
578
+ }
579
+ }
580
+ ),
581
+ a.erreur ? /* @__PURE__ */ t("span", { className: "saisie__erreur", children: a.erreur }) : /* @__PURE__ */ t("span", { className: "saisie__aide", children: "Entrée pour enregistrer · Échap pour annuler" })
582
+ ]
583
+ }
584
+ );
585
+ }
586
+ const Be = ["lystech-editeur-hote", "lystech-connexion-hote"];
587
+ function qe(n, e) {
588
+ const o = /* @__PURE__ */ new Map();
589
+ for (const [s, a] of Object.entries(n))
590
+ for (const [c, l] of Object.entries(a)) {
591
+ const y = String(l ?? "").trim();
592
+ if (y.length < 2 || y.includes("{{")) continue;
593
+ const r = e(s, c);
594
+ if (r <= 0) continue;
595
+ const u = o.get(y);
596
+ u ? u.push({ ns: s, chemin: c, rang: r }) : o.set(y, [{ ns: s, chemin: c, rang: r }]);
448
597
  }
449
- return a;
450
- }
451
- function De(o) {
452
- const t = /* @__PURE__ */ new Map(), a = document.body.querySelectorAll("*");
453
- for (const r of a) {
454
- if (Ee.some((l) => r.id === l || r.closest("#" + l)) || r.closest("." + ge) || r.children.length > 0) continue;
455
- const d = (r.textContent ?? "").trim();
456
- if (d.length < 2) continue;
457
- const s = o.get(d);
458
- s && t.set(r, { valeur: d, candidats: s });
598
+ return o;
599
+ }
600
+ function Ue(n) {
601
+ const e = /* @__PURE__ */ new Map(), o = document.body.querySelectorAll("*");
602
+ for (const s of o) {
603
+ if (Be.some((l) => s.id === l || s.closest("#" + l)) || s.closest("." + pe) || s.closest("[data-lystech-champ]") || s.children.length > 0) continue;
604
+ const a = (s.textContent ?? "").trim();
605
+ if (a.length < 2) continue;
606
+ const c = n.get(a);
607
+ c && e.set(s, { valeur: a, candidats: c });
459
608
  }
460
- return t;
609
+ return e;
461
610
  }
462
- function ze({
463
- source: o,
464
- actif: t,
465
- modifiable: a,
466
- surModification: r
611
+ function je({
612
+ source: n,
613
+ actif: e,
614
+ pertinence: o,
615
+ surModification: s
467
616
  }) {
468
- const d = j(/* @__PURE__ */ new Map()), s = j(null), [l, g] = M(null), n = j(o);
469
- n.current = o;
470
- const u = j(r);
471
- u.current = r;
472
- const x = j(a);
473
- x.current = a;
474
- const v = j(null);
475
- return W(() => {
476
- if (!t) return;
477
- const A = () => {
478
- const p = n.current, i = Se(
479
- p.dictionnaire(p.langueCourante()),
480
- x.current
617
+ const a = Q(/* @__PURE__ */ new Map()), c = Q(null), [l, y] = q(null), r = Q(n);
618
+ r.current = n;
619
+ const u = Q(s);
620
+ u.current = s;
621
+ const A = Q(o);
622
+ A.current = o;
623
+ const S = Q(null);
624
+ return X(() => {
625
+ if (!e) return;
626
+ const N = () => {
627
+ const d = r.current, p = qe(
628
+ d.dictionnaire(d.langueCourante()),
629
+ A.current
481
630
  );
482
- d.current = De(i);
631
+ a.current = Ue(p);
483
632
  };
484
- v.current = A, A();
485
- let T;
486
- const y = new MutationObserver(() => {
487
- s.current || (clearTimeout(T), T = setTimeout(A, 250));
633
+ S.current = N, N();
634
+ let I;
635
+ const L = new MutationObserver(() => {
636
+ c.current || (clearTimeout(I), I = setTimeout(N, 250));
488
637
  });
489
- y.observe(document.body, { childList: !0, subtree: !0 });
490
- const V = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", U = (p) => {
491
- const i = p.target;
492
- !(i instanceof HTMLElement) || s.current || d.current.has(i) && (i.dataset.lysStyleAvant || (i.dataset.lysStyleAvant = i.getAttribute("style") ?? ""), i.setAttribute(
638
+ L.observe(document.body, { childList: !0, subtree: !0 });
639
+ const b = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", M = (d) => {
640
+ const p = d.target;
641
+ !(p instanceof HTMLElement) || c.current || a.current.has(p) && (p.dataset.lysStyleAvant || (p.dataset.lysStyleAvant = p.getAttribute("style") ?? ""), p.setAttribute(
493
642
  "style",
494
- (i.dataset.lysStyleAvant ?? "") + V
643
+ (p.dataset.lysStyleAvant ?? "") + b
495
644
  ));
496
- }, I = (p) => {
497
- const i = p.target;
498
- if (!(i instanceof HTMLElement) || s.current?.el === i || i.dataset.lysStyleAvant === void 0) return;
499
- const h = i.dataset.lysStyleAvant;
500
- delete i.dataset.lysStyleAvant, h ? i.setAttribute("style", h) : i.removeAttribute("style");
501
- }, P = (p, i) => {
502
- const h = p.getAttribute("style") ?? "";
503
- s.current = {
504
- el: p,
505
- avant: (p.textContent ?? "").trim(),
506
- ns: i.ns,
507
- chemin: i.chemin,
508
- styleAvant: p.dataset.lysStyleAvant ?? h
509
- }, p.setAttribute("contenteditable", "plaintext-only"), p.setAttribute(
645
+ }, D = (d) => {
646
+ const p = d.target;
647
+ if (!(p instanceof HTMLElement) || c.current?.el === p || p.dataset.lysStyleAvant === void 0) return;
648
+ const w = p.dataset.lysStyleAvant;
649
+ delete p.dataset.lysStyleAvant, w ? p.setAttribute("style", w) : p.removeAttribute("style");
650
+ }, B = (d, p) => {
651
+ const w = d.getAttribute("style") ?? "";
652
+ c.current = {
653
+ el: d,
654
+ avant: (d.textContent ?? "").trim(),
655
+ ns: p.ns,
656
+ chemin: p.chemin,
657
+ styleAvant: d.dataset.lysStyleAvant ?? w
658
+ }, d.setAttribute("contenteditable", "plaintext-only"), d.setAttribute(
510
659
  "style",
511
- (p.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
512
- ), p.focus();
513
- const Q = window.getSelection(), q = document.createRange();
514
- q.selectNodeContents(p), Q?.removeAllRanges(), Q?.addRange(q);
515
- }, S = async (p) => {
516
- const i = s.current;
517
- if (!i) return;
518
- s.current = null;
519
- const h = (i.el.textContent ?? "").trim();
520
- i.el.removeAttribute("contenteditable");
521
- const Q = i.el.dataset.lysStyleAvant;
522
- if (delete i.el.dataset.lysStyleAvant, Q ? i.el.setAttribute("style", Q) : i.el.removeAttribute("style"), p || h === i.avant) {
523
- p && (i.el.textContent = i.avant);
660
+ (d.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
661
+ ), d.focus();
662
+ const F = window.getSelection(), U = document.createRange();
663
+ U.selectNodeContents(d), F?.removeAllRanges(), F?.addRange(U);
664
+ }, g = async (d) => {
665
+ const p = c.current;
666
+ if (!p) return;
667
+ c.current = null;
668
+ const w = (p.el.textContent ?? "").trim();
669
+ p.el.removeAttribute("contenteditable");
670
+ const F = p.el.dataset.lysStyleAvant;
671
+ if (delete p.el.dataset.lysStyleAvant, F ? p.el.setAttribute("style", F) : p.el.removeAttribute("style"), d || w === p.avant) {
672
+ d && (p.el.textContent = p.avant);
524
673
  return;
525
674
  }
526
- const q = n.current.langueCourante();
527
- n.current.poser(q, i.ns, i.chemin, h), await u.current(i.ns, i.chemin, q, h);
528
- }, D = (p) => {
529
- const i = p.target;
530
- if (!(i instanceof HTMLElement)) return;
531
- if (s.current) {
532
- if (s.current.el === i) return;
533
- S(!1);
675
+ const U = r.current.langueCourante();
676
+ r.current.poser(U, p.ns, p.chemin, w), await u.current(p.ns, p.chemin, U, w);
677
+ }, v = (d) => {
678
+ const p = d.target;
679
+ if (!(p instanceof HTMLElement)) return;
680
+ if (c.current) {
681
+ if (c.current.el === p) return;
682
+ g(!1);
534
683
  }
535
- const h = d.current.get(i);
536
- if (h) {
537
- if (p.preventDefault(), p.stopPropagation(), h.candidats.length === 1) {
538
- P(i, h.candidats[0]);
539
- return;
540
- }
541
- g({
542
- el: i,
543
- candidats: h.candidats,
544
- x: p.clientX,
545
- y: p.clientY
546
- });
684
+ const w = a.current.get(p);
685
+ if (!w) return;
686
+ d.preventDefault(), d.stopPropagation();
687
+ const F = Math.max(...w.candidats.map((Z) => Z.rang)), U = w.candidats.filter((Z) => Z.rang === F);
688
+ if (U.length === 1) {
689
+ B(p, U[0]);
690
+ return;
547
691
  }
548
- }, L = (p) => {
549
- s.current && (p.key === "Escape" ? (p.preventDefault(), S(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), S(!1)));
550
- }, _ = () => {
551
- s.current && S(!1);
692
+ y({
693
+ el: p,
694
+ candidats: U,
695
+ x: d.clientX,
696
+ y: d.clientY
697
+ });
698
+ }, h = (d) => {
699
+ c.current && (d.key === "Escape" ? (d.preventDefault(), g(!0)) : d.key === "Enter" && !d.shiftKey && (d.preventDefault(), g(!1)));
700
+ }, z = () => {
701
+ c.current && g(!1);
552
702
  };
553
- document.addEventListener("mouseover", U, !0), document.addEventListener("mouseout", I, !0), document.addEventListener("click", D, !0);
554
- const Z = (p) => {
555
- if (!s.current) return;
556
- const i = p.inputType;
557
- (i === "insertParagraph" || i === "insertLineBreak") && (p.preventDefault(), S(!1));
703
+ document.addEventListener("mouseover", M, !0), document.addEventListener("mouseout", D, !0), document.addEventListener("click", v, !0);
704
+ const R = (d) => {
705
+ if (!c.current) return;
706
+ const p = d.inputType;
707
+ (p === "insertParagraph" || p === "insertLineBreak") && (d.preventDefault(), g(!1));
558
708
  };
559
- return document.addEventListener("beforeinput", Z, !0), document.addEventListener("keydown", L, !0), document.addEventListener("focusout", _, !0), window.__lysChoisir = (p, i) => {
560
- g(null), P(i, p);
709
+ return document.addEventListener("beforeinput", R, !0), document.addEventListener("keydown", h, !0), document.addEventListener("focusout", z, !0), window.__lysChoisir = (d, p) => {
710
+ y(null), B(p, d);
561
711
  }, () => {
562
- v.current = null, clearTimeout(T), y.disconnect(), document.removeEventListener("mouseover", U, !0), document.removeEventListener("mouseout", I, !0), document.removeEventListener("click", D, !0), document.removeEventListener("beforeinput", Z, !0), document.removeEventListener("keydown", L, !0), document.removeEventListener("focusout", _, !0), s.current && S(!0), delete window.__lysChoisir;
712
+ S.current = null, clearTimeout(I), L.disconnect(), document.removeEventListener("mouseover", M, !0), document.removeEventListener("mouseout", D, !0), document.removeEventListener("click", v, !0), document.removeEventListener("beforeinput", R, !0), document.removeEventListener("keydown", h, !0), document.removeEventListener("focusout", z, !0), c.current && g(!0), delete window.__lysChoisir;
563
713
  };
564
- }, [t]), W(() => {
565
- s.current || v.current?.();
566
- }, [a]), l ? /* @__PURE__ */ m(
714
+ }, [e]), X(() => {
715
+ c.current || S.current?.();
716
+ }, [o]), l ? /* @__PURE__ */ x(
567
717
  "div",
568
718
  {
569
719
  className: "choix",
@@ -572,27 +722,27 @@ function ze({
572
722
  left: Math.min(l.x, window.innerWidth - 280)
573
723
  },
574
724
  children: [
575
- /* @__PURE__ */ e("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
576
- /* @__PURE__ */ e("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
577
- l.candidats.map((A) => /* @__PURE__ */ m(
725
+ /* @__PURE__ */ t("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
726
+ /* @__PURE__ */ t("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
727
+ l.candidats.map((N) => /* @__PURE__ */ x(
578
728
  "button",
579
729
  {
580
730
  type: "button",
581
731
  className: "choix__option",
582
- onClick: () => window.__lysChoisir?.(A, l.el),
732
+ onClick: () => window.__lysChoisir?.(N, l.el),
583
733
  children: [
584
- /* @__PURE__ */ e("span", { className: "choix__chemin", children: A.chemin }),
585
- /* @__PURE__ */ e("span", { className: "choix__ns", children: A.ns })
734
+ /* @__PURE__ */ t("span", { className: "choix__chemin", children: N.chemin }),
735
+ /* @__PURE__ */ t("span", { className: "choix__ns", children: N.ns })
586
736
  ]
587
737
  },
588
- A.ns + ":" + A.chemin
738
+ N.ns + ":" + N.chemin
589
739
  )),
590
- /* @__PURE__ */ e(
740
+ /* @__PURE__ */ t(
591
741
  "button",
592
742
  {
593
743
  type: "button",
594
744
  className: "bouton bouton--discret",
595
- onClick: () => g(null),
745
+ onClick: () => y(null),
596
746
  children: "Annuler"
597
747
  }
598
748
  )
@@ -600,346 +750,406 @@ function ze({
600
750
  }
601
751
  ) : null;
602
752
  }
603
- const H = /^i18n:([^:]+):(.*)$/, ee = "commun", te = "lystech-edit-mode";
604
- function re(o, t) {
605
- return JSON.stringify(o ?? {}) === JSON.stringify(t ?? {});
753
+ const H = /^i18n:([^:]+):(.*)$/, re = "commun", oe = "lystech-edit-mode";
754
+ function le(n, e) {
755
+ return JSON.stringify(n ?? {}) === JSON.stringify(e ?? {});
606
756
  }
607
- function Te({ api: o, pont: t }) {
608
- const [a, r] = M([]), [d, s] = M([]), [l, g] = M(t.page), [n, u] = M(null), [x, v] = M({}), [A, T] = M(!1), [y, V] = M(() => {
757
+ function Qe({ api: n, pont: e }) {
758
+ const [o, s] = q([]), [a, c] = q([]), [l, y] = q(e.page), [r, u] = q(null), [A, S] = q({}), [N, I] = q(!1), [L, b] = q(() => {
609
759
  try {
610
- return window.localStorage.getItem(te) === "circuler" ? "circuler" : "modifier";
760
+ return window.localStorage.getItem(oe) === "circuler" ? "circuler" : "modifier";
611
761
  } catch {
612
762
  return "modifier";
613
763
  }
614
- }), U = () => V((c) => {
615
- const f = c === "modifier" ? "circuler" : "modifier";
764
+ }), M = () => b((i) => {
765
+ const f = i === "modifier" ? "circuler" : "modifier";
616
766
  try {
617
- window.localStorage.setItem(te, f);
767
+ window.localStorage.setItem(oe, f);
618
768
  } catch {
619
769
  }
620
770
  return f;
621
- }), [I, P] = M(!1), [S, D] = M(
771
+ }), [D, B] = q(!1), [g, v] = q(
622
772
  null
623
773
  );
624
- W(() => (t.surChangementDePage = (c) => {
625
- g(c), u(null), T(!1);
774
+ X(() => (e.surChangementDePage = (i) => {
775
+ y(i), u(null), I(!1);
626
776
  }, () => {
627
- t.surChangementDePage = void 0;
628
- }), [t]);
629
- const L = X(async () => {
777
+ e.surChangementDePage = void 0;
778
+ }), [e]);
779
+ const h = Y(async () => {
630
780
  try {
631
- const [c, f] = await Promise.all([
632
- o.pourPage(l),
633
- l === ee ? Promise.resolve([]) : o.pourPage(ee)
634
- ]), b = [...c, ...f];
635
- return s(b), b;
781
+ const [i, f] = await Promise.all([
782
+ n.pourPage(l),
783
+ l === re ? Promise.resolve([]) : n.pourPage(re)
784
+ ]), m = [...i, ...f];
785
+ return c(m), m;
636
786
  } catch {
637
- return D({
787
+ return v({
638
788
  ton: "erreur",
639
789
  texte: "Impossible de lire le contenu du site."
640
790
  }), [];
641
791
  }
642
- }, [o, l]);
643
- W(() => {
644
- o.schemas().then(r).catch(() => r([]));
645
- }, [o]), W(() => {
646
- L();
647
- }, [L]);
648
- const _ = X(
649
- (c, f) => {
650
- let b = null, k = -1;
651
- for (const C of a) {
652
- const N = H.exec(C.blockType);
653
- if (!N || N[1] !== c) continue;
654
- const w = N[2];
655
- (w === "" || f === w || f.startsWith(w + ".")) && w.length > k && (b = C, k = w.length);
792
+ }, [n, l]);
793
+ X(() => {
794
+ n.schemas().then(s).catch(() => s([]));
795
+ }, [n]), X(() => {
796
+ h();
797
+ }, [h]);
798
+ const z = Y(
799
+ (i, f) => {
800
+ let m = null, k = -1;
801
+ for (const O of o) {
802
+ const C = H.exec(O.blockType);
803
+ if (!C || C[1] !== i) continue;
804
+ const E = C[2];
805
+ (E === "" || f === E || f.startsWith(E + ".")) && E.length > k && (m = O, k = E.length);
656
806
  }
657
- if (!b) return null;
658
- const E = H.exec(b.blockType)?.[2] ?? "", O = E ? f.slice(E.length + 1) : f;
659
- return { bloc: b, champ: O };
807
+ if (!m) return null;
808
+ const T = H.exec(m.blockType)?.[2] ?? "", _ = T ? f.slice(T.length + 1) : f;
809
+ return { bloc: m, champ: _ };
660
810
  },
661
- [a]
662
- ), Z = X(
663
- (c, f) => _(c, f) !== null,
664
- [_]
665
- ), p = X(
666
- (c) => a.find((f) => f.blockType === c),
667
- [a]
668
- ), i = ne(
669
- () => a.filter((c) => {
670
- const f = c.pages ?? [];
671
- return f.includes(l) || f.includes(ee);
811
+ [o]
812
+ ), R = Y(
813
+ (i, f) => {
814
+ const m = z(i, f);
815
+ return m ? (m.bloc.pages ?? []).includes(l) ? 2 : 1 : 0;
816
+ },
817
+ [z, l]
818
+ ), d = Y(
819
+ (i) => o.find((f) => f.blockType === i),
820
+ [o]
821
+ ), p = se(
822
+ () => o.filter((i) => {
823
+ const f = i.pages ?? [];
824
+ return f.includes(l) || f.includes(re);
672
825
  }),
673
- [a, l]
674
- ), h = ne(
675
- () => d.filter((c) => c.draft && !re(c.draft, c.data)),
676
- [d]
677
- ), Q = X(
678
- async (c, f, b, k) => {
679
- const E = _(c, f);
680
- if (!E) {
681
- D({
826
+ [o, l]
827
+ ), w = se(
828
+ () => a.filter((i) => i.draft && !le(i.draft, i.data)),
829
+ [a]
830
+ );
831
+ X(() => {
832
+ if (w.length === 0) return;
833
+ for (const m of w)
834
+ H.test(m.blockType) || e.poserApercu(m.blockType, m.draft);
835
+ const i = w.filter((m) => H.test(m.blockType)), f = e.sourceTexte;
836
+ i.length && f && import("./morceaux/sourceTexte-BMPMpNg9.js").then(
837
+ ({ appliquerAuxTextes: m }) => m(
838
+ i.map((k) => ({ blockType: k.blockType, data: k.draft })),
839
+ f
840
+ )
841
+ );
842
+ }, [w, e]);
843
+ const F = Y(
844
+ async (i, f, m, k) => {
845
+ const T = z(i, f);
846
+ if (!T) {
847
+ v({
682
848
  ton: "erreur",
683
- texte: `Ce texte (${c}:${f}) n'appartient à aucun bloc déclaré.`
849
+ texte: `Ce texte (${i}:${f}) n'appartient à aucun bloc déclaré.`
684
850
  });
685
851
  return;
686
852
  }
687
- const O = d.find((z) => z.blockType === E.bloc.blockType), C = O?.draft ?? O?.data ?? {}, N = C[E.champ], w = E.bloc.fields.find((z) => z.key === E.champ), B = (
853
+ const _ = a.find((P) => P.blockType === T.bloc.blockType), O = _?.draft ?? _?.data ?? {}, C = O[T.champ], E = T.bloc.fields.find((P) => P.key === T.champ), j = (
688
854
  /* `!declare.localized` et non `=== false` : un champ non traduit
689
855
  OMET la cle plutot que de la mettre a faux. Tester l'egalite
690
856
  stricte ne se declenchait donc jamais. */
691
- w && !w.localized ? k : N && typeof N == "object" && !Array.isArray(N) ? { ...N, [b]: k } : { [b]: k }
692
- ), G = { ...C, [E.champ]: B };
857
+ E && !E.localized ? k : C && typeof C == "object" && !Array.isArray(C) ? { ...C, [m]: k } : { [m]: k }
858
+ ), V = { ...O, [T.champ]: j };
693
859
  try {
694
- if (O?.UID)
695
- await o.enregistrerBrouillon(O.UID, G);
860
+ if (_?.UID)
861
+ await n.enregistrerBrouillon(_.UID, V);
696
862
  else {
697
- const z = E.bloc.pages?.[0] ?? l;
698
- await o.creer(z, E.bloc.blockType, G);
863
+ const P = T.bloc.pages?.[0] ?? l;
864
+ await n.creer(P, T.bloc.blockType, V);
699
865
  }
700
- await L(), D(null);
866
+ await h(), v(null);
701
867
  } catch {
702
- D({
868
+ v({
703
869
  ton: "erreur",
704
870
  texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
705
871
  });
706
872
  }
707
873
  },
708
- [o, _, l, L, d]
709
- ), q = async () => {
710
- if (!h.length) return;
711
- P(!0), D(null);
712
- const c = h.length;
874
+ [n, z, l, h, a]
875
+ ), U = Y(
876
+ (i, f) => {
877
+ const m = d(i), k = m?.fields.find((E) => E.key === f);
878
+ if (!m || !k) return null;
879
+ const T = a.find((E) => E.blockType === i);
880
+ let C = {
881
+ ...e.replis?.[i] ?? {},
882
+ ...T?.data ?? {},
883
+ ...T?.draft ?? {}
884
+ }[f];
885
+ return k.localized && C && typeof C == "object" && !Array.isArray(C) && (C = C[e.langue]), { libelle: k.label, type: k.type, valeur: C };
886
+ },
887
+ [d, a, e]
888
+ ), Z = Y(
889
+ async (i, f, m) => {
890
+ const k = d(i), T = k?.fields.find((P) => P.key === f);
891
+ if (!k || !T) return !1;
892
+ const _ = a.find((P) => P.blockType === i), C = {
893
+ ...e.replis?.[i] ?? {},
894
+ ..._?.data ?? {},
895
+ ..._?.draft ?? {}
896
+ }, E = C[f], j = T.localized ? {
897
+ ...E && typeof E == "object" && !Array.isArray(E) ? E : {},
898
+ [e.langue]: m
899
+ } : m, V = { ...C, [f]: j };
900
+ try {
901
+ return _?.UID ? await n.enregistrerBrouillon(_.UID, V) : await n.creer(k.pages?.[0] ?? l, i, V), await h(), e.poserApercu(i, V), v(null), !0;
902
+ } catch {
903
+ return v({
904
+ ton: "erreur",
905
+ texte: "Enregistrement impossible. La valeur en ligne n'a pas changé."
906
+ }), !1;
907
+ }
908
+ },
909
+ [n, l, e, h, d, a]
910
+ ), xe = async () => {
911
+ if (!w.length) return;
912
+ B(!0), v(null);
913
+ const i = w.length;
713
914
  try {
714
- for (const f of h) await o.publier(f.UID);
715
- await L();
716
- for (const f of h) t.poserApercu(f.blockType, null);
717
- t.recharger(), D({
915
+ for (const f of w) await n.publier(f.UID);
916
+ await h();
917
+ for (const f of w) e.poserApercu(f.blockType, null);
918
+ e.recharger(), v({
718
919
  ton: "ok",
719
- texte: c === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${c} modifications publiées.`
920
+ texte: i === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${i} modifications publiées.`
720
921
  });
721
922
  } catch {
722
- D({
923
+ v({
723
924
  ton: "erreur",
724
925
  texte: "La publication a échoué. Rien n'a été mis en ligne."
725
926
  });
726
927
  } finally {
727
- P(!1);
928
+ B(!1);
728
929
  }
729
- }, de = async () => {
730
- P(!0);
930
+ }, ve = async () => {
931
+ B(!0);
731
932
  try {
732
- const c = h.map((b) => b.blockType);
733
- for (const b of h) await o.annuler(b.UID);
734
- const f = await L();
735
- for (const b of c) t.poserApercu(b, null);
736
- if (t.sourceTexte) {
737
- const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
738
- b(
933
+ const i = w.map((m) => m.blockType);
934
+ for (const m of w) await n.annuler(m.UID);
935
+ const f = await h();
936
+ for (const m of i) e.poserApercu(m, null);
937
+ if (e.sourceTexte) {
938
+ const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
939
+ m(
739
940
  f.map((k) => ({ blockType: k.blockType, data: k.data })),
740
- t.sourceTexte
941
+ e.sourceTexte
741
942
  );
742
943
  }
743
- D({
944
+ v({
744
945
  ton: "info",
745
946
  texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
746
947
  });
747
948
  } finally {
748
- P(!1);
949
+ B(!1);
749
950
  }
750
- }, pe = (c) => {
751
- const f = d.find((C) => C.blockType === c), b = f?.draft ?? f?.data ?? {}, k = p(c), E = H.exec(c), O = {};
752
- if (!E) {
753
- const C = t.replis?.[c];
754
- C && typeof C == "object" && !Array.isArray(C) && Object.assign(O, C);
951
+ }, ae = (i) => {
952
+ const f = a.find((O) => O.blockType === i), m = f?.draft ?? f?.data ?? {}, k = d(i), T = H.exec(i), _ = {};
953
+ if (!T) {
954
+ const O = e.replis?.[i];
955
+ O && typeof O == "object" && !Array.isArray(O) && Object.assign(_, O);
755
956
  }
756
- if (E && k && t.sourceTexte) {
757
- const C = E[1], N = E[2], w = t.sourceTexte.langues(), B = {};
758
- for (const z of w)
759
- B[z] = t.sourceTexte.dictionnaire(z)[C] ?? {};
760
- const G = t.sourceTexte.langueCourante();
761
- for (const z of k.fields) {
762
- const K = N ? N + "." + z.key : z.key;
763
- if (!z.localized) {
764
- const Y = B[G]?.[K] ?? w.map((R) => B[R]?.[K]).find((R) => typeof R == "string");
765
- typeof Y == "string" && (O[z.key] = Y);
957
+ if (T && k && e.sourceTexte) {
958
+ const O = T[1], C = T[2], E = e.sourceTexte.langues(), j = {};
959
+ for (const P of E)
960
+ j[P] = e.sourceTexte.dictionnaire(P)[O] ?? {};
961
+ const V = e.sourceTexte.langueCourante();
962
+ for (const P of k.fields) {
963
+ const $ = C ? C + "." + P.key : P.key;
964
+ if (!P.localized) {
965
+ const J = j[V]?.[$] ?? E.map((G) => j[G]?.[$]).find((G) => typeof G == "string");
966
+ typeof J == "string" && (_[P.key] = J);
766
967
  continue;
767
968
  }
768
- const $ = {};
769
- for (const Y of w) {
770
- const R = B[Y]?.[K];
771
- typeof R == "string" && ($[Y] = R);
969
+ const ee = {};
970
+ for (const J of E) {
971
+ const G = j[J]?.[$];
972
+ typeof G == "string" && (ee[J] = G);
772
973
  }
773
- Object.keys($).length && (O[z.key] = $);
974
+ Object.keys(ee).length && (_[P.key] = ee);
774
975
  }
775
976
  }
776
- for (const [C, N] of Object.entries(b)) {
777
- const w = O[C], B = N && typeof N == "object" && !Array.isArray(N) && w && typeof w == "object" && !Array.isArray(w);
778
- O[C] = B ? { ...w, ...N } : N;
977
+ for (const [O, C] of Object.entries(m)) {
978
+ const E = _[O], j = C && typeof C == "object" && !Array.isArray(C) && E && typeof E == "object" && !Array.isArray(E);
979
+ _[O] = j ? { ...E, ...C } : C;
779
980
  }
780
- v(O), u(c), T(!1), D(null);
781
- }, fe = (c, f) => v((b) => ({ ...b, [c]: f })), me = async () => {
782
- if (n) {
783
- P(!0);
981
+ S(_), u(i), I(!1), v(null);
982
+ }, ye = (i, f) => S((m) => ({ ...m, [i]: f })), Ae = async () => {
983
+ if (r) {
984
+ B(!0);
784
985
  try {
785
- const c = d.find((b) => b.blockType === n);
786
- if (c?.UID) await o.enregistrerBrouillon(c.UID, x);
986
+ const i = a.find((m) => m.blockType === r);
987
+ if (i?.UID) await n.enregistrerBrouillon(i.UID, A);
787
988
  else {
788
- const b = p(n)?.pages?.[0] ?? l;
789
- await o.creer(b, n, x);
989
+ const m = d(r)?.pages?.[0] ?? l;
990
+ await n.creer(m, r, A);
790
991
  }
791
- const f = await L();
792
- if (t.sourceTexte) {
793
- const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
794
- b(
992
+ const f = await h();
993
+ if (e.sourceTexte) {
994
+ const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
995
+ m(
795
996
  f.map((k) => ({ blockType: k.blockType, data: k.draft ?? k.data })),
796
- t.sourceTexte
997
+ e.sourceTexte
797
998
  );
798
999
  }
799
- H.test(n) || t.poserApercu(n, x), D({
1000
+ H.test(r) || e.poserApercu(r, A), v({
800
1001
  ton: "ok",
801
1002
  texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
802
1003
  });
803
1004
  } catch {
804
- D({ ton: "erreur", texte: "L'enregistrement a échoué." });
1005
+ v({ ton: "erreur", texte: "L'enregistrement a échoué." });
805
1006
  } finally {
806
- P(!1);
1007
+ B(!1);
807
1008
  }
808
1009
  }
809
- }, be = () => {
1010
+ }, ke = () => {
810
1011
  try {
811
- window.localStorage.removeItem(te);
1012
+ window.localStorage.removeItem(oe);
812
1013
  } catch {
813
1014
  }
814
- ie();
815
- }, F = n ? p(n) : void 0, J = !n && !A;
816
- return /* @__PURE__ */ m("div", { className: "calque", children: [
817
- /* @__PURE__ */ e(
1015
+ fe();
1016
+ }, W = r ? d(r) : void 0, K = !r && !N;
1017
+ return /* @__PURE__ */ x("div", { className: "calque", children: [
1018
+ /* @__PURE__ */ t(
818
1019
  "div",
819
1020
  {
820
- className: "cadre-global" + (y === "circuler" ? " cadre-global--circuler" : ""),
1021
+ className: "cadre-global" + (L === "circuler" ? " cadre-global--circuler" : ""),
821
1022
  "aria-hidden": "true"
822
1023
  }
823
1024
  ),
824
- t.sourceTexte && /* @__PURE__ */ e(
825
- ze,
1025
+ e.sourceTexte && /* @__PURE__ */ t(
1026
+ je,
1027
+ {
1028
+ source: e.sourceTexte,
1029
+ actif: K && !D && L === "modifier",
1030
+ pertinence: R,
1031
+ surModification: F
1032
+ }
1033
+ ),
1034
+ /* @__PURE__ */ t(
1035
+ Me,
826
1036
  {
827
- source: t.sourceTexte,
828
- actif: J && !I && y === "modifier",
829
- modifiable: Z,
830
- surModification: Q
1037
+ actif: K && !D && L === "modifier",
1038
+ lire: U,
1039
+ enregistrer: Z,
1040
+ ouvrirPanneau: ae
831
1041
  }
832
1042
  ),
833
- J && /* @__PURE__ */ m("div", { className: "barre", children: [
834
- /* @__PURE__ */ e("span", { className: "barre__point" }),
835
- /* @__PURE__ */ e("span", { className: "barre__texte", children: y === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
836
- /* @__PURE__ */ e(
1043
+ K && /* @__PURE__ */ x("div", { className: "barre", children: [
1044
+ /* @__PURE__ */ t("span", { className: "barre__point" }),
1045
+ /* @__PURE__ */ t("span", { className: "barre__texte", children: L === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
1046
+ /* @__PURE__ */ t(
837
1047
  "button",
838
1048
  {
839
1049
  type: "button",
840
- className: "bouton " + (y === "circuler" ? "bouton--principal" : ""),
841
- onClick: U,
842
- title: y === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
843
- children: y === "modifier" ? "Circuler" : "Modifier"
1050
+ className: "bouton " + (L === "circuler" ? "bouton--principal" : ""),
1051
+ onClick: M,
1052
+ title: L === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
1053
+ children: L === "modifier" ? "Circuler" : "Modifier"
844
1054
  }
845
1055
  ),
846
- h.length > 0 ? /* @__PURE__ */ m(ae, { children: [
847
- /* @__PURE__ */ e("span", { className: "barre__compte", children: h.length === 1 ? "1 modification non publiée" : `${h.length} modifications non publiées` }),
848
- /* @__PURE__ */ e(
1056
+ w.length > 0 ? /* @__PURE__ */ x(ue, { children: [
1057
+ /* @__PURE__ */ t("span", { className: "barre__compte", children: w.length === 1 ? "1 modification non publiée" : `${w.length} modifications non publiées` }),
1058
+ /* @__PURE__ */ t(
849
1059
  "button",
850
1060
  {
851
1061
  type: "button",
852
1062
  className: "bouton bouton--principal",
853
- onClick: q,
854
- disabled: I,
1063
+ onClick: xe,
1064
+ disabled: D,
855
1065
  children: "Publier"
856
1066
  }
857
1067
  ),
858
- /* @__PURE__ */ e(
1068
+ /* @__PURE__ */ t(
859
1069
  "button",
860
1070
  {
861
1071
  type: "button",
862
1072
  className: "bouton bouton--discret",
863
- onClick: de,
864
- disabled: I,
1073
+ onClick: ve,
1074
+ disabled: D,
865
1075
  children: "Abandonner"
866
1076
  }
867
1077
  )
868
- ] }) : /* @__PURE__ */ e("span", { className: "barre__compte", children: "tout est publié" }),
869
- /* @__PURE__ */ e(
1078
+ ] }) : /* @__PURE__ */ t("span", { className: "barre__compte", children: "tout est publié" }),
1079
+ /* @__PURE__ */ t(
870
1080
  "button",
871
1081
  {
872
1082
  type: "button",
873
1083
  className: "bouton bouton--icone bouton--discret",
874
- onClick: () => T(!0),
1084
+ onClick: () => I(!0),
875
1085
  title: "Tous les contenus",
876
1086
  "aria-label": "Tous les contenus",
877
1087
  children: "⋮"
878
1088
  }
879
1089
  ),
880
- /* @__PURE__ */ e(
1090
+ /* @__PURE__ */ t(
881
1091
  "button",
882
1092
  {
883
1093
  type: "button",
884
1094
  className: "bouton bouton--icone bouton--sortie",
885
- onClick: be,
1095
+ onClick: ke,
886
1096
  title: "Quitter le mode édition",
887
1097
  "aria-label": "Quitter le mode édition",
888
1098
  children: "✕"
889
1099
  }
890
1100
  )
891
1101
  ] }),
892
- S && J && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + S.ton, children: S.texte }) }),
893
- A && /* @__PURE__ */ m("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
894
- /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
895
- /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
896
- /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Tous les contenus" }),
897
- /* @__PURE__ */ e("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
1102
+ g && K && /* @__PURE__ */ t("div", { className: "flottant", children: /* @__PURE__ */ t("p", { className: "message message--" + g.ton, children: g.texte }) }),
1103
+ N && /* @__PURE__ */ x("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
1104
+ /* @__PURE__ */ x("div", { className: "panneau__tete", children: [
1105
+ /* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
1106
+ /* @__PURE__ */ t("h2", { className: "panneau__titre", children: "Tous les contenus" }),
1107
+ /* @__PURE__ */ t("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
898
1108
  ] }),
899
- /* @__PURE__ */ e(
1109
+ /* @__PURE__ */ t(
900
1110
  "button",
901
1111
  {
902
1112
  type: "button",
903
1113
  className: "bouton bouton--icone bouton--discret",
904
- onClick: () => T(!1),
1114
+ onClick: () => I(!1),
905
1115
  "aria-label": "Fermer",
906
1116
  children: "✕"
907
1117
  }
908
1118
  )
909
1119
  ] }),
910
- /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
911
- i.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
912
- i.map((c) => {
913
- const f = d.find((k) => k.blockType === c.blockType), b = f?.draft && !re(f.draft, f.data);
914
- return /* @__PURE__ */ m(
1120
+ /* @__PURE__ */ x("div", { className: "panneau__corps", children: [
1121
+ p.length === 0 && /* @__PURE__ */ t("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
1122
+ p.map((i) => {
1123
+ const f = a.find((k) => k.blockType === i.blockType), m = f?.draft && !le(f.draft, f.data);
1124
+ return /* @__PURE__ */ x(
915
1125
  "button",
916
1126
  {
917
1127
  type: "button",
918
1128
  className: "rangee",
919
- onClick: () => pe(c.blockType),
1129
+ onClick: () => ae(i.blockType),
920
1130
  children: [
921
- /* @__PURE__ */ e("span", { className: "rangee__nom", children: c.label }),
922
- /* @__PURE__ */ e("span", { className: "rangee__info", children: b ? "non publié" : `${c.fields.length} textes` })
1131
+ /* @__PURE__ */ t("span", { className: "rangee__nom", children: i.label }),
1132
+ /* @__PURE__ */ t("span", { className: "rangee__info", children: m ? "non publié" : `${i.fields.length} textes` })
923
1133
  ]
924
1134
  },
925
- c.blockType
1135
+ i.blockType
926
1136
  );
927
1137
  })
928
1138
  ] })
929
1139
  ] }),
930
- n && F && /* @__PURE__ */ m(
1140
+ r && W && /* @__PURE__ */ x(
931
1141
  "div",
932
1142
  {
933
1143
  className: "panneau",
934
1144
  role: "dialog",
935
- "aria-label": "Modifier " + F.label,
1145
+ "aria-label": "Modifier " + W.label,
936
1146
  children: [
937
- /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
938
- /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
939
- /* @__PURE__ */ e("h2", { className: "panneau__titre", children: F.label }),
940
- F.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: F.description })
1147
+ /* @__PURE__ */ x("div", { className: "panneau__tete", children: [
1148
+ /* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
1149
+ /* @__PURE__ */ t("h2", { className: "panneau__titre", children: W.label }),
1150
+ W.description && /* @__PURE__ */ t("p", { className: "panneau__sous", children: W.description })
941
1151
  ] }),
942
- /* @__PURE__ */ e(
1152
+ /* @__PURE__ */ t(
943
1153
  "button",
944
1154
  {
945
1155
  type: "button",
@@ -950,38 +1160,38 @@ function Te({ api: o, pont: t }) {
950
1160
  }
951
1161
  )
952
1162
  ] }),
953
- /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
954
- S && /* @__PURE__ */ e("p", { className: "message message--" + S.ton, children: S.texte }),
955
- F.fields.map((c) => /* @__PURE__ */ e(
956
- ce,
1163
+ /* @__PURE__ */ x("div", { className: "panneau__corps", children: [
1164
+ g && /* @__PURE__ */ t("p", { className: "message message--" + g.ton, children: g.texte }),
1165
+ W.fields.map((i) => /* @__PURE__ */ t(
1166
+ me,
957
1167
  {
958
- champ: c,
959
- langue: t.langue,
960
- valeur: x[c.key],
961
- changer: (f) => fe(c.key, f)
1168
+ champ: i,
1169
+ langue: e.langue,
1170
+ valeur: A[i.key],
1171
+ changer: (f) => ye(i.key, f)
962
1172
  },
963
- c.key
1173
+ i.key
964
1174
  ))
965
1175
  ] }),
966
- /* @__PURE__ */ m("div", { className: "panneau__pied", children: [
967
- /* @__PURE__ */ e(
1176
+ /* @__PURE__ */ x("div", { className: "panneau__pied", children: [
1177
+ /* @__PURE__ */ t(
968
1178
  "button",
969
1179
  {
970
1180
  type: "button",
971
1181
  className: "bouton bouton--discret",
972
1182
  onClick: () => u(null),
973
- disabled: I,
1183
+ disabled: D,
974
1184
  children: "Fermer"
975
1185
  }
976
1186
  ),
977
- /* @__PURE__ */ e("span", { className: "espace" }),
978
- /* @__PURE__ */ e(
1187
+ /* @__PURE__ */ t("span", { className: "espace" }),
1188
+ /* @__PURE__ */ t(
979
1189
  "button",
980
1190
  {
981
1191
  type: "button",
982
1192
  className: "bouton bouton--principal",
983
- onClick: me,
984
- disabled: I,
1193
+ onClick: Ae,
1194
+ disabled: D,
985
1195
  children: "Enregistrer"
986
1196
  }
987
1197
  )
@@ -991,7 +1201,7 @@ function Te({ api: o, pont: t }) {
991
1201
  )
992
1202
  ] });
993
1203
  }
994
- const Oe = `
1204
+ const Re = `
995
1205
  :host {
996
1206
  all: initial;
997
1207
  --fond: #16181d;
@@ -1113,69 +1323,98 @@ const Oe = `
1113
1323
 
1114
1324
  /* --------------------------------------------------- CONNEXION ---------- */
1115
1325
 
1116
- /* Le voile PREND les clics, lui : une boite de dialogue qui demande un mot de
1117
- passe ne doit pas laisser cliquer la page derriere elle. C'est l'exception
1118
- a la regle du calque, et elle est volontaire. */
1326
+ /* LA CONNEXION EST CLAIRE, AUX COULEURS DE LYSTECH. L'éditeur reste un outil
1327
+ sombre qui s'efface derrière le travail ; la connexion, elle, est l'instant
1328
+ où quelqu'un décide de faire confiance. Il doit y reconnaître Lystech — la
1329
+ fleur, son pétrole et son turquoise, sur du blanc — et non une boîte noire
1330
+ posée sur son site.
1331
+
1332
+ Le thème se redéfinit ICI, sur le voile : les boutons, messages et champs
1333
+ partagés avec l'éditeur suivent ces variables sans une règle de plus, et
1334
+ l'éditeur garde les siennes. Clair quel que soit le thème du système :
1335
+ c'est un choix de marque. */
1119
1336
  .voile {
1337
+ --fond: #ffffff;
1338
+ --fond-clair: #f4f7f8;
1339
+ --bord: #dfe6e9;
1340
+ --texte: #0b1f26;
1341
+ --texte-doux: #52666f;
1342
+ --petrole: #084050;
1343
+ --petrole-survol: #0b5468;
1344
+ --turquoise: #10b8b0;
1345
+ --focus: #0c8f89;
1346
+
1120
1347
  position: fixed;
1121
1348
  inset: 0;
1122
1349
  display: flex;
1123
1350
  align-items: center;
1124
1351
  justify-content: center;
1125
1352
  padding: 16px;
1126
- background: rgba(8, 10, 14, 0.62);
1127
- backdrop-filter: blur(2px);
1353
+ /* Le voile PREND les clics, lui : une boîte de dialogue qui demande une
1354
+ identité ne doit pas laisser cliquer la page derrière elle. C'est
1355
+ l'exception à la règle du calque, et elle est volontaire. Teinté pétrole
1356
+ plutôt que noir : on assombrit le site sans l'éteindre. */
1357
+ background: rgba(8, 44, 56, 0.34);
1358
+ backdrop-filter: blur(4px) saturate(115%);
1359
+ color: var(--texte);
1128
1360
  }
1129
1361
 
1130
1362
  .fenetre {
1131
1363
  position: relative;
1132
- width: min(408px, 100%);
1364
+ width: min(400px, 100%);
1133
1365
  max-height: 92vh;
1134
1366
  overflow-y: auto;
1135
- padding: 30px 28px 20px;
1136
- border: 1px solid var(--bord);
1137
- border-radius: 18px;
1138
- /* Une lueur d'accent dans le coin superieur : de la presence, sans le
1139
- degrade violet-bleu qu'on voit sur une page d'accueil sur deux. */
1367
+ padding: 34px 30px 26px;
1368
+ border: 1px solid rgba(8, 64, 80, 0.10);
1369
+ border-radius: 20px;
1370
+ /* La lueur turquoise de la fleur, à peine, en haut de la carte. */
1140
1371
  background:
1141
- radial-gradient(120% 90% at 50% -20%, rgba(59, 165, 141, 0.16), transparent 62%),
1372
+ radial-gradient(90% 60% at 50% -12%, rgba(16, 184, 176, 0.13), transparent 70%),
1142
1373
  var(--fond);
1143
- box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
1374
+ box-shadow:
1375
+ 0 1px 2px rgba(8, 64, 80, 0.06),
1376
+ 0 28px 64px -18px rgba(8, 44, 56, 0.45);
1144
1377
  text-align: center;
1145
1378
  }
1146
1379
 
1147
1380
  .fenetre__fermer {
1148
- position: absolute; top: 12px; right: 12px;
1149
- width: 30px; height: 30px;
1381
+ position: absolute; top: 14px; right: 14px;
1382
+ width: 32px; height: 32px;
1150
1383
  display: inline-flex; align-items: center; justify-content: center;
1151
- border: 0; border-radius: 8px;
1384
+ border: 0; border-radius: 9px;
1152
1385
  background: transparent; color: var(--texte-doux);
1153
1386
  font: inherit; font-size: 14px; cursor: pointer;
1154
1387
  }
1155
1388
  .fenetre__fermer:hover { background: var(--fond-clair); color: var(--texte); }
1389
+ .fenetre__fermer:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
1156
1390
 
1157
1391
  /* ------------------------------------------------------------ MARQUE ---- */
1158
1392
 
1159
1393
  .marque {
1160
- display: inline-flex; align-items: center; gap: 8px;
1394
+ display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
1161
1395
  margin-bottom: 18px;
1162
1396
  }
1163
- .marque img { width: 22px; height: 22px; display: block; }
1397
+ .marque img {
1398
+ width: 44px; height: 44px; display: block;
1399
+ filter: drop-shadow(0 6px 14px rgba(16, 184, 176, 0.28));
1400
+ }
1164
1401
  .marque__mot {
1165
- font-size: 12px; font-weight: 600;
1166
- letter-spacing: 0.18em; text-transform: uppercase;
1167
- color: #6fd3bd;
1402
+ font-size: 11.5px; font-weight: 700;
1403
+ letter-spacing: 0.24em; text-transform: uppercase;
1404
+ color: var(--petrole);
1168
1405
  }
1169
1406
 
1170
1407
  .fenetre__titre {
1171
- margin: 0 0 6px;
1172
- font-size: 20px; font-weight: 640; letter-spacing: -0.01em;
1408
+ margin: 0 0 8px;
1409
+ font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
1173
1410
  color: var(--texte);
1411
+ text-wrap: balance;
1174
1412
  }
1175
1413
  .fenetre__sous {
1176
- margin: 0 auto 22px;
1177
- max-width: 30ch;
1178
- font-size: 13px; line-height: 1.5; color: var(--texte-doux);
1414
+ margin: 0 auto 24px;
1415
+ max-width: 36ch;
1416
+ font-size: 13.5px; line-height: 1.55; color: var(--texte-doux);
1417
+ text-wrap: balance;
1179
1418
  }
1180
1419
  .fenetre__corps { text-align: left; }
1181
1420
 
@@ -1185,27 +1424,46 @@ const Oe = `
1185
1424
 
1186
1425
  .fournisseur {
1187
1426
  display: flex; align-items: center; justify-content: center; gap: 10px;
1188
- width: 100%; padding: 12px 16px;
1189
- border: 1px solid transparent; border-radius: 10px;
1427
+ width: 100%; min-height: 46px; padding: 12px 16px;
1428
+ border: 1px solid transparent; border-radius: 12px;
1190
1429
  font: inherit; font-size: 14px; font-weight: 600;
1191
1430
  cursor: pointer;
1192
- transition: transform 90ms ease, filter 90ms ease;
1431
+ transition: transform 90ms ease, background-color 120ms ease, box-shadow 120ms ease;
1193
1432
  }
1194
- .fournisseur:hover { filter: brightness(1.06); }
1195
1433
  .fournisseur:active { transform: translateY(1px); }
1196
- .fournisseur:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
1197
- .fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; filter: none; }
1434
+ .fournisseur:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
1435
+ .fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; }
1198
1436
  .fournisseur .logo { width: 18px; height: 18px; flex: none; display: block; }
1199
1437
 
1200
1438
  /* LES COULEURS DE CHAQUE MARQUE, telles qu'elles les publient. Un bouton
1201
1439
  Google repeint aux couleurs du site devient moins reconnaissable — et un
1202
- bouton de connexion qu'on ne reconnait pas est un bouton sur lequel on
1203
- hesite a cliquer. */
1204
- .fournisseur--google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
1440
+ bouton de connexion qu'on ne reconnaît pas est un bouton sur lequel on
1441
+ hésite à cliquer. */
1442
+ .fournisseur--google {
1443
+ background: #fff; color: #1f1f1f; border-color: #dadce0;
1444
+ box-shadow: 0 1px 2px rgba(8, 64, 80, 0.06);
1445
+ }
1446
+ .fournisseur--google:hover:not([disabled]) { background: #f6f9fa; border-color: #c9d3d8; }
1205
1447
  .fournisseur--facebook { background: #1877f2; color: #fff; }
1448
+ .fournisseur--facebook:hover:not([disabled]) { background: #166fe5; }
1206
1449
 
1207
1450
  .bouton--large { width: 100%; padding: 12px 16px; font-size: 14px; }
1208
1451
 
1452
+ /* Les boutons et messages PARTAGÉS avec l'éditeur, en version claire. */
1453
+ .voile .bouton {
1454
+ min-height: 44px; border-radius: 12px;
1455
+ background: #fff; color: var(--texte); border-color: #cfd9dd;
1456
+ }
1457
+ .voile .bouton:hover { background: var(--fond-clair); }
1458
+ .voile .bouton:focus-visible { outline-color: var(--focus); }
1459
+ .voile .bouton--principal { background: var(--petrole); border-color: var(--petrole); color: #fff; }
1460
+ .voile .bouton--principal:hover { background: var(--petrole-survol); }
1461
+
1462
+ .voile .message { font-size: 13px; line-height: 1.5; border-radius: 10px; }
1463
+ .voile .message--erreur { background: #fdf0ee; border-color: #f4c7bf; color: #a3321f; }
1464
+ .voile .message--ok { background: #e8f7f5; border-color: #a9e2dc; color: #0a5c57; }
1465
+ .voile .message--info { background: var(--fond-clair); border-color: var(--bord); color: #3a5159; }
1466
+
1209
1467
  @media (prefers-reduced-motion: reduce) {
1210
1468
  .fournisseur { transition: none; }
1211
1469
  }
@@ -1293,7 +1551,45 @@ input:focus, select:focus, textarea:focus {
1293
1551
  @media (prefers-reduced-motion: reduce) {
1294
1552
  * { transition: none !important; animation: none !important; }
1295
1553
  }
1296
- `, Pe = `
1554
+ `, Fe = `
1555
+ /* --------------------------------------------------------- SAISIE ------- */
1556
+
1557
+ /* Une valeur marquée par le site (un prix, un numéro) se corrige dans une
1558
+ saisie posée EXACTEMENT dessus, dans la police de la page : on écrit là où
1559
+ on lisait. Le libellé au-dessus dit quel champ on touche — « Séance
1560
+ d'acupuncture », pas « seance ». */
1561
+ .saisie {
1562
+ position: fixed;
1563
+ display: flex;
1564
+ flex-direction: column;
1565
+ align-items: flex-start;
1566
+ gap: 4px;
1567
+ }
1568
+ .saisie__libelle,
1569
+ .saisie__aide,
1570
+ .saisie__erreur {
1571
+ padding: 3px 8px;
1572
+ border-radius: 6px;
1573
+ font: 600 11px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
1574
+ white-space: nowrap;
1575
+ }
1576
+ .saisie__libelle { background: var(--fond); color: var(--texte); }
1577
+ .saisie__aide { background: rgba(22, 24, 29, 0.82); color: var(--texte-doux); font-weight: 500; }
1578
+ .saisie__erreur { background: #b3261e; color: #fff; }
1579
+ .saisie__champ {
1580
+ min-width: 0;
1581
+ padding: 2px 8px;
1582
+ border: 2px solid var(--accent);
1583
+ border-radius: 6px;
1584
+ background: #fff;
1585
+ color: #111;
1586
+ line-height: 1.2;
1587
+ box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
1588
+ outline: none;
1589
+ }
1590
+ .saisie__champ:focus { box-shadow: 0 0 0 3px rgba(59, 165, 141, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28); }
1591
+ .saisie__champ:disabled { opacity: 0.7; }
1592
+
1297
1593
  /* --------------------------------------------------------- CHOIX -------- */
1298
1594
 
1299
1595
  /* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
@@ -1343,7 +1639,7 @@ input:focus, select:focus, textarea:focus {
1343
1639
  max-width: min(460px, calc(100vw - 24px));
1344
1640
  }
1345
1641
  .flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
1346
- `, Me = `
1642
+ `, Ve = `
1347
1643
  /* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
1348
1644
  se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
1349
1645
  present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
@@ -1371,72 +1667,72 @@ input:focus, select:focus, textarea:focus {
1371
1667
  discrete le reste du temps — c'est le geste qu'on fait une fois. */
1372
1668
  .bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
1373
1669
  .bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
1374
- `, Le = "lystech-editeur-hote", Ie = "lystech-connexion-hote";
1375
- function le(o) {
1376
- document.getElementById(o)?.remove();
1377
- const t = document.createElement("div");
1378
- t.id = o, document.body.appendChild(t);
1379
- const a = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1380
- r.textContent = Oe + Pe + Me, a.appendChild(r);
1381
- const d = document.createElement("div");
1382
- return a.appendChild(d), { hote: t, point: d };
1383
- }
1384
- function ue(o, t) {
1385
- let a = o;
1670
+ `, Xe = "lystech-editeur-hote", Ye = "lystech-connexion-hote";
1671
+ function ge(n) {
1672
+ document.getElementById(n)?.remove();
1673
+ const e = document.createElement("div");
1674
+ e.id = n, e.style.position = "relative", e.style.zIndex = "2147483000", document.body.appendChild(e);
1675
+ const o = e.attachShadow({ mode: "open" }), s = document.createElement("style");
1676
+ s.textContent = Re + Fe + Ve, o.appendChild(s);
1677
+ const a = document.createElement("div");
1678
+ return o.appendChild(a), { hote: e, point: a };
1679
+ }
1680
+ function he(n, e) {
1681
+ let o = n;
1386
1682
  return () => {
1387
- const r = a;
1388
- a = null, setTimeout(() => {
1389
- r?.unmount(), t.remove();
1683
+ const s = o;
1684
+ o = null, setTimeout(() => {
1685
+ s?.unmount(), e.remove();
1390
1686
  }, 0);
1391
1687
  };
1392
1688
  }
1393
- function Ue({
1394
- site: o,
1395
- apiBaseUrl: t,
1396
- methodes: a,
1397
- surJeton: r
1689
+ function Je({
1690
+ site: n,
1691
+ apiBaseUrl: e,
1692
+ methodes: o,
1693
+ surJeton: s
1398
1694
  }) {
1399
- const { hote: d, point: s } = le(Ie), l = se(s), g = () => n();
1695
+ const { hote: a, point: c } = ge(Ye), l = de(c), y = () => r();
1400
1696
  l.render(
1401
- /* @__PURE__ */ e(
1402
- Ce,
1697
+ /* @__PURE__ */ t(
1698
+ Te,
1403
1699
  {
1404
- site: o,
1405
- apiBaseUrl: t,
1406
- ...a ? { methodes: a } : {},
1700
+ site: n,
1701
+ apiBaseUrl: e,
1702
+ ...o ? { methodes: o } : {},
1407
1703
  surJeton: (u) => {
1408
- n(), r(u);
1704
+ r(), s(u);
1409
1705
  },
1410
- surFermer: g
1706
+ surFermer: y
1411
1707
  }
1412
1708
  )
1413
1709
  );
1414
- const n = ue(l, d);
1415
- return n;
1416
- }
1417
- function Fe({
1418
- jeton: o,
1419
- site: t,
1420
- apiBaseUrl: a,
1421
- pont: r
1710
+ const r = he(l, a);
1711
+ return r;
1712
+ }
1713
+ function Ke({
1714
+ jeton: n,
1715
+ site: e,
1716
+ apiBaseUrl: o,
1717
+ pont: s
1422
1718
  }) {
1423
- const { hote: d, point: s } = le(Le), l = se(s);
1719
+ const { hote: a, point: c } = ge(Xe), l = de(c);
1424
1720
  return l.render(
1425
- /* @__PURE__ */ e(
1426
- Te,
1721
+ /* @__PURE__ */ t(
1722
+ Qe,
1427
1723
  {
1428
- api: xe({
1429
- jeton: o,
1430
- site: t,
1431
- apiBaseUrl: a,
1432
- surJetonRefuse: ie
1724
+ api: Ce({
1725
+ jeton: n,
1726
+ site: e,
1727
+ apiBaseUrl: o,
1728
+ surJetonRefuse: fe
1433
1729
  }),
1434
- pont: r
1730
+ pont: s
1435
1731
  }
1436
1732
  )
1437
- ), ue(l, d);
1733
+ ), he(l, a);
1438
1734
  }
1439
1735
  export {
1440
- Ue as monterConnexion,
1441
- Fe as monterEditeur
1736
+ Je as monterConnexion,
1737
+ Ke as monterEditeur
1442
1738
  };