/**
 * 登记号ID	原名称name	朝代dynasty	年号year	产地origin	性质nature	品种variety	工艺关联crafts_gl	工艺crafts
 * 纹饰关联decoration_gl	纹饰decoration	材质material	器型关联type_gl	器型type	造型特征modeling_features
 * 款识inscription	  纹饰描述description_decoration	工艺原理process_principle	用途usage	  用途说明usage_explain
 * 产地介绍origin_intro	寓意meaning	内涵寓意connotation_meaning	历史背景historical
 *
 */

/* var excelUrl = 'http://192.168.10.91:5500/';
function getExcelData() {
  // 确保URL正确，移除末尾的转义字符
  const excelFileUrl = excelUrl + `data.xlsx`;
  // 返回fetch的Promise，以便于外部可以链式调用.then()和.catch()
  return fetch(excelFileUrl)
    .then((response) => {
      if (!response.ok) {
        throw new Error('Network response was not ok');
      }
      return response.arrayBuffer(); // 使用arrayBuffer来获取二进制数据
    })
    .then((data) => {
      // 使用xlsx库解析Excel数据
      const workbook = XLSX.read(data, { type: 'buffer' }); // 指定type为'buffer'
      const sheetName = workbook.SheetNames[0];
      const sheet = workbook.Sheets[sheetName];
      const jsonData = XLSX.utils.sheet_to_json(sheet, {
        header: 2,
        raw: 1,
      });
      if (!jsonData || jsonData.length === 0) {
        throw new Error('Excel数据为空');
      }
      return jsonData; // 确保返回jsonData
    })
    .catch((error) => {
      console.error(
        '无法获取Excel文件，请检查网络连接或文件URL是否正确',
        error
      );
      throw error; // 确保错误可以被外部捕获
    });
}

var lxs = {};
if (!sessionStorage.getItem('lxs')) {
  getExcelData()
    .then((jsonData) => {
      $.each(jsonData, function (index, item) {
        lxs[item.ID] = item; // 将数组中的每个对象以 id 为键存入新对象
      });
      sessionStorage.setItem('lxs', JSON.stringify(lxs)); // 存储数据
    })
    .catch((error) => {
      console.error('发生错误：', error);
    });
}

lxs = JSON.parse(sessionStorage.getItem('lxs')) || {}; */

var lxs = {
  hbts01: {
    ID: "2：6601",
    name: "清乾隆·粉彩松鼠葡萄纹 四方瓷瓶",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "瑞兽、植物",
    decoration: "松鼠葡萄纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "四方瓶",
    inscription: "年号款",
    usage: "陈设器",
    url: "",
    colors: "#aab6b0，#4e7854，#09685e，#b87096",
  },
  hbts02: {
    ID: "2：954",
    name: "明宣德·青花云龙纹瓷钵",
    dynasty: "明代",
    year: "宣德",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "瑞兽",
    decoration: "云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "钵",
    inscription: "年号款",
    usage: "饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts03: {
    ID: "10：5623",
    name: "周·铜盉",
    dynasty: "西周",
    year: "",
    origin: "",
    nature: "",
    variety: "",
    crafts_gl: "",
    crafts: "",
    decoration_gl: "瑞兽",
    decoration: "环带凤鸟纹",
    material_gl: "金属器",
    material: "铜",
    type_gl: "盉",
    type: "三足盖盉",
    inscription: "",
    usage: "饮食器",
    url: "",
    colors: "#879e8f",
  },
  hbts04: {
    ID: "10：17042",
    name: "西汉·鎏金铜 熏炉",
    dynasty: "西汉",
    year: "",
    origin: "",
    nature: "",
    variety: "",
    crafts_gl: "刻花",
    crafts: "铜鎏金、錾刻",
    decoration_gl: "瑞兽",
    decoration: "龙凤云气纹",
    material_gl: "金属器",
    material: "铜",
    type_gl: "炉",
    type: "熏炉",
    inscription: "",
    usage: "香具",
    url: "",
    colors: "#967b52",
  },
  hbts05: {
    ID: "10：18307",
    name: "春秋·青铜剑",
    dynasty: "春秋",
    year: "",
    origin: "吴越地区",
    nature: "",
    variety: "",
    crafts_gl: "铸造",
    crafts: "铸造",
    decoration_gl: "",
    decoration: "",
    material_gl: "金属器",
    material: "铜",
    type_gl: "",
    type: "剑",
    inscription: "",
    usage: "兵器",
    url: "",
    colors: "#967b52",
  },
  hbts06: {
    ID: "0：5268",
    name: "清·芙蓉石蟠螭耳盖炉",
    dynasty: "清代",
    year: "",
    origin: "",
    nature: "",
    variety: "",
    crafts_gl: "雕刻",
    crafts: "雕刻",
    decoration_gl: "瑞兽",
    decoration: "蟠螭",
    material_gl: "",
    material: "玉石",
    type_gl: "炉",
    type: "盖炉",
    inscription: "",
    usage: "香具",
    url: "https://vr.njmuseum.com/fgfrspcegl/",
    colors: "#bd8e82",
  },
  hbts07: {
    ID: "2：6923",
    name: "明永乐·白釉锥刻四季花卉纹梅瓶",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白釉",
    crafts_gl: "刻花、锥刻",
    crafts: "锥刻",
    decoration_gl: "植物",
    decoration: "四季花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "梅瓶",
    inscription: "",
    usage: "陈设器、饮食器",
    url: "https://vr.njmuseum.com/damingzhan/2%EF%BC%9A6923/index.html",
    colors: "#d5dfd7",
  },
  hbts08: {
    ID: "2：6587",
    name: "明永乐·青花缠枝花卉纹折沿盆",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物、吉祥纹",
    decoration: "缠枝花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "折沿盆",
    inscription: "",
    usage: "盛装食用器",
    url: "https://vr.njmuseum.com/damingzhan/2%EF%BC%9A6587/index.html",
    colors: "#d5dfd7，#1f3867",
  },
  hbts09: {
    ID: "2：1038",
    name: "明永乐·青花荔枝纹盘",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物",
    decoration: "荔枝纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盘",
    type: "盘",
    inscription: "",
    usage: "陈设器、饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts10: {
    ID: "2：7197",
    name: "明永乐·白釉荷叶形盖罐",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白釉",
    crafts_gl: "刻花",
    crafts: "刻花",
    decoration_gl: "植物",
    decoration: "植物",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "罐",
    type: "荷叶盖罐",
    inscription: "",
    usage: "盛装食用器",
    url: "https://vr.njmuseum.com/damingzhan/2%EF%BC%9A7197/index.html",
    colors: "#d5dfd7",
  },
  hbts11: {
    ID: "2：10702",
    name: "明万历·青花花鸟纹瓷盘",
    dynasty: "明代",
    year: "万历",
    origin: "景德镇",
    nature: "民窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物、瑞兽",
    decoration: "开光树石花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盘",
    type: "盘",
    inscription: "",
    usage: "陈设器",
    url: "",
    colors: "#e7e8db，#bac6ca，#201b16",
  },
  hbts12: {
    ID: "18：2296",
    name: "十四世纪·高丽青釉镶嵌柳叶梅竹纹梅瓶",
    dynasty: "王氏高丽王朝",
    year: "",
    origin: "高丽",
    nature: "",
    variety: "青釉",
    crafts_gl: "镶嵌",
    crafts: "镶嵌",
    decoration_gl: "植物",
    decoration: "梅花、竹柳",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "梅瓶",
    inscription: "",
    usage: "陈设器、饮食器",
    url: "",
    colors: "#b1bca3",
  },
  hbts13: {
    ID: "0：8178",
    name: "明·玉盏",
    dynasty: "明代",
    year: "",
    origin: "",
    nature: "",
    variety: "",
    crafts_gl: "",
    crafts: "",
    decoration_gl: "",
    decoration: "",
    material_gl: "金属器",
    material: "玉石、金",
    type_gl: "盏",
    type: "盏/盖/盏托/勺",
    inscription: "",
    usage: "饮食器",
    url: "https://vr.njmuseum.com/damingzhan/0%EF%BC%9A8178/index.html",
    colors: "#dbccb2，#fece4d",
  },
  hbts14: {
    ID: "1：1841",
    name: "清·陈鸣远作紫砂东陵壶",
    dynasty: "清代",
    year: "",
    origin: "江苏宜兴",
    nature: "",
    variety: "",
    crafts_gl: "刻花",
    crafts: "刻花",
    decoration_gl: "诗文",
    decoration: "诗文",
    material_gl: "陶瓷",
    material: "紫砂",
    type_gl: "执壶",
    type: "瓜形壶",
    inscription: "人名款",
    usage: "饮食器",
    url: "",
    colors: "#7b5c49",
  },
  hbts15: {
    ID: "1：2053",
    name: "明永乐·模印释伽牟尼佛塔砖",
    dynasty: "明代",
    year: "永乐",
    origin: "",
    nature: "",
    variety: "",
    crafts_gl: "模印",
    crafts: "模印金漆",
    decoration_gl: "",
    decoration: "",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "砖瓦",
    type: "砖",
    inscription: "",
    usage: "建筑构件",
    url: "",
    colors: "#423c32，#83673d，#a78651，#94856c",
  },
  hbts16: {
    ID: "1：2125",
    name: "明洪武·绿釉龙纹琉璃瓦当",
    dynasty: "明代",
    year: "洪武",
    origin: "南京",
    nature: "琉璃官窑",
    variety: "绿釉",
    crafts_gl: "模印",
    crafts: "模印",
    decoration_gl: "瑞兽",
    decoration: "龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "砖瓦",
    type: "瓦当",
    inscription: "",
    usage: "建筑构件",
    url: "https://vr.njmuseum.com/damingzhan/1%EF%BC%9A2125/index.html",
    colors: "#4e7854",
  },
  hbts17: {
    ID: "1：2138",
    name: "明洪武·黄釉龙纹琉璃瓦当",
    dynasty: "明代",
    year: "洪武",
    origin: "南京",
    nature: "琉璃官窑",
    variety: "黄釉",
    crafts_gl: "模印",
    crafts: "模印",
    decoration_gl: "瑞兽",
    decoration: "龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "砖瓦",
    type: "瓦当",
    inscription: "",
    usage: "建筑构件",
    url: "https://vr.njmuseum.com/damingzhan/1%EF%BC%9A2138/index.html",
    colors: "#c6792c",
  },
  hbts18: {
    ID: "6：781",
    name: "明·黑漆嵌螺钿人物故事纹梅花形桌",
    dynasty: "明代",
    year: "",
    origin: "",
    nature: "",
    variety: "木胎漆器",
    crafts_gl: "镶嵌",
    crafts: "嵌螺钿",
    decoration_gl: "人物、植物、瑞兽、吉祥纹、楼阁纹",
    decoration: "人物故事纹",
    material_gl: "",
    material: "木",
    type_gl: "桌",
    type: "桌",
    inscription: "",
    usage: "家具",
    url: "https://vr.njmuseum.com/damingzhan/6%EF%BC%9A781/index.html",
    colors: "#201b16，#967b52",
  },
  hbts19: {
    ID: "10：28322",
    name: "明永乐·大报恩寺琉璃塔拱门",
    dynasty: "明代",
    year: "永乐",
    origin: "南京",
    nature: "官窑",
    variety: "琉璃",
    crafts_gl: "模印",
    crafts: "模印",
    decoration_gl: "瑞兽",
    decoration: "六拏具（缺狮纹）",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "砖瓦",
    type: "砖",
    inscription: "",
    usage: "建筑构件",
    url: "https://vr.njmuseum.com/damingzhan/10%EF%BC%9A28322/index.html",
    colors: "#717364，#764e2a，#85704f，#3c473b",
  },
  hbts20: {
    ID: "10：26779",
    name: "明永乐·狮纹琉璃塔砖",
    dynasty: "明代",
    year: "永乐",
    origin: "南京",
    nature: "官窑",
    variety: "琉璃",
    crafts_gl: "模印",
    crafts: "模印",
    decoration_gl: "瑞兽",
    decoration: "狮（六拏具之一）",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "砖瓦",
    type: "砖",
    inscription: "",
    usage: "建筑构件",
    url: "https://vr.njmuseum.com/damingzhan/10%EF%BC%9A26779/index.html",
    colors: "#c6792c，#4e7854",
  },
  hbts21: {
    ID: "2：5451",
    name: "明隆庆·黄地青花云龙纹瓷碗",
    dynasty: "明代",
    year: "隆庆",
    origin: "景德镇",
    nature: "官窑",
    variety: "黄地青花",
    crafts_gl: "彩绘",
    crafts: "釉上釉下结合彩绘",
    decoration_gl: "瑞兽",
    decoration: "云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "卧足碗",
    inscription: "年号款",
    usage: "饮食器",
    url: "",
    colors: "#d5b94e，#d5dfd7，#1f3867",
  },
  hbts22: {
    ID: "2：3331",
    name: "清雍正·矾红葫芦纹瓷水盂",
    dynasty: "清代",
    year: "雍正",
    origin: "景德镇",
    nature: "官窑",
    variety: "矾红彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物",
    decoration: "卷草纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "水盂",
    type: "葫芦形水盂",
    inscription: "年号款",
    usage: "文房用具",
    url: "",
    colors: "#ced4cf，#b64219",
  },
  hbts23: {
    ID: "2：6095",
    name: "清康熙·青花人物纹瓷笔筒",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "民窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "人物、植物",
    decoration: "竹林七贤图",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "笔筒",
    type: "笔筒",
    inscription: "",
    usage: "文房用具",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts24: {
    ID: "2：6397",
    name: "明成化·青花花卉纹瓷盘",
    dynasty: "明代",
    year: "成化",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物",
    decoration: "花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盘",
    type: "盘",
    inscription: "",
    usage: "饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts25: {
    ID: "2：8530",
    name: "清乾隆·官窑青花地印花龙穿花纹瓷高足碗",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "蓝地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "瑞兽、植物、海水纹",
    decoration: "穿花龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "高足碗",
    inscription: "年号款",
    usage: "饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts26: {
    ID: "2：9803",
    name: "清乾隆·斗彩团花纹瓷马蹄碗",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "斗彩",
    crafts_gl: "彩绘",
    crafts: "釉上釉下结合彩绘",
    decoration_gl: "植物",
    decoration: "团花纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "马蹄碗",
    inscription: "年号款",
    usage: "饮食器",
    url: "",
    colors: "#dbe0da，#b0b15e，#1a8d7c，#B8461A",
  },
  hbts27: {
    ID: "2：983",
    name: "明宣德·青花缠枝花卉纹瓷碗",
    dynasty: "明代",
    year: "宣德",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物",
    decoration: "缠枝花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "碗",
    inscription: "年号款",
    usage: "饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts28: {
    ID: "2：4841",
    name: "明永乐·外青花莲瓣内缠枝花卉纹瓷碗",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物",
    decoration: "莲瓣纹、缠枝花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "碗、莲子碗、鸡心碗",
    inscription: "",
    usage: "饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts29: {
    ID: "2：3966",
    name: "宋·青白釉模印狮子绣球纹瓷枕",
    dynasty: "南宋",
    year: "",
    origin: "景德镇",
    nature: "民窑",
    variety: "青白釉",
    crafts_gl: "模印",
    crafts: "模印印花",
    decoration_gl: "瑞兽",
    decoration: "狮子绣球纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "枕",
    type: "枕",
    inscription: "",
    usage: "枕具",
    url: "",
    colors: "#d5dfd7",
  },
  hbts30: {
    ID: "2：5960",
    name: "东吴—西晋·青釉熊水注",
    dynasty: "东吴—西晋",
    year: "",
    origin: "越窑",
    nature: "民窑",
    variety: "青釉",
    crafts_gl: "模印、刻花",
    crafts: "模印、刻花",
    decoration_gl: "瑞兽",
    decoration: "熊形",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "水盂",
    type: "水盂",
    inscription: "",
    usage: "文房用具",
    url: "",
    colors: "#604e34",
  },
  hbts31: {
    ID: "2：823",
    name: "明永乐·青花云龙纹扁壶",
    dynasty: "明代",
    year: "永乐",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "瑞兽",
    decoration: "云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "扁壶",
    type: "扁壶",
    inscription: "",
    usage: "陈设器、盛装食用器",
    url: "https://vr.njmuseum.com/damingzhan/2%EF%BC%9A823/index.html",
    colors: "#d5dfd7，#1f3867",
  },
  hbts32: {
    ID: "2：6602",
    name: "清乾隆·粉彩花果御题墨诗六方瓷笔筒",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩、墨彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物、诗文",
    decoration: "御题诗花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "笔筒",
    type: "笔筒",
    inscription: "年号款",
    usage: "文房用具",
    url: "",
    colors: "#92cec2，#d6e0dc，#c6521a，#443e38",
  },
  hbts33: {
    ID: "2：3606",
    name: "清乾隆·仿金釉瓷法轮",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "仿金釉/金釉/金彩瓷",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "吉祥纹",
    decoration: "吉祥纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "法轮",
    type: "法轮",
    inscription: "年号款",
    usage: "供器",
    url: "",
    colors: "#fece4d，#92beb7，#b66f41，#284084",
  },
  hbts34: {
    ID: "2：2608",
    name: "清康熙·雕地龙纹素三彩花果纹盘",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "官窑",
    variety: "素三彩",
    crafts_gl: "刻花、彩绘",
    crafts: "刻花、釉上彩绘",
    decoration_gl: "瑞兽、植物",
    decoration: "龙纹、花果纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盘",
    type: "盘",
    inscription: "年号款",
    usage: "陈设器",
    url: "",
    colors: "#d8dad4，#84ba87，#94beac，#d5b94e，#09685e",
  },
  hbts35: {
    ID: "2：6827",
    name: "清嘉庆·黄地粉彩八吉祥纹瓷炉",
    dynasty: "清代",
    year: "嘉庆",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "吉祥纹、瑞兽、几何纹、植物",
    decoration: "八吉祥纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "炉",
    type: "炉",
    inscription: "年号款",
    usage: "供器",
    url: "",
    colors: "#b87096，#d5b94e，#4d6ba5，#09685e",
  },
  hbts36: {
    ID: "2：9238",
    name: "清康熙·冬青釉堆花云纹瓷水盂",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "官窑",
    variety: "冬青釉",
    crafts_gl: "堆花",
    crafts: "堆花",
    decoration_gl: "吉祥纹",
    decoration: "云纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "水盂",
    type: "水盂",
    inscription: "年号款",
    usage: "文房用具",
    url: "",
    colors: "#b1bca3",
  },
  hbts37: {
    ID: "2：3320",
    name: "清雍正·斗彩云纹瓷水盂",
    dynasty: "清代",
    year: "雍正",
    origin: "景德镇",
    nature: "官窑",
    variety: "斗彩",
    crafts_gl: "彩绘",
    crafts: "斗彩",
    decoration_gl: "吉祥纹",
    decoration: "云纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "水盂",
    type: "水盂",
    inscription: "年号款",
    usage: "文房用具",
    url: "",
    colors: "#e1e7e3，#c2d4c9，#B8461A，#46b292",
  },
  hbts38: {
    ID: "2：6828",
    name: "清嘉庆·黄地粉彩瓷八吉祥纹烛台",
    dynasty: "清代",
    year: "嘉庆",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "吉祥纹、植物",
    decoration: "八吉祥纹、植物纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "灯",
    type: "烛台",
    inscription: "年号款",
    usage: "供器",
    url: "",
    colors: "#b87096，#d5b94e，#4d6ba5，#09685e",
  },
  hbts39: {
    ID: "2：7893",
    name: "清道光·粉彩方格锦花纹瓷花盆",
    dynasty: "清代",
    year: "道光",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物、吉祥纹",
    decoration: "花卉纹、吉祥纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "花盆",
    inscription: "堂名款",
    usage: "陈设器",
    url: "",
    colors: "#a5c8b6，#7696c5，#25927c，#bf8ca1",
  },
  hbts40: {
    ID: "2：6977",
    name: "清光绪·大雅斋粉彩花卉纹水仙盆",
    dynasty: "清代",
    year: "光绪",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物",
    decoration: "花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "花盆",
    inscription: "堂名款",
    usage: "陈设器",
    url: "",
    colors: "#87c5c9，#bdc2c0，#09685e，#d5b94e",
  },
  hbts41: {
    ID: "2：6620",
    name: "清乾隆·黄地粉彩八吉祥花卉纹瓷觚",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "吉祥纹、植物",
    decoration: "八吉祥纹、植物纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "觚",
    type: "觚",
    inscription: "年号款",
    usage: "供器",
    url: "",
    colors: "#b87096，#d5b94e，#4d6ba5，#09685e",
  },
  hbts42: {
    ID: "2：6832",
    name: "清光绪·“大雅斋”蓝地粉彩花鸟纹瓷水仙盆",
    dynasty: "清代",
    year: "光绪",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物、瑞兽",
    decoration: "花鸟纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "花盆",
    inscription: "堂名款",
    usage: "陈设器",
    url: "",
    colors: "#9ad7d6，#3659a4，#604e34，#d5b94e",
  },
  hbts43: {
    ID: "2：1003",
    name: "明正德·青花加彩云龙纹瓷碗",
    dynasty: "明代",
    year: "正德",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘、锥刻",
    crafts: "釉下彩绘、釉上彩绘结合",
    decoration_gl: "瑞兽",
    decoration: "云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "碗",
    inscription: "年号款",
    usage: "陈设器、饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867，#50826d，#B8461A",
  },
  hbts44: {
    ID: "2：1483",
    name: "清康熙·青花山水人物纹花盆",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "山水纹、人物",
    decoration: "山水纹、人物纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "花盆",
    inscription: "年号款",
    usage: "陈设器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts45: {
    ID: "2：6312",
    name: "清康熙·釉里红海兽波涛纹蒜头瓶",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "官窑",
    variety: "釉里红",
    crafts_gl: "彩绘",
    crafts: "釉下彩",
    decoration_gl: "瑞兽、海水纹",
    decoration: "海兽波涛纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "蒜头瓶、洗口瓶",
    inscription: "",
    usage: "陈设器",
    url: "",
    colors: "#d5dfd7，#bd8e82",
  },
  hbts46: {
    ID: "2：6609",
    name: "清道光·绿彩折枝花卉纹六角瓷盆",
    dynasty: "清代",
    year: "道光",
    origin: "景德镇",
    nature: "官窑",
    variety: "绿彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物",
    decoration: "宝相花纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "六角瓷盆",
    inscription: "堂名款",
    usage: "盛装食用器",
    url: "",
    colors: "#c5d3ca，#00664b",
  },
  hbts47: {
    ID: "2：1261",
    name: "清雍正·青花釉里红花卉纹如意耳瓷瓶",
    dynasty: "清代",
    year: "雍正",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花、釉里红、青花釉里红",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物",
    decoration: "花卉纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "双耳瓷瓶、如意耳瓶",
    inscription: "年号款",
    usage: "陈设器",
    url: "",
    colors: "#AA877A，#d5dfd7，#1f3867",
  },
  hbts48: {
    ID: "2：1575",
    name: "清康熙·青花五彩花鸟纹高足碗",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "官窑",
    variety: "白地青花、五彩",
    crafts_gl: "彩绘",
    crafts: "釉下青花、釉上彩绘",
    decoration_gl: "植物、瑞兽",
    decoration: "花鸟纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "碗",
    type: "高足碗",
    inscription: "",
    usage: "陈设器、饮食器",
    url: "",
    colors: "#d5dfd7，#1f3867，#B8461A，#4E8E6D",
  },
  hbts49: {
    ID: "2：6604",
    name: "清道光·墨彩云龙纹海棠形瓷盆",
    dynasty: "清代",
    year: "道光",
    origin: "景德镇",
    nature: "官窑",
    variety: "墨彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "瑞兽",
    decoration: "云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盆",
    type: "海棠式盆",
    inscription: "堂名款",
    usage: "陈设器",
    url: "",
    colors: "#d5dfd7，#2c2d28",
  },
  hbts50: {
    ID: "2：8107",
    name: "清光绪·大雅斋粉彩鹭鸶荷花纹瓷高足盘",
    dynasty: "清代",
    year: "光绪",
    origin: "景德镇",
    nature: "官窑",
    variety: "粉彩",
    crafts_gl: "彩绘",
    crafts: "釉上彩绘",
    decoration_gl: "植物、瑞兽、吉祥纹、山水纹、海水纹",
    decoration: "鹭鸶荷花纹、海水江崖纹、寿山福海纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "盘",
    type: "高足盘",
    inscription: "堂名款",
    usage: "陈设器",
    url: "",
    colors: "#dddedd，#da8763，#c67297，#03535a",
  },
  hbts51: {
    ID: "2：1349",
    name: "清康熙·青花花鸟纹瓷瓶",
    dynasty: "清代",
    year: "康熙",
    origin: "景德镇",
    nature: "",
    variety: "白地青花",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘",
    decoration_gl: "植物、瑞兽",
    decoration: "花鸟纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "瓶",
    type: "洗口瓶",
    inscription: "",
    usage: "陈设器",
    url: "",
    colors: "#d5dfd7，#1f3867",
  },
  hbts52: {
    ID: "2：1454",
    name: "清乾隆·绿彩龙纹瓷盖罐",
    dynasty: "清代",
    year: "乾隆",
    origin: "景德镇",
    nature: "官窑",
    variety: "斗彩",
    crafts_gl: "彩绘",
    crafts: "釉下彩绘釉上彩绘结合",
    decoration_gl: "瑞兽、吉祥纹",
    decoration: "八吉祥云龙纹",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "罐",
    type: "盖罐",
    inscription: "年号款",
    usage: "陈设器",
    url: "",
    colors: "#d5dfd7，#1c5e4e",
  },
  hbts53: {
    ID: "2：961",
    name: "明·青釉瓷渣斗",
    dynasty: "明代",
    year: "",
    origin: "",
    nature: "",
    variety: "青釉",
    crafts_gl: "",
    crafts: "",
    decoration_gl: "",
    decoration: "",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "渣斗",
    type: "渣斗",
    inscription: "",
    usage: "陈设器",
    url: "",
    colors: "#5a5b4c，#b1bca3",
  },
  hbts54: {
    ID: "2：179",
    name: "南朝·青釉莲花纹鸡首壶",
    dynasty: "南朝",
    year: "",
    origin: "越窑",
    nature: "",
    variety: "青釉",
    crafts_gl: "刻花",
    crafts: "刻花",
    decoration_gl: "植物、瑞兽",
    decoration: "植物纹、瑞兽",
    material_gl: "陶瓷",
    material: "陶瓷",
    type_gl: "壶",
    type: "鸡首壶",
    inscription: "",
    usage: "饮食器",
    url: "",
    colors: "#604e34",
  },
  // "hbts55": {
  //   ID: "2：1178",
  //   name: "清雍正·青花折枝花卉纹梅瓶",
  //   dynasty: "清代",
  //   year: "雍正",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "白地青花",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩",
  //   decoration_gl: "植物",
  //   decoration: "折枝花卉纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "瓶",
  //   type: "梅瓶",
  //   inscription: "年号款",
  //   usage: "陈设器",
  //   url: "",
  //   colors: "#d5dfd7，#1f3867",
  // },
  // "hbts9": {
  //   ID: "2：5909",
  //   name: "西晋·青釉水波纹瓷盆",
  //   dynasty: "西晋",
  //   year: "",
  //   origin: "越窑",
  //   nature: "",
  //   variety: "青釉",
  //   crafts_gl: "刻花、模印",
  //   crafts: "刻花、模印、划花、贴塑、戳印",
  //   decoration_gl: "几何纹、瑞兽",
  //   decoration: "几何纹、瑞兽纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "盆",
  //   type: "折沿盆",
  //   inscription: "",
  //   usage: "盛装食用器",
  //   url: "",
  //   colors: "#604e34",
  // },
  // "hbts6": {
  //   ID: "2：6926",
  //   name: "明早期·白釉瓷爵杯",
  //   dynasty: "明代",
  //   year: "早期",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "白釉",
  //   crafts_gl: "模印",
  //   crafts: "模印",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "爵杯",
  //   type: "爵杯",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#d5dfd7",
  // },
  // "hbts8": {
  //   ID: "2：4148",
  //   name: "明正统·青花孔雀牡丹瓷梅瓶",
  //   dynasty: "明代",
  //   year: "正统",
  //   origin: "景德镇",
  //   nature: "民窑",
  //   variety: "白地青花",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩绘",
  //   decoration_gl: "瑞兽、植物",
  //   decoration: "孔雀纹、植物纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "瓶",
  //   type: "梅瓶",
  //   inscription: "",
  //   usage: "陈设器",
  //   url: "",
  //   colors: "#d5dfd7，#1f3867",
  // },
  // "hbts5": {
  //   ID: "2：6395",
  //   name: "明成化·青花宝相花纹瓷盘",
  //   dynasty: "明代",
  //   year: "成化",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "白地青花",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩绘",
  //   decoration_gl: "植物",
  //   decoration: "宝相花纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "盘",
  //   type: "盘",
  //   inscription: "",
  //   usage: "饮食器",
  //   url: "",
  //   colors: "#d5dfd7，#1f3867",
  // },
  // "hbts2": {
  //   ID: "2：6392",
  //   name: "明成化·青花松竹梅纹瓷盘",
  //   dynasty: "明代",
  //   year: "成化",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "白地青花",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩绘",
  //   decoration_gl: "植物",
  //   decoration: "松竹梅纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "盘",
  //   type: "盘",
  //   inscription: "",
  //   usage: "饮食器",
  //   url: "",
  //   colors: "#d5dfd7，#1f3867",
  // },
  // "hbts156": {
  //   ID: "10：12156",
  //   name: "明·金蝉玉叶",
  //   dynasty: "明代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "植物",
  //   decoration: "植物",
  //   material_gl: "金属器",
  //   material: "金、玉石",
  //   type_gl: "",
  //   type: "簪头",
  //   inscription: "",
  //   usage: "饰件",
  //   url: "https://vr.njmuseum.com/jcyy/",
  //   colors: "#dbccb2，#fece4d",
  // },
  // "hbts69": {
  //   ID: "10：8069",
  //   name: "元·刻花牡丹如意云边金盏",
  //   dynasty: "元代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "刻花",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "吉祥纹、植物",
  //   decoration: "如意云纹、植物纹",
  //   material_gl: "金属器",
  //   material: "金",
  //   type_gl: "盏",
  //   type: "盏",
  //   inscription: "",
  //   usage: "饮食器",
  //   url: "https://vr.njmuseum.com/jz/",
  //   colors: "#fece4d",
  // },
  // "hbts104": {
  //   ID: "10：26104",
  //   name: "新石器时代·透雕人鸟兽玉饰件",
  //   dynasty: "新石器时代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "透雕",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "瑞兽、人物",
  //   decoration: "人鸟兽形",
  //   material_gl: "",
  //   material: "玉石",
  //   type_gl: "",
  //   type: "饰件",
  //   inscription: "",
  //   usage: "供器",
  //   url: "https://vr.njmuseum.com/rnsys/",
  //   colors: "#dbccb2",
  // },
  // "hbts0": {
  //   ID: "3：7550",
  //   name: "西汉·金兽",
  //   dynasty: "西汉",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "瑞兽",
  //   decoration: "猛兽形",
  //   material_gl: "金属器",
  //   material: "金",
  //   type_gl: "",
  //   type: "",
  //   inscription: "",
  //   usage: "",
  //   url: "https://vr.njmuseum.com/xhjs/",
  //   colors: "#fece4d",
  // },
  // "hbts225": {
  //   ID: "10：23225",
  //   name: "东汉·错银铜牛灯",
  //   dynasty: "东汉",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "错银",
  //   crafts_gl: "错银",
  //   crafts: "错银",
  //   decoration_gl: "瑞兽、吉祥纹",
  //   decoration: "云气瑞兽纹、瑞兽形",
  //   material_gl: "金属器",
  //   material: "铜",
  //   type_gl: "灯",
  //   type: "牛形灯",
  //   inscription: "",
  //   usage: "灯具",
  //   url: "https://vr.njmuseum.com/tnd/#/",
  //   colors: "#967b52",
  // },
  // "hbts001": {
  //   ID: "10：19001",
  //   name: "东汉·鎏金银 嵌宝石 兽形铜砚盒",
  //   dynasty: "东汉",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "瑞兽",
  //   decoration: "瑞兽",
  //   material_gl: "金属器",
  //   material: "铜",
  //   type_gl: "砚",
  //   type: "砚",
  //   inscription: "",
  //   usage: "文房用具",
  //   url: "https://vr.njmuseum.com/tyh/",
  //   colors: "#967b52，#144f7d，#8dc6a9",
  // },
  // "hbts6": {
  //   ID: "3：2106",
  //   name: "明正统·鎏金藏式佛塔",
  //   dynasty: "明代",
  //   year: "正统",
  //   origin: "",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "",
  //   crafts: "铸造、锤揲",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "金属器",
  //   material: "铜",
  //   type_gl: "塔",
  //   type: "藏式佛塔套件",
  //   inscription: "",
  //   usage: "供器",
  //   url: "https://vr.njmuseum.com/ljzsft/",
  //   colors: "#967b52，#d5dfd7，#1f3867，#7d665f",
  // },
  // "hbts59": {
  //   ID: "10：2259",
  //   name: "明洪武·釉里红三友带盖梅瓶",
  //   dynasty: "明代",
  //   year: "洪武",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "釉里红",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩绘",
  //   decoration_gl: "植物",
  //   decoration: "松竹梅纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "瓶",
  //   type: "带盖梅瓶",
  //   inscription: "",
  //   usage: "陈设器",
  //   url: "https://vr.njmuseum.com/meiping/",
  //   colors: "#d5dfd7，#2c2d28",
  // },
  // "hbts2": {
  //   ID: "2：6342",
  //   name: "明永乐·青花“寿山福海”纹炉",
  //   dynasty: "明代",
  //   year: "永乐",
  //   origin: "景德镇",
  //   nature: "官窑",
  //   variety: "蓝地青花",
  //   crafts_gl: "彩绘",
  //   crafts: "釉下彩绘",
  //   decoration_gl: "山水纹、海水纹",
  //   decoration: "海水江崖纹",
  //   material_gl: "陶瓷",
  //   material: "陶瓷",
  //   type_gl: "炉",
  //   type: "香炉",
  //   inscription: "",
  //   usage: "供器",
  //   url: "https://vr.njmuseum.com/ssfhwxl/",
  //   colors: "#d5dfd7，#1f3867",
  // },
  // 111111: {
  //   ID: "111111",
  //   name: "清·龙珠海水纹端砚",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "雕刻",
  //   crafts: "雕刻",
  //   decoration_gl: "瑞兽、吉祥纹、海水纹、诗文",
  //   decoration: "龙珠海水纹",
  //   material_gl: "",
  //   material: "",
  //   type_gl: "砚",
  //   type: "砚",
  //   inscription: "",
  //   usage: "文房用具",
  //   url: "https://vr.njmuseum.com/lzhswdy/",
  //   colors: "#7b5c49",
  // },
  // "hbts529": {
  //   ID: "10：28529",
  //   name: "西汉·鎏金铜鹿灯",
  //   dynasty: "西汉",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "",
  //   crafts: "",
  //   decoration_gl: "吉祥纹、瑞兽",
  //   decoration: "云气纹、瑞兽",
  //   material_gl: "金属器",
  //   material: "铜",
  //   type_gl: "灯",
  //   type: "鹿形灯",
  //   inscription: "",
  //   usage: "灯具",
  //   url: "https://vr.njmuseum.com/tld/",
  //   colors: "#b38d62，#50331c",
  // },
  // "hbts323": {
  //   ID: "10：28323",
  //   name: "西汉·“长毋相忘”铭合符银带钩",
  //   dynasty: "西汉",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "铸造、错银",
  //   crafts: "铸造、错银",
  //   decoration_gl: "吉祥纹、瑞兽",
  //   decoration: "云气纹、瑞兽",
  //   material_gl: "金属器",
  //   material: "银",
  //   type_gl: "带钩",
  //   type: "带钩",
  //   inscription: "",
  //   usage: "饰件",
  //   url: "",
  //   colors: "#948378，#84706a",
  // },
  // "hbts4": {
  //   ID: "3：8204",
  //   name: "清·铜鎏金绿度母像",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#B8461A，#201b16，#4d6ba5",
  // },
  // "hbts2": {
  //   ID: "3：8762",
  //   name: "清乾隆·“尊胜佛母”铜像",
  //   dynasty: "清代",
  //   year: "乾隆",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52",
  // },
  // "hbts3": {
  //   ID: "3：8763",
  //   name: "清·“栴檀”铜像",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#1f3867",
  // },
  // "hbts7": {
  //   ID: "3：9027",
  //   name: "清·“无量寿佛”铜像",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#B8461A，#1f3867，#4d6ba5",
  // },
  // "hbts9": {
  //   ID: "3：9029",
  //   name: "清·莲花手观音铜像",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#B8461A，#1f3867，#4d6ba5",
  // },
  // "hbts1": {
  //   ID: "3：9111",
  //   name: "清乾隆·“白马头金刚佛”铜像",
  //   dynasty: "清代",
  //   year: "乾隆",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "红彩漆金、铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#B8461A，#7b5c49",
  // },
  // "hbts6": {
  //   ID: "3：9126",
  //   name: "清·鎏金铜佛像",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "鎏金",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "造像",
  //   material: "铜",
  //   type_gl: "造像",
  //   type: "造像",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#1f3867",
  // },
  // "hbts8": {
  //   ID: "3：9168",
  //   name: "清·铜珐琅佛塔",
  //   dynasty: "清代",
  //   year: "",
  //   origin: "清宫造办处",
  //   nature: "",
  //   variety: "",
  //   crafts_gl: "铸造、锤揲、錾刻、镶嵌",
  //   crafts: "画珐琅、铸造、锤揲、錾刻、镶嵌",
  //   decoration_gl: "",
  //   decoration: "",
  //   material_gl: "金属器",
  //   material: "铜",
  //   type_gl: "塔",
  //   type: "藏式佛塔",
  //   inscription: "",
  //   usage: "供器",
  //   url: "",
  //   colors: "#967b52，#4d6ba5，#b87096，#92beb7",
  // },
};

// 辅助函数，用于创建分类数据
function createCategoryData(lxs, key) {
  let mapAcc = Object.keys(lxs).reduce((acc, lxKey) => {
    const item = lxs[lxKey];
    if (item[key] != null && item[key] !== "") {
      // 确保属性存在且不为空
      const values = Array.isArray(item[key]) ? item[key] : item[key].split(key === "colors" ? "，" : "、");
      values.forEach((value) => {
        if (!acc.has(value)) {
          acc.set(value, []);
        }
        acc.get(value).push(item.ID);
      });
    }
    return acc;
  }, new Map());

  // 将 Map 转换为普通对象之前，删除空数组
  let objAcc = Object.fromEntries(mapAcc);
  Object.keys(objAcc).forEach((k) => {
    if (objAcc[k].length === 0) {
      delete objAcc[k];
    }
  });

  return objAcc;
}

// 辅助函数，用于移除只有一个ID的分类
function removeSingleItemCategories(data) {
  // // 删除只包含一条数据的键
  // Object.keys(data).forEach((k) => {
  //   if (data[k].length === 1) {
  //     delete data[k];
  //   }
  // });

  return data;
}
// 创建分类数据
// 同朝代

var dynastydata = removeSingleItemCategories(createCategoryData(lxs, "dynasty"));

var dynastyorder = ["新石器时代", "西周", "春秋", "西汉", "东汉", "东吴—西晋", "西晋", "南朝", "王氏高丽王朝", "南宋", "元代", "明代", "清代"];

// 同产地
var origindata = removeSingleItemCategories(createCategoryData(lxs, "origin"));
// 同工艺
var craftsdata = removeSingleItemCategories(createCategoryData(lxs, "crafts_gl"));
// 同纹饰
var decorationdata = removeSingleItemCategories(createCategoryData(lxs, "decoration_gl"));
// 同材质
var material_gldata = removeSingleItemCategories(createCategoryData(lxs, "material_gl"));
var materialdata = removeSingleItemCategories(createCategoryData(lxs, "material"));
// 同器型
var typedata = removeSingleItemCategories(createCategoryData(lxs, "type_gl"));

//同款识
var inscriptiondata = removeSingleItemCategories(createCategoryData(lxs, "inscription"));

// 同用途
var usagedata = removeSingleItemCategories(createCategoryData(lxs, "usage"));

// // 同寓意
// const meaningdata = removeSingleItemCategories(
//   createCategoryData(lxs, 'meaning')
// );

// 同用途
var naturedata = removeSingleItemCategories(createCategoryData(lxs, "nature"));

// 同用途
var varietydata = removeSingleItemCategories(createCategoryData(lxs, "variety"));

// console.log(
//   dynastydata,
//   origindata,
//   craftsdata,
//   decorationdata,
//   materialdata,
//   typedata,
//   inscriptiondata,
//   usagedata,
//   meaningdata
// );

// 定义明代年份顺序
var mingYearOrder = ["", "早期", "洪武", "永乐", "宣德", "正统", "成化", "正德", "隆庆", "万历"];

// 定义清代年份顺序
var qingYearOrder = ["", "康熙", "雍正", "乾隆", "嘉庆", "道光", "同治", "光绪"];

// 将对象转换为数组
var lxsArray = Object.values(lxs);
// 排序
lxsArray.sort((a, b) => {
  const dynastyA = dynastyorder.indexOf(a.dynasty);
  const dynastyB = dynastyorder.indexOf(b.dynasty);

  if (dynastyA !== dynastyB) {
    return dynastyA - dynastyB; // 按朝代顺序排序
  } else if (a.dynasty === "明代" && b.dynasty === "明代") {
    return mingYearOrder.indexOf(a.year) - mingYearOrder.indexOf(b.year); // 按明代年份排序
  } else if (a.dynasty === "清代" && b.dynasty === "清代") {
    return qingYearOrder.indexOf(a.year) - qingYearOrder.indexOf(b.year); // 按清代年份排序
  } else {
    return 0;
  }
});

// 为每个年代的第一条数据添加 firstdynasty=1 标识
var lastDynasty = null;
lxsArray.forEach((item) => {
  if (item.dynasty !== lastDynasty) {
    item.firstdynasty = 1;
    lastDynasty = item.dynasty;
  }
});

function getName(name) {
  if (!name) return;
  var temp = name.split("·");
  if (temp.length > 1) {
    return { name: temp[1], dynasty: temp[0] };
  } else {
    return { name: name, dynasty: "" };
  }
}

var colorsorder = ["#B8461A", "#bd8e82", "#b87096", "#d5b94e", "#fece4d", "#c6792c", "#b1bca3", "#4e7854", "#09685e", "#92beb7", "#4d6ba5", "#1f3867", "#967b52", "#604e34", "#7b5c49", "#d5dfd7", "#dbccb2", "#201b16"];

// 将颜色转换为 RGB 格式
function hexToRgb(hex) {
  // 去除 # 号
  hex = hex.replace(/^#/, "");
  // 解析为 RGB
  let bigint = parseInt(hex, 16);
  let r = (bigint >> 16) & 255;
  let g = (bigint >> 8) & 255;
  let b = bigint & 255;
  return { r, g, b };
}

// 将 rgba 字符串转换为 RGB 对象
function rgbaToRgb(rgba) {
  let match = rgba.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
  return {
    r: parseInt(match[1]),
    g: parseInt(match[2]),
    b: parseInt(match[3]),
  };
}

// 计算两种颜色之间的欧几里得距离
function colorDistance(color1, color2) {
  return Math.sqrt(Math.pow(color1.r - color2.r, 2) + Math.pow(color1.g - color2.g, 2) + Math.pow(color1.b - color2.b, 2));
}

// 找到最接近的颜色
function getClosestColor(c1, colors) {
  var cRgb = hexToRgb(c1);
  var minDistance = Infinity;
  var closestColor = null;

  colors.forEach(function (color) {
    var colorRgb = hexToRgb(color);
    var distance = colorDistance(cRgb, colorRgb);
    if (distance < minDistance) {
      minDistance = distance;
      closestColor = color;
    }
  });

  return closestColor;
}
// 检查两个颜色是否相似
function isColorSimilar(color1, color2, threshold = 50) {
  return colorDistance(color1, color2) < threshold;
}

// 找到类似颜色的数据
function findSimilarColors(currentColor, data, threshold = 50) {
  let currentRgb = hexToRgb(currentColor);
  let result = [];

  data.forEach((item) => {
    // 将 colors 字符串拆分为数组
    let colorsArray = item.colors.split("，"); // 注意是中文逗号
    // 检查是否有颜色相近
    let hasSimilarColor = colorsArray.some((color) => {
      let colorRgb = hexToRgb(color.trim()); // 去除空格
      return isColorSimilar(currentRgb, colorRgb, threshold);
    });

    // 如果有相近颜色，则将整个对象加入结果
    if (hasSimilarColor) {
      result.push(item); // 直接加入整个对象
    }
  });

  return result;
}
