瀏覽代碼

update theme and js dependencies

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 1 年之前
父節點
當前提交
76c912083e

文件差異過大導致無法顯示
+ 2 - 2
static/assets/css/style.bundle.css


文件差異過大導致無法顯示
+ 0 - 0
static/assets/js/scripts.bundle.js


文件差異過大導致無法顯示
+ 0 - 0
static/assets/plugins/custom/datatables/datatables.bundle.css


文件差異過大導致無法顯示
+ 3 - 3
static/assets/plugins/custom/datatables/datatables.bundle.js


文件差異過大導致無法顯示
+ 0 - 0
static/assets/plugins/global/plugins.bundle.css


文件差異過大導致無法顯示
+ 0 - 0
static/assets/plugins/global/plugins.bundle.js


文件差異過大導致無法顯示
+ 0 - 0
static/vendor/codemirror/cm6.bundle.min.js


文件差異過大導致無法顯示
+ 0 - 0
static/vendor/humanize-duration/humanize-duration.min.js


+ 0 - 2297
static/vendor/i18next/i18next.js

@@ -1,2297 +0,0 @@
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
-  typeof define === 'function' && define.amd ? define(factory) :
-  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.i18next = factory());
-})(this, (function () { 'use strict';
-
-  const consoleLogger = {
-    type: 'logger',
-    log(args) {
-      this.output('log', args);
-    },
-    warn(args) {
-      this.output('warn', args);
-    },
-    error(args) {
-      this.output('error', args);
-    },
-    output(type, args) {
-      if (console && console[type]) console[type].apply(console, args);
-    }
-  };
-  class Logger {
-    constructor(concreteLogger) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      this.init(concreteLogger, options);
-    }
-    init(concreteLogger) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      this.prefix = options.prefix || 'i18next:';
-      this.logger = concreteLogger || consoleLogger;
-      this.options = options;
-      this.debug = options.debug;
-    }
-    log() {
-      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
-        args[_key] = arguments[_key];
-      }
-      return this.forward(args, 'log', '', true);
-    }
-    warn() {
-      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
-        args[_key2] = arguments[_key2];
-      }
-      return this.forward(args, 'warn', '', true);
-    }
-    error() {
-      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
-        args[_key3] = arguments[_key3];
-      }
-      return this.forward(args, 'error', '');
-    }
-    deprecate() {
-      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
-        args[_key4] = arguments[_key4];
-      }
-      return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
-    }
-    forward(args, lvl, prefix, debugOnly) {
-      if (debugOnly && !this.debug) return null;
-      if (typeof args[0] === 'string') args[0] = `${prefix}${this.prefix} ${args[0]}`;
-      return this.logger[lvl](args);
-    }
-    create(moduleName) {
-      return new Logger(this.logger, {
-        ...{
-          prefix: `${this.prefix}:${moduleName}:`
-        },
-        ...this.options
-      });
-    }
-    clone(options) {
-      options = options || this.options;
-      options.prefix = options.prefix || this.prefix;
-      return new Logger(this.logger, options);
-    }
-  }
-  var baseLogger = new Logger();
-
-  class EventEmitter {
-    constructor() {
-      this.observers = {};
-    }
-    on(events, listener) {
-      events.split(' ').forEach(event => {
-        this.observers[event] = this.observers[event] || [];
-        this.observers[event].push(listener);
-      });
-      return this;
-    }
-    off(event, listener) {
-      if (!this.observers[event]) return;
-      if (!listener) {
-        delete this.observers[event];
-        return;
-      }
-      this.observers[event] = this.observers[event].filter(l => l !== listener);
-    }
-    emit(event) {
-      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-        args[_key - 1] = arguments[_key];
-      }
-      if (this.observers[event]) {
-        const cloned = [].concat(this.observers[event]);
-        cloned.forEach(observer => {
-          observer(...args);
-        });
-      }
-      if (this.observers['*']) {
-        const cloned = [].concat(this.observers['*']);
-        cloned.forEach(observer => {
-          observer.apply(observer, [event, ...args]);
-        });
-      }
-    }
-  }
-
-  function defer() {
-    let res;
-    let rej;
-    const promise = new Promise((resolve, reject) => {
-      res = resolve;
-      rej = reject;
-    });
-    promise.resolve = res;
-    promise.reject = rej;
-    return promise;
-  }
-  function makeString(object) {
-    if (object == null) return '';
-    return '' + object;
-  }
-  function copy(a, s, t) {
-    a.forEach(m => {
-      if (s[m]) t[m] = s[m];
-    });
-  }
-  function getLastOfPath(object, path, Empty) {
-    function cleanKey(key) {
-      return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
-    }
-    function canNotTraverseDeeper() {
-      return !object || typeof object === 'string';
-    }
-    const stack = typeof path !== 'string' ? [].concat(path) : path.split('.');
-    while (stack.length > 1) {
-      if (canNotTraverseDeeper()) return {};
-      const key = cleanKey(stack.shift());
-      if (!object[key] && Empty) object[key] = new Empty();
-      if (Object.prototype.hasOwnProperty.call(object, key)) {
-        object = object[key];
-      } else {
-        object = {};
-      }
-    }
-    if (canNotTraverseDeeper()) return {};
-    return {
-      obj: object,
-      k: cleanKey(stack.shift())
-    };
-  }
-  function setPath(object, path, newValue) {
-    const {
-      obj,
-      k
-    } = getLastOfPath(object, path, Object);
-    obj[k] = newValue;
-  }
-  function pushPath(object, path, newValue, concat) {
-    const {
-      obj,
-      k
-    } = getLastOfPath(object, path, Object);
-    obj[k] = obj[k] || [];
-    if (concat) obj[k] = obj[k].concat(newValue);
-    if (!concat) obj[k].push(newValue);
-  }
-  function getPath(object, path) {
-    const {
-      obj,
-      k
-    } = getLastOfPath(object, path);
-    if (!obj) return undefined;
-    return obj[k];
-  }
-  function getPathWithDefaults(data, defaultData, key) {
-    const value = getPath(data, key);
-    if (value !== undefined) {
-      return value;
-    }
-    return getPath(defaultData, key);
-  }
-  function deepExtend(target, source, overwrite) {
-    for (const prop in source) {
-      if (prop !== '__proto__' && prop !== 'constructor') {
-        if (prop in target) {
-          if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
-            if (overwrite) target[prop] = source[prop];
-          } else {
-            deepExtend(target[prop], source[prop], overwrite);
-          }
-        } else {
-          target[prop] = source[prop];
-        }
-      }
-    }
-    return target;
-  }
-  function regexEscape(str) {
-    return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
-  }
-  var _entityMap = {
-    '&': '&amp;',
-    '<': '&lt;',
-    '>': '&gt;',
-    '"': '&quot;',
-    "'": '&#39;',
-    '/': '&#x2F;'
-  };
-  function escape(data) {
-    if (typeof data === 'string') {
-      return data.replace(/[&<>"'\/]/g, s => _entityMap[s]);
-    }
-    return data;
-  }
-  const chars = [' ', ',', '?', '!', ';'];
-  function looksLikeObjectPath(key, nsSeparator, keySeparator) {
-    nsSeparator = nsSeparator || '';
-    keySeparator = keySeparator || '';
-    const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);
-    if (possibleChars.length === 0) return true;
-    const r = new RegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
-    let matched = !r.test(key);
-    if (!matched) {
-      const ki = key.indexOf(keySeparator);
-      if (ki > 0 && !r.test(key.substring(0, ki))) {
-        matched = true;
-      }
-    }
-    return matched;
-  }
-  function deepFind(obj, path) {
-    let keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
-    if (!obj) return undefined;
-    if (obj[path]) return obj[path];
-    const paths = path.split(keySeparator);
-    let current = obj;
-    for (let i = 0; i < paths.length; ++i) {
-      if (!current) return undefined;
-      if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {
-        return undefined;
-      }
-      if (current[paths[i]] === undefined) {
-        let j = 2;
-        let p = paths.slice(i, i + j).join(keySeparator);
-        let mix = current[p];
-        while (mix === undefined && paths.length > i + j) {
-          j++;
-          p = paths.slice(i, i + j).join(keySeparator);
-          mix = current[p];
-        }
-        if (mix === undefined) return undefined;
-        if (mix === null) return null;
-        if (path.endsWith(p)) {
-          if (typeof mix === 'string') return mix;
-          if (p && typeof mix[p] === 'string') return mix[p];
-        }
-        const joinedPath = paths.slice(i + j).join(keySeparator);
-        if (joinedPath) return deepFind(mix, joinedPath, keySeparator);
-        return undefined;
-      }
-      current = current[paths[i]];
-    }
-    return current;
-  }
-  function getCleanedCode(code) {
-    if (code && code.indexOf('_') > 0) return code.replace('_', '-');
-    return code;
-  }
-
-  class ResourceStore extends EventEmitter {
-    constructor(data) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-        ns: ['translation'],
-        defaultNS: 'translation'
-      };
-      super();
-      this.data = data || {};
-      this.options = options;
-      if (this.options.keySeparator === undefined) {
-        this.options.keySeparator = '.';
-      }
-      if (this.options.ignoreJSONStructure === undefined) {
-        this.options.ignoreJSONStructure = true;
-      }
-    }
-    addNamespaces(ns) {
-      if (this.options.ns.indexOf(ns) < 0) {
-        this.options.ns.push(ns);
-      }
-    }
-    removeNamespaces(ns) {
-      const index = this.options.ns.indexOf(ns);
-      if (index > -1) {
-        this.options.ns.splice(index, 1);
-      }
-    }
-    getResource(lng, ns, key) {
-      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-      const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
-      const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
-      let path = [lng, ns];
-      if (key && typeof key !== 'string') path = path.concat(key);
-      if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
-      if (lng.indexOf('.') > -1) {
-        path = lng.split('.');
-      }
-      const result = getPath(this.data, path);
-      if (result || !ignoreJSONStructure || typeof key !== 'string') return result;
-      return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
-    }
-    addResource(lng, ns, key, value) {
-      let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
-        silent: false
-      };
-      const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
-      let path = [lng, ns];
-      if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
-      if (lng.indexOf('.') > -1) {
-        path = lng.split('.');
-        value = ns;
-        ns = path[1];
-      }
-      this.addNamespaces(ns);
-      setPath(this.data, path, value);
-      if (!options.silent) this.emit('added', lng, ns, key, value);
-    }
-    addResources(lng, ns, resources) {
-      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
-        silent: false
-      };
-      for (const m in resources) {
-        if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {
-          silent: true
-        });
-      }
-      if (!options.silent) this.emit('added', lng, ns, resources);
-    }
-    addResourceBundle(lng, ns, resources, deep, overwrite) {
-      let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
-        silent: false
-      };
-      let path = [lng, ns];
-      if (lng.indexOf('.') > -1) {
-        path = lng.split('.');
-        deep = resources;
-        resources = ns;
-        ns = path[1];
-      }
-      this.addNamespaces(ns);
-      let pack = getPath(this.data, path) || {};
-      if (deep) {
-        deepExtend(pack, resources, overwrite);
-      } else {
-        pack = {
-          ...pack,
-          ...resources
-        };
-      }
-      setPath(this.data, path, pack);
-      if (!options.silent) this.emit('added', lng, ns, resources);
-    }
-    removeResourceBundle(lng, ns) {
-      if (this.hasResourceBundle(lng, ns)) {
-        delete this.data[lng][ns];
-      }
-      this.removeNamespaces(ns);
-      this.emit('removed', lng, ns);
-    }
-    hasResourceBundle(lng, ns) {
-      return this.getResource(lng, ns) !== undefined;
-    }
-    getResourceBundle(lng, ns) {
-      if (!ns) ns = this.options.defaultNS;
-      if (this.options.compatibilityAPI === 'v1') return {
-        ...{},
-        ...this.getResource(lng, ns)
-      };
-      return this.getResource(lng, ns);
-    }
-    getDataByLanguage(lng) {
-      return this.data[lng];
-    }
-    hasLanguageSomeTranslations(lng) {
-      const data = this.getDataByLanguage(lng);
-      const n = data && Object.keys(data) || [];
-      return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);
-    }
-    toJSON() {
-      return this.data;
-    }
-  }
-
-  var postProcessor = {
-    processors: {},
-    addPostProcessor(module) {
-      this.processors[module.name] = module;
-    },
-    handle(processors, value, key, options, translator) {
-      processors.forEach(processor => {
-        if (this.processors[processor]) value = this.processors[processor].process(value, key, options, translator);
-      });
-      return value;
-    }
-  };
-
-  const checkedLoadedFor = {};
-  class Translator extends EventEmitter {
-    constructor(services) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      super();
-      copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);
-      this.options = options;
-      if (this.options.keySeparator === undefined) {
-        this.options.keySeparator = '.';
-      }
-      this.logger = baseLogger.create('translator');
-    }
-    changeLanguage(lng) {
-      if (lng) this.language = lng;
-    }
-    exists(key) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-        interpolation: {}
-      };
-      if (key === undefined || key === null) {
-        return false;
-      }
-      const resolved = this.resolve(key, options);
-      return resolved && resolved.res !== undefined;
-    }
-    extractFromKey(key, options) {
-      let nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
-      if (nsSeparator === undefined) nsSeparator = ':';
-      const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
-      let namespaces = options.ns || this.options.defaultNS || [];
-      const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;
-      const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
-      if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
-        const m = key.match(this.interpolator.nestingRegexp);
-        if (m && m.length > 0) {
-          return {
-            key,
-            namespaces
-          };
-        }
-        const parts = key.split(nsSeparator);
-        if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
-        key = parts.join(keySeparator);
-      }
-      if (typeof namespaces === 'string') namespaces = [namespaces];
-      return {
-        key,
-        namespaces
-      };
-    }
-    translate(keys, options, lastKey) {
-      if (typeof options !== 'object' && this.options.overloadTranslationOptionHandler) {
-        options = this.options.overloadTranslationOptionHandler(arguments);
-      }
-      if (typeof options === 'object') options = {
-        ...options
-      };
-      if (!options) options = {};
-      if (keys === undefined || keys === null) return '';
-      if (!Array.isArray(keys)) keys = [String(keys)];
-      const returnDetails = options.returnDetails !== undefined ? options.returnDetails : this.options.returnDetails;
-      const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
-      const {
-        key,
-        namespaces
-      } = this.extractFromKey(keys[keys.length - 1], options);
-      const namespace = namespaces[namespaces.length - 1];
-      const lng = options.lng || this.language;
-      const appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
-      if (lng && lng.toLowerCase() === 'cimode') {
-        if (appendNamespaceToCIMode) {
-          const nsSeparator = options.nsSeparator || this.options.nsSeparator;
-          if (returnDetails) {
-            return {
-              res: `${namespace}${nsSeparator}${key}`,
-              usedKey: key,
-              exactUsedKey: key,
-              usedLng: lng,
-              usedNS: namespace,
-              usedParams: this.getUsedParamsDetails(options)
-            };
-          }
-          return `${namespace}${nsSeparator}${key}`;
-        }
-        if (returnDetails) {
-          return {
-            res: key,
-            usedKey: key,
-            exactUsedKey: key,
-            usedLng: lng,
-            usedNS: namespace,
-            usedParams: this.getUsedParamsDetails(options)
-          };
-        }
-        return key;
-      }
-      const resolved = this.resolve(keys, options);
-      let res = resolved && resolved.res;
-      const resUsedKey = resolved && resolved.usedKey || key;
-      const resExactUsedKey = resolved && resolved.exactUsedKey || key;
-      const resType = Object.prototype.toString.apply(res);
-      const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
-      const joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
-      const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
-      const handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';
-      if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {
-        if (!options.returnObjects && !this.options.returnObjects) {
-          if (!this.options.returnedObjectHandler) {
-            this.logger.warn('accessing an object - but returnObjects options is not enabled!');
-          }
-          const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, {
-            ...options,
-            ns: namespaces
-          }) : `key '${key} (${this.language})' returned an object instead of string.`;
-          if (returnDetails) {
-            resolved.res = r;
-            resolved.usedParams = this.getUsedParamsDetails(options);
-            return resolved;
-          }
-          return r;
-        }
-        if (keySeparator) {
-          const resTypeIsArray = resType === '[object Array]';
-          const copy = resTypeIsArray ? [] : {};
-          const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
-          for (const m in res) {
-            if (Object.prototype.hasOwnProperty.call(res, m)) {
-              const deepKey = `${newKeyToUse}${keySeparator}${m}`;
-              copy[m] = this.translate(deepKey, {
-                ...options,
-                ...{
-                  joinArrays: false,
-                  ns: namespaces
-                }
-              });
-              if (copy[m] === deepKey) copy[m] = res[m];
-            }
-          }
-          res = copy;
-        }
-      } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
-        res = res.join(joinArrays);
-        if (res) res = this.extendTranslation(res, keys, options, lastKey);
-      } else {
-        let usedDefault = false;
-        let usedKey = false;
-        const needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
-        const hasDefaultValue = Translator.hasDefaultValue(options);
-        const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';
-        const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
-          ordinal: false
-        }) : '';
-        const defaultValue = options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;
-        if (!this.isValidLookup(res) && hasDefaultValue) {
-          usedDefault = true;
-          res = defaultValue;
-        }
-        if (!this.isValidLookup(res)) {
-          usedKey = true;
-          res = key;
-        }
-        const missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
-        const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
-        const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
-        if (usedKey || usedDefault || updateMissing) {
-          this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
-          if (keySeparator) {
-            const fk = this.resolve(key, {
-              ...options,
-              keySeparator: false
-            });
-            if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
-          }
-          let lngs = [];
-          const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
-          if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
-            for (let i = 0; i < fallbackLngs.length; i++) {
-              lngs.push(fallbackLngs[i]);
-            }
-          } else if (this.options.saveMissingTo === 'all') {
-            lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
-          } else {
-            lngs.push(options.lng || this.language);
-          }
-          const send = (l, k, specificDefaultValue) => {
-            const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
-            if (this.options.missingKeyHandler) {
-              this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);
-            } else if (this.backendConnector && this.backendConnector.saveMissing) {
-              this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);
-            }
-            this.emit('missingKey', l, namespace, k, res);
-          };
-          if (this.options.saveMissing) {
-            if (this.options.saveMissingPlurals && needsPluralHandling) {
-              lngs.forEach(language => {
-                this.pluralResolver.getSuffixes(language, options).forEach(suffix => {
-                  send([language], key + suffix, options[`defaultValue${suffix}`] || defaultValue);
-                });
-              });
-            } else {
-              send(lngs, key, defaultValue);
-            }
-          }
-        }
-        res = this.extendTranslation(res, keys, options, resolved, lastKey);
-        if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = `${namespace}:${key}`;
-        if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
-          if (this.options.compatibilityAPI !== 'v1') {
-            res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : undefined);
-          } else {
-            res = this.options.parseMissingKeyHandler(res);
-          }
-        }
-      }
-      if (returnDetails) {
-        resolved.res = res;
-        resolved.usedParams = this.getUsedParamsDetails(options);
-        return resolved;
-      }
-      return res;
-    }
-    extendTranslation(res, key, options, resolved, lastKey) {
-      var _this = this;
-      if (this.i18nFormat && this.i18nFormat.parse) {
-        res = this.i18nFormat.parse(res, {
-          ...this.options.interpolation.defaultVariables,
-          ...options
-        }, options.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {
-          resolved
-        });
-      } else if (!options.skipInterpolation) {
-        if (options.interpolation) this.interpolator.init({
-          ...options,
-          ...{
-            interpolation: {
-              ...this.options.interpolation,
-              ...options.interpolation
-            }
-          }
-        });
-        const skipOnVariables = typeof res === 'string' && (options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
-        let nestBef;
-        if (skipOnVariables) {
-          const nb = res.match(this.interpolator.nestingRegexp);
-          nestBef = nb && nb.length;
-        }
-        let data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
-        if (this.options.interpolation.defaultVariables) data = {
-          ...this.options.interpolation.defaultVariables,
-          ...data
-        };
-        res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
-        if (skipOnVariables) {
-          const na = res.match(this.interpolator.nestingRegexp);
-          const nestAft = na && na.length;
-          if (nestBef < nestAft) options.nest = false;
-        }
-        if (!options.lng && this.options.compatibilityAPI !== 'v1' && resolved && resolved.res) options.lng = resolved.usedLng;
-        if (options.nest !== false) res = this.interpolator.nest(res, function () {
-          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
-            args[_key] = arguments[_key];
-          }
-          if (lastKey && lastKey[0] === args[0] && !options.context) {
-            _this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);
-            return null;
-          }
-          return _this.translate(...args, key);
-        }, options);
-        if (options.interpolation) this.interpolator.reset();
-      }
-      const postProcess = options.postProcess || this.options.postProcess;
-      const postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
-      if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
-        res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
-          i18nResolved: {
-            ...resolved,
-            usedParams: this.getUsedParamsDetails(options)
-          },
-          ...options
-        } : options, this);
-      }
-      return res;
-    }
-    resolve(keys) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      let found;
-      let usedKey;
-      let exactUsedKey;
-      let usedLng;
-      let usedNS;
-      if (typeof keys === 'string') keys = [keys];
-      keys.forEach(k => {
-        if (this.isValidLookup(found)) return;
-        const extracted = this.extractFromKey(k, options);
-        const key = extracted.key;
-        usedKey = key;
-        let namespaces = extracted.namespaces;
-        if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
-        const needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
-        const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && this.pluralResolver.shouldUseIntlApi();
-        const needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';
-        const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);
-        namespaces.forEach(ns => {
-          if (this.isValidLookup(found)) return;
-          usedNS = ns;
-          if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(usedNS)) {
-            checkedLoadedFor[`${codes[0]}-${ns}`] = true;
-            this.logger.warn(`key "${usedKey}" for languages "${codes.join(', ')}" won't get resolved as namespace "${usedNS}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
-          }
-          codes.forEach(code => {
-            if (this.isValidLookup(found)) return;
-            usedLng = code;
-            const finalKeys = [key];
-            if (this.i18nFormat && this.i18nFormat.addLookupKeys) {
-              this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
-            } else {
-              let pluralSuffix;
-              if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, options.count, options);
-              const zeroSuffix = `${this.options.pluralSeparator}zero`;
-              const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
-              if (needsPluralHandling) {
-                finalKeys.push(key + pluralSuffix);
-                if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
-                  finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
-                }
-                if (needsZeroSuffixLookup) {
-                  finalKeys.push(key + zeroSuffix);
-                }
-              }
-              if (needsContextHandling) {
-                const contextKey = `${key}${this.options.contextSeparator}${options.context}`;
-                finalKeys.push(contextKey);
-                if (needsPluralHandling) {
-                  finalKeys.push(contextKey + pluralSuffix);
-                  if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {
-                    finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
-                  }
-                  if (needsZeroSuffixLookup) {
-                    finalKeys.push(contextKey + zeroSuffix);
-                  }
-                }
-              }
-            }
-            let possibleKey;
-            while (possibleKey = finalKeys.pop()) {
-              if (!this.isValidLookup(found)) {
-                exactUsedKey = possibleKey;
-                found = this.getResource(code, ns, possibleKey, options);
-              }
-            }
-          });
-        });
-      });
-      return {
-        res: found,
-        usedKey,
-        exactUsedKey,
-        usedLng,
-        usedNS
-      };
-    }
-    isValidLookup(res) {
-      return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
-    }
-    getResource(code, ns, key) {
-      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-      if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
-      return this.resourceStore.getResource(code, ns, key, options);
-    }
-    getUsedParamsDetails() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];
-      const useOptionsReplaceForData = options.replace && typeof options.replace !== 'string';
-      let data = useOptionsReplaceForData ? options.replace : options;
-      if (useOptionsReplaceForData && typeof options.count !== 'undefined') {
-        data.count = options.count;
-      }
-      if (this.options.interpolation.defaultVariables) {
-        data = {
-          ...this.options.interpolation.defaultVariables,
-          ...data
-        };
-      }
-      if (!useOptionsReplaceForData) {
-        data = {
-          ...data
-        };
-        for (const key of optionsKeys) {
-          delete data[key];
-        }
-      }
-      return data;
-    }
-    static hasDefaultValue(options) {
-      const prefix = 'defaultValue';
-      for (const option in options) {
-        if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
-          return true;
-        }
-      }
-      return false;
-    }
-  }
-
-  function capitalize(string) {
-    return string.charAt(0).toUpperCase() + string.slice(1);
-  }
-  class LanguageUtil {
-    constructor(options) {
-      this.options = options;
-      this.supportedLngs = this.options.supportedLngs || false;
-      this.logger = baseLogger.create('languageUtils');
-    }
-    getScriptPartFromCode(code) {
-      code = getCleanedCode(code);
-      if (!code || code.indexOf('-') < 0) return null;
-      const p = code.split('-');
-      if (p.length === 2) return null;
-      p.pop();
-      if (p[p.length - 1].toLowerCase() === 'x') return null;
-      return this.formatLanguageCode(p.join('-'));
-    }
-    getLanguagePartFromCode(code) {
-      code = getCleanedCode(code);
-      if (!code || code.indexOf('-') < 0) return code;
-      const p = code.split('-');
-      return this.formatLanguageCode(p[0]);
-    }
-    formatLanguageCode(code) {
-      if (typeof code === 'string' && code.indexOf('-') > -1) {
-        const specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
-        let p = code.split('-');
-        if (this.options.lowerCaseLng) {
-          p = p.map(part => part.toLowerCase());
-        } else if (p.length === 2) {
-          p[0] = p[0].toLowerCase();
-          p[1] = p[1].toUpperCase();
-          if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
-        } else if (p.length === 3) {
-          p[0] = p[0].toLowerCase();
-          if (p[1].length === 2) p[1] = p[1].toUpperCase();
-          if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
-          if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
-          if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
-        }
-        return p.join('-');
-      }
-      return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
-    }
-    isSupportedCode(code) {
-      if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
-        code = this.getLanguagePartFromCode(code);
-      }
-      return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
-    }
-    getBestMatchFromCodes(codes) {
-      if (!codes) return null;
-      let found;
-      codes.forEach(code => {
-        if (found) return;
-        const cleanedLng = this.formatLanguageCode(code);
-        if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;
-      });
-      if (!found && this.options.supportedLngs) {
-        codes.forEach(code => {
-          if (found) return;
-          const lngOnly = this.getLanguagePartFromCode(code);
-          if (this.isSupportedCode(lngOnly)) return found = lngOnly;
-          found = this.options.supportedLngs.find(supportedLng => {
-            if (supportedLng === lngOnly) return supportedLng;
-            if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;
-            if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
-          });
-        });
-      }
-      if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
-      return found;
-    }
-    getFallbackCodes(fallbacks, code) {
-      if (!fallbacks) return [];
-      if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
-      if (typeof fallbacks === 'string') fallbacks = [fallbacks];
-      if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
-      if (!code) return fallbacks.default || [];
-      let found = fallbacks[code];
-      if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
-      if (!found) found = fallbacks[this.formatLanguageCode(code)];
-      if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
-      if (!found) found = fallbacks.default;
-      return found || [];
-    }
-    toResolveHierarchy(code, fallbackCode) {
-      const fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
-      const codes = [];
-      const addCode = c => {
-        if (!c) return;
-        if (this.isSupportedCode(c)) {
-          codes.push(c);
-        } else {
-          this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
-        }
-      };
-      if (typeof code === 'string' && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {
-        if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
-        if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
-        if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
-      } else if (typeof code === 'string') {
-        addCode(this.formatLanguageCode(code));
-      }
-      fallbackCodes.forEach(fc => {
-        if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));
-      });
-      return codes;
-    }
-  }
-
-  let sets = [{
-    lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],
-    nr: [1, 2],
-    fc: 1
-  }, {
-    lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],
-    nr: [1, 2],
-    fc: 2
-  }, {
-    lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
-    nr: [1],
-    fc: 3
-  }, {
-    lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],
-    nr: [1, 2, 5],
-    fc: 4
-  }, {
-    lngs: ['ar'],
-    nr: [0, 1, 2, 3, 11, 100],
-    fc: 5
-  }, {
-    lngs: ['cs', 'sk'],
-    nr: [1, 2, 5],
-    fc: 6
-  }, {
-    lngs: ['csb', 'pl'],
-    nr: [1, 2, 5],
-    fc: 7
-  }, {
-    lngs: ['cy'],
-    nr: [1, 2, 3, 8],
-    fc: 8
-  }, {
-    lngs: ['fr'],
-    nr: [1, 2],
-    fc: 9
-  }, {
-    lngs: ['ga'],
-    nr: [1, 2, 3, 7, 11],
-    fc: 10
-  }, {
-    lngs: ['gd'],
-    nr: [1, 2, 3, 20],
-    fc: 11
-  }, {
-    lngs: ['is'],
-    nr: [1, 2],
-    fc: 12
-  }, {
-    lngs: ['jv'],
-    nr: [0, 1],
-    fc: 13
-  }, {
-    lngs: ['kw'],
-    nr: [1, 2, 3, 4],
-    fc: 14
-  }, {
-    lngs: ['lt'],
-    nr: [1, 2, 10],
-    fc: 15
-  }, {
-    lngs: ['lv'],
-    nr: [1, 2, 0],
-    fc: 16
-  }, {
-    lngs: ['mk'],
-    nr: [1, 2],
-    fc: 17
-  }, {
-    lngs: ['mnk'],
-    nr: [0, 1, 2],
-    fc: 18
-  }, {
-    lngs: ['mt'],
-    nr: [1, 2, 11, 20],
-    fc: 19
-  }, {
-    lngs: ['or'],
-    nr: [2, 1],
-    fc: 2
-  }, {
-    lngs: ['ro'],
-    nr: [1, 2, 20],
-    fc: 20
-  }, {
-    lngs: ['sl'],
-    nr: [5, 1, 2, 3],
-    fc: 21
-  }, {
-    lngs: ['he', 'iw'],
-    nr: [1, 2, 20, 21],
-    fc: 22
-  }];
-  let _rulesPluralsTypes = {
-    1: function (n) {
-      return Number(n > 1);
-    },
-    2: function (n) {
-      return Number(n != 1);
-    },
-    3: function (n) {
-      return 0;
-    },
-    4: function (n) {
-      return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
-    },
-    5: function (n) {
-      return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
-    },
-    6: function (n) {
-      return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
-    },
-    7: function (n) {
-      return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
-    },
-    8: function (n) {
-      return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
-    },
-    9: function (n) {
-      return Number(n >= 2);
-    },
-    10: function (n) {
-      return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
-    },
-    11: function (n) {
-      return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
-    },
-    12: function (n) {
-      return Number(n % 10 != 1 || n % 100 == 11);
-    },
-    13: function (n) {
-      return Number(n !== 0);
-    },
-    14: function (n) {
-      return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
-    },
-    15: function (n) {
-      return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
-    },
-    16: function (n) {
-      return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
-    },
-    17: function (n) {
-      return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
-    },
-    18: function (n) {
-      return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
-    },
-    19: function (n) {
-      return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
-    },
-    20: function (n) {
-      return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
-    },
-    21: function (n) {
-      return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
-    },
-    22: function (n) {
-      return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
-    }
-  };
-  const nonIntlVersions = ['v1', 'v2', 'v3'];
-  const intlVersions = ['v4'];
-  const suffixesOrder = {
-    zero: 0,
-    one: 1,
-    two: 2,
-    few: 3,
-    many: 4,
-    other: 5
-  };
-  function createRules() {
-    const rules = {};
-    sets.forEach(set => {
-      set.lngs.forEach(l => {
-        rules[l] = {
-          numbers: set.nr,
-          plurals: _rulesPluralsTypes[set.fc]
-        };
-      });
-    });
-    return rules;
-  }
-  class PluralResolver {
-    constructor(languageUtils) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      this.languageUtils = languageUtils;
-      this.options = options;
-      this.logger = baseLogger.create('pluralResolver');
-      if ((!this.options.compatibilityJSON || intlVersions.includes(this.options.compatibilityJSON)) && (typeof Intl === 'undefined' || !Intl.PluralRules)) {
-        this.options.compatibilityJSON = 'v3';
-        this.logger.error('Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.');
-      }
-      this.rules = createRules();
-    }
-    addRule(lng, obj) {
-      this.rules[lng] = obj;
-    }
-    getRule(code) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      if (this.shouldUseIntlApi()) {
-        try {
-          return new Intl.PluralRules(getCleanedCode(code), {
-            type: options.ordinal ? 'ordinal' : 'cardinal'
-          });
-        } catch {
-          return;
-        }
-      }
-      return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];
-    }
-    needsPlural(code) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      const rule = this.getRule(code, options);
-      if (this.shouldUseIntlApi()) {
-        return rule && rule.resolvedOptions().pluralCategories.length > 1;
-      }
-      return rule && rule.numbers.length > 1;
-    }
-    getPluralFormsOfKey(code, key) {
-      let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);
-    }
-    getSuffixes(code) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      const rule = this.getRule(code, options);
-      if (!rule) {
-        return [];
-      }
-      if (this.shouldUseIntlApi()) {
-        return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);
-      }
-      return rule.numbers.map(number => this.getSuffix(code, number, options));
-    }
-    getSuffix(code, count) {
-      let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      const rule = this.getRule(code, options);
-      if (rule) {
-        if (this.shouldUseIntlApi()) {
-          return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;
-        }
-        return this.getSuffixRetroCompatible(rule, count);
-      }
-      this.logger.warn(`no plural rule found for: ${code}`);
-      return '';
-    }
-    getSuffixRetroCompatible(rule, count) {
-      const idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
-      let suffix = rule.numbers[idx];
-      if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
-        if (suffix === 2) {
-          suffix = 'plural';
-        } else if (suffix === 1) {
-          suffix = '';
-        }
-      }
-      const returnSuffix = () => this.options.prepend && suffix.toString() ? this.options.prepend + suffix.toString() : suffix.toString();
-      if (this.options.compatibilityJSON === 'v1') {
-        if (suffix === 1) return '';
-        if (typeof suffix === 'number') return `_plural_${suffix.toString()}`;
-        return returnSuffix();
-      } else if (this.options.compatibilityJSON === 'v2') {
-        return returnSuffix();
-      } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
-        return returnSuffix();
-      }
-      return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
-    }
-    shouldUseIntlApi() {
-      return !nonIntlVersions.includes(this.options.compatibilityJSON);
-    }
-  }
-
-  function deepFindWithDefaults(data, defaultData, key) {
-    let keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';
-    let ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
-    let path = getPathWithDefaults(data, defaultData, key);
-    if (!path && ignoreJSONStructure && typeof key === 'string') {
-      path = deepFind(data, key, keySeparator);
-      if (path === undefined) path = deepFind(defaultData, key, keySeparator);
-    }
-    return path;
-  }
-  class Interpolator {
-    constructor() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      this.logger = baseLogger.create('interpolator');
-      this.options = options;
-      this.format = options.interpolation && options.interpolation.format || (value => value);
-      this.init(options);
-    }
-    init() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      if (!options.interpolation) options.interpolation = {
-        escapeValue: true
-      };
-      const iOpts = options.interpolation;
-      this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;
-      this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
-      this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;
-      this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
-      this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
-      this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
-      this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
-      this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
-      this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
-      this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
-      this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
-      this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
-      this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
-      this.resetRegExp();
-    }
-    reset() {
-      if (this.options) this.init(this.options);
-    }
-    resetRegExp() {
-      const regexpStr = `${this.prefix}(.+?)${this.suffix}`;
-      this.regexp = new RegExp(regexpStr, 'g');
-      const regexpUnescapeStr = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
-      this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
-      const nestingRegexpStr = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
-      this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
-    }
-    interpolate(str, data, lng, options) {
-      let match;
-      let value;
-      let replaces;
-      const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
-      function regexSafe(val) {
-        return val.replace(/\$/g, '$$$$');
-      }
-      const handleFormat = key => {
-        if (key.indexOf(this.formatSeparator) < 0) {
-          const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
-          return this.alwaysFormat ? this.format(path, undefined, lng, {
-            ...options,
-            ...data,
-            interpolationkey: key
-          }) : path;
-        }
-        const p = key.split(this.formatSeparator);
-        const k = p.shift().trim();
-        const f = p.join(this.formatSeparator).trim();
-        return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {
-          ...options,
-          ...data,
-          interpolationkey: k
-        });
-      };
-      this.resetRegExp();
-      const missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
-      const skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
-      const todos = [{
-        regex: this.regexpUnescape,
-        safeValue: val => regexSafe(val)
-      }, {
-        regex: this.regexp,
-        safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)
-      }];
-      todos.forEach(todo => {
-        replaces = 0;
-        while (match = todo.regex.exec(str)) {
-          const matchedVar = match[1].trim();
-          value = handleFormat(matchedVar);
-          if (value === undefined) {
-            if (typeof missingInterpolationHandler === 'function') {
-              const temp = missingInterpolationHandler(str, match, options);
-              value = typeof temp === 'string' ? temp : '';
-            } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
-              value = '';
-            } else if (skipOnVariables) {
-              value = match[0];
-              continue;
-            } else {
-              this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
-              value = '';
-            }
-          } else if (typeof value !== 'string' && !this.useRawValueToEscape) {
-            value = makeString(value);
-          }
-          const safeValue = todo.safeValue(value);
-          str = str.replace(match[0], safeValue);
-          if (skipOnVariables) {
-            todo.regex.lastIndex += value.length;
-            todo.regex.lastIndex -= match[0].length;
-          } else {
-            todo.regex.lastIndex = 0;
-          }
-          replaces++;
-          if (replaces >= this.maxReplaces) {
-            break;
-          }
-        }
-      });
-      return str;
-    }
-    nest(str, fc) {
-      let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      let match;
-      let value;
-      let clonedOptions;
-      function handleHasOptions(key, inheritedOptions) {
-        const sep = this.nestingOptionsSeparator;
-        if (key.indexOf(sep) < 0) return key;
-        const c = key.split(new RegExp(`${sep}[ ]*{`));
-        let optionsString = `{${c[1]}`;
-        key = c[0];
-        optionsString = this.interpolate(optionsString, clonedOptions);
-        const matchedSingleQuotes = optionsString.match(/'/g);
-        const matchedDoubleQuotes = optionsString.match(/"/g);
-        if (matchedSingleQuotes && matchedSingleQuotes.length % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
-          optionsString = optionsString.replace(/'/g, '"');
-        }
-        try {
-          clonedOptions = JSON.parse(optionsString);
-          if (inheritedOptions) clonedOptions = {
-            ...inheritedOptions,
-            ...clonedOptions
-          };
-        } catch (e) {
-          this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
-          return `${key}${sep}${optionsString}`;
-        }
-        delete clonedOptions.defaultValue;
-        return key;
-      }
-      while (match = this.nestingRegexp.exec(str)) {
-        let formatters = [];
-        clonedOptions = {
-          ...options
-        };
-        clonedOptions = clonedOptions.replace && typeof clonedOptions.replace !== 'string' ? clonedOptions.replace : clonedOptions;
-        clonedOptions.applyPostProcessor = false;
-        delete clonedOptions.defaultValue;
-        let doReduce = false;
-        if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
-          const r = match[1].split(this.formatSeparator).map(elem => elem.trim());
-          match[1] = r.shift();
-          formatters = r;
-          doReduce = true;
-        }
-        value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
-        if (value && match[0] === str && typeof value !== 'string') return value;
-        if (typeof value !== 'string') value = makeString(value);
-        if (!value) {
-          this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
-          value = '';
-        }
-        if (doReduce) {
-          value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
-            ...options,
-            interpolationkey: match[1].trim()
-          }), value.trim());
-        }
-        str = str.replace(match[0], value);
-        this.regexp.lastIndex = 0;
-      }
-      return str;
-    }
-  }
-
-  function parseFormatStr(formatStr) {
-    let formatName = formatStr.toLowerCase().trim();
-    const formatOptions = {};
-    if (formatStr.indexOf('(') > -1) {
-      const p = formatStr.split('(');
-      formatName = p[0].toLowerCase().trim();
-      const optStr = p[1].substring(0, p[1].length - 1);
-      if (formatName === 'currency' && optStr.indexOf(':') < 0) {
-        if (!formatOptions.currency) formatOptions.currency = optStr.trim();
-      } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {
-        if (!formatOptions.range) formatOptions.range = optStr.trim();
-      } else {
-        const opts = optStr.split(';');
-        opts.forEach(opt => {
-          if (!opt) return;
-          const [key, ...rest] = opt.split(':');
-          const val = rest.join(':').trim().replace(/^'+|'+$/g, '');
-          if (!formatOptions[key.trim()]) formatOptions[key.trim()] = val;
-          if (val === 'false') formatOptions[key.trim()] = false;
-          if (val === 'true') formatOptions[key.trim()] = true;
-          if (!isNaN(val)) formatOptions[key.trim()] = parseInt(val, 10);
-        });
-      }
-    }
-    return {
-      formatName,
-      formatOptions
-    };
-  }
-  function createCachedFormatter(fn) {
-    const cache = {};
-    return function invokeFormatter(val, lng, options) {
-      const key = lng + JSON.stringify(options);
-      let formatter = cache[key];
-      if (!formatter) {
-        formatter = fn(getCleanedCode(lng), options);
-        cache[key] = formatter;
-      }
-      return formatter(val);
-    };
-  }
-  class Formatter {
-    constructor() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      this.logger = baseLogger.create('formatter');
-      this.options = options;
-      this.formats = {
-        number: createCachedFormatter((lng, opt) => {
-          const formatter = new Intl.NumberFormat(lng, {
-            ...opt
-          });
-          return val => formatter.format(val);
-        }),
-        currency: createCachedFormatter((lng, opt) => {
-          const formatter = new Intl.NumberFormat(lng, {
-            ...opt,
-            style: 'currency'
-          });
-          return val => formatter.format(val);
-        }),
-        datetime: createCachedFormatter((lng, opt) => {
-          const formatter = new Intl.DateTimeFormat(lng, {
-            ...opt
-          });
-          return val => formatter.format(val);
-        }),
-        relativetime: createCachedFormatter((lng, opt) => {
-          const formatter = new Intl.RelativeTimeFormat(lng, {
-            ...opt
-          });
-          return val => formatter.format(val, opt.range || 'day');
-        }),
-        list: createCachedFormatter((lng, opt) => {
-          const formatter = new Intl.ListFormat(lng, {
-            ...opt
-          });
-          return val => formatter.format(val);
-        })
-      };
-      this.init(options);
-    }
-    init(services) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-        interpolation: {}
-      };
-      const iOpts = options.interpolation;
-      this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
-    }
-    add(name, fc) {
-      this.formats[name.toLowerCase().trim()] = fc;
-    }
-    addCached(name, fc) {
-      this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
-    }
-    format(value, format, lng) {
-      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-      const formats = format.split(this.formatSeparator);
-      const result = formats.reduce((mem, f) => {
-        const {
-          formatName,
-          formatOptions
-        } = parseFormatStr(f);
-        if (this.formats[formatName]) {
-          let formatted = mem;
-          try {
-            const valOptions = options && options.formatParams && options.formatParams[options.interpolationkey] || {};
-            const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
-            formatted = this.formats[formatName](mem, l, {
-              ...formatOptions,
-              ...options,
-              ...valOptions
-            });
-          } catch (error) {
-            this.logger.warn(error);
-          }
-          return formatted;
-        } else {
-          this.logger.warn(`there was no format function for ${formatName}`);
-        }
-        return mem;
-      }, value);
-      return result;
-    }
-  }
-
-  function removePending(q, name) {
-    if (q.pending[name] !== undefined) {
-      delete q.pending[name];
-      q.pendingCount--;
-    }
-  }
-  class Connector extends EventEmitter {
-    constructor(backend, store, services) {
-      let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-      super();
-      this.backend = backend;
-      this.store = store;
-      this.services = services;
-      this.languageUtils = services.languageUtils;
-      this.options = options;
-      this.logger = baseLogger.create('backendConnector');
-      this.waitingReads = [];
-      this.maxParallelReads = options.maxParallelReads || 10;
-      this.readingCalls = 0;
-      this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
-      this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
-      this.state = {};
-      this.queue = [];
-      if (this.backend && this.backend.init) {
-        this.backend.init(services, options.backend, options);
-      }
-    }
-    queueLoad(languages, namespaces, options, callback) {
-      const toLoad = {};
-      const pending = {};
-      const toLoadLanguages = {};
-      const toLoadNamespaces = {};
-      languages.forEach(lng => {
-        let hasAllNamespaces = true;
-        namespaces.forEach(ns => {
-          const name = `${lng}|${ns}`;
-          if (!options.reload && this.store.hasResourceBundle(lng, ns)) {
-            this.state[name] = 2;
-          } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {
-            if (pending[name] === undefined) pending[name] = true;
-          } else {
-            this.state[name] = 1;
-            hasAllNamespaces = false;
-            if (pending[name] === undefined) pending[name] = true;
-            if (toLoad[name] === undefined) toLoad[name] = true;
-            if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;
-          }
-        });
-        if (!hasAllNamespaces) toLoadLanguages[lng] = true;
-      });
-      if (Object.keys(toLoad).length || Object.keys(pending).length) {
-        this.queue.push({
-          pending,
-          pendingCount: Object.keys(pending).length,
-          loaded: {},
-          errors: [],
-          callback
-        });
-      }
-      return {
-        toLoad: Object.keys(toLoad),
-        pending: Object.keys(pending),
-        toLoadLanguages: Object.keys(toLoadLanguages),
-        toLoadNamespaces: Object.keys(toLoadNamespaces)
-      };
-    }
-    loaded(name, err, data) {
-      const s = name.split('|');
-      const lng = s[0];
-      const ns = s[1];
-      if (err) this.emit('failedLoading', lng, ns, err);
-      if (data) {
-        this.store.addResourceBundle(lng, ns, data);
-      }
-      this.state[name] = err ? -1 : 2;
-      const loaded = {};
-      this.queue.forEach(q => {
-        pushPath(q.loaded, [lng], ns);
-        removePending(q, name);
-        if (err) q.errors.push(err);
-        if (q.pendingCount === 0 && !q.done) {
-          Object.keys(q.loaded).forEach(l => {
-            if (!loaded[l]) loaded[l] = {};
-            const loadedKeys = q.loaded[l];
-            if (loadedKeys.length) {
-              loadedKeys.forEach(n => {
-                if (loaded[l][n] === undefined) loaded[l][n] = true;
-              });
-            }
-          });
-          q.done = true;
-          if (q.errors.length) {
-            q.callback(q.errors);
-          } else {
-            q.callback();
-          }
-        }
-      });
-      this.emit('loaded', loaded);
-      this.queue = this.queue.filter(q => !q.done);
-    }
-    read(lng, ns, fcName) {
-      let tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
-      let wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;
-      let callback = arguments.length > 5 ? arguments[5] : undefined;
-      if (!lng.length) return callback(null, {});
-      if (this.readingCalls >= this.maxParallelReads) {
-        this.waitingReads.push({
-          lng,
-          ns,
-          fcName,
-          tried,
-          wait,
-          callback
-        });
-        return;
-      }
-      this.readingCalls++;
-      const resolver = (err, data) => {
-        this.readingCalls--;
-        if (this.waitingReads.length > 0) {
-          const next = this.waitingReads.shift();
-          this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
-        }
-        if (err && data && tried < this.maxRetries) {
-          setTimeout(() => {
-            this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);
-          }, wait);
-          return;
-        }
-        callback(err, data);
-      };
-      const fc = this.backend[fcName].bind(this.backend);
-      if (fc.length === 2) {
-        try {
-          const r = fc(lng, ns);
-          if (r && typeof r.then === 'function') {
-            r.then(data => resolver(null, data)).catch(resolver);
-          } else {
-            resolver(null, r);
-          }
-        } catch (err) {
-          resolver(err);
-        }
-        return;
-      }
-      return fc(lng, ns, resolver);
-    }
-    prepareLoading(languages, namespaces) {
-      let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      let callback = arguments.length > 3 ? arguments[3] : undefined;
-      if (!this.backend) {
-        this.logger.warn('No backend was added via i18next.use. Will not load resources.');
-        return callback && callback();
-      }
-      if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);
-      if (typeof namespaces === 'string') namespaces = [namespaces];
-      const toLoad = this.queueLoad(languages, namespaces, options, callback);
-      if (!toLoad.toLoad.length) {
-        if (!toLoad.pending.length) callback();
-        return null;
-      }
-      toLoad.toLoad.forEach(name => {
-        this.loadOne(name);
-      });
-    }
-    load(languages, namespaces, callback) {
-      this.prepareLoading(languages, namespaces, {}, callback);
-    }
-    reload(languages, namespaces, callback) {
-      this.prepareLoading(languages, namespaces, {
-        reload: true
-      }, callback);
-    }
-    loadOne(name) {
-      let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
-      const s = name.split('|');
-      const lng = s[0];
-      const ns = s[1];
-      this.read(lng, ns, 'read', undefined, undefined, (err, data) => {
-        if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);
-        if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);
-        this.loaded(name, err, data);
-      });
-    }
-    saveMissing(languages, namespace, key, fallbackValue, isUpdate) {
-      let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
-      let clb = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : () => {};
-      if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
-        this.logger.warn(`did not save key "${key}" as the namespace "${namespace}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
-        return;
-      }
-      if (key === undefined || key === null || key === '') return;
-      if (this.backend && this.backend.create) {
-        const opts = {
-          ...options,
-          isUpdate
-        };
-        const fc = this.backend.create.bind(this.backend);
-        if (fc.length < 6) {
-          try {
-            let r;
-            if (fc.length === 5) {
-              r = fc(languages, namespace, key, fallbackValue, opts);
-            } else {
-              r = fc(languages, namespace, key, fallbackValue);
-            }
-            if (r && typeof r.then === 'function') {
-              r.then(data => clb(null, data)).catch(clb);
-            } else {
-              clb(null, r);
-            }
-          } catch (err) {
-            clb(err);
-          }
-        } else {
-          fc(languages, namespace, key, fallbackValue, clb, opts);
-        }
-      }
-      if (!languages || !languages[0]) return;
-      this.store.addResource(languages[0], namespace, key, fallbackValue);
-    }
-  }
-
-  function get() {
-    return {
-      debug: false,
-      initImmediate: true,
-      ns: ['translation'],
-      defaultNS: ['translation'],
-      fallbackLng: ['dev'],
-      fallbackNS: false,
-      supportedLngs: false,
-      nonExplicitSupportedLngs: false,
-      load: 'all',
-      preload: false,
-      simplifyPluralSuffix: true,
-      keySeparator: '.',
-      nsSeparator: ':',
-      pluralSeparator: '_',
-      contextSeparator: '_',
-      partialBundledLanguages: false,
-      saveMissing: false,
-      updateMissing: false,
-      saveMissingTo: 'fallback',
-      saveMissingPlurals: true,
-      missingKeyHandler: false,
-      missingInterpolationHandler: false,
-      postProcess: false,
-      postProcessPassResolved: false,
-      returnNull: false,
-      returnEmptyString: true,
-      returnObjects: false,
-      joinArrays: false,
-      returnedObjectHandler: false,
-      parseMissingKeyHandler: false,
-      appendNamespaceToMissingKey: false,
-      appendNamespaceToCIMode: false,
-      overloadTranslationOptionHandler: function handle(args) {
-        let ret = {};
-        if (typeof args[1] === 'object') ret = args[1];
-        if (typeof args[1] === 'string') ret.defaultValue = args[1];
-        if (typeof args[2] === 'string') ret.tDescription = args[2];
-        if (typeof args[2] === 'object' || typeof args[3] === 'object') {
-          const options = args[3] || args[2];
-          Object.keys(options).forEach(key => {
-            ret[key] = options[key];
-          });
-        }
-        return ret;
-      },
-      interpolation: {
-        escapeValue: true,
-        format: (value, format, lng, options) => value,
-        prefix: '{{',
-        suffix: '}}',
-        formatSeparator: ',',
-        unescapePrefix: '-',
-        nestingPrefix: '$t(',
-        nestingSuffix: ')',
-        nestingOptionsSeparator: ',',
-        maxReplaces: 1000,
-        skipOnVariables: true
-      }
-    };
-  }
-  function transformOptions(options) {
-    if (typeof options.ns === 'string') options.ns = [options.ns];
-    if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
-    if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
-    if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {
-      options.supportedLngs = options.supportedLngs.concat(['cimode']);
-    }
-    return options;
-  }
-
-  function noop() {}
-  function bindMemberFunctions(inst) {
-    const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
-    mems.forEach(mem => {
-      if (typeof inst[mem] === 'function') {
-        inst[mem] = inst[mem].bind(inst);
-      }
-    });
-  }
-  class I18n extends EventEmitter {
-    constructor() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      let callback = arguments.length > 1 ? arguments[1] : undefined;
-      super();
-      this.options = transformOptions(options);
-      this.services = {};
-      this.logger = baseLogger;
-      this.modules = {
-        external: []
-      };
-      bindMemberFunctions(this);
-      if (callback && !this.isInitialized && !options.isClone) {
-        if (!this.options.initImmediate) {
-          this.init(options, callback);
-          return this;
-        }
-        setTimeout(() => {
-          this.init(options, callback);
-        }, 0);
-      }
-    }
-    init() {
-      var _this = this;
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      let callback = arguments.length > 1 ? arguments[1] : undefined;
-      if (typeof options === 'function') {
-        callback = options;
-        options = {};
-      }
-      if (!options.defaultNS && options.defaultNS !== false && options.ns) {
-        if (typeof options.ns === 'string') {
-          options.defaultNS = options.ns;
-        } else if (options.ns.indexOf('translation') < 0) {
-          options.defaultNS = options.ns[0];
-        }
-      }
-      const defOpts = get();
-      this.options = {
-        ...defOpts,
-        ...this.options,
-        ...transformOptions(options)
-      };
-      if (this.options.compatibilityAPI !== 'v1') {
-        this.options.interpolation = {
-          ...defOpts.interpolation,
-          ...this.options.interpolation
-        };
-      }
-      if (options.keySeparator !== undefined) {
-        this.options.userDefinedKeySeparator = options.keySeparator;
-      }
-      if (options.nsSeparator !== undefined) {
-        this.options.userDefinedNsSeparator = options.nsSeparator;
-      }
-      function createClassOnDemand(ClassOrObject) {
-        if (!ClassOrObject) return null;
-        if (typeof ClassOrObject === 'function') return new ClassOrObject();
-        return ClassOrObject;
-      }
-      if (!this.options.isClone) {
-        if (this.modules.logger) {
-          baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
-        } else {
-          baseLogger.init(null, this.options);
-        }
-        let formatter;
-        if (this.modules.formatter) {
-          formatter = this.modules.formatter;
-        } else if (typeof Intl !== 'undefined') {
-          formatter = Formatter;
-        }
-        const lu = new LanguageUtil(this.options);
-        this.store = new ResourceStore(this.options.resources, this.options);
-        const s = this.services;
-        s.logger = baseLogger;
-        s.resourceStore = this.store;
-        s.languageUtils = lu;
-        s.pluralResolver = new PluralResolver(lu, {
-          prepend: this.options.pluralSeparator,
-          compatibilityJSON: this.options.compatibilityJSON,
-          simplifyPluralSuffix: this.options.simplifyPluralSuffix
-        });
-        if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
-          s.formatter = createClassOnDemand(formatter);
-          s.formatter.init(s, this.options);
-          this.options.interpolation.format = s.formatter.format.bind(s.formatter);
-        }
-        s.interpolator = new Interpolator(this.options);
-        s.utils = {
-          hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
-        };
-        s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
-        s.backendConnector.on('*', function (event) {
-          for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-            args[_key - 1] = arguments[_key];
-          }
-          _this.emit(event, ...args);
-        });
-        if (this.modules.languageDetector) {
-          s.languageDetector = createClassOnDemand(this.modules.languageDetector);
-          if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);
-        }
-        if (this.modules.i18nFormat) {
-          s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
-          if (s.i18nFormat.init) s.i18nFormat.init(this);
-        }
-        this.translator = new Translator(this.services, this.options);
-        this.translator.on('*', function (event) {
-          for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
-            args[_key2 - 1] = arguments[_key2];
-          }
-          _this.emit(event, ...args);
-        });
-        this.modules.external.forEach(m => {
-          if (m.init) m.init(this);
-        });
-      }
-      this.format = this.options.interpolation.format;
-      if (!callback) callback = noop;
-      if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
-        const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
-        if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
-      }
-      if (!this.services.languageDetector && !this.options.lng) {
-        this.logger.warn('init: no languageDetector is used and no lng is defined');
-      }
-      const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
-      storeApi.forEach(fcName => {
-        this[fcName] = function () {
-          return _this.store[fcName](...arguments);
-        };
-      });
-      const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
-      storeApiChained.forEach(fcName => {
-        this[fcName] = function () {
-          _this.store[fcName](...arguments);
-          return _this;
-        };
-      });
-      const deferred = defer();
-      const load = () => {
-        const finish = (err, t) => {
-          if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');
-          this.isInitialized = true;
-          if (!this.options.isClone) this.logger.log('initialized', this.options);
-          this.emit('initialized', this.options);
-          deferred.resolve(t);
-          callback(err, t);
-        };
-        if (this.languages && this.options.compatibilityAPI !== 'v1' && !this.isInitialized) return finish(null, this.t.bind(this));
-        this.changeLanguage(this.options.lng, finish);
-      };
-      if (this.options.resources || !this.options.initImmediate) {
-        load();
-      } else {
-        setTimeout(load, 0);
-      }
-      return deferred;
-    }
-    loadResources(language) {
-      let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
-      let usedCallback = callback;
-      const usedLng = typeof language === 'string' ? language : this.language;
-      if (typeof language === 'function') usedCallback = language;
-      if (!this.options.resources || this.options.partialBundledLanguages) {
-        if (usedLng && usedLng.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
-        const toLoad = [];
-        const append = lng => {
-          if (!lng) return;
-          if (lng === 'cimode') return;
-          const lngs = this.services.languageUtils.toResolveHierarchy(lng);
-          lngs.forEach(l => {
-            if (l === 'cimode') return;
-            if (toLoad.indexOf(l) < 0) toLoad.push(l);
-          });
-        };
-        if (!usedLng) {
-          const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
-          fallbacks.forEach(l => append(l));
-        } else {
-          append(usedLng);
-        }
-        if (this.options.preload) {
-          this.options.preload.forEach(l => append(l));
-        }
-        this.services.backendConnector.load(toLoad, this.options.ns, e => {
-          if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);
-          usedCallback(e);
-        });
-      } else {
-        usedCallback(null);
-      }
-    }
-    reloadResources(lngs, ns, callback) {
-      const deferred = defer();
-      if (!lngs) lngs = this.languages;
-      if (!ns) ns = this.options.ns;
-      if (!callback) callback = noop;
-      this.services.backendConnector.reload(lngs, ns, err => {
-        deferred.resolve();
-        callback(err);
-      });
-      return deferred;
-    }
-    use(module) {
-      if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
-      if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
-      if (module.type === 'backend') {
-        this.modules.backend = module;
-      }
-      if (module.type === 'logger' || module.log && module.warn && module.error) {
-        this.modules.logger = module;
-      }
-      if (module.type === 'languageDetector') {
-        this.modules.languageDetector = module;
-      }
-      if (module.type === 'i18nFormat') {
-        this.modules.i18nFormat = module;
-      }
-      if (module.type === 'postProcessor') {
-        postProcessor.addPostProcessor(module);
-      }
-      if (module.type === 'formatter') {
-        this.modules.formatter = module;
-      }
-      if (module.type === '3rdParty') {
-        this.modules.external.push(module);
-      }
-      return this;
-    }
-    setResolvedLanguage(l) {
-      if (!l || !this.languages) return;
-      if (['cimode', 'dev'].indexOf(l) > -1) return;
-      for (let li = 0; li < this.languages.length; li++) {
-        const lngInLngs = this.languages[li];
-        if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;
-        if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
-          this.resolvedLanguage = lngInLngs;
-          break;
-        }
-      }
-    }
-    changeLanguage(lng, callback) {
-      var _this2 = this;
-      this.isLanguageChangingTo = lng;
-      const deferred = defer();
-      this.emit('languageChanging', lng);
-      const setLngProps = l => {
-        this.language = l;
-        this.languages = this.services.languageUtils.toResolveHierarchy(l);
-        this.resolvedLanguage = undefined;
-        this.setResolvedLanguage(l);
-      };
-      const done = (err, l) => {
-        if (l) {
-          setLngProps(l);
-          this.translator.changeLanguage(l);
-          this.isLanguageChangingTo = undefined;
-          this.emit('languageChanged', l);
-          this.logger.log('languageChanged', l);
-        } else {
-          this.isLanguageChangingTo = undefined;
-        }
-        deferred.resolve(function () {
-          return _this2.t(...arguments);
-        });
-        if (callback) callback(err, function () {
-          return _this2.t(...arguments);
-        });
-      };
-      const setLng = lngs => {
-        if (!lng && !lngs && this.services.languageDetector) lngs = [];
-        const l = typeof lngs === 'string' ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);
-        if (l) {
-          if (!this.language) {
-            setLngProps(l);
-          }
-          if (!this.translator.language) this.translator.changeLanguage(l);
-          if (this.services.languageDetector && this.services.languageDetector.cacheUserLanguage) this.services.languageDetector.cacheUserLanguage(l);
-        }
-        this.loadResources(l, err => {
-          done(err, l);
-        });
-      };
-      if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
-        setLng(this.services.languageDetector.detect());
-      } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
-        if (this.services.languageDetector.detect.length === 0) {
-          this.services.languageDetector.detect().then(setLng);
-        } else {
-          this.services.languageDetector.detect(setLng);
-        }
-      } else {
-        setLng(lng);
-      }
-      return deferred;
-    }
-    getFixedT(lng, ns, keyPrefix) {
-      var _this3 = this;
-      const fixedT = function (key, opts) {
-        let options;
-        if (typeof opts !== 'object') {
-          for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
-            rest[_key3 - 2] = arguments[_key3];
-          }
-          options = _this3.options.overloadTranslationOptionHandler([key, opts].concat(rest));
-        } else {
-          options = {
-            ...opts
-          };
-        }
-        options.lng = options.lng || fixedT.lng;
-        options.lngs = options.lngs || fixedT.lngs;
-        options.ns = options.ns || fixedT.ns;
-        options.keyPrefix = options.keyPrefix || keyPrefix || fixedT.keyPrefix;
-        const keySeparator = _this3.options.keySeparator || '.';
-        let resultKey;
-        if (options.keyPrefix && Array.isArray(key)) {
-          resultKey = key.map(k => `${options.keyPrefix}${keySeparator}${k}`);
-        } else {
-          resultKey = options.keyPrefix ? `${options.keyPrefix}${keySeparator}${key}` : key;
-        }
-        return _this3.t(resultKey, options);
-      };
-      if (typeof lng === 'string') {
-        fixedT.lng = lng;
-      } else {
-        fixedT.lngs = lng;
-      }
-      fixedT.ns = ns;
-      fixedT.keyPrefix = keyPrefix;
-      return fixedT;
-    }
-    t() {
-      return this.translator && this.translator.translate(...arguments);
-    }
-    exists() {
-      return this.translator && this.translator.exists(...arguments);
-    }
-    setDefaultNamespace(ns) {
-      this.options.defaultNS = ns;
-    }
-    hasLoadedNamespace(ns) {
-      let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      if (!this.isInitialized) {
-        this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
-        return false;
-      }
-      if (!this.languages || !this.languages.length) {
-        this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
-        return false;
-      }
-      const lng = options.lng || this.resolvedLanguage || this.languages[0];
-      const fallbackLng = this.options ? this.options.fallbackLng : false;
-      const lastLng = this.languages[this.languages.length - 1];
-      if (lng.toLowerCase() === 'cimode') return true;
-      const loadNotPending = (l, n) => {
-        const loadState = this.services.backendConnector.state[`${l}|${n}`];
-        return loadState === -1 || loadState === 2;
-      };
-      if (options.precheck) {
-        const preResult = options.precheck(this, loadNotPending);
-        if (preResult !== undefined) return preResult;
-      }
-      if (this.hasResourceBundle(lng, ns)) return true;
-      if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
-      if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
-      return false;
-    }
-    loadNamespaces(ns, callback) {
-      const deferred = defer();
-      if (!this.options.ns) {
-        if (callback) callback();
-        return Promise.resolve();
-      }
-      if (typeof ns === 'string') ns = [ns];
-      ns.forEach(n => {
-        if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);
-      });
-      this.loadResources(err => {
-        deferred.resolve();
-        if (callback) callback(err);
-      });
-      return deferred;
-    }
-    loadLanguages(lngs, callback) {
-      const deferred = defer();
-      if (typeof lngs === 'string') lngs = [lngs];
-      const preloaded = this.options.preload || [];
-      const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0);
-      if (!newLngs.length) {
-        if (callback) callback();
-        return Promise.resolve();
-      }
-      this.options.preload = preloaded.concat(newLngs);
-      this.loadResources(err => {
-        deferred.resolve();
-        if (callback) callback(err);
-      });
-      return deferred;
-    }
-    dir(lng) {
-      if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);
-      if (!lng) return 'rtl';
-      const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
-      const languageUtils = this.services && this.services.languageUtils || new LanguageUtil(get());
-      return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
-    }
-    static createInstance() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      let callback = arguments.length > 1 ? arguments[1] : undefined;
-      return new I18n(options, callback);
-    }
-    cloneInstance() {
-      let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-      let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
-      const forkResourceStore = options.forkResourceStore;
-      if (forkResourceStore) delete options.forkResourceStore;
-      const mergedOptions = {
-        ...this.options,
-        ...options,
-        ...{
-          isClone: true
-        }
-      };
-      const clone = new I18n(mergedOptions);
-      if (options.debug !== undefined || options.prefix !== undefined) {
-        clone.logger = clone.logger.clone(options);
-      }
-      const membersToCopy = ['store', 'services', 'language'];
-      membersToCopy.forEach(m => {
-        clone[m] = this[m];
-      });
-      clone.services = {
-        ...this.services
-      };
-      clone.services.utils = {
-        hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
-      };
-      if (forkResourceStore) {
-        clone.store = new ResourceStore(this.store.data, mergedOptions);
-        clone.services.resourceStore = clone.store;
-      }
-      clone.translator = new Translator(clone.services, mergedOptions);
-      clone.translator.on('*', function (event) {
-        for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
-          args[_key4 - 1] = arguments[_key4];
-        }
-        clone.emit(event, ...args);
-      });
-      clone.init(mergedOptions, callback);
-      clone.translator.options = mergedOptions;
-      clone.translator.backendConnector.services.utils = {
-        hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
-      };
-      return clone;
-    }
-    toJSON() {
-      return {
-        options: this.options,
-        store: this.store,
-        language: this.language,
-        languages: this.languages,
-        resolvedLanguage: this.resolvedLanguage
-      };
-    }
-  }
-  const instance = I18n.createInstance();
-  instance.createInstance = I18n.createInstance;
-
-  return instance;
-
-}));

文件差異過大導致無法顯示
+ 0 - 0
static/vendor/i18next/i18next.min.js


+ 0 - 420
static/vendor/i18next/i18nextBrowserLanguageDetector.js

@@ -1,420 +0,0 @@
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
-  typeof define === 'function' && define.amd ? define(factory) :
-  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.i18nextBrowserLanguageDetector = factory());
-})(this, (function () { 'use strict';
-
-  function _classCallCheck(instance, Constructor) {
-    if (!(instance instanceof Constructor)) {
-      throw new TypeError("Cannot call a class as a function");
-    }
-  }
-
-  function _typeof(o) {
-    "@babel/helpers - typeof";
-
-    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
-      return typeof o;
-    } : function (o) {
-      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
-    }, _typeof(o);
-  }
-
-  function _toPrimitive(input, hint) {
-    if (_typeof(input) !== "object" || input === null) return input;
-    var prim = input[Symbol.toPrimitive];
-    if (prim !== undefined) {
-      var res = prim.call(input, hint || "default");
-      if (_typeof(res) !== "object") return res;
-      throw new TypeError("@@toPrimitive must return a primitive value.");
-    }
-    return (hint === "string" ? String : Number)(input);
-  }
-
-  function _toPropertyKey(arg) {
-    var key = _toPrimitive(arg, "string");
-    return _typeof(key) === "symbol" ? key : String(key);
-  }
-
-  function _defineProperties(target, props) {
-    for (var i = 0; i < props.length; i++) {
-      var descriptor = props[i];
-      descriptor.enumerable = descriptor.enumerable || false;
-      descriptor.configurable = true;
-      if ("value" in descriptor) descriptor.writable = true;
-      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
-    }
-  }
-  function _createClass(Constructor, protoProps, staticProps) {
-    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
-    if (staticProps) _defineProperties(Constructor, staticProps);
-    Object.defineProperty(Constructor, "prototype", {
-      writable: false
-    });
-    return Constructor;
-  }
-
-  var arr = [];
-  var each = arr.forEach;
-  var slice = arr.slice;
-  function defaults(obj) {
-    each.call(slice.call(arguments, 1), function (source) {
-      if (source) {
-        for (var prop in source) {
-          if (obj[prop] === undefined) obj[prop] = source[prop];
-        }
-      }
-    });
-    return obj;
-  }
-
-  // eslint-disable-next-line no-control-regex
-  var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
-  var serializeCookie = function serializeCookie(name, val, options) {
-    var opt = options || {};
-    opt.path = opt.path || '/';
-    var value = encodeURIComponent(val);
-    var str = "".concat(name, "=").concat(value);
-    if (opt.maxAge > 0) {
-      var maxAge = opt.maxAge - 0;
-      if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
-      str += "; Max-Age=".concat(Math.floor(maxAge));
-    }
-    if (opt.domain) {
-      if (!fieldContentRegExp.test(opt.domain)) {
-        throw new TypeError('option domain is invalid');
-      }
-      str += "; Domain=".concat(opt.domain);
-    }
-    if (opt.path) {
-      if (!fieldContentRegExp.test(opt.path)) {
-        throw new TypeError('option path is invalid');
-      }
-      str += "; Path=".concat(opt.path);
-    }
-    if (opt.expires) {
-      if (typeof opt.expires.toUTCString !== 'function') {
-        throw new TypeError('option expires is invalid');
-      }
-      str += "; Expires=".concat(opt.expires.toUTCString());
-    }
-    if (opt.httpOnly) str += '; HttpOnly';
-    if (opt.secure) str += '; Secure';
-    if (opt.sameSite) {
-      var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
-      switch (sameSite) {
-        case true:
-          str += '; SameSite=Strict';
-          break;
-        case 'lax':
-          str += '; SameSite=Lax';
-          break;
-        case 'strict':
-          str += '; SameSite=Strict';
-          break;
-        case 'none':
-          str += '; SameSite=None';
-          break;
-        default:
-          throw new TypeError('option sameSite is invalid');
-      }
-    }
-    return str;
-  };
-  var cookie = {
-    create: function create(name, value, minutes, domain) {
-      var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
-        path: '/',
-        sameSite: 'strict'
-      };
-      if (minutes) {
-        cookieOptions.expires = new Date();
-        cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
-      }
-      if (domain) cookieOptions.domain = domain;
-      document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
-    },
-    read: function read(name) {
-      var nameEQ = "".concat(name, "=");
-      var ca = document.cookie.split(';');
-      for (var i = 0; i < ca.length; i++) {
-        var c = ca[i];
-        while (c.charAt(0) === ' ') c = c.substring(1, c.length);
-        if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
-      }
-      return null;
-    },
-    remove: function remove(name) {
-      this.create(name, '', -1);
-    }
-  };
-  var cookie$1 = {
-    name: 'cookie',
-    lookup: function lookup(options) {
-      var found;
-      if (options.lookupCookie && typeof document !== 'undefined') {
-        var c = cookie.read(options.lookupCookie);
-        if (c) found = c;
-      }
-      return found;
-    },
-    cacheUserLanguage: function cacheUserLanguage(lng, options) {
-      if (options.lookupCookie && typeof document !== 'undefined') {
-        cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);
-      }
-    }
-  };
-
-  var querystring = {
-    name: 'querystring',
-    lookup: function lookup(options) {
-      var found;
-      if (typeof window !== 'undefined') {
-        var search = window.location.search;
-        if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {
-          search = window.location.hash.substring(window.location.hash.indexOf('?'));
-        }
-        var query = search.substring(1);
-        var params = query.split('&');
-        for (var i = 0; i < params.length; i++) {
-          var pos = params[i].indexOf('=');
-          if (pos > 0) {
-            var key = params[i].substring(0, pos);
-            if (key === options.lookupQuerystring) {
-              found = params[i].substring(pos + 1);
-            }
-          }
-        }
-      }
-      return found;
-    }
-  };
-
-  var hasLocalStorageSupport = null;
-  var localStorageAvailable = function localStorageAvailable() {
-    if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
-    try {
-      hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
-      var testKey = 'i18next.translate.boo';
-      window.localStorage.setItem(testKey, 'foo');
-      window.localStorage.removeItem(testKey);
-    } catch (e) {
-      hasLocalStorageSupport = false;
-    }
-    return hasLocalStorageSupport;
-  };
-  var localStorage = {
-    name: 'localStorage',
-    lookup: function lookup(options) {
-      var found;
-      if (options.lookupLocalStorage && localStorageAvailable()) {
-        var lng = window.localStorage.getItem(options.lookupLocalStorage);
-        if (lng) found = lng;
-      }
-      return found;
-    },
-    cacheUserLanguage: function cacheUserLanguage(lng, options) {
-      if (options.lookupLocalStorage && localStorageAvailable()) {
-        window.localStorage.setItem(options.lookupLocalStorage, lng);
-      }
-    }
-  };
-
-  var hasSessionStorageSupport = null;
-  var sessionStorageAvailable = function sessionStorageAvailable() {
-    if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
-    try {
-      hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;
-      var testKey = 'i18next.translate.boo';
-      window.sessionStorage.setItem(testKey, 'foo');
-      window.sessionStorage.removeItem(testKey);
-    } catch (e) {
-      hasSessionStorageSupport = false;
-    }
-    return hasSessionStorageSupport;
-  };
-  var sessionStorage = {
-    name: 'sessionStorage',
-    lookup: function lookup(options) {
-      var found;
-      if (options.lookupSessionStorage && sessionStorageAvailable()) {
-        var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
-        if (lng) found = lng;
-      }
-      return found;
-    },
-    cacheUserLanguage: function cacheUserLanguage(lng, options) {
-      if (options.lookupSessionStorage && sessionStorageAvailable()) {
-        window.sessionStorage.setItem(options.lookupSessionStorage, lng);
-      }
-    }
-  };
-
-  var navigator$1 = {
-    name: 'navigator',
-    lookup: function lookup(options) {
-      var found = [];
-      if (typeof navigator !== 'undefined') {
-        if (navigator.languages) {
-          // chrome only; not an array, so can't use .push.apply instead of iterating
-          for (var i = 0; i < navigator.languages.length; i++) {
-            found.push(navigator.languages[i]);
-          }
-        }
-        if (navigator.userLanguage) {
-          found.push(navigator.userLanguage);
-        }
-        if (navigator.language) {
-          found.push(navigator.language);
-        }
-      }
-      return found.length > 0 ? found : undefined;
-    }
-  };
-
-  var htmlTag = {
-    name: 'htmlTag',
-    lookup: function lookup(options) {
-      var found;
-      var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
-      if (htmlTag && typeof htmlTag.getAttribute === 'function') {
-        found = htmlTag.getAttribute('lang');
-      }
-      return found;
-    }
-  };
-
-  var path = {
-    name: 'path',
-    lookup: function lookup(options) {
-      var found;
-      if (typeof window !== 'undefined') {
-        var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
-        if (language instanceof Array) {
-          if (typeof options.lookupFromPathIndex === 'number') {
-            if (typeof language[options.lookupFromPathIndex] !== 'string') {
-              return undefined;
-            }
-            found = language[options.lookupFromPathIndex].replace('/', '');
-          } else {
-            found = language[0].replace('/', '');
-          }
-        }
-      }
-      return found;
-    }
-  };
-
-  var subdomain = {
-    name: 'subdomain',
-    lookup: function lookup(options) {
-      // If given get the subdomain index else 1
-      var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
-      // get all matches if window.location. is existing
-      // first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
-      // is the hostname no public domain get the or option of localhost
-      var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
-
-      // if there is no match (null) return undefined
-      if (!language) return undefined;
-      // return the given group match
-      return language[lookupFromSubdomainIndex];
-    }
-  };
-
-  function getDefaults() {
-    return {
-      order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
-      lookupQuerystring: 'lng',
-      lookupCookie: 'i18next',
-      lookupLocalStorage: 'i18nextLng',
-      lookupSessionStorage: 'i18nextLng',
-      // cache user language
-      caches: ['localStorage'],
-      excludeCacheFor: ['cimode'],
-      // cookieMinutes: 10,
-      // cookieDomain: 'myDomain'
-
-      convertDetectedLanguage: function convertDetectedLanguage(l) {
-        return l;
-      }
-    };
-  }
-  var Browser = /*#__PURE__*/function () {
-    function Browser(services) {
-      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      _classCallCheck(this, Browser);
-      this.type = 'languageDetector';
-      this.detectors = {};
-      this.init(services, options);
-    }
-    _createClass(Browser, [{
-      key: "init",
-      value: function init(services) {
-        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-        var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-        this.services = services || {
-          languageUtils: {}
-        }; // this way the language detector can be used without i18next
-        this.options = defaults(options, this.options || {}, getDefaults());
-        if (typeof this.options.convertDetectedLanguage === 'string' && this.options.convertDetectedLanguage.indexOf('15897') > -1) {
-          this.options.convertDetectedLanguage = function (l) {
-            return l.replace('-', '_');
-          };
-        }
-
-        // backwards compatibility
-        if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
-        this.i18nOptions = i18nOptions;
-        this.addDetector(cookie$1);
-        this.addDetector(querystring);
-        this.addDetector(localStorage);
-        this.addDetector(sessionStorage);
-        this.addDetector(navigator$1);
-        this.addDetector(htmlTag);
-        this.addDetector(path);
-        this.addDetector(subdomain);
-      }
-    }, {
-      key: "addDetector",
-      value: function addDetector(detector) {
-        this.detectors[detector.name] = detector;
-      }
-    }, {
-      key: "detect",
-      value: function detect(detectionOrder) {
-        var _this = this;
-        if (!detectionOrder) detectionOrder = this.options.order;
-        var detected = [];
-        detectionOrder.forEach(function (detectorName) {
-          if (_this.detectors[detectorName]) {
-            var lookup = _this.detectors[detectorName].lookup(_this.options);
-            if (lookup && typeof lookup === 'string') lookup = [lookup];
-            if (lookup) detected = detected.concat(lookup);
-          }
-        });
-        detected = detected.map(function (d) {
-          return _this.options.convertDetectedLanguage(d);
-        });
-        if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
-        return detected.length > 0 ? detected[0] : null; // a little backward compatibility
-      }
-    }, {
-      key: "cacheUserLanguage",
-      value: function cacheUserLanguage(lng, caches) {
-        var _this2 = this;
-        if (!caches) caches = this.options.caches;
-        if (!caches) return;
-        if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
-        caches.forEach(function (cacheName) {
-          if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
-        });
-      }
-    }]);
-    return Browser;
-  }();
-  Browser.type = 'languageDetector';
-
-  return Browser;
-
-}));

文件差異過大導致無法顯示
+ 0 - 0
static/vendor/i18next/i18nextBrowserLanguageDetector.min.js


+ 0 - 266
static/vendor/i18next/i18nextChainedBackend.js

@@ -1,266 +0,0 @@
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
-  typeof define === 'function' && define.amd ? define(factory) :
-  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.i18nextChainedBackend = factory());
-})(this, (function () { 'use strict';
-
-  function _classCallCheck(instance, Constructor) {
-    if (!(instance instanceof Constructor)) {
-      throw new TypeError("Cannot call a class as a function");
-    }
-  }
-
-  function _typeof(o) {
-    "@babel/helpers - typeof";
-
-    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
-      return typeof o;
-    } : function (o) {
-      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
-    }, _typeof(o);
-  }
-
-  function _toPrimitive(input, hint) {
-    if (_typeof(input) !== "object" || input === null) return input;
-    var prim = input[Symbol.toPrimitive];
-    if (prim !== undefined) {
-      var res = prim.call(input, hint || "default");
-      if (_typeof(res) !== "object") return res;
-      throw new TypeError("@@toPrimitive must return a primitive value.");
-    }
-    return (hint === "string" ? String : Number)(input);
-  }
-
-  function _toPropertyKey(arg) {
-    var key = _toPrimitive(arg, "string");
-    return _typeof(key) === "symbol" ? key : String(key);
-  }
-
-  function _defineProperties(target, props) {
-    for (var i = 0; i < props.length; i++) {
-      var descriptor = props[i];
-      descriptor.enumerable = descriptor.enumerable || false;
-      descriptor.configurable = true;
-      if ("value" in descriptor) descriptor.writable = true;
-      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
-    }
-  }
-  function _createClass(Constructor, protoProps, staticProps) {
-    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
-    if (staticProps) _defineProperties(Constructor, staticProps);
-    Object.defineProperty(Constructor, "prototype", {
-      writable: false
-    });
-    return Constructor;
-  }
-
-  var arr = [];
-  var each = arr.forEach;
-  var slice = arr.slice;
-  function defaults(obj) {
-    each.call(slice.call(arguments, 1), function (source) {
-      if (source) {
-        for (var prop in source) {
-          if (obj[prop] === undefined) obj[prop] = source[prop];
-        }
-      }
-    });
-    return obj;
-  }
-  function createClassOnDemand(ClassOrObject) {
-    if (!ClassOrObject) return null;
-    if (typeof ClassOrObject === 'function') return new ClassOrObject();
-    return ClassOrObject;
-  }
-
-  function getDefaults() {
-    return {
-      handleEmptyResourcesAsFailed: true,
-      cacheHitMode: 'none'
-      // reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000
-      // refreshExpirationTime: 60 * 60 * 1000
-    };
-  }
-
-  function handleCorrectReadFunction(backend, language, namespace, resolver) {
-    var fc = backend.read.bind(backend);
-    if (fc.length === 2) {
-      // no callback
-      try {
-        var r = fc(language, namespace);
-        if (r && typeof r.then === 'function') {
-          // promise
-          r.then(function (data) {
-            return resolver(null, data);
-          })["catch"](resolver);
-        } else {
-          // sync
-          resolver(null, r);
-        }
-      } catch (err) {
-        resolver(err);
-      }
-      return;
-    }
-
-    // normal with callback
-    fc(language, namespace, resolver);
-  }
-  var Backend = /*#__PURE__*/function () {
-    function Backend(services) {
-      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      var i18nextOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      _classCallCheck(this, Backend);
-      this.backends = [];
-      this.type = 'backend';
-      this.allOptions = i18nextOptions;
-      this.init(services, options);
-    }
-    _createClass(Backend, [{
-      key: "init",
-      value: function init(services) {
-        var _this = this;
-        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-        var i18nextOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-        this.services = services;
-        this.options = defaults(options, this.options || {}, getDefaults());
-        this.allOptions = i18nextOptions;
-        this.options.backends && this.options.backends.forEach(function (b, i) {
-          _this.backends[i] = _this.backends[i] || createClassOnDemand(b);
-          _this.backends[i].init(services, _this.options.backendOptions && _this.options.backendOptions[i] || {}, i18nextOptions);
-        });
-        if (this.services && this.options.reloadInterval) {
-          setInterval(function () {
-            return _this.reload();
-          }, this.options.reloadInterval);
-        }
-      }
-    }, {
-      key: "read",
-      value: function read(language, namespace, callback) {
-        var _this2 = this;
-        var bLen = this.backends.length;
-        var loadPosition = function loadPosition(pos) {
-          if (pos >= bLen) return callback(new Error('non of the backend loaded data', true)); // failed pass retry flag
-          var isLastBackend = pos === bLen - 1;
-          var lengthCheckAmount = _this2.options.handleEmptyResourcesAsFailed && !isLastBackend ? 0 : -1;
-          var backend = _this2.backends[pos];
-          if (backend.read) {
-            handleCorrectReadFunction(backend, language, namespace, function (err, data, savedAt) {
-              if (!err && data && Object.keys(data).length > lengthCheckAmount) {
-                callback(null, data, pos);
-                savePosition(pos - 1, data); // save one in front
-                if (backend.save && _this2.options.cacheHitMode && ['refresh', 'refreshAndUpdateStore'].indexOf(_this2.options.cacheHitMode) > -1) {
-                  if (savedAt && _this2.options.refreshExpirationTime && savedAt + _this2.options.refreshExpirationTime > Date.now()) return;
-                  var nextBackend = _this2.backends[pos + 1];
-                  if (nextBackend && nextBackend.read) {
-                    handleCorrectReadFunction(nextBackend, language, namespace, function (err, data) {
-                      if (err) return;
-                      if (!data) return;
-                      if (Object.keys(data).length <= lengthCheckAmount) return;
-                      savePosition(pos, data);
-                      if (_this2.options.cacheHitMode !== 'refreshAndUpdateStore') return;
-                      if (_this2.services && _this2.services.resourceStore) {
-                        _this2.services.resourceStore.addResourceBundle(language, namespace, data);
-                      }
-                    });
-                  }
-                }
-              } else {
-                loadPosition(pos + 1); // try load from next
-              }
-            });
-          } else {
-            loadPosition(pos + 1); // try load from next
-          }
-        };
-
-        var savePosition = function savePosition(pos, data) {
-          if (pos < 0) return;
-          var backend = _this2.backends[pos];
-          if (backend.save) {
-            backend.save(language, namespace, data);
-            savePosition(pos - 1, data);
-          } else {
-            savePosition(pos - 1, data);
-          }
-        };
-        loadPosition(0);
-      }
-    }, {
-      key: "create",
-      value: function create(languages, namespace, key, fallbackValue) {
-        var clb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};
-        var opts = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
-        this.backends.forEach(function (b) {
-          if (!b.create) return;
-          var fc = b.create.bind(b);
-          if (fc.length < 6) {
-            // no callback
-            try {
-              var r;
-              if (fc.length === 5) {
-                // future callback-less api for i18next-locize-backend
-                r = fc(languages, namespace, key, fallbackValue, opts);
-              } else {
-                r = fc(languages, namespace, key, fallbackValue);
-              }
-              if (r && typeof r.then === 'function') {
-                // promise
-                r.then(function (data) {
-                  return clb(null, data);
-                })["catch"](clb);
-              } else {
-                // sync
-                clb(null, r);
-              }
-            } catch (err) {
-              clb(err);
-            }
-            return;
-          }
-
-          // normal with callback
-          fc(languages, namespace, key, fallbackValue, clb /* unused callback */, opts);
-        });
-      }
-    }, {
-      key: "reload",
-      value: function reload() {
-        var _this3 = this;
-        var _this$services = this.services,
-          backendConnector = _this$services.backendConnector,
-          languageUtils = _this$services.languageUtils,
-          logger = _this$services.logger;
-        var currentLanguage = backendConnector.language;
-        if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return; // avoid loading resources for cimode
-
-        var toLoad = [];
-        var append = function append(lng) {
-          var lngs = languageUtils.toResolveHierarchy(lng);
-          lngs.forEach(function (l) {
-            if (toLoad.indexOf(l) < 0) toLoad.push(l);
-          });
-        };
-        append(currentLanguage);
-        if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
-          return append(l);
-        });
-        toLoad.forEach(function (lng) {
-          _this3.allOptions.ns.forEach(function (ns) {
-            backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
-              if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
-              if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
-              backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
-            });
-          });
-        });
-      }
-    }]);
-    return Backend;
-  }();
-  Backend.type = 'backend';
-
-  return Backend;
-
-}));

文件差異過大導致無法顯示
+ 0 - 0
static/vendor/i18next/i18nextChainedBackend.min.js


+ 0 - 414
static/vendor/i18next/i18nextHttpBackend.js

@@ -1,414 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.i18nextHttpBackend = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
-(function (global){(function (){
-var fetchApi
-if (typeof fetch === 'function') {
-  if (typeof global !== 'undefined' && global.fetch) {
-    fetchApi = global.fetch
-  } else if (typeof window !== 'undefined' && window.fetch) {
-    fetchApi = window.fetch
-  } else {
-    fetchApi = fetch
-  }
-}
-
-if (typeof require !== 'undefined' && (typeof window === 'undefined' || typeof window.document === 'undefined')) {
-  var f = fetchApi || require('cross-fetch')
-  if (f.default) f = f.default
-  exports.default = f
-  module.exports = exports.default
-}
-
-}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"cross-fetch":5}],2:[function(require,module,exports){
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.default = void 0;
-var _utils = require("./utils.js");
-var _request = _interopRequireDefault(require("./request.js"));
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-var getDefaults = function getDefaults() {
-  return {
-    loadPath: '/locales/{{lng}}/{{ns}}.json',
-    addPath: '/locales/add/{{lng}}/{{ns}}',
-    parse: function parse(data) {
-      return JSON.parse(data);
-    },
-    stringify: JSON.stringify,
-    parsePayload: function parsePayload(namespace, key, fallbackValue) {
-      return _defineProperty({}, key, fallbackValue || '');
-    },
-    parseLoadPayload: function parseLoadPayload(languages, namespaces) {
-      return undefined;
-    },
-    request: _request.default,
-    reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
-    customHeaders: {},
-    queryStringParams: {},
-    crossDomain: false,
-    withCredentials: false,
-    overrideMimeType: false,
-    requestOptions: {
-      mode: 'cors',
-      credentials: 'same-origin',
-      cache: 'default'
-    }
-  };
-};
-var Backend = function () {
-  function Backend(services) {
-    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-    var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-    _classCallCheck(this, Backend);
-    this.services = services;
-    this.options = options;
-    this.allOptions = allOptions;
-    this.type = 'backend';
-    this.init(services, options, allOptions);
-  }
-  _createClass(Backend, [{
-    key: "init",
-    value: function init(services) {
-      var _this = this;
-      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-      this.services = services;
-      this.options = (0, _utils.defaults)(options, this.options || {}, getDefaults());
-      this.allOptions = allOptions;
-      if (this.services && this.options.reloadInterval) {
-        setInterval(function () {
-          return _this.reload();
-        }, this.options.reloadInterval);
-      }
-    }
-  }, {
-    key: "readMulti",
-    value: function readMulti(languages, namespaces, callback) {
-      this._readAny(languages, languages, namespaces, namespaces, callback);
-    }
-  }, {
-    key: "read",
-    value: function read(language, namespace, callback) {
-      this._readAny([language], language, [namespace], namespace, callback);
-    }
-  }, {
-    key: "_readAny",
-    value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
-      var _this2 = this;
-      var loadPath = this.options.loadPath;
-      if (typeof this.options.loadPath === 'function') {
-        loadPath = this.options.loadPath(languages, namespaces);
-      }
-      loadPath = (0, _utils.makePromise)(loadPath);
-      loadPath.then(function (resolvedLoadPath) {
-        if (!resolvedLoadPath) return callback(null, {});
-        var url = _this2.services.interpolator.interpolate(resolvedLoadPath, {
-          lng: languages.join('+'),
-          ns: namespaces.join('+')
-        });
-        _this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
-      });
-    }
-  }, {
-    key: "loadUrl",
-    value: function loadUrl(url, callback, languages, namespaces) {
-      var _this3 = this;
-      var lng = typeof languages === 'string' ? [languages] : languages;
-      var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
-      var payload = this.options.parseLoadPayload(lng, ns);
-      this.options.request(this.options, url, payload, function (err, res) {
-        if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + url + '; status code: ' + res.status, true);
-        if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + url + '; status code: ' + res.status, false);
-        if (!res && err && err.message && err.message.indexOf('Failed to fetch') > -1) return callback('failed loading ' + url + ': ' + err.message, true);
-        if (err) return callback(err, false);
-        var ret, parseErr;
-        try {
-          if (typeof res.data === 'string') {
-            ret = _this3.options.parse(res.data, languages, namespaces);
-          } else {
-            ret = res.data;
-          }
-        } catch (e) {
-          parseErr = 'failed parsing ' + url + ' to json';
-        }
-        if (parseErr) return callback(parseErr, false);
-        callback(null, ret);
-      });
-    }
-  }, {
-    key: "create",
-    value: function create(languages, namespace, key, fallbackValue, callback) {
-      var _this4 = this;
-      if (!this.options.addPath) return;
-      if (typeof languages === 'string') languages = [languages];
-      var payload = this.options.parsePayload(namespace, key, fallbackValue);
-      var finished = 0;
-      var dataArray = [];
-      var resArray = [];
-      languages.forEach(function (lng) {
-        var addPath = _this4.options.addPath;
-        if (typeof _this4.options.addPath === 'function') {
-          addPath = _this4.options.addPath(lng, namespace);
-        }
-        var url = _this4.services.interpolator.interpolate(addPath, {
-          lng: lng,
-          ns: namespace
-        });
-        _this4.options.request(_this4.options, url, payload, function (data, res) {
-          finished += 1;
-          dataArray.push(data);
-          resArray.push(res);
-          if (finished === languages.length) {
-            if (typeof callback === 'function') callback(dataArray, resArray);
-          }
-        });
-      });
-    }
-  }, {
-    key: "reload",
-    value: function reload() {
-      var _this5 = this;
-      var _this$services = this.services,
-        backendConnector = _this$services.backendConnector,
-        languageUtils = _this$services.languageUtils,
-        logger = _this$services.logger;
-      var currentLanguage = backendConnector.language;
-      if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
-      var toLoad = [];
-      var append = function append(lng) {
-        var lngs = languageUtils.toResolveHierarchy(lng);
-        lngs.forEach(function (l) {
-          if (toLoad.indexOf(l) < 0) toLoad.push(l);
-        });
-      };
-      append(currentLanguage);
-      if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
-        return append(l);
-      });
-      toLoad.forEach(function (lng) {
-        _this5.allOptions.ns.forEach(function (ns) {
-          backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
-            if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
-            if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
-            backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
-          });
-        });
-      });
-    }
-  }]);
-  return Backend;
-}();
-Backend.type = 'backend';
-var _default = exports.default = Backend;
-module.exports = exports.default;
-},{"./request.js":3,"./utils.js":4}],3:[function(require,module,exports){
-(function (global){(function (){
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.default = void 0;
-var _utils = require("./utils.js");
-var fetchNode = _interopRequireWildcard(require("./getFetch.js"));
-function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
-function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
-function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
-var fetchApi;
-if (typeof fetch === 'function') {
-  if (typeof global !== 'undefined' && global.fetch) {
-    fetchApi = global.fetch;
-  } else if (typeof window !== 'undefined' && window.fetch) {
-    fetchApi = window.fetch;
-  } else {
-    fetchApi = fetch;
-  }
-}
-var XmlHttpRequestApi;
-if ((0, _utils.hasXMLHttpRequest)()) {
-  if (typeof global !== 'undefined' && global.XMLHttpRequest) {
-    XmlHttpRequestApi = global.XMLHttpRequest;
-  } else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
-    XmlHttpRequestApi = window.XMLHttpRequest;
-  }
-}
-var ActiveXObjectApi;
-if (typeof ActiveXObject === 'function') {
-  if (typeof global !== 'undefined' && global.ActiveXObject) {
-    ActiveXObjectApi = global.ActiveXObject;
-  } else if (typeof window !== 'undefined' && window.ActiveXObject) {
-    ActiveXObjectApi = window.ActiveXObject;
-  }
-}
-if (!fetchApi && fetchNode && !XmlHttpRequestApi && !ActiveXObjectApi) fetchApi = fetchNode.default || fetchNode;
-if (typeof fetchApi !== 'function') fetchApi = undefined;
-var addQueryString = function addQueryString(url, params) {
-  if (params && _typeof(params) === 'object') {
-    var queryString = '';
-    for (var paramName in params) {
-      queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
-    }
-    if (!queryString) return url;
-    url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
-  }
-  return url;
-};
-var fetchIt = function fetchIt(url, fetchOptions, callback) {
-  var resolver = function resolver(response) {
-    if (!response.ok) return callback(response.statusText || 'Error', {
-      status: response.status
-    });
-    response.text().then(function (data) {
-      callback(null, {
-        status: response.status,
-        data: data
-      });
-    }).catch(callback);
-  };
-  if (typeof fetch === 'function') {
-    fetch(url, fetchOptions).then(resolver).catch(callback);
-  } else {
-    fetchApi(url, fetchOptions).then(resolver).catch(callback);
-  }
-};
-var omitFetchOptions = false;
-var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
-  if (options.queryStringParams) {
-    url = addQueryString(url, options.queryStringParams);
-  }
-  var headers = (0, _utils.defaults)({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
-  if (typeof window === 'undefined' && typeof global !== 'undefined' && typeof global.process !== 'undefined' && global.process.versions && global.process.versions.node) {
-    headers['User-Agent'] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")");
-  }
-  if (payload) headers['Content-Type'] = 'application/json';
-  var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
-  var fetchOptions = (0, _utils.defaults)({
-    method: payload ? 'POST' : 'GET',
-    body: payload ? options.stringify(payload) : undefined,
-    headers: headers
-  }, omitFetchOptions ? {} : reqOptions);
-  try {
-    fetchIt(url, fetchOptions, callback);
-  } catch (e) {
-    if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
-      return callback(e);
-    }
-    try {
-      Object.keys(reqOptions).forEach(function (opt) {
-        delete fetchOptions[opt];
-      });
-      fetchIt(url, fetchOptions, callback);
-      omitFetchOptions = true;
-    } catch (err) {
-      callback(err);
-    }
-  }
-};
-var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
-  if (payload && _typeof(payload) === 'object') {
-    payload = addQueryString('', payload).slice(1);
-  }
-  if (options.queryStringParams) {
-    url = addQueryString(url, options.queryStringParams);
-  }
-  try {
-    var x;
-    if (XmlHttpRequestApi) {
-      x = new XmlHttpRequestApi();
-    } else {
-      x = new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
-    }
-    x.open(payload ? 'POST' : 'GET', url, 1);
-    if (!options.crossDomain) {
-      x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
-    }
-    x.withCredentials = !!options.withCredentials;
-    if (payload) {
-      x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
-    }
-    if (x.overrideMimeType) {
-      x.overrideMimeType('application/json');
-    }
-    var h = options.customHeaders;
-    h = typeof h === 'function' ? h() : h;
-    if (h) {
-      for (var i in h) {
-        x.setRequestHeader(i, h[i]);
-      }
-    }
-    x.onreadystatechange = function () {
-      x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
-        status: x.status,
-        data: x.responseText
-      });
-    };
-    x.send(payload);
-  } catch (e) {
-    console && console.log(e);
-  }
-};
-var request = function request(options, url, payload, callback) {
-  if (typeof payload === 'function') {
-    callback = payload;
-    payload = undefined;
-  }
-  callback = callback || function () {};
-  if (fetchApi && url.indexOf('file:') !== 0) {
-    return requestWithFetch(options, url, payload, callback);
-  }
-  if ((0, _utils.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
-    return requestWithXmlHttpRequest(options, url, payload, callback);
-  }
-  callback(new Error('No fetch and no xhr implementation found!'));
-};
-var _default = exports.default = request;
-module.exports = exports.default;
-}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./getFetch.js":1,"./utils.js":4}],4:[function(require,module,exports){
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.defaults = defaults;
-exports.hasXMLHttpRequest = hasXMLHttpRequest;
-exports.makePromise = makePromise;
-function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
-var arr = [];
-var each = arr.forEach;
-var slice = arr.slice;
-function defaults(obj) {
-  each.call(slice.call(arguments, 1), function (source) {
-    if (source) {
-      for (var prop in source) {
-        if (obj[prop] === undefined) obj[prop] = source[prop];
-      }
-    }
-  });
-  return obj;
-}
-function hasXMLHttpRequest() {
-  return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
-}
-function isPromise(maybePromise) {
-  return !!maybePromise && typeof maybePromise.then === 'function';
-}
-function makePromise(maybePromise) {
-  if (isPromise(maybePromise)) {
-    return maybePromise;
-  }
-  return Promise.resolve(maybePromise);
-}
-},{}],5:[function(require,module,exports){
-
-},{}]},{},[2])(2)
-});

文件差異過大導致無法顯示
+ 0 - 0
static/vendor/i18next/i18nextHttpBackend.min.js


+ 0 - 190
static/vendor/i18next/i18nextLocalStorageBackend.js

@@ -1,190 +0,0 @@
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
-  typeof define === 'function' && define.amd ? define(factory) :
-  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.i18nextLocalStorageBackend = factory());
-})(this, (function () { 'use strict';
-
-  function _typeof(o) {
-    "@babel/helpers - typeof";
-
-    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
-      return typeof o;
-    } : function (o) {
-      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
-    }, _typeof(o);
-  }
-
-  function _toPrimitive(input, hint) {
-    if (_typeof(input) !== "object" || input === null) return input;
-    var prim = input[Symbol.toPrimitive];
-    if (prim !== undefined) {
-      var res = prim.call(input, hint || "default");
-      if (_typeof(res) !== "object") return res;
-      throw new TypeError("@@toPrimitive must return a primitive value.");
-    }
-    return (hint === "string" ? String : Number)(input);
-  }
-
-  function _toPropertyKey(arg) {
-    var key = _toPrimitive(arg, "string");
-    return _typeof(key) === "symbol" ? key : String(key);
-  }
-
-  function _defineProperty(obj, key, value) {
-    key = _toPropertyKey(key);
-    if (key in obj) {
-      Object.defineProperty(obj, key, {
-        value: value,
-        enumerable: true,
-        configurable: true,
-        writable: true
-      });
-    } else {
-      obj[key] = value;
-    }
-    return obj;
-  }
-
-  function _classCallCheck(instance, Constructor) {
-    if (!(instance instanceof Constructor)) {
-      throw new TypeError("Cannot call a class as a function");
-    }
-  }
-
-  function _defineProperties(target, props) {
-    for (var i = 0; i < props.length; i++) {
-      var descriptor = props[i];
-      descriptor.enumerable = descriptor.enumerable || false;
-      descriptor.configurable = true;
-      if ("value" in descriptor) descriptor.writable = true;
-      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
-    }
-  }
-  function _createClass(Constructor, protoProps, staticProps) {
-    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
-    if (staticProps) _defineProperties(Constructor, staticProps);
-    Object.defineProperty(Constructor, "prototype", {
-      writable: false
-    });
-    return Constructor;
-  }
-
-  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
-  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
-  /* eslint-disable max-classes-per-file */
-  var Storage = /*#__PURE__*/function () {
-    function Storage(options) {
-      _classCallCheck(this, Storage);
-      this.store = options.store;
-    }
-    _createClass(Storage, [{
-      key: "setItem",
-      value: function setItem(key, value) {
-        if (this.store) {
-          try {
-            this.store.setItem(key, value);
-          } catch (e) {
-            // f.log('failed to set value for key "' + key + '" to localStorage.');
-          }
-        }
-      }
-    }, {
-      key: "getItem",
-      value: function getItem(key, value) {
-        if (this.store) {
-          try {
-            return this.store.getItem(key, value);
-          } catch (e) {
-            // f.log('failed to get value for key "' + key + '" from localStorage.');
-          }
-        }
-        return undefined;
-      }
-    }]);
-    return Storage;
-  }();
-  function getDefaults() {
-    var store = null;
-    try {
-      store = window.localStorage;
-    } catch (e) {
-      if (typeof window !== 'undefined') {
-        console.log('Failed to load local storage.', e);
-      }
-    }
-    return {
-      prefix: 'i18next_res_',
-      expirationTime: 7 * 24 * 60 * 60 * 1000,
-      defaultVersion: undefined,
-      versions: {},
-      store: store
-    };
-  }
-  var Cache = /*#__PURE__*/function () {
-    function Cache(services) {
-      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-      _classCallCheck(this, Cache);
-      this.init(services, options);
-      this.type = 'backend';
-    }
-    _createClass(Cache, [{
-      key: "init",
-      value: function init(services) {
-        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-        this.services = services;
-        this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options), options);
-        this.storage = new Storage(this.options);
-      }
-    }, {
-      key: "read",
-      value: function read(language, namespace, callback) {
-        var nowMS = Date.now();
-        if (!this.storage.store) {
-          return callback(null, null);
-        }
-        var local = this.storage.getItem("".concat(this.options.prefix).concat(language, "-").concat(namespace));
-        if (local) {
-          local = JSON.parse(local);
-          var version = this.getVersion(language);
-          if (
-          // expiration field is mandatory, and should not be expired
-          local.i18nStamp && local.i18nStamp + this.options.expirationTime > nowMS &&
-          // there should be no language version set, or if it is, it should match the one in translation
-          version === local.i18nVersion) {
-            var i18nStamp = local.i18nStamp;
-            delete local.i18nVersion;
-            delete local.i18nStamp;
-            return callback(null, local, i18nStamp);
-          }
-        }
-        return callback(null, null);
-      }
-    }, {
-      key: "save",
-      value: function save(language, namespace, data) {
-        if (this.storage.store) {
-          data.i18nStamp = Date.now();
-
-          // language version (if set)
-          var version = this.getVersion(language);
-          if (version) {
-            data.i18nVersion = version;
-          }
-
-          // save
-          this.storage.setItem("".concat(this.options.prefix).concat(language, "-").concat(namespace), JSON.stringify(data));
-        }
-      }
-    }, {
-      key: "getVersion",
-      value: function getVersion(language) {
-        return this.options.versions[language] || this.options.defaultVersion;
-      }
-    }]);
-    return Cache;
-  }();
-  Cache.type = 'backend';
-
-  return Cache;
-
-}));

文件差異過大導致無法顯示
+ 0 - 0
static/vendor/i18next/i18nextLocalStorageBackend.min.js


+ 0 - 128
static/vendor/i18next/jquery-i18next.js

@@ -1,128 +0,0 @@
-(function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
-  typeof define === 'function' && define.amd ? define(factory) :
-  (global.jqueryI18next = factory());
-}(this, (function () { 'use strict';
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var defaults = {
-  tName: 't',
-  i18nName: 'i18n',
-  handleName: 'localize',
-  selectorAttr: 'data-i18n',
-  targetAttr: 'i18n-target',
-  optionsAttr: 'i18n-options',
-  useOptionsAttr: false,
-  parseDefaultValueFromContent: true
-};
-
-function init(i18next, $) {
-  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-
-  options = _extends({}, defaults, options);
-
-  function parse(ele, key, opts) {
-    if (key.length === 0) return;
-
-    var attr = 'text';
-
-    if (key.indexOf('[') === 0) {
-      var parts = key.split(']');
-      key = parts[1];
-      attr = parts[0].substr(1, parts[0].length - 1);
-    }
-
-    if (key.indexOf(';') === key.length - 1) {
-      key = key.substr(0, key.length - 2);
-    }
-
-    function extendDefault(o, val) {
-      if (!options.parseDefaultValueFromContent) return o;
-      return _extends({}, o, { defaultValue: val });
-    }
-
-    if (attr === 'html') {
-      ele.html(i18next.t(key, extendDefault(opts, ele.html())));
-    } else if (attr === 'text') {
-      ele.text(i18next.t(key, extendDefault(opts, ele.text())));
-    } else if (attr === 'prepend') {
-      ele.prepend(i18next.t(key, extendDefault(opts, ele.html())));
-    } else if (attr === 'append') {
-      ele.append(i18next.t(key, extendDefault(opts, ele.html())));
-    } else if (attr.indexOf('data-') === 0) {
-      var dataAttr = attr.substr('data-'.length);
-      var translated = i18next.t(key, extendDefault(opts, ele.data(dataAttr)));
-
-      // we change into the data cache
-      ele.data(dataAttr, translated);
-      // we change into the dom
-      ele.attr(attr, translated);
-    } else {
-      ele.attr(attr, i18next.t(key, extendDefault(opts, ele.attr(attr))));
-    }
-  }
-
-  function localize(ele, opts) {
-    var key = ele.attr(options.selectorAttr);
-    if (!key && typeof key !== 'undefined' && key !== false) key = ele.text() || ele.val();
-    if (!key) return;
-
-    var target = ele,
-        targetSelector = ele.data(options.targetAttr);
-
-    if (targetSelector) target = ele.find(targetSelector) || ele;
-
-    if (!opts && options.useOptionsAttr === true) opts = ele.data(options.optionsAttr);
-
-    opts = opts || {};
-
-    if (key.indexOf(';') >= 0) {
-      var keys = key.split(';');
-
-      $.each(keys, function (m, k) {
-        // .trim(): Trim the comma-separated parameters on the data-i18n attribute.
-        if (k !== '') parse(target, k.trim(), opts);
-      });
-    } else {
-      parse(target, key, opts);
-    }
-
-    if (options.useOptionsAttr === true) {
-      var clone = {};
-      clone = _extends({ clone: clone }, opts);
-
-      delete clone.lng;
-      ele.data(options.optionsAttr, clone);
-    }
-  }
-
-  function handle(opts) {
-    return this.each(function () {
-      // localize element itself
-      localize($(this), opts);
-
-      // localize children
-      var elements = $(this).find('[' + options.selectorAttr + ']');
-      elements.each(function () {
-        localize($(this), opts);
-      });
-    });
-  };
-
-  // $.t $.i18n shortcut
-  $[options.tName] = i18next.t.bind(i18next);
-  $[options.i18nName] = i18next;
-
-  // selector function $(mySelector).localize(opts);
-  $.fn[options.handleName] = handle;
-}
-
-var index = {
-  init: init
-};
-
-return index;
-
-})));

+ 1 - 0
static/vendor/i18next/jquery-i18next.min.js

@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.jqueryI18next=e()}(this,function(){"use strict";function t(t,a){function i(n,a,i){function r(t,n){return f.parseDefaultValueFromContent?e({},t,{defaultValue:n}):t}if(0!==a.length){var o="text";if(0===a.indexOf("[")){var l=a.split("]");a=l[1],o=l[0].substr(1,l[0].length-1)}if(a.indexOf(";")===a.length-1&&(a=a.substr(0,a.length-2)),"html"===o)n.html(t.t(a,r(i,n.html())));else if("text"===o)n.text(t.t(a,r(i,n.text())));else if("prepend"===o)n.prepend(t.t(a,r(i,n.html())));else if("append"===o)n.append(t.t(a,r(i,n.html())));else if(0===o.indexOf("data-")){var s=o.substr("data-".length),d=t.t(a,r(i,n.data(s)));n.data(s,d),n.attr(o,d)}else n.attr(o,t.t(a,r(i,n.attr(o))))}}function r(t,n){var r=t.attr(f.selectorAttr);if(r||void 0===r||!1===r||(r=t.text()||t.val()),r){var o=t,l=t.data(f.targetAttr);if(l&&(o=t.find(l)||t),n||!0!==f.useOptionsAttr||(n=t.data(f.optionsAttr)),n=n||{},r.indexOf(";")>=0){var s=r.split(";");a.each(s,function(t,e){""!==e&&i(o,e.trim(),n)})}else i(o,r,n);if(!0===f.useOptionsAttr){var d={};d=e({clone:d},n),delete d.lng,t.data(f.optionsAttr,d)}}}function o(t){return this.each(function(){r(a(this),t),a(this).find("["+f.selectorAttr+"]").each(function(){r(a(this),t)})})}var f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f=e({},n,f),a[f.tName]=t.t.bind(t),a[f.i18nName]=t,a.fn[f.handleName]=o}var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},n={tName:"t",i18nName:"i18n",handleName:"localize",selectorAttr:"data-i18n",targetAttr:"i18n-target",optionsAttr:"i18n-options",useOptionsAttr:!1,parseDefaultValueFromContent:!0};return{init:t}});

+ 6 - 6
templates/common/base.html

@@ -938,12 +938,12 @@ explicit grant from the SFTPGo Team ([email protected]).
         {{- block "modals" .}}{{- end}}
 		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/plugins/global/plugins.bundle.js"></script>
 		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/js/scripts.bundle.js"></script>
-        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18next.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/jquery-i18next.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextBrowserLanguageDetector.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextChainedBackend.js"></script>
-        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextLocalStorageBackend.js"></script>
-        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextHttpBackend.js"></script>
+        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18next.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/jquery-i18next.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextBrowserLanguageDetector.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextChainedBackend.min.js"></script>
+        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextLocalStorageBackend.min.js"></script>
+        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextHttpBackend.min.js"></script>
 		{{- template "basejs" . }}
         <script type="text/javascript" {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}}>
             var ModalAlert = function () {

+ 6 - 6
templates/common/baselogin.html

@@ -49,12 +49,12 @@ explicit grant from the SFTPGo Team ([email protected]).
 		</div>
 		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/plugins/global/plugins.bundle.js"></script>
 		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/js/scripts.bundle.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18next.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/jquery-i18next.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextBrowserLanguageDetector.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextChainedBackend.js"></script>
-        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextLocalStorageBackend.js"></script>
-		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextHttpBackend.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18next.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/jquery-i18next.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextBrowserLanguageDetector.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextChainedBackend.min.js"></script>
+        <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextLocalStorageBackend.min.js"></script>
+		<script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextHttpBackend.min.js"></script>
 		{{- template "basejs" . }}
 		<script type="text/javascript" {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}}>
 			KTUtil.onDOMContentLoaded(function () {

部分文件因文件數量過多而無法顯示