reactjs-tiptap-editor-pro 0.2.32 → 0.2.34

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.
@@ -1,9 +1,8 @@
1
- var p = Object.defineProperty;
2
- var s = (e, t, o) => t in e ? p(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
- var a = (e, t, o) => s(e, typeof t != "symbol" ? t + "" : t, o);
4
- import { useMemo as m, useEffect as g } from "react";
5
- import { aj as u, ak as c } from "./vendor-Cpa6z-M0.js";
6
- const h = "en", b = 200, L = b - 80, E = 20, S = 1e5, B = 16, w = 10, R = 10, I = 2, W = [
1
+ var D = Object.defineProperty;
2
+ var S = (t, o, n) => o in t ? D(t, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[o] = n;
3
+ var F = (t, o, n) => S(t, typeof o != "symbol" ? o + "" : o, n);
4
+ import { useSyncExternalStore as y, useMemo as E, useEffect as L } from "react";
5
+ const w = "en", B = 200, it = B - 80, rt = 20, lt = 1e5, dt = 16, at = 10, nt = 10, st = 2, pt = [
7
6
  "#000000",
8
7
  "#262626",
9
8
  "#595959",
@@ -74,7 +73,7 @@ const h = "en", b = 200, L = b - 80, E = 20, S = 1e5, B = 16, w = 10, R = 10, I
74
73
  "#061178",
75
74
  "#22075E",
76
75
  "#780650"
77
- ], U = [
76
+ ], ut = [
78
77
  "Inter",
79
78
  "Comic Sans MS, Comic Sans",
80
79
  "serif",
@@ -90,19 +89,19 @@ const h = "en", b = 200, L = b - 80, E = 20, S = 1e5, B = 16, w = 10, R = 10, I
90
89
  "Lucida Console",
91
90
  "Monaco",
92
91
  "monospace"
93
- ], j = [
92
+ ], gt = [
94
93
  "html",
95
94
  "css",
96
95
  "js",
97
96
  "ts",
98
97
  "bash"
99
- ], M = {
98
+ ], mt = {
100
99
  html: "HTML",
101
100
  css: "CSS",
102
101
  js: "JavaScript",
103
102
  ts: "TypeScript",
104
103
  bash: "Bash"
105
- }, N = [
104
+ }, ct = [
106
105
  "10px",
107
106
  "11px",
108
107
  "12px",
@@ -117,9 +116,9 @@ const h = "en", b = 200, L = b - 80, E = 20, S = 1e5, B = 16, w = 10, R = 10, I
117
116
  "36px",
118
117
  "48px",
119
118
  "72px"
120
- ], P = "default";
121
- var f = /* @__PURE__ */ ((e) => (e[e["size-small"] = 200] = "size-small", e[e["size-medium"] = 500] = "size-medium", e["size-large"] = "100%", e))(f || {}), k = /* @__PURE__ */ ((e) => (e[e["size-small"] = 480] = "size-small", e[e["size-medium"] = 640] = "size-medium", e["size-large"] = "100%", e))(k || {});
122
- const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
119
+ ], ht = "default";
120
+ var R = /* @__PURE__ */ ((t) => (t[t["size-small"] = 200] = "size-small", t[t["size-medium"] = 500] = "size-medium", t["size-large"] = "100%", t))(R || {}), I = /* @__PURE__ */ ((t) => (t[t["size-small"] = 480] = "size-small", t[t["size-medium"] = 640] = "size-medium", t["size-large"] = "100%", t))(I || {});
121
+ const ft = ["100%", "115%", "150%", "200%", "250%", "300%"], bt = "1", kt = [
123
122
  "bold",
124
123
  "italic",
125
124
  "underline",
@@ -130,7 +129,347 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
130
129
  "color",
131
130
  "highlight",
132
131
  "textAlign"
133
- ], F = {
132
+ ];
133
+ function W({
134
+ updateComputed: t,
135
+ notifyEffect: o
136
+ }) {
137
+ let n, s;
138
+ return {
139
+ /**
140
+ * Links a given dependency and subscriber if they are not already linked.
141
+ *
142
+ * @param dep - The dependency to be linked.
143
+ * @param sub - The subscriber that depends on this dependency.
144
+ * @returns The newly created link object if the two are not already linked; otherwise `undefined`.
145
+ */
146
+ link(e, i) {
147
+ const r = i.depsTail;
148
+ if (r !== void 0 && r.dep === e)
149
+ return;
150
+ const d = r !== void 0 ? r.nextDep : i.deps;
151
+ if (d !== void 0 && d.dep === e) {
152
+ i.depsTail = d;
153
+ return;
154
+ }
155
+ const l = e.subsTail;
156
+ if (!(l !== void 0 && l.sub === i && h(l, i)))
157
+ return p(e, i, d, r);
158
+ },
159
+ /**
160
+ * Traverses and marks subscribers starting from the provided link.
161
+ *
162
+ * It sets flags (e.g., Dirty, PendingComputed, PendingEffect) on each subscriber
163
+ * to indicate which ones require re-computation or effect processing.
164
+ * This function should be called after a signal's value changes.
165
+ *
166
+ * @param link - The starting link from which propagation begins.
167
+ */
168
+ propagate(e) {
169
+ let i = 32, r = e, d = 0;
170
+ t: do {
171
+ const l = e.sub, a = l.flags;
172
+ if (!(a & 244) && (l.flags = a | i | 8, !0) || a & 16 && !(a & 4) && (l.flags = a & -17 | i | 8, !0) || !(a & 224) && h(e, l) && (l.flags = a | 16 | i | 8, l.subs !== void 0)) {
173
+ const g = l.subs;
174
+ if (g !== void 0) {
175
+ g.nextSub !== void 0 ? (g.prevSub = r, e = r = g, i = 64, ++d) : (e = g, i = a & 2 ? 128 : 64);
176
+ continue;
177
+ }
178
+ a & 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l);
179
+ } else a & (4 | i) ? !(a & i) && a & 224 && h(e, l) && (l.flags = a | i) : (l.flags = a | i | 8, (a & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = l.deps : n = l, s = l));
180
+ if ((e = r.nextSub) !== void 0) {
181
+ r = e, i = d ? 64 : 32;
182
+ continue;
183
+ }
184
+ for (; d; ) {
185
+ --d;
186
+ const x = r.dep.subs;
187
+ if (r = x.prevSub, x.prevSub = void 0, (e = r.nextSub) !== void 0) {
188
+ r = e, i = d ? 64 : 32;
189
+ continue t;
190
+ }
191
+ }
192
+ break;
193
+ } while (!0);
194
+ },
195
+ /**
196
+ * Prepares the given subscriber to track new dependencies.
197
+ *
198
+ * It resets the subscriber's internal pointers (e.g., depsTail) and
199
+ * sets its flags to indicate it is now tracking dependency links.
200
+ *
201
+ * @param sub - The subscriber to start tracking.
202
+ */
203
+ startTracking(e) {
204
+ e.depsTail = void 0, e.flags = e.flags & -249 | 4;
205
+ },
206
+ /**
207
+ * Concludes tracking of dependencies for the specified subscriber.
208
+ *
209
+ * It clears or unlinks any tracked dependency information, then
210
+ * updates the subscriber's flags to indicate tracking is complete.
211
+ *
212
+ * @param sub - The subscriber whose tracking is ending.
213
+ */
214
+ endTracking(e) {
215
+ const i = e.depsTail;
216
+ if (i !== void 0) {
217
+ const r = i.nextDep;
218
+ r !== void 0 && (T(r), i.nextDep = void 0);
219
+ } else e.deps !== void 0 && (T(e.deps), e.deps = void 0);
220
+ e.flags &= -5;
221
+ },
222
+ /**
223
+ * Updates the dirty flag for the given subscriber based on its dependencies.
224
+ *
225
+ * If the subscriber has any pending computeds, this function sets the Dirty flag
226
+ * and returns `true`. Otherwise, it clears the PendingComputed flag and returns `false`.
227
+ *
228
+ * @param sub - The subscriber to update.
229
+ * @param flags - The current flag set for this subscriber.
230
+ * @returns `true` if the subscriber is marked as Dirty; otherwise `false`.
231
+ */
232
+ updateDirtyFlag(e, i) {
233
+ return v(e.deps) ? (e.flags = i | 32, !0) : (e.flags = i & -65, !1);
234
+ },
235
+ /**
236
+ * Updates the computed subscriber if necessary before its value is accessed.
237
+ *
238
+ * If the subscriber is marked Dirty or PendingComputed, this function runs
239
+ * the provided updateComputed logic and triggers a shallowPropagate for any
240
+ * downstream subscribers if an actual update occurs.
241
+ *
242
+ * @param computed - The computed subscriber to update.
243
+ * @param flags - The current flag set for this subscriber.
244
+ */
245
+ processComputedUpdate(e, i) {
246
+ if ((i & 32 || (v(e.deps) || (e.flags = i & -65, !1))) && t(e)) {
247
+ const r = e.subs;
248
+ r !== void 0 && c(r);
249
+ }
250
+ },
251
+ /**
252
+ * Ensures all pending internal effects for the given subscriber are processed.
253
+ *
254
+ * This should be called after an effect decides not to re-run itself but may still
255
+ * have dependencies flagged with PendingEffect. If the subscriber is flagged with
256
+ * PendingEffect, this function clears that flag and invokes `notifyEffect` on any
257
+ * related dependencies marked as Effect and Propagated, processing pending effects.
258
+ *
259
+ * @param sub - The subscriber which may have pending effects.
260
+ * @param flags - The current flags on the subscriber to check.
261
+ */
262
+ processPendingInnerEffects(e, i) {
263
+ if (i & 128) {
264
+ e.flags = i & -129;
265
+ let r = e.deps;
266
+ do {
267
+ const d = r.dep;
268
+ "flags" in d && d.flags & 2 && d.flags & 224 && o(d), r = r.nextDep;
269
+ } while (r !== void 0);
270
+ }
271
+ },
272
+ /**
273
+ * Processes queued effect notifications after a batch operation finishes.
274
+ *
275
+ * Iterates through all queued effects, calling notifyEffect on each.
276
+ * If an effect remains partially handled, its flags are updated, and future
277
+ * notifications may be triggered until fully handled.
278
+ */
279
+ processEffectNotifications() {
280
+ for (; n !== void 0; ) {
281
+ const e = n, i = e.depsTail, r = i.nextDep;
282
+ r !== void 0 ? (i.nextDep = void 0, n = r.sub) : (n = void 0, s = void 0), o(e) || (e.flags &= -9);
283
+ }
284
+ }
285
+ };
286
+ function p(e, i, r, d) {
287
+ const l = {
288
+ dep: e,
289
+ sub: i,
290
+ nextDep: r,
291
+ prevSub: void 0,
292
+ nextSub: void 0
293
+ };
294
+ if (d === void 0 ? i.deps = l : d.nextDep = l, e.subs === void 0)
295
+ e.subs = l;
296
+ else {
297
+ const a = e.subsTail;
298
+ l.prevSub = a, a.nextSub = l;
299
+ }
300
+ return i.depsTail = l, e.subsTail = l, l;
301
+ }
302
+ function v(e) {
303
+ let i = 0, r;
304
+ t: do {
305
+ r = !1;
306
+ const d = e.dep;
307
+ if ("flags" in d) {
308
+ const l = d.flags;
309
+ if ((l & 33) === 33) {
310
+ if (t(d)) {
311
+ const a = d.subs;
312
+ a.nextSub !== void 0 && c(a), r = !0;
313
+ }
314
+ } else if ((l & 65) === 65) {
315
+ const a = d.subs;
316
+ a.nextSub !== void 0 && (a.prevSub = e), e = d.deps, ++i;
317
+ continue;
318
+ }
319
+ }
320
+ if (!r && e.nextDep !== void 0) {
321
+ e = e.nextDep;
322
+ continue;
323
+ }
324
+ if (i) {
325
+ let l = e.sub;
326
+ do {
327
+ --i;
328
+ const a = l.subs;
329
+ if (r) {
330
+ if (t(l)) {
331
+ (e = a.prevSub) !== void 0 ? (a.prevSub = void 0, c(l.subs), l = e.sub) : l = a.sub;
332
+ continue;
333
+ }
334
+ } else
335
+ l.flags &= -65;
336
+ if ((e = a.prevSub) !== void 0) {
337
+ if (a.prevSub = void 0, e.nextDep !== void 0) {
338
+ e = e.nextDep;
339
+ continue t;
340
+ }
341
+ l = e.sub;
342
+ } else {
343
+ if ((e = a.nextDep) !== void 0)
344
+ continue t;
345
+ l = a.sub;
346
+ }
347
+ r = !1;
348
+ } while (i);
349
+ }
350
+ return r;
351
+ } while (!0);
352
+ }
353
+ function c(e) {
354
+ do {
355
+ const i = e.sub, r = i.flags;
356
+ (r & 96) === 64 && (i.flags = r | 32 | 8, (r & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = i.deps : n = i, s = i)), e = e.nextSub;
357
+ } while (e !== void 0);
358
+ }
359
+ function h(e, i) {
360
+ const r = i.depsTail;
361
+ if (r !== void 0) {
362
+ let d = i.deps;
363
+ do {
364
+ if (d === e)
365
+ return !0;
366
+ if (d === r)
367
+ break;
368
+ d = d.nextDep;
369
+ } while (d !== void 0);
370
+ }
371
+ return !1;
372
+ }
373
+ function T(e) {
374
+ do {
375
+ const i = e.dep, r = e.nextDep, d = e.nextSub, l = e.prevSub;
376
+ if (d !== void 0 ? d.prevSub = l : i.subsTail = l, l !== void 0 ? l.nextSub = d : i.subs = d, i.subs === void 0 && "deps" in i) {
377
+ const a = i.flags;
378
+ a & 32 || (i.flags = a | 32);
379
+ const g = i.deps;
380
+ if (g !== void 0) {
381
+ e = g, i.depsTail.nextDep = r, i.deps = void 0, i.depsTail = void 0;
382
+ continue;
383
+ }
384
+ }
385
+ e = r;
386
+ } while (e !== void 0);
387
+ }
388
+ }
389
+ var {
390
+ link: C,
391
+ propagate: N,
392
+ updateDirtyFlag: U,
393
+ startTracking: b,
394
+ endTracking: k,
395
+ processEffectNotifications: P,
396
+ processPendingInnerEffects: _
397
+ } = W({
398
+ updateComputed(t) {
399
+ const o = u;
400
+ u = t, b(t);
401
+ try {
402
+ const n = t.currentValue, s = t.getter(n);
403
+ return n !== s ? (t.currentValue = s, !0) : !1;
404
+ } finally {
405
+ u = o, k(t);
406
+ }
407
+ },
408
+ notifyEffect(t) {
409
+ return "isScope" in t ? q(t) : H(t);
410
+ }
411
+ }), u;
412
+ function j(t) {
413
+ return O.bind({
414
+ currentValue: t,
415
+ subs: void 0,
416
+ subsTail: void 0
417
+ });
418
+ }
419
+ function M(t) {
420
+ const o = {
421
+ fn: t,
422
+ subs: void 0,
423
+ subsTail: void 0,
424
+ deps: void 0,
425
+ depsTail: void 0,
426
+ flags: 2
427
+ /* Effect */
428
+ };
429
+ return u !== void 0 && C(o, u), A(o), K.bind(o);
430
+ }
431
+ function A(t) {
432
+ const o = u;
433
+ u = t, b(t);
434
+ try {
435
+ t.fn();
436
+ } finally {
437
+ u = o, k(t);
438
+ }
439
+ }
440
+ function H(t) {
441
+ const o = t.flags;
442
+ return o & 32 || o & 64 && U(t, o) ? A(t) : _(t, t.flags), !0;
443
+ }
444
+ function q(t) {
445
+ return t.flags & 128 ? (_(t, t.flags), !0) : !1;
446
+ }
447
+ function O(...t) {
448
+ if (t.length) {
449
+ if (this.currentValue !== (this.currentValue = t[0])) {
450
+ const o = this.subs;
451
+ o !== void 0 && (N(o), P());
452
+ }
453
+ } else
454
+ return u !== void 0 && C(this, u), this.currentValue;
455
+ }
456
+ function K() {
457
+ b(this), k(this);
458
+ }
459
+ function G(t) {
460
+ return j(t);
461
+ }
462
+ function V(t) {
463
+ return [y((o) => {
464
+ let n = M(() => {
465
+ t(), o();
466
+ });
467
+ return () => n();
468
+ }, () => t(), () => t()), (o) => {
469
+ t(typeof o == "function" ? o(t()) : o);
470
+ }];
471
+ }
472
+ const X = {
134
473
  "editor.remove": "Remove",
135
474
  "editor.copy": "Copy",
136
475
  "editor.words": "WORDS",
@@ -300,7 +639,7 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
300
639
  "editor.twitter.tooltip": "Twitter",
301
640
  "editor.tooltip.flipX": "Flip Horizontal",
302
641
  "editor.tooltip.flipY": "Flip Vertical"
303
- }, C = {
642
+ }, $ = {
304
643
  "editor.remove": "Remover",
305
644
  "editor.copy": "Copiar",
306
645
  "editor.words": "PALAVRAS",
@@ -470,7 +809,7 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
470
809
  "editor.twitter.tooltip": "Twitter",
471
810
  "editor.tooltip.flipX": "Inverter Horizontal",
472
811
  "editor.tooltip.flipY": "Inverter Vertical"
473
- }, T = {
812
+ }, Y = {
474
813
  "editor.remove": "Xóa",
475
814
  "editor.copy": "Sao chép",
476
815
  "editor.words": "TỪ",
@@ -640,7 +979,7 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
640
979
  "editor.twitter.tooltip": "Twitter",
641
980
  "editor.tooltip.flipX": "Lật Ngang",
642
981
  "editor.tooltip.flipY": "Lật Dọc"
643
- }, _ = {
982
+ }, J = {
644
983
  "editor.remove": "移除",
645
984
  "editor.copy": "复制",
646
985
  "editor.words": "字数",
@@ -810,7 +1149,7 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
810
1149
  "editor.twitter.tooltip": "Twitter",
811
1150
  "editor.tooltip.flipX": "水平翻转",
812
1151
  "editor.tooltip.flipY": "垂直翻转"
813
- }, x = {
1152
+ }, Q = {
814
1153
  "editor.remove": "Eltávolítás",
815
1154
  "editor.copy": "Másolás",
816
1155
  "editor.words": "SZAVAK",
@@ -981,12 +1320,12 @@ const H = ["100%", "115%", "150%", "200%", "250%", "300%"], q = "1", O = [
981
1320
  "editor.tooltip.flipX": "Vízszintes tükrözés",
982
1321
  "editor.tooltip.flipY": "Függőleges tükrözés"
983
1322
  };
984
- function v(e) {
985
- return e = e || /* @__PURE__ */ new Map(), {
1323
+ function Z(t) {
1324
+ return t = t || /* @__PURE__ */ new Map(), {
986
1325
  /**
987
1326
  * A Map of event names to registered handler functions.
988
1327
  */
989
- all: e,
1328
+ all: t,
990
1329
  /**
991
1330
  * Register an event handler for the given type.
992
1331
  * @param {string|symbol} type Type of event to listen for, or `'*'` for all events
@@ -994,9 +1333,9 @@ function v(e) {
994
1333
  * @memberOf mitt
995
1334
  */
996
1335
  //@ts-expect-error
997
- on(t, o) {
998
- const i = e.get(t);
999
- i ? i.push(o) : e.set(t, [o]);
1336
+ on(o, n) {
1337
+ const s = t.get(o);
1338
+ s ? s.push(n) : t.set(o, [n]);
1000
1339
  },
1001
1340
  /**
1002
1341
  * Remove an event handler for the given type.
@@ -1006,9 +1345,9 @@ function v(e) {
1006
1345
  * @memberOf mitt
1007
1346
  */
1008
1347
  //@ts-expect-error
1009
- off(t, o) {
1010
- const i = e.get(t);
1011
- i && (o ? i.splice(i.indexOf(o) >>> 0, 1) : e.set(t, []));
1348
+ off(o, n) {
1349
+ const s = t.get(o);
1350
+ s && (n ? s.splice(s.indexOf(n) >>> 0, 1) : t.set(o, []));
1012
1351
  },
1013
1352
  /**
1014
1353
  * Invoke all handlers for the given type.
@@ -1020,128 +1359,128 @@ function v(e) {
1020
1359
  * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
1021
1360
  * @memberOf mitt
1022
1361
  */
1023
- emit(t, o) {
1024
- let i = e.get(t);
1025
- i && [...i].map((r) => {
1026
- r(o);
1027
- }), i = e.get("*"), i && [...i].map((r) => {
1028
- r(t, o);
1362
+ emit(o, n) {
1363
+ let s = t.get(o);
1364
+ s && [...s].map((p) => {
1365
+ p(n);
1366
+ }), s = t.get("*"), s && [...s].map((p) => {
1367
+ p(o, n);
1029
1368
  });
1030
1369
  }
1031
1370
  };
1032
1371
  }
1033
- const l = {
1034
- lang: h,
1372
+ const m = {
1373
+ lang: w,
1035
1374
  message: {
1036
- en: F,
1037
- hu_HU: x,
1038
- vi: T,
1039
- zh_CN: _,
1040
- pt_BR: C
1375
+ en: X,
1376
+ hu_HU: Q,
1377
+ vi: Y,
1378
+ zh_CN: J,
1379
+ pt_BR: $
1041
1380
  }
1042
1381
  };
1043
- class A {
1382
+ class tt {
1044
1383
  constructor() {
1045
- a(this, "emitter");
1046
- this.emitter = v();
1384
+ F(this, "emitter");
1385
+ this.emitter = Z();
1047
1386
  }
1048
1387
  // Getter and setter for current language
1049
1388
  get lang() {
1050
- return l.lang;
1389
+ return m.lang;
1051
1390
  }
1052
- set lang(t) {
1053
- if (!this.isLangSupported(t)) {
1391
+ set lang(o) {
1392
+ if (!this.isLangSupported(o)) {
1054
1393
  console.warn(
1055
- `Can't find the current language "${t}", Using language "${l.lang}" by default`
1394
+ `Can't find the current language "${o}", Using language "${m.lang}" by default`
1056
1395
  );
1057
1396
  return;
1058
1397
  }
1059
- l.lang = t, this.emitter.emit("lang", t);
1398
+ m.lang = o, this.emitter.emit("lang", o);
1060
1399
  }
1061
1400
  // Getter and setter for messages
1062
1401
  get message() {
1063
- return l.message;
1402
+ return m.message;
1064
1403
  }
1065
- set message(t) {
1066
- l.message = t;
1404
+ set message(o) {
1405
+ m.message = o;
1067
1406
  }
1068
1407
  // Load messages for a specific language
1069
- loadLangMessage(t) {
1070
- return this.message[t];
1408
+ loadLangMessage(o) {
1409
+ return this.message[o];
1071
1410
  }
1072
1411
  // Check if a language is supported
1073
- isLangSupported(t) {
1074
- return Object.keys(this.message).includes(t);
1412
+ isLangSupported(o) {
1413
+ return Object.keys(this.message).includes(o);
1075
1414
  }
1076
1415
  // Set the current language
1077
- setLang(t) {
1078
- this.lang = t;
1416
+ setLang(o) {
1417
+ this.lang = o;
1079
1418
  }
1080
1419
  // Register a language change watcher
1081
- registerWatchLang(t) {
1082
- return this.emitter.on("lang", t), {
1420
+ registerWatchLang(o) {
1421
+ return this.emitter.on("lang", o), {
1083
1422
  unsubscribe: () => {
1084
- this.emitter.off("lang", t);
1423
+ this.emitter.off("lang", o);
1085
1424
  }
1086
1425
  };
1087
1426
  }
1088
1427
  // Set messages for a specific language
1089
- setMessage(t, o) {
1090
- this.message[t] = o;
1428
+ setMessage(o, n) {
1429
+ this.message[o] = n;
1091
1430
  }
1092
1431
  // Build a translation function for a given language
1093
- buildLocalesHandler(t) {
1094
- t || (t = this.lang);
1095
- const o = this.loadLangMessage(t);
1096
- return function(r) {
1097
- return o[r] || r;
1432
+ buildLocalesHandler(o) {
1433
+ o || (o = this.lang);
1434
+ const n = this.loadLangMessage(o);
1435
+ return function(p) {
1436
+ return n[p] || p;
1098
1437
  };
1099
1438
  }
1100
1439
  }
1101
- const d = new A(), n = c(l.lang);
1102
- function K() {
1103
- const [e, t] = u(n), o = m(() => d.buildLocalesHandler(e), [e]);
1104
- return g(() => {
1105
- const i = d.registerWatchLang((r) => {
1106
- t(r);
1440
+ const f = new tt(), z = G(m.lang);
1441
+ function vt() {
1442
+ const [t, o] = V(z), n = E(() => f.buildLocalesHandler(t), [t]);
1443
+ return L(() => {
1444
+ const s = f.registerWatchLang((p) => {
1445
+ o(p);
1107
1446
  });
1108
1447
  return () => {
1109
- i.unsubscribe();
1448
+ s.unsubscribe();
1110
1449
  };
1111
1450
  }, []), {
1112
- lang: e,
1113
- t: o
1451
+ lang: t,
1452
+ t: n
1114
1453
  };
1115
1454
  }
1116
- const G = {
1117
- t: (e) => d.buildLocalesHandler(n())(e)
1455
+ const Tt = {
1456
+ t: (t) => f.buildLocalesHandler(z())(t)
1118
1457
  };
1119
1458
  export {
1120
- O as B,
1121
- W as C,
1122
- j as D,
1123
- L as E,
1124
- S as I,
1125
- M,
1126
- R as T,
1127
- k as V,
1128
- F as a,
1129
- x as b,
1130
- T as c,
1131
- _ as d,
1132
- C as e,
1133
- U as f,
1134
- N as g,
1135
- P as h,
1136
- G as i,
1137
- q as j,
1138
- H as k,
1139
- d as l,
1140
- B as m,
1141
- E as n,
1142
- w as o,
1143
- I as p,
1144
- v as q,
1145
- f as r,
1146
- K as u
1459
+ kt as B,
1460
+ pt as C,
1461
+ gt as D,
1462
+ it as E,
1463
+ R as I,
1464
+ mt as M,
1465
+ nt as T,
1466
+ I as V,
1467
+ ut as a,
1468
+ ct as b,
1469
+ ht as c,
1470
+ bt as d,
1471
+ ft as e,
1472
+ G as f,
1473
+ lt as g,
1474
+ dt as h,
1475
+ rt as i,
1476
+ at as j,
1477
+ st as k,
1478
+ Tt as l,
1479
+ f as m,
1480
+ X as n,
1481
+ Q as o,
1482
+ Y as p,
1483
+ J as q,
1484
+ $ as r,
1485
+ vt as u
1147
1486
  };