"use strict";
const common_vendor = require("../../vendor.js");
const STORAGE_PREFIX = "aimz_";
const getFullKey = (key) => {
  return `${STORAGE_PREFIX}${key}`;
};
const set = (key, data) => {
  try {
    const fullKey = getFullKey(key);
    common_vendor.index.setStorageSync(fullKey, data);
    return true;
  } catch (error) {
    common_vendor.index.__f__("error", "at common/js/cache/storage.js:19", "Storage set error:", error);
    return false;
  }
};
const get = (key, defaultValue = null) => {
  try {
    const fullKey = getFullKey(key);
    const value = common_vendor.index.getStorageSync(fullKey);
    return value || defaultValue;
  } catch (error) {
    common_vendor.index.__f__("error", "at common/js/cache/storage.js:31", "Storage get error:", error);
    return defaultValue;
  }
};
exports.get = get;
exports.set = set;
//# sourceMappingURL=../../../../.sourcemap/mp-baidu/common/js/cache/storage.js.map
