module.exports = "(function(t,e,a){Object.defineProperty(e,\"__esModule\",{value:!0});var r=a(5894),i=a(7358),n=a(4934);t.exports={initialize:function(){this.__state={variationIdMap:{},preferredLayerMap:{},contextualMabMap:{},odpSegments:{}},this.on(i.UPDATE_VARIATION_ID_MAP,this.__updateVariationIdMap),this.on(i.MERGE_VARIATION_ID_MAP,this.__mergeVariationIdMap),this.on(i.UPDATE_PREFERRED_LAYER_MAP,this.__updatePreferredLayerMap),this.on(i.MERGE_PREFERRED_LAYER_MAP,this.__mergePreferredLayerMap),this.on(i.UPDATE_CONTEXTUAL_MAB_MAP,this.__updateContextualMabMap),this.on(i.MERGE_CONTEXTUAL_MAB_MAP,this.__mergeContextualMabMap),this.on(i.SET_ODP_SEGMENTS,this.__setOdpSegments)},__setOdpSegments:function(t){this.__state.odpSegments=t,this.emitChange()},getOdpSegments:function(){return this.__state.odpSegments},getContextualMabMap:function(){return r.cloneDeep(this.__state.contextualMabMap)},getContextualMabMapString:function(){return n.stringify(this.__state.contextualMabMap)},__updateContextualMabMap:function(t){var e=this.__state.contextualMabMap[t.layerId]||{};r.isEqual(e[t.experimentId],t.variationData)||(e[t.experimentId]=t.variationData,this.__state.contextualMabMap[t.layerId]=e,this.emitChange())},__mergeContextualMabMap:function(t){var e=this.__state.contextualMabMap;r.forEach(t.contextualMabMap,(function(t,a){e[a]||(e[a]={}),r.forEach(t,(function(t,r){e[a][r]||(e[a][r]=t)}))})),this.__state.contextualMabMap=e,this.emitChange()},getVariationIdMap:function(){return r.cloneDeep(this.__state.variationIdMap)},getVariationIdMapString:function(){return n.stringify(this.__state.variationIdMap)},__updateVariationIdMap:function(t){var e=this.__state.variationIdMap[t.layerId]||{};e[t.experimentId]!==t.variationId&&(e[t.experimentId]=t.variationId,this.__state.variationIdMap[t.layerId]=e,this.emitChange())},__mergeVariationIdMap:function(t){var e=this.getVariationIdMap(),a=t.variationIdMap;r.each(e||{},(function(t,e){a[e]?r.assign(a[e],t):a[e]=t})),this.__state.variationIdMap=a,this.emitChange()},getPreferredLayerMap:function(){return r.cloneDeep(this.__state.preferredLayerMap)},getPreferredLayerMapString:function(){return n.stringify(this.__state.preferredLayerMap)},getPreferredLayerId:function(t){return this.__state.preferredLayerMap[t]},__updatePreferredLayerMap:function(t){this.__state.preferredLayerMap[t.groupId]!==t.layerId&&(this.__state.preferredLayerMap[t.groupId]=t.layerId,this.emitChange())},__mergePreferredLayerMap:function(t){var e=this.getPreferredLayerMap(),a=t.preferredLayerMap;r.assign(a,e),this.__state.preferredLayerMap=a,this.emitChange()}}})";