@fink-ui/components 0.0.0-stage → 0.1.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 (1109) hide show
  1. package/LICENSE +287 -0
  2. package/README.md +57 -2
  3. package/dist/cjs/Heading-foerLIu9-QKM3M64_.js +40 -0
  4. package/dist/cjs/access-and-short-key-BTEwnScd-CasZf-uj.js +15 -0
  5. package/dist/cjs/api-Ba9FNPRn-rTHkYZEI.js +434 -0
  6. package/dist/cjs/app-globals-BQaqIleT.js +28 -0
  7. package/dist/cjs/aria-current-service-4eUMzpeO-emhsMPL3.js +30 -0
  8. package/dist/cjs/aria-labelledby-C4wUnR-v-CxE6OTWv.js +31 -0
  9. package/dist/cjs/base-AKIr0rpk-bPbfzUAQ.js +142 -0
  10. package/dist/cjs/base-C7nTPc7u-BhwWFb1q.js +1093 -0
  11. package/dist/cjs/base-CpUNedp9-XUSugrQg.js +165 -0
  12. package/dist/cjs/base-D7qItqyf-BbbOTUbw.js +214 -0
  13. package/dist/cjs/base-web-component-B3wi5eWH-DYRp0_Cp.js +67 -0
  14. package/dist/cjs/base-web-component-BpL_hXcg-Drs4AWKT.js +197 -0
  15. package/dist/cjs/base-web-component-DorOeD_U-DGNc9bak.js +234 -0
  16. package/dist/cjs/behavior-D9BHiFnH-DQyuXsUx.js +224 -0
  17. package/dist/cjs/behavior-DDo87iUM-DfnNkRgJ.js +1909 -0
  18. package/dist/cjs/behavior-XAV9GSxI-DWZGwtl6.js +166 -0
  19. package/dist/cjs/bem-registry-CrZZQahR-Dsn0TBlY.js +619 -0
  20. package/dist/cjs/bootstrap-Cz7Iq2I2-Bcg6Ig6g.js +58 -0
  21. package/dist/cjs/color-CnVBqZd5-Bat4Qm2q.js +60 -0
  22. package/dist/cjs/component-0npqUhj2-qp7pd5wT.js +141 -0
  23. package/dist/cjs/component-BCKsZOoB-D3_uvry6.js +23 -0
  24. package/dist/cjs/component-BZjDp_Lf-85vhAON7.js +20 -0
  25. package/dist/cjs/component-CjdTbGlP-Y_6DLMyJ.js +178 -0
  26. package/dist/cjs/component-Cn693XeT-D2RHI-mG.js +53 -0
  27. package/dist/cjs/component-Cvd5HXbX-D-tGBgwx.js +66 -0
  28. package/dist/cjs/component-CvdxCpjC-A5gOfnw4.js +49 -0
  29. package/dist/cjs/component-DFhRTaqb-CKItH_ej.js +127 -0
  30. package/dist/cjs/component-DP_p5few-B5O6gbGq.js +100 -0
  31. package/dist/cjs/component-DlROeCCe-DPm6I-PP.js +92 -0
  32. package/dist/cjs/component-names-DzmdvSkQ-CGSrl0lP.js +122 -0
  33. package/dist/cjs/contrast-BHjNzQvB-bpMVkXiN.js +67 -0
  34. package/dist/cjs/controller-DYkXzFqc-DWdZzY6f.js +117 -0
  35. package/dist/cjs/dev.utils-BgFDROtc-DkabL34N.js +84 -0
  36. package/dist/cjs/devtools-B6h2bVMJ-CtxQrosK.js +100 -0
  37. package/dist/cjs/disabled-BZIZZ6wy-DIculoOg.js +12 -0
  38. package/dist/cjs/element-focus-C0L8NWU8-C65ZOrOV.js +157 -0
  39. package/dist/cjs/element-interaction-B3GEli6r-ByFTg4X5.js +101 -0
  40. package/dist/cjs/events-DdfMb1U7-CnoJDEJq.js +55 -0
  41. package/dist/cjs/field-control-QF0yTcyb-BkxThVwi.js +31 -0
  42. package/dist/cjs/fink-app-shell.cjs.entry.js +133 -0
  43. package/dist/cjs/fink-avatar-group.cjs.entry.js +62 -0
  44. package/dist/cjs/fink-back-to-top.cjs.entry.js +52 -0
  45. package/dist/cjs/fink-bar-chart.cjs.entry.js +50 -0
  46. package/dist/cjs/fink-bottom-nav.cjs.entry.js +50 -0
  47. package/dist/cjs/fink-calendar.cjs.entry.js +150 -0
  48. package/dist/cjs/fink-carousel.cjs.entry.js +103 -0
  49. package/dist/cjs/fink-chip.cjs.entry.js +76 -0
  50. package/dist/cjs/fink-code-block.cjs.entry.js +171 -0
  51. package/dist/cjs/fink-consent-banner.cjs.entry.js +88 -0
  52. package/dist/cjs/fink-divider.cjs.entry.js +33 -0
  53. package/dist/cjs/fink-empty-state.cjs.entry.js +26 -0
  54. package/dist/cjs/fink-fab.cjs.entry.js +59 -0
  55. package/dist/cjs/fink-feedback.cjs.entry.js +41 -0
  56. package/dist/cjs/fink-file-upload.cjs.entry.js +114 -0
  57. package/dist/cjs/fink-footer.cjs.entry.js +37 -0
  58. package/dist/cjs/fink-grid.cjs.entry.js +23 -0
  59. package/dist/cjs/fink-image-list.cjs.entry.js +65 -0
  60. package/dist/cjs/fink-infinite-scroll.cjs.entry.js +73 -0
  61. package/dist/cjs/fink-kbd.cjs.entry.js +27 -0
  62. package/dist/cjs/fink-list.cjs.entry.js +77 -0
  63. package/dist/cjs/fink-logo.cjs.entry.js +29 -0
  64. package/dist/cjs/fink-menu.cjs.entry.js +141 -0
  65. package/dist/cjs/fink-otp-input.cjs.entry.js +111 -0
  66. package/dist/cjs/fink-page-header_4.cjs.entry.js +176 -0
  67. package/dist/cjs/fink-panel.cjs.entry.js +26 -0
  68. package/dist/cjs/fink-popconfirm.cjs.entry.js +61 -0
  69. package/dist/cjs/fink-range-slider.cjs.entry.js +80 -0
  70. package/dist/cjs/fink-rating.cjs.entry.js +64 -0
  71. package/dist/cjs/fink-result.cjs.entry.js +49 -0
  72. package/dist/cjs/fink-segmented.cjs.entry.js +51 -0
  73. package/dist/cjs/fink-selection-bar.cjs.entry.js +36 -0
  74. package/dist/cjs/fink-skeleton.cjs.entry.js +33 -0
  75. package/dist/cjs/fink-sparkline.cjs.entry.js +77 -0
  76. package/dist/cjs/fink-splitter.cjs.entry.js +84 -0
  77. package/dist/cjs/fink-stack.cjs.entry.js +35 -0
  78. package/dist/cjs/fink-stat-card.cjs.entry.js +58 -0
  79. package/dist/cjs/fink-summary-list.cjs.entry.js +29 -0
  80. package/dist/cjs/fink-tag-input.cjs.entry.js +113 -0
  81. package/dist/cjs/fink-timeline.cjs.entry.js +35 -0
  82. package/dist/cjs/fink-toc.cjs.entry.js +83 -0
  83. package/dist/cjs/fink-tour.cjs.entry.js +126 -0
  84. package/dist/cjs/fink-transfer-list.cjs.entry.js +101 -0
  85. package/dist/cjs/fink-virtual-list.cjs.entry.js +99 -0
  86. package/dist/cjs/fink.cjs.js +25 -0
  87. package/dist/cjs/group-8Me6YSO8-KMX-J6Nw.js +161 -0
  88. package/dist/cjs/has-closer-B-uYNNCw-BMi7yDrc.js +12 -0
  89. package/dist/cjs/href-DKPJq0Rh-Br0Co0Hf.js +12 -0
  90. package/dist/cjs/i18n-TlIXBsgS-tXG7od7W.js +227 -0
  91. package/dist/cjs/i18n-Uze_l4Ts-KcllxhQ3.js +17 -0
  92. package/dist/cjs/id-CkUYl2hO-aN84VRbL.js +12 -0
  93. package/dist/cjs/index-BnPDz_vB.js +5029 -0
  94. package/dist/cjs/index-C5tkyUxS.js +45 -0
  95. package/dist/cjs/index-CNO6HyrP.js +2004 -0
  96. package/dist/cjs/index-TsgAqj51.js +254 -0
  97. package/dist/cjs/index-xQL8L4ZS.js +2544 -0
  98. package/dist/cjs/index.cjs.js +33 -0
  99. package/dist/cjs/info-tuXhkPMr-F7Nn80k7.js +5590 -0
  100. package/dist/cjs/input-DwlolkOG-ZSHXWVxw.js +19 -0
  101. package/dist/cjs/input-container-DC3x4oGg-_Z5rQyil.js +102 -0
  102. package/dist/cjs/item-DThxrTZc-CDeyfJAJ.js +527 -0
  103. package/dist/cjs/item-cArH2C6l-3XgvOwr_.js +93 -0
  104. package/dist/cjs/item-pool-D4qvvY-S-152khmPs.js +46 -0
  105. package/dist/cjs/item-uC3h4pj3-CWCiuOrw.js +178 -0
  106. package/dist/cjs/item-zPmzbSvE-Cio4UhtM.js +88 -0
  107. package/dist/cjs/keyboard-DzlBdECG-HWqF6kPw.js +46 -0
  108. package/dist/cjs/kol-abbr.entry-vXy8tkfC.js +49 -0
  109. package/dist/cjs/kol-accordion.entry-DlfL8K5B.js +130 -0
  110. package/dist/cjs/kol-alert.entry-BSoN_9JY.js +190 -0
  111. package/dist/cjs/kol-avatar.entry-BTWt7leQ.js +100 -0
  112. package/dist/cjs/kol-badge.entry-iHLDICRD.js +176 -0
  113. package/dist/cjs/kol-breadcrumb.entry-Cjli4lJk.js +220 -0
  114. package/dist/cjs/kol-button-link.entry-D0tpwXhh.js +231 -0
  115. package/dist/cjs/kol-button.entry-PJhmI8Sb.js +241 -0
  116. package/dist/cjs/kol-card.entry-DICGVwpp.js +159 -0
  117. package/dist/cjs/kol-combobox.entry-knkAeqUE.js +549 -0
  118. package/dist/cjs/kol-details.entry-D0e4DD0G.js +130 -0
  119. package/dist/cjs/kol-dialog.entry-Dl1tatrP.js +132 -0
  120. package/dist/cjs/kol-drawer.entry-B5bf_Ygn.js +276 -0
  121. package/dist/cjs/kol-form.entry-DzeQve42.js +189 -0
  122. package/dist/cjs/kol-heading.entry-CwqmgXUS.js +83 -0
  123. package/dist/cjs/kol-icon.entry-CXVnSfdK.js +61 -0
  124. package/dist/cjs/kol-image.entry-2UshvJbB.js +114 -0
  125. package/dist/cjs/kol-input-checkbox.entry-DuxJ4K37.js +413 -0
  126. package/dist/cjs/kol-input-color.entry-2P1VK_Nn.js +319 -0
  127. package/dist/cjs/kol-input-date.entry-1oMHl1vG.js +534 -0
  128. package/dist/cjs/kol-input-email.entry-CxKE1-QV.js +351 -0
  129. package/dist/cjs/kol-input-file.entry-T5K_9_NM.js +384 -0
  130. package/dist/cjs/kol-input-number.entry-DSEAmFMI.js +440 -0
  131. package/dist/cjs/kol-input-password.entry-CVy2U3X0.js +375 -0
  132. package/dist/cjs/kol-input-radio.entry-CAuQGZYt.js +396 -0
  133. package/dist/cjs/kol-input-range.entry-DWH6ku6R.js +376 -0
  134. package/dist/cjs/kol-input-text.entry-ConfFR_K.js +439 -0
  135. package/dist/cjs/kol-kolibri.entry-CZVJE2wv.js +65 -0
  136. package/dist/cjs/kol-link-button.entry-CutGwpy4.js +223 -0
  137. package/dist/cjs/kol-link.entry-BGi6OGH-.js +210 -0
  138. package/dist/cjs/kol-meter.entry-DmZr5NfI.js +209 -0
  139. package/dist/cjs/kol-modal.entry-B-uPnZY7.js +123 -0
  140. package/dist/cjs/kol-nav.entry-D_Vzzpei.js +270 -0
  141. package/dist/cjs/kol-pagination.entry-DC6RnzZM.js +180 -0
  142. package/dist/cjs/kol-popover-button.entry-DCuMKVV1.js +251 -0
  143. package/dist/cjs/kol-progress.entry-CrVB7Lby.js +146 -0
  144. package/dist/cjs/kol-quote.entry-BoyX7ERY.js +84 -0
  145. package/dist/cjs/kol-select.entry-6Q7DoxPg.js +281 -0
  146. package/dist/cjs/kol-single-select.entry-SVOaIf8O.js +569 -0
  147. package/dist/cjs/kol-skip-nav.entry-D47uNPxq.js +198 -0
  148. package/dist/cjs/kol-spin.entry-UQi3gbnc.js +63 -0
  149. package/dist/cjs/kol-split-button.entry-iqGx05hp.js +277 -0
  150. package/dist/cjs/kol-table-stateful.entry-DqyiQJuV.js +685 -0
  151. package/dist/cjs/kol-table-stateless.entry-HO5w-yoL.js +189 -0
  152. package/dist/cjs/kol-tabs.entry-BLiZCkhW.js +466 -0
  153. package/dist/cjs/kol-textarea.entry--x3xgZUB.js +475 -0
  154. package/dist/cjs/kol-toast-container.entry-BLqOuOV3.js +117 -0
  155. package/dist/cjs/kol-toolbar.entry-DRKVAZ8i.js +299 -0
  156. package/dist/cjs/kol-tree-item.entry-By_K31wa.js +193 -0
  157. package/dist/cjs/kol-tree.entry-D8g1oLrh.js +279 -0
  158. package/dist/cjs/kol-version.entry-BPai8La9.js +66 -0
  159. package/dist/cjs/label-G82W4YoW-5k7AGiMy.js +16 -0
  160. package/dist/cjs/label-hints-DiRb_zIZ-D9E4Dp1C.js +23 -0
  161. package/dist/cjs/label-lang-segment-BSVexfSR-BtHMK8oV.js +15 -0
  162. package/dist/cjs/label-with-expert-slot-C1i0atAL-C5_JcNb3.js +16 -0
  163. package/dist/cjs/level-CWkPM-CS-CTFYyWv8.js +13 -0
  164. package/dist/cjs/link-target-B2OC2sZU-cBvae1pl.js +12 -0
  165. package/dist/cjs/links-CiNHSAYH-DQqGMQIz.js +16 -0
  166. package/dist/cjs/loader.cjs.js +13 -0
  167. package/dist/cjs/multiple-CuU2AuEM-SBTxcwlv.js +12 -0
  168. package/dist/cjs/number-value-adUq1zr1-CZd2xpDg.js +54 -0
  169. package/dist/cjs/open-DR8Z7RtS-DIQgjIv3.js +12 -0
  170. package/dist/cjs/open-items-cache-CS2mDRNB-DZu6FfYQ.js +25 -0
  171. package/dist/cjs/options-BDTJtk6H-Bb6AhJrA.js +31 -0
  172. package/dist/cjs/options-BPwcDIDO-DYAwq-lq.js +26 -0
  173. package/dist/cjs/orientation-BUPO9LJU-B7qzv8lO.js +21 -0
  174. package/dist/cjs/placeholder-BTFnryTd-BeG1x8J1.js +12 -0
  175. package/dist/cjs/props-from-config-DqFgiUwD-pOE_0hRW.js +2503 -0
  176. package/dist/cjs/read-only-DRmmHb2G-CnIJVzJD.js +12 -0
  177. package/dist/cjs/required-D4CdAA4s-3cwNsOi9.js +12 -0
  178. package/dist/cjs/resolve-color-aQz2CZ-X.js +78 -0
  179. package/dist/cjs/resolve-props-BAambGug-orZkBfeI.js +61 -0
  180. package/dist/cjs/resolve-props-Dpl38Wpe-358sX0ki.js +58 -0
  181. package/dist/cjs/rows-DRKSoawJ-ndIZla-m.js +12 -0
  182. package/dist/cjs/scroll-lock-C66lpb8L-CO9LVaJW.js +72 -0
  183. package/dist/cjs/shared-CMzQXmgd.js +26 -0
  184. package/dist/cjs/smart-button-BYEk3DzS-CEH1mbpj.js +19 -0
  185. package/dist/cjs/spell-check-DlQ_d2GL-TOFAGfnW.js +12 -0
  186. package/dist/cjs/src-Cikg9qhP-CLoB_Iqr.js +12 -0
  187. package/dist/cjs/step-C7WPZrUp-Bwzrsjv5.js +12 -0
  188. package/dist/cjs/suggestions-CotfxJG1-JyiUU_C5.js +25 -0
  189. package/dist/cjs/suggestions-qW9OdwO3-CupxEvYq.js +23 -0
  190. package/dist/cjs/test-component.entry-B_voa1f2.js +16 -0
  191. package/dist/cjs/theme-store-DroJsU6S-Cn_2BXeA.js +4476 -0
  192. package/dist/cjs/toggle-handler-BB_SIgS1-CGk_NFet.js +104 -0
  193. package/dist/cjs/tone-CbCEXb_l.js +6 -0
  194. package/dist/cjs/tooltip-open-tracking-CxHWKk8f-239HlKMW.js +26 -0
  195. package/dist/cjs/tslib.es6-QNbPBOk5-D6b02iQK.js +48 -0
  196. package/dist/cjs/unique-nav-labels-CQgKoOXd-CnxUuYe6.js +26 -0
  197. package/dist/cjs/unit-D2lG-lEM-CkwoMBFe.js +15 -0
  198. package/dist/cjs/validators-yh10eyXe-CsHQTosD.js +19 -0
  199. package/dist/cjs/value-string-DwEIOG1f-k1qSqkV7.js +12 -0
  200. package/dist/cjs/viewport-inset-Do_HqTBo.js +26 -0
  201. package/dist/cjs/width-xawzWTVW-AKH4gj28.js +32 -0
  202. package/dist/collection/assets/icon-fonts/codicons/codicon.css +805 -0
  203. package/dist/collection/assets/icon-fonts/codicons/codicon.csv +631 -0
  204. package/dist/collection/assets/icon-fonts/codicons/codicon.html +18216 -0
  205. package/dist/collection/assets/icon-fonts/codicons/codicon.svg +1 -0
  206. package/dist/collection/assets/icon-fonts/codicons/codicon.ttf +0 -0
  207. package/dist/collection/assets/icon-fonts/codicons/codiconsLibrary.ts +758 -0
  208. package/dist/collection/assets/icon-fonts/codicons/metadata.json +7235 -0
  209. package/dist/collection/assets/icon-fonts/fontawesome-free/css/all.css +7913 -0
  210. package/dist/collection/assets/icon-fonts/fontawesome-free/css/all.min.css +9 -0
  211. package/dist/collection/assets/icon-fonts/fontawesome-free/css/brands.css +1609 -0
  212. package/dist/collection/assets/icon-fonts/fontawesome-free/css/brands.min.css +6 -0
  213. package/dist/collection/assets/icon-fonts/fontawesome-free/css/fontawesome.css +6243 -0
  214. package/dist/collection/assets/icon-fonts/fontawesome-free/css/fontawesome.min.css +9 -0
  215. package/dist/collection/assets/icon-fonts/fontawesome-free/css/regular.css +19 -0
  216. package/dist/collection/assets/icon-fonts/fontawesome-free/css/regular.min.css +6 -0
  217. package/dist/collection/assets/icon-fonts/fontawesome-free/css/solid.css +19 -0
  218. package/dist/collection/assets/icon-fonts/fontawesome-free/css/solid.min.css +6 -0
  219. package/dist/collection/assets/icon-fonts/fontawesome-free/css/svg-with-js.css +461 -0
  220. package/dist/collection/assets/icon-fonts/fontawesome-free/css/svg-with-js.min.css +6 -0
  221. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-font-face.css +26 -0
  222. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-font-face.min.css +6 -0
  223. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-shims.css +2194 -0
  224. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-shims.min.css +6 -0
  225. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v5-font-face.css +22 -0
  226. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v5-font-face.min.css +6 -0
  227. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  228. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  229. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  230. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  231. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  232. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  233. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  234. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  235. package/dist/collection/assets/icon-fonts/icon-fonts.css +4 -0
  236. package/dist/collection/assets/icon-fonts/kolicons/kolicons.eot +0 -0
  237. package/dist/collection/assets/icon-fonts/kolicons/kolicons.json +31 -0
  238. package/dist/collection/assets/icon-fonts/kolicons/kolicons.svg +99 -0
  239. package/dist/collection/assets/icon-fonts/kolicons/kolicons.ttf +0 -0
  240. package/dist/collection/assets/icon-fonts/kolicons/kolicons.woff +0 -0
  241. package/dist/collection/assets/icon-fonts/kolicons/kolicons.woff2 +0 -0
  242. package/dist/collection/assets/icon-fonts/kolicons/style.css +51 -0
  243. package/dist/collection/assets/icon-fonts/manifest.json +14 -0
  244. package/dist/collection/collection-manifest.json +60 -0
  245. package/dist/collection/components/app-shell/app-shell.css +203 -0
  246. package/dist/collection/components/app-shell/app-shell.js +298 -0
  247. package/dist/collection/components/avatar-group/avatar-group.css +42 -0
  248. package/dist/collection/components/avatar-group/avatar-group.js +161 -0
  249. package/dist/collection/components/back-to-top/back-to-top.css +38 -0
  250. package/dist/collection/components/back-to-top/back-to-top.js +126 -0
  251. package/dist/collection/components/bar-chart/bar-chart.css +108 -0
  252. package/dist/collection/components/bar-chart/bar-chart.js +204 -0
  253. package/dist/collection/components/bottom-nav/bottom-nav.css +95 -0
  254. package/dist/collection/components/bottom-nav/bottom-nav.js +142 -0
  255. package/dist/collection/components/calendar/calendar.css +140 -0
  256. package/dist/collection/components/calendar/calendar.js +320 -0
  257. package/dist/collection/components/carousel/carousel.css +110 -0
  258. package/dist/collection/components/carousel/carousel.js +211 -0
  259. package/dist/collection/components/chip/chip.css +4 -0
  260. package/dist/collection/components/chip/chip.js +240 -0
  261. package/dist/collection/components/code-block/code-block.css +183 -0
  262. package/dist/collection/components/code-block/code-block.js +237 -0
  263. package/dist/collection/components/consent-banner/consent-banner.css +86 -0
  264. package/dist/collection/components/consent-banner/consent-banner.js +224 -0
  265. package/dist/collection/components/divider/divider.css +72 -0
  266. package/dist/collection/components/divider/divider.js +123 -0
  267. package/dist/collection/components/empty-state/empty-state.css +51 -0
  268. package/dist/collection/components/empty-state/empty-state.js +113 -0
  269. package/dist/collection/components/fab/fab.css +85 -0
  270. package/dist/collection/components/fab/fab.js +219 -0
  271. package/dist/collection/components/feedback/feedback.css +50 -0
  272. package/dist/collection/components/feedback/feedback.js +116 -0
  273. package/dist/collection/components/file-upload/file-upload.css +178 -0
  274. package/dist/collection/components/file-upload/file-upload.js +331 -0
  275. package/dist/collection/components/footer/footer.css +78 -0
  276. package/dist/collection/components/footer/footer.js +121 -0
  277. package/dist/collection/components/grid/grid.css +10 -0
  278. package/dist/collection/components/grid/grid.js +79 -0
  279. package/dist/collection/components/image-list/image-list.css +171 -0
  280. package/dist/collection/components/image-list/image-list.js +204 -0
  281. package/dist/collection/components/infinite-scroll/infinite-scroll.css +29 -0
  282. package/dist/collection/components/infinite-scroll/infinite-scroll.js +188 -0
  283. package/dist/collection/components/kbd/kbd.css +32 -0
  284. package/dist/collection/components/kbd/kbd.js +54 -0
  285. package/dist/collection/components/list/list.css +169 -0
  286. package/dist/collection/components/list/list.js +255 -0
  287. package/dist/collection/components/logo/logo.css +48 -0
  288. package/dist/collection/components/logo/logo.js +102 -0
  289. package/dist/collection/components/menu/menu.css +101 -0
  290. package/dist/collection/components/menu/menu.js +331 -0
  291. package/dist/collection/components/otp-input/otp-input.css +68 -0
  292. package/dist/collection/components/otp-input/otp-input.js +295 -0
  293. package/dist/collection/components/page-header/page-header.css +62 -0
  294. package/dist/collection/components/page-header/page-header.js +93 -0
  295. package/dist/collection/components/panel/panel.css +79 -0
  296. package/dist/collection/components/panel/panel.js +116 -0
  297. package/dist/collection/components/popconfirm/popconfirm.css +49 -0
  298. package/dist/collection/components/popconfirm/popconfirm.js +281 -0
  299. package/dist/collection/components/range-slider/range-slider.css +129 -0
  300. package/dist/collection/components/range-slider/range-slider.js +288 -0
  301. package/dist/collection/components/rating/rating.css +72 -0
  302. package/dist/collection/components/rating/rating.js +189 -0
  303. package/dist/collection/components/result/result.css +127 -0
  304. package/dist/collection/components/result/result.js +187 -0
  305. package/dist/collection/components/segmented/segmented.css +83 -0
  306. package/dist/collection/components/segmented/segmented.js +160 -0
  307. package/dist/collection/components/selection-bar/selection-bar.css +52 -0
  308. package/dist/collection/components/selection-bar/selection-bar.js +106 -0
  309. package/dist/collection/components/skeleton/skeleton.css +58 -0
  310. package/dist/collection/components/skeleton/skeleton.js +138 -0
  311. package/dist/collection/components/sparkline/sparkline.css +63 -0
  312. package/dist/collection/components/sparkline/sparkline.js +208 -0
  313. package/dist/collection/components/splitter/splitter.css +89 -0
  314. package/dist/collection/components/splitter/splitter.js +240 -0
  315. package/dist/collection/components/stack/stack.css +10 -0
  316. package/dist/collection/components/stack/stack.js +150 -0
  317. package/dist/collection/components/stat-card/stat-card.css +143 -0
  318. package/dist/collection/components/stat-card/stat-card.js +232 -0
  319. package/dist/collection/components/status/status.css +5 -0
  320. package/dist/collection/components/status/status.js +116 -0
  321. package/dist/collection/components/stepper/stepper.css +137 -0
  322. package/dist/collection/components/stepper/stepper.js +170 -0
  323. package/dist/collection/components/summary-list/summary-list.css +88 -0
  324. package/dist/collection/components/summary-list/summary-list.js +119 -0
  325. package/dist/collection/components/tag-input/tag-input.css +34 -0
  326. package/dist/collection/components/tag-input/tag-input.js +304 -0
  327. package/dist/collection/components/task-list/task-list.css +86 -0
  328. package/dist/collection/components/task-list/task-list.js +125 -0
  329. package/dist/collection/components/timeline/timeline.css +95 -0
  330. package/dist/collection/components/timeline/timeline.js +91 -0
  331. package/dist/collection/components/toc/toc.css +66 -0
  332. package/dist/collection/components/toc/toc.js +183 -0
  333. package/dist/collection/components/tour/tour.css +119 -0
  334. package/dist/collection/components/tour/tour.js +249 -0
  335. package/dist/collection/components/transfer-list/transfer-list.css +150 -0
  336. package/dist/collection/components/transfer-list/transfer-list.js +259 -0
  337. package/dist/collection/components/virtual-list/virtual-list.css +99 -0
  338. package/dist/collection/components/virtual-list/virtual-list.js +239 -0
  339. package/dist/collection/fink.css +13 -0
  340. package/dist/collection/fonts.css +6 -0
  341. package/dist/collection/global/script.js +21 -0
  342. package/dist/collection/i18n/index.js +53 -0
  343. package/dist/collection/i18n/locales.js +245 -0
  344. package/dist/collection/index.js +3 -0
  345. package/dist/collection/tokens.css +1307 -0
  346. package/dist/collection/utils/highlight.js +80 -0
  347. package/dist/collection/utils/resolve-color.js +72 -0
  348. package/dist/collection/utils/shared.js +21 -0
  349. package/dist/collection/utils/tone.js +2 -0
  350. package/dist/collection/utils/viewport-inset.js +22 -0
  351. package/dist/components/fink-app-shell.d.ts +11 -0
  352. package/dist/components/fink-app-shell.js +1 -0
  353. package/dist/components/fink-avatar-group.d.ts +11 -0
  354. package/dist/components/fink-avatar-group.js +1 -0
  355. package/dist/components/fink-back-to-top.d.ts +11 -0
  356. package/dist/components/fink-back-to-top.js +1 -0
  357. package/dist/components/fink-bar-chart.d.ts +11 -0
  358. package/dist/components/fink-bar-chart.js +1 -0
  359. package/dist/components/fink-bottom-nav.d.ts +11 -0
  360. package/dist/components/fink-bottom-nav.js +1 -0
  361. package/dist/components/fink-calendar.d.ts +11 -0
  362. package/dist/components/fink-calendar.js +1 -0
  363. package/dist/components/fink-carousel.d.ts +11 -0
  364. package/dist/components/fink-carousel.js +1 -0
  365. package/dist/components/fink-chip.d.ts +11 -0
  366. package/dist/components/fink-chip.js +1 -0
  367. package/dist/components/fink-code-block.d.ts +11 -0
  368. package/dist/components/fink-code-block.js +1 -0
  369. package/dist/components/fink-consent-banner.d.ts +11 -0
  370. package/dist/components/fink-consent-banner.js +1 -0
  371. package/dist/components/fink-divider.d.ts +11 -0
  372. package/dist/components/fink-divider.js +1 -0
  373. package/dist/components/fink-empty-state.d.ts +11 -0
  374. package/dist/components/fink-empty-state.js +1 -0
  375. package/dist/components/fink-fab.d.ts +11 -0
  376. package/dist/components/fink-fab.js +1 -0
  377. package/dist/components/fink-feedback.d.ts +11 -0
  378. package/dist/components/fink-feedback.js +1 -0
  379. package/dist/components/fink-file-upload.d.ts +11 -0
  380. package/dist/components/fink-file-upload.js +1 -0
  381. package/dist/components/fink-footer.d.ts +11 -0
  382. package/dist/components/fink-footer.js +1 -0
  383. package/dist/components/fink-grid.d.ts +11 -0
  384. package/dist/components/fink-grid.js +1 -0
  385. package/dist/components/fink-image-list.d.ts +11 -0
  386. package/dist/components/fink-image-list.js +1 -0
  387. package/dist/components/fink-infinite-scroll.d.ts +11 -0
  388. package/dist/components/fink-infinite-scroll.js +1 -0
  389. package/dist/components/fink-kbd.d.ts +11 -0
  390. package/dist/components/fink-kbd.js +1 -0
  391. package/dist/components/fink-list.d.ts +11 -0
  392. package/dist/components/fink-list.js +1 -0
  393. package/dist/components/fink-logo.d.ts +11 -0
  394. package/dist/components/fink-logo.js +1 -0
  395. package/dist/components/fink-menu.d.ts +11 -0
  396. package/dist/components/fink-menu.js +1 -0
  397. package/dist/components/fink-otp-input.d.ts +11 -0
  398. package/dist/components/fink-otp-input.js +1 -0
  399. package/dist/components/fink-page-header.d.ts +11 -0
  400. package/dist/components/fink-page-header.js +1 -0
  401. package/dist/components/fink-panel.d.ts +11 -0
  402. package/dist/components/fink-panel.js +1 -0
  403. package/dist/components/fink-popconfirm.d.ts +11 -0
  404. package/dist/components/fink-popconfirm.js +1 -0
  405. package/dist/components/fink-range-slider.d.ts +11 -0
  406. package/dist/components/fink-range-slider.js +1 -0
  407. package/dist/components/fink-rating.d.ts +11 -0
  408. package/dist/components/fink-rating.js +1 -0
  409. package/dist/components/fink-result.d.ts +11 -0
  410. package/dist/components/fink-result.js +1 -0
  411. package/dist/components/fink-segmented.d.ts +11 -0
  412. package/dist/components/fink-segmented.js +1 -0
  413. package/dist/components/fink-selection-bar.d.ts +11 -0
  414. package/dist/components/fink-selection-bar.js +1 -0
  415. package/dist/components/fink-skeleton.d.ts +11 -0
  416. package/dist/components/fink-skeleton.js +1 -0
  417. package/dist/components/fink-sparkline.d.ts +11 -0
  418. package/dist/components/fink-sparkline.js +1 -0
  419. package/dist/components/fink-splitter.d.ts +11 -0
  420. package/dist/components/fink-splitter.js +1 -0
  421. package/dist/components/fink-stack.d.ts +11 -0
  422. package/dist/components/fink-stack.js +1 -0
  423. package/dist/components/fink-stat-card.d.ts +11 -0
  424. package/dist/components/fink-stat-card.js +1 -0
  425. package/dist/components/fink-status.d.ts +11 -0
  426. package/dist/components/fink-status.js +1 -0
  427. package/dist/components/fink-stepper.d.ts +11 -0
  428. package/dist/components/fink-stepper.js +1 -0
  429. package/dist/components/fink-summary-list.d.ts +11 -0
  430. package/dist/components/fink-summary-list.js +1 -0
  431. package/dist/components/fink-tag-input.d.ts +11 -0
  432. package/dist/components/fink-tag-input.js +1 -0
  433. package/dist/components/fink-task-list.d.ts +11 -0
  434. package/dist/components/fink-task-list.js +1 -0
  435. package/dist/components/fink-timeline.d.ts +11 -0
  436. package/dist/components/fink-timeline.js +1 -0
  437. package/dist/components/fink-toc.d.ts +11 -0
  438. package/dist/components/fink-toc.js +1 -0
  439. package/dist/components/fink-tour.d.ts +11 -0
  440. package/dist/components/fink-tour.js +1 -0
  441. package/dist/components/fink-transfer-list.d.ts +11 -0
  442. package/dist/components/fink-transfer-list.js +1 -0
  443. package/dist/components/fink-virtual-list.d.ts +11 -0
  444. package/dist/components/fink-virtual-list.js +1 -0
  445. package/dist/components/index.d.ts +35 -0
  446. package/dist/components/index.js +1 -0
  447. package/dist/components/p--dluw9sU.js +4 -0
  448. package/dist/components/p-0q_cDiSu.js +1 -0
  449. package/dist/components/p-2G6i00Y4.js +4 -0
  450. package/dist/components/p-4VqUGnzw.js +4 -0
  451. package/dist/components/p-7b6zbUGV.js +4 -0
  452. package/dist/components/p-7pkFNJTS.js +4 -0
  453. package/dist/components/p-80r0hOg-.js +4 -0
  454. package/dist/components/p-9Omm5njj.js +4 -0
  455. package/dist/components/p-B-BbokvN.js +1 -0
  456. package/dist/components/p-B0rajiBV.js +4 -0
  457. package/dist/components/p-B1f-WAgD.js +4 -0
  458. package/dist/components/p-B4W2Axj0.js +4 -0
  459. package/dist/components/p-B55_WIt8.js +4 -0
  460. package/dist/components/p-B9vMUbQn.js +4 -0
  461. package/dist/components/p-BA22-sOe.js +4 -0
  462. package/dist/components/p-BCaU1mmT.js +4 -0
  463. package/dist/components/p-BDLnNXyN.js +4 -0
  464. package/dist/components/p-BMbOqdum.js +4 -0
  465. package/dist/components/p-BMikH-F1.js +4 -0
  466. package/dist/components/p-BNSBWfez.js +4 -0
  467. package/dist/components/p-BNeRxcyt.js +4 -0
  468. package/dist/components/p-BNv-BhuC.js +4 -0
  469. package/dist/components/p-BNxwDdo8.js +1 -0
  470. package/dist/components/p-BQcXMEDu.js +4 -0
  471. package/dist/components/p-BRzdX6D6.js +4 -0
  472. package/dist/components/p-BTYNOWWo.js +4 -0
  473. package/dist/components/p-BUaDrw6r.js +4 -0
  474. package/dist/components/p-BVEpQXTA.js +4 -0
  475. package/dist/components/p-BVQi1Qdz.js +4 -0
  476. package/dist/components/p-BVou7RHK.js +4 -0
  477. package/dist/components/p-BW20VO0z.js +4 -0
  478. package/dist/components/p-BXdJ0qF-.js +4 -0
  479. package/dist/components/p-BYjXAF2t.js +4 -0
  480. package/dist/components/p-BZeLdsTL.js +4 -0
  481. package/dist/components/p-BZrfikC0.js +1 -0
  482. package/dist/components/p-BbBslcM3.js +4 -0
  483. package/dist/components/p-BfVBCtH5.js +4 -0
  484. package/dist/components/p-BgDm6xES.js +4 -0
  485. package/dist/components/p-BgO3h-Rh.js +4 -0
  486. package/dist/components/p-Bjvj9BNg.js +4 -0
  487. package/dist/components/p-Bl_Mk897.js +4 -0
  488. package/dist/components/p-BmO5OHQt.js +4 -0
  489. package/dist/components/p-BmwSurIJ.js +4 -0
  490. package/dist/components/p-BpB6kJJx.js +4 -0
  491. package/dist/components/p-Bs6t0b4L.js +4 -0
  492. package/dist/components/p-BuQD3Teg.js +4 -0
  493. package/dist/components/p-BxOobhWU.js +4 -0
  494. package/dist/components/p-ByC9P8Tx.js +4 -0
  495. package/dist/components/p-ByLwbmoM.js +4 -0
  496. package/dist/components/p-C0XK-kqu.js +4 -0
  497. package/dist/components/p-C1p6UJUS.js +4 -0
  498. package/dist/components/p-C2-j2F3r.js +4 -0
  499. package/dist/components/p-C7SF5fdP.js +4 -0
  500. package/dist/components/p-C9aIBH9i.js +4 -0
  501. package/dist/components/p-C9u92OPr.js +4 -0
  502. package/dist/components/p-CAQo1RSU.js +4 -0
  503. package/dist/components/p-CBNHkhtz.js +4 -0
  504. package/dist/components/p-CFHGMm_k.js +4 -0
  505. package/dist/components/p-CFmh0GHK.js +4 -0
  506. package/dist/components/p-CGHkRu3d.js +4 -0
  507. package/dist/components/p-CIot44VN.js +4 -0
  508. package/dist/components/p-CJG_oJHT.js +4 -0
  509. package/dist/components/p-CP3Gtcwe.js +4 -0
  510. package/dist/components/p-CR_zYDd_.js +4 -0
  511. package/dist/components/p-CRjJqs7K.js +4 -0
  512. package/dist/components/p-CRwANbOQ.js +4 -0
  513. package/dist/components/p-CTQTxE7y.js +4 -0
  514. package/dist/components/p-CTRwSsSD.js +1 -0
  515. package/dist/components/p-CV_AyX-M.js +4 -0
  516. package/dist/components/p-CWjvhahm.js +4 -0
  517. package/dist/components/p-CWnmBc7G.js +4 -0
  518. package/dist/components/p-CYc4TCeV.js +4 -0
  519. package/dist/components/p-C_LpiLUG.js +4 -0
  520. package/dist/components/p-CcUOxrYJ.js +4 -0
  521. package/dist/components/p-CdR8DYRy.js +4 -0
  522. package/dist/components/p-ClV22d_I.js +4 -0
  523. package/dist/components/p-CldsZVVl.js +4 -0
  524. package/dist/components/p-CmiZqDhJ.js +4 -0
  525. package/dist/components/p-CmsrPPy-.js +4 -0
  526. package/dist/components/p-CnY1T61l.js +4 -0
  527. package/dist/components/p-CnhYWngh.js +4 -0
  528. package/dist/components/p-CsTpUjWf.js +4 -0
  529. package/dist/components/p-Ctrut-7c.js +4 -0
  530. package/dist/components/p-CutoC_Ty.js +4 -0
  531. package/dist/components/p-Cwa4hoGi.js +4 -0
  532. package/dist/components/p-CxpexqrH.js +4 -0
  533. package/dist/components/p-CzGozn0r.js +4 -0
  534. package/dist/components/p-D1t7yljW.js +4 -0
  535. package/dist/components/p-D7VQEFrw.js +4 -0
  536. package/dist/components/p-D9LQt7Zv.js +4 -0
  537. package/dist/components/p-DFunHW2N.js +4 -0
  538. package/dist/components/p-DGbq7kuL.js +4 -0
  539. package/dist/components/p-DGo_U0IH.js +4 -0
  540. package/dist/components/p-DIpAfGba.js +4 -0
  541. package/dist/components/p-DIuaKJuf.js +4 -0
  542. package/dist/components/p-DRJ_rivg.js +4 -0
  543. package/dist/components/p-DRbO95Y7.js +4 -0
  544. package/dist/components/p-DScJEdfZ.js +4 -0
  545. package/dist/components/p-DTrXC4SP.js +4 -0
  546. package/dist/components/p-DUNrULO-.js +4 -0
  547. package/dist/components/p-DVLI26JR.js +4 -0
  548. package/dist/components/p-DWjjqpdX.js +4 -0
  549. package/dist/components/p-DXuKrKOd.js +4 -0
  550. package/dist/components/p-DY84WS8v.js +1 -0
  551. package/dist/components/p-DYRYJXoR.js +4 -0
  552. package/dist/components/p-DYY8PIzp.js +4 -0
  553. package/dist/components/p-DZ_j7Hga.js +4 -0
  554. package/dist/components/p-DZcGWbYP.js +4 -0
  555. package/dist/components/p-D_7rD22W.js +4 -0
  556. package/dist/components/p-Dd10uxIT.js +4 -0
  557. package/dist/components/p-DddXRNAz.js +4 -0
  558. package/dist/components/p-DfxozzaL.js +4 -0
  559. package/dist/components/p-DgX1yjbX.js +4 -0
  560. package/dist/components/p-DjV0X18L.js +4 -0
  561. package/dist/components/p-DkAAPqJu.js +4 -0
  562. package/dist/components/p-Dkzm8mv-.js +4 -0
  563. package/dist/components/p-Dlbq4zit.js +4 -0
  564. package/dist/components/p-DlflLXmz.js +4 -0
  565. package/dist/components/p-Dn5a17Zr.js +4 -0
  566. package/dist/components/p-DofVp12C.js +4 -0
  567. package/dist/components/p-DoibTX8S.js +4 -0
  568. package/dist/components/p-DpxcjrYR.js +4 -0
  569. package/dist/components/p-DqC368cw.js +4 -0
  570. package/dist/components/p-DrNKkmSg.js +4 -0
  571. package/dist/components/p-Ds-2xh8j.js +1 -0
  572. package/dist/components/p-DscCDdM1.js +4 -0
  573. package/dist/components/p-DuXNDKoO.js +4 -0
  574. package/dist/components/p-DuiXatu0.js +4 -0
  575. package/dist/components/p-DvgUk4DC.js +4 -0
  576. package/dist/components/p-DwG3Skun.js +4 -0
  577. package/dist/components/p-KQw2tIyE.js +1 -0
  578. package/dist/components/p-L-QhVukf.js +4 -0
  579. package/dist/components/p-LEJbw36A.js +4 -0
  580. package/dist/components/p-Mm-C_T3m.js +4 -0
  581. package/dist/components/p-MzgCLtfB.js +4 -0
  582. package/dist/components/p-QNbPBOk5.js +4 -0
  583. package/dist/components/p-UchDDu0F.js +4 -0
  584. package/dist/components/p-YtlGjZiL.js +4 -0
  585. package/dist/components/p-Znyube6h.js +4 -0
  586. package/dist/components/p-cQxl99-m.js +4 -0
  587. package/dist/components/p-dzR6JR_Y.js +4 -0
  588. package/dist/components/p-f7FdbOPh.js +4 -0
  589. package/dist/components/p-gz-7919_.js +4 -0
  590. package/dist/components/p-kMjhJdnT.js +4 -0
  591. package/dist/components/p-kW0X7mcl.js +4 -0
  592. package/dist/components/p-llaYDFkW.js +4 -0
  593. package/dist/components/p-qd8DUvyj.js +10 -0
  594. package/dist/components/p-sXf51aB5.js +4 -0
  595. package/dist/components/p-vPCar92P.js +4 -0
  596. package/dist/components/p-vwEFyiVe.js +103 -0
  597. package/dist/components/p-xxBwAPx6.js +4 -0
  598. package/dist/components/p-zZKM-qT7.js +4 -0
  599. package/dist/docs.d.ts +480 -0
  600. package/dist/docs.json +8896 -0
  601. package/dist/esm/Heading-foerLIu9-BVbFegTw.js +37 -0
  602. package/dist/esm/access-and-short-key-BTEwnScd-CfAYtZGM.js +13 -0
  603. package/dist/esm/api-Ba9FNPRn-rdj2hyjm.js +425 -0
  604. package/dist/esm/app-globals-BnjNNhX0.js +26 -0
  605. package/dist/esm/aria-current-service-4eUMzpeO-CHrorN4F.js +27 -0
  606. package/dist/esm/aria-labelledby-C4wUnR-v-BgQ7JKmg.js +29 -0
  607. package/dist/esm/base-AKIr0rpk-CIl8tLMt.js +140 -0
  608. package/dist/esm/base-C7nTPc7u-DNu3y22x.js +1088 -0
  609. package/dist/esm/base-CpUNedp9-Bbxdff8P.js +163 -0
  610. package/dist/esm/base-D7qItqyf-coE87RLS.js +212 -0
  611. package/dist/esm/base-web-component-B3wi5eWH-BZD2AOtl.js +65 -0
  612. package/dist/esm/base-web-component-BpL_hXcg-B9B0wAg_.js +194 -0
  613. package/dist/esm/base-web-component-DorOeD_U-BEnunxBi.js +231 -0
  614. package/dist/esm/behavior-D9BHiFnH-Ci8duFrL.js +222 -0
  615. package/dist/esm/behavior-DDo87iUM-BWYM0j39.js +1903 -0
  616. package/dist/esm/behavior-XAV9GSxI-BRejClDx.js +164 -0
  617. package/dist/esm/bem-registry-CrZZQahR-C4GlllGk.js +616 -0
  618. package/dist/esm/bootstrap-Cz7Iq2I2-28vHQDC1.js +51 -0
  619. package/dist/esm/color-CnVBqZd5-D3QulmT5.js +58 -0
  620. package/dist/esm/component-0npqUhj2-BlizGX2j.js +123 -0
  621. package/dist/esm/component-BCKsZOoB-Cv8r2Vr8.js +21 -0
  622. package/dist/esm/component-BZjDp_Lf-olnyMgml.js +18 -0
  623. package/dist/esm/component-CjdTbGlP-BvyA2axC.js +173 -0
  624. package/dist/esm/component-Cn693XeT-CbzDb1Ts.js +48 -0
  625. package/dist/esm/component-Cvd5HXbX-CgWiDYTV.js +64 -0
  626. package/dist/esm/component-CvdxCpjC-Cc4AQcN4.js +44 -0
  627. package/dist/esm/component-DFhRTaqb-BuoAY7Hj.js +123 -0
  628. package/dist/esm/component-DP_p5few-C6hyGiFP.js +92 -0
  629. package/dist/esm/component-DlROeCCe-BFGwDGp8.js +85 -0
  630. package/dist/esm/component-names-DzmdvSkQ-BKy7HO6i.js +116 -0
  631. package/dist/esm/contrast-BHjNzQvB-Du_hfUqT.js +65 -0
  632. package/dist/esm/controller-DYkXzFqc-CsswmJRF.js +113 -0
  633. package/dist/esm/dev.utils-BgFDROtc-DvTVGlRQ.js +79 -0
  634. package/dist/esm/devtools-B6h2bVMJ-Dxl5yOJw.js +98 -0
  635. package/dist/esm/disabled-BZIZZ6wy-DS3OHEVQ.js +10 -0
  636. package/dist/esm/element-focus-C0L8NWU8-By17plAH.js +152 -0
  637. package/dist/esm/element-interaction-B3GEli6r-CDhfO5hL.js +93 -0
  638. package/dist/esm/events-DdfMb1U7-GmWu51Sq.js +52 -0
  639. package/dist/esm/field-control-QF0yTcyb-Bl8p9nHd.js +28 -0
  640. package/dist/esm/fink-app-shell.entry.js +131 -0
  641. package/dist/esm/fink-avatar-group.entry.js +60 -0
  642. package/dist/esm/fink-back-to-top.entry.js +50 -0
  643. package/dist/esm/fink-bar-chart.entry.js +48 -0
  644. package/dist/esm/fink-bottom-nav.entry.js +48 -0
  645. package/dist/esm/fink-calendar.entry.js +148 -0
  646. package/dist/esm/fink-carousel.entry.js +101 -0
  647. package/dist/esm/fink-chip.entry.js +74 -0
  648. package/dist/esm/fink-code-block.entry.js +169 -0
  649. package/dist/esm/fink-consent-banner.entry.js +86 -0
  650. package/dist/esm/fink-divider.entry.js +31 -0
  651. package/dist/esm/fink-empty-state.entry.js +24 -0
  652. package/dist/esm/fink-fab.entry.js +57 -0
  653. package/dist/esm/fink-feedback.entry.js +39 -0
  654. package/dist/esm/fink-file-upload.entry.js +112 -0
  655. package/dist/esm/fink-footer.entry.js +35 -0
  656. package/dist/esm/fink-grid.entry.js +21 -0
  657. package/dist/esm/fink-image-list.entry.js +63 -0
  658. package/dist/esm/fink-infinite-scroll.entry.js +71 -0
  659. package/dist/esm/fink-kbd.entry.js +25 -0
  660. package/dist/esm/fink-list.entry.js +75 -0
  661. package/dist/esm/fink-logo.entry.js +27 -0
  662. package/dist/esm/fink-menu.entry.js +139 -0
  663. package/dist/esm/fink-otp-input.entry.js +109 -0
  664. package/dist/esm/fink-page-header_4.entry.js +171 -0
  665. package/dist/esm/fink-panel.entry.js +24 -0
  666. package/dist/esm/fink-popconfirm.entry.js +59 -0
  667. package/dist/esm/fink-range-slider.entry.js +78 -0
  668. package/dist/esm/fink-rating.entry.js +62 -0
  669. package/dist/esm/fink-result.entry.js +47 -0
  670. package/dist/esm/fink-segmented.entry.js +49 -0
  671. package/dist/esm/fink-selection-bar.entry.js +34 -0
  672. package/dist/esm/fink-skeleton.entry.js +31 -0
  673. package/dist/esm/fink-sparkline.entry.js +75 -0
  674. package/dist/esm/fink-splitter.entry.js +82 -0
  675. package/dist/esm/fink-stack.entry.js +33 -0
  676. package/dist/esm/fink-stat-card.entry.js +56 -0
  677. package/dist/esm/fink-summary-list.entry.js +27 -0
  678. package/dist/esm/fink-tag-input.entry.js +111 -0
  679. package/dist/esm/fink-timeline.entry.js +33 -0
  680. package/dist/esm/fink-toc.entry.js +81 -0
  681. package/dist/esm/fink-tour.entry.js +124 -0
  682. package/dist/esm/fink-transfer-list.entry.js +99 -0
  683. package/dist/esm/fink-virtual-list.entry.js +97 -0
  684. package/dist/esm/fink.js +21 -0
  685. package/dist/esm/group-8Me6YSO8-xgnqIxjp.js +155 -0
  686. package/dist/esm/has-closer-B-uYNNCw-DLeh5-ue.js +10 -0
  687. package/dist/esm/href-DKPJq0Rh-DM0Q6H5W.js +10 -0
  688. package/dist/esm/i18n-TlIXBsgS-Ckx7Yn0p.js +224 -0
  689. package/dist/esm/i18n-Uze_l4Ts--j4pwklR.js +17 -0
  690. package/dist/esm/id-CkUYl2hO-DuOZaeSd.js +10 -0
  691. package/dist/esm/index-BCmY273s.js +43 -0
  692. package/dist/esm/index-CA3z5eXZ.js +1977 -0
  693. package/dist/esm/index-CUP9kM-6.js +233 -0
  694. package/dist/esm/index-CwRQlPpM.js +4994 -0
  695. package/dist/esm/index-KQw2tIyE.js +2536 -0
  696. package/dist/esm/index.js +2 -0
  697. package/dist/esm/info-tuXhkPMr-D_FS6tGD.js +5557 -0
  698. package/dist/esm/input-DwlolkOG-B7TsHjhS.js +17 -0
  699. package/dist/esm/input-container-DC3x4oGg-CsTswiL3.js +98 -0
  700. package/dist/esm/item-DThxrTZc-C5HcXoFS.js +523 -0
  701. package/dist/esm/item-cArH2C6l-Dq9QqqKe.js +91 -0
  702. package/dist/esm/item-pool-D4qvvY-S-vyDW-Elr.js +44 -0
  703. package/dist/esm/item-uC3h4pj3-OLJaTUoW.js +176 -0
  704. package/dist/esm/item-zPmzbSvE-CI7oup4J.js +86 -0
  705. package/dist/esm/keyboard-DzlBdECG-BZsM4cfK.js +46 -0
  706. package/dist/esm/kol-abbr.entry-mVk7ZlyC.js +47 -0
  707. package/dist/esm/kol-accordion.entry-DiJRyJ35.js +128 -0
  708. package/dist/esm/kol-alert.entry-DEVR2sW5.js +188 -0
  709. package/dist/esm/kol-avatar.entry-B-KpDJxv.js +98 -0
  710. package/dist/esm/kol-badge.entry-XHoji_MM.js +174 -0
  711. package/dist/esm/kol-breadcrumb.entry-BR_dd_-G.js +218 -0
  712. package/dist/esm/kol-button-link.entry-Cf4v9Bxb.js +229 -0
  713. package/dist/esm/kol-button.entry-BtahHzTC.js +239 -0
  714. package/dist/esm/kol-card.entry-385EbCW3.js +157 -0
  715. package/dist/esm/kol-combobox.entry-BTHmL7_r.js +547 -0
  716. package/dist/esm/kol-details.entry-hL20Taht.js +128 -0
  717. package/dist/esm/kol-dialog.entry-Bxg34kkN.js +130 -0
  718. package/dist/esm/kol-drawer.entry-CxSnfPVC.js +274 -0
  719. package/dist/esm/kol-form.entry-DejrJpT0.js +187 -0
  720. package/dist/esm/kol-heading.entry-DIdqX7hP.js +81 -0
  721. package/dist/esm/kol-icon.entry-Bs6D521h.js +59 -0
  722. package/dist/esm/kol-image.entry-B7XU15PX.js +112 -0
  723. package/dist/esm/kol-input-checkbox.entry-voVh9wes.js +411 -0
  724. package/dist/esm/kol-input-color.entry-BA8yNU-5.js +317 -0
  725. package/dist/esm/kol-input-date.entry-CbBHYGfW.js +532 -0
  726. package/dist/esm/kol-input-email.entry-B3TVS_jQ.js +349 -0
  727. package/dist/esm/kol-input-file.entry-Bw50xMG6.js +382 -0
  728. package/dist/esm/kol-input-number.entry-DEnhDS8m.js +438 -0
  729. package/dist/esm/kol-input-password.entry-C8KPPLGg.js +373 -0
  730. package/dist/esm/kol-input-radio.entry-VcGn4G2d.js +394 -0
  731. package/dist/esm/kol-input-range.entry-XW11xl8_.js +374 -0
  732. package/dist/esm/kol-input-text.entry-I_XonNty.js +437 -0
  733. package/dist/esm/kol-kolibri.entry-BkRAh6MS.js +63 -0
  734. package/dist/esm/kol-link-button.entry-Bi6SP1YP.js +221 -0
  735. package/dist/esm/kol-link.entry-BZgj_5kk.js +208 -0
  736. package/dist/esm/kol-meter.entry-DFA2MeTA.js +207 -0
  737. package/dist/esm/kol-modal.entry-DzEUIfdu.js +121 -0
  738. package/dist/esm/kol-nav.entry-BNYXkxiA.js +268 -0
  739. package/dist/esm/kol-pagination.entry-D1MJ1VbC.js +178 -0
  740. package/dist/esm/kol-popover-button.entry-BNWakgAm.js +249 -0
  741. package/dist/esm/kol-progress.entry-XBmRzcu8.js +144 -0
  742. package/dist/esm/kol-quote.entry-D_9Zd9-q.js +82 -0
  743. package/dist/esm/kol-select.entry-g6Yc_R0D.js +279 -0
  744. package/dist/esm/kol-single-select.entry-CaF22dl9.js +567 -0
  745. package/dist/esm/kol-skip-nav.entry-wsk5_hGJ.js +196 -0
  746. package/dist/esm/kol-spin.entry-D6P1QxzY.js +61 -0
  747. package/dist/esm/kol-split-button.entry-CRnZLU_m.js +275 -0
  748. package/dist/esm/kol-table-stateful.entry-YM1jEIqy.js +683 -0
  749. package/dist/esm/kol-table-stateless.entry-DkBXAO9-.js +187 -0
  750. package/dist/esm/kol-tabs.entry-CzQ9mDZZ.js +464 -0
  751. package/dist/esm/kol-textarea.entry-CYYwMkYK.js +473 -0
  752. package/dist/esm/kol-toast-container.entry-DsYUE5mI.js +115 -0
  753. package/dist/esm/kol-toolbar.entry-CRFOe4dW.js +297 -0
  754. package/dist/esm/kol-tree-item.entry-DQ8DqsBe.js +191 -0
  755. package/dist/esm/kol-tree.entry-Bahtftrl.js +277 -0
  756. package/dist/esm/kol-version.entry-DeW48JZE.js +64 -0
  757. package/dist/esm/label-G82W4YoW-DEpNTzZO.js +14 -0
  758. package/dist/esm/label-hints-DiRb_zIZ-CJOam2km.js +21 -0
  759. package/dist/esm/label-lang-segment-BSVexfSR-JER-6d7V.js +13 -0
  760. package/dist/esm/label-with-expert-slot-C1i0atAL-BSAWLh3g.js +14 -0
  761. package/dist/esm/level-CWkPM-CS-BOlL7OEL.js +11 -0
  762. package/dist/esm/link-target-B2OC2sZU-BWrqXOoq.js +10 -0
  763. package/dist/esm/links-CiNHSAYH-CQXX-pAH.js +14 -0
  764. package/dist/esm/loader.js +11 -0
  765. package/dist/esm/multiple-CuU2AuEM-BqD17udD.js +10 -0
  766. package/dist/esm/number-value-adUq1zr1-oKN9eTfJ.js +46 -0
  767. package/dist/esm/open-DR8Z7RtS-C3KbEQp0.js +10 -0
  768. package/dist/esm/open-items-cache-CS2mDRNB-Xn5hW3B2.js +21 -0
  769. package/dist/esm/options-BDTJtk6H-D5ALZvIK.js +28 -0
  770. package/dist/esm/options-BPwcDIDO-m3RdW12k.js +24 -0
  771. package/dist/esm/orientation-BUPO9LJU-BiIRydWE.js +18 -0
  772. package/dist/esm/placeholder-BTFnryTd-BtHUd-ck.js +10 -0
  773. package/dist/esm/props-from-config-DqFgiUwD-BlPibITX.js +2468 -0
  774. package/dist/esm/read-only-DRmmHb2G-BTfvM1cR.js +10 -0
  775. package/dist/esm/required-D4CdAA4s-DyfM1WRr.js +10 -0
  776. package/dist/esm/resolve-color-BNxwDdo8.js +74 -0
  777. package/dist/esm/resolve-props-BAambGug-BHQnawTz.js +59 -0
  778. package/dist/esm/resolve-props-Dpl38Wpe-BuuvHExk.js +56 -0
  779. package/dist/esm/rows-DRKSoawJ-2fa63Cts.js +10 -0
  780. package/dist/esm/scroll-lock-C66lpb8L-CMx_ouSD.js +68 -0
  781. package/dist/esm/shared-0q_cDiSu.js +23 -0
  782. package/dist/esm/smart-button-BYEk3DzS-CvOWdBHD.js +17 -0
  783. package/dist/esm/spell-check-DlQ_d2GL-BAXGFxfw.js +10 -0
  784. package/dist/esm/src-Cikg9qhP-B2f1J8RL.js +10 -0
  785. package/dist/esm/step-C7WPZrUp-BalvGjbu.js +10 -0
  786. package/dist/esm/suggestions-CotfxJG1-DR28Ni66.js +23 -0
  787. package/dist/esm/suggestions-qW9OdwO3-90-3oW4g.js +20 -0
  788. package/dist/esm/test-component.entry-Cw5NrX4A.js +14 -0
  789. package/dist/esm/theme-store-DroJsU6S-CNdF9au3.js +4398 -0
  790. package/dist/esm/toggle-handler-BB_SIgS1-CRNI-BeB.js +97 -0
  791. package/dist/esm/tone-B-BbokvN.js +4 -0
  792. package/dist/esm/tooltip-open-tracking-CxHWKk8f-z31IQ8je.js +21 -0
  793. package/dist/esm/tslib.es6-QNbPBOk5-QNbPBOk5.js +45 -0
  794. package/dist/esm/unique-nav-labels-CQgKoOXd-CVFPYOx_.js +23 -0
  795. package/dist/esm/unit-D2lG-lEM-D7zYiPWU.js +12 -0
  796. package/dist/esm/validators-yh10eyXe-w-ZzOFvZ.js +14 -0
  797. package/dist/esm/value-string-DwEIOG1f-B_-iiGJO.js +10 -0
  798. package/dist/esm/viewport-inset-DY84WS8v.js +24 -0
  799. package/dist/esm/width-xawzWTVW-D6a2C3pn.js +29 -0
  800. package/dist/fink/assets/icon-fonts/codicons/codicon.css +805 -0
  801. package/dist/fink/assets/icon-fonts/codicons/codicon.csv +631 -0
  802. package/dist/fink/assets/icon-fonts/codicons/codicon.html +18216 -0
  803. package/dist/fink/assets/icon-fonts/codicons/codicon.svg +1 -0
  804. package/dist/fink/assets/icon-fonts/codicons/codicon.ttf +0 -0
  805. package/dist/fink/assets/icon-fonts/codicons/codiconsLibrary.ts +758 -0
  806. package/dist/fink/assets/icon-fonts/codicons/metadata.json +7235 -0
  807. package/dist/fink/assets/icon-fonts/fontawesome-free/css/all.css +7913 -0
  808. package/dist/fink/assets/icon-fonts/fontawesome-free/css/all.min.css +9 -0
  809. package/dist/fink/assets/icon-fonts/fontawesome-free/css/brands.css +1609 -0
  810. package/dist/fink/assets/icon-fonts/fontawesome-free/css/brands.min.css +6 -0
  811. package/dist/fink/assets/icon-fonts/fontawesome-free/css/fontawesome.css +6243 -0
  812. package/dist/fink/assets/icon-fonts/fontawesome-free/css/fontawesome.min.css +9 -0
  813. package/dist/fink/assets/icon-fonts/fontawesome-free/css/regular.css +19 -0
  814. package/dist/fink/assets/icon-fonts/fontawesome-free/css/regular.min.css +6 -0
  815. package/dist/fink/assets/icon-fonts/fontawesome-free/css/solid.css +19 -0
  816. package/dist/fink/assets/icon-fonts/fontawesome-free/css/solid.min.css +6 -0
  817. package/dist/fink/assets/icon-fonts/fontawesome-free/css/svg-with-js.css +461 -0
  818. package/dist/fink/assets/icon-fonts/fontawesome-free/css/svg-with-js.min.css +6 -0
  819. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-font-face.css +26 -0
  820. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-font-face.min.css +6 -0
  821. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-shims.css +2194 -0
  822. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-shims.min.css +6 -0
  823. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v5-font-face.css +22 -0
  824. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v5-font-face.min.css +6 -0
  825. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  826. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  827. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  828. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  829. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  830. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  831. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  832. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  833. package/dist/fink/assets/icon-fonts/icon-fonts.css +4 -0
  834. package/dist/fink/assets/icon-fonts/kolicons/kolicons.eot +0 -0
  835. package/dist/fink/assets/icon-fonts/kolicons/kolicons.json +31 -0
  836. package/dist/fink/assets/icon-fonts/kolicons/kolicons.svg +99 -0
  837. package/dist/fink/assets/icon-fonts/kolicons/kolicons.ttf +0 -0
  838. package/dist/fink/assets/icon-fonts/kolicons/kolicons.woff +0 -0
  839. package/dist/fink/assets/icon-fonts/kolicons/kolicons.woff2 +0 -0
  840. package/dist/fink/assets/icon-fonts/kolicons/style.css +51 -0
  841. package/dist/fink/assets/icon-fonts/manifest.json +14 -0
  842. package/dist/fink/fink.css +13 -0
  843. package/dist/fink/fink.esm.js +1 -0
  844. package/dist/fink/fonts.css +6 -0
  845. package/dist/fink/index.esm.js +1 -0
  846. package/dist/fink/p-0480e0f4.entry.js +1 -0
  847. package/dist/fink/p-090bfc39.entry.js +1 -0
  848. package/dist/fink/p-0TbN8Xcp.js +4 -0
  849. package/dist/fink/p-0q_cDiSu.js +1 -0
  850. package/dist/fink/p-112a5699.entry.js +1 -0
  851. package/dist/fink/p-1KerVamE.js +4 -0
  852. package/dist/fink/p-26a83208.entry.js +1 -0
  853. package/dist/fink/p-271b0565.entry.js +1 -0
  854. package/dist/fink/p-31f2f199.entry.js +1 -0
  855. package/dist/fink/p-3364a6ba.entry.js +1 -0
  856. package/dist/fink/p-3870cd2f.entry.js +1 -0
  857. package/dist/fink/p-3TE1oVoK.js +4 -0
  858. package/dist/fink/p-46541968.entry.js +1 -0
  859. package/dist/fink/p-4ee67455.entry.js +1 -0
  860. package/dist/fink/p-5278d1ef.entry.js +1 -0
  861. package/dist/fink/p-531aeb01.entry.js +1 -0
  862. package/dist/fink/p-5b80b2bb.entry.js +1 -0
  863. package/dist/fink/p-61642130.entry.js +1 -0
  864. package/dist/fink/p-66abd1be.entry.js +1 -0
  865. package/dist/fink/p-6af256be.entry.js +1 -0
  866. package/dist/fink/p-6bd4ada5.entry.js +1 -0
  867. package/dist/fink/p-6cc33769.entry.js +1 -0
  868. package/dist/fink/p-70dFTErH.js +4 -0
  869. package/dist/fink/p-70e656ee.entry.js +1 -0
  870. package/dist/fink/p-73077f4d.entry.js +1 -0
  871. package/dist/fink/p-7a18b0e6.entry.js +1 -0
  872. package/dist/fink/p-7fEhncCi.js +4 -0
  873. package/dist/fink/p-7fe42ecb.entry.js +1 -0
  874. package/dist/fink/p-840e3c72.entry.js +1 -0
  875. package/dist/fink/p-87eb491f.entry.js +1 -0
  876. package/dist/fink/p-89305df2.entry.js +1 -0
  877. package/dist/fink/p-8JwsEQGN.js +4 -0
  878. package/dist/fink/p-8bd53685.entry.js +1 -0
  879. package/dist/fink/p-8ca103e0.entry.js +1 -0
  880. package/dist/fink/p-8mwEeVg6.js +4 -0
  881. package/dist/fink/p-92d27ed0.entry.js +1 -0
  882. package/dist/fink/p-93317eae.entry.js +1 -0
  883. package/dist/fink/p-95680148.entry.js +1 -0
  884. package/dist/fink/p-9PdC_fU3.js +4 -0
  885. package/dist/fink/p-B-BbokvN.js +1 -0
  886. package/dist/fink/p-B1WcEq4M.js +4 -0
  887. package/dist/fink/p-B1dsErUJ.js +4 -0
  888. package/dist/fink/p-B3PXhKe7.js +4 -0
  889. package/dist/fink/p-B6BCq5L_.js +4 -0
  890. package/dist/fink/p-B8h8QAF1.js +4 -0
  891. package/dist/fink/p-B99lWqPG.js +4 -0
  892. package/dist/fink/p-BELHU4Oh.js +4 -0
  893. package/dist/fink/p-BFH2qMqH.js +4 -0
  894. package/dist/fink/p-BFfPdbpO.js +4 -0
  895. package/dist/fink/p-BH1jSxUA.js +4 -0
  896. package/dist/fink/p-BHiLglB0.js +4 -0
  897. package/dist/fink/p-BI7oMr1i.js +4 -0
  898. package/dist/fink/p-BL9X5zek.js +4 -0
  899. package/dist/fink/p-BMCfojyI.js +4 -0
  900. package/dist/fink/p-BMThm7qP.js +4 -0
  901. package/dist/fink/p-BNhE7eEv.js +4 -0
  902. package/dist/fink/p-BNxwDdo8.js +1 -0
  903. package/dist/fink/p-BOb10H2H.js +4 -0
  904. package/dist/fink/p-BStBDK4A.js +4 -0
  905. package/dist/fink/p-BTXnk9VW.js +4 -0
  906. package/dist/fink/p-BZ1KhHjM.js +4 -0
  907. package/dist/fink/p-BZZL8GzL.js +4 -0
  908. package/dist/fink/p-B_MOrp32.js +4 -0
  909. package/dist/fink/p-BcjT_Ul9.js +4 -0
  910. package/dist/fink/p-Be6hdVUe.js +4 -0
  911. package/dist/fink/p-BeLAXkQ_.js +4 -0
  912. package/dist/fink/p-BhbkDlT6.js +4 -0
  913. package/dist/fink/p-BlHQE7rX.js +4 -0
  914. package/dist/fink/p-BnmxgsW3.js +4 -0
  915. package/dist/fink/p-BoBd56YG.js +4 -0
  916. package/dist/fink/p-BoFdMsuR.js +4 -0
  917. package/dist/fink/p-Bqv88WWu.js +4 -0
  918. package/dist/fink/p-BsI1j3fz.js +4 -0
  919. package/dist/fink/p-Bsfk4YTG.js +4 -0
  920. package/dist/fink/p-BspwltC5.js +4 -0
  921. package/dist/fink/p-BttTvdEQ.js +4 -0
  922. package/dist/fink/p-Bx-xqibH.js +4 -0
  923. package/dist/fink/p-BzL1oNYN.js +4 -0
  924. package/dist/fink/p-C-DwLmsA.js +4 -0
  925. package/dist/fink/p-C-azHf2V.js +4 -0
  926. package/dist/fink/p-C1wCww7h.js +4 -0
  927. package/dist/fink/p-C5PYMWXY.js +4 -0
  928. package/dist/fink/p-C5U6Ou_m.js +4 -0
  929. package/dist/fink/p-C6fVBlc3.js +4 -0
  930. package/dist/fink/p-C7MZ5AgA.js +4 -0
  931. package/dist/fink/p-C87U2c-7.js +4 -0
  932. package/dist/fink/p-C8kDLCRm.js +4 -0
  933. package/dist/fink/p-CA3z5eXZ.js +3 -0
  934. package/dist/fink/p-CGkH1ERn.js +4 -0
  935. package/dist/fink/p-CHcHrZ7t.js +4 -0
  936. package/dist/fink/p-CHh4VeAg.js +4 -0
  937. package/dist/fink/p-CI2CZWqQ.js +1 -0
  938. package/dist/fink/p-CIs6Z2-d.js +4 -0
  939. package/dist/fink/p-CJE8uX0Q.js +4 -0
  940. package/dist/fink/p-CMSO-w9a.js +4 -0
  941. package/dist/fink/p-CNMWZCgS.js +4 -0
  942. package/dist/fink/p-CPtPzcMd.js +103 -0
  943. package/dist/fink/p-CS2xG1nM.js +4 -0
  944. package/dist/fink/p-CSBkViMy.js +4 -0
  945. package/dist/fink/p-CSF7BClw.js +4 -0
  946. package/dist/fink/p-CU-RbAYO.js +4 -0
  947. package/dist/fink/p-CUv13haf.js +4 -0
  948. package/dist/fink/p-CbAhGd5i.js +4 -0
  949. package/dist/fink/p-CdwUYA3i.js +4 -0
  950. package/dist/fink/p-Ce_W3WN1.js +4 -0
  951. package/dist/fink/p-CehyH2nT.js +4 -0
  952. package/dist/fink/p-CfJQyoH8.js +4 -0
  953. package/dist/fink/p-CgF6yh1S.js +4 -0
  954. package/dist/fink/p-CgNGhcQs.js +4 -0
  955. package/dist/fink/p-Ck0btp3V.js +4 -0
  956. package/dist/fink/p-Co0vbYlR.js +4 -0
  957. package/dist/fink/p-CpihVFNc.js +4 -0
  958. package/dist/fink/p-CpznDFHA.js +4 -0
  959. package/dist/fink/p-CvbbJk36.js +4 -0
  960. package/dist/fink/p-CvwFII-2.js +4 -0
  961. package/dist/fink/p-CxQ_SYym.js +4 -0
  962. package/dist/fink/p-CxZaPFrj.js +4 -0
  963. package/dist/fink/p-CyNGdp_T.js +4 -0
  964. package/dist/fink/p-Cz415OSO.js +4 -0
  965. package/dist/fink/p-CzkGplcI.js +4 -0
  966. package/dist/fink/p-D3mf_zo7.js +4 -0
  967. package/dist/fink/p-D59FB9e8.js +4 -0
  968. package/dist/fink/p-DAZjslwm.js +4 -0
  969. package/dist/fink/p-DDYZfpJd.js +4 -0
  970. package/dist/fink/p-DEfik0Sc.js +4 -0
  971. package/dist/fink/p-DFSgV3oS.js +4 -0
  972. package/dist/fink/p-DGF6_bBS.js +4 -0
  973. package/dist/fink/p-DHDOsEqL.js +4 -0
  974. package/dist/fink/p-DJNlv0ul.js +4 -0
  975. package/dist/fink/p-DMXYSXQf.js +4 -0
  976. package/dist/fink/p-DOMW2BrQ.js +4 -0
  977. package/dist/fink/p-DR_ckP39.js +4 -0
  978. package/dist/fink/p-DViZw2gZ.js +4 -0
  979. package/dist/fink/p-DXfM3tgR.js +4 -0
  980. package/dist/fink/p-DY84WS8v.js +1 -0
  981. package/dist/fink/p-DZyAKosi.js +4 -0
  982. package/dist/fink/p-D_FS6tGD.js +1 -0
  983. package/dist/fink/p-D_gkogCg.js +4 -0
  984. package/dist/fink/p-Dceq1fzm.js +4 -0
  985. package/dist/fink/p-DdUwZDmy.js +4 -0
  986. package/dist/fink/p-Dejnw6f4.js +4 -0
  987. package/dist/fink/p-DfDJiEXh.js +4 -0
  988. package/dist/fink/p-DhOZwwQR.js +4 -0
  989. package/dist/fink/p-DipzsIhC.js +4 -0
  990. package/dist/fink/p-Dj0TiVc5.js +4 -0
  991. package/dist/fink/p-DjPa1etv.js +4 -0
  992. package/dist/fink/p-DjkJYi9k.js +4 -0
  993. package/dist/fink/p-DoV5EBlI.js +4 -0
  994. package/dist/fink/p-DpjLDYYz.js +4 -0
  995. package/dist/fink/p-DqHxO9Ai.js +4 -0
  996. package/dist/fink/p-DtLQQ-Zy.js +4 -0
  997. package/dist/fink/p-Dv-cCVAs.js +4 -0
  998. package/dist/fink/p-DvOdBkVD.js +4 -0
  999. package/dist/fink/p-DvVgajSv.js +4 -0
  1000. package/dist/fink/p-DvwUhb7u.js +4 -0
  1001. package/dist/fink/p-HweNbAoE.js +4 -0
  1002. package/dist/fink/p-K1VBgVLf.js +4 -0
  1003. package/dist/fink/p-KQw2tIyE.js +1 -0
  1004. package/dist/fink/p-N-AMA4lJ.js +4 -0
  1005. package/dist/fink/p-Q2WAPvCN.js +4 -0
  1006. package/dist/fink/p-QIOzy6bA.js +4 -0
  1007. package/dist/fink/p-QNbPBOk5.js +4 -0
  1008. package/dist/fink/p-SKB8cyRh.js +4 -0
  1009. package/dist/fink/p-TFNqVyc8.js +4 -0
  1010. package/dist/fink/p-TOjFVPBq.js +4 -0
  1011. package/dist/fink/p-VQnHXg90.js +10 -0
  1012. package/dist/fink/p-WNhmp88g.js +4 -0
  1013. package/dist/fink/p-Z5P1Ai79.js +4 -0
  1014. package/dist/fink/p-ZQRFMWFz.js +4 -0
  1015. package/dist/fink/p-a3104de5.entry.js +1 -0
  1016. package/dist/fink/p-a97e7116.entry.js +1 -0
  1017. package/dist/fink/p-c4e678e3.entry.js +1 -0
  1018. package/dist/fink/p-c5242603.entry.js +1 -0
  1019. package/dist/fink/p-c533dfa2.entry.js +1 -0
  1020. package/dist/fink/p-d5c95ced.entry.js +1 -0
  1021. package/dist/fink/p-d762d39e.entry.js +1 -0
  1022. package/dist/fink/p-d902ca46.entry.js +1 -0
  1023. package/dist/fink/p-daf169f0.entry.js +1 -0
  1024. package/dist/fink/p-e554b7c8.entry.js +1 -0
  1025. package/dist/fink/p-ea884d3f.entry.js +1 -0
  1026. package/dist/fink/p-ed015850.entry.js +1 -0
  1027. package/dist/fink/p-f11bb9d9.entry.js +1 -0
  1028. package/dist/fink/p-f4eaa2e1.entry.js +1 -0
  1029. package/dist/fink/p-gewKj316.js +4 -0
  1030. package/dist/fink/p-h-zEpgSf.js +4 -0
  1031. package/dist/fink/p-h0MkHAI2.js +4 -0
  1032. package/dist/fink/p-iRfN55aI.js +4 -0
  1033. package/dist/fink/p-mYbM3W7m.js +4 -0
  1034. package/dist/fink/p-nQx5E18t.js +4 -0
  1035. package/dist/fink/p-odJRQxye.js +4 -0
  1036. package/dist/fink/p-rg-RqOuE.js +4 -0
  1037. package/dist/fink/p-u0y0hYdm.js +4 -0
  1038. package/dist/fink/p-v7r1B6-8.js +4 -0
  1039. package/dist/fink/p-vwzbS2N4.js +4 -0
  1040. package/dist/fink/p-xiyZ-c0B.js +4 -0
  1041. package/dist/fink/p-xnteiQZA.js +4 -0
  1042. package/dist/fink/tokens.css +1307 -0
  1043. package/dist/index.cjs.js +1 -0
  1044. package/dist/index.js +1 -0
  1045. package/dist/loader/cdn.js +1 -0
  1046. package/dist/loader/index.cjs.js +1 -0
  1047. package/dist/loader/index.d.ts +24 -0
  1048. package/dist/loader/index.es2017.js +1 -0
  1049. package/dist/loader/index.js +2 -0
  1050. package/dist/types/components/app-shell/app-shell.d.ts +63 -0
  1051. package/dist/types/components/avatar-group/avatar-group.d.ts +33 -0
  1052. package/dist/types/components/back-to-top/back-to-top.d.ts +22 -0
  1053. package/dist/types/components/bar-chart/bar-chart.d.ts +34 -0
  1054. package/dist/types/components/bottom-nav/bottom-nav.d.ts +28 -0
  1055. package/dist/types/components/calendar/calendar.d.ts +43 -0
  1056. package/dist/types/components/carousel/carousel.d.ts +39 -0
  1057. package/dist/types/components/chip/chip.d.ts +38 -0
  1058. package/dist/types/components/code-block/code-block.d.ts +41 -0
  1059. package/dist/types/components/consent-banner/consent-banner.d.ts +40 -0
  1060. package/dist/types/components/divider/divider.d.ts +18 -0
  1061. package/dist/types/components/empty-state/empty-state.d.ts +16 -0
  1062. package/dist/types/components/fab/fab.d.ts +37 -0
  1063. package/dist/types/components/feedback/feedback.d.ts +25 -0
  1064. package/dist/types/components/file-upload/file-upload.d.ts +49 -0
  1065. package/dist/types/components/footer/footer.d.ts +28 -0
  1066. package/dist/types/components/grid/grid.d.ts +13 -0
  1067. package/dist/types/components/image-list/image-list.d.ts +40 -0
  1068. package/dist/types/components/infinite-scroll/infinite-scroll.d.ts +33 -0
  1069. package/dist/types/components/kbd/kbd.d.ts +9 -0
  1070. package/dist/types/components/list/list.d.ts +57 -0
  1071. package/dist/types/components/logo/logo.d.ts +21 -0
  1072. package/dist/types/components/menu/menu.d.ts +63 -0
  1073. package/dist/types/components/otp-input/otp-input.d.ts +41 -0
  1074. package/dist/types/components/page-header/page-header.d.ts +16 -0
  1075. package/dist/types/components/panel/panel.d.ts +19 -0
  1076. package/dist/types/components/popconfirm/popconfirm.d.ts +38 -0
  1077. package/dist/types/components/range-slider/range-slider.d.ts +39 -0
  1078. package/dist/types/components/rating/rating.d.ts +28 -0
  1079. package/dist/types/components/result/result.d.ts +28 -0
  1080. package/dist/types/components/segmented/segmented.d.ts +28 -0
  1081. package/dist/types/components/selection-bar/selection-bar.d.ts +20 -0
  1082. package/dist/types/components/skeleton/skeleton.d.ts +17 -0
  1083. package/dist/types/components/sparkline/sparkline.d.ts +27 -0
  1084. package/dist/types/components/splitter/splitter.d.ts +37 -0
  1085. package/dist/types/components/stack/stack.d.ts +19 -0
  1086. package/dist/types/components/stat-card/stat-card.d.ts +29 -0
  1087. package/dist/types/components/status/status.d.ts +23 -0
  1088. package/dist/types/components/stepper/stepper.d.ts +25 -0
  1089. package/dist/types/components/summary-list/summary-list.d.ts +24 -0
  1090. package/dist/types/components/tag-input/tag-input.d.ts +43 -0
  1091. package/dist/types/components/task-list/task-list.d.ts +28 -0
  1092. package/dist/types/components/timeline/timeline.d.ts +23 -0
  1093. package/dist/types/components/toc/toc.d.ts +36 -0
  1094. package/dist/types/components/tour/tour.d.ts +49 -0
  1095. package/dist/types/components/transfer-list/transfer-list.d.ts +45 -0
  1096. package/dist/types/components/virtual-list/virtual-list.d.ts +44 -0
  1097. package/dist/types/components.d.ts +4408 -0
  1098. package/dist/types/global/script.d.ts +2 -0
  1099. package/dist/types/i18n/index.d.ts +23 -0
  1100. package/dist/types/i18n/locales.d.ts +212 -0
  1101. package/dist/types/index.d.ts +28 -0
  1102. package/dist/types/kolibri.d.ts +15 -0
  1103. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  1104. package/dist/types/utils/highlight.d.ts +6 -0
  1105. package/dist/types/utils/resolve-color.d.ts +16 -0
  1106. package/dist/types/utils/shared.d.ts +3 -0
  1107. package/dist/types/utils/tone.d.ts +4 -0
  1108. package/dist/types/utils/viewport-inset.d.ts +12 -0
  1109. package/package.json +50 -3
@@ -0,0 +1,2536 @@
1
+ const isString = obj => typeof obj === 'string';
2
+ const defer = () => {
3
+ let res;
4
+ let rej;
5
+ const promise = new Promise((resolve, reject) => {
6
+ res = resolve;
7
+ rej = reject;
8
+ });
9
+ promise.resolve = res;
10
+ promise.reject = rej;
11
+ return promise;
12
+ };
13
+ const makeString = object => {
14
+ if (object == null) return '';
15
+ return String(object);
16
+ };
17
+ const copy = (a, s, t) => {
18
+ a.forEach(m => {
19
+ if (s[m]) t[m] = s[m];
20
+ });
21
+ };
22
+ const lastOfPathSeparatorRegExp = /###/g;
23
+ const cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
24
+ const canNotTraverseDeeper = object => !object || isString(object);
25
+ const getLastOfPath = (object, path, Empty) => {
26
+ const stack = !isString(path) ? path : path.split('.');
27
+ let stackIndex = 0;
28
+ while (stackIndex < stack.length - 1) {
29
+ if (canNotTraverseDeeper(object)) return {};
30
+ const key = cleanKey(stack[stackIndex]);
31
+ if (!object[key] && Empty) object[key] = new Empty();
32
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
33
+ object = object[key];
34
+ } else {
35
+ object = {};
36
+ }
37
+ ++stackIndex;
38
+ }
39
+ if (canNotTraverseDeeper(object)) return {};
40
+ return {
41
+ obj: object,
42
+ k: cleanKey(stack[stackIndex])
43
+ };
44
+ };
45
+ const setPath = (object, path, newValue) => {
46
+ const {
47
+ obj,
48
+ k
49
+ } = getLastOfPath(object, path, Object);
50
+ if (obj !== undefined || path.length === 1) {
51
+ obj[k] = newValue;
52
+ return;
53
+ }
54
+ let e = path[path.length - 1];
55
+ let p = path.slice(0, path.length - 1);
56
+ let last = getLastOfPath(object, p, Object);
57
+ while (last.obj === undefined && p.length) {
58
+ e = `${p[p.length - 1]}.${e}`;
59
+ p = p.slice(0, p.length - 1);
60
+ last = getLastOfPath(object, p, Object);
61
+ if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {
62
+ last.obj = undefined;
63
+ }
64
+ }
65
+ last.obj[`${last.k}.${e}`] = newValue;
66
+ };
67
+ const pushPath = (object, path, newValue, concat) => {
68
+ const {
69
+ obj,
70
+ k
71
+ } = getLastOfPath(object, path, Object);
72
+ obj[k] = obj[k] || [];
73
+ obj[k].push(newValue);
74
+ };
75
+ const getPath = (object, path) => {
76
+ const {
77
+ obj,
78
+ k
79
+ } = getLastOfPath(object, path);
80
+ if (!obj) return undefined;
81
+ if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;
82
+ return obj[k];
83
+ };
84
+ const getPathWithDefaults = (data, defaultData, key) => {
85
+ const value = getPath(data, key);
86
+ if (value !== undefined) {
87
+ return value;
88
+ }
89
+ return getPath(defaultData, key);
90
+ };
91
+ const deepExtend = (target, source, overwrite) => {
92
+ for (const prop in source) {
93
+ if (prop !== '__proto__' && prop !== 'constructor') {
94
+ if (Object.prototype.hasOwnProperty.call(target, prop)) {
95
+ if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {
96
+ if (overwrite) target[prop] = source[prop];
97
+ } else {
98
+ deepExtend(target[prop], source[prop], overwrite);
99
+ }
100
+ } else {
101
+ target[prop] = source[prop];
102
+ }
103
+ }
104
+ }
105
+ return target;
106
+ };
107
+ const regexEscape = str => str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
108
+ const _entityMap = {
109
+ '&': '&amp;',
110
+ '<': '&lt;',
111
+ '>': '&gt;',
112
+ '"': '&quot;',
113
+ "'": '&#39;',
114
+ '/': '&#x2F;'
115
+ };
116
+ const escape = data => {
117
+ if (isString(data)) {
118
+ return data.replace(/[&<>"'\/]/g, s => _entityMap[s]);
119
+ }
120
+ return data;
121
+ };
122
+ class RegExpCache {
123
+ constructor(capacity) {
124
+ this.capacity = capacity;
125
+ this.regExpMap = new Map();
126
+ this.regExpQueue = [];
127
+ }
128
+ getRegExp(pattern) {
129
+ const regExpFromCache = this.regExpMap.get(pattern);
130
+ if (regExpFromCache !== undefined) {
131
+ return regExpFromCache;
132
+ }
133
+ const regExpNew = new RegExp(pattern);
134
+ if (this.regExpQueue.length === this.capacity) {
135
+ this.regExpMap.delete(this.regExpQueue.shift());
136
+ }
137
+ this.regExpMap.set(pattern, regExpNew);
138
+ this.regExpQueue.push(pattern);
139
+ return regExpNew;
140
+ }
141
+ }
142
+ const chars = [' ', ',', '?', '!', ';'];
143
+ const looksLikeObjectPathRegExpCache = new RegExpCache(20);
144
+ const looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
145
+ nsSeparator = nsSeparator || '';
146
+ keySeparator = keySeparator || '';
147
+ const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));
148
+ if (possibleChars.length === 0) return true;
149
+ const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
150
+ let matched = !r.test(key);
151
+ if (!matched) {
152
+ const ki = key.indexOf(keySeparator);
153
+ if (ki > 0 && !r.test(key.substring(0, ki))) {
154
+ matched = true;
155
+ }
156
+ }
157
+ return matched;
158
+ };
159
+ const deepFind = (obj, path, keySeparator = '.') => {
160
+ if (!obj) return undefined;
161
+ if (obj[path]) {
162
+ if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;
163
+ return obj[path];
164
+ }
165
+ const tokens = path.split(keySeparator);
166
+ let current = obj;
167
+ for (let i = 0; i < tokens.length;) {
168
+ if (!current || typeof current !== 'object') {
169
+ return undefined;
170
+ }
171
+ let next;
172
+ let nextPath = '';
173
+ for (let j = i; j < tokens.length; ++j) {
174
+ if (j !== i) {
175
+ nextPath += keySeparator;
176
+ }
177
+ nextPath += tokens[j];
178
+ next = current[nextPath];
179
+ if (next !== undefined) {
180
+ if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {
181
+ continue;
182
+ }
183
+ i += j - i + 1;
184
+ break;
185
+ }
186
+ }
187
+ current = next;
188
+ }
189
+ return current;
190
+ };
191
+ const getCleanedCode = code => code?.replace(/_/g, '-');
192
+
193
+ const consoleLogger = {
194
+ type: 'logger',
195
+ log(args) {
196
+ this.output('log', args);
197
+ },
198
+ warn(args) {
199
+ this.output('warn', args);
200
+ },
201
+ error(args) {
202
+ this.output('error', args);
203
+ },
204
+ output(type, args) {
205
+ console?.[type]?.apply?.(console, args);
206
+ }
207
+ };
208
+ class Logger {
209
+ constructor(concreteLogger, options = {}) {
210
+ this.init(concreteLogger, options);
211
+ }
212
+ init(concreteLogger, options = {}) {
213
+ this.prefix = options.prefix || 'i18next:';
214
+ this.logger = concreteLogger || consoleLogger;
215
+ this.options = options;
216
+ this.debug = options.debug;
217
+ }
218
+ log(...args) {
219
+ return this.forward(args, 'log', '', true);
220
+ }
221
+ warn(...args) {
222
+ return this.forward(args, 'warn', '', true);
223
+ }
224
+ error(...args) {
225
+ return this.forward(args, 'error', '');
226
+ }
227
+ deprecate(...args) {
228
+ return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
229
+ }
230
+ forward(args, lvl, prefix, debugOnly) {
231
+ if (debugOnly && !this.debug) return null;
232
+ args = args.map(a => isString(a) ? a.replace(/[\r\n\x00-\x1F\x7F]/g, ' ') : a);
233
+ if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;
234
+ return this.logger[lvl](args);
235
+ }
236
+ create(moduleName) {
237
+ return new Logger(this.logger, {
238
+ ...{
239
+ prefix: `${this.prefix}:${moduleName}:`
240
+ },
241
+ ...this.options
242
+ });
243
+ }
244
+ clone(options) {
245
+ options = options || this.options;
246
+ options.prefix = options.prefix || this.prefix;
247
+ return new Logger(this.logger, options);
248
+ }
249
+ }
250
+ var baseLogger = new Logger();
251
+
252
+ class EventEmitter {
253
+ constructor() {
254
+ this.observers = {};
255
+ }
256
+ on(events, listener) {
257
+ events.split(' ').forEach(event => {
258
+ if (!this.observers[event]) this.observers[event] = new Map();
259
+ const numListeners = this.observers[event].get(listener) || 0;
260
+ this.observers[event].set(listener, numListeners + 1);
261
+ });
262
+ return this;
263
+ }
264
+ off(event, listener) {
265
+ if (!this.observers[event]) return;
266
+ if (!listener) {
267
+ delete this.observers[event];
268
+ return;
269
+ }
270
+ this.observers[event].delete(listener);
271
+ }
272
+ once(event, listener) {
273
+ const wrapper = (...args) => {
274
+ listener(...args);
275
+ this.off(event, wrapper);
276
+ };
277
+ this.on(event, wrapper);
278
+ return this;
279
+ }
280
+ emit(event, ...args) {
281
+ if (this.observers[event]) {
282
+ const cloned = Array.from(this.observers[event].entries());
283
+ cloned.forEach(([observer, numTimesAdded]) => {
284
+ for (let i = 0; i < numTimesAdded; i++) {
285
+ observer(...args);
286
+ }
287
+ });
288
+ }
289
+ if (this.observers['*']) {
290
+ const cloned = Array.from(this.observers['*'].entries());
291
+ cloned.forEach(([observer, numTimesAdded]) => {
292
+ for (let i = 0; i < numTimesAdded; i++) {
293
+ observer(event, ...args);
294
+ }
295
+ });
296
+ }
297
+ }
298
+ }
299
+
300
+ class ResourceStore extends EventEmitter {
301
+ constructor(data, options = {
302
+ ns: ['translation'],
303
+ defaultNS: 'translation'
304
+ }) {
305
+ super();
306
+ this.data = data || {};
307
+ this.options = options;
308
+ if (this.options.keySeparator === undefined) {
309
+ this.options.keySeparator = '.';
310
+ }
311
+ if (this.options.ignoreJSONStructure === undefined) {
312
+ this.options.ignoreJSONStructure = true;
313
+ }
314
+ }
315
+ addNamespaces(ns) {
316
+ if (!this.options.ns.includes(ns)) {
317
+ this.options.ns.push(ns);
318
+ }
319
+ }
320
+ removeNamespaces(ns) {
321
+ const index = this.options.ns.indexOf(ns);
322
+ if (index > -1) {
323
+ this.options.ns.splice(index, 1);
324
+ }
325
+ }
326
+ getResource(lng, ns, key, options = {}) {
327
+ const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
328
+ const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
329
+ let path;
330
+ if (lng.includes('.')) {
331
+ path = lng.split('.');
332
+ } else {
333
+ path = [lng, ns];
334
+ if (key) {
335
+ if (Array.isArray(key)) {
336
+ path.push(...key);
337
+ } else if (isString(key) && keySeparator) {
338
+ path.push(...key.split(keySeparator));
339
+ } else {
340
+ path.push(key);
341
+ }
342
+ }
343
+ }
344
+ const result = getPath(this.data, path);
345
+ if (!result && !ns && !key && lng.includes('.')) {
346
+ lng = path[0];
347
+ ns = path[1];
348
+ key = path.slice(2).join('.');
349
+ }
350
+ if (result || !ignoreJSONStructure || !isString(key)) return result;
351
+ return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
352
+ }
353
+ addResource(lng, ns, key, value, options = {
354
+ silent: false
355
+ }) {
356
+ const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
357
+ let path = [lng, ns];
358
+ if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
359
+ if (lng.includes('.')) {
360
+ path = lng.split('.');
361
+ value = ns;
362
+ ns = path[1];
363
+ }
364
+ this.addNamespaces(ns);
365
+ setPath(this.data, path, value);
366
+ if (!options.silent) this.emit('added', lng, ns, key, value);
367
+ }
368
+ addResources(lng, ns, resources, options = {
369
+ silent: false
370
+ }) {
371
+ for (const m in resources) {
372
+ if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {
373
+ silent: true
374
+ });
375
+ }
376
+ if (!options.silent) this.emit('added', lng, ns, resources);
377
+ }
378
+ addResourceBundle(lng, ns, resources, deep, overwrite, options = {
379
+ silent: false,
380
+ skipCopy: false
381
+ }) {
382
+ let path = [lng, ns];
383
+ if (lng.includes('.')) {
384
+ path = lng.split('.');
385
+ deep = resources;
386
+ resources = ns;
387
+ ns = path[1];
388
+ }
389
+ this.addNamespaces(ns);
390
+ let pack = getPath(this.data, path) || {};
391
+ if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));
392
+ if (deep) {
393
+ deepExtend(pack, resources, overwrite);
394
+ } else {
395
+ pack = {
396
+ ...pack,
397
+ ...resources
398
+ };
399
+ }
400
+ setPath(this.data, path, pack);
401
+ if (!options.silent) this.emit('added', lng, ns, resources);
402
+ }
403
+ removeResourceBundle(lng, ns) {
404
+ if (this.hasResourceBundle(lng, ns)) {
405
+ delete this.data[lng][ns];
406
+ }
407
+ this.removeNamespaces(ns);
408
+ this.emit('removed', lng, ns);
409
+ }
410
+ hasResourceBundle(lng, ns) {
411
+ return this.getResource(lng, ns) !== undefined;
412
+ }
413
+ getResourceBundle(lng, ns) {
414
+ if (!ns) ns = this.options.defaultNS;
415
+ return this.getResource(lng, ns);
416
+ }
417
+ getDataByLanguage(lng) {
418
+ return this.data[lng];
419
+ }
420
+ hasLanguageSomeTranslations(lng) {
421
+ const data = this.getDataByLanguage(lng);
422
+ const n = data && Object.keys(data) || [];
423
+ return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);
424
+ }
425
+ toJSON() {
426
+ return this.data;
427
+ }
428
+ }
429
+
430
+ var postProcessor = {
431
+ processors: {},
432
+ addPostProcessor(module) {
433
+ this.processors[module.name] = module;
434
+ },
435
+ handle(processors, value, key, options, translator) {
436
+ processors.forEach(processor => {
437
+ value = this.processors[processor]?.process(value, key, options, translator) ?? value;
438
+ });
439
+ return value;
440
+ }
441
+ };
442
+
443
+ const PATH_KEY = Symbol('i18next/PATH_KEY');
444
+ function createProxy() {
445
+ const state = [];
446
+ const handler = Object.create(null);
447
+ let proxy;
448
+ handler.get = (target, key) => {
449
+ proxy?.revoke?.();
450
+ if (key === PATH_KEY) return state;
451
+ state.push(key);
452
+ proxy = Proxy.revocable(target, handler);
453
+ return proxy.proxy;
454
+ };
455
+ return Proxy.revocable(Object.create(null), handler).proxy;
456
+ }
457
+ function keysFromSelector(selector, opts) {
458
+ const {
459
+ [PATH_KEY]: path
460
+ } = selector(createProxy());
461
+ const keySeparator = opts?.keySeparator ?? '.';
462
+ const nsSeparator = opts?.nsSeparator ?? ':';
463
+ const strict = opts?.enableSelector === 'strict';
464
+ if (path.length > 1 && nsSeparator) {
465
+ const ns = opts?.ns;
466
+ const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;
467
+ if (nsList) {
468
+ const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];
469
+ if (candidates.includes(path[0])) {
470
+ return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;
471
+ }
472
+ }
473
+ }
474
+ return path.join(keySeparator);
475
+ }
476
+
477
+ const shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';
478
+ class Translator extends EventEmitter {
479
+ constructor(services, options = {}) {
480
+ super();
481
+ copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);
482
+ this.options = options;
483
+ if (this.options.keySeparator === undefined) {
484
+ this.options.keySeparator = '.';
485
+ }
486
+ this.logger = baseLogger.create('translator');
487
+ this.checkedLoadedFor = {};
488
+ }
489
+ changeLanguage(lng) {
490
+ if (lng) this.language = lng;
491
+ }
492
+ exists(key, o = {
493
+ interpolation: {}
494
+ }) {
495
+ const opt = {
496
+ ...o
497
+ };
498
+ if (key == null) return false;
499
+ const resolved = this.resolve(key, opt);
500
+ if (resolved?.res === undefined) return false;
501
+ const isObject = shouldHandleAsObject(resolved.res);
502
+ if (opt.returnObjects === false && isObject) {
503
+ return false;
504
+ }
505
+ return true;
506
+ }
507
+ extractFromKey(key, opt) {
508
+ let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;
509
+ if (nsSeparator === undefined) nsSeparator = ':';
510
+ const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
511
+ let namespaces = opt.ns || this.options.defaultNS || [];
512
+ const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);
513
+ const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
514
+ if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
515
+ const m = key.match(this.interpolator.nestingRegexp);
516
+ if (m && m.length > 0) {
517
+ return {
518
+ key,
519
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
520
+ };
521
+ }
522
+ const parts = key.split(nsSeparator);
523
+ if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();
524
+ key = parts.join(keySeparator);
525
+ }
526
+ return {
527
+ key,
528
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
529
+ };
530
+ }
531
+ translate(keys, o, lastKey) {
532
+ let opt = typeof o === 'object' ? {
533
+ ...o
534
+ } : o;
535
+ if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {
536
+ opt = this.options.overloadTranslationOptionHandler(arguments);
537
+ }
538
+ if (typeof opt === 'object') opt = {
539
+ ...opt
540
+ };
541
+ if (!opt) opt = {};
542
+ if (keys == null) return '';
543
+ if (typeof keys === 'function') keys = keysFromSelector(keys, {
544
+ ...this.options,
545
+ ...opt
546
+ });
547
+ if (!Array.isArray(keys)) keys = [String(keys)];
548
+ keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
549
+ ...this.options,
550
+ ...opt
551
+ }) : String(k));
552
+ const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;
553
+ const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
554
+ const {
555
+ key,
556
+ namespaces
557
+ } = this.extractFromKey(keys[keys.length - 1], opt);
558
+ const namespace = namespaces[namespaces.length - 1];
559
+ let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;
560
+ if (nsSeparator === undefined) nsSeparator = ':';
561
+ const lng = opt.lng || this.language;
562
+ const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
563
+ if (lng?.toLowerCase() === 'cimode') {
564
+ if (appendNamespaceToCIMode) {
565
+ if (returnDetails) {
566
+ return {
567
+ res: `${namespace}${nsSeparator}${key}`,
568
+ usedKey: key,
569
+ exactUsedKey: key,
570
+ usedLng: lng,
571
+ usedNS: namespace,
572
+ usedParams: this.getUsedParamsDetails(opt)
573
+ };
574
+ }
575
+ return `${namespace}${nsSeparator}${key}`;
576
+ }
577
+ if (returnDetails) {
578
+ return {
579
+ res: key,
580
+ usedKey: key,
581
+ exactUsedKey: key,
582
+ usedLng: lng,
583
+ usedNS: namespace,
584
+ usedParams: this.getUsedParamsDetails(opt)
585
+ };
586
+ }
587
+ return key;
588
+ }
589
+ const resolved = this.resolve(keys, opt);
590
+ let res = resolved?.res;
591
+ const resUsedKey = resolved?.usedKey || key;
592
+ const resExactUsedKey = resolved?.exactUsedKey || key;
593
+ const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
594
+ const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;
595
+ const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
596
+ const needsPluralHandling = opt.count !== undefined && !isString(opt.count);
597
+ const hasDefaultValue = Translator.hasDefaultValue(opt);
598
+ const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';
599
+ const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {
600
+ ordinal: false
601
+ }) : '';
602
+ const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;
603
+ const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;
604
+ let resForObjHndl = res;
605
+ if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {
606
+ resForObjHndl = defaultValue;
607
+ }
608
+ const handleAsObject = shouldHandleAsObject(resForObjHndl);
609
+ const resType = Object.prototype.toString.apply(resForObjHndl);
610
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
611
+ if (!opt.returnObjects && !this.options.returnObjects) {
612
+ if (!this.options.returnedObjectHandler) {
613
+ this.logger.warn('accessing an object - but returnObjects options is not enabled!');
614
+ }
615
+ const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {
616
+ ...opt,
617
+ ns: namespaces
618
+ }) : `key '${key} (${this.language})' returned an object instead of string.`;
619
+ if (returnDetails) {
620
+ resolved.res = r;
621
+ resolved.usedParams = this.getUsedParamsDetails(opt);
622
+ return resolved;
623
+ }
624
+ return r;
625
+ }
626
+ if (keySeparator) {
627
+ const resTypeIsArray = Array.isArray(resForObjHndl);
628
+ const copy = resTypeIsArray ? [] : {};
629
+ const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
630
+ for (const m in resForObjHndl) {
631
+ if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {
632
+ const deepKey = `${newKeyToUse}${keySeparator}${m}`;
633
+ if (hasDefaultValue && !res) {
634
+ copy[m] = this.translate(deepKey, {
635
+ ...opt,
636
+ defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,
637
+ ...{
638
+ joinArrays: false,
639
+ ns: namespaces
640
+ }
641
+ });
642
+ } else {
643
+ copy[m] = this.translate(deepKey, {
644
+ ...opt,
645
+ ...{
646
+ joinArrays: false,
647
+ ns: namespaces
648
+ }
649
+ });
650
+ }
651
+ if (copy[m] === deepKey) copy[m] = resForObjHndl[m];
652
+ }
653
+ }
654
+ res = copy;
655
+ }
656
+ } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {
657
+ res = res.join(joinArrays);
658
+ if (res) res = this.extendTranslation(res, keys, opt, lastKey);
659
+ } else {
660
+ let usedDefault = false;
661
+ let usedKey = false;
662
+ if (!this.isValidLookup(res) && hasDefaultValue) {
663
+ usedDefault = true;
664
+ res = defaultValue;
665
+ }
666
+ if (!this.isValidLookup(res)) {
667
+ usedKey = true;
668
+ res = key;
669
+ }
670
+ const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
671
+ const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
672
+ const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
673
+ if (usedKey || usedDefault || updateMissing) {
674
+ this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);
675
+ if (keySeparator) {
676
+ const fk = this.resolve(key, {
677
+ ...opt,
678
+ keySeparator: false
679
+ });
680
+ if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
681
+ }
682
+ let lngs = [];
683
+ const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);
684
+ if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
685
+ for (let i = 0; i < fallbackLngs.length; i++) {
686
+ lngs.push(fallbackLngs[i]);
687
+ }
688
+ } else if (this.options.saveMissingTo === 'all') {
689
+ lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);
690
+ } else {
691
+ lngs.push(opt.lng || this.language);
692
+ }
693
+ const send = (l, k, specificDefaultValue) => {
694
+ const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
695
+ if (this.options.missingKeyHandler) {
696
+ this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);
697
+ } else if (this.backendConnector?.saveMissing) {
698
+ this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);
699
+ }
700
+ this.emit('missingKey', l, namespace, k, res);
701
+ };
702
+ if (this.options.saveMissing) {
703
+ if (this.options.saveMissingPlurals && needsPluralHandling) {
704
+ lngs.forEach(language => {
705
+ const suffixes = this.pluralResolver.getSuffixes(language, opt);
706
+ if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {
707
+ suffixes.push(`${this.options.pluralSeparator}zero`);
708
+ }
709
+ suffixes.forEach(suffix => {
710
+ send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);
711
+ });
712
+ });
713
+ } else {
714
+ send(lngs, key, defaultValue);
715
+ }
716
+ }
717
+ }
718
+ res = this.extendTranslation(res, keys, opt, resolved, lastKey);
719
+ if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {
720
+ res = `${namespace}${nsSeparator}${key}`;
721
+ }
722
+ if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
723
+ res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);
724
+ }
725
+ }
726
+ if (returnDetails) {
727
+ resolved.res = res;
728
+ resolved.usedParams = this.getUsedParamsDetails(opt);
729
+ return resolved;
730
+ }
731
+ return res;
732
+ }
733
+ extendTranslation(res, key, opt, resolved, lastKey) {
734
+ if (this.i18nFormat?.parse) {
735
+ res = this.i18nFormat.parse(res, {
736
+ ...this.options.interpolation.defaultVariables,
737
+ ...opt
738
+ }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {
739
+ resolved
740
+ });
741
+ } else if (!opt.skipInterpolation) {
742
+ if (opt.interpolation) this.interpolator.init({
743
+ ...opt,
744
+ ...{
745
+ interpolation: {
746
+ ...this.options.interpolation,
747
+ ...opt.interpolation
748
+ }
749
+ }
750
+ });
751
+ const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
752
+ let nestBef;
753
+ if (skipOnVariables) {
754
+ const nb = res.match(this.interpolator.nestingRegexp);
755
+ nestBef = nb && nb.length;
756
+ }
757
+ let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;
758
+ if (this.options.interpolation.defaultVariables) data = {
759
+ ...this.options.interpolation.defaultVariables,
760
+ ...data
761
+ };
762
+ res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);
763
+ if (skipOnVariables) {
764
+ const na = res.match(this.interpolator.nestingRegexp);
765
+ const nestAft = na && na.length;
766
+ if (nestBef < nestAft) opt.nest = false;
767
+ }
768
+ if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;
769
+ if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {
770
+ if (lastKey?.[0] === args[0] && !opt.context) {
771
+ this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);
772
+ return null;
773
+ }
774
+ return this.translate(...args, key);
775
+ }, opt);
776
+ if (opt.interpolation) this.interpolator.reset();
777
+ }
778
+ const postProcess = opt.postProcess || this.options.postProcess;
779
+ const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;
780
+ if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {
781
+ res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
782
+ i18nResolved: {
783
+ ...resolved,
784
+ usedParams: this.getUsedParamsDetails(opt)
785
+ },
786
+ ...opt
787
+ } : opt, this);
788
+ }
789
+ return res;
790
+ }
791
+ resolve(keys, opt = {}) {
792
+ let found;
793
+ let usedKey;
794
+ let exactUsedKey;
795
+ let usedLng;
796
+ let usedNS;
797
+ if (isString(keys)) keys = [keys];
798
+ if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
799
+ ...this.options,
800
+ ...opt
801
+ }) : k);
802
+ keys.forEach(k => {
803
+ if (this.isValidLookup(found)) return;
804
+ const extracted = this.extractFromKey(k, opt);
805
+ const key = extracted.key;
806
+ usedKey = key;
807
+ let namespaces = extracted.namespaces;
808
+ if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
809
+ const needsPluralHandling = opt.count !== undefined && !isString(opt.count);
810
+ const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;
811
+ const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';
812
+ const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);
813
+ namespaces.forEach(ns => {
814
+ if (this.isValidLookup(found)) return;
815
+ usedNS = ns;
816
+ if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
817
+ this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;
818
+ this.logger.warn(`key "${usedKey}" for languages "${codes.join(', ')}" won't get resolved as namespace "${usedNS}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
819
+ }
820
+ codes.forEach(code => {
821
+ if (this.isValidLookup(found)) return;
822
+ usedLng = code;
823
+ const finalKeys = [key];
824
+ if (this.i18nFormat?.addLookupKeys) {
825
+ this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);
826
+ } else {
827
+ let pluralSuffix;
828
+ if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);
829
+ const zeroSuffix = `${this.options.pluralSeparator}zero`;
830
+ const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
831
+ if (needsPluralHandling) {
832
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
833
+ finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
834
+ }
835
+ finalKeys.push(key + pluralSuffix);
836
+ if (needsZeroSuffixLookup) {
837
+ finalKeys.push(key + zeroSuffix);
838
+ }
839
+ }
840
+ if (needsContextHandling) {
841
+ const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;
842
+ finalKeys.push(contextKey);
843
+ if (needsPluralHandling) {
844
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
845
+ finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
846
+ }
847
+ finalKeys.push(contextKey + pluralSuffix);
848
+ if (needsZeroSuffixLookup) {
849
+ finalKeys.push(contextKey + zeroSuffix);
850
+ }
851
+ }
852
+ }
853
+ }
854
+ let possibleKey;
855
+ while (possibleKey = finalKeys.pop()) {
856
+ if (!this.isValidLookup(found)) {
857
+ exactUsedKey = possibleKey;
858
+ found = this.getResource(code, ns, possibleKey, opt);
859
+ }
860
+ }
861
+ });
862
+ });
863
+ });
864
+ return {
865
+ res: found,
866
+ usedKey,
867
+ exactUsedKey,
868
+ usedLng,
869
+ usedNS
870
+ };
871
+ }
872
+ isValidLookup(res) {
873
+ return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
874
+ }
875
+ getResource(code, ns, key, options = {}) {
876
+ if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);
877
+ return this.resourceStore.getResource(code, ns, key, options);
878
+ }
879
+ getUsedParamsDetails(options = {}) {
880
+ const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];
881
+ const useOptionsReplaceForData = options.replace && !isString(options.replace);
882
+ let data = useOptionsReplaceForData ? options.replace : options;
883
+ if (useOptionsReplaceForData && typeof options.count !== 'undefined') {
884
+ data.count = options.count;
885
+ }
886
+ if (this.options.interpolation.defaultVariables) {
887
+ data = {
888
+ ...this.options.interpolation.defaultVariables,
889
+ ...data
890
+ };
891
+ }
892
+ if (!useOptionsReplaceForData) {
893
+ data = {
894
+ ...data
895
+ };
896
+ for (const key of optionsKeys) {
897
+ delete data[key];
898
+ }
899
+ }
900
+ return data;
901
+ }
902
+ static hasDefaultValue(options) {
903
+ const prefix = 'defaultValue';
904
+ for (const option in options) {
905
+ if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {
906
+ return true;
907
+ }
908
+ }
909
+ return false;
910
+ }
911
+ }
912
+
913
+ class LanguageUtil {
914
+ constructor(options) {
915
+ this.options = options;
916
+ this.supportedLngs = this.options.supportedLngs || false;
917
+ this.logger = baseLogger.create('languageUtils');
918
+ }
919
+ getScriptPartFromCode(code) {
920
+ code = getCleanedCode(code);
921
+ if (!code || !code.includes('-')) return null;
922
+ const p = code.split('-');
923
+ if (p.length === 2) return null;
924
+ p.pop();
925
+ if (p[p.length - 1].toLowerCase() === 'x') return null;
926
+ return this.formatLanguageCode(p.join('-'));
927
+ }
928
+ getLanguagePartFromCode(code) {
929
+ code = getCleanedCode(code);
930
+ if (!code || !code.includes('-')) return code;
931
+ const p = code.split('-');
932
+ return this.formatLanguageCode(p[0]);
933
+ }
934
+ formatLanguageCode(code) {
935
+ if (isString(code) && code.includes('-')) {
936
+ let formattedCode;
937
+ try {
938
+ formattedCode = Intl.getCanonicalLocales(code)[0];
939
+ } catch (e) {}
940
+ if (formattedCode && this.options.lowerCaseLng) {
941
+ formattedCode = formattedCode.toLowerCase();
942
+ }
943
+ if (formattedCode) return formattedCode;
944
+ if (this.options.lowerCaseLng) {
945
+ return code.toLowerCase();
946
+ }
947
+ return code;
948
+ }
949
+ return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
950
+ }
951
+ isSupportedCode(code) {
952
+ if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
953
+ code = this.getLanguagePartFromCode(code);
954
+ }
955
+ return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);
956
+ }
957
+ getBestMatchFromCodes(codes) {
958
+ if (!codes) return null;
959
+ let found;
960
+ codes.forEach(code => {
961
+ if (found) return;
962
+ const cleanedLng = this.formatLanguageCode(code);
963
+ if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;
964
+ });
965
+ if (!found && this.options.supportedLngs) {
966
+ codes.forEach(code => {
967
+ if (found) return;
968
+ const lngScOnly = this.getScriptPartFromCode(code);
969
+ if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;
970
+ const lngOnly = this.getLanguagePartFromCode(code);
971
+ if (this.isSupportedCode(lngOnly)) return found = lngOnly;
972
+ found = this.options.supportedLngs.find(supportedLng => {
973
+ if (supportedLng === lngOnly) return true;
974
+ if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;
975
+ if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;
976
+ if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;
977
+ return false;
978
+ });
979
+ });
980
+ }
981
+ if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
982
+ return found;
983
+ }
984
+ getFallbackCodes(fallbacks, code) {
985
+ if (!fallbacks) return [];
986
+ if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
987
+ if (isString(fallbacks)) fallbacks = [fallbacks];
988
+ if (Array.isArray(fallbacks)) return fallbacks;
989
+ if (!code) return fallbacks.default || [];
990
+ let found = fallbacks[code];
991
+ if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
992
+ if (!found) found = fallbacks[this.formatLanguageCode(code)];
993
+ if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
994
+ if (!found) found = fallbacks.default;
995
+ return found || [];
996
+ }
997
+ toResolveHierarchy(code, fallbackCode) {
998
+ const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);
999
+ const codes = [];
1000
+ const addCode = c => {
1001
+ if (!c) return;
1002
+ if (this.isSupportedCode(c)) {
1003
+ codes.push(c);
1004
+ } else {
1005
+ this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
1006
+ }
1007
+ };
1008
+ if (isString(code) && (code.includes('-') || code.includes('_'))) {
1009
+ if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
1010
+ if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
1011
+ if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
1012
+ } else if (isString(code)) {
1013
+ addCode(this.formatLanguageCode(code));
1014
+ }
1015
+ fallbackCodes.forEach(fc => {
1016
+ if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
1017
+ });
1018
+ return codes;
1019
+ }
1020
+ }
1021
+
1022
+ const suffixesOrder = {
1023
+ zero: 0,
1024
+ one: 1,
1025
+ two: 2,
1026
+ few: 3,
1027
+ many: 4,
1028
+ other: 5
1029
+ };
1030
+ const dummyRule = {
1031
+ select: count => count === 1 ? 'one' : 'other',
1032
+ resolvedOptions: () => ({
1033
+ pluralCategories: ['one', 'other']
1034
+ })
1035
+ };
1036
+ class PluralResolver {
1037
+ constructor(languageUtils, options = {}) {
1038
+ this.languageUtils = languageUtils;
1039
+ this.options = options;
1040
+ this.logger = baseLogger.create('pluralResolver');
1041
+ this.pluralRulesCache = {};
1042
+ }
1043
+ clearCache() {
1044
+ this.pluralRulesCache = {};
1045
+ }
1046
+ getRule(code, options = {}) {
1047
+ const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);
1048
+ const type = options.ordinal ? 'ordinal' : 'cardinal';
1049
+ const cacheKey = JSON.stringify({
1050
+ cleanedCode,
1051
+ type
1052
+ });
1053
+ if (cacheKey in this.pluralRulesCache) {
1054
+ return this.pluralRulesCache[cacheKey];
1055
+ }
1056
+ let rule;
1057
+ try {
1058
+ rule = new Intl.PluralRules(cleanedCode, {
1059
+ type
1060
+ });
1061
+ } catch (err) {
1062
+ if (typeof Intl === 'undefined') {
1063
+ this.logger.error('No Intl support, please use an Intl polyfill!');
1064
+ return dummyRule;
1065
+ }
1066
+ if (!code.match(/-|_/)) return dummyRule;
1067
+ const lngPart = this.languageUtils.getLanguagePartFromCode(code);
1068
+ rule = this.getRule(lngPart, options);
1069
+ }
1070
+ this.pluralRulesCache[cacheKey] = rule;
1071
+ return rule;
1072
+ }
1073
+ needsPlural(code, options = {}) {
1074
+ let rule = this.getRule(code, options);
1075
+ if (!rule) rule = this.getRule('dev', options);
1076
+ return rule?.resolvedOptions().pluralCategories.length > 1;
1077
+ }
1078
+ getPluralFormsOfKey(code, key, options = {}) {
1079
+ return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);
1080
+ }
1081
+ getSuffixes(code, options = {}) {
1082
+ let rule = this.getRule(code, options);
1083
+ if (!rule) rule = this.getRule('dev', options);
1084
+ if (!rule) return [];
1085
+ return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);
1086
+ }
1087
+ getSuffix(code, count, options = {}) {
1088
+ const rule = this.getRule(code, options);
1089
+ if (rule) {
1090
+ return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;
1091
+ }
1092
+ this.logger.warn(`no plural rule found for: ${code}`);
1093
+ return this.getSuffix('dev', count, options);
1094
+ }
1095
+ }
1096
+
1097
+ const deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {
1098
+ let path = getPathWithDefaults(data, defaultData, key);
1099
+ if (!path && ignoreJSONStructure && isString(key)) {
1100
+ path = deepFind(data, key, keySeparator);
1101
+ if (path === undefined) path = deepFind(defaultData, key, keySeparator);
1102
+ }
1103
+ return path;
1104
+ };
1105
+ const regexSafe = val => val.replace(/\$/g, '$$$$');
1106
+ class Interpolator {
1107
+ constructor(options = {}) {
1108
+ this.logger = baseLogger.create('interpolator');
1109
+ this.options = options;
1110
+ this.format = options?.interpolation?.format || (value => value);
1111
+ this.init(options);
1112
+ }
1113
+ init(options = {}) {
1114
+ if (!options.interpolation) options.interpolation = {
1115
+ escapeValue: true
1116
+ };
1117
+ const {
1118
+ escape: escape$1,
1119
+ escapeValue,
1120
+ useRawValueToEscape,
1121
+ prefix,
1122
+ prefixEscaped,
1123
+ suffix,
1124
+ suffixEscaped,
1125
+ formatSeparator,
1126
+ unescapeSuffix,
1127
+ unescapePrefix,
1128
+ nestingPrefix,
1129
+ nestingPrefixEscaped,
1130
+ nestingSuffix,
1131
+ nestingSuffixEscaped,
1132
+ nestingOptionsSeparator,
1133
+ maxReplaces,
1134
+ alwaysFormat
1135
+ } = options.interpolation;
1136
+ this.escape = escape$1 !== undefined ? escape$1 : escape;
1137
+ this.escapeValue = escapeValue !== undefined ? escapeValue : true;
1138
+ this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;
1139
+ this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';
1140
+ this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';
1141
+ this.formatSeparator = formatSeparator || ',';
1142
+ this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';
1143
+ this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';
1144
+ this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');
1145
+ this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');
1146
+ this.nestingOptionsSeparator = nestingOptionsSeparator || ',';
1147
+ this.maxReplaces = maxReplaces || 1000;
1148
+ this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;
1149
+ this.resetRegExp();
1150
+ }
1151
+ reset() {
1152
+ if (this.options) this.init(this.options);
1153
+ }
1154
+ resetRegExp() {
1155
+ const getOrResetRegExp = (existingRegExp, pattern) => {
1156
+ if (existingRegExp?.source === pattern) {
1157
+ existingRegExp.lastIndex = 0;
1158
+ return existingRegExp;
1159
+ }
1160
+ return new RegExp(pattern, 'g');
1161
+ };
1162
+ this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);
1163
+ this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);
1164
+ this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
1165
+ }
1166
+ interpolate(str, data, lng, options) {
1167
+ let match;
1168
+ let value;
1169
+ let replaces;
1170
+ const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
1171
+ const handleFormat = key => {
1172
+ if (!key.includes(this.formatSeparator)) {
1173
+ const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
1174
+ return this.alwaysFormat ? this.format(path, undefined, lng, {
1175
+ ...options,
1176
+ ...data,
1177
+ interpolationkey: key
1178
+ }) : path;
1179
+ }
1180
+ const p = key.split(this.formatSeparator);
1181
+ const k = p.shift().trim();
1182
+ const f = p.join(this.formatSeparator).trim();
1183
+ return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {
1184
+ ...options,
1185
+ ...data,
1186
+ interpolationkey: k
1187
+ });
1188
+ };
1189
+ this.resetRegExp();
1190
+ if (!this.escapeValue && typeof str === 'string' && /\$t\([^)]*\{[^}]*\{\{/.test(str)) {
1191
+ this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');
1192
+ }
1193
+ const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
1194
+ const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1195
+ const todos = [{
1196
+ regex: this.regexpUnescape,
1197
+ safeValue: val => regexSafe(val)
1198
+ }, {
1199
+ regex: this.regexp,
1200
+ safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)
1201
+ }];
1202
+ todos.forEach(todo => {
1203
+ replaces = 0;
1204
+ while (match = todo.regex.exec(str)) {
1205
+ const matchedVar = match[1].trim();
1206
+ value = handleFormat(matchedVar);
1207
+ if (value === undefined) {
1208
+ if (typeof missingInterpolationHandler === 'function') {
1209
+ const temp = missingInterpolationHandler(str, match, options);
1210
+ value = isString(temp) ? temp : '';
1211
+ } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
1212
+ value = '';
1213
+ } else if (skipOnVariables) {
1214
+ value = match[0];
1215
+ continue;
1216
+ } else {
1217
+ this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
1218
+ value = '';
1219
+ }
1220
+ } else if (!isString(value) && !this.useRawValueToEscape) {
1221
+ value = makeString(value);
1222
+ }
1223
+ const safeValue = todo.safeValue(value);
1224
+ str = str.replace(match[0], safeValue);
1225
+ if (skipOnVariables) {
1226
+ todo.regex.lastIndex += value.length;
1227
+ todo.regex.lastIndex -= match[0].length;
1228
+ } else {
1229
+ todo.regex.lastIndex = 0;
1230
+ }
1231
+ replaces++;
1232
+ if (replaces >= this.maxReplaces) {
1233
+ break;
1234
+ }
1235
+ }
1236
+ });
1237
+ return str;
1238
+ }
1239
+ nest(str, fc, options = {}) {
1240
+ let match;
1241
+ let value;
1242
+ let clonedOptions;
1243
+ const handleHasOptions = (key, inheritedOptions) => {
1244
+ const sep = this.nestingOptionsSeparator;
1245
+ if (!key.includes(sep)) return key;
1246
+ const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));
1247
+ let optionsString = `{${c[1]}`;
1248
+ key = c[0];
1249
+ optionsString = this.interpolate(optionsString, clonedOptions);
1250
+ const matchedSingleQuotes = optionsString.match(/'/g);
1251
+ const matchedDoubleQuotes = optionsString.match(/"/g);
1252
+ if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {
1253
+ optionsString = optionsString.replace(/'/g, '"');
1254
+ }
1255
+ try {
1256
+ clonedOptions = JSON.parse(optionsString);
1257
+ if (inheritedOptions) clonedOptions = {
1258
+ ...inheritedOptions,
1259
+ ...clonedOptions
1260
+ };
1261
+ } catch (e) {
1262
+ this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
1263
+ return `${key}${sep}${optionsString}`;
1264
+ }
1265
+ if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
1266
+ return key;
1267
+ };
1268
+ while (match = this.nestingRegexp.exec(str)) {
1269
+ let formatters = [];
1270
+ clonedOptions = {
1271
+ ...options
1272
+ };
1273
+ clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
1274
+ clonedOptions.applyPostProcessor = false;
1275
+ delete clonedOptions.defaultValue;
1276
+ const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);
1277
+ if (keyEndIndex !== -1) {
1278
+ formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);
1279
+ match[1] = match[1].slice(0, keyEndIndex);
1280
+ }
1281
+ value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
1282
+ if (value && match[0] === str && !isString(value)) return value;
1283
+ if (!isString(value)) value = makeString(value);
1284
+ if (!value) {
1285
+ this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
1286
+ value = '';
1287
+ }
1288
+ if (formatters.length) {
1289
+ value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
1290
+ ...options,
1291
+ interpolationkey: match[1].trim()
1292
+ }), value.trim());
1293
+ }
1294
+ str = str.replace(match[0], value);
1295
+ this.regexp.lastIndex = 0;
1296
+ }
1297
+ return str;
1298
+ }
1299
+ }
1300
+
1301
+ const parseFormatStr = formatStr => {
1302
+ let formatName = formatStr.toLowerCase().trim();
1303
+ const formatOptions = {};
1304
+ if (formatStr.includes('(')) {
1305
+ const p = formatStr.split('(');
1306
+ formatName = p[0].toLowerCase().trim();
1307
+ const optStr = p[1].slice(0, -1);
1308
+ if (formatName === 'currency' && !optStr.includes(':')) {
1309
+ if (!formatOptions.currency) formatOptions.currency = optStr.trim();
1310
+ } else if (formatName === 'relativetime' && !optStr.includes(':')) {
1311
+ if (!formatOptions.range) formatOptions.range = optStr.trim();
1312
+ } else {
1313
+ const opts = optStr.split(';');
1314
+ opts.forEach(opt => {
1315
+ if (opt) {
1316
+ const [key, ...rest] = opt.split(':');
1317
+ const val = rest.join(':').trim().replace(/^'+|'+$/g, '');
1318
+ const trimmedKey = key.trim();
1319
+ if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;
1320
+ if (val === 'false') formatOptions[trimmedKey] = false;
1321
+ if (val === 'true') formatOptions[trimmedKey] = true;
1322
+ if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);
1323
+ }
1324
+ });
1325
+ }
1326
+ }
1327
+ return {
1328
+ formatName,
1329
+ formatOptions
1330
+ };
1331
+ };
1332
+ const createCachedFormatter = fn => {
1333
+ const cache = {};
1334
+ return (v, l, o) => {
1335
+ let optForCache = o;
1336
+ if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {
1337
+ optForCache = {
1338
+ ...optForCache,
1339
+ [o.interpolationkey]: undefined
1340
+ };
1341
+ }
1342
+ const key = l + JSON.stringify(optForCache);
1343
+ let frm = cache[key];
1344
+ if (!frm) {
1345
+ frm = fn(getCleanedCode(l), o);
1346
+ cache[key] = frm;
1347
+ }
1348
+ return frm(v);
1349
+ };
1350
+ };
1351
+ const createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);
1352
+ class Formatter {
1353
+ constructor(options = {}) {
1354
+ this.logger = baseLogger.create('formatter');
1355
+ this.options = options;
1356
+ this.init(options);
1357
+ }
1358
+ init(services, options = {
1359
+ interpolation: {}
1360
+ }) {
1361
+ this.formatSeparator = options.interpolation.formatSeparator || ',';
1362
+ const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;
1363
+ this.formats = {
1364
+ number: cf((lng, opt) => {
1365
+ const formatter = new Intl.NumberFormat(lng, {
1366
+ ...opt
1367
+ });
1368
+ return val => formatter.format(val);
1369
+ }),
1370
+ currency: cf((lng, opt) => {
1371
+ const formatter = new Intl.NumberFormat(lng, {
1372
+ ...opt,
1373
+ style: 'currency'
1374
+ });
1375
+ return val => formatter.format(val);
1376
+ }),
1377
+ datetime: cf((lng, opt) => {
1378
+ const formatter = new Intl.DateTimeFormat(lng, {
1379
+ ...opt
1380
+ });
1381
+ return val => formatter.format(val);
1382
+ }),
1383
+ relativetime: cf((lng, opt) => {
1384
+ const formatter = new Intl.RelativeTimeFormat(lng, {
1385
+ ...opt
1386
+ });
1387
+ return val => formatter.format(val, opt.range || 'day');
1388
+ }),
1389
+ list: cf((lng, opt) => {
1390
+ const formatter = new Intl.ListFormat(lng, {
1391
+ ...opt
1392
+ });
1393
+ return val => formatter.format(val);
1394
+ })
1395
+ };
1396
+ }
1397
+ add(name, fc) {
1398
+ this.formats[name.toLowerCase().trim()] = fc;
1399
+ }
1400
+ addCached(name, fc) {
1401
+ this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
1402
+ }
1403
+ format(value, format, lng, options = {}) {
1404
+ if (!format) return value;
1405
+ if (value == null) return value;
1406
+ const rawFormats = format.split(this.formatSeparator);
1407
+ const formats = [];
1408
+ for (let i = 0; i < rawFormats.length; i++) {
1409
+ let f = rawFormats[i];
1410
+ while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {
1411
+ f = `${f}${this.formatSeparator}${rawFormats[++i]}`;
1412
+ }
1413
+ formats.push(f);
1414
+ }
1415
+ const result = formats.reduce((mem, f) => {
1416
+ const {
1417
+ formatName,
1418
+ formatOptions
1419
+ } = parseFormatStr(f);
1420
+ if (this.formats[formatName]) {
1421
+ let formatted = mem;
1422
+ try {
1423
+ const valOptions = options?.formatParams?.[options.interpolationkey] || {};
1424
+ const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
1425
+ formatted = this.formats[formatName](mem, l, {
1426
+ ...formatOptions,
1427
+ ...options,
1428
+ ...valOptions
1429
+ });
1430
+ } catch (error) {
1431
+ this.logger.warn(error);
1432
+ }
1433
+ return formatted;
1434
+ } else {
1435
+ this.logger.warn(`there was no format function for ${formatName}`);
1436
+ }
1437
+ return mem;
1438
+ }, value);
1439
+ return result;
1440
+ }
1441
+ }
1442
+
1443
+ const removePending = (q, name) => {
1444
+ if (q.pending[name] !== undefined) {
1445
+ delete q.pending[name];
1446
+ q.pendingCount--;
1447
+ }
1448
+ };
1449
+ class Connector extends EventEmitter {
1450
+ constructor(backend, store, services, options = {}) {
1451
+ super();
1452
+ this.backend = backend;
1453
+ this.store = store;
1454
+ this.services = services;
1455
+ this.languageUtils = services.languageUtils;
1456
+ this.options = options;
1457
+ this.logger = baseLogger.create('backendConnector');
1458
+ this.waitingReads = [];
1459
+ this.maxParallelReads = options.maxParallelReads || 10;
1460
+ this.readingCalls = 0;
1461
+ this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
1462
+ this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
1463
+ this.state = {};
1464
+ this.queue = [];
1465
+ this.backend?.init?.(services, options.backend, options);
1466
+ }
1467
+ queueLoad(languages, namespaces, options, callback) {
1468
+ const toLoad = {};
1469
+ const pending = {};
1470
+ const toLoadLanguages = {};
1471
+ const toLoadNamespaces = {};
1472
+ languages.forEach(lng => {
1473
+ let hasAllNamespaces = true;
1474
+ namespaces.forEach(ns => {
1475
+ const name = `${lng}|${ns}`;
1476
+ if (!options.reload && this.store.hasResourceBundle(lng, ns)) {
1477
+ this.state[name] = 2;
1478
+ } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {
1479
+ if (pending[name] === undefined) pending[name] = true;
1480
+ } else {
1481
+ this.state[name] = 1;
1482
+ hasAllNamespaces = false;
1483
+ if (pending[name] === undefined) pending[name] = true;
1484
+ if (toLoad[name] === undefined) toLoad[name] = true;
1485
+ if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;
1486
+ }
1487
+ });
1488
+ if (!hasAllNamespaces) toLoadLanguages[lng] = true;
1489
+ });
1490
+ if (Object.keys(toLoad).length || Object.keys(pending).length) {
1491
+ this.queue.push({
1492
+ pending,
1493
+ pendingCount: Object.keys(pending).length,
1494
+ loaded: {},
1495
+ errors: [],
1496
+ callback
1497
+ });
1498
+ }
1499
+ return {
1500
+ toLoad: Object.keys(toLoad),
1501
+ pending: Object.keys(pending),
1502
+ toLoadLanguages: Object.keys(toLoadLanguages),
1503
+ toLoadNamespaces: Object.keys(toLoadNamespaces)
1504
+ };
1505
+ }
1506
+ loaded(name, err, data) {
1507
+ const s = name.split('|');
1508
+ const lng = s[0];
1509
+ const ns = s[1];
1510
+ if (err) this.emit('failedLoading', lng, ns, err);
1511
+ if (!err && data) {
1512
+ this.store.addResourceBundle(lng, ns, data, undefined, undefined, {
1513
+ skipCopy: true
1514
+ });
1515
+ }
1516
+ this.state[name] = err ? -1 : 2;
1517
+ if (err && data) this.state[name] = 0;
1518
+ const loaded = {};
1519
+ this.queue.forEach(q => {
1520
+ pushPath(q.loaded, [lng], ns);
1521
+ removePending(q, name);
1522
+ if (err) q.errors.push(err);
1523
+ if (q.pendingCount === 0 && !q.done) {
1524
+ Object.keys(q.loaded).forEach(l => {
1525
+ if (!loaded[l]) loaded[l] = {};
1526
+ const loadedKeys = q.loaded[l];
1527
+ if (loadedKeys.length) {
1528
+ loadedKeys.forEach(n => {
1529
+ if (loaded[l][n] === undefined) loaded[l][n] = true;
1530
+ });
1531
+ }
1532
+ });
1533
+ q.done = true;
1534
+ if (q.errors.length) {
1535
+ q.callback(q.errors);
1536
+ } else {
1537
+ q.callback();
1538
+ }
1539
+ }
1540
+ });
1541
+ this.emit('loaded', loaded);
1542
+ this.queue = this.queue.filter(q => !q.done);
1543
+ }
1544
+ read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {
1545
+ if (!lng.length) return callback(null, {});
1546
+ if (this.readingCalls >= this.maxParallelReads) {
1547
+ this.waitingReads.push({
1548
+ lng,
1549
+ ns,
1550
+ fcName,
1551
+ tried,
1552
+ wait,
1553
+ callback
1554
+ });
1555
+ return;
1556
+ }
1557
+ this.readingCalls++;
1558
+ const resolver = (err, data) => {
1559
+ this.readingCalls--;
1560
+ if (this.waitingReads.length > 0) {
1561
+ const next = this.waitingReads.shift();
1562
+ this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
1563
+ }
1564
+ if (err && data && tried < this.maxRetries) {
1565
+ setTimeout(() => {
1566
+ this.read(lng, ns, fcName, tried + 1, wait * 2, callback);
1567
+ }, wait);
1568
+ return;
1569
+ }
1570
+ callback(err, data);
1571
+ };
1572
+ const fc = this.backend[fcName].bind(this.backend);
1573
+ if (fc.length === 2) {
1574
+ try {
1575
+ const r = fc(lng, ns);
1576
+ if (r && typeof r.then === 'function') {
1577
+ r.then(data => resolver(null, data)).catch(resolver);
1578
+ } else {
1579
+ resolver(null, r);
1580
+ }
1581
+ } catch (err) {
1582
+ resolver(err);
1583
+ }
1584
+ return;
1585
+ }
1586
+ return fc(lng, ns, resolver);
1587
+ }
1588
+ prepareLoading(languages, namespaces, options = {}, callback) {
1589
+ if (!this.backend) {
1590
+ this.logger.warn('No backend was added via i18next.use. Will not load resources.');
1591
+ return callback && callback();
1592
+ }
1593
+ if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
1594
+ if (isString(namespaces)) namespaces = [namespaces];
1595
+ const toLoad = this.queueLoad(languages, namespaces, options, callback);
1596
+ if (!toLoad.toLoad.length) {
1597
+ if (!toLoad.pending.length) callback();
1598
+ return null;
1599
+ }
1600
+ toLoad.toLoad.forEach(name => {
1601
+ this.loadOne(name);
1602
+ });
1603
+ }
1604
+ load(languages, namespaces, callback) {
1605
+ this.prepareLoading(languages, namespaces, {}, callback);
1606
+ }
1607
+ reload(languages, namespaces, callback) {
1608
+ this.prepareLoading(languages, namespaces, {
1609
+ reload: true
1610
+ }, callback);
1611
+ }
1612
+ loadOne(name, prefix = '') {
1613
+ const s = name.split('|');
1614
+ const lng = s[0];
1615
+ const ns = s[1];
1616
+ this.read(lng, ns, 'read', undefined, undefined, (err, data) => {
1617
+ if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);
1618
+ if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);
1619
+ this.loaded(name, err, data);
1620
+ });
1621
+ }
1622
+ saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {
1623
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {
1624
+ this.logger.warn(`did not save key "${key}" as the namespace "${namespace}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1625
+ return;
1626
+ }
1627
+ if (key === undefined || key === null || key === '') return;
1628
+ if (this.backend?.create) {
1629
+ const opts = {
1630
+ ...options,
1631
+ isUpdate
1632
+ };
1633
+ const fc = this.backend.create.bind(this.backend);
1634
+ if (fc.length < 6) {
1635
+ try {
1636
+ let r;
1637
+ if (fc.length === 5) {
1638
+ r = fc(languages, namespace, key, fallbackValue, opts);
1639
+ } else {
1640
+ r = fc(languages, namespace, key, fallbackValue);
1641
+ }
1642
+ if (r && typeof r.then === 'function') {
1643
+ r.then(data => clb(null, data)).catch(clb);
1644
+ } else {
1645
+ clb(null, r);
1646
+ }
1647
+ } catch (err) {
1648
+ clb(err);
1649
+ }
1650
+ } else {
1651
+ fc(languages, namespace, key, fallbackValue, clb, opts);
1652
+ }
1653
+ }
1654
+ if (!languages || !languages[0]) return;
1655
+ this.store.addResource(languages[0], namespace, key, fallbackValue);
1656
+ }
1657
+ }
1658
+
1659
+ const get = () => ({
1660
+ debug: false,
1661
+ initAsync: true,
1662
+ ns: ['translation'],
1663
+ defaultNS: ['translation'],
1664
+ fallbackLng: ['dev'],
1665
+ fallbackNS: false,
1666
+ supportedLngs: false,
1667
+ nonExplicitSupportedLngs: false,
1668
+ load: 'all',
1669
+ preload: false,
1670
+ keySeparator: '.',
1671
+ nsSeparator: ':',
1672
+ pluralSeparator: '_',
1673
+ contextSeparator: '_',
1674
+ enableSelector: false,
1675
+ partialBundledLanguages: false,
1676
+ saveMissing: false,
1677
+ updateMissing: false,
1678
+ saveMissingTo: 'fallback',
1679
+ saveMissingPlurals: true,
1680
+ missingKeyHandler: false,
1681
+ missingInterpolationHandler: false,
1682
+ postProcess: false,
1683
+ postProcessPassResolved: false,
1684
+ returnNull: false,
1685
+ returnEmptyString: true,
1686
+ returnObjects: false,
1687
+ joinArrays: false,
1688
+ returnedObjectHandler: false,
1689
+ parseMissingKeyHandler: false,
1690
+ appendNamespaceToMissingKey: false,
1691
+ appendNamespaceToCIMode: false,
1692
+ overloadTranslationOptionHandler: args => {
1693
+ let ret = {};
1694
+ if (typeof args[1] === 'object') ret = args[1];
1695
+ if (isString(args[1])) ret.defaultValue = args[1];
1696
+ if (isString(args[2])) ret.tDescription = args[2];
1697
+ if (typeof args[2] === 'object' || typeof args[3] === 'object') {
1698
+ const options = args[3] || args[2];
1699
+ Object.keys(options).forEach(key => {
1700
+ ret[key] = options[key];
1701
+ });
1702
+ }
1703
+ return ret;
1704
+ },
1705
+ interpolation: {
1706
+ escapeValue: true,
1707
+ prefix: '{{',
1708
+ suffix: '}}',
1709
+ formatSeparator: ',',
1710
+ unescapePrefix: '-',
1711
+ nestingPrefix: '$t(',
1712
+ nestingSuffix: ')',
1713
+ nestingOptionsSeparator: ',',
1714
+ maxReplaces: 1000,
1715
+ skipOnVariables: true
1716
+ },
1717
+ cacheInBuiltFormats: true
1718
+ });
1719
+ const transformOptions = options => {
1720
+ if (isString(options.ns)) options.ns = [options.ns];
1721
+ if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
1722
+ if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
1723
+ if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {
1724
+ options.supportedLngs = options.supportedLngs.concat(['cimode']);
1725
+ }
1726
+ return options;
1727
+ };
1728
+
1729
+ const noop = () => {};
1730
+ const bindMemberFunctions = inst => {
1731
+ const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
1732
+ mems.forEach(mem => {
1733
+ if (typeof inst[mem] === 'function') {
1734
+ inst[mem] = inst[mem].bind(inst);
1735
+ }
1736
+ });
1737
+ };
1738
+ class I18n extends EventEmitter {
1739
+ constructor(options = {}, callback) {
1740
+ super();
1741
+ this.options = transformOptions(options);
1742
+ this.services = {};
1743
+ this.logger = baseLogger;
1744
+ this.modules = {
1745
+ external: []
1746
+ };
1747
+ bindMemberFunctions(this);
1748
+ if (callback && !this.isInitialized && !options.isClone) {
1749
+ if (!this.options.initAsync) {
1750
+ this.init(options, callback);
1751
+ return this;
1752
+ }
1753
+ setTimeout(() => {
1754
+ this.init(options, callback);
1755
+ }, 0);
1756
+ }
1757
+ }
1758
+ init(options = {}, callback) {
1759
+ this.isInitializing = true;
1760
+ if (typeof options === 'function') {
1761
+ callback = options;
1762
+ options = {};
1763
+ }
1764
+ if (options.defaultNS == null && options.ns) {
1765
+ if (isString(options.ns)) {
1766
+ options.defaultNS = options.ns;
1767
+ } else if (!options.ns.includes('translation')) {
1768
+ options.defaultNS = options.ns[0];
1769
+ }
1770
+ }
1771
+ const defOpts = get();
1772
+ this.options = {
1773
+ ...defOpts,
1774
+ ...this.options,
1775
+ ...transformOptions(options)
1776
+ };
1777
+ this.options.interpolation = {
1778
+ ...defOpts.interpolation,
1779
+ ...this.options.interpolation
1780
+ };
1781
+ if (options.keySeparator !== undefined) {
1782
+ this.options.userDefinedKeySeparator = options.keySeparator;
1783
+ }
1784
+ if (options.nsSeparator !== undefined) {
1785
+ this.options.userDefinedNsSeparator = options.nsSeparator;
1786
+ }
1787
+ if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
1788
+ this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
1789
+ }
1790
+ const createClassOnDemand = ClassOrObject => {
1791
+ if (!ClassOrObject) return null;
1792
+ if (typeof ClassOrObject === 'function') return new ClassOrObject();
1793
+ return ClassOrObject;
1794
+ };
1795
+ if (!this.options.isClone) {
1796
+ if (this.modules.logger) {
1797
+ baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
1798
+ } else {
1799
+ baseLogger.init(null, this.options);
1800
+ }
1801
+ let formatter;
1802
+ if (this.modules.formatter) {
1803
+ formatter = this.modules.formatter;
1804
+ } else {
1805
+ formatter = Formatter;
1806
+ }
1807
+ const lu = new LanguageUtil(this.options);
1808
+ this.store = new ResourceStore(this.options.resources, this.options);
1809
+ const s = this.services;
1810
+ s.logger = baseLogger;
1811
+ s.resourceStore = this.store;
1812
+ s.languageUtils = lu;
1813
+ s.pluralResolver = new PluralResolver(lu, {
1814
+ prepend: this.options.pluralSeparator
1815
+ });
1816
+ if (formatter) {
1817
+ s.formatter = createClassOnDemand(formatter);
1818
+ if (s.formatter.init) s.formatter.init(s, this.options);
1819
+ this.options.interpolation.format = s.formatter.format.bind(s.formatter);
1820
+ }
1821
+ s.interpolator = new Interpolator(this.options);
1822
+ s.utils = {
1823
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1824
+ };
1825
+ s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
1826
+ s.backendConnector.on('*', (event, ...args) => {
1827
+ this.emit(event, ...args);
1828
+ });
1829
+ if (this.modules.languageDetector) {
1830
+ s.languageDetector = createClassOnDemand(this.modules.languageDetector);
1831
+ if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);
1832
+ }
1833
+ if (this.modules.i18nFormat) {
1834
+ s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
1835
+ if (s.i18nFormat.init) s.i18nFormat.init(this);
1836
+ }
1837
+ this.translator = new Translator(this.services, this.options);
1838
+ this.translator.on('*', (event, ...args) => {
1839
+ this.emit(event, ...args);
1840
+ });
1841
+ this.modules.external.forEach(m => {
1842
+ if (m.init) m.init(this);
1843
+ });
1844
+ }
1845
+ this.format = this.options.interpolation.format;
1846
+ if (!callback) callback = noop;
1847
+ if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1848
+ const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1849
+ if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
1850
+ }
1851
+ if (!this.services.languageDetector && !this.options.lng) {
1852
+ this.logger.warn('init: no languageDetector is used and no lng is defined');
1853
+ }
1854
+ const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
1855
+ storeApi.forEach(fcName => {
1856
+ this[fcName] = (...args) => this.store[fcName](...args);
1857
+ });
1858
+ const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
1859
+ storeApiChained.forEach(fcName => {
1860
+ this[fcName] = (...args) => {
1861
+ this.store[fcName](...args);
1862
+ return this;
1863
+ };
1864
+ });
1865
+ const deferred = defer();
1866
+ const load = () => {
1867
+ const finish = (err, t) => {
1868
+ this.isInitializing = false;
1869
+ if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');
1870
+ this.isInitialized = true;
1871
+ if (!this.options.isClone) this.logger.log('initialized', this.options);
1872
+ this.emit('initialized', this.options);
1873
+ deferred.resolve(t);
1874
+ callback(err, t);
1875
+ };
1876
+ if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));
1877
+ this.changeLanguage(this.options.lng, finish);
1878
+ };
1879
+ if (this.options.resources || !this.options.initAsync) {
1880
+ load();
1881
+ } else {
1882
+ setTimeout(load, 0);
1883
+ }
1884
+ return deferred;
1885
+ }
1886
+ loadResources(language, callback = noop) {
1887
+ let usedCallback = callback;
1888
+ const usedLng = isString(language) ? language : this.language;
1889
+ if (typeof language === 'function') usedCallback = language;
1890
+ if (!this.options.resources || this.options.partialBundledLanguages) {
1891
+ if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
1892
+ const toLoad = [];
1893
+ const append = lng => {
1894
+ if (!lng) return;
1895
+ if (lng === 'cimode') return;
1896
+ const lngs = this.services.languageUtils.toResolveHierarchy(lng);
1897
+ lngs.forEach(l => {
1898
+ if (l === 'cimode') return;
1899
+ if (!toLoad.includes(l)) toLoad.push(l);
1900
+ });
1901
+ };
1902
+ if (!usedLng) {
1903
+ const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1904
+ fallbacks.forEach(l => append(l));
1905
+ } else {
1906
+ append(usedLng);
1907
+ }
1908
+ this.options.preload?.forEach?.(l => append(l));
1909
+ this.services.backendConnector.load(toLoad, this.options.ns, e => {
1910
+ if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);
1911
+ usedCallback(e);
1912
+ });
1913
+ } else {
1914
+ usedCallback(null);
1915
+ }
1916
+ }
1917
+ reloadResources(lngs, ns, callback) {
1918
+ const deferred = defer();
1919
+ if (typeof lngs === 'function') {
1920
+ callback = lngs;
1921
+ lngs = undefined;
1922
+ }
1923
+ if (typeof ns === 'function') {
1924
+ callback = ns;
1925
+ ns = undefined;
1926
+ }
1927
+ if (!lngs) lngs = this.languages;
1928
+ if (!ns) ns = this.options.ns;
1929
+ if (!callback) callback = noop;
1930
+ this.services.backendConnector.reload(lngs, ns, err => {
1931
+ deferred.resolve();
1932
+ callback(err);
1933
+ });
1934
+ return deferred;
1935
+ }
1936
+ use(module) {
1937
+ if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
1938
+ if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
1939
+ if (module.type === 'backend') {
1940
+ this.modules.backend = module;
1941
+ }
1942
+ if (module.type === 'logger' || module.log && module.warn && module.error) {
1943
+ this.modules.logger = module;
1944
+ }
1945
+ if (module.type === 'languageDetector') {
1946
+ this.modules.languageDetector = module;
1947
+ }
1948
+ if (module.type === 'i18nFormat') {
1949
+ this.modules.i18nFormat = module;
1950
+ }
1951
+ if (module.type === 'postProcessor') {
1952
+ postProcessor.addPostProcessor(module);
1953
+ }
1954
+ if (module.type === 'formatter') {
1955
+ this.modules.formatter = module;
1956
+ }
1957
+ if (module.type === '3rdParty') {
1958
+ this.modules.external.push(module);
1959
+ }
1960
+ return this;
1961
+ }
1962
+ setResolvedLanguage(l) {
1963
+ if (!l || !this.languages) return;
1964
+ if (['cimode', 'dev'].includes(l)) return;
1965
+ for (let li = 0; li < this.languages.length; li++) {
1966
+ const lngInLngs = this.languages[li];
1967
+ if (['cimode', 'dev'].includes(lngInLngs)) continue;
1968
+ if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
1969
+ this.resolvedLanguage = lngInLngs;
1970
+ break;
1971
+ }
1972
+ }
1973
+ if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {
1974
+ this.resolvedLanguage = l;
1975
+ this.languages.unshift(l);
1976
+ }
1977
+ }
1978
+ changeLanguage(lng, callback) {
1979
+ this.isLanguageChangingTo = lng;
1980
+ const deferred = defer();
1981
+ this.emit('languageChanging', lng);
1982
+ const setLngProps = l => {
1983
+ this.language = l;
1984
+ this.languages = this.services.languageUtils.toResolveHierarchy(l);
1985
+ this.resolvedLanguage = undefined;
1986
+ this.setResolvedLanguage(l);
1987
+ };
1988
+ const done = (err, l) => {
1989
+ if (l) {
1990
+ if (this.isLanguageChangingTo === lng) {
1991
+ setLngProps(l);
1992
+ this.translator.changeLanguage(l);
1993
+ this.isLanguageChangingTo = undefined;
1994
+ this.emit('languageChanged', l);
1995
+ this.logger.log('languageChanged', l);
1996
+ }
1997
+ } else {
1998
+ this.isLanguageChangingTo = undefined;
1999
+ }
2000
+ deferred.resolve((...args) => this.t(...args));
2001
+ if (callback) callback(err, (...args) => this.t(...args));
2002
+ };
2003
+ const setLng = lngs => {
2004
+ if (!lng && !lngs && this.services.languageDetector) lngs = [];
2005
+ const fl = isString(lngs) ? lngs : lngs && lngs[0];
2006
+ const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);
2007
+ if (l) {
2008
+ if (!this.language) {
2009
+ setLngProps(l);
2010
+ }
2011
+ if (!this.translator.language) this.translator.changeLanguage(l);
2012
+ this.services.languageDetector?.cacheUserLanguage?.(l);
2013
+ }
2014
+ this.loadResources(l, err => {
2015
+ done(err, l);
2016
+ });
2017
+ };
2018
+ if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
2019
+ setLng(this.services.languageDetector.detect());
2020
+ } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
2021
+ if (this.services.languageDetector.detect.length === 0) {
2022
+ this.services.languageDetector.detect().then(setLng);
2023
+ } else {
2024
+ this.services.languageDetector.detect(setLng);
2025
+ }
2026
+ } else {
2027
+ setLng(lng);
2028
+ }
2029
+ return deferred;
2030
+ }
2031
+ getFixedT(lng, ns, keyPrefix, fixedOpts) {
2032
+ const scopeNs = fixedOpts?.scopeNs;
2033
+ const fixedT = (key, opts, ...rest) => {
2034
+ let o;
2035
+ if (typeof opts !== 'object') {
2036
+ o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));
2037
+ } else {
2038
+ o = {
2039
+ ...opts
2040
+ };
2041
+ }
2042
+ o.lng = o.lng || fixedT.lng;
2043
+ o.lngs = o.lngs || fixedT.lngs;
2044
+ const explicitCallNs = o.ns !== undefined && o.ns !== null;
2045
+ o.ns = o.ns || fixedT.ns;
2046
+ if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;
2047
+ const selectorOpts = {
2048
+ ...this.options,
2049
+ ...o
2050
+ };
2051
+ if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;
2052
+ if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);
2053
+ const keySeparator = this.options.keySeparator || '.';
2054
+ let resultKey;
2055
+ if (o.keyPrefix && Array.isArray(key)) {
2056
+ resultKey = key.map(k => {
2057
+ if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);
2058
+ return `${o.keyPrefix}${keySeparator}${k}`;
2059
+ });
2060
+ } else {
2061
+ if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);
2062
+ resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;
2063
+ }
2064
+ return this.t(resultKey, o);
2065
+ };
2066
+ if (isString(lng)) {
2067
+ fixedT.lng = lng;
2068
+ } else {
2069
+ fixedT.lngs = lng;
2070
+ }
2071
+ fixedT.ns = ns;
2072
+ fixedT.keyPrefix = keyPrefix;
2073
+ return fixedT;
2074
+ }
2075
+ t(...args) {
2076
+ return this.translator?.translate(...args);
2077
+ }
2078
+ exists(...args) {
2079
+ return this.translator?.exists(...args);
2080
+ }
2081
+ setDefaultNamespace(ns) {
2082
+ this.options.defaultNS = ns;
2083
+ }
2084
+ hasLoadedNamespace(ns, options = {}) {
2085
+ if (!this.isInitialized) {
2086
+ this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
2087
+ return false;
2088
+ }
2089
+ if (!this.languages || !this.languages.length) {
2090
+ this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
2091
+ return false;
2092
+ }
2093
+ const lng = options.lng || this.resolvedLanguage || this.languages[0];
2094
+ const fallbackLng = this.options ? this.options.fallbackLng : false;
2095
+ const lastLng = this.languages[this.languages.length - 1];
2096
+ if (lng.toLowerCase() === 'cimode') return true;
2097
+ const loadNotPending = (l, n) => {
2098
+ const loadState = this.services.backendConnector.state[`${l}|${n}`];
2099
+ return loadState === -1 || loadState === 0 || loadState === 2;
2100
+ };
2101
+ if (options.precheck) {
2102
+ const preResult = options.precheck(this, loadNotPending);
2103
+ if (preResult !== undefined) return preResult;
2104
+ }
2105
+ if (this.hasResourceBundle(lng, ns)) return true;
2106
+ if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
2107
+ if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
2108
+ return false;
2109
+ }
2110
+ loadNamespaces(ns, callback) {
2111
+ const deferred = defer();
2112
+ if (!this.options.ns) {
2113
+ if (callback) callback();
2114
+ return Promise.resolve();
2115
+ }
2116
+ if (isString(ns)) ns = [ns];
2117
+ ns.forEach(n => {
2118
+ if (!this.options.ns.includes(n)) this.options.ns.push(n);
2119
+ });
2120
+ this.loadResources(err => {
2121
+ deferred.resolve();
2122
+ if (callback) callback(err);
2123
+ });
2124
+ return deferred;
2125
+ }
2126
+ loadLanguages(lngs, callback) {
2127
+ const deferred = defer();
2128
+ if (isString(lngs)) lngs = [lngs];
2129
+ const preloaded = this.options.preload || [];
2130
+ const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));
2131
+ if (!newLngs.length) {
2132
+ if (callback) callback();
2133
+ return Promise.resolve();
2134
+ }
2135
+ this.options.preload = preloaded.concat(newLngs);
2136
+ this.loadResources(err => {
2137
+ deferred.resolve();
2138
+ if (callback) callback(err);
2139
+ });
2140
+ return deferred;
2141
+ }
2142
+ dir(lng) {
2143
+ if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
2144
+ if (!lng) return 'rtl';
2145
+ try {
2146
+ const l = new Intl.Locale(lng);
2147
+ if (l && l.getTextInfo) {
2148
+ const ti = l.getTextInfo();
2149
+ if (ti && ti.direction) return ti.direction;
2150
+ }
2151
+ } catch (e) {}
2152
+ const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
2153
+ const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
2154
+ if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
2155
+ return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
2156
+ }
2157
+ static createInstance(options = {}, callback) {
2158
+ const instance = new I18n(options, callback);
2159
+ instance.createInstance = I18n.createInstance;
2160
+ return instance;
2161
+ }
2162
+ cloneInstance(options = {}, callback = noop) {
2163
+ const forkResourceStore = options.forkResourceStore;
2164
+ if (forkResourceStore) delete options.forkResourceStore;
2165
+ const mergedOptions = {
2166
+ ...this.options,
2167
+ ...options,
2168
+ ...{
2169
+ isClone: true
2170
+ }
2171
+ };
2172
+ const clone = new I18n(mergedOptions);
2173
+ if (options.debug !== undefined || options.prefix !== undefined) {
2174
+ clone.logger = clone.logger.clone(options);
2175
+ }
2176
+ const membersToCopy = ['store', 'services', 'language'];
2177
+ membersToCopy.forEach(m => {
2178
+ clone[m] = this[m];
2179
+ });
2180
+ clone.services = {
2181
+ ...this.services
2182
+ };
2183
+ clone.services.utils = {
2184
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2185
+ };
2186
+ if (forkResourceStore) {
2187
+ const clonedData = Object.keys(this.store.data).reduce((prev, l) => {
2188
+ prev[l] = {
2189
+ ...this.store.data[l]
2190
+ };
2191
+ prev[l] = Object.keys(prev[l]).reduce((acc, n) => {
2192
+ acc[n] = {
2193
+ ...prev[l][n]
2194
+ };
2195
+ return acc;
2196
+ }, prev[l]);
2197
+ return prev;
2198
+ }, {});
2199
+ clone.store = new ResourceStore(clonedData, mergedOptions);
2200
+ clone.services.resourceStore = clone.store;
2201
+ }
2202
+ if (options.interpolation) {
2203
+ const defOpts = get();
2204
+ const mergedInterpolation = {
2205
+ ...defOpts.interpolation,
2206
+ ...this.options.interpolation,
2207
+ ...options.interpolation
2208
+ };
2209
+ const mergedForInterpolator = {
2210
+ ...mergedOptions,
2211
+ interpolation: mergedInterpolation
2212
+ };
2213
+ clone.services.interpolator = new Interpolator(mergedForInterpolator);
2214
+ }
2215
+ clone.translator = new Translator(clone.services, mergedOptions);
2216
+ clone.translator.on('*', (event, ...args) => {
2217
+ clone.emit(event, ...args);
2218
+ });
2219
+ clone.init(mergedOptions, callback);
2220
+ clone.translator.options = mergedOptions;
2221
+ clone.translator.backendConnector.services.utils = {
2222
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2223
+ };
2224
+ return clone;
2225
+ }
2226
+ toJSON() {
2227
+ return {
2228
+ options: this.options,
2229
+ store: this.store,
2230
+ language: this.language,
2231
+ languages: this.languages,
2232
+ resolvedLanguage: this.resolvedLanguage
2233
+ };
2234
+ }
2235
+ }
2236
+ const instance = I18n.createInstance();
2237
+
2238
+ /** Texte der Fink-Komponenten. Deutsch ist die Ausgangssprache, Englisch die Übersetzung. */
2239
+ const de = {
2240
+ appShell: {
2241
+ skip: 'Zum Inhalt springen',
2242
+ openNav: 'Navigation öffnen',
2243
+ closeNav: 'Navigation schließen',
2244
+ nav: 'Hauptnavigation',
2245
+ compactNav: 'Navigation auf Symbole verkleinern',
2246
+ expandNav: 'Navigation mit Beschriftungen anzeigen',
2247
+ },
2248
+ statCard: { up: 'gestiegen um', down: 'gesunken um', flat: 'unverändert' },
2249
+ barChart: { labelHeader: 'Bezeichnung', valueHeader: 'Wert' },
2250
+ stepper: { label: 'Fortschritt', done: 'abgeschlossen', current: 'aktueller Schritt', todo: 'ausstehend' },
2251
+ chip: { remove: '{{label}} entfernen' },
2252
+ selectionBar: { region: 'Massenaktionen', selected: '{{count}} {{items}} ausgewählt', items: 'Einträge', clear: 'Auswahl aufheben' },
2253
+ timeline: { label: 'Verlauf' },
2254
+ result: { reference: 'Ihre Vorgangsnummer' },
2255
+ footer: { legal: 'Rechtliches' },
2256
+ fileUpload: {
2257
+ drop: 'Dateien hierher ziehen oder',
2258
+ chooseMany: 'Dateien auswählen',
2259
+ chooseOne: 'Datei auswählen',
2260
+ list: 'Ausgewählte Dateien',
2261
+ remove: '{{name}} entfernen',
2262
+ tooLarge: 'Die Datei ist größer als {{size}}.',
2263
+ wrongType: 'Dieses Dateiformat ist nicht erlaubt ({{accept}}).',
2264
+ added_one: '{{count}} Datei hinzugefügt',
2265
+ added_other: '{{count}} Dateien hinzugefügt',
2266
+ invalid: ', davon {{count}} mit Fehler',
2267
+ removed: '{{name}} entfernt.',
2268
+ },
2269
+ taskList: {
2270
+ progress: '{{done}} von {{total}} Aufgaben erledigt',
2271
+ done: 'Erledigt',
2272
+ inProgress: 'In Bearbeitung',
2273
+ todo: 'Offen',
2274
+ blocked: 'Noch nicht möglich',
2275
+ error: 'Fehler',
2276
+ },
2277
+ consent: {
2278
+ heading: 'Cookies auf dieser Website',
2279
+ description: 'Wir verwenden notwendige Cookies, damit die Website funktioniert. Mit Ihrer Zustimmung nutzen wir weitere Cookies, um das Angebot zu verbessern.',
2280
+ categories: 'Cookie-Kategorien',
2281
+ necessary: 'Notwendig',
2282
+ necessaryHint: 'Sitzung, Sicherheit und Ihre Cookie-Auswahl.',
2283
+ statistics: 'Statistik',
2284
+ statisticsHint: 'Anonyme Nutzungsstatistik zur Verbesserung des Angebots.',
2285
+ comfort: 'Komfort',
2286
+ comfortHint: 'Gespeicherte Einstellungen wie Sprache und Darstellung.',
2287
+ acceptAll: 'Alle akzeptieren',
2288
+ necessaryOnly: 'Nur notwendige',
2289
+ save: 'Auswahl speichern',
2290
+ settings: 'Einstellungen',
2291
+ },
2292
+ feedback: {
2293
+ region: 'Feedback zur Seite',
2294
+ question: 'War diese Seite hilfreich?',
2295
+ yes: 'Ja',
2296
+ no: 'Nein',
2297
+ improve: 'Was können wir verbessern?',
2298
+ hint: 'Bitte keine persönlichen Daten angeben.',
2299
+ send: 'Feedback senden',
2300
+ cancel: 'Abbrechen',
2301
+ thanks: 'Vielen Dank für Ihr Feedback!',
2302
+ },
2303
+ rating: { star_one: '{{count}} Stern', star_other: '{{count}} Sterne', summary: '{{label}}: {{value}} von {{max}} Sternen' },
2304
+ bottomNav: { label: 'Hauptbereiche', new: '{{count}} neu' },
2305
+ codeBlock: { variants: 'Code-Varianten', copy: 'Kopieren', copied: 'Kopiert', status: 'Code in die Zwischenablage kopiert', region: 'Code ({{name}})' },
2306
+ skeleton: { loading: 'Inhalte werden geladen' },
2307
+ list: { badge_one: '{{count}} neu', badge_other: '{{count}} neu' },
2308
+ avatarGroup: { summary: '{{label}}: {{count}} Personen ({{names}})' },
2309
+ tagInput: {
2310
+ hint: 'Mit Enter oder Komma übernehmen, Rücktaste entfernt den letzten Eintrag.',
2311
+ selected: 'Ausgewählt für {{label}}',
2312
+ added: '{{value}} hinzugefügt',
2313
+ removed: '{{value}} entfernt',
2314
+ duplicate: '{{value}} ist bereits ausgewählt.',
2315
+ notAllowed: '{{value}} steht nicht zur Auswahl.',
2316
+ max: 'Höchstens {{count}} Einträge möglich.',
2317
+ },
2318
+ backToTop: { label: 'Nach oben' },
2319
+ fab: { close: 'Aktionen schließen' },
2320
+ rangeSlider: { from: '{{label}}: Minimum', to: '{{label}}: Maximum', fromShort: 'Von', toShort: 'Bis' },
2321
+ calendar: { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
2322
+ carousel: {
2323
+ carousel: 'Karussell',
2324
+ slide: 'Folie',
2325
+ slides: 'Folien',
2326
+ position: '{{index}} von {{count}}',
2327
+ prev: 'Vorherige Folie',
2328
+ next: 'Nächste Folie',
2329
+ play: 'Automatisches Weiterschalten starten',
2330
+ pause: 'Automatisches Weiterschalten anhalten',
2331
+ choose: 'Folie wählen',
2332
+ goTo: 'Folie {{index}}',
2333
+ },
2334
+ otp: { digit: 'Stelle {{index}} von {{count}}' },
2335
+ transfer: {
2336
+ source: 'Verfügbar',
2337
+ target: 'Ausgewählt',
2338
+ selectAll: 'Alle in {{label}} auswählen',
2339
+ count: '{{selected}}/{{total}} gewählt',
2340
+ search: '{{label}} durchsuchen',
2341
+ searchPlaceholder: 'Liste filtern',
2342
+ empty: 'Keine Einträge',
2343
+ right_one: '{{count}} Eintrag hinzufügen',
2344
+ right_other: '{{count}} Einträge hinzufügen',
2345
+ left_one: '{{count}} Eintrag entfernen',
2346
+ left_other: '{{count}} Einträge entfernen',
2347
+ movedRight_one: '{{count}} Eintrag hinzugefügt',
2348
+ movedRight_other: '{{count}} Einträge hinzugefügt',
2349
+ movedLeft_one: '{{count}} Eintrag entfernt',
2350
+ movedLeft_other: '{{count}} Einträge entfernt',
2351
+ },
2352
+ toc: { label: 'Auf dieser Seite' },
2353
+ sparkline: { summary: '{{label}}: {{count}} Werte, von {{first}} auf {{last}}, Minimum {{min}}, Maximum {{max}}' },
2354
+ imageList: { open: '{{alt}} vergrößern', prev: 'Vorheriges Bild', next: 'Nächstes Bild', position: 'Bild {{index}} von {{count}}' },
2355
+ tour: { step: 'Schritt {{index}} von {{count}}', skip: 'Tour beenden', back: 'Zurück', next: 'Weiter', finish: 'Fertig' },
2356
+ virtualList: { region: '{{label}}, {{count}} Einträge', rendered: '{{shown}} von {{count}} Zeilen gerendert' },
2357
+ popconfirm: { confirm: 'Ja', cancel: 'Abbrechen' },
2358
+ infinite: { loading: 'Weitere Einträge werden geladen', done: 'Alle Einträge geladen', count: '{{count}} Einträge geladen', more: 'Mehr laden' },
2359
+ splitter: { label: 'Größe der Bereiche' },
2360
+ };
2361
+ const en = {
2362
+ appShell: {
2363
+ skip: 'Skip to content',
2364
+ openNav: 'Open navigation',
2365
+ closeNav: 'Close navigation',
2366
+ nav: 'Main navigation',
2367
+ compactNav: 'Collapse navigation to icons',
2368
+ expandNav: 'Show navigation with labels',
2369
+ },
2370
+ statCard: { up: 'up by', down: 'down by', flat: 'unchanged' },
2371
+ barChart: { labelHeader: 'Label', valueHeader: 'Value' },
2372
+ stepper: { label: 'Progress', done: 'completed', current: 'current step', todo: 'not started' },
2373
+ chip: { remove: 'Remove {{label}}' },
2374
+ selectionBar: { region: 'Bulk actions', selected: '{{count}} {{items}} selected', items: 'items', clear: 'Clear selection' },
2375
+ timeline: { label: 'History' },
2376
+ result: { reference: 'Your reference number' },
2377
+ footer: { legal: 'Legal' },
2378
+ fileUpload: {
2379
+ drop: 'Drag files here or',
2380
+ chooseMany: 'Choose files',
2381
+ chooseOne: 'Choose file',
2382
+ list: 'Selected files',
2383
+ remove: 'Remove {{name}}',
2384
+ tooLarge: 'The file is larger than {{size}}.',
2385
+ wrongType: 'This file type is not allowed ({{accept}}).',
2386
+ added_one: '{{count}} file added',
2387
+ added_other: '{{count}} files added',
2388
+ invalid: ', {{count}} with errors',
2389
+ removed: '{{name}} removed.',
2390
+ },
2391
+ taskList: {
2392
+ progress: '{{done}} of {{total}} tasks completed',
2393
+ done: 'Completed',
2394
+ inProgress: 'In progress',
2395
+ todo: 'Not started',
2396
+ blocked: 'Cannot start yet',
2397
+ error: 'Error',
2398
+ },
2399
+ consent: {
2400
+ heading: 'Cookies on this website',
2401
+ description: 'We use essential cookies to make this website work. With your consent we use additional cookies to improve the service.',
2402
+ categories: 'Cookie categories',
2403
+ necessary: 'Essential',
2404
+ necessaryHint: 'Session, security and your cookie choice.',
2405
+ statistics: 'Analytics',
2406
+ statisticsHint: 'Anonymous usage statistics to improve the service.',
2407
+ comfort: 'Preferences',
2408
+ comfortHint: 'Saved settings such as language and appearance.',
2409
+ acceptAll: 'Accept all',
2410
+ necessaryOnly: 'Essential only',
2411
+ save: 'Save choice',
2412
+ settings: 'Settings',
2413
+ },
2414
+ feedback: {
2415
+ region: 'Page feedback',
2416
+ question: 'Was this page helpful?',
2417
+ yes: 'Yes',
2418
+ no: 'No',
2419
+ improve: 'What could we improve?',
2420
+ hint: 'Please do not enter personal data.',
2421
+ send: 'Send feedback',
2422
+ cancel: 'Cancel',
2423
+ thanks: 'Thank you for your feedback!',
2424
+ },
2425
+ rating: { star_one: '{{count}} star', star_other: '{{count}} stars', summary: '{{label}}: {{value}} out of {{max}} stars' },
2426
+ bottomNav: { label: 'Main sections', new: '{{count}} new' },
2427
+ codeBlock: { variants: 'Code variants', copy: 'Copy', copied: 'Copied', status: 'Code copied to clipboard', region: 'Code ({{name}})' },
2428
+ skeleton: { loading: 'Loading content' },
2429
+ list: { badge_one: '{{count}} new', badge_other: '{{count}} new' },
2430
+ avatarGroup: { summary: '{{label}}: {{count}} people ({{names}})' },
2431
+ tagInput: {
2432
+ hint: 'Press Enter or comma to add, Backspace removes the last entry.',
2433
+ selected: 'Selected for {{label}}',
2434
+ added: '{{value}} added',
2435
+ removed: '{{value}} removed',
2436
+ duplicate: '{{value}} is already selected.',
2437
+ notAllowed: '{{value}} is not available.',
2438
+ max: 'At most {{count}} entries allowed.',
2439
+ },
2440
+ backToTop: { label: 'Back to top' },
2441
+ fab: { close: 'Close actions' },
2442
+ rangeSlider: { from: '{{label}}: minimum', to: '{{label}}: maximum', fromShort: 'From', toShort: 'To' },
2443
+ calendar: { prev: 'Previous month', next: 'Next month' },
2444
+ carousel: {
2445
+ carousel: 'Carousel',
2446
+ slide: 'Slide',
2447
+ slides: 'Slides',
2448
+ position: '{{index}} of {{count}}',
2449
+ prev: 'Previous slide',
2450
+ next: 'Next slide',
2451
+ play: 'Start automatic rotation',
2452
+ pause: 'Pause automatic rotation',
2453
+ choose: 'Choose slide',
2454
+ goTo: 'Slide {{index}}',
2455
+ },
2456
+ otp: { digit: 'Digit {{index}} of {{count}}' },
2457
+ transfer: {
2458
+ source: 'Available',
2459
+ target: 'Selected',
2460
+ selectAll: 'Select all in {{label}}',
2461
+ count: '{{selected}}/{{total}} selected',
2462
+ search: 'Search {{label}}',
2463
+ searchPlaceholder: 'Filter list',
2464
+ empty: 'No items',
2465
+ right_one: 'Add {{count}} item',
2466
+ right_other: 'Add {{count}} items',
2467
+ left_one: 'Remove {{count}} item',
2468
+ left_other: 'Remove {{count}} items',
2469
+ movedRight_one: '{{count}} item added',
2470
+ movedRight_other: '{{count}} items added',
2471
+ movedLeft_one: '{{count}} item removed',
2472
+ movedLeft_other: '{{count}} items removed',
2473
+ },
2474
+ toc: { label: 'On this page' },
2475
+ sparkline: { summary: '{{label}}: {{count}} values, from {{first}} to {{last}}, minimum {{min}}, maximum {{max}}' },
2476
+ imageList: { open: 'Enlarge {{alt}}', prev: 'Previous image', next: 'Next image', position: 'Image {{index}} of {{count}}' },
2477
+ tour: { step: 'Step {{index}} of {{count}}', skip: 'End tour', back: 'Back', next: 'Next', finish: 'Done' },
2478
+ virtualList: { region: '{{label}}, {{count}} items', rendered: '{{shown}} of {{count}} rows rendered' },
2479
+ popconfirm: { confirm: 'Yes', cancel: 'Cancel' },
2480
+ infinite: { loading: 'Loading more items', done: 'All items loaded', count: '{{count}} items loaded', more: 'Load more' },
2481
+ splitter: { label: 'Pane size' },
2482
+ };
2483
+
2484
+ const NS = 'fink';
2485
+ const normalize = (value) => (value?.toLowerCase().startsWith('de') ? 'de' : 'en');
2486
+ const documentLanguage = () => (typeof document === 'undefined' ? 'de' : normalize(document.documentElement.lang));
2487
+ /**
2488
+ * i18next-Instanz der Fink-Komponenten (Namespace „fink“). Die Sprache folgt dem lang-Attribut
2489
+ * von <html>; Anwendungen setzen sie dort oder über setFinkLanguage().
2490
+ */
2491
+ const finkI18n = instance.createInstance();
2492
+ finkI18n.init({
2493
+ lng: documentLanguage(),
2494
+ fallbackLng: 'en',
2495
+ supportedLngs: ['de', 'en'],
2496
+ ns: [NS],
2497
+ defaultNS: NS,
2498
+ resources: { de: { [NS]: de }, en: { [NS]: en } },
2499
+ interpolation: { escapeValue: false },
2500
+ initAsync: false,
2501
+ showSupportNotice: false,
2502
+ });
2503
+ if (typeof MutationObserver !== 'undefined' && typeof document !== 'undefined') {
2504
+ new MutationObserver(() => {
2505
+ const lng = documentLanguage();
2506
+ if (lng !== finkI18n.language)
2507
+ void finkI18n.changeLanguage(lng);
2508
+ }).observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] });
2509
+ }
2510
+ /** Übersetzt einen Schlüssel aus dem Namespace „fink“. */
2511
+ const t = (key, options) => finkI18n.t(key, options);
2512
+ /** Aktuelle Sprache der Fink-Komponenten. */
2513
+ const getFinkLanguage = () => normalize(finkI18n.language);
2514
+ /** Setzt die Sprache der Fink-Komponenten (und das lang-Attribut des Dokuments). */
2515
+ const setFinkLanguage = (lng) => {
2516
+ if (typeof document !== 'undefined')
2517
+ document.documentElement.lang = lng;
2518
+ return finkI18n.changeLanguage(lng);
2519
+ };
2520
+ /** Ergänzt oder überschreibt Texte der Fink-Komponenten, z. B. für weitere Sprachen. */
2521
+ const addFinkTranslations = (lng, resources) => {
2522
+ finkI18n.addResourceBundle(lng, NS, resources, true, true);
2523
+ };
2524
+ /** Formatiert Zahlen in der aktuellen Sprache. */
2525
+ const formatNumber = (value, options) => value.toLocaleString(getFinkLanguage() === 'en' ? 'en-GB' : 'de-DE', options);
2526
+ /**
2527
+ * Hilfsfunktion für Komponenten: abonniert Sprachwechsel und liefert eine Abmeldefunktion.
2528
+ * Die Komponente setzt im Callback einen @State, damit sie neu rendert.
2529
+ */
2530
+ const onFinkLanguageChange = (callback) => {
2531
+ const handler = (lng) => callback(normalize(lng));
2532
+ finkI18n.on('languageChanged', handler);
2533
+ return () => finkI18n.off('languageChanged', handler);
2534
+ };
2535
+
2536
+ export { addFinkTranslations as a, formatNumber as b, finkI18n as f, getFinkLanguage as g, onFinkLanguageChange as o, setFinkLanguage as s, t };