{"templates":{"add-palette-modal.html":"
\n\t
\n\t
\n\t\t\n\t\t\t\tREMOVE\n\t\t\n\t
\n\t\n\t\t\t\n\t\n\t\n\t\t\t\n\t\n
\n","axis-config.html":"
\n\t\n\t
\n\t\t\n\t
\n
\n
\n\t\n\t
\n\t\t\n\t\t\n\t
\n
\n
\n\t\n\t
\n\t\t\n\t
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n","color-palette-picker.html":"
\n\t
\n\t\tCUSTOM_PALETTE\n\t\t\n\t\t\n\t
\n\t
\n\t\t\n\t\t\t\n\t\t\n\t
\n
\n
\n\t\n
\n","legend-config.html":"
\n\t\n\t
\n\t\t\n\t\t\n\t
\n
\n
\n\t\n\t
\n\t\t\n\t
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n
\n\t\n\t\n
\n","modify-palettes-modal.html":"
\n\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tPALETTE_REMOVED\n\t\t\t\t\tUNDO\n\t\t\t\t\n\t\t\t\n\t
\n\t
\n\t\t\n\t\tADD_CUSTOM_PALETTE\n\t
\n\n","switch-menu.html":"
\n\t\n
\n","widget-body.html":"
\n\t
\n\t\t
{{alertMessage}}
\n\t
\n
\n
\n\t
\n\t\t
\n\t
\n\t
\n
\n\n","widget-config.html":"
\n"},"js":"!function(e){\"use strict\";e.constant(\"widget.componentBase.axisConfig.actionTypes\",{SET_ORDER:\"SET_AXIS_ORDER\",SET_OVERRIDE:\"SET_AXIS_OVERRIDE\",SORT_AXIS_DATA:\"SORT_AXIS_DATA\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.constant(\"widget.componentBase.axisConfig.constants\",{SORT_TYPES:{DEFAULT:\"DEFAULT\",LABEL:\"LABEL\",VALUE:\"VALUE\",CUSTOM:\"CUSTOM\"},UPDATES:{ENABLED:\"enabled\",LABEL:\"label\",COLOR:\"color\",ORDER:\"order\",SORT_TYPE:\"sortType\",SORT_ASC:\"sortAsc\",FIELD_NAME:\"fieldName\",SHOW_METRIC_TYPE:\"showMetricType\"},DEFAULT_SORT_OPTIONS:{sortType:\"DEFAULT\",sortAsc:!1,sortField:void 0,customOrder:[],defaultOrder:[]}})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){function o(){i();var o=[];r.allowedSortTypes&&(o=_.pick(t.SORT_TYPES,r.allowedSortTypes)),o=n.localizeObject(o),r.sortTypes=_.map(o,function(n,o){var i={label:n,value:o};return o===t.SORT_TYPES.VALUE&&(r.axisData[0].value||r.axisData[0].rawLabel&&r.axisdata.length>1)&&(i.submenu={items:e.generateSortingLegendOptionsMenu(r.axisData,t.SORT_TYPES.VALUE,r.onChange,r.axisLabelOverrides)}),i})}function i(){var e=r.axisData[0].value?!_.find(r.axisData.value,{label:r.sortOptions.sortField}):!_.find(r.axisData,{rawLabel:r.sortOptions.sortField});e&&r.axisData.length&&(e=!_.find(r.axisData[0].value,function(e){return e.label===r.sortOptions.sortField||e.rawLabel===r.sortOptions.sortField||e.key===r.sortOptions.sortField})),r.sortOptions.sortType===t.SORT_TYPES.VALUE&&r.sortOptions.sortField&&e&&(r.sortOptions=t.DEFAULT_SORT_OPTIONS)}var r=this;r.$onChanges=function(e){r.data=_.map(r.axisData,function(e,t){return{key:e.key,order:t,enabled:r.enabledOverrides&&r.enabledOverrides[e.key]!==!1||e.enabled,color:r.colorOverrides&&r.colorOverrides[e.key]||e.color,rawLabel:e.label,label:r.labelOverrides&&r.labelOverrides[e.key]}}),r.sectionTitle=_.isUndefined(r.sectionTitleOverride)?\"AXIS_VALUES\":r.sectionTitleOverride,r.order=_.map(r.data,\"key\"),r.showSort=!_.isEmpty(r.allowedSortTypes),(e.sortOptions||e.axisData)&&r.showSort&&o()},r.sortableOptions={axis:\"y\",handle:\".drag-handle\"},r.getCurrentSortLabel=function(){return e.getCurrentSortLabel(r.sortTypes,r.sortOptions.sortType,r.sortOptions.sortField,r.axisData[0].value,t.SORT_TYPES.VALUE,t.DEFAULT_SORT_OPTIONS.sortType,r.axisLabelOverrides)},r.changeAxisColor=function(e,t,n){e!==t&&r.onChange({type:\"color\",key:n,value:t})}}t.$inject=[\"widget.componentBase.axisConfig.subMenuBuilder\",\"widget.componentBase.axisConfig.constants\",\"widget.componentBase.localizationHelper\"],e.factory(\"widget.componentBase.axisConfig\",[\"widget.componentBase.axisConfig.actionTypes\",\"widget.componentBase.legendConfig.sortHelper\",\"widget.componentBase.axisConfig.constants\",\"widget.componentBase.logger\",function(e,t,n,o){function i(t){return{type:e.SET_ORDER,order:t}}function r(e,t){var o={axisOrder:t.order,axisSortOptions:{sortType:n.SORT_TYPES.CUSTOM,sortAsc:e.axisSortOptions&&e.axisSortOptions.sortAsc,sortField:void 0,customOrder:e.axisSortOptions&&p(t.order,e.axisSortOptions.sortAsc),defaultOrder:e.sortOption&&e.axisSortOptions.defaultOrder}};return _.assign({},e,o)}function a(t,n,o){return{type:e.SET_OVERRIDE,overrideType:t,key:n,value:o}}function s(e,t){var o,i=e.axisColorOverrides||{},r=e.axisEnabledOverrides||{},a=e.axisLabelOverrides||{},s=e.axisFieldNameOverride||\"\";switch(t.overrideType){case n.UPDATES.ENABLED:o=r;break;case n.UPDATES.COLOR:o=i;break;case n.UPDATES.LABEL:o=a;break;case n.UPDATES.FIELD_NAME:s=_.isUndefined(t.value)?s:t.value;break;case n.UPDATES.SHOW_METRIC_TYPE:e.showMetricType=t.value}return o&&(o[t.key]=t.value),_.assign({},e,{axisColorOverrides:i,axisLabelOverrides:a,axisEnabledOverrides:r,axisFieldNameOverride:s})}function c(t,n,o,i){return{type:e.SORT_AXIS_DATA,sortType:t,sortAsc:n,sortField:o,data:i}}function d(e,t){if(!n.SORT_TYPES[t.sortType])return o.error(\"Error: Attempted setting an invalid sort type\"),e;var i={sortType:t.sortType,sortAsc:t.sortAsc,sortField:t.sortField,customOrder:e.axisSortOptions.customOrder,defaultOrder:e.axisSortOptions.defaultOrder};return g(e,i,t.data)}function u(e,t,n,o){var i=l(e,n.axisOrder),r=_.map(i,function(e){var n=t&&t.getNext();return _.assign({},e,{color:n,key:e.key||e.label,label:e.label||e.key})});return o&&(r=f(r,_.pick(n,[\"axisColorOverrides\",\"axisLabelOverrides\",\"axisEnabledOverrides\"]))),r}function l(e,t){var n={};_.forEach(e,function(e){n[e.key||e.label]=e});var o=_.union(t,_.map(e,function(e){return e.key||e.label}));return _.compact(_.map(o,function(e){return n[e]}))}function f(e,t){var n=t.axisColorOverrides||{},o=t.axisEnabledOverrides||{},i=t.axisLabelOverrides||{};return _.forEach(e,function(e){var t=e.key;e.color=n[t]||e.color,e.label=i[t]||e.label,e.enabled=o[t]!==!1})}function g(e,n,o){var i=t.getSortedOrder(o,n,e.axisLabelOverrides),r={axisOrder:i,axisSortOptions:n};return\"CUSTOM\"===n.sortType&&(r.axisSortOptions.customOrder=p(i,n.sortAsc)),_.assign({},e,r)}function p(e,t){return t?e:_.cloneDeep(e).reverse()}return{axisOrderAction:i,axisOrderReducer:r,axisConfigAction:a,axisConfigReducer:s,axisSortAction:c,axisSortReducer:d,processData:u,sortData:l,mergeOverrides:f}}]),e.directive(\"widget.componentBase.axisConfig\",function(){return{scope:{axisData:\"<\",axisLabelOverrides:\"<\",sectionTitleOverride:\"<\",allowFieldNameOverride:\"<\",axisFieldNameOverride:\"<\",labelOverrides:\"<\",colorOverrides:\"<\",sortOptions:\"<\",allowedSortTypes:\"<\",enabledOverrides:\"<\",enableColorOverride:\"<\",showMetricType:\"<\",onChange:\"&\"},templateUrl:\"eng/component-base/templates/axis-config.html\",controller:t,controllerAs:\"$ctrl\",bindToController:!0}})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.axisConfig.subMenuBuilder\",[function(){function e(e,t,n,o,i,r,a){var t=_.find(e,{value:t});if(t.value===i&&n){if(a){var s=_.find(o,function(e){return e.label===n||e.rawLabel===n||e.key===n});return s&&s.key?a[s.key]||s.label||n:r}return n}return t.label}function t(e,t,n,o){return _.map(e[0].value||e,function(e){return{label:o&&o[e.key]||e.label||e.rawLabel||e.key.toString(),value:e.rawLabel||e.label||e.key,action:function(){n({type:\"sortType\",key:t,value:{type:t,sortField:e.rawLabel||e.label||e.key}})}}})}return{getCurrentSortLabel:e,generateSortingLegendOptionsMenu:t}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,o,i){var r=this;return r.opts=e.opts||{},delete e.opts,r.override=i,r.id=r.opts.id,r.colors=r.opts.colors||_.cloneDeep(n),r.activeIndex=0,e.$ctrl=r,o(function(){r.picker=$(\".inline-picker\").colorpicker({inline:!0,container:!0,color:r.colors[r.activeIndex],showInput:!0,format:\"hex\"}).on(\"changeColor\",function(t){r.setValue(t.color.toHex()),e.$$phase||e.$digest()}).data(\"colorpicker\")}),this}var n=[\"#1E88E5\"],o=8,i=1;t.$inject=[\"$scope\",\"$filter\",\"$timeout\",\"widget.componentBase.override\"];var r=t.prototype;r.setActive=function(e){this.activeIndex=e,this.picker.setValue(this.colors[e])},r.setValue=function(e){this.colors[this.activeIndex]=e},r.add=function(){this.colors.length+1>o||(this.colors.push(this.colors[this.colors.length-1]),this.setActive(this.colors.length-1))},r.remove=function(){this.colors.length-1=this.colors.length&&(this.activeIndex=this.colors.length-1))},r.savePalette=function(){var e=this.override.get(this.override.OVERRIDES.SET_CUSTOM_COLOR_PALETTE,[this.colors,this.id]);this.opts&&this.opts.onSave&&this.opts.onSave(e)},e.controller(\"widget.componentBase.addPaletteController\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=\"Custom\",n=function(e,t){this.translate=t(\"translate\"),this.colorPaletteService=e;var n=this;n.$onInit=function(){this.selectedPalette||(this.selectedPalette=e.getDefaultColorPalette())}};n.$inject=[\"widget.componentBase.colorPaletteService\",\"$filter\"];var o=n.prototype;o.getColorPaletteItems=function(){var e=[],n=this,o=this.colorPaletteService.getColorPalettes();return this.includeCustom===!1&&delete o.Custom,_.forEach(o,function(o,i){e.push({label:n.translate(i.toUpperCase()),header:!0}),_.forEach(o,function(t,o){e.push(n.getColorPaletteMenuItem(t,o))}),i===t&&n.colorPaletteService.canAddCustomPallete()&&n.includeAddCustom&&e.push({icon:\"icon-plus-sm\",label:n.translate(\"ADD_CUSTOM_PALETTE\")+\"...\",action:function(){n.colorPaletteService.addPaletteModal({onSave:function(e){n.paletteChanged({name:e})}})}})}),e},o.getColorPaletteMenuItem=function(e,t){var n=_.map(e,function(e){return''}).join(\"\"),o=angular.element('
'+n+\"
\");return{label:o,value:{name:t},selected:this.selectedPalette.name===t}},o.getColorPaletteColors=function(){return this.colorPaletteService.getPaletteByName(this.selectedPalette.name)},o.colorOptionChanged=function(){this.onChange&&this.onChange({$value:this.selectedPalette})},o.paletteChanged=function(e){this.selectedPalette.name=e.name,this.selectedPalette.startIndex=0,this.selectedPalette.isReversed=!1,this.colorOptionChanged()},o.setStartColor=function(e){this.selectedPalette.startIndex=e,this.colorOptionChanged()},e.controller(\"widget.componentBase.ColorPalettePickerController\",n),e.directive(\"widget.componentBase.colorPalettePicker\",function(){return{templateUrl:\"eng/component-base/templates/color-palette-picker.html\",controller:n,controllerAs:\"$ctrl\",bindToController:!0,scope:{isCustom:\"<\",includeCustom:\"<\",includeAddCustom:\"<\",selectedPalette:\"<\",onChange:\"&?\"}}})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.colorPaletteService\",[\"widget.componentBase.ColorPalette\",\"widget.componentBase.override\",\"qstrap.modal\",\"$rootScope\",function(e,t,n,o){var i={Categorical:{QDefault:[\"#E53935\",\"#5E35B1\",\"#039BE5\",\"#43A047\",\"#FDD835\",\"#F4511E\",\"#546E7A\",\"#D81B60\"],Set1:[\"#e41a1c\",\"#377eb8\",\"#4daf4a\",\"#984ea3\",\"#ff7f00\",\"#ffff33\",\"#a65628\",\"#f781bf\"],Set2:[\"#66c2a5\",\"#fc8d62\",\"#8da0cb\",\"#e78ac3\",\"#a6d854\",\"#ffd92f\",\"#e5c494\",\"#b3b3b3\"],Set3:[\"#8dd3c7\",\"#ffffb3\",\"#bebada\",\"#fb8072\",\"#80b1d3\",\"#fdb462\",\"#b3de69\",\"#fccde5\"],Accent:[\"#7fc97f\",\"#beaed4\",\"#fdc086\",\"#ffff99\",\"#386cb0\",\"#f0027f\",\"#bf5b17\",\"#666666\"],Dark2:[\"#1b9e77\",\"#d95f02\",\"#7570b3\",\"#e7298a\",\"#66a61e\",\"#e6ab02\",\"#a6761d\",\"#666666\"],Paired:[\"#a6cee3\",\"#1f78b4\",\"#b2df8a\",\"#33a02c\",\"#fb9a99\",\"#e31a1c\",\"#fdbf6f\",\"#ff7f00\"],Pastel1:[\"#fbb4ae\",\"#b3cde3\",\"#ccebc5\",\"#decbe4\",\"#fed9a6\",\"#ffffcc\",\"#e5d8bd\",\"#fddaec\"],Pastel2:[\"#b3e2cd\",\"#fdcdac\",\"#cbd5e8\",\"#f4cae4\",\"#e6f5c9\",\"#fff2ae\",\"#f1e2cc\",\"#cccccc\"]},Sequential:{BuWi:[\"#0f58c5\",\"#1163dd\",\"#136ef6\",\"#6ca3f5\",\"#a1c5fb\",\"#d0e2fd\",\"#e7f0fe\",\"#f3f8ff\"],GnWi:[\"#009d9d\",\"#00b0b0\",\"#00c4c4\",\"#66dcdc\",\"#99e7e7\",\"#ccf3f3\",\"#e5f9f9\",\"#f3f8ff\"],BrWi:[\"#c67415\",\"#de8317\",\"#f7911a\",\"#fabd76\",\"#fcd3a3\",\"#fde9d1\",\"#fef4e8\",\"#fffaf4\"],YlGn:[\"#004529\",\"#006837\",\"#238443\",\"#41ab5d\",\"#78c679\",\"#addd8e\",\"#d9f0a3\",\"#f7fcb9\"],Greens:[\"#00441b\",\"#006d2c\",\"#238b45\",\"#41ab5d\",\"#74c476\",\"#a1d99b\",\"#c7e9c0\",\"#e5f5e0\"],BuGn:[\"#00441b\",\"#006d2c\",\"#238b45\",\"#41ae76\",\"#66c2a4\",\"#99d8c9\",\"#ccece6\",\"#e5f5f9\"],PuBuGn:[\"#014636\",\"#016c59\",\"#02818a\",\"#3690c0\",\"#67a9cf\",\"#a6bddb\",\"#d0d1e6\",\"#ece2f0\"],YlGnBu:[\"#081d58\",\"#253494\",\"#225ea8\",\"#1d91c0\",\"#41b6c4\",\"#7fcdbb\",\"#c7e9b4\",\"#edf8b1\"],GnBu:[\"#084081\",\"#0868ac\",\"#2b8cbe\",\"#4eb3d3\",\"#7bccc4\",\"#a8ddb5\",\"#ccebc5\",\"#e0f3db\"],Blues:[\"#08306b\",\"#08519c\",\"#2171b5\",\"#4292c6\",\"#6baed6\",\"#9ecae1\",\"#c6dbef\",\"#deebf7\"],PuBu:[\"#023858\",\"#045a8d\",\"#0570b0\",\"#3690c0\",\"#74a9cf\",\"#a6bddb\",\"#d0d1e6\",\"#ece7f2\"],YlOrRd:[\"#800026\",\"#bd0026\",\"#e31a1c\",\"#fc4e2a\",\"#fd8d3c\",\"#feb24c\",\"#fed976\",\"#ffeda0\"],YlOrBr:[\"#662506\",\"#993404\",\"#cc4c02\",\"#ec7014\",\"#fe9929\",\"#fec44f\",\"#fee391\",\"#fff7bc\"],OrRd:[\"#7f0000\",\"#b30000\",\"#d7301f\",\"#ef6548\",\"#fc8d59\",\"#fdbb84\",\"#fdd49e\",\"#fee8c8\"],Oranges:[\"#7f2704\",\"#a63603\",\"#d94801\",\"#f16913\",\"#fd8d3c\",\"#fdae6b\",\"#fdd0a2\",\"#fee6ce\"],Reds:[\"#67000d\",\"#a50f15\",\"#cb181d\",\"#ef3b2c\",\"#fb6a4a\",\"#fc9272\",\"#fcbba1\",\"#fee0d2\"],PuRd:[\"#67001f\",\"#980043\",\"#ce1256\",\"#e7298a\",\"#df65b0\",\"#c994c7\",\"#d4b9da\",\"#e7e1ef\"],RdPu:[\"#49006a\",\"#7a0177\",\"#ae017e\",\"#dd3497\",\"#f768a1\",\"#fa9fb5\",\"#fcc5c0\",\"#fde0dd\"],BuPu:[\"#4d004b\",\"#810f7c\",\"#88419d\",\"#8c6bb1\",\"#8c96c6\",\"#9ebcda\",\"#bfd3e6\",\"#e0ecf4\"],Purples:[\"#3f007d\",\"#54278f\",\"#6a51a3\",\"#807dba\",\"#9e9ac8\",\"#bcbddc\",\"#dadaeb\",\"#efedf5\"],Greys:[\"#000000\",\"#252525\",\"#525252\",\"#737373\",\"#969696\",\"#bdbdbd\",\"#d9d9d9\",\"#f0f0f0\"]},Divergent:{RdYlGn:[\"#d73027\",\"#f46d43\",\"#fdae61\",\"#fee08b\",\"#d9ef8b\",\"#a6d96a\",\"#66bd63\",\"#1a9850\"],Spectral:[\"#d53e4f\",\"#f46d43\",\"#fdae61\",\"#fee08b\",\"#e6f598\",\"#abdda4\",\"#66c2a5\",\"#3288bd\"],RdYlBu:[\"#d73027\",\"#f46d43\",\"#fdae61\",\"#fee090\",\"#e0f3f8\",\"#abd9e9\",\"#74add1\",\"#4575b4\"],RdBu:[\"#b2182b\",\"#d6604d\",\"#f4a582\",\"#fddbc7\",\"#d1e5f0\",\"#92c5de\",\"#4393c3\",\"#2166ac\"],RdGy:[\"#b2182b\",\"#d6604d\",\"#f4a582\",\"#fddbc7\",\"#e0e0e0\",\"#bababa\",\"#878787\",\"#4d4d4d\"],PuOr:[\"#b35806\",\"#e08214\",\"#fdb863\",\"#fee0b6\",\"#d8daeb\",\"#b2abd2\",\"#8073ac\",\"#542788\"],BrBG:[\"#8c510a\",\"#bf812d\",\"#dfc27d\",\"#f6e8c3\",\"#c7eae5\",\"#80cdc1\",\"#35978f\",\"#01665e\"],PiYG:[\"#c51b7d\",\"#de77ae\",\"#f1b6da\",\"#fde0ef\",\"#e6f5d0\",\"#b8e186\",\"#7fbc41\",\"#4d9221\"],PRGn:[\"#762a83\",\"#9970ab\",\"#c2a5cf\",\"#e7d4e8\",\"#d9f0d3\",\"#a6dba0\",\"#5aae61\",\"#1b7837\"]}},r={group:\"Categorical\",name:\"QDefault\",isReversed:!1,startIndex:0};return this.getColorPalette=function(t){return t||(t=this.getDefaultColorPalette()),new e(this.getPaletteByName(t.name),t.startIndex,t.isReversed)},this.getDefaultColorPalette=function(){var e=t.get(t.OVERRIDES.GET_COLOR_PALETTE);return _.cloneDeep(e||r)},this.getCustomPalettes=function(){var e=t.get(t.OVERRIDES.GET_CUSTOM_COLOR_PALETTES);return e||{}},this.getColorPalettes=function(){var e=this.getCustomPalettes();return e?{Custom:e,Categorical:i.Categorical,Sequential:i.Sequential,Divergent:i.Divergent}:i},this.getPaletteByName=function(e){var t=this.getCustomPalettes(),n=_.merge({},t,i.Categorical,i.Divergent,i.Sequential);if(!n[e]){window.console&&console.error(\"Could not find palette: \"+e);var o=this.getDefaultColorPalette().name;e=n[o]?o:r.name}return n[e]},this.canAddCustomPallete=function(){return!!t.get(t.OVERRIDES.SET_CUSTOM_COLOR_PALETTE,null,!0)},this.addPaletteModal=function(e){e=e||{};var t=o.$new();t.opts=e;var i=e.id;return n({scope:t,show:!0,title:\"\"+(i?\"EDIT\":\"ADD\")+\"_CUSTOM_PALETTE\",controller:\"widget.componentBase.addPaletteController\",contentTemplate:\"eng/component-base/templates/add-palette-modal.html\",buttons:['\",'']})},this.modifyPalettesModal=function(){var e=o.$new();return n({scope:e,show:!0,title:\"MODIFY_CUSTOM_PALETTES\",controller:\"widget.componentBase.modifyPalettesController\",contentTemplate:\"eng/component-base/templates/modify-palettes-modal.html\"})},this}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.ColorPalette\",[function(){function e(e,t,n){e=_.clone(e),n&&e.reverse(),this.colorList=e,t>=0&&t=this.colorList.length&&(this.currentIndex=0)},e}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){var o=this;o.colorPaletteService=t,o.override=n,e.$ctrl=o,o.palettes=_.cloneDeep(t.getCustomPalettes()),o.deletedPalettes={}}t.$inject=[\"$scope\",\"widget.componentBase.colorPaletteService\",\"widget.componentBase.override\"];var n=t.prototype;n.addPalette=function(){var e=this;this.colorPaletteService.addPaletteModal({onSave:function(t){e.palettes[t]=e.colorPaletteService.getPaletteByName(t)}})},n.editPalette=function(e){var t=this;this.colorPaletteService.addPaletteModal({onSave:function(e){t.palettes[e]=t.colorPaletteService.getPaletteByName(e)},colors:this.colorPaletteService.getPaletteByName(e),id:e})},n.removePalette=function(e){this.override.get(this.override.OVERRIDES.REMOVE_CUSTOM_COLOR_PALETTE,[e]),this.deletedPalettes[e]=this.palettes[e]},n.undoRemove=function(e){this.override.get(this.override.OVERRIDES.SET_CUSTOM_COLOR_PALETTE,[this.deletedPalettes[e],e]),delete this.deletedPalettes[e]},e.controller(\"widget.componentBase.modifyPalettesController\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(){return function(){var e;return{setExporter:function(t){e=t},getDataExporter:function(){return e}}}}e.factory(\"widget.componentBase.dataExportService\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){return function(){var n={};return _.forEach(e,function(e){n[e]=new t}),n.removeAll=function(){_.forEach(e,function(e){n[e]&&n[e].removeAll&&n[e].removeAll()})},n}}e.constant(\"widget.componentBase.INTERACTIONS\",{ELEMENT_CLICKED:\"elementClicked\"}),t.$inject=[\"widget.componentBase.INTERACTIONS\",\"widget.componentBase.Signals\"],e.factory(\"widget.componentBase.interactions\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){function t(){}return _.extend(t.prototype,{addListener:function(t){return\"function\"!=typeof t?void e.error(\"Listener must be a function\"):(this.listener&&(e.error(\"Listener already attached overriding\"),this.remove()),void(this.listener=t))},remove:function(){delete this.listener},removeAll:function(){this.remove()},dispatch:function(){this.listener&&this.listener.apply(null,arguments)}}),t}t.$inject=[\"widget.componentBase.logger\"],e.factory(\"widget.componentBase.Signals\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.constant(\"widget.componentBase.legendConfig.actionTypes\",{RESET_LEGEND_DATA:\"LEGEND_CONFIG.RESET_LEGEND_DATA\",SET_ORDER:\"LEGEND_CONFIG.SET_ORDER\",SET_LEGEND_OVERRIDE:\"LEGEND_CONFIG.SET_LEGEND_OVERRIDE\",SORT_LEGEND_DATA:\"LEGEND_CONFIG.SORT_LEGEND_DATA\",SET_LEGEND_POSITION:\"LEGEND_CONFIG.SET_LEGEND_POSITION\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{resetLegendData:function(t){return{type:e.RESET_LEGEND_DATA,data:t}},setLegendOverride:function(t,n,o){return{type:e.SET_LEGEND_OVERRIDE,overrideType:t,key:n,value:o}},setOrder:function(t,n){return{type:e.SET_ORDER,order:t,sortField:n}},sortLegendData:function(t,n,o,i,r){return{type:e.SORT_LEGEND_DATA,sortType:t,sortAsc:n,sortField:i,data:o,modifyAxis:r}},setLegendPosition:function(t){return{type:e.SET_LEGEND_POSITION,position:t}}}}t.$inject=[\"widget.componentBase.legendConfig.actionTypes\"],e.factory(\"widget.componentBase.legendConfig.actions\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.constant(\"widget.componentBase.legendConfig.constants\",{SORT_TYPES:{DEFAULT:\"DEFAULT\",LABEL:\"LABEL\",VALUE:\"VALUE\",CUSTOM:\"CUSTOM\"},ALLOWED_POSITIONS:{NONE:\"NONE\",TOP:\"TOP\",BOTTOM:\"BOTTOM\",LEFT:\"LEFT\",RIGHT:\"RIGHT\"},UPDATES:{ENABLED:\"enabled\",COLOR:\"color\",LABEL:\"label\",ORDER:\"order\",SORT_TYPE:\"sortType\",SORT_ASC:\"sortAsc\",POSITION:\"position\",SHOW_METRIC_TYPE:\"showMetricType\"},DEFAULT_SORT_OPTIONS:{sortType:\"DEFAULT\",sortAsc:!1,sortField:void 0,customOrder:[],defaultOrder:[]}})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.legendConfig.reducers\",[\"widget.componentBase.legendConfig.actionTypes\",\"widget.componentBase.legendConfig.constants\",\"widget.componentBase.legendConfig.sortHelper\",\"widget.componentBase.logger\",function(e,t,n,o){function i(e,t){var n=_.map(t.data,function(e){return e.label}),o={sortType:e.sortOptions.sortType,sortAsc:e.sortOptions.sortAsc,customOrder:[],defaultOrder:n,sortField:e.sortOptions.sortField},i=_.assign({},e,{labelOverrides:{},colorOverrides:{},enabledOverrides:{}});return d(i,o,t.data)}function r(e,n){var o=e.colorOverrides||{},i=e.enabledOverrides||{},r=e.labelOverrides||{};switch(n.overrideType){case t.UPDATES.ENABLED:i[n.key]=n.value;break;case t.UPDATES.COLOR:o[n.key]=n.value;break;case t.UPDATES.LABEL:r[n.key]=n.value;break;case t.UPDATES.SHOW_METRIC_TYPE:e.showMetricType=n.value}return _.assign({},e,{colorOverrides:o,enabledOverrides:i,labelOverrides:r})}function a(e,n){var o={order:n.order,sortOptions:{sortType:n.sortField||t.SORT_TYPES.CUSTOM,sortAsc:e.sortOptions&&e.sortOptions.sortAsc,customOrder:e.sortOptions&&u(n.order,e.sortOptions.sortAsc),defaultOrder:e.sortOptions&&e.sortOptions.defaultOrder,sortField:e.sortOptions.sortField}};return _.assign({},e,o)}function s(e,n){if(!t.SORT_TYPES[n.sortType])return o.error(\"Error: Attempted setting an invalid sort type\"),e;var i={sortType:n.sortType,sortAsc:n.sortAsc,sortField:n.sortField,customOrder:e.sortOptions.customOrder,defaultOrder:e.sortOptions.defaultOrder};return d(e,i,n.data,n.modifyAxis)}function c(e,n){if(!t.ALLOWED_POSITIONS[n.position])return o.error(\"Error: Attempted setting an invalid legend position\"),e;var i={showLegend:!0,legendPosition:n.position};return n.position===t.ALLOWED_POSITIONS.NONE&&(i.showLegend=!1),_.assign({},e,i)}function d(e,o,i,r){var a=i,s=_.find(i,{label:o.sortField});o&&o.sortField&&s&&s.value&&s.value.length&&(a=s.value);var c=n.getSortedOrder(a,o,e.labelOverrides),d={sortOptions:o};return r?d.axisOrder=c:d.order=c,o.sortType===t.SORT_TYPES.CUSTOM&&(d.sortOptions.customOrder=u(c,o.sortAsc)),_.assign({},e,d)}function u(e,t){return t?e:_.cloneDeep(e).reverse()}var l={resetLegendDataReducer:i,setLegendOverrideReducer:r,setOrderReducer:a,sortLegendDataReducer:s,setLegendPositionReducer:c};return l}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){function o(){i();var o=[];r.allowedSortTypes&&(o=_.pick(e.SORT_TYPES,r.allowedSortTypes)),o=t.localizeObject(o),r.sortTypes=_.map(o,function(t,o){var i={label:t,value:o};return o===e.SORT_TYPES.VALUE&&(r.data||r.data[0].rawLabel&&r.data.length>1)&&r.buildSubMenu&&(i.submenu={items:n.generateSortingLegendOptionsMenu(r.data,e.SORT_TYPES.VALUE,r.onChange)}),i})}function i(){var t=r.data.value?!_.find(r.data.value,{label:r.sortOptions.sortField}):!_.find(r.data,{rawLabel:r.sortOptions.sortField});t&&r.data.length&&(t=!_.find(r.data[0].value,{label:r.sortOptions.sortField})),r.sortOptions.sortType===e.SORT_TYPES.VALUE&&r.sortOptions.sortField&&t&&(r.sortOptions=e.DEFAULT_SORT_OPTIONS)}var r=this;r.$onInit=function(){r.legendPositions=t.localizeObject(_.pick(e.ALLOWED_POSITIONS,r.supportedLegendPositions)),r.legendPositionsMenu=_.map(r.legendPositions,function(e,t){return{selected:r.legendPosition.toUpperCase()===t,value:t,label:e}})},r.$onChanges=function(n){var i;r.data=_.map(r.legendData,function(e,t){return{key:e.key,order:t,enabled:r.enabledOverrides&&r.enabledOverrides[e.key]!==!1,color:r.colorOverrides&&r.colorOverrides[e.key]||e.color,rawLabel:e.rawLabel||e.label,label:r.labelOverrides&&r.labelOverrides[e.key]||e.label}}),r.order=_.map(r.data,\"key\"),r.allowedSortTypes&&(i=_.pick(e.SORT_TYPES,r.allowedSortTypes)),r.sortTypes=t.localizeObject(i),r.showSort=!_.isEmpty(r.allowedSortTypes),r.sortOptions&&r.showSort&&o(),r.showLegendColor=!0,r.isSingleDimension&&(r.showLegendColor=r.isAxisColorSameAsLegend)},r.sortableOptions={axis:\"y\",handle:\".drag-handle\"},r.getCurrentSortLabel=function(){return r.data.length?n.getCurrentSortLabel(r.sortTypes,r.sortOptions.sortType,r.sortOptions.sortField,r.data,e.SORT_TYPES.VALUE,e.DEFAULT_SORT_OPTIONS.sortType,r.labelOverrides):void 0},r.constants=e}t.$inject=[\"widget.componentBase.legendConfig.constants\",\"widget.componentBase.localizationHelper\",\"widget.componentBase.axisConfig.subMenuBuilder\",\"widget.componentBase.localizationHelper\"],e.factory(\"widget.componentBase.legendConfig\",function(){function e(e,o,i,r){var a=t(e,i.order),s=_.map(a,function(e){var t=o&&o.getNext();return _.assign({},e,{color:t,key:e.key||e.label,label:e.label||e.key})});return r&&(s=n(s,_.pick(i,[\"colorOverrides\",\"enabledOverrides\",\"labelOverrides\"]))),s}function t(e,t){var n={};_.forEach(e,function(e){n[e.key||e.label]=e});var o=_.union(t,_.map(e,function(e){return e.key||e.label}));return _.compact(_.map(o,function(e){return n[e]}))}function n(e,t){var n=t.colorOverrides||{},o=t.enabledOverrides||{},i=t.labelOverrides||{};return _.forEach(e,function(e){var t=e.key;e.color=n[t]||e.color,e.label=i[t]||e.label,e.enabled=o[t]!==!1}),e}function o(e,t,n,o){n=n||{},o=o||{},_.isArray(e)&&_.isArray(t)&&_.forEach(e,function(e,i){if(t.length>1){var r=t[i]||{},a=((r.filters||{})[r.sourceId]||{}).name,s=(n.labelOverrides||{})[e.key];s?e.label=s:r.overrideLabel?e.label=r.overrideLabel:o.isBreakoutByFilters&&a?e.label=a:n.showMetricType&&(e.label=r.label+\" (\"+e.label+\")\")}else e.label||(e.label=t[0].label)})}return{mergeOverrides:n,sortData:t,processData:e,setLabels:o}}),e.directive(\"widget.componentBase.legendConfig\",function(){return{scope:{legendData:\"<\",labelOverrides:\"<\",colorOverrides:\"<\",enabledOverrides:\"<\",sortOptions:\"<\",allowedSortTypes:\"<\",legendPosition:\"<\",supportedLegendPositions:\"<\",isSingleDimension:\"<\",isAxisColorSameAsLegend:\"<\",showMetricType:\"<\",onChange:\"&\",buildSubMenu:\"o?r.slice(0,o):r},n.getWidgetMenu=function(){var e=this.getWidgetList();return this.widgetTypes.buildMenu(e,this.currentWidgetMeta.type)},n.getWidgetList=function(){var e;return _.isFunction(this.getSwitchList)&&(e=this.getSwitchList(this.currentWidgetMeta)),e&&e.length||(e=this.widgetRegistry.getWidgets()),e},n.convert=function(e){e.type!==this.currentWidgetMeta.type&&this.onSwitch(this.currentWidgetMeta.type,e.type)},e.directive(\"widget.componentBase.switchMenu\",function(){return{scope:{widgetType:\"<\",getSwitchList:\"<\",datatype:\"@\",onSwitch:\"<\"},templateUrl:\"eng/component-base/templates/switch-menu.html\",controller:t,controllerAs:\"$ctrl\",bindToController:!0}})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t,n=function(e,n,o){this.widgetRegistry=e,this.overrides=n,this.translate=o(\"translate\"),t={chart:{label:this.translate(\"CHARTS\"),type:\"chart\",widgets:[\"eng.bar\",\"eng.line\",\"eng.pie\",\"eng.breakdownbar\",\"eng.gauge\"]},table:{label:this.translate(\"TABLES\"),type:\"table\",widgets:[\"eng.table\",\"eng.stats\",\"eng.grid\"]},text:{label:this.translate(\"TEXT\"),type:\"text\",widgets:[\"eng.wordcloud\"]},other:{label:this.translate(\"OTHER\"),type:\"other\",widgets:[\"eng.heatmap\"]}}};n.$inject=[\"widget.componentBase.widgetRegistry\",\"widget.componentBase.override\",\"$filter\"],n.prototype.buildMenu=function(e,n){var i={},r=this.overrides.get(\"WIDGET_TYPES\")||t;_.forEach(e,function(e){var t=this.widgetRegistry.getWidgetMeta(e)||{},a=_.filter(r,function(t){return _.contains(t.widgets,e)});a=a.length?a[0]:r.other,i[a.type]=i[a.type]||[],t.isRight=i[a.type].length>0&&i[a.type].length%2===1,i[a.type].push(o(t,n))}.bind(this));var a=[];return _.forOwn(i,function(e,t){a=a.concat(e),a.push({divider:!0})}),a.pop(),a};var o=function(e,t){return{active:t===e.type,className:\"chart-type-menu chart-type-menu-item\"+(e.isRight?\" right-menu-item\":\"\"),icon:e.icon,label:e.name,replaceCheck:!0,value:{action:\"add-widget\",type:e.type}}};e.service(\"widget.componentBase.widgetTypes\",n)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.constant(\"widget.componentBase.actionTypes\",{SET_STATUS:\"SET_STATUS\",SET_WIDGET_SETTINGS:\"SET_WIDGET_SETTINGS\",SET_DATA_CONFIG:\"SET_DATA_CONFIG\",SET_VIEW_CONFIG:\"SET_VIEW_CONFIG\",SET_PRODUCT_CONFIG:\"PRODUCT_CONFIG\",SET_DATA:\"SET_DATA\",SET_ERROR:\"SET_ERROR\",INIT:\"INIT\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";\nfunction t(e){return{setDataConfig:function(t){return{type:e.SET_DATA_CONFIG,dataConfig:t}},setViewConfig:function(t){return{type:e.SET_VIEW_CONFIG,viewConfig:t}},setWidgetSettings:function(t){return{type:e.SET_WIDGET_SETTINGS,widgetSettings:t}},setData:function(t){return{type:e.SET_DATA,data:t}},setProductConfig:function(t){return{type:e.SET_PRODUCT_CONFIG,productConfig:t}},setError:function(t){return{type:e.SET_ERROR,error:t}},initializeComponents:function(){return{type:e.INIT}}}}t.$inject=[\"widget.componentBase.actionTypes\"],e.factory(\"widget.componentBase.coreActions\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){return{viewLoaded:function(){return{type:e.SET_STATUS,status:t.VIEW_LOADED}},fetchingConfig:function(){return{type:e.SET_STATUS,status:t.FETCHING_CONFIG}},configLoaded:function(){return{type:e.SET_STATUS,status:t.CONFIG_LOADED}},dataComponentLoaded:function(){return{type:e.SET_STATUS,status:t.DATA_COMPONENT_LOADED}},fetchingData:function(){return{type:e.SET_STATUS,status:t.FETCHING_DATA}},dataLoaded:function(){return{type:e.SET_STATUS,status:t.DATA_LOADED}},resized:function(){return{type:e.SET_STATUS,status:t.RESIZED}},rendering:function(){return{type:e.SET_STATUS,status:t.RENDERING}},completed:function(){return{type:e.SET_STATUS,status:t.COMPLETED}},dataError:function(){return{type:e.SET_STATUS,status:t.DATA_ERROR}},viewError:function(){return{type:e.SET_STATUS,status:t.VIEW_ERROR}},dataConfigUpdated:function(){return{type:e.SET_STATUS,status:t.DATA_CONFIG_UPDATED}},viewConfigUpdated:function(){return{type:e.SET_STATUS,status:t.VIEW_CONFIG_UPDATED}}}}t.$inject=[\"widget.componentBase.actionTypes\",\"widget.componentBase.status\"],e.factory(\"widget.componentBase.statusActions\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){this.dataComponentTable={},this.dataComponentShapeTable={},this.$injector=e,this.logger=n,this.registerDataComponent({type:\"pr-no-data-component\",name:\"No data component\",shape:\"NO_DATA_COMPONENT\",getData:function(){return t.when({})}})}function n(e){var t={type:_.isString,getData:function(e){return _.isString(e)||_.isFunction(e)}},n=\"\";return _.forEach(t,function(t,o){e[o]?t(e[o])||(n=\"Validation failed for field \"+o+\"\\n\"):n=\"Missing field \"+o+\"\\n\"}),n}function o(e){return!n(e)}var i=[\"DATA_CUBE\",\"NO_DATA_COMPONENT\",\"DATA_GRID\"];_.extend(t.prototype,{registerDataComponent:function(e){return o(e)?(this.dataComponentTable[e.type]=e,this.dataComponentShapeTable[e.shape]||(this.dataComponentShapeTable[e.shape]=[]),void this.dataComponentShapeTable[e.shape].push(e)):void this.logger.warn(\"Data component \"+e.name+\" has the following validation error: \\n\"+n(e))},normalize:function(e){return e&&_.isString(e.getData)&&(e.getData=this.$injector.get(e.getData)),e&&_.isString(e.getDataConfig)&&(e.getDataConfig=this.$injector.get(e.getDataConfig)),e},getComponentByType:function(e){return this.normalize(this.dataComponentTable[e])},getAllComponentsByShape:function(e){var t=this;return _.map(this.dataComponentShapeTable[e],function(e){return t.normalize(e)})},getComponentByShape:function(e){var t=this.dataComponentShapeTable[e];return t&&!_.isEmpty(t)&&this.normalize(t[0])}}),t.$inject=[\"$injector\",\"$q\",\"widget.componentBase.logger\"],e.service(\"widget.componentBase.dataComponentManager\",t),e.constant(\"widget.componentBase.supportedShapes\",function(){return i})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(){}_.extend(t.prototype,{registerProductComponent:function(e){this.productComponent=e},getProductComponent:function(){return this.productComponent}}),e.service(\"widget.componentBase.productComponentManager\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){_.forEach(e,function(e,o){var i=n[o];n[o]=function(){var e=i.apply(n,arguments);return t(),e}})}e.factory(\"widget.componentBase.chainActions\",function(){return t})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.coreHelper\",[\"$injector\",function(e){function t(e){return e.replace(/([A-Z])/g,\"-$1\").toLowerCase()}return{wrapDirective:function(e,n){var o=t(e),i=\"
'),i},resolveDependency:function(t){return _.isString(t)?e.get(t):t}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.errorMessageService\",[\"$filter\",function(e){function t(e){var t,i;return _.isObject(e)?(t=e.errorType,i=e.errorMessage):t=e,i||(i=o[t]||o[\"default\"]),n(i)}var n=e(\"translate\"),o={UNCONFIGURED:n(\"WIDGET_ERROR.NEW\"),MISCONFIGURED:n(\"WIDGET_ERROR.MISCONFIGURED\"),NO_DATA:n(\"WIDGET_ERROR.NO_DATA\"),\"default\":n(\"WIDGET_ERROR.ERROR\")};return{getMessage:t}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){var t=document.querySelector(\"#angular-dashboard-app\"),n=angular.element(t).injector();return _.map(e,function(e){return _.isString(e)?n.get(e):e})}function n(e){var n,o;_.isArray(e)?(n=e.pop(),o=e):(n=e,o=[]),n.apply(null,t(o))}e.execute=e.execute||n}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.localizationHelper\",[\"$filter\",function(e){function t(e){return _.mapValues(e,function(e){return n(e)})}var n=e(\"translate\");return{localizeObject:t}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.service(\"widget.componentBase.logger\",[function(){function e(e){(r||console).log(e)}function t(e){(r||console).warn(e)}function n(e){(r||console).info(e)}function o(e){(r||console).error(e)}function i(e){r=e}var r;return{log:e,warn:t,info:n,error:o,setLogger:i}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.PerformanceManager\",[\"widget.componentBase.status\",\"rsPerformanceAggregator\",function(e,t){function n(n){function o(){_.forEach(e,function(e){c[e]=null})}function i(e,t){var n=t.diff(e),o=moment.duration(n);return Math.floor(o.asHours())+moment.utc(n).format(\":mm:ss\")}function r(){d.on=!1,d.startStatus=null,d.endStatus=null}var a=[e.INITIALIZED,e.RESIZED,e.DATA_CONFIG_UPDATED,e.VIEW_CONFIG_UPDATED],s=[e.COMPLETED,e.DATA_ERROR,e.VIEW_ERROR],c={},d={widgetId:n,on:!1,startStatus:null,endStatus:null};o();var u={};return u.getStatusTime=function(){return c},u.updateTime=function(e,n){if(n=n||moment.utc(),c[e]=n,_.contains(a,e))d.on=!0,d.startStatus=e;else if(_.contains(s,e)&&d.on){d.endStatus=e;var o=c[d.startStatus],u=c[d.endStatus],l={widgetId:d.widgetId,startStatus:d.startStatus,endStatus:d.endStatus,time:i(o,u),statusTime:c};t.pushData(l),r()}},u}return n}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{widgetSettings:function(t,n){return t||(t={shape:\"DATA_CUBE\",dimensions:0}),n.type===e.SET_WIDGET_SETTINGS?n.widgetSettings:t},dataConfig:function(t,n){return t||(t={}),n.type===e.SET_DATA_CONFIG&&n.dataConfig?n.dataConfig:t},viewConfig:function(t,n){return t||(t={}),n.type===e.SET_VIEW_CONFIG&&n.viewConfig?n.viewConfig:t},productConfig:function(t,n){return t||(t={}),n.type===e.SET_PRODUCT_CONFIG&&n.productConfig?n.productConfig:t},data:function(t,n){return t||(t={}),n.type===e.SET_DATA?n.data||{}:t},error:function(t,n){return t||(t={}),n.type===e.SET_ERROR?n.error||{}:t}}}t.$inject=[\"widget.componentBase.actionTypes\"],e.factory(\"widget.componentBase.coreReducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){function o(e,t){return-1!==a[e].indexOf(t)}function i(e){return-1!==r.indexOf(e)}var r=_.values(e),a={};return a[e.INITIALIZED]=[e.VIEW_LOADED],a[e.VIEW_LOADED]=[e.FETCHING_CONFIG],a[e.FETCHING_CONFIG]=[e.CONFIG_LOADED],a[e.CONFIG_LOADED]=[e.DATA_COMPONENT_LOADED],a[e.DATA_COMPONENT_LOADED]=[e.FETCHING_DATA,e.DATA_CONFIG_UPDATED],a[e.FETCHING_DATA]=[e.DATA_ERROR,e.DATA_LOADED,e.DATA_CONFIG_UPDATED],a[e.DATA_LOADED]=[e.RENDERING,e.DATA_CONFIG_UPDATED,e.DATA_ERROR],a[e.RESIZED]=[e.RENDERING,e.VIEW_CONFIG_UPDATED,e.DATA_CONFIG_UPDATED,e.DATA_ERROR],a[e.RENDERING]=[e.COMPLETED,e.VIEW_ERROR,e.DATA_CONFIG_UPDATED,e.VIEW_CONFIG_UPDATED,e.RESIZED],a[e.COMPLETED]=[e.DATA_CONFIG_UPDATED,e.VIEW_CONFIG_UPDATED,e.RESIZED],a[e.DATA_CONFIG_UPDATED]=[e.FETCHING_DATA],a[e.VIEW_CONFIG_UPDATED]=[e.RENDERING],a[e.DATA_ERROR]=[e.DATA_CONFIG_UPDATED],a[e.VIEW_ERROR]=[e.VIEW_CONFIG_UPDATED,e.DATA_CONFIG_UPDATED],function(r,a){switch(r||(r=e.INITIALIZED),a.type){case t.SET_STATUS:return n.info(a.status),i(a.status)&&o(r,a.status)?r=a.status:n.info(\"Failed to move to new state Current State: \"+r+\" expected to move to: \"+a.status),r;default:return r}}}t.$inject=[\"widget.componentBase.status\",\"widget.componentBase.actionTypes\",\"widget.componentBase.logger\"],e.factory(\"widget.componentBase.statusReducer\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.Store\",[\"widget.componentBase.coreHelper\",\"$rootScope\",\"$timeout\",\"widget.componentBase.chainActions\",function(e,t,n,o){function i(e){return function(){return function(t){return function(n){e.$evalAsync(t(n))}}}}function r(e,t,n){_.isFunction(e)?e(t,n):_.assign(e,t,n)}function a(e,t){return t(e)}function s(e){return function(t){return Redux.bindActionCreators(e,t)}}function c(e){return function(t){var n={};return _.forEach(e,function(e){n[e]=t[e]}),n}}function d(n,o,r,a,s){return this.reducers=_.mapValues(n||{},e.resolveDependency),r=_.map(r||[],e.resolveDependency).concat(i(o||t)),a=_.map(a||[],e.resolveDependency),s=s||{},this.store=Redux.createStore(Redux.combineReducers(this.reducers),s,Redux.applyMiddleware.apply(void 0,r)),this.unsubscribeList=[],this}return _.extend(d.prototype,{addReducers:function(t){return t&&!_.isEmpty(t)?(_.merge(this.reducers,_.mapValues(t||{},e.resolveDependency)),this.store.replaceReducer(Redux.combineReducers(this.reducers)),this):void 0},connect:function(e,t,n){var i,d,u,l=this.store,f=this;if(_.isArray(e))e=c(e);else if(!_.isFunction(e))throw new Error(\"MapStateToTarget must be a function instead recieved %s\",e);if(i=a(l.getState(),e),_.isFunction(i)&&(e=i,i=a(l.getState(),i)),_.isPlainObject(t))d=s(t);else{if(!_.isFunction(t))throw new Error(\"mapDispatchToTarget must be a function or object instead recieved %s\",t);d=t}return u=d(l.dispatch),function(t){r(t,i,u),n&&o(u,n,t);var s=l.subscribe(function(){var s=a(l.getState(),e);_.isEqual(s,i)||(i=s,r(t,s,u),n&&o(u,n,t))});return f.unsubscribeList.push(s),s}},bindActions:function(e,t){var n,i;if(_.isPlainObject(e))n=s(e);else{if(!_.isFunction(e))throw new Error(\"mapDispatchToTarget must be a function or object instead recieved %s\",e);n=e}return i=n(this.store.dispatch),function(e){r(e,{},i),t&&o(i,t,e)}},observe:function(e,t,o){function i(){var e=a(s.getState()),o=r;_.isEqual(e,r)||(r=e,n(function(){t(e,o)},0,!1))}var r,a,s=this.store;a=_.isFunction(e)?e:function(t){return t[e]},r=a(s.getState());var c=s.subscribe(i);return o&&i(),this.unsubscribeList.push(c),c},destroy:function(){_.forEach(this.unsubscribeList,function(e){e&&_.isFunction(e)&&e()})}}),d}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=\"product-view-component\",n=\"component-base-body\",o=500;e.directive(\"widget.componentBase.widgetBody\",[\"$compile\",\"widget.componentBase.coreHelper\",\"widget.componentBase.errorMessageService\",function(e,i,r){function a(e){return{alertMessage:r.getMessage(e.error)}}return{templateUrl:\"eng/component-base/templates/widget-body.html\",transclude:!0,link:function(r,s){function c(){d=i.wrapDirective(f.view,t),u=e(d)(r),s.prepend(u)}var d,u,l,f=r.widget.getProductComponent();s.addClass(n),r.$on(\"$destroy\",function(){r.store.destroy()}),f&&f.view&&c(),r.store.connect(a,{})(r),r.hasError=function(e){return\"DATA_ERROR\"===e.status.getStatus()||\"VIEW_ERROR\"===e.status.getStatus()},r.$watch(_.bind(r.widget.hasDataLoaded,r.widget),function(e){_.isUndefined(r.showSpinner)?r.showSpinner=!e:e?(r.showSpinner=!e,clearTimeout(l)):l=_.delay(function(){r.showSpinner=!e},o)})}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.directive(\"widget.componentBase.widgetContent\",[function(){return{link:function(e,t,n,o,i){i(function(e){t.append(e)})}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=\"data-component-wrapper\";e.directive(\"widget.componentBase.widgetConfigContent\",[\"$compile\",\"widget.componentBase.coreHelper\",function(e,n){return{link:function(o,i,r,a,s){var c=o.widget.getDataComponent(),d=n.wrapDirective(c.directive+' store=\"store\" widget=\"widget\"',t),u=e(d)(o);s(function(e){i.append(u),i.append(e)})}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=\"product-config-wrapper\";e.directive(\"widget.componentBase.widgetConfig\",[\"$compile\",\"$timeout\",\"widget.componentBase.coreHelper\",function(e,n,o){return{templateUrl:\"eng/component-base/templates/widget-config.html\",transclude:!0,link:function(n,i){var r,a,s=n.widget.getProductComponent();s&&s.configView&&(r=o.wrapDirective(s.configView,t),i.prepend(e(r)(n))),s&&s.configFooterView&&(a=o.wrapDirective(s.configFooterView,t),i.append(e(a)(n)))}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){return{load:function(){return e.all({viewConfig:t.getSavedState(),dataAndProductConfig:n(t.getSavedConfig())}).then(function(e){return e.dataConfig=n(e.dataAndProductConfig),e.productConfig=o(e.dataAndProductConfig),delete e.dataAndProductConfig,e})},save:function(n,o,r){return e.all({config:t.saveConfig(i(n,r)),state:t.saveState(o)})}}}function n(e){return e&&e.dataConfig?e.dataConfig:e}function o(e){return e&&e.productConfig?e.productConfig:{}}function i(e,t){return{dataConfig:e,productConfig:t}}function r(e){return _.partial(t,e)}r.$inject=[\"$q\"],e.factory(\"widget.componentBase.configService\",r)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.getMatchingDataComponent\",[\"widget.componentBase.dataComponentManager\",\"widget.componentBase.coreHelper\",function(e,t){function n(t,n){var o;if(t&&t.type&&(o=e.getComponentByType(t.type),!o||o.shape===n.shape))return o}function o(e,t){return t[0]}function i(t,n){var o=e.getAllComponentsByShape(n.shape);return t(n,o)}return function(e,r,a,s){var c,d=t.resolveDependency(a)||o;return s||(c=n(e,r)),c||(c=i(d,r)),c}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{reducer:e.reducer,preProcessors:e.preProcessors}}function n(e){return{widgetSettings:e.widgetSettings,dataConfig:e.dataConfig,viewConfig:e.viewConfig,productConfig:e.productConfig}}function o(e,o,i,r,a,s){function c(e){this.viewComponent=t(e),this.configService=e.configService,this.status=e.status,this.store=e.store,this.widgetId=e.widgetId,this.store.connect(n,a)(this),this.setWidgetSettings(_.extend(e.widgetSettings,{widgetId:this.widgetId})),this.setWidgetSettings(e.widgetSettings),this.productComponent=s.getProductComponent(),this.setupLifecycle()}return _.extend(c.prototype,{setupLifecycle:function(){_.bindAll(this,[\"onViewLoaded\",\"onDataComponentLoaded\",\"onDataConfigUpdated\",\"onConfigLoaded\",\"onViewConfigUpdated\"]),this.status.onStatus(o.VIEW_LOADED,this.onViewLoaded),this.status.onStatus(o.CONFIG_LOADED,this.onConfigLoaded),this.status.onStatus(o.DATA_COMPONENT_LOADED,this.onDataComponentLoaded),this.status.onStatus(o.DATA_CONFIG_UPDATED,this.onDataConfigUpdated),this.status.onStatus(o.VIEW_CONFIG_UPDATED,this.onViewConfigUpdated)},onViewLoaded:function(){this.status.fetchingConfig(),this.load()},onConfigLoaded:function(){this.setupReducers(),this.initializeComponents(),this.status.dataComponentLoaded()},onDataComponentLoaded:function(){this.getData()},onDataConfigUpdated:function(){this.getData(),this.saveConfig()},onViewConfigUpdated:function(){this.saveConfig()},onProductConfigUpdated:function(){this.saveConfig(),this.status.completed()},saveConfig:function(){return this.configService.save(this.dataConfig,this.viewConfig,this.productConfig)},getData:function(){var e=this,t=_.uniqueId(\"FetchData\");this.lastActiveFetch=t,this.status.fetchingData(),this.dataComponent.getData(_.cloneDeep(this.dataConfig),this.widgetSettings,this.previousDataConfig).then(function(n){t===e.lastActiveFetch&&(e.setData(n),e.status.dataLoaded())})[\"catch\"](function(n){t===e.lastActiveFetch&&(e.setError(n),e.status.dataError())})[\"finally\"](function(){t===e.lastActiveFetch&&(e.previousDataConfig=_.cloneDeep(e.dataConfig))})},load:function(){var t,n=this;this.configService.load().then(function(e){var o=n.productComponent&&n.productComponent.dataComponentSelector;return t=e.viewConfig.widgetType&&e.viewConfig.widgetType!==n.widgetSettings.type,n.dataComponent=i(e.dataConfig,n.widgetSettings,o,t),e}).then(function(e){return n.needsSave=!1,n.widgetPreconfiguration(e,t)}).then(function(o){return e.all({viewConfig:n.preProcessConfig(n.viewComponent,o.viewConfig,t),dataConfig:n.preProcessConfig(n.dataComponent,o.dataConfig,t),productConfig:n.preProcessConfig(n.productComponent,o.productConfig,t)})}).then(_.bind(this.hydrateStore,this)).then(this.status.configLoaded)},hydrateStore:function(e){var t=e.dataConfig||{},n=e.viewConfig||{};e.dataConfig&&e.dataConfig.type&&e.dataConfig.type===this.dataComponent.type||(t=_.assign(e.dataConfig,{type:this.dataComponent.type})),n=_.assign(e.viewConfig,{widgetType:this.widgetSettings.type}),this.setDataConfig(t),this.setViewConfig(n),this.setProductConfig(e.productConfig),this.needsSave&&(this.saveConfig(),this.needsSave=!1)},setupReducers:function(){var e={};this.viewComponent.reducer&&(e.viewConfig=this.viewComponent.reducer,this.setViewConfig=_.noop),this.dataComponent&&this.dataComponent.reducer&&(e.dataConfig=this.dataComponent.reducer,this.setDataConfig=_.noop),this.productComponent&&this.productComponent.reducer&&(e.productConfig=this.productComponent.reducer,this.productDataConfig=_.noop),_.isEmpty(e)||this.store.addReducers(e)},widgetPreconfiguration:function(t,n){var o,i=this;return this.productComponent&&this.productComponent.widgetPreconfiguration?(o=r.resolveDependency(this.productComponent.widgetPreconfiguration),e.when(o(t,this.widgetSettings,{widgetId:this.widgetId,isTypeChange:n})).then(function(e){return e?(i.needsSave=!0,e):t})):t},preProcessConfig:function(t,n,o){var i=this;if(!t||!t.preProcessors)return e.when(n);var a=t.preProcessors;_.isArray(a)||(a=[a]);var s=!1;return _.reduce(a,function(t,a){return a=r.resolveDependency(a),t.then(function(t){return t&&(s=!0,n=t),e.when(a(n,i.widgetSettings,{widgetId:i.widgetId,isTypeChange:o}))})},e.when(null)).then(function(e){return e&&(s=!0,n=e),s&&(i.needsSave=!0),n})},getDataConfig:function(){return this.dataComponent.getDataConfig?this.dataComponent.getDataConfig(_.cloneDeep(this.dataConfig)):this.dataConfig}}),c}o.$inject=[\"$q\",\"widget.componentBase.status\",\"widget.componentBase.getMatchingDataComponent\",\"widget.componentBase.coreHelper\",\"widget.componentBase.coreActions\",\"widget.componentBase.productComponentManager\"],e.factory(\"widget.componentBase.Lifecycle\",o)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n,o){function i(e){return{status:e.status}}function r(){return c.status}function a(e){var t=d[e];_.forEach(t,function(e){e&&e()})}function s(e,o){var i;return t[e]?(d[e]||(d[e]=[]),i=d[e].length,d[e].push(o),function(){d[e][i]=void 0}):void n.error(e+\" is not a valid status\")}var c={},d={};return o.connect(i,e)(c),o.observe(\"status\",a),c.onStatus=s,c.getStatus=r,c}e.factory(\"widget.componentBase.statusManager\",[\"widget.componentBase.statusActions\",\"widget.componentBase.status\",\"widget.componentBase.logger\",function(e,n,o){return _.partial(t,e,n,o)}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t={INITIALIZED:\"INITIALIZED\",VIEW_LOADED:\"VIEW_LOADED\",FETCHING_CONFIG:\"FETCHING_CONFIG\",CONFIG_LOADED:\"CONFIG_LOADED\",DATA_COMPONENT_LOADED:\"DATA_COMPONENT_LOADED\",FETCHING_DATA:\"FETCHING_DATA\",DATA_LOADED:\"DATA_LOADED\",RESIZED:\"RESIZED\",RENDERING:\"RENDERING\",COMPLETED:\"COMPLETED\",DATA_ERROR:\"DATA_ERROR\",VIEW_ERROR:\"VIEW_ERROR\",DATA_CONFIG_UPDATED:\"DATA_CONFIG_UPDATED\",VIEW_CONFIG_UPDATED:\"VIEW_CONFIG_UPDATED\"};e.constant(\"widget.componentBase.status\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n,o,i,r,a,s,c,d,u,l,f,g){function p(e,t){return this.store=E(t),this.status=n(this.store),this.configService=o(t.ripsaw),this.widgetId=t.ripsaw.widgetId,this.lifecycle=new a(_.merge(e,{widgetId:this.widgetId,store:this.store,status:this.status,configService:this.configService})),this.dataExportService=new f,this.interactions=new l,g.get(\"performanceFlag\")&&(this.performance=new c(this.widgetId),this.store.observe(\"status\",function(e){this.performance.updateTime(e)})),t.widget=this,t.store=this.store,this}function E(n){var o=_.merge(i,{status:r});return new t(o,n,[e.ReduxThunk[\"default\"]])}var T=[s.INITIALIZED,s.VIEW_LOADED,s.FETCHING_CONFIG,s.CONFIG_LOADED,s.DATA_COMPONENT_LOADED,s.FETCHING_DATA,s.DATA_CONFIG_UPDATED],O=[s.DATA_ERROR,s.VIEW_ERROR],m=[s.INITIALIZED,s.VIEW_LOADED,s.FETCHING_CONFIG,s.CONFIG_LOADED];return _.extend(p.prototype,{dataComponentInitialized:function(){return-1===m.indexOf(this.status.getStatus())},hasDataComponent:function(){return!(!this.dataComponentInitialized()||!this.lifecycle.dataComponent)},getDataComponent:function(){return this.dataComponentInitialized()?this.lifecycle.dataComponent:void 0},hasProductComponent:function(){return!!this.lifecycle.productComponent},getProductComponent:function(){return this.lifecycle.productComponent},hasDataLoaded:function(){return-1===T.indexOf(this.status.getStatus())},hasError:function(){return-1!==O.indexOf(this.status.getStatus())}}),_.extend(p.prototype,{start:function(){this.status.viewLoaded()},onDataComponentLoaded:function(e){return this.status.onStatus(s.DATA_COMPONENT_LOADED,e)},onDataLoaded:function(e){return this.status.onStatus(s.DATA_LOADED,e)},onResized:function(e){return this.status.onStatus(s.RESIZED,e)},onViewConfigUpdated:function(e){return this.status.onStatus(s.VIEW_CONFIG_UPDATED,e)},onDataConfigUpdated:function(e){return this.status.onStatus(s.DATA_CONFIG_UPDATED,e)},saveConfiguration:function(){this.lifecycle.saveConfig()}}),p[\"const\"]={WIDGET_TYPES:d,SHAPES:u,STATUS:s},p}t.$inject=[\"$window\",\"widget.componentBase.Store\",\"widget.componentBase.statusManager\",\"widget.componentBase.configService\",\"widget.componentBase.coreReducers\",\"widget.componentBase.statusReducer\",\"widget.componentBase.Lifecycle\",\"widget.componentBase.status\",\"widget.componentBase.PerformanceManager\",\"widget.componentBase.WIDGET_TYPES\",\"widget.componentBase.SHAPES\",\"widget.componentBase.interactions\",\"widget.componentBase.dataExportService\",\"rsEnvironment\"],e.factory(\"widget.componentBase.WidgetFactory\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.colorUtil\",[function(){function e(e){var t=d3.hsl(e);return t.s<=o?n:d3.hsl(t.h+180,t.s,t.l).toString()}function t(e){var t=d3.rgb(e),n=(299*t.r+587*t.g+114*t.b)/1e3;return n>=128?\"#000000\":\"#ffffff\"}var n=\"#EBDD3D\",o=.02;return{getComplementaryColor:e,getContrastingColor:t}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.createWrappedReducer\",[function(){return function(e,t){return function(n,o){return o.namespace!==t?n:e(n,o)}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=_.partialRight(_.merge,_.defaults);_.defaultsDeep?e.factory(\"widget.componentBase.defaultsDeep\",function(){return _.defaultsDeep}):e.factory(\"widget.componentBase.defaultsDeep\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.numberUtil\",[function(){function e(e,t){return void 0===t&&(t=n(e)),t=10*t,0===t?parseInt(e+1,10):Math.ceil(e/t)*t}function t(e,t){return void 0===t&&(t=n(e)),t=10*t,Math.floor(e/t)*t}function n(e){var t=Math.floor(Math.log(Math.abs(e))/Math.LN10+1e-9);return-1===t&&(t=0),t}return{roundUp:e,roundDown:t,getMagnitude:n}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.service(\"widget.componentBase.sanitize\",[\"$sanitize\",\"$filter\",function(e,t){function n(e){return _.isString(e)?i.test(e)?o(e):t(\"linky\")(e,\"_blank\"):e}function o(t){var n;try{n=e(t)}catch(o){n=_.escape(t)}return n}var i=/<[a-z][\\s\\S]*>/i;return n}])}(angular.module(\"ripsaw.widgets\")),function(e){e.constant(\"widget.componentBase.SHAPES\",{DATA_CUBE:\"DATA_CUBE\",DATA_GRID:\"DATA_GRID\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t=\"eng.breakdownbar\",n=\"eng.pie\",o=\"eng.line\",i=\"eng.bar\",r=\"eng.table\",a=\"eng.gauge\",s=\"eng.grid\",c=\"eng.wordcloud\",d=\"eng.heatmap\",u=\"eng.stats\";e.constant(\"widget.componentBase.WIDGET_TYPES\",{BREAKDOWNBAR:t,PIE:n,LINE:o,BAR:i,TABLE:r,GAUGE:a,GRID:s,WORD_CLOUD:c,HEATMAP:d,STATS:u}),e.factory(\"widget.componentBase.WIDGET_META\",[\"$filter\",function(e){var l=e(\"translate\");return{\"eng.table\":{type:r,name:l(\"WIDGET_NAME.DATA_TABLE\"),icon:\"icon-simple-table\"},\"eng.breakdownbar\":{type:t,name:l(\"WIDGET_NAME.BREAKDOWNBAR\"),icon:\"icon-breakdown-bar\"},\"eng.pie\":{type:n,name:l(\"WIDGET_NAME.PIE\"),icon:\"icon-donut-chart\"},\"eng.gauge\":{type:a,name:l(\"WIDGET_NAME.GAUGE\"),icon:\"icon-gauge-chart\"},\"eng.bar\":{type:i,name:l(\"WIDGET_NAME.BAR\"),icon:\"icon-bar-chart\"},\"eng.line\":{type:o,name:l(\"WIDGET_NAME.LINE\"),icon:\"icon-line-chart\"},\"eng.grid\":{type:s,name:l(\"WIDGET_NAME.GRID\"),icon:\"icon-list-table\"},\"eng.wordcloud\":{type:c,name:l(\"WIDGET_NAME.WORDCLOUD\"),icon:\"icon-word-cloud\"},\"eng.heatmap\":{type:d,name:l(\"WIDGET_NAME.HEATMAP\"),icon:\"icon-heat-map\"},\"eng.stats\":{type:u,name:l(\"WIDGET_NAME.STATS_TABLE\"),icon:\"icon-stats-table\"}}}]),e.factory(\"widget.componentBase.widgetRegistry\",[\"widget.componentBase.override\",\"widget.componentBase.WIDGET_META\",function(e,t){function n(n){var o=e.get(e.OVERRIDES.GET_WIDGET_META,[n]);return o||t[n]}function o(){var n=_.keys(t);return e.get(e.OVERRIDES.GET_WIDGET_LIST,[n])||n}return{getWidgetMeta:n,getWidgets:o}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"widget.componentBase.wrapExtendAction\",[function(){return function(e,t,n){var o=_.assign({},e,t);return _.mapValues(o,function(e,t){return _.compose(function(e){return e.namespace=n,e},e)})}}])}(angular.module(\"ripsaw.widgets\"));\n//# sourceMappingURL=component-base.min.js.map","css":"div.component-base-body{height:100%;width:100%;display:table}div.component-base-body .product-view-component,div.component-base-body .widget-content-wrapper{display:table-row;height:0}div.component-base-body div.widget-alert,div.component-base-body div.widget-content-wrapper{display:table-row;height:100%}.view-body,.view-body>div,.view-body>div>div{width:100%;height:100%;overflow:hidden}.widget-alert{color:#B8B9BE;background:rgba(0,0,0,.03)}.widget-alert.widget-error{color:#C94041}.widget-alert .alert-icon{vertical-align:middle;padding-right:8px}.widget-alert .alert-horizontal{display:table;width:100%;height:100%;margin:0;padding:0}.widget-alert .alert-vertical{display:table-cell;text-align:center;vertical-align:middle}.simple-table .table-numeric{text-align:right}.simple-table .table-text{text-align:left}.btn-ghost,.btn-ghost.active,.btn-ghost:hover{border-style:dashed;background:0 0}.palette-input{margin-top:-4px}.palette-input .palette-input-option{vertical-align:middle;display:inline-block}.palette-input .palette-colors{background:#FFF;padding:7px;border:1px solid #CCC;border-right:none;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;max-width:172px}.palette-input .palette-colors .start-index{border:2px solid #fff;box-shadow:0 0 0 1px #000;border-radius:3px}.palette-input .palette-colors .color-swatch{cursor:pointer}.palette-input .palette-dropdown{padding-top:4px;margin-left:-3px}.palette-input .palette-dropdown .btn{border-top-left-radius:0;border-bottom-left-radius:0}.palette-input .color-swatch{margin-bottom:-3px}.color-swatch-list{white-space:nowrap}.color-swatch-list .color-swatch{margin-right:4px}.color-swatch-list .color-swatch:last-child{margin-right:0}.color-swatch{border-radius:2px;width:16px;height:16px;display:inline-block;border:1px solid rgba(0,0,0,.15)}.colorpicker .color-q-unset a{padding-left:16px!important}.add-palette-modal{text-align:center}.add-palette-modal .colorpicker-swatches{display:none}.add-palette-modal .colorpicker-color div input{width:89px}.add-palette-modal .remove-btn{width:122px}.add-palette-modal .color-swatch-wrap{display:inline-block;height:30px;cursor:pointer;border-radius:2px;border:1px solid #FFF;margin-right:2px}.add-palette-modal .color-swatch-wrap.active,.add-palette-modal .color-swatch-wrap:hover{border:1px solid #737373}.add-palette-modal .color-swatch{width:26px;height:26px;margin:1px}.modify-palettes-modal .palette{display:table-row}.modify-palettes-modal .palette .color-swatch-list,.modify-palettes-modal .palette .controls{display:table-cell}.modify-palettes-modal .palette .palette-deleted-undo,.modify-palettes-modal .palette.deleted .palette-delete,.modify-palettes-modal .palette.deleted .palette-edit{display:none}.modify-palettes-modal .palette .controls{height:27px;padding-left:8px}.modify-palettes-modal .palette .controls .icon{cursor:pointer;color:#A4A4A4}.modify-palettes-modal .palette .controls .icon:hover{color:#737373}.modify-palettes-modal .palette.deleted .controls{padding-top:7px}.modify-palettes-modal .palette.deleted .palette-deleted-undo{display:inline-block;position:relative;top:-2px}.modify-palettes-modal .add-palette{margin-top:8px}.axis-config-row,.legend-config-row{position:relative;width:100%;margin-bottom:8px}.axis-config-row:last-child,.legend-config-row:last-child{margin-bottom:0}.axis-config-row .drag-handle,.legend-config-row .drag-handle{top:13px;left:-13px}.axis-config-row .qcheckbox,.legend-config-row .qcheckbox{overflow:hidden;height:16px;margin-top:5px;margin-right:4px}.axis-config-row .color-swatch,.legend-config-row .color-swatch{margin-right:6px;margin-top:5px}.axis-config-row:hover .drag-handle,.legend-config-row:hover .drag-handle{display:block}.axis-config-row .left,.legend-config-row .left{margin-left:-16px;padding-left:16px;float:left}.axis-config-row .left .no-legend-color,.legend-config-row .left .no-legend-color{position:relative}.axis-config-row .left .no-legend-color:after,.legend-config-row .left .no-legend-color:after{content:\"\";position:absolute;border-top:1px solid #D13A34;width:20px;transform:rotate(45deg);transform-origin:0 0}.axis-config-row .fill,.legend-config-row .fill{overflow:hidden}.axis-config-row .fill input,.legend-config-row .fill input{width:100%;display:inline-block}.widget-sidebar-group{position:relative;margin-bottom:48px}.widget-sidebar-group .qspinner input.form-control{border:1px solid #CCC}.widget-sidebar-group:after{content:'';position:absolute;bottom:-24px;left:-20px;right:-20px;border-bottom:1px solid #CCC}.form-group .options-label:not(:first-child){margin-top:8px}.drag-handle{display:none;position:absolute;top:50%;left:3px;margin-top:-6px;width:10px;height:11px;border-top:5px double #CCC;border-bottom:5px double #CCC;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.sortable-item:hover>.drag-handle,:hover>.drag-handle{display:block}.sortable-list{position:relative;list-style-type:none}.sortable-item{position:relative;display:block;padding-left:16px;margin-left:-16px;margin-bottom:4px}.widget-switcher li{padding:6px;display:inline-block;background-color:#FFF;cursor:pointer;border-top:1px solid #A4A4A4;border-bottom:1px solid #A4A4A4;border-right:1px solid #A4A4A4}.widget-switcher li.active{background-color:#007AC0!important;color:#FFF}.widget-switcher li:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left:1px solid #A4A4A4}.widget-switcher li:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px;border-right:1px solid #A4A4A4;margin-left:-3px;padding-bottom:3px}.widget-switcher li:hover{background-color:#E8E8E8}","lang":{}}