@citizenplatform/core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/README.md +32 -0
  2. package/dist/index.js +6 -0
  3. package/dist/index10.js +110 -0
  4. package/dist/index10.js.map +1 -0
  5. package/dist/index100.js +10 -0
  6. package/dist/index100.js.map +1 -0
  7. package/dist/index101.js +31 -0
  8. package/dist/index101.js.map +1 -0
  9. package/dist/index102.js +165 -0
  10. package/dist/index102.js.map +1 -0
  11. package/dist/index103.js +48 -0
  12. package/dist/index103.js.map +1 -0
  13. package/dist/index104.js +8 -0
  14. package/dist/index104.js.map +1 -0
  15. package/dist/index105.js +14 -0
  16. package/dist/index105.js.map +1 -0
  17. package/dist/index106.js +8 -0
  18. package/dist/index106.js.map +1 -0
  19. package/dist/index107.js +7 -0
  20. package/dist/index107.js.map +1 -0
  21. package/dist/index108.js +16 -0
  22. package/dist/index108.js.map +1 -0
  23. package/dist/index109.js +7 -0
  24. package/dist/index109.js.map +1 -0
  25. package/dist/index11.js +97 -0
  26. package/dist/index11.js.map +1 -0
  27. package/dist/index110.js +22 -0
  28. package/dist/index110.js.map +1 -0
  29. package/dist/index111.js +7 -0
  30. package/dist/index111.js.map +1 -0
  31. package/dist/index112.js +9 -0
  32. package/dist/index112.js.map +1 -0
  33. package/dist/index113.js +20 -0
  34. package/dist/index113.js.map +1 -0
  35. package/dist/index114.js +56 -0
  36. package/dist/index114.js.map +1 -0
  37. package/dist/index115.js +73 -0
  38. package/dist/index115.js.map +1 -0
  39. package/dist/index116.js +20 -0
  40. package/dist/index116.js.map +1 -0
  41. package/dist/index117.js +26 -0
  42. package/dist/index117.js.map +1 -0
  43. package/dist/index118.js +2 -0
  44. package/dist/index119.js +3 -0
  45. package/dist/index12.js +22 -0
  46. package/dist/index12.js.map +1 -0
  47. package/dist/index120.js +22 -0
  48. package/dist/index120.js.map +1 -0
  49. package/dist/index121.js +149 -0
  50. package/dist/index121.js.map +1 -0
  51. package/dist/index122.js +20 -0
  52. package/dist/index122.js.map +1 -0
  53. package/dist/index123.js +9 -0
  54. package/dist/index123.js.map +1 -0
  55. package/dist/index124.js +9 -0
  56. package/dist/index124.js.map +1 -0
  57. package/dist/index125.js +63 -0
  58. package/dist/index125.js.map +1 -0
  59. package/dist/index126.js +24 -0
  60. package/dist/index126.js.map +1 -0
  61. package/dist/index127.js +9 -0
  62. package/dist/index127.js.map +1 -0
  63. package/dist/index128.js +11 -0
  64. package/dist/index128.js.map +1 -0
  65. package/dist/index129.js +10 -0
  66. package/dist/index129.js.map +1 -0
  67. package/dist/index13.js +18 -0
  68. package/dist/index13.js.map +1 -0
  69. package/dist/index130.js +254 -0
  70. package/dist/index130.js.map +1 -0
  71. package/dist/index131.js +25 -0
  72. package/dist/index131.js.map +1 -0
  73. package/dist/index132.js +250 -0
  74. package/dist/index132.js.map +1 -0
  75. package/dist/index133.js +20 -0
  76. package/dist/index133.js.map +1 -0
  77. package/dist/index134.js +13 -0
  78. package/dist/index134.js.map +1 -0
  79. package/dist/index135.js +15 -0
  80. package/dist/index135.js.map +1 -0
  81. package/dist/index136.js +117 -0
  82. package/dist/index136.js.map +1 -0
  83. package/dist/index137.js +13 -0
  84. package/dist/index137.js.map +1 -0
  85. package/dist/index138.js +22 -0
  86. package/dist/index138.js.map +1 -0
  87. package/dist/index139.js +26 -0
  88. package/dist/index139.js.map +1 -0
  89. package/dist/index14.js +11 -0
  90. package/dist/index14.js.map +1 -0
  91. package/dist/index140.js +20 -0
  92. package/dist/index140.js.map +1 -0
  93. package/dist/index141.js +22 -0
  94. package/dist/index141.js.map +1 -0
  95. package/dist/index142.js +12 -0
  96. package/dist/index142.js.map +1 -0
  97. package/dist/index143.js +26 -0
  98. package/dist/index143.js.map +1 -0
  99. package/dist/index144.js +56 -0
  100. package/dist/index144.js.map +1 -0
  101. package/dist/index145.js +12 -0
  102. package/dist/index145.js.map +1 -0
  103. package/dist/index146.js +212 -0
  104. package/dist/index146.js.map +1 -0
  105. package/dist/index147.js +4 -0
  106. package/dist/index148.js +5 -0
  107. package/dist/index149.js +7 -0
  108. package/dist/index15.js +192 -0
  109. package/dist/index15.js.map +1 -0
  110. package/dist/index16.js +24 -0
  111. package/dist/index16.js.map +1 -0
  112. package/dist/index17.js +14 -0
  113. package/dist/index17.js.map +1 -0
  114. package/dist/index18.js +54 -0
  115. package/dist/index18.js.map +1 -0
  116. package/dist/index19.js +99 -0
  117. package/dist/index19.js.map +1 -0
  118. package/dist/index2.js +13 -0
  119. package/dist/index20.js +10 -0
  120. package/dist/index20.js.map +1 -0
  121. package/dist/index21.js +18 -0
  122. package/dist/index21.js.map +1 -0
  123. package/dist/index22.js +9 -0
  124. package/dist/index22.js.map +1 -0
  125. package/dist/index23.js +67 -0
  126. package/dist/index23.js.map +1 -0
  127. package/dist/index24.js +13 -0
  128. package/dist/index24.js.map +1 -0
  129. package/dist/index25.js +64 -0
  130. package/dist/index25.js.map +1 -0
  131. package/dist/index26.js +84 -0
  132. package/dist/index26.js.map +1 -0
  133. package/dist/index27.js +12 -0
  134. package/dist/index27.js.map +1 -0
  135. package/dist/index28.js +41 -0
  136. package/dist/index28.js.map +1 -0
  137. package/dist/index29.js +10 -0
  138. package/dist/index29.js.map +1 -0
  139. package/dist/index3.js +11 -0
  140. package/dist/index3.js.map +1 -0
  141. package/dist/index30.js +10 -0
  142. package/dist/index30.js.map +1 -0
  143. package/dist/index31.js +46 -0
  144. package/dist/index31.js.map +1 -0
  145. package/dist/index32.js +273 -0
  146. package/dist/index32.js.map +1 -0
  147. package/dist/index33.js +49 -0
  148. package/dist/index33.js.map +1 -0
  149. package/dist/index34.js +16 -0
  150. package/dist/index34.js.map +1 -0
  151. package/dist/index35.js +24 -0
  152. package/dist/index35.js.map +1 -0
  153. package/dist/index36.js +61 -0
  154. package/dist/index36.js.map +1 -0
  155. package/dist/index37.js +63 -0
  156. package/dist/index37.js.map +1 -0
  157. package/dist/index38.js +12 -0
  158. package/dist/index38.js.map +1 -0
  159. package/dist/index39.js +26 -0
  160. package/dist/index39.js.map +1 -0
  161. package/dist/index4.js +9 -0
  162. package/dist/index4.js.map +1 -0
  163. package/dist/index40.js +55 -0
  164. package/dist/index40.js.map +1 -0
  165. package/dist/index41.js +48 -0
  166. package/dist/index41.js.map +1 -0
  167. package/dist/index42.js +6 -0
  168. package/dist/index42.js.map +1 -0
  169. package/dist/index43.js +13 -0
  170. package/dist/index43.js.map +1 -0
  171. package/dist/index44.js +10 -0
  172. package/dist/index44.js.map +1 -0
  173. package/dist/index45.js +40 -0
  174. package/dist/index45.js.map +1 -0
  175. package/dist/index46.js +71 -0
  176. package/dist/index46.js.map +1 -0
  177. package/dist/index47.js +10 -0
  178. package/dist/index47.js.map +1 -0
  179. package/dist/index48.js +44 -0
  180. package/dist/index48.js.map +1 -0
  181. package/dist/index49.js +117 -0
  182. package/dist/index49.js.map +1 -0
  183. package/dist/index5.js +6 -0
  184. package/dist/index5.js.map +1 -0
  185. package/dist/index50.js +14 -0
  186. package/dist/index50.js.map +1 -0
  187. package/dist/index51.js +16 -0
  188. package/dist/index51.js.map +1 -0
  189. package/dist/index52.js +28 -0
  190. package/dist/index52.js.map +1 -0
  191. package/dist/index53.js +36 -0
  192. package/dist/index53.js.map +1 -0
  193. package/dist/index54.js +25 -0
  194. package/dist/index54.js.map +1 -0
  195. package/dist/index55.js +44 -0
  196. package/dist/index55.js.map +1 -0
  197. package/dist/index56.js +160 -0
  198. package/dist/index56.js.map +1 -0
  199. package/dist/index57.js +77 -0
  200. package/dist/index57.js.map +1 -0
  201. package/dist/index58.js +14 -0
  202. package/dist/index58.js.map +1 -0
  203. package/dist/index59.js +38 -0
  204. package/dist/index59.js.map +1 -0
  205. package/dist/index6.js +14 -0
  206. package/dist/index6.js.map +1 -0
  207. package/dist/index60.js +15 -0
  208. package/dist/index60.js.map +1 -0
  209. package/dist/index61.js +12 -0
  210. package/dist/index61.js.map +1 -0
  211. package/dist/index62.js +19 -0
  212. package/dist/index62.js.map +1 -0
  213. package/dist/index63.js +20 -0
  214. package/dist/index63.js.map +1 -0
  215. package/dist/index64.js +24 -0
  216. package/dist/index64.js.map +1 -0
  217. package/dist/index65.js +12 -0
  218. package/dist/index65.js.map +1 -0
  219. package/dist/index66.js +25 -0
  220. package/dist/index66.js.map +1 -0
  221. package/dist/index67.js +16 -0
  222. package/dist/index67.js.map +1 -0
  223. package/dist/index68.js +130 -0
  224. package/dist/index68.js.map +1 -0
  225. package/dist/index69.js +32 -0
  226. package/dist/index69.js.map +1 -0
  227. package/dist/index7.js +41 -0
  228. package/dist/index7.js.map +1 -0
  229. package/dist/index70.js +8 -0
  230. package/dist/index70.js.map +1 -0
  231. package/dist/index71.js +122 -0
  232. package/dist/index71.js.map +1 -0
  233. package/dist/index72.js +35 -0
  234. package/dist/index72.js.map +1 -0
  235. package/dist/index73.js +14 -0
  236. package/dist/index73.js.map +1 -0
  237. package/dist/index74.js +13 -0
  238. package/dist/index74.js.map +1 -0
  239. package/dist/index75.js +42 -0
  240. package/dist/index75.js.map +1 -0
  241. package/dist/index76.js +66 -0
  242. package/dist/index76.js.map +1 -0
  243. package/dist/index77.js +10 -0
  244. package/dist/index77.js.map +1 -0
  245. package/dist/index78.js +17 -0
  246. package/dist/index78.js.map +1 -0
  247. package/dist/index79.js +9 -0
  248. package/dist/index79.js.map +1 -0
  249. package/dist/index8.js +6 -0
  250. package/dist/index8.js.map +1 -0
  251. package/dist/index80.js +21 -0
  252. package/dist/index80.js.map +1 -0
  253. package/dist/index81.js +21 -0
  254. package/dist/index81.js.map +1 -0
  255. package/dist/index82.js +21 -0
  256. package/dist/index82.js.map +1 -0
  257. package/dist/index83.js +21 -0
  258. package/dist/index83.js.map +1 -0
  259. package/dist/index84.js +21 -0
  260. package/dist/index84.js.map +1 -0
  261. package/dist/index85.js +21 -0
  262. package/dist/index85.js.map +1 -0
  263. package/dist/index86.js +21 -0
  264. package/dist/index86.js.map +1 -0
  265. package/dist/index87.js +219 -0
  266. package/dist/index87.js.map +1 -0
  267. package/dist/index88.js +12 -0
  268. package/dist/index88.js.map +1 -0
  269. package/dist/index89.js +15 -0
  270. package/dist/index89.js.map +1 -0
  271. package/dist/index9.js +39 -0
  272. package/dist/index9.js.map +1 -0
  273. package/dist/index90.js +55 -0
  274. package/dist/index90.js.map +1 -0
  275. package/dist/index91.js +38 -0
  276. package/dist/index91.js.map +1 -0
  277. package/dist/index92.js +52 -0
  278. package/dist/index92.js.map +1 -0
  279. package/dist/index93.js +12 -0
  280. package/dist/index93.js.map +1 -0
  281. package/dist/index94.js +15 -0
  282. package/dist/index94.js.map +1 -0
  283. package/dist/index95.js +28 -0
  284. package/dist/index95.js.map +1 -0
  285. package/dist/index96.js +111 -0
  286. package/dist/index96.js.map +1 -0
  287. package/dist/index97.js +9 -0
  288. package/dist/index97.js.map +1 -0
  289. package/dist/index98.js +38 -0
  290. package/dist/index98.js.map +1 -0
  291. package/dist/index99.js +8 -0
  292. package/dist/index99.js.map +1 -0
  293. package/package.json +88 -0
@@ -0,0 +1,254 @@
1
+ //#region node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js
2
+ var { slice: e, forEach: t } = [];
3
+ function n(n) {
4
+ return t.call(e.call(arguments, 1), (e) => {
5
+ if (e) for (let t in e) n[t] === void 0 && (n[t] = e[t]);
6
+ }), n;
7
+ }
8
+ function r(e) {
9
+ return typeof e == "string" && [
10
+ /<\s*script.*?>/i,
11
+ /<\s*\/\s*script\s*>/i,
12
+ /<\s*img.*?on\w+\s*=/i,
13
+ /<\s*\w+\s*on\w+\s*=.*?>/i,
14
+ /javascript\s*:/i,
15
+ /vbscript\s*:/i,
16
+ /expression\s*\(/i,
17
+ /eval\s*\(/i,
18
+ /alert\s*\(/i,
19
+ /document\.cookie/i,
20
+ /document\.write\s*\(/i,
21
+ /window\.location/i,
22
+ /innerHTML/i
23
+ ].some((t) => t.test(e));
24
+ }
25
+ var i = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, a = function(e, t) {
26
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { path: "/" }, r = `${e}=${encodeURIComponent(t)}`;
27
+ if (n.maxAge > 0) {
28
+ let e = n.maxAge - 0;
29
+ if (Number.isNaN(e)) throw Error("maxAge should be a Number");
30
+ r += `; Max-Age=${Math.floor(e)}`;
31
+ }
32
+ if (n.domain) {
33
+ if (!i.test(n.domain)) throw TypeError("option domain is invalid");
34
+ r += `; Domain=${n.domain}`;
35
+ }
36
+ if (n.path) {
37
+ if (!i.test(n.path)) throw TypeError("option path is invalid");
38
+ r += `; Path=${n.path}`;
39
+ }
40
+ if (n.expires) {
41
+ if (typeof n.expires.toUTCString != "function") throw TypeError("option expires is invalid");
42
+ r += `; Expires=${n.expires.toUTCString()}`;
43
+ }
44
+ if (n.httpOnly && (r += "; HttpOnly"), n.secure && (r += "; Secure"), n.sameSite) switch (typeof n.sameSite == "string" ? n.sameSite.toLowerCase() : n.sameSite) {
45
+ case !0:
46
+ r += "; SameSite=Strict";
47
+ break;
48
+ case "lax":
49
+ r += "; SameSite=Lax";
50
+ break;
51
+ case "strict":
52
+ r += "; SameSite=Strict";
53
+ break;
54
+ case "none":
55
+ r += "; SameSite=None";
56
+ break;
57
+ default: throw TypeError("option sameSite is invalid");
58
+ }
59
+ return n.partitioned && (r += "; Partitioned"), r;
60
+ }, o = {
61
+ create(e, t, n, r) {
62
+ let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
63
+ path: "/",
64
+ sameSite: "strict"
65
+ };
66
+ n && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + n * 60 * 1e3)), r && (i.domain = r), document.cookie = a(e, t, i);
67
+ },
68
+ read(e) {
69
+ let t = `${e}=`, n = document.cookie.split(";");
70
+ for (let e = 0; e < n.length; e++) {
71
+ let r = n[e];
72
+ for (; r.charAt(0) === " ";) r = r.substring(1, r.length);
73
+ if (r.indexOf(t) === 0) return r.substring(t.length, r.length);
74
+ }
75
+ return null;
76
+ },
77
+ remove(e, t) {
78
+ this.create(e, "", -1, t);
79
+ }
80
+ }, s = {
81
+ name: "cookie",
82
+ lookup(e) {
83
+ let { lookupCookie: t } = e;
84
+ if (t && typeof document < "u") return o.read(t) || void 0;
85
+ },
86
+ cacheUserLanguage(e, t) {
87
+ let { lookupCookie: n, cookieMinutes: r, cookieDomain: i, cookieOptions: a } = t;
88
+ n && typeof document < "u" && o.create(n, e, r, i, a);
89
+ }
90
+ }, c = {
91
+ name: "querystring",
92
+ lookup(e) {
93
+ let { lookupQuerystring: t } = e, n;
94
+ if (typeof window < "u") {
95
+ let { search: e } = window.location;
96
+ !window.location.search && window.location.hash?.indexOf("?") > -1 && (e = window.location.hash.substring(window.location.hash.indexOf("?")));
97
+ let r = e.substring(1).split("&");
98
+ for (let e = 0; e < r.length; e++) {
99
+ let i = r[e].indexOf("=");
100
+ i > 0 && r[e].substring(0, i) === t && (n = r[e].substring(i + 1));
101
+ }
102
+ }
103
+ return n;
104
+ }
105
+ }, l = {
106
+ name: "hash",
107
+ lookup(e) {
108
+ let { lookupHash: t, lookupFromHashIndex: n } = e, r;
109
+ if (typeof window < "u") {
110
+ let { hash: e } = window.location;
111
+ if (e && e.length > 2) {
112
+ let i = e.substring(1);
113
+ if (t) {
114
+ let e = i.split("&");
115
+ for (let n = 0; n < e.length; n++) {
116
+ let i = e[n].indexOf("=");
117
+ i > 0 && e[n].substring(0, i) === t && (r = e[n].substring(i + 1));
118
+ }
119
+ }
120
+ if (r) return r;
121
+ if (!r && n > -1) {
122
+ let t = e.match(/\/([a-zA-Z-]*)/g);
123
+ return Array.isArray(t) ? t[typeof n == "number" ? n : 0]?.replace("/", "") : void 0;
124
+ }
125
+ }
126
+ }
127
+ return r;
128
+ }
129
+ }, u = null, d = () => {
130
+ if (u !== null) return u;
131
+ try {
132
+ if (u = typeof window < "u" && window.localStorage !== null, !u) return !1;
133
+ let e = "i18next.translate.boo";
134
+ window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e);
135
+ } catch {
136
+ u = !1;
137
+ }
138
+ return u;
139
+ }, f = {
140
+ name: "localStorage",
141
+ lookup(e) {
142
+ let { lookupLocalStorage: t } = e;
143
+ if (t && d()) return window.localStorage.getItem(t) || void 0;
144
+ },
145
+ cacheUserLanguage(e, t) {
146
+ let { lookupLocalStorage: n } = t;
147
+ n && d() && window.localStorage.setItem(n, e);
148
+ }
149
+ }, p = null, m = () => {
150
+ if (p !== null) return p;
151
+ try {
152
+ if (p = typeof window < "u" && window.sessionStorage !== null, !p) return !1;
153
+ let e = "i18next.translate.boo";
154
+ window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
155
+ } catch {
156
+ p = !1;
157
+ }
158
+ return p;
159
+ }, h = {
160
+ name: "sessionStorage",
161
+ lookup(e) {
162
+ let { lookupSessionStorage: t } = e;
163
+ if (t && m()) return window.sessionStorage.getItem(t) || void 0;
164
+ },
165
+ cacheUserLanguage(e, t) {
166
+ let { lookupSessionStorage: n } = t;
167
+ n && m() && window.sessionStorage.setItem(n, e);
168
+ }
169
+ }, g = {
170
+ name: "navigator",
171
+ lookup(e) {
172
+ let t = [];
173
+ if (typeof navigator < "u") {
174
+ let { languages: e, userLanguage: n, language: r } = navigator;
175
+ if (e) for (let n = 0; n < e.length; n++) t.push(e[n]);
176
+ n && t.push(n), r && t.push(r);
177
+ }
178
+ return t.length > 0 ? t : void 0;
179
+ }
180
+ }, _ = {
181
+ name: "htmlTag",
182
+ lookup(e) {
183
+ let { htmlTag: t } = e, n, r = t || (typeof document < "u" ? document.documentElement : null);
184
+ return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n;
185
+ }
186
+ }, v = {
187
+ name: "path",
188
+ lookup(e) {
189
+ let { lookupFromPathIndex: t } = e;
190
+ if (typeof window > "u") return;
191
+ let n = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
192
+ if (Array.isArray(n)) return n[typeof t == "number" ? t : 0]?.replace("/", "");
193
+ }
194
+ }, y = {
195
+ name: "subdomain",
196
+ lookup(e) {
197
+ let { lookupFromSubdomainIndex: t } = e, n = typeof t == "number" ? t + 1 : 1, r = typeof window < "u" && window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
198
+ if (r) return r[n];
199
+ }
200
+ }, b = !1;
201
+ try {
202
+ document.cookie, b = !0;
203
+ } catch {}
204
+ var x = [
205
+ "querystring",
206
+ "cookie",
207
+ "localStorage",
208
+ "sessionStorage",
209
+ "navigator",
210
+ "htmlTag"
211
+ ];
212
+ b || x.splice(1, 1);
213
+ var S = () => ({
214
+ order: x,
215
+ lookupQuerystring: "lng",
216
+ lookupCookie: "i18next",
217
+ lookupLocalStorage: "i18nextLng",
218
+ lookupSessionStorage: "i18nextLng",
219
+ caches: ["localStorage"],
220
+ excludeCacheFor: ["cimode"],
221
+ convertDetectedLanguage: (e) => e
222
+ }), C = class {
223
+ constructor(e) {
224
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
225
+ this.type = "languageDetector", this.detectors = {}, this.init(e, t);
226
+ }
227
+ init() {
228
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { languageUtils: {} }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
229
+ this.services = e, this.options = n(t, this.options || {}, S()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (e) => e.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(s), this.addDetector(c), this.addDetector(f), this.addDetector(h), this.addDetector(g), this.addDetector(_), this.addDetector(v), this.addDetector(y), this.addDetector(l);
230
+ }
231
+ addDetector(e) {
232
+ return this.detectors[e.name] = e, this;
233
+ }
234
+ detect() {
235
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.order, t = [];
236
+ return e.forEach((e) => {
237
+ if (this.detectors[e]) {
238
+ let n = this.detectors[e].lookup(this.options);
239
+ n && typeof n == "string" && (n = [n]), n && (t = t.concat(n));
240
+ }
241
+ }), t = t.filter((e) => e != null && !r(e)).map((e) => this.options.convertDetectedLanguage(e)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
242
+ }
243
+ cacheUserLanguage(e) {
244
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
245
+ t && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(e) > -1 || t.forEach((t) => {
246
+ this.detectors[t] && this.detectors[t].cacheUserLanguage(e, this.options);
247
+ }));
248
+ }
249
+ };
250
+ C.type = "languageDetector";
251
+ //#endregion
252
+ export { C as default };
253
+
254
+ //# sourceMappingURL=index130.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index130.js","names":[],"sources":["../node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js"],"sourcesContent":["const {\n slice,\n forEach\n} = [];\nfunction defaults(obj) {\n forEach.call(slice.call(arguments, 1), source => {\n if (source) {\n for (const prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\nfunction hasXSS(input) {\n if (typeof input !== 'string') return false;\n\n // Common XSS attack patterns\n const xssPatterns = [/<\\s*script.*?>/i, /<\\s*\\/\\s*script\\s*>/i, /<\\s*img.*?on\\w+\\s*=/i, /<\\s*\\w+\\s*on\\w+\\s*=.*?>/i, /javascript\\s*:/i, /vbscript\\s*:/i, /expression\\s*\\(/i, /eval\\s*\\(/i, /alert\\s*\\(/i, /document\\.cookie/i, /document\\.write\\s*\\(/i, /window\\.location/i, /innerHTML/i];\n return xssPatterns.some(pattern => pattern.test(input));\n}\n\n// eslint-disable-next-line no-control-regex\nconst fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\nconst serializeCookie = function (name, val) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n path: '/'\n };\n const opt = options;\n const value = encodeURIComponent(val);\n let str = `${name}=${value}`;\n if (opt.maxAge > 0) {\n const maxAge = opt.maxAge - 0;\n if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += `; Max-Age=${Math.floor(maxAge)}`;\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += `; Domain=${opt.domain}`;\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += `; Path=${opt.path}`;\n }\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n str += `; Expires=${opt.expires.toUTCString()}`;\n }\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n if (opt.sameSite) {\n const sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n if (opt.partitioned) str += '; Partitioned';\n return str;\n};\nconst cookie = {\n create(name, value, minutes, domain) {\n let cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, value, cookieOptions);\n },\n read(name) {\n const nameEQ = `${name}=`;\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n },\n remove(name, domain) {\n this.create(name, '', -1, domain);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n // Deconstruct the options object and extract the lookupCookie property\n lookup(_ref) {\n let {\n lookupCookie\n } = _ref;\n if (lookupCookie && typeof document !== 'undefined') {\n return cookie.read(lookupCookie) || undefined;\n }\n return undefined;\n },\n // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupCookie,\n cookieMinutes,\n cookieDomain,\n cookieOptions\n } = _ref2;\n if (lookupCookie && typeof document !== 'undefined') {\n cookie.create(lookupCookie, lng, cookieMinutes, cookieDomain, cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n // Deconstruct the options object and extract the lookupQuerystring property\n lookup(_ref) {\n let {\n lookupQuerystring\n } = _ref;\n let found;\n if (typeof window !== 'undefined') {\n let {\n search\n } = window.location;\n if (!window.location.search && window.location.hash?.indexOf('?') > -1) {\n search = window.location.hash.substring(window.location.hash.indexOf('?'));\n }\n const query = search.substring(1);\n const params = query.split('&');\n for (let i = 0; i < params.length; i++) {\n const pos = params[i].indexOf('=');\n if (pos > 0) {\n const key = params[i].substring(0, pos);\n if (key === lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n return found;\n }\n};\n\nvar hash = {\n name: 'hash',\n // Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property\n lookup(_ref) {\n let {\n lookupHash,\n lookupFromHashIndex\n } = _ref;\n let found;\n if (typeof window !== 'undefined') {\n const {\n hash\n } = window.location;\n if (hash && hash.length > 2) {\n const query = hash.substring(1);\n if (lookupHash) {\n const params = query.split('&');\n for (let i = 0; i < params.length; i++) {\n const pos = params[i].indexOf('=');\n if (pos > 0) {\n const key = params[i].substring(0, pos);\n if (key === lookupHash) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n if (found) return found;\n if (!found && lookupFromHashIndex > -1) {\n const language = hash.match(/\\/([a-zA-Z-]*)/g);\n if (!Array.isArray(language)) return undefined;\n const index = typeof lookupFromHashIndex === 'number' ? lookupFromHashIndex : 0;\n return language[index]?.replace('/', '');\n }\n }\n }\n return found;\n }\n};\n\nlet hasLocalStorageSupport = null;\nconst localStorageAvailable = () => {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n try {\n hasLocalStorageSupport = typeof window !== 'undefined' && window.localStorage !== null;\n if (!hasLocalStorageSupport) {\n return false;\n }\n const testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n return hasLocalStorageSupport;\n};\nvar localStorage = {\n name: 'localStorage',\n // Deconstruct the options object and extract the lookupLocalStorage property\n lookup(_ref) {\n let {\n lookupLocalStorage\n } = _ref;\n if (lookupLocalStorage && localStorageAvailable()) {\n return window.localStorage.getItem(lookupLocalStorage) || undefined; // Undefined ensures type consistency with the previous version of this function\n }\n return undefined;\n },\n // Deconstruct the options object and extract the lookupLocalStorage property\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupLocalStorage\n } = _ref2;\n if (lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(lookupLocalStorage, lng);\n }\n }\n};\n\nlet hasSessionStorageSupport = null;\nconst sessionStorageAvailable = () => {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n try {\n hasSessionStorageSupport = typeof window !== 'undefined' && window.sessionStorage !== null;\n if (!hasSessionStorageSupport) {\n return false;\n }\n const testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n return hasSessionStorageSupport;\n};\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup(_ref) {\n let {\n lookupSessionStorage\n } = _ref;\n if (lookupSessionStorage && sessionStorageAvailable()) {\n return window.sessionStorage.getItem(lookupSessionStorage) || undefined;\n }\n return undefined;\n },\n cacheUserLanguage(lng, _ref2) {\n let {\n lookupSessionStorage\n } = _ref2;\n if (lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup(options) {\n const found = [];\n if (typeof navigator !== 'undefined') {\n const {\n languages,\n userLanguage,\n language\n } = navigator;\n if (languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (let i = 0; i < languages.length; i++) {\n found.push(languages[i]);\n }\n }\n if (userLanguage) {\n found.push(userLanguage);\n }\n if (language) {\n found.push(language);\n }\n }\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n // Deconstruct the options object and extract the htmlTag property\n lookup(_ref) {\n let {\n htmlTag\n } = _ref;\n let found;\n const internalHtmlTag = htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n if (internalHtmlTag && typeof internalHtmlTag.getAttribute === 'function') {\n found = internalHtmlTag.getAttribute('lang');\n }\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n // Deconstruct the options object and extract the lookupFromPathIndex property\n lookup(_ref) {\n let {\n lookupFromPathIndex\n } = _ref;\n if (typeof window === 'undefined') return undefined;\n const language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n if (!Array.isArray(language)) return undefined;\n const index = typeof lookupFromPathIndex === 'number' ? lookupFromPathIndex : 0;\n return language[index]?.replace('/', '');\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup(_ref) {\n let {\n lookupFromSubdomainIndex\n } = _ref;\n // If given get the subdomain index else 1\n const internalLookupFromSubdomainIndex = typeof lookupFromSubdomainIndex === 'number' ? lookupFromSubdomainIndex + 1 : 1;\n // get all matches if window.location. is existing\n // first item of match is the match itself and the second is the first group match which should be the first subdomain match\n // is the hostname no public domain get the or option of localhost\n const language = typeof window !== 'undefined' && window.location?.hostname?.match(/^(\\w{2,5})\\.(([a-z0-9-]{1,63}\\.[a-z]{2,6})|localhost)/i);\n\n // if there is no match (null) return undefined\n if (!language) return undefined;\n // return the given group match\n return language[internalLookupFromSubdomainIndex];\n }\n};\n\n// some environments, throws when accessing document.cookie\nlet canCookies = false;\ntry {\n // eslint-disable-next-line no-unused-expressions\n document.cookie;\n canCookies = true;\n // eslint-disable-next-line no-empty\n} catch (e) {}\nconst order = ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'];\nif (!canCookies) order.splice(1, 1);\nconst getDefaults = () => ({\n order,\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'],\n // cookieMinutes: 10,\n // cookieDomain: 'myDomain'\n\n convertDetectedLanguage: l => l\n});\nclass Browser {\n constructor(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n init() {\n let services = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n languageUtils: {}\n };\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults());\n if (typeof this.options.convertDetectedLanguage === 'string' && this.options.convertDetectedLanguage.indexOf('15897') > -1) {\n this.options.convertDetectedLanguage = l => l.replace('-', '_');\n }\n\n // backwards compatibility\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n this.addDetector(hash);\n }\n addDetector(detector) {\n this.detectors[detector.name] = detector;\n return this;\n }\n detect() {\n let detectionOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.order;\n let detected = [];\n detectionOrder.forEach(detectorName => {\n if (this.detectors[detectorName]) {\n let lookup = this.detectors[detectorName].lookup(this.options);\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n detected = detected.filter(d => d !== undefined && d !== null && !hasXSS(d)).map(d => this.options.convertDetectedLanguage(d));\n if (this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n cacheUserLanguage(lng) {\n let caches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(cacheName => {\n if (this.detectors[cacheName]) this.detectors[cacheName].cacheUserLanguage(lng, this.options);\n });\n }\n}\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,EACJ,UACA,eACE,CAAC;AACL,SAAS,EAAS,GAAK;CAQrB,OAPA,EAAQ,KAAK,EAAM,KAAK,WAAW,CAAC,IAAG,MAAU;EAC/C,IAAI,GACG,KAAA,IAAM,KAAQ,GACjB,AAAI,EAAI,OAAU,KAAA,MAAW,EAAI,KAAQ,EAAO;CAGtD,CAAC,GACM;AACT;AACA,SAAS,EAAO,GAAO;CAKrB,OAJI,OAAO,KAAU,YAId;EADc;EAAmB;EAAwB;EAAwB;EAA4B;EAAmB;EAAiB;EAAoB;EAAc;EAAe;EAAqB;EAAyB;EAAqB;CAC3P,CAAC,CAAC,MAAK,MAAW,EAAQ,KAAK,CAAK,CAAC;AACxD;AAGA,IAAM,IAAqB,yCACrB,IAAkB,SAAU,GAAM,GA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,GACzH,KAAK,YAAY,KAAK,SAAS,iBAAiB,KAAK,SAAS,cAAc,wBAA8B,IACvG,EAAS,SAAS,IAAI,EAAS,KAAK;CAC7C;CACA,kBAAkB,GAAK;EACrB,IAAI,IAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAA,IAAY,UAAU,KAAK,KAAK,QAAQ;EACzF,MACD,KAAK,QAAQ,mBAAmB,KAAK,QAAQ,gBAAgB,QAAQ,CAAG,IAAI,MAChF,EAAO,SAAQ,MAAa;GAC1B,AAAI,KAAK,UAAU,MAAY,KAAK,UAAU,EAAU,CAAC,kBAAkB,GAAK,KAAK,OAAO;EAC9F,CAAC;CACH;AACF;AACA,EAAQ,OAAO"}
@@ -0,0 +1,25 @@
1
+ import e from "./index116.js";
2
+ import { getTranslation as t } from "./index142.js";
3
+ import n from "axios";
4
+ //#region src/libs/core/api/apiClient.ts
5
+ var r = n.create({
6
+ baseURL: "import.meta.env.VITE_API_BASE_URL",
7
+ withCredentials: !0,
8
+ headers: { "Content-Type": "application/json" }
9
+ });
10
+ r.interceptors.request.use((n) => {
11
+ let r = t() === "en" ? 99 : 6;
12
+ return n.headers.loginparams = JSON.stringify({
13
+ userId: 4370,
14
+ langCd: r,
15
+ stateCd: 38,
16
+ stateId: 24
17
+ }), e.info("Request => ", n.data), n;
18
+ }), r.interceptors.response.use((t) => (e.info("Response => ", t.data), t), async (e) => {
19
+ let t = e.response?.status, n = e.config?.url ?? "";
20
+ return t === 401 && n.includes("user-login") || t === 401 && window.location.replace("/login"), Promise.reject(e);
21
+ });
22
+ //#endregion
23
+ export { r as default };
24
+
25
+ //# sourceMappingURL=index131.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index131.js","names":[],"sources":["../src/libs/core/api/apiClient.ts"],"sourcesContent":["import axios from \"axios\";\r\nimport { getTranslation } from \"utils/commonFunctions\";\r\nimport Logger from \"utils/loggers\";\r\n\r\nconst apiClient = axios.create({\r\n baseURL: \"import.meta.env.VITE_API_BASE_URL\",\r\n withCredentials: true,\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n});\r\n\r\napiClient.interceptors.request.use((config) => {\r\n const currentLang =\r\n getTranslation() === \"en\"\r\n ? 99\r\n : 6;\r\n\r\n config.headers.loginparams =\r\n JSON.stringify({\r\n userId: 4370,\r\n // loginId: \"002362EXK\",\r\n langCd: currentLang,\r\n \"stateCd\":38,\"stateId\":24\r\n });\r\n\r\n Logger.info(\"Request => \", config.data)\r\n\r\n return config;\r\n});\r\n\r\napiClient.interceptors.response.use(\r\n (response) => {\r\n Logger.info(\"Response => \", response.data)\r\n return response\r\n },\r\n\r\n async (error) => {\r\n const status =\r\n error.response?.status;\r\n\r\n const url =\r\n error.config?.url ?? \"\";\r\n\r\n if (\r\n status === 401 &&\r\n url.includes(\"user-login\")\r\n ) {\r\n return Promise.reject(error);\r\n }\r\n\r\n if (status === 401) {\r\n window.location.replace(\"/login\");\r\n }\r\n\r\n return Promise.reject(error);\r\n },\r\n);\r\n\r\nexport default apiClient;"],"mappings":";;;;AAIA,IAAM,IAAY,EAAM,OAAO;CAC7B,SAAS;CACT,iBAAiB;CACjB,SAAS,EACP,gBAAgB,mBAClB;AACF,CAAC;AAED,EAAU,aAAa,QAAQ,KAAK,MAAW;CAC7C,IAAM,IACJ,EAAe,MAAM,OACjB,KACA;CAYN,OAVA,EAAO,QAAQ,cACb,KAAK,UAAU;EACb,QAAQ;EAER,QAAQ;EACR,SAAU;EAAG,SAAU;CACzB,CAAC,GAEH,EAAO,KAAK,eAAe,EAAO,IAAI,GAE/B;AACT,CAAC,GAED,EAAU,aAAa,SAAS,KAC7B,OACC,EAAO,KAAK,gBAAgB,EAAS,IAAI,GAClC,IAGT,OAAO,MAAU;CACf,IAAM,IACJ,EAAM,UAAU,QAEZ,IACJ,EAAM,QAAQ,OAAO;CAavB,OAVE,MAAW,OACX,EAAI,SAAS,YAAY,KAKvB,MAAW,OACb,OAAO,SAAS,QAAQ,QAAQ,GAJzB,QAAQ,OAAO,CAAK;AAQ/B,CACF"}
@@ -0,0 +1,250 @@
1
+ //#region node_modules/i18next-http-backend/esm/index.js
2
+ var e = [];
3
+ e.forEach, e.slice;
4
+ var t = [
5
+ "__proto__",
6
+ "constructor",
7
+ "prototype"
8
+ ];
9
+ function n(e) {
10
+ return !(typeof e != "string" || e.length === 0 || e.length > 128 || t.indexOf(e) > -1 || e.indexOf("..") > -1 || e.indexOf("\\") > -1 || /[?#%\s]/.test(e) || /[\x00-\x1F\x7F]/.test(e));
11
+ }
12
+ function r(e) {
13
+ return !(!n(e) || e.indexOf("/") > -1 || e.indexOf("@") > -1);
14
+ }
15
+ function i(e) {
16
+ return n(e);
17
+ }
18
+ var a = {
19
+ lng: r,
20
+ ns: i
21
+ };
22
+ function o(e) {
23
+ return typeof e == "string" ? e.replace(/[\r\n\x00-\x1F\x7F]/g, " ") : e;
24
+ }
25
+ function s(e) {
26
+ if (typeof e != "string" || e.length === 0) return e;
27
+ try {
28
+ let t = new URL(e);
29
+ return t.username || t.password ? (t.username = "", t.password = "", t.toString()) : e;
30
+ } catch {
31
+ return e.replace(/(\/\/)[^/@\s]+@/g, "$1");
32
+ }
33
+ }
34
+ function c() {
35
+ return typeof XMLHttpRequest == "function" || typeof XMLHttpRequest == "object";
36
+ }
37
+ function l(e) {
38
+ return !!e && typeof e.then == "function";
39
+ }
40
+ function u(e) {
41
+ return l(e) ? e : Promise.resolve(e);
42
+ }
43
+ var d = /\{\{(.+?)\}\}/g;
44
+ function f(e, n) {
45
+ let i = !1, o = e.replace(d, (e, o) => {
46
+ let s = o.trim();
47
+ if (t.indexOf(s) > -1) return e;
48
+ let c = n[s];
49
+ if (c == null) return e;
50
+ let l = a[s] || r, u = String(c).split("+");
51
+ for (let t of u) if (!l(t)) return i = !0, e;
52
+ return u.join("+");
53
+ });
54
+ return i ? null : o;
55
+ }
56
+ var p = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof window < "u" ? window : void 0, m;
57
+ typeof fetch == "function" ? m = fetch : p && typeof p.fetch == "function" && (m = p.fetch);
58
+ var h = c() && p ? p.XMLHttpRequest : void 0, g = typeof ActiveXObject == "function" && p ? p.ActiveXObject : void 0, _ = [
59
+ "__proto__",
60
+ "constructor",
61
+ "prototype"
62
+ ], v = (e, t) => {
63
+ if (t && typeof t == "object") {
64
+ let n = "";
65
+ for (let e of Object.keys(t)) _.indexOf(e) > -1 || (n += "&" + encodeURIComponent(e) + "=" + encodeURIComponent(t[e]));
66
+ if (!n) return e;
67
+ e = e + (e.indexOf("?") === -1 ? "?" : "&") + n.slice(1);
68
+ }
69
+ return e;
70
+ }, y = (e, t, n, r) => {
71
+ let i = (e) => {
72
+ if (!e.ok) return n(e.statusText || "Error", { status: e.status });
73
+ e.text().then((t) => {
74
+ n(null, {
75
+ status: e.status,
76
+ data: t
77
+ });
78
+ }).catch(n);
79
+ };
80
+ if (r) {
81
+ let a = r(e, t);
82
+ if (a instanceof Promise) {
83
+ a.then(i).catch(n);
84
+ return;
85
+ }
86
+ }
87
+ typeof fetch == "function" ? fetch(e, t).then(i).catch(n) : m(e, t).then(i).catch(n);
88
+ }, b = (e, t, n, r) => {
89
+ e.queryStringParams && (t = v(t, e.queryStringParams));
90
+ let i = { ...typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders };
91
+ typeof window > "u" && typeof global < "u" && global.process !== void 0 && global.process.versions && global.process.versions.node && (i["User-Agent"] = `i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`), n && (i["Content-Type"] = "application/json");
92
+ let a = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, o = {
93
+ method: n ? "POST" : "GET",
94
+ body: n ? e.stringify(n) : void 0,
95
+ headers: i,
96
+ ...e._omitFetchOptions ? {} : a
97
+ }, s = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
98
+ try {
99
+ y(t, o, r, s);
100
+ } catch (n) {
101
+ if (!a || Object.keys(a).length === 0 || !n.message || n.message.indexOf("not implemented") < 0) return r(n);
102
+ try {
103
+ Object.keys(a).forEach((e) => {
104
+ delete o[e];
105
+ }), y(t, o, r, s), e._omitFetchOptions = !0;
106
+ } catch (e) {
107
+ r(e);
108
+ }
109
+ }
110
+ }, x = (e, t, n, r) => {
111
+ n && typeof n == "object" && (n = v("", n).slice(1)), e.queryStringParams && (t = v(t, e.queryStringParams));
112
+ try {
113
+ let i = h ? new h() : new g("MSXML2.XMLHTTP.3.0");
114
+ i.open(n ? "POST" : "GET", t, 1), e.crossDomain || i.setRequestHeader("X-Requested-With", "XMLHttpRequest"), i.withCredentials = !!e.withCredentials, n && i.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), i.overrideMimeType && i.overrideMimeType("application/json");
115
+ let a = e.customHeaders;
116
+ if (a = typeof a == "function" ? a() : a, a) for (let e of Object.keys(a)) _.indexOf(e) > -1 || i.setRequestHeader(e, a[e]);
117
+ i.onreadystatechange = () => {
118
+ i.readyState > 3 && r(i.status >= 400 ? i.statusText : null, {
119
+ status: i.status,
120
+ data: i.responseText
121
+ });
122
+ }, i.send(n);
123
+ } catch (e) {
124
+ console && console.log(e);
125
+ }
126
+ }, S = (e, t, n, r) => {
127
+ if (typeof n == "function" && (r = n, n = void 0), r ||= (() => {}), m && t.indexOf("file:") !== 0) return b(e, t, n, r);
128
+ if (c() || typeof ActiveXObject == "function") return x(e, t, n, r);
129
+ r(/* @__PURE__ */ Error("No fetch and no xhr implementation found!"));
130
+ }, C = () => ({
131
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
132
+ addPath: "/locales/add/{{lng}}/{{ns}}",
133
+ parse: (e) => JSON.parse(e),
134
+ stringify: JSON.stringify,
135
+ parsePayload: (e, t, n) => ({ [t]: n || "" }),
136
+ parseLoadPayload: (e, t) => void 0,
137
+ request: S,
138
+ reloadInterval: typeof window < "u" ? !1 : 36e5,
139
+ customHeaders: {},
140
+ queryStringParams: {},
141
+ crossDomain: !1,
142
+ withCredentials: !1,
143
+ overrideMimeType: !1,
144
+ requestOptions: {
145
+ mode: "cors",
146
+ credentials: "same-origin",
147
+ cache: "default"
148
+ }
149
+ }), w = class {
150
+ constructor(e, t = {}, n = {}) {
151
+ this.services = e, this.options = t, this.allOptions = n, this.type = "backend", this.init(e, t, n);
152
+ }
153
+ init(e, t = {}, n = {}) {
154
+ if (this.services = e, this.options = {
155
+ ...C(),
156
+ ...this.options || {},
157
+ ...t
158
+ }, this.allOptions = n, this.services && this.options.reloadInterval) {
159
+ let e = setInterval(() => this.reload(), this.options.reloadInterval);
160
+ typeof e == "object" && typeof e.unref == "function" && e.unref();
161
+ }
162
+ }
163
+ readMulti(e, t, n) {
164
+ this._readAny(e, e, t, t, n);
165
+ }
166
+ read(e, t, n) {
167
+ this._readAny([e], e, [t], t, n);
168
+ }
169
+ _readAny(e, t, n, r, i) {
170
+ let a = this.options.loadPath;
171
+ typeof this.options.loadPath == "function" && (a = this.options.loadPath(e, n)), a = u(a), a.then((a) => {
172
+ if (!a) return i(null, {});
173
+ let s = f(a, {
174
+ lng: e.join("+"),
175
+ ns: n.join("+")
176
+ });
177
+ if (s == null) {
178
+ let t = e.map(o).join(", "), r = n.map(o).join(", ");
179
+ return i(/* @__PURE__ */ Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + t + "] namespaces=[" + r + "]"), !1);
180
+ }
181
+ this.loadUrl(s, i, t, r);
182
+ });
183
+ }
184
+ loadUrl(e, t, n, r) {
185
+ let i = typeof n == "string" ? [n] : n, a = typeof r == "string" ? [r] : r, c = this.options.parseLoadPayload(i, a), l = o(s(e));
186
+ this.options.request(this.options, e, c, (e, i) => {
187
+ if (i && (i.status >= 500 && i.status < 600 || !i.status)) return t("failed loading " + l + "; status code: " + i.status, !0);
188
+ if (i && i.status >= 400 && i.status < 500) return t("failed loading " + l + "; status code: " + i.status, !1);
189
+ if (!i && e && e.message) {
190
+ let n = e.message.toLowerCase();
191
+ if ([
192
+ "failed",
193
+ "fetch",
194
+ "network",
195
+ "load"
196
+ ].find((e) => n.indexOf(e) > -1)) return t("failed loading " + l + ": " + o(e.message), !0);
197
+ }
198
+ if (e) return t(e, !1);
199
+ let a, s;
200
+ try {
201
+ a = typeof i.data == "string" ? this.options.parse(i.data, n, r) : i.data;
202
+ } catch {
203
+ s = "failed parsing " + l + " to json";
204
+ }
205
+ if (s) return t(s, !1);
206
+ t(null, a);
207
+ });
208
+ }
209
+ create(e, t, n, r, i) {
210
+ if (!this.options.addPath) return;
211
+ typeof e == "string" && (e = [e]);
212
+ let a = this.options.parsePayload(t, n, r), o = 0, s = [], c = [];
213
+ e.forEach((n) => {
214
+ let r = this.options.addPath;
215
+ typeof this.options.addPath == "function" && (r = this.options.addPath(n, t));
216
+ let l = f(r, {
217
+ lng: n,
218
+ ns: t
219
+ });
220
+ if (l == null) {
221
+ o += 1, i && o === e.length && i(s, c);
222
+ return;
223
+ }
224
+ this.options.request(this.options, l, a, (t, n) => {
225
+ o += 1, s.push(t), c.push(n), o === e.length && typeof i == "function" && i(s, c);
226
+ });
227
+ });
228
+ }
229
+ reload() {
230
+ let { backendConnector: e, languageUtils: t, logger: n } = this.services, r = e.language;
231
+ if (r && r.toLowerCase() === "cimode") return;
232
+ let i = [], a = (e) => {
233
+ t.toResolveHierarchy(e).forEach((e) => {
234
+ i.indexOf(e) < 0 && i.push(e);
235
+ });
236
+ };
237
+ a(r), this.allOptions.preload && this.allOptions.preload.forEach((e) => a(e)), i.forEach((t) => {
238
+ this.allOptions.ns.forEach((r) => {
239
+ e.read(t, r, "read", null, null, (i, a) => {
240
+ i && n.warn(`loading namespace ${r} for language ${t} failed`, i), !i && a && n.log(`loaded namespace ${r} for language ${t}`, a), e.loaded(`${t}|${r}`, i, a);
241
+ });
242
+ });
243
+ });
244
+ }
245
+ };
246
+ w.type = "backend";
247
+ //#endregion
248
+ export { w as default };
249
+
250
+ //# sourceMappingURL=index132.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index132.js","names":[],"sources":["../node_modules/i18next-http-backend/esm/index.js"],"sourcesContent":["//#region lib/utils.js\nconst arr = [];\narr.forEach;\narr.slice;\nconst UNSAFE_KEYS$1 = [\n\t\"__proto__\",\n\t\"constructor\",\n\t\"prototype\"\n];\nfunction isSafeUrlSegmentBase(v) {\n\tif (typeof v !== \"string\") return false;\n\tif (v.length === 0 || v.length > 128) return false;\n\tif (UNSAFE_KEYS$1.indexOf(v) > -1) return false;\n\tif (v.indexOf(\"..\") > -1) return false;\n\tif (v.indexOf(\"\\\\\") > -1) return false;\n\tif (/[?#%\\s]/.test(v)) return false;\n\tif (/[\\x00-\\x1F\\x7F]/.test(v)) return false;\n\treturn true;\n}\nfunction isSafeLangUrlSegment(v) {\n\tif (!isSafeUrlSegmentBase(v)) return false;\n\tif (v.indexOf(\"/\") > -1 || v.indexOf(\"@\") > -1) return false;\n\treturn true;\n}\nfunction isSafeNsUrlSegment(v) {\n\treturn isSafeUrlSegmentBase(v);\n}\nconst SAFETY_CHECK_BY_KEY = {\n\tlng: isSafeLangUrlSegment,\n\tns: isSafeNsUrlSegment\n};\nfunction sanitizeLogValue(v) {\n\tif (typeof v !== \"string\") return v;\n\treturn v.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, \" \");\n}\nfunction redactUrlCredentials(u) {\n\tif (typeof u !== \"string\" || u.length === 0) return u;\n\ttry {\n\t\tconst parsed = new URL(u);\n\t\tif (parsed.username || parsed.password) {\n\t\t\tparsed.username = \"\";\n\t\t\tparsed.password = \"\";\n\t\t\treturn parsed.toString();\n\t\t}\n\t\treturn u;\n\t} catch (e) {\n\t\treturn u.replace(/(\\/\\/)[^/@\\s]+@/g, \"$1\");\n\t}\n}\nfunction hasXMLHttpRequest() {\n\treturn typeof XMLHttpRequest === \"function\" || typeof XMLHttpRequest === \"object\";\n}\n/**\n* Determine whether the given `maybePromise` is a Promise.\n*\n* @param {*} maybePromise\n*\n* @returns {Boolean}\n*/\nfunction isPromise(maybePromise) {\n\treturn !!maybePromise && typeof maybePromise.then === \"function\";\n}\n/**\n* Convert any value to a Promise than will resolve to this value.\n*\n* @param {*} maybePromise\n*\n* @returns {Promise}\n*/\nfunction makePromise(maybePromise) {\n\tif (isPromise(maybePromise)) return maybePromise;\n\treturn Promise.resolve(maybePromise);\n}\nconst interpolationRegexp = /\\{\\{(.+?)\\}\\}/g;\nfunction interpolateUrl(str, data) {\n\tlet unsafe = false;\n\tconst result = str.replace(interpolationRegexp, (match, key) => {\n\t\tconst k = key.trim();\n\t\tif (UNSAFE_KEYS$1.indexOf(k) > -1) return match;\n\t\tconst value = data[k];\n\t\tif (value == null) return match;\n\t\tconst check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;\n\t\tconst segments = String(value).split(\"+\");\n\t\tfor (const seg of segments) if (!check(seg)) {\n\t\t\tunsafe = true;\n\t\t\treturn match;\n\t\t}\n\t\treturn segments.join(\"+\");\n\t});\n\treturn unsafe ? null : result;\n}\n//#endregion\n//#region lib/request.js\nconst g = typeof globalThis !== \"undefined\" ? globalThis : typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : void 0;\nlet fetchApi;\nif (typeof fetch === \"function\") fetchApi = fetch;\nelse if (g && typeof g.fetch === \"function\") fetchApi = g.fetch;\nconst XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;\nconst ActiveXObjectApi = typeof ActiveXObject === \"function\" && g ? g.ActiveXObject : void 0;\nconst UNSAFE_KEYS = [\n\t\"__proto__\",\n\t\"constructor\",\n\t\"prototype\"\n];\nconst addQueryString = (url, params) => {\n\tif (params && typeof params === \"object\") {\n\t\tlet queryString = \"\";\n\t\tfor (const paramName of Object.keys(params)) {\n\t\t\tif (UNSAFE_KEYS.indexOf(paramName) > -1) continue;\n\t\t\tqueryString += \"&\" + encodeURIComponent(paramName) + \"=\" + encodeURIComponent(params[paramName]);\n\t\t}\n\t\tif (!queryString) return url;\n\t\turl = url + (url.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + queryString.slice(1);\n\t}\n\treturn url;\n};\nconst fetchIt = (url, fetchOptions, callback, altFetch) => {\n\tconst resolver = (response) => {\n\t\tif (!response.ok) return callback(response.statusText || \"Error\", { status: response.status });\n\t\tresponse.text().then((data) => {\n\t\t\tcallback(null, {\n\t\t\t\tstatus: response.status,\n\t\t\t\tdata\n\t\t\t});\n\t\t}).catch(callback);\n\t};\n\tif (altFetch) {\n\t\tconst altResponse = altFetch(url, fetchOptions);\n\t\tif (altResponse instanceof Promise) {\n\t\t\taltResponse.then(resolver).catch(callback);\n\t\t\treturn;\n\t\t}\n\t}\n\tif (typeof fetch === \"function\") fetch(url, fetchOptions).then(resolver).catch(callback);\n\telse fetchApi(url, fetchOptions).then(resolver).catch(callback);\n};\nconst requestWithFetch = (options, url, payload, callback) => {\n\tif (options.queryStringParams) url = addQueryString(url, options.queryStringParams);\n\tconst headers = { ...typeof options.customHeaders === \"function\" ? options.customHeaders() : options.customHeaders };\n\tif (typeof window === \"undefined\" && typeof global !== \"undefined\" && typeof global.process !== \"undefined\" && global.process.versions && global.process.versions.node) headers[\"User-Agent\"] = `i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`;\n\tif (payload) headers[\"Content-Type\"] = \"application/json\";\n\tconst reqOptions = typeof options.requestOptions === \"function\" ? options.requestOptions(payload) : options.requestOptions;\n\tconst fetchOptions = {\n\t\tmethod: payload ? \"POST\" : \"GET\",\n\t\tbody: payload ? options.stringify(payload) : void 0,\n\t\theaders,\n\t\t...options._omitFetchOptions ? {} : reqOptions\n\t};\n\tconst altFetch = typeof options.alternateFetch === \"function\" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;\n\ttry {\n\t\tfetchIt(url, fetchOptions, callback, altFetch);\n\t} catch (e) {\n\t\tif (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf(\"not implemented\") < 0) return callback(e);\n\t\ttry {\n\t\t\tObject.keys(reqOptions).forEach((opt) => {\n\t\t\t\tdelete fetchOptions[opt];\n\t\t\t});\n\t\t\tfetchIt(url, fetchOptions, callback, altFetch);\n\t\t\toptions._omitFetchOptions = true;\n\t\t} catch (err) {\n\t\t\tcallback(err);\n\t\t}\n\t}\n};\nconst requestWithXmlHttpRequest = (options, url, payload, callback) => {\n\tif (payload && typeof payload === \"object\") payload = addQueryString(\"\", payload).slice(1);\n\tif (options.queryStringParams) url = addQueryString(url, options.queryStringParams);\n\ttry {\n\t\tconst x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi(\"MSXML2.XMLHTTP.3.0\");\n\t\tx.open(payload ? \"POST\" : \"GET\", url, 1);\n\t\tif (!options.crossDomain) x.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\t\tx.withCredentials = !!options.withCredentials;\n\t\tif (payload) x.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\tif (x.overrideMimeType) x.overrideMimeType(\"application/json\");\n\t\tlet h = options.customHeaders;\n\t\th = typeof h === \"function\" ? h() : h;\n\t\tif (h) for (const i of Object.keys(h)) {\n\t\t\tif (UNSAFE_KEYS.indexOf(i) > -1) continue;\n\t\t\tx.setRequestHeader(i, h[i]);\n\t\t}\n\t\tx.onreadystatechange = () => {\n\t\t\tx.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {\n\t\t\t\tstatus: x.status,\n\t\t\t\tdata: x.responseText\n\t\t\t});\n\t\t};\n\t\tx.send(payload);\n\t} catch (e) {\n\t\tconsole && console.log(e);\n\t}\n};\nconst request = (options, url, payload, callback) => {\n\tif (typeof payload === \"function\") {\n\t\tcallback = payload;\n\t\tpayload = void 0;\n\t}\n\tcallback = callback || (() => {});\n\tif (fetchApi && url.indexOf(\"file:\") !== 0) return requestWithFetch(options, url, payload, callback);\n\tif (hasXMLHttpRequest() || typeof ActiveXObject === \"function\") return requestWithXmlHttpRequest(options, url, payload, callback);\n\tcallback(/* @__PURE__ */ new Error(\"No fetch and no xhr implementation found!\"));\n};\n//#endregion\n//#region lib/index.js\nconst getDefaults = () => {\n\treturn {\n\t\tloadPath: \"/locales/{{lng}}/{{ns}}.json\",\n\t\taddPath: \"/locales/add/{{lng}}/{{ns}}\",\n\t\tparse: (data) => JSON.parse(data),\n\t\tstringify: JSON.stringify,\n\t\tparsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || \"\" }),\n\t\tparseLoadPayload: (languages, namespaces) => void 0,\n\t\trequest,\n\t\treloadInterval: typeof window !== \"undefined\" ? false : 3600 * 1e3,\n\t\tcustomHeaders: {},\n\t\tqueryStringParams: {},\n\t\tcrossDomain: false,\n\t\twithCredentials: false,\n\t\toverrideMimeType: false,\n\t\trequestOptions: {\n\t\t\tmode: \"cors\",\n\t\t\tcredentials: \"same-origin\",\n\t\t\tcache: \"default\"\n\t\t}\n\t};\n};\nvar Backend = class {\n\tconstructor(services, options = {}, allOptions = {}) {\n\t\tthis.services = services;\n\t\tthis.options = options;\n\t\tthis.allOptions = allOptions;\n\t\tthis.type = \"backend\";\n\t\tthis.init(services, options, allOptions);\n\t}\n\tinit(services, options = {}, allOptions = {}) {\n\t\tthis.services = services;\n\t\tthis.options = {\n\t\t\t...getDefaults(),\n\t\t\t...this.options || {},\n\t\t\t...options\n\t\t};\n\t\tthis.allOptions = allOptions;\n\t\tif (this.services && this.options.reloadInterval) {\n\t\t\tconst timer = setInterval(() => this.reload(), this.options.reloadInterval);\n\t\t\tif (typeof timer === \"object\" && typeof timer.unref === \"function\") timer.unref();\n\t\t}\n\t}\n\treadMulti(languages, namespaces, callback) {\n\t\tthis._readAny(languages, languages, namespaces, namespaces, callback);\n\t}\n\tread(language, namespace, callback) {\n\t\tthis._readAny([language], language, [namespace], namespace, callback);\n\t}\n\t_readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {\n\t\tlet loadPath = this.options.loadPath;\n\t\tif (typeof this.options.loadPath === \"function\") loadPath = this.options.loadPath(languages, namespaces);\n\t\tloadPath = makePromise(loadPath);\n\t\tloadPath.then((resolvedLoadPath) => {\n\t\t\tif (!resolvedLoadPath) return callback(null, {});\n\t\t\tconst url = interpolateUrl(resolvedLoadPath, {\n\t\t\t\tlng: languages.join(\"+\"),\n\t\t\t\tns: namespaces.join(\"+\")\n\t\t\t});\n\t\t\tif (url == null) {\n\t\t\t\tconst safeLngs = languages.map(sanitizeLogValue).join(\", \");\n\t\t\t\tconst safeNss = namespaces.map(sanitizeLogValue).join(\", \");\n\t\t\t\treturn callback(/* @__PURE__ */ new Error(\"i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[\" + safeLngs + \"] namespaces=[\" + safeNss + \"]\"), false);\n\t\t\t}\n\t\t\tthis.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);\n\t\t});\n\t}\n\tloadUrl(url, callback, languages, namespaces) {\n\t\tconst lng = typeof languages === \"string\" ? [languages] : languages;\n\t\tconst ns = typeof namespaces === \"string\" ? [namespaces] : namespaces;\n\t\tconst payload = this.options.parseLoadPayload(lng, ns);\n\t\tconst safeUrl = sanitizeLogValue(redactUrlCredentials(url));\n\t\tthis.options.request(this.options, url, payload, (err, res) => {\n\t\t\tif (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback(\"failed loading \" + safeUrl + \"; status code: \" + res.status, true);\n\t\t\tif (res && res.status >= 400 && res.status < 500) return callback(\"failed loading \" + safeUrl + \"; status code: \" + res.status, false);\n\t\t\tif (!res && err && err.message) {\n\t\t\t\tconst errorMessage = err.message.toLowerCase();\n\t\t\t\tif ([\n\t\t\t\t\t\"failed\",\n\t\t\t\t\t\"fetch\",\n\t\t\t\t\t\"network\",\n\t\t\t\t\t\"load\"\n\t\t\t\t].find((term) => errorMessage.indexOf(term) > -1)) return callback(\"failed loading \" + safeUrl + \": \" + sanitizeLogValue(err.message), true);\n\t\t\t}\n\t\t\tif (err) return callback(err, false);\n\t\t\tlet ret, parseErr;\n\t\t\ttry {\n\t\t\t\tif (typeof res.data === \"string\") ret = this.options.parse(res.data, languages, namespaces);\n\t\t\t\telse ret = res.data;\n\t\t\t} catch (e) {\n\t\t\t\tparseErr = \"failed parsing \" + safeUrl + \" to json\";\n\t\t\t}\n\t\t\tif (parseErr) return callback(parseErr, false);\n\t\t\tcallback(null, ret);\n\t\t});\n\t}\n\tcreate(languages, namespace, key, fallbackValue, callback) {\n\t\tif (!this.options.addPath) return;\n\t\tif (typeof languages === \"string\") languages = [languages];\n\t\tconst payload = this.options.parsePayload(namespace, key, fallbackValue);\n\t\tlet finished = 0;\n\t\tconst dataArray = [];\n\t\tconst resArray = [];\n\t\tlanguages.forEach((lng) => {\n\t\t\tlet addPath = this.options.addPath;\n\t\t\tif (typeof this.options.addPath === \"function\") addPath = this.options.addPath(lng, namespace);\n\t\t\tconst url = interpolateUrl(addPath, {\n\t\t\t\tlng,\n\t\t\t\tns: namespace\n\t\t\t});\n\t\t\tif (url == null) {\n\t\t\t\tfinished += 1;\n\t\t\t\tif (callback && finished === languages.length) callback(dataArray, resArray);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.options.request(this.options, url, payload, (data, res) => {\n\t\t\t\tfinished += 1;\n\t\t\t\tdataArray.push(data);\n\t\t\t\tresArray.push(res);\n\t\t\t\tif (finished === languages.length) {\n\t\t\t\t\tif (typeof callback === \"function\") callback(dataArray, resArray);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\treload() {\n\t\tconst { backendConnector, languageUtils, logger } = this.services;\n\t\tconst currentLanguage = backendConnector.language;\n\t\tif (currentLanguage && currentLanguage.toLowerCase() === \"cimode\") return;\n\t\tconst toLoad = [];\n\t\tconst append = (lng) => {\n\t\t\tlanguageUtils.toResolveHierarchy(lng).forEach((l) => {\n\t\t\t\tif (toLoad.indexOf(l) < 0) toLoad.push(l);\n\t\t\t});\n\t\t};\n\t\tappend(currentLanguage);\n\t\tif (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));\n\t\ttoLoad.forEach((lng) => {\n\t\t\tthis.allOptions.ns.forEach((ns) => {\n\t\t\t\tbackendConnector.read(lng, ns, \"read\", null, null, (err, data) => {\n\t\t\t\t\tif (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);\n\t\t\t\t\tif (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);\n\t\t\t\t\tbackendConnector.loaded(`${lng}|${ns}`, err, data);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n};\nBackend.type = \"backend\";\n//#endregion\nexport { Backend as default };\n"],"x_google_ignoreList":[0],"mappings":";AACA,IAAM,IAAM,CAAC;AACb,EAAI,SACJ,EAAI;AACJ,IAAM,IAAgB;CACrB;CACA;CACA;AACD;AACA,SAAS,EAAqB,GAAG;CAQhC,OADA,EANI,OAAO,KAAM,YACb,EAAE,WAAW,KAAK,EAAE,SAAS,OAC7B,EAAc,QAAQ,CAAC,IAAI,MAC3B,EAAE,QAAQ,IAAI,IAAI,MAClB,EAAE,QAAQ,IAAI,IAAI,MAClB,UAAU,KAAK,CAAC,KAChB,kBAAkB,KAAK,CAAC;AAE7B;AACA,SAAS,EAAqB,GAAG;CAGhC,OADA,EADI,CAAC,EAAqB,CAAC,KACvB,EAAE,QAAQ,GAAG,IAAI,MAAM,EAAE,QAAQ,GAAG,IAAI;AAE7C;AACA,SAAS,EAAmB,GAAG;CAC9B,OAAO,EAAqB,CAAC;AAC9B;AACA,IAAM,IAAsB;CAC3B,KAAK;CACL,IAAI;AACL;AACA,SAAS,EAAiB,GAAG;CAE5B,OADI,OAAO,KAAM,WACV,EAAE,QAAQ,wBAAwB,GAAG,IADV;AAEnC;AACA,SAAS,EAAqB,GAAG;CAChC,IAAI,OAAO,KAAM,YAAY,EAAE,WAAW,GAAG,OAAO;CACpD,IAAI;EACH,IAAM,IAAS,IAAI,IAAI,CAAC;EAMxB,OALI,EAAO,YAAY,EAAO,YAC7B,EAAO,WAAW,IAClB,EAAO,WAAW,IACX,EAAO,SAAS,KAEjB;CACR,QAAY;EACX,OAAO,EAAE,QAAQ,oBAAoB,IAAI;CAC1C;AACD;AACA,SAA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AI,GAC/E,EAAiB,OAAO,GAAG,EAAI,GAAG,KAAM,GAAK,CAAI;IAClD,CAAC;GACF,CAAC;EACF,CAAC;CACF;AACD;AACA,EAAQ,OAAO"}
@@ -0,0 +1,20 @@
1
+ import e from "./index130.js";
2
+ import "./index131.js";
3
+ import t from "./index132.js";
4
+ import { initReactI18next as n } from "react-i18next";
5
+ import r from "i18next";
6
+ //#region src/libs/shared/internationalisation/i18n.ts
7
+ r.use(t).use(e).use(n).init({
8
+ fallbackLng: "en",
9
+ supportedLngs: ["en", "hi"],
10
+ ns: ["translation"],
11
+ defaultNS: "translation",
12
+ backend: { loadPath: "/locales/{{lng}}/{{ns}}.json" },
13
+ interpolation: { escapeValue: !1 },
14
+ react: { useSuspense: !0 }
15
+ });
16
+ var i = r;
17
+ //#endregion
18
+ export { i as default };
19
+
20
+ //# sourceMappingURL=index133.js.map