(function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="df7d")})({"3ed3":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var p=0;pt.replace(c,(t,e)=>e?e.toUpperCase():""),l=/\B([A-Z])/g,d=t=>t.replace(l,"-$1").toLowerCase();function p(t){const e={};return t.forEach(t=>{e[t]=void 0}),e}function f(t,e,n){t[e]=[].concat(t[e]||[]),t[e].unshift(n)}function h(t,e){if(t){const n=t.$options[e]||[];n.forEach(e=>{e.call(t)})}}function b(t,e){return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:e})}const m=t=>/function Boolean/.test(String(t)),v=t=>/function Number/.test(String(t));function g(t,e,{type:n}={}){if(m(n))return"true"===t||"false"===t?"true"===t:""===t||t===e||null!=t;if(v(n)){const e=parseFloat(t,10);return isNaN(e)?t:e}return t}function _(t,e){const n=[];for(let r=0,o=e.length;r(t[e]=s[n[r]],t),{}),f(e,"beforeCreate",(function(){const t=this.$emit;this.$emit=(e,...n)=>(this.$root.$options.customElement.dispatchEvent(b(e,n)),t.call(this,e,...n))})),f(e,"created",(function(){o.forEach(t=>{this.$root.props[t]=this[t]})})),o.forEach(t=>{Object.defineProperty(l.prototype,t,{get(){return this._wrapper.props[t]},set(e){this._wrapper.props[t]=e},enumerable:!1,configurable:!0})}),a=!0}function c(t,e){const n=u(e),r=t.hasAttribute(e)?t.getAttribute(e):void 0;t._wrapper.props[n]=g(r,e,i[n])}class l extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const n=this._wrapper=new t({name:"shadow-root",customElement:this,shadowRoot:this.shadowRoot,data(){return{props:{},slotChildren:[]}},render(t){return t(e,{ref:"inner",props:this.props},this.slotChildren)}}),r=new MutationObserver(t=>{let e=!1;for(let n=0;n{t.props=p(o),r.forEach(t=>{c(this,t)})};a?n():e().then(t=>{(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t),n()}),t.slotChildren=Object.freeze(_(t.$createElement,this.childNodes)),t.$mount(),this.shadowRoot.appendChild(t.$el)}}disconnectedCallback(){h(this.vueComponent,"deactivated")}}return n||s(e),l}var C=x;n("f98f"),n("3ed3");function S(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}var T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"table-legend-container"},[n("table",{staticClass:"table-legend-main-table"},[n("thead",{staticClass:"table-legend-header"},[n("tr",{staticClass:"table-header-row"},t._l(t.header,(function(e,r){return n("td",{key:r,staticClass:"table-header-col"},[n("span",{domProps:{innerHTML:t._s(e)}})])})),0)]),t.data.length>0?n("tbody",t._l(t.data,(function(e,r){return n("tr",{key:r,staticClass:"table-item-row"},[n("td",{staticClass:"table-item-col first-column"},[n("span",{staticClass:"dot",style:{backgroundColor:e.color}})]),n("td",{staticClass:"table-item-col"},[n("span",{domProps:{innerHTML:t._s(e.label)}})]),n("td",{staticClass:"table-item-col"},[n("span",{domProps:{innerHTML:t._s(e.label2)}})])])})),0):t._e()])])},E=[],O={name:"ChartLegendTable",props:{input:{type:String,default:'{"header":["","Mobile phone and bank account (ownership)
(Higher is better)"," D-Index
(Lower is better)"],"data":[{"color":"#d7191c","label":"Lower","label2":"Higher"},{"color":"#fdae61","label":"Higher","label2":"Higher"},{"color":"#abd9e9","label":"Lower","label2":"Lower"},{"color":"#2c7bb6","label":"Higher","label2":"Lower"}]}'}},data(){return{margin:{top:0,right:0,bottom:0,left:0},color:{},vis:[],width:15,label_font_style:"sans-serif",label_font_size:13,data:[],header:[]}},watch:{input(){this.initialize()}},mounted(){this.initialize()},methods:{getTextWidth:function(t,e,n){var r=document.createElement("canvas"),o=r.getContext("2d");return o.font=e+"px "+n,o.measureText(t).width},setNoDataText:function(){this.$refs.chart.innerHTML='

NO DATA

'},onMouseOver:function(t,e){this.$emit("sendMouseOver",e)},onMouseOut:function(t,e){this.$emit("sendMouseOver",e)},initialize(){let t,e=this;try{t=JSON.parse(e.input)}catch(n){return void e.setNoDataText()}t&&t.data?(e.data=t.data,t&&t.header&&(e.header=t.header)):e.setNoDataText()}}},M=O;function j(t){var e=n("ba97");e.__inject__&&e.__inject__(t)}var L=S(M,T,E,!1,j,null,null,!0),$=L.exports;window.customElements.define("chart-legend-table",C(s.a,$))},f98f:function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var i=o(r),a=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i