@intlayer/core 4.1.11 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +97 -0
  2. package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs.map +1 -0
  3. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +46 -0
  4. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -0
  5. package/dist/cjs/dictionaryManipulator/getSectionType.cjs +57 -0
  6. package/dist/cjs/dictionaryManipulator/getSectionType.cjs.map +1 -0
  7. package/dist/cjs/dictionaryManipulator/index.cjs +31 -0
  8. package/dist/cjs/dictionaryManipulator/index.cjs.map +1 -0
  9. package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +64 -0
  10. package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs.map +1 -0
  11. package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +73 -0
  12. package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs.map +1 -0
  13. package/dist/cjs/index.cjs +17 -47
  14. package/dist/cjs/index.cjs.map +1 -1
  15. package/dist/cjs/{transpiler/content_transformers/enumeration/getEnumerationContent.cjs → interpreter/getCondition.cjs} +10 -10
  16. package/dist/cjs/interpreter/getCondition.cjs.map +1 -0
  17. package/dist/cjs/interpreter/getContent/deepTransform.cjs +66 -0
  18. package/dist/cjs/interpreter/getContent/deepTransform.cjs.map +1 -0
  19. package/dist/cjs/{transpiler/content_transformers/translation/translation.cjs → interpreter/getContent/getContent.cjs} +22 -23
  20. package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -0
  21. package/dist/cjs/interpreter/getContent/index.cjs +27 -0
  22. package/dist/cjs/interpreter/getContent/index.cjs.map +1 -0
  23. package/dist/cjs/interpreter/getContent/plugins.cjs +111 -0
  24. package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -0
  25. package/dist/cjs/interpreter/getDictionary.cjs +42 -0
  26. package/dist/cjs/interpreter/getDictionary.cjs.map +1 -0
  27. package/dist/cjs/{transpiler/content_transformers/enumeration/findMatchingCondition.cjs → interpreter/getEnumeration.cjs} +12 -7
  28. package/dist/cjs/interpreter/getEnumeration.cjs.map +1 -0
  29. package/dist/cjs/interpreter/getIntlayer.cjs +51 -0
  30. package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -0
  31. package/dist/cjs/interpreter/getIntlayerAsync.cjs +37 -0
  32. package/dist/cjs/interpreter/getIntlayerAsync.cjs.map +1 -0
  33. package/dist/cjs/interpreter/getNesting.cjs +44 -0
  34. package/dist/cjs/interpreter/getNesting.cjs.map +1 -0
  35. package/dist/cjs/{transpiler/content_transformers/translation/getTranslationContent.cjs → interpreter/getTranslation.cjs} +11 -8
  36. package/dist/cjs/interpreter/getTranslation.cjs.map +1 -0
  37. package/dist/cjs/interpreter/index.cjs +39 -0
  38. package/dist/cjs/interpreter/index.cjs.map +1 -0
  39. package/dist/cjs/localization/getHTMLTextDir.cjs.map +1 -0
  40. package/dist/cjs/localization/getLocaleLang.cjs.map +1 -0
  41. package/dist/cjs/localization/getLocaleName.cjs.map +1 -0
  42. package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -0
  43. package/dist/cjs/{getMultilingualUrls.cjs → localization/getMultilingualUrls.cjs} +1 -1
  44. package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -0
  45. package/dist/cjs/{getPathWithoutLocale.cjs → localization/getPathWithoutLocale.cjs} +1 -1
  46. package/dist/cjs/localization/getPathWithoutLocale.cjs.map +1 -0
  47. package/dist/cjs/localization/index.cjs +50 -0
  48. package/dist/cjs/localization/index.cjs.map +1 -0
  49. package/dist/cjs/localization/localeDetector.cjs.map +1 -0
  50. package/dist/cjs/localization/localeList.cjs.map +1 -0
  51. package/dist/cjs/localization/localeNames/ar.cjs.map +1 -0
  52. package/dist/cjs/localization/localeNames/du.cjs.map +1 -0
  53. package/dist/cjs/localization/localeNames/en.cjs.map +1 -0
  54. package/dist/cjs/localization/localeNames/es.cjs.map +1 -0
  55. package/dist/cjs/localization/localeNames/fr.cjs.map +1 -0
  56. package/dist/cjs/localization/localeNames/hi.cjs.map +1 -0
  57. package/dist/cjs/localization/localeNames/it.cjs.map +1 -0
  58. package/dist/cjs/localization/localeNames/ja.cjs.map +1 -0
  59. package/dist/cjs/localization/localeNames/ko.cjs.map +1 -0
  60. package/dist/cjs/localization/localeNames/ownLocalesName.cjs.map +1 -0
  61. package/dist/cjs/localization/localeNames/pt.cjs.map +1 -0
  62. package/dist/cjs/localization/localeNames/ru.cjs.map +1 -0
  63. package/dist/cjs/localization/localeNames/zh.cjs.map +1 -0
  64. package/dist/cjs/transpiler/condition/condition.cjs +33 -0
  65. package/dist/cjs/transpiler/condition/condition.cjs.map +1 -0
  66. package/dist/cjs/transpiler/{content_transformers → condition}/index.cjs +4 -6
  67. package/dist/cjs/transpiler/condition/index.cjs.map +1 -0
  68. package/dist/cjs/transpiler/{content_transformers/enumeration → enumeration}/enumeration.cjs +5 -15
  69. package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -0
  70. package/dist/cjs/transpiler/{content_transformers/enumeration → enumeration}/index.cjs +1 -5
  71. package/dist/cjs/transpiler/enumeration/index.cjs.map +1 -0
  72. package/dist/cjs/transpiler/index.cjs +10 -2
  73. package/dist/cjs/transpiler/index.cjs.map +1 -1
  74. package/dist/cjs/transpiler/markdown/index.cjs +23 -0
  75. package/dist/cjs/transpiler/markdown/index.cjs.map +1 -0
  76. package/dist/cjs/transpiler/{content_transformers/translation/types.cjs → markdown/markdown.cjs} +11 -7
  77. package/dist/cjs/transpiler/markdown/markdown.cjs.map +1 -0
  78. package/dist/cjs/transpiler/nesting/index.cjs +23 -0
  79. package/dist/cjs/transpiler/nesting/index.cjs.map +1 -0
  80. package/dist/cjs/transpiler/nesting/nesting.cjs +36 -0
  81. package/dist/cjs/transpiler/nesting/nesting.cjs.map +1 -0
  82. package/dist/cjs/transpiler/{content_transformers/translation → translation}/index.cjs +0 -2
  83. package/dist/cjs/transpiler/translation/index.cjs.map +1 -0
  84. package/dist/cjs/transpiler/translation/translation.cjs +33 -0
  85. package/dist/cjs/transpiler/translation/translation.cjs.map +1 -0
  86. package/dist/cjs/{types/declarationContent.cjs → transpiler/translation/types.cjs} +3 -3
  87. package/dist/cjs/transpiler/translation/types.cjs.map +1 -0
  88. package/dist/cjs/types/dictionary.cjs.map +1 -1
  89. package/dist/cjs/types/index.cjs +7 -9
  90. package/dist/cjs/types/index.cjs.map +1 -1
  91. package/dist/cjs/types/keyPath.cjs.map +1 -1
  92. package/dist/cjs/types/nodeType.cjs +3 -0
  93. package/dist/cjs/types/nodeType.cjs.map +1 -1
  94. package/dist/cjs/utils/checkIsURLAbsolute.cjs.map +1 -0
  95. package/dist/cjs/utils/isSameKeyPath.cjs.map +1 -1
  96. package/dist/cjs/utils/isValidReactElement.cjs +30 -0
  97. package/dist/cjs/utils/isValidReactElement.cjs.map +1 -0
  98. package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +73 -0
  99. package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs.map +1 -0
  100. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +22 -0
  101. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +1 -0
  102. package/dist/esm/dictionaryManipulator/getSectionType.mjs +33 -0
  103. package/dist/esm/dictionaryManipulator/getSectionType.mjs.map +1 -0
  104. package/dist/esm/dictionaryManipulator/index.mjs +6 -0
  105. package/dist/esm/dictionaryManipulator/index.mjs.map +1 -0
  106. package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs +40 -0
  107. package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs.map +1 -0
  108. package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +49 -0
  109. package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs.map +1 -0
  110. package/dist/esm/index.mjs +8 -34
  111. package/dist/esm/index.mjs.map +1 -1
  112. package/dist/esm/interpreter/getCondition.mjs +9 -0
  113. package/dist/esm/interpreter/getCondition.mjs.map +1 -0
  114. package/dist/esm/interpreter/getContent/deepTransform.mjs +42 -0
  115. package/dist/esm/interpreter/getContent/deepTransform.mjs.map +1 -0
  116. package/dist/esm/interpreter/getContent/getContent.mjs +27 -0
  117. package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -0
  118. package/dist/esm/interpreter/getContent/index.mjs +4 -0
  119. package/dist/esm/interpreter/getContent/index.mjs.map +1 -0
  120. package/dist/esm/interpreter/getContent/plugins.mjs +84 -0
  121. package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -0
  122. package/dist/esm/interpreter/getDictionary.mjs +18 -0
  123. package/dist/esm/interpreter/getDictionary.mjs.map +1 -0
  124. package/dist/esm/{transpiler/content_transformers/enumeration/findMatchingCondition.mjs → interpreter/getEnumeration.mjs} +7 -3
  125. package/dist/esm/interpreter/getEnumeration.mjs.map +1 -0
  126. package/dist/esm/interpreter/getIntlayer.mjs +17 -0
  127. package/dist/esm/interpreter/getIntlayer.mjs.map +1 -0
  128. package/dist/esm/interpreter/getIntlayerAsync.mjs +13 -0
  129. package/dist/esm/interpreter/getIntlayerAsync.mjs.map +1 -0
  130. package/dist/esm/interpreter/getNesting.mjs +20 -0
  131. package/dist/esm/interpreter/getNesting.mjs.map +1 -0
  132. package/dist/esm/interpreter/getTranslation.mjs +10 -0
  133. package/dist/esm/interpreter/getTranslation.mjs.map +1 -0
  134. package/dist/esm/interpreter/index.mjs +10 -0
  135. package/dist/esm/interpreter/index.mjs.map +1 -0
  136. package/dist/esm/localization/getHTMLTextDir.mjs.map +1 -0
  137. package/dist/esm/localization/getLocaleLang.mjs.map +1 -0
  138. package/dist/esm/localization/getLocaleName.mjs.map +1 -0
  139. package/dist/esm/localization/getLocalizedUrl.mjs.map +1 -0
  140. package/dist/esm/{getMultilingualUrls.mjs → localization/getMultilingualUrls.mjs} +1 -1
  141. package/dist/esm/localization/getMultilingualUrls.mjs.map +1 -0
  142. package/dist/esm/{getPathWithoutLocale.mjs → localization/getPathWithoutLocale.mjs} +1 -1
  143. package/dist/esm/localization/getPathWithoutLocale.mjs.map +1 -0
  144. package/dist/esm/localization/index.mjs +19 -0
  145. package/dist/esm/localization/index.mjs.map +1 -0
  146. package/dist/esm/localization/localeDetector.mjs.map +1 -0
  147. package/dist/esm/localization/localeList.mjs.map +1 -0
  148. package/dist/esm/localization/localeNames/ar.mjs.map +1 -0
  149. package/dist/esm/localization/localeNames/du.mjs.map +1 -0
  150. package/dist/esm/localization/localeNames/en.mjs.map +1 -0
  151. package/dist/esm/localization/localeNames/es.mjs.map +1 -0
  152. package/dist/esm/localization/localeNames/fr.mjs.map +1 -0
  153. package/dist/esm/localization/localeNames/hi.mjs.map +1 -0
  154. package/dist/esm/localization/localeNames/it.mjs.map +1 -0
  155. package/dist/esm/localization/localeNames/ja.mjs.map +1 -0
  156. package/dist/esm/localization/localeNames/ko.mjs.map +1 -0
  157. package/dist/esm/localization/localeNames/ownLocalesName.mjs.map +1 -0
  158. package/dist/esm/localization/localeNames/pt.mjs.map +1 -0
  159. package/dist/esm/localization/localeNames/ru.mjs.map +1 -0
  160. package/dist/esm/localization/localeNames/zh.mjs.map +1 -0
  161. package/dist/esm/transpiler/condition/condition.mjs +9 -0
  162. package/dist/esm/transpiler/condition/condition.mjs.map +1 -0
  163. package/dist/esm/transpiler/condition/index.mjs +2 -0
  164. package/dist/esm/transpiler/condition/index.mjs.map +1 -0
  165. package/dist/esm/transpiler/enumeration/enumeration.mjs +9 -0
  166. package/dist/esm/transpiler/enumeration/enumeration.mjs.map +1 -0
  167. package/dist/esm/transpiler/enumeration/index.mjs +2 -0
  168. package/dist/esm/transpiler/enumeration/index.mjs.map +1 -0
  169. package/dist/esm/transpiler/index.mjs +5 -1
  170. package/dist/esm/transpiler/index.mjs.map +1 -1
  171. package/dist/esm/transpiler/markdown/index.mjs +2 -0
  172. package/dist/esm/transpiler/markdown/index.mjs.map +1 -0
  173. package/dist/esm/transpiler/markdown/markdown.mjs +9 -0
  174. package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -0
  175. package/dist/esm/transpiler/nesting/index.mjs +2 -0
  176. package/dist/esm/transpiler/nesting/index.mjs.map +1 -0
  177. package/dist/esm/transpiler/nesting/nesting.mjs +12 -0
  178. package/dist/esm/transpiler/nesting/nesting.mjs.map +1 -0
  179. package/dist/esm/transpiler/translation/index.mjs +3 -0
  180. package/dist/esm/transpiler/translation/index.mjs.map +1 -0
  181. package/dist/esm/transpiler/translation/translation.mjs +9 -0
  182. package/dist/esm/transpiler/translation/translation.mjs.map +1 -0
  183. package/dist/esm/transpiler/translation/types.mjs +1 -0
  184. package/dist/esm/types/index.mjs +3 -4
  185. package/dist/esm/types/index.mjs.map +1 -1
  186. package/dist/esm/types/nodeType.mjs +3 -0
  187. package/dist/esm/types/nodeType.mjs.map +1 -1
  188. package/dist/esm/utils/checkIsURLAbsolute.mjs.map +1 -0
  189. package/dist/esm/utils/isSameKeyPath.mjs.map +1 -1
  190. package/dist/esm/utils/isValidReactElement.mjs +6 -0
  191. package/dist/esm/utils/isValidReactElement.mjs.map +1 -0
  192. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +4 -0
  193. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -0
  194. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +4 -0
  195. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -0
  196. package/dist/types/dictionaryManipulator/getSectionType.d.ts +4 -0
  197. package/dist/types/dictionaryManipulator/getSectionType.d.ts.map +1 -0
  198. package/dist/types/dictionaryManipulator/index.d.ts +6 -0
  199. package/dist/types/dictionaryManipulator/index.d.ts.map +1 -0
  200. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +4 -0
  201. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -0
  202. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +4 -0
  203. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -0
  204. package/dist/types/index.d.ts +8 -13
  205. package/dist/types/index.d.ts.map +1 -1
  206. package/dist/types/interpreter/getCondition.d.ts +25 -0
  207. package/dist/types/interpreter/getCondition.d.ts.map +1 -0
  208. package/dist/types/interpreter/getContent/deepTransform.d.ts +8 -0
  209. package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -0
  210. package/dist/types/interpreter/getContent/getContent.d.ts +11 -0
  211. package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -0
  212. package/dist/types/interpreter/getContent/index.d.ts +4 -0
  213. package/dist/types/interpreter/getContent/index.d.ts.map +1 -0
  214. package/dist/types/interpreter/getContent/plugins.d.ts +106 -0
  215. package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -0
  216. package/dist/types/interpreter/getDictionary.d.ts +13 -0
  217. package/dist/types/interpreter/getDictionary.d.ts.map +1 -0
  218. package/dist/types/interpreter/getEnumeration.d.ts +57 -0
  219. package/dist/types/interpreter/getEnumeration.d.ts.map +1 -0
  220. package/dist/types/interpreter/getIntlayer.d.ts +6 -0
  221. package/dist/types/interpreter/getIntlayer.d.ts.map +1 -0
  222. package/dist/types/interpreter/getIntlayerAsync.d.ts +13 -0
  223. package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -0
  224. package/dist/types/interpreter/getNesting.d.ts +18 -0
  225. package/dist/types/interpreter/getNesting.d.ts.map +1 -0
  226. package/dist/types/{transpiler/content_transformers/translation/getTranslationContent.d.ts → interpreter/getTranslation.d.ts} +8 -8
  227. package/dist/types/interpreter/getTranslation.d.ts.map +1 -0
  228. package/dist/types/interpreter/index.d.ts +10 -0
  229. package/dist/types/interpreter/index.d.ts.map +1 -0
  230. package/dist/types/{getHTMLTextDir.d.ts → localization/getHTMLTextDir.d.ts} +1 -1
  231. package/dist/types/localization/getHTMLTextDir.d.ts.map +1 -0
  232. package/dist/types/{getLocaleLang.d.ts → localization/getLocaleLang.d.ts} +1 -1
  233. package/dist/types/localization/getLocaleLang.d.ts.map +1 -0
  234. package/dist/types/{getLocaleName.d.ts → localization/getLocaleName.d.ts} +1 -1
  235. package/dist/types/localization/getLocaleName.d.ts.map +1 -0
  236. package/dist/types/{getLocalizedUrl.d.ts → localization/getLocalizedUrl.d.ts} +1 -1
  237. package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -0
  238. package/dist/types/{getMultilingualUrls.d.ts → localization/getMultilingualUrls.d.ts} +1 -1
  239. package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -0
  240. package/dist/types/{getPathWithoutLocale.d.ts → localization/getPathWithoutLocale.d.ts} +1 -1
  241. package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -0
  242. package/dist/types/localization/index.d.ts +9 -0
  243. package/dist/types/localization/index.d.ts.map +1 -0
  244. package/dist/types/localization/localeDetector.d.ts.map +1 -0
  245. package/dist/types/localization/localeList.d.ts.map +1 -0
  246. package/dist/types/localization/localeNames/ar.d.ts.map +1 -0
  247. package/dist/types/localization/localeNames/du.d.ts.map +1 -0
  248. package/dist/types/localization/localeNames/en.d.ts.map +1 -0
  249. package/dist/types/localization/localeNames/es.d.ts.map +1 -0
  250. package/dist/types/localization/localeNames/fr.d.ts.map +1 -0
  251. package/dist/types/localization/localeNames/hi.d.ts.map +1 -0
  252. package/dist/types/localization/localeNames/it.d.ts.map +1 -0
  253. package/dist/types/localization/localeNames/ja.d.ts.map +1 -0
  254. package/dist/types/localization/localeNames/ko.d.ts.map +1 -0
  255. package/dist/types/localization/localeNames/ownLocalesName.d.ts.map +1 -0
  256. package/dist/types/localization/localeNames/pt.d.ts.map +1 -0
  257. package/dist/types/localization/localeNames/ru.d.ts.map +1 -0
  258. package/dist/types/localization/localeNames/zh.d.ts.map +1 -0
  259. package/dist/types/transpiler/condition/condition.d.ts +35 -0
  260. package/dist/types/transpiler/condition/condition.d.ts.map +1 -0
  261. package/dist/types/transpiler/condition/index.d.ts +2 -0
  262. package/dist/types/transpiler/condition/index.d.ts.map +1 -0
  263. package/dist/types/transpiler/enumeration/enumeration.d.ts +58 -0
  264. package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -0
  265. package/dist/types/transpiler/enumeration/index.d.ts +2 -0
  266. package/dist/types/transpiler/enumeration/index.d.ts.map +1 -0
  267. package/dist/types/transpiler/index.d.ts +5 -1
  268. package/dist/types/transpiler/index.d.ts.map +1 -1
  269. package/dist/types/transpiler/markdown/index.d.ts +2 -0
  270. package/dist/types/transpiler/markdown/index.d.ts.map +1 -0
  271. package/dist/types/transpiler/markdown/markdown.d.ts +21 -0
  272. package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -0
  273. package/dist/types/transpiler/nesting/index.d.ts +2 -0
  274. package/dist/types/transpiler/nesting/index.d.ts.map +1 -0
  275. package/dist/types/transpiler/nesting/nesting.d.ts +54 -0
  276. package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -0
  277. package/dist/types/transpiler/translation/index.d.ts +3 -0
  278. package/dist/types/transpiler/translation/index.d.ts.map +1 -0
  279. package/dist/types/transpiler/{content_transformers/translation → translation}/translation.d.ts +2 -2
  280. package/dist/types/transpiler/translation/translation.d.ts.map +1 -0
  281. package/dist/types/transpiler/{content_transformers/translation → translation}/types.d.ts +4 -5
  282. package/dist/types/transpiler/translation/types.d.ts.map +1 -0
  283. package/dist/types/types/dictionary.d.ts +36 -7
  284. package/dist/types/types/dictionary.d.ts.map +1 -1
  285. package/dist/types/types/index.d.ts +3 -4
  286. package/dist/types/types/index.d.ts.map +1 -1
  287. package/dist/types/types/keyPath.d.ts +17 -1
  288. package/dist/types/types/keyPath.d.ts.map +1 -1
  289. package/dist/types/types/nodeType.d.ts +4 -1
  290. package/dist/types/types/nodeType.d.ts.map +1 -1
  291. package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -0
  292. package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
  293. package/dist/types/utils/isValidReactElement.d.ts +9 -0
  294. package/dist/types/utils/isValidReactElement.d.ts.map +1 -0
  295. package/package.json +10 -7
  296. package/dist/cjs/checkIsURLAbsolute.cjs.map +0 -1
  297. package/dist/cjs/getHTMLTextDir.cjs.map +0 -1
  298. package/dist/cjs/getLocaleLang.cjs.map +0 -1
  299. package/dist/cjs/getLocaleName.cjs.map +0 -1
  300. package/dist/cjs/getLocalizedUrl.cjs.map +0 -1
  301. package/dist/cjs/getMultilingualUrls.cjs.map +0 -1
  302. package/dist/cjs/getPathWithoutLocale.cjs.map +0 -1
  303. package/dist/cjs/localeDetector.cjs.map +0 -1
  304. package/dist/cjs/localeList.cjs.map +0 -1
  305. package/dist/cjs/localeNames/ar.cjs.map +0 -1
  306. package/dist/cjs/localeNames/du.cjs.map +0 -1
  307. package/dist/cjs/localeNames/en.cjs.map +0 -1
  308. package/dist/cjs/localeNames/es.cjs.map +0 -1
  309. package/dist/cjs/localeNames/fr.cjs.map +0 -1
  310. package/dist/cjs/localeNames/hi.cjs.map +0 -1
  311. package/dist/cjs/localeNames/it.cjs.map +0 -1
  312. package/dist/cjs/localeNames/ja.cjs.map +0 -1
  313. package/dist/cjs/localeNames/ko.cjs.map +0 -1
  314. package/dist/cjs/localeNames/ownLocalesName.cjs.map +0 -1
  315. package/dist/cjs/localeNames/pt.cjs.map +0 -1
  316. package/dist/cjs/localeNames/ru.cjs.map +0 -1
  317. package/dist/cjs/localeNames/zh.cjs.map +0 -1
  318. package/dist/cjs/transpiler/content_transformers/enumeration/enumeration.cjs.map +0 -1
  319. package/dist/cjs/transpiler/content_transformers/enumeration/findMatchingCondition.cjs.map +0 -1
  320. package/dist/cjs/transpiler/content_transformers/enumeration/getEnumerationContent.cjs.map +0 -1
  321. package/dist/cjs/transpiler/content_transformers/enumeration/index.cjs.map +0 -1
  322. package/dist/cjs/transpiler/content_transformers/index.cjs.map +0 -1
  323. package/dist/cjs/transpiler/content_transformers/translation/getTranslationContent.cjs.map +0 -1
  324. package/dist/cjs/transpiler/content_transformers/translation/index.cjs.map +0 -1
  325. package/dist/cjs/transpiler/content_transformers/translation/translation.cjs.map +0 -1
  326. package/dist/cjs/transpiler/content_transformers/translation/types.cjs.map +0 -1
  327. package/dist/cjs/types/declarationContent.cjs.map +0 -1
  328. package/dist/esm/checkIsURLAbsolute.mjs.map +0 -1
  329. package/dist/esm/getHTMLTextDir.mjs.map +0 -1
  330. package/dist/esm/getLocaleLang.mjs.map +0 -1
  331. package/dist/esm/getLocaleName.mjs.map +0 -1
  332. package/dist/esm/getLocalizedUrl.mjs.map +0 -1
  333. package/dist/esm/getMultilingualUrls.mjs.map +0 -1
  334. package/dist/esm/getPathWithoutLocale.mjs.map +0 -1
  335. package/dist/esm/localeDetector.mjs.map +0 -1
  336. package/dist/esm/localeList.mjs.map +0 -1
  337. package/dist/esm/localeNames/ar.mjs.map +0 -1
  338. package/dist/esm/localeNames/du.mjs.map +0 -1
  339. package/dist/esm/localeNames/en.mjs.map +0 -1
  340. package/dist/esm/localeNames/es.mjs.map +0 -1
  341. package/dist/esm/localeNames/fr.mjs.map +0 -1
  342. package/dist/esm/localeNames/hi.mjs.map +0 -1
  343. package/dist/esm/localeNames/it.mjs.map +0 -1
  344. package/dist/esm/localeNames/ja.mjs.map +0 -1
  345. package/dist/esm/localeNames/ko.mjs.map +0 -1
  346. package/dist/esm/localeNames/ownLocalesName.mjs.map +0 -1
  347. package/dist/esm/localeNames/pt.mjs.map +0 -1
  348. package/dist/esm/localeNames/ru.mjs.map +0 -1
  349. package/dist/esm/localeNames/zh.mjs.map +0 -1
  350. package/dist/esm/transpiler/content_transformers/enumeration/enumeration.mjs +0 -19
  351. package/dist/esm/transpiler/content_transformers/enumeration/enumeration.mjs.map +0 -1
  352. package/dist/esm/transpiler/content_transformers/enumeration/findMatchingCondition.mjs.map +0 -1
  353. package/dist/esm/transpiler/content_transformers/enumeration/getEnumerationContent.mjs +0 -9
  354. package/dist/esm/transpiler/content_transformers/enumeration/getEnumerationContent.mjs.map +0 -1
  355. package/dist/esm/transpiler/content_transformers/enumeration/index.mjs +0 -4
  356. package/dist/esm/transpiler/content_transformers/enumeration/index.mjs.map +0 -1
  357. package/dist/esm/transpiler/content_transformers/index.mjs +0 -3
  358. package/dist/esm/transpiler/content_transformers/index.mjs.map +0 -1
  359. package/dist/esm/transpiler/content_transformers/translation/getTranslationContent.mjs +0 -7
  360. package/dist/esm/transpiler/content_transformers/translation/getTranslationContent.mjs.map +0 -1
  361. package/dist/esm/transpiler/content_transformers/translation/index.mjs +0 -4
  362. package/dist/esm/transpiler/content_transformers/translation/index.mjs.map +0 -1
  363. package/dist/esm/transpiler/content_transformers/translation/translation.mjs +0 -23
  364. package/dist/esm/transpiler/content_transformers/translation/translation.mjs.map +0 -1
  365. package/dist/esm/transpiler/content_transformers/translation/types.mjs +0 -5
  366. package/dist/esm/transpiler/content_transformers/translation/types.mjs.map +0 -1
  367. package/dist/esm/types/declarationContent.mjs +0 -1
  368. package/dist/types/checkIsURLAbsolute.d.ts.map +0 -1
  369. package/dist/types/getHTMLTextDir.d.ts.map +0 -1
  370. package/dist/types/getLocaleLang.d.ts.map +0 -1
  371. package/dist/types/getLocaleName.d.ts.map +0 -1
  372. package/dist/types/getLocalizedUrl.d.ts.map +0 -1
  373. package/dist/types/getMultilingualUrls.d.ts.map +0 -1
  374. package/dist/types/getPathWithoutLocale.d.ts.map +0 -1
  375. package/dist/types/localeDetector.d.ts.map +0 -1
  376. package/dist/types/localeList.d.ts.map +0 -1
  377. package/dist/types/localeNames/ar.d.ts.map +0 -1
  378. package/dist/types/localeNames/du.d.ts.map +0 -1
  379. package/dist/types/localeNames/en.d.ts.map +0 -1
  380. package/dist/types/localeNames/es.d.ts.map +0 -1
  381. package/dist/types/localeNames/fr.d.ts.map +0 -1
  382. package/dist/types/localeNames/hi.d.ts.map +0 -1
  383. package/dist/types/localeNames/it.d.ts.map +0 -1
  384. package/dist/types/localeNames/ja.d.ts.map +0 -1
  385. package/dist/types/localeNames/ko.d.ts.map +0 -1
  386. package/dist/types/localeNames/ownLocalesName.d.ts.map +0 -1
  387. package/dist/types/localeNames/pt.d.ts.map +0 -1
  388. package/dist/types/localeNames/ru.d.ts.map +0 -1
  389. package/dist/types/localeNames/zh.d.ts.map +0 -1
  390. package/dist/types/transpiler/content_transformers/enumeration/enumeration.d.ts +0 -38
  391. package/dist/types/transpiler/content_transformers/enumeration/enumeration.d.ts.map +0 -1
  392. package/dist/types/transpiler/content_transformers/enumeration/findMatchingCondition.d.ts +0 -30
  393. package/dist/types/transpiler/content_transformers/enumeration/findMatchingCondition.d.ts.map +0 -1
  394. package/dist/types/transpiler/content_transformers/enumeration/getEnumerationContent.d.ts +0 -29
  395. package/dist/types/transpiler/content_transformers/enumeration/getEnumerationContent.d.ts.map +0 -1
  396. package/dist/types/transpiler/content_transformers/enumeration/index.d.ts +0 -4
  397. package/dist/types/transpiler/content_transformers/enumeration/index.d.ts.map +0 -1
  398. package/dist/types/transpiler/content_transformers/index.d.ts +0 -3
  399. package/dist/types/transpiler/content_transformers/index.d.ts.map +0 -1
  400. package/dist/types/transpiler/content_transformers/translation/getTranslationContent.d.ts.map +0 -1
  401. package/dist/types/transpiler/content_transformers/translation/index.d.ts +0 -4
  402. package/dist/types/transpiler/content_transformers/translation/index.d.ts.map +0 -1
  403. package/dist/types/transpiler/content_transformers/translation/translation.d.ts.map +0 -1
  404. package/dist/types/transpiler/content_transformers/translation/types.d.ts.map +0 -1
  405. package/dist/types/types/declarationContent.d.ts +0 -27
  406. package/dist/types/types/declarationContent.d.ts.map +0 -1
  407. /package/dist/cjs/{getHTMLTextDir.cjs → localization/getHTMLTextDir.cjs} +0 -0
  408. /package/dist/cjs/{getLocaleLang.cjs → localization/getLocaleLang.cjs} +0 -0
  409. /package/dist/cjs/{getLocaleName.cjs → localization/getLocaleName.cjs} +0 -0
  410. /package/dist/cjs/{getLocalizedUrl.cjs → localization/getLocalizedUrl.cjs} +0 -0
  411. /package/dist/cjs/{localeDetector.cjs → localization/localeDetector.cjs} +0 -0
  412. /package/dist/cjs/{localeList.cjs → localization/localeList.cjs} +0 -0
  413. /package/dist/cjs/{localeNames → localization/localeNames}/ar.cjs +0 -0
  414. /package/dist/cjs/{localeNames → localization/localeNames}/du.cjs +0 -0
  415. /package/dist/cjs/{localeNames → localization/localeNames}/en.cjs +0 -0
  416. /package/dist/cjs/{localeNames → localization/localeNames}/es.cjs +0 -0
  417. /package/dist/cjs/{localeNames → localization/localeNames}/fr.cjs +0 -0
  418. /package/dist/cjs/{localeNames → localization/localeNames}/hi.cjs +0 -0
  419. /package/dist/cjs/{localeNames → localization/localeNames}/it.cjs +0 -0
  420. /package/dist/cjs/{localeNames → localization/localeNames}/ja.cjs +0 -0
  421. /package/dist/cjs/{localeNames → localization/localeNames}/ko.cjs +0 -0
  422. /package/dist/cjs/{localeNames → localization/localeNames}/ownLocalesName.cjs +0 -0
  423. /package/dist/cjs/{localeNames → localization/localeNames}/pt.cjs +0 -0
  424. /package/dist/cjs/{localeNames → localization/localeNames}/ru.cjs +0 -0
  425. /package/dist/cjs/{localeNames → localization/localeNames}/zh.cjs +0 -0
  426. /package/dist/cjs/{checkIsURLAbsolute.cjs → utils/checkIsURLAbsolute.cjs} +0 -0
  427. /package/dist/esm/{getHTMLTextDir.mjs → localization/getHTMLTextDir.mjs} +0 -0
  428. /package/dist/esm/{getLocaleLang.mjs → localization/getLocaleLang.mjs} +0 -0
  429. /package/dist/esm/{getLocaleName.mjs → localization/getLocaleName.mjs} +0 -0
  430. /package/dist/esm/{getLocalizedUrl.mjs → localization/getLocalizedUrl.mjs} +0 -0
  431. /package/dist/esm/{localeDetector.mjs → localization/localeDetector.mjs} +0 -0
  432. /package/dist/esm/{localeList.mjs → localization/localeList.mjs} +0 -0
  433. /package/dist/esm/{localeNames → localization/localeNames}/ar.mjs +0 -0
  434. /package/dist/esm/{localeNames → localization/localeNames}/du.mjs +0 -0
  435. /package/dist/esm/{localeNames → localization/localeNames}/en.mjs +0 -0
  436. /package/dist/esm/{localeNames → localization/localeNames}/es.mjs +0 -0
  437. /package/dist/esm/{localeNames → localization/localeNames}/fr.mjs +0 -0
  438. /package/dist/esm/{localeNames → localization/localeNames}/hi.mjs +0 -0
  439. /package/dist/esm/{localeNames → localization/localeNames}/it.mjs +0 -0
  440. /package/dist/esm/{localeNames → localization/localeNames}/ja.mjs +0 -0
  441. /package/dist/esm/{localeNames → localization/localeNames}/ko.mjs +0 -0
  442. /package/dist/esm/{localeNames → localization/localeNames}/ownLocalesName.mjs +0 -0
  443. /package/dist/esm/{localeNames → localization/localeNames}/pt.mjs +0 -0
  444. /package/dist/esm/{localeNames → localization/localeNames}/ru.mjs +0 -0
  445. /package/dist/esm/{localeNames → localization/localeNames}/zh.mjs +0 -0
  446. /package/dist/esm/{types/declarationContent.mjs.map → transpiler/translation/types.mjs.map} +0 -0
  447. /package/dist/esm/{checkIsURLAbsolute.mjs → utils/checkIsURLAbsolute.mjs} +0 -0
  448. /package/dist/types/{localeDetector.d.ts → localization/localeDetector.d.ts} +0 -0
  449. /package/dist/types/{localeList.d.ts → localization/localeList.d.ts} +0 -0
  450. /package/dist/types/{localeNames → localization/localeNames}/ar.d.ts +0 -0
  451. /package/dist/types/{localeNames → localization/localeNames}/du.d.ts +0 -0
  452. /package/dist/types/{localeNames → localization/localeNames}/en.d.ts +0 -0
  453. /package/dist/types/{localeNames → localization/localeNames}/es.d.ts +0 -0
  454. /package/dist/types/{localeNames → localization/localeNames}/fr.d.ts +0 -0
  455. /package/dist/types/{localeNames → localization/localeNames}/hi.d.ts +0 -0
  456. /package/dist/types/{localeNames → localization/localeNames}/it.d.ts +0 -0
  457. /package/dist/types/{localeNames → localization/localeNames}/ja.d.ts +0 -0
  458. /package/dist/types/{localeNames → localization/localeNames}/ko.d.ts +0 -0
  459. /package/dist/types/{localeNames → localization/localeNames}/ownLocalesName.d.ts +0 -0
  460. /package/dist/types/{localeNames → localization/localeNames}/pt.d.ts +0 -0
  461. /package/dist/types/{localeNames → localization/localeNames}/ru.d.ts +0 -0
  462. /package/dist/types/{localeNames → localization/localeNames}/zh.d.ts +0 -0
  463. /package/dist/types/{checkIsURLAbsolute.d.ts → utils/checkIsURLAbsolute.d.ts} +0 -0
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var editDictionaryByKeyPath_exports = {};
20
+ __export(editDictionaryByKeyPath_exports, {
21
+ editDictionaryByKeyPath: () => editDictionaryByKeyPath
22
+ });
23
+ module.exports = __toCommonJS(editDictionaryByKeyPath_exports);
24
+ var import_types = require('../types/index.cjs');
25
+ const editDictionaryByKeyPath = (dictionaryContent, keyPath, newValue) => {
26
+ let currentValue = dictionaryContent;
27
+ let parentValue = null;
28
+ let lastKeys = [];
29
+ for (const keyObj of keyPath) {
30
+ parentValue = currentValue;
31
+ if (keyObj.type === import_types.NodeType.Object) {
32
+ lastKeys = [keyObj.key];
33
+ if (!currentValue[keyObj.key]) {
34
+ currentValue = {
35
+ ...currentValue,
36
+ [keyObj.key]: {}
37
+ };
38
+ }
39
+ currentValue = currentValue[keyObj.key];
40
+ } else if (keyObj.type === import_types.NodeType.Array) {
41
+ lastKeys = [keyObj.key];
42
+ if (!currentValue[keyObj.key]) {
43
+ currentValue[keyObj.key] = {};
44
+ }
45
+ currentValue = currentValue[keyObj.key];
46
+ } else if (keyObj.type === import_types.NodeType.Translation) {
47
+ lastKeys = [import_types.NodeType.Translation, keyObj.key];
48
+ if (!currentValue[import_types.NodeType.Translation]) {
49
+ currentValue[import_types.NodeType.Translation] = {
50
+ ...currentValue[import_types.NodeType.Translation],
51
+ [keyObj.key]: newValue
52
+ };
53
+ }
54
+ currentValue = currentValue[import_types.NodeType.Translation][keyObj.key];
55
+ } else if (keyObj.type === import_types.NodeType.Enumeration) {
56
+ lastKeys = [import_types.NodeType.Enumeration, keyObj.key];
57
+ if (!currentValue[import_types.NodeType.Enumeration]) {
58
+ currentValue[import_types.NodeType.Enumeration] = {
59
+ ...currentValue[import_types.NodeType.Enumeration],
60
+ [keyObj.key]: newValue
61
+ };
62
+ }
63
+ currentValue = currentValue[import_types.NodeType.Enumeration][keyObj.key];
64
+ } else if (keyObj.type === import_types.NodeType.Markdown) {
65
+ lastKeys = [import_types.NodeType.Markdown];
66
+ if (!currentValue[import_types.NodeType.Markdown]) {
67
+ currentValue[import_types.NodeType.Markdown] = newValue;
68
+ }
69
+ currentValue = currentValue[import_types.NodeType.Markdown];
70
+ } else if (keyObj.type === import_types.NodeType.Nested) {
71
+ lastKeys = [import_types.NodeType.Nested];
72
+ if (!currentValue[import_types.NodeType.Nested]) {
73
+ currentValue[import_types.NodeType.Nested] = newValue;
74
+ }
75
+ currentValue = currentValue[import_types.NodeType.Nested];
76
+ }
77
+ if (parentValue && lastKeys.length > 0) {
78
+ for (const key of lastKeys.slice(0, -1)) {
79
+ parentValue = parentValue[key];
80
+ }
81
+ if (
82
+ // Remove the field if the new value is undefined
83
+ typeof newValue === "undefined"
84
+ ) {
85
+ delete parentValue[lastKeys[lastKeys.length - 1]];
86
+ } else {
87
+ parentValue[lastKeys[lastKeys.length - 1]] = newValue;
88
+ }
89
+ }
90
+ }
91
+ return dictionaryContent;
92
+ };
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ editDictionaryByKeyPath
96
+ });
97
+ //# sourceMappingURL=editDictionaryByKeyPath.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/editDictionaryByKeyPath.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[],\n newValue: ContentNode\n): ContentNode => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue = {\n ...currentValue,\n [keyObj.key]: {},\n };\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n\n if (!currentValue[keyObj.key]) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKeys = [NodeType.Translation, keyObj.key];\n\n if (!currentValue[NodeType.Translation]) {\n currentValue[NodeType.Translation] = {\n ...currentValue[NodeType.Translation],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKeys = [NodeType.Enumeration, keyObj.key];\n\n if (!currentValue[NodeType.Enumeration]) {\n currentValue[NodeType.Enumeration] = {\n ...currentValue[NodeType.Enumeration],\n [keyObj.key]: newValue,\n };\n }\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n } else if (keyObj.type === NodeType.Markdown) {\n lastKeys = [NodeType.Markdown];\n if (!currentValue[NodeType.Markdown]) {\n currentValue[NodeType.Markdown] = newValue;\n }\n currentValue = currentValue[NodeType.Markdown];\n } else if (keyObj.type === NodeType.Nested) {\n lastKeys = [NodeType.Nested];\n if (!currentValue[NodeType.Nested]) {\n currentValue[NodeType.Nested] = newValue;\n }\n currentValue = currentValue[NodeType.Nested];\n }\n\n // Assign the new value to the last key of the parent\n if (parentValue && lastKeys.length > 0) {\n for (const key of lastKeys.slice(0, -1)) {\n parentValue = parentValue[key];\n }\n if (\n // Remove the field if the new value is undefined\n typeof newValue === 'undefined'\n ) {\n delete parentValue[lastKeys[lastKeys.length - 1]];\n } else {\n parentValue[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n }\n return dictionaryContent;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAuC;AAKhC,MAAM,0BAA0B,CACrC,mBACA,SACA,aACgB;AAChB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,WAA0B,CAAC;AAE/B,aAAW,UAAU,SAAS;AAC5B,kBAAc;AAEd,QAAI,OAAO,SAAS,sBAAS,QAAQ;AACnC,iBAAW,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AAC7B,uBAAe;AAAA,UACb,GAAG;AAAA,UACH,CAAC,OAAO,GAAG,GAAG,CAAC;AAAA,QACjB;AAAA,MACF;AACA,qBAAe,aAAa,OAAO,GAAG;AAAA,IACxC,WAAW,OAAO,SAAS,sBAAS,OAAO;AACzC,iBAAW,CAAC,OAAO,GAAG;AAEtB,UAAI,CAAC,aAAa,OAAO,GAAG,GAAG;AAC7B,qBAAa,OAAO,GAAG,IAAI,CAAC;AAAA,MAC9B;AACA,qBAAe,aAAa,OAAO,GAAG;AAAA,IACxC,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,iBAAW,CAAC,sBAAS,aAAa,OAAO,GAAG;AAE5C,UAAI,CAAC,aAAa,sBAAS,WAAW,GAAG;AACvC,qBAAa,sBAAS,WAAW,IAAI;AAAA,UACnC,GAAG,aAAa,sBAAS,WAAW;AAAA,UACpC,CAAC,OAAO,GAAG,GAAG;AAAA,QAChB;AAAA,MACF;AACA,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,iBAAW,CAAC,sBAAS,aAAa,OAAO,GAAG;AAE5C,UAAI,CAAC,aAAa,sBAAS,WAAW,GAAG;AACvC,qBAAa,sBAAS,WAAW,IAAI;AAAA,UACnC,GAAG,aAAa,sBAAS,WAAW;AAAA,UACpC,CAAC,OAAO,GAAG,GAAG;AAAA,QAChB;AAAA,MACF;AACA,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,UAAU;AAC5C,iBAAW,CAAC,sBAAS,QAAQ;AAC7B,UAAI,CAAC,aAAa,sBAAS,QAAQ,GAAG;AACpC,qBAAa,sBAAS,QAAQ,IAAI;AAAA,MACpC;AACA,qBAAe,aAAa,sBAAS,QAAQ;AAAA,IAC/C,WAAW,OAAO,SAAS,sBAAS,QAAQ;AAC1C,iBAAW,CAAC,sBAAS,MAAM;AAC3B,UAAI,CAAC,aAAa,sBAAS,MAAM,GAAG;AAClC,qBAAa,sBAAS,MAAM,IAAI;AAAA,MAClC;AACA,qBAAe,aAAa,sBAAS,MAAM;AAAA,IAC7C;AAGA,QAAI,eAAe,SAAS,SAAS,GAAG;AACtC,iBAAW,OAAO,SAAS,MAAM,GAAG,EAAE,GAAG;AACvC,sBAAc,YAAY,GAAG;AAAA,MAC/B;AACA;AAAA;AAAA,QAEE,OAAO,aAAa;AAAA,QACpB;AACA,eAAO,YAAY,SAAS,SAAS,SAAS,CAAC,CAAC;AAAA,MAClD,OAAO;AACL,oBAAY,SAAS,SAAS,SAAS,CAAC,CAAC,IAAI;AAAA,MAC/C;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var getContentNodeByKeyPath_exports = {};
20
+ __export(getContentNodeByKeyPath_exports, {
21
+ getContentNodeByKeyPath: () => getContentNodeByKeyPath
22
+ });
23
+ module.exports = __toCommonJS(getContentNodeByKeyPath_exports);
24
+ var import_types = require('../types/index.cjs');
25
+ const getContentNodeByKeyPath = (dictionaryContent, keyPath) => {
26
+ let currentValue = JSON.parse(JSON.stringify(dictionaryContent ?? {}));
27
+ for (const keyObj of keyPath) {
28
+ if (keyObj.type === import_types.NodeType.Object || keyObj.type === import_types.NodeType.Array) {
29
+ currentValue = currentValue?.[keyObj.key];
30
+ } else if (keyObj.type === import_types.NodeType.Translation) {
31
+ currentValue = currentValue?.[import_types.NodeType.Translation][keyObj.key];
32
+ } else if (keyObj.type === import_types.NodeType.Enumeration) {
33
+ currentValue = currentValue?.[import_types.NodeType.Enumeration][keyObj.key];
34
+ } else if (keyObj.type === import_types.NodeType.Condition) {
35
+ currentValue = currentValue[import_types.NodeType.Condition];
36
+ } else if (keyObj.type === import_types.NodeType.Markdown) {
37
+ currentValue = currentValue[import_types.NodeType.Markdown];
38
+ }
39
+ }
40
+ return currentValue;
41
+ };
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ getContentNodeByKeyPath
45
+ });
46
+ //# sourceMappingURL=getContentNodeByKeyPath.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/getContentNodeByKeyPath.ts"],"sourcesContent":["import { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\nexport const getContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[]\n): ContentNode => {\n let currentValue: any = JSON.parse(JSON.stringify(dictionaryContent ?? {}));\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n currentValue = currentValue?.[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n currentValue = currentValue?.[NodeType.Enumeration][keyObj.key];\n } else if (keyObj.type === NodeType.Condition) {\n currentValue = currentValue[NodeType.Condition];\n } else if (keyObj.type === NodeType.Markdown) {\n currentValue = currentValue[NodeType.Markdown];\n }\n }\n\n return currentValue as ContentNode;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAGhC,MAAM,0BAA0B,CACrC,mBACA,YACgB;AAChB,MAAI,eAAoB,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAC,CAAC,CAAC;AAE1E,aAAW,UAAU,SAAS;AAC5B,QAAI,OAAO,SAAS,sBAAS,UAAU,OAAO,SAAS,sBAAS,OAAO;AACrE,qBAAe,eAAe,OAAO,GAAG;AAAA,IAC1C,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,qBAAe,eAAe,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAChE,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,qBAAe,eAAe,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAChE,WAAW,OAAO,SAAS,sBAAS,WAAW;AAC7C,qBAAe,aAAa,sBAAS,SAAS;AAAA,IAChD,WAAW,OAAO,SAAS,sBAAS,UAAU;AAC5C,qBAAe,aAAa,sBAAS,QAAQ;AAAA,IAC/C;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var getSectionType_exports = {};
20
+ __export(getSectionType_exports, {
21
+ getSectionType: () => getSectionType
22
+ });
23
+ module.exports = __toCommonJS(getSectionType_exports);
24
+ var import_types = require('../types/index.cjs');
25
+ var import_isValidReactElement = require('../utils/isValidReactElement.cjs');
26
+ const getSectionType = (section) => {
27
+ if (typeof section === "string") {
28
+ return import_types.NodeType.Text;
29
+ }
30
+ if (section?.nodeType === import_types.NodeType.Translation) {
31
+ return import_types.NodeType.Translation;
32
+ }
33
+ if (section?.nodeType === import_types.NodeType.Enumeration) {
34
+ return import_types.NodeType.Enumeration;
35
+ }
36
+ if (section?.nodeType === import_types.NodeType.Condition) {
37
+ return import_types.NodeType.Condition;
38
+ }
39
+ if (section?.nodeType === import_types.NodeType.Markdown) {
40
+ return import_types.NodeType.Markdown;
41
+ }
42
+ if (section?.nodeType === import_types.NodeType.Nested) {
43
+ return import_types.NodeType.Nested;
44
+ }
45
+ if (Array.isArray(section)) {
46
+ return import_types.NodeType.Array;
47
+ }
48
+ if ((0, import_isValidReactElement.isValidElement)(section)) {
49
+ return import_types.NodeType.ReactNode;
50
+ }
51
+ return import_types.NodeType.Object;
52
+ };
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
55
+ getSectionType
56
+ });
57
+ //# sourceMappingURL=getSectionType.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/getSectionType.ts"],"sourcesContent":["import type {\n TranslationContent,\n EnumerationContent,\n ConditionContent,\n MarkdownContent,\n NestedContent,\n} from '../transpiler';\nimport { NodeType, type DictionaryKeys } from '../types';\nimport type { ContentNode } from '../types/dictionary';\nimport { isValidElement } from '../utils/isValidReactElement';\n\nexport const getSectionType = (section: ContentNode): NodeType => {\n if (typeof section === 'string') {\n return NodeType.Text;\n }\n\n if (\n (section as TranslationContent<unknown>)?.nodeType === NodeType.Translation\n ) {\n return NodeType.Translation;\n }\n\n if (\n (section as EnumerationContent<unknown>)?.nodeType === NodeType.Enumeration\n ) {\n return NodeType.Enumeration;\n }\n\n if ((section as ConditionContent<unknown>)?.nodeType === NodeType.Condition) {\n return NodeType.Condition;\n }\n\n if ((section as MarkdownContent)?.nodeType === NodeType.Markdown) {\n return NodeType.Markdown;\n }\n\n if (\n (section as NestedContent<DictionaryKeys>)?.nodeType === NodeType.Nested\n ) {\n return NodeType.Nested;\n }\n\n if (Array.isArray(section)) {\n return NodeType.Array;\n }\n\n if (isValidElement(section)) {\n return NodeType.ReactNode;\n }\n\n return NodeType.Object;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,mBAA8C;AAE9C,iCAA+B;AAExB,MAAM,iBAAiB,CAAC,YAAmC;AAChE,MAAI,OAAO,YAAY,UAAU;AAC/B,WAAO,sBAAS;AAAA,EAClB;AAEA,MACG,SAAyC,aAAa,sBAAS,aAChE;AACA,WAAO,sBAAS;AAAA,EAClB;AAEA,MACG,SAAyC,aAAa,sBAAS,aAChE;AACA,WAAO,sBAAS;AAAA,EAClB;AAEA,MAAK,SAAuC,aAAa,sBAAS,WAAW;AAC3E,WAAO,sBAAS;AAAA,EAClB;AAEA,MAAK,SAA6B,aAAa,sBAAS,UAAU;AAChE,WAAO,sBAAS;AAAA,EAClB;AAEA,MACG,SAA2C,aAAa,sBAAS,QAClE;AACA,WAAO,sBAAS;AAAA,EAClB;AAEA,MAAI,MAAM,QAAQ,OAAO,GAAG;AAC1B,WAAO,sBAAS;AAAA,EAClB;AAEA,UAAI,2CAAe,OAAO,GAAG;AAC3B,WAAO,sBAAS;AAAA,EAClB;AAEA,SAAO,sBAAS;AAClB;","names":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var dictionaryManipulator_exports = {};
17
+ module.exports = __toCommonJS(dictionaryManipulator_exports);
18
+ __reExport(dictionaryManipulator_exports, require('./editDictionaryByKeyPath.cjs'), module.exports);
19
+ __reExport(dictionaryManipulator_exports, require('./getContentNodeByKeyPath.cjs'), module.exports);
20
+ __reExport(dictionaryManipulator_exports, require('./getSectionType.cjs'), module.exports);
21
+ __reExport(dictionaryManipulator_exports, require('./removeContentNodeByKeyPath.cjs'), module.exports);
22
+ __reExport(dictionaryManipulator_exports, require('./renameContentNodeByKeyPath.cjs'), module.exports);
23
+ // Annotate the CommonJS export names for ESM import in node:
24
+ 0 && (module.exports = {
25
+ ...require('./editDictionaryByKeyPath.cjs'),
26
+ ...require('./getContentNodeByKeyPath.cjs'),
27
+ ...require('./getSectionType.cjs'),
28
+ ...require('./removeContentNodeByKeyPath.cjs'),
29
+ ...require('./renameContentNodeByKeyPath.cjs')
30
+ });
31
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/index.ts"],"sourcesContent":["export * from './editDictionaryByKeyPath';\nexport * from './getContentNodeByKeyPath';\nexport * from './getSectionType';\nexport * from './removeContentNodeByKeyPath';\nexport * from './renameContentNodeByKeyPath';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0CAAc,sCAAd;AACA,0CAAc,sCADd;AAEA,0CAAc,6BAFd;AAGA,0CAAc,yCAHd;AAIA,0CAAc,yCAJd;","names":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var removeContentNodeByKeyPath_exports = {};
20
+ __export(removeContentNodeByKeyPath_exports, {
21
+ removeContentNodeByKeyPath: () => removeContentNodeByKeyPath
22
+ });
23
+ module.exports = __toCommonJS(removeContentNodeByKeyPath_exports);
24
+ var import_types = require('../types/index.cjs');
25
+ const removeContentNodeByKeyPath = (dictionaryContent, keyPath) => {
26
+ let currentValue = dictionaryContent;
27
+ let parentValue = null;
28
+ let lastKey = null;
29
+ for (const keyObj of keyPath) {
30
+ parentValue = currentValue;
31
+ if (keyObj.type === import_types.NodeType.Object || keyObj.type === import_types.NodeType.Array) {
32
+ lastKey = keyObj.key;
33
+ currentValue = currentValue[keyObj.key];
34
+ } else if (keyObj.type === import_types.NodeType.Translation) {
35
+ lastKey = import_types.NodeType.Translation;
36
+ currentValue = currentValue[import_types.NodeType.Translation][keyObj.key];
37
+ } else if (keyObj.type === import_types.NodeType.Enumeration) {
38
+ lastKey = import_types.NodeType.Enumeration;
39
+ currentValue = currentValue[import_types.NodeType.Enumeration][keyObj.key];
40
+ } else if (keyObj.type === import_types.NodeType.Condition) {
41
+ lastKey = import_types.NodeType.Condition;
42
+ currentValue = currentValue[import_types.NodeType.Condition];
43
+ } else if (keyObj.type === import_types.NodeType.Markdown) {
44
+ lastKey = import_types.NodeType.Markdown;
45
+ currentValue = currentValue[import_types.NodeType.Markdown];
46
+ } else if (keyObj.type === import_types.NodeType.ReactNode) {
47
+ lastKey = import_types.NodeType.ReactNode;
48
+ currentValue = currentValue[import_types.NodeType.ReactNode];
49
+ }
50
+ }
51
+ if (parentValue && lastKey !== null) {
52
+ if (Array.isArray(parentValue)) {
53
+ parentValue.splice(lastKey, 1);
54
+ } else {
55
+ delete parentValue[lastKey];
56
+ }
57
+ }
58
+ return dictionaryContent;
59
+ };
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ removeContentNodeByKeyPath
63
+ });
64
+ //# sourceMappingURL=removeContentNodeByKeyPath.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/removeContentNodeByKeyPath.ts"],"sourcesContent":["import { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\nexport const removeContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[]\n): ContentNode => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n } else if (keyObj.type === NodeType.Condition) {\n lastKey = NodeType.Condition;\n currentValue = currentValue[NodeType.Condition];\n } else if (keyObj.type === NodeType.Markdown) {\n lastKey = NodeType.Markdown;\n currentValue = currentValue[NodeType.Markdown];\n } else if (keyObj.type === NodeType.ReactNode) {\n lastKey = NodeType.ReactNode;\n currentValue = currentValue[NodeType.ReactNode];\n }\n }\n\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue.splice(lastKey as unknown as number, 1);\n } else {\n delete parentValue[lastKey];\n }\n }\n\n return dictionaryContent;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAGhC,MAAM,6BAA6B,CACxC,mBACA,YACgB;AAChB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,UAAkC;AAEtC,aAAW,UAAU,SAAS;AAC5B,kBAAc;AAEd,QAAI,OAAO,SAAS,sBAAS,UAAU,OAAO,SAAS,sBAAS,OAAO;AACrE,gBAAU,OAAO;AACjB,qBAAe,aAAa,OAAO,GAAG;AAAA,IACxC,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,WAAW;AAC7C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,SAAS;AAAA,IAChD,WAAW,OAAO,SAAS,sBAAS,UAAU;AAC5C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,QAAQ;AAAA,IAC/C,WAAW,OAAO,SAAS,sBAAS,WAAW;AAC7C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,SAAS;AAAA,IAChD;AAAA,EACF;AAEA,MAAI,eAAe,YAAY,MAAM;AACnC,QAAI,MAAM,QAAQ,WAAW,GAAG;AAC9B,kBAAY,OAAO,SAA8B,CAAC;AAAA,IACpD,OAAO;AACL,aAAO,YAAY,OAAO;AAAA,IAC5B;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var renameContentNodeByKeyPath_exports = {};
20
+ __export(renameContentNodeByKeyPath_exports, {
21
+ renameContentNodeByKeyPath: () => renameContentNodeByKeyPath
22
+ });
23
+ module.exports = __toCommonJS(renameContentNodeByKeyPath_exports);
24
+ var import_types = require('../types/index.cjs');
25
+ const renameContentNodeByKeyPath = (dictionaryContent, newKey, keyPath) => {
26
+ let currentValue = dictionaryContent;
27
+ let parentValue = null;
28
+ let lastKey = null;
29
+ for (const keyObj of keyPath) {
30
+ parentValue = currentValue;
31
+ if (keyObj.type === import_types.NodeType.Object || keyObj.type === import_types.NodeType.Array) {
32
+ lastKey = keyObj.key;
33
+ currentValue = currentValue[keyObj.key];
34
+ } else if (keyObj.type === import_types.NodeType.Translation) {
35
+ lastKey = import_types.NodeType.Translation;
36
+ currentValue = currentValue[import_types.NodeType.Translation][keyObj.key];
37
+ } else if (keyObj.type === import_types.NodeType.Enumeration) {
38
+ lastKey = import_types.NodeType.Enumeration;
39
+ currentValue = currentValue[import_types.NodeType.Enumeration][keyObj.key];
40
+ } else if (keyObj.type === import_types.NodeType.Condition) {
41
+ lastKey = import_types.NodeType.Condition;
42
+ currentValue = currentValue[import_types.NodeType.Condition];
43
+ } else if (keyObj.type === import_types.NodeType.Markdown) {
44
+ lastKey = import_types.NodeType.Markdown;
45
+ currentValue = currentValue[import_types.NodeType.Markdown];
46
+ } else if (keyObj.type === import_types.NodeType.ReactNode) {
47
+ lastKey = import_types.NodeType.ReactNode;
48
+ currentValue = currentValue[import_types.NodeType.ReactNode];
49
+ }
50
+ }
51
+ if (parentValue && lastKey !== null) {
52
+ if (Array.isArray(parentValue)) {
53
+ parentValue[lastKey] = currentValue;
54
+ } else {
55
+ const newParentValue = {};
56
+ for (const key of Object.keys(parentValue)) {
57
+ if (key === lastKey && typeof newKey !== "undefined") {
58
+ newParentValue[newKey] = currentValue;
59
+ } else {
60
+ newParentValue[key] = parentValue[key];
61
+ }
62
+ }
63
+ Object.keys(parentValue).forEach((key) => delete parentValue[key]);
64
+ Object.assign(parentValue, newParentValue);
65
+ }
66
+ }
67
+ return dictionaryContent;
68
+ };
69
+ // Annotate the CommonJS export names for ESM import in node:
70
+ 0 && (module.exports = {
71
+ renameContentNodeByKeyPath
72
+ });
73
+ //# sourceMappingURL=renameContentNodeByKeyPath.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dictionaryManipulator/renameContentNodeByKeyPath.ts"],"sourcesContent":["import { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\nexport const renameContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n newKey: KeyPath['key'],\n keyPath: KeyPath[]\n): ContentNode => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKey: string | number | null = null;\n\n for (const keyObj of keyPath) {\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKey = keyObj.key;\n currentValue = currentValue[keyObj.key];\n } else if (keyObj.type === NodeType.Translation) {\n lastKey = NodeType.Translation;\n currentValue = currentValue[NodeType.Translation][keyObj.key];\n } else if (keyObj.type === NodeType.Enumeration) {\n lastKey = NodeType.Enumeration;\n currentValue = currentValue[NodeType.Enumeration][keyObj.key];\n } else if (keyObj.type === NodeType.Condition) {\n lastKey = NodeType.Condition;\n currentValue = currentValue[NodeType.Condition];\n } else if (keyObj.type === NodeType.Markdown) {\n lastKey = NodeType.Markdown;\n currentValue = currentValue[NodeType.Markdown];\n } else if (keyObj.type === NodeType.ReactNode) {\n lastKey = NodeType.ReactNode;\n currentValue = currentValue[NodeType.ReactNode];\n }\n }\n\n // Assign the new value to the last key of the parent while preserving the order\n if (parentValue && lastKey !== null) {\n if (Array.isArray(parentValue)) {\n parentValue[lastKey as number] = currentValue;\n } else {\n const newParentValue: any = {};\n for (const key of Object.keys(parentValue)) {\n if (key === lastKey && typeof newKey !== 'undefined') {\n newParentValue[newKey] = currentValue;\n } else {\n newParentValue[key] = parentValue[key];\n }\n }\n // Replace the contents of parentValue with newParentValue\n Object.keys(parentValue).forEach((key) => delete parentValue[key]);\n Object.assign(parentValue, newParentValue);\n }\n }\n\n return dictionaryContent;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAGhC,MAAM,6BAA6B,CACxC,mBACA,QACA,YACgB;AAChB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,UAAkC;AAEtC,aAAW,UAAU,SAAS;AAC5B,kBAAc;AAEd,QAAI,OAAO,SAAS,sBAAS,UAAU,OAAO,SAAS,sBAAS,OAAO;AACrE,gBAAU,OAAO;AACjB,qBAAe,aAAa,OAAO,GAAG;AAAA,IACxC,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,aAAa;AAC/C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,WAAW,EAAE,OAAO,GAAG;AAAA,IAC9D,WAAW,OAAO,SAAS,sBAAS,WAAW;AAC7C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,SAAS;AAAA,IAChD,WAAW,OAAO,SAAS,sBAAS,UAAU;AAC5C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,QAAQ;AAAA,IAC/C,WAAW,OAAO,SAAS,sBAAS,WAAW;AAC7C,gBAAU,sBAAS;AACnB,qBAAe,aAAa,sBAAS,SAAS;AAAA,IAChD;AAAA,EACF;AAGA,MAAI,eAAe,YAAY,MAAM;AACnC,QAAI,MAAM,QAAQ,WAAW,GAAG;AAC9B,kBAAY,OAAiB,IAAI;AAAA,IACnC,OAAO;AACL,YAAM,iBAAsB,CAAC;AAC7B,iBAAW,OAAO,OAAO,KAAK,WAAW,GAAG;AAC1C,YAAI,QAAQ,WAAW,OAAO,WAAW,aAAa;AACpD,yBAAe,MAAM,IAAI;AAAA,QAC3B,OAAO;AACL,yBAAe,GAAG,IAAI,YAAY,GAAG;AAAA,QACvC;AAAA,MACF;AAEA,aAAO,KAAK,WAAW,EAAE,QAAQ,CAAC,QAAQ,OAAO,YAAY,GAAG,CAAC;AACjE,aAAO,OAAO,aAAa,cAAc;AAAA,IAC3C;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
6
  var __copyProps = (to, from, except, desc) => {
11
7
  if (from && typeof from === "object" || typeof from === "function") {
12
8
  for (let key of __getOwnPropNames(from))
@@ -15,53 +11,27 @@ var __copyProps = (to, from, except, desc) => {
15
11
  }
16
12
  return to;
17
13
  };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
16
  var index_exports = {};
20
- __export(index_exports, {
21
- NodeType: () => import_types.NodeType,
22
- enu: () => import_content_transformers.enu,
23
- findMatchingCondition: () => import_content_transformers.findMatchingCondition,
24
- getEnumerationContent: () => import_content_transformers.getEnumerationContent,
25
- getHTMLTextDir: () => import_getHTMLTextDir.getHTMLTextDir,
26
- getLocaleLang: () => import_getLocaleLang.getLocaleLang,
27
- getLocaleName: () => import_getLocaleName.getLocaleName,
28
- getLocalizedUrl: () => import_getLocalizedUrl.getLocalizedUrl,
29
- getMultilingualUrls: () => import_getMultilingualUrls.getMultilingualUrls,
30
- getPathWithoutLocale: () => import_getPathWithoutLocale.getPathWithoutLocale,
31
- getTranslationContent: () => import_content_transformers.getTranslationContent,
32
- isSameKeyPath: () => import_isSameKeyPath.isSameKeyPath,
33
- localeDetector: () => import_localeDetector.localeDetector,
34
- localeList: () => import_localeList.localeList,
35
- t: () => import_content_transformers.t
36
- });
37
17
  module.exports = __toCommonJS(index_exports);
38
- var import_content_transformers = require('./transpiler/content_transformers/index.cjs');
39
- var import_types = require('./types/index.cjs');
40
- var import_getLocaleName = require('./getLocaleName.cjs');
41
- var import_getHTMLTextDir = require('./getHTMLTextDir.cjs');
42
- var import_getLocaleLang = require('./getLocaleLang.cjs');
43
- var import_localeList = require('./localeList.cjs');
44
- var import_isSameKeyPath = require('./utils/isSameKeyPath.cjs');
45
- var import_localeDetector = require('./localeDetector.cjs');
46
- var import_getPathWithoutLocale = require('./getPathWithoutLocale.cjs');
47
- var import_getMultilingualUrls = require('./getMultilingualUrls.cjs');
48
- var import_getLocalizedUrl = require('./getLocalizedUrl.cjs');
18
+ __reExport(index_exports, require('./transpiler/index.cjs'), module.exports);
19
+ __reExport(index_exports, require('./interpreter/index.cjs'), module.exports);
20
+ __reExport(index_exports, require('./dictionaryManipulator/index.cjs'), module.exports);
21
+ __reExport(index_exports, require('./types/index.cjs'), module.exports);
22
+ __reExport(index_exports, require('./utils/isSameKeyPath.cjs'), module.exports);
23
+ __reExport(index_exports, require('./utils/checkIsURLAbsolute.cjs'), module.exports);
24
+ __reExport(index_exports, require('./utils/isValidReactElement.cjs'), module.exports);
25
+ __reExport(index_exports, require('./localization/index.cjs'), module.exports);
49
26
  // Annotate the CommonJS export names for ESM import in node:
50
27
  0 && (module.exports = {
51
- NodeType,
52
- enu,
53
- findMatchingCondition,
54
- getEnumerationContent,
55
- getHTMLTextDir,
56
- getLocaleLang,
57
- getLocaleName,
58
- getLocalizedUrl,
59
- getMultilingualUrls,
60
- getPathWithoutLocale,
61
- getTranslationContent,
62
- isSameKeyPath,
63
- localeDetector,
64
- localeList,
65
- t
28
+ ...require('./transpiler/index.cjs'),
29
+ ...require('./interpreter/index.cjs'),
30
+ ...require('./dictionaryManipulator/index.cjs'),
31
+ ...require('./types/index.cjs'),
32
+ ...require('./utils/isSameKeyPath.cjs'),
33
+ ...require('./utils/checkIsURLAbsolute.cjs'),
34
+ ...require('./utils/isValidReactElement.cjs'),
35
+ ...require('./localization/index.cjs')
66
36
  });
67
37
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export type {\n CustomizableLanguageContent,\n LanguageContent,\n TranslationContent,\n EnumerationContent,\n QuantityContent,\n CustomLocales as Locales,\n} from './transpiler/content_transformers/index';\nexport {\n t,\n enu,\n getTranslationContent,\n findMatchingCondition,\n getEnumerationContent,\n} from './transpiler/content_transformers/index';\nexport type {\n ContentValue,\n Content,\n FlatContentValue,\n FlatContent,\n TypedNode,\n DeclarationContent,\n KeyPath,\n ObjectNode,\n ArrayNode,\n RecursiveDictionaryValue,\n TranslationNode,\n EnumerationNode,\n DictionaryValue,\n Dictionary,\n} from './types/index';\nexport { NodeType } from './types/index';\nexport { getLocaleName } from './getLocaleName';\nexport { getHTMLTextDir } from './getHTMLTextDir';\nexport { getLocaleLang } from './getLocaleLang';\nexport { localeList } from './localeList';\nexport { isSameKeyPath } from './utils/isSameKeyPath';\nexport { localeDetector } from './localeDetector';\nexport { getPathWithoutLocale } from './getPathWithoutLocale';\nexport { getMultilingualUrls } from './getMultilingualUrls';\nexport { getLocalizedUrl } from './getLocalizedUrl';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,kCAMO;AAiBP,mBAAyB;AACzB,2BAA8B;AAC9B,4BAA+B;AAC/B,2BAA8B;AAC9B,wBAA2B;AAC3B,2BAA8B;AAC9B,4BAA+B;AAC/B,kCAAqC;AACrC,iCAAoC;AACpC,6BAAgC;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './transpiler/index';\nexport * from './interpreter/index';\nexport * from './dictionaryManipulator/index';\nexport * from './types/index';\nexport * from './utils/isSameKeyPath';\nexport * from './utils/checkIsURLAbsolute';\nexport * from './utils/isValidReactElement';\nexport * from './localization/index';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,+BAAd;AACA,0BAAc,gCADd;AAEA,0BAAc,0CAFd;AAGA,0BAAc,0BAHd;AAIA,0BAAc,kCAJd;AAKA,0BAAc,uCALd;AAMA,0BAAc,wCANd;AAOA,0BAAc,iCAPd;","names":[]}
@@ -16,18 +16,18 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var getEnumerationContent_exports = {};
20
- __export(getEnumerationContent_exports, {
21
- getEnumerationContent: () => getEnumerationContent
19
+ var getCondition_exports = {};
20
+ __export(getCondition_exports, {
21
+ getCondition: () => getCondition
22
22
  });
23
- module.exports = __toCommonJS(getEnumerationContent_exports);
24
- var import_findMatchingCondition = require('./findMatchingCondition.cjs');
25
- const getEnumerationContent = (enumerationContent, quantity) => {
26
- const key = (0, import_findMatchingCondition.findMatchingCondition)(enumerationContent, quantity);
27
- return enumerationContent[key];
23
+ module.exports = __toCommonJS(getCondition_exports);
24
+ const getCondition = (conditionContent, state) => {
25
+ const stateList = Object.keys(conditionContent);
26
+ const fallbackState = stateList[stateList.length - 1];
27
+ return conditionContent[`${state}`] ?? conditionContent["fallback"] ?? conditionContent[fallbackState];
28
28
  };
29
29
  // Annotate the CommonJS export names for ESM import in node:
30
30
  0 && (module.exports = {
31
- getEnumerationContent
31
+ getCondition
32
32
  });
33
- //# sourceMappingURL=getEnumerationContent.cjs.map
33
+ //# sourceMappingURL=getCondition.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/interpreter/getCondition.ts"],"sourcesContent":["import type { ConditionContentStates } from '../transpiler/condition/condition';\n\n/**\n * Allow to pick a content based on a condition.\n *\n * Usage:\n *\n * ```ts\n * const content = getCondition({\n * 'true': 'The condition is validated',\n * 'false': 'The condition is not validated',\n * }, true);\n * // 'The condition is validated'\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n * ```ts\n * const content = getCondition({\n * 'false': 'The condition is not validated',\n * 'true': 'The condition is validated',\n * }, undefined);\n * // 'The condition is validated'\n */\nexport const getCondition = <Content>(\n conditionContent: ConditionContentStates<Content>,\n state?: boolean\n): Content => {\n const stateList = Object.keys(conditionContent);\n const fallbackState = stateList[\n stateList.length - 1\n ] as keyof typeof conditionContent;\n\n // Default or error handling if no keys match\n return (\n conditionContent[`${state}` as keyof typeof conditionContent] ??\n conditionContent['fallback'] ??\n (conditionContent[fallbackState] as Content)\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBO,MAAM,eAAe,CAC1B,kBACA,UACY;AACZ,QAAM,YAAY,OAAO,KAAK,gBAAgB;AAC9C,QAAM,gBAAgB,UACpB,UAAU,SAAS,CACrB;AAGA,SACE,iBAAiB,GAAG,KAAK,EAAmC,KAC5D,iBAAiB,UAAU,KAC1B,iBAAiB,aAAa;AAEnC;","names":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var deepTransform_exports = {};
20
+ __export(deepTransform_exports, {
21
+ deepTransformNode: () => deepTransformNode
22
+ });
23
+ module.exports = __toCommonJS(deepTransform_exports);
24
+ var import_types = require('../../types/index.cjs');
25
+ const deepTransformNode = (node, props) => {
26
+ for (const plugin of props.plugins ?? []) {
27
+ if (plugin.canHandle(node)) {
28
+ return plugin.transform(
29
+ node,
30
+ props,
31
+ (node2, props2) => deepTransformNode(node2, props2)
32
+ );
33
+ }
34
+ }
35
+ if (node === null || typeof node !== "object") {
36
+ return node;
37
+ }
38
+ if (Array.isArray(node)) {
39
+ return node.map((child, index) => {
40
+ const childProps = {
41
+ ...props,
42
+ content: child,
43
+ keyPath: [
44
+ ...props.keyPath,
45
+ { type: import_types.NodeType.Array, key: index }
46
+ ]
47
+ };
48
+ return deepTransformNode(child, childProps);
49
+ });
50
+ }
51
+ const result = {};
52
+ for (const key in node) {
53
+ const childProps = {
54
+ ...props,
55
+ content: node[key],
56
+ keyPath: [...props.keyPath, { type: import_types.NodeType.Object, key }]
57
+ };
58
+ result[key] = deepTransformNode(node[key], childProps);
59
+ }
60
+ return result;
61
+ };
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ deepTransformNode
65
+ });
66
+ //# sourceMappingURL=deepTransform.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/interpreter/getContent/deepTransform.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type KeyPath, NodeType } from '../../types/index';\nimport { NodeProps } from './plugins';\n\n/**\n * Recursively traverses a node (object/array/primitive).\n * Applies the *first* plugin that can transform a node, then stops descending further.\n * If no plugin transforms it, it recurses into its children.\n */\nexport const deepTransformNode = (node: any, props: NodeProps): any => {\n // Otherwise, if it's an object, check if any plugin can handle it:\n for (const plugin of props.plugins ?? []) {\n if (plugin.canHandle(node)) {\n // Return the transformed node => do NOT recurse further\n return plugin.transform(node, props, (node: any, props: any) =>\n deepTransformNode(node, props)\n );\n }\n }\n\n // If it's null/undefined or not an object, just return it directly:\n if (node === null || typeof node !== 'object') {\n return node;\n }\n\n // If it's an array, transform each element:\n if (Array.isArray(node)) {\n return node.map((child, index) => {\n const childProps = {\n ...props,\n content: child,\n keyPath: [\n ...props.keyPath,\n { type: NodeType.Array, key: index } as KeyPath,\n ],\n };\n return deepTransformNode(child, childProps);\n });\n }\n\n // If no plugin transforms it, we keep traversing its properties.\n const result: Record<string, any> = {};\n for (const key in node) {\n const childProps = {\n ...props,\n content: node[key],\n keyPath: [...props.keyPath, { type: NodeType.Object, key } as KeyPath],\n };\n result[key] = deepTransformNode(node[key], childProps);\n }\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAuC;AAQhC,MAAM,oBAAoB,CAAC,MAAW,UAA0B;AAErE,aAAW,UAAU,MAAM,WAAW,CAAC,GAAG;AACxC,QAAI,OAAO,UAAU,IAAI,GAAG;AAE1B,aAAO,OAAO;AAAA,QAAU;AAAA,QAAM;AAAA,QAAO,CAACA,OAAWC,WAC/C,kBAAkBD,OAAMC,MAAK;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AAGA,MAAI,SAAS,QAAQ,OAAO,SAAS,UAAU;AAC7C,WAAO;AAAA,EACT;AAGA,MAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,WAAO,KAAK,IAAI,CAAC,OAAO,UAAU;AAChC,YAAM,aAAa;AAAA,QACjB,GAAG;AAAA,QACH,SAAS;AAAA,QACT,SAAS;AAAA,UACP,GAAG,MAAM;AAAA,UACT,EAAE,MAAM,sBAAS,OAAO,KAAK,MAAM;AAAA,QACrC;AAAA,MACF;AACA,aAAO,kBAAkB,OAAO,UAAU;AAAA,IAC5C,CAAC;AAAA,EACH;AAGA,QAAM,SAA8B,CAAC;AACrC,aAAW,OAAO,MAAM;AACtB,UAAM,aAAa;AAAA,MACjB,GAAG;AAAA,MACH,SAAS,KAAK,GAAG;AAAA,MACjB,SAAS,CAAC,GAAG,MAAM,SAAS,EAAE,MAAM,sBAAS,QAAQ,IAAI,CAAY;AAAA,IACvE;AACA,WAAO,GAAG,IAAI,kBAAkB,KAAK,GAAG,GAAG,UAAU;AAAA,EACvD;AAEA,SAAO;AACT;","names":["node","props"]}