@lystech/sections 0.4.5 → 0.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/editeur.js CHANGED
@@ -1,46 +1,47 @@
1
- import { jsx as e, jsxs as f, Fragment as re } from "react/jsx-runtime";
2
- import { createRoot as ae } from "react-dom/client";
3
- import { useState as O, useRef as j, useEffect as G, useCallback as W, useMemo as te } from "react";
4
- function fe({
5
- jeton: n,
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,
6
7
  site: t,
7
- apiBaseUrl: s,
8
+ apiBaseUrl: a,
8
9
  surJetonRefuse: r
9
10
  }) {
10
- const a = {
11
+ const d = {
11
12
  "Content-Type": "application/json",
12
- Authorization: "Bearer " + n
13
+ Authorization: "Bearer " + o
13
14
  };
14
- function d(o, i) {
15
- if (i && (o.status === 401 || o.status === 403) && r(), !o.ok) throw new Error(String(o.status));
15
+ function s(n, u) {
16
+ if (u && (n.status === 401 || n.status === 403) && r(), !n.ok) throw new Error(String(n.status));
16
17
  }
17
- async function l(o, i = !0) {
18
- const h = await fetch(s + o, {
19
- headers: i ? a : void 0
18
+ async function l(n, u = !0) {
19
+ const x = await fetch(a + n, {
20
+ headers: u ? d : void 0
20
21
  });
21
- return d(h, i), await h.json();
22
+ return s(x, u), await x.json();
22
23
  }
23
- async function b(o, i, h) {
24
- const v = await fetch(s + o, {
25
- method: i,
26
- headers: a,
27
- body: h === void 0 ? void 0 : JSON.stringify(h)
24
+ async function g(n, u, x) {
25
+ const v = await fetch(a + n, {
26
+ method: u,
27
+ headers: d,
28
+ body: x === void 0 ? void 0 : JSON.stringify(x)
28
29
  });
29
- return d(v, !0), await v.json();
30
+ return s(v, !0), await v.json();
30
31
  }
31
32
  return {
32
33
  /** Les blocs que le site a déclaré savoir afficher. Route publique. */
33
34
  schemas: () => l("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
34
35
  /** Ce qui existe sur une page, brouillons compris. */
35
- pourPage: (o) => l("/site-sections?page=" + encodeURIComponent(o)),
36
- creer: (o, i, h) => b("/site-sections", "POST", { page: o, blockType: i, draft: h }),
37
- enregistrerBrouillon: (o, i) => b("/site-sections/" + o + "/draft", "PUT", { draft: i }),
38
- publier: (o) => b("/site-sections/" + o + "/publish", "POST"),
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"),
39
40
  /** Ramène le brouillon à ce qui est en ligne. */
40
- annuler: (o) => b("/site-sections/" + o + "/revert", "POST")
41
+ annuler: (n) => g("/site-sections/" + n + "/revert", "POST")
41
42
  };
42
43
  }
43
- const be = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAW+UlEQVR42u17aZBc13Xed859r7tnATAASYALqBQlxZZBmaTNRREtagw5VEWyxZJcNVOKHNslRaJlu0I5UbSXaziRUq54VWJbjlwpxrQtx5ph2TJN2YQpGRizxEUiBYjCwg0kABLrEBxgML29d+/58uPe190ARRAbE9vCLXTNYKan+/b3vvOd75xzH3B+nV/n1/l1fp1f59fJFikA5J/i1v/fb3piwuHQOgE2AatXE7OzBoDfz/yRd//sL1/wsY99bJmTl7kiU1OK8fEMU1P6/cOgqSnF9LS9duo33jg/vzDnDh/tqmEevtxDw87c2fYRxy2XdLnjwbvvOMbBPY2PO8xtCoD8f2dW9iq+tgKwVq4/2H3d5atcIciOFZeggauMhsIMzbKLF5R7x2750LczH+5bXSu/tuMrf7LD5uY8IDEc160jpqftHxdAp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Lw+EOzs+0BgVNMbJd/nreRk1LdsiCoqgsFSXXxwPDLh+r4eAb847td/NVjE2dcf24z4OgnJhzGp7KB++cF3+dLzoNwfp1f59f5dX6dX6/m+r8Cl0QchG1LcQAAAABJRU5ErkJggg==", ve = {
44
45
  apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
45
46
  authDomain: "lystech.firebaseapp.com",
46
47
  projectId: "lystech",
@@ -48,21 +49,21 @@ const be = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAA
48
49
  messagingSenderId: "237347321732",
49
50
  appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
50
51
  };
51
- function he() {
52
- return /* @__PURE__ */ f("span", { className: "marque", children: [
53
- /* @__PURE__ */ e("img", { src: be, alt: "", width: 22, height: 22 }),
52
+ function Ae() {
53
+ return /* @__PURE__ */ m("span", { className: "marque", children: [
54
+ /* @__PURE__ */ e("img", { src: he, alt: "", width: 22, height: 22 }),
54
55
  /* @__PURE__ */ e("span", { className: "marque__mot", children: "Lystech" })
55
56
  ] });
56
57
  }
57
- function xe() {
58
- return /* @__PURE__ */ f("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
58
+ function ye() {
59
+ return /* @__PURE__ */ m("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
59
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" }),
60
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" }),
61
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" }),
62
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" })
63
64
  ] });
64
65
  }
65
- function ve() {
66
+ function ke() {
66
67
  return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ e(
67
68
  "path",
68
69
  {
@@ -71,14 +72,14 @@ function ve() {
71
72
  }
72
73
  ) });
73
74
  }
74
- function ye({
75
- site: n,
75
+ function Ce({
76
+ site: o,
76
77
  apiBaseUrl: t,
77
- methodes: s = ["google", "facebook"],
78
+ methodes: a = ["google", "facebook"],
78
79
  surJeton: r,
79
- surFermer: a
80
+ surFermer: d
80
81
  }) {
81
- const [d, l] = O({ nom: "repos" }), b = (v) => {
82
+ const [s, l] = M({ nom: "repos" }), g = (v) => {
82
83
  switch (v) {
83
84
  case "auth/popup-blocked":
84
85
  return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
@@ -94,25 +95,25 @@ function ye({
94
95
  default:
95
96
  return "La connexion a échoué. Réessayez dans un instant.";
96
97
  }
97
- }, o = async (v, E = !1) => {
98
- const D = await fetch(t + "/site-sections/edit-login/third-party", {
98
+ }, n = async (v, A = !1) => {
99
+ const T = await fetch(t + "/site-sections/edit-login/third-party", {
99
100
  method: "POST",
100
101
  headers: { "Content-Type": "application/json" },
101
102
  body: JSON.stringify({
102
- site: n,
103
+ site: o,
103
104
  token: v,
104
105
  tokenType: "firebase",
105
- demanderAcces: E
106
+ demanderAcces: A
106
107
  })
107
108
  });
108
- if (D.status === 429) {
109
+ if (T.status === 429) {
109
110
  l({
110
111
  nom: "erreur",
111
112
  texte: "Trop de tentatives. Réessayez dans quelques minutes."
112
113
  });
113
114
  return;
114
115
  }
115
- const y = await D.json().catch(() => null);
116
+ const y = await T.json().catch(() => null);
116
117
  if (y?.ok && y?.token) {
117
118
  r(y.token);
118
119
  return;
@@ -145,85 +146,85 @@ function ye({
145
146
  texte: "La connexion a échoué. Réessayez dans un instant."
146
147
  });
147
148
  }
148
- }, i = async (v) => {
149
+ }, u = async (v) => {
149
150
  l({ nom: "envoi", quoi: v });
150
151
  try {
151
- const [{ initializeApp: E, getApps: D }, y] = await Promise.all([
152
+ const [{ initializeApp: A, getApps: T }, y] = await Promise.all([
152
153
  import("./morceaux/index.esm-B4AB50RA.js"),
153
154
  import("./morceaux/index.esm-B4hL1FOE.js")
154
- ]), q = D().find((M) => M.name === "lystech-edition") ?? E(ge, "lystech-edition"), U = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), C = await (await y.signInWithPopup(y.getAuth(q), U)).user.getIdToken();
155
- await o(C);
156
- } catch (E) {
157
- l({ nom: "erreur", texte: b(String(E?.code ?? "")) });
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 ?? "")) });
158
159
  }
159
- }, h = d.nom === "envoi";
160
- return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ f("div", { className: "fenetre", children: [
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: [
161
162
  /* @__PURE__ */ e(
162
163
  "button",
163
164
  {
164
165
  type: "button",
165
166
  className: "fenetre__fermer",
166
- onClick: a,
167
+ onClick: d,
167
168
  "aria-label": "Fermer",
168
169
  children: "✕"
169
170
  }
170
171
  ),
171
- /* @__PURE__ */ f("div", { className: "fenetre__tete", children: [
172
- /* @__PURE__ */ e(he, {}),
172
+ /* @__PURE__ */ m("div", { className: "fenetre__tete", children: [
173
+ /* @__PURE__ */ e(Ae, {}),
173
174
  /* @__PURE__ */ e("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
174
175
  /* @__PURE__ */ e("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
175
176
  ] }),
176
- /* @__PURE__ */ f("div", { className: "fenetre__corps", children: [
177
- d.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: d.texte }),
178
- d.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." }),
179
- d.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." }),
180
- d.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
181
- d.nom === "sans-acces" ? /* @__PURE__ */ e(
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(
182
183
  "button",
183
184
  {
184
185
  type: "button",
185
186
  className: "bouton bouton--principal bouton--large",
186
187
  onClick: () => {
187
- o(d.jeton, !0);
188
+ n(s.jeton, !0);
188
189
  },
189
190
  children: "Demander l'accès"
190
191
  }
191
- ) : d.nom === "demande-envoyee" || d.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
+ ) : s.nom === "demande-envoyee" || s.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
193
  "button",
193
194
  {
194
195
  type: "button",
195
196
  className: "bouton bouton--large",
196
- onClick: a,
197
+ onClick: d,
197
198
  children: "Fermer"
198
199
  }
199
- ) : /* @__PURE__ */ f("div", { className: "fournisseurs", children: [
200
- s.includes("google") && /* @__PURE__ */ f(
200
+ ) : /* @__PURE__ */ m("div", { className: "fournisseurs", children: [
201
+ a.includes("google") && /* @__PURE__ */ m(
201
202
  "button",
202
203
  {
203
204
  type: "button",
204
205
  className: "fournisseur fournisseur--google",
205
- disabled: h,
206
+ disabled: x,
206
207
  onClick: () => {
207
- i("google");
208
+ u("google");
208
209
  },
209
210
  children: [
210
- /* @__PURE__ */ e(xe, {}),
211
- /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
211
+ /* @__PURE__ */ e(ye, {}),
212
+ /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
212
213
  ]
213
214
  }
214
215
  ),
215
- s.includes("facebook") && /* @__PURE__ */ f(
216
+ a.includes("facebook") && /* @__PURE__ */ m(
216
217
  "button",
217
218
  {
218
219
  type: "button",
219
220
  className: "fournisseur fournisseur--facebook",
220
- disabled: h,
221
+ disabled: x,
221
222
  onClick: () => {
222
- i("facebook");
223
+ u("facebook");
223
224
  },
224
225
  children: [
225
- /* @__PURE__ */ e(ve, {}),
226
- /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
226
+ /* @__PURE__ */ e(ke, {}),
227
+ /* @__PURE__ */ e("span", { children: s.nom === "envoi" && s.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
227
228
  ]
228
229
  }
229
230
  )
@@ -231,12 +232,12 @@ function ye({
231
232
  ] })
232
233
  ] }) });
233
234
  }
234
- function Ae(n, t) {
235
- const s = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
236
- return Array.from(/* @__PURE__ */ new Set([r, ...s]));
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]));
237
238
  }
238
- function ke(n) {
239
- switch (n.type) {
239
+ function we(o) {
240
+ switch (o.type) {
240
241
  case "number":
241
242
  return 0;
242
243
  case "boolean":
@@ -247,14 +248,14 @@ function ke(n) {
247
248
  return "";
248
249
  }
249
250
  }
250
- function ne({ champ: n, valeur: t, changer: s }) {
251
- switch (n.type) {
251
+ function oe({ champ: o, valeur: t, changer: a }) {
252
+ switch (o.type) {
252
253
  case "richText":
253
254
  return /* @__PURE__ */ e(
254
255
  "textarea",
255
256
  {
256
257
  value: String(t ?? ""),
257
- onChange: (r) => s(r.target.value)
258
+ onChange: (r) => a(r.target.value)
258
259
  }
259
260
  );
260
261
  case "number":
@@ -263,17 +264,17 @@ function ne({ champ: n, valeur: t, changer: s }) {
263
264
  {
264
265
  type: "number",
265
266
  value: t === "" || t == null ? "" : String(t),
266
- onChange: (r) => s(r.target.value === "" ? "" : Number(r.target.value))
267
+ onChange: (r) => a(r.target.value === "" ? "" : Number(r.target.value))
267
268
  }
268
269
  );
269
270
  case "boolean":
270
- return /* @__PURE__ */ f("label", { className: "bascule", children: [
271
+ return /* @__PURE__ */ m("label", { className: "bascule", children: [
271
272
  /* @__PURE__ */ e(
272
273
  "input",
273
274
  {
274
275
  type: "checkbox",
275
276
  checked: t === !0,
276
- onChange: (r) => s(r.target.checked)
277
+ onChange: (r) => a(r.target.checked)
277
278
  }
278
279
  ),
279
280
  /* @__PURE__ */ e("span", { children: t === !0 ? "Oui" : "Non" })
@@ -284,18 +285,18 @@ function ne({ champ: n, valeur: t, changer: s }) {
284
285
  {
285
286
  type: "date",
286
287
  value: String(t ?? "").slice(0, 10),
287
- onChange: (r) => s(r.target.value)
288
+ onChange: (r) => a(r.target.value)
288
289
  }
289
290
  );
290
291
  case "choice":
291
- return /* @__PURE__ */ f(
292
+ return /* @__PURE__ */ m(
292
293
  "select",
293
294
  {
294
295
  value: String(t ?? ""),
295
- onChange: (r) => s(r.target.value),
296
+ onChange: (r) => a(r.target.value),
296
297
  children: [
297
298
  /* @__PURE__ */ e("option", { value: "", children: "—" }),
298
- (n.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
299
+ (o.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
299
300
  ]
300
301
  }
301
302
  );
@@ -305,18 +306,18 @@ function ne({ champ: n, valeur: t, changer: s }) {
305
306
  {
306
307
  type: "url",
307
308
  value: String(t ?? ""),
308
- onChange: (r) => s(r.target.value),
309
+ onChange: (r) => a(r.target.value),
309
310
  placeholder: "https://"
310
311
  }
311
312
  );
312
313
  case "image":
313
- return /* @__PURE__ */ f(re, { children: [
314
+ return /* @__PURE__ */ m(ae, { children: [
314
315
  /* @__PURE__ */ e(
315
316
  "input",
316
317
  {
317
318
  type: "url",
318
319
  value: String(t ?? ""),
319
- onChange: (r) => s(r.target.value),
320
+ onChange: (r) => a(r.target.value),
320
321
  placeholder: "https://…"
321
322
  }
322
323
  ),
@@ -328,34 +329,34 @@ function ne({ champ: n, valeur: t, changer: s }) {
328
329
  {
329
330
  type: "text",
330
331
  value: String(t ?? ""),
331
- onChange: (r) => s(r.target.value)
332
+ onChange: (r) => a(r.target.value)
332
333
  }
333
334
  );
334
335
  }
335
336
  }
336
- function se({ champ: n, valeur: t, changer: s, langue: r }) {
337
- if (n.type === "list") {
338
- const a = Array.isArray(t) ? t : [], d = n.of ?? [], l = (b, o, i) => {
339
- const h = a.map((v, E) => E === b ? { ...v, [o]: i } : v);
340
- s(h);
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);
341
342
  };
342
- return /* @__PURE__ */ f("div", { className: "champ", children: [
343
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
344
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
345
- a.map((b, o) => /* @__PURE__ */ f("div", { className: "liste__item", children: [
346
- /* @__PURE__ */ f("div", { className: "liste__tete", children: [
347
- /* @__PURE__ */ e("span", { className: "liste__rang", children: o + 1 }),
348
- /* @__PURE__ */ f("span", { style: { display: "flex", gap: 4 }, children: [
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: [
349
350
  /* @__PURE__ */ e(
350
351
  "button",
351
352
  {
352
353
  type: "button",
353
354
  className: "bouton bouton--icone bouton--discret",
354
355
  title: "Monter",
355
- disabled: o === 0,
356
+ disabled: n === 0,
356
357
  onClick: () => {
357
- const i = [...a];
358
- [i[o - 1], i[o]] = [i[o], i[o - 1]], s(i);
358
+ const u = [...d];
359
+ [u[n - 1], u[n]] = [u[n], u[n - 1]], a(u);
359
360
  },
360
361
  children: "↑"
361
362
  }
@@ -366,10 +367,10 @@ function se({ champ: n, valeur: t, changer: s, langue: r }) {
366
367
  type: "button",
367
368
  className: "bouton bouton--icone bouton--discret",
368
369
  title: "Descendre",
369
- disabled: o === a.length - 1,
370
+ disabled: n === d.length - 1,
370
371
  onClick: () => {
371
- const i = [...a];
372
- [i[o], i[o + 1]] = [i[o + 1], i[o]], s(i);
372
+ const u = [...d];
373
+ [u[n], u[n + 1]] = [u[n + 1], u[n]], a(u);
373
374
  },
374
375
  children: "↓"
375
376
  }
@@ -380,207 +381,218 @@ function se({ champ: n, valeur: t, changer: s, langue: r }) {
380
381
  type: "button",
381
382
  className: "bouton bouton--icone bouton--discret",
382
383
  title: "Retirer",
383
- onClick: () => s(a.filter((i, h) => h !== o)),
384
+ onClick: () => a(d.filter((u, x) => x !== n)),
384
385
  children: "✕"
385
386
  }
386
387
  )
387
388
  ] })
388
389
  ] }),
389
- d.map((i) => /* @__PURE__ */ e(
390
- se,
390
+ s.map((u) => /* @__PURE__ */ e(
391
+ ce,
391
392
  {
392
- champ: i,
393
+ champ: u,
393
394
  langue: r,
394
- valeur: b?.[i.key],
395
- changer: (h) => l(o, i.key, h)
395
+ valeur: g?.[u.key],
396
+ changer: (x) => l(n, u.key, x)
396
397
  },
397
- i.key
398
+ u.key
398
399
  ))
399
- ] }, o)),
400
+ ] }, n)),
400
401
  /* @__PURE__ */ e(
401
402
  "button",
402
403
  {
403
404
  type: "button",
404
405
  className: "bouton",
405
- onClick: () => s([
406
- ...a,
407
- Object.fromEntries(d.map((b) => [b.key, ke(b)]))
406
+ onClick: () => a([
407
+ ...d,
408
+ Object.fromEntries(s.map((g) => [g.key, we(g)]))
408
409
  ]),
409
410
  children: "+ Ajouter"
410
411
  }
411
412
  )
412
413
  ] });
413
414
  }
414
- if (n.localized) {
415
- const a = Ae(t, r), d = t && typeof t == "object" && !Array.isArray(t) ? t : {};
416
- return /* @__PURE__ */ f("div", { className: "champ", children: [
417
- /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
418
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
419
- a.map((l) => /* @__PURE__ */ f("div", { style: { marginBottom: 8 }, children: [
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: [
420
421
  /* @__PURE__ */ e("span", { className: "champ__langue", children: l }),
421
422
  /* @__PURE__ */ e(
422
- ne,
423
+ oe,
423
424
  {
424
- champ: n,
425
- valeur: d[l],
426
- changer: (b) => s({ ...d, [l]: b })
425
+ champ: o,
426
+ valeur: s[l],
427
+ changer: (g) => a({ ...s, [l]: g })
427
428
  }
428
429
  )
429
430
  ] }, l))
430
431
  ] });
431
432
  }
432
- return /* @__PURE__ */ f("div", { className: "champ", children: [
433
- /* @__PURE__ */ e("label", { className: "champ__etiquette", children: n.label }),
434
- /* @__PURE__ */ e(ne, { champ: n, valeur: t, changer: s }),
435
- n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help })
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 })
436
437
  ] });
437
438
  }
438
- const we = ["lystech-editeur-hote", "lystech-connexion-hote"];
439
- function Ce(n) {
440
- const t = /* @__PURE__ */ new Map();
441
- for (const [s, r] of Object.entries(n))
442
- for (const [a, d] of Object.entries(r)) {
443
- const l = String(d ?? "").trim();
444
- if (l.length < 2 || l.includes("{{")) continue;
445
- const b = t.get(l);
446
- b ? b.push({ ns: s, chemin: a }) : t.set(l, [{ ns: s, chemin: a }]);
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 }]);
447
448
  }
448
- return t;
449
+ return a;
449
450
  }
450
- function Ne(n) {
451
- const t = /* @__PURE__ */ new Map(), s = document.body.querySelectorAll("*");
452
- for (const r of s) {
453
- if (we.some((l) => r.id === l || r.closest("#" + l)) || r.children.length > 0) continue;
454
- const a = (r.textContent ?? "").trim();
455
- if (a.length < 2) continue;
456
- const d = n.get(a);
457
- d && t.set(r, { valeur: a, candidats: d });
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 });
458
459
  }
459
460
  return t;
460
461
  }
461
- function Ee({
462
- source: n,
462
+ function ze({
463
+ source: o,
463
464
  actif: t,
464
- surModification: s
465
+ modifiable: a,
466
+ surModification: r
465
467
  }) {
466
- const r = j(/* @__PURE__ */ new Map()), a = j(null), [d, l] = O(null), b = j(n);
467
- b.current = n;
468
- const o = j(s);
469
- return o.current = s, G(() => {
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(() => {
470
476
  if (!t) return;
471
- const i = b.current.langueCourante(), h = Ce(b.current.dictionnaire(i)), v = () => {
472
- r.current = Ne(h);
477
+ const A = () => {
478
+ const p = n.current, i = Se(
479
+ p.dictionnaire(p.langueCourante()),
480
+ x.current
481
+ );
482
+ d.current = De(i);
473
483
  };
474
- v();
475
- let E;
476
- const D = new MutationObserver(() => {
477
- a.current || (clearTimeout(E), E = setTimeout(v, 250));
484
+ v.current = A, A();
485
+ let T;
486
+ const y = new MutationObserver(() => {
487
+ s.current || (clearTimeout(T), T = setTimeout(A, 250));
478
488
  });
479
- D.observe(document.body, { childList: !0, subtree: !0 });
480
- const y = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", q = (p) => {
481
- const c = p.target;
482
- !(c instanceof HTMLElement) || a.current || r.current.has(c) && (c.dataset.lysStyleAvant || (c.dataset.lysStyleAvant = c.getAttribute("style") ?? ""), c.setAttribute(
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(
483
493
  "style",
484
- (c.dataset.lysStyleAvant ?? "") + y
494
+ (i.dataset.lysStyleAvant ?? "") + V
485
495
  ));
486
- }, U = (p) => {
487
- const c = p.target;
488
- if (!(c instanceof HTMLElement) || a.current?.el === c || c.dataset.lysStyleAvant === void 0) return;
489
- const x = c.dataset.lysStyleAvant;
490
- delete c.dataset.lysStyleAvant, x ? c.setAttribute("style", x) : c.removeAttribute("style");
491
- }, I = (p, c) => {
492
- const x = p.getAttribute("style") ?? "";
493
- a.current = {
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 = {
494
504
  el: p,
495
505
  avant: (p.textContent ?? "").trim(),
496
- ns: c.ns,
497
- chemin: c.chemin,
498
- styleAvant: p.dataset.lysStyleAvant ?? x
506
+ ns: i.ns,
507
+ chemin: i.chemin,
508
+ styleAvant: p.dataset.lysStyleAvant ?? h
499
509
  }, p.setAttribute("contenteditable", "plaintext-only"), p.setAttribute(
500
510
  "style",
501
511
  (p.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
502
512
  ), p.focus();
503
- const _ = window.getSelection(), Q = document.createRange();
504
- Q.selectNodeContents(p), _?.removeAllRanges(), _?.addRange(Q);
505
- }, C = async (p) => {
506
- const c = a.current;
507
- if (!c) return;
508
- a.current = null;
509
- const x = (c.el.textContent ?? "").trim();
510
- c.el.removeAttribute("contenteditable");
511
- const _ = c.el.dataset.lysStyleAvant;
512
- if (delete c.el.dataset.lysStyleAvant, _ ? c.el.setAttribute("style", _) : c.el.removeAttribute("style"), p || x === c.avant) {
513
- p && (c.el.textContent = c.avant);
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);
514
524
  return;
515
525
  }
516
- const Q = b.current.langueCourante();
517
- b.current.poser(Q, c.ns, c.chemin, x), await o.current(c.ns, c.chemin, Q, x);
518
- }, M = (p) => {
519
- const c = p.target;
520
- if (!(c instanceof HTMLElement)) return;
521
- if (a.current) {
522
- if (a.current.el === c) return;
523
- C(!1);
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);
524
534
  }
525
- const x = r.current.get(c);
526
- if (x) {
527
- if (p.preventDefault(), p.stopPropagation(), x.candidats.length === 1) {
528
- I(c, x.candidats[0]);
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]);
529
539
  return;
530
540
  }
531
- l({
532
- el: c,
533
- candidats: x.candidats,
541
+ g({
542
+ el: i,
543
+ candidats: h.candidats,
534
544
  x: p.clientX,
535
545
  y: p.clientY
536
546
  });
537
547
  }
538
- }, S = (p) => {
539
- a.current && (p.key === "Escape" ? (p.preventDefault(), C(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), C(!1)));
540
- }, L = () => {
541
- a.current && C(!1);
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);
542
552
  };
543
- document.addEventListener("mouseover", q, !0), document.addEventListener("mouseout", U, !0), document.addEventListener("click", M, !0);
544
- const V = (p) => {
545
- if (!a.current) return;
546
- const c = p.inputType;
547
- (c === "insertParagraph" || c === "insertLineBreak") && (p.preventDefault(), C(!1));
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));
548
558
  };
549
- return document.addEventListener("beforeinput", V, !0), document.addEventListener("keydown", S, !0), document.addEventListener("focusout", L, !0), window.__lysChoisir = (p, c) => {
550
- l(null), I(c, p);
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);
551
561
  }, () => {
552
- clearTimeout(E), D.disconnect(), document.removeEventListener("mouseover", q, !0), document.removeEventListener("mouseout", U, !0), document.removeEventListener("click", M, !0), document.removeEventListener("beforeinput", V, !0), document.removeEventListener("keydown", S, !0), document.removeEventListener("focusout", L, !0), a.current && C(!0), delete window.__lysChoisir;
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;
553
563
  };
554
- }, [t]), d ? /* @__PURE__ */ f(
564
+ }, [t]), W(() => {
565
+ s.current || v.current?.();
566
+ }, [a]), l ? /* @__PURE__ */ m(
555
567
  "div",
556
568
  {
557
569
  className: "choix",
558
570
  style: {
559
- top: Math.min(d.y + 10, window.innerHeight - 200),
560
- left: Math.min(d.x, window.innerWidth - 280)
571
+ top: Math.min(l.y + 10, window.innerHeight - 200),
572
+ left: Math.min(l.x, window.innerWidth - 280)
561
573
  },
562
574
  children: [
563
575
  /* @__PURE__ */ e("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
564
576
  /* @__PURE__ */ e("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
565
- d.candidats.map((i) => /* @__PURE__ */ f(
577
+ l.candidats.map((A) => /* @__PURE__ */ m(
566
578
  "button",
567
579
  {
568
580
  type: "button",
569
581
  className: "choix__option",
570
- onClick: () => window.__lysChoisir?.(i, d.el),
582
+ onClick: () => window.__lysChoisir?.(A, l.el),
571
583
  children: [
572
- /* @__PURE__ */ e("span", { className: "choix__chemin", children: i.chemin }),
573
- /* @__PURE__ */ e("span", { className: "choix__ns", children: i.ns })
584
+ /* @__PURE__ */ e("span", { className: "choix__chemin", children: A.chemin }),
585
+ /* @__PURE__ */ e("span", { className: "choix__ns", children: A.ns })
574
586
  ]
575
587
  },
576
- i.ns + ":" + i.chemin
588
+ A.ns + ":" + A.chemin
577
589
  )),
578
590
  /* @__PURE__ */ e(
579
591
  "button",
580
592
  {
581
593
  type: "button",
582
594
  className: "bouton bouton--discret",
583
- onClick: () => l(null),
595
+ onClick: () => g(null),
584
596
  children: "Annuler"
585
597
  }
586
598
  )
@@ -588,217 +600,220 @@ function Ee({
588
600
  }
589
601
  ) : null;
590
602
  }
591
- const Z = /^i18n:([^:]+):(.*)$/, $ = "commun", ee = "lystech-edit-mode";
592
- function oe(n, t) {
593
- return JSON.stringify(n ?? {}) === JSON.stringify(t ?? {});
603
+ const H = /^i18n:([^:]+):(.*)$/, ee = "commun", te = "lystech-edit-mode";
604
+ function re(o, t) {
605
+ return JSON.stringify(o ?? {}) === JSON.stringify(t ?? {});
594
606
  }
595
- function Se({ api: n, pont: t }) {
596
- const [s, r] = O([]), [a, d] = O([]), [l, b] = O(t.page), [o, i] = O(null), [h, v] = O({}), [E, D] = O(!1), [y, q] = O(() => {
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(() => {
597
609
  try {
598
- return window.localStorage.getItem(ee) === "circuler" ? "circuler" : "modifier";
610
+ return window.localStorage.getItem(te) === "circuler" ? "circuler" : "modifier";
599
611
  } catch {
600
612
  return "modifier";
601
613
  }
602
- }), U = () => q((u) => {
603
- const m = u === "modifier" ? "circuler" : "modifier";
614
+ }), U = () => V((c) => {
615
+ const f = c === "modifier" ? "circuler" : "modifier";
604
616
  try {
605
- window.localStorage.setItem(ee, m);
617
+ window.localStorage.setItem(te, f);
606
618
  } catch {
607
619
  }
608
- return m;
609
- }), [I, C] = O(!1), [M, S] = O(
620
+ return f;
621
+ }), [I, P] = M(!1), [S, D] = M(
610
622
  null
611
623
  );
612
- G(() => (t.surChangementDePage = (u) => {
613
- b(u), i(null), D(!1);
624
+ W(() => (t.surChangementDePage = (c) => {
625
+ g(c), u(null), T(!1);
614
626
  }, () => {
615
627
  t.surChangementDePage = void 0;
616
628
  }), [t]);
617
- const L = W(async () => {
629
+ const L = X(async () => {
618
630
  try {
619
- const [u, m] = await Promise.all([
620
- n.pourPage(l),
621
- l === $ ? Promise.resolve([]) : n.pourPage($)
622
- ]), g = [...u, ...m];
623
- return d(g), g;
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;
624
636
  } catch {
625
- return S({
637
+ return D({
626
638
  ton: "erreur",
627
639
  texte: "Impossible de lire le contenu du site."
628
640
  }), [];
629
641
  }
630
- }, [n, l]);
631
- G(() => {
632
- n.schemas().then(r).catch(() => r([]));
633
- }, [n]), G(() => {
642
+ }, [o, l]);
643
+ W(() => {
644
+ o.schemas().then(r).catch(() => r([]));
645
+ }, [o]), W(() => {
634
646
  L();
635
647
  }, [L]);
636
- const V = W(
637
- (u, m) => {
638
- let g = null, A = -1;
639
- for (const P of s) {
640
- const k = Z.exec(P.blockType);
641
- if (!k || k[1] !== u) continue;
642
- const w = k[2];
643
- (w === "" || m === w || m.startsWith(w + ".")) && w.length > A && (g = P, A = w.length);
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);
644
656
  }
645
- if (!g) return null;
646
- const N = Z.exec(g.blockType)?.[2] ?? "", T = N ? m.slice(N.length + 1) : m;
647
- return { bloc: g, champ: T };
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 };
648
660
  },
649
- [s]
650
- ), p = W(
651
- (u) => s.find((m) => m.blockType === u),
652
- [s]
653
- ), c = te(
654
- () => s.filter((u) => {
655
- const m = u.pages ?? [];
656
- return m.includes(l) || m.includes($);
657
- }),
658
- [s, l]
659
- ), x = te(
660
- () => a.filter((u) => u.draft && !oe(u.draft, u.data)),
661
661
  [a]
662
- ), _ = W(
663
- async (u, m, g, A) => {
664
- const N = V(u, m);
665
- if (!N) {
666
- S({
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);
672
+ }),
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({
667
682
  ton: "erreur",
668
- texte: `Ce texte (${u}:${m}) n'appartient à aucun bloc déclaré.`
683
+ texte: `Ce texte (${c}:${f}) n'appartient à aucun bloc déclaré.`
669
684
  });
670
685
  return;
671
686
  }
672
- const T = a.find((z) => z.blockType === N.bloc.blockType), P = T?.draft ?? T?.data ?? {}, k = P[N.champ], w = N.bloc.fields.find((z) => z.key === N.champ), B = (
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 = (
673
688
  /* `!declare.localized` et non `=== false` : un champ non traduit
674
689
  OMET la cle plutot que de la mettre a faux. Tester l'egalite
675
690
  stricte ne se declenchait donc jamais. */
676
- w && !w.localized ? A : k && typeof k == "object" && !Array.isArray(k) ? { ...k, [g]: A } : { [g]: A }
677
- ), X = { ...P, [N.champ]: B };
691
+ w && !w.localized ? k : N && typeof N == "object" && !Array.isArray(N) ? { ...N, [b]: k } : { [b]: k }
692
+ ), G = { ...C, [E.champ]: B };
678
693
  try {
679
- if (T?.UID)
680
- await n.enregistrerBrouillon(T.UID, X);
694
+ if (O?.UID)
695
+ await o.enregistrerBrouillon(O.UID, G);
681
696
  else {
682
- const z = N.bloc.pages?.[0] ?? l;
683
- await n.creer(z, N.bloc.blockType, X);
697
+ const z = E.bloc.pages?.[0] ?? l;
698
+ await o.creer(z, E.bloc.blockType, G);
684
699
  }
685
- await L(), S(null);
700
+ await L(), D(null);
686
701
  } catch {
687
- S({
702
+ D({
688
703
  ton: "erreur",
689
704
  texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
690
705
  });
691
706
  }
692
707
  },
693
- [n, V, l, L, a]
694
- ), Q = async () => {
695
- if (!x.length) return;
696
- C(!0), S(null);
697
- const u = x.length;
708
+ [o, _, l, L, d]
709
+ ), q = async () => {
710
+ if (!h.length) return;
711
+ P(!0), D(null);
712
+ const c = h.length;
698
713
  try {
699
- for (const m of x) await n.publier(m.UID);
714
+ for (const f of h) await o.publier(f.UID);
700
715
  await L();
701
- for (const m of x) t.poserApercu(m.blockType, null);
702
- t.recharger(), S({
716
+ for (const f of h) t.poserApercu(f.blockType, null);
717
+ t.recharger(), D({
703
718
  ton: "ok",
704
- texte: u === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${u} modifications publiées.`
719
+ texte: c === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${c} modifications publiées.`
705
720
  });
706
721
  } catch {
707
- S({
722
+ D({
708
723
  ton: "erreur",
709
724
  texte: "La publication a échoué. Rien n'a été mis en ligne."
710
725
  });
711
726
  } finally {
712
- C(!1);
727
+ P(!1);
713
728
  }
714
- }, le = async () => {
715
- C(!0);
729
+ }, de = async () => {
730
+ P(!0);
716
731
  try {
717
- const u = x.map((g) => g.blockType);
718
- for (const g of x) await n.annuler(g.UID);
719
- const m = await L();
720
- for (const g of u) t.poserApercu(g, null);
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);
721
736
  if (t.sourceTexte) {
722
- const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
723
- g(
724
- m.map((A) => ({ blockType: A.blockType, data: A.data })),
737
+ const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
738
+ b(
739
+ f.map((k) => ({ blockType: k.blockType, data: k.data })),
725
740
  t.sourceTexte
726
741
  );
727
742
  }
728
- S({
743
+ D({
729
744
  ton: "info",
730
745
  texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
731
746
  });
732
747
  } finally {
733
- C(!1);
748
+ P(!1);
749
+ }
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);
734
755
  }
735
- }, ue = (u) => {
736
- const m = a.find((P) => P.blockType === u), g = m?.draft ?? m?.data ?? {}, A = p(u), N = Z.exec(u), T = {};
737
- if (N && A && t.sourceTexte) {
738
- const P = N[1], k = N[2], w = t.sourceTexte.langues(), B = {};
756
+ if (E && k && t.sourceTexte) {
757
+ const C = E[1], N = E[2], w = t.sourceTexte.langues(), B = {};
739
758
  for (const z of w)
740
- B[z] = t.sourceTexte.dictionnaire(z)[P] ?? {};
741
- const X = t.sourceTexte.langueCourante();
742
- for (const z of A.fields) {
743
- const J = k ? k + "." + z.key : z.key;
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;
744
763
  if (!z.localized) {
745
- const Y = B[X]?.[J] ?? w.map((R) => B[R]?.[J]).find((R) => typeof R == "string");
746
- typeof Y == "string" && (T[z.key] = Y);
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);
747
766
  continue;
748
767
  }
749
- const K = {};
768
+ const $ = {};
750
769
  for (const Y of w) {
751
- const R = B[Y]?.[J];
752
- typeof R == "string" && (K[Y] = R);
770
+ const R = B[Y]?.[K];
771
+ typeof R == "string" && ($[Y] = R);
753
772
  }
754
- Object.keys(K).length && (T[z.key] = K);
773
+ Object.keys($).length && (O[z.key] = $);
755
774
  }
756
775
  }
757
- for (const [P, k] of Object.entries(g)) {
758
- const w = T[P], B = k && typeof k == "object" && !Array.isArray(k) && w && typeof w == "object" && !Array.isArray(w);
759
- T[P] = B ? { ...w, ...k } : k;
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;
760
779
  }
761
- v(T), i(u), D(!1), S(null);
762
- }, de = (u, m) => v((g) => ({ ...g, [u]: m })), pe = async () => {
763
- if (o) {
764
- C(!0);
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);
765
784
  try {
766
- const u = a.find((g) => g.blockType === o);
767
- if (u?.UID) await n.enregistrerBrouillon(u.UID, h);
785
+ const c = d.find((b) => b.blockType === n);
786
+ if (c?.UID) await o.enregistrerBrouillon(c.UID, x);
768
787
  else {
769
- const g = p(o)?.pages?.[0] ?? l;
770
- await n.creer(g, o, h);
788
+ const b = p(n)?.pages?.[0] ?? l;
789
+ await o.creer(b, n, x);
771
790
  }
772
- const m = await L();
791
+ const f = await L();
773
792
  if (t.sourceTexte) {
774
- const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
775
- g(
776
- m.map((A) => ({ blockType: A.blockType, data: A.draft ?? A.data })),
793
+ const { appliquerAuxTextes: b } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
794
+ b(
795
+ f.map((k) => ({ blockType: k.blockType, data: k.draft ?? k.data })),
777
796
  t.sourceTexte
778
797
  );
779
798
  }
780
- Z.test(o) || t.poserApercu(o, h), S({
799
+ H.test(n) || t.poserApercu(n, x), D({
781
800
  ton: "ok",
782
801
  texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
783
802
  });
784
803
  } catch {
785
- S({ ton: "erreur", texte: "L'enregistrement a échoué." });
804
+ D({ ton: "erreur", texte: "L'enregistrement a échoué." });
786
805
  } finally {
787
- C(!1);
806
+ P(!1);
788
807
  }
789
808
  }
790
- }, me = () => {
809
+ }, be = () => {
791
810
  try {
792
- window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit"), window.localStorage.removeItem(ee);
811
+ window.localStorage.removeItem(te);
793
812
  } catch {
794
813
  }
795
- try {
796
- window.sessionStorage.removeItem("lystech-edit");
797
- } catch {
798
- }
799
- window.location.reload();
800
- }, F = o ? p(o) : void 0, H = !o && !E;
801
- return /* @__PURE__ */ f("div", { className: "calque", children: [
814
+ ie();
815
+ }, F = n ? p(n) : void 0, J = !n && !A;
816
+ return /* @__PURE__ */ m("div", { className: "calque", children: [
802
817
  /* @__PURE__ */ e(
803
818
  "div",
804
819
  {
@@ -807,14 +822,15 @@ function Se({ api: n, pont: t }) {
807
822
  }
808
823
  ),
809
824
  t.sourceTexte && /* @__PURE__ */ e(
810
- Ee,
825
+ ze,
811
826
  {
812
827
  source: t.sourceTexte,
813
- actif: H && !I && y === "modifier",
814
- surModification: _
828
+ actif: J && !I && y === "modifier",
829
+ modifiable: Z,
830
+ surModification: Q
815
831
  }
816
832
  ),
817
- H && /* @__PURE__ */ f("div", { className: "barre", children: [
833
+ J && /* @__PURE__ */ m("div", { className: "barre", children: [
818
834
  /* @__PURE__ */ e("span", { className: "barre__point" }),
819
835
  /* @__PURE__ */ e("span", { className: "barre__texte", children: y === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
820
836
  /* @__PURE__ */ e(
@@ -827,14 +843,14 @@ function Se({ api: n, pont: t }) {
827
843
  children: y === "modifier" ? "Circuler" : "Modifier"
828
844
  }
829
845
  ),
830
- x.length > 0 ? /* @__PURE__ */ f(re, { children: [
831
- /* @__PURE__ */ e("span", { className: "barre__compte", children: x.length === 1 ? "1 modification non publiée" : `${x.length} modifications non publiées` }),
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` }),
832
848
  /* @__PURE__ */ e(
833
849
  "button",
834
850
  {
835
851
  type: "button",
836
852
  className: "bouton bouton--principal",
837
- onClick: Q,
853
+ onClick: q,
838
854
  disabled: I,
839
855
  children: "Publier"
840
856
  }
@@ -844,7 +860,7 @@ function Se({ api: n, pont: t }) {
844
860
  {
845
861
  type: "button",
846
862
  className: "bouton bouton--discret",
847
- onClick: le,
863
+ onClick: de,
848
864
  disabled: I,
849
865
  children: "Abandonner"
850
866
  }
@@ -855,7 +871,7 @@ function Se({ api: n, pont: t }) {
855
871
  {
856
872
  type: "button",
857
873
  className: "bouton bouton--icone bouton--discret",
858
- onClick: () => D(!0),
874
+ onClick: () => T(!0),
859
875
  title: "Tous les contenus",
860
876
  "aria-label": "Tous les contenus",
861
877
  children: "⋮"
@@ -866,17 +882,17 @@ function Se({ api: n, pont: t }) {
866
882
  {
867
883
  type: "button",
868
884
  className: "bouton bouton--icone bouton--sortie",
869
- onClick: me,
885
+ onClick: be,
870
886
  title: "Quitter le mode édition",
871
887
  "aria-label": "Quitter le mode édition",
872
888
  children: "✕"
873
889
  }
874
890
  )
875
891
  ] }),
876
- M && H && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + M.ton, children: M.texte }) }),
877
- E && /* @__PURE__ */ f("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
878
- /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
879
- /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
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: [
880
896
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Tous les contenus" }),
881
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." })
882
898
  ] }),
@@ -885,41 +901,41 @@ function Se({ api: n, pont: t }) {
885
901
  {
886
902
  type: "button",
887
903
  className: "bouton bouton--icone bouton--discret",
888
- onClick: () => D(!1),
904
+ onClick: () => T(!1),
889
905
  "aria-label": "Fermer",
890
906
  children: "✕"
891
907
  }
892
908
  )
893
909
  ] }),
894
- /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
895
- c.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
896
- c.map((u) => {
897
- const m = a.find((A) => A.blockType === u.blockType), g = m?.draft && !oe(m.draft, m.data);
898
- return /* @__PURE__ */ f(
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(
899
915
  "button",
900
916
  {
901
917
  type: "button",
902
918
  className: "rangee",
903
- onClick: () => ue(u.blockType),
919
+ onClick: () => pe(c.blockType),
904
920
  children: [
905
- /* @__PURE__ */ e("span", { className: "rangee__nom", children: u.label }),
906
- /* @__PURE__ */ e("span", { className: "rangee__info", children: g ? "non publié" : `${u.fields.length} textes` })
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` })
907
923
  ]
908
924
  },
909
- u.blockType
925
+ c.blockType
910
926
  );
911
927
  })
912
928
  ] })
913
929
  ] }),
914
- o && F && /* @__PURE__ */ f(
930
+ n && F && /* @__PURE__ */ m(
915
931
  "div",
916
932
  {
917
933
  className: "panneau",
918
934
  role: "dialog",
919
935
  "aria-label": "Modifier " + F.label,
920
936
  children: [
921
- /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
922
- /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
937
+ /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
938
+ /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
923
939
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: F.label }),
924
940
  F.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: F.description })
925
941
  ] }),
@@ -928,32 +944,32 @@ function Se({ api: n, pont: t }) {
928
944
  {
929
945
  type: "button",
930
946
  className: "bouton bouton--icone bouton--discret",
931
- onClick: () => i(null),
947
+ onClick: () => u(null),
932
948
  "aria-label": "Fermer",
933
949
  children: "✕"
934
950
  }
935
951
  )
936
952
  ] }),
937
- /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
938
- M && /* @__PURE__ */ e("p", { className: "message message--" + M.ton, children: M.texte }),
939
- F.fields.map((u) => /* @__PURE__ */ e(
940
- se,
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,
941
957
  {
942
- champ: u,
958
+ champ: c,
943
959
  langue: t.langue,
944
- valeur: h[u.key],
945
- changer: (m) => de(u.key, m)
960
+ valeur: x[c.key],
961
+ changer: (f) => fe(c.key, f)
946
962
  },
947
- u.key
963
+ c.key
948
964
  ))
949
965
  ] }),
950
- /* @__PURE__ */ f("div", { className: "panneau__pied", children: [
966
+ /* @__PURE__ */ m("div", { className: "panneau__pied", children: [
951
967
  /* @__PURE__ */ e(
952
968
  "button",
953
969
  {
954
970
  type: "button",
955
971
  className: "bouton bouton--discret",
956
- onClick: () => i(null),
972
+ onClick: () => u(null),
957
973
  disabled: I,
958
974
  children: "Fermer"
959
975
  }
@@ -964,7 +980,7 @@ function Se({ api: n, pont: t }) {
964
980
  {
965
981
  type: "button",
966
982
  className: "bouton bouton--principal",
967
- onClick: pe,
983
+ onClick: me,
968
984
  disabled: I,
969
985
  children: "Enregistrer"
970
986
  }
@@ -975,7 +991,7 @@ function Se({ api: n, pont: t }) {
975
991
  )
976
992
  ] });
977
993
  }
978
- const ze = `
994
+ const Oe = `
979
995
  :host {
980
996
  all: initial;
981
997
  --fond: #16181d;
@@ -1277,7 +1293,7 @@ input:focus, select:focus, textarea:focus {
1277
1293
  @media (prefers-reduced-motion: reduce) {
1278
1294
  * { transition: none !important; animation: none !important; }
1279
1295
  }
1280
- `, De = `
1296
+ `, Pe = `
1281
1297
  /* --------------------------------------------------------- CHOIX -------- */
1282
1298
 
1283
1299
  /* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
@@ -1327,7 +1343,7 @@ input:focus, select:focus, textarea:focus {
1327
1343
  max-width: min(460px, calc(100vw - 24px));
1328
1344
  }
1329
1345
  .flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
1330
- `, Te = `
1346
+ `, Me = `
1331
1347
  /* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
1332
1348
  se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
1333
1349
  present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
@@ -1355,77 +1371,72 @@ input:focus, select:focus, textarea:focus {
1355
1371
  discrete le reste du temps — c'est le geste qu'on fait une fois. */
1356
1372
  .bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
1357
1373
  .bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
1358
- `, Pe = "lystech-editeur-hote", Me = "lystech-connexion-hote";
1359
- function ie(n) {
1360
- document.getElementById(n)?.remove();
1374
+ `, Le = "lystech-editeur-hote", Ie = "lystech-connexion-hote";
1375
+ function le(o) {
1376
+ document.getElementById(o)?.remove();
1361
1377
  const t = document.createElement("div");
1362
- t.id = n, document.body.appendChild(t);
1363
- const s = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1364
- r.textContent = ze + De + Te, s.appendChild(r);
1365
- const a = document.createElement("div");
1366
- return s.appendChild(a), { hote: t, point: a };
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 };
1367
1383
  }
1368
- function ce(n, t) {
1369
- let s = n;
1384
+ function ue(o, t) {
1385
+ let a = o;
1370
1386
  return () => {
1371
- const r = s;
1372
- s = null, setTimeout(() => {
1387
+ const r = a;
1388
+ a = null, setTimeout(() => {
1373
1389
  r?.unmount(), t.remove();
1374
1390
  }, 0);
1375
1391
  };
1376
1392
  }
1377
- function Be({
1378
- site: n,
1393
+ function Ue({
1394
+ site: o,
1379
1395
  apiBaseUrl: t,
1380
- methodes: s,
1396
+ methodes: a,
1381
1397
  surJeton: r
1382
1398
  }) {
1383
- const { hote: a, point: d } = ie(Me), l = ae(d), b = () => o();
1399
+ const { hote: d, point: s } = le(Ie), l = se(s), g = () => n();
1384
1400
  l.render(
1385
1401
  /* @__PURE__ */ e(
1386
- ye,
1402
+ Ce,
1387
1403
  {
1388
- site: n,
1404
+ site: o,
1389
1405
  apiBaseUrl: t,
1390
- ...s ? { methodes: s } : {},
1391
- surJeton: (i) => {
1392
- o(), r(i);
1406
+ ...a ? { methodes: a } : {},
1407
+ surJeton: (u) => {
1408
+ n(), r(u);
1393
1409
  },
1394
- surFermer: b
1410
+ surFermer: g
1395
1411
  }
1396
1412
  )
1397
1413
  );
1398
- const o = ce(l, a);
1399
- return o;
1414
+ const n = ue(l, d);
1415
+ return n;
1400
1416
  }
1401
- function _e({
1402
- jeton: n,
1417
+ function Fe({
1418
+ jeton: o,
1403
1419
  site: t,
1404
- apiBaseUrl: s,
1420
+ apiBaseUrl: a,
1405
1421
  pont: r
1406
1422
  }) {
1407
- const { hote: a, point: d } = ie(Pe), l = ae(d), b = () => {
1408
- try {
1409
- window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit");
1410
- } catch {
1411
- }
1412
- try {
1413
- window.sessionStorage.removeItem("lystech-edit");
1414
- } catch {
1415
- }
1416
- window.location.reload();
1417
- };
1423
+ const { hote: d, point: s } = le(Le), l = se(s);
1418
1424
  return l.render(
1419
1425
  /* @__PURE__ */ e(
1420
- Se,
1426
+ Te,
1421
1427
  {
1422
- api: fe({ jeton: n, site: t, apiBaseUrl: s, surJetonRefuse: b }),
1428
+ api: xe({
1429
+ jeton: o,
1430
+ site: t,
1431
+ apiBaseUrl: a,
1432
+ surJetonRefuse: ie
1433
+ }),
1423
1434
  pont: r
1424
1435
  }
1425
1436
  )
1426
- ), ce(l, a);
1437
+ ), ue(l, d);
1427
1438
  }
1428
1439
  export {
1429
- Be as monterConnexion,
1430
- _e as monterEditeur
1440
+ Ue as monterConnexion,
1441
+ Fe as monterEditeur
1431
1442
  };