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 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; }
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/**
 * 将 `FloorMapLayoutContext` 与 Layout props 合并：各字段 props ?? ctx，props 显式值优先。
 */
export function mergeFloorMapLayoutPropsFromContext(props, ctx) {
  var _props$floorMapConfig, _props$dataSources, _props$onSave, _props$onDataSourceRe, _props$dataSourceLabe, _props$dataSourceForm, _props$dataSourceReco, _props$loading, _props$saveError, _props$onElementRende, _props$toolbarShowSav, _props$floorMapFullsc, _props$showDataSource, _props$viewportDockTr;
  if (ctx == null) return props;
  return _objectSpread(_objectSpread({}, props), {}, {
    floorMapConfig: (_props$floorMapConfig = props.floorMapConfig) !== null && _props$floorMapConfig !== void 0 ? _props$floorMapConfig : ctx.floorMapConfig,
    dataSources: (_props$dataSources = props.dataSources) !== null && _props$dataSources !== void 0 ? _props$dataSources : ctx.dataSources,
    onSave: (_props$onSave = props.onSave) !== null && _props$onSave !== void 0 ? _props$onSave : ctx.onSave,
    onDataSourceRecordSave: (_props$onDataSourceRe = props.onDataSourceRecordSave) !== null && _props$onDataSourceRe !== void 0 ? _props$onDataSourceRe : ctx.onDataSourceRecordSave,
    dataSourceLabels: (_props$dataSourceLabe = props.dataSourceLabels) !== null && _props$dataSourceLabe !== void 0 ? _props$dataSourceLabe : ctx.dataSourceLabels,
    dataSourceFormColumns: (_props$dataSourceForm = props.dataSourceFormColumns) !== null && _props$dataSourceForm !== void 0 ? _props$dataSourceForm : ctx.dataSourceFormColumns,
    dataSourceRecordForm: (_props$dataSourceReco = props.dataSourceRecordForm) !== null && _props$dataSourceReco !== void 0 ? _props$dataSourceReco : ctx.dataSourceRecordForm,
    loading: (_props$loading = props.loading) !== null && _props$loading !== void 0 ? _props$loading : ctx.loading,
    saveError: (_props$saveError = props.saveError) !== null && _props$saveError !== void 0 ? _props$saveError : ctx.saveError,
    onElementRenderError: (_props$onElementRende = props.onElementRenderError) !== null && _props$onElementRende !== void 0 ? _props$onElementRende : ctx.onElementRenderError,
    toolbarShowSave: (_props$toolbarShowSav = props.toolbarShowSave) !== null && _props$toolbarShowSav !== void 0 ? _props$toolbarShowSav : ctx.toolbarShowSave,
    floorMapFullscreenMode: (_props$floorMapFullsc = props.floorMapFullscreenMode) !== null && _props$floorMapFullsc !== void 0 ? _props$floorMapFullsc : ctx.floorMapFullscreenMode,
    showDataSourceRecordFormBlock: (_props$showDataSource = props.showDataSourceRecordFormBlock) !== null && _props$showDataSource !== void 0 ? _props$showDataSource : ctx.showDataSourceRecordFormBlock,
    viewportDockTrailing: (_props$viewportDockTr = props.viewportDockTrailing) !== null && _props$viewportDockTr !== void 0 ? _props$viewportDockTr : ctx.viewportDockTrailing
  });
}