intlayer-editor 8.4.1 → 8.4.2

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.
Files changed (157) hide show
  1. package/client/dist/assets/{CodeBlockShiki-BpWMMgAf.js → CodeBlockShiki-BQ0Urv39.js} +17 -18
  2. package/client/dist/assets/{angular-html-C9KJai8F.js → angular-html-B40pL6wl.js} +1 -1
  3. package/client/dist/assets/{angular-ts-BVoYf76x.js → angular-ts-DEfIxZMp.js} +2 -2
  4. package/client/dist/assets/{astro-CthjkCYm.js → astro-DDXXh1_1.js} +6 -6
  5. package/client/dist/assets/bash-Ctbhv6bB.js +2 -0
  6. package/client/dist/assets/{blade-BtLAoZmt.js → blade-BqWGpLk3.js} +7 -7
  7. package/client/dist/assets/{bundle-web-m4UDFBJk.js → bundle-web-CQgz7w95.js} +124 -124
  8. package/client/dist/assets/{coffee-B4Wyhs45.js → coffee-B7kx3Cid.js} +1 -1
  9. package/client/dist/assets/{cpp-7dTvF10R.js → cpp-3L9-cBo7.js} +3 -3
  10. package/client/dist/assets/github-dark-C5-x0-6C.js +2 -0
  11. package/client/dist/assets/github-light-ByNhJa3j.js +2 -0
  12. package/client/dist/assets/{glsl-CrUwbCO_.js → glsl-D7GhljHe.js} +1 -1
  13. package/client/dist/assets/{graphql-BeV7Adoa.js → graphql-CFwfqi3h.js} +4 -4
  14. package/client/dist/assets/{haml-DH35i0Df.js → haml-AGy9GVVj.js} +2 -2
  15. package/client/dist/assets/{handlebars-CYzbg5Zd.js → handlebars-vOgalqpV.js} +4 -4
  16. package/client/dist/assets/{html-DIIpd-Y_.js → html-B0M7Ubrz.js} +2 -2
  17. package/client/dist/assets/html-Cla_1apk.js +2 -0
  18. package/client/dist/assets/{html-derivative-C5VsVRfx.js → html-derivative-B7ZIKlQ2.js} +1 -1
  19. package/client/dist/assets/{http-D8W38g2W.js → http-Bw1SWifZ.js} +4 -4
  20. package/client/dist/assets/{hurl-CjtGt5KL.js → hurl-zcy5Fl2y.js} +3 -3
  21. package/client/dist/assets/{index-B9llXyVT.js → index-DT2mmysE.js} +3296 -1477
  22. package/client/dist/assets/javascript-BeimltzM.js +2 -0
  23. package/client/dist/assets/{jinja-BNrxSmwS.js → jinja-CpV-HaFu.js} +1 -1
  24. package/client/dist/assets/{jison-BTSoi8vr.js → jison-DaIhV8hg.js} +1 -1
  25. package/client/dist/assets/json-DPD_iq4F.js +2 -0
  26. package/client/dist/assets/json5-DcYx4UAX.js +2 -0
  27. package/client/dist/assets/{julia-BoLZ5opG.js → julia-BwktqeJq.js} +5 -5
  28. package/client/dist/assets/{marko-DYFloQgs.js → marko-DZhB4BDZ.js} +4 -4
  29. package/client/dist/assets/{mdc-Ce5YP0gO.js → mdc-ByFPmJVb.js} +3 -3
  30. package/client/dist/assets/{php-Cvoz1XWD.js → php-Cq-zzIgW.js} +6 -6
  31. package/client/dist/assets/{pug-B254dajO.js → pug-BqsC6HRi.js} +3 -3
  32. package/client/dist/assets/{scss-DBQoQ692.js → scss-BDzsPcer.js} +1 -1
  33. package/client/dist/assets/{svelte-sPCLa-5U.js → svelte-7kInhlba.js} +4 -4
  34. package/client/dist/assets/{ts-tags-BBvI9Ei0.js → ts-tags-CmxNgKEj.js} +7 -7
  35. package/client/dist/assets/tsx-CHlTOe14.js +2 -0
  36. package/client/dist/assets/typescript-B4HgavCc.js +2 -0
  37. package/client/dist/assets/{vue-C1PsK9gt.js → vue-CG7sAwHH.js} +6 -6
  38. package/client/dist/assets/vue-DlaU9qIx.js +2 -0
  39. package/client/dist/assets/{vue-html-D5qVhuGI.js → vue-html-DHRq-ZD1.js} +1 -1
  40. package/client/dist/assets/{vue-vine-DRRB0gmq.js → vue-vine-BAAyauNs.js} +6 -6
  41. package/client/dist/assets/xml-Bp8m4wBs.js +2 -0
  42. package/client/dist/assets/{xml-Bnc0qLkR.js → xml-CPgLmR05.js} +1 -1
  43. package/client/dist/assets/yaml-CX3TwziJ.js +2 -0
  44. package/client/dist/index.html +1 -4
  45. package/package.json +11 -11
  46. package/client/dist/assets/MarkdownMetadataRendererInternal-DMFHkj2h.js +0 -42
  47. package/client/dist/assets/bash-CgEmcnYZ.js +0 -2
  48. package/client/dist/assets/esm-DNFnzQnW.js +0 -1723
  49. package/client/dist/assets/getContentNodeByKeyPath-BDFNqZy_.js +0 -58
  50. package/client/dist/assets/github-dark-CeyRTViw.js +0 -2
  51. package/client/dist/assets/github-light-DkC943a0.js +0 -2
  52. package/client/dist/assets/html-D-5QhVQ7.js +0 -2
  53. package/client/dist/assets/javascript-CmhSbI20.js +0 -2
  54. package/client/dist/assets/json-COHoP3SY.js +0 -2
  55. package/client/dist/assets/json5-B9APma8F.js +0 -2
  56. package/client/dist/assets/preload-helper-CoI0IUIE.js +0 -61
  57. package/client/dist/assets/tsx-Dd1aPV59.js +0 -2
  58. package/client/dist/assets/typescript-BL5DoVSN.js +0 -2
  59. package/client/dist/assets/vue--x-KJx_U.js +0 -2
  60. package/client/dist/assets/xml-BZimFlwz.js +0 -2
  61. package/client/dist/assets/yaml-BW9EBdAv.js +0 -2
  62. /package/client/dist/assets/{andromeeda-D9tXBqC-.js → andromeeda-BY8O__rD.js} +0 -0
  63. /package/client/dist/assets/{aurora-x-C104ZGur.js → aurora-x-CwL-GNR7.js} +0 -0
  64. /package/client/dist/assets/{ayu-dark-DWpCtGc6.js → ayu-dark-BBLnrtAD.js} +0 -0
  65. /package/client/dist/assets/{ayu-light-CECQ0nGX.js → ayu-light-DXc4qGzs.js} +0 -0
  66. /package/client/dist/assets/{ayu-mirage-COuDN4ns.js → ayu-mirage-CUqxsSY9.js} +0 -0
  67. /package/client/dist/assets/{c-YE5E93Zf.js → c-rYJZrW1k.js} +0 -0
  68. /package/client/dist/assets/{catppuccin-frappe-h7rVaSlW.js → catppuccin-frappe-BU7j5Tpb.js} +0 -0
  69. /package/client/dist/assets/{catppuccin-latte-DuYSKRbe.js → catppuccin-latte-2Mz3CxtD.js} +0 -0
  70. /package/client/dist/assets/{catppuccin-macchiato-oQGqG0MQ.js → catppuccin-macchiato-C8_0LbtV.js} +0 -0
  71. /package/client/dist/assets/{catppuccin-mocha-D7aZCK2q.js → catppuccin-mocha-DZJpk67z.js} +0 -0
  72. /package/client/dist/assets/{css-CbVdw2Vx.js → css-BznhwoPH.js} +0 -0
  73. /package/client/dist/assets/{csv-B9m8dC01.js → csv-BglKJHzp.js} +0 -0
  74. /package/client/dist/assets/{dark-plus-py6_0-oZ.js → dark-plus-BrB11_Kq.js} +0 -0
  75. /package/client/dist/assets/{dist-BP4OKmDF.js → dist-JL9Mfqir.js} +0 -0
  76. /package/client/dist/assets/{dracula-KE0gm51O.js → dracula-DyxKP7j4.js} +0 -0
  77. /package/client/dist/assets/{dracula-soft-B8U_ir5T.js → dracula-soft-BZFuOs8M.js} +0 -0
  78. /package/client/dist/assets/{everforest-dark-B2JgZR5v.js → everforest-dark-Wuu7DlvF.js} +0 -0
  79. /package/client/dist/assets/{everforest-light-yiC4xIKi.js → everforest-light-CBnZ6Gdn.js} +0 -0
  80. /package/client/dist/assets/{github-dark-default-cvKXPsGo.js → github-dark-default-DLYIApiv.js} +0 -0
  81. /package/client/dist/assets/{github-dark-dimmed-K3wk9czK.js → github-dark-dimmed-D-v6GD-D.js} +0 -0
  82. /package/client/dist/assets/{github-dark-high-contrast-BljHNUFs.js → github-dark-high-contrast-6fANxq9H.js} +0 -0
  83. /package/client/dist/assets/{github-dark-Dls1MHlQ.js → github-dark-mYD1tu1x.js} +0 -0
  84. /package/client/dist/assets/{github-light-DssNX3QF.js → github-light-DqxaZC5J.js} +0 -0
  85. /package/client/dist/assets/{github-light-default-CqDRRARt.js → github-light-default-BPXrwD2R.js} +0 -0
  86. /package/client/dist/assets/{github-light-high-contrast-MgohVKyD.js → github-light-high-contrast-CSfjfk1G.js} +0 -0
  87. /package/client/dist/assets/{gruvbox-dark-hard-D-zn943j.js → gruvbox-dark-hard-D0YE4G_7.js} +0 -0
  88. /package/client/dist/assets/{gruvbox-dark-medium-DJ8_rVKi.js → gruvbox-dark-medium-lrOhwMWw.js} +0 -0
  89. /package/client/dist/assets/{gruvbox-dark-soft-DYdEaxoi.js → gruvbox-dark-soft-D3zz0Ino.js} +0 -0
  90. /package/client/dist/assets/{gruvbox-light-hard-BRbDZM7a.js → gruvbox-light-hard-Bflom6T7.js} +0 -0
  91. /package/client/dist/assets/{gruvbox-light-medium-B44e04Yo.js → gruvbox-light-medium-Cuc0uMCb.js} +0 -0
  92. /package/client/dist/assets/{gruvbox-light-soft-DwzQ4IYg.js → gruvbox-light-soft-Bv7Ot-z0.js} +0 -0
  93. /package/client/dist/assets/{horizon-ZzEu6UnM.js → horizon-DhXoK0Ed.js} +0 -0
  94. /package/client/dist/assets/{horizon-bright-MN7Rxqk4.js → horizon-bright-DXfweL4O.js} +0 -0
  95. /package/client/dist/assets/{houston-DbO_nj2G.js → houston-C4ja_8uc.js} +0 -0
  96. /package/client/dist/assets/{imba-Dtz0Qjpr.js → imba-DU1sijU9.js} +0 -0
  97. /package/client/dist/assets/{java-CsNM0d7y.js → java-BsMRZzwb.js} +0 -0
  98. /package/client/dist/assets/{javascript-BdACqf10.js → javascript-CU3PIJIe.js} +0 -0
  99. /package/client/dist/assets/{json-DBTd2yrx.js → json-NRUJ3A8Z.js} +0 -0
  100. /package/client/dist/assets/{json5-Db2KhhlZ.js → json5-B2F_IK8O.js} +0 -0
  101. /package/client/dist/assets/{jsonc-CHN8QUfU.js → jsonc-DZe5qY2D.js} +0 -0
  102. /package/client/dist/assets/{jsonl-CGjv98wH.js → jsonl-X5ySelg7.js} +0 -0
  103. /package/client/dist/assets/{jsx-CWWDUN98.js → jsx-D27Zcp8f.js} +0 -0
  104. /package/client/dist/assets/{kanagawa-dragon-B7DwHOPg.js → kanagawa-dragon-BNuJwYwU.js} +0 -0
  105. /package/client/dist/assets/{kanagawa-lotus-wvBYqRx0.js → kanagawa-lotus-orsoMpUb.js} +0 -0
  106. /package/client/dist/assets/{kanagawa-wave-Dm7q3hJz.js → kanagawa-wave-lD9IY0rm.js} +0 -0
  107. /package/client/dist/assets/{laserwave-CPDGEaT_.js → laserwave-CvDHcYwO.js} +0 -0
  108. /package/client/dist/assets/{less-DXhlwFaK.js → less-PRJULh4Y.js} +0 -0
  109. /package/client/dist/assets/{light-plus-ByxFuNBG.js → light-plus-MOK32u24.js} +0 -0
  110. /package/client/dist/assets/{markdown-DLj4nrva.js → markdown-DkH4joIR.js} +0 -0
  111. /package/client/dist/assets/{material-theme-53qDBBiZ.js → material-theme-TzV_qhce.js} +0 -0
  112. /package/client/dist/assets/{material-theme-darker-BMgigqK-.js → material-theme-darker-Dth3Bzr_.js} +0 -0
  113. /package/client/dist/assets/{material-theme-lighter-Du7QlnOy.js → material-theme-lighter-ZXCQGpY6.js} +0 -0
  114. /package/client/dist/assets/{material-theme-ocean-D7OelWl-.js → material-theme-ocean-WKfsvas6.js} +0 -0
  115. /package/client/dist/assets/{material-theme-palenight-DuU45xLi.js → material-theme-palenight-Ck3Djj-_.js} +0 -0
  116. /package/client/dist/assets/{mdx-CA-fbmGc.js → mdx-CSWbZhEy.js} +0 -0
  117. /package/client/dist/assets/{min-dark-DaQKcOrv.js → min-dark-S0TYVSZ3.js} +0 -0
  118. /package/client/dist/assets/{min-light-B8hhGQs9.js → min-light-gRt6aDOF.js} +0 -0
  119. /package/client/dist/assets/{monokai-BxMUzvLk.js → monokai-CAeGk1-c.js} +0 -0
  120. /package/client/dist/assets/{night-owl-BkjnEots.js → night-owl-DSfRe8yr.js} +0 -0
  121. /package/client/dist/assets/{night-owl-light-oxBO-tCU.js → night-owl-light-DyKOenVJ.js} +0 -0
  122. /package/client/dist/assets/{nord-CGl-72px.js → nord-kFvBSECm.js} +0 -0
  123. /package/client/dist/assets/{one-dark-pro-iaIbXpZM.js → one-dark-pro-DgHxW_dT.js} +0 -0
  124. /package/client/dist/assets/{one-light-DVukLUfQ.js → one-light-BWIlrqaS.js} +0 -0
  125. /package/client/dist/assets/{plastic-BZlO8SrG.js → plastic-CPlugWGY.js} +0 -0
  126. /package/client/dist/assets/{poimandres-mI0gepuf.js → poimandres-JTNwIe-T.js} +0 -0
  127. /package/client/dist/assets/{postcss-DQkOD--_.js → postcss-cbpEYqBI.js} +0 -0
  128. /package/client/dist/assets/{python-Ce1zJ0DU.js → python-Bfe-Zzhs.js} +0 -0
  129. /package/client/dist/assets/{r-debCGJJk.js → r-BuiJQRlB.js} +0 -0
  130. /package/client/dist/assets/{red-DqRf4Qb0.js → red-CqzFqTyK.js} +0 -0
  131. /package/client/dist/assets/{regexp-aTTFcG_n.js → regexp-Bv54x_SM.js} +0 -0
  132. /package/client/dist/assets/{rose-pine-DopQf0Iy.js → rose-pine-D8ryEJo3.js} +0 -0
  133. /package/client/dist/assets/{rose-pine-dawn-CHPViTKc.js → rose-pine-dawn-C_3wVJ2a.js} +0 -0
  134. /package/client/dist/assets/{rose-pine-moon-DfcFJff9.js → rose-pine-moon-DvTNfSgC.js} +0 -0
  135. /package/client/dist/assets/{sass-BG-FQdXa.js → sass-DDKRa81x.js} +0 -0
  136. /package/client/dist/assets/{shellscript-C36bN5hG.js → shellscript-D6OjgcVH.js} +0 -0
  137. /package/client/dist/assets/{slack-dark-BjFW27lz.js → slack-dark-Dj4xwn1T.js} +0 -0
  138. /package/client/dist/assets/{slack-ochin-VXH_9cNQ.js → slack-ochin-BMn5Zs5S.js} +0 -0
  139. /package/client/dist/assets/{snazzy-light-aa2zLeH6.js → snazzy-light-CDOxNc-C.js} +0 -0
  140. /package/client/dist/assets/{solarized-dark-Bk84Eels.js → solarized-dark-CqkLujkP.js} +0 -0
  141. /package/client/dist/assets/{solarized-light-DEKDy82g.js → solarized-light-gCxA62ZX.js} +0 -0
  142. /package/client/dist/assets/{sql-C9giXO6o.js → sql-D1VHE84D.js} +0 -0
  143. /package/client/dist/assets/{stylus-CH9ua47t.js → stylus-CXea6hG4.js} +0 -0
  144. /package/client/dist/assets/{synthwave-84-CrF6pgTc.js → synthwave-84-CuzI5rUG.js} +0 -0
  145. /package/client/dist/assets/{tokyo-night-D2kyPuzj.js → tokyo-night-DBDiYG21.js} +0 -0
  146. /package/client/dist/assets/{tsx-egH0NXjJ.js → tsx-CzwR-tnf.js} +0 -0
  147. /package/client/dist/assets/{typescript-BAhv7dky.js → typescript-BRHrOBpy.js} +0 -0
  148. /package/client/dist/assets/{unmerged_dictionaries-C2Zsjv5l.js → unmerged_dictionaries-BOX6ozHh.js} +0 -0
  149. /package/client/dist/assets/{vesper-BWwcA-27.js → vesper-DXqrrAMY.js} +0 -0
  150. /package/client/dist/assets/{vitesse-black-DUSn-VDu.js → vitesse-black-BlH0x4Vs.js} +0 -0
  151. /package/client/dist/assets/{vitesse-dark-wIOKBkKs.js → vitesse-dark-CIMLnJG1.js} +0 -0
  152. /package/client/dist/assets/{vitesse-light-BTT8juqx.js → vitesse-light-ClQGNaN6.js} +0 -0
  153. /package/client/dist/assets/{wasm-BPjyAYt9.js → wasm-BGVToWLA.js} +0 -0
  154. /package/client/dist/assets/{wasm-dpeUm50f.js → wasm-DVnmThbD.js} +0 -0
  155. /package/client/dist/assets/{wgsl-BAQZQFAS.js → wgsl-Dd291c7U.js} +0 -0
  156. /package/client/dist/assets/{wit-BbR8NOgQ.js → wit-Bi1XtBiP.js} +0 -0
  157. /package/client/dist/assets/{yaml-BkL6USz4.js → yaml-D8NLwOzu.js} +0 -0
@@ -1,1723 +0,0 @@
1
- import { r as __exportAll } from "./chunk-CC9Q-vWm.js";
2
- import { n as configuration_default, r as e$18, t as t$12 } from "./getContentNodeByKeyPath-BDFNqZy_.js";
3
- import { t as __vitePreload } from "./preload-helper-CoI0IUIE.js";
4
- //#region ../@intlayer/core/dist/esm/interpreter/getCondition.mjs
5
- var e$17 = (e, t) => {
6
- let n = Object.keys(e), r = n[n.length - 1];
7
- return e[`${t}`] ?? e.fallback ?? e[r];
8
- };
9
- //#endregion
10
- //#region ../@intlayer/core/dist/esm/interpreter/getContent/deepTransform.mjs
11
- var t$11 = (n, r) => {
12
- for (let e of r.plugins ?? []) if (e.canHandle(n)) return e.transform(n, r, (e, n) => t$11(e, n));
13
- if (typeof n != `object` || !n || n.$$typeof !== void 0 || n.__v_isVNode !== void 0 || n._isVNode !== void 0 || n.isJSX !== void 0 || typeof n == `function`) return n;
14
- if (Array.isArray(n)) return n.map((n, i) => t$11(n, {
15
- ...r,
16
- children: n,
17
- keyPath: [...r.keyPath, {
18
- type: e$18.Array,
19
- key: i
20
- }]
21
- }));
22
- let i = {};
23
- for (let a in n) {
24
- let o = {
25
- ...r,
26
- children: n[a],
27
- keyPath: [...r.keyPath, {
28
- type: e$18.Object,
29
- key: a
30
- }]
31
- };
32
- i[a] = t$11(n[a], o);
33
- }
34
- return i;
35
- };
36
- //#endregion
37
- //#region ../@intlayer/core/dist/esm/interpreter/getEnumeration.mjs
38
- var e$16 = (e, t) => {
39
- let n = Object.keys(e);
40
- for (let e of n) {
41
- let n = !e.startsWith(`>`) && !e.startsWith(`<`) && !e.startsWith(`=`) && parseFloat(e) === t || e.startsWith(`=`) && parseFloat(e.slice(1)) === t, r = e.startsWith(`>`) && t > parseFloat(e.slice(1)), i = e.startsWith(`>=`) && t >= parseFloat(e.slice(2)), a = e.startsWith(`<`) && t < parseFloat(e.slice(1)), o = e.startsWith(`<=`) && t <= parseFloat(e.slice(2));
42
- if (n || r || i || a || o) return e;
43
- }
44
- }, t$10 = (t, n) => t[e$16(t, n) ?? `fallback`];
45
- //#endregion
46
- //#region ../@intlayer/core/dist/esm/interpreter/getGender.mjs
47
- var e$15 = (e) => e === `m` || e === `male` ? `male` : e === `f` || e === `female` ? `female` : `fallback`, t$9 = (t, n) => {
48
- let r = Object.keys(t), i = r[r.length - 1];
49
- return t[e$15(n)] ?? t.fallback ?? t[i];
50
- };
51
- //#endregion
52
- //#region ../@intlayer/core/dist/esm/interpreter/getInsertion.mjs
53
- var e$14 = (e, t) => e.replace(/\{\{\s*(.*?)\s*\}\}/g, (e, n) => (t[n.trim()] ?? ``).toString());
54
- //#endregion
55
- //#region ../@intlayer/core/dist/esm/interpreter/getTranslation.mjs
56
- var e$13 = (e) => {
57
- if (typeof e != `object` || !e || e instanceof Promise || typeof e.then == `function` || e.$$typeof !== void 0 || e.__v_isVNode !== void 0 || e._isVNode !== void 0 || e.isJSX !== void 0) return !1;
58
- let t = Object.getPrototypeOf(e);
59
- return t === Object.prototype || t === null || Array.isArray(e);
60
- }, t$8 = (n, r) => {
61
- if (n === void 0) return r;
62
- if (r === void 0 || Array.isArray(n)) return n;
63
- if (e$13(n) && e$13(r)) {
64
- let e = { ...n };
65
- for (let i of Object.keys(r)) i === `__proto__` || i === `constructor` || (Object.hasOwn(n, i) ? e[i] = t$8(n[i], r[i]) : e[i] = r[i]);
66
- return e;
67
- }
68
- return n;
69
- }, n$8 = (t, r = /* @__PURE__ */ new WeakSet()) => {
70
- if (typeof t != `object` || !t || r.has(t) || (r.add(t), !e$13(t))) return t;
71
- if (Array.isArray(t)) return t.map((e) => n$8(e, r));
72
- let i = {};
73
- for (let [e, a] of Object.entries(t)) a !== void 0 && (i[e] = n$8(a, r));
74
- return i;
75
- }, r$7 = (e, r, i) => {
76
- let a = [], o = (t) => e[t], s = o(r);
77
- if (typeof s == `string`) return s;
78
- if (s !== void 0 && a.push(s), r.includes(`-`)) {
79
- let t = r.split(`-`)[0];
80
- if (t in e) {
81
- let e = o(t);
82
- if (typeof e == `string`) {
83
- if (a.length === 0) return e;
84
- } else e !== void 0 && a.push(e);
85
- }
86
- }
87
- if (i !== void 0 && i !== r) {
88
- if (i in e) {
89
- let e = o(i);
90
- if (typeof e == `string`) {
91
- if (a.length === 0) return e;
92
- } else e !== void 0 && a.push(e);
93
- }
94
- if (i.includes(`-`)) {
95
- let t = i.split(`-`)[0];
96
- if (t !== r.split(`-`)[0] && t in e) {
97
- let e = o(t);
98
- if (typeof e == `string`) {
99
- if (a.length === 0) return e;
100
- } else e !== void 0 && a.push(e);
101
- }
102
- }
103
- }
104
- if (a.length === 0) return;
105
- let c = a.filter((e) => e !== void 0).map((e) => n$8(e));
106
- return c.length === 1 || Array.isArray(c[0]) ? c[0] : c.reduce((e, n) => t$8(e, n));
107
- };
108
- //#endregion
109
- //#region ../@intlayer/config/dist/esm/logger.mjs
110
- var e$12, n$7 = (t) => e$12 === void 0 ? t : e$12, r$6 = (e, t) => {
111
- let r = t?.isVerbose ?? !1, i = t?.config?.mode ?? `default`, a = t?.level ?? `info`, o = n$7(t?.config?.prefix), s = t?.config?.log ?? console.log, c = t?.config?.info ?? console.info, l = t?.config?.warn ?? console.warn, u = t?.config?.error ?? console.error, d = t?.config?.debug ?? console.debug;
112
- if (i === `disabled` || r && i !== `verbose`) return;
113
- let f = o ? [o, ...[e].flat()] : [e].flat();
114
- if (a === `debug`) return d(...f);
115
- if (a === `info`) return c(...f);
116
- if (a === `warn`) return l(...f);
117
- if (a === `error`) return u(...f);
118
- s(...f);
119
- }, i$5 = function(e) {
120
- return e.RESET = `\x1B[0m`, e.GREY = `\x1B[90m`, e.GREY_DARK = `\x1B[38;5;239m`, e.GREY_LIGHT = `\x1B[38;5;252m`, e.BLUE = `\x1B[34m`, e.RED = `\x1B[31m`, e.GREEN = `\x1B[32m`, e.YELLOW = `\x1B[38;5;226m`, e.MAGENTA = `\x1B[35m`, e.BEIGE = `\x1B[38;5;3m`, e.ORANGE = `\x1B[38;5;208m`, e.CYAN = `\x1B[36m`, e.WHITE = `\x1B[37m`, e.BOLD = `\x1B[1m`, e;
121
- }({}), o$5 = (e, t) => (n, i) => r$6(n, {
122
- ...i ?? {},
123
- config: {
124
- ...e?.log,
125
- ...t?.config,
126
- ...i?.config ?? {}
127
- }
128
- }), s$3 = (e, t, n) => t ? `${t}${e}${n ? typeof n == `boolean` ? i$5.RESET : n : i$5.RESET}` : e, l$3 = (e, t = i$5.BEIGE, n = i$5.RESET) => [e].flat().map((e) => s$3(e, t, n)).join(`, `);
129
- s$3(`✗`, i$5.RED);
130
- s$3(`✓`, i$5.GREEN);
131
- s$3(`⏲`, i$5.BLUE);
132
- //#endregion
133
- //#region .intlayer/main/dictionaries.mjs
134
- var dictionaries = {};
135
- var getDictionaries = () => dictionaries;
136
- //#endregion
137
- //#region ../@intlayer/core/dist/esm/getContent-DKqtIZGL.mjs
138
- var d$4 = (e, t, n = S$2(t)) => {
139
- let r = {
140
- dictionaryKey: e.key,
141
- dictionaryPath: e.filePath,
142
- keyPath: [],
143
- plugins: n
144
- };
145
- return C$1(e.content, r, n);
146
- }, f$3 = (e = ``) => new Proxy(() => e, {
147
- get: (t, n) => {
148
- if (n === `toJSON` || n === Symbol.toPrimitive || n === `toString`) return () => e;
149
- if (n !== `then`) return f$3(e ? `${e}.${String(n)}` : String(n));
150
- },
151
- apply: () => e
152
- }), p$2 = (e, t, n) => {
153
- let r = getDictionaries()[e];
154
- return r ? d$4(r, t, n) : (o$5(configuration_default)(`Dictionary ${l$3(e)} was not found. Using fallback proxy.`, {
155
- level: `warn`,
156
- isVerbose: !0
157
- }), f$3(e));
158
- }, m$2 = (e, t, n) => {
159
- let r = p$2(e, n?.locale, n?.plugins);
160
- if (typeof t == `string`) {
161
- let e = t.split(`.`), n = r;
162
- for (let t of e) if (n = n?.[t], n === void 0) return r;
163
- return n;
164
- }
165
- return r;
166
- }, h$3 = (e, t) => ({
167
- id: `translation-plugin`,
168
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Translation,
169
- transform: (n, r, i) => {
170
- let s = { ...n[e$18.Translation] ?? {} };
171
- for (let e in s) {
172
- let t = {
173
- ...r,
174
- children: s[e],
175
- keyPath: [...r.keyPath, {
176
- type: e$18.Translation,
177
- key: e
178
- }]
179
- };
180
- s[e] = i(s[e], t);
181
- }
182
- return r$7(s, e, t);
183
- }
184
- }), g$2 = {
185
- id: `enumeration-plugin`,
186
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Enumeration,
187
- transform: (e, t, r) => {
188
- let i = { ...e[e$18.Enumeration] };
189
- for (let e in i) {
190
- let n = i[e];
191
- i[e] = r(n, {
192
- ...t,
193
- children: n,
194
- keyPath: [...t.keyPath, {
195
- type: e$18.Enumeration,
196
- key: e
197
- }]
198
- });
199
- }
200
- return (e) => {
201
- let t = t$10(i, typeof e == `number` ? e : e.count);
202
- return typeof t == `function` && typeof e == `object` ? t(e) : t;
203
- };
204
- }
205
- }, _$2 = {
206
- id: `condition-plugin`,
207
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Condition,
208
- transform: (t, n, r) => {
209
- let i = { ...t[e$18.Condition] };
210
- for (let e in i) {
211
- let t = i[e];
212
- i[e] = r(t, {
213
- ...n,
214
- children: t,
215
- keyPath: [...n.keyPath, {
216
- type: e$18.Condition,
217
- key: e
218
- }]
219
- });
220
- }
221
- return (t) => {
222
- let n = e$17(i, typeof t == `boolean` ? t : t.value);
223
- return typeof n == `function` && typeof t == `object` ? n(t) : n;
224
- };
225
- }
226
- }, v$2 = {
227
- id: `insertion-plugin`,
228
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Insertion,
229
- transform: (e, t, n) => {
230
- let r = [...t.keyPath, { type: e$18.Insertion }], a = e[e$18.Insertion], s = {
231
- id: `insertion-string-plugin`,
232
- canHandle: (e) => typeof e == `string`,
233
- transform: (e, n, r) => {
234
- let a = r(e, {
235
- ...n,
236
- children: e,
237
- plugins: [...(t.plugins ?? []).filter((e) => e.id !== `intlayer-node-plugin`)]
238
- });
239
- return (e) => {
240
- let o = e$14(a, e);
241
- return r(o, {
242
- ...n,
243
- plugins: t.plugins,
244
- children: o
245
- });
246
- };
247
- }
248
- };
249
- return n(a, {
250
- ...t,
251
- children: a,
252
- keyPath: r,
253
- plugins: [s, ...t.plugins ?? []]
254
- });
255
- }
256
- }, y$3 = {
257
- id: `gender-plugin`,
258
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.Gender,
259
- transform: (e, t, n) => {
260
- let i = { ...e[e$18.Gender] };
261
- for (let e in i) {
262
- let r = i[e];
263
- i[e] = n(r, {
264
- ...t,
265
- children: r,
266
- keyPath: [...t.keyPath, {
267
- type: e$18.Gender,
268
- key: e
269
- }]
270
- });
271
- }
272
- return (e) => t$9(i, e);
273
- }
274
- }, b$3 = (e) => ({
275
- id: `nested-plugin`,
276
- canHandle: (e) => typeof e == `object` && (e?.nodeType === e$18.Nested || e?.nodeType === `nested`),
277
- transform: (t, n) => m$2(t.nested.dictionaryKey, t.nested.path, {
278
- ...n,
279
- locale: e ?? n.locale
280
- })
281
- }), x$2 = {
282
- id: `file-plugin`,
283
- canHandle: (e) => typeof e == `object` && e?.nodeType === e$18.File,
284
- transform: (e, t, n) => n(e.content, {
285
- ...t,
286
- children: e.content
287
- })
288
- }, S$2 = (e, t = !0) => [
289
- h$3(e ?? configuration_default.internationalization.defaultLocale, t ? configuration_default.internationalization.defaultLocale : void 0),
290
- g$2,
291
- _$2,
292
- v$2,
293
- b$3(e ?? configuration_default.internationalization.defaultLocale),
294
- x$2,
295
- y$3
296
- ], C$1 = (e, n, r = []) => t$11(e, {
297
- ...n,
298
- plugins: r
299
- });
300
- //#endregion
301
- //#region ../@intlayer/core/dist/esm/utils/isSameKeyPath.mjs
302
- var e$11 = (e, t) => e.every((e, n) => t[n] && t[n].key === e.key && t[n].type === e.type);
303
- //#endregion
304
- //#region ../@intlayer/editor/dist/esm/compareUrls.mjs
305
- var e$10 = (e, t) => {
306
- try {
307
- let n = new URL(e), r = new URL(t);
308
- if (n.protocol !== r.protocol || n.hostname !== r.hostname || n.port !== r.port) return !1;
309
- let i = n.pathname.replace(/\/$/, ``), a = r.pathname.replace(/\/$/, ``);
310
- return !(i !== `` && a !== `` && i !== a);
311
- } catch (n) {
312
- return console.error(`Invalid URL(s)`, n, {
313
- url1: e,
314
- url2: t
315
- }), !1;
316
- }
317
- };
318
- //#endregion
319
- //#region ../@intlayer/editor/dist/esm/messageKey.mjs
320
- var e$9 = function(e) {
321
- return e.INTLAYER_CLIENT_READY = `INTLAYER_CLIENT_READY`, e.INTLAYER_ARE_YOU_THERE = `INTLAYER_ARE_YOU_THERE`, e.INTLAYER_EDITOR_ACTIVATE = `INTLAYER_EDITOR_ACTIVATE`, e.INTLAYER_EDITOR_ENABLED = `INTLAYER_EDITOR_ENABLED`, e.INTLAYER_CONFIGURATION = `INTLAYER_CONFIGURATION`, e.INTLAYER_CURRENT_LOCALE = `INTLAYER_CURRENT_LOCALE`, e.INTLAYER_URL_CHANGE = `INTLAYER_URL_CHANGE`, e.INTLAYER_LOCALE_DICTIONARIES_CHANGED = `INTLAYER_LOCALE_DICTIONARIES_CHANGED`, e.INTLAYER_DISTANT_DICTIONARIES_CHANGED = `INTLAYER_DISTANT_DICTIONARIES_CHANGED`, e.INTLAYER_HOVERED_CONTENT_CHANGED = `INTLAYER_HOVERED_CONTENT_CHANGED`, e.INTLAYER_FOCUSED_CONTENT_CHANGED = `INTLAYER_FOCUSED_CONTENT_CHANGED`, e.INTLAYER_EDITED_CONTENT_CHANGED = `INTLAYER_EDITED_CONTENT_CHANGED`, e.INTLAYER_IFRAME_CLICKED = `INTLAYER_IFRAME_CLICKED`, e;
322
- }({});
323
- //#endregion
324
- //#region ../@intlayer/editor/dist/esm/mergeIframeClick.mjs
325
- var e$8 = (e) => {
326
- let t = new MouseEvent(`mousedown`, {
327
- bubbles: !0,
328
- cancelable: !0,
329
- view: window
330
- }), n = new MouseEvent(`click`, {
331
- bubbles: !0,
332
- cancelable: !0,
333
- view: window
334
- });
335
- Object.assign(n, { iframeData: e }), Object.assign(t, { iframeData: e }), window.dispatchEvent(n), window.dispatchEvent(t);
336
- };
337
- //#endregion
338
- //#region ../@intlayer/editor/dist/esm/core/globalManager.mjs
339
- var e$7 = `__intlayer_editor_manager__`, t$6 = `__intlayer_editor_manager_events__`, n$6 = () => {
340
- if (typeof window > `u`) return new EventTarget();
341
- let e = window;
342
- return e[t$6] || (e[t$6] = new EventTarget()), e[t$6];
343
- }, r$5 = () => typeof window > `u` ? null : window[e$7] ?? null, i$4 = (t) => {
344
- if (typeof window < `u`) {
345
- let n = window;
346
- n[e$7] = t;
347
- }
348
- n$6().dispatchEvent(new CustomEvent(`change`, { detail: t }));
349
- }, a$2 = (e) => {
350
- let t = n$6(), r = (t) => {
351
- e(t.detail);
352
- };
353
- return t.addEventListener(`change`, r), () => {
354
- t.removeEventListener(`change`, r);
355
- };
356
- };
357
- //#endregion
358
- //#region ../@intlayer/editor/dist/esm/decorate-BWURH4oJ.mjs
359
- function e$6(e, t, n, r) {
360
- var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
361
- if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
362
- else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
363
- return i > 3 && a && Object.defineProperty(t, n, a), a;
364
- }
365
- //#endregion
366
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js
367
- /**
368
- * @license
369
- * Copyright 2019 Google LLC
370
- * SPDX-License-Identifier: BSD-3-Clause
371
- */
372
- var t$5 = globalThis, e$5 = t$5.ShadowRoot && (void 0 === t$5.ShadyCSS || t$5.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
373
- var n$5 = class {
374
- constructor(t, e, o) {
375
- if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
376
- this.cssText = t, this.t = e;
377
- }
378
- get styleSheet() {
379
- let t = this.o;
380
- const s = this.t;
381
- if (e$5 && void 0 === t) {
382
- const e = void 0 !== s && 1 === s.length;
383
- e && (t = o$4.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$4.set(s, t));
384
- }
385
- return t;
386
- }
387
- toString() {
388
- return this.cssText;
389
- }
390
- };
391
- var r$4 = (t) => new n$5("string" == typeof t ? t : t + "", void 0, s$2), i$3 = (t, ...e) => {
392
- return new n$5(1 === t.length ? t[0] : e.reduce((e, s, o) => e + ((t) => {
393
- if (!0 === t._$cssResult$) return t.cssText;
394
- if ("number" == typeof t) return t;
395
- throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
396
- })(s) + t[o + 1], t[0]), t, s$2);
397
- }, S$1 = (s, o) => {
398
- if (e$5) s.adoptedStyleSheets = o.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
399
- else for (const e of o) {
400
- const o = document.createElement("style"), n = t$5.litNonce;
401
- void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
402
- }
403
- }, c$2 = e$5 ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((t) => {
404
- let e = "";
405
- for (const s of t.cssRules) e += s.cssText;
406
- return r$4(e);
407
- })(t) : t;
408
- //#endregion
409
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js
410
- /**
411
- * @license
412
- * Copyright 2017 Google LLC
413
- * SPDX-License-Identifier: BSD-3-Clause
414
- */ var { is: i$2, defineProperty: e$4, getOwnPropertyDescriptor: h$2, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$3, getPrototypeOf: n$4 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$2 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$3 = (t, s) => t, u$2 = {
415
- toAttribute(t, s) {
416
- switch (s) {
417
- case Boolean:
418
- t = t ? l$2 : null;
419
- break;
420
- case Object:
421
- case Array: t = null == t ? t : JSON.stringify(t);
422
- }
423
- return t;
424
- },
425
- fromAttribute(t, s) {
426
- let i = t;
427
- switch (s) {
428
- case Boolean:
429
- i = null !== t;
430
- break;
431
- case Number:
432
- i = null === t ? null : Number(t);
433
- break;
434
- case Object:
435
- case Array: try {
436
- i = JSON.parse(t);
437
- } catch (t) {
438
- i = null;
439
- }
440
- }
441
- return i;
442
- }
443
- }, f$2 = (t, s) => !i$2(t, s), b$2 = {
444
- attribute: !0,
445
- type: String,
446
- converter: u$2,
447
- reflect: !1,
448
- useDefault: !1,
449
- hasChanged: f$2
450
- };
451
- Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
452
- var y$2 = class extends HTMLElement {
453
- static addInitializer(t) {
454
- this._$Ei(), (this.l ??= []).push(t);
455
- }
456
- static get observedAttributes() {
457
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
458
- }
459
- static createProperty(t, s = b$2) {
460
- if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
461
- const i = Symbol(), h = this.getPropertyDescriptor(t, i, s);
462
- void 0 !== h && e$4(this.prototype, t, h);
463
- }
464
- }
465
- static getPropertyDescriptor(t, s, i) {
466
- const { get: e, set: r } = h$2(this.prototype, t) ?? {
467
- get() {
468
- return this[s];
469
- },
470
- set(t) {
471
- this[s] = t;
472
- }
473
- };
474
- return {
475
- get: e,
476
- set(s) {
477
- const h = e?.call(this);
478
- r?.call(this, s), this.requestUpdate(t, h, i);
479
- },
480
- configurable: !0,
481
- enumerable: !0
482
- };
483
- }
484
- static getPropertyOptions(t) {
485
- return this.elementProperties.get(t) ?? b$2;
486
- }
487
- static _$Ei() {
488
- if (this.hasOwnProperty(d$3("elementProperties"))) return;
489
- const t = n$4(this);
490
- t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
491
- }
492
- static finalize() {
493
- if (this.hasOwnProperty(d$3("finalized"))) return;
494
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$3("properties"))) {
495
- const t = this.properties, s = [...r$3(t), ...o$3(t)];
496
- for (const i of s) this.createProperty(i, t[i]);
497
- }
498
- const t = this[Symbol.metadata];
499
- if (null !== t) {
500
- const s = litPropertyMetadata.get(t);
501
- if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
502
- }
503
- this._$Eh = /* @__PURE__ */ new Map();
504
- for (const [t, s] of this.elementProperties) {
505
- const i = this._$Eu(t, s);
506
- void 0 !== i && this._$Eh.set(i, t);
507
- }
508
- this.elementStyles = this.finalizeStyles(this.styles);
509
- }
510
- static finalizeStyles(s) {
511
- const i = [];
512
- if (Array.isArray(s)) {
513
- const e = new Set(s.flat(Infinity).reverse());
514
- for (const s of e) i.unshift(c$2(s));
515
- } else void 0 !== s && i.push(c$2(s));
516
- return i;
517
- }
518
- static _$Eu(t, s) {
519
- const i = s.attribute;
520
- return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
521
- }
522
- constructor() {
523
- super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
524
- }
525
- _$Ev() {
526
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
527
- }
528
- addController(t) {
529
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
530
- }
531
- removeController(t) {
532
- this._$EO?.delete(t);
533
- }
534
- _$E_() {
535
- const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
536
- for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
537
- t.size > 0 && (this._$Ep = t);
538
- }
539
- createRenderRoot() {
540
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
541
- return S$1(t, this.constructor.elementStyles), t;
542
- }
543
- connectedCallback() {
544
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
545
- }
546
- enableUpdating(t) {}
547
- disconnectedCallback() {
548
- this._$EO?.forEach((t) => t.hostDisconnected?.());
549
- }
550
- attributeChangedCallback(t, s, i) {
551
- this._$AK(t, i);
552
- }
553
- _$ET(t, s) {
554
- const i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
555
- if (void 0 !== e && !0 === i.reflect) {
556
- const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$2).toAttribute(s, i.type);
557
- this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
558
- }
559
- }
560
- _$AK(t, s) {
561
- const i = this.constructor, e = i._$Eh.get(t);
562
- if (void 0 !== e && this._$Em !== e) {
563
- const t = i.getPropertyOptions(e), h = "function" == typeof t.converter ? { fromAttribute: t.converter } : void 0 !== t.converter?.fromAttribute ? t.converter : u$2;
564
- this._$Em = e;
565
- const r = h.fromAttribute(s, t.type);
566
- this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
567
- }
568
- }
569
- requestUpdate(t, s, i, e = !1, h) {
570
- if (void 0 !== t) {
571
- const r = this.constructor;
572
- if (!1 === e && (h = this[t]), i ??= r.getPropertyOptions(t), !((i.hasChanged ?? f$2)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
573
- this.C(t, s, i);
574
- }
575
- !1 === this.isUpdatePending && (this._$ES = this._$EP());
576
- }
577
- C(t, s, { useDefault: i, reflect: e, wrapped: h }, r) {
578
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
579
- }
580
- async _$EP() {
581
- this.isUpdatePending = !0;
582
- try {
583
- await this._$ES;
584
- } catch (t) {
585
- Promise.reject(t);
586
- }
587
- const t = this.scheduleUpdate();
588
- return null != t && await t, !this.isUpdatePending;
589
- }
590
- scheduleUpdate() {
591
- return this.performUpdate();
592
- }
593
- performUpdate() {
594
- if (!this.isUpdatePending) return;
595
- if (!this.hasUpdated) {
596
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
597
- for (const [t, s] of this._$Ep) this[t] = s;
598
- this._$Ep = void 0;
599
- }
600
- const t = this.constructor.elementProperties;
601
- if (t.size > 0) for (const [s, i] of t) {
602
- const { wrapped: t } = i, e = this[s];
603
- !0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
604
- }
605
- }
606
- let t = !1;
607
- const s = this._$AL;
608
- try {
609
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((t) => t.hostUpdate?.()), this.update(s)) : this._$EM();
610
- } catch (s) {
611
- throw t = !1, this._$EM(), s;
612
- }
613
- t && this._$AE(s);
614
- }
615
- willUpdate(t) {}
616
- _$AE(t) {
617
- this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
618
- }
619
- _$EM() {
620
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
621
- }
622
- get updateComplete() {
623
- return this.getUpdateComplete();
624
- }
625
- getUpdateComplete() {
626
- return this._$ES;
627
- }
628
- shouldUpdate(t) {
629
- return !0;
630
- }
631
- update(t) {
632
- this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
633
- }
634
- updated(t) {}
635
- firstUpdated(t) {}
636
- };
637
- y$2.elementStyles = [], y$2.shadowRootOptions = { mode: "open" }, y$2[d$3("elementProperties")] = /* @__PURE__ */ new Map(), y$2[d$3("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$2 }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
638
- //#endregion
639
- //#region ../../node_modules/.bun/lit-html@3.3.2/node_modules/lit-html/lit-html.js
640
- /**
641
- * @license
642
- * Copyright 2017 Google LLC
643
- * SPDX-License-Identifier: BSD-3-Clause
644
- */
645
- var t$4 = globalThis, i$1 = (t) => t, s$1 = t$4.trustedTypes, e$3 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, h$1 = "$lit$", o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$3 = "?" + o$2, r$2 = `<${n$3}>`, l$1 = document, c = () => l$1.createComment(""), a = (t) => null === t || "object" != typeof t && "function" != typeof t, u$1 = Array.isArray, d$2 = (t) => u$1(t) || "function" == typeof t?.[Symbol.iterator], f$1 = "[ \n\f\r]", v$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _$1 = /-->/g, m$1 = />/g, p = RegExp(`>|${f$1}(?:([^\\s"'>=/]+)(${f$1}*=${f$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g$1 = /'/g, $ = /"/g, y$1 = /^(?:script|style|textarea|title)$/i, x$1 = (t) => (i, ...s) => ({
646
- _$litType$: t,
647
- strings: i,
648
- values: s
649
- }), b$1 = x$1(1);
650
- x$1(2);
651
- x$1(3);
652
- var E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l$1.createTreeWalker(l$1, 129);
653
- function V(t, i) {
654
- if (!u$1(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
655
- return void 0 !== e$3 ? e$3.createHTML(i) : i;
656
- }
657
- var N = (t, i) => {
658
- const s = t.length - 1, e = [];
659
- let n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v$1;
660
- for (let i = 0; i < s; i++) {
661
- const s = t[i];
662
- let a, u, d = -1, f = 0;
663
- for (; f < s.length && (c.lastIndex = f, u = c.exec(s), null !== u);) f = c.lastIndex, c === v$1 ? "!--" === u[1] ? c = _$1 : void 0 !== u[1] ? c = m$1 : void 0 !== u[2] ? (y$1.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n ?? v$1, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : "\"" === u[3] ? $ : g$1) : c === $ || c === g$1 ? c = p : c === _$1 || c === m$1 ? c = v$1 : (c = p, n = void 0);
664
- const x = c === p && t[i + 1].startsWith("/>") ? " " : "";
665
- l += c === v$1 ? s + r$2 : d >= 0 ? (e.push(a), s.slice(0, d) + h$1 + s.slice(d) + o$2 + x) : s + o$2 + (-2 === d ? i : x);
666
- }
667
- return [V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
668
- };
669
- var S = class S {
670
- constructor({ strings: t, _$litType$: i }, e) {
671
- let r;
672
- this.parts = [];
673
- let l = 0, a = 0;
674
- const u = t.length - 1, d = this.parts, [f, v] = N(t, i);
675
- if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
676
- const t = this.el.content.firstChild;
677
- t.replaceWith(...t.childNodes);
678
- }
679
- for (; null !== (r = P.nextNode()) && d.length < u;) {
680
- if (1 === r.nodeType) {
681
- if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(h$1)) {
682
- const i = v[a++], s = r.getAttribute(t).split(o$2), e = /([.?@])?(.*)/.exec(i);
683
- d.push({
684
- type: 1,
685
- index: l,
686
- name: e[2],
687
- strings: s,
688
- ctor: "." === e[1] ? I : "?" === e[1] ? L : "@" === e[1] ? z : H
689
- }), r.removeAttribute(t);
690
- } else t.startsWith(o$2) && (d.push({
691
- type: 6,
692
- index: l
693
- }), r.removeAttribute(t));
694
- if (y$1.test(r.tagName)) {
695
- const t = r.textContent.split(o$2), i = t.length - 1;
696
- if (i > 0) {
697
- r.textContent = s$1 ? s$1.emptyScript : "";
698
- for (let s = 0; s < i; s++) r.append(t[s], c()), P.nextNode(), d.push({
699
- type: 2,
700
- index: ++l
701
- });
702
- r.append(t[i], c());
703
- }
704
- }
705
- } else if (8 === r.nodeType) if (r.data === n$3) d.push({
706
- type: 2,
707
- index: l
708
- });
709
- else {
710
- let t = -1;
711
- for (; -1 !== (t = r.data.indexOf(o$2, t + 1));) d.push({
712
- type: 7,
713
- index: l
714
- }), t += o$2.length - 1;
715
- }
716
- l++;
717
- }
718
- }
719
- static createElement(t, i) {
720
- const s = l$1.createElement("template");
721
- return s.innerHTML = t, s;
722
- }
723
- };
724
- function M(t, i, s = t, e) {
725
- if (i === E) return i;
726
- let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
727
- const o = a(i) ? void 0 : i._$litDirective$;
728
- return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
729
- }
730
- var R = class {
731
- constructor(t, i) {
732
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
733
- }
734
- get parentNode() {
735
- return this._$AM.parentNode;
736
- }
737
- get _$AU() {
738
- return this._$AM._$AU;
739
- }
740
- u(t) {
741
- const { el: { content: i }, parts: s } = this._$AD, e = (t?.creationScope ?? l$1).importNode(i, !0);
742
- P.currentNode = e;
743
- let h = P.nextNode(), o = 0, n = 0, r = s[0];
744
- for (; void 0 !== r;) {
745
- if (o === r.index) {
746
- let i;
747
- 2 === r.type ? i = new k(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new Z(h, this, t)), this._$AV.push(i), r = s[++n];
748
- }
749
- o !== r?.index && (h = P.nextNode(), o++);
750
- }
751
- return P.currentNode = l$1, e;
752
- }
753
- p(t) {
754
- let i = 0;
755
- for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
756
- }
757
- };
758
- var k = class k {
759
- get _$AU() {
760
- return this._$AM?._$AU ?? this._$Cv;
761
- }
762
- constructor(t, i, s, e) {
763
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
764
- }
765
- get parentNode() {
766
- let t = this._$AA.parentNode;
767
- const i = this._$AM;
768
- return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
769
- }
770
- get startNode() {
771
- return this._$AA;
772
- }
773
- get endNode() {
774
- return this._$AB;
775
- }
776
- _$AI(t, i = this) {
777
- t = M(this, t, i), a(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d$2(t) ? this.k(t) : this._(t);
778
- }
779
- O(t) {
780
- return this._$AA.parentNode.insertBefore(t, this._$AB);
781
- }
782
- T(t) {
783
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
784
- }
785
- _(t) {
786
- this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l$1.createTextNode(t)), this._$AH = t;
787
- }
788
- $(t) {
789
- const { values: i, _$litType$: s } = t, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
790
- if (this._$AH?._$AD === e) this._$AH.p(i);
791
- else {
792
- const t = new R(e, this), s = t.u(this.options);
793
- t.p(i), this.T(s), this._$AH = t;
794
- }
795
- }
796
- _$AC(t) {
797
- let i = C.get(t.strings);
798
- return void 0 === i && C.set(t.strings, i = new S(t)), i;
799
- }
800
- k(t) {
801
- u$1(this._$AH) || (this._$AH = [], this._$AR());
802
- const i = this._$AH;
803
- let s, e = 0;
804
- for (const h of t) e === i.length ? i.push(s = new k(this.O(c()), this.O(c()), this, this.options)) : s = i[e], s._$AI(h), e++;
805
- e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
806
- }
807
- _$AR(t = this._$AA.nextSibling, s) {
808
- for (this._$AP?.(!1, !0, s); t !== this._$AB;) {
809
- const s = i$1(t).nextSibling;
810
- i$1(t).remove(), t = s;
811
- }
812
- }
813
- setConnected(t) {
814
- void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
815
- }
816
- };
817
- var H = class {
818
- get tagName() {
819
- return this.element.tagName;
820
- }
821
- get _$AU() {
822
- return this._$AM._$AU;
823
- }
824
- constructor(t, i, s, e, h) {
825
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = A;
826
- }
827
- _$AI(t, i = this, s, e) {
828
- const h = this.strings;
829
- let o = !1;
830
- if (void 0 === h) t = M(this, t, i, 0), o = !a(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
831
- else {
832
- const e = t;
833
- let n, r;
834
- for (t = h[0], n = 0; n < h.length - 1; n++) r = M(this, e[s + n], i, n), r === E && (r = this._$AH[n]), o ||= !a(r) || r !== this._$AH[n], r === A ? t = A : t !== A && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
835
- }
836
- o && !e && this.j(t);
837
- }
838
- j(t) {
839
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
840
- }
841
- };
842
- var I = class extends H {
843
- constructor() {
844
- super(...arguments), this.type = 3;
845
- }
846
- j(t) {
847
- this.element[this.name] = t === A ? void 0 : t;
848
- }
849
- };
850
- var L = class extends H {
851
- constructor() {
852
- super(...arguments), this.type = 4;
853
- }
854
- j(t) {
855
- this.element.toggleAttribute(this.name, !!t && t !== A);
856
- }
857
- };
858
- var z = class extends H {
859
- constructor(t, i, s, e, h) {
860
- super(t, i, s, e, h), this.type = 5;
861
- }
862
- _$AI(t, i = this) {
863
- if ((t = M(this, t, i, 0) ?? A) === E) return;
864
- const s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
865
- e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
866
- }
867
- handleEvent(t) {
868
- "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
869
- }
870
- };
871
- var Z = class {
872
- constructor(t, i, s) {
873
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
874
- }
875
- get _$AU() {
876
- return this._$AM._$AU;
877
- }
878
- _$AI(t) {
879
- M(this, t);
880
- }
881
- }, B = t$4.litHtmlPolyfillSupport;
882
- B?.(S, k), (t$4.litHtmlVersions ??= []).push("3.3.2");
883
- var D = (t, i, s) => {
884
- const e = s?.renderBefore ?? i;
885
- let h = e._$litPart$;
886
- if (void 0 === h) {
887
- const t = s?.renderBefore ?? null;
888
- e._$litPart$ = h = new k(i.insertBefore(c(), t), t, void 0, s ?? {});
889
- }
890
- return h._$AI(t), h;
891
- };
892
- //#endregion
893
- //#region ../../node_modules/.bun/lit-element@4.2.2/node_modules/lit-element/lit-element.js
894
- /**
895
- * @license
896
- * Copyright 2017 Google LLC
897
- * SPDX-License-Identifier: BSD-3-Clause
898
- */ var s = globalThis;
899
- var i = class extends y$2 {
900
- constructor() {
901
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
902
- }
903
- createRenderRoot() {
904
- const t = super.createRenderRoot();
905
- return this.renderOptions.renderBefore ??= t.firstChild, t;
906
- }
907
- update(t) {
908
- const r = this.render();
909
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(r, this.renderRoot, this.renderOptions);
910
- }
911
- connectedCallback() {
912
- super.connectedCallback(), this._$Do?.setConnected(!0);
913
- }
914
- disconnectedCallback() {
915
- super.disconnectedCallback(), this._$Do?.setConnected(!1);
916
- }
917
- render() {
918
- return E;
919
- }
920
- };
921
- i._$litElement$ = !0, i["finalized"] = !0, s.litElementHydrateSupport?.({ LitElement: i });
922
- var o$1 = s.litElementPolyfillSupport;
923
- o$1?.({ LitElement: i });
924
- (s.litElementVersions ??= []).push("4.2.2");
925
- //#endregion
926
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js
927
- /**
928
- * @license
929
- * Copyright 2017 Google LLC
930
- * SPDX-License-Identifier: BSD-3-Clause
931
- */ var o = {
932
- attribute: !0,
933
- type: String,
934
- converter: u$2,
935
- reflect: !1,
936
- hasChanged: f$2
937
- }, r$1 = (t = o, e, r) => {
938
- const { kind: n, metadata: i } = r;
939
- let s = globalThis.litPropertyMetadata.get(i);
940
- if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
941
- const { name: o } = r;
942
- return {
943
- set(r) {
944
- const n = e.get.call(this);
945
- e.set.call(this, r), this.requestUpdate(o, n, t, !0, r);
946
- },
947
- init(e) {
948
- return void 0 !== e && this.C(o, void 0, t, e), e;
949
- }
950
- };
951
- }
952
- if ("setter" === n) {
953
- const { name: o } = r;
954
- return function(r) {
955
- const n = this[o];
956
- e.call(this, r), this.requestUpdate(o, n, t, !0, r);
957
- };
958
- }
959
- throw Error("Unsupported decorator location: " + n);
960
- };
961
- function n$2(t) {
962
- return (e, o) => "object" == typeof o ? r$1(t, e, o) : ((t, e, o) => {
963
- const r = e.hasOwnProperty(o);
964
- return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
965
- })(t, e, o);
966
- }
967
- //#endregion
968
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js
969
- /**
970
- * @license
971
- * Copyright 2017 Google LLC
972
- * SPDX-License-Identifier: BSD-3-Clause
973
- */ function r(r) {
974
- return n$2({
975
- ...r,
976
- state: !0,
977
- attribute: !1
978
- });
979
- }
980
- //#endregion
981
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/base.js
982
- /**
983
- * @license
984
- * Copyright 2017 Google LLC
985
- * SPDX-License-Identifier: BSD-3-Clause
986
- */
987
- var e$2 = (e, t, c) => (c.configurable = !0, c.enumerable = !0, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
988
- //#endregion
989
- //#region ../../node_modules/.bun/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/query.js
990
- /**
991
- * @license
992
- * Copyright 2017 Google LLC
993
- * SPDX-License-Identifier: BSD-3-Clause
994
- */ function e$1(e, r) {
995
- return (n, s, i) => {
996
- const o = (t) => t.renderRoot?.querySelector(e) ?? null;
997
- if (r) {
998
- const { get: e, set: r } = "object" == typeof s ? n : i ?? (() => {
999
- const t = Symbol();
1000
- return {
1001
- get() {
1002
- return this[t];
1003
- },
1004
- set(e) {
1005
- this[t] = e;
1006
- }
1007
- };
1008
- })();
1009
- return e$2(n, s, { get() {
1010
- let t = e.call(this);
1011
- return void 0 === t && (t = o(this), (null !== t || this.hasUpdated) && r.call(this, t)), t;
1012
- } });
1013
- }
1014
- return e$2(n, s, { get() {
1015
- return o(this);
1016
- } });
1017
- };
1018
- }
1019
- //#endregion
1020
- //#region ../@intlayer/editor/dist/esm/components/ContentSelectorWrapper.mjs
1021
- var d$1 = class extends i {
1022
- constructor(...e) {
1023
- super(...e), this.keyPathJson = `[]`, this.dictionaryKey = ``, this._editorEnabled = !1, this._isInIframe = !1, this._isSelected = !1, this._editedValue = void 0, this._unsubManager = null, this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null;
1024
- }
1025
- static {
1026
- this.styles = i$3`
1027
- :host {
1028
- display: contents;
1029
- }
1030
- `;
1031
- }
1032
- connectedCallback() {
1033
- super.connectedCallback(), typeof window < `u` && (this._isInIframe = window.self !== window.top), this._subscribeToManager();
1034
- }
1035
- disconnectedCallback() {
1036
- super.disconnectedCallback(), this._teardown();
1037
- }
1038
- updated(e) {
1039
- if (e.has(`keyPathJson`) || e.has(`dictionaryKey`)) {
1040
- let e = r$5();
1041
- e && this._updateEditedValue(e);
1042
- }
1043
- }
1044
- _teardown() {
1045
- this._unsubManager?.(), this._unsubEnabled?.(), this._unsubFocused?.(), this._unsubEditedContent?.(), this._unsubManager = null, this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null;
1046
- }
1047
- _subscribeToManager() {
1048
- let e = r$5();
1049
- e && this._setupManagerSubscriptions(e), this._unsubManager = a$2((e) => {
1050
- this._unsubEnabled?.(), this._unsubFocused?.(), this._unsubEditedContent?.(), this._unsubEnabled = null, this._unsubFocused = null, this._unsubEditedContent = null, e ? this._setupManagerSubscriptions(e) : (this._editorEnabled = !1, this._isSelected = !1, this._editedValue = void 0);
1051
- });
1052
- }
1053
- _setupManagerSubscriptions(e) {
1054
- this._editorEnabled = e.editorEnabled.value ?? !1, this._updateIsSelected(e.focusedContent.value), this._updateEditedValue(e);
1055
- let t = (e) => {
1056
- this._editorEnabled = e.detail;
1057
- }, n = (e) => {
1058
- this._updateIsSelected(e.detail);
1059
- }, r = () => {
1060
- this._updateEditedValue(e);
1061
- };
1062
- e.editorEnabled.addEventListener(`change`, t), e.focusedContent.addEventListener(`change`, n), e.editedContent.addEventListener(`change`, r), this._unsubEnabled = () => e.editorEnabled.removeEventListener(`change`, t), this._unsubFocused = () => e.focusedContent.removeEventListener(`change`, n), this._unsubEditedContent = () => e.editedContent.removeEventListener(`change`, r);
1063
- }
1064
- _getRawKeyPath() {
1065
- try {
1066
- return JSON.parse(this.keyPathJson);
1067
- } catch {
1068
- return [];
1069
- }
1070
- }
1071
- _getFilteredKeyPath() {
1072
- return this._getRawKeyPath().filter((e) => e.type !== e$18.Translation);
1073
- }
1074
- _updateEditedValue(e) {
1075
- let t = this._getFilteredKeyPath();
1076
- if (!this.dictionaryKey || t.length === 0) {
1077
- this._editedValue = void 0;
1078
- return;
1079
- }
1080
- let n = this._getRawKeyPath(), r = n[n.length - 1]?.type;
1081
- if (r === e$18.Markdown || r === e$18.HTML || r === e$18.Insertion || r === e$18.File) {
1082
- this._editedValue = void 0;
1083
- return;
1084
- }
1085
- let i = e.getContentValue(this.dictionaryKey, t);
1086
- if (typeof i == `object` && i && i.nodeType === e$18.Translation) {
1087
- let t = e.currentLocale.value;
1088
- i = t ? i[e$18.Translation][t] : void 0;
1089
- }
1090
- this._editedValue = i;
1091
- }
1092
- _updateIsSelected(e) {
1093
- if (!e) {
1094
- this._isSelected = !1;
1095
- return;
1096
- }
1097
- let t = this._getFilteredKeyPath();
1098
- this._isSelected = e.dictionaryKey === this.dictionaryKey && (e.keyPath?.length ?? 0) > 0 && e$11(e.keyPath ?? [], t);
1099
- }
1100
- _handlePress(e) {
1101
- e.stopPropagation();
1102
- let n = r$5();
1103
- n && n.focusedContent.set({
1104
- dictionaryKey: this.dictionaryKey,
1105
- keyPath: this._getFilteredKeyPath()
1106
- });
1107
- }
1108
- _handleHover(n) {
1109
- n.stopPropagation(), r$5()?.messenger.send(`${e$9.INTLAYER_HOVERED_CONTENT_CHANGED}/post`, {
1110
- dictionaryKey: this.dictionaryKey,
1111
- keyPath: this._getFilteredKeyPath()
1112
- });
1113
- }
1114
- _handleUnhover(n) {
1115
- n.stopPropagation(), r$5()?.messenger.send(`${e$9.INTLAYER_HOVERED_CONTENT_CHANGED}/post`, null);
1116
- }
1117
- render() {
1118
- if (!this._isInIframe || !this._editorEnabled) return b$1`<slot></slot>`;
1119
- let e = this._editedValue, t = typeof e == `string` || typeof e == `number` || typeof e == `boolean` ? e : b$1`<slot></slot>`;
1120
- return b$1`
1121
- <intlayer-content-selector
1122
- ?is-selecting=${this._isSelected}
1123
- @intlayer:press=${this._handlePress}
1124
- @intlayer:hover=${this._handleHover}
1125
- @intlayer:unhover=${this._handleUnhover}
1126
- >
1127
- ${t}
1128
- </intlayer-content-selector>
1129
- `;
1130
- }
1131
- };
1132
- e$6([n$2({
1133
- type: String,
1134
- attribute: `key-path`
1135
- })], d$1.prototype, `keyPathJson`, void 0), e$6([n$2({
1136
- type: String,
1137
- attribute: `dictionary-key`
1138
- })], d$1.prototype, `dictionaryKey`, void 0), e$6([r()], d$1.prototype, `_editorEnabled`, void 0), e$6([r()], d$1.prototype, `_isInIframe`, void 0), e$6([r()], d$1.prototype, `_isSelected`, void 0), e$6([r()], d$1.prototype, `_editedValue`, void 0);
1139
- var f = () => {
1140
- typeof customElements > `u` || customElements.get(`intlayer-content-selector-wrapper`) || customElements.define(`intlayer-content-selector-wrapper`, d$1);
1141
- };
1142
- //#endregion
1143
- //#region ../@intlayer/editor/dist/esm/components/EditedContent.mjs
1144
- var u = class extends i {
1145
- constructor(...e) {
1146
- super(...e), this.dictionaryKey = ``, this.keyPathJson = `[]`, this.locale = ``, this._editedText = null, this._unsubManager = null, this._unsubEditedContent = null;
1147
- }
1148
- static {
1149
- this.styles = i$3`
1150
- :host {
1151
- display: contents;
1152
- }
1153
- `;
1154
- }
1155
- connectedCallback() {
1156
- super.connectedCallback(), this._subscribeToManager();
1157
- }
1158
- disconnectedCallback() {
1159
- super.disconnectedCallback(), this._teardown();
1160
- }
1161
- _teardown() {
1162
- this._unsubManager?.(), this._unsubEditedContent?.(), this._unsubManager = null, this._unsubEditedContent = null;
1163
- }
1164
- _getKeyPath() {
1165
- try {
1166
- return JSON.parse(this.keyPathJson);
1167
- } catch {
1168
- return [];
1169
- }
1170
- }
1171
- _resolveEditedText(e) {
1172
- let t = this._getKeyPath(), n = e.getContentValue(this.dictionaryKey, t);
1173
- if (n == null) {
1174
- this._editedText = null;
1175
- return;
1176
- }
1177
- if (typeof n == `string` || typeof n == `number`) {
1178
- this._editedText = String(n);
1179
- return;
1180
- }
1181
- if (typeof n == `object`) {
1182
- let e = this.locale || void 0, r = C$1(n, {
1183
- locale: e,
1184
- dictionaryKey: this.dictionaryKey,
1185
- keyPath: t
1186
- }, S$2(e));
1187
- typeof r == `string` || typeof r == `number` ? this._editedText = String(r) : (console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`), this._editedText = null);
1188
- return;
1189
- }
1190
- this._editedText = null;
1191
- }
1192
- _setupManagerSubscriptions(e) {
1193
- this._resolveEditedText(e);
1194
- let t = () => this._resolveEditedText(e);
1195
- e.editedContent.addEventListener(`change`, t), this._unsubEditedContent = () => e.editedContent.removeEventListener(`change`, t);
1196
- }
1197
- _subscribeToManager() {
1198
- let n = r$5();
1199
- n && this._setupManagerSubscriptions(n), this._unsubManager = a$2((e) => {
1200
- this._unsubEditedContent?.(), this._unsubEditedContent = null, e ? this._setupManagerSubscriptions(e) : this._editedText = null;
1201
- });
1202
- }
1203
- render() {
1204
- return b$1`
1205
- <intlayer-content-selector-wrapper
1206
- key-path=${this.keyPathJson}
1207
- dictionary-key=${this.dictionaryKey}
1208
- >
1209
- ${this._editedText === null ? b$1`<slot></slot>` : this._editedText}
1210
- </intlayer-content-selector-wrapper>
1211
- `;
1212
- }
1213
- };
1214
- e$6([n$2({
1215
- type: String,
1216
- attribute: `dictionary-key`
1217
- })], u.prototype, `dictionaryKey`, void 0), e$6([n$2({
1218
- type: String,
1219
- attribute: `key-path`
1220
- })], u.prototype, `keyPathJson`, void 0), e$6([n$2({
1221
- type: String,
1222
- attribute: `locale`
1223
- })], u.prototype, `locale`, void 0), e$6([r()], u.prototype, `_editedText`, void 0);
1224
- var d = () => {
1225
- typeof customElements > `u` || customElements.get(`intlayer-edited-content`) || customElements.define(`intlayer-edited-content`, u);
1226
- };
1227
- //#endregion
1228
- //#region ../@intlayer/editor/dist/esm/core/CrossFrameMessenger.mjs
1229
- var t$3 = () => Math.random().toString(36).slice(2);
1230
- var n$1 = class {
1231
- constructor(e) {
1232
- this._subscribers = /* @__PURE__ */ new Map(), this._windowHandler = null, this._seenMessageIds = /* @__PURE__ */ new Set(), this._config = e, this.senderId = t$3();
1233
- }
1234
- start() {
1235
- typeof window > `u` || this._windowHandler || (this._windowHandler = (e) => {
1236
- this._handleMessage(e);
1237
- }, window.addEventListener(`message`, this._windowHandler));
1238
- }
1239
- stop() {
1240
- this._windowHandler &&= (window.removeEventListener(`message`, this._windowHandler), null);
1241
- }
1242
- send(e, n) {
1243
- let r = {
1244
- type: e,
1245
- data: n,
1246
- senderId: this.senderId,
1247
- messageId: t$3()
1248
- };
1249
- for (let e of this._config.allowedOrigins) e && this._config.postMessageFn(r, e);
1250
- }
1251
- subscribe(e, t) {
1252
- return this._subscribers.has(e) || this._subscribers.set(e, /* @__PURE__ */ new Set()), this._subscribers.get(e).add(t), () => {
1253
- this._subscribers.get(e)?.delete(t);
1254
- };
1255
- }
1256
- _handleMessage(t) {
1257
- let n = t.data;
1258
- if (!n || typeof n != `object`) return;
1259
- let { type: r, data: i, senderId: a, messageId: o } = n;
1260
- if (!r || typeof r != `string` || a === this.senderId) return;
1261
- if (o) {
1262
- if (this._seenMessageIds.has(o)) return;
1263
- this._seenMessageIds.add(o), this._seenMessageIds.size > 200 && this._seenMessageIds.clear();
1264
- }
1265
- let { allowedOrigins: s } = this._config;
1266
- if (!(!s || s.length === 0 || s.includes(`*`) || s.filter((e) => !!e && e !== ``).some((n) => e$10(n, t.origin)))) return;
1267
- let c = this._subscribers.get(r);
1268
- if (c) for (let e of c) e(i, a);
1269
- }
1270
- };
1271
- //#endregion
1272
- //#region ../@intlayer/editor/dist/esm/core/CrossFrameStateManager.mjs
1273
- var e = class extends EventTarget {
1274
- constructor(e, t, n = {}) {
1275
- super(), this._unsubscribers = [], this._key = e, this._messenger = t, this._options = {
1276
- emit: n.emit ?? !0,
1277
- receive: n.receive ?? !0
1278
- }, n.initialValue !== void 0 && (this._value = n.initialValue);
1279
- }
1280
- get value() {
1281
- return this._value;
1282
- }
1283
- set(e) {
1284
- this._value = e, this.dispatchEvent(new CustomEvent(`change`, { detail: e })), this._options.emit && this._messenger.send(`${this._key}/post`, e);
1285
- }
1286
- start() {
1287
- if (this._options.receive) {
1288
- let e = this._messenger.subscribe(`${this._key}/post`, (e) => {
1289
- this._value = e, this.dispatchEvent(new CustomEvent(`change`, { detail: e }));
1290
- });
1291
- this._unsubscribers.push(e);
1292
- }
1293
- if (this._options.emit) {
1294
- let e = this._messenger.subscribe(`${this._key}/get`, (e, t) => {
1295
- t !== this._messenger.senderId && this._value !== void 0 && this._messenger.send(`${this._key}/post`, this._value);
1296
- });
1297
- this._unsubscribers.push(e);
1298
- }
1299
- this._options.receive && this._value === void 0 && this._messenger.send(`${this._key}/get`);
1300
- }
1301
- stop() {
1302
- for (let e of this._unsubscribers) e();
1303
- this._unsubscribers.length = 0;
1304
- }
1305
- postCurrentValue() {
1306
- this._value !== void 0 && this._messenger.send(`${this._key}/post`, this._value);
1307
- }
1308
- };
1309
- //#endregion
1310
- //#region ../@intlayer/editor/dist/esm/core/IframeClickInterceptor.mjs
1311
- var n = class {
1312
- constructor(e) {
1313
- this._mousedownHandler = null, this._unsubscribeMerge = null, this._messenger = e;
1314
- }
1315
- startInterceptor() {
1316
- typeof window > `u` || (this._mousedownHandler = () => {
1317
- this._messenger.send(e$9.INTLAYER_IFRAME_CLICKED);
1318
- }, window.addEventListener(`mousedown`, this._mousedownHandler));
1319
- }
1320
- startMerger() {
1321
- this._unsubscribeMerge = this._messenger.subscribe(e$9.INTLAYER_IFRAME_CLICKED, e$8);
1322
- }
1323
- stopInterceptor() {
1324
- this._mousedownHandler &&= (window.removeEventListener(`mousedown`, this._mousedownHandler), null);
1325
- }
1326
- stopMerger() {
1327
- this._unsubscribeMerge?.(), this._unsubscribeMerge = null;
1328
- }
1329
- };
1330
- //#endregion
1331
- //#region ../@intlayer/editor/dist/esm/core/UrlStateManager.mjs
1332
- var t$2 = class {
1333
- constructor(e) {
1334
- this._originalPushState = null, this._originalReplaceState = null, this._listeners = [], this._messenger = e;
1335
- }
1336
- start() {
1337
- if (typeof window > `u`) return;
1338
- let t = () => {
1339
- this._messenger.send(`${e$9.INTLAYER_URL_CHANGE}/post`, window.location.pathname);
1340
- };
1341
- this._originalPushState = history.pushState, this._originalReplaceState = history.replaceState;
1342
- let n = (e) => function(...t) {
1343
- e.apply(this, t), window.dispatchEvent(new Event(`locationchange`));
1344
- };
1345
- history.pushState = n(this._originalPushState), history.replaceState = n(this._originalReplaceState);
1346
- for (let e of [
1347
- `locationchange`,
1348
- `popstate`,
1349
- `hashchange`,
1350
- `load`
1351
- ]) {
1352
- let n = t;
1353
- window.addEventListener(e, n), this._listeners.push([e, n]);
1354
- }
1355
- t();
1356
- }
1357
- stop() {
1358
- if (!(typeof window > `u`)) {
1359
- for (let [e, t] of this._listeners) window.removeEventListener(e, t);
1360
- this._listeners = [], this._originalPushState &&= (history.pushState = this._originalPushState, null), this._originalReplaceState &&= (history.replaceState = this._originalReplaceState, null);
1361
- }
1362
- }
1363
- };
1364
- //#endregion
1365
- //#region ../@intlayer/core/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs
1366
- var t$1 = (t, n, r) => {
1367
- let i = t, a = null, o = [];
1368
- if (n.length === 0) return r;
1369
- try {
1370
- for (let t = 0; t < n.length; t++) {
1371
- let s = n[t];
1372
- if (a = i, (s.type === e$18.Object || s.type === e$18.Array) && (o = [s.key], (!i[s.key] || typeof i[s.key] != `object`) && (i[s.key] = {}), i = i[s.key]), (s.type === e$18.Translation || s.type === e$18.Enumeration) && (o = [s.type, s.key], (!i[s.type] || typeof i[s.type] != `object`) && (i[s.type] = {}), (!i[s.type][s.key] || typeof i[s.type][s.key] != `object`) && (i[s.type][s.key] = {}), i = i[s.type][s.key]), (s.type === e$18.Enumeration || s.type === e$18.Condition) && s.type !== e$18.Enumeration && (o = [s.type, s.key], i = i[s.type][s.key]), (s.type === e$18.Markdown || s.type === e$18.HTML || s.type === e$18.Insertion) && (o = [s.type], (!i[s.type] || typeof i[s.type] != `object`) && (i[s.type] = ``), i = i[s.type]), s.type === e$18.File && (o = [`content`], i = i.content), t === n.length - 1 && a && o.length > 0) {
1373
- let e = a;
1374
- for (let t of o.slice(0, -1)) e = e[t];
1375
- let t = o[o.length - 1];
1376
- if (r === void 0) if (Array.isArray(e)) {
1377
- let n = Number(t);
1378
- !Number.isNaN(n) && n >= 0 && n < e.length && e.splice(n, 1);
1379
- } else delete e[t];
1380
- else e[t] = r;
1381
- }
1382
- }
1383
- return t;
1384
- } catch (e) {
1385
- return console.error(`Cannot edit dictionary by key path`, {
1386
- dictionaryContent: t,
1387
- keyPath: n,
1388
- newValue: r
1389
- }, e), t;
1390
- }
1391
- };
1392
- //#endregion
1393
- //#region ../@intlayer/core/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs
1394
- var t = (t, n, r) => {
1395
- let i = t, a = null, o = null;
1396
- for (let t of r) a = i, (t.type === e$18.Object || t.type === e$18.Array) && (o = t.key, i = i[t.key]), (t.type === e$18.Translation || t.type === e$18.Enumeration || t.type === e$18.Condition) && (o = t.type, i = i[t.type][t.key]), (t.type === e$18.Markdown || t.type === e$18.ReactNode || t.type === e$18.HTML || t.type === e$18.Insertion || t.type === e$18.File) && (o = t.type, i = i[t.type]);
1397
- if (a && o !== null) if (Array.isArray(a)) a[o] = i;
1398
- else {
1399
- let e = {};
1400
- for (let t of Object.keys(a)) t === o && n !== void 0 ? e[n] = i : e[t] = a[t];
1401
- Object.keys(a).forEach((e) => {
1402
- delete a[e];
1403
- }), Object.assign(a, e);
1404
- }
1405
- return t;
1406
- };
1407
- //#endregion
1408
- //#region ../@intlayer/editor/dist/esm/core/EditorStateManager.mjs
1409
- var l = class {
1410
- constructor(a) {
1411
- this._unsubAreYouThere = null, this._unsubActivate = null, this._unsubClientReady = null, this._mode = a.mode, this._configuration = a.configuration, this.messenger = new n$1(a.messenger), this.editorEnabled = new e(e$9.INTLAYER_EDITOR_ENABLED, this.messenger, {
1412
- emit: !1,
1413
- receive: !0,
1414
- initialValue: !1
1415
- }), this.focusedContent = new e(e$9.INTLAYER_FOCUSED_CONTENT_CHANGED, this.messenger, {
1416
- emit: !0,
1417
- receive: !0,
1418
- initialValue: null
1419
- }), this.localeDictionaries = new e(e$9.INTLAYER_LOCALE_DICTIONARIES_CHANGED, this.messenger), this.editedContent = new e(e$9.INTLAYER_EDITED_CONTENT_CHANGED, this.messenger), this.configuration = new e(e$9.INTLAYER_CONFIGURATION, this.messenger, {
1420
- emit: !0,
1421
- receive: !1,
1422
- ...a.configuration ? { initialValue: a.configuration } : {}
1423
- }), this.currentLocale = new e(e$9.INTLAYER_CURRENT_LOCALE, this.messenger, {
1424
- emit: a.mode === `client`,
1425
- receive: a.mode === `editor`
1426
- }), this._urlManager = new t$2(this.messenger), this._iframeInterceptor = new n(this.messenger);
1427
- }
1428
- start() {
1429
- this.messenger.start(), this.editorEnabled.start(), this.focusedContent.start(), this.localeDictionaries.start(), this.editedContent.start(), this.configuration.start(), this.currentLocale.start(), this._mode === `client` ? (this._urlManager.start(), this._iframeInterceptor.startInterceptor(), this._loadDictionaries(), this.messenger.send(`${e$9.INTLAYER_EDITED_CONTENT_CHANGED}/get`), this._configuration?.editor?.enabled !== !1 && this._setupActivationHandshake()) : (this._iframeInterceptor.startMerger(), this._setupEditorHandshake());
1430
- }
1431
- stop() {
1432
- this._unsubAreYouThere?.(), this._unsubActivate?.(), this._unsubClientReady?.(), this._unsubAreYouThere = null, this._unsubActivate = null, this._unsubClientReady = null, this.messenger.stop(), this.editorEnabled.stop(), this.focusedContent.stop(), this.localeDictionaries.stop(), this.editedContent.stop(), this.configuration.stop(), this.currentLocale.stop(), this._urlManager.stop(), this._iframeInterceptor.stopInterceptor(), this._iframeInterceptor.stopMerger();
1433
- }
1434
- pingClient() {
1435
- this._mode === `editor` && this.messenger.send(e$9.INTLAYER_ARE_YOU_THERE);
1436
- }
1437
- setFocusedContentKeyPath(e) {
1438
- let t = e.filter((e) => e.type !== e$18.Translation), n = this.focusedContent.value;
1439
- n && this.focusedContent.set({
1440
- ...n,
1441
- keyPath: t
1442
- });
1443
- }
1444
- setLocaleDictionary(e) {
1445
- if (!e.localId) return;
1446
- let t = this.localeDictionaries.value ?? {};
1447
- this.localeDictionaries.set({
1448
- ...t,
1449
- [e.localId]: e
1450
- });
1451
- }
1452
- setEditedDictionary(e) {
1453
- if (!e.localId) {
1454
- console.error(`setEditedDictionary: missing localId`, e);
1455
- return;
1456
- }
1457
- let t = this.editedContent.value ?? {};
1458
- this.editedContent.set({
1459
- ...t,
1460
- [e.localId]: e
1461
- });
1462
- }
1463
- setEditedContent(e, t) {
1464
- let n = this.editedContent.value ?? {};
1465
- this.editedContent.set({
1466
- ...n,
1467
- [e]: {
1468
- ...n[e],
1469
- content: t
1470
- }
1471
- });
1472
- }
1473
- addContent(e, t, n = [], r = !0) {
1474
- let i = this.editedContent.value ?? {}, a = (this.localeDictionaries.value ?? {})[e]?.content, c = structuredClone(i[e]?.content ?? a), l = n;
1475
- if (!r) {
1476
- let e = 0, t = n.slice(0, -1), r = n[n.length - 1], i = r.key;
1477
- for (; t$12(c, l) !== void 0;) e++, i = e === 0 ? r.key : `${r.key} (${e})`, l = [...t, {
1478
- ...r,
1479
- key: i
1480
- }];
1481
- }
1482
- let u = t$1(c, l, t);
1483
- this.editedContent.set({
1484
- ...i,
1485
- [e]: {
1486
- ...i[e],
1487
- content: u
1488
- }
1489
- });
1490
- }
1491
- renameContent(e, t$13, n = []) {
1492
- let r = this.editedContent.value ?? {}, i = (this.localeDictionaries.value ?? {})[e]?.content, a = t(structuredClone(r[e]?.content ?? i), t$13, n);
1493
- this.editedContent.set({
1494
- ...r,
1495
- [e]: {
1496
- ...r[e],
1497
- content: a
1498
- }
1499
- });
1500
- }
1501
- removeContent(e, t) {
1502
- let n = this.editedContent.value ?? {}, r = (this.localeDictionaries.value ?? {})[e]?.content, i = t$1(structuredClone(n[e]?.content ?? r), t, t$12(r, t));
1503
- this.editedContent.set({
1504
- ...n,
1505
- [e]: {
1506
- ...n[e],
1507
- content: i
1508
- }
1509
- });
1510
- }
1511
- restoreContent(e) {
1512
- let t = { ...this.editedContent.value ?? {} };
1513
- delete t[e], this.editedContent.set(t);
1514
- }
1515
- clearContent(e) {
1516
- let t = { ...this.editedContent.value ?? {} };
1517
- delete t[e], this.editedContent.set(t);
1518
- }
1519
- clearAllContent() {
1520
- this.editedContent.set({});
1521
- }
1522
- getContentValue(e, t) {
1523
- let n = this.editedContent.value;
1524
- if (!n) return;
1525
- let r = t.filter((e) => e.type !== e$18.Translation), i = this.localeDictionaries.value;
1526
- if (e.includes(`:local:`) || e.includes(`:remote:`)) return i && !(e in i) ? void 0 : t$12(n[e]?.content ?? {}, r, this.currentLocale.value);
1527
- let o = Object.keys(n).filter((t) => t.startsWith(`${e}:`) && (!i || t in i));
1528
- for (let e of o) {
1529
- let t = t$12(n[e]?.content ?? {}, r, this.currentLocale.value);
1530
- if (t) return t;
1531
- }
1532
- }
1533
- _setupEditorHandshake() {
1534
- this._unsubClientReady = this.messenger.subscribe(e$9.INTLAYER_CLIENT_READY, () => {
1535
- this.editorEnabled.set(!0), this.messenger.send(e$9.INTLAYER_EDITOR_ACTIVATE);
1536
- }), this.messenger.send(e$9.INTLAYER_ARE_YOU_THERE);
1537
- }
1538
- _setupActivationHandshake() {
1539
- this.messenger.send(e$9.INTLAYER_CLIENT_READY), this._unsubAreYouThere = this.messenger.subscribe(e$9.INTLAYER_ARE_YOU_THERE, () => {
1540
- this.messenger.send(e$9.INTLAYER_CLIENT_READY);
1541
- }), this._unsubActivate = this.messenger.subscribe(e$9.INTLAYER_EDITOR_ACTIVATE, () => {
1542
- this.editorEnabled.set(!0), this._broadcastData();
1543
- });
1544
- }
1545
- _broadcastData() {
1546
- let t = this.configuration.value;
1547
- t && this.messenger.send(`${e$9.INTLAYER_CONFIGURATION}/post`, t);
1548
- let n = this.currentLocale.value;
1549
- n && this.messenger.send(`${e$9.INTLAYER_CURRENT_LOCALE}/post`, n);
1550
- let r = this.localeDictionaries.value;
1551
- r && this.messenger.send(`${e$9.INTLAYER_LOCALE_DICTIONARIES_CHANGED}/post`, r);
1552
- }
1553
- async _loadDictionaries() {
1554
- try {
1555
- let e = (await __vitePreload(async () => {
1556
- const { getUnmergedDictionaries } = await import("./unmerged_dictionaries-C2Zsjv5l.js");
1557
- return { getUnmergedDictionaries };
1558
- }, [])).getUnmergedDictionaries(), t = Object.fromEntries(Object.values(e).flat().map((e) => [e.localId, e]));
1559
- this.localeDictionaries.set(t), this.editorEnabled.value && this._broadcastData();
1560
- } catch (e) {
1561
- console.warn(`[intlayer] Failed to load unmerged dictionaries:`, e);
1562
- }
1563
- }
1564
- };
1565
- //#endregion
1566
- //#region ../@intlayer/editor/dist/esm/components-RtOXxg9h.mjs
1567
- var m = () => {
1568
- let { editor: e } = configuration_default ?? {};
1569
- return {
1570
- allowedOrigins: [e?.editorURL, e?.cmsURL].filter(Boolean),
1571
- postMessageFn: (e, t) => {
1572
- typeof window > `u` || window.self !== window.top && window.parent?.postMessage(e, t);
1573
- }
1574
- };
1575
- };
1576
- var h = 0;
1577
- var g = () => {
1578
- h++;
1579
- let t = r$5();
1580
- if (t) return t;
1581
- let r = new l({
1582
- mode: `client`,
1583
- messenger: m(),
1584
- configuration: configuration_default
1585
- });
1586
- return i$4(r), x(), r.start(), r;
1587
- }, _ = () => {
1588
- h = Math.max(0, h - 1), !(h > 0) && (r$5()?.stop(), i$4(null));
1589
- };
1590
- var v = class extends i {
1591
- constructor(...e) {
1592
- super(...e), this._initialized = !1, this._unsubManager = null;
1593
- }
1594
- createRenderRoot() {
1595
- return this;
1596
- }
1597
- connectedCallback() {
1598
- super.connectedCallback(), this._init();
1599
- }
1600
- disconnectedCallback() {
1601
- super.disconnectedCallback(), this._unsubManager?.(), this._unsubManager = null, this._initialized &&= (_(), !1);
1602
- }
1603
- updated(e) {
1604
- e.has(`configuration`) && !this._initialized && this._init(), e.has(`locale`) && this.locale && this._syncLocale(this.locale);
1605
- }
1606
- _init() {
1607
- this._initialized || (g(), this._initialized = !0, this.locale && this._syncLocale(this.locale));
1608
- }
1609
- _syncLocale(n) {
1610
- let r = r$5();
1611
- r ? r.currentLocale.set(n) : (this._unsubManager?.(), this._unsubManager = a$2((e) => {
1612
- e && (this._unsubManager?.(), this._unsubManager = null, e.currentLocale.set(n));
1613
- }));
1614
- }
1615
- };
1616
- e$6([n$2({ attribute: !1 })], v.prototype, `configuration`, void 0), e$6([n$2({ type: String })], v.prototype, `locale`, void 0);
1617
- var y = () => {
1618
- typeof customElements > `u` || customElements.get(`intlayer-editor`) || customElements.define(`intlayer-editor`, v);
1619
- };
1620
- var b = class extends i {
1621
- constructor(...e) {
1622
- super(...e), this.isSelecting = !1, this.pressDuration = 250, this._isHovered = !1, this._isSelectingState = !1, this._pressTimer = null, this._clickOutsideHandler = null;
1623
- }
1624
- static {
1625
- this.styles = i$3`
1626
- :host {
1627
- display: contents;
1628
- }
1629
-
1630
- .wrapper {
1631
- display: inline-block;
1632
- cursor: pointer;
1633
- user-select: none;
1634
- border-radius: 0.375rem;
1635
- outline-width: 2px;
1636
- outline-offset: 4px;
1637
- outline-style: solid;
1638
- outline-color: transparent;
1639
- transition: all 100ms 50ms ease-in-out;
1640
- }
1641
-
1642
- .wrapper[data-active] {
1643
- outline-color: inherit;
1644
- }
1645
- `;
1646
- }
1647
- connectedCallback() {
1648
- super.connectedCallback(), this._clickOutsideHandler = (e) => {
1649
- e.composedPath().includes(this) || (this._isSelectingState = !1, this._dispatch(`intlayer:click-outside`));
1650
- }, document.addEventListener(`mousedown`, this._clickOutsideHandler);
1651
- }
1652
- disconnectedCallback() {
1653
- super.disconnectedCallback(), this._clickOutsideHandler &&= (document.removeEventListener(`mousedown`, this._clickOutsideHandler), null), this._clearPressTimer();
1654
- }
1655
- _clearPressTimer() {
1656
- this._pressTimer !== null && (clearTimeout(this._pressTimer), this._pressTimer = null);
1657
- }
1658
- _dispatch(e) {
1659
- this.dispatchEvent(new CustomEvent(e, {
1660
- bubbles: !0,
1661
- composed: !0
1662
- }));
1663
- }
1664
- _handleMouseDown() {
1665
- this._clearPressTimer(), this._pressTimer = setTimeout(() => {
1666
- this._isSelectingState = !0, this._dispatch(`intlayer:press`);
1667
- }, this.pressDuration);
1668
- }
1669
- _handleMouseEnter() {
1670
- this._isHovered = !0, this._dispatch(`intlayer:hover`);
1671
- }
1672
- _handleMouseUpOrLeave() {
1673
- this._isHovered && (this._isHovered = !1, this._dispatch(`intlayer:unhover`)), this._clearPressTimer();
1674
- }
1675
- _handleClick(e) {
1676
- (this.isSelecting || this._isSelectingState) && (e.preventDefault(), e.stopPropagation());
1677
- }
1678
- _handleBlur() {
1679
- this._isSelectingState = !1;
1680
- }
1681
- render() {
1682
- return b$1`
1683
- <span
1684
- class="wrapper"
1685
- ?data-active=${this.isSelecting || this._isSelectingState || this._isHovered}
1686
- role="button"
1687
- tabindex="0"
1688
- @mousedown=${this._handleMouseDown}
1689
- @mouseup=${this._handleMouseUpOrLeave}
1690
- @mouseleave=${this._handleMouseUpOrLeave}
1691
- @mouseenter=${this._handleMouseEnter}
1692
- @click=${this._handleClick}
1693
- @touchstart=${this._handleMouseDown}
1694
- @touchend=${this._handleMouseUpOrLeave}
1695
- @touchcancel=${this._handleMouseUpOrLeave}
1696
- @blur=${this._handleBlur}
1697
- @keyup=${() => {}}
1698
- >
1699
- <slot></slot>
1700
- </span>
1701
- `;
1702
- }
1703
- };
1704
- e$6([n$2({
1705
- type: Boolean,
1706
- attribute: `is-selecting`
1707
- })], b.prototype, `isSelecting`, void 0), e$6([n$2({
1708
- type: Number,
1709
- attribute: `press-duration`
1710
- })], b.prototype, `pressDuration`, void 0), e$6([r()], b.prototype, `_isHovered`, void 0), e$6([r()], b.prototype, `_isSelectingState`, void 0), e$6([e$1(`.wrapper`)], b.prototype, `_wrapper`, void 0);
1711
- var x = () => {
1712
- typeof customElements > `u` || (customElements.get(`intlayer-content-selector`) || customElements.define(`intlayer-content-selector`, b), f(), d(), y());
1713
- };
1714
- //#endregion
1715
- //#region ../@intlayer/editor/dist/esm/index.mjs
1716
- var esm_exports = /* @__PURE__ */ __exportAll({
1717
- getGlobalEditorManager: () => r$5,
1718
- initEditorClient: () => g,
1719
- onGlobalEditorManagerChange: () => a$2,
1720
- stopEditorClient: () => _
1721
- });
1722
- //#endregion
1723
- export { i$4 as a, e$11 as c, d$4 as d, g$2 as f, i$5 as g, y$3 as h, e as i, _$2 as l, x$2 as m, x as n, e$8 as o, h$3 as p, l as r, e$9 as s, esm_exports as t, b$3 as u };