import { C as a } from "./base-PQGakkrl.js";
import { C as m } from "./day-Bz9LfelO.js";
const y = {
  common: {
    submit: "确定",
    save: "保存",
    cancel: "取消",
    update: "修改",
    close: "关闭",
    delete: "删除",
    deleteAll: "全部删除",
    upload: "上传",
    download: "下载",
    preview: "预览",
    restore: "还原",
    clear: "清除",
    clearEmpty: "清空",
    clearAll: "全部清除",
    copy: "复制",
    custom: "自定义",
    loading: "加载中",
    noDataText: "暂无数据",
    noResultsText: "未找到结果",
    checkboxAll: "全选",
    selected: "已选",
    count: "个",
    add: "添加",
    checkAddMax: "最多添加",
    checkAddMin: "最少保留",
    pleaseSelect: "请选择"
  },
  validate: {
    required: "此项不能为空",
    number: "请输入数字",
    integer: "请输入整数",
    integerPositive: "请输入正整数",
    alphanum: "请输入数字或字母",
    email: "邮箱格式不正确",
    minLen: "输入值的长度不能小于 %s 个字",
    maxLen: "输入值的长度不能大于 %s 个字",
    minByte: "输入值的长度不能小于 %s 个字节",
    maxByte: "输入值的长度不能大于 %s 个字节",
    minGreater: "输入值请大于 %s",
    maxGreater: "输入值请小于 %s",
    minGreaterEqual: "输入值请大于或等于 %s",
    maxGreaterEqual: "输入值请小于或等于 %s",
    phone: "手机号不正确",
    equalto: "两次输入值不同"
  },
  dataTime: {
    am: "上午",
    pm: "下午",
    year: "年",
    prevYear: "上一年",
    prevMonth: "上一月",
    nextYear: "下一年",
    nextMonth: "下一月",
    prevYear10: "前十年",
    nextYear10: "后十年",
    today: "今天",
    yesterDay: "昨天",
    pastDays7: "过去7天",
    pastDays30: "过去30天",
    montCurrent: "本月",
    montLast: "上月",
    montLately6: "最近半年",
    yearCurrent: "今年",
    yearLast: "去年",
    rangeStartLabel: "开始",
    checkEndMinLabel: "结束时间不能小于设置的最小时间",
    checkStartMaxLabel: "时间不能大于设置的最大时间",
    checkStartMinLabel: "时间不能小于设置的最小时间",
    checkStartEndLabel: " ",
    checkRangeEmptyLabel: "请选择完整的开始时间,结束时间"
  },
  fileUpload: {
    checkImageWHLabel: "图片宽高不匹配",
    checkSuffixMimeLabel: "类型不匹配",
    checkSizeLabel: "大小不匹配",
    uploadFile: "上传文件"
  },
  weekHour: {
    daily: "每日",
    monday: "周一",
    tuesday: "周二",
    wednesday: "周三",
    thursday: "周四",
    friday: "周五",
    saturday: "周六",
    sunday: "周日",
    weekday: "工作日",
    weekend: "周末",
    dawn: "凌晨",
    morning: "上午",
    noon: "中午",
    afternoon: "下午",
    evening: "傍晚",
    night: "晚上",
    selected: "已定向",
    selectedNot: "未定向"
  },
  paginate: {
    page: "页",
    pageStrip: "页/条",
    jumpTo: "跳转至",
    statistic: "显示第 ${s} 至 ${e} 项结果，共 ${_total} 项"
  },
  xEditable: {
    required: "此项不能为空",
    submitCallback: "submitCallback的返回格式不正确"
  }
}, h = {
  common: {
    submit: "Submit",
    save: "Save",
    cancel: "Cancel",
    update: "Modify",
    close: "Close",
    delete: "Delete",
    deleteAll: "Delete All",
    upload: "Upload",
    download: "Download",
    preview: "Preview",
    restore: "Restore",
    clear: "Clear",
    clearEmpty: "Clear All",
    clearAll: "Clear All",
    copy: "Copy",
    custom: "Custom",
    loading: "Loading",
    noDataText: "No Data",
    noResultsText: "No Result",
    checkboxAll: "Select All",
    selected: "Selected",
    count: "Count",
    add: "Add",
    checkAddMax: "Add Maximum",
    checkAddMin: "Add Minimum",
    pleaseSelect: "Select"
  },
  validate: {
    required: "Required",
    number: "Please enter number",
    integer: "Please enter integer",
    integerPositive: "Please enter positive integer",
    alphanum: "Please enter number or letter",
    email: "Error Email",
    minLen: "Cannot less than %s characters",
    maxLen: "Cannot more than %s characters",
    minByte: "Cannot less than %s Bytes",
    maxByte: "Cannot more than %s Bytes",
    minGreater: "Must more than %s",
    maxGreater: "Must less than %s",
    minGreaterEqual: "Cannot less than %s",
    maxGreaterEqual: "Cannot more than %s",
    phone: "Error phone number",
    equalto: "Different Value"
  },
  dataTime: {
    am: "am",
    pm: "pm",
    year: "year",
    prevYear: "Last Year",
    prevMonth: "Last Month",
    nextYear: "Next Year",
    nextMonth: "Next Month",
    prevYear10: "Last Decade",
    nextYear10: "Next Decade",
    today: "Today",
    yesterDay: "Yesterday",
    pastDays7: "Last 7 Days",
    pastDays30: "Last 30 Days",
    montCurrent: "This Month",
    montLast: "Last Month",
    montLately6: "Last Half Year",
    yearCurrent: "This Year",
    yearLast: "Last Year",
    rangeStartLabel: "Start",
    checkEndMinLabel: "Error end time",
    checkStartMaxLabel: "Error end time",
    checkStartMinLabel: "Error start time",
    checkStartEndLabel: "End time cannot before start time",
    checkRangeEmptyLabel: "Select start and end time"
  },
  fileUpload: {
    checkImageWHLabel: "Error image dimension",
    checkSuffixMimeLabel: "Error type",
    checkSizeLabel: "Error file size",
    uploadFile: "Upload File"
  },
  weekHour: {
    daily: "Daily",
    monday: "Monday",
    tuesday: "Tuesday",
    wednesday: "Wednesday",
    thursday: "Thursday",
    friday: "Friday",
    saturday: "Saturday",
    sunday: "Sunday",
    weekday: "Weekday",
    weekend: "Weekend",
    dawn: "Midnight",
    morning: "AM",
    noon: "Noon",
    afternoon: "PM",
    evening: "Evenfall",
    night: "Evening",
    selected: "Include",
    selectedNot: "Exclude"
  },
  paginate: {
    page: "Page",
    pageStrip: "Lines/Page",
    jumpTo: "Page to",
    statistic: "Records ${s} to ${e} , ${_total} Records in Total"
  },
  xEditable: {
    required: "Required",
    submitCallback: "Error SubmitCallback"
  }
};
class u {
  _type;
  _typeDef;
  _packageData;
  constructor() {
    this._type = "zh_cn", this._typeDef = "zh_cn", this._packageData = {
      zh_cn: y,
      en: h
    };
  }
  initMerge(e) {
    const t = a.isEmpty(e.type);
    return t || (this._type = e.type), a.isEmpty(e.packageData) || (t ? this._packageData[this._typeDef] = a.getJsonMergeDeep(this._packageData[this._typeDef], e.packageData) : this._packageData = a.getJsonMergeDeep(this._packageData, e.packageData)), {
      type: this._type,
      //typeDef: this._typeDef,
      packageData: this._packageData
    };
  }
  _getType() {
    let e = this._type;
    return a.isEmpty(e) && (e = this._typeDef), { type: e, def: this._typeDef };
  }
  _getData(e) {
    let t = {};
    const n = this._packageData;
    if (e)
      t = n[e];
    else {
      const s = this._getType();
      a.isExistJsonKey(n, s.type) && (t = n[s.type]), a.isEmpty(t) && (t = n[s.def]);
    }
    return t;
  }
  _getKeyValue(e, t) {
    let n;
    if (a.isExistValue(e, ".")) {
      const s = a.split(e, ".");
      let o = a.getJsonClone(t, !0);
      s.forEach((i, l) => {
        const r = o[i];
        l === s.length - 1 ? o = r : o = a.isEmpty(r) ? {} : r;
      }), n = o;
    } else
      n = t[e];
    return n;
  }
  _getKey(e, t) {
    let n;
    const s = t ? this._getData(t) : this._getData();
    return a.isEmpty(s) || (n = this._getKeyValue(e, s), a.isObject(n) && (n = a.getJsonClone(n, !0))), n;
  }
  getType() {
    return this._getType();
  }
  getAll() {
    return this._getData();
  }
  getCommon() {
    const e = this._getKey("common"), t = this._getKey("common", this._typeDef);
    return a.getJsonMergeDeep(t || {}, e || {});
  }
  getValue(e) {
    let t = this._getKey(e);
    return a.isEmpty(t) && (t = this._getKey(e, this._typeDef)), t;
  }
  getPage(e) {
    let t = {};
    const n = this.getCommon();
    if (e === "common")
      t = n;
    else {
      const s = this._getKey(e, this._typeDef), o = this._getKey(e), i = a.getJsonMergeDeep(s, o);
      let l = {};
      if (a.isExistValue(e, ".")) {
        const r = a.split(e, ".");
        r[r.length - 1] = "common";
        const c = r.join("."), d = this._getKey(c, this._typeDef), p = this._getKey(c);
        l = a.getJsonMergeDeep(d, p);
      }
      t = a.getJsonMerge(i, { common: n, pageCommon: l });
    }
    return t;
  }
  setType(e) {
    switch (this._type = e, e) {
      case "zh_cn":
        m.objDay.locale("zh-cn");
        break;
      case "en":
        m.objDay.locale("en");
        break;
    }
  }
}
const _ = new u();
export {
  _ as L
};
//# sourceMappingURL=index-C1R9HAvS.js.map
