@operato/i18n 1.4.64 → 2.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.0-alpha.0](https://github.com/hatiolab/operato/compare/v1.13.1...v2.0.0-alpha.0) (2024-01-05)
7
+
8
+ **Note:** Version bump only for package @operato/i18n
9
+
10
+
11
+
12
+
13
+
14
+ ### [1.5.14](https://github.com/hatiolab/operato/compare/v1.5.13...v1.5.14) (2023-10-29)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * configurable languages ([fc2f966](https://github.com/hatiolab/operato/commit/fc2f966562578f7258ce85aef4d29322d6b8726c))
20
+
21
+
22
+
6
23
  ### [1.4.64](https://github.com/hatiolab/operato/compare/v1.4.63...v1.4.64) (2023-09-13)
7
24
 
8
25
  **Note:** Version bump only for package @operato/i18n
package/demo/index.html CHANGED
@@ -27,6 +27,29 @@
27
27
  import '../dist/src/ox-i18n.js'
28
28
  import '../dist/src/ox-i18n-selector.js'
29
29
 
30
+ const languages = [
31
+ {
32
+ code: 'en',
33
+ display: 'English'
34
+ },
35
+ {
36
+ code: 'ko',
37
+ display: '한국어'
38
+ },
39
+ {
40
+ code: 'zh',
41
+ display: '中文'
42
+ },
43
+ {
44
+ code: 'ja',
45
+ display: 'にほんご'
46
+ },
47
+ {
48
+ code: 'ms',
49
+ display: 'Bahasa Malaysia'
50
+ }
51
+ ]
52
+
30
53
  const parent = document.querySelector('#demo')
31
54
 
32
55
  render(
@@ -35,6 +58,7 @@
35
58
  <ox-i18n msgid="text.operato"></ox-i18n>
36
59
  <ox-i18n-selector
37
60
  .value=${i18next.language || 'en-US'}
61
+ .languages=${languages}
38
62
  @change=${e => {
39
63
  var locale = e.detail
40
64
  locale && i18next.changeLanguage(locale)
@@ -29,7 +29,7 @@ _i18next
29
29
  lookupCookie: 'i18next',
30
30
  // cache user language on
31
31
  caches: ['cookie'],
32
- excludeCacheFor: ['cimode'],
32
+ excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)
33
33
  // optional set cookie options, reference:[MDN Set-Cookie docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)
34
34
  cookieOptions: { path: '/', sameSite: 'strict' }
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6CAA6C;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,WAAW,MAAM,kCAAkC,CAAA;AAC1D,OAAO,QAAQ,MAAM,SAAS,CAAA;AAE9B,QAAQ;KACL,GAAG,CAAC,WAAW,CAAC;KAChB,GAAG,CAAC,OAAO,CAAC;KACZ,IAAI,CAAC;IACJ,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,CAAC,cAAc,CAAC;IACpB,SAAS,EAAE,cAAc;IACzB,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE;QACb,MAAM,EAAE,GAAG;QACX,MAAM,EAAE,GAAG;KACZ;IACD,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE;QACP,QAAQ,EAAE,kBAAkB;KAC7B;IACD,SAAS,EAAE;QACT,wDAAwD;QACxD,KAAK,EAAE,CAAC,QAAQ,CAAC;QAEjB,yCAAyC;QACzC,YAAY,EAAE,SAAS;QAEvB,yBAAyB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,eAAe,EAAE,CAAC,QAAQ,CAAC;QAE3B,qIAAqI;QACrI,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;KACjD;CACF,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\n// import Backend from 'i18next-http-backend'\nimport { Backend } from './http-backend'\nimport LngDetector from 'i18next-browser-languagedetector'\nimport _i18next from 'i18next'\n\n_i18next\n .use(LngDetector)\n .use(Backend)\n .init({\n fallbackLng: 'en',\n debug: true,\n ns: ['translations'],\n defaultNS: 'translations',\n keySeparator: false,\n interpolation: {\n prefix: '{',\n suffix: '}'\n },\n load: 'languageOnly',\n backend: {\n loadPath: '/{ns}/{lng}.json'\n },\n detection: {\n // order and from where user language should be detected\n order: ['cookie'],\n\n // keys or params to lookup language from\n lookupCookie: 'i18next',\n\n // cache user language on\n caches: ['cookie'],\n excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)\n\n // optional set cookie options, reference:[MDN Set-Cookie docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)\n cookieOptions: { path: '/', sameSite: 'strict' }\n }\n })\n\nexport const i18next = _i18next\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6CAA6C;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,WAAW,MAAM,kCAAkC,CAAA;AAC1D,OAAO,QAAQ,MAAM,SAAS,CAAA;AAE9B,QAAQ;KACL,GAAG,CAAC,WAAW,CAAC;KAChB,GAAG,CAAC,OAAO,CAAC;KACZ,IAAI,CAAC;IACJ,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,CAAC,cAAc,CAAC;IACpB,SAAS,EAAE,cAAc;IACzB,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE;QACb,MAAM,EAAE,GAAG;QACX,MAAM,EAAE,GAAG;KACZ;IACD,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE;QACP,QAAQ,EAAE,kBAAkB;KAC7B;IACD,SAAS,EAAE;QACT,wDAAwD;QACxD,KAAK,EAAE,CAAC,QAAQ,CAAC;QAEjB,yCAAyC;QACzC,YAAY,EAAE,SAAS;QAEvB,yBAAyB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,eAAe,EAAE,CAAC,QAAQ,CAAC,EAAE,kDAAkD;QAE/E,qIAAqI;QACrI,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE;KACjD;CACF,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\n// import Backend from 'i18next-http-backend'\nimport { Backend } from './http-backend'\nimport LngDetector from 'i18next-browser-languagedetector'\nimport _i18next from 'i18next'\n\n_i18next\n .use(LngDetector)\n .use(Backend)\n .init({\n fallbackLng: 'en',\n debug: true,\n ns: ['translations'],\n defaultNS: 'translations',\n keySeparator: false,\n interpolation: {\n prefix: '{',\n suffix: '}'\n },\n load: 'languageOnly',\n backend: {\n loadPath: '/{ns}/{lng}.json'\n },\n detection: {\n // order and from where user language should be detected\n order: ['cookie'],\n\n // keys or params to lookup language from\n lookupCookie: 'i18next',\n\n // cache user language on\n caches: ['cookie'],\n excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)\n\n // optional set cookie options, reference:[MDN Set-Cookie docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)\n cookieOptions: { path: '/', sameSite: 'strict' }\n }\n })\n\nexport const i18next = _i18next\n"]}
@@ -14,9 +14,9 @@ const getDefaults = () => {
14
14
  reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
15
15
  customHeaders: {},
16
16
  queryStringParams: {},
17
- crossDomain: false,
18
- withCredentials: false,
19
- overrideMimeType: false,
17
+ crossDomain: false, // used for XmlHttpRequest
18
+ withCredentials: false, // used for XmlHttpRequest
19
+ overrideMimeType: false, // used for XmlHttpRequest
20
20
  requestOptions: {
21
21
  // used for fetch
22
22
  mode: 'cors',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/http-backend/index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,+BAA+B;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,WAAW,GAAG,GAAG,EAAE;IACvB,OAAO;QACL,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,6BAA6B;QACtC,iBAAiB,EAAE,KAAK;QACxB,KAAK,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,YAAY,EAAE,CAAC,SAAc,EAAE,GAAW,EAAE,aAAkB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,EAAE,EAAE,CAAC;QACnG,OAAO;QACP,cAAc,EAAE,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI;QACtE,aAAa,EAAE,EAAE;QACjB,iBAAiB,EAAE,EAAE;QACrB,WAAW,EAAE,KAAK;QAClB,eAAe,EAAE,KAAK;QACtB,gBAAgB,EAAE,KAAK;QACvB,cAAc,EAAE;YACd,iBAAiB;YACjB,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE,SAAS;SACjB;KACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,OAAO,OAAO;IAQlB,YAAY,QAAa,EAAE,UAAe,EAAE,EAAE,aAAkB,EAAE;QAChE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,U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leType } from 'i18next'\nimport { makePromise } from './utils.js'\nimport { request } from './request.js'\n\nconst getDefaults = () => {\n return {\n loadPath: '/locales/{{lng}}/{{ns}}.json',\n addPath: '/locales/add/{{lng}}/{{ns}}',\n allowMultiLoading: false,\n parse: (data: any) => JSON.parse(data),\n stringify: JSON.stringify,\n parsePayload: (namespace: any, key: string, fallbackValue: any) => ({ [key]: fallbackValue || '' }),\n request,\n reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,\n customHeaders: {},\n queryStringParams: {},\n crossDomain: false, // used for XmlHttpRequest\n withCredentials: false, // used for XmlHttpRequest\n overrideMimeType: false, // used for XmlHttpRequest\n requestOptions: {\n // used for fetch\n mode: 'cors',\n credentials: 'same-origin',\n cache: 'default'\n }\n }\n}\n\nexport class Backend {\n static type: ModuleType = 'backend'\n\n services: any\n options: any\n allOptions: any\n type: string\n\n constructor(services: any, options: any = {}, allOptions: any = {}) {\n this.services = services\n this.options = options\n this.allOptions = allOptions\n this.type = 'backend'\n this.init(services, options, allOptions)\n }\n\n init(services: any, options: any = {}, allOptions: any = {}) {\n this.services = services\n this.options = {\n ...getDefaults(),\n ...this.options,\n ...options\n }\n this.allOptions = allOptions\n if (this.services && this.options.reloadInterval) {\n setInterval(() => this.reload(), this.options.reloadInterval)\n }\n }\n\n readMulti(languages: any, namespaces: any, callback: any) {\n this._readAny(languages, languages, namespaces, namespaces, callback)\n }\n\n read(language: any, namespace: any, callback: any) {\n this._readAny([language], language, [namespace], namespace, callback)\n }\n\n _readAny(languages: any, loadUrlLanguages: any, namespaces: any, loadUrlNamespaces: any, callback: any) {\n let loadPath = this.options.loadPath\n if (typeof this.options.loadPath === 'function') {\n loadPath = this.options.loadPath(languages, namespaces)\n }\n\n loadPath = makePromise(loadPath)\n\n loadPath.then((resolvedLoadPath: any) => {\n const url = this.services.interpolator.interpolate(resolvedLoadPath, {\n lng: languages.join('+'),\n ns: namespaces.join('+')\n })\n this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces)\n })\n }\n\n loadUrl(url: string, callback: any, languages: any, namespaces: any) {\n this.options.request(this.options, url, undefined, (err: any, res: any) => {\n if (res && ((res.status >= 500 && res.status < 600) || !res.status))\n return callback('failed loading ' + url + '; status code: ' + res.status, true /* retry */)\n if (res && res.status >= 400 && res.status < 500)\n return callback('failed loading ' + url + '; status code: ' + res.status, false /* no retry */)\n if (!res && err && err.message && err.message.indexOf('Failed to fetch') > -1)\n return callback('failed loading ' + url + ': ' + err.message, true /* retry */)\n if (err) return callback(err, false)\n\n let ret, parseErr\n try {\n if (typeof res.data === 'string') {\n ret = this.options.parse(res.data, languages, namespaces)\n } else {\n // fallback, which omits calling the parse function\n ret = res.data\n }\n } catch (e) {\n parseErr = 'failed parsing ' + url + ' to json'\n }\n if (parseErr) return callback(parseErr, false)\n callback(null, ret)\n })\n }\n\n create(languages: any, namespace: any, key: any, fallbackValue: any, callback: any) {\n // If there is a falsey addPath, then abort -- this has been disabled.\n if (!this.options.addPath) return\n if (typeof languages === 'string') languages = [languages]\n const payload = this.options.parsePayload(namespace, key, fallbackValue)\n let finished = 0\n const dataArray: any = []\n const resArray: any = []\n languages.forEach((lng: any) => {\n let addPath = this.options.addPath\n if (typeof this.options.addPath === 'function') {\n addPath = this.options.addPath(lng, namespace)\n }\n const url = this.services.interpolator.interpolate(addPath, { lng: lng, ns: namespace })\n\n this.options.request(this.options, url, payload, (data: any, res: any) => {\n // TODO: if res.status === 4xx do log\n finished += 1\n dataArray.push(data)\n resArray.push(res)\n if (finished === languages.length) {\n if (callback) callback(dataArray, resArray)\n }\n })\n })\n }\n\n reload() {\n const { backendConnector, languageUtils, logger } = this.services\n const currentLanguage = backendConnector.language\n if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return // avoid loading resources for cimode\n\n const toLoad: any = []\n const append = (lng: any) => {\n const lngs = languageUtils.toResolveHierarchy(lng)\n lngs.forEach((l: any) => {\n if (toLoad.indexOf(l) < 0) toLoad.push(l)\n })\n }\n\n append(currentLanguage)\n\n if (this.allOptions.preload) this.allOptions.preload.forEach((l: any) => append(l))\n\n toLoad.forEach((lng: any) => {\n this.allOptions.ns.forEach((ns: any) => {\n backendConnector.read(lng, ns, 'read', null, null, (err: any, data: any) => {\n if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err)\n if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data)\n\n backendConnector.loaded(`${lng}|${ns}`, err, data)\n })\n })\n })\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/http-backend/index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,+BAA+B;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,WAAW,GAAG,GAAG,EAAE;IACvB,OAAO;QACL,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,6BAA6B;QACtC,iBAAiB,EAAE,KAAK;QACxB,KAAK,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,YAAY,EAAE,CAAC,SAAc,EAAE,GAAW,EAAE,aAAkB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,EAAE,EAAE,CAAC;QACnG,OAAO;QACP,cAAc,EAAE,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI;QACtE,aAAa,EAAE,EAAE;QACjB,iBAAiB,EAAE,EAAE;QACrB,WAAW,EAAE,KAAK,EAAE,0BAA0B;QAC9C,eAAe,EAAE,KAAK,EAAE,0BAA0B;QAClD,gBAAgB,EAAE,KAAK,EAAE,0BAA0B;QACnD,cAAc,EAAE;YACd,iBAAiB;YACjB,IAAI,EAAE,MAAM;YAC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AAI;wBAAE,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,iBAAiB,GAAG,EAAE,EAAE,IAAI,CAAC,CAAA;oBAEhF,gBAAgB,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;gBACpD,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;;AArIM,YAAI,GAAe,SAAS,CAAA","sourcesContent":["// migrated from https://github.com/i18next/i18next-http-backend\n// due to import module problem\n\nimport { ModuleType } from 'i18next'\nimport { makePromise } from './utils.js'\nimport { request } from './request.js'\n\nconst getDefaults = () => {\n return {\n loadPath: '/locales/{{lng}}/{{ns}}.json',\n addPath: '/locales/add/{{lng}}/{{ns}}',\n allowMultiLoading: false,\n parse: (data: any) => JSON.parse(data),\n stringify: JSON.stringify,\n parsePayload: (namespace: any, key: string, fallbackValue: any) => ({ [key]: fallbackValue || '' }),\n request,\n reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,\n customHeaders: {},\n queryStringParams: {},\n crossDomain: false, // used for XmlHttpRequest\n withCredentials: false, // used for XmlHttpRequest\n overrideMimeType: false, // used for XmlHttpRequest\n requestOptions: {\n // used for fetch\n mode: 'cors',\n credentials: 'same-origin',\n cache: 'default'\n }\n }\n}\n\nexport class Backend {\n static type: ModuleType = 'backend'\n\n services: any\n options: any\n allOptions: any\n type: string\n\n constructor(services: any, options: any = {}, allOptions: any = {}) {\n this.services = services\n this.options = options\n this.allOptions = allOptions\n this.type = 'backend'\n this.init(services, options, allOptions)\n }\n\n init(services: any, options: any = {}, allOptions: any = {}) {\n this.services = services\n this.options = {\n ...getDefaults(),\n ...this.options,\n ...options\n }\n this.allOptions = allOptions\n if (this.services && this.options.reloadInterval) {\n setInterval(() => this.reload(), this.options.reloadInterval)\n }\n }\n\n readMulti(languages: any, namespaces: any, callback: any) {\n this._readAny(languages, languages, namespaces, namespaces, callback)\n }\n\n read(language: any, namespace: any, callback: any) {\n this._readAny([language], language, [namespace], namespace, callback)\n }\n\n _readAny(languages: any, loadUrlLanguages: any, namespaces: any, loadUrlNamespaces: any, callback: any) {\n let loadPath = this.options.loadPath\n if (typeof this.options.loadPath === 'function') {\n loadPath = this.options.loadPath(languages, namespaces)\n }\n\n loadPath = makePromise(loadPath)\n\n loadPath.then((resolvedLoadPath: any) => {\n const url = this.services.interpolator.interpolate(resolvedLoadPath, {\n lng: languages.join('+'),\n ns: namespaces.join('+')\n })\n this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces)\n })\n }\n\n loadUrl(url: string, callback: any, languages: any, namespaces: any) {\n this.options.request(this.options, url, undefined, (err: any, res: any) => {\n if (res && ((res.status >= 500 && res.status < 600) || !res.status))\n return callback('failed loading ' + url + '; status code: ' + res.status, true /* retry */)\n if (res && res.status >= 400 && res.status < 500)\n return callback('failed loading ' + url + '; status code: ' + res.status, false /* no retry */)\n if (!res && err && err.message && err.message.indexOf('Failed to fetch') > -1)\n return callback('failed loading ' + url + ': ' + err.message, true /* retry */)\n if (err) return callback(err, false)\n\n let ret, parseErr\n try {\n if (typeof res.data === 'string') {\n ret = this.options.parse(res.data, languages, namespaces)\n } else {\n // fallback, which omits calling the parse function\n ret = res.data\n }\n } catch (e) {\n parseErr = 'failed parsing ' + url + ' to json'\n }\n if (parseErr) return callback(parseErr, false)\n callback(null, ret)\n })\n }\n\n create(languages: any, namespace: any, key: any, fallbackValue: any, callback: any) {\n // If there is a falsey addPath, then abort -- this has been disabled.\n if (!this.options.addPath) return\n if (typeof languages === 'string') languages = [languages]\n const payload = this.options.parsePayload(namespace, key, fallbackValue)\n let finished = 0\n const dataArray: any = []\n const resArray: any = []\n languages.forEach((lng: any) => {\n let addPath = this.options.addPath\n if (typeof this.options.addPath === 'function') {\n addPath = this.options.addPath(lng, namespace)\n }\n const url = this.services.interpolator.interpolate(addPath, { lng: lng, ns: namespace })\n\n this.options.request(this.options, url, payload, (data: any, res: any) => {\n // TODO: if res.status === 4xx do log\n finished += 1\n dataArray.push(data)\n resArray.push(res)\n if (finished === languages.length) {\n if (callback) callback(dataArray, resArray)\n }\n })\n })\n }\n\n reload() {\n const { backendConnector, languageUtils, logger } = this.services\n const currentLanguage = backendConnector.language\n if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return // avoid loading resources for cimode\n\n const toLoad: any = []\n const append = (lng: any) => {\n const lngs = languageUtils.toResolveHierarchy(lng)\n lngs.forEach((l: any) => {\n if (toLoad.indexOf(l) < 0) toLoad.push(l)\n })\n }\n\n append(currentLanguage)\n\n if (this.allOptions.preload) this.allOptions.preload.forEach((l: any) => append(l))\n\n toLoad.forEach((lng: any) => {\n this.allOptions.ns.forEach((ns: any) => {\n backendConnector.read(lng, ns, 'read', null, null, (err: any, data: any) => {\n if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err)\n if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data)\n\n backendConnector.loaded(`${lng}|${ns}`, err, data)\n })\n })\n })\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/http-backend/request.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,MAAW,EAAE,EAAE;IAClD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACxC,IAAI,WAAW,GAAG,EAAE,CAAA;QACpB,mBAAmB;QACnB,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE;YAC9B,WAAW,IAAI,GAAG,GAAG,kBAAkB,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAA;SACjG;QACD,IAAI,CAAC,WAAW;YAAE,OAAO,GAAG,CAAA;QAC5B,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CA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AC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QACnD,CAAC,CAAC;aACD,KAAK,CAAC,QAAQ,CAAC,CAAA;IACpB,CAAC,CAAC;SACD,KAAK,CAAC,QAAQ,CAAC,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,OAAY,EACZ,GAAQ,EACR,OAAY,EACZ,QAA2D,EAC3D,EAAE;IACF,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;QACjC,QAAQ,GAAG,OAAO,CAAA;QAClB,OAAO,GAAG,SAAS,CAAA;KACpB;IAED,OAAO,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAA;AACxE,CAAC,CAAA","sourcesContent":["const addQueryString = (url: string, params: any) => {\n if (params && typeof params === 'object') {\n let queryString = ''\n // Must encode data\n for (const paramName in params) {\n queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName])\n }\n if (!queryString) return url\n url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1)\n }\n\n return url\n}\n\n// fetch api stuff\nconst requestWithFetch = (options: any, url: any, payload: any, callback: (status: any, obj?: any) => void) => {\n if (options.queryStringParams) {\n url = addQueryString(url, options.queryStringParams)\n }\n const headers = typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders\n\n if (payload) headers['Content-Type'] = 'application/json'\n fetch(url, {\n ...(typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions),\n method: payload ? 'POST' : 'GET',\n body: payload ? options.stringify(payload) : undefined,\n headers\n })\n .then(response => {\n if (!response.ok) return callback(response.statusText || 'Error', { status: response.status })\n response\n .text()\n .then(data => {\n callback(null, { status: response.status, data })\n })\n .catch(callback)\n })\n .catch(callback)\n}\n\nexport const request = (\n options: any,\n url: any,\n payload: any,\n callback: (status: string, obj: { status: number }) => void\n) => {\n if (typeof payload === 'function') {\n callback = payload\n payload = undefined\n }\n\n return requestWithFetch(options, url, payload, callback || (() => {}))\n}\n"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/http-backend/request.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,MAAW,EAAE,EAAE;IAClD,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACzC,IAAI,WAAW,GAAG,EAAE,CAAA;QACpB,mBAAmB;QACnB,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE,CAAC;YAC/B,WAAW,IAAI,GAAG,GAAG,kBAAkB,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAA;QAClG,CAAC;QACD,IAAI,CAAC,WAAW;YAAE,OAAO,GAAG,CAAA;QAC5B,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC1E,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,kBAAkB;AAClB,MAAM,gBAAgB,GAAG,CAAC,OAAY,EAAE,GAAQ,EAAE,OAAY,EAAE,QAA0C,EAAE,EAAE;IAC5G,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC9B,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACtD,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,aAAa,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAA;IAE7G,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AAE,CAAC,CAAC,CAAC,CAAA;AACxE,CAAC,CAAA","sourcesContent":["const addQueryString = (url: string, params: any) => {\n if (params && typeof params === 'object') {\n let queryString = ''\n // Must encode data\n for (const paramName in params) {\n queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName])\n }\n if (!queryString) return url\n url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1)\n }\n\n return url\n}\n\n// fetch api stuff\nconst requestWithFetch = (options: any, url: any, payload: any, callback: (status: any, obj?: any) => void) => {\n if (options.queryStringParams) {\n url = addQueryString(url, options.queryStringParams)\n }\n const headers = typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders\n\n if (payload) headers['Content-Type'] = 'application/json'\n fetch(url, {\n ...(typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions),\n method: payload ? 'POST' : 'GET',\n body: payload ? options.stringify(payload) : undefined,\n headers\n })\n .then(response => {\n if (!response.ok) return callback(response.statusText || 'Error', { status: response.status })\n response\n .text()\n .then(data => {\n callback(null, { status: response.status, data })\n })\n .catch(callback)\n })\n .catch(callback)\n}\n\nexport const request = (\n options: any,\n url: any,\n payload: any,\n callback: (status: string, obj: { status: number }) => void\n) => {\n if (typeof payload === 'function') {\n callback = payload\n payload = undefined\n }\n\n return requestWithFetch(options, url, payload, callback || (() => {}))\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/http-backend/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,YAAiB;IAClC,OAAO,CAAC,CAAC,YAAY,IAAI,OAAO,YAAY,CAAC,IAAI,KAAK,UAAU,CAAA;AAClE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,YAAiB;IAC3C,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE;QAC3B,OAAO,YAAY,CAAA;KACpB;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;AACtC,CAAC","sourcesContent":["/**\n * Determine whether the given `maybePromise` is a Promise.\n *\n * @param {*} maybePromise\n *\n * @returns {Boolean}\n */\nfunction isPromise(maybePromise: any) {\n return !!maybePromise && typeof maybePromise.then === 'function'\n}\n\n/**\n * Convert any value to a Promise than will resolve to this value.\n *\n * @param {*} maybePromise\n *\n * @returns {Promise}\n */\nexport function makePromise(maybePromise: any) {\n if (isPromise(maybePromise)) {\n return maybePromise\n }\n\n return Promise.resolve(maybePromise)\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/http-backend/utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,YAAiB;IAClC,OAAO,CAAC,CAAC,YAAY,IAAI,OAAO,YAAY,CAAC,IAAI,KAAK,UAAU,CAAA;AAClE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,YAAiB;IAC3C,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAA;IACrB,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;AACtC,CAAC","sourcesContent":["/**\n * Determine whether the given `maybePromise` is a Promise.\n *\n * @param {*} maybePromise\n *\n * @returns {Boolean}\n */\nfunction isPromise(maybePromise: any) {\n return !!maybePromise && typeof maybePromise.then === 'function'\n}\n\n/**\n * Convert any value to a Promise than will resolve to this value.\n *\n * @param {*} maybePromise\n *\n * @returns {Promise}\n */\nexport function makePromise(maybePromise: any) {\n if (isPromise(maybePromise)) {\n return maybePromise\n }\n\n return Promise.resolve(maybePromise)\n}\n"]}
@@ -2,6 +2,10 @@ import { LitElement } from 'lit';
2
2
  export declare class I18nSelector extends LitElement {
3
3
  static styles: import("lit").CSSResult;
4
4
  value: string;
5
- render(): import("lit-html").TemplateResult<1>;
5
+ languages: {
6
+ code: string;
7
+ display: string;
8
+ }[];
9
+ render(): import("lit").TemplateResult<1>;
6
10
  onLocaleChanged(value: string): Promise<void>;
7
11
  }
@@ -5,17 +5,14 @@ let I18nSelector = class I18nSelector extends LitElement {
5
5
  constructor() {
6
6
  super(...arguments);
7
7
  this.value = '';
8
+ this.languages = [];
8
9
  }
9
10
  render() {
10
11
  const value = this.value;
11
12
  return html `
12
13
  <select .value=${this.value} @change=${(e) => this.onLocaleChanged(e.target.value)}>
13
14
  <option value="" ?selected=${!value}></option>
14
- <option value="en-US" ?selected=${value === null || value === void 0 ? void 0 : value.startsWith('en')}>English</option>
15
- <option value="ja-JP" ?selected=${value === null || value === void 0 ? void 0 : value.startsWith('ja')}>にほんご</option>
16
- <option value="ko-KR" ?selected=${value === null || value === void 0 ? void 0 : value.startsWith('ko')}>한국어</option>
17
- <option value="ms-MY" ?selected=${value === null || value === void 0 ? void 0 : value.startsWith('ms')}>Bahasa Malaysia</option>
18
- <option value="zh-CN" ?selected=${value === null || value === void 0 ? void 0 : value.startsWith('zh')}>中文</option>
15
+ ${(this.languages || []).map(({ code, display }) => html ` <option value=${code} ?selected=${value === null || value === void 0 ? void 0 : value.startsWith(code.substring(0, 2))}>${display}</option> `)}
19
16
  </select>
20
17
  `;
21
18
  }
@@ -52,9 +49,9 @@ I18nSelector.styles = css `
52
49
  select:focus {
53
50
  border: 1px solid var(--focus-background-color);
54
51
  }
55
- option{
56
- background-color:var(--primary-color, #585858);
57
- color:var(--theme-white-color, #fff)
52
+ option {
53
+ background-color: var(--primary-color, #585858);
54
+ color: var(--theme-white-color, #fff);
58
55
  }
59
56
 
60
57
  ::placeholder {
@@ -65,6 +62,9 @@ I18nSelector.styles = css `
65
62
  __decorate([
66
63
  property({ type: String, attribute: true })
67
64
  ], I18nSelector.prototype, "value", void 0);
65
+ __decorate([
66
+ property({ type: Array })
67
+ ], I18nSelector.prototype, "languages", void 0);
68
68
  I18nSelector = __decorate([
69
69
  customElement('ox-i18n-selector')
70
70
  ], I18nSelector);
@@ -1 +1 @@
1
- {"version":3,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;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BlB,AA9BY,CA8BZ;AAE4C;IAA5C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;2CAAmB;AAjCpD,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAiExB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-i18n-selector')\nexport class I18nSelector extends LitElement {\n static styles = css`\n * {\n box-sizing: border-box;\n }\n *:focus {\n outline: none;\n }\n select {\n border: var(--i18n-selector-field-border, var(--input-field-border));\n border-radius: var(--i18n-selector-field-border-radius, 0);\n background-color: var(--i18n-selector-field-background-color, initial);\n margin: var(--i18n-selector-field-margin, 0);\n padding: var(--i18n-selector-field-padding, 0);\n font: var(--i18n-selector-field-font, var(--input-field-font));\n font-size: var(--i18n-selector-field-font-size, 15px);\n width: var(--i18n-selector-field-width, 100%);\n color: var(--i18n-selector-field-color, initial);\n }\n select:focus {\n border: 1px solid var(--focus-background-color);\n }\n option{\n background-color:var(--primary-color, #585858);\n color:var(--theme-white-color, #fff)\n }\n\n ::placeholder {\n font-size: 0.8rem;\n text-transform: capitalize;\n }\n `\n\n @property({ type: String, attribute: true }) value: string = ''\n\n render() {\n const value = this.value\n\n return html`\n <select .value=${this.value} @change=${(e: Event) => this.onLocaleChanged((e.target as HTMLSelectElement).value)}>\n <option value=\"\" ?selected=${!value}></option>\n <option value=\"en-US\" ?selected=${value?.startsWith('en')}>English</option>\n <option value=\"ja-JP\" ?selected=${value?.startsWith('ja')}>にほんご</option>\n <option value=\"ko-KR\" ?selected=${value?.startsWith('ko')}>한국어</option>\n <option value=\"ms-MY\" ?selected=${value?.startsWith('ms')}>Bahasa Malaysia</option>\n <option value=\"zh-CN\" ?selected=${value?.startsWith('zh')}>中文</option>\n </select>\n `\n }\n\n async onLocaleChanged(value: string) {\n if (!value) {\n return\n }\n\n this.value = value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n composed: true,\n bubbles: true,\n detail: value\n })\n )\n }\n}\n"]}
1
+ {"version":3,"file":"ox-i18n-selector.js","sourceRoot":"","sources":["../../src/ox-i18n-selector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAGpD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAiCwC,UAAK,GAAW,EAAE,CAAA;QACpC,cAAS,GAAwC,EAAE,CAAA;IA+BhF,CAAC;IA7BC,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QAExB,OAAO,IAAI,CAAA;uBACQ,IAAI,CAAC,KAAK,YAAY,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAE,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAC;qCACjF,CAAC,KAAK;UACjC,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAC1B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CACpB,IAAI,CAAA,kBAAkB,IAAI,cAAc,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,YAAY,CACzG;;KAEJ,CAAA;IACH,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAM;QACR,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAElB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;IACH,CAAC;;AA/DM,mBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BlB,AA9BY,CA8BZ;AAE4C;IAA5C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;2CAAmB;AACpC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAoD;AAlCnE,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAiExB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-i18n-selector')\nexport class I18nSelector extends LitElement {\n static styles = css`\n * {\n box-sizing: border-box;\n }\n *:focus {\n outline: none;\n }\n select {\n border: var(--i18n-selector-field-border, var(--input-field-border));\n border-radius: var(--i18n-selector-field-border-radius, 0);\n background-color: var(--i18n-selector-field-background-color, initial);\n margin: var(--i18n-selector-field-margin, 0);\n padding: var(--i18n-selector-field-padding, 0);\n font: var(--i18n-selector-field-font, var(--input-field-font));\n font-size: var(--i18n-selector-field-font-size, 15px);\n width: var(--i18n-selector-field-width, 100%);\n color: var(--i18n-selector-field-color, initial);\n }\n select:focus {\n border: 1px solid var(--focus-background-color);\n }\n option {\n background-color: var(--primary-color, #585858);\n color: var(--theme-white-color, #fff);\n }\n\n ::placeholder {\n font-size: 0.8rem;\n text-transform: capitalize;\n }\n `\n\n @property({ type: String, attribute: true }) value: string = ''\n @property({ type: Array }) languages: { code: string; display: string }[] = []\n\n render() {\n const value = this.value\n\n return html`\n <select .value=${this.value} @change=${(e: Event) => this.onLocaleChanged((e.target as HTMLSelectElement).value)}>\n <option value=\"\" ?selected=${!value}></option>\n ${(this.languages || []).map(\n ({ code, display }) =>\n html` <option value=${code} ?selected=${value?.startsWith(code.substring(0, 2))}>${display}</option> `\n )}\n </select>\n `\n }\n\n async onLocaleChanged(value: string) {\n if (!value) {\n return\n }\n\n this.value = value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n composed: true,\n bubbles: true,\n detail: value\n })\n )\n }\n}\n"]}
@@ -5,6 +5,6 @@ import { LitElement } from 'lit';
5
5
  declare const OxI18n_base: (new (...args: any[]) => LitElement) & typeof LitElement;
6
6
  export declare class OxI18n extends OxI18n_base {
7
7
  msgid: string;
8
- render(): import("lit-html").TemplateResult<1>;
8
+ render(): import("lit").TemplateResult<1>;
9
9
  }
10
10
  export {};
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/i18next/index.d.ts","../src/http-backend/utils.ts","../src/http-backend/request.ts","../src/http-backend/index.ts","../../../node_modules/i18next-browser-languagedetector/index.d.ts","../src/config.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../src/localize.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../../../node_modules/lit/decorators.d.ts","../src/ox-i18n.ts","../src/ox-i18n-selector.ts","../src/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"0075fa5ceda385bcdf3488e37786b5a33be730e8bc4aa3cf1e78c63891752ce8","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","c1a660a90d6565c602fa458f53849140c9008b7000ce8823443a2b1ae9ca46a3",{"version":"92fdaed0fdc293ad093ae04e4eab62b6e1217b40f2eb1692b14ac3e7f846bc9f","signature":"0d0203f628a45b8a859e4a02d2f37549a94dd9d59fec0294948a2f6d2a7b176c"},{"version":"449c94b0cbf0c2050aff7660c9bf54b5cae1863c5e39243230a0e92d264ff430","signature":"2852a8d36aeacc27a7a4146c8b85e65b93919fd55217e687e3c9f929feaa5cdf"},{"version":"fcbf17d2351b1f97a214af78bf57a8c9f62b07aa1635ff0284429144eabeb170","signature":"36a7aa42b7dc48cd5de3bc9803751e2275d34fa950b11e2dcb7341f27229ed59"},"332bd67a6233b14fd19c10d14110b12e5eea53ffe4a3a54e1eaf3c933e69d0e6",{"version":"e75f5d5769c09e22041a6a92ae165ce797d8da0eb1dacc1b4cbfd3d86d477f43","signature":"0f81a53d54fd2b4ae2bf60067d616de99884bda21cb5784d942089d52319fb97"},"e59262ddaae67dec2d226f8a5d05cf6c4dc353c0d9b1e4980a61d7fcf9a2b051","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","470b8c2386c916bad4aa0d05e89b271a47dbe1250cb25dc0f93102b457228dde","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"3c150a2e1758724811db3bdc5c773421819343b1627714e09f29b1f40a5dfb26","affectsGlobalScope":true},"7000ec8572390d035ba5ef993953957150d0c38ffb31b56653c97dd78cb6e1aa","056892cca68dca10a914f1580ba0e5710d26794e8707225dca9b5717ed702f1e","4ddf3962990379d1ea59b369a5516c7533b7944010d6998e0e9b1ab35d5af1f0","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be",{"version":"17959d175ba42127b555b990fb6ded437889f84d87c0ad446bd916ec3b06571f","signature":"86d356e64ab8d56852623677eb1bed0c106703aed9b7788ad8a5a56e647822cb"},"2a8f0a19a927e83421597c056c90695557142f54ca96358f01eb1f2a5eb228be","d08415b3d6d7fd153ba6e7bf7707ffc57f3c6ad85730ea63544756610b4350c6","411f23da7a63c3d3fd4860c41a458e8df239776fd5d9cd36dd3ad6be92afccbd","6ada3e065916c0ef2dbc9bc0f9b5d59afb25d9176f81fa2c8993a536924140c6","356cc1b058e05e07d2acd73bfa87f83a6f4a343450ee375dad232ff4a55d41d8","df286e6b181ed08766bc19cf1a2fddc50bc5d540f233bc1ce4430a3c1c8c8379","f436800c0af503703110c93144fcc7392524636fb4216296411243b29fe0162d","0d5002560b45ce4fd6c4124632f61789e584be0634602486a2ce59541311d153","bbe13c947d7d6c3426e0e5815e2b3464fa03d34a4bf47298c43b9237cf59555b","9f7d0ee33b9f8fa4dc2e9628e0cdf8683104d01de9d3d24f62cd5da014a5bec4","a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea",{"version":"a74a66589babd72da37a97aad5b8d502407cdd8db6104aa641818cbe497ef69e","signature":"29dca1b5f0cac95b675f86c7846f9d587ed47cc46609dd00d152bcb37683b069"},{"version":"8cef4acb257ba3b3aece8c3358ee8a8dc499138f8818a09bdc9768686e840d66","signature":"a616e1b4eed03c1feb2a6fba721e5cbcb9c23cbe29c1858949a361f80719c0e8"},{"version":"78a7a8d9a4d91c923ae1b5182823979f2856247b5008181f6254aff23356e61c","signature":"48ba49f8bfce8c08ad1e7e54f0b85da9db7317ca76835d1c2640567e3fbd50c6"},"587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"d32f90e6cf32e99c86009b5f79fa50bc750fe54e17137d9bb029c377a2822ee2","affectsGlobalScope":true},"e6f0b909b1c34b38407a6c8b6c92e56a2635527d07dbabe765cfa729c26f3c20",{"version":"c81c51f43e343b6d89114b17341fb9d381c4ccbb25e0ee77532376052c801ba7","affectsGlobalScope":true},"3dd49afd822c82b63b3905a13e22240f34cf367aea4f4dd0e6564f4bddcb8370","57135ce61976a8b1dadd01bb412406d1805b90db6e8ecb726d0d78e0b5f76050",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","f302f3a47d7758f67f2afc753b9375d6504dde05d2e6ecdb1df50abbb131fc89","93db4c949a785a3dbef7f5e08523be538e468c580dd276178b818e761b3b68cd","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"6e335a70826a634c5a1a1fa36a2dacbf3712ef2be7a517540ae1de8a1e8ea4f6","affectsGlobalScope":true},"576115ea69691c96f8f2b9fcfde5d0fb9b5f047dfa7dec242ebc08694c3b3190","df8529626079d6f9d5d3cd7b6fb7db9cda5a3118d383d8cd46c52aadb59593e7","55709608060f77965c270ac10ac646286589f1bd1cb174fff1778a2dd9a7ef31","3122a3f1136508a27a229e0e4e2848299028300ffa11d0cdfe99df90c492fe20","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","51fd089a29b2a91c69bdaa28882cf1340dac3df3a068327b6a044d21a79bf8f5",{"version":"0066ebbd0f4ef9656983a2017969afa6460879e894ebaf6f2969631ad9b5b430","affectsGlobalScope":true},"fe6dba0e8c69f2b244e3da38e53dd2cc9e51b2543e647e805396af73006613f7","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"5810080a0da989a944d3b691b7b479a4a13c75947fb538abb8070710baa5ccee","affectsGlobalScope":true},{"version":"19da7150ca062323b1db6311a6ef058c9b0a39cc64d836b5e9b75d301869653b","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","8904e5b670bbfc712dda607853de9227206e7dad93ac97109fe30875c5f12b78","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270",{"version":"a54ee34c2cc03ec4bbf0c9b10a08b9f909a21b3314f90a743de7b12b85867cef","affectsGlobalScope":true},{"version":"8a985c7d30aea82342d5017730b546bb2b734fe37a2684ca55d4734deb019d58","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","5bc85813bfcb6907cc3a960fec8734a29d7884e0e372515147720c5991b8bc22","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","993325544790073f77e945bee046d53988c0bc3ac5695c9cf8098166feb82661",{"version":"4d06f3abc2a6aae86f1be39e397372f74fb6e7964f594d645926b4a3419cc15d","affectsGlobalScope":true},{"version":"0e08c360c9b5961ecb0537b703e253842b3ded53151ee07024148219b61a8baf","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","5ba5b760345053acdf5beb1a9048ff43a51373f3d87849963779c1711ea7cbcc","16a3080e885ed52d4017c902227a8d0d8daf723d062bec9e45627c6fdcd6699b",{"version":"0bd9543cd8fc0959c76fb8f4f5a26626c2ed62ef4be98fd857bce268066db0a2","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"4905d61a3e1e9b12e12dbf8660fc8d2f085734da6da8d725f395bf41a04853d6",{"version":"677646e2620795c98a539fb12fb531f10331c217cef1492132b2518f894fa92d","affectsGlobalScope":true}],"root":[[48,50],52,63,[75,77]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5,"useDefineForClassFields":false},"fileIdsList":[[124],[55,124],[64,124],[55,64,124],[55,64,72,124],[53,54,124],[78,124],[81,124],[82,87,115,124],[83,94,95,102,112,123,124],[83,84,94,102,124],[85,124],[86,87,95,103,124],[87,112,120,124],[88,90,94,102,124],[89,124],[90,91,124],[94,124],[92,94,124],[94,95,96,112,123,124],[94,95,96,109,112,115,124],[124,128],[90,94,97,102,112,123,124],[94,95,97,98,102,112,120,123,124],[97,99,112,120,123,124],[78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],[94,100,124],[101,123,124,128],[90,94,102,112,124],[103,124],[104,124],[81,105,124],[106,122,124,128],[107,124],[108,124],[94,109,110,124],[109,111,124,126],[82,94,112,113,114,115,124],[82,112,114,124],[112,113,124],[115,124],[116,124],[81,112,124],[94,118,119,124],[118,119,124],[87,102,112,120,124],[121,124],[102,122,124],[82,97,108,123,124],[87,124],[112,124,125],[101,124,126],[124,127],[82,87,94,96,105,112,123,124,126,128],[112,124,129],[56,124],[47,51,124],[55,59,124],[59,124],[57,58,124],[65,66,67,68,69,70,71,72,73,124],[55,59,60,61,124],[46,47,50,51,124],[46,47,48,49,51,124],[46,124],[46,52,63,75,76,124],[46,47,51,62,124],[46,62,74,124],[46,52,62,63,74,124],[47,51],[52,63,75,76],[47,51,62],[59,62]],"referencedMap":[[53,1],[64,2],[65,3],[68,4],[66,4],[70,4],[73,5],[72,1],[71,4],[69,4],[67,3],[54,1],[55,6],[132,1],[78,7],[79,7],[81,8],[82,9],[83,10],[84,11],[85,12],[86,13],[87,14],[88,15],[89,16],[90,17],[91,17],[93,18],[92,19],[94,18],[95,20],[96,21],[80,22],[130,1],[97,23],[98,24],[99,25],[131,26],[100,27],[101,28],[102,29],[103,30],[104,31],[105,32],[106,33],[107,34],[108,35],[109,36],[110,36],[111,37],[112,38],[114,39],[113,40],[115,41],[116,42],[117,43],[118,44],[119,45],[120,46],[121,47],[122,48],[123,49],[124,50],[125,51],[126,52],[127,53],[128,54],[129,55],[57,56],[56,1],[51,57],[47,1],[60,58],[58,59],[61,1],[59,60],[74,61],[62,62],[46,1],[44,1],[45,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[19,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[34,1],[31,1],[32,1],[33,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[1,1],[43,1],[52,63],[50,64],[49,65],[48,65],[77,66],[63,67],[76,68],[75,69]],"exportedModulesMap":[[53,1],[64,2],[65,3],[68,4],[66,4],[70,4],[73,5],[72,1],[71,4],[69,4],[67,3],[54,1],[55,6],[132,1],[78,7],[79,7],[81,8],[82,9],[83,10],[84,11],[85,12],[86,13],[87,14],[88,15],[89,16],[90,17],[91,17],[93,18],[92,19],[94,18],[95,20],[96,21],[80,22],[130,1],[97,23],[98,24],[99,25],[131,26],[100,27],[101,28],[102,29],[103,30],[104,31],[105,32],[106,33],[107,34],[108,35],[109,36],[110,36],[111,37],[112,38],[114,39],[113,40],[115,41],[116,42],[117,43],[118,44],[119,45],[120,46],[121,47],[122,48],[123,49],[124,50],[125,51],[126,52],[127,53],[128,54],[129,55],[57,56],[56,1],[51,57],[47,1],[60,58],[58,59],[61,1],[59,60],[74,61],[62,62],[46,1],[44,1],[45,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[19,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[34,1],[31,1],[32,1],[33,1],[35,1],[7,1],[36,1],[41,1],[42,1],[37,1],[38,1],[39,1],[40,1],[1,1],[43,1],[52,70],[50,70],[77,71],[63,72],[76,73],[75,73]],"semanticDiagnosticsPerFile":[53,64,65,68,66,70,73,72,71,69,67,54,55,132,78,79,81,82,83,84,85,86,87,88,89,90,91,93,92,94,95,96,80,130,97,98,99,131,100,101,102,103,104,105,106,107,108,109,110,111,112,114,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,57,56,51,47,60,58,61,59,74,62,46,44,45,8,10,9,2,11,12,13,14,15,16,17,18,3,4,19,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,52,50,49,48,77,63,76,75]},"version":"5.2.2"}
1
+ {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/i18next/index.d.ts","../src/http-backend/utils.ts","../src/http-backend/request.ts","../src/http-backend/index.ts","../../../node_modules/i18next-browser-languagedetector/index.d.ts","../src/config.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit/node_modules/lit-html/directive.d.ts","../../../node_modules/lit/node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit/node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../src/localize.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../../../node_modules/lit/decorators.d.ts","../src/ox-i18n.ts","../src/ox-i18n-selector.ts","../src/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","c1a660a90d6565c602fa458f53849140c9008b7000ce8823443a2b1ae9ca46a3",{"version":"92fdaed0fdc293ad093ae04e4eab62b6e1217b40f2eb1692b14ac3e7f846bc9f","signature":"0d0203f628a45b8a859e4a02d2f37549a94dd9d59fec0294948a2f6d2a7b176c"},{"version":"449c94b0cbf0c2050aff7660c9bf54b5cae1863c5e39243230a0e92d264ff430","signature":"2852a8d36aeacc27a7a4146c8b85e65b93919fd55217e687e3c9f929feaa5cdf"},{"version":"fcbf17d2351b1f97a214af78bf57a8c9f62b07aa1635ff0284429144eabeb170","signature":"36a7aa42b7dc48cd5de3bc9803751e2275d34fa950b11e2dcb7341f27229ed59"},"332bd67a6233b14fd19c10d14110b12e5eea53ffe4a3a54e1eaf3c933e69d0e6",{"version":"e75f5d5769c09e22041a6a92ae165ce797d8da0eb1dacc1b4cbfd3d86d477f43","signature":"0f81a53d54fd2b4ae2bf60067d616de99884bda21cb5784d942089d52319fb97"},"e59262ddaae67dec2d226f8a5d05cf6c4dc353c0d9b1e4980a61d7fcf9a2b051","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","470b8c2386c916bad4aa0d05e89b271a47dbe1250cb25dc0f93102b457228dde","15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e",{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true},"7000ec8572390d035ba5ef993953957150d0c38ffb31b56653c97dd78cb6e1aa","056892cca68dca10a914f1580ba0e5710d26794e8707225dca9b5717ed702f1e","056892cca68dca10a914f1580ba0e5710d26794e8707225dca9b5717ed702f1e","4ddf3962990379d1ea59b369a5516c7533b7944010d6998e0e9b1ab35d5af1f0","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be",{"version":"17959d175ba42127b555b990fb6ded437889f84d87c0ad446bd916ec3b06571f","signature":"86d356e64ab8d56852623677eb1bed0c106703aed9b7788ad8a5a56e647822cb"},"2a8f0a19a927e83421597c056c90695557142f54ca96358f01eb1f2a5eb228be","d08415b3d6d7fd153ba6e7bf7707ffc57f3c6ad85730ea63544756610b4350c6","411f23da7a63c3d3fd4860c41a458e8df239776fd5d9cd36dd3ad6be92afccbd","6ada3e065916c0ef2dbc9bc0f9b5d59afb25d9176f81fa2c8993a536924140c6","356cc1b058e05e07d2acd73bfa87f83a6f4a343450ee375dad232ff4a55d41d8","df286e6b181ed08766bc19cf1a2fddc50bc5d540f233bc1ce4430a3c1c8c8379","f436800c0af503703110c93144fcc7392524636fb4216296411243b29fe0162d","0d5002560b45ce4fd6c4124632f61789e584be0634602486a2ce59541311d153","bbe13c947d7d6c3426e0e5815e2b3464fa03d34a4bf47298c43b9237cf59555b","9f7d0ee33b9f8fa4dc2e9628e0cdf8683104d01de9d3d24f62cd5da014a5bec4","a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea",{"version":"a74a66589babd72da37a97aad5b8d502407cdd8db6104aa641818cbe497ef69e","signature":"a34d8270a9f91c0ffcb4c4c7763a9ac2fcf501a8d82b317756ed571e4d9a887d"},{"version":"9a15bb2e307fd553ab8d22a52bcdc06051e3a85abd77f715ec1e6743a86eb549","signature":"ce1e5990b559e0aafc6027a1b153ca691de049907919204d2db34ca797610fe5"},{"version":"78a7a8d9a4d91c923ae1b5182823979f2856247b5008181f6254aff23356e61c","signature":"48ba49f8bfce8c08ad1e7e54f0b85da9db7317ca76835d1c2640567e3fbd50c6"},"efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","06f613ad82b49f264a12e30977e791d5b0addf9d8d1d18cd135c402928ff0607","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"0d832a0650a74aafc276cb3f7bb26bde2e2270a6f87e6c871a64122e9203079b","affectsGlobalScope":true},{"version":"c6f3869f12bb5c3bb8ecd0b050ea20342b89b944eae18d313cde6b0ccc0925d7","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447",{"version":"0ea93d01083b3d5863cc98cb589b5d0eac55d14417487f9e5e455dfa0b17c660","affectsGlobalScope":true}],"root":[[48,50],52,64,[76,78]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5,"useDefineForClassFields":false},"fileIdsList":[[55],[65],[55,65],[55,65,73],[53,54],[79],[115],[116,121,149],[117,128,129,136,146,157],[117,118,128,136],[119,158],[120,121,129,137],[121,146,154],[122,124,128,136],[123],[124,125],[128],[126,128],[115,128],[128,129,130,146,157],[128,129,130,143,146,149],[113,116,162],[124,128,131,136,146,157],[128,129,131,132,136,146,154,157],[131,133,146,154,157],[79,80,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],[128,134],[135,157,162],[124,128,136,146],[137],[138],[115,139],[140,156,162],[141],[142],[128,143,144],[143,145,158,160],[116,128,146,147,148,149],[116,146,148],[146,147],[149],[150],[115,146],[128,152,153],[152,153],[121,136,146,154],[155],[136,156],[116,131,142,157],[121,158],[146,159],[135,160],[161],[116,121,128,130,139,146,157,160,162],[146,163],[56],[47,51],[55,59],[58],[66,67,68,69,70,71,72,73,74],[55,59,61,62],[59],[57,58],[90,94,157],[90,146,157],[85],[87,90,154,157],[136,154],[165],[85,165],[87,90,136,157],[82,83,86,89,116,128,146,157],[82,88],[86,90,116,149,157,165],[116,165],[106,116,165],[84,85,165],[90],[84,85,86,87,88,89,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112],[90,97,98],[88,90,98,99],[89],[82,85,90],[90,94,98,99],[94],[88,90,93,157],[82,87,88,90,94,97],[116,146],[85,90,106,116,162,165],[46,47,50,51],[46,47,48,49,51],[46],[46,52,64,76,77],[46,47,51,63],[46,63,75],[46,52,63,64,75],[52,64,76,77],[47,51,63],[63]],"referencedMap":[[65,1],[66,2],[69,3],[67,3],[71,3],[74,4],[72,3],[70,3],[68,2],[55,5],[79,6],[80,6],[115,7],[116,8],[117,9],[118,10],[119,11],[120,12],[121,13],[122,14],[123,15],[124,16],[125,16],[127,17],[126,18],[128,19],[129,20],[130,21],[114,22],[131,23],[132,24],[133,25],[165,26],[134,27],[135,28],[136,29],[137,30],[138,31],[139,32],[140,33],[141,34],[142,35],[143,36],[144,36],[145,37],[146,38],[148,39],[147,40],[149,41],[150,42],[151,43],[152,44],[153,45],[154,46],[155,47],[156,48],[157,49],[158,50],[159,51],[160,52],[161,53],[162,54],[163,55],[57,56],[51,57],[61,58],[60,59],[75,60],[63,61],[58,62],[59,63],[97,64],[104,65],[96,64],[111,66],[88,67],[87,68],[110,69],[105,70],[108,71],[90,72],[89,73],[85,74],[84,75],[107,76],[86,77],[91,78],[95,78],[113,79],[112,78],[99,80],[100,81],[102,82],[98,83],[101,84],[106,69],[93,85],[94,86],[103,87],[83,88],[109,89],[52,90],[50,91],[49,92],[48,92],[78,93],[64,94],[77,95],[76,96]],"exportedModulesMap":[[65,1],[66,2],[69,3],[67,3],[71,3],[74,4],[72,3],[70,3],[68,2],[55,5],[79,6],[80,6],[115,7],[116,8],[117,9],[118,10],[119,11],[120,12],[121,13],[122,14],[123,15],[124,16],[125,16],[127,17],[126,18],[128,19],[129,20],[130,21],[114,22],[131,23],[132,24],[133,25],[165,26],[134,27],[135,28],[136,29],[137,30],[138,31],[139,32],[140,33],[141,34],[142,35],[143,36],[144,36],[145,37],[146,38],[148,39],[147,40],[149,41],[150,42],[151,43],[152,44],[153,45],[154,46],[155,47],[156,48],[157,49],[158,50],[159,51],[160,52],[161,53],[162,54],[163,55],[57,56],[51,57],[61,58],[60,59],[75,60],[63,61],[58,62],[59,63],[97,64],[104,65],[96,64],[111,66],[88,67],[87,68],[110,69],[105,70],[108,71],[90,72],[89,73],[85,74],[84,75],[107,76],[86,77],[91,78],[95,78],[113,79],[112,78],[99,80],[100,81],[102,82],[98,83],[101,84],[106,69],[93,85],[94,86],[103,87],[83,88],[109,89],[52,57],[50,57],[78,97],[64,98],[77,99],[76,99]],"semanticDiagnosticsPerFile":[53,65,66,69,67,71,74,73,72,70,68,54,55,166,79,80,115,116,117,118,119,120,121,122,123,124,125,127,126,128,129,130,114,164,131,132,133,165,134,135,136,137,138,139,140,141,142,143,144,145,146,148,147,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,57,56,81,51,47,61,60,75,63,58,62,59,46,44,45,8,10,9,2,11,12,13,14,15,16,17,18,3,4,19,23,20,21,22,24,25,26,5,27,28,29,30,6,34,31,32,33,35,7,36,41,42,37,38,39,40,1,43,97,104,96,111,88,87,110,105,108,90,89,85,84,107,86,91,92,95,82,113,112,99,100,102,98,101,106,93,94,103,83,109,52,50,49,48,78,64,77,76]},"version":"5.3.3"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/i18n",
3
3
  "description": "Webcomponent i18n following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "1.4.64",
5
+ "version": "2.0.0-alpha.0",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -87,5 +87,5 @@
87
87
  "prettier --write"
88
88
  ]
89
89
  },
90
- "gitHead": "47382eb5b652aeb12fc530a9508921824e19aca0"
90
+ "gitHead": "f995e977847947a1ac4043ff7c627a5cf2ada67b"
91
91
  }
@@ -24,9 +24,9 @@ export class I18nSelector extends LitElement {
24
24
  select:focus {
25
25
  border: 1px solid var(--focus-background-color);
26
26
  }
27
- option{
28
- background-color:var(--primary-color, #585858);
29
- color:var(--theme-white-color, #fff)
27
+ option {
28
+ background-color: var(--primary-color, #585858);
29
+ color: var(--theme-white-color, #fff);
30
30
  }
31
31
 
32
32
  ::placeholder {
@@ -36,6 +36,7 @@ export class I18nSelector extends LitElement {
36
36
  `
37
37
 
38
38
  @property({ type: String, attribute: true }) value: string = ''
39
+ @property({ type: Array }) languages: { code: string; display: string }[] = []
39
40
 
40
41
  render() {
41
42
  const value = this.value
@@ -43,11 +44,10 @@ export class I18nSelector extends LitElement {
43
44
  return html`
44
45
  <select .value=${this.value} @change=${(e: Event) => this.onLocaleChanged((e.target as HTMLSelectElement).value)}>
45
46
  <option value="" ?selected=${!value}></option>
46
- <option value="en-US" ?selected=${value?.startsWith('en')}>English</option>
47
- <option value="ja-JP" ?selected=${value?.startsWith('ja')}>にほんご</option>
48
- <option value="ko-KR" ?selected=${value?.startsWith('ko')}>한국어</option>
49
- <option value="ms-MY" ?selected=${value?.startsWith('ms')}>Bahasa Malaysia</option>
50
- <option value="zh-CN" ?selected=${value?.startsWith('zh')}>中文</option>
47
+ ${(this.languages || []).map(
48
+ ({ code, display }) =>
49
+ html` <option value=${code} ?selected=${value?.startsWith(code.substring(0, 2))}>${display}</option> `
50
+ )}
51
51
  </select>
52
52
  `
53
53
  }