@jackuait/blok 0.6.0-beta.8 → 0.6.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.
- package/dist/blok.mjs +2 -2
- package/dist/chunks/{blok-bzxy6Olq.mjs → blok-BAh1rvUC.mjs} +3410 -2927
- package/dist/chunks/i18next-B47TKgbU.mjs +1303 -0
- package/dist/chunks/{i18next-loader-CzL6YHyQ.mjs → i18next-loader-CHtGO6IK.mjs} +2 -2
- package/dist/chunks/{index-DSSrx_Co.mjs → index-DBWWKrDe.mjs} +12 -12
- package/dist/chunks/{inline-tool-convert-D4SXxjDd.mjs → inline-tool-convert-DduRc0fF.mjs} +1467 -951
- package/dist/chunks/{messages-BogRq8lt.mjs → messages-0AbcLMLm.mjs} +6 -0
- package/dist/chunks/{messages-DJDG55Vq.mjs → messages-0E0AkrNu.mjs} +6 -0
- package/dist/{messages-DnXLrlHh.mjs → chunks/messages-4v4MuVEc.mjs} +6 -0
- package/dist/chunks/{messages-DnIhyAJk.mjs → messages-62v-CLC-.mjs} +6 -0
- package/dist/chunks/{messages-Dzwxv9v1.mjs → messages-8DeO60Oo.mjs} +6 -0
- package/dist/chunks/{messages-B1Aww8q7.mjs → messages-8IPXkrDl.mjs} +6 -0
- package/dist/{messages-uKX8WBaD.mjs → chunks/messages-96kNZDll.mjs} +6 -0
- package/dist/chunks/{messages-BL0tXcDf.mjs → messages-B1FZ8lxU.mjs} +6 -0
- package/dist/{messages-DBn76jVV.mjs → chunks/messages-B217znr-.mjs} +8 -2
- package/dist/{messages-DT4dP5uK.mjs → chunks/messages-B8WNljW3.mjs} +6 -0
- package/dist/chunks/{messages-BdeLo0N9.mjs → messages-BC8IN4Bf.mjs} +6 -0
- package/dist/{messages-CZygwLwM.mjs → chunks/messages-BI43k_BD.mjs} +6 -0
- package/dist/{messages-CzTufCHu.mjs → chunks/messages-BJ6zrz2j.mjs} +6 -0
- package/dist/{messages-BoJc_p1r.mjs → chunks/messages-BUl_Rcnj.mjs} +6 -0
- package/dist/chunks/{messages-CnwibSvh.mjs → messages-BZlmVRwn.mjs} +6 -0
- package/dist/{messages-C2htQ_3F.mjs → chunks/messages-BcpCubnC.mjs} +6 -0
- package/dist/{messages-D5C3J9qr.mjs → chunks/messages-Bm-E4iRC.mjs} +6 -0
- package/dist/chunks/{messages-BELRf6DU.mjs → messages-C4jL-90N.mjs} +6 -0
- package/dist/chunks/{messages-1fC8IMyX.mjs → messages-CDBLbUOQ.mjs} +6 -0
- package/dist/chunks/{messages-7QoX8DkW.mjs → messages-CH4hrauY.mjs} +6 -0
- package/dist/{messages-Dz9L52ol.mjs → chunks/messages-CRJ_mchV.mjs} +6 -0
- package/dist/chunks/{messages-JELdtT6E.mjs → messages-CW4c4cRk.mjs} +6 -0
- package/dist/chunks/{messages-CKI54h6O.mjs → messages-C_4otP7U.mjs} +6 -0
- package/dist/{messages-R3hUSvr3.mjs → chunks/messages-CfiyT2Wi.mjs} +6 -0
- package/dist/{messages-CJdUsQ-c.mjs → chunks/messages-CgTq3QhU.mjs} +6 -0
- package/dist/chunks/{messages-D1Hv8XGo.mjs → messages-Chb7k3Rg.mjs} +6 -0
- package/dist/{messages-Q7AO_FLv.mjs → chunks/messages-Cjjo7yHR.mjs} +6 -0
- package/dist/{messages-C99mq906.mjs → chunks/messages-Cl6ayUaq.mjs} +6 -0
- package/dist/chunks/{messages-Diu6jAaR.mjs → messages-CmR9ftc_.mjs} +6 -0
- package/dist/chunks/{messages-LPVfA-8K.mjs → messages-Cr49Nt3U.mjs} +6 -0
- package/dist/chunks/{messages-DqM1LFg5.mjs → messages-Cr94GzbX.mjs} +6 -0
- package/dist/{messages-BWF-zUpY.mjs → chunks/messages-CrCYPCk3.mjs} +6 -0
- package/dist/{messages-D-ZtY5v0.mjs → chunks/messages-Cs8zmZ3L.mjs} +6 -0
- package/dist/{messages-DprmQg6V.mjs → chunks/messages-CzK0LEhb.mjs} +6 -0
- package/dist/chunks/{messages-BSbjsyHY.mjs → messages-D00x4S8o.mjs} +6 -0
- package/dist/chunks/{messages-Xq8UmkVs.mjs → messages-D1mn7Zd5.mjs} +6 -0
- package/dist/chunks/{messages-BC86qLvI.mjs → messages-D2NOpHn9.mjs} +6 -0
- package/dist/{messages-kep5wtm4.mjs → chunks/messages-D4qqwVgQ.mjs} +6 -0
- package/dist/chunks/{messages-7W4d0DwD.mjs → messages-D5S1Dnpm.mjs} +6 -0
- package/dist/{messages-CY8_RyFE.mjs → chunks/messages-D7u2bmP2.mjs} +6 -0
- package/dist/chunks/{messages-BFG6Wlgy.mjs → messages-D85FqxgY.mjs} +6 -0
- package/dist/{messages-DLfR5bMd.mjs → chunks/messages-D9ndgBnU.mjs} +6 -0
- package/dist/{messages-CVw84KdI.mjs → chunks/messages-DDTQgImT.mjs} +6 -0
- package/dist/{messages-_ErNTNhk.mjs → chunks/messages-DH_jBeED.mjs} +6 -0
- package/dist/chunks/{messages-CMkNSDTo.mjs → messages-DRXWF0PV.mjs} +6 -0
- package/dist/chunks/{messages-BYyy6Wqf.mjs → messages-DVQvl8Qj.mjs} +6 -0
- package/dist/chunks/{messages-CznZadDf.mjs → messages-DXktiao_.mjs} +6 -0
- package/dist/chunks/{messages-DhLKYm2j.mjs → messages-DdK-nFGm.mjs} +6 -0
- package/dist/chunks/{messages-BMXCuEKO.mjs → messages-DlJbPF2T.mjs} +6 -0
- package/dist/chunks/{messages-CvGLfqmV.mjs → messages-DnVlmiNT.mjs} +6 -0
- package/dist/{messages-Z9nEU2xK.mjs → chunks/messages-DviiFSv2.mjs} +6 -0
- package/dist/chunks/{messages-BB5z9Uba.mjs → messages-DzqM3Fel.mjs} +6 -0
- package/dist/{messages-w7v1GNaE.mjs → chunks/messages-Dzzn6XoD.mjs} +6 -0
- package/dist/{messages-CqWJcCbY.mjs → chunks/messages-GSByFygY.mjs} +6 -0
- package/dist/chunks/{messages-_ncGrKHh.mjs → messages-L_kl2Qvh.mjs} +6 -0
- package/dist/chunks/{messages-BrPFGbM-.mjs → messages-Phkd7XmE.mjs} +6 -0
- package/dist/{messages-BU2nlrLK.mjs → chunks/messages-RonBBCnh.mjs} +6 -0
- package/dist/{messages-Bmu_S7GM.mjs → chunks/messages-VDriF5Qy.mjs} +6 -0
- package/dist/{messages-CLhcMlTc.mjs → chunks/messages-ZjUAIWb1.mjs} +6 -0
- package/dist/{messages-9SihnaXQ.mjs → chunks/messages-b1EdvUm0.mjs} +6 -0
- package/dist/{messages-DvFLX36Q.mjs → chunks/messages-begYOTgC.mjs} +6 -0
- package/dist/{messages-BMv4xwIr.mjs → chunks/messages-jrncnb-H.mjs} +6 -0
- package/dist/{messages-D5iv1Kox.mjs → chunks/messages-nefz1S71.mjs} +6 -0
- package/dist/{messages-CQwpzUFp.mjs → chunks/messages-ucTVgS5G.mjs} +6 -0
- package/dist/chunks/{messages-DBRw-7Zc.mjs → messages-v3GipbFl.mjs} +6 -0
- package/dist/{messages-C9eaarcK.mjs → chunks/messages-wmi-iFkH.mjs} +6 -0
- package/dist/chunks/{messages-O5tQus_0.mjs → messages-yHcs38yI.mjs} +6 -0
- package/dist/full.mjs +2 -2
- package/dist/locales.mjs +90 -84
- package/dist/{messages-BogRq8lt.mjs → messages-0AbcLMLm.mjs} +6 -0
- package/dist/{messages-DJDG55Vq.mjs → messages-0E0AkrNu.mjs} +6 -0
- package/dist/{chunks/messages-DnXLrlHh.mjs → messages-4v4MuVEc.mjs} +6 -0
- package/dist/{messages-DnIhyAJk.mjs → messages-62v-CLC-.mjs} +6 -0
- package/dist/{messages-Dzwxv9v1.mjs → messages-8DeO60Oo.mjs} +6 -0
- package/dist/{messages-B1Aww8q7.mjs → messages-8IPXkrDl.mjs} +6 -0
- package/dist/{chunks/messages-uKX8WBaD.mjs → messages-96kNZDll.mjs} +6 -0
- package/dist/{messages-BL0tXcDf.mjs → messages-B1FZ8lxU.mjs} +6 -0
- package/dist/{chunks/messages-DBn76jVV.mjs → messages-B217znr-.mjs} +8 -2
- package/dist/{chunks/messages-DT4dP5uK.mjs → messages-B8WNljW3.mjs} +6 -0
- package/dist/{messages-BdeLo0N9.mjs → messages-BC8IN4Bf.mjs} +6 -0
- package/dist/{chunks/messages-CZygwLwM.mjs → messages-BI43k_BD.mjs} +6 -0
- package/dist/{chunks/messages-CzTufCHu.mjs → messages-BJ6zrz2j.mjs} +6 -0
- package/dist/{chunks/messages-BoJc_p1r.mjs → messages-BUl_Rcnj.mjs} +6 -0
- package/dist/{messages-CnwibSvh.mjs → messages-BZlmVRwn.mjs} +6 -0
- package/dist/{chunks/messages-C2htQ_3F.mjs → messages-BcpCubnC.mjs} +6 -0
- package/dist/{chunks/messages-D5C3J9qr.mjs → messages-Bm-E4iRC.mjs} +6 -0
- package/dist/{messages-BELRf6DU.mjs → messages-C4jL-90N.mjs} +6 -0
- package/dist/{messages-1fC8IMyX.mjs → messages-CDBLbUOQ.mjs} +6 -0
- package/dist/{messages-7QoX8DkW.mjs → messages-CH4hrauY.mjs} +6 -0
- package/dist/{chunks/messages-Dz9L52ol.mjs → messages-CRJ_mchV.mjs} +6 -0
- package/dist/{messages-JELdtT6E.mjs → messages-CW4c4cRk.mjs} +6 -0
- package/dist/{messages-CKI54h6O.mjs → messages-C_4otP7U.mjs} +6 -0
- package/dist/{chunks/messages-R3hUSvr3.mjs → messages-CfiyT2Wi.mjs} +6 -0
- package/dist/{chunks/messages-CJdUsQ-c.mjs → messages-CgTq3QhU.mjs} +6 -0
- package/dist/{messages-D1Hv8XGo.mjs → messages-Chb7k3Rg.mjs} +6 -0
- package/dist/{chunks/messages-Q7AO_FLv.mjs → messages-Cjjo7yHR.mjs} +6 -0
- package/dist/{chunks/messages-C99mq906.mjs → messages-Cl6ayUaq.mjs} +6 -0
- package/dist/{messages-Diu6jAaR.mjs → messages-CmR9ftc_.mjs} +6 -0
- package/dist/{messages-LPVfA-8K.mjs → messages-Cr49Nt3U.mjs} +6 -0
- package/dist/{messages-DqM1LFg5.mjs → messages-Cr94GzbX.mjs} +6 -0
- package/dist/{chunks/messages-BWF-zUpY.mjs → messages-CrCYPCk3.mjs} +6 -0
- package/dist/{chunks/messages-D-ZtY5v0.mjs → messages-Cs8zmZ3L.mjs} +6 -0
- package/dist/{chunks/messages-DprmQg6V.mjs → messages-CzK0LEhb.mjs} +6 -0
- package/dist/{messages-BSbjsyHY.mjs → messages-D00x4S8o.mjs} +6 -0
- package/dist/{messages-Xq8UmkVs.mjs → messages-D1mn7Zd5.mjs} +6 -0
- package/dist/{messages-BC86qLvI.mjs → messages-D2NOpHn9.mjs} +6 -0
- package/dist/{chunks/messages-kep5wtm4.mjs → messages-D4qqwVgQ.mjs} +6 -0
- package/dist/{messages-7W4d0DwD.mjs → messages-D5S1Dnpm.mjs} +6 -0
- package/dist/{chunks/messages-CY8_RyFE.mjs → messages-D7u2bmP2.mjs} +6 -0
- package/dist/{messages-BFG6Wlgy.mjs → messages-D85FqxgY.mjs} +6 -0
- package/dist/{chunks/messages-DLfR5bMd.mjs → messages-D9ndgBnU.mjs} +6 -0
- package/dist/{chunks/messages-CVw84KdI.mjs → messages-DDTQgImT.mjs} +6 -0
- package/dist/{chunks/messages-_ErNTNhk.mjs → messages-DH_jBeED.mjs} +6 -0
- package/dist/{messages-CMkNSDTo.mjs → messages-DRXWF0PV.mjs} +6 -0
- package/dist/{messages-BYyy6Wqf.mjs → messages-DVQvl8Qj.mjs} +6 -0
- package/dist/{messages-CznZadDf.mjs → messages-DXktiao_.mjs} +6 -0
- package/dist/{messages-DhLKYm2j.mjs → messages-DdK-nFGm.mjs} +6 -0
- package/dist/{messages-BMXCuEKO.mjs → messages-DlJbPF2T.mjs} +6 -0
- package/dist/{messages-CvGLfqmV.mjs → messages-DnVlmiNT.mjs} +6 -0
- package/dist/{chunks/messages-Z9nEU2xK.mjs → messages-DviiFSv2.mjs} +6 -0
- package/dist/{messages-BB5z9Uba.mjs → messages-DzqM3Fel.mjs} +6 -0
- package/dist/{chunks/messages-w7v1GNaE.mjs → messages-Dzzn6XoD.mjs} +6 -0
- package/dist/{chunks/messages-CqWJcCbY.mjs → messages-GSByFygY.mjs} +6 -0
- package/dist/{messages-_ncGrKHh.mjs → messages-L_kl2Qvh.mjs} +6 -0
- package/dist/{messages-BrPFGbM-.mjs → messages-Phkd7XmE.mjs} +6 -0
- package/dist/{chunks/messages-BU2nlrLK.mjs → messages-RonBBCnh.mjs} +6 -0
- package/dist/{chunks/messages-Bmu_S7GM.mjs → messages-VDriF5Qy.mjs} +6 -0
- package/dist/{chunks/messages-CLhcMlTc.mjs → messages-ZjUAIWb1.mjs} +6 -0
- package/dist/{chunks/messages-9SihnaXQ.mjs → messages-b1EdvUm0.mjs} +6 -0
- package/dist/{chunks/messages-DvFLX36Q.mjs → messages-begYOTgC.mjs} +6 -0
- package/dist/{chunks/messages-BMv4xwIr.mjs → messages-jrncnb-H.mjs} +6 -0
- package/dist/{chunks/messages-D5iv1Kox.mjs → messages-nefz1S71.mjs} +6 -0
- package/dist/{chunks/messages-CQwpzUFp.mjs → messages-ucTVgS5G.mjs} +6 -0
- package/dist/{messages-DBRw-7Zc.mjs → messages-v3GipbFl.mjs} +6 -0
- package/dist/{chunks/messages-C9eaarcK.mjs → messages-wmi-iFkH.mjs} +6 -0
- package/dist/{messages-O5tQus_0.mjs → messages-yHcs38yI.mjs} +6 -0
- package/dist/tools.mjs +3194 -1690
- package/dist/vendor.LICENSE.txt +109 -109
- package/package.json +43 -57
- package/src/blok.ts +12 -0
- package/src/components/__module.ts +21 -0
- package/src/components/block/api.ts +17 -0
- package/src/components/block/style-manager.ts +6 -2
- package/src/components/block/tool-renderer.ts +33 -30
- package/src/components/blocks.ts +132 -15
- package/src/components/i18n/locales/am/messages.json +6 -0
- package/src/components/i18n/locales/ar/messages.json +6 -0
- package/src/components/i18n/locales/az/messages.json +6 -0
- package/src/components/i18n/locales/bg/messages.json +6 -0
- package/src/components/i18n/locales/bn/messages.json +6 -0
- package/src/components/i18n/locales/bs/messages.json +6 -0
- package/src/components/i18n/locales/cs/messages.json +6 -0
- package/src/components/i18n/locales/da/messages.json +6 -0
- package/src/components/i18n/locales/de/messages.json +6 -0
- package/src/components/i18n/locales/dv/messages.json +6 -0
- package/src/components/i18n/locales/el/messages.json +6 -0
- package/src/components/i18n/locales/en/messages.json +6 -0
- package/src/components/i18n/locales/es/messages.json +6 -0
- package/src/components/i18n/locales/et/messages.json +6 -0
- package/src/components/i18n/locales/fa/messages.json +6 -0
- package/src/components/i18n/locales/fi/messages.json +6 -0
- package/src/components/i18n/locales/fil/messages.json +6 -0
- package/src/components/i18n/locales/fr/messages.json +6 -0
- package/src/components/i18n/locales/gu/messages.json +6 -0
- package/src/components/i18n/locales/he/messages.json +6 -0
- package/src/components/i18n/locales/hi/messages.json +6 -0
- package/src/components/i18n/locales/hr/messages.json +6 -0
- package/src/components/i18n/locales/hu/messages.json +6 -0
- package/src/components/i18n/locales/hy/messages.json +6 -0
- package/src/components/i18n/locales/id/messages.json +6 -0
- package/src/components/i18n/locales/it/messages.json +6 -0
- package/src/components/i18n/locales/ja/messages.json +6 -0
- package/src/components/i18n/locales/ka/messages.json +6 -0
- package/src/components/i18n/locales/km/messages.json +6 -0
- package/src/components/i18n/locales/kn/messages.json +6 -0
- package/src/components/i18n/locales/ko/messages.json +6 -0
- package/src/components/i18n/locales/ku/messages.json +6 -0
- package/src/components/i18n/locales/lo/messages.json +6 -0
- package/src/components/i18n/locales/lt/messages.json +6 -0
- package/src/components/i18n/locales/lv/messages.json +6 -0
- package/src/components/i18n/locales/mk/messages.json +6 -0
- package/src/components/i18n/locales/ml/messages.json +6 -0
- package/src/components/i18n/locales/mn/messages.json +6 -0
- package/src/components/i18n/locales/mr/messages.json +6 -0
- package/src/components/i18n/locales/ms/messages.json +6 -0
- package/src/components/i18n/locales/my/messages.json +6 -0
- package/src/components/i18n/locales/ne/messages.json +6 -0
- package/src/components/i18n/locales/nl/messages.json +6 -0
- package/src/components/i18n/locales/no/messages.json +6 -0
- package/src/components/i18n/locales/pa/messages.json +6 -0
- package/src/components/i18n/locales/pl/messages.json +6 -0
- package/src/components/i18n/locales/ps/messages.json +6 -0
- package/src/components/i18n/locales/pt/messages.json +6 -0
- package/src/components/i18n/locales/ro/messages.json +6 -0
- package/src/components/i18n/locales/ru/messages.json +6 -0
- package/src/components/i18n/locales/sd/messages.json +6 -0
- package/src/components/i18n/locales/si/messages.json +6 -0
- package/src/components/i18n/locales/sk/messages.json +6 -0
- package/src/components/i18n/locales/sl/messages.json +6 -0
- package/src/components/i18n/locales/sq/messages.json +6 -0
- package/src/components/i18n/locales/sr/messages.json +6 -0
- package/src/components/i18n/locales/sv/messages.json +6 -0
- package/src/components/i18n/locales/sw/messages.json +6 -0
- package/src/components/i18n/locales/ta/messages.json +6 -0
- package/src/components/i18n/locales/te/messages.json +6 -0
- package/src/components/i18n/locales/th/messages.json +6 -0
- package/src/components/i18n/locales/tr/messages.json +6 -0
- package/src/components/i18n/locales/ug/messages.json +6 -0
- package/src/components/i18n/locales/uk/messages.json +6 -0
- package/src/components/i18n/locales/ur/messages.json +6 -0
- package/src/components/i18n/locales/vi/messages.json +6 -0
- package/src/components/i18n/locales/yi/messages.json +6 -0
- package/src/components/i18n/locales/zh/messages.json +6 -0
- package/src/components/icons/index.ts +17 -0
- package/src/components/inline-tools/inline-tool-link.ts +1 -1
- package/src/components/inline-tools/inline-tool-marker.ts +737 -0
- package/src/components/inline-tools/utils/formatting-range-utils.ts +6 -3
- package/src/components/inline-tools/utils/marker-dom-utils.ts +17 -0
- package/src/components/modules/api/blocks.ts +34 -9
- package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +75 -29
- package/src/components/modules/blockEvents/index.ts +13 -5
- package/src/components/modules/blockManager/blockManager.ts +81 -2
- package/src/components/modules/blockManager/hierarchy.ts +20 -2
- package/src/components/modules/blockManager/operations.ts +70 -35
- package/src/components/modules/blockManager/repository.ts +22 -0
- package/src/components/modules/blockManager/types.ts +3 -1
- package/src/components/modules/blockManager/yjs-sync.ts +173 -39
- package/src/components/modules/blockSelection.ts +3 -0
- package/src/components/modules/crossBlockSelection.ts +11 -3
- package/src/components/modules/drag/preview/DragPreview.ts +10 -2
- package/src/components/modules/drag/target/DropTargetDetector.ts +100 -11
- package/src/components/modules/drag/utils/drag.constants.ts +1 -1
- package/src/components/modules/normalizeInlineImages.ts +263 -0
- package/src/components/modules/paste/google-docs-preprocessor.ts +197 -0
- package/src/components/modules/paste/handlers/base.ts +43 -2
- package/src/components/modules/paste/handlers/html-handler.ts +1 -1
- package/src/components/modules/paste/handlers/index.ts +1 -0
- package/src/components/modules/paste/handlers/table-cells-handler.ts +104 -0
- package/src/components/modules/paste/index.ts +20 -3
- package/src/components/modules/readonly.ts +8 -2
- package/src/components/modules/rectangleSelection.ts +5 -2
- package/src/components/modules/renderer.ts +35 -0
- package/src/components/modules/saver.ts +52 -2
- package/src/components/modules/toolbar/blockSettings.ts +52 -44
- package/src/components/modules/toolbar/index.ts +124 -17
- package/src/components/modules/toolbar/inline/index.ts +4 -4
- package/src/components/modules/toolbar/plus-button.ts +3 -3
- package/src/components/modules/toolbar/settings-toggler.ts +3 -3
- package/src/components/modules/toolbar/styles.ts +7 -7
- package/src/components/modules/ui.ts +6 -6
- package/src/components/modules/uiControllers/controllers/blockHover.ts +16 -2
- package/src/components/modules/uiControllers/handlers/touch.ts +83 -10
- package/src/components/modules/yjs/block-observer.ts +9 -3
- package/src/components/modules/yjs/document-store.ts +10 -7
- package/src/components/modules/yjs/types.ts +8 -6
- package/src/components/modules/yjs/undo-history.ts +90 -11
- package/src/components/selection/fake-background/shadows.ts +1 -1
- package/src/components/shared/color-picker.ts +211 -0
- package/src/components/shared/color-presets.ts +25 -0
- package/src/components/ui/toolbox.ts +19 -11
- package/src/components/utils/color-mapping.ts +241 -0
- package/src/components/utils/notifier/draw.ts +9 -9
- package/src/components/utils/placeholder.ts +24 -8
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.const.ts +2 -2
- package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +14 -12
- package/src/components/utils/popover/components/search-input/search-input.const.ts +2 -2
- package/src/components/utils/popover/popover-abstract.ts +27 -3
- package/src/components/utils/popover/popover-desktop.ts +26 -3
- package/src/components/utils/popover/popover-inline.ts +14 -1
- package/src/components/utils/popover/popover-mobile.ts +4 -4
- package/src/components/utils/popover/popover.const.ts +2 -2
- package/src/components/utils/sanitizer.ts +24 -3
- package/src/components/utils/tw.ts +17 -5
- package/src/stories/Header.stories.ts +106 -0
- package/src/stories/MarkerColors.stories.ts +730 -0
- package/src/stories/Popover.stories.ts +1 -3
- package/src/stories/Table.stories.ts +1662 -0
- package/src/styles/main.css +207 -37
- package/src/tools/header/index.ts +1 -1
- package/src/tools/index.ts +3 -1
- package/src/tools/list/caret-manager.ts +28 -10
- package/src/tools/list/constants.ts +2 -2
- package/src/tools/list/dom-builder.ts +3 -3
- package/src/tools/list/static-configs.ts +0 -1
- package/src/tools/paragraph/index.ts +15 -7
- package/src/tools/table/core/table-commands.ts +99 -0
- package/src/tools/table/core/table-controller.ts +231 -0
- package/src/tools/table/core/table-events.ts +102 -0
- package/src/tools/table/index.ts +1070 -174
- package/src/tools/table/ownership/table-event-broker.ts +74 -0
- package/src/tools/table/ownership/table-ownership-registry.ts +126 -0
- package/src/tools/table/table-add-controls.ts +85 -15
- package/src/tools/table/table-cell-blocks.ts +336 -38
- package/src/tools/table/table-cell-clipboard.ts +415 -0
- package/src/tools/table/table-cell-color-picker.ts +34 -0
- package/src/tools/table/table-cell-selection.ts +264 -15
- package/src/tools/table/table-core.ts +3 -42
- package/src/tools/table/table-heading-toggle.ts +2 -2
- package/src/tools/table/table-model.ts +623 -0
- package/src/tools/table/table-operations.ts +59 -78
- package/src/tools/table/table-resize.ts +15 -11
- package/src/tools/table/table-restrictions.ts +69 -3
- package/src/tools/table/table-row-col-action-handler.ts +22 -7
- package/src/tools/table/table-row-col-controls.ts +129 -12
- package/src/tools/table/table-row-col-drag.ts +14 -0
- package/src/tools/table/table-scroll-haze.ts +152 -0
- package/src/tools/table/types.ts +22 -1
- package/src/tools/table/view/table-cell-blocks-adapter.ts +47 -0
- package/src/variants/blok-minimum.ts +13 -0
- package/types/api/block.d.ts +13 -0
- package/types/api/blocks.d.ts +16 -0
- package/types/tools/table.d.ts +2 -0
- package/dist/chunks/i18next-CugVlwWp.mjs +0 -1292
- package/src/tools/table/data-normalizer.ts +0 -32
|
@@ -0,0 +1,1303 @@
|
|
|
1
|
+
var Re = Object.defineProperty, $e = Object.defineProperties;
|
|
2
|
+
var Ne = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ae = Object.getOwnPropertySymbols;
|
|
4
|
+
var ke = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var oe = (a, e, t) => e in a ? Re(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, d = (a, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
ke.call(e, t) && oe(a, t, e[t]);
|
|
8
|
+
if (ae)
|
|
9
|
+
for (var t of ae(e))
|
|
10
|
+
Fe.call(e, t) && oe(a, t, e[t]);
|
|
11
|
+
return a;
|
|
12
|
+
}, b = (a, e) => $e(a, Ne(e));
|
|
13
|
+
const m = (a) => typeof a == "string", U = () => {
|
|
14
|
+
let a, e;
|
|
15
|
+
const t = new Promise((s, i) => {
|
|
16
|
+
a = s, e = i;
|
|
17
|
+
});
|
|
18
|
+
return t.resolve = a, t.reject = e, t;
|
|
19
|
+
}, le = (a) => a == null ? "" : "" + a, je = (a, e, t) => {
|
|
20
|
+
a.forEach((s) => {
|
|
21
|
+
e[s] && (t[s] = e[s]);
|
|
22
|
+
});
|
|
23
|
+
}, Ee = /###/g, ue = (a) => a && a.indexOf("###") > -1 ? a.replace(Ee, ".") : a, fe = (a) => !a || m(a), H = (a, e, t) => {
|
|
24
|
+
const s = m(e) ? e.split(".") : e;
|
|
25
|
+
let i = 0;
|
|
26
|
+
for (; i < s.length - 1; ) {
|
|
27
|
+
if (fe(a)) return {};
|
|
28
|
+
const n = ue(s[i]);
|
|
29
|
+
!a[n] && t && (a[n] = new t()), Object.prototype.hasOwnProperty.call(a, n) ? a = a[n] : a = {}, ++i;
|
|
30
|
+
}
|
|
31
|
+
return fe(a) ? {} : {
|
|
32
|
+
obj: a,
|
|
33
|
+
k: ue(s[i])
|
|
34
|
+
};
|
|
35
|
+
}, he = (a, e, t) => {
|
|
36
|
+
const {
|
|
37
|
+
obj: s,
|
|
38
|
+
k: i
|
|
39
|
+
} = H(a, e, Object);
|
|
40
|
+
if (s !== void 0 || e.length === 1) {
|
|
41
|
+
s[i] = t;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let n = e[e.length - 1], r = e.slice(0, e.length - 1), o = H(a, r, Object);
|
|
45
|
+
for (; o.obj === void 0 && r.length; )
|
|
46
|
+
n = `${r[r.length - 1]}.${n}`, r = r.slice(0, r.length - 1), o = H(a, r, Object), o != null && o.obj && typeof o.obj[`${o.k}.${n}`] != "undefined" && (o.obj = void 0);
|
|
47
|
+
o.obj[`${o.k}.${n}`] = t;
|
|
48
|
+
}, Te = (a, e, t, s) => {
|
|
49
|
+
const {
|
|
50
|
+
obj: i,
|
|
51
|
+
k: n
|
|
52
|
+
} = H(a, e, Object);
|
|
53
|
+
i[n] = i[n] || [], i[n].push(t);
|
|
54
|
+
}, W = (a, e) => {
|
|
55
|
+
const {
|
|
56
|
+
obj: t,
|
|
57
|
+
k: s
|
|
58
|
+
} = H(a, e);
|
|
59
|
+
if (t && Object.prototype.hasOwnProperty.call(t, s))
|
|
60
|
+
return t[s];
|
|
61
|
+
}, Ie = (a, e, t) => {
|
|
62
|
+
const s = W(a, t);
|
|
63
|
+
return s !== void 0 ? s : W(e, t);
|
|
64
|
+
}, be = (a, e, t) => {
|
|
65
|
+
for (const s in e)
|
|
66
|
+
s !== "__proto__" && s !== "constructor" && (s in a ? m(a[s]) || a[s] instanceof String || m(e[s]) || e[s] instanceof String ? t && (a[s] = e[s]) : be(a[s], e[s], t) : a[s] = e[s]);
|
|
67
|
+
return a;
|
|
68
|
+
}, V = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
69
|
+
var Ve = {
|
|
70
|
+
"&": "&",
|
|
71
|
+
"<": "<",
|
|
72
|
+
">": ">",
|
|
73
|
+
'"': """,
|
|
74
|
+
"'": "'",
|
|
75
|
+
"/": "/"
|
|
76
|
+
};
|
|
77
|
+
const De = (a) => m(a) ? a.replace(/[&<>"'\/]/g, (e) => Ve[e]) : a;
|
|
78
|
+
class Ke {
|
|
79
|
+
constructor(e) {
|
|
80
|
+
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
81
|
+
}
|
|
82
|
+
getRegExp(e) {
|
|
83
|
+
const t = this.regExpMap.get(e);
|
|
84
|
+
if (t !== void 0)
|
|
85
|
+
return t;
|
|
86
|
+
const s = new RegExp(e);
|
|
87
|
+
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const Ae = [" ", ",", "?", "!", ";"], Ue = new Ke(20), He = (a, e, t) => {
|
|
91
|
+
e = e || "", t = t || "";
|
|
92
|
+
const s = Ae.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
|
|
93
|
+
if (s.length === 0) return !0;
|
|
94
|
+
const i = Ue.getRegExp(`(${s.map((r) => r === "?" ? "\\?" : r).join("|")})`);
|
|
95
|
+
let n = !i.test(a);
|
|
96
|
+
if (!n) {
|
|
97
|
+
const r = a.indexOf(t);
|
|
98
|
+
r > 0 && !i.test(a.substring(0, r)) && (n = !0);
|
|
99
|
+
}
|
|
100
|
+
return n;
|
|
101
|
+
}, ee = (a, e, t = ".") => {
|
|
102
|
+
if (!a) return;
|
|
103
|
+
if (a[e])
|
|
104
|
+
return Object.prototype.hasOwnProperty.call(a, e) ? a[e] : void 0;
|
|
105
|
+
const s = e.split(t);
|
|
106
|
+
let i = a;
|
|
107
|
+
for (let n = 0; n < s.length; ) {
|
|
108
|
+
if (!i || typeof i != "object")
|
|
109
|
+
return;
|
|
110
|
+
let r, o = "";
|
|
111
|
+
for (let u = n; u < s.length; ++u)
|
|
112
|
+
if (u !== n && (o += t), o += s[u], r = i[o], r !== void 0) {
|
|
113
|
+
if (["string", "number", "boolean"].indexOf(typeof r) > -1 && u < s.length - 1)
|
|
114
|
+
continue;
|
|
115
|
+
n += u - n + 1;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
i = r;
|
|
119
|
+
}
|
|
120
|
+
return i;
|
|
121
|
+
}, z = (a) => a == null ? void 0 : a.replace("_", "-"), Me = {
|
|
122
|
+
type: "logger",
|
|
123
|
+
log(a) {
|
|
124
|
+
this.output("log", a);
|
|
125
|
+
},
|
|
126
|
+
warn(a) {
|
|
127
|
+
this.output("warn", a);
|
|
128
|
+
},
|
|
129
|
+
error(a) {
|
|
130
|
+
this.output("error", a);
|
|
131
|
+
},
|
|
132
|
+
output(a, e) {
|
|
133
|
+
var t, s;
|
|
134
|
+
(s = (t = console == null ? void 0 : console[a]) == null ? void 0 : t.apply) == null || s.call(t, console, e);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
class Y {
|
|
138
|
+
constructor(e, t = {}) {
|
|
139
|
+
this.init(e, t);
|
|
140
|
+
}
|
|
141
|
+
init(e, t = {}) {
|
|
142
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || Me, this.options = t, this.debug = t.debug;
|
|
143
|
+
}
|
|
144
|
+
log(...e) {
|
|
145
|
+
return this.forward(e, "log", "", !0);
|
|
146
|
+
}
|
|
147
|
+
warn(...e) {
|
|
148
|
+
return this.forward(e, "warn", "", !0);
|
|
149
|
+
}
|
|
150
|
+
error(...e) {
|
|
151
|
+
return this.forward(e, "error", "");
|
|
152
|
+
}
|
|
153
|
+
deprecate(...e) {
|
|
154
|
+
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
155
|
+
}
|
|
156
|
+
forward(e, t, s, i) {
|
|
157
|
+
return i && !this.debug ? null : (m(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
158
|
+
}
|
|
159
|
+
create(e) {
|
|
160
|
+
return new Y(this.logger, d({
|
|
161
|
+
prefix: `${this.prefix}:${e}:`
|
|
162
|
+
}, this.options));
|
|
163
|
+
}
|
|
164
|
+
clone(e) {
|
|
165
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new Y(this.logger, e);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
var k = new Y();
|
|
169
|
+
class Q {
|
|
170
|
+
constructor() {
|
|
171
|
+
this.observers = {};
|
|
172
|
+
}
|
|
173
|
+
on(e, t) {
|
|
174
|
+
return e.split(" ").forEach((s) => {
|
|
175
|
+
this.observers[s] || (this.observers[s] = /* @__PURE__ */ new Map());
|
|
176
|
+
const i = this.observers[s].get(t) || 0;
|
|
177
|
+
this.observers[s].set(t, i + 1);
|
|
178
|
+
}), this;
|
|
179
|
+
}
|
|
180
|
+
off(e, t) {
|
|
181
|
+
if (this.observers[e]) {
|
|
182
|
+
if (!t) {
|
|
183
|
+
delete this.observers[e];
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
this.observers[e].delete(t);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
emit(e, ...t) {
|
|
190
|
+
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([i, n]) => {
|
|
191
|
+
for (let r = 0; r < n; r++)
|
|
192
|
+
i(...t);
|
|
193
|
+
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([i, n]) => {
|
|
194
|
+
for (let r = 0; r < n; r++)
|
|
195
|
+
i.apply(i, [e, ...t]);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
class ce extends Q {
|
|
200
|
+
constructor(e, t = {
|
|
201
|
+
ns: ["translation"],
|
|
202
|
+
defaultNS: "translation"
|
|
203
|
+
}) {
|
|
204
|
+
super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
|
|
205
|
+
}
|
|
206
|
+
addNamespaces(e) {
|
|
207
|
+
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
208
|
+
}
|
|
209
|
+
removeNamespaces(e) {
|
|
210
|
+
const t = this.options.ns.indexOf(e);
|
|
211
|
+
t > -1 && this.options.ns.splice(t, 1);
|
|
212
|
+
}
|
|
213
|
+
getResource(e, t, s, i = {}) {
|
|
214
|
+
var l, h;
|
|
215
|
+
const n = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, r = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
216
|
+
let o;
|
|
217
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], s && (Array.isArray(s) ? o.push(...s) : m(s) && n ? o.push(...s.split(n)) : o.push(s)));
|
|
218
|
+
const u = W(this.data, o);
|
|
219
|
+
return !u && !t && !s && e.indexOf(".") > -1 && (e = o[0], t = o[1], s = o.slice(2).join(".")), u || !r || !m(s) ? u : ee((h = (l = this.data) == null ? void 0 : l[e]) == null ? void 0 : h[t], s, n);
|
|
220
|
+
}
|
|
221
|
+
addResource(e, t, s, i, n = {
|
|
222
|
+
silent: !1
|
|
223
|
+
}) {
|
|
224
|
+
const r = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
225
|
+
let o = [e, t];
|
|
226
|
+
s && (o = o.concat(r ? s.split(r) : s)), e.indexOf(".") > -1 && (o = e.split("."), i = t, t = o[1]), this.addNamespaces(t), he(this.data, o, i), n.silent || this.emit("added", e, t, s, i);
|
|
227
|
+
}
|
|
228
|
+
addResources(e, t, s, i = {
|
|
229
|
+
silent: !1
|
|
230
|
+
}) {
|
|
231
|
+
for (const n in s)
|
|
232
|
+
(m(s[n]) || Array.isArray(s[n])) && this.addResource(e, t, n, s[n], {
|
|
233
|
+
silent: !0
|
|
234
|
+
});
|
|
235
|
+
i.silent || this.emit("added", e, t, s);
|
|
236
|
+
}
|
|
237
|
+
addResourceBundle(e, t, s, i, n, r = {
|
|
238
|
+
silent: !1,
|
|
239
|
+
skipCopy: !1
|
|
240
|
+
}) {
|
|
241
|
+
let o = [e, t];
|
|
242
|
+
e.indexOf(".") > -1 && (o = e.split("."), i = s, s = t, t = o[1]), this.addNamespaces(t);
|
|
243
|
+
let u = W(this.data, o) || {};
|
|
244
|
+
r.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? be(u, s, n) : u = d(d({}, u), s), he(this.data, o, u), r.silent || this.emit("added", e, t, s);
|
|
245
|
+
}
|
|
246
|
+
removeResourceBundle(e, t) {
|
|
247
|
+
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
248
|
+
}
|
|
249
|
+
hasResourceBundle(e, t) {
|
|
250
|
+
return this.getResource(e, t) !== void 0;
|
|
251
|
+
}
|
|
252
|
+
getResourceBundle(e, t) {
|
|
253
|
+
return t || (t = this.options.defaultNS), this.getResource(e, t);
|
|
254
|
+
}
|
|
255
|
+
getDataByLanguage(e) {
|
|
256
|
+
return this.data[e];
|
|
257
|
+
}
|
|
258
|
+
hasLanguageSomeTranslations(e) {
|
|
259
|
+
const t = this.getDataByLanguage(e);
|
|
260
|
+
return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0);
|
|
261
|
+
}
|
|
262
|
+
toJSON() {
|
|
263
|
+
return this.data;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
var Le = {
|
|
267
|
+
processors: {},
|
|
268
|
+
addPostProcessor(a) {
|
|
269
|
+
this.processors[a.name] = a;
|
|
270
|
+
},
|
|
271
|
+
handle(a, e, t, s, i) {
|
|
272
|
+
return a.forEach((n) => {
|
|
273
|
+
var r, o;
|
|
274
|
+
e = (o = (r = this.processors[n]) == null ? void 0 : r.process(e, t, s, i)) != null ? o : e;
|
|
275
|
+
}), e;
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
const we = /* @__PURE__ */ Symbol("i18next/PATH_KEY");
|
|
279
|
+
function ze() {
|
|
280
|
+
const a = [], e = /* @__PURE__ */ Object.create(null);
|
|
281
|
+
let t;
|
|
282
|
+
return e.get = (s, i) => {
|
|
283
|
+
var n;
|
|
284
|
+
return (n = t == null ? void 0 : t.revoke) == null || n.call(t), i === we ? a : (a.push(i), t = Proxy.revocable(s, e), t.proxy);
|
|
285
|
+
}, Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
286
|
+
}
|
|
287
|
+
function te(a, e) {
|
|
288
|
+
var s;
|
|
289
|
+
const {
|
|
290
|
+
[we]: t
|
|
291
|
+
} = a(ze());
|
|
292
|
+
return t.join((s = e == null ? void 0 : e.keySeparator) != null ? s : ".");
|
|
293
|
+
}
|
|
294
|
+
const de = {}, Z = (a) => !m(a) && typeof a != "boolean" && typeof a != "number";
|
|
295
|
+
class G extends Q {
|
|
296
|
+
constructor(e, t = {}) {
|
|
297
|
+
super(), je(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = k.create("translator");
|
|
298
|
+
}
|
|
299
|
+
changeLanguage(e) {
|
|
300
|
+
e && (this.language = e);
|
|
301
|
+
}
|
|
302
|
+
exists(e, t = {
|
|
303
|
+
interpolation: {}
|
|
304
|
+
}) {
|
|
305
|
+
const s = d({}, t);
|
|
306
|
+
if (e == null) return !1;
|
|
307
|
+
const i = this.resolve(e, s);
|
|
308
|
+
if ((i == null ? void 0 : i.res) === void 0) return !1;
|
|
309
|
+
const n = Z(i.res);
|
|
310
|
+
return !(s.returnObjects === !1 && n);
|
|
311
|
+
}
|
|
312
|
+
extractFromKey(e, t) {
|
|
313
|
+
let s = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
314
|
+
s === void 0 && (s = ":");
|
|
315
|
+
const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
316
|
+
let n = t.ns || this.options.defaultNS || [];
|
|
317
|
+
const r = s && e.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !He(e, s, i);
|
|
318
|
+
if (r && !o) {
|
|
319
|
+
const u = e.match(this.interpolator.nestingRegexp);
|
|
320
|
+
if (u && u.length > 0)
|
|
321
|
+
return {
|
|
322
|
+
key: e,
|
|
323
|
+
namespaces: m(n) ? [n] : n
|
|
324
|
+
};
|
|
325
|
+
const l = e.split(s);
|
|
326
|
+
(s !== i || s === i && this.options.ns.indexOf(l[0]) > -1) && (n = l.shift()), e = l.join(i);
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
key: e,
|
|
330
|
+
namespaces: m(n) ? [n] : n
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
translate(e, t, s) {
|
|
334
|
+
let i = typeof t == "object" ? d({}, t) : t;
|
|
335
|
+
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = d({}, i)), i || (i = {}), e == null) return "";
|
|
336
|
+
typeof e == "function" && (e = te(e, d(d({}, this.options), i))), Array.isArray(e) || (e = [String(e)]);
|
|
337
|
+
const n = i.returnDetails !== void 0 ? i.returnDetails : this.options.returnDetails, r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, {
|
|
338
|
+
key: o,
|
|
339
|
+
namespaces: u
|
|
340
|
+
} = this.extractFromKey(e[e.length - 1], i), l = u[u.length - 1];
|
|
341
|
+
let h = i.nsSeparator !== void 0 ? i.nsSeparator : this.options.nsSeparator;
|
|
342
|
+
h === void 0 && (h = ":");
|
|
343
|
+
const f = i.lng || this.language, g = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
344
|
+
if ((f == null ? void 0 : f.toLowerCase()) === "cimode")
|
|
345
|
+
return g ? n ? {
|
|
346
|
+
res: `${l}${h}${o}`,
|
|
347
|
+
usedKey: o,
|
|
348
|
+
exactUsedKey: o,
|
|
349
|
+
usedLng: f,
|
|
350
|
+
usedNS: l,
|
|
351
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
352
|
+
} : `${l}${h}${o}` : n ? {
|
|
353
|
+
res: o,
|
|
354
|
+
usedKey: o,
|
|
355
|
+
exactUsedKey: o,
|
|
356
|
+
usedLng: f,
|
|
357
|
+
usedNS: l,
|
|
358
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
359
|
+
} : o;
|
|
360
|
+
const p = this.resolve(e, i);
|
|
361
|
+
let c = p == null ? void 0 : p.res;
|
|
362
|
+
const x = (p == null ? void 0 : p.usedKey) || o, y = (p == null ? void 0 : p.exactUsedKey) || o, S = ["[object Number]", "[object Function]", "[object RegExp]"], P = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, T = !this.i18nFormat || this.i18nFormat.handleAsObject, L = i.count !== void 0 && !m(i.count), F = G.hasDefaultValue(i), B = L ? this.pluralResolver.getSuffix(f, i.count, i) : "", j = i.ordinal && L ? this.pluralResolver.getSuffix(f, i.count, {
|
|
363
|
+
ordinal: !1
|
|
364
|
+
}) : "", D = L && !i.ordinal && i.count === 0, C = D && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${B}`] || i[`defaultValue${j}`] || i.defaultValue;
|
|
365
|
+
let O = c;
|
|
366
|
+
T && !c && F && (O = C);
|
|
367
|
+
const ve = Z(O), Pe = Object.prototype.toString.apply(O);
|
|
368
|
+
if (T && O && ve && S.indexOf(Pe) < 0 && !(m(P) && Array.isArray(O))) {
|
|
369
|
+
if (!i.returnObjects && !this.options.returnObjects) {
|
|
370
|
+
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
371
|
+
const $ = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, O, b(d({}, i), {
|
|
372
|
+
ns: u
|
|
373
|
+
})) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
374
|
+
return n ? (p.res = $, p.usedParams = this.getUsedParamsDetails(i), p) : $;
|
|
375
|
+
}
|
|
376
|
+
if (r) {
|
|
377
|
+
const $ = Array.isArray(O), R = $ ? [] : {}, ie = $ ? y : x;
|
|
378
|
+
for (const N in O)
|
|
379
|
+
if (Object.prototype.hasOwnProperty.call(O, N)) {
|
|
380
|
+
const E = `${ie}${r}${N}`;
|
|
381
|
+
F && !c ? R[N] = this.translate(E, b(d({}, i), {
|
|
382
|
+
defaultValue: Z(C) ? C[N] : void 0,
|
|
383
|
+
joinArrays: !1,
|
|
384
|
+
ns: u
|
|
385
|
+
})) : R[N] = this.translate(E, b(d({}, i), {
|
|
386
|
+
joinArrays: !1,
|
|
387
|
+
ns: u
|
|
388
|
+
})), R[N] === E && (R[N] = O[N]);
|
|
389
|
+
}
|
|
390
|
+
c = R;
|
|
391
|
+
}
|
|
392
|
+
} else if (T && m(P) && Array.isArray(c))
|
|
393
|
+
c = c.join(P), c && (c = this.extendTranslation(c, e, i, s));
|
|
394
|
+
else {
|
|
395
|
+
let $ = !1, R = !1;
|
|
396
|
+
!this.isValidLookup(c) && F && ($ = !0, c = C), this.isValidLookup(c) || (R = !0, c = o);
|
|
397
|
+
const N = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && R ? void 0 : c, E = F && C !== c && this.options.updateMissing;
|
|
398
|
+
if (R || $ || E) {
|
|
399
|
+
if (this.logger.log(E ? "updateKey" : "missingKey", f, l, o, E ? C : c), r) {
|
|
400
|
+
const v = this.resolve(o, b(d({}, i), {
|
|
401
|
+
keySeparator: !1
|
|
402
|
+
}));
|
|
403
|
+
v && v.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.");
|
|
404
|
+
}
|
|
405
|
+
let K = [];
|
|
406
|
+
const J = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
|
|
407
|
+
if (this.options.saveMissingTo === "fallback" && J && J[0])
|
|
408
|
+
for (let v = 0; v < J.length; v++)
|
|
409
|
+
K.push(J[v]);
|
|
410
|
+
else this.options.saveMissingTo === "all" ? K = this.languageUtils.toResolveHierarchy(i.lng || this.language) : K.push(i.lng || this.language);
|
|
411
|
+
const se = (v, I, A) => {
|
|
412
|
+
var re;
|
|
413
|
+
const ne = F && A !== c ? A : N;
|
|
414
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(v, l, I, ne, E, i) : (re = this.backendConnector) != null && re.saveMissing && this.backendConnector.saveMissing(v, l, I, ne, E, i), this.emit("missingKey", v, l, I, c);
|
|
415
|
+
};
|
|
416
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && L ? K.forEach((v) => {
|
|
417
|
+
const I = this.pluralResolver.getSuffixes(v, i);
|
|
418
|
+
D && i[`defaultValue${this.options.pluralSeparator}zero`] && I.indexOf(`${this.options.pluralSeparator}zero`) < 0 && I.push(`${this.options.pluralSeparator}zero`), I.forEach((A) => {
|
|
419
|
+
se([v], o + A, i[`defaultValue${A}`] || C);
|
|
420
|
+
});
|
|
421
|
+
}) : se(K, o, C));
|
|
422
|
+
}
|
|
423
|
+
c = this.extendTranslation(c, e, i, p, s), R && c === o && this.options.appendNamespaceToMissingKey && (c = `${l}${h}${o}`), (R || $) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${h}${o}` : o, $ ? c : void 0, i));
|
|
424
|
+
}
|
|
425
|
+
return n ? (p.res = c, p.usedParams = this.getUsedParamsDetails(i), p) : c;
|
|
426
|
+
}
|
|
427
|
+
extendTranslation(e, t, s, i, n) {
|
|
428
|
+
var u, l;
|
|
429
|
+
if ((u = this.i18nFormat) != null && u.parse)
|
|
430
|
+
e = this.i18nFormat.parse(e, d(d({}, this.options.interpolation.defaultVariables), s), s.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
|
|
431
|
+
resolved: i
|
|
432
|
+
});
|
|
433
|
+
else if (!s.skipInterpolation) {
|
|
434
|
+
s.interpolation && this.interpolator.init(b(d({}, s), {
|
|
435
|
+
interpolation: d(d({}, this.options.interpolation), s.interpolation)
|
|
436
|
+
}));
|
|
437
|
+
const h = m(e) && (((l = s == null ? void 0 : s.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
438
|
+
let f;
|
|
439
|
+
if (h) {
|
|
440
|
+
const p = e.match(this.interpolator.nestingRegexp);
|
|
441
|
+
f = p && p.length;
|
|
442
|
+
}
|
|
443
|
+
let g = s.replace && !m(s.replace) ? s.replace : s;
|
|
444
|
+
if (this.options.interpolation.defaultVariables && (g = d(d({}, this.options.interpolation.defaultVariables), g)), e = this.interpolator.interpolate(e, g, s.lng || this.language || i.usedLng, s), h) {
|
|
445
|
+
const p = e.match(this.interpolator.nestingRegexp), c = p && p.length;
|
|
446
|
+
f < c && (s.nest = !1);
|
|
447
|
+
}
|
|
448
|
+
!s.lng && i && i.res && (s.lng = this.language || i.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, (...p) => (n == null ? void 0 : n[0]) === p[0] && !s.context ? (this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : this.translate(...p, t), s)), s.interpolation && this.interpolator.reset();
|
|
449
|
+
}
|
|
450
|
+
const r = s.postProcess || this.options.postProcess, o = m(r) ? [r] : r;
|
|
451
|
+
return e != null && (o != null && o.length) && s.applyPostProcessor !== !1 && (e = Le.handle(o, e, t, this.options && this.options.postProcessPassResolved ? d({
|
|
452
|
+
i18nResolved: b(d({}, i), {
|
|
453
|
+
usedParams: this.getUsedParamsDetails(s)
|
|
454
|
+
})
|
|
455
|
+
}, s) : s, this)), e;
|
|
456
|
+
}
|
|
457
|
+
resolve(e, t = {}) {
|
|
458
|
+
let s, i, n, r, o;
|
|
459
|
+
return m(e) && (e = [e]), e.forEach((u) => {
|
|
460
|
+
if (this.isValidLookup(s)) return;
|
|
461
|
+
const l = this.extractFromKey(u, t), h = l.key;
|
|
462
|
+
i = h;
|
|
463
|
+
let f = l.namespaces;
|
|
464
|
+
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
465
|
+
const g = t.count !== void 0 && !m(t.count), p = g && !t.ordinal && t.count === 0, c = t.context !== void 0 && (m(t.context) || typeof t.context == "number") && t.context !== "", x = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
466
|
+
f.forEach((y) => {
|
|
467
|
+
var S, P;
|
|
468
|
+
this.isValidLookup(s) || (o = y, !de[`${x[0]}-${y}`] && ((S = this.utils) != null && S.hasLoadedNamespace) && !((P = this.utils) != null && P.hasLoadedNamespace(o)) && (de[`${x[0]}-${y}`] = !0, this.logger.warn(`key "${i}" for languages "${x.join(", ")}" won't get resolved as namespace "${o}" 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!!!")), x.forEach((T) => {
|
|
469
|
+
var B;
|
|
470
|
+
if (this.isValidLookup(s)) return;
|
|
471
|
+
r = T;
|
|
472
|
+
const L = [h];
|
|
473
|
+
if ((B = this.i18nFormat) != null && B.addLookupKeys)
|
|
474
|
+
this.i18nFormat.addLookupKeys(L, h, T, y, t);
|
|
475
|
+
else {
|
|
476
|
+
let j;
|
|
477
|
+
g && (j = this.pluralResolver.getSuffix(T, t.count, t));
|
|
478
|
+
const D = `${this.options.pluralSeparator}zero`, C = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
479
|
+
if (g && (t.ordinal && j.indexOf(C) === 0 && L.push(h + j.replace(C, this.options.pluralSeparator)), L.push(h + j), p && L.push(h + D)), c) {
|
|
480
|
+
const O = `${h}${this.options.contextSeparator || "_"}${t.context}`;
|
|
481
|
+
L.push(O), g && (t.ordinal && j.indexOf(C) === 0 && L.push(O + j.replace(C, this.options.pluralSeparator)), L.push(O + j), p && L.push(O + D));
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
let F;
|
|
485
|
+
for (; F = L.pop(); )
|
|
486
|
+
this.isValidLookup(s) || (n = F, s = this.getResource(T, y, F, t));
|
|
487
|
+
}));
|
|
488
|
+
});
|
|
489
|
+
}), {
|
|
490
|
+
res: s,
|
|
491
|
+
usedKey: i,
|
|
492
|
+
exactUsedKey: n,
|
|
493
|
+
usedLng: r,
|
|
494
|
+
usedNS: o
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
isValidLookup(e) {
|
|
498
|
+
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
499
|
+
}
|
|
500
|
+
getResource(e, t, s, i = {}) {
|
|
501
|
+
var n;
|
|
502
|
+
return (n = this.i18nFormat) != null && n.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
|
|
503
|
+
}
|
|
504
|
+
getUsedParamsDetails(e = {}) {
|
|
505
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !m(e.replace);
|
|
506
|
+
let i = s ? e.replace : e;
|
|
507
|
+
if (s && typeof e.count != "undefined" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = d(d({}, this.options.interpolation.defaultVariables), i)), !s) {
|
|
508
|
+
i = d({}, i);
|
|
509
|
+
for (const n of t)
|
|
510
|
+
delete i[n];
|
|
511
|
+
}
|
|
512
|
+
return i;
|
|
513
|
+
}
|
|
514
|
+
static hasDefaultValue(e) {
|
|
515
|
+
const t = "defaultValue";
|
|
516
|
+
for (const s in e)
|
|
517
|
+
if (Object.prototype.hasOwnProperty.call(e, s) && t === s.substring(0, t.length) && e[s] !== void 0)
|
|
518
|
+
return !0;
|
|
519
|
+
return !1;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
class pe {
|
|
523
|
+
constructor(e) {
|
|
524
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
|
|
525
|
+
}
|
|
526
|
+
getScriptPartFromCode(e) {
|
|
527
|
+
if (e = z(e), !e || e.indexOf("-") < 0) return null;
|
|
528
|
+
const t = e.split("-");
|
|
529
|
+
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
530
|
+
}
|
|
531
|
+
getLanguagePartFromCode(e) {
|
|
532
|
+
if (e = z(e), !e || e.indexOf("-") < 0) return e;
|
|
533
|
+
const t = e.split("-");
|
|
534
|
+
return this.formatLanguageCode(t[0]);
|
|
535
|
+
}
|
|
536
|
+
formatLanguageCode(e) {
|
|
537
|
+
if (m(e) && e.indexOf("-") > -1) {
|
|
538
|
+
let t;
|
|
539
|
+
try {
|
|
540
|
+
t = Intl.getCanonicalLocales(e)[0];
|
|
541
|
+
} catch (s) {
|
|
542
|
+
}
|
|
543
|
+
return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
|
|
544
|
+
}
|
|
545
|
+
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
546
|
+
}
|
|
547
|
+
isSupportedCode(e) {
|
|
548
|
+
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
|
|
549
|
+
}
|
|
550
|
+
getBestMatchFromCodes(e) {
|
|
551
|
+
if (!e) return null;
|
|
552
|
+
let t;
|
|
553
|
+
return e.forEach((s) => {
|
|
554
|
+
if (t) return;
|
|
555
|
+
const i = this.formatLanguageCode(s);
|
|
556
|
+
(!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
|
|
557
|
+
}), !t && this.options.supportedLngs && e.forEach((s) => {
|
|
558
|
+
if (t) return;
|
|
559
|
+
const i = this.getScriptPartFromCode(s);
|
|
560
|
+
if (this.isSupportedCode(i)) return t = i;
|
|
561
|
+
const n = this.getLanguagePartFromCode(s);
|
|
562
|
+
if (this.isSupportedCode(n)) return t = n;
|
|
563
|
+
t = this.options.supportedLngs.find((r) => {
|
|
564
|
+
if (r === n) return r;
|
|
565
|
+
if (!(r.indexOf("-") < 0 && n.indexOf("-") < 0) && (r.indexOf("-") > 0 && n.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === n || r.indexOf(n) === 0 && n.length > 1))
|
|
566
|
+
return r;
|
|
567
|
+
});
|
|
568
|
+
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
569
|
+
}
|
|
570
|
+
getFallbackCodes(e, t) {
|
|
571
|
+
if (!e) return [];
|
|
572
|
+
if (typeof e == "function" && (e = e(t)), m(e) && (e = [e]), Array.isArray(e)) return e;
|
|
573
|
+
if (!t) return e.default || [];
|
|
574
|
+
let s = e[t];
|
|
575
|
+
return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
|
|
576
|
+
}
|
|
577
|
+
toResolveHierarchy(e, t) {
|
|
578
|
+
const s = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), i = [], n = (r) => {
|
|
579
|
+
r && (this.isSupportedCode(r) ? i.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
|
|
580
|
+
};
|
|
581
|
+
return m(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && n(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && n(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && n(this.getLanguagePartFromCode(e))) : m(e) && n(this.formatLanguageCode(e)), s.forEach((r) => {
|
|
582
|
+
i.indexOf(r) < 0 && n(this.formatLanguageCode(r));
|
|
583
|
+
}), i;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
const ge = {
|
|
587
|
+
zero: 0,
|
|
588
|
+
one: 1,
|
|
589
|
+
two: 2,
|
|
590
|
+
few: 3,
|
|
591
|
+
many: 4,
|
|
592
|
+
other: 5
|
|
593
|
+
}, me = {
|
|
594
|
+
select: (a) => a === 1 ? "one" : "other",
|
|
595
|
+
resolvedOptions: () => ({
|
|
596
|
+
pluralCategories: ["one", "other"]
|
|
597
|
+
})
|
|
598
|
+
};
|
|
599
|
+
class Be {
|
|
600
|
+
constructor(e, t = {}) {
|
|
601
|
+
this.languageUtils = e, this.options = t, this.logger = k.create("pluralResolver"), this.pluralRulesCache = {};
|
|
602
|
+
}
|
|
603
|
+
clearCache() {
|
|
604
|
+
this.pluralRulesCache = {};
|
|
605
|
+
}
|
|
606
|
+
getRule(e, t = {}) {
|
|
607
|
+
const s = z(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
|
|
608
|
+
cleanedCode: s,
|
|
609
|
+
type: i
|
|
610
|
+
});
|
|
611
|
+
if (n in this.pluralRulesCache)
|
|
612
|
+
return this.pluralRulesCache[n];
|
|
613
|
+
let r;
|
|
614
|
+
try {
|
|
615
|
+
r = new Intl.PluralRules(s, {
|
|
616
|
+
type: i
|
|
617
|
+
});
|
|
618
|
+
} catch (o) {
|
|
619
|
+
if (typeof Intl == "undefined")
|
|
620
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), me;
|
|
621
|
+
if (!e.match(/-|_/)) return me;
|
|
622
|
+
const u = this.languageUtils.getLanguagePartFromCode(e);
|
|
623
|
+
r = this.getRule(u, t);
|
|
624
|
+
}
|
|
625
|
+
return this.pluralRulesCache[n] = r, r;
|
|
626
|
+
}
|
|
627
|
+
needsPlural(e, t = {}) {
|
|
628
|
+
let s = this.getRule(e, t);
|
|
629
|
+
return s || (s = this.getRule("dev", t)), (s == null ? void 0 : s.resolvedOptions().pluralCategories.length) > 1;
|
|
630
|
+
}
|
|
631
|
+
getPluralFormsOfKey(e, t, s = {}) {
|
|
632
|
+
return this.getSuffixes(e, s).map((i) => `${t}${i}`);
|
|
633
|
+
}
|
|
634
|
+
getSuffixes(e, t = {}) {
|
|
635
|
+
let s = this.getRule(e, t);
|
|
636
|
+
return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, n) => ge[i] - ge[n]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
|
|
637
|
+
}
|
|
638
|
+
getSuffix(e, t, s = {}) {
|
|
639
|
+
const i = this.getRule(e, s);
|
|
640
|
+
return i ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, s));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
const xe = (a, e, t, s = ".", i = !0) => {
|
|
644
|
+
let n = Ie(a, e, t);
|
|
645
|
+
return !n && i && m(t) && (n = ee(a, t, s), n === void 0 && (n = ee(e, t, s))), n;
|
|
646
|
+
}, X = (a) => a.replace(/\$/g, "$$$$");
|
|
647
|
+
class ye {
|
|
648
|
+
constructor(e = {}) {
|
|
649
|
+
var t;
|
|
650
|
+
this.logger = k.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((s) => s), this.init(e);
|
|
651
|
+
}
|
|
652
|
+
init(e = {}) {
|
|
653
|
+
e.interpolation || (e.interpolation = {
|
|
654
|
+
escapeValue: !0
|
|
655
|
+
});
|
|
656
|
+
const {
|
|
657
|
+
escape: t,
|
|
658
|
+
escapeValue: s,
|
|
659
|
+
useRawValueToEscape: i,
|
|
660
|
+
prefix: n,
|
|
661
|
+
prefixEscaped: r,
|
|
662
|
+
suffix: o,
|
|
663
|
+
suffixEscaped: u,
|
|
664
|
+
formatSeparator: l,
|
|
665
|
+
unescapeSuffix: h,
|
|
666
|
+
unescapePrefix: f,
|
|
667
|
+
nestingPrefix: g,
|
|
668
|
+
nestingPrefixEscaped: p,
|
|
669
|
+
nestingSuffix: c,
|
|
670
|
+
nestingSuffixEscaped: x,
|
|
671
|
+
nestingOptionsSeparator: y,
|
|
672
|
+
maxReplaces: S,
|
|
673
|
+
alwaysFormat: P
|
|
674
|
+
} = e.interpolation;
|
|
675
|
+
this.escape = t !== void 0 ? t : De, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = n ? V(n) : r || "{{", this.suffix = o ? V(o) : u || "}}", this.formatSeparator = l || ",", this.unescapePrefix = h ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = g ? V(g) : p || V("$t("), this.nestingSuffix = c ? V(c) : x || V(")"), this.nestingOptionsSeparator = y || ",", this.maxReplaces = S || 1e3, this.alwaysFormat = P !== void 0 ? P : !1, this.resetRegExp();
|
|
676
|
+
}
|
|
677
|
+
reset() {
|
|
678
|
+
this.options && this.init(this.options);
|
|
679
|
+
}
|
|
680
|
+
resetRegExp() {
|
|
681
|
+
const e = (t, s) => (t == null ? void 0 : t.source) === s ? (t.lastIndex = 0, t) : new RegExp(s, "g");
|
|
682
|
+
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
683
|
+
}
|
|
684
|
+
interpolate(e, t, s, i) {
|
|
685
|
+
var p;
|
|
686
|
+
let n, r, o;
|
|
687
|
+
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (c) => {
|
|
688
|
+
if (c.indexOf(this.formatSeparator) < 0) {
|
|
689
|
+
const P = xe(t, u, c, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
690
|
+
return this.alwaysFormat ? this.format(P, void 0, s, b(d(d({}, i), t), {
|
|
691
|
+
interpolationkey: c
|
|
692
|
+
})) : P;
|
|
693
|
+
}
|
|
694
|
+
const x = c.split(this.formatSeparator), y = x.shift().trim(), S = x.join(this.formatSeparator).trim();
|
|
695
|
+
return this.format(xe(t, u, y, this.options.keySeparator, this.options.ignoreJSONStructure), S, s, b(d(d({}, i), t), {
|
|
696
|
+
interpolationkey: y
|
|
697
|
+
}));
|
|
698
|
+
};
|
|
699
|
+
this.resetRegExp();
|
|
700
|
+
const h = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((p = i == null ? void 0 : i.interpolation) == null ? void 0 : p.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
701
|
+
return [{
|
|
702
|
+
regex: this.regexpUnescape,
|
|
703
|
+
safeValue: (c) => X(c)
|
|
704
|
+
}, {
|
|
705
|
+
regex: this.regexp,
|
|
706
|
+
safeValue: (c) => this.escapeValue ? X(this.escape(c)) : X(c)
|
|
707
|
+
}].forEach((c) => {
|
|
708
|
+
for (o = 0; n = c.regex.exec(e); ) {
|
|
709
|
+
const x = n[1].trim();
|
|
710
|
+
if (r = l(x), r === void 0)
|
|
711
|
+
if (typeof h == "function") {
|
|
712
|
+
const S = h(e, n, i);
|
|
713
|
+
r = m(S) ? S : "";
|
|
714
|
+
} else if (i && Object.prototype.hasOwnProperty.call(i, x))
|
|
715
|
+
r = "";
|
|
716
|
+
else if (f) {
|
|
717
|
+
r = n[0];
|
|
718
|
+
continue;
|
|
719
|
+
} else
|
|
720
|
+
this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`), r = "";
|
|
721
|
+
else !m(r) && !this.useRawValueToEscape && (r = le(r));
|
|
722
|
+
const y = c.safeValue(r);
|
|
723
|
+
if (e = e.replace(n[0], y), f ? (c.regex.lastIndex += r.length, c.regex.lastIndex -= n[0].length) : c.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
}), e;
|
|
727
|
+
}
|
|
728
|
+
nest(e, t, s = {}) {
|
|
729
|
+
let i, n, r;
|
|
730
|
+
const o = (u, l) => {
|
|
731
|
+
var x, y;
|
|
732
|
+
const h = this.nestingOptionsSeparator;
|
|
733
|
+
if (u.indexOf(h) < 0) return u;
|
|
734
|
+
const f = u.split(new RegExp(`${V(h)}[ ]*{`));
|
|
735
|
+
let g = `{${f[1]}`;
|
|
736
|
+
u = f[0], g = this.interpolate(g, r);
|
|
737
|
+
const p = g.match(/'/g), c = g.match(/"/g);
|
|
738
|
+
(((x = p == null ? void 0 : p.length) != null ? x : 0) % 2 === 0 && !c || ((y = c == null ? void 0 : c.length) != null ? y : 0) % 2 !== 0) && (g = g.replace(/'/g, '"'));
|
|
739
|
+
try {
|
|
740
|
+
r = JSON.parse(g), l && (r = d(d({}, l), r));
|
|
741
|
+
} catch (S) {
|
|
742
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${u}`, S), `${u}${h}${g}`;
|
|
743
|
+
}
|
|
744
|
+
return r.defaultValue && r.defaultValue.indexOf(this.prefix) > -1 && delete r.defaultValue, u;
|
|
745
|
+
};
|
|
746
|
+
for (; i = this.nestingRegexp.exec(e); ) {
|
|
747
|
+
let u = [];
|
|
748
|
+
r = d({}, s), r = r.replace && !m(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
749
|
+
const l = /{.*}/.test(i[1]) ? i[1].lastIndexOf("}") + 1 : i[1].indexOf(this.formatSeparator);
|
|
750
|
+
if (l !== -1 && (u = i[1].slice(l).split(this.formatSeparator).map((h) => h.trim()).filter(Boolean), i[1] = i[1].slice(0, l)), n = t(o.call(this, i[1].trim(), r), r), n && i[0] === e && !m(n)) return n;
|
|
751
|
+
m(n) || (n = le(n)), n || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), n = ""), u.length && (n = u.reduce((h, f) => this.format(h, f, s.lng, b(d({}, s), {
|
|
752
|
+
interpolationkey: i[1].trim()
|
|
753
|
+
})), n.trim())), e = e.replace(i[0], n), this.regexp.lastIndex = 0;
|
|
754
|
+
}
|
|
755
|
+
return e;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
const Je = (a) => {
|
|
759
|
+
let e = a.toLowerCase().trim();
|
|
760
|
+
const t = {};
|
|
761
|
+
if (a.indexOf("(") > -1) {
|
|
762
|
+
const s = a.split("(");
|
|
763
|
+
e = s[0].toLowerCase().trim();
|
|
764
|
+
const i = s[1].substring(0, s[1].length - 1);
|
|
765
|
+
e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((r) => {
|
|
766
|
+
if (r) {
|
|
767
|
+
const [o, ...u] = r.split(":"), l = u.join(":").trim().replace(/^'+|'+$/g, ""), h = o.trim();
|
|
768
|
+
t[h] || (t[h] = l), l === "false" && (t[h] = !1), l === "true" && (t[h] = !0), isNaN(l) || (t[h] = parseInt(l, 10));
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
return {
|
|
773
|
+
formatName: e,
|
|
774
|
+
formatOptions: t
|
|
775
|
+
};
|
|
776
|
+
}, Se = (a) => {
|
|
777
|
+
const e = {};
|
|
778
|
+
return (t, s, i) => {
|
|
779
|
+
let n = i;
|
|
780
|
+
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (n = b(d({}, n), {
|
|
781
|
+
[i.interpolationkey]: void 0
|
|
782
|
+
}));
|
|
783
|
+
const r = s + JSON.stringify(n);
|
|
784
|
+
let o = e[r];
|
|
785
|
+
return o || (o = a(z(s), i), e[r] = o), o(t);
|
|
786
|
+
};
|
|
787
|
+
}, _e = (a) => (e, t, s) => a(z(t), s)(e);
|
|
788
|
+
class We {
|
|
789
|
+
constructor(e = {}) {
|
|
790
|
+
this.logger = k.create("formatter"), this.options = e, this.init(e);
|
|
791
|
+
}
|
|
792
|
+
init(e, t = {
|
|
793
|
+
interpolation: {}
|
|
794
|
+
}) {
|
|
795
|
+
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
796
|
+
const s = t.cacheInBuiltFormats ? Se : _e;
|
|
797
|
+
this.formats = {
|
|
798
|
+
number: s((i, n) => {
|
|
799
|
+
const r = new Intl.NumberFormat(i, d({}, n));
|
|
800
|
+
return (o) => r.format(o);
|
|
801
|
+
}),
|
|
802
|
+
currency: s((i, n) => {
|
|
803
|
+
const r = new Intl.NumberFormat(i, b(d({}, n), {
|
|
804
|
+
style: "currency"
|
|
805
|
+
}));
|
|
806
|
+
return (o) => r.format(o);
|
|
807
|
+
}),
|
|
808
|
+
datetime: s((i, n) => {
|
|
809
|
+
const r = new Intl.DateTimeFormat(i, d({}, n));
|
|
810
|
+
return (o) => r.format(o);
|
|
811
|
+
}),
|
|
812
|
+
relativetime: s((i, n) => {
|
|
813
|
+
const r = new Intl.RelativeTimeFormat(i, d({}, n));
|
|
814
|
+
return (o) => r.format(o, n.range || "day");
|
|
815
|
+
}),
|
|
816
|
+
list: s((i, n) => {
|
|
817
|
+
const r = new Intl.ListFormat(i, d({}, n));
|
|
818
|
+
return (o) => r.format(o);
|
|
819
|
+
})
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
add(e, t) {
|
|
823
|
+
this.formats[e.toLowerCase().trim()] = t;
|
|
824
|
+
}
|
|
825
|
+
addCached(e, t) {
|
|
826
|
+
this.formats[e.toLowerCase().trim()] = Se(t);
|
|
827
|
+
}
|
|
828
|
+
format(e, t, s, i = {}) {
|
|
829
|
+
const n = t.split(this.formatSeparator);
|
|
830
|
+
if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((o) => o.indexOf(")") > -1)) {
|
|
831
|
+
const o = n.findIndex((u) => u.indexOf(")") > -1);
|
|
832
|
+
n[0] = [n[0], ...n.splice(1, o)].join(this.formatSeparator);
|
|
833
|
+
}
|
|
834
|
+
return n.reduce((o, u) => {
|
|
835
|
+
var f;
|
|
836
|
+
const {
|
|
837
|
+
formatName: l,
|
|
838
|
+
formatOptions: h
|
|
839
|
+
} = Je(u);
|
|
840
|
+
if (this.formats[l]) {
|
|
841
|
+
let g = o;
|
|
842
|
+
try {
|
|
843
|
+
const p = ((f = i == null ? void 0 : i.formatParams) == null ? void 0 : f[i.interpolationkey]) || {}, c = p.locale || p.lng || i.locale || i.lng || s;
|
|
844
|
+
g = this.formats[l](o, c, d(d(d({}, h), i), p));
|
|
845
|
+
} catch (p) {
|
|
846
|
+
this.logger.warn(p);
|
|
847
|
+
}
|
|
848
|
+
return g;
|
|
849
|
+
} else
|
|
850
|
+
this.logger.warn(`there was no format function for ${l}`);
|
|
851
|
+
return o;
|
|
852
|
+
}, e);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
const Ye = (a, e) => {
|
|
856
|
+
a.pending[e] !== void 0 && (delete a.pending[e], a.pendingCount--);
|
|
857
|
+
};
|
|
858
|
+
class Ge extends Q {
|
|
859
|
+
constructor(e, t, s, i = {}) {
|
|
860
|
+
var n, r;
|
|
861
|
+
super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = k.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (r = (n = this.backend) == null ? void 0 : n.init) == null || r.call(n, s, i.backend, i);
|
|
862
|
+
}
|
|
863
|
+
queueLoad(e, t, s, i) {
|
|
864
|
+
const n = {}, r = {}, o = {}, u = {};
|
|
865
|
+
return e.forEach((l) => {
|
|
866
|
+
let h = !0;
|
|
867
|
+
t.forEach((f) => {
|
|
868
|
+
const g = `${l}|${f}`;
|
|
869
|
+
!s.reload && this.store.hasResourceBundle(l, f) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? r[g] === void 0 && (r[g] = !0) : (this.state[g] = 1, h = !1, r[g] === void 0 && (r[g] = !0), n[g] === void 0 && (n[g] = !0), u[f] === void 0 && (u[f] = !0)));
|
|
870
|
+
}), h || (o[l] = !0);
|
|
871
|
+
}), (Object.keys(n).length || Object.keys(r).length) && this.queue.push({
|
|
872
|
+
pending: r,
|
|
873
|
+
pendingCount: Object.keys(r).length,
|
|
874
|
+
loaded: {},
|
|
875
|
+
errors: [],
|
|
876
|
+
callback: i
|
|
877
|
+
}), {
|
|
878
|
+
toLoad: Object.keys(n),
|
|
879
|
+
pending: Object.keys(r),
|
|
880
|
+
toLoadLanguages: Object.keys(o),
|
|
881
|
+
toLoadNamespaces: Object.keys(u)
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
loaded(e, t, s) {
|
|
885
|
+
const i = e.split("|"), n = i[0], r = i[1];
|
|
886
|
+
t && this.emit("failedLoading", n, r, t), !t && s && this.store.addResourceBundle(n, r, s, void 0, void 0, {
|
|
887
|
+
skipCopy: !0
|
|
888
|
+
}), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
|
|
889
|
+
const o = {};
|
|
890
|
+
this.queue.forEach((u) => {
|
|
891
|
+
Te(u.loaded, [n], r), Ye(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((l) => {
|
|
892
|
+
o[l] || (o[l] = {});
|
|
893
|
+
const h = u.loaded[l];
|
|
894
|
+
h.length && h.forEach((f) => {
|
|
895
|
+
o[l][f] === void 0 && (o[l][f] = !0);
|
|
896
|
+
});
|
|
897
|
+
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
|
898
|
+
}), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
|
|
899
|
+
}
|
|
900
|
+
read(e, t, s, i = 0, n = this.retryTimeout, r) {
|
|
901
|
+
if (!e.length) return r(null, {});
|
|
902
|
+
if (this.readingCalls >= this.maxParallelReads) {
|
|
903
|
+
this.waitingReads.push({
|
|
904
|
+
lng: e,
|
|
905
|
+
ns: t,
|
|
906
|
+
fcName: s,
|
|
907
|
+
tried: i,
|
|
908
|
+
wait: n,
|
|
909
|
+
callback: r
|
|
910
|
+
});
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
this.readingCalls++;
|
|
914
|
+
const o = (l, h) => {
|
|
915
|
+
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
916
|
+
const f = this.waitingReads.shift();
|
|
917
|
+
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
918
|
+
}
|
|
919
|
+
if (l && h && i < this.maxRetries) {
|
|
920
|
+
setTimeout(() => {
|
|
921
|
+
this.read.call(this, e, t, s, i + 1, n * 2, r);
|
|
922
|
+
}, n);
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
r(l, h);
|
|
926
|
+
}, u = this.backend[s].bind(this.backend);
|
|
927
|
+
if (u.length === 2) {
|
|
928
|
+
try {
|
|
929
|
+
const l = u(e, t);
|
|
930
|
+
l && typeof l.then == "function" ? l.then((h) => o(null, h)).catch(o) : o(null, l);
|
|
931
|
+
} catch (l) {
|
|
932
|
+
o(l);
|
|
933
|
+
}
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
return u(e, t, o);
|
|
937
|
+
}
|
|
938
|
+
prepareLoading(e, t, s = {}, i) {
|
|
939
|
+
if (!this.backend)
|
|
940
|
+
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
941
|
+
m(e) && (e = this.languageUtils.toResolveHierarchy(e)), m(t) && (t = [t]);
|
|
942
|
+
const n = this.queueLoad(e, t, s, i);
|
|
943
|
+
if (!n.toLoad.length)
|
|
944
|
+
return n.pending.length || i(), null;
|
|
945
|
+
n.toLoad.forEach((r) => {
|
|
946
|
+
this.loadOne(r);
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
load(e, t, s) {
|
|
950
|
+
this.prepareLoading(e, t, {}, s);
|
|
951
|
+
}
|
|
952
|
+
reload(e, t, s) {
|
|
953
|
+
this.prepareLoading(e, t, {
|
|
954
|
+
reload: !0
|
|
955
|
+
}, s);
|
|
956
|
+
}
|
|
957
|
+
loadOne(e, t = "") {
|
|
958
|
+
const s = e.split("|"), i = s[0], n = s[1];
|
|
959
|
+
this.read(i, n, "read", void 0, void 0, (r, o) => {
|
|
960
|
+
r && this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${n} for language ${i}`, o), this.loaded(e, r, o);
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
saveMissing(e, t, s, i, n, r = {}, o = () => {
|
|
964
|
+
}) {
|
|
965
|
+
var u, l, h, f, g;
|
|
966
|
+
if ((l = (u = this.services) == null ? void 0 : u.utils) != null && l.hasLoadedNamespace && !((f = (h = this.services) == null ? void 0 : h.utils) != null && f.hasLoadedNamespace(t))) {
|
|
967
|
+
this.logger.warn(`did not save key "${s}" as the namespace "${t}" 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!!!");
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
if (!(s == null || s === "")) {
|
|
971
|
+
if ((g = this.backend) != null && g.create) {
|
|
972
|
+
const p = b(d({}, r), {
|
|
973
|
+
isUpdate: n
|
|
974
|
+
}), c = this.backend.create.bind(this.backend);
|
|
975
|
+
if (c.length < 6)
|
|
976
|
+
try {
|
|
977
|
+
let x;
|
|
978
|
+
c.length === 5 ? x = c(e, t, s, i, p) : x = c(e, t, s, i), x && typeof x.then == "function" ? x.then((y) => o(null, y)).catch(o) : o(null, x);
|
|
979
|
+
} catch (x) {
|
|
980
|
+
o(x);
|
|
981
|
+
}
|
|
982
|
+
else
|
|
983
|
+
c(e, t, s, i, o, p);
|
|
984
|
+
}
|
|
985
|
+
!e || !e[0] || this.store.addResource(e[0], t, s, i);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
const q = () => ({
|
|
990
|
+
debug: !1,
|
|
991
|
+
initAsync: !0,
|
|
992
|
+
ns: ["translation"],
|
|
993
|
+
defaultNS: ["translation"],
|
|
994
|
+
fallbackLng: ["dev"],
|
|
995
|
+
fallbackNS: !1,
|
|
996
|
+
supportedLngs: !1,
|
|
997
|
+
nonExplicitSupportedLngs: !1,
|
|
998
|
+
load: "all",
|
|
999
|
+
preload: !1,
|
|
1000
|
+
simplifyPluralSuffix: !0,
|
|
1001
|
+
keySeparator: ".",
|
|
1002
|
+
nsSeparator: ":",
|
|
1003
|
+
pluralSeparator: "_",
|
|
1004
|
+
contextSeparator: "_",
|
|
1005
|
+
partialBundledLanguages: !1,
|
|
1006
|
+
saveMissing: !1,
|
|
1007
|
+
updateMissing: !1,
|
|
1008
|
+
saveMissingTo: "fallback",
|
|
1009
|
+
saveMissingPlurals: !0,
|
|
1010
|
+
missingKeyHandler: !1,
|
|
1011
|
+
missingInterpolationHandler: !1,
|
|
1012
|
+
postProcess: !1,
|
|
1013
|
+
postProcessPassResolved: !1,
|
|
1014
|
+
returnNull: !1,
|
|
1015
|
+
returnEmptyString: !0,
|
|
1016
|
+
returnObjects: !1,
|
|
1017
|
+
joinArrays: !1,
|
|
1018
|
+
returnedObjectHandler: !1,
|
|
1019
|
+
parseMissingKeyHandler: !1,
|
|
1020
|
+
appendNamespaceToMissingKey: !1,
|
|
1021
|
+
appendNamespaceToCIMode: !1,
|
|
1022
|
+
overloadTranslationOptionHandler: (a) => {
|
|
1023
|
+
let e = {};
|
|
1024
|
+
if (typeof a[1] == "object" && (e = a[1]), m(a[1]) && (e.defaultValue = a[1]), m(a[2]) && (e.tDescription = a[2]), typeof a[2] == "object" || typeof a[3] == "object") {
|
|
1025
|
+
const t = a[3] || a[2];
|
|
1026
|
+
Object.keys(t).forEach((s) => {
|
|
1027
|
+
e[s] = t[s];
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
return e;
|
|
1031
|
+
},
|
|
1032
|
+
interpolation: {
|
|
1033
|
+
escapeValue: !0,
|
|
1034
|
+
format: (a) => a,
|
|
1035
|
+
prefix: "{{",
|
|
1036
|
+
suffix: "}}",
|
|
1037
|
+
formatSeparator: ",",
|
|
1038
|
+
unescapePrefix: "-",
|
|
1039
|
+
nestingPrefix: "$t(",
|
|
1040
|
+
nestingSuffix: ")",
|
|
1041
|
+
nestingOptionsSeparator: ",",
|
|
1042
|
+
maxReplaces: 1e3,
|
|
1043
|
+
skipOnVariables: !0
|
|
1044
|
+
},
|
|
1045
|
+
cacheInBuiltFormats: !0
|
|
1046
|
+
}), Oe = (a) => {
|
|
1047
|
+
var e, t;
|
|
1048
|
+
return m(a.ns) && (a.ns = [a.ns]), m(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), m(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), ((t = (e = a.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), typeof a.initImmediate == "boolean" && (a.initAsync = a.initImmediate), a;
|
|
1049
|
+
}, _ = () => {
|
|
1050
|
+
}, Qe = (a) => {
|
|
1051
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
|
|
1052
|
+
typeof a[t] == "function" && (a[t] = a[t].bind(a));
|
|
1053
|
+
});
|
|
1054
|
+
}, Ce = "__i18next_supportNoticeShown", Ze = () => typeof globalThis != "undefined" && !!globalThis[Ce], Xe = () => {
|
|
1055
|
+
typeof globalThis != "undefined" && (globalThis[Ce] = !0);
|
|
1056
|
+
}, qe = (a) => {
|
|
1057
|
+
var e, t, s, i, n, r, o, u, l, h, f, g, p;
|
|
1058
|
+
return !!(((s = (t = (e = a == null ? void 0 : a.modules) == null ? void 0 : e.backend) == null ? void 0 : t.name) == null ? void 0 : s.indexOf("Locize")) > 0 || ((o = (r = (n = (i = a == null ? void 0 : a.modules) == null ? void 0 : i.backend) == null ? void 0 : n.constructor) == null ? void 0 : r.name) == null ? void 0 : o.indexOf("Locize")) > 0 || (l = (u = a == null ? void 0 : a.options) == null ? void 0 : u.backend) != null && l.backends && a.options.backend.backends.some((c) => {
|
|
1059
|
+
var x, y, S;
|
|
1060
|
+
return ((x = c == null ? void 0 : c.name) == null ? void 0 : x.indexOf("Locize")) > 0 || ((S = (y = c == null ? void 0 : c.constructor) == null ? void 0 : y.name) == null ? void 0 : S.indexOf("Locize")) > 0;
|
|
1061
|
+
}) || (f = (h = a == null ? void 0 : a.options) == null ? void 0 : h.backend) != null && f.projectId || (p = (g = a == null ? void 0 : a.options) == null ? void 0 : g.backend) != null && p.backendOptions && a.options.backend.backendOptions.some((c) => c == null ? void 0 : c.projectId));
|
|
1062
|
+
};
|
|
1063
|
+
class M extends Q {
|
|
1064
|
+
constructor(e = {}, t) {
|
|
1065
|
+
if (super(), this.options = Oe(e), this.services = {}, this.logger = k, this.modules = {
|
|
1066
|
+
external: []
|
|
1067
|
+
}, Qe(this), t && !this.isInitialized && !e.isClone) {
|
|
1068
|
+
if (!this.options.initAsync)
|
|
1069
|
+
return this.init(e, t), this;
|
|
1070
|
+
setTimeout(() => {
|
|
1071
|
+
this.init(e, t);
|
|
1072
|
+
}, 0);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
init(e = {}, t) {
|
|
1076
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (m(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1077
|
+
const s = q();
|
|
1078
|
+
this.options = d(d(d({}, s), this.options), Oe(e)), this.options.interpolation = d(d({}, s.interpolation), this.options.interpolation), e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = s.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !qe(this) && !Ze() && (typeof console != "undefined" && typeof console.info != "undefined" && console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Xe());
|
|
1079
|
+
const i = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1080
|
+
if (!this.options.isClone) {
|
|
1081
|
+
this.modules.logger ? k.init(i(this.modules.logger), this.options) : k.init(null, this.options);
|
|
1082
|
+
let l;
|
|
1083
|
+
this.modules.formatter ? l = this.modules.formatter : l = We;
|
|
1084
|
+
const h = new pe(this.options);
|
|
1085
|
+
this.store = new ce(this.options.resources, this.options);
|
|
1086
|
+
const f = this.services;
|
|
1087
|
+
f.logger = k, f.resourceStore = this.store, f.languageUtils = h, f.pluralResolver = new Be(h, {
|
|
1088
|
+
prepend: this.options.pluralSeparator,
|
|
1089
|
+
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1090
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== s.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (f.formatter = i(l), f.formatter.init && f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new ye(this.options), f.utils = {
|
|
1091
|
+
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1092
|
+
}, f.backendConnector = new Ge(i(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (p, ...c) => {
|
|
1093
|
+
this.emit(p, ...c);
|
|
1094
|
+
}), this.modules.languageDetector && (f.languageDetector = i(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = i(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new G(this.services, this.options), this.translator.on("*", (p, ...c) => {
|
|
1095
|
+
this.emit(p, ...c);
|
|
1096
|
+
}), this.modules.external.forEach((p) => {
|
|
1097
|
+
p.init && p.init(this);
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
if (this.format = this.options.interpolation.format, t || (t = _), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1101
|
+
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1102
|
+
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
1103
|
+
}
|
|
1104
|
+
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((l) => {
|
|
1105
|
+
this[l] = (...h) => this.store[l](...h);
|
|
1106
|
+
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
|
|
1107
|
+
this[l] = (...h) => (this.store[l](...h), this);
|
|
1108
|
+
});
|
|
1109
|
+
const o = U(), u = () => {
|
|
1110
|
+
const l = (h, f) => {
|
|
1111
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(f), t(h, f);
|
|
1112
|
+
};
|
|
1113
|
+
if (this.languages && !this.isInitialized) return l(null, this.t.bind(this));
|
|
1114
|
+
this.changeLanguage(this.options.lng, l);
|
|
1115
|
+
};
|
|
1116
|
+
return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), o;
|
|
1117
|
+
}
|
|
1118
|
+
loadResources(e, t = _) {
|
|
1119
|
+
var n, r;
|
|
1120
|
+
let s = t;
|
|
1121
|
+
const i = m(e) ? e : this.language;
|
|
1122
|
+
if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1123
|
+
if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
|
|
1124
|
+
const o = [], u = (l) => {
|
|
1125
|
+
if (!l || l === "cimode") return;
|
|
1126
|
+
this.services.languageUtils.toResolveHierarchy(l).forEach((f) => {
|
|
1127
|
+
f !== "cimode" && o.indexOf(f) < 0 && o.push(f);
|
|
1128
|
+
});
|
|
1129
|
+
};
|
|
1130
|
+
i ? u(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((h) => u(h)), (r = (n = this.options.preload) == null ? void 0 : n.forEach) == null || r.call(n, (l) => u(l)), this.services.backendConnector.load(o, this.options.ns, (l) => {
|
|
1131
|
+
!l && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(l);
|
|
1132
|
+
});
|
|
1133
|
+
} else
|
|
1134
|
+
s(null);
|
|
1135
|
+
}
|
|
1136
|
+
reloadResources(e, t, s) {
|
|
1137
|
+
const i = U();
|
|
1138
|
+
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = _), this.services.backendConnector.reload(e, t, (n) => {
|
|
1139
|
+
i.resolve(), s(n);
|
|
1140
|
+
}), i;
|
|
1141
|
+
}
|
|
1142
|
+
use(e) {
|
|
1143
|
+
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1144
|
+
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1145
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Le.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1146
|
+
}
|
|
1147
|
+
setResolvedLanguage(e) {
|
|
1148
|
+
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
1149
|
+
for (let t = 0; t < this.languages.length; t++) {
|
|
1150
|
+
const s = this.languages[t];
|
|
1151
|
+
if (!(["cimode", "dev"].indexOf(s) > -1) && this.store.hasLanguageSomeTranslations(s)) {
|
|
1152
|
+
this.resolvedLanguage = s;
|
|
1153
|
+
break;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
!this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
changeLanguage(e, t) {
|
|
1160
|
+
this.isLanguageChangingTo = e;
|
|
1161
|
+
const s = U();
|
|
1162
|
+
this.emit("languageChanging", e);
|
|
1163
|
+
const i = (o) => {
|
|
1164
|
+
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
1165
|
+
}, n = (o, u) => {
|
|
1166
|
+
u ? this.isLanguageChangingTo === e && (i(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, s.resolve((...l) => this.t(...l)), t && t(o, (...l) => this.t(...l));
|
|
1167
|
+
}, r = (o) => {
|
|
1168
|
+
var h, f;
|
|
1169
|
+
!e && !o && this.services.languageDetector && (o = []);
|
|
1170
|
+
const u = m(o) ? o : o && o[0], l = this.store.hasLanguageSomeTranslations(u) ? u : this.services.languageUtils.getBestMatchFromCodes(m(o) ? [o] : o);
|
|
1171
|
+
l && (this.language || i(l), this.translator.language || this.translator.changeLanguage(l), (f = (h = this.services.languageDetector) == null ? void 0 : h.cacheUserLanguage) == null || f.call(h, l)), this.loadResources(l, (g) => {
|
|
1172
|
+
n(g, l);
|
|
1173
|
+
});
|
|
1174
|
+
};
|
|
1175
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), s;
|
|
1176
|
+
}
|
|
1177
|
+
getFixedT(e, t, s) {
|
|
1178
|
+
const i = (n, r, ...o) => {
|
|
1179
|
+
let u;
|
|
1180
|
+
typeof r != "object" ? u = this.options.overloadTranslationOptionHandler([n, r].concat(o)) : u = d({}, r), u.lng = u.lng || i.lng, u.lngs = u.lngs || i.lngs, u.ns = u.ns || i.ns, u.keyPrefix !== "" && (u.keyPrefix = u.keyPrefix || s || i.keyPrefix);
|
|
1181
|
+
const l = this.options.keySeparator || ".";
|
|
1182
|
+
let h;
|
|
1183
|
+
return u.keyPrefix && Array.isArray(n) ? h = n.map((f) => (typeof f == "function" && (f = te(f, d(d({}, this.options), r))), `${u.keyPrefix}${l}${f}`)) : (typeof n == "function" && (n = te(n, d(d({}, this.options), r))), h = u.keyPrefix ? `${u.keyPrefix}${l}${n}` : n), this.t(h, u);
|
|
1184
|
+
};
|
|
1185
|
+
return m(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = s, i;
|
|
1186
|
+
}
|
|
1187
|
+
t(...e) {
|
|
1188
|
+
var t;
|
|
1189
|
+
return (t = this.translator) == null ? void 0 : t.translate(...e);
|
|
1190
|
+
}
|
|
1191
|
+
exists(...e) {
|
|
1192
|
+
var t;
|
|
1193
|
+
return (t = this.translator) == null ? void 0 : t.exists(...e);
|
|
1194
|
+
}
|
|
1195
|
+
setDefaultNamespace(e) {
|
|
1196
|
+
this.options.defaultNS = e;
|
|
1197
|
+
}
|
|
1198
|
+
hasLoadedNamespace(e, t = {}) {
|
|
1199
|
+
if (!this.isInitialized)
|
|
1200
|
+
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1201
|
+
if (!this.languages || !this.languages.length)
|
|
1202
|
+
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1203
|
+
const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
|
|
1204
|
+
if (s.toLowerCase() === "cimode") return !0;
|
|
1205
|
+
const r = (o, u) => {
|
|
1206
|
+
const l = this.services.backendConnector.state[`${o}|${u}`];
|
|
1207
|
+
return l === -1 || l === 0 || l === 2;
|
|
1208
|
+
};
|
|
1209
|
+
if (t.precheck) {
|
|
1210
|
+
const o = t.precheck(this, r);
|
|
1211
|
+
if (o !== void 0) return o;
|
|
1212
|
+
}
|
|
1213
|
+
return !!(this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(s, e) && (!i || r(n, e)));
|
|
1214
|
+
}
|
|
1215
|
+
loadNamespaces(e, t) {
|
|
1216
|
+
const s = U();
|
|
1217
|
+
return this.options.ns ? (m(e) && (e = [e]), e.forEach((i) => {
|
|
1218
|
+
this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
|
|
1219
|
+
}), this.loadResources((i) => {
|
|
1220
|
+
s.resolve(), t && t(i);
|
|
1221
|
+
}), s) : (t && t(), Promise.resolve());
|
|
1222
|
+
}
|
|
1223
|
+
loadLanguages(e, t) {
|
|
1224
|
+
const s = U();
|
|
1225
|
+
m(e) && (e = [e]);
|
|
1226
|
+
const i = this.options.preload || [], n = e.filter((r) => i.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r));
|
|
1227
|
+
return n.length ? (this.options.preload = i.concat(n), this.loadResources((r) => {
|
|
1228
|
+
s.resolve(), t && t(r);
|
|
1229
|
+
}), s) : (t && t(), Promise.resolve());
|
|
1230
|
+
}
|
|
1231
|
+
dir(e) {
|
|
1232
|
+
var i, n;
|
|
1233
|
+
if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
1234
|
+
try {
|
|
1235
|
+
const r = new Intl.Locale(e);
|
|
1236
|
+
if (r && r.getTextInfo) {
|
|
1237
|
+
const o = r.getTextInfo();
|
|
1238
|
+
if (o && o.direction) return o.direction;
|
|
1239
|
+
}
|
|
1240
|
+
} catch (r) {
|
|
1241
|
+
}
|
|
1242
|
+
const t = ["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"], s = ((n = this.services) == null ? void 0 : n.languageUtils) || new pe(q());
|
|
1243
|
+
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(s.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1244
|
+
}
|
|
1245
|
+
static createInstance(e = {}, t) {
|
|
1246
|
+
const s = new M(e, t);
|
|
1247
|
+
return s.createInstance = M.createInstance, s;
|
|
1248
|
+
}
|
|
1249
|
+
cloneInstance(e = {}, t = _) {
|
|
1250
|
+
const s = e.forkResourceStore;
|
|
1251
|
+
s && delete e.forkResourceStore;
|
|
1252
|
+
const i = b(d(d({}, this.options), e), {
|
|
1253
|
+
isClone: !0
|
|
1254
|
+
}), n = new M(i);
|
|
1255
|
+
if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
|
|
1256
|
+
n[o] = this[o];
|
|
1257
|
+
}), n.services = d({}, this.services), n.services.utils = {
|
|
1258
|
+
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1259
|
+
}, s) {
|
|
1260
|
+
const o = Object.keys(this.store.data).reduce((u, l) => (u[l] = d({}, this.store.data[l]), u[l] = Object.keys(u[l]).reduce((h, f) => (h[f] = d({}, u[l][f]), h), u[l]), u), {});
|
|
1261
|
+
n.store = new ce(o, i), n.services.resourceStore = n.store;
|
|
1262
|
+
}
|
|
1263
|
+
if (e.interpolation) {
|
|
1264
|
+
const o = q(), u = d(d(d({}, o.interpolation), this.options.interpolation), e.interpolation), l = b(d({}, i), {
|
|
1265
|
+
interpolation: u
|
|
1266
|
+
});
|
|
1267
|
+
n.services.interpolator = new ye(l);
|
|
1268
|
+
}
|
|
1269
|
+
return n.translator = new G(n.services, i), n.translator.on("*", (o, ...u) => {
|
|
1270
|
+
n.emit(o, ...u);
|
|
1271
|
+
}), n.init(i, t), n.translator.options = i, n.translator.backendConnector.services.utils = {
|
|
1272
|
+
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1273
|
+
}, n;
|
|
1274
|
+
}
|
|
1275
|
+
toJSON() {
|
|
1276
|
+
return {
|
|
1277
|
+
options: this.options,
|
|
1278
|
+
store: this.store,
|
|
1279
|
+
language: this.language,
|
|
1280
|
+
languages: this.languages,
|
|
1281
|
+
resolvedLanguage: this.resolvedLanguage
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
const w = M.createInstance();
|
|
1286
|
+
w.createInstance;
|
|
1287
|
+
w.dir;
|
|
1288
|
+
w.init;
|
|
1289
|
+
w.loadResources;
|
|
1290
|
+
w.reloadResources;
|
|
1291
|
+
w.use;
|
|
1292
|
+
w.changeLanguage;
|
|
1293
|
+
w.getFixedT;
|
|
1294
|
+
w.t;
|
|
1295
|
+
w.exists;
|
|
1296
|
+
w.setDefaultNamespace;
|
|
1297
|
+
w.hasLoadedNamespace;
|
|
1298
|
+
w.loadNamespaces;
|
|
1299
|
+
w.loadLanguages;
|
|
1300
|
+
export {
|
|
1301
|
+
w as default,
|
|
1302
|
+
te as keyFromSelector
|
|
1303
|
+
};
|