@vimine/sdk 0.3.4 → 0.3.6
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/CHANGELOG.md +16 -0
- package/dist/elements.d.ts +51 -6
- package/dist/elements.js +58 -14
- package/dist/elements.js.map +1 -1
- package/dist/generated.d.ts +19 -0
- package/dist/generated.js +2 -1
- package/dist/generated.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +9 -5
- package/dist/types.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Registro delle modifiche
|
|
2
|
+
|
|
3
|
+
<!-- Fatto da scripts/news.mjs con le voci di news/entries.mjs (npm run news:write): si cambiano le voci, non questo file. -->
|
|
4
|
+
|
|
5
|
+
Le modifiche di `@vimine/sdk`, dalla più recente. Le stesse voci, accanto a quelle dell’API, in ogni lingua del
|
|
6
|
+
portale: https://developers.vimine.network/news/ (in English: https://developers.vimine.network/en/news/).
|
|
7
|
+
|
|
8
|
+
## 0.3.6 — 29 ottobre 2026
|
|
9
|
+
|
|
10
|
+
- **La sessione dice l’associazione** — `getSession().aps` dice in quale associazione il socio ha fatto l’accesso (`slug`, `name`, `picture_url`) e resta quando il token si rinnova. Nei tipi generati arrivano `Spec.Regolamento`, `Spec.operations.getApsRegolamento` e `aps.website` in `Spec.ApsPublicConfig`.
|
|
11
|
+
|
|
12
|
+
## 0.3.5 — 25 ottobre 2026
|
|
13
|
+
|
|
14
|
+
- **Cinese tradizionale nell’uso di Taiwan** — Gli elementi in cinese tradizionale seguono l’uso di Taiwan (登出, QR Code, 發生錯誤…): i testi erano stati convertiti automaticamente da quelli in cinese semplificato, parole comprese.
|
|
15
|
+
|
|
16
|
+
Le versioni precedenti sono nella storia del repository.
|
package/dist/elements.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ declare const STRINGS: {
|
|
|
10
10
|
error: string;
|
|
11
11
|
noEvents: string;
|
|
12
12
|
free: string;
|
|
13
|
-
places:
|
|
13
|
+
places: {
|
|
14
|
+
one: string;
|
|
15
|
+
other: string;
|
|
16
|
+
};
|
|
14
17
|
register: string;
|
|
15
18
|
signInToRegister: string;
|
|
16
19
|
joinAndBook: string;
|
|
@@ -30,7 +33,10 @@ declare const STRINGS: {
|
|
|
30
33
|
error: string;
|
|
31
34
|
noEvents: string;
|
|
32
35
|
free: string;
|
|
33
|
-
places:
|
|
36
|
+
places: {
|
|
37
|
+
one: string;
|
|
38
|
+
other: string;
|
|
39
|
+
};
|
|
34
40
|
register: string;
|
|
35
41
|
signInToRegister: string;
|
|
36
42
|
joinAndBook: string;
|
|
@@ -90,7 +96,10 @@ declare const STRINGS: {
|
|
|
90
96
|
error: string;
|
|
91
97
|
noEvents: string;
|
|
92
98
|
free: string;
|
|
93
|
-
places:
|
|
99
|
+
places: {
|
|
100
|
+
one: string;
|
|
101
|
+
other: string;
|
|
102
|
+
};
|
|
94
103
|
register: string;
|
|
95
104
|
signInToRegister: string;
|
|
96
105
|
joinAndBook: string;
|
|
@@ -110,7 +119,10 @@ declare const STRINGS: {
|
|
|
110
119
|
error: string;
|
|
111
120
|
noEvents: string;
|
|
112
121
|
free: string;
|
|
113
|
-
places:
|
|
122
|
+
places: {
|
|
123
|
+
one: string;
|
|
124
|
+
other: string;
|
|
125
|
+
};
|
|
114
126
|
register: string;
|
|
115
127
|
signInToRegister: string;
|
|
116
128
|
joinAndBook: string;
|
|
@@ -130,7 +142,10 @@ declare const STRINGS: {
|
|
|
130
142
|
error: string;
|
|
131
143
|
noEvents: string;
|
|
132
144
|
free: string;
|
|
133
|
-
places:
|
|
145
|
+
places: {
|
|
146
|
+
one: string;
|
|
147
|
+
other: string;
|
|
148
|
+
};
|
|
134
149
|
register: string;
|
|
135
150
|
signInToRegister: string;
|
|
136
151
|
joinAndBook: string;
|
|
@@ -150,7 +165,35 @@ declare const STRINGS: {
|
|
|
150
165
|
error: string;
|
|
151
166
|
noEvents: string;
|
|
152
167
|
free: string;
|
|
153
|
-
places:
|
|
168
|
+
places: {
|
|
169
|
+
one: string;
|
|
170
|
+
other: string;
|
|
171
|
+
};
|
|
172
|
+
register: string;
|
|
173
|
+
signInToRegister: string;
|
|
174
|
+
joinAndBook: string;
|
|
175
|
+
alreadyMember: string;
|
|
176
|
+
registered: string;
|
|
177
|
+
reserved: string;
|
|
178
|
+
details: string;
|
|
179
|
+
reason: Record<string, string>;
|
|
180
|
+
};
|
|
181
|
+
ru: {
|
|
182
|
+
signIn: string;
|
|
183
|
+
signOut: string;
|
|
184
|
+
loading: string;
|
|
185
|
+
notSignedIn: string;
|
|
186
|
+
noMembership: string;
|
|
187
|
+
notActive: string;
|
|
188
|
+
error: string;
|
|
189
|
+
noEvents: string;
|
|
190
|
+
free: string;
|
|
191
|
+
places: {
|
|
192
|
+
one: string;
|
|
193
|
+
few: string;
|
|
194
|
+
many: string;
|
|
195
|
+
other: string;
|
|
196
|
+
};
|
|
154
197
|
register: string;
|
|
155
198
|
signInToRegister: string;
|
|
156
199
|
joinAndBook: string;
|
|
@@ -164,6 +207,8 @@ declare const STRINGS: {
|
|
|
164
207
|
type Lang = keyof typeof STRINGS;
|
|
165
208
|
/** The elements' language for a page's tag, or null when they do not speak it (`preview`: drafts included). */
|
|
166
209
|
export declare const matchLang: (tag: string, preview?: boolean) => Lang | null;
|
|
210
|
+
/** "1 posto", "5 posti", "21 место": the places left, in the reader's plural — a language without one keeps one word. */
|
|
211
|
+
export declare const placesLabel: (n: number, lang: Lang) => string;
|
|
167
212
|
/** The client the elements use. Call once; pass your own instance to share it with the rest of the page. */
|
|
168
213
|
export declare function defineVimineElements(options: VimineOptions | Vimine, elements?: {
|
|
169
214
|
previewLanguages?: boolean;
|
package/dist/elements.js
CHANGED
|
@@ -30,7 +30,7 @@ const STRINGS = {
|
|
|
30
30
|
error: "Si è verificato un errore.",
|
|
31
31
|
noEvents: "Nessun evento in programma.",
|
|
32
32
|
free: "gratuita",
|
|
33
|
-
places: "posti",
|
|
33
|
+
places: { one: "posto", other: "posti" },
|
|
34
34
|
register: "Iscriviti",
|
|
35
35
|
signInToRegister: "Accedi per iscriverti",
|
|
36
36
|
joinAndBook: "Iscriviti all’associazione e prenota",
|
|
@@ -65,7 +65,7 @@ const STRINGS = {
|
|
|
65
65
|
error: "Something went wrong.",
|
|
66
66
|
noEvents: "No upcoming events.",
|
|
67
67
|
free: "free",
|
|
68
|
-
places: "places",
|
|
68
|
+
places: { one: "place", other: "places" },
|
|
69
69
|
register: "Register",
|
|
70
70
|
signInToRegister: "Sign in to register",
|
|
71
71
|
joinAndBook: "Join the association and book",
|
|
@@ -127,13 +127,13 @@ const STRINGS = {
|
|
|
127
127
|
},
|
|
128
128
|
"zh-Hant": {
|
|
129
129
|
signIn: "使用 Vimine 登入",
|
|
130
|
-
signOut: "
|
|
130
|
+
signOut: "登出",
|
|
131
131
|
loading: "載入中…",
|
|
132
132
|
notSignedIn: "請登入以檢視您的會員卡。",
|
|
133
133
|
noMembership: "您在這個協會沒有會員卡。",
|
|
134
|
-
notActive: "
|
|
135
|
-
error: "
|
|
136
|
-
noEvents: "
|
|
134
|
+
notActive: "會員卡尚未生效:生效後會顯示 QR Code。",
|
|
135
|
+
error: "發生錯誤。",
|
|
136
|
+
noEvents: "目前沒有安排的活動。",
|
|
137
137
|
free: "免費",
|
|
138
138
|
places: "個名額",
|
|
139
139
|
register: "報名",
|
|
@@ -142,7 +142,7 @@ const STRINGS = {
|
|
|
142
142
|
alreadyMember: "已是會員?請登入",
|
|
143
143
|
registered: "報名已確認",
|
|
144
144
|
reserved: "名額已保留:等待繳納參與費",
|
|
145
|
-
details: "
|
|
145
|
+
details: "詳細資訊",
|
|
146
146
|
reason: {
|
|
147
147
|
sold_out: "名額已滿",
|
|
148
148
|
event_full: "已滿員",
|
|
@@ -155,7 +155,7 @@ const STRINGS = {
|
|
|
155
155
|
max_per_user: "已報名",
|
|
156
156
|
event_past: "活動已結束",
|
|
157
157
|
event_cancelled: "活動已取消",
|
|
158
|
-
event_not_published: "
|
|
158
|
+
event_not_published: "未發布",
|
|
159
159
|
plan_limit: "不可用",
|
|
160
160
|
invalid_type: "類型無效",
|
|
161
161
|
},
|
|
@@ -170,7 +170,7 @@ const STRINGS = {
|
|
|
170
170
|
error: "Une erreur s'est produite.",
|
|
171
171
|
noEvents: "Aucun événement prévu.",
|
|
172
172
|
free: "gratuite",
|
|
173
|
-
places: "places",
|
|
173
|
+
places: { one: "place", other: "places" },
|
|
174
174
|
register: "S'inscrire",
|
|
175
175
|
signInToRegister: "Se connecter pour s'inscrire",
|
|
176
176
|
joinAndBook: "Adhérer à l'association et réserver",
|
|
@@ -205,7 +205,7 @@ const STRINGS = {
|
|
|
205
205
|
error: "Se ha producido un error.",
|
|
206
206
|
noEvents: "No hay eventos programados.",
|
|
207
207
|
free: "gratuita",
|
|
208
|
-
places: "plazas",
|
|
208
|
+
places: { one: "plaza", other: "plazas" },
|
|
209
209
|
register: "Inscríbete",
|
|
210
210
|
signInToRegister: "Inicia sesión para inscribirte",
|
|
211
211
|
joinAndBook: "Hazte socio y reserva",
|
|
@@ -240,7 +240,7 @@ const STRINGS = {
|
|
|
240
240
|
error: "Ein Fehler ist aufgetreten.",
|
|
241
241
|
noEvents: "Keine Veranstaltungen geplant.",
|
|
242
242
|
free: "kostenlos",
|
|
243
|
-
places: "Plätze",
|
|
243
|
+
places: { one: "Platz", other: "Plätze" },
|
|
244
244
|
register: "Teilnehmen",
|
|
245
245
|
signInToRegister: "Zum Teilnehmen anmelden",
|
|
246
246
|
joinAndBook: "Dem Verein beitreten und Platz reservieren",
|
|
@@ -275,7 +275,7 @@ const STRINGS = {
|
|
|
275
275
|
error: "Ocorreu um erro.",
|
|
276
276
|
noEvents: "Nenhum evento programado.",
|
|
277
277
|
free: "gratuita",
|
|
278
|
-
places: "vagas",
|
|
278
|
+
places: { one: "vaga", other: "vagas" },
|
|
279
279
|
register: "Inscrever-se",
|
|
280
280
|
signInToRegister: "Entre para se inscrever",
|
|
281
281
|
joinAndBook: "Associe-se e reserve",
|
|
@@ -300,13 +300,49 @@ const STRINGS = {
|
|
|
300
300
|
invalid_type: "tipo inválido",
|
|
301
301
|
},
|
|
302
302
|
},
|
|
303
|
+
// drafted 2026-10-22, pending its native review (LOCALE_EXPANSION_PLAN LX8 in the app repository): see DRAFT_LANGS
|
|
304
|
+
ru: {
|
|
305
|
+
signIn: "Войти через Vimine",
|
|
306
|
+
signOut: "Выйти",
|
|
307
|
+
loading: "Загрузка…",
|
|
308
|
+
notSignedIn: "Войдите, чтобы увидеть свою членскую карту.",
|
|
309
|
+
noMembership: "Нет членства в этой организации.",
|
|
310
|
+
notActive: "Членская карта ещё не активна: код появится, когда она станет активной.",
|
|
311
|
+
error: "Произошла ошибка.",
|
|
312
|
+
noEvents: "Запланированных мероприятий нет.",
|
|
313
|
+
free: "бесплатно",
|
|
314
|
+
places: { one: "место", few: "места", many: "мест", other: "места" },
|
|
315
|
+
register: "Зарегистрироваться",
|
|
316
|
+
signInToRegister: "Войти, чтобы зарегистрироваться",
|
|
317
|
+
joinAndBook: "Вступить в организацию и забронировать место",
|
|
318
|
+
alreadyMember: "Уже член организации? Войти",
|
|
319
|
+
registered: "Регистрация подтверждена",
|
|
320
|
+
reserved: "Место забронировано: ожидается взнос за участие",
|
|
321
|
+
details: "Подробнее",
|
|
322
|
+
reason: {
|
|
323
|
+
sold_out: "места закончились",
|
|
324
|
+
event_full: "все места заняты",
|
|
325
|
+
registration_not_open: "регистрация ещё не открыта",
|
|
326
|
+
registration_closed: "регистрация закрыта",
|
|
327
|
+
membership_required: "только для членов организации",
|
|
328
|
+
membership_not_active: "членство недействительно",
|
|
329
|
+
membership_not_yet_valid: "на эту дату ваша членская карта ещё не действует",
|
|
330
|
+
membership_type_not_allowed: "этот тип членства не допускается",
|
|
331
|
+
max_per_user: "вы уже зарегистрированы",
|
|
332
|
+
event_past: "мероприятие завершено",
|
|
333
|
+
event_cancelled: "мероприятие отменено",
|
|
334
|
+
event_not_published: "не опубликовано",
|
|
335
|
+
plan_limit: "недоступно",
|
|
336
|
+
invalid_type: "недопустимый тип",
|
|
337
|
+
},
|
|
338
|
+
},
|
|
303
339
|
};
|
|
304
340
|
// Languages drafted and not yet read by a native speaker — as on the platform, which serves a draft only where its preview
|
|
305
341
|
// switch names it. Their strings ship, but an element speaks one only on a page that opted in
|
|
306
342
|
// (`defineVimineElements(options, { previewLanguages: true })`); elsewhere it speaks Italian, as the platform would.
|
|
307
343
|
// A language leaves this list with the platform, in an SDK release. Empty since 2026-10-20: the platform enabled its six
|
|
308
344
|
// drafted languages ahead of their review (the owner's decision), and the elements speak them with it.
|
|
309
|
-
const DRAFT_LANGS = [];
|
|
345
|
+
const DRAFT_LANGS = ["ru"];
|
|
310
346
|
let previewLanguages = false;
|
|
311
347
|
// The page's language → the elements' own: the tag itself, Chinese by script (zh-TW, zh-HK → Traditional; zh, zh-CN →
|
|
312
348
|
// Simplified), any other variant to the language's (en-GB → en, pt-PT → pt-BR); Italian otherwise. The platform's rule.
|
|
@@ -339,6 +375,14 @@ const INTL = {
|
|
|
339
375
|
es: "es-ES",
|
|
340
376
|
de: "de-DE",
|
|
341
377
|
"pt-BR": "pt-BR",
|
|
378
|
+
ru: "ru-RU",
|
|
379
|
+
};
|
|
380
|
+
/** "1 posto", "5 posti", "21 место": the places left, in the reader's plural — a language without one keeps one word. */
|
|
381
|
+
export const placesLabel = (n, lang) => {
|
|
382
|
+
const word = STRINGS[lang].places;
|
|
383
|
+
if (typeof word === "string")
|
|
384
|
+
return `${n} ${word}`;
|
|
385
|
+
return `${n} ${word[new Intl.PluralRules(INTL[lang]).select(n)] ?? word.other}`;
|
|
342
386
|
};
|
|
343
387
|
const BASE_CSS = /* CSS */ `
|
|
344
388
|
:host { display: inline-block; font-family: var(--vimine-font, system-ui, sans-serif); color: var(--vimine-color, #111); }
|
|
@@ -792,7 +836,7 @@ button.link { background: none; color: var(--vimine-accent, #0a0e1a); padding: 0
|
|
|
792
836
|
const s = document.createElement("div");
|
|
793
837
|
s.className = "muted";
|
|
794
838
|
s.textContent = [
|
|
795
|
-
tp.remaining != null ?
|
|
839
|
+
tp.remaining != null ? placesLabel(tp.remaining, lang) : "",
|
|
796
840
|
tp.reason ? t.reason[tp.reason] || tp.reason : "",
|
|
797
841
|
]
|
|
798
842
|
.filter(Boolean)
|
package/dist/elements.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,gHAAgH;AAChH,mGAAmG;AACnG,EAAE;AACF,iEAAiE;AACjE,kGAAkG;AAClG,EAAE;AACF,+FAA+F;AAC/F,uGAAuG;AACvG,qHAAqH;AACrH,oHAAoH;AACpH,yHAAyH;AACzH,wGAAwG;AACxG,0GAA0G;AAC1G,uHAAuH;AACvH,iGAAiG;AACjG,EAAE;AACF,sGAAsG;AACtG,6EAA6E;AAC7E,OAAO,EAAE,MAAM,EAAsB,MAAM,YAAY,CAAC;AAGxD,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,MAAM,OAAO,GAAG;IACd,EAAE,EAAE;QACF,MAAM,EAAE,mBAAmB;QAC3B,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,yCAAyC;QACvD,SAAS,EACP,sEAAsE;QACxE,KAAK,EAAE,4BAA4B;QACnC,QAAQ,EAAE,6BAA6B;QACvC,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,WAAW;QACrB,gBAAgB,EAAE,uBAAuB;QACzC,WAAW,EAAE,sCAAsC;QACnD,aAAa,EAAE,wBAAwB;QACvC,UAAU,EAAE,uBAAuB;QACnC,QAAQ,EAAE,2CAA2C;QACrD,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE;YACN,QAA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,CAAC,SAAS,GAAG,OAAO,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// @vimine/sdk/elements — the low-code tier: three custom elements over the browser client, Shadow DOM,\n// styled through `--vimine-*` CSS custom properties, Italian by default (`lang=\"en\"` on the element or the page\n// switches the strings). Register them once, then use the tags anywhere (CMS pages, static sites):\n//\n// import { defineVimineElements } from '@vimine/sdk/elements';\n// defineVimineElements({ clientId: 'vmc_…', redirectUri: 'https://www.example.org/callback' });\n//\n// <vimine-sign-in scope=\"membership:read\"></vimine-sign-in> a \"Sign in with Vimine\" button\n// <vimine-card></vimine-card> the signed-in member's card (SVG + QR)\n// <vimine-enroll slug=\"your-slug\"></vimine-enroll> the hosted enrolment form (iframe, Embed v0), in the\n// element's language; someone who already has a\n// Vimine account is offered a hand-off to the hosted\n// page, where they join in one step\n// <vimine-events slug=\"your-slug\"></vimine-events> the association's events (public ones for\n// visitors, every one for a signed-in member) with\n// a register button per type\n//\n// The callback page still calls `client.handleRedirect()` (or `<vimine-sign-in>` does it for you when\n// `handle-redirect` is set on the element and the page is the redirect URI).\nimport { Vimine, type VimineOptions } from \"./index.js\";\nimport type { Event, Registration, RegistrationType, Scope } from \"./types.js\";\n\nlet shared: Vimine | null = null;\n\nconst STRINGS = {\n it: {\n signIn: \"Accedi con Vimine\",\n signOut: \"Esci\",\n loading: \"Caricamento…\",\n notSignedIn: \"Accedi per vedere la tua tessera.\",\n noMembership: \"Nessuna tessera in questa associazione.\",\n notActive:\n \"La tessera non è ancora attiva: il codice compare quando lo diventa.\",\n error: \"Si è verificato un errore.\",\n noEvents: \"Nessun evento in programma.\",\n free: \"gratuita\",\n places: \"posti\",\n register: \"Iscriviti\",\n signInToRegister: \"Accedi per iscriverti\",\n joinAndBook: \"Iscriviti all’associazione e prenota\",\n alreadyMember: \"Sono già socio: accedi\",\n registered: \"Iscrizione confermata\",\n reserved: \"Posto riservato: in attesa del contributo\",\n details: \"Dettagli\",\n reason: {\n sold_out: \"esaurito\",\n event_full: \"al completo\",\n registration_not_open: \"iscrizioni non ancora aperte\",\n registration_closed: \"iscrizioni chiuse\",\n membership_required: \"riservato ai soci\",\n membership_not_active: \"tessera non valida\",\n membership_not_yet_valid:\n \"la tessera non è ancora utilizzabile a quella data\",\n membership_type_not_allowed: \"tipo di tessera non ammesso\",\n max_per_user: \"già iscritto\",\n event_past: \"evento concluso\",\n event_cancelled: \"evento annullato\",\n event_not_published: \"non pubblicato\",\n plan_limit: \"non disponibile\",\n invalid_type: \"tipo non valido\",\n } as Record<string, string>,\n },\n en: {\n signIn: \"Sign in with Vimine\",\n signOut: \"Sign out\",\n loading: \"Loading…\",\n notSignedIn: \"Sign in to see your card.\",\n noMembership: \"No membership in this association.\",\n notActive: \"The card is not active yet: its code appears once it is.\",\n error: \"Something went wrong.\",\n noEvents: \"No upcoming events.\",\n free: \"free\",\n places: \"places\",\n register: \"Register\",\n signInToRegister: \"Sign in to register\",\n joinAndBook: \"Join the association and book\",\n alreadyMember: \"Already a member? Sign in\",\n registered: \"Registration confirmed\",\n reserved: \"Place reserved: awaiting the contribution\",\n details: \"Details\",\n reason: {\n sold_out: \"sold out\",\n event_full: \"full\",\n registration_not_open: \"registrations not open yet\",\n registration_closed: \"registrations closed\",\n membership_required: \"members only\",\n membership_not_active: \"membership not valid\",\n membership_not_yet_valid: \"your card is not usable yet on that date\",\n membership_type_not_allowed: \"membership type not admitted\",\n max_per_user: \"already registered\",\n event_past: \"event over\",\n event_cancelled: \"event cancelled\",\n event_not_published: \"not published\",\n plan_limit: \"not available\",\n invalid_type: \"invalid type\",\n } as Record<string, string>,\n },\n \"zh-Hans\": {\n signIn: \"使用 Vimine 登录\",\n signOut: \"退出\",\n loading: \"加载中…\",\n notSignedIn: \"请登录以查看您的会员卡。\",\n noMembership: \"您在这个协会没有会员卡。\",\n notActive: \"会员卡尚未生效:生效后会显示二维码。\",\n error: \"出现错误。\",\n noEvents: \"暂无安排的活动。\",\n free: \"免费\",\n places: \"个名额\",\n register: \"报名\",\n signInToRegister: \"登录后报名\",\n joinAndBook: \"加入协会并预约\",\n alreadyMember: \"已是会员?请登录\",\n registered: \"报名已确认\",\n reserved: \"名额已保留:等待缴纳参与费\",\n details: \"详情\",\n reason: {\n sold_out: \"名额已满\",\n event_full: \"已满员\",\n registration_not_open: \"报名尚未开始\",\n registration_closed: \"报名已截止\",\n membership_required: \"仅限会员\",\n membership_not_active: \"会员卡无效\",\n membership_not_yet_valid: \"在该日期您的会员卡尚不可用\",\n membership_type_not_allowed: \"该会员卡类型不在允许范围内\",\n max_per_user: \"已报名\",\n event_past: \"活动已结束\",\n event_cancelled: \"活动已取消\",\n event_not_published: \"未发布\",\n plan_limit: \"不可用\",\n invalid_type: \"类型无效\",\n } as Record<string, string>,\n },\n \"zh-Hant\": {\n signIn: \"使用 Vimine 登入\",\n signOut: \"退出\",\n loading: \"載入中…\",\n notSignedIn: \"請登入以檢視您的會員卡。\",\n noMembership: \"您在這個協會沒有會員卡。\",\n notActive: \"會員卡尚未生效:生效後會顯示二維碼。\",\n error: \"出現錯誤。\",\n noEvents: \"暫無安排的活動。\",\n free: \"免費\",\n places: \"個名額\",\n register: \"報名\",\n signInToRegister: \"登入後報名\",\n joinAndBook: \"加入協會並預約\",\n alreadyMember: \"已是會員?請登入\",\n registered: \"報名已確認\",\n reserved: \"名額已保留:等待繳納參與費\",\n details: \"詳情\",\n reason: {\n sold_out: \"名額已滿\",\n event_full: \"已滿員\",\n registration_not_open: \"報名尚未開始\",\n registration_closed: \"報名已截止\",\n membership_required: \"僅限會員\",\n membership_not_active: \"會員卡無效\",\n membership_not_yet_valid: \"在該日期您的會員卡尚不可用\",\n membership_type_not_allowed: \"該會員卡類型不在允許範圍內\",\n max_per_user: \"已報名\",\n event_past: \"活動已結束\",\n event_cancelled: \"活動已取消\",\n event_not_published: \"未釋出\",\n plan_limit: \"不可用\",\n invalid_type: \"類型無效\",\n } as Record<string, string>,\n },\n \"fr\": {\n signIn: \"Se connecter avec Vimine\",\n signOut: \"Se déconnecter\",\n loading: \"Chargement…\",\n notSignedIn: \"Connectez-vous pour voir votre carte.\",\n noMembership: \"Aucune carte dans cette association.\",\n notActive: \"La carte n'est pas encore active : le code apparaîtra lorsqu'elle le sera.\",\n error: \"Une erreur s'est produite.\",\n noEvents: \"Aucun événement prévu.\",\n free: \"gratuite\",\n places: \"places\",\n register: \"S'inscrire\",\n signInToRegister: \"Se connecter pour s'inscrire\",\n joinAndBook: \"Adhérer à l'association et réserver\",\n alreadyMember: \"Déjà membre : se connecter\",\n registered: \"Inscription confirmée\",\n reserved: \"Place réservée : en attente de la contribution\",\n details: \"Détails\",\n reason: {\n sold_out: \"plus de places\",\n event_full: \"complet\",\n registration_not_open: \"inscriptions pas encore ouvertes\",\n registration_closed: \"inscriptions closes\",\n membership_required: \"réservé aux membres\",\n membership_not_active: \"adhésion non valable\",\n membership_not_yet_valid: \"la carte n'est pas encore utilisable à cette date\",\n membership_type_not_allowed: \"type d'adhésion non admis\",\n max_per_user: \"déjà inscrit\",\n event_past: \"événement terminé\",\n event_cancelled: \"événement annulé\",\n event_not_published: \"non publié\",\n plan_limit: \"non disponible\",\n invalid_type: \"type non valide\",\n } as Record<string, string>,\n },\n \"es\": {\n signIn: \"Iniciar sesión con Vimine\",\n signOut: \"Cerrar sesión\",\n loading: \"Cargando…\",\n notSignedIn: \"Inicia sesión para ver tu carné.\",\n noMembership: \"No tienes carné en esta asociación.\",\n notActive: \"El carné aún no está activo: el código aparece cuando lo esté.\",\n error: \"Se ha producido un error.\",\n noEvents: \"No hay eventos programados.\",\n free: \"gratuita\",\n places: \"plazas\",\n register: \"Inscríbete\",\n signInToRegister: \"Inicia sesión para inscribirte\",\n joinAndBook: \"Hazte socio y reserva\",\n alreadyMember: \"¿Ya eres socio? Inicia sesión\",\n registered: \"Inscripción confirmada\",\n reserved: \"Plaza reservada: pendiente de la contribución\",\n details: \"Detalles\",\n reason: {\n sold_out: \"agotado\",\n event_full: \"completo\",\n registration_not_open: \"inscripciones aún no abiertas\",\n registration_closed: \"inscripciones cerradas\",\n membership_required: \"solo para socios\",\n membership_not_active: \"carné no válido\",\n membership_not_yet_valid: \"el carné aún no se puede usar en esa fecha\",\n membership_type_not_allowed: \"tipo de carné no admitido\",\n max_per_user: \"ya inscrito\",\n event_past: \"evento finalizado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"no publicado\",\n plan_limit: \"no disponible\",\n invalid_type: \"tipo no válido\",\n } as Record<string, string>,\n },\n \"de\": {\n signIn: \"Mit Vimine anmelden\",\n signOut: \"Abmelden\",\n loading: \"Wird geladen…\",\n notSignedIn: \"Melden Sie sich an, um Ihren Ausweis zu sehen.\",\n noMembership: \"Keine Mitgliedschaft in diesem Verein.\",\n notActive: \"Der Ausweis ist noch nicht aktiv: Der Code erscheint, sobald er es ist.\",\n error: \"Ein Fehler ist aufgetreten.\",\n noEvents: \"Keine Veranstaltungen geplant.\",\n free: \"kostenlos\",\n places: \"Plätze\",\n register: \"Teilnehmen\",\n signInToRegister: \"Zum Teilnehmen anmelden\",\n joinAndBook: \"Dem Verein beitreten und Platz reservieren\",\n alreadyMember: \"Schon Mitglied? Anmelden\",\n registered: \"Anmeldung bestätigt\",\n reserved: \"Platz reserviert: Beitrag ausstehend\",\n details: \"Details\",\n reason: {\n sold_out: \"ausgebucht\",\n event_full: \"voll\",\n registration_not_open: \"Anmeldung noch nicht offen\",\n registration_closed: \"Anmeldung geschlossen\",\n membership_required: \"nur für Mitglieder\",\n membership_not_active: \"Mitgliedschaft nicht gültig\",\n membership_not_yet_valid: \"Ihr Ausweis ist an diesem Datum noch nicht nutzbar\",\n membership_type_not_allowed: \"Mitgliedsart nicht zugelassen\",\n max_per_user: \"bereits angemeldet\",\n event_past: \"Veranstaltung vorbei\",\n event_cancelled: \"Veranstaltung abgesagt\",\n event_not_published: \"nicht veröffentlicht\",\n plan_limit: \"nicht verfügbar\",\n invalid_type: \"ungültige Art\",\n } as Record<string, string>,\n },\n \"pt-BR\": {\n signIn: \"Entrar com Vimine\",\n signOut: \"Sair\",\n loading: \"Carregando…\",\n notSignedIn: \"Entre para ver sua carteirinha.\",\n noMembership: \"Nenhuma carteirinha nesta associação.\",\n notActive: \"A carteirinha ainda não está ativa: o código aparece quando ela for ativada.\",\n error: \"Ocorreu um erro.\",\n noEvents: \"Nenhum evento programado.\",\n free: \"gratuita\",\n places: \"vagas\",\n register: \"Inscrever-se\",\n signInToRegister: \"Entre para se inscrever\",\n joinAndBook: \"Associe-se e reserve\",\n alreadyMember: \"Já sou associado: entrar\",\n registered: \"Inscrição confirmada\",\n reserved: \"Vaga reservada: aguardando a contribuição\",\n details: \"Detalhes\",\n reason: {\n sold_out: \"esgotado\",\n event_full: \"lotado\",\n registration_not_open: \"inscrições ainda não abertas\",\n registration_closed: \"inscrições encerradas\",\n membership_required: \"exclusivo para associados\",\n membership_not_active: \"carteirinha inválida\",\n membership_not_yet_valid: \"a carteirinha ainda não pode ser usada nessa data\",\n membership_type_not_allowed: \"tipo de carteirinha não admitido\",\n max_per_user: \"já inscrito\",\n event_past: \"evento encerrado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"não publicado\",\n plan_limit: \"indisponível\",\n invalid_type: \"tipo inválido\",\n } as Record<string, string>,\n },\n};\ntype Lang = keyof typeof STRINGS;\n// Languages drafted and not yet read by a native speaker — as on the platform, which serves a draft only where its preview\n// switch names it. Their strings ship, but an element speaks one only on a page that opted in\n// (`defineVimineElements(options, { previewLanguages: true })`); elsewhere it speaks Italian, as the platform would.\n// A language leaves this list with the platform, in an SDK release. Empty since 2026-10-20: the platform enabled its six\n// drafted languages ahead of their review (the owner's decision), and the elements speak them with it.\nconst DRAFT_LANGS: Lang[] = [];\nlet previewLanguages = false;\n// The page's language → the elements' own: the tag itself, Chinese by script (zh-TW, zh-HK → Traditional; zh, zh-CN →\n// Simplified), any other variant to the language's (en-GB → en, pt-PT → pt-BR); Italian otherwise. The platform's rule.\nconst LANGS = Object.keys(STRINGS) as Lang[];\n/** The elements' language for a page's tag, or null when they do not speak it (`preview`: drafts included). */\nexport const matchLang = (tag: string, preview = previewLanguages): Lang | null => {\n const served = LANGS.filter((l) => preview || !DRAFT_LANGS.includes(l));\n const lower = tag.trim().replace(/_/g, \"-\").toLowerCase();\n const exact = served.find((l) => l.toLowerCase() === lower);\n if (exact) return exact;\n const [lang, ...rest] = lower.split(\"-\");\n if (lang === \"zh\") {\n const script = rest.some((p) => [\"hant\", \"tw\", \"hk\", \"mo\"].includes(p)) ? \"zh-Hant\" : \"zh-Hans\";\n return served.includes(script) ? script : null;\n }\n return served.find((l) => l.toLowerCase().split(\"-\")[0] === lang) || null;\n};\nconst langOf = (el: HTMLElement): Lang =>\n matchLang(\n el.getAttribute(\"lang\") ||\n el.closest(\"[lang]\")?.getAttribute(\"lang\") ||\n document.documentElement.lang ||\n \"it\",\n ) || \"it\";\n// Dates and amounts in the reader's conventions: English with day-month order, Chinese naming its script.\nconst INTL: Record<Lang, string> = {\n it: \"it-IT\",\n en: \"en-GB\",\n \"zh-Hans\": \"zh-Hans-CN\",\n \"zh-Hant\": \"zh-Hant-TW\",\n fr: \"fr-FR\",\n es: \"es-ES\",\n de: \"de-DE\",\n \"pt-BR\": \"pt-BR\",\n};\n\nconst BASE_CSS = /* CSS */ `\n:host { display: inline-block; font-family: var(--vimine-font, system-ui, sans-serif); color: var(--vimine-color, #111); }\nbutton { cursor: pointer; border: 0; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font: inherit; font-weight: 600; }\nbutton:disabled { opacity: .6; cursor: default; }\n.muted { color: var(--vimine-muted, #666); font-size: .9em; }\n.error { color: var(--vimine-error, #a33); font-size: .9em; }\n`;\n\nconst shadow = (el: HTMLElement, css: string): ShadowRoot => {\n const root = el.shadowRoot || el.attachShadow({ mode: \"open\" });\n root.innerHTML = `<style>${BASE_CSS}${css}</style>`;\n return root;\n};\n\n/** The client the elements use. Call once; pass your own instance to share it with the rest of the page. */\nexport function defineVimineElements(\n options: VimineOptions | Vimine,\n elements: { previewLanguages?: boolean } = {},\n): Vimine {\n shared = options instanceof Vimine ? options : new Vimine(options);\n previewLanguages = !!elements.previewLanguages;\n if (typeof customElements !== \"undefined\") {\n if (!customElements.get(\"vimine-sign-in\"))\n customElements.define(\"vimine-sign-in\", VimineSignIn);\n if (!customElements.get(\"vimine-card\"))\n customElements.define(\"vimine-card\", VimineCard);\n if (!customElements.get(\"vimine-enroll\"))\n customElements.define(\"vimine-enroll\", VimineEnroll);\n if (!customElements.get(\"vimine-events\"))\n customElements.define(\"vimine-events\", VimineEvents);\n }\n return shared;\n}\n\nconst client = (): Vimine => {\n if (!shared)\n throw new Error(\n \"Vimine elements: call defineVimineElements({ clientId, redirectUri }) first\",\n );\n return shared;\n};\n\n/** `<vimine-sign-in scope=\"…\" return-to=\"/area\" label=\"…\" handle-redirect>` — a sign-in / sign-out button. */\nexport class VimineSignIn extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.boot();\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async boot(): Promise<void> {\n const mp = client();\n if (this.hasAttribute(\"handle-redirect\")) {\n try {\n await mp.handleRedirect();\n } catch (err) {\n this.render(err instanceof Error ? err.message : String(err));\n return;\n }\n }\n this.render();\n this.unsubscribe = mp.onChange(() => this.render());\n }\n private render(error?: string): void {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(this, \"\");\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n if (mp.isSignedIn()) {\n btn.textContent = this.getAttribute(\"label-signed-in\") || t.signOut;\n btn.addEventListener(\n \"click\",\n () => void mp.signOut({ everywhere: this.hasAttribute(\"everywhere\") }),\n );\n } else {\n btn.textContent = this.getAttribute(\"label\") || t.signIn;\n btn.addEventListener(\"click\", () => {\n const scopes = (this.getAttribute(\"scope\") || \"\")\n .split(/[\\s,]+/)\n .filter(Boolean) as Scope[];\n void mp.signIn({\n ...(scopes.length ? { scopes } : {}),\n ...(this.getAttribute(\"return-to\")\n ? { returnTo: this.getAttribute(\"return-to\")! }\n : {}),\n });\n });\n }\n root.appendChild(btn);\n if (error) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = error;\n root.appendChild(e);\n }\n this.dispatchEvent(\n new CustomEvent(\"vimine-change\", {\n detail: { signedIn: mp.isSignedIn() },\n bubbles: true,\n }),\n );\n }\n}\n\n/** `<vimine-card>` — the signed-in member's card as SVG (with the live QR); refreshes when the session changes. */\nexport class VimineCard extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(\n this,\n \":host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }\",\n );\n const note = (cls: string, text: string) => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n if (!mp.isSignedIn()) return note(\"muted\", t.notSignedIn);\n note(\"muted\", t.loading);\n try {\n const svg = await mp.membership.cardSvg();\n root.innerHTML = `<style>${BASE_CSS}:host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }</style>${svg}`;\n this.dispatchEvent(\n new CustomEvent(\"vimine-card\", {\n detail: { loaded: true },\n bubbles: true,\n }),\n );\n } catch (err) {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n const code = (err as { code?: string })?.code;\n // `not_active`: the membership exists but has no card (pending, suspended, revoked) — a state, not a failure.\n const quiet = code === \"not_found\" || code === \"not_active\";\n note(\n quiet ? \"muted\" : \"error\",\n code === \"not_found\"\n ? t.noMembership\n : code === \"not_active\"\n ? t.notActive\n : t.error,\n );\n }\n }\n}\n\n/** The hosted enrolment page of an association, in a language: the frame's address, and where a hand-off lands. */\n/**\n * How the hosted enrolment page looks inside the host site: its scheme, the accent of its buttons, links and the\n * association's name, and the ground behind its cards (`transparent`: the host page shows through). The page reads them\n * from its address — a framed page cannot see the host's CSS — and ignores anything that is not a colour or a keyword.\n */\nexport type EnrollAppearance = { scheme?: \"light\" | \"dark\"; accent?: string; background?: string; font?: Typeface };\n\n/** The faces the hosted page offers — served by Vimine itself — or `system`, the device's own. They set everything. */\nexport const TYPEFACES = [\n \"system\",\n \"inter\",\n \"roboto\",\n \"open-sans\",\n \"montserrat\",\n \"nunito\",\n \"lora\",\n \"merriweather\",\n \"roboto-slab\",\n] as const;\nexport type Typeface = (typeof TYPEFACES)[number];\n\nconst HEX = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;\nconst appearanceQuery = (a?: EnrollAppearance): string => {\n if (!a) return \"\";\n const out: string[] = [];\n if (a.scheme === \"light\" || a.scheme === \"dark\") out.push(`scheme=${a.scheme}`);\n if (a.accent && HEX.test(a.accent)) out.push(`accent=${encodeURIComponent(a.accent.replace(/^#/, \"\"))}`);\n if (a.background === \"transparent\") out.push(\"background=transparent\");\n else if (a.background && HEX.test(a.background))\n out.push(`background=${encodeURIComponent(a.background.replace(/^#/, \"\"))}`);\n if (a.font && (TYPEFACES as readonly string[]).includes(a.font)) out.push(`font=${a.font}`);\n return out.length ? `&${out.join(\"&\")}` : \"\";\n};\n\nexport const enrollUrl = (appUrl: string, slug: string, lang: string, appearance?: EnrollAppearance): string =>\n `${appUrl.replace(/\\/+$/, \"\")}/enroll/${encodeURIComponent(slug)}?locale=${encodeURIComponent(lang)}${appearanceQuery(appearance)}`;\n\n/**\n * The same page, opened FROM an event: the person joins the association and asks for a place at the event in one go.\n * The request carries the event; the place is confirmed, or held until the membership is active.\n */\nexport const eventEnrollUrl = (\n appUrl: string,\n slug: string,\n event: string,\n lang: string,\n): string =>\n `${enrollUrl(appUrl, slug, lang)}&event=${encodeURIComponent(event)}`;\n\n/** Any CSS colour (a name, `rgb()`, `hsl()`, a hex) as `#rrggbb`, resolved by the browser; null when it is none. */\nconst hexColour = (root: ShadowRoot, value: string): string | null => {\n const v = value.trim();\n if (!v) return null;\n const probe = document.createElement(\"span\");\n probe.style.color = v;\n if (!probe.style.color) return null;\n root.appendChild(probe);\n const m = /rgba?\\(([^)]+)\\)/.exec(getComputedStyle(probe).color);\n probe.remove();\n const parts = (m?.[1] ?? \"\").split(/[\\s,/]+/).filter(Boolean).map(Number);\n if (parts.length < 3) return null;\n const [r = 0, g = 0, b = 0, alpha] = parts;\n if (alpha === 0) return null;\n return `#${[r, g, b].map((n) => Math.round(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n};\n\n/**\n * The page's look from the host's CSS: `--vimine-scheme` (light | dark), `--vimine-accent` and `--vimine-background` (a\n * colour, or `transparent`), `--vimine-typeface` (one of TYPEFACES) — custom properties inherit, so one rule on `:root`\n * styles every Vimine element at once.\n */\nconst appearanceOf = (el: HTMLElement, root: ShadowRoot): EnrollAppearance => {\n const css = getComputedStyle(el);\n const read = (name: string) => css.getPropertyValue(name).trim();\n const out: EnrollAppearance = {};\n const scheme = read(\"--vimine-scheme\");\n if (scheme === \"light\" || scheme === \"dark\") out.scheme = scheme;\n const accent = hexColour(root, read(\"--vimine-accent\"));\n if (accent) out.accent = accent;\n const background = read(\"--vimine-background\");\n if (background === \"transparent\") out.background = \"transparent\";\n else {\n const bg = hexColour(root, background);\n if (bg) out.background = bg;\n }\n const typeface = read(\"--vimine-typeface\");\n if ((TYPEFACES as readonly string[]).includes(typeface)) out.font = typeface as Typeface;\n return out;\n};\n\n/**\n * `<vimine-enroll slug=\"…\" app-url=\"https://app.vimine.network\" height=\"900\" lang=\"en\">` — the hosted enrolment form.\n *\n * Styled like the other elements, through CSS custom properties on the element or any ancestor:\n *\n * vimine-enroll { --vimine-scheme: light; --vimine-accent: #1e3a5f; --vimine-background: transparent; }\n *\n * `--vimine-scheme` the page's scheme; `--vimine-accent` its buttons, links and the association's name (moved towards\n * the page's ink when it would not read on its cards); `--vimine-background` the ground behind the cards;\n * `--vimine-typeface` the face of the whole page, fields included — one of TYPEFACES, served by Vimine (a framed page\n * cannot use the host's fonts). The frame is styled once, when the element connects.\n *\n * The form opens in the element's language (`lang` on the element or the page; Italian by default). Someone who already\n * has a Vimine account need not fill it: the form offers *Continua su Vimine*, which opens the hosted page in a new\n * tab — there their session is recognised and they join in one step (the association's statuto and privacy notice, and\n * nothing they have already told Vimine). It is a hand-off and not a sign-in inside the frame because a browser keeps a\n * framed page's session apart from the same site opened directly; the frame's sandbox lets that tab open as an ordinary\n * page (`allow-popups-to-escape-sandbox`).\n */\nexport class VimineEnroll extends HTMLElement {\n connectedCallback(): void {\n const slug = this.getAttribute(\"slug\");\n const root = shadow(\n this,\n \":host { display: block; } iframe { width: 100%; border: 0; border-radius: var(--vimine-radius, 16px); background: transparent; }\",\n );\n if (!slug) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = \"vimine-enroll: missing slug\";\n root.appendChild(e);\n return;\n }\n const appUrl = (\n this.getAttribute(\"app-url\") ||\n client().options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\");\n const frame = document.createElement(\"iframe\");\n frame.src = enrollUrl(appUrl, slug, langOf(this), appearanceOf(this, root));\n frame.title = \"Vimine\";\n frame.loading = \"lazy\";\n frame.style.height = `${Number(this.getAttribute(\"height\")) || 900}px`;\n frame.setAttribute(\n \"sandbox\",\n \"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\",\n );\n root.appendChild(frame);\n }\n}\n\nconst money = (amount: number, currency: string, lang: Lang): string => {\n try {\n return new Intl.NumberFormat(INTL[lang], {\n style: \"currency\",\n currency: currency || \"EUR\",\n }).format(amount);\n } catch {\n return `${amount.toFixed(2)} ${currency}`;\n }\n};\nconst when = (iso: string, tz: string, lang: Lang): string => {\n try {\n return new Date(iso).toLocaleString(INTL[lang], {\n timeZone: tz,\n dateStyle: \"full\",\n timeStyle: \"short\",\n });\n } catch {\n return new Date(iso).toLocaleString();\n }\n};\n\n/**\n * `<vimine-events slug=\"…\" filter=\"upcoming\" limit=\"10\" detail-url=\"/eventi/{slug}\">` — the association's events:\n * the public ones for a visitor (no sign-in), every published one for a signed-in member, each with its registration\n * types (contribution, places left) and a register button (`registrations:write`). Fires `vimine-registration`\n * `{ registration }` after a registration. `detail-url` (with `{slug}`) adds a details link.\n *\n * A VISITOR is offered a way in, not a bare sign-in: *Iscriviti all’associazione e prenota* opens the association's\n * hosted enrolment page with the event (a new tab; `app-url` as on `<vimine-enroll>`) — they join and ask for the place\n * in one go — and *Sono già socio: accedi* signs a member in here. The first is shown while the event has a registration\n * that can be had and the association takes enrolment requests; otherwise the sign-in alone.\n */\nexport class VimineEvents extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n private state: Record<string, Registration> = {};\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const lang = langOf(this);\n const t = STRINGS[lang];\n const root = shadow(\n this,\n /* CSS */ `:host { display: block; }\n.event { border: 1px solid var(--vimine-border, #e5e5e5); border-radius: var(--vimine-radius, 16px); padding: var(--vimine-padding, 1rem); margin: 0 0 1rem; }\n.event h3 { margin: 0 0 .25rem; font-size: 1.15em; } .event img { width: 100%; border-radius: var(--vimine-radius, 16px); margin-bottom: .75rem; display: block; }\n.type { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--vimine-border, #eee); }\n.type .n { font-weight: 600; } .type button { padding: .45rem .9rem; } a { color: var(--vimine-accent, #0a0e1a); }\n.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding-top: .75rem; border-top: 1px solid var(--vimine-border, #eee); }\na.button { display: inline-block; text-decoration: none; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font-weight: 600; }\nbutton.link { background: none; color: var(--vimine-accent, #0a0e1a); padding: 0; border-radius: 0; text-decoration: underline; font-weight: 400; }`,\n );\n const note = (cls: string, text: string): void => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n note(\"muted\", t.loading);\n const slug = this.getAttribute(\"slug\") || \"\";\n const filter = (this.getAttribute(\"filter\") || \"upcoming\") as\n | \"upcoming\"\n | \"past\"\n | \"cancelled\"\n | \"all\";\n const limit = Number(this.getAttribute(\"limit\")) || undefined;\n let items: Event[];\n // For a visitor: does the association take enrolment requests? Only then is joining a way to a place. A side\n // read — a failure leaves the sign-in alone.\n let joinable = false;\n try {\n const params = { filter, ...(limit ? { limit } : {}) };\n items = mp.isSignedIn()\n ? (await mp.events.list(params)).items\n : (await mp.public.events.list(slug, params)).items;\n if (!mp.isSignedIn() && slug)\n joinable = await mp.public\n .association(slug)\n .then((config) => config.aps.accepting_requests === true)\n .catch(() => false);\n } catch {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n return note(\"error\", t.error);\n }\n root.innerHTML = root.querySelector(\"style\")!.outerHTML;\n if (!items.length) return note(\"muted\", t.noEvents);\n const detailUrl = this.getAttribute(\"detail-url\");\n const join = joinable\n ? {\n slug,\n appUrl: (\n this.getAttribute(\"app-url\") ||\n mp.options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\"),\n }\n : null;\n for (const ev of items)\n root.appendChild(this.card(ev, mp, lang, detailUrl, join));\n }\n private card(\n ev: Event,\n mp: Vimine,\n lang: Lang,\n detailUrl: string | null,\n join: { slug: string; appUrl: string } | null,\n ): HTMLElement {\n const t = STRINGS[lang];\n const el = document.createElement(\"article\");\n el.className = \"event\";\n if (ev.cover_url) {\n const img = document.createElement(\"img\");\n img.src = ev.cover_url;\n img.alt = \"\";\n el.appendChild(img);\n }\n const h = document.createElement(\"h3\");\n h.textContent = ev.title;\n el.appendChild(h);\n const meta = document.createElement(\"div\");\n meta.className = \"muted\";\n meta.textContent = `${when(ev.starts_at, ev.timezone, lang)}${ev.location ? ` · ${ev.location.name || ev.location.address || \"\"}` : \"\"}`;\n el.appendChild(meta);\n if (ev.summary) {\n const p = document.createElement(\"p\");\n p.textContent = ev.summary;\n el.appendChild(p);\n }\n if (detailUrl) {\n const a = document.createElement(\"a\");\n a.href = detailUrl.replace(\"{slug}\", encodeURIComponent(ev.slug));\n a.textContent = t.details;\n el.appendChild(a);\n }\n const mine = this.state[ev.id];\n if (mine) {\n const d = document.createElement(\"div\");\n d.className = \"muted\";\n d.textContent = mine.status === \"confirmed\" ? t.registered : t.reserved;\n el.appendChild(d);\n return el;\n }\n if (ev.status === \"published\")\n for (const tp of ev.registration_types)\n el.appendChild(this.typeRow(ev, tp, mp, lang));\n // A visitor: one call for the event, under its registrations — join and book on the hosted page, or sign in here.\n if (\n ev.status === \"published\" &&\n !mp.isSignedIn() &&\n ev.registration_types.some((tp) => tp.open)\n ) {\n const actions = document.createElement(\"div\");\n actions.className = \"actions\";\n const signIn = document.createElement(\"button\");\n signIn.type = \"button\";\n signIn.addEventListener(\n \"click\",\n () =>\n void mp.signIn({\n scopes: [\n \"events:read\",\n \"registrations:read\",\n \"registrations:write\",\n ],\n }),\n );\n if (join) {\n const a = document.createElement(\"a\");\n a.className = \"button\";\n a.href = eventEnrollUrl(join.appUrl, join.slug, ev.slug, lang);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = t.joinAndBook;\n actions.appendChild(a);\n signIn.className = \"link\";\n signIn.textContent = t.alreadyMember;\n } else signIn.textContent = t.signInToRegister;\n actions.appendChild(signIn);\n el.appendChild(actions);\n }\n return el;\n }\n private typeRow(\n ev: Event,\n tp: RegistrationType,\n mp: Vimine,\n lang: Lang,\n ): HTMLElement {\n const t = STRINGS[lang];\n const row = document.createElement(\"div\");\n row.className = \"type\";\n const left = document.createElement(\"div\");\n const n = document.createElement(\"div\");\n n.className = \"n\";\n n.textContent = `${tp.name} · ${tp.amount > 0 ? money(tp.amount, tp.currency, lang) : t.free}`;\n left.appendChild(n);\n const s = document.createElement(\"div\");\n s.className = \"muted\";\n s.textContent = [\n tp.remaining != null ? `${tp.remaining} ${t.places}` : \"\",\n tp.reason ? t.reason[tp.reason] || tp.reason : \"\",\n ]\n .filter(Boolean)\n .join(\" · \");\n left.appendChild(s);\n row.appendChild(left);\n // A visitor has the event's own call below the registrations (`card`): no button per registration.\n if (!mp.isSignedIn()) return row;\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n btn.textContent = t.register;\n btn.disabled = !tp.open;\n btn.addEventListener(\"click\", async () => {\n btn.disabled = true;\n try {\n const reg = await mp.registrations.create(ev.slug, {\n registration_type: tp.uid,\n });\n this.state[ev.id] = reg;\n this.dispatchEvent(\n new CustomEvent(\"vimine-registration\", {\n detail: { registration: reg },\n bubbles: true,\n }),\n );\n void this.render();\n } catch (err) {\n btn.disabled = false;\n const reasons = (\n (err as { errors?: { code?: string }[] })?.errors || []\n )\n .map((e) => t.reason[e.code || \"\"] || e.code)\n .filter(Boolean);\n s.textContent = reasons.length ? reasons.join(\", \") : t.error;\n s.className = \"error\";\n }\n });\n row.appendChild(btn);\n return row;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,gHAAgH;AAChH,mGAAmG;AACnG,EAAE;AACF,iEAAiE;AACjE,kGAAkG;AAClG,EAAE;AACF,+FAA+F;AAC/F,uGAAuG;AACvG,qH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CAAC;gBAC9D,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["// @vimine/sdk/elements — the low-code tier: three custom elements over the browser client, Shadow DOM,\n// styled through `--vimine-*` CSS custom properties, Italian by default (`lang=\"en\"` on the element or the page\n// switches the strings). Register them once, then use the tags anywhere (CMS pages, static sites):\n//\n// import { defineVimineElements } from '@vimine/sdk/elements';\n// defineVimineElements({ clientId: 'vmc_…', redirectUri: 'https://www.example.org/callback' });\n//\n// <vimine-sign-in scope=\"membership:read\"></vimine-sign-in> a \"Sign in with Vimine\" button\n// <vimine-card></vimine-card> the signed-in member's card (SVG + QR)\n// <vimine-enroll slug=\"your-slug\"></vimine-enroll> the hosted enrolment form (iframe, Embed v0), in the\n// element's language; someone who already has a\n// Vimine account is offered a hand-off to the hosted\n// page, where they join in one step\n// <vimine-events slug=\"your-slug\"></vimine-events> the association's events (public ones for\n// visitors, every one for a signed-in member) with\n// a register button per type\n//\n// The callback page still calls `client.handleRedirect()` (or `<vimine-sign-in>` does it for you when\n// `handle-redirect` is set on the element and the page is the redirect URI).\nimport { Vimine, type VimineOptions } from \"./index.js\";\nimport type { Event, Registration, RegistrationType, Scope } from \"./types.js\";\n\nlet shared: Vimine | null = null;\n\nconst STRINGS = {\n it: {\n signIn: \"Accedi con Vimine\",\n signOut: \"Esci\",\n loading: \"Caricamento…\",\n notSignedIn: \"Accedi per vedere la tua tessera.\",\n noMembership: \"Nessuna tessera in questa associazione.\",\n notActive:\n \"La tessera non è ancora attiva: il codice compare quando lo diventa.\",\n error: \"Si è verificato un errore.\",\n noEvents: \"Nessun evento in programma.\",\n free: \"gratuita\",\n places: { one: \"posto\", other: \"posti\" },\n register: \"Iscriviti\",\n signInToRegister: \"Accedi per iscriverti\",\n joinAndBook: \"Iscriviti all’associazione e prenota\",\n alreadyMember: \"Sono già socio: accedi\",\n registered: \"Iscrizione confermata\",\n reserved: \"Posto riservato: in attesa del contributo\",\n details: \"Dettagli\",\n reason: {\n sold_out: \"esaurito\",\n event_full: \"al completo\",\n registration_not_open: \"iscrizioni non ancora aperte\",\n registration_closed: \"iscrizioni chiuse\",\n membership_required: \"riservato ai soci\",\n membership_not_active: \"tessera non valida\",\n membership_not_yet_valid:\n \"la tessera non è ancora utilizzabile a quella data\",\n membership_type_not_allowed: \"tipo di tessera non ammesso\",\n max_per_user: \"già iscritto\",\n event_past: \"evento concluso\",\n event_cancelled: \"evento annullato\",\n event_not_published: \"non pubblicato\",\n plan_limit: \"non disponibile\",\n invalid_type: \"tipo non valido\",\n } as Record<string, string>,\n },\n en: {\n signIn: \"Sign in with Vimine\",\n signOut: \"Sign out\",\n loading: \"Loading…\",\n notSignedIn: \"Sign in to see your card.\",\n noMembership: \"No membership in this association.\",\n notActive: \"The card is not active yet: its code appears once it is.\",\n error: \"Something went wrong.\",\n noEvents: \"No upcoming events.\",\n free: \"free\",\n places: { one: \"place\", other: \"places\" },\n register: \"Register\",\n signInToRegister: \"Sign in to register\",\n joinAndBook: \"Join the association and book\",\n alreadyMember: \"Already a member? Sign in\",\n registered: \"Registration confirmed\",\n reserved: \"Place reserved: awaiting the contribution\",\n details: \"Details\",\n reason: {\n sold_out: \"sold out\",\n event_full: \"full\",\n registration_not_open: \"registrations not open yet\",\n registration_closed: \"registrations closed\",\n membership_required: \"members only\",\n membership_not_active: \"membership not valid\",\n membership_not_yet_valid: \"your card is not usable yet on that date\",\n membership_type_not_allowed: \"membership type not admitted\",\n max_per_user: \"already registered\",\n event_past: \"event over\",\n event_cancelled: \"event cancelled\",\n event_not_published: \"not published\",\n plan_limit: \"not available\",\n invalid_type: \"invalid type\",\n } as Record<string, string>,\n },\n \"zh-Hans\": {\n signIn: \"使用 Vimine 登录\",\n signOut: \"退出\",\n loading: \"加载中…\",\n notSignedIn: \"请登录以查看您的会员卡。\",\n noMembership: \"您在这个协会没有会员卡。\",\n notActive: \"会员卡尚未生效:生效后会显示二维码。\",\n error: \"出现错误。\",\n noEvents: \"暂无安排的活动。\",\n free: \"免费\",\n places: \"个名额\",\n register: \"报名\",\n signInToRegister: \"登录后报名\",\n joinAndBook: \"加入协会并预约\",\n alreadyMember: \"已是会员?请登录\",\n registered: \"报名已确认\",\n reserved: \"名额已保留:等待缴纳参与费\",\n details: \"详情\",\n reason: {\n sold_out: \"名额已满\",\n event_full: \"已满员\",\n registration_not_open: \"报名尚未开始\",\n registration_closed: \"报名已截止\",\n membership_required: \"仅限会员\",\n membership_not_active: \"会员卡无效\",\n membership_not_yet_valid: \"在该日期您的会员卡尚不可用\",\n membership_type_not_allowed: \"该会员卡类型不在允许范围内\",\n max_per_user: \"已报名\",\n event_past: \"活动已结束\",\n event_cancelled: \"活动已取消\",\n event_not_published: \"未发布\",\n plan_limit: \"不可用\",\n invalid_type: \"类型无效\",\n } as Record<string, string>,\n },\n \"zh-Hant\": {\n signIn: \"使用 Vimine 登入\",\n signOut: \"登出\",\n loading: \"載入中…\",\n notSignedIn: \"請登入以檢視您的會員卡。\",\n noMembership: \"您在這個協會沒有會員卡。\",\n notActive: \"會員卡尚未生效:生效後會顯示 QR Code。\",\n error: \"發生錯誤。\",\n noEvents: \"目前沒有安排的活動。\",\n free: \"免費\",\n places: \"個名額\",\n register: \"報名\",\n signInToRegister: \"登入後報名\",\n joinAndBook: \"加入協會並預約\",\n alreadyMember: \"已是會員?請登入\",\n registered: \"報名已確認\",\n reserved: \"名額已保留:等待繳納參與費\",\n details: \"詳細資訊\",\n reason: {\n sold_out: \"名額已滿\",\n event_full: \"已滿員\",\n registration_not_open: \"報名尚未開始\",\n registration_closed: \"報名已截止\",\n membership_required: \"僅限會員\",\n membership_not_active: \"會員卡無效\",\n membership_not_yet_valid: \"在該日期您的會員卡尚不可用\",\n membership_type_not_allowed: \"該會員卡類型不在允許範圍內\",\n max_per_user: \"已報名\",\n event_past: \"活動已結束\",\n event_cancelled: \"活動已取消\",\n event_not_published: \"未發布\",\n plan_limit: \"不可用\",\n invalid_type: \"類型無效\",\n } as Record<string, string>,\n },\n \"fr\": {\n signIn: \"Se connecter avec Vimine\",\n signOut: \"Se déconnecter\",\n loading: \"Chargement…\",\n notSignedIn: \"Connectez-vous pour voir votre carte.\",\n noMembership: \"Aucune carte dans cette association.\",\n notActive: \"La carte n'est pas encore active : le code apparaîtra lorsqu'elle le sera.\",\n error: \"Une erreur s'est produite.\",\n noEvents: \"Aucun événement prévu.\",\n free: \"gratuite\",\n places: { one: \"place\", other: \"places\" },\n register: \"S'inscrire\",\n signInToRegister: \"Se connecter pour s'inscrire\",\n joinAndBook: \"Adhérer à l'association et réserver\",\n alreadyMember: \"Déjà membre : se connecter\",\n registered: \"Inscription confirmée\",\n reserved: \"Place réservée : en attente de la contribution\",\n details: \"Détails\",\n reason: {\n sold_out: \"plus de places\",\n event_full: \"complet\",\n registration_not_open: \"inscriptions pas encore ouvertes\",\n registration_closed: \"inscriptions closes\",\n membership_required: \"réservé aux membres\",\n membership_not_active: \"adhésion non valable\",\n membership_not_yet_valid: \"la carte n'est pas encore utilisable à cette date\",\n membership_type_not_allowed: \"type d'adhésion non admis\",\n max_per_user: \"déjà inscrit\",\n event_past: \"événement terminé\",\n event_cancelled: \"événement annulé\",\n event_not_published: \"non publié\",\n plan_limit: \"non disponible\",\n invalid_type: \"type non valide\",\n } as Record<string, string>,\n },\n \"es\": {\n signIn: \"Iniciar sesión con Vimine\",\n signOut: \"Cerrar sesión\",\n loading: \"Cargando…\",\n notSignedIn: \"Inicia sesión para ver tu carné.\",\n noMembership: \"No tienes carné en esta asociación.\",\n notActive: \"El carné aún no está activo: el código aparece cuando lo esté.\",\n error: \"Se ha producido un error.\",\n noEvents: \"No hay eventos programados.\",\n free: \"gratuita\",\n places: { one: \"plaza\", other: \"plazas\" },\n register: \"Inscríbete\",\n signInToRegister: \"Inicia sesión para inscribirte\",\n joinAndBook: \"Hazte socio y reserva\",\n alreadyMember: \"¿Ya eres socio? Inicia sesión\",\n registered: \"Inscripción confirmada\",\n reserved: \"Plaza reservada: pendiente de la contribución\",\n details: \"Detalles\",\n reason: {\n sold_out: \"agotado\",\n event_full: \"completo\",\n registration_not_open: \"inscripciones aún no abiertas\",\n registration_closed: \"inscripciones cerradas\",\n membership_required: \"solo para socios\",\n membership_not_active: \"carné no válido\",\n membership_not_yet_valid: \"el carné aún no se puede usar en esa fecha\",\n membership_type_not_allowed: \"tipo de carné no admitido\",\n max_per_user: \"ya inscrito\",\n event_past: \"evento finalizado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"no publicado\",\n plan_limit: \"no disponible\",\n invalid_type: \"tipo no válido\",\n } as Record<string, string>,\n },\n \"de\": {\n signIn: \"Mit Vimine anmelden\",\n signOut: \"Abmelden\",\n loading: \"Wird geladen…\",\n notSignedIn: \"Melden Sie sich an, um Ihren Ausweis zu sehen.\",\n noMembership: \"Keine Mitgliedschaft in diesem Verein.\",\n notActive: \"Der Ausweis ist noch nicht aktiv: Der Code erscheint, sobald er es ist.\",\n error: \"Ein Fehler ist aufgetreten.\",\n noEvents: \"Keine Veranstaltungen geplant.\",\n free: \"kostenlos\",\n places: { one: \"Platz\", other: \"Plätze\" },\n register: \"Teilnehmen\",\n signInToRegister: \"Zum Teilnehmen anmelden\",\n joinAndBook: \"Dem Verein beitreten und Platz reservieren\",\n alreadyMember: \"Schon Mitglied? Anmelden\",\n registered: \"Anmeldung bestätigt\",\n reserved: \"Platz reserviert: Beitrag ausstehend\",\n details: \"Details\",\n reason: {\n sold_out: \"ausgebucht\",\n event_full: \"voll\",\n registration_not_open: \"Anmeldung noch nicht offen\",\n registration_closed: \"Anmeldung geschlossen\",\n membership_required: \"nur für Mitglieder\",\n membership_not_active: \"Mitgliedschaft nicht gültig\",\n membership_not_yet_valid: \"Ihr Ausweis ist an diesem Datum noch nicht nutzbar\",\n membership_type_not_allowed: \"Mitgliedsart nicht zugelassen\",\n max_per_user: \"bereits angemeldet\",\n event_past: \"Veranstaltung vorbei\",\n event_cancelled: \"Veranstaltung abgesagt\",\n event_not_published: \"nicht veröffentlicht\",\n plan_limit: \"nicht verfügbar\",\n invalid_type: \"ungültige Art\",\n } as Record<string, string>,\n },\n \"pt-BR\": {\n signIn: \"Entrar com Vimine\",\n signOut: \"Sair\",\n loading: \"Carregando…\",\n notSignedIn: \"Entre para ver sua carteirinha.\",\n noMembership: \"Nenhuma carteirinha nesta associação.\",\n notActive: \"A carteirinha ainda não está ativa: o código aparece quando ela for ativada.\",\n error: \"Ocorreu um erro.\",\n noEvents: \"Nenhum evento programado.\",\n free: \"gratuita\",\n places: { one: \"vaga\", other: \"vagas\" },\n register: \"Inscrever-se\",\n signInToRegister: \"Entre para se inscrever\",\n joinAndBook: \"Associe-se e reserve\",\n alreadyMember: \"Já sou associado: entrar\",\n registered: \"Inscrição confirmada\",\n reserved: \"Vaga reservada: aguardando a contribuição\",\n details: \"Detalhes\",\n reason: {\n sold_out: \"esgotado\",\n event_full: \"lotado\",\n registration_not_open: \"inscrições ainda não abertas\",\n registration_closed: \"inscrições encerradas\",\n membership_required: \"exclusivo para associados\",\n membership_not_active: \"carteirinha inválida\",\n membership_not_yet_valid: \"a carteirinha ainda não pode ser usada nessa data\",\n membership_type_not_allowed: \"tipo de carteirinha não admitido\",\n max_per_user: \"já inscrito\",\n event_past: \"evento encerrado\",\n event_cancelled: \"evento cancelado\",\n event_not_published: \"não publicado\",\n plan_limit: \"indisponível\",\n invalid_type: \"tipo inválido\",\n } as Record<string, string>,\n },\n // drafted 2026-10-22, pending its native review (LOCALE_EXPANSION_PLAN LX8 in the app repository): see DRAFT_LANGS\n ru: {\n signIn: \"Войти через Vimine\",\n signOut: \"Выйти\",\n loading: \"Загрузка…\",\n notSignedIn: \"Войдите, чтобы увидеть свою членскую карту.\",\n noMembership: \"Нет членства в этой организации.\",\n notActive: \"Членская карта ещё не активна: код появится, когда она станет активной.\",\n error: \"Произошла ошибка.\",\n noEvents: \"Запланированных мероприятий нет.\",\n free: \"бесплатно\",\n places: { one: \"место\", few: \"места\", many: \"мест\", other: \"места\" },\n register: \"Зарегистрироваться\",\n signInToRegister: \"Войти, чтобы зарегистрироваться\",\n joinAndBook: \"Вступить в организацию и забронировать место\",\n alreadyMember: \"Уже член организации? Войти\",\n registered: \"Регистрация подтверждена\",\n reserved: \"Место забронировано: ожидается взнос за участие\",\n details: \"Подробнее\",\n reason: {\n sold_out: \"места закончились\",\n event_full: \"все места заняты\",\n registration_not_open: \"регистрация ещё не открыта\",\n registration_closed: \"регистрация закрыта\",\n membership_required: \"только для членов организации\",\n membership_not_active: \"членство недействительно\",\n membership_not_yet_valid: \"на эту дату ваша членская карта ещё не действует\",\n membership_type_not_allowed: \"этот тип членства не допускается\",\n max_per_user: \"вы уже зарегистрированы\",\n event_past: \"мероприятие завершено\",\n event_cancelled: \"мероприятие отменено\",\n event_not_published: \"не опубликовано\",\n plan_limit: \"недоступно\",\n invalid_type: \"недопустимый тип\",\n } as Record<string, string>,\n },\n};\ntype Lang = keyof typeof STRINGS;\n// Languages drafted and not yet read by a native speaker — as on the platform, which serves a draft only where its preview\n// switch names it. Their strings ship, but an element speaks one only on a page that opted in\n// (`defineVimineElements(options, { previewLanguages: true })`); elsewhere it speaks Italian, as the platform would.\n// A language leaves this list with the platform, in an SDK release. Empty since 2026-10-20: the platform enabled its six\n// drafted languages ahead of their review (the owner's decision), and the elements speak them with it.\nconst DRAFT_LANGS: Lang[] = [\"ru\"];\nlet previewLanguages = false;\n// The page's language → the elements' own: the tag itself, Chinese by script (zh-TW, zh-HK → Traditional; zh, zh-CN →\n// Simplified), any other variant to the language's (en-GB → en, pt-PT → pt-BR); Italian otherwise. The platform's rule.\nconst LANGS = Object.keys(STRINGS) as Lang[];\n/** The elements' language for a page's tag, or null when they do not speak it (`preview`: drafts included). */\nexport const matchLang = (tag: string, preview = previewLanguages): Lang | null => {\n const served = LANGS.filter((l) => preview || !DRAFT_LANGS.includes(l));\n const lower = tag.trim().replace(/_/g, \"-\").toLowerCase();\n const exact = served.find((l) => l.toLowerCase() === lower);\n if (exact) return exact;\n const [lang, ...rest] = lower.split(\"-\");\n if (lang === \"zh\") {\n const script = rest.some((p) => [\"hant\", \"tw\", \"hk\", \"mo\"].includes(p)) ? \"zh-Hant\" : \"zh-Hans\";\n return served.includes(script) ? script : null;\n }\n return served.find((l) => l.toLowerCase().split(\"-\")[0] === lang) || null;\n};\nconst langOf = (el: HTMLElement): Lang =>\n matchLang(\n el.getAttribute(\"lang\") ||\n el.closest(\"[lang]\")?.getAttribute(\"lang\") ||\n document.documentElement.lang ||\n \"it\",\n ) || \"it\";\n// Dates and amounts in the reader's conventions: English with day-month order, Chinese naming its script.\nconst INTL: Record<Lang, string> = {\n it: \"it-IT\",\n en: \"en-GB\",\n \"zh-Hans\": \"zh-Hans-CN\",\n \"zh-Hant\": \"zh-Hant-TW\",\n fr: \"fr-FR\",\n es: \"es-ES\",\n de: \"de-DE\",\n \"pt-BR\": \"pt-BR\",\n ru: \"ru-RU\",\n};\n\n/** \"1 posto\", \"5 posti\", \"21 место\": the places left, in the reader's plural — a language without one keeps one word. */\nexport const placesLabel = (n: number, lang: Lang): string => {\n const word: string | Record<string, string> = STRINGS[lang].places;\n if (typeof word === \"string\") return `${n} ${word}`;\n return `${n} ${word[new Intl.PluralRules(INTL[lang]).select(n)] ?? word.other}`;\n};\n\nconst BASE_CSS = /* CSS */ `\n:host { display: inline-block; font-family: var(--vimine-font, system-ui, sans-serif); color: var(--vimine-color, #111); }\nbutton { cursor: pointer; border: 0; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font: inherit; font-weight: 600; }\nbutton:disabled { opacity: .6; cursor: default; }\n.muted { color: var(--vimine-muted, #666); font-size: .9em; }\n.error { color: var(--vimine-error, #a33); font-size: .9em; }\n`;\n\nconst shadow = (el: HTMLElement, css: string): ShadowRoot => {\n const root = el.shadowRoot || el.attachShadow({ mode: \"open\" });\n root.innerHTML = `<style>${BASE_CSS}${css}</style>`;\n return root;\n};\n\n/** The client the elements use. Call once; pass your own instance to share it with the rest of the page. */\nexport function defineVimineElements(\n options: VimineOptions | Vimine,\n elements: { previewLanguages?: boolean } = {},\n): Vimine {\n shared = options instanceof Vimine ? options : new Vimine(options);\n previewLanguages = !!elements.previewLanguages;\n if (typeof customElements !== \"undefined\") {\n if (!customElements.get(\"vimine-sign-in\"))\n customElements.define(\"vimine-sign-in\", VimineSignIn);\n if (!customElements.get(\"vimine-card\"))\n customElements.define(\"vimine-card\", VimineCard);\n if (!customElements.get(\"vimine-enroll\"))\n customElements.define(\"vimine-enroll\", VimineEnroll);\n if (!customElements.get(\"vimine-events\"))\n customElements.define(\"vimine-events\", VimineEvents);\n }\n return shared;\n}\n\nconst client = (): Vimine => {\n if (!shared)\n throw new Error(\n \"Vimine elements: call defineVimineElements({ clientId, redirectUri }) first\",\n );\n return shared;\n};\n\n/** `<vimine-sign-in scope=\"…\" return-to=\"/area\" label=\"…\" handle-redirect>` — a sign-in / sign-out button. */\nexport class VimineSignIn extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.boot();\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async boot(): Promise<void> {\n const mp = client();\n if (this.hasAttribute(\"handle-redirect\")) {\n try {\n await mp.handleRedirect();\n } catch (err) {\n this.render(err instanceof Error ? err.message : String(err));\n return;\n }\n }\n this.render();\n this.unsubscribe = mp.onChange(() => this.render());\n }\n private render(error?: string): void {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(this, \"\");\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n if (mp.isSignedIn()) {\n btn.textContent = this.getAttribute(\"label-signed-in\") || t.signOut;\n btn.addEventListener(\n \"click\",\n () => void mp.signOut({ everywhere: this.hasAttribute(\"everywhere\") }),\n );\n } else {\n btn.textContent = this.getAttribute(\"label\") || t.signIn;\n btn.addEventListener(\"click\", () => {\n const scopes = (this.getAttribute(\"scope\") || \"\")\n .split(/[\\s,]+/)\n .filter(Boolean) as Scope[];\n void mp.signIn({\n ...(scopes.length ? { scopes } : {}),\n ...(this.getAttribute(\"return-to\")\n ? { returnTo: this.getAttribute(\"return-to\")! }\n : {}),\n });\n });\n }\n root.appendChild(btn);\n if (error) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = error;\n root.appendChild(e);\n }\n this.dispatchEvent(\n new CustomEvent(\"vimine-change\", {\n detail: { signedIn: mp.isSignedIn() },\n bubbles: true,\n }),\n );\n }\n}\n\n/** `<vimine-card>` — the signed-in member's card as SVG (with the live QR); refreshes when the session changes. */\nexport class VimineCard extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const t = STRINGS[langOf(this)];\n const root = shadow(\n this,\n \":host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }\",\n );\n const note = (cls: string, text: string) => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n if (!mp.isSignedIn()) return note(\"muted\", t.notSignedIn);\n note(\"muted\", t.loading);\n try {\n const svg = await mp.membership.cardSvg();\n root.innerHTML = `<style>${BASE_CSS}:host { display: block; max-width: var(--vimine-card-width, 600px); } svg { width: 100%; height: auto; display: block; border-radius: 24px; box-shadow: var(--vimine-card-shadow, 0 8px 30px rgba(0,0,0,.12)); }</style>${svg}`;\n this.dispatchEvent(\n new CustomEvent(\"vimine-card\", {\n detail: { loaded: true },\n bubbles: true,\n }),\n );\n } catch (err) {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n const code = (err as { code?: string })?.code;\n // `not_active`: the membership exists but has no card (pending, suspended, revoked) — a state, not a failure.\n const quiet = code === \"not_found\" || code === \"not_active\";\n note(\n quiet ? \"muted\" : \"error\",\n code === \"not_found\"\n ? t.noMembership\n : code === \"not_active\"\n ? t.notActive\n : t.error,\n );\n }\n }\n}\n\n/** The hosted enrolment page of an association, in a language: the frame's address, and where a hand-off lands. */\n/**\n * How the hosted enrolment page looks inside the host site: its scheme, the accent of its buttons, links and the\n * association's name, and the ground behind its cards (`transparent`: the host page shows through). The page reads them\n * from its address — a framed page cannot see the host's CSS — and ignores anything that is not a colour or a keyword.\n */\nexport type EnrollAppearance = { scheme?: \"light\" | \"dark\"; accent?: string; background?: string; font?: Typeface };\n\n/** The faces the hosted page offers — served by Vimine itself — or `system`, the device's own. They set everything. */\nexport const TYPEFACES = [\n \"system\",\n \"inter\",\n \"roboto\",\n \"open-sans\",\n \"montserrat\",\n \"nunito\",\n \"lora\",\n \"merriweather\",\n \"roboto-slab\",\n] as const;\nexport type Typeface = (typeof TYPEFACES)[number];\n\nconst HEX = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;\nconst appearanceQuery = (a?: EnrollAppearance): string => {\n if (!a) return \"\";\n const out: string[] = [];\n if (a.scheme === \"light\" || a.scheme === \"dark\") out.push(`scheme=${a.scheme}`);\n if (a.accent && HEX.test(a.accent)) out.push(`accent=${encodeURIComponent(a.accent.replace(/^#/, \"\"))}`);\n if (a.background === \"transparent\") out.push(\"background=transparent\");\n else if (a.background && HEX.test(a.background))\n out.push(`background=${encodeURIComponent(a.background.replace(/^#/, \"\"))}`);\n if (a.font && (TYPEFACES as readonly string[]).includes(a.font)) out.push(`font=${a.font}`);\n return out.length ? `&${out.join(\"&\")}` : \"\";\n};\n\nexport const enrollUrl = (appUrl: string, slug: string, lang: string, appearance?: EnrollAppearance): string =>\n `${appUrl.replace(/\\/+$/, \"\")}/enroll/${encodeURIComponent(slug)}?locale=${encodeURIComponent(lang)}${appearanceQuery(appearance)}`;\n\n/**\n * The same page, opened FROM an event: the person joins the association and asks for a place at the event in one go.\n * The request carries the event; the place is confirmed, or held until the membership is active.\n */\nexport const eventEnrollUrl = (\n appUrl: string,\n slug: string,\n event: string,\n lang: string,\n): string =>\n `${enrollUrl(appUrl, slug, lang)}&event=${encodeURIComponent(event)}`;\n\n/** Any CSS colour (a name, `rgb()`, `hsl()`, a hex) as `#rrggbb`, resolved by the browser; null when it is none. */\nconst hexColour = (root: ShadowRoot, value: string): string | null => {\n const v = value.trim();\n if (!v) return null;\n const probe = document.createElement(\"span\");\n probe.style.color = v;\n if (!probe.style.color) return null;\n root.appendChild(probe);\n const m = /rgba?\\(([^)]+)\\)/.exec(getComputedStyle(probe).color);\n probe.remove();\n const parts = (m?.[1] ?? \"\").split(/[\\s,/]+/).filter(Boolean).map(Number);\n if (parts.length < 3) return null;\n const [r = 0, g = 0, b = 0, alpha] = parts;\n if (alpha === 0) return null;\n return `#${[r, g, b].map((n) => Math.round(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n};\n\n/**\n * The page's look from the host's CSS: `--vimine-scheme` (light | dark), `--vimine-accent` and `--vimine-background` (a\n * colour, or `transparent`), `--vimine-typeface` (one of TYPEFACES) — custom properties inherit, so one rule on `:root`\n * styles every Vimine element at once.\n */\nconst appearanceOf = (el: HTMLElement, root: ShadowRoot): EnrollAppearance => {\n const css = getComputedStyle(el);\n const read = (name: string) => css.getPropertyValue(name).trim();\n const out: EnrollAppearance = {};\n const scheme = read(\"--vimine-scheme\");\n if (scheme === \"light\" || scheme === \"dark\") out.scheme = scheme;\n const accent = hexColour(root, read(\"--vimine-accent\"));\n if (accent) out.accent = accent;\n const background = read(\"--vimine-background\");\n if (background === \"transparent\") out.background = \"transparent\";\n else {\n const bg = hexColour(root, background);\n if (bg) out.background = bg;\n }\n const typeface = read(\"--vimine-typeface\");\n if ((TYPEFACES as readonly string[]).includes(typeface)) out.font = typeface as Typeface;\n return out;\n};\n\n/**\n * `<vimine-enroll slug=\"…\" app-url=\"https://app.vimine.network\" height=\"900\" lang=\"en\">` — the hosted enrolment form.\n *\n * Styled like the other elements, through CSS custom properties on the element or any ancestor:\n *\n * vimine-enroll { --vimine-scheme: light; --vimine-accent: #1e3a5f; --vimine-background: transparent; }\n *\n * `--vimine-scheme` the page's scheme; `--vimine-accent` its buttons, links and the association's name (moved towards\n * the page's ink when it would not read on its cards); `--vimine-background` the ground behind the cards;\n * `--vimine-typeface` the face of the whole page, fields included — one of TYPEFACES, served by Vimine (a framed page\n * cannot use the host's fonts). The frame is styled once, when the element connects.\n *\n * The form opens in the element's language (`lang` on the element or the page; Italian by default). Someone who already\n * has a Vimine account need not fill it: the form offers *Continua su Vimine*, which opens the hosted page in a new\n * tab — there their session is recognised and they join in one step (the association's statuto and privacy notice, and\n * nothing they have already told Vimine). It is a hand-off and not a sign-in inside the frame because a browser keeps a\n * framed page's session apart from the same site opened directly; the frame's sandbox lets that tab open as an ordinary\n * page (`allow-popups-to-escape-sandbox`).\n */\nexport class VimineEnroll extends HTMLElement {\n connectedCallback(): void {\n const slug = this.getAttribute(\"slug\");\n const root = shadow(\n this,\n \":host { display: block; } iframe { width: 100%; border: 0; border-radius: var(--vimine-radius, 16px); background: transparent; }\",\n );\n if (!slug) {\n const e = document.createElement(\"div\");\n e.className = \"error\";\n e.textContent = \"vimine-enroll: missing slug\";\n root.appendChild(e);\n return;\n }\n const appUrl = (\n this.getAttribute(\"app-url\") ||\n client().options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\");\n const frame = document.createElement(\"iframe\");\n frame.src = enrollUrl(appUrl, slug, langOf(this), appearanceOf(this, root));\n frame.title = \"Vimine\";\n frame.loading = \"lazy\";\n frame.style.height = `${Number(this.getAttribute(\"height\")) || 900}px`;\n frame.setAttribute(\n \"sandbox\",\n \"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\",\n );\n root.appendChild(frame);\n }\n}\n\nconst money = (amount: number, currency: string, lang: Lang): string => {\n try {\n return new Intl.NumberFormat(INTL[lang], {\n style: \"currency\",\n currency: currency || \"EUR\",\n }).format(amount);\n } catch {\n return `${amount.toFixed(2)} ${currency}`;\n }\n};\nconst when = (iso: string, tz: string, lang: Lang): string => {\n try {\n return new Date(iso).toLocaleString(INTL[lang], {\n timeZone: tz,\n dateStyle: \"full\",\n timeStyle: \"short\",\n });\n } catch {\n return new Date(iso).toLocaleString();\n }\n};\n\n/**\n * `<vimine-events slug=\"…\" filter=\"upcoming\" limit=\"10\" detail-url=\"/eventi/{slug}\">` — the association's events:\n * the public ones for a visitor (no sign-in), every published one for a signed-in member, each with its registration\n * types (contribution, places left) and a register button (`registrations:write`). Fires `vimine-registration`\n * `{ registration }` after a registration. `detail-url` (with `{slug}`) adds a details link.\n *\n * A VISITOR is offered a way in, not a bare sign-in: *Iscriviti all’associazione e prenota* opens the association's\n * hosted enrolment page with the event (a new tab; `app-url` as on `<vimine-enroll>`) — they join and ask for the place\n * in one go — and *Sono già socio: accedi* signs a member in here. The first is shown while the event has a registration\n * that can be had and the association takes enrolment requests; otherwise the sign-in alone.\n */\nexport class VimineEvents extends HTMLElement {\n private unsubscribe: (() => void) | null = null;\n private state: Record<string, Registration> = {};\n connectedCallback(): void {\n void this.render();\n this.unsubscribe = client().onChange(() => void this.render());\n }\n disconnectedCallback(): void {\n this.unsubscribe?.();\n this.unsubscribe = null;\n }\n private async render(): Promise<void> {\n const mp = client();\n const lang = langOf(this);\n const t = STRINGS[lang];\n const root = shadow(\n this,\n /* CSS */ `:host { display: block; }\n.event { border: 1px solid var(--vimine-border, #e5e5e5); border-radius: var(--vimine-radius, 16px); padding: var(--vimine-padding, 1rem); margin: 0 0 1rem; }\n.event h3 { margin: 0 0 .25rem; font-size: 1.15em; } .event img { width: 100%; border-radius: var(--vimine-radius, 16px); margin-bottom: .75rem; display: block; }\n.type { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--vimine-border, #eee); }\n.type .n { font-weight: 600; } .type button { padding: .45rem .9rem; } a { color: var(--vimine-accent, #0a0e1a); }\n.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding-top: .75rem; border-top: 1px solid var(--vimine-border, #eee); }\na.button { display: inline-block; text-decoration: none; border-radius: var(--vimine-radius, 999px); padding: var(--vimine-padding, 0.65rem 1.1rem);\n background: var(--vimine-accent, #0a0e1a); color: var(--vimine-accent-contrast, #fff); font-weight: 600; }\nbutton.link { background: none; color: var(--vimine-accent, #0a0e1a); padding: 0; border-radius: 0; text-decoration: underline; font-weight: 400; }`,\n );\n const note = (cls: string, text: string): void => {\n const d = document.createElement(\"div\");\n d.className = cls;\n d.textContent = text;\n root.appendChild(d);\n };\n note(\"muted\", t.loading);\n const slug = this.getAttribute(\"slug\") || \"\";\n const filter = (this.getAttribute(\"filter\") || \"upcoming\") as\n | \"upcoming\"\n | \"past\"\n | \"cancelled\"\n | \"all\";\n const limit = Number(this.getAttribute(\"limit\")) || undefined;\n let items: Event[];\n // For a visitor: does the association take enrolment requests? Only then is joining a way to a place. A side\n // read — a failure leaves the sign-in alone.\n let joinable = false;\n try {\n const params = { filter, ...(limit ? { limit } : {}) };\n items = mp.isSignedIn()\n ? (await mp.events.list(params)).items\n : (await mp.public.events.list(slug, params)).items;\n if (!mp.isSignedIn() && slug)\n joinable = await mp.public\n .association(slug)\n .then((config) => config.aps.accepting_requests === true)\n .catch(() => false);\n } catch {\n root.innerHTML = `<style>${BASE_CSS}</style>`;\n return note(\"error\", t.error);\n }\n root.innerHTML = root.querySelector(\"style\")!.outerHTML;\n if (!items.length) return note(\"muted\", t.noEvents);\n const detailUrl = this.getAttribute(\"detail-url\");\n const join = joinable\n ? {\n slug,\n appUrl: (\n this.getAttribute(\"app-url\") ||\n mp.options.appUrl ||\n \"https://app.vimine.network\"\n ).replace(/\\/+$/, \"\"),\n }\n : null;\n for (const ev of items)\n root.appendChild(this.card(ev, mp, lang, detailUrl, join));\n }\n private card(\n ev: Event,\n mp: Vimine,\n lang: Lang,\n detailUrl: string | null,\n join: { slug: string; appUrl: string } | null,\n ): HTMLElement {\n const t = STRINGS[lang];\n const el = document.createElement(\"article\");\n el.className = \"event\";\n if (ev.cover_url) {\n const img = document.createElement(\"img\");\n img.src = ev.cover_url;\n img.alt = \"\";\n el.appendChild(img);\n }\n const h = document.createElement(\"h3\");\n h.textContent = ev.title;\n el.appendChild(h);\n const meta = document.createElement(\"div\");\n meta.className = \"muted\";\n meta.textContent = `${when(ev.starts_at, ev.timezone, lang)}${ev.location ? ` · ${ev.location.name || ev.location.address || \"\"}` : \"\"}`;\n el.appendChild(meta);\n if (ev.summary) {\n const p = document.createElement(\"p\");\n p.textContent = ev.summary;\n el.appendChild(p);\n }\n if (detailUrl) {\n const a = document.createElement(\"a\");\n a.href = detailUrl.replace(\"{slug}\", encodeURIComponent(ev.slug));\n a.textContent = t.details;\n el.appendChild(a);\n }\n const mine = this.state[ev.id];\n if (mine) {\n const d = document.createElement(\"div\");\n d.className = \"muted\";\n d.textContent = mine.status === \"confirmed\" ? t.registered : t.reserved;\n el.appendChild(d);\n return el;\n }\n if (ev.status === \"published\")\n for (const tp of ev.registration_types)\n el.appendChild(this.typeRow(ev, tp, mp, lang));\n // A visitor: one call for the event, under its registrations — join and book on the hosted page, or sign in here.\n if (\n ev.status === \"published\" &&\n !mp.isSignedIn() &&\n ev.registration_types.some((tp) => tp.open)\n ) {\n const actions = document.createElement(\"div\");\n actions.className = \"actions\";\n const signIn = document.createElement(\"button\");\n signIn.type = \"button\";\n signIn.addEventListener(\n \"click\",\n () =>\n void mp.signIn({\n scopes: [\n \"events:read\",\n \"registrations:read\",\n \"registrations:write\",\n ],\n }),\n );\n if (join) {\n const a = document.createElement(\"a\");\n a.className = \"button\";\n a.href = eventEnrollUrl(join.appUrl, join.slug, ev.slug, lang);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = t.joinAndBook;\n actions.appendChild(a);\n signIn.className = \"link\";\n signIn.textContent = t.alreadyMember;\n } else signIn.textContent = t.signInToRegister;\n actions.appendChild(signIn);\n el.appendChild(actions);\n }\n return el;\n }\n private typeRow(\n ev: Event,\n tp: RegistrationType,\n mp: Vimine,\n lang: Lang,\n ): HTMLElement {\n const t = STRINGS[lang];\n const row = document.createElement(\"div\");\n row.className = \"type\";\n const left = document.createElement(\"div\");\n const n = document.createElement(\"div\");\n n.className = \"n\";\n n.textContent = `${tp.name} · ${tp.amount > 0 ? money(tp.amount, tp.currency, lang) : t.free}`;\n left.appendChild(n);\n const s = document.createElement(\"div\");\n s.className = \"muted\";\n s.textContent = [\n tp.remaining != null ? placesLabel(tp.remaining, lang) : \"\",\n tp.reason ? t.reason[tp.reason] || tp.reason : \"\",\n ]\n .filter(Boolean)\n .join(\" · \");\n left.appendChild(s);\n row.appendChild(left);\n // A visitor has the event's own call below the registrations (`card`): no button per registration.\n if (!mp.isSignedIn()) return row;\n const btn = document.createElement(\"button\");\n btn.type = \"button\";\n btn.textContent = t.register;\n btn.disabled = !tp.open;\n btn.addEventListener(\"click\", async () => {\n btn.disabled = true;\n try {\n const reg = await mp.registrations.create(ev.slug, {\n registration_type: tp.uid,\n });\n this.state[ev.id] = reg;\n this.dispatchEvent(\n new CustomEvent(\"vimine-registration\", {\n detail: { registration: reg },\n bubbles: true,\n }),\n );\n void this.render();\n } catch (err) {\n btn.disabled = false;\n const reasons = (\n (err as { errors?: { code?: string }[] })?.errors || []\n )\n .map((e) => t.reason[e.code || \"\"] || e.code)\n .filter(Boolean);\n s.textContent = reasons.length ? reasons.join(\", \") : t.error;\n s.className = \"error\";\n }\n });\n row.appendChild(btn);\n return row;\n }\n}\n"]}
|