(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["tcg_pvc_LegendBox"],{"13d5":function(e,t,a){"use strict";var n=a("23e7"),r=a("d58f").left,l=a("a640"),i=a("ae40"),s=l("reduce"),o=i("reduce",{1:0});n({target:"Array",proto:!0,forced:!s||!o},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"3d6c":function(e,t,a){"use strict";var n=a("e50b"),r=a.n(n);r.a},"5b50":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{class:e.legendClass,domProps:{innerHTML:e._s(e.legendHtml)}})])},r=[],l=(a("d81d"),a("b85c")),i=(a("f076"),{props:["layer","layerName","layerId","layerDefinition","legend","legendClass","scales"],data:function(){return{legendHtml:"",options:{listTemplate:"<ul>{layers}</ul>",layerTemplate:"<li><ul>{legends}</ul></li>",listRowTemplate:'<li><img width="{width}" height="{height}" src="data:{contentType};base64,{imageData}"><span>{label}</span></li>',emptyLabel:"",container:null}}},computed:{scale:function(){var e=this.$store.state.map.zoom,t=e+1,a=this.$props.scales[t];return a}},watch:{scale:function(e){this.createLegend(e)},legend:function(){console.log("METHOD watch props legend fired, this.$props.layerId:",this.$props.layerId),this.createLegend(this.scale)}},created:function(){this.initialize()},methods:{initialize:function(){if(this.$props.legend)this.createLegend(this.scale);else{var e;this.$props.layerDefinition&&(e=this.$props.layerDefinition.drawingInfo);var t={layerName:this.$props.layerName,layerId:this.$props.layerId,store:this.$store,drawingInfo:e};L.esri.legendControl(this.$props.layer,t)}},createLegend:function(e){var t=this.$props.legend,a="";if(1===t.layers.length){var n,r=t.layers[0],i="",s=Object(l["a"])(r.legend);try{for(s.s();!(n=s.n()).done;){var o=n.value,c=JSON.parse(JSON.stringify(o));c.label||(c.label=""),i+=L.Util.template(this.options.listRowTemplate,c)}}catch(b){s.e(b)}finally{s.f()}a+=L.Util.template(this.options.layerTemplate,{layerName:r.layerName,legends:i})}else{var u,d=Object(l["a"])(t.layers);try{for(d.s();!(u=d.n()).done;){var f=u.value,p="";if(parseFloat(e)>parseFloat(f.maxScale)&&parseFloat(e)<parseFloat(f.minScale)){var h,y=Object(l["a"])(f.legend);try{for(y.s();!(h=y.n()).done;){var g=h.value,m=JSON.parse(JSON.stringify(g));p+=L.Util.template(this.options.listRowTemplate,m)}}catch(b){y.e(b)}finally{y.f()}}a+=L.Util.template(this.options.layerTemplate,{layerName:f.layerName,legends:p})}}catch(b){d.e(b)}finally{d.f()}}var v=L.Util.template(this.options.listTemplate,{layers:a});this.legendHtml=v}}}),s=i,o=(a("3d6c"),a("2877")),c=Object(o["a"])(s,n,r,!1,null,null,null);t["default"]=c.exports},d58f:function(e,t,a){var n=a("1c0b"),r=a("7b0b"),l=a("44ad"),i=a("50c4"),s=function(e){return function(t,a,s,o){n(a);var c=r(t),u=l(c),d=i(c.length),f=e?d-1:0,p=e?-1:1;if(s<2)while(1){if(f in u){o=u[f],f+=p;break}if(f+=p,e?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=p)f in u&&(o=a(o,u[f],f,c));return o}};e.exports={left:s(!1),right:s(!0)}},e50b:function(e,t,a){},f076:function(e,t,a){"use strict";a("4de4"),a("caad"),a("13d5"),a("b64b"),a("2532");var n,r,l=a("b85c"),i=a("53ca"),s={props:{slots:{type:Object,default:function(){return{}}},options:{type:Object,default:function(){return{}}},item:{type:Object,default:function(){return{}}}},computed:{nullValue:function(){var e=this.options||{};return e.nullValue}},beforeCreate:function(){},created:function(){},methods:{evaluateSlot:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return e;var r,s=Object(i["a"])(e);if("function"===s){var o=this.$store.state,c=this.$controller,u=e,d=this.item;r=d?u(o,d,c):u(o)}else r=e;if(!1===r);else if(!a.includes("currency")&&!r)return n;var f,p=Object(l["a"])(a);try{var h=function(){var e=f.value,a=t.$config.transforms[e],n=void 0,l=a.globals;l&&(n=Object.keys(window).filter((function(e){return l.includes(e)})).reduce((function(e,t){return e[t]=window[t],e}),{}));var i=a.transform;r=i(r,n)};for(p.s();!(f=p.n()).done;)h()}catch(y){p.e(y)}finally{p.f()}return r}}},o=s,c=a("2877"),u=Object(c["a"])(o,n,r,!1,null,null,null);t["a"]=u.exports}}]);
//# sourceMappingURL=tcg_pvc_LegendBox.bb300328.js.map