"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("lodash-unified"),l=require("./formatter/index.js");function c(e,t){const r=l.formatterMap[t.valueType];return r?r(e,t.extraProps||{}):e.value}function d(e,t){if(t.isShowEmptyPlaceholder===!1)return!1;switch(t.valueType){case"text":case"number":case"dateRange":case"date":return e==null||e==="";case"array":case"attachment":return f.isEmpty(e);default:return!e}}function m(e={},t){return t.fromGlobal?{...e,downloadFile(r,n){return t.fromGlobal?.([{fileName:n,objectName:r}])}}:!e?.downloadFile&&t.fromConfig?{...e,downloadFile:t.fromConfig}:e}function y(e,t={},r){const n=t;return e?.forEach(i=>{const a=s(i),o=u(i,r);a&&n[a]===void 0&&o&&(n[a]=o.default)}),n}function u(e,t){if(e.valueType==="empty")return;const r=e.mask!==void 0?e.mask:t;if(!r)return;const n={default:!1,hideIcon:!1,renderMask(){return"****"}};return r===!0?n:{...n,...r}}function s(e){return f.isArray(e.field)?e.field.join("."):e.field}exports.genDefaultMaskStatus=y;exports.getMaskConfigBySchema=u;exports.getSchemaKey=s;exports.isEmptyWithType=d;exports.mixinsAttachmentExtraProps=m;exports.transformValue=c;
