text: /*!
   * OpenUI5
   * (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor","sap/base/util/restricted/_omit","sap/base/util/restricted/_merge","sap/base/util/deepClone"],function(B,_,a,d){"use strict";var C=B.extend("sap.ui.integration.designtime.cardEditor.propertyEditor.complexMapEditor.ComplexMapEditor",{xmlFragment:"sap.ui.integration.designtime.cardEditor.propertyEditor.complexMapEditor.ComplexMapEditor",metadata:{library:"sap.ui.integration"},renderer:B.getMetadata().getRenderer().render});C.configMetadata=Object.assign({},B.configMetadata,{allowKeyChange:{defaultValue:true,mergeStrategy:"mostRestrictiveWins"},allowAddAndRemove:{defaultValue:true,mergeStrategy:"mostRestrictiveWins"},keyLabel:{defaultValue:"{i18n>CARD_EDITOR.COMPLEX_MAP.KEY}"}});C.prototype.getExpectedWrapperCount=function(){return 1;};C.prototype.onFragmentReady=function(){this._oNestedArrayEditor=this.getContent();this._oNestedArrayEditor.attachValueChange(function(e){var p=e.getParameter("previousValue")||[];var v=d(e.getParameter("value")||[]);var n={};var D=this.getDesigntimeProperties();v=v.map(function(V,i){if(typeof V.key==="undefined"){var k="key";var b=0;var c=function(E){return E.key===k;};while(v.some(c)){k="key"+ ++b;}V.key=k;}var o={};D.forEach(function(P){o[P]=d(V[P]);});n[V.key]={__value:o};return _(V,D);});var N=this._processOutputValue(v);p.forEach(function(P){var o=P.key;if(o!==undefined&&!N.hasOwnProperty(o)){n[o]=null;}});this.setValue(N);this.setDesigntimeMetadata(a({},this.getConfig().designtime,n));},this);};C.prototype._processInputValue=function(v){var D=this.getDesigntimeProperties();if(!v){v={};}var f=Object.keys(v).map(function(k){var F=d(v[k]);F.key=k;var o=this.getNestedDesigntimeMetadataValue(k);D.forEach(function(p){F[p]=o[p];});return F;}.bind(this));return f;};C.prototype.getDesigntimeProperties=function(){return[];};C.prototype.onBeforeConfigChange=function(c){var t={};if(c["allowKeyChange"]){t={key:{label:c["keyLabel"],type:"string",path:"key",validators:{uniqueKey:{type:"isUniqueKey",config:{keys:function(){return Object.keys(this.getValue());}.bind(this),currentKey:function(p){return p.getValue();}}}}}};}var A=a({},{template:t,allowSorting:false},c,{type:"array",path:""});this._oDefaultModel.setData(Object.assign({},this._oDefaultModel.getData(),{nestedConfig:A}));return c;};C.prototype.setValue=function(v){var f=this._processInputValue(v);this._oDefaultModel.setData(Object.assign({},this._oDefaultModel.getData(),{nestedValue:f}));B.prototype.setValue.call(this,v);};C.prototype._processOutputValue=function(v){var f={};v.forEach(function(V){f[V.key]=_(V,"key");});return f;};return C;});
  