From 8ffa4de2ed5ab67f72df9e239e8132c378674217 Mon Sep 17 00:00:00 2001 From: Carmen Date: Wed, 29 Dec 2021 13:35:43 +0100 Subject: [PATCH] =?UTF-8?q?Actualizaci=C3=B3n=20plugin=20stylemanager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/api.json | 4 +- dist/stylemanager-2.0.5.ol.min.js | 59 -- dist/stylemanager-2.0.5.ol.min.js.map | 1 - ...0.5.ol.min.css => stylemanager.ol.min.css} | 0 dist/stylemanager.ol.min.js | 59 ++ dist/stylemanager.ol.min.js.map | 1 + package-lock.json | 2 +- package.json | 2 +- src/api.json | 4 +- src/facade/assets/fonts/sigc.eot | Bin 4068 -> 0 bytes src/facade/assets/fonts/sigc.svg | 21 - src/facade/assets/fonts/sigc.ttf | Bin 3916 -> 0 bytes src/facade/assets/fonts/sigc.woff | Bin 3992 -> 0 bytes src/facade/js/binding/clusterbinding.js | 2 + src/facade/js/binding/heatmapbinding.js | 18 +- src/facade/js/binding/simplebinding.js | 115 +-- src/facade/js/bindingcontroller.js | 28 +- src/facade/js/stylemanager.js | 22 +- src/facade/js/stylemanagerControl.js | 19 +- src/templates/stylesimple.html | 8 +- test/dev.html | 6 +- test/prod.html | 498 +----------- test/test.js | 739 ++++++++++++++++-- webpack-config/webpack.production.config.js | 2 +- 24 files changed, 865 insertions(+), 745 deletions(-) delete mode 100644 dist/stylemanager-2.0.5.ol.min.js delete mode 100644 dist/stylemanager-2.0.5.ol.min.js.map rename dist/{stylemanager-2.0.5.ol.min.css => stylemanager.ol.min.css} (100%) create mode 100644 dist/stylemanager.ol.min.js create mode 100644 dist/stylemanager.ol.min.js.map delete mode 100644 src/facade/assets/fonts/sigc.eot delete mode 100644 src/facade/assets/fonts/sigc.svg delete mode 100644 src/facade/assets/fonts/sigc.ttf delete mode 100644 src/facade/assets/fonts/sigc.woff diff --git a/dist/api.json b/dist/api.json index 45334b5..e53fb6d 100644 --- a/dist/api.json +++ b/dist/api.json @@ -22,8 +22,8 @@ "name": "stylemanager", "description": "Gestión del estilo de la simbología de las capas vectoriales del mapa", "text": "Plugin de Mapea para la gestión de la simbología de las capas vectoriales del mapa.", - "version": "2.0.5", - "date": "Marzo, 2021", + "version": "3.0.0", + "date": "Junio, 2020", "author": "", "org": "Consejería de Hacienda, Industria y Energía. Junta de Andalucía", "tags": "mapea,plugin", diff --git a/dist/stylemanager-2.0.5.ol.min.js b/dist/stylemanager-2.0.5.ol.min.js deleted file mode 100644 index ff015a2..0000000 --- a/dist/stylemanager-2.0.5.ol.min.js +++ /dev/null @@ -1,59 +0,0 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){ -/** - * chroma.js - JavaScript library for color conversions - * - * Copyright (c) 2011-2018, Gregor Aisch - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The name Gregor Aisch may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ------------------------------------------------------- - * - * chroma.js includes colors from colorbrewer2.org, which are released under - * the following license: - * - * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, - * and The Pennsylvania State University. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific - * language governing permissions and limitations under the License. - * - * ------------------------------------------------------ - * - * Named colors are taken from X11 Color Names. - * http://www.w3.org/TR/css3-color/#svg-color - * - * @preserve - */ -e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),en?n:e},t={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:s,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==s(e[0])&&t?t.split("").filter(function(t){return void 0!==e[0][t]}).map(function(t){return e[0][t]}):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==s(e[t])?e[t].toLowerCase():null},PI:r,TWOPI:2*r,PITHIRD:r/3,DEG2RAD:r/180,RAD2DEG:180/r},o={format:{},autodetect:[]},c=l.last,d=l.clip_rgb,u=l.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if("object"===u(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=c(e),a=!1;if(!n){a=!0,o.sorted||(o.autodetect=o.autodetect.sort(function(e,t){return t.p-e.p}),o.sorted=!0);for(var i=0,s=o.autodetect;i4?e[4]:1;return 1===s?[0,0,0,r]:[n>=1?0:255*(1-n)*(1-s),a>=1?0:255*(1-a)*(1-s),i>=1?0:255*(1-i)*(1-s),r]},S=l.unpack,w=l.type;p.prototype.cmyk=function(){return m(this._rgb)},y.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["cmyk"])))},o.format.cmyk=k,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===w(e)&&4===e.length)return"cmyk"}});var _=l.unpack,O=l.last,E=function(e){return Math.round(100*e)/100},x=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=_(e,"hsla"),a=O(e)||"lsa";return n[0]=E(n[0]||0),n[1]=E(100*n[1])+"%",n[2]=E(100*n[2])+"%","hsla"===a||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,a="hsla"):n.length=3,a+"("+n.join(",")+")"},L=l.unpack,P=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=L(e,"rgba"))[0],a=e[1],i=e[2];n/=255,a/=255,i/=255;var s,r,l=Math.min(n,a,i),o=Math.max(n,a,i),c=(o+l)/2;return o===l?(s=0,r=Number.NaN):s=c<.5?(o-l)/(o+l):(o-l)/(2-o-l),n==o?r=(a-i)/(o-l):a==o?r=2+(i-n)/(o-l):i==o&&(r=4+(n-a)/(o-l)),(r*=60)<0&&(r+=360),e.length>3&&void 0!==e[3]?[r,s,c,e[3]]:[r,s,c]},q=l.unpack,A=l.last,T=Math.round,C=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=q(e,"rgba"),a=A(e)||"rgb";return"hsl"==a.substr(0,3)?x(P(n),a):(n[0]=T(n[0]),n[1]=T(n[1]),n[2]=T(n[2]),("rgba"===a||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,a="rgba"),a+"("+n.slice(0,"rgb"===a?3:4).join(",")+")")},M=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,j=/^#?([A-Fa-f0-9]{8})$/,N=function(e){if(e.match(M)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16),n=t>>16,a=t>>8&255,i=255&t;return[n,a,i,1]}if(e.match(j)){9===e.length&&(e=e.substr(1));var s=parseInt(e,16),r=s>>24&255,l=s>>16&255,o=s>>8&255,c=Math.round((255&s)/255*100)/100;return[r,l,o,c]}throw new Error("unknown hex color: "+e)},F=l.unpack,I=Math.round,R=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var a,i,s,r=(t=F(t,"hsl"))[0],l=t[1],o=t[2];if(0===l)a=i=s=255*o;else{var c=[0,0,0],d=[0,0,0],u=o<.5?o*(1+l):o+l-o*l,f=2*o-u,p=r/360;c[0]=p+1/3,c[1]=p,c[2]=p-1/3;for(var v=0;v<3;v++)c[v]<0&&(c[v]+=1),c[v]>1&&(c[v]-=1),6*c[v]<1?d[v]=f+6*(u-f)*c[v]:2*c[v]<1?d[v]=u:3*c[v]<2?d[v]=f+(u-f)*(2/3-c[v])*6:d[v]=f;e=[I(255*d[0]),I(255*d[1]),I(255*d[2])],a=e[0],i=e[1],s=e[2]}return t.length>3?[a,i,s,t[3]]:[a,i,s,1]},D={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},B=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,G=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,z=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,U=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,H=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,V=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Y=Math.round,K=function(e){if(e=e.toLowerCase().trim(),D[e])return N(D[e]);var t;if(t=e.match(B)){for(var n=t.slice(1,4),a=0;a<3;a++)n[a]=+n[a];return n[3]=1,n}if(t=e.match(G)){for(var i=t.slice(1,5),s=0;s<4;s++)i[s]=+i[s];return i}if(t=e.match(z)){for(var r=t.slice(1,4),l=0;l<3;l++)r[l]=Y(2.55*r[l]);return r[3]=1,r}if(t=e.match(U)){for(var o=t.slice(1,5),c=0;c<3;c++)o[c]=Y(2.55*o[c]);return o[3]=+o[3],o}if(t=e.match(H)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var u=R(d);return u[3]=1,u}if(t=e.match(V)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=R(f);return p[3]=+t[4],p}};K.test=function(e){return B.test(e)||G.test(e)||z.test(e)||U.test(e)||H.test(e)||V.test(e)};var X=K,J=l.type;p.prototype.css=function(e){return C(this._rgb,e)},y.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["css"])))},o.format.css=X,o.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===J(e)&&X.test(e))return"css"}});var W=l.unpack;o.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=W(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},y.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["gl"])))},p.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var $=l.unpack,Q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=$(e,"rgb"),i=a[0],s=a[1],r=a[2],l=Math.min(i,s,r),o=Math.max(i,s,r),c=o-l,d=100*c/255,u=l/(255-c)*100;return 0===c?n=Number.NaN:(i===o&&(n=(s-r)/c),s===o&&(n=2+(r-i)/c),r===o&&(n=4+(i-s)/c),(n*=60)<0&&(n+=360)),[n,d,u]},Z=l.unpack,ee=Math.floor,te=function(){for(var e,t,n,a,i,s,r=[],l=arguments.length;l--;)r[l]=arguments[l];var o,c,d,u=(r=Z(r,"hcg"))[0],f=r[1],p=r[2];p*=255;var v=255*f;if(0===f)o=c=d=p;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var y=ee(u/=60),g=u-y,h=p*(1-f),m=h+v*(1-g),b=h+v*g,k=h+v;switch(y){case 0:o=(e=[k,b,h])[0],c=e[1],d=e[2];break;case 1:o=(t=[m,k,h])[0],c=t[1],d=t[2];break;case 2:o=(n=[h,k,b])[0],c=n[1],d=n[2];break;case 3:o=(a=[h,m,k])[0],c=a[1],d=a[2];break;case 4:o=(i=[b,h,k])[0],c=i[1],d=i[2];break;case 5:o=(s=[k,h,m])[0],c=s[1],d=s[2]}}return[o,c,d,r.length>3?r[3]:1]},ne=l.unpack,ae=l.type;p.prototype.hcg=function(){return Q(this._rgb)},y.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcg"])))},o.format.hcg=te,o.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ne(e,"hcg"),"array"===ae(e)&&3===e.length)return"hcg"}});var ie=l.unpack,se=l.last,re=Math.round,le=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ie(e,"rgba"),a=n[0],i=n[1],s=n[2],r=n[3],l=se(e)||"auto";void 0===r&&(r=1),"auto"===l&&(l=r<1?"rgba":"rgb"),a=re(a),i=re(i),s=re(s);var o=a<<16|i<<8|s,c="000000"+o.toString(16);c=c.substr(c.length-6);var d="0"+re(255*r).toString(16);switch(d=d.substr(d.length-2),l.toLowerCase()){case"rgba":return"#"+c+d;case"argb":return"#"+d+c;default:return"#"+c}},oe=l.type;p.prototype.hex=function(e){return le(this._rgb,e)},y.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},o.format.hex=N,o.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===oe(e)&&[3,4,6,7,8,9].includes(e.length))return"hex"}});var ce=l.unpack,de=l.TWOPI,ue=Math.min,fe=Math.sqrt,pe=Math.acos,ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=ce(e,"rgb"),i=a[0],s=a[1],r=a[2],l=ue(i/=255,s/=255,r/=255),o=(i+s+r)/3,c=o>0?1-l/o:0;return 0===c?n=NaN:(n=(i-s+(i-r))/2,n/=fe((i-s)*(i-s)+(i-r)*(s-r)),n=pe(n),r>s&&(n=de-n),n/=de),[360*n,c,o]},ye=l.unpack,ge=l.limit,he=l.TWOPI,me=l.PITHIRD,be=Math.cos,ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s=(e=ye(e,"hsi"))[0],r=e[1],l=e[2];return isNaN(s)&&(s=0),isNaN(r)&&(r=0),s>360&&(s-=360),s<0&&(s+=360),(s/=360)<1/3?(i=(1-r)/3,n=(1+r*be(he*s)/be(me-he*s))/3,a=1-(i+n)):s<2/3?(n=(1-r)/3,a=(1+r*be(he*(s-=1/3))/be(me-he*s))/3,i=1-(n+a)):(a=(1-r)/3,i=(1+r*be(he*(s-=2/3))/be(me-he*s))/3,n=1-(a+i)),n=ge(l*n*3),a=ge(l*a*3),i=ge(l*i*3),[255*n,255*a,255*i,e.length>3?e[3]:1]},Se=l.unpack,we=l.type;p.prototype.hsi=function(){return ve(this._rgb)},y.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsi"])))},o.format.hsi=ke,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Se(e,"hsi"),"array"===we(e)&&3===e.length)return"hsi"}});var _e=l.unpack,Oe=l.type;p.prototype.hsl=function(){return P(this._rgb)},y.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsl"])))},o.format.hsl=R,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=_e(e,"hsl"),"array"===Oe(e)&&3===e.length)return"hsl"}});var Ee=l.unpack,xe=Math.min,Le=Math.max,Pe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s=(e=Ee(e,"rgb"))[0],r=e[1],l=e[2],o=xe(s,r,l),c=Le(s,r,l),d=c-o;return i=c/255,0===c?(n=Number.NaN,a=0):(a=d/c,s===c&&(n=(r-l)/d),r===c&&(n=2+(l-s)/d),l===c&&(n=4+(s-r)/d),(n*=60)<0&&(n+=360)),[n,a,i]},qe=l.unpack,Ae=Math.floor,Te=function(){for(var e,t,n,a,i,s,r=[],l=arguments.length;l--;)r[l]=arguments[l];var o,c,d,u=(r=qe(r,"hsv"))[0],f=r[1],p=r[2];if(p*=255,0===f)o=c=d=p;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var v=Ae(u/=60),y=u-v,g=p*(1-f),h=p*(1-f*y),m=p*(1-f*(1-y));switch(v){case 0:o=(e=[p,m,g])[0],c=e[1],d=e[2];break;case 1:o=(t=[h,p,g])[0],c=t[1],d=t[2];break;case 2:o=(n=[g,p,m])[0],c=n[1],d=n[2];break;case 3:o=(a=[g,h,p])[0],c=a[1],d=a[2];break;case 4:o=(i=[m,g,p])[0],c=i[1],d=i[2];break;case 5:o=(s=[p,g,h])[0],c=s[1],d=s[2]}}return[o,c,d,r.length>3?r[3]:1]},Ce=l.unpack,Me=l.type;p.prototype.hsv=function(){return Pe(this._rgb)},y.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsv"])))},o.format.hsv=Te,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ce(e,"hsv"),"array"===Me(e)&&3===e.length)return"hsv"}});var je={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ne=l.unpack,Fe=Math.pow,Ie=function(e){return(e/=255)<=.04045?e/12.92:Fe((e+.055)/1.055,2.4)},Re=function(e){return e>je.t3?Fe(e,1/3):e/je.t2+je.t0},De=function(e,t,n){e=Ie(e),t=Ie(t),n=Ie(n);var a=Re((.4124564*e+.3575761*t+.1804375*n)/je.Xn),i=Re((.2126729*e+.7151522*t+.072175*n)/je.Yn),s=Re((.0193339*e+.119192*t+.9503041*n)/je.Zn);return[a,i,s]},Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ne(e,"rgb"),a=n[0],i=n[1],s=n[2],r=De(a,i,s),l=r[0],o=r[1],c=r[2],d=116*o-16;return[d<0?0:d,500*(l-o),200*(o-c)]},Ge=l.unpack,ze=Math.pow,Ue=function(e){return 255*(e<=.00304?12.92*e:1.055*ze(e,1/2.4)-.055)},He=function(e){return e>je.t1?e*e*e:je.t2*(e-je.t0)},Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s,r,l,o=(e=Ge(e,"lab"))[0],c=e[1],d=e[2];return a=(o+16)/116,n=isNaN(c)?a:a+c/500,i=isNaN(d)?a:a-d/200,a=je.Yn*He(a),n=je.Xn*He(n),i=je.Zn*He(i),s=Ue(3.2404542*n-1.5371385*a-.4985314*i),r=Ue(-.969266*n+1.8760108*a+.041556*i),l=Ue(.0556434*n-.2040259*a+1.0572252*i),[s,r,l,e.length>3?e[3]:1]},Ye=l.unpack,Ke=l.type;p.prototype.lab=function(){return Be(this._rgb)},y.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lab"])))},o.format.lab=Ve,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ye(e,"lab"),"array"===Ke(e)&&3===e.length)return"lab"}});var Xe=l.unpack,Je=l.RAD2DEG,We=Math.sqrt,$e=Math.atan2,Qe=Math.round,Ze=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Xe(e,"lab"),a=n[0],i=n[1],s=n[2],r=We(i*i+s*s),l=($e(s,i)*Je+360)%360;return 0===Qe(1e4*r)&&(l=Number.NaN),[a,r,l]},et=l.unpack,tt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"rgb"),a=n[0],i=n[1],s=n[2],r=Be(a,i,s),l=r[0],o=r[1],c=r[2];return Ze(l,o,c)},nt=l.unpack,at=l.DEG2RAD,it=Math.sin,st=Math.cos,rt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=nt(e,"lch"),a=n[0],i=n[1],s=n[2];return isNaN(s)&&(s=0),[a,st(s*=at)*i,it(s)*i]},lt=l.unpack,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=lt(e,"lch"))[0],a=e[1],i=e[2],s=rt(n,a,i),r=s[0],l=s[1],o=s[2],c=Ve(r,l,o),d=c[0],u=c[1],f=c[2];return[d,u,f,e.length>3?e[3]:1]},ct=l.unpack,dt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ct(e,"hcl").reverse();return ot.apply(void 0,n)},ut=l.unpack,ft=l.type;p.prototype.lch=function(){return tt(this._rgb)},p.prototype.hcl=function(){return tt(this._rgb).reverse()},y.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lch"])))},y.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcl"])))},o.format.lch=ot,o.format.hcl=dt,["lch","hcl"].forEach(function(e){return o.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=ut(t,e),"array"===ft(t)&&3===t.length)return e}})});var pt=l.type;p.prototype.name=function(){for(var e=le(this._rgb,"rgb"),t=0,n=Object.keys(D);t0;)t[n]=arguments[n+1];if(!t.length&&"string"===pt(e)&&D[e.toLowerCase()])return"named"}});var vt=l.unpack,yt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=vt(e,"rgb"),a=n[0],i=n[1],s=n[2];return(a<<16)+(i<<8)+s},gt=l.type,ht=function(e){if("number"==gt(e)&&e>=0&&e<=16777215){var t=e>>16,n=e>>8&255,a=255&e;return[t,n,a,1]}throw new Error("unknown num color: "+e)},mt=l.type;p.prototype.num=function(){return yt(this._rgb)},y.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},o.format.num=ht,o.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===mt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var bt=l.unpack,kt=l.type,St=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(St)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map(function(t,n){return n<3?!1===e?t:St(t):t})},y.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},o.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=bt(e,"rgba");return void 0===n[3]&&(n[3]=1),n},o.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=bt(e,"rgba"),"array"===kt(e)&&(3===e.length||4===e.length&&"number"==kt(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var wt=Math.log,_t=function(e){var t,n,a,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*wt(n),a=i<20?0:.8274096064007395*(a=i-10)-254.76935184120902+115.67994401066147*wt(a)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*wt(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*wt(n),a=255),[t,n,a,1]},Ot=l.unpack,Et=Math.round,xt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,a=Ot(e,"rgb"),i=a[0],s=a[2],r=1e3,l=4e4;l-r>.4;){var o=_t(n=.5*(l+r));o[2]/o[0]>=s/i?l=n:r=n}return Et(n)};p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return xt(this._rgb)},y.temp=y.kelvin=y.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},o.format.temp=o.format.kelvin=o.format.temperature=_t;var Lt=l.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Lt(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=je.Kn*e,new p(t,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),n=t[0],a=t[1],i=this[n]();if(a){var s=n.indexOf(a);if(s>-1)return i[s];throw new Error("unknown channel "+a+" in mode "+n)}return i};var Pt=l.type,qt=Math.pow;p.prototype.luminance=function(e){if(void 0!==e&&"number"===Pt(e)){if(0===e)return new p([0,0,0,this._rgb[3]],"rgb");if(1===e)return new p([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,a=function(t,i){var s=t.interpolate(i,.5,"rgb"),r=s.luminance();return Math.abs(e-r)<1e-7||!n--?s:r>e?a(t,s):a(s,i)},i=(t>e?a(new p([0,0,0]),this):a(this,new p([255,255,255]))).rgb();return new p(i.concat([this._rgb[3]]))}return At.apply(void 0,this._rgb.slice(0,3))};var At=function(e,t,n){return e=Tt(e),t=Tt(t),n=Tt(n),.2126*e+.7152*t+.0722*n},Tt=function(e){return(e/=255)<=.03928?e/12.92:qt((e+.055)/1.055,2.4)},Ct={},Mt=l.type,jt=function(e,t,n){void 0===n&&(n=.5);for(var a=[],i=arguments.length-3;i-- >0;)a[i]=arguments[i+3];var s=a[0]||"lrgb";if(Ct[s]||a.length||(s=Object.keys(Ct)[0]),!Ct[s])throw new Error("interpolation mode "+s+" is not defined");return"object"!==Mt(e)&&(e=new p(e)),"object"!==Mt(t)&&(t=new p(t)),Ct[s](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};p.prototype.mix=p.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],a=arguments.length-2;a-- >0;)n[a]=arguments[a+2];return jt.apply(void 0,[this,e,t].concat(n))},p.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new p([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},p.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=je.Kn*e,t[1]<0&&(t[1]=0),new p(t,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Nt=l.type;p.prototype.set=function(e,t,n){void 0===n&&(n=!1);var a=e.split("."),i=a[0],s=a[1],r=this[i]();if(s){var l=i.indexOf(s);if(l>-1){if("string"==Nt(t))switch(t.charAt(0)){case"+":case"-":r[l]+=+t;break;case"*":r[l]*=+t.substr(1);break;case"/":r[l]/=+t.substr(1);break;default:r[l]=+t}else{if("number"!==Nt(t))throw new Error("unsupported value for Color.set");r[l]=t}var o=new p(r,i);return n?(this._rgb=o._rgb,this):o}throw new Error("unknown channel "+s+" in mode "+i)}return r},Ct.rgb=function(e,t,n){var a=e._rgb,i=t._rgb;return new p(a[0]+n*(i[0]-a[0]),a[1]+n*(i[1]-a[1]),a[2]+n*(i[2]-a[2]),"rgb")};var Ft=Math.sqrt,It=Math.pow;Ct.lrgb=function(e,t,n){var a=e._rgb,i=a[0],s=a[1],r=a[2],l=t._rgb,o=l[0],c=l[1],d=l[2];return new p(Ft(It(i,2)*(1-n)+It(o,2)*n),Ft(It(s,2)*(1-n)+It(c,2)*n),Ft(It(r,2)*(1-n)+It(d,2)*n),"rgb")},Ct.lab=function(e,t,n){var a=e.lab(),i=t.lab();return new p(a[0]+n*(i[0]-a[0]),a[1]+n*(i[1]-a[1]),a[2]+n*(i[2]-a[2]),"lab")};var Rt=function(e,t,n,a){var i,s,r,l,o,c,d,u,f,v,y,g;return"hsl"===a?(r=e.hsl(),l=t.hsl()):"hsv"===a?(r=e.hsv(),l=t.hsv()):"hcg"===a?(r=e.hcg(),l=t.hcg()):"hsi"===a?(r=e.hsi(),l=t.hsi()):"lch"!==a&&"hcl"!==a||(a="hcl",r=e.hcl(),l=t.hcl()),"h"===a.substr(0,1)&&(o=(i=r)[0],d=i[1],f=i[2],c=(s=l)[0],u=s[1],v=s[2]),isNaN(o)||isNaN(c)?isNaN(o)?isNaN(c)?g=Number.NaN:(g=c,1!=f&&0!=f||"hsv"==a||(y=u)):(g=o,1!=v&&0!=v||"hsv"==a||(y=d)):g=o+n*(c>o&&c-o>180?c-(o+360):c180?c+360-o:c-o),void 0===y&&(y=d+n*(u-d)),new p([g,y,f+n*(v-f)],a)},Dt=function(e,t,n){return Rt(e,t,n,"lch")};Ct.lch=Dt,Ct.hcl=Dt,Ct.num=function(e,t,n){var a=e.num(),i=t.num();return new p(a+n*(i-a),"num")},Ct.hcg=function(e,t,n){return Rt(e,t,n,"hcg")},Ct.hsi=function(e,t,n){return Rt(e,t,n,"hsi")},Ct.hsl=function(e,t,n){return Rt(e,t,n,"hsl")},Ct.hsv=function(e,t,n){return Rt(e,t,n,"hsv")};var Bt=l.clip_rgb,Gt=Math.pow,zt=Math.sqrt,Ut=Math.PI,Ht=Math.cos,Vt=Math.sin,Yt=Math.atan2,Kt=function(e){for(var t=e.length,n=1/t,a=[0,0,0,0],i=0,s=e;i.9999999&&(a[3]=1),new p(Bt(a))},Xt=l.type,Jt=Math.pow,Wt=function(e){var t="rgb",n=y("#ccc"),a=0,i=[0,1],s=[],r=[0,0],l=!1,o=[],c=!1,d=0,u=1,f=!1,p={},v=!0,g=1,h=function(e){if((e=e||["#fff","#000"])&&"string"===Xt(e)&&y.brewer&&y.brewer[e.toLowerCase()]&&(e=y.brewer[e.toLowerCase()]),"array"===Xt(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2){var f=function(e){if(null!=l){for(var t=l.length-1,n=0;n=l[n];)n++;return n-1}return 0}(e);c=f/(l.length-2)}else c=u!==d?(e-d)/(u-d):1;a||(c=m(c)),1!==g&&(c=Jt(c,g)),c=r[0]+c*(1-r[0]-r[1]),c=Math.min(1,Math.max(0,c));var h=Math.floor(1e4*c);if(v&&p[h])i=p[h];else{if("array"===Xt(o))for(var b=0;b=k&&b===s.length-1){i=o[b];break}if(c>k&&cn,i=b(e,!0).lab()[0],s=t+(n-t)*e,r=i-s,l=0,o=1,c=20;Math.abs(r)>.01&&c-- >0;)a&&(r*=-1),r<0?(l=e,e+=.5*(o-e)):(o=e,e+=.5*(l-e)),i=b(e,!0).lab()[0],r=i-s;return e}:function(e){return e},S},S.padding=function(e){return null!=e?("number"===Xt(e)&&(e=[e,e]),r=e,S):r},S.colors=function(t,n){arguments.length<2&&(n="hex");var a=[];if(0===arguments.length)a=o.slice(0);else if(1===t)a=[S(.5)];else if(t>1){var s=i[0],r=i[1]-s;a=function(e,t,n){for(var a=[],i=es;i?r++:r--)a.push(r);return a}(0,t,!1).map(function(e){return S(s+e/(t-1)*r)})}else{e=[];var c=[];if(l&&l.length>2)for(var d=1,u=l.length,f=1<=u;f?du;f?d++:d--)c.push(.5*(l[d-1]+l[d]));else c=i;a=c.map(function(e){return S(e)})}return y[n]&&(a=a.map(function(e){return e[n]()})),a},S.cache=function(e){return null!=e?(v=e,S):v},S.gamma=function(e){return null!=e?(g=e,S):g},S.nodata=function(e){return null!=e?(n=y(e),S):n},S},$t=function(e){var t,n,a,i,s,r,l;if(2===(e=e.map(function(e){return new p(e)})).length)t=e.map(function(e){return e.lab()}),s=t[0],r=t[1],i=function(e){var t=[0,1,2].map(function(t){return s[t]+e*(r[t]-s[t])});return new p(t,"lab")};else if(3===e.length)n=e.map(function(e){return e.lab()}),s=n[0],r=n[1],l=n[2],i=function(e){var t=[0,1,2].map(function(t){return(1-e)*(1-e)*s[t]+2*(1-e)*e*r[t]+e*e*l[t]});return new p(t,"lab")};else if(4===e.length){var o;a=e.map(function(e){return e.lab()}),s=a[0],r=a[1],l=a[2],o=a[3],i=function(e){var t=[0,1,2].map(function(t){return(1-e)*(1-e)*(1-e)*s[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*l[t]+e*e*e*o[t]});return new p(t,"lab")}}else if(5===e.length){var c=$t(e.slice(0,3)),d=$t(e.slice(2,5));i=function(e){return e<.5?c(2*e):d(2*(e-.5))}}return i},Qt=function(e,t,n){if(!Qt[n])throw new Error("unknown blend mode "+n);return Qt[n](e,t)},Zt=function(e){return function(t,n){var a=y(n).rgb(),i=y(t).rgb();return y.rgb(e(a,i))}},en=function(e){return function(t,n){var a=[];return a[0]=e(t[0],n[0]),a[1]=e(t[1],n[1]),a[2]=e(t[2],n[2]),a}};Qt.normal=Zt(en(function(e){return e})),Qt.multiply=Zt(en(function(e,t){return e*t/255})),Qt.screen=Zt(en(function(e,t){return 255*(1-(1-e/255)*(1-t/255))})),Qt.overlay=Zt(en(function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))})),Qt.darken=Zt(en(function(e,t){return e>t?t:e})),Qt.lighten=Zt(en(function(e,t){return e>t?e:t})),Qt.dodge=Zt(en(function(e,t){return 255===e?255:(e=t/255*255/(1-e/255))>255?255:e})),Qt.burn=Zt(en(function(e,t){return 255*(1-(1-t/255)/(e/255))}));for(var tn=Qt,nn=l.type,an=l.clip_rgb,sn=l.TWOPI,rn=Math.pow,ln=Math.sin,on=Math.cos,cn=Math.floor,dn=Math.random,un=Math.log,fn=Math.pow,pn=Math.floor,vn=Math.abs,yn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===s(e)&&(e=Object.values(e)),e.forEach(function(e){t&&"object"===s(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,en.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=function(e,t){return gn(n,e,t)},n},gn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==s(e)&&(e=yn(e));var a=e.min,i=e.max,r=e.values.sort(function(e,t){return e-t});if(1===n)return[a,i];var l=[];if("c"===t.substr(0,1)&&(l.push(a),l.push(i)),"e"===t.substr(0,1)){l.push(a);for(var o=1;o 0");var c=Math.LOG10E*un(a),d=Math.LOG10E*un(i);l.push(a);for(var u=1;u200&&(k=!1)}for(var F={},I=0;I=360;)f-=360;i[u]=f}else i[u]=i[u]/s[u];return d/=n,new p(i,t).alpha(d>.99999?1:d,!0)},y.bezier=function(e){var t=$t(e);return t.scale=function(){return Wt(t)},t},y.blend=tn,y.cubehelix=function(e,t,n,a,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===a&&(a=1),void 0===i&&(i=[0,1]);var s,r=0;"array"===nn(i)?s=i[1]-i[0]:(s=0,i=[i,i]);var l=function(l){var o=sn*((e+120)/360+t*l),c=rn(i[0]+s*l,a),d=0!==r?n[0]+l*r:n,u=d*c*(1-c)/2,f=on(o),p=ln(o),v=c+u*(-.14861*f+1.78277*p),g=c+u*(-.29227*f-.90649*p),h=c+u*(1.97294*f);return y(an([255*v,255*g,255*h,1]))};return l.start=function(t){return null==t?e:(e=t,l)},l.rotations=function(e){return null==e?t:(t=e,l)},l.gamma=function(e){return null==e?a:(a=e,l)},l.hue=function(e){return null==e?n:("array"===nn(n=e)?0==(r=n[1]-n[0])&&(n=n[1]):r=0,l)},l.lightness=function(e){return null==e?i:("array"===nn(e)?(i=e,s=e[1]-e[0]):(i=[e,e],s=0),l)},l.scale=function(){return y.scale(l)},l.hue(n),l},y.mix=y.interpolate=jt,y.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(cn(16*dn()));return new p(e,"hex")},y.scale=Wt,y.analyze=hn.analyze,y.contrast=function(e,t){e=new p(e),t=new p(t);var n=e.luminance(),a=t.luminance();return n>a?(n+.05)/(a+.05):(a+.05)/(n+.05)},y.deltaE=function(e,t,n,a){void 0===n&&(n=1),void 0===a&&(a=1),e=new p(e),t=new p(t);for(var i=Array.from(e.lab()),s=i[0],r=i[1],l=i[2],o=Array.from(t.lab()),c=o[0],d=o[1],u=o[2],f=mn(r*r+l*l),v=mn(d*d+u*u),y=s<16?.511:.040975*s/(1+.01765*s),g=.0638*f/(1+.0131*f)+.638,h=f<1e-6?0:180*bn(l,r)/wn;h<0;)h+=360;for(;h>=360;)h-=360;var m=h>=164&&h<=345?.56+kn(.2*Sn(wn*(h+168)/180)):.36+kn(.4*Sn(wn*(h+35)/180)),b=f*f*f*f,k=mn(b/(b+1900)),S=g*(k*m+1-k),w=f-v,_=r-d,O=l-u,E=(s-c)/(n*y),x=w/(a*g);return mn(E*E+x*x+(_*_+O*O-w*w)/(S*S))},y.distance=function(e,t,n){void 0===n&&(n="lab"),e=new p(e),t=new p(t);var a=e.get(n),i=t.get(n),s=0;for(var r in a){var l=(a[r]||0)-(i[r]||0);s+=l*l}return Math.sqrt(s)},y.limits=hn.limits,y.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(p,[null].concat(e))),!0}catch(e){return!1}},y.scales=_n,y.colors=D,y.brewer=Pn,y}()},function(e,t){e.exports='
\n \x3c!-- Fill options --\x3e\n
\n
Opciones
\n
\n\n
\n
\n Color:\n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n\n
\n
\n Ancho:\n \n
\n
\n \x3c!-- Polygon Pattern --\x3e\n
Opciones de patrón
\n\n
\n
\n Patrón\n \n
\n
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Tamaño:\n \n
\n\n
\n Espacio:\n \n
\n
\n\n
\n
\n Rotación:\n \n
\n\n
\n Escala:\n \n
\n
\n
\n
\n Offset:\n \n
\n
\n
\n
\n\n \x3c!-- Stroke options --\x3e\n
\n
Opciones
\n
\n
\n
\n Color:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Linedash:\n \n  \n \n
\n\n
\n Linedash Offset:\n \n
\n
\n\n
\n\n
\n Line Cap\n \n
\n\n
\n Line Join:\n \n
\n\n
\n
\n
\n\n \x3c!-- Label options --\x3e\n
\n
Opciones
\n
\n
\n
\n Color\n \n
\n
\n Texto:\n \n
\n
\n\n
\n
\n Fuente:\n \n
\n
\n Tamaño:\n \n
\n
\n\n
\n
\n Alineación horizontal:\n \n
\n\n
\n Alineación vertical:\n \n
\n\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación\n \n
\n\n
\n\n
\n\n
\n Escala:\n \n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n\n \x3c!-- TextPath Options --\x3e\n\n
\n\n
\n Ajustar a geometría\n \n
\n\n
\n Ancho Mínimo:\n \n
\n\n
\n\n
\n\n
\n Suavizar\n \n
\n\n
\n Desbordar:\n \n
\n\n
\n\n \x3c!-- Stroke Label --\x3e\n
Trazo de etiqueta:
\n
\n\n
\n Trazo\n \n
\n\n
\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n\n
\n Line Dash:\n \n  \n \n
\n\n
\n Offset:\n \n
\n\n
\n\n
\n\n
\n Line Cap:\n \n
\n\n
\n Line Join:\n \n
\n
\n\n
\n
\n\n \x3c!-- Icon Options --\x3e\n
\n
Opciones
\n
\n \x3c!-- Point Icon --\x3e\n
\n
\n URL:\n \n
\n
\n Tamaño:\n \n  \n \n
\n
\n\n
\n
\n Snap to pixel\n \n
\n
\n\n
\n
\n Anclaje:\n \n  \n \n
\n
\n Escala:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n\n \x3c!-- Form Options --\x3e\n
\n
Opciones
\n
\n\n \x3c!-- Point Font --\x3e\n
\n\n
\n bkColor:\n \n
\n\n
\n\n
\n\n
\n Forma:\n \n
\n\n
\n Familia:\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n\n
\n\n
\n Radio:\n \n
\n\n
\n Tamaño icono:\n \n
\n\n\n
\n\n
\n\n
\n Gradiente\n \n
\n\n
\n Color de icono:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n
\n\n'},function(e,t){e.exports='
\n {{#each attributes}}\n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n \n \n \n \n \n {{#each values}}\n \n \n \n \n {{/each}} {{#if attributeExists}}\n \n \n \n \n {{/if}}\n
Valor de atributoPrevisualización
{{this.name}}
Otros
\n
\n'},function(e,t){e.exports='
\n
\n
    \n
  • \n
    \n \n \n \n
    \n
  • \n
\n\n
\n \n \n \n\n \x3c!-- submenu --\x3e\n
\n
\n\n \x3c!-- fin submenu --\x3e\n\n \n \n \n\n \n \n \n\n \n \n \n\n
\n
\n\n \n \n \n\n \n \n \n\n \n \n \n
\n\n\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n
\n Atributos:\n \n
\n
\n
\n
\n Radio mínimo:\n \n
\n
\n Radio máximo:\n \n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n \x3c!-- Ranges Options --\x3e\n
\n
Rangos
\n
\n\n
\n
\n Número de rangos:\n \n
\n
\n
\n {{#each ranges}}\n
\n
Rango {{#sum @index 1}}{{/sum}}
\n
\n
\n Desde:\n \n
\n
\n Hasta:\n \n
\n
\n
\n
\n Relleno:\n \n
\n
\n Opacidad:\n \n
\n
\n
\n
\n Borde:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n
\n {{/each}} {{#pages}}\n
\n
Rango {{id}}
\n
\n
\n Desde:\n \n
\n
\n Hasta:\n \n
\n
\n
\n
\n Relleno:\n \n
\n
\n Opacidad:\n \n
\n
\n
\n
\n Borde:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n
\n {{/pages}}\n
\n\n
\n
    \n {{#each ranges}}\n
  • {{#sum @index 1}}{{/sum}}
  • \n {{/each}} {{#each pages}}\n
  • {{id}}
  • \n {{/each}}\n\n
\n
\n\n
\n
\n \x3c!-- Vendor Options --\x3e\n
\n
Opciones
\n
\n\n
\n
\n Envoltura\n \n
\n
\n Cantidad\n \n
\n
\n\n
\n
\n Seleccionable\n \n
\n
\n Animado\n \n
\n
\n\n
\n
\n Distancia:\n \n
\n
\n Puntos:\n \n
\n
\n\n
\n
\n Distancia de abanico:\n \n
\n
\n Color de texto:\n \n
\n
\n\n
\n
\n
'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n\n
\n\n
\n Atributos:\n \n
\n\n
\n
\n\n
\n Algoritmo:\n \n
\n\n
\n Rangos:\n \n
\n
\n
Rampa de color
\n
\n
\n Inicial:\n \n
\n
\n Final:\n \n
\n
\n\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n\n
\n Atributo:\n \n
\n
\n\n
\n\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n
\n Atributo:\n \n
\n
\n
\n
\n Gradiente:\n
\n {{#each gradient}}\n
\n \n \n
\n {{/each}}\n
\n
\n
\n \n \n
\n
\n\n
\n
\n Difuminado:\n \n
\n\n
\n Radio:\n \n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Eje X:\n \n
\n\n
\n Eje Y:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n\n
\n Radio de donut:\n \n
\n
\n\n
\n
\n Color 3D:\n \n
\n
\n\n
\n
\n
Atributos
\n
\n\n
\n Atributo:\n \n
\n\n
\n \n \n
\n
\n
\n
\n\n
\n
\n\n
\n
\n'},function(e,t){e.exports='
\n {{#each buttonsParams}}\n \n \n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n {{#each buttonsParams}}\n \n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n\n
\n
\n Color:\n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n\n
\n
\n Ancho:\n \n
\n
\n \x3c!-- Polygon Pattern --\x3e\n
Opciones de patrón
\n\n
\n
\n Patrón\n \n
\n
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Tamaño:\n \n
\n\n
\n Espacio:\n \n
\n
\n\n
\n
\n Rotación:\n \n
\n\n
\n Escala:\n \n
\n
\n
\n
\n Offset:\n \n
\n
\n
\n
\n\n \x3c!-- Stroke options --\x3e\n
\n
Opciones
\n
\n\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n
\n Linedash:\n \n  \n \n
\n\n
\n Linedash Offset:\n \n
\n
\n\n
\n\n
\n Line Cap\n \n
\n\n
\n Line Join\n \n
\n\n
\n
\n
\n\n \x3c!-- Label options --\x3e\n
\n
Opciones
\n
\n\n
\n\n
\n Color\n \n
\n\n
\n Texto:\n \n
\n
\n\n
\n\n
\n Fuente:\n \n
\n\n
\n Tamaño:\n \n
\n
\n\n
\n\n
\n Alineación horizontal:\n \n
\n\n
\n Alineación vertical:\n \n
\n\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n\n
\n Escala:\n \n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n\n \x3c!-- TextPath Options --\x3e\n\n
\n\n
\n Ajustar\n \n
\n\n
\n Ancho Mínimo:\n \n
\n\n
\n\n
\n\n
\n Suavizar\n \n
\n\n
\n Desbordar:\n \n
\n\n
\n\n \x3c!-- Stroke Label --\x3e\n
Trazo de etiqueta:
\n
\n\n
\n Trazo\n \n
\n\n
\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n\n
\n Line Dash:\n \n  \n \n
\n\n
\n Line Dash Offset:\n \n
\n\n
\n\n
\n\n
\n Line Cap:\n \n
\n\n
\n Line Join:\n \n
\n
\n\n
\n
\n\n \x3c!-- Icon Options --\x3e\n
\n
Opciones
\n\n
\n\n\n \x3c!-- Point Icon --\x3e\n
\n\n
\n URL\n \n
\n
\n Tamaño:\n \n  \n \n
\n\n\n
\n\n
\n\n\n
\n Snap to pixel\n \n
\n\n
\n\n
\n\n
\n Anclaje:\n \n  \n \n
\n\n
\n Escala:\n \n
\n
\n\n\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n\n \x3c!-- Form Options --\x3e\n
\n
Opciones
\n
\n\n \x3c!-- Point Font --\x3e\n
\n\n
\n bkColor:\n \n
\n\n
\n\n
\n\n
\n Forma:\n \n
\n\n
\n Familia:\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n\n
\n\n
\n Radio:\n \n
\n\n
\n Tamaño icono:\n \n
\n\n\n
\n\n
\n\n
\n Gradiente\n \n
\n\n
\n Color de icono:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n
\n'},function(e,t){e.exports='
\n\n
Variable: {{attribute}}
\n
\n\n
\n Leyenda:\n \n
\n\n
\n Mostrar etiqueta\n \n
\n\n
\n\n
\n\n
\n\n
\n Relleno:\n \n
\n\n
\n Tamaño:\n \n
\n\n
\n\n
\n\n
\n Borde:\n \n
\n\n
\n Grosor:\n \n
\n
\n\n
\n\n
\n Espacio:\n \n
\n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
    \n {{#each ranges}}\n
  • {{this.number}}
  • \n {{/each}}\n
\n
\n'},function(e,t){e.exports='
\n {{#each attributes}}\n \n {{/each}}\n
\n'},function(e){e.exports={url:{name:"stylemanager",separator:"*"},constructor:"M.plugin.StyleManager",parameters:[{type:"object",properties:[{type:"simple",name:"layer",position:0}]}],files:{ol:{scripts:["stylemanager.ol.min.js"],styles:["stylemanager.ol.min.css"]}},metadata:{name:"stylemanager",description:"Gestión del estilo de la simbología de las capas vectoriales del mapa",text:"Plugin de Mapea para la gestión de la simbología de las capas vectoriales del mapa.",version:"2.0.5",date:"Marzo, 2021",author:"",org:"Consejería de Hacienda, Industria y Energía. Junta de Andalucía",tags:"mapea,plugin",icon:"./facade/assets/icons/icons.svg"}}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(18),n(19);var a=n(4),i=n.n(a);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n1&&(M.utils.isNullOrEmpty(t[r])&&(t[r]={}),e.createObj(t[r],i.slice(1,s),a))}}],(n=[{key:"compileTemplate",value:function(e,t){return new Promise(function(n){n(M.template.compileSync(e,{vars:t}))})}},{key:"getCompilePromise",value:function(){return this.compilePromise_}},{key:"initializeView",value:function(e,t){var n=this,a=this.getOptionsTemplate();return this.compileTemplate(e,a).then(function(e){t.appendChild(e),n.htmlTemplate_=e})}},{key:"getOptionsTemplate",value:function(){}},{key:"addTemplate",value:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.compileTemplate(e,n).then(function(e){t.innerHTML=e.innerHTML,"function"==typeof a&&a()})}},{key:"appendTemplate",value:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.compileTemplate(e,n).then(function(e){t.appendChild(e),"function"==typeof a&&a()})}},{key:"generateOptions",value:function(){var t={options:{},ranges:{}};return this.querySelectorAllForEach("[data-options]",function(e){var n=e.dataset.options,a=e.value;"checkbox"===e.type&&(a=e.checked),"number"===e.type&&(a=parseFloat(a)),t[n]=a}),this.querySelectorAllForEach("[data-style-options]",function(e){var n=e.dataset.styleOptions,a=e.value;"checkbox"===e.type&&(a=e.checked),"number"===e.type&&(a=parseFloat(a)),t.options[n]=a}),this.querySelectorAllForEach("[data-array-options]",function(e){var n=e.dataset.arrayOptions,a=e.value;M.utils.isArray(t.options[n])||(t.options[n]=[]),t.options[n].push(a)}),this.querySelectorAllForEach("[data-ranges-id]",function(n){var a=n.dataset.rangesId;null==t.ranges[a]&&(t.ranges[a]={});var i=n.dataset.rangesOptions,s=n.value;"number"===n.type&&(s=parseFloat(s)),e.createObj(t.ranges[a],i,s)}),t}},{key:"setActivated",value:function(e){this.activated_=e,!0===e&&(this.activateButton_.classList.replace("check-selected","check-active"),this.unhide()),!1===e&&(this.activateButton_.classList.replace("check-active","check-selected"),this.hide())}},{key:"setSelected",value:function(e){this.selected_=e,this.selectButton_.checked=e}},{key:"setDisabled",value:function(e){this.disabled_=e,this.selectButton_.disabled=e,!0===e&&(this.activateButton_.classList.add("check-inactive"),this.setSelected(!e),this.setActivated(!e),this.hide()),!1===e&&this.activateButton_.classList.remove("check-inactive")}},{key:"hide",value:function(){return this.getTemplate().classList.add("m-hidden"),this}},{key:"unhide",value:function(){return this.getTemplate().classList.remove("m-hidden"),this}},{key:"getTemplate",value:function(){return this.htmlTemplate_}},{key:"getParentTemplate",value:function(){return this.htmlParent_}},{key:"querySelector",value:function(e){return this.getTemplate().querySelector(e)}},{key:"querySelectorAll",value:function(e){return this.getTemplate().querySelectorAll(e)}},{key:"querySelectorAllForEach",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Array.prototype.forEach.apply(this.querySelectorAll(e),[t,n])}},{key:"querySelectorAllMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Array.prototype.map.apply(this.querySelectorAll(e),[t,n])}},{key:"querySelectorParent",value:function(e){return this.getParentTemplate().querySelector(e)}},{key:"querySelectorAllParent",value:function(e){return this.getParentTemplate().querySelectorAll(e)}},{key:"querySelectorAllForEachParent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Array.prototype.forEach.apply(this.querySelectorAllParent(e),[t,n])}},{key:"querySelectorAllMapParent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Array.prototype.map.apply(this.querySelectorAllParent(e),[t,n])}},{key:"setLayer",value:function(e){return this.layer_=e,this}},{key:"getActivateButton",value:function(){return this.activateButton_}},{key:"getSelectButton",value:function(){return this.selectButton_}},{key:"setIntegerAttributes",value:function(){var e=this;if(this.layer_ instanceof M.layer.Vector){var t=this.filterAttributesFeature("number").map(function(e){return{name:e}}),n=this.getTemplate().querySelector("[data-options='attributeName']");this.compileTemplate(A.a,{attributes:t}).then(function(a){n.innerHTML=a.innerHTML,0===t.length?e.deactivateBinding():e.activateBinding()})}}},{key:"filterAttributesFeature",value:function(e){var t=this.getAllFeaturesAttributes(),n=Object.keys(t);switch(e){case"string":n=n.filter(function(e){return isNaN(parseFloat(t[e]))});break;case"number":n=n.filter(function(e){return!isNaN(parseFloat(t[e]))})}return n}},{key:"getFeaturesAttributes",value:function(){return this.layer_.getFeatures()[0].getAttributes()}},{key:"getAllFeaturesAttributes",value:function(){var e=this.getFeaturesAttributes();return this.layer_.getFeatures().reverse().forEach(function(t){Object.keys(t.getAttributes()).forEach(function(t,n){null!=n&&null==e[t]&&(e[t]=n)})}),e}},{key:"hideAllOptionsSections",value:function(){this.querySelectorAllForEach(".styles-row",function(e){e.classList.add("m-hidden")})}},{key:"hideOptionSection",value:function(e){this.querySelector("[data-id=".concat(e,"]")).classList.add("m-hidden")}},{key:"showOptionSection",value:function(e){this.querySelector("[data-id=".concat(e,"]")).classList.remove("m-hidden")}},{key:"addInputListener",value:function(e){this.querySelectorAllForEach("input",function(t){t.addEventListener("change",e)}),this.querySelectorAllForEach("select",function(t){t.addEventListener("change",e)})}},{key:"deactivateBinding",value:function(){this.querySelectorAllForEach("input,select:not([data-options='attributeName']),label,span,.subtitle",function(e){e.classList.add("m-hidden")}),this.querySelector("[data-options='attributeName']").disabled=!0;var e=document.createElement("option");e.value="",e.innerText="No existen atributos",this.querySelector("[data-options='attributeName']").add(e),this.querySelector("span").classList.remove("m-hidden")}},{key:"activateBinding",value:function(){this.querySelectorAllForEach("input,select:not([data-options='attributeName']),label,span,.subtitle",function(e){e.classList.remove("m-hidden")}),this.querySelector("[data-options='attributeName']").disabled=!1}},{key:"destroy",value:function(){this.htmlParent_.removeChild(this.htmlTemplate_)}}])&&C(t.prototype,n),a&&C(t,a),e}();function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return this.layer_=e,!0===t&&this.refreshTemplate(),this}},{key:"setGeometry",value:function(e){return t.GEOMETRIES.includes(e)?this.geometry_=e:this.geometry_="point",this}},{key:"getGeometry",value:function(){return this.geometry_}},{key:"refreshTemplate",value:function(){var e=this,n=this.getGeometry();t.GEOMETRIES.filter(function(e){return e!==n}).forEach(function(t){e.querySelectorAllForEach('[data-geometry="'.concat(t,'"]'),function(e){return e.classList.add("m-hidden")})}),this.querySelectorAllForEach('[data-geometry="'.concat(n,'"]'),function(e){return e.classList.remove("m-hidden")}),this.refreshOptionsButtons(),this.addLabelPathListener()}},{key:"refreshOptionsButtons",value:function(){var e=this,n=t.OPTIONS_POINT_SUBMENU;"point"!==this.getGeometry()&&(n=t.OPTIONS_SUBMENU),this.addOptionsButtons(n,function(){e.compatibleSectionListener("icon","form"),e.compatibleSectionListener("form","icon")})}},{key:"addOptionsButtons",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=this.getParentTemplate().querySelector("[data-buttons-option]");this.hideAllOptionsSections(),this.addTemplate(P.a,a,{buttonsParams:e},function(){e.forEach(function(e){t.toggleCheckOptionSection(e.id),t.activateOptionSection(e.id),"function"==typeof n&&n()}),t.activateOptionsStyle(),t.addEventCheckFromSubmenu()})}},{key:"addEventCheckFromSubmenu",value:function(){var e=this;this.querySelectorAllForEachParent("[data-buttons-option] input",function(t){t.addEventListener("change",function(){e.controller_.selectPanel("stylesimple")})})}},{key:"activateOptionsStyle",value:function(){var e=this.style_,t=this.querySelector("#select-icon");t.replaceWith(t.cloneNode(!0)),(t=this.querySelector("#select-icon")).addEventListener("click",this.eventOpenIconSelector),document.querySelector(".style-grid-container").addEventListener("click",this.eventSelectIcon);var n=this.querySelector("[data-style-options='form.class']");n.addEventListener("change",this.changeFamilyFont);var a=this.querySelector(".style-col-2 > select[data-style-options = 'form.class']"),i=a.dataset.icon;if(""!==i){var s=i.split("-"),r="g"==s[0]?"g-cartografia":"fa"==s[0]?"fa":"";a.querySelector('option[value="'.concat(r,'"]')).selected=!0,a.dispatchEvent(new Event("change")),document.querySelector("#select-icon").classList=("fa"==r?"fa ":"")+i,document.querySelector(".style-grid-item".concat("fa"==r?".fa":"",".").concat(i)).classList.add("selected")}if(null!=e){var l=e.getOptions();if(null!=l.fill)Object.values(l.fill).filter(function(e){return null!=e}).length>0&&this.checkOptionSection("fill");null!=l.stroke&&this.checkOptionSection("stroke"),null!=l.label&&this.checkOptionSection("label"),null!=l.icon&&(l.icon.hasOwnProperty("src")&&(this.checkOptionSection("icon"),this.disableOption("form")),l.icon.hasOwnProperty("form")&&(this.checkOptionSection("form"),this.disableOption("icon")),l.icon.hasOwnProperty("class")&&(n.value=l.icon.class))}}},{key:"eventOpenIconSelector",value:function(e){var t=document.querySelector(".style-grid-container");"style-grid-container active"===t.classList.toString()?t.classList.remove("active"):t.classList.add("active")}},{key:"eventSelectIcon",value:function(e){if(!e.target.classList.contains("selected")&&e.target.classList.contains("style-grid-item")){var t=document.querySelector(".style-grid-item.selected");t&&t.classList.remove("selected"),e.target.classList.add("selected");var n=e.target.classList.toString().replace("selected","").replace("style-grid-item","").trim();document.querySelector("[data-style-options='form.class']").dataset.icon=n.replace("fa","").trim(),document.querySelector("#select-icon").classList=n}}},{key:"changeFamilyFont",value:function(e){""===e.target.value?(document.querySelector("#select-icon").style.display="none",document.querySelector(".style-grid-container").classList.remove("active")):document.querySelector("#select-icon").style.display="inherit",document.querySelectorAll(".style-grid-item").forEach(function(e){e.style.display="none"}),document.querySelectorAll(".style-grid-item[class*='".concat(e.target.value,"']")).forEach(function(e){e.style.display="inherit"})}},{key:"addLabelPathListener",value:function(){var e=this,t=this.querySelector("[data-style-options='label.path']");t.addEventListener("change",function(){e.togglePathSection(!t.checked)})}},{key:"togglePathSection",value:function(e){this.querySelectorAllForEach("[data-textpath]",function(t){t.disabled=!0===e&&e})}},{key:"toggleCheckOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')).addEventListener("change",function(n){t.toggleCheckOptSectionListener(e,n)})}},{key:"toggleCheckOptSectionListener",value:function(e,t){!0===t.target.checked&&this.activateOption(e)}},{key:"checkOptionSection",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.activateOption(e),t.checked=!0}},{key:"activateOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] [data-label="'.concat(e,'"]')).addEventListener("click",function(){t.activateOption(e)})}},{key:"activateOption",value:function(e){var t=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),n=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=n&&!1===n.disabled&&(this.activateLabel(t),this.displaySectionOption(e))}},{key:"activateLabel",value:function(e){this.querySelectorAllForEachParent("[data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),e.classList.add("check-active"),e.classList.remove("check-selected")}},{key:"displaySectionOption",value:function(e){this.hideAllOptionsSections(),this.showOptionSection(e)}},{key:"generateOptions",value:function(){var e=this,t={options:{}};this.querySelectorAllForEach("[data-style-options]",function(n){var a=n.dataset.styleOptions,i=n.value;"form.class"==a&&""!==i&&(i=e.querySelector("[data-style-options='form.class']").dataset.icon),"checkbox"===n.type&&(i=n.checked),"number"===n.type&&(i=parseFloat(i),isNaN(i)&&(i=0));var s=n.dataset.target;if(void 0!==s){var r=parseFloat(e.querySelector('[data-id="'.concat(s,'"]')).value);isNaN(r)&&(r=0),i=[i,r]}j.createObj(t.options,a,i)}),this.querySelectorAllForEach("[data-apply]",function(e){var n=e.dataset.apply;!1===e.checked&&j.createObj(t.options,n,void 0)});var n,a=this.querySelector("[data-font-size]").value||12,i=this.querySelector("[data-font-family]").value,s="".concat(a,"px ").concat(i),r=document.querySelector("[data-apply='icon']"),l=null!==r&&!0===r.checked?t.options.src:t.options.form;return null!=t.options.label&&null!=t.options.label.text&&(n=t.options.label),t.options={fill:t.options.fill,stroke:t.options.stroke,label:n,icon:l,radius:t.options.radius},"line"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label},delete t.options.fill.pattern,0===Object.keys(t.options.fill).length&&delete t.options.fill),"polygon"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label}),null!=t.options.label&&(t.options.label.font=s),this.processOptions(t)}},{key:"processOptions",value:function(e){var t=M.utils.extends({},e),n=this.isChecked("fill"),a=this.isChecked("stroke"),i=this.isChecked("label"),s=this.isChecked("icon"),r=this.isChecked("form");return t.options.fill=!0===n?t.options.fill:void 0,t.options.stroke=!0===a?t.options.stroke:void 0,t.options.label=!0===i?t.options.label:void 0,t.options.icon=!0===s||!0===r?t.options.icon:void 0,t}},{key:"isChecked",value:function(e){var t=!1,n=this.getParentTemplate().querySelector("[data-buttons-option] input[data-apply='".concat(e,"'"));return null!=n&&(t=n.checked),t}},{key:"generateStyle",value:function(){var e;this.querySelectorAllForEach("[data-apply]",function(e){!0===e.checked&&!1});var t=this.getGeometry(),n=this.generateOptions().options;switch(t){case"point":e=new M.style.Point(n);break;case"line":e=new M.style.Line(n);break;case"polygon":e=new M.style.Polygon(n);break;default:M.dialog.error("Geometría no soportada","Error")}return e}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("change",function(){!0===a.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active"),t.disabled=!0,t.checked=!1}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')).classList.remove("check-inactive"),t.disabled=!1}},{key:"getOptionsTemplate",value:function(){var e=t.DEFAULT_OPTIONS_STYLE;null!=this.style_&&(null!=this.style_.get("fill.pattern")&&(e.patternflag=!0),e=M.utils.extends({},this.style_.getOptions()),e=M.utils.extends(e,t.DEFAULT_OPTIONS_STYLE)),e.fill.color=x(e.fill.color).hex(),e.stroke.color=x(e.stroke.color).hex(),e.label.fill.color=x(e.label.fill.color).hex(),e.label.stroke.color="no-color"===e.label.stroke.color?"no-color":x(e.label.stroke.color).hex(),e.fill.pattern.color=x(e.fill.pattern.color).hex(),e.icon.fill=x(e.icon.fill).hex(),e.icon.color=x(e.icon.color).hex();var n=Object.keys(M.style.pattern).filter(function(e){return"ICON"!=e&&"IMAGE"!=e}),a=Object.values(M.style.align),i=Object.values(M.style.baseline),s=Object.values(M.style.form).filter(function(e){return null!=e});if(e.patternlist=t.arrayDataToTemplate(e.fill.pattern.name,n,n),e.linecapstroke=t.arrayDataToTemplate(e.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinstroke=t.arrayDataToTemplate(e.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.linecaplabelstroke=t.arrayDataToTemplate(e.label.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinlabelstroke=t.arrayDataToTemplate(e.label.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.alignlist=t.arrayDataToTemplate(e.label.align,a,["Centro","Justificado","Izquierda","Derecha"]),e.baselinelist=t.arrayDataToTemplate(e.label.baseline,i,["Alfabetico","Abajo","Colgando","Ideografico","Arriba","Centro"]),e.formlist=t.arrayDataToTemplate(e.icon.form,s,s),null!=this.layer_){var r=Object.keys(this.getFeaturesAttributes()),l=null!=e.label?e.label.text:"";e.featuresAttr=t.arrayDataToTemplate(l,r.map(function(e){return"{{".concat(e,"}}")}),r)}return e}},{key:"toggleDisplaySubmenu",value:function(e){var t=!0===e?"add":"remove";this.getParentTemplate().querySelector("[data-buttons-option]").classList[t]("m-hidden")}},{key:"refreshLegend",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.imgId_,i=this.generateStyle();if(!0===n&&(i=this.style_),null!=i){(i=i.clone())instanceof M.style.Point&&(i.set("radius",t.RADIUS_OPTION),null!=i.get("icon.radius")&&i.set("icon.radius",t.ICON_RADIUS_OPTION));var s=this.htmlParent_.querySelector("img[id='img-".concat(a,"']"));i.updateCanvas();var r=i.toImage();null!=s&&(s.src=r)}}},{key:"imgId",set:function(e){this.imgId_=e},get:function(){return this.imgId_}}])&&I(n.prototype,a),i&&I(n,i),t}();function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var n=0;n0&&n1&&void 0!==arguments[1])||arguments[1];return this.layer_=e,!0===t&&this.refreshTemplate(),this}},{key:"getOptions",value:function(){return{fill:this.fill_,stroke:this.stroke_,label:this.label_,form:this.form_,icon:this.icon_}}},{key:"setGeometry",value:function(e){return t.GEOMETRIES.includes(e)?this.geometry_=e:this.geometry_="point",this}},{key:"getGeometry",value:function(){return this.geometry_}},{key:"refreshTemplate",value:function(){var e=this,n=this.getGeometry();t.GEOMETRIES.filter(function(e){return e!==n}).forEach(function(t){e.querySelectorAllForEach('[data-geometry="'.concat(t,'"]'),function(e){return e.classList.add("m-hidden")})}),this.querySelectorAllForEach('[data-geometry="'.concat(n,'"]'),function(e){return e.classList.remove("m-hidden")}),this.addLabelPathListener()}},{key:"activateOptionsStyle",value:function(){var e=this.style_;if(null!=e){var t=e.getOptions();if(null!=t.fill)Object.values(t.fill).filter(function(e){return null!=e}).length>0&&this.checkOptionSection("fill");null!=t.stroke&&this.checkOptionSection("stroke"),null!=t.label&&this.checkOptionSection("label"),null!=t.icon&&(t.icon.hasOwnProperty("src")&&(this.checkOptionSection("icon"),this.disableOption("form")),t.icon.hasOwnProperty("form")&&(this.checkOptionSection("form"),this.disableOption("icon")))}}},{key:"showCompatibleSections",value:function(){this.binding_.enableOption("form"),this.binding_.enableOption("icon"),!0===this.icon_&&this.binding_.disableOption("form"),!0===this.form_&&this.binding_.disableOption("icon")}},{key:"addLabelPathListener",value:function(){var e=this,t=this.querySelector("[data-style-options='label.path']");t.addEventListener("change",function(){e.togglePathSection(!t.checked)})}},{key:"togglePathSection",value:function(e){this.querySelectorAllForEach("[data-textpath]",function(t){t.disabled=!0===e&&e})}},{key:"toggleCheckOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')).addEventListener("change",function(n){t.toggleCheckOptSectionListener(e,n)})}},{key:"toggleCheckOptSectionListener",value:function(e,t){!0===t.target.checked&&this.activateOption(e)}},{key:"checkOptionSection",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.activateOption(e),t.checked=!0}},{key:"activateOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] [data-label="'.concat(e,'"]')).addEventListener("click",function(){t.activateOption(e)})}},{key:"activateOption",value:function(e){var t=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),n=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=n&&!1===n.disabled&&(this.activateLabel(t),this.displaySectionOption(e))}},{key:"activateLabel",value:function(e){this.querySelectorAllForEachParent("[data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),e.classList.add("check-active"),e.classList.remove("check-selected")}},{key:"displaySectionOption",value:function(e){this.hideAllOptionsSections(),this.showOptionSection(e)}},{key:"generateOptions",value:function(){var e=this,t={options:{}};this.querySelectorAllForEach("[data-style-options]",function(n){var a=n.dataset.styleOptions,i=n.value;"checkbox"===n.type&&(i=n.checked),"number"===n.type&&(i=parseFloat(i),isNaN(i)&&(i=0));var s=n.dataset.target;if(void 0!==s){var r=parseFloat(e.querySelector('[data-id="'.concat(s,'"]')).value);isNaN(r)&&(r=0),i=[i,r]}j.createObj(t.options,a,i)}),this.querySelectorAllForEach("[data-apply]",function(e){var n=e.dataset.apply;!1===e.checked&&j.createObj(t.options,n,void 0)});var n,a=this.querySelector("[data-font-size]").value||12,i=this.querySelector("[data-font-family]").value,s="".concat(a,"px ").concat(i),r=!0===this.icon?t.options.src:t.options.form;return null!=t.options.label&&null!=t.options.label.text&&(n=t.options.label),t.options={fill:t.options.fill,stroke:t.options.stroke,label:n,icon:r,radius:t.options.radius},"line"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label},delete t.options.fill.pattern,0===Object.keys(t.options.fill).length&&delete t.options.fill),"polygon"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label}),null!=t.options.label&&(t.options.label.font=s),this.processOptions(t)}},{key:"processOptions",value:function(e){var t=M.utils.extends({},e),n=this.isChecked("fill"),a=this.isChecked("stroke"),i=this.isChecked("label"),s=this.isChecked("icon"),r=this.isChecked("form");return t.options.fill=!0===n?t.options.fill:void 0,t.options.stroke=!0===a?t.options.stroke:void 0,t.options.label=!0===i?t.options.label:void 0,t.options.icon=!0===s||!0===r?t.options.icon:void 0,t}},{key:"isChecked",value:function(e){var t=!1,n=this.getParentTemplate().parentElement.querySelector("[data-buttons-option-category] input[data-apply='".concat(e,"'"));return null!=n&&(t=n.checked),t}},{key:"generateStyle",value:function(){var e;this.querySelectorAllForEach("[data-apply]",function(e){!0===e.checked&&!1});var t=this.getGeometry(),n=this.generateOptions().options;switch(t){case"point":e=new M.style.Point(n);break;case"line":e=new M.style.Line(n);break;case"polygon":e=new M.style.Polygon(n);break;default:M.dialog.error("Geometría no soportada","Error")}return e}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),i=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("click",function(){!1===i.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active"),t.disabled=!0,t.checked=!1}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')).classList.remove("check-inactive"),t.disabled=!1}},{key:"getOptionsTemplate",value:function(){var e=t.DEFAULT_OPTIONS_STYLE;null!=this.style_&&(null!=this.style_.get("fill.pattern")&&(e.patternflag=!0),e=M.utils.extends({},this.style_.getOptions()),e=M.utils.extends(e,t.DEFAULT_OPTIONS_STYLE)),e.fill.color=x(e.fill.color).hex(),e.stroke.color=x(e.stroke.color).hex(),e.label.fill.color=x(e.label.fill.color).hex(),e.label.stroke.color="no-color"===e.label.stroke.color?"no-color":x(e.label.stroke.color).hex(),e.fill.pattern.color=x(e.fill.pattern.color).hex(),e.icon.fill=x(e.icon.fill).hex(),e.icon.gradientcolor=x(e.icon.gradientcolor).hex();var n=Object.keys(M.style.pattern).filter(function(e){return"ICON"!=e&&"IMAGE"!=e}),a=Object.values(M.style.align),i=Object.values(M.style.baseline),s=Object.values(M.style.form).filter(function(e){return null!=e});if(e.patternlist=t.arrayDataToTemplate(e.fill.pattern.name,n,n),e.linecapstroke=t.arrayDataToTemplate(e.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinstroke=t.arrayDataToTemplate(e.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.linecaplabelstroke=t.arrayDataToTemplate(e.label.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinlabelstroke=t.arrayDataToTemplate(e.label.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.alignlist=t.arrayDataToTemplate(e.label.align,a,a),e.baselinelist=t.arrayDataToTemplate(e.label.baseline,i,i),e.formlist=t.arrayDataToTemplate(e.icon.form,s,s),null!=this.layer_){var r=Object.keys(this.getFeaturesAttributes()),l=null!=e.label?e.label.text:"";e.featuresAttr=t.arrayDataToTemplate(l,r.map(function(e){return"{{".concat(e,"}}")}),r)}return e}},{key:"toggleDisplaySubmenu",value:function(e){var t=!0===e?"add":"remove";this.getParentTemplate().querySelector("[data-buttons-option]").classList[t]("m-hidden")}},{key:"addLegendListener",value:function(){var e=this;this.querySelectorAllForEach("input,select,div.m-boxes",function(t){t instanceof HTMLDivElement?t.addEventListener("click",function(){e.refreshLegend(t)}):t instanceof HTMLSelectElement?t.addEventListener("change",function(){e.refreshLegend(t)}):t.addEventListener("input",function(){e.refreshLegend(t)})})}},{key:"refreshLegend",value:function(e,n){var a=this.imgId_,i=this.generateStyle();if(!0===n&&(i=this.style_),null!=i){this.style_=i,(i=i.clone())instanceof M.style.Point&&(i.set("radius",t.RADIUS_OPTION),null!=i.get("icon.radius")&&i.set("icon.radius",t.ICON_RADIUS_OPTION));var s=this.htmlParent_.querySelector("img[id='img-".concat(a,"']"));i.updateCanvas();var r=i.toImage();null!=s&&(s.src=r)}}},{key:"imgId",set:function(e){this.imgId_=e},get:function(){return this.imgId_}},{key:"fill",set:function(e){this.fill_=e},get:function(){return this.fill_}},{key:"stroke",set:function(e){this.stroke_=e},get:function(){return this.stroke_}},{key:"label",set:function(e){this.label_=e},get:function(){return this.label_}},{key:"form",set:function(e){this.form_=e},get:function(){return this.form_}},{key:"icon",set:function(e){this.icon_=e},get:function(){return this.icon_}},{key:"style",get:function(){return this.style_}}])&&Se(n.prototype,a),i&&Se(n,i),t}();function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Le(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,a=this.getParentTemplate().querySelector("[data-buttons-option-category]");this.addTemplate(ve.a,a,{buttonsParams:e},function(a){"function"==typeof n&&n(),e.forEach(function(n){return t.addEventOptionListener(n,e)}),e.forEach(function(n){return t.addEventCheckListener(n,e)}),t.deactivateSubmenu(),t.addEventCheckFromSubmenu()})}},{key:"addEventCheckFromSubmenu",value:function(){var e=this;this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(t){t.addEventListener("change",function(){e.controller_.selectPanel("stylecategory"),e.controller_.setCompatibleStylePanels("stylecategory"),e.controller_.showActivePanel("stylecategory")})})}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option-category] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("change",function(){!0===a.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),null!=n&&(n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active")),null!=t&&(t.disabled=!0,t.checked=!1)}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]+label'));null!=n&&n.classList.remove("check-inactive"),null!=t&&(t.disabled=!1)}},{key:"toggleCategory",value:function(e){var t=this;Object.values(this.styleCategories_).forEach(function(e){e.hide()}),!1===this.clickedOnTable_&&(this.activateSubmenu(),this.clickedOnTable_=!0);var n=this.styleCategories_[e];this.selectedCategory_=n;var a=this.selectedCategory_.getOptions();this.checkInput("fill",a.fill),this.checkInput("stroke",a.stroke),this.checkInput("label",a.label),this.checkInput("form",a.form),this.checkInput("icon",a.icon),null!=n&&(n.unhide(),n.showCompatibleSections()),Object.values(this.styleCategories_).forEach(function(e){e.setLayer(t.layer_,!1)})}},{key:"renderAttributeOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.querySelector("[data-options='attributeName']").value;null!=this.style_&&!0===e&&(n=this.style_.getAttributeName());var a=!M.utils.isNullOrEmpty(n),i=this.getAllValuesAttribute(n).filter(function(e){return!M.utils.isNullOrEmpty(e)}).map(function(e){return{name:e}}).splice(0,t.MAXNUMBER_CATEGORIES);this.removeCategories(),this.createCategories(i),this.addCategoriesView(i,a)}},{key:"addCategoriesView",value:function(e,t){var n=this,a=this.querySelector("[data-options='values']");this.compileTemplate(me.a,{values:e,attributeExists:t}).then(function(e){a.innerHTML=e.innerHTML,Object.values(n.styleCategories_).forEach(function(e){e.refreshTemplate(),e.hide()}),n.addEventClickListener(),n.addEventSelectedListener(),n.addLegendListenerAll()})}},{key:"createCategories",value:function(e){var t=this,n=null==this.style_?null:this.style_.getCategories();e.forEach(function(e){var a=null==n?null:n[e.name];t.styleCategories_[e.name]=new Ee(ge.a,t.htmlTemplate_,"stylesimple",a,t.layer_,t),t.styleCategories_[e.name].compilePromise_.then(function(){t.styleCategories_[e.name].refreshLegend(e.name,!0)}),t.setGeometryCategory(t.styleCategories_[e.name])});var a=null==n?null:n.other;this.styleCategories_.other=new Ee(p.a,this.htmlTemplate_,"stylesimple",a,this.layer_,this),this.styleCategories_.other.compilePromise_.then(function(){t.styleCategories_.other.refreshLegend("other",!0)}),this.setGeometryCategory(this.styleCategories_.other)}},{key:"removeCategories",value:function(){Object.values(this.styleCategories_).forEach(function(e){return e.destroy()}),this.styleCategories_={}}},{key:"setAttributes",value:function(){var e=this;if(this.layer_ instanceof M.layer.Vector){var t=null==this.style_?"":this.style_.getAttributeName(),n=this.filterAttributesFeature("string").map(function(e){return{name:e,selected:t}}),a=this.getTemplate().querySelector("[data-options='attributeName']");this.compileTemplate(A.a,{attributes:n}).then(function(t){a.innerHTML=t.innerHTML,e.renderAttributeOptions(!0),0===n.length?e.deactivateBinding():e.activateBinding()})}}},{key:"setGeometryCategory",value:function(e){switch(this.layer_.getFeatures()[0].getGeometry().type){case"Point":case"MultiPoint":e.geometry_="point";break;case"LineString":case"MultiLineString":e.geometry_="line";break;case"Polygon":case"MultiPolygon":e.geometry_="polygon";break;default:M.dialog.error("Geometria no soportada","Error")}}},{key:"showSection",value:function(e){this.querySelectorAllForEach("[data-id='".concat(e,"']"),function(e){e.classList.remove("m-hidden")})}},{key:"hideSection",value:function(e){this.querySelectorAllForEach("[data-id='".concat(e,"']"),function(e){e.classList.add("m-hidden")})}},{key:"addEventOptionListener",value:function(e,t){var n=this,a=this.querySelectorParent("[data-buttons-option-category] [data-label='".concat(e.id,"']")),i=this.querySelectorParent("[data-buttons-option-category] input[data-apply='".concat(e.id,"']"));a.addEventListener("click",function(){!1===i.disabled&&(t.forEach(function(e){return n.hideSection(e.id)}),n.showSection(e.id),n.activeSection(e.id))})}},{key:"addEventCheckListener",value:function(e,t){var n=this;this.querySelectorParent("[data-buttons-option-category] input[data-apply='".concat(e.id,"']")).addEventListener("click",function(){n.checkSection(e.id,t)})}},{key:"activeSection",value:function(e){var t=this.querySelectorParent("[data-buttons-option-category] [data-selector='".concat(e,"']"));this.querySelectorAllForEachParent("[data-buttons-option-category] [data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),t.classList.remove("check-selected"),t.classList.add("check-active")}},{key:"setSelectedRow",value:function(e){this.querySelectorAllForEach("td:first-child",function(e){e.classList.remove("m-table-cell-selected")}),this.querySelector("[id='".concat(e,"']")).classList.add("m-table-cell-selected")}},{key:"addEventSelectedListener",value:function(){var e=this;this.querySelectorAllForEach("td:first-child",function(t){var n=t.id;t.addEventListener("click",function(){return e.setSelectedRow(n)})})}},{key:"checkSection",value:function(e,t){var n=this;!0===this.querySelectorParent("[data-buttons-option-category] #cat-".concat(e)).checked?(null!=this.selectedCategory_&&(this.selectedCategory_[e]=!0),t.forEach(function(e){return n.hideSection(e.id)}),this.showSection(e),this.activeSection(e)):null!=this.selectedCategory_&&(this.selectedCategory_[e]=!1),this.selectedCategory_.refreshLegend()}},{key:"checkInput",value:function(e,t){var n=this.querySelectorParent("[data-buttons-option-category] #cat-".concat(e));null!=n&&(n.checked=t)}},{key:"activateSubmenu",value:function(){this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(e){return e.disabled=!1}),this.querySelectorAllForEachParent("[data-buttons-option-category] label[data-selector]",function(e){e.classList.remove("check-inactive"),e.classList.add("check-selected")})}},{key:"deactivateSubmenu",value:function(){this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(e){return e.disabled=!0}),this.querySelectorAllForEachParent("[data-buttons-option-category] label[data-selector]",function(e){e.classList.add("check-inactive"),e.classList.remove("check-selected")})}},{key:"getGeometry",value:function(){var e=this.layer_.getFeatures()[0].getGeometry().type;switch(e){case"Point":case"MultiPoint":e="point";break;case"LineString":case"MultiLineString":e="line";break;case"Polygon":case"MultiPolygon":e="polygon";break;default:M.dialog.error("Geometria no soportada","Error")}return e}},{key:"getAllValuesAttribute",value:function(e){return this.layer_.getFeatures().map(function(t){return t.getAttribute(e)}).filter(function(e,t,n){return n.indexOf(e)==t})}},{key:"generateOptions",value:function(){var e=this,t={},n={};return t.attributeName=this.querySelector("[data-options='attributeName']").value,Object.keys(this.styleCategories_).forEach(function(t){var a=e.styleCategories_[t],i=e.styleCategories_[t].generateOptions().options,s=a.fill,r=a.stroke,l=a.icon||a.form,o=a.label;null!=i.fill&&Object.values(i.fill).filter(function(e){return null!=e});(s||r||l||o)&&(n[t]=e.styleCategories_[t].style)},this),t.options=n,t}},{key:"generateStyle",value:function(){var e=this.generateOptions(),t=null;return""!==e.attributeName&&(t=new M.style.Category(e.attributeName,e.options)),t}},{key:"addLegendListenerAll",value:function(){var e=this;Object.keys(this.styleCategories_).forEach(function(t){var n=e.styleCategories_[t];n.imgId=t,n.addLegendListener()})}}])&&Le(n.prototype,a),i&&Le(n,i),t}(),Ce=n(14),Me=n.n(Ce),je=n(15),Ne=n.n(je),Fe=n(16),Ie=n.n(Fe);function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:null,a=e.value;(this.layer_=this.getLayerByName(a),null!=n&&(this.layer_=n),this.layer_ instanceof M.layer.Vector)&&(0===this.layer_.getFeatures().length?(M.dialog.error("La capa no tiene features o aún no se han cargado.","Error"),e.selectedIndex=0):(this.bindinController_.change(this.layer_),this.showBoxes(t),this.addOpenAttribute(t)))}},{key:"getLayerByName",value:function(e){return this.facadeMap_.getWFS().concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(function(e){return"GeoJSON"===e.type}))).find(function(t){return t.name===e})}},{key:"showBoxes",value:function(e){e.querySelector(".m-boxes").classList.remove("m-hidden")}},{key:"applyStyle",value:function(){if(this.layer_ instanceof M.layer.Vector){this.layer_.setStyle(null);var e=this.bindinController_.getStyle();this.layer_.setStyle(e)}else M.dialog.info("Tiene que elegir una capa.","Elija capa")}},{key:"clearStyle",value:function(){this.layer_ instanceof M.layer.Vector?this.layer_.clearStyle():M.dialog.info("Tiene que elegir una capa.","Elija capa")}},{key:"loadFonts",value:function(){M.style.Font.addSymbol({font:"FontAwesome",name:"FontAwesome",copyright:"SIL OFL 1.1",prefix:"fa"},{"fa-glass":"","fa-music":"","fa-search":"","fa-envelope-o":"","fa-heart":"","fa-star":"","fa-star-o":"","fa-user":"","fa-film":"","fa-th-large":"","fa-th":"","fa-th-list":"","fa-check":"","fa-remove":"","fa-close":"","fa-times":"","fa-search-plus":"","fa-search-minus":"","fa-power-off":"","fa-signal":"","fa-gear":"","fa-cog":"","fa-trash-o":"","fa-home":"","fa-file-o":"","fa-clock-o":"","fa-road":"","fa-download":"","fa-arrow-circle-o-down":"","fa-arrow-circle-o-up":"","fa-inbox":"","fa-play-circle-o":"","fa-rotate-right":"","fa-repeat":"","fa-refresh":"","fa-list-alt":"","fa-lock":"","fa-flag":"","fa-headphones":"","fa-volume-off":"","fa-volume-down":"","fa-volume-up":"","fa-qrcode":"","fa-barcode":"","fa-tag":"","fa-tags":"","fa-book":"","fa-bookmark":"","fa-print":"","fa-camera":"","fa-font":"","fa-bold":"","fa-italic":"","fa-text-height":"","fa-text-width":"","fa-align-left":"","fa-align-center":"","fa-align-right":"","fa-align-justify":"","fa-list":"","fa-dedent":"","fa-outdent":"","fa-indent":"","fa-video-camera":"","fa-photo":"","fa-image":"","fa-picture-o":"","fa-pencil":"","fa-map-marker":"","fa-adjust":"","fa-tint":"","fa-edit":"","fa-pencil-square-o":"","fa-share-square-o":"","fa-check-square-o":"","fa-arrows":"","fa-step-backward":"","fa-fast-backward":"","fa-backward":"","fa-play":"","fa-pause":"","fa-stop":"","fa-forward":"","fa-fast-forward":"","fa-step-forward":"","fa-eject":"","fa-chevron-left":"","fa-chevron-right":"","fa-plus-circle":"","fa-minus-circle":"","fa-times-circle":"","fa-check-circle":"","fa-question-circle":"","fa-info-circle":"","fa-crosshairs":"","fa-times-circle-o":"","fa-check-circle-o":"","fa-ban":"","fa-arrow-left":"","fa-arrow-right":"","fa-arrow-up":"","fa-arrow-down":"","fa-mail-forward":"","fa-share":"","fa-expand":"","fa-compress":"","fa-plus":"","fa-minus":"","fa-asterisk":"","fa-exclamation-circle":"","fa-gift":"","fa-leaf":"","fa-fire":"","fa-eye":"","fa-eye-slash":"","fa-warning":"","fa-exclamation-triangle":"","fa-plane":"","fa-calendar":"","fa-random":"","fa-comment":"","fa-magnet":"","fa-chevron-up":"","fa-chevron-down":"","fa-retweet":"","fa-shopping-cart":"","fa-folder":"","fa-folder-open":"","fa-arrows-v":"","fa-arrows-h":"","fa-bar-t-o":"","fa-bar-t":"","fa-twitter-square":"","fa-facebook-square":"","fa-camera-retro":"","fa-key":"","fa-gears":"","fa-cogs":"","fa-comments":""})}},{key:"equals",value:function(e){return e instanceof t}}])&&$e(n.prototype,a),s&&$e(n,s),t}();function nt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=lt(this,ot(t).call(this))).map_=null,e.controls_=[],e.metadata_=it.metadata,e.panel_=null,e.layer_=n,at.apply(window),Handlebars.registerHelper("sum",function(e,t){return e+t}),Handlebars.registerHelper("neq",function(e,t,n){return Object.equals(e,t)?n.inverse(this):n.fn(this)}),Handlebars.registerHelper("unless",function(e,t){return e?t.inverse(this):t.fn(this)}),Handlebars.registerHelper("get",function(e,t){return t[e]}),Handlebars.registerHelper("uppercase",function(e){return e.toUpperCase()}),Handlebars.registerHelper("lowercase",function(e){return e.toLowerCase()}),M.utils.extends=M.utils.extendsObj,e}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(t,M.Plugin),n=t,(a=[{key:"addTo",value:function(e){this.controls_.push(new tt(this.layer_)),this.map_=e,this.panel_=new M.ui.Panel(t.NAME,{collapsible:!0,className:"m-stylemanager",collapsedButtonClass:"g-sigc-palette",position:M.ui.position.TL}),this.panel_.addControls(this.controls_),e.addPanels(this.panel_)}},{key:"destroy",value:function(){this.map_.removeControls(this.controls_);var e=[null,null,null];this.control_=e[0],this.panel_=e[1],this.map_=e[2]}},{key:"getMetadata",value:function(){return this.metadata_}},{key:"name",get:function(){return"stylemanager"}}])&&rt(n.prototype,a),i&&rt(n,i),t}();window.M.plugin||(window.M.plugin={}),window.M.plugin.StyleManager=dt}]); -//# sourceMappingURL=stylemanager-2.0.5.ol.min.js.map \ No newline at end of file diff --git a/dist/stylemanager-2.0.5.ol.min.js.map b/dist/stylemanager-2.0.5.ol.min.js.map deleted file mode 100644 index 1d67bec..0000000 --- a/dist/stylemanager-2.0.5.ol.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/chroma-js/chroma.js","webpack:///./src/templates/stylesimple.html","webpack:///./src/templates/attributestemplate.html","webpack:///./src/templates/categorystyles.html","webpack:///./src/templates/stylemanager.html","webpack:///./src/templates/styleproportional.html","webpack:///./src/templates/stylecluster.html","webpack:///./src/templates/stylechoropleth.html","webpack:///./src/templates/stylecategory.html","webpack:///./src/templates/styleheatmap.html","webpack:///./src/templates/stylechart.html","webpack:///./src/templates/buttonoptions.html","webpack:///./src/templates/buttonoptions2.html","webpack:///./src/templates/simpleoptions.html","webpack:///./src/templates/variablechart.html","webpack:///./src/templates/paginationchart.html","webpack:///./src/templates/attributeschart.html","webpack:///./src/impl/ol/js/stylemanagerControl.js","webpack:///./src/facade/js/binding/binding.js","webpack:///./src/facade/js/binding/simplebinding.js","webpack:///./src/facade/js/binding/proportionalbinding.js","webpack:///./src/facade/js/binding/clusterbinding.js","webpack:///./src/facade/js/binding/heatmapbinding.js","webpack:///./src/facade/js/binding/choroplethbinding.js","webpack:///./src/facade/js/binding/simplecategorybinding.js","webpack:///./src/facade/js/binding/categorybinding.js","webpack:///./src/facade/js/binding/chartbinding.js","webpack:///./src/facade/js/bindingcontroller.js","webpack:///./src/facade/js/stylemanagerControl.js","webpack:///./src/facade/js/utils/colorpicker.js","webpack:///./src/facade/js/stylemanager.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","limit","x","min","max","classToType","list","length","toLowerCase","type","obj","toString","PI","Math","utils","clip_rgb","rgb","_clipped","_unclipped","slice","unpack","args","keyOrder","Array","split","filter","k","undefined","map","last","TWOPI","PITHIRD","DEG2RAD","RAD2DEG","input","format","autodetect","last$1","clip_rgb$1","type$1","Color","len","arguments","constructor","this","sorted","sort","a","b","chk","test","apply","Error","_rgb","push","hex","join","Color_1","chroma","Function","concat","version","chroma_1","unpack$1","rgb2cmyk_1","ref","g","f","y","unpack$2","cmyk2rgb_1","alpha","unpack$3","type$2","cmyk","unpack$4","last$2","rnd","round","hsl2css_1","hsla","unpack$5","rgb2hsl_1","h","Number","NaN","unpack$6","last$3","rgb2css_1","rgba","substr","RE_HEX","RE_HEXA","hex2rgb_1","match","u","parseInt","u$1","r$1","g$1","b$1","unpack$7","round$1","hsl2rgb_1","assign","t3","t2","t1","h_","w3cx11_1","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflower","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","laserlemon","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrod","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","maroon2","maroon3","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","purple2","purple3","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","RE_RGB","RE_RGBA","RE_RGB_PCT","RE_RGBA_PCT","RE_HSL","RE_HSLA","round$2","css2rgb","css","trim","rgb$1","i$1","rgb$2","i$2","rgb$3","i$3","hsl","rgb$4","hsl$1","rgb$5","css2rgb_1","type$3","rest","unpack$8","gl","unpack$9","rgb2hcg_1","delta","_g","unpack$a","floor","hcg2rgb_1","assign$1","assign$2","assign$3","assign$4","assign$5","_c","q","v","unpack$b","type$4","hcg","unpack$c","last$4","round$3","rgb2hex_1","str","hxa","type$5","includes","unpack$d","sqrt","acos","rgb2hsi_1","min_","unpack$e","limit$1","TWOPI$1","cos","hsi2rgb_1","isNaN","unpack$f","type$6","hsi","unpack$g","type$7","unpack$h","min$1","max$1","rgb2hsv","max_","unpack$i","floor$1","hsv2rgb_1","unpack$j","type$8","hsv","labConstants","Kn","Xn","Yn","Zn","t0","unpack$k","pow","rgb_xyz","xyz_lab","rgb2xyz","z","rgb2lab_1","ref$1","unpack$l","pow$1","xyz_rgb","lab_xyz","lab2rgb_1","b_","unpack$m","type$9","lab","unpack$n","sqrt$1","atan2","round$4","lab2lch_1","unpack$o","rgb2lch_1","unpack$p","sin","cos$1","lch2lab_1","unpack$q","lch2rgb_1","L","unpack$r","hcl2rgb_1","hcl","reverse","unpack$s","type$a","lch","forEach","type$b","keys","named","unpack$t","rgb2num_1","type$c","num2rgb_1","num","type$d","unpack$u","type$e","round$5","log","temperature2rgb_1","kelvin","temp","unpack$v","round$6","rgb2temperature_1","minTemp","maxTemp","temperature","type$f","mutate","clipped","darken","amount","brighten","darker","brighter","mc","channel","src","indexOf","type$g","pow$2","luminance","lum","cur_lum","max_iter","low","high","mid","interpolate","lm","abs","rgb2luminance","luminance_x","interpolator","type$h","mix","col1","col2","premultiply","saturate","desaturate","type$i","set","charAt","out","xyz0","xyz1","sqrt$2","pow$3","lrgb","x1","y1","z1","x2","y2","z2","_hsx","hue0","hue1","sat0","sat1","lbv0","lbv1","sat","hue","lch$1","c1","c2","clip_rgb$2","pow$4","sqrt$3","PI$1","cos$2","sin$1","atan2$1","_average_lrgb","colors","xyz","col","type$j","pow$5","scale","_mode","_nacol","_spread","_domain","_pos","_padding","_classes","_colors","_out","_min","_max","_correctLightness","_colorCache","_useCache","_gamma","setColors","brewer","c$1","resetCache","tmap","getColor","val","bypassMap","getClass","classes","analyze","limits","domain","from","_m","range","_o","spread","correctLightness","L0","L1","pol","L_actual","L_ideal","L_diff","padding","numColors","result","dm","dd","left","right","inclusive","ascending","end","__range__","samples","asc","cache","gamma","nodata","bezier","I","lab0","lab1","lab2","lab3","I0","I1","blend","bottom","top","blend_f","c0","each","normal","multiply","screen","overlay","lighten","dodge","burn","blend_1","type$k","clip_rgb$3","TWOPI$2","pow$6","sin$2","cos$3","floor$2","random","log$1","pow$7","floor$3","data","MAX_VALUE","sum","values","count","min_log","LOG10E","max_log","pb","pr","cluster","assignments","clusterSizes","repeat","nb_iters","centroids","j","i$4","mindist","best","j$1","dist","newCentroids","j$2","i$5","j$3","j$4","kClusters","j$5","i$6","tmpKMeansBreaks","j$6","i$7","analyze_1","sqrt$4","atan2$2","abs$1","cos$4","PI$2","scales","cool","hot","colorbrewer","OrRd","PuBu","BuPu","Oranges","BuGn","YlOrBr","YlGn","Reds","RdPu","Greens","YlGnBu","Purples","GnBu","Greys","YlOrRd","PuRd","Blues","PuBuGn","Viridis","Spectral","RdYlGn","RdBu","PiYG","PRGn","RdYlBu","BrBG","RdGy","PuOr","Set2","Accent","Set1","Set3","Dark2","Paired","Pastel2","Pastel1","list$1","colorbrewer_1","average","first","shift","cnt","dx","dy","A","xyz2","A$1","cubehelix","start","rotations","lightness","dl","dh","fract","amp","cos_a","sin_a","code","contrast","l1","l2","deltaE","C","a1","b1","L2","a2","b2","sl","sc","h1","c4","sh","delC","delA","delB","v1","v2","distance","sum_sq","valid","e","factory","StyleManagerControl","_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","M","impl","Control","html","_get","dialog","info","Binding","htmlParent","styleType","style","layer","binding_classCallCheck","htmlParent_","htmlTemplate_","html_","activated_","selected_","disabled_","layer_","activateButton_","querySelector","selectButton_","style_","styleType_","compilePromise_","initializeView","path","isArray","keyLength","_toConsumableArray","isObject","isNullOrEmpty","createObj","htmlName","options","Promise","resolve","template","compileSync","vars","_this","optsTemplate","getOptionsTemplate","compileTemplate","then","appendChild","callback","innerHTML","styleOpts","querySelectorAllForEach","element","prop","dataset","checked","parseFloat","id","flag","classList","replace","unhide","hide","disabled","add","setSelected","setActivated","remove","getTemplate","selector","querySelectorAll","scope","getParentTemplate","querySelectorAllParent","_this2","Vector","attributeNames","filterAttributesFeature","selectElement","attributestemplate","attributes","deactivateBinding","activateBinding","getAllFeaturesAttributes","getFeatures","getAttributes","allFeatures","getFeaturesAttributes","fs","option","addEventListener","document","createElement","innerText","removeChild","SimpleBinding","_Binding","styleParams","controller","simplebinding_classCallCheck","simplebinding_possibleConstructorReturn","simplebinding_getPrototypeOf","controller_","simplebinding_inherits","selected","arrayId","arrayName","index","_icon","radius","fill","color","opacity","width","pattern","size","spacing","offset","rotation","stroke","linedash","linedashoffset","linecap","linejoin","label","text","font","align","baseline","rotate","icon","form","anchor","_defineProperty","refresh","refreshTemplate","geometry","GEOMETRIES","geometry_","getGeometry","section","node","refreshOptionsButtons","addLabelPathListener","_this3","OPTIONS_POINT_SUBMENU","OPTIONS_SUBMENU","addOptionsButtons","compatibleSectionListener","_this4","parentHtml","hideAllOptionsSections","addTemplate","buttonoptions","buttonsParams","toggleCheckOptionSection","activateOptionSection","activateOptionsStyle","addEventCheckFromSubmenu","_this5","querySelectorAllForEachParent","selectPanel","iconSelect","replaceWith","cloneNode","eventOpenIconSelector","eventSelectIcon","familySelect","changeFamilyFont","famSelector","fmSIcon","fmSIconArray","fam","dispatchEvent","Event","getOptions","checkOptionSection","disableOption","ev","iconDialog","target","contains","iconSelected","display","elem","_this6","pathCheck","togglePathSection","_this7","event","toggleCheckOptSectionListener","activateOption","inputSection","_this8","querySelectorParent","checkbox","activateLabel","displaySectionOption","showOptionSection","_this9","value2","opt","labelOpt","fontSize","fontFamily","iconOpts","processOptions","styleOptsClone","extends","checkedFill","isChecked","checkedStroke","checkedLabel","checkedIcon","checkedForm","styleOptions","generateOptions","Point","Line","Polygon","error","optionEnable","optionDisable","_this10","enableOption","clickable","hideOptionSection","DEFAULT_OPTIONS_STYLE","patternValids","alignValues","baselineValues","formValues","arrayDataToTemplate","labelTextValues","labelTextSelected","funct","imgId_","generateStyle","clone","RADIUS_OPTION","ICON_RADIUS_OPTION","img","updateCanvas","dataURL","toImage","ProportionalBinding","proportionalbinding_classCallCheck","proportionalbinding_possibleConstructorReturn","proportionalbinding_getPrototypeOf","proportionalbinding_inherits","opts","attributeName","Proportional","minRadius","maxRadius","getAttributeName","getMinRadius","getMaxRadius","attribute","ClusterBinding","clusterbinding_classCallCheck","clusterbinding_possibleConstructorReturn","clusterbinding_getPrototypeOf","addEventRangeListener","addPaginationListener","clusterbinding_inherits","ranges","clusterbinding_toConsumableArray","Cluster","distanceSelectFeatures","rangesInput","numRanges","NUMBER_RANGES","setAttribute","removeAttribute","pagerElement","paginationListener","oldElement","oldId","oldRange","setRanges","rangeOpt","lastRange","hoverInteraction","displayAmount","selectInteraction","animated","maxFeaturesToSelect","HeatmapBinding","heatmapbinding_classCallCheck","heatmapbinding_possibleConstructorReturn","heatmapbinding_getPrototypeOf","removeGradientListener","addGradientListener","numberAddedColors_","heatmapbinding_inherits","parentElement","parent","MAX_NUMBER_COLORS","setRandomColor","inputColor","randomColor","Heatmap","getRadius","getBlurSize","getGradient","gradient","blur","ChoroplethBinding","choroplethbinding_classCallCheck","choroplethbinding_possibleConstructorReturn","choroplethbinding_getPrototypeOf","choroplethbinding_inherits","rangesButton","number","quantification","JENKS","QUANTILE","Choropleth","startColor","getChoroplethStyles","endColor","getQuantification","SimpleCategoryBinding","binding","simplecategorybinding_classCallCheck","simplecategorybinding_possibleConstructorReturn","simplecategorybinding_getPrototypeOf","fill_","stroke_","label_","form_","icon_","binding_","simplecategorybinding_inherits","simplecategorybinding_defineProperty","HTMLDivElement","refreshLegend","HTMLSelectElement","bool","CategoryBinding","categorybinding_classCallCheck","categorybinding_possibleConstructorReturn","categorybinding_getPrototypeOf","styleCategories_","renderAttributeOptions","selectedCategory_","clickedOnTable_","categorybinding_inherits","setAttributes","toggleCategory","buttonoptions2","addEventOptionListener","addEventCheckListener","deactivateSubmenu","setCompatibleStylePanels","showActivePanel","simpleBinding","activateSubmenu","checkInput","showCompatibleSections","setLayer","attributeExists","getAllValuesAttribute","splice","MAXNUMBER_CATEGORIES","removeCategories","createCategories","addCategoriesView","categorystyles","addEventClickListener","addEventSelectedListener","addLegendListenerAll","categoriesStyle","getCategories","categoryStyle","simpleoptions","setGeometryCategory","otherCategory","stylesimple","destroy","category","_this11","hideSection","showSection","activeSection","_this12","checkSection","_this13","setSelectedRow","_this14","feature","getAttribute","pos","arr","_this15","styleCategories","Category","_this16","imgId","addLegendListener","ChartBinding","chartbinding_classCallCheck","chartbinding_possibleConstructorReturn","chartbinding_getPrototypeOf","variables_","variables","variable","addKeyEnterListener","addRenderCompatibleListener","addAttributeListener","refreshVariables","chartbinding_inherits","renderAttributes","attr","attr2","addAttribute","addVariableTemplate","refreshPagination","addAttributeFromParamenter","addAttributeFromInput","keyEnterListener","evt","legend","DEFAULT_OPTIONS_VARIABLE","find","variablechart","append","chartbinding_toConsumableArray","children","removeElement","addRemoveVarSectionListener","addLabelOptionListener","removeVariableTemplate","removeVariableSection","removeVarSectionListener","paginationchart","addClickPagerListener","firstAttr","showVariableSection","element2","clickPagerListener","activePageListener","selectType","selectedOptions","renderCompatibleOpts","renderCompatibleListener","attributeschart","toggleLabelOptions","optVars","labelshow","reduce","tot","curr","varsOpts","generateVariableOptions","scheme","chart","schemes","Chart","donutRadio","donutRadius","offsetX","offsetY","Variable","fill3DColor","getSchemeName","schemesChart","array","array2","include","include2","every","donutRatio","rotateWithView","radiusIncrement","BindingController","bindingcontroller_classCallCheck","activePanel_","selectedPanels_","renderViews","Simple","styleproportional","stylechoropleth","stylecategory","stylecluster","styleheatmap","stylechart","point","line","polygon","styleBinding","getStyle","Composite","getStyles","bindings_","getCompilePromise","addSelectOnChangeListener","allCompilePromises_","getBindings","promises","all","toggleDisplaySubmenu","addSelectedPanel","style2","setDisabled","destroyViews","renderViewsPromise","resetOptions","setCompatiblePanels","initBindings","addActiveListener","addSelectListener","setGeometry","getKeysBindings","enablePanel","disablePanel","deactivateAll","unselectAll","styles","bindingcontroller_toConsumableArray","parseStyleToName","showCompatiblePanel","activeLastSelected","GEOMETRY_COMPATIBLE_OPTIONS","bindLayer","disableAll","getCompatibles","compatibleGeometry","setActivePanel","lastSelected","removeSelectedPanel","bindingStyle","selectButton","getSelectButton","activeButton","getActivateButton","flap","getSelectedPanels","mainStyle","getMainStyle","getIndividualStyles","equals","isCompatibleAll","STYLE_COMPATIBLE_OPTIONS","isCompatible","stylemanagerControl_classCallCheck","isUndefined","StyleManagerImplControl","exception","stylemanagerControl_possibleConstructorReturn","stylemanagerControl_getPrototypeOf","facadeMap_","layers","getWFS","getKML","getLayers","success","fail","stylemanager","jsonp","htmlSelect","container","bindinController_","subscribeAddedLayer","addApplyBtnListener","addClearBtnListener","renderOptionsLayerParam","loadFonts","getAllCompilePromises","renderOptions","compile","applyStyle","clearStyle","on","ADDED_LAYER","addLayerOption","_layer","_objectSpread","isNotAdded","htmlOption","layerName","stylemanagerControl_toConsumableArray","some","getLayerByName","selectedIndex","change","showBoxes","addOpenAttribute","setStyle","Font","addSymbol","copyright","prefix","fa-glass","fa-music","fa-search","fa-envelope-o","fa-heart","fa-star","fa-star-o","fa-user","fa-film","fa-th-large","fa-th","fa-th-list","fa-check","fa-remove","fa-close","fa-times","fa-search-plus","fa-search-minus","fa-power-off","fa-signal","fa-gear","fa-cog","fa-trash-o","fa-home","fa-file-o","fa-clock-o","fa-road","fa-download","fa-arrow-circle-o-down","fa-arrow-circle-o-up","fa-inbox","fa-play-circle-o","fa-rotate-right","fa-repeat","fa-refresh","fa-list-alt","fa-lock","fa-flag","fa-headphones","fa-volume-off","fa-volume-down","fa-volume-up","fa-qrcode","fa-barcode","fa-tag","fa-tags","fa-book","fa-bookmark","fa-print","fa-camera","fa-font","fa-bold","fa-italic","fa-text-height","fa-text-width","fa-align-left","fa-align-center","fa-align-right","fa-align-justify","fa-list","fa-dedent","fa-outdent","fa-indent","fa-video-camera","fa-photo","fa-image","fa-picture-o","fa-pencil","fa-map-marker","fa-adjust","fa-tint","fa-edit","fa-pencil-square-o","fa-share-square-o","fa-check-square-o","fa-arrows","fa-step-backward","fa-fast-backward","fa-backward","fa-play","fa-pause","fa-stop","fa-forward","fa-fast-forward","fa-step-forward","fa-eject","fa-chevron-left","fa-chevron-right","fa-plus-circle","fa-minus-circle","fa-times-circle","fa-check-circle","fa-question-circle","fa-info-circle","fa-crosshairs","fa-times-circle-o","fa-check-circle-o","fa-ban","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrow-down","fa-mail-forward","fa-share","fa-expand","fa-compress","fa-plus","fa-minus","fa-asterisk","fa-exclamation-circle","fa-gift","fa-leaf","fa-fire","fa-eye","fa-eye-slash","fa-warning","fa-exclamation-triangle","fa-plane","fa-calendar","fa-random","fa-comment","fa-magnet","fa-chevron-up","fa-chevron-down","fa-retweet","fa-shopping-cart","fa-folder","fa-folder-open","fa-arrows-v","fa-arrows-h","fa-bar-t-o","fa-bar-t","fa-twitter-square","fa-facebook-square","fa-camera-retro","fa-key","fa-gears","fa-cogs","fa-comments","control","ColorPickerPolyfill","colorpicker_classCallCheck","window","nativeColorPicker","started","inputs","hasNativeColorSupport","init","inputId","getElementById","unselectable","backgroundColor","borderWidth","cursor","onfocus","onFocus","object_element","classid","height","body","off","ChooseColorDlg","substring","el","props","StyleManager","stylemanager_classCallCheck","stylemanager_possibleConstructorReturn","stylemanager_getPrototypeOf","map_","controls_","metadata_","api","metadata","panel_","Handlebars","registerHelper","n1","n2","arg1","arg2","inverse","fn","string","toUpperCase","extendsObj","Plugin","ui","Panel","NAME","collapsible","className","collapsedButtonClass","position","TL","addControls","addPanels","removeControls","_ref","control_","plugin","M$plugin$StyleManager"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,O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":"stylemanager-2.0.5.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","/**\n * chroma.js - JavaScript library for color conversions\n *\n * Copyright (c) 2011-2018, Gregor Aisch\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. The name Gregor Aisch may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * -------------------------------------------------------\n *\n * chroma.js includes colors from colorbrewer2.org, which are released under\n * the following license:\n *\n * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,\n * and The Pennsylvania State University.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n * ------------------------------------------------------\n *\n * Named colors are taken from X11 Color Names.\n * http://www.w3.org/TR/css3-color/#svg-color\n *\n * @preserve\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.chroma = factory());\n}(this, (function () { 'use strict';\n\n var limit = function (x, min, max) {\n if ( min === void 0 ) min=0;\n if ( max === void 0 ) max=1;\n\n return x < min ? min : x > max ? max : x;\n };\n\n var clip_rgb = function (rgb) {\n rgb._clipped = false;\n rgb._unclipped = rgb.slice(0);\n for (var i=0; i<=3; i++) {\n if (i < 3) {\n if (rgb[i] < 0 || rgb[i] > 255) { rgb._clipped = true; }\n rgb[i] = limit(rgb[i], 0, 255);\n } else if (i === 3) {\n rgb[i] = limit(rgb[i], 0, 1);\n }\n }\n return rgb;\n };\n\n // ported from jQuery's $.type\n var classToType = {};\n for (var i = 0, list = ['Boolean', 'Number', 'String', 'Function', 'Array', 'Date', 'RegExp', 'Undefined', 'Null']; i < list.length; i += 1) {\n var name = list[i];\n\n classToType[(\"[object \" + name + \"]\")] = name.toLowerCase();\n }\n var type = function(obj) {\n return classToType[Object.prototype.toString.call(obj)] || \"object\";\n };\n\n var unpack = function (args, keyOrder) {\n if ( keyOrder === void 0 ) keyOrder=null;\n\n \t// if called with more than 3 arguments, we return the arguments\n if (args.length >= 3) { return Array.prototype.slice.call(args); }\n // with less than 3 args we check if first arg is object\n // and use the keyOrder string to extract and sort properties\n \tif (type(args[0]) == 'object' && keyOrder) {\n \t\treturn keyOrder.split('')\n \t\t\t.filter(function (k) { return args[0][k] !== undefined; })\n \t\t\t.map(function (k) { return args[0][k]; });\n \t}\n \t// otherwise we just return the first argument\n \t// (which we suppose is an array of args)\n return args[0];\n };\n\n var last = function (args) {\n if (args.length < 2) { return null; }\n var l = args.length-1;\n if (type(args[l]) == 'string') { return args[l].toLowerCase(); }\n return null;\n };\n\n var PI = Math.PI;\n\n var utils = {\n \tclip_rgb: clip_rgb,\n \tlimit: limit,\n \ttype: type,\n \tunpack: unpack,\n \tlast: last,\n \tPI: PI,\n \tTWOPI: PI*2,\n \tPITHIRD: PI/3,\n \tDEG2RAD: PI / 180,\n \tRAD2DEG: 180 / PI\n };\n\n var input = {\n \tformat: {},\n \tautodetect: []\n };\n\n var last$1 = utils.last;\n var clip_rgb$1 = utils.clip_rgb;\n var type$1 = utils.type;\n\n\n var Color = function Color() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var me = this;\n if (type$1(args[0]) === 'object' &&\n args[0].constructor &&\n args[0].constructor === this.constructor) {\n // the argument is already a Color instance\n return args[0];\n }\n\n // last argument could be the mode\n var mode = last$1(args);\n var autodetect = false;\n\n if (!mode) {\n autodetect = true;\n if (!input.sorted) {\n input.autodetect = input.autodetect.sort(function (a,b) { return b.p - a.p; });\n input.sorted = true;\n }\n // auto-detect format\n for (var i = 0, list = input.autodetect; i < list.length; i += 1) {\n var chk = list[i];\n\n mode = chk.test.apply(chk, args);\n if (mode) { break; }\n }\n }\n\n if (input.format[mode]) {\n var rgb = input.format[mode].apply(null, autodetect ? args : args.slice(0,-1));\n me._rgb = clip_rgb$1(rgb);\n } else {\n throw new Error('unknown format: '+args);\n }\n\n // add alpha channel\n if (me._rgb.length === 3) { me._rgb.push(1); }\n };\n\n Color.prototype.toString = function toString () {\n if (type$1(this.hex) == 'function') { return this.hex(); }\n return (\"[\" + (this._rgb.join(',')) + \"]\");\n };\n\n var Color_1 = Color;\n\n var chroma = function () {\n \tvar args = [], len = arguments.length;\n \twhile ( len-- ) args[ len ] = arguments[ len ];\n\n \treturn new (Function.prototype.bind.apply( chroma.Color, [ null ].concat( args) ));\n };\n\n chroma.Color = Color_1;\n chroma.version = '2.0.3';\n\n var chroma_1 = chroma;\n\n var unpack$1 = utils.unpack;\n var max = Math.max;\n\n var rgb2cmyk = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$1(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r = r / 255;\n g = g / 255;\n b = b / 255;\n var k = 1 - max(r,max(g,b));\n var f = k < 1 ? 1 / (1-k) : 0;\n var c = (1-r-k) * f;\n var m = (1-g-k) * f;\n var y = (1-b-k) * f;\n return [c,m,y,k];\n };\n\n var rgb2cmyk_1 = rgb2cmyk;\n\n var unpack$2 = utils.unpack;\n\n var cmyk2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$2(args, 'cmyk');\n var c = args[0];\n var m = args[1];\n var y = args[2];\n var k = args[3];\n var alpha = args.length > 4 ? args[4] : 1;\n if (k === 1) { return [0,0,0,alpha]; }\n return [\n c >= 1 ? 0 : 255 * (1-c) * (1-k), // r\n m >= 1 ? 0 : 255 * (1-m) * (1-k), // g\n y >= 1 ? 0 : 255 * (1-y) * (1-k), // b\n alpha\n ];\n };\n\n var cmyk2rgb_1 = cmyk2rgb;\n\n var unpack$3 = utils.unpack;\n var type$2 = utils.type;\n\n\n\n Color_1.prototype.cmyk = function() {\n return rgb2cmyk_1(this._rgb);\n };\n\n chroma_1.cmyk = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['cmyk']) ));\n };\n\n input.format.cmyk = cmyk2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$3(args, 'cmyk');\n if (type$2(args) === 'array' && args.length === 4) {\n return 'cmyk';\n }\n }\n });\n\n var unpack$4 = utils.unpack;\n var last$2 = utils.last;\n var rnd = function (a) { return Math.round(a*100)/100; };\n\n /*\n * supported arguments:\n * - hsl2css(h,s,l)\n * - hsl2css(h,s,l,a)\n * - hsl2css([h,s,l], mode)\n * - hsl2css([h,s,l,a], mode)\n * - hsl2css({h,s,l,a}, mode)\n */\n var hsl2css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hsla = unpack$4(args, 'hsla');\n var mode = last$2(args) || 'lsa';\n hsla[0] = rnd(hsla[0] || 0);\n hsla[1] = rnd(hsla[1]*100) + '%';\n hsla[2] = rnd(hsla[2]*100) + '%';\n if (mode === 'hsla' || (hsla.length > 3 && hsla[3]<1)) {\n hsla[3] = hsla.length > 3 ? hsla[3] : 1;\n mode = 'hsla';\n } else {\n hsla.length = 3;\n }\n return (mode + \"(\" + (hsla.join(',')) + \")\");\n };\n\n var hsl2css_1 = hsl2css;\n\n var unpack$5 = utils.unpack;\n\n /*\n * supported arguments:\n * - rgb2hsl(r,g,b)\n * - rgb2hsl(r,g,b,a)\n * - rgb2hsl([r,g,b])\n * - rgb2hsl([r,g,b,a])\n * - rgb2hsl({r,g,b,a})\n */\n var rgb2hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$5(args, 'rgba');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n\n r /= 255;\n g /= 255;\n b /= 255;\n\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n\n var l = (max + min) / 2;\n var s, h;\n\n if (max === min){\n s = 0;\n h = Number.NaN;\n } else {\n s = l < 0.5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);\n }\n\n if (r == max) { h = (g - b) / (max - min); }\n else if (g == max) { h = 2 + (b - r) / (max - min); }\n else if (b == max) { h = 4 + (r - g) / (max - min); }\n\n h *= 60;\n if (h < 0) { h += 360; }\n if (args.length>3 && args[3]!==undefined) { return [h,s,l,args[3]]; }\n return [h,s,l];\n };\n\n var rgb2hsl_1 = rgb2hsl;\n\n var unpack$6 = utils.unpack;\n var last$3 = utils.last;\n\n\n var round = Math.round;\n\n /*\n * supported arguments:\n * - rgb2css(r,g,b)\n * - rgb2css(r,g,b,a)\n * - rgb2css([r,g,b], mode)\n * - rgb2css([r,g,b,a], mode)\n * - rgb2css({r,g,b,a}, mode)\n */\n var rgb2css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$6(args, 'rgba');\n var mode = last$3(args) || 'rgb';\n if (mode.substr(0,3) == 'hsl') {\n return hsl2css_1(rgb2hsl_1(rgba), mode);\n }\n rgba[0] = round(rgba[0]);\n rgba[1] = round(rgba[1]);\n rgba[2] = round(rgba[2]);\n if (mode === 'rgba' || (rgba.length > 3 && rgba[3]<1)) {\n rgba[3] = rgba.length > 3 ? rgba[3] : 1;\n mode = 'rgba';\n }\n return (mode + \"(\" + (rgba.slice(0,mode==='rgb'?3:4).join(',')) + \")\");\n };\n\n var rgb2css_1 = rgb2css;\n\n var RE_HEX = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;\n var RE_HEXA = /^#?([A-Fa-f0-9]{8})$/;\n\n var hex2rgb = function (hex) {\n if (hex.match(RE_HEX)) {\n // remove optional leading #\n if (hex.length === 4 || hex.length === 7) {\n hex = hex.substr(1);\n }\n // expand short-notation to full six-digit\n if (hex.length === 3) {\n hex = hex.split('');\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n var u = parseInt(hex, 16);\n var r = u >> 16;\n var g = u >> 8 & 0xFF;\n var b = u & 0xFF;\n return [r,g,b,1];\n }\n\n // match rgba hex format, eg #FF000077\n if (hex.match(RE_HEXA)) {\n if (hex.length === 9) {\n // remove optional leading #\n hex = hex.substr(1);\n }\n var u$1 = parseInt(hex, 16);\n var r$1 = u$1 >> 24 & 0xFF;\n var g$1 = u$1 >> 16 & 0xFF;\n var b$1 = u$1 >> 8 & 0xFF;\n var a = Math.round((u$1 & 0xFF) / 0xFF * 100) / 100;\n return [r$1,g$1,b$1,a];\n }\n\n // we used to check for css colors here\n // if _input.css? and rgb = _input.css hex\n // return rgb\n\n throw new Error((\"unknown hex color: \" + hex));\n };\n\n var hex2rgb_1 = hex2rgb;\n\n var unpack$7 = utils.unpack;\n var round$1 = Math.round;\n\n var hsl2rgb = function () {\n var assign;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$7(args, 'hsl');\n var h = args[0];\n var s = args[1];\n var l = args[2];\n var r,g,b;\n if (s === 0) {\n r = g = b = l*255;\n } else {\n var t3 = [0,0,0];\n var c = [0,0,0];\n var t2 = l < 0.5 ? l * (1+s) : l+s-l*s;\n var t1 = 2 * l - t2;\n var h_ = h / 360;\n t3[0] = h_ + 1/3;\n t3[1] = h_;\n t3[2] = h_ - 1/3;\n for (var i=0; i<3; i++) {\n if (t3[i] < 0) { t3[i] += 1; }\n if (t3[i] > 1) { t3[i] -= 1; }\n if (6 * t3[i] < 1)\n { c[i] = t1 + (t2 - t1) * 6 * t3[i]; }\n else if (2 * t3[i] < 1)\n { c[i] = t2; }\n else if (3 * t3[i] < 2)\n { c[i] = t1 + (t2 - t1) * ((2 / 3) - t3[i]) * 6; }\n else\n { c[i] = t1; }\n }\n (assign = [round$1(c[0]*255),round$1(c[1]*255),round$1(c[2]*255)], r = assign[0], g = assign[1], b = assign[2]);\n }\n if (args.length > 3) {\n // keep alpha channel\n return [r,g,b,args[3]];\n }\n return [r,g,b,1];\n };\n\n var hsl2rgb_1 = hsl2rgb;\n\n /**\n \tX11 color names\n\n \thttp://www.w3.org/TR/css3-color/#svg-color\n */\n\n var w3cx11 = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflower: '#6495ed',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n laserlemon: '#ffff54',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrod: '#fafad2',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n maroon2: '#7f0000',\n maroon3: '#b03060',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n purple2: '#7f007f',\n purple3: '#a020f0',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n };\n\n var w3cx11_1 = w3cx11;\n\n var RE_RGB = /^rgb\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\)$/;\n var RE_RGBA = /^rgba\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_RGB_PCT = /^rgb\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_RGBA_PCT = /^rgba\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_HSL = /^hsl\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_HSLA = /^hsla\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n\n var round$2 = Math.round;\n\n var css2rgb = function (css) {\n css = css.toLowerCase().trim();\n // named X11 colors\n if (w3cx11_1[css]) {\n return hex2rgb_1(w3cx11_1[css]);\n }\n var m;\n\n // rgb(250,20,0)\n if ((m = css.match(RE_RGB))) {\n var rgb = m.slice(1,4);\n for (var i=0; i<3; i++) {\n rgb[i] = +rgb[i];\n }\n rgb[3] = 1; // default alpha\n return rgb;\n }\n\n // rgba(250,20,0,0.4)\n if ((m = css.match(RE_RGBA))) {\n var rgb$1 = m.slice(1,5);\n for (var i$1=0; i$1<4; i$1++) {\n rgb$1[i$1] = +rgb$1[i$1];\n }\n return rgb$1;\n }\n\n // rgb(100%,0%,0%)\n if ((m = css.match(RE_RGB_PCT))) {\n var rgb$2 = m.slice(1,4);\n for (var i$2=0; i$2<3; i$2++) {\n rgb$2[i$2] = round$2(rgb$2[i$2] * 2.55);\n }\n rgb$2[3] = 1; // default alpha\n return rgb$2;\n }\n\n // rgba(100%,0%,0%,0.4)\n if ((m = css.match(RE_RGBA_PCT))) {\n var rgb$3 = m.slice(1,5);\n for (var i$3=0; i$3<3; i$3++) {\n rgb$3[i$3] = round$2(rgb$3[i$3] * 2.55);\n }\n rgb$3[3] = +rgb$3[3];\n return rgb$3;\n }\n\n // hsl(0,100%,50%)\n if ((m = css.match(RE_HSL))) {\n var hsl = m.slice(1,4);\n hsl[1] *= 0.01;\n hsl[2] *= 0.01;\n var rgb$4 = hsl2rgb_1(hsl);\n rgb$4[3] = 1;\n return rgb$4;\n }\n\n // hsla(0,100%,50%,0.5)\n if ((m = css.match(RE_HSLA))) {\n var hsl$1 = m.slice(1,4);\n hsl$1[1] *= 0.01;\n hsl$1[2] *= 0.01;\n var rgb$5 = hsl2rgb_1(hsl$1);\n rgb$5[3] = +m[4]; // default alpha = 1\n return rgb$5;\n }\n };\n\n css2rgb.test = function (s) {\n return RE_RGB.test(s) ||\n RE_RGBA.test(s) ||\n RE_RGB_PCT.test(s) ||\n RE_RGBA_PCT.test(s) ||\n RE_HSL.test(s) ||\n RE_HSLA.test(s);\n };\n\n var css2rgb_1 = css2rgb;\n\n var type$3 = utils.type;\n\n\n\n\n Color_1.prototype.css = function(mode) {\n return rgb2css_1(this._rgb, mode);\n };\n\n chroma_1.css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['css']) ));\n };\n\n input.format.css = css2rgb_1;\n\n input.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$3(h) === 'string' && css2rgb_1.test(h)) {\n return 'css';\n }\n }\n });\n\n var unpack$8 = utils.unpack;\n\n input.format.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$8(args, 'rgba');\n rgb[0] *= 255;\n rgb[1] *= 255;\n rgb[2] *= 255;\n return rgb;\n };\n\n chroma_1.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['gl']) ));\n };\n\n Color_1.prototype.gl = function() {\n var rgb = this._rgb;\n return [rgb[0]/255, rgb[1]/255, rgb[2]/255, rgb[3]];\n };\n\n var unpack$9 = utils.unpack;\n\n var rgb2hcg = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$9(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var delta = max - min;\n var c = delta * 100 / 255;\n var _g = min / (255 - delta) * 100;\n var h;\n if (delta === 0) {\n h = Number.NaN;\n } else {\n if (r === max) { h = (g - b) / delta; }\n if (g === max) { h = 2+(b - r) / delta; }\n if (b === max) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, c, _g];\n };\n\n var rgb2hcg_1 = rgb2hcg;\n\n var unpack$a = utils.unpack;\n var floor = Math.floor;\n\n /*\n * this is basically just HSV with some minor tweaks\n *\n * hue.. [0..360]\n * chroma .. [0..1]\n * grayness .. [0..1]\n */\n\n var hcg2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$a(args, 'hcg');\n var h = args[0];\n var c = args[1];\n var _g = args[2];\n var r,g,b;\n _g = _g * 255;\n var _c = c * 255;\n if (c === 0) {\n r = g = b = _g;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n var i = floor(h);\n var f = h - i;\n var p = _g * (1 - c);\n var q = p + _c * (1 - f);\n var t = p + _c * f;\n var v = p + _c;\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var hcg2rgb_1 = hcg2rgb;\n\n var unpack$b = utils.unpack;\n var type$4 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hcg = function() {\n return rgb2hcg_1(this._rgb);\n };\n\n chroma_1.hcg = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hcg']) ));\n };\n\n input.format.hcg = hcg2rgb_1;\n\n input.autodetect.push({\n p: 1,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$b(args, 'hcg');\n if (type$4(args) === 'array' && args.length === 3) {\n return 'hcg';\n }\n }\n });\n\n var unpack$c = utils.unpack;\n var last$4 = utils.last;\n var round$3 = Math.round;\n\n var rgb2hex = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$c(args, 'rgba');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var a = ref[3];\n var mode = last$4(args) || 'auto';\n if (a === undefined) { a = 1; }\n if (mode === 'auto') {\n mode = a < 1 ? 'rgba' : 'rgb';\n }\n r = round$3(r);\n g = round$3(g);\n b = round$3(b);\n var u = r << 16 | g << 8 | b;\n var str = \"000000\" + u.toString(16); //#.toUpperCase();\n str = str.substr(str.length - 6);\n var hxa = '0' + round$3(a * 255).toString(16);\n hxa = hxa.substr(hxa.length - 2);\n switch (mode.toLowerCase()) {\n case 'rgba': return (\"#\" + str + hxa);\n case 'argb': return (\"#\" + hxa + str);\n default: return (\"#\" + str);\n }\n };\n\n var rgb2hex_1 = rgb2hex;\n\n var type$5 = utils.type;\n\n\n\n\n Color_1.prototype.hex = function(mode) {\n return rgb2hex_1(this._rgb, mode);\n };\n\n chroma_1.hex = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hex']) ));\n };\n\n input.format.hex = hex2rgb_1;\n input.autodetect.push({\n p: 4,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$5(h) === 'string' && [3,4,6,7,8,9].includes(h.length)) {\n return 'hex';\n }\n }\n });\n\n var unpack$d = utils.unpack;\n var TWOPI = utils.TWOPI;\n var min = Math.min;\n var sqrt = Math.sqrt;\n var acos = Math.acos;\n\n var rgb2hsi = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/rgb2hsi.cpp\n */\n var ref = unpack$d(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var h;\n var min_ = min(r,g,b);\n var i = (r+g+b) / 3;\n var s = i > 0 ? 1 - min_/i : 0;\n if (s === 0) {\n h = NaN;\n } else {\n h = ((r-g)+(r-b)) / 2;\n h /= sqrt((r-g)*(r-g) + (r-b)*(g-b));\n h = acos(h);\n if (b > g) {\n h = TWOPI - h;\n }\n h /= TWOPI;\n }\n return [h*360,s,i];\n };\n\n var rgb2hsi_1 = rgb2hsi;\n\n var unpack$e = utils.unpack;\n var limit$1 = utils.limit;\n var TWOPI$1 = utils.TWOPI;\n var PITHIRD = utils.PITHIRD;\n var cos = Math.cos;\n\n /*\n * hue [0..360]\n * saturation [0..1]\n * intensity [0..1]\n */\n var hsi2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/hsi2rgb.cpp\n */\n args = unpack$e(args, 'hsi');\n var h = args[0];\n var s = args[1];\n var i = args[2];\n var r,g,b;\n\n if (isNaN(h)) { h = 0; }\n if (isNaN(s)) { s = 0; }\n // normalize hue\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 360;\n if (h < 1/3) {\n b = (1-s)/3;\n r = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n g = 1 - (b+r);\n } else if (h < 2/3) {\n h -= 1/3;\n r = (1-s)/3;\n g = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n b = 1 - (r+g);\n } else {\n h -= 2/3;\n g = (1-s)/3;\n b = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n r = 1 - (g+b);\n }\n r = limit$1(i*r*3);\n g = limit$1(i*g*3);\n b = limit$1(i*b*3);\n return [r*255, g*255, b*255, args.length > 3 ? args[3] : 1];\n };\n\n var hsi2rgb_1 = hsi2rgb;\n\n var unpack$f = utils.unpack;\n var type$6 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsi = function() {\n return rgb2hsi_1(this._rgb);\n };\n\n chroma_1.hsi = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsi']) ));\n };\n\n input.format.hsi = hsi2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$f(args, 'hsi');\n if (type$6(args) === 'array' && args.length === 3) {\n return 'hsi';\n }\n }\n });\n\n var unpack$g = utils.unpack;\n var type$7 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsl = function() {\n return rgb2hsl_1(this._rgb);\n };\n\n chroma_1.hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsl']) ));\n };\n\n input.format.hsl = hsl2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$g(args, 'hsl');\n if (type$7(args) === 'array' && args.length === 3) {\n return 'hsl';\n }\n }\n });\n\n var unpack$h = utils.unpack;\n var min$1 = Math.min;\n var max$1 = Math.max;\n\n /*\n * supported arguments:\n * - rgb2hsv(r,g,b)\n * - rgb2hsv([r,g,b])\n * - rgb2hsv({r,g,b})\n */\n var rgb2hsl$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$h(args, 'rgb');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n var min_ = min$1(r, g, b);\n var max_ = max$1(r, g, b);\n var delta = max_ - min_;\n var h,s,v;\n v = max_ / 255.0;\n if (max_ === 0) {\n h = Number.NaN;\n s = 0;\n } else {\n s = delta / max_;\n if (r === max_) { h = (g - b) / delta; }\n if (g === max_) { h = 2+(b - r) / delta; }\n if (b === max_) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, s, v]\n };\n\n var rgb2hsv = rgb2hsl$1;\n\n var unpack$i = utils.unpack;\n var floor$1 = Math.floor;\n\n var hsv2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$i(args, 'hsv');\n var h = args[0];\n var s = args[1];\n var v = args[2];\n var r,g,b;\n v *= 255;\n if (s === 0) {\n r = g = b = v;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n\n var i = floor$1(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - s * f);\n var t = v * (1 - s * (1 - f));\n\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r,g,b,args.length > 3?args[3]:1];\n };\n\n var hsv2rgb_1 = hsv2rgb;\n\n var unpack$j = utils.unpack;\n var type$8 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsv = function() {\n return rgb2hsv(this._rgb);\n };\n\n chroma_1.hsv = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsv']) ));\n };\n\n input.format.hsv = hsv2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$j(args, 'hsv');\n if (type$8(args) === 'array' && args.length === 3) {\n return 'hsv';\n }\n }\n });\n\n var labConstants = {\n // Corresponds roughly to RGB brighter/darker\n Kn: 18,\n\n // D65 standard referent\n Xn: 0.950470,\n Yn: 1,\n Zn: 1.088830,\n\n t0: 0.137931034, // 4 / 29\n t1: 0.206896552, // 6 / 29\n t2: 0.12841855, // 3 * t1 * t1\n t3: 0.008856452, // t1 * t1 * t1\n };\n\n var unpack$k = utils.unpack;\n var pow = Math.pow;\n\n var rgb2lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$k(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2xyz(r,g,b);\n var x = ref$1[0];\n var y = ref$1[1];\n var z = ref$1[2];\n var l = 116 * y - 16;\n return [l < 0 ? 0 : l, 500 * (x - y), 200 * (y - z)];\n };\n\n var rgb_xyz = function (r) {\n if ((r /= 255) <= 0.04045) { return r / 12.92; }\n return pow((r + 0.055) / 1.055, 2.4);\n };\n\n var xyz_lab = function (t) {\n if (t > labConstants.t3) { return pow(t, 1 / 3); }\n return t / labConstants.t2 + labConstants.t0;\n };\n\n var rgb2xyz = function (r,g,b) {\n r = rgb_xyz(r);\n g = rgb_xyz(g);\n b = rgb_xyz(b);\n var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / labConstants.Xn);\n var y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / labConstants.Yn);\n var z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / labConstants.Zn);\n return [x,y,z];\n };\n\n var rgb2lab_1 = rgb2lab;\n\n var unpack$l = utils.unpack;\n var pow$1 = Math.pow;\n\n /*\n * L* [0..100]\n * a [-100..100]\n * b [-100..100]\n */\n var lab2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$l(args, 'lab');\n var l = args[0];\n var a = args[1];\n var b = args[2];\n var x,y,z, r,g,b_;\n\n y = (l + 16) / 116;\n x = isNaN(a) ? y : y + a / 500;\n z = isNaN(b) ? y : y - b / 200;\n\n y = labConstants.Yn * lab_xyz(y);\n x = labConstants.Xn * lab_xyz(x);\n z = labConstants.Zn * lab_xyz(z);\n\n r = xyz_rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z); // D65 -> sRGB\n g = xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z);\n b_ = xyz_rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z);\n\n return [r,g,b_,args.length > 3 ? args[3] : 1];\n };\n\n var xyz_rgb = function (r) {\n return 255 * (r <= 0.00304 ? 12.92 * r : 1.055 * pow$1(r, 1 / 2.4) - 0.055)\n };\n\n var lab_xyz = function (t) {\n return t > labConstants.t1 ? t * t * t : labConstants.t2 * (t - labConstants.t0)\n };\n\n var lab2rgb_1 = lab2rgb;\n\n var unpack$m = utils.unpack;\n var type$9 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.lab = function() {\n return rgb2lab_1(this._rgb);\n };\n\n chroma_1.lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['lab']) ));\n };\n\n input.format.lab = lab2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$m(args, 'lab');\n if (type$9(args) === 'array' && args.length === 3) {\n return 'lab';\n }\n }\n });\n\n var unpack$n = utils.unpack;\n var RAD2DEG = utils.RAD2DEG;\n var sqrt$1 = Math.sqrt;\n var atan2 = Math.atan2;\n var round$4 = Math.round;\n\n var lab2lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$n(args, 'lab');\n var l = ref[0];\n var a = ref[1];\n var b = ref[2];\n var c = sqrt$1(a * a + b * b);\n var h = (atan2(b, a) * RAD2DEG + 360) % 360;\n if (round$4(c*10000) === 0) { h = Number.NaN; }\n return [l, c, h];\n };\n\n var lab2lch_1 = lab2lch;\n\n var unpack$o = utils.unpack;\n\n\n\n var rgb2lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$o(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2lab_1(r,g,b);\n var l = ref$1[0];\n var a = ref$1[1];\n var b_ = ref$1[2];\n return lab2lch_1(l,a,b_);\n };\n\n var rgb2lch_1 = rgb2lch;\n\n var unpack$p = utils.unpack;\n var DEG2RAD = utils.DEG2RAD;\n var sin = Math.sin;\n var cos$1 = Math.cos;\n\n var lch2lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n These formulas were invented by David Dalrymple to obtain maximum contrast without going\n out of gamut if the parameters are in the range 0-1.\n\n A saturation multiplier was added by Gregor Aisch\n */\n var ref = unpack$p(args, 'lch');\n var l = ref[0];\n var c = ref[1];\n var h = ref[2];\n if (isNaN(h)) { h = 0; }\n h = h * DEG2RAD;\n return [l, cos$1(h) * c, sin(h) * c]\n };\n\n var lch2lab_1 = lch2lab;\n\n var unpack$q = utils.unpack;\n\n\n\n var lch2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$q(args, 'lch');\n var l = args[0];\n var c = args[1];\n var h = args[2];\n var ref = lch2lab_1 (l,c,h);\n var L = ref[0];\n var a = ref[1];\n var b_ = ref[2];\n var ref$1 = lab2rgb_1 (L,a,b_);\n var r = ref$1[0];\n var g = ref$1[1];\n var b = ref$1[2];\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var lch2rgb_1 = lch2rgb;\n\n var unpack$r = utils.unpack;\n\n\n var hcl2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hcl = unpack$r(args, 'hcl').reverse();\n return lch2rgb_1.apply(void 0, hcl);\n };\n\n var hcl2rgb_1 = hcl2rgb;\n\n var unpack$s = utils.unpack;\n var type$a = utils.type;\n\n\n\n\n\n\n Color_1.prototype.lch = function() { return rgb2lch_1(this._rgb); };\n Color_1.prototype.hcl = function() { return rgb2lch_1(this._rgb).reverse(); };\n\n chroma_1.lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['lch']) ));\n };\n chroma_1.hcl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hcl']) ));\n };\n\n input.format.lch = lch2rgb_1;\n input.format.hcl = hcl2rgb_1;\n\n ['lch','hcl'].forEach(function (m) { return input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$s(args, m);\n if (type$a(args) === 'array' && args.length === 3) {\n return m;\n }\n }\n }); });\n\n var type$b = utils.type;\n\n\n\n\n\n Color_1.prototype.name = function() {\n var hex = rgb2hex_1(this._rgb, 'rgb');\n for (var i = 0, list = Object.keys(w3cx11_1); i < list.length; i += 1) {\n var n = list[i];\n\n if (w3cx11_1[n] === hex) { return n.toLowerCase(); }\n }\n return hex;\n };\n\n input.format.named = function (name) {\n name = name.toLowerCase();\n if (w3cx11_1[name]) { return hex2rgb_1(w3cx11_1[name]); }\n throw new Error('unknown color name: '+name);\n };\n\n input.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$b(h) === 'string' && w3cx11_1[h.toLowerCase()]) {\n return 'named';\n }\n }\n });\n\n var unpack$t = utils.unpack;\n\n var rgb2num = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$t(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n return (r << 16) + (g << 8) + b;\n };\n\n var rgb2num_1 = rgb2num;\n\n var type$c = utils.type;\n\n var num2rgb = function (num) {\n if (type$c(num) == \"number\" && num >= 0 && num <= 0xFFFFFF) {\n var r = num >> 16;\n var g = (num >> 8) & 0xFF;\n var b = num & 0xFF;\n return [r,g,b,1];\n }\n throw new Error(\"unknown num color: \"+num);\n };\n\n var num2rgb_1 = num2rgb;\n\n var type$d = utils.type;\n\n\n\n Color_1.prototype.num = function() {\n return rgb2num_1(this._rgb);\n };\n\n chroma_1.num = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['num']) ));\n };\n\n input.format.num = num2rgb_1;\n\n input.autodetect.push({\n p: 5,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (args.length === 1 && type$d(args[0]) === 'number' && args[0] >= 0 && args[0] <= 0xFFFFFF) {\n return 'num';\n }\n }\n });\n\n var unpack$u = utils.unpack;\n var type$e = utils.type;\n var round$5 = Math.round;\n\n Color_1.prototype.rgb = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n if (rnd === false) { return this._rgb.slice(0,3); }\n return this._rgb.slice(0,3).map(round$5);\n };\n\n Color_1.prototype.rgba = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n return this._rgb.slice(0,4).map(function (v,i) {\n return i<3 ? (rnd === false ? v : round$5(v)) : v;\n });\n };\n\n chroma_1.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['rgb']) ));\n };\n\n input.format.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$u(args, 'rgba');\n if (rgba[3] === undefined) { rgba[3] = 1; }\n return rgba;\n };\n\n input.autodetect.push({\n p: 3,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$u(args, 'rgba');\n if (type$e(args) === 'array' && (args.length === 3 ||\n args.length === 4 && type$e(args[3]) == 'number' && args[3] >= 0 && args[3] <= 1)) {\n return 'rgb';\n }\n }\n });\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n */\n\n var log = Math.log;\n\n var temperature2rgb = function (kelvin) {\n var temp = kelvin / 100;\n var r,g,b;\n if (temp < 66) {\n r = 255;\n g = -155.25485562709179 - 0.44596950469579133 * (g = temp-2) + 104.49216199393888 * log(g);\n b = temp < 20 ? 0 : -254.76935184120902 + 0.8274096064007395 * (b = temp-10) + 115.67994401066147 * log(b);\n } else {\n r = 351.97690566805693 + 0.114206453784165 * (r = temp-55) - 40.25366309332127 * log(r);\n g = 325.4494125711974 + 0.07943456536662342 * (g = temp-50) - 28.0852963507957 * log(g);\n b = 255;\n }\n return [r,g,b,1];\n };\n\n var temperature2rgb_1 = temperature2rgb;\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n **/\n\n\n var unpack$v = utils.unpack;\n var round$6 = Math.round;\n\n var rgb2temperature = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$v(args, 'rgb');\n var r = rgb[0], b = rgb[2];\n var minTemp = 1000;\n var maxTemp = 40000;\n var eps = 0.4;\n var temp;\n while (maxTemp - minTemp > eps) {\n temp = (maxTemp + minTemp) * 0.5;\n var rgb$1 = temperature2rgb_1(temp);\n if ((rgb$1[2] / rgb$1[0]) >= (b / r)) {\n maxTemp = temp;\n } else {\n minTemp = temp;\n }\n }\n return round$6(temp);\n };\n\n var rgb2temperature_1 = rgb2temperature;\n\n Color_1.prototype.temp =\n Color_1.prototype.kelvin =\n Color_1.prototype.temperature = function() {\n return rgb2temperature_1(this._rgb);\n };\n\n chroma_1.temp =\n chroma_1.kelvin =\n chroma_1.temperature = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['temp']) ));\n };\n\n input.format.temp =\n input.format.kelvin =\n input.format.temperature = temperature2rgb_1;\n\n var type$f = utils.type;\n\n Color_1.prototype.alpha = function(a, mutate) {\n if ( mutate === void 0 ) mutate=false;\n\n if (a !== undefined && type$f(a) === 'number') {\n if (mutate) {\n this._rgb[3] = a;\n return this;\n }\n return new Color_1([this._rgb[0], this._rgb[1], this._rgb[2], a], 'rgb');\n }\n return this._rgb[3];\n };\n\n Color_1.prototype.clipped = function() {\n return this._rgb._clipped || false;\n };\n\n Color_1.prototype.darken = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lab = me.lab();\n \tlab[0] -= labConstants.Kn * amount;\n \treturn new Color_1(lab, 'lab').alpha(me.alpha(), true);\n };\n\n Color_1.prototype.brighten = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.darken(-amount);\n };\n\n Color_1.prototype.darker = Color_1.prototype.darken;\n Color_1.prototype.brighter = Color_1.prototype.brighten;\n\n Color_1.prototype.get = function(mc) {\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel);\n if (i > -1) { return src[i]; }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var type$g = utils.type;\n var pow$2 = Math.pow;\n\n var EPS = 1e-7;\n var MAX_ITER = 20;\n\n Color_1.prototype.luminance = function(lum) {\n if (lum !== undefined && type$g(lum) === 'number') {\n if (lum === 0) {\n // return pure black\n return new Color_1([0,0,0,this._rgb[3]], 'rgb');\n }\n if (lum === 1) {\n // return pure white\n return new Color_1([255,255,255,this._rgb[3]], 'rgb');\n }\n // compute new color using...\n var cur_lum = this.luminance();\n var mode = 'rgb';\n var max_iter = MAX_ITER;\n\n var test = function (low, high) {\n var mid = low.interpolate(high, 0.5, mode);\n var lm = mid.luminance();\n if (Math.abs(lum - lm) < EPS || !max_iter--) {\n // close enough\n return mid;\n }\n return lm > lum ? test(low, mid) : test(mid, high);\n };\n\n var rgb = (cur_lum > lum ? test(new Color_1([0,0,0]), this) : test(this, new Color_1([255,255,255]))).rgb();\n return new Color_1(rgb.concat( [this._rgb[3]]));\n }\n return rgb2luminance.apply(void 0, (this._rgb).slice(0,3));\n };\n\n\n var rgb2luminance = function (r,g,b) {\n // relative luminance\n // see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n r = luminance_x(r);\n g = luminance_x(g);\n b = luminance_x(b);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n };\n\n var luminance_x = function (x) {\n x /= 255;\n return x <= 0.03928 ? x/12.92 : pow$2((x+0.055)/1.055, 2.4);\n };\n\n var interpolator = {};\n\n var type$h = utils.type;\n\n\n var mix = function (col1, col2, f) {\n if ( f === void 0 ) f=0.5;\n var rest = [], len = arguments.length - 3;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 3 ];\n\n var mode = rest[0] || 'lrgb';\n if (!interpolator[mode] && !rest.length) {\n // fall back to the first supported mode\n mode = Object.keys(interpolator)[0];\n }\n if (!interpolator[mode]) {\n throw new Error((\"interpolation mode \" + mode + \" is not defined\"));\n }\n if (type$h(col1) !== 'object') { col1 = new Color_1(col1); }\n if (type$h(col2) !== 'object') { col2 = new Color_1(col2); }\n return interpolator[mode](col1, col2, f)\n .alpha(col1.alpha() + f * (col2.alpha() - col1.alpha()));\n };\n\n Color_1.prototype.mix =\n Color_1.prototype.interpolate = function(col2, f) {\n \tif ( f === void 0 ) f=0.5;\n \tvar rest = [], len = arguments.length - 2;\n \twhile ( len-- > 0 ) rest[ len ] = arguments[ len + 2 ];\n\n \treturn mix.apply(void 0, [ this, col2, f ].concat( rest ));\n };\n\n Color_1.prototype.premultiply = function(mutate) {\n \tif ( mutate === void 0 ) mutate=false;\n\n \tvar rgb = this._rgb;\n \tvar a = rgb[3];\n \tif (mutate) {\n \t\tthis._rgb = [rgb[0]*a, rgb[1]*a, rgb[2]*a, a];\n \t\treturn this;\n \t} else {\n \t\treturn new Color_1([rgb[0]*a, rgb[1]*a, rgb[2]*a, a], 'rgb');\n \t}\n };\n\n Color_1.prototype.saturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lch = me.lch();\n \tlch[1] += labConstants.Kn * amount;\n \tif (lch[1] < 0) { lch[1] = 0; }\n \treturn new Color_1(lch, 'lch').alpha(me.alpha(), true);\n };\n\n Color_1.prototype.desaturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.saturate(-amount);\n };\n\n var type$i = utils.type;\n\n Color_1.prototype.set = function(mc, value, mutate) {\n if ( mutate === void 0 ) mutate=false;\n\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel);\n if (i > -1) {\n if (type$i(value) == 'string') {\n switch(value.charAt(0)) {\n case '+': src[i] += +value; break;\n case '-': src[i] += +value; break;\n case '*': src[i] *= +(value.substr(1)); break;\n case '/': src[i] /= +(value.substr(1)); break;\n default: src[i] = +value;\n }\n } else if (type$i(value) === 'number') {\n src[i] = value;\n } else {\n throw new Error(\"unsupported value for Color.set\");\n }\n var out = new Color_1(src, mode);\n if (mutate) {\n this._rgb = out._rgb;\n return this;\n }\n return out;\n }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var rgb$1 = function (col1, col2, f) {\n var xyz0 = col1._rgb;\n var xyz1 = col2._rgb;\n return new Color_1(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator.rgb = rgb$1;\n\n var sqrt$2 = Math.sqrt;\n var pow$3 = Math.pow;\n\n var lrgb = function (col1, col2, f) {\n var ref = col1._rgb;\n var x1 = ref[0];\n var y1 = ref[1];\n var z1 = ref[2];\n var ref$1 = col2._rgb;\n var x2 = ref$1[0];\n var y2 = ref$1[1];\n var z2 = ref$1[2];\n return new Color_1(\n sqrt$2(pow$3(x1,2) * (1-f) + pow$3(x2,2) * f),\n sqrt$2(pow$3(y1,2) * (1-f) + pow$3(y2,2) * f),\n sqrt$2(pow$3(z1,2) * (1-f) + pow$3(z2,2) * f),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator.lrgb = lrgb;\n\n var lab$1 = function (col1, col2, f) {\n var xyz0 = col1.lab();\n var xyz1 = col2.lab();\n return new Color_1(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'lab'\n )\n };\n\n // register interpolator\n interpolator.lab = lab$1;\n\n var _hsx = function (col1, col2, f, m) {\n var assign, assign$1;\n\n var xyz0, xyz1;\n if (m === 'hsl') {\n xyz0 = col1.hsl();\n xyz1 = col2.hsl();\n } else if (m === 'hsv') {\n xyz0 = col1.hsv();\n xyz1 = col2.hsv();\n } else if (m === 'hcg') {\n xyz0 = col1.hcg();\n xyz1 = col2.hcg();\n } else if (m === 'hsi') {\n xyz0 = col1.hsi();\n xyz1 = col2.hsi();\n } else if (m === 'lch' || m === 'hcl') {\n m = 'hcl';\n xyz0 = col1.hcl();\n xyz1 = col2.hcl();\n }\n\n var hue0, hue1, sat0, sat1, lbv0, lbv1;\n if (m.substr(0, 1) === 'h') {\n (assign = xyz0, hue0 = assign[0], sat0 = assign[1], lbv0 = assign[2]);\n (assign$1 = xyz1, hue1 = assign$1[0], sat1 = assign$1[1], lbv1 = assign$1[2]);\n }\n\n var sat, hue, lbv, dh;\n\n if (!isNaN(hue0) && !isNaN(hue1)) {\n // both colors have hue\n if (hue1 > hue0 && hue1 - hue0 > 180) {\n dh = hue1-(hue0+360);\n } else if (hue1 < hue0 && hue0 - hue1 > 180) {\n dh = hue1+360-hue0;\n } else{\n dh = hue1 - hue0;\n }\n hue = hue0 + f * dh;\n } else if (!isNaN(hue0)) {\n hue = hue0;\n if ((lbv1 == 1 || lbv1 == 0) && m != 'hsv') { sat = sat0; }\n } else if (!isNaN(hue1)) {\n hue = hue1;\n if ((lbv0 == 1 || lbv0 == 0) && m != 'hsv') { sat = sat1; }\n } else {\n hue = Number.NaN;\n }\n\n if (sat === undefined) { sat = sat0 + f * (sat1 - sat0); }\n lbv = lbv0 + f * (lbv1-lbv0);\n return new Color_1([hue, sat, lbv], m);\n };\n\n var lch$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'lch');\n };\n\n // register interpolator\n interpolator.lch = lch$1;\n interpolator.hcl = lch$1;\n\n var num$1 = function (col1, col2, f) {\n var c1 = col1.num();\n var c2 = col2.num();\n return new Color_1(c1 + f * (c2-c1), 'num')\n };\n\n // register interpolator\n interpolator.num = num$1;\n\n var hcg$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hcg');\n };\n\n // register interpolator\n interpolator.hcg = hcg$1;\n\n var hsi$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsi');\n };\n\n // register interpolator\n interpolator.hsi = hsi$1;\n\n var hsl$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsl');\n };\n\n // register interpolator\n interpolator.hsl = hsl$1;\n\n var hsv$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsv');\n };\n\n // register interpolator\n interpolator.hsv = hsv$1;\n\n var clip_rgb$2 = utils.clip_rgb;\n var pow$4 = Math.pow;\n var sqrt$3 = Math.sqrt;\n var PI$1 = Math.PI;\n var cos$2 = Math.cos;\n var sin$1 = Math.sin;\n var atan2$1 = Math.atan2;\n\n var average = function (colors, mode) {\n if ( mode === void 0 ) mode='lrgb';\n\n var l = colors.length;\n // convert colors to Color objects\n colors = colors.map(function (c) { return new Color_1(c); });\n if (mode === 'lrgb') {\n return _average_lrgb(colors)\n }\n var first = colors.shift();\n var xyz = first.get(mode);\n var cnt = [];\n var dx = 0;\n var dy = 0;\n // initial color\n for (var i=0; i= 360) { A$1 -= 360; }\n xyz[i$1] = A$1;\n } else {\n xyz[i$1] = xyz[i$1]/cnt[i$1];\n }\n }\n alpha /= l;\n return (new Color_1(xyz, mode)).alpha(alpha > 0.99999 ? 1 : alpha, true);\n };\n\n\n var _average_lrgb = function (colors) {\n var l = colors.length;\n var f = 1/l;\n var xyz = [0,0,0,0];\n for (var i = 0, list = colors; i < list.length; i += 1) {\n var col = list[i];\n\n var rgb = col._rgb;\n xyz[0] += pow$4(rgb[0],2) * f;\n xyz[1] += pow$4(rgb[1],2) * f;\n xyz[2] += pow$4(rgb[2],2) * f;\n xyz[3] += rgb[3] * f;\n }\n xyz[0] = sqrt$3(xyz[0]);\n xyz[1] = sqrt$3(xyz[1]);\n xyz[2] = sqrt$3(xyz[2]);\n if (xyz[3] > 0.9999999) { xyz[3] = 1; }\n return new Color_1(clip_rgb$2(xyz));\n };\n\n // minimal multi-purpose interface\n\n // @requires utils color analyze\n\n\n var type$j = utils.type;\n\n var pow$5 = Math.pow;\n\n var scale = function(colors) {\n\n // constructor\n var _mode = 'rgb';\n var _nacol = chroma_1('#ccc');\n var _spread = 0;\n // const _fixed = false;\n var _domain = [0, 1];\n var _pos = [];\n var _padding = [0,0];\n var _classes = false;\n var _colors = [];\n var _out = false;\n var _min = 0;\n var _max = 1;\n var _correctLightness = false;\n var _colorCache = {};\n var _useCache = true;\n var _gamma = 1;\n\n // private methods\n\n var setColors = function(colors) {\n colors = colors || ['#fff', '#000'];\n if (colors && type$j(colors) === 'string' && chroma_1.brewer &&\n chroma_1.brewer[colors.toLowerCase()]) {\n colors = chroma_1.brewer[colors.toLowerCase()];\n }\n if (type$j(colors) === 'array') {\n // handle single color\n if (colors.length === 1) {\n colors = [colors[0], colors[0]];\n }\n // make a copy of the colors\n colors = colors.slice(0);\n // convert to chroma classes\n for (var c=0; c= _classes[i]) {\n i++;\n }\n return i-1;\n }\n return 0;\n };\n\n var tmap = function (t) { return t; };\n\n // const classifyValue = function(value) {\n // let val = value;\n // if (_classes.length > 2) {\n // const n = _classes.length-1;\n // const i = getClass(value);\n // const minc = _classes[0] + ((_classes[1]-_classes[0]) * (0 + (_spread * 0.5))); // center of 1st class\n // const maxc = _classes[n-1] + ((_classes[n]-_classes[n-1]) * (1 - (_spread * 0.5))); // center of last class\n // val = _min + ((((_classes[i] + ((_classes[i+1] - _classes[i]) * 0.5)) - minc) / (maxc-minc)) * (_max - _min));\n // }\n // return val;\n // };\n\n var getColor = function(val, bypassMap) {\n var col, t;\n if (bypassMap == null) { bypassMap = false; }\n if (isNaN(val) || (val === null)) { return _nacol; }\n if (!bypassMap) {\n if (_classes && (_classes.length > 2)) {\n // find the class\n var c = getClass(val);\n t = c / (_classes.length-2);\n } else if (_max !== _min) {\n // just interpolate between min/max\n t = (val - _min) / (_max - _min);\n } else {\n t = 1;\n }\n } else {\n t = val;\n }\n\n if (!bypassMap) {\n t = tmap(t); // lightness correction\n }\n\n if (_gamma !== 1) { t = pow$5(t, _gamma); }\n\n t = _padding[0] + (t * (1 - _padding[0] - _padding[1]));\n\n t = Math.min(1, Math.max(0, t));\n\n var k = Math.floor(t * 10000);\n\n if (_useCache && _colorCache[k]) {\n col = _colorCache[k];\n } else {\n if (type$j(_colors) === 'array') {\n //for i in [0.._pos.length-1]\n for (var i=0; i<_pos.length; i++) {\n var p = _pos[i];\n if (t <= p) {\n col = _colors[i];\n break;\n }\n if ((t >= p) && (i === (_pos.length-1))) {\n col = _colors[i];\n break;\n }\n if (t > p && t < _pos[i+1]) {\n t = (t-p)/(_pos[i+1]-p);\n col = chroma_1.interpolate(_colors[i], _colors[i+1], t, _mode);\n break;\n }\n }\n } else if (type$j(_colors) === 'function') {\n col = _colors(t);\n }\n if (_useCache) { _colorCache[k] = col; }\n }\n return col;\n };\n\n var resetCache = function () { return _colorCache = {}; };\n\n setColors(colors);\n\n // public interface\n\n var f = function(v) {\n var c = chroma_1(getColor(v));\n if (_out && c[_out]) { return c[_out](); } else { return c; }\n };\n\n f.classes = function(classes) {\n if (classes != null) {\n if (type$j(classes) === 'array') {\n _classes = classes;\n _domain = [classes[0], classes[classes.length-1]];\n } else {\n var d = chroma_1.analyze(_domain);\n if (classes === 0) {\n _classes = [d.min, d.max];\n } else {\n _classes = chroma_1.limits(d, 'e', classes);\n }\n }\n return f;\n }\n return _classes;\n };\n\n\n f.domain = function(domain) {\n if (!arguments.length) {\n return _domain;\n }\n _min = domain[0];\n _max = domain[domain.length-1];\n _pos = [];\n var k = _colors.length;\n if ((domain.length === k) && (_min !== _max)) {\n // update positions\n for (var i = 0, list = Array.from(domain); i < list.length; i += 1) {\n var d = list[i];\n\n _pos.push((d-_min) / (_max-_min));\n }\n } else {\n for (var c=0; c L1;\n var L_actual = getColor(t, true).lab()[0];\n var L_ideal = L0 + ((L1 - L0) * t);\n var L_diff = L_actual - L_ideal;\n var t0 = 0;\n var t1 = 1;\n var max_iter = 20;\n while ((Math.abs(L_diff) > 1e-2) && (max_iter-- > 0)) {\n (function() {\n if (pol) { L_diff *= -1; }\n if (L_diff < 0) {\n t0 = t;\n t += (t1 - t) * 0.5;\n } else {\n t1 = t;\n t += (t0 - t) * 0.5;\n }\n L_actual = getColor(t, true).lab()[0];\n return L_diff = L_actual - L_ideal;\n })();\n }\n return t;\n };\n } else {\n tmap = function (t) { return t; };\n }\n return f;\n };\n\n f.padding = function(p) {\n if (p != null) {\n if (type$j(p) === 'number') {\n p = [p,p];\n }\n _padding = p;\n return f;\n } else {\n return _padding;\n }\n };\n\n f.colors = function(numColors, out) {\n // If no arguments are given, return the original colors that were provided\n if (arguments.length < 2) { out = 'hex'; }\n var result = [];\n\n if (arguments.length === 0) {\n result = _colors.slice(0);\n\n } else if (numColors === 1) {\n result = [f(0.5)];\n\n } else if (numColors > 1) {\n var dm = _domain[0];\n var dd = _domain[1] - dm;\n result = __range__(0, numColors, false).map(function (i) { return f( dm + ((i/(numColors-1)) * dd) ); });\n\n } else { // returns all colors based on the defined classes\n colors = [];\n var samples = [];\n if (_classes && (_classes.length > 2)) {\n for (var i = 1, end = _classes.length, asc = 1 <= end; asc ? i < end : i > end; asc ? i++ : i--) {\n samples.push((_classes[i-1]+_classes[i])*0.5);\n }\n } else {\n samples = _domain;\n }\n result = samples.map(function (v) { return f(v); });\n }\n\n if (chroma_1[out]) {\n result = result.map(function (c) { return c[out](); });\n }\n return result;\n };\n\n f.cache = function(c) {\n if (c != null) {\n _useCache = c;\n return f;\n } else {\n return _useCache;\n }\n };\n\n f.gamma = function(g) {\n if (g != null) {\n _gamma = g;\n return f;\n } else {\n return _gamma;\n }\n };\n\n f.nodata = function(d) {\n if (d != null) {\n _nacol = chroma_1(d);\n return f;\n } else {\n return _nacol;\n }\n };\n\n return f;\n };\n\n function __range__(left, right, inclusive) {\n var range = [];\n var ascending = left < right;\n var end = !inclusive ? right : ascending ? right + 1 : right - 1;\n for (var i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {\n range.push(i);\n }\n return range;\n }\n\n //\n // interpolates between a set of colors uzing a bezier spline\n //\n\n // @requires utils lab\n\n\n\n\n var bezier = function(colors) {\n var assign, assign$1, assign$2;\n\n var I, lab0, lab1, lab2;\n colors = colors.map(function (c) { return new Color_1(c); });\n if (colors.length === 2) {\n // linear interpolation\n (assign = colors.map(function (c) { return c.lab(); }), lab0 = assign[0], lab1 = assign[1]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return lab0[i] + (t * (lab1[i] - lab0[i])); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 3) {\n // quadratic bezier interpolation\n (assign$1 = colors.map(function (c) { return c.lab(); }), lab0 = assign$1[0], lab1 = assign$1[1], lab2 = assign$1[2]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t) * lab0[i]) + (2 * (1-t) * t * lab1[i]) + (t * t * lab2[i]); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 4) {\n // cubic bezier interpolation\n var lab3;\n (assign$2 = colors.map(function (c) { return c.lab(); }), lab0 = assign$2[0], lab1 = assign$2[1], lab2 = assign$2[2], lab3 = assign$2[3]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t)*(1-t) * lab0[i]) + (3 * (1-t) * (1-t) * t * lab1[i]) + (3 * (1-t) * t * t * lab2[i]) + (t*t*t * lab3[i]); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 5) {\n var I0 = bezier(colors.slice(0, 3));\n var I1 = bezier(colors.slice(2, 5));\n I = function(t) {\n if (t < 0.5) {\n return I0(t*2);\n } else {\n return I1((t-0.5)*2);\n }\n };\n }\n return I;\n };\n\n var bezier_1 = function (colors) {\n var f = bezier(colors);\n f.scale = function () { return scale(f); };\n return f;\n };\n\n /*\n * interpolates between a set of colors uzing a bezier spline\n * blend mode formulas taken from http://www.venture-ware.com/kevin/coding/lets-learn-math-photoshop-blend-modes/\n */\n\n\n\n\n var blend = function (bottom, top, mode) {\n if (!blend[mode]) {\n throw new Error('unknown blend mode ' + mode);\n }\n return blend[mode](bottom, top);\n };\n\n var blend_f = function (f) { return function (bottom,top) {\n var c0 = chroma_1(top).rgb();\n var c1 = chroma_1(bottom).rgb();\n return chroma_1.rgb(f(c0, c1));\n }; };\n\n var each = function (f) { return function (c0, c1) {\n var out = [];\n out[0] = f(c0[0], c1[0]);\n out[1] = f(c0[1], c1[1]);\n out[2] = f(c0[2], c1[2]);\n return out;\n }; };\n\n var normal = function (a) { return a; };\n var multiply = function (a,b) { return a * b / 255; };\n var darken$1 = function (a,b) { return a > b ? b : a; };\n var lighten = function (a,b) { return a > b ? a : b; };\n var screen = function (a,b) { return 255 * (1 - (1-a/255) * (1-b/255)); };\n var overlay = function (a,b) { return b < 128 ? 2 * a * b / 255 : 255 * (1 - 2 * (1 - a / 255 ) * ( 1 - b / 255 )); };\n var burn = function (a,b) { return 255 * (1 - (1 - b / 255) / (a/255)); };\n var dodge = function (a,b) {\n if (a === 255) { return 255; }\n a = 255 * (b / 255) / (1 - a / 255);\n return a > 255 ? 255 : a\n };\n\n // # add = (a,b) ->\n // # if (a + b > 255) then 255 else a + b\n\n blend.normal = blend_f(each(normal));\n blend.multiply = blend_f(each(multiply));\n blend.screen = blend_f(each(screen));\n blend.overlay = blend_f(each(overlay));\n blend.darken = blend_f(each(darken$1));\n blend.lighten = blend_f(each(lighten));\n blend.dodge = blend_f(each(dodge));\n blend.burn = blend_f(each(burn));\n // blend.add = blend_f(each(add));\n\n var blend_1 = blend;\n\n // cubehelix interpolation\n // based on D.A. Green \"A colour scheme for the display of astronomical intensity images\"\n // http://astron-soc.in/bulletin/11June/289392011.pdf\n\n var type$k = utils.type;\n var clip_rgb$3 = utils.clip_rgb;\n var TWOPI$2 = utils.TWOPI;\n var pow$6 = Math.pow;\n var sin$2 = Math.sin;\n var cos$3 = Math.cos;\n\n\n var cubehelix = function(start, rotations, hue, gamma, lightness) {\n if ( start === void 0 ) start=300;\n if ( rotations === void 0 ) rotations=-1.5;\n if ( hue === void 0 ) hue=1;\n if ( gamma === void 0 ) gamma=1;\n if ( lightness === void 0 ) lightness=[0,1];\n\n var dh = 0, dl;\n if (type$k(lightness) === 'array') {\n dl = lightness[1] - lightness[0];\n } else {\n dl = 0;\n lightness = [lightness, lightness];\n }\n\n var f = function(fract) {\n var a = TWOPI$2 * (((start+120)/360) + (rotations * fract));\n var l = pow$6(lightness[0] + (dl * fract), gamma);\n var h = dh !== 0 ? hue[0] + (fract * dh) : hue;\n var amp = (h * l * (1-l)) / 2;\n var cos_a = cos$3(a);\n var sin_a = sin$2(a);\n var r = l + (amp * ((-0.14861 * cos_a) + (1.78277* sin_a)));\n var g = l + (amp * ((-0.29227 * cos_a) - (0.90649* sin_a)));\n var b = l + (amp * (+1.97294 * cos_a));\n return chroma_1(clip_rgb$3([r*255,g*255,b*255,1]));\n };\n\n f.start = function(s) {\n if ((s == null)) { return start; }\n start = s;\n return f;\n };\n\n f.rotations = function(r) {\n if ((r == null)) { return rotations; }\n rotations = r;\n return f;\n };\n\n f.gamma = function(g) {\n if ((g == null)) { return gamma; }\n gamma = g;\n return f;\n };\n\n f.hue = function(h) {\n if ((h == null)) { return hue; }\n hue = h;\n if (type$k(hue) === 'array') {\n dh = hue[1] - hue[0];\n if (dh === 0) { hue = hue[1]; }\n } else {\n dh = 0;\n }\n return f;\n };\n\n f.lightness = function(h) {\n if ((h == null)) { return lightness; }\n if (type$k(h) === 'array') {\n lightness = h;\n dl = h[1] - h[0];\n } else {\n lightness = [h,h];\n dl = 0;\n }\n return f;\n };\n\n f.scale = function () { return chroma_1.scale(f); };\n\n f.hue(hue);\n\n return f;\n };\n\n var digits = '0123456789abcdef';\n\n var floor$2 = Math.floor;\n var random = Math.random;\n\n var random_1 = function () {\n var code = '#';\n for (var i=0; i<6; i++) {\n code += digits.charAt(floor$2(random() * 16));\n }\n return new Color_1(code, 'hex');\n };\n\n var log$1 = Math.log;\n var pow$7 = Math.pow;\n var floor$3 = Math.floor;\n var abs = Math.abs;\n\n\n var analyze = function (data, key) {\n if ( key === void 0 ) key=null;\n\n var r = {\n min: Number.MAX_VALUE,\n max: Number.MAX_VALUE*-1,\n sum: 0,\n values: [],\n count: 0\n };\n if (type(data) === 'object') {\n data = Object.values(data);\n }\n data.forEach(function (val) {\n if (key && type(val) === 'object') { val = val[key]; }\n if (val !== undefined && val !== null && !isNaN(val)) {\n r.values.push(val);\n r.sum += val;\n if (val < r.min) { r.min = val; }\n if (val > r.max) { r.max = val; }\n r.count += 1;\n }\n });\n\n r.domain = [r.min, r.max];\n\n r.limits = function (mode, num) { return limits(r, mode, num); };\n\n return r;\n };\n\n\n var limits = function (data, mode, num) {\n if ( mode === void 0 ) mode='equal';\n if ( num === void 0 ) num=7;\n\n if (type(data) == 'array') {\n data = analyze(data);\n }\n var min = data.min;\n var max = data.max;\n var values = data.values.sort(function (a,b) { return a-b; });\n\n if (num === 1) { return [min,max]; }\n\n var limits = [];\n\n if (mode.substr(0,1) === 'c') { // continuous\n limits.push(min);\n limits.push(max);\n }\n\n if (mode.substr(0,1) === 'e') { // equal interval\n limits.push(min);\n for (var i=1; i 0');\n }\n var min_log = Math.LOG10E * log$1(min);\n var max_log = Math.LOG10E * log$1(max);\n limits.push(min);\n for (var i$1=1; i$1 pb\n var pr = p - pb;\n limits.push((values[pb]*(1-pr)) + (values[pb+1]*pr));\n }\n }\n limits.push(max);\n\n }\n\n else if (mode.substr(0,1) === 'k') { // k-means clustering\n /*\n implementation based on\n http://code.google.com/p/figue/source/browse/trunk/figue.js#336\n simplified for 1-d input values\n */\n var cluster;\n var n = values.length;\n var assignments = new Array(n);\n var clusterSizes = new Array(num);\n var repeat = true;\n var nb_iters = 0;\n var centroids = null;\n\n // get seed values\n centroids = [];\n centroids.push(min);\n for (var i$3=1; i$3 200) {\n repeat = false;\n }\n }\n\n // finished k-means clustering\n // the next part is borrowed from gabrielflor.it\n var kClusters = {};\n for (var j$5=0; j$5 l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);\n };\n\n var sqrt$4 = Math.sqrt;\n var atan2$2 = Math.atan2;\n var abs$1 = Math.abs;\n var cos$4 = Math.cos;\n var PI$2 = Math.PI;\n\n var deltaE = function(a, b, L, C) {\n if ( L === void 0 ) L=1;\n if ( C === void 0 ) C=1;\n\n // Delta E (CMC)\n // see http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CMC.html\n a = new Color_1(a);\n b = new Color_1(b);\n var ref = Array.from(a.lab());\n var L1 = ref[0];\n var a1 = ref[1];\n var b1 = ref[2];\n var ref$1 = Array.from(b.lab());\n var L2 = ref$1[0];\n var a2 = ref$1[1];\n var b2 = ref$1[2];\n var c1 = sqrt$4((a1 * a1) + (b1 * b1));\n var c2 = sqrt$4((a2 * a2) + (b2 * b2));\n var sl = L1 < 16.0 ? 0.511 : (0.040975 * L1) / (1.0 + (0.01765 * L1));\n var sc = ((0.0638 * c1) / (1.0 + (0.0131 * c1))) + 0.638;\n var h1 = c1 < 0.000001 ? 0.0 : (atan2$2(b1, a1) * 180.0) / PI$2;\n while (h1 < 0) { h1 += 360; }\n while (h1 >= 360) { h1 -= 360; }\n var t = (h1 >= 164.0) && (h1 <= 345.0) ? (0.56 + abs$1(0.2 * cos$4((PI$2 * (h1 + 168.0)) / 180.0))) : (0.36 + abs$1(0.4 * cos$4((PI$2 * (h1 + 35.0)) / 180.0)));\n var c4 = c1 * c1 * c1 * c1;\n var f = sqrt$4(c4 / (c4 + 1900.0));\n var sh = sc * (((f * t) + 1.0) - f);\n var delL = L1 - L2;\n var delC = c1 - c2;\n var delA = a1 - a2;\n var delB = b1 - b2;\n var dH2 = ((delA * delA) + (delB * delB)) - (delC * delC);\n var v1 = delL / (L * sl);\n var v2 = delC / (C * sc);\n var v3 = sh;\n return sqrt$4((v1 * v1) + (v2 * v2) + (dH2 / (v3 * v3)));\n };\n\n // simple Euclidean distance\n var distance = function(a, b, mode) {\n if ( mode === void 0 ) mode='lab';\n\n // Delta E (CIE 1976)\n // see http://www.brucelindbloom.com/index.html?Equations.html\n a = new Color_1(a);\n b = new Color_1(b);\n var l1 = a.get(mode);\n var l2 = b.get(mode);\n var sum_sq = 0;\n for (var i in l1) {\n var d = (l1[i] || 0) - (l2[i] || 0);\n sum_sq += d*d;\n }\n return Math.sqrt(sum_sq);\n };\n\n var valid = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n try {\n new (Function.prototype.bind.apply( Color_1, [ null ].concat( args) ));\n return true;\n } catch (e) {\n return false;\n }\n };\n\n // some pre-defined color scales:\n\n\n\n\n var scales = {\n \tcool: function cool() { return scale([chroma_1.hsl(180,1,.9), chroma_1.hsl(250,.7,.4)]) },\n \thot: function hot() { return scale(['#000','#f00','#ff0','#fff'], [0,.25,.75,1]).mode('rgb') }\n };\n\n /**\n ColorBrewer colors for chroma.js\n\n Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The\n Pennsylvania State University.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software distributed\n under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n CONDITIONS OF ANY KIND, either express or implied. See the License for the\n specific language governing permissions and limitations under the License.\n */\n\n var colorbrewer = {\n // sequential\n OrRd: ['#fff7ec', '#fee8c8', '#fdd49e', '#fdbb84', '#fc8d59', '#ef6548', '#d7301f', '#b30000', '#7f0000'],\n PuBu: ['#fff7fb', '#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0', '#045a8d', '#023858'],\n BuPu: ['#f7fcfd', '#e0ecf4', '#bfd3e6', '#9ebcda', '#8c96c6', '#8c6bb1', '#88419d', '#810f7c', '#4d004b'],\n Oranges: ['#fff5eb', '#fee6ce', '#fdd0a2', '#fdae6b', '#fd8d3c', '#f16913', '#d94801', '#a63603', '#7f2704'],\n BuGn: ['#f7fcfd', '#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', '#41ae76', '#238b45', '#006d2c', '#00441b'],\n YlOrBr: ['#ffffe5', '#fff7bc', '#fee391', '#fec44f', '#fe9929', '#ec7014', '#cc4c02', '#993404', '#662506'],\n YlGn: ['#ffffe5', '#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443', '#006837', '#004529'],\n Reds: ['#fff5f0', '#fee0d2', '#fcbba1', '#fc9272', '#fb6a4a', '#ef3b2c', '#cb181d', '#a50f15', '#67000d'],\n RdPu: ['#fff7f3', '#fde0dd', '#fcc5c0', '#fa9fb5', '#f768a1', '#dd3497', '#ae017e', '#7a0177', '#49006a'],\n Greens: ['#f7fcf5', '#e5f5e0', '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45', '#006d2c', '#00441b'],\n YlGnBu: ['#ffffd9', '#edf8b1', '#c7e9b4', '#7fcdbb', '#41b6c4', '#1d91c0', '#225ea8', '#253494', '#081d58'],\n Purples: ['#fcfbfd', '#efedf5', '#dadaeb', '#bcbddc', '#9e9ac8', '#807dba', '#6a51a3', '#54278f', '#3f007d'],\n GnBu: ['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081'],\n Greys: ['#ffffff', '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000'],\n YlOrRd: ['#ffffcc', '#ffeda0', '#fed976', '#feb24c', '#fd8d3c', '#fc4e2a', '#e31a1c', '#bd0026', '#800026'],\n PuRd: ['#f7f4f9', '#e7e1ef', '#d4b9da', '#c994c7', '#df65b0', '#e7298a', '#ce1256', '#980043', '#67001f'],\n Blues: ['#f7fbff', '#deebf7', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#08519c', '#08306b'],\n PuBuGn: ['#fff7fb', '#ece2f0', '#d0d1e6', '#a6bddb', '#67a9cf', '#3690c0', '#02818a', '#016c59', '#014636'],\n Viridis: ['#440154', '#482777', '#3f4a8a', '#31678e', '#26838f', '#1f9d8a', '#6cce5a', '#b6de2b', '#fee825'],\n\n // diverging\n\n Spectral: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],\n RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837'],\n RdBu: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#f7f7f7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],\n PiYG: ['#8e0152', '#c51b7d', '#de77ae', '#f1b6da', '#fde0ef', '#f7f7f7', '#e6f5d0', '#b8e186', '#7fbc41', '#4d9221', '#276419'],\n PRGn: ['#40004b', '#762a83', '#9970ab', '#c2a5cf', '#e7d4e8', '#f7f7f7', '#d9f0d3', '#a6dba0', '#5aae61', '#1b7837', '#00441b'],\n RdYlBu: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee090', '#ffffbf', '#e0f3f8', '#abd9e9', '#74add1', '#4575b4', '#313695'],\n BrBG: ['#543005', '#8c510a', '#bf812d', '#dfc27d', '#f6e8c3', '#f5f5f5', '#c7eae5', '#80cdc1', '#35978f', '#01665e', '#003c30'],\n RdGy: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#ffffff', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a'],\n PuOr: ['#7f3b08', '#b35806', '#e08214', '#fdb863', '#fee0b6', '#f7f7f7', '#d8daeb', '#b2abd2', '#8073ac', '#542788', '#2d004b'],\n\n // qualitative\n\n Set2: ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3'],\n Accent: ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f', '#bf5b17', '#666666'],\n Set1: ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999'],\n Set3: ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f'],\n Dark2: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],\n Paired: ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', '#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', '#ffff99', '#b15928'],\n Pastel2: ['#b3e2cd', '#fdcdac', '#cbd5e8', '#f4cae4', '#e6f5c9', '#fff2ae', '#f1e2cc', '#cccccc'],\n Pastel1: ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4', '#fed9a6', '#ffffcc', '#e5d8bd', '#fddaec', '#f2f2f2'],\n };\n\n // add lowercase aliases for case-insensitive matches\n for (var i$1 = 0, list$1 = Object.keys(colorbrewer); i$1 < list$1.length; i$1 += 1) {\n var key = list$1[i$1];\n\n colorbrewer[key.toLowerCase()] = colorbrewer[key];\n }\n\n var colorbrewer_1 = colorbrewer;\n\n // feel free to comment out anything to rollup\n // a smaller chroma.js built\n\n // io --> convert colors\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // operators --> modify existing Colors\n\n\n\n\n\n\n\n\n\n\n // interpolators\n\n\n\n\n\n\n\n\n\n\n // generators -- > create new colors\n chroma_1.average = average;\n chroma_1.bezier = bezier_1;\n chroma_1.blend = blend_1;\n chroma_1.cubehelix = cubehelix;\n chroma_1.mix = chroma_1.interpolate = mix;\n chroma_1.random = random_1;\n chroma_1.scale = scale;\n\n // other utility methods\n chroma_1.analyze = analyze_1.analyze;\n chroma_1.contrast = contrast;\n chroma_1.deltaE = deltaE;\n chroma_1.distance = distance;\n chroma_1.limits = analyze_1.limits;\n chroma_1.valid = valid;\n\n // scale\n chroma_1.scales = scales;\n\n // colors\n chroma_1.colors = w3cx11_1;\n chroma_1.brewer = colorbrewer_1;\n\n var chroma_js = chroma_1;\n\n return chroma_js;\n\n})));\n","module.exports = \"
\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n
\\n Color:\\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n\\n
\\n
\\n Ancho:\\n \\n
\\n
\\n \\n
Opciones de patrón
\\n\\n
\\n
\\n Patrón\\n \\n
\\n
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n\\n
\\n
\\n Rotación:\\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n
\\n
\\n Offset:\\n \\n
\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n
\\n
\\n Color:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Linedash:\\n \\n  \\n \\n
\\n\\n
\\n Linedash Offset:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Line Cap\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n
\\n
\\n Color\\n \\n
\\n
\\n Texto:\\n \\n
\\n
\\n\\n
\\n
\\n Fuente:\\n \\n
\\n
\\n Tamaño:\\n \\n
\\n
\\n\\n
\\n
\\n Alineación horizontal:\\n \\n
\\n\\n
\\n Alineación vertical:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Escala:\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n\\n \\n\\n
\\n\\n
\\n Ajustar a geometría\\n \\n
\\n\\n
\\n Ancho Mínimo:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Suavizar\\n \\n
\\n\\n
\\n Desbordar:\\n \\n
\\n\\n
\\n\\n \\n
Trazo de etiqueta:
\\n
\\n\\n
\\n Trazo\\n \\n
\\n\\n
\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Dash:\\n \\n  \\n \\n
\\n\\n
\\n Offset:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Cap:\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n \\n
\\n
\\n URL:\\n \\n
\\n
\\n Tamaño:\\n \\n  \\n \\n
\\n
\\n\\n
\\n
\\n Snap to pixel\\n \\n
\\n
\\n\\n
\\n
\\n Anclaje:\\n \\n  \\n \\n
\\n
\\n Escala:\\n \\n
\\n
\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n \\n
\\n\\n
\\n bkColor:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Forma:\\n \\n
\\n\\n
\\n Familia:\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n\\n
\\n\\n
\\n\\n
\\n Radio:\\n \\n
\\n\\n
\\n Tamaño icono:\\n \\n
\\n\\n\\n
\\n\\n
\\n\\n
\\n Gradiente\\n \\n
\\n\\n
\\n Color de icono:\\n \\n
\\n
\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n
\\n\\n\";","module.exports = \"
\\n {{#each attributes}}\\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n \\n \\n \\n \\n \\n {{#each values}}\\n \\n \\n \\n \\n {{/each}} {{#if attributeExists}}\\n \\n \\n \\n \\n {{/if}}\\n
Valor de atributoPrevisualización
{{this.name}}\\\"\\\"
Otros\\\"\\\"
\\n
\\n\";","module.exports = \"
\\n
\\n
    \\n
  • \\n
    \\n \\n \\n \\n
    \\n
  • \\n
\\n\\n
\\n \\n \\n \\n\\n \\n
\\n
\\n\\n \\n\\n \\n \\n \\n\\n \\n \\n \\n\\n \\n \\n \\n\\n
\\n
\\n\\n \\n \\n \\n\\n \\n \\n \\n\\n \\n \\n \\n
\\n\\n\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n
\\n Atributos:\\n \\n
\\n
\\n
\\n
\\n Radio mínimo:\\n \\n
\\n
\\n Radio máximo:\\n \\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n \\n
\\n
Rangos
\\n
\\n\\n
\\n
\\n Número de rangos:\\n \\n
\\n
\\n
\\n {{#each ranges}}\\n
\\n
Rango {{#sum @index 1}}{{/sum}}
\\n
\\n
\\n Desde:\\n \\n
\\n
\\n Hasta:\\n \\n
\\n
\\n
\\n
\\n Relleno:\\n \\n
\\n
\\n Opacidad:\\n \\n
\\n
\\n
\\n
\\n Borde:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n
\\n {{/each}} {{#pages}}\\n
\\n
Rango {{id}}
\\n
\\n
\\n Desde:\\n \\n
\\n
\\n Hasta:\\n \\n
\\n
\\n
\\n
\\n Relleno:\\n \\n
\\n
\\n Opacidad:\\n \\n
\\n
\\n
\\n
\\n Borde:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n
\\n {{/pages}}\\n
\\n\\n
\\n
    \\n {{#each ranges}}\\n
  • {{#sum @index 1}}{{/sum}}
  • \\n {{/each}} {{#each pages}}\\n
  • {{id}}
  • \\n {{/each}}\\n\\n
\\n
\\n\\n
\\n
\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n
\\n Envoltura\\n \\n
\\n
\\n Cantidad\\n \\n
\\n
\\n\\n
\\n
\\n Seleccionable\\n \\n
\\n
\\n Animado\\n \\n
\\n
\\n\\n
\\n
\\n Distancia:\\n \\n
\\n
\\n Puntos:\\n \\n
\\n
\\n\\n
\\n
\\n Distancia de abanico:\\n \\n
\\n
\\n Color de texto:\\n \\n
\\n
\\n\\n
\\n
\\n
\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Atributos:\\n \\n
\\n\\n
\\n
\\n\\n
\\n Algoritmo:\\n \\n
\\n\\n
\\n Rangos:\\n \\n
\\n
\\n
Rampa de color
\\n
\\n
\\n Inicial:\\n \\n
\\n
\\n Final:\\n \\n
\\n
\\n\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n\\n
\\n Atributo:\\n \\n
\\n
\\n\\n
\\n\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n
\\n Atributo:\\n \\n
\\n
\\n
\\n
\\n Gradiente:\\n
\\n {{#each gradient}}\\n
\\n \\n \\n
\\n {{/each}}\\n
\\n
\\n
\\n \\n \\n
\\n
\\n\\n
\\n
\\n Difuminado:\\n \\n
\\n\\n
\\n Radio:\\n \\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Eje X:\\n \\n
\\n\\n
\\n Eje Y:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n\\n
\\n Radio de donut:\\n \\n
\\n
\\n\\n
\\n
\\n Color 3D:\\n \\n
\\n
\\n\\n
\\n
\\n
Atributos
\\n
\\n\\n
\\n Atributo:\\n \\n
\\n\\n
\\n \\n \\n
\\n
\\n
\\n
\\n\\n
\\n
\\n\\n
\\n
\\n\";","module.exports = \"
\\n {{#each buttonsParams}}\\n \\n \\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n {{#each buttonsParams}}\\n \\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n\\n
\\n
\\n Color:\\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n\\n
\\n
\\n Ancho:\\n \\n
\\n
\\n \\n
Opciones de patrón
\\n\\n
\\n
\\n Patrón\\n \\n
\\n
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n\\n
\\n
\\n Rotación:\\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n
\\n
\\n Offset:\\n \\n
\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n
\\n Linedash:\\n \\n  \\n \\n
\\n\\n
\\n Linedash Offset:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Line Cap\\n \\n
\\n\\n
\\n Line Join\\n \\n
\\n\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Color\\n \\n
\\n\\n
\\n Texto:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Fuente:\\n \\n
\\n\\n
\\n Tamaño:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Alineación horizontal:\\n \\n
\\n\\n
\\n Alineación vertical:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Escala:\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n\\n \\n\\n
\\n\\n
\\n Ajustar\\n \\n
\\n\\n
\\n Ancho Mínimo:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Suavizar\\n \\n
\\n\\n
\\n Desbordar:\\n \\n
\\n\\n
\\n\\n \\n
Trazo de etiqueta:
\\n
\\n\\n
\\n Trazo\\n \\n
\\n\\n
\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Dash:\\n \\n  \\n \\n
\\n\\n
\\n Line Dash Offset:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Cap:\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n\\n
\\n\\n\\n \\n
\\n\\n
\\n URL\\n \\n
\\n
\\n Tamaño:\\n \\n  \\n \\n
\\n\\n\\n
\\n\\n
\\n\\n\\n
\\n Snap to pixel\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Anclaje:\\n \\n  \\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n\\n\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n \\n
\\n\\n
\\n bkColor:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Forma:\\n \\n
\\n\\n
\\n Familia:\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n\\n
\\n\\n
\\n\\n
\\n Radio:\\n \\n
\\n\\n
\\n Tamaño icono:\\n \\n
\\n\\n\\n
\\n\\n
\\n\\n
\\n Gradiente\\n \\n
\\n\\n
\\n Color de icono:\\n \\n
\\n
\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n
\\n\";","module.exports = \"
\\n\\n
Variable: {{attribute}}
\\n
\\n\\n
\\n Leyenda:\\n \\n
\\n\\n
\\n Mostrar etiqueta\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n\\n
\\n Relleno:\\n \\n
\\n\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Borde:\\n \\n
\\n\\n
\\n Grosor:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
    \\n {{#each ranges}}\\n
  • {{this.number}}
  • \\n {{/each}}\\n
\\n
\\n\";","module.exports = \"
\\n {{#each attributes}}\\n \\n {{/each}}\\n
\\n\";","export default class StyleManagerControl extends M.impl.Control {\n /**\n * @classdesc\n * Main constructor of the StyleManagerControl.\n *\n * @constructor\n * @extends {M.impl.Control}\n * @api stable\n */\n constructor() {\n super();\n }\n /**\n * This function adds the control to the specified map\n *\n * @public\n * @function\n * @param {M.Map} map to add the plugin\n * @param {HTMLElement} html of the plugin\n * @api stable\n */\n addTo(map, html) {\n // specific code\n\n // super addTo\n super.addTo(map, html);\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n activate() {\n M.dialog.info('Hello World!');\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n deactivate() {\n M.dialog.info('Bye World!');\n }\n}\n","import attributestemplate from 'templates/attributestemplate';\nexport class Binding {\n\n constructor(html, htmlParent, styleType, style, layer) {\n this.htmlParent_ = htmlParent;\n this.htmlTemplate_ = null;\n this.html_ = html;\n this.activated_ = true;\n this.selected_ = false;\n this.disabled_ = false;\n this.layer_ = layer;\n this.activateButton_ = htmlParent.querySelector(`[data-role=\"botonera\"] [data-flap=\"${styleType}\"]`);\n this.selectButton_ = htmlParent.querySelector(`[data-role=\"botonera\"] [data-checkbox=\"${styleType}\"]`);\n this.style_ = style;\n this.styleType_ = styleType;\n this.compilePromise_ = this.initializeView(this.html_, this.htmlParent_);\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n * @return {Promise}\n */\n compileTemplate(htmlName, options) {\n return new Promise((resolve) => {\n const html = M.template.compileSync(htmlName, {\n vars: options\n });\n resolve(html);\n });\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n * @return {Promise}\n */\n getCompilePromise() {\n return this.compilePromise_;\n }\n\n /**\n * This function compile with handlebars a html template.\n *\n * @function\n */\n initializeView(htmlName, htmlParent) {\n let optsTemplate = this.getOptionsTemplate();\n return this.compileTemplate(htmlName, optsTemplate).then((html) => {\n htmlParent.appendChild(html);\n this.htmlTemplate_ = html;\n });\n }\n\n /**\n * @function\n * @protected\n */\n getOptionsTemplate() {}\n\n /**\n * This function add the html template to html parent.\n *\n * @function\n */\n addTemplate(htmlName, htmlParent, options, callback = null) {\n this.compileTemplate(htmlName, options).then((html) => {\n htmlParent.innerHTML = html.innerHTML;\n if (typeof callback === 'function') {\n callback();\n }\n });\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n */\n appendTemplate(htmlName, htmlParent, options, callback = null) {\n this.compileTemplate(htmlName, options).then((html) => {\n htmlParent.appendChild(html);\n if (typeof callback === 'function') {\n callback();\n }\n });\n }\n\n\n /**\n * This function generates the options style from his own html form.\n *\n * @function\n * @api stable\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n styleOpts[\"ranges\"] = {};\n\n // styleOpts section\n this.querySelectorAllForEach('[data-options]', element => {\n let prop = element.dataset[\"options\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n styleOpts[prop] = value;\n });\n\n // styleOpts.options section\n this.querySelectorAllForEach(\"[data-style-options]\", element => {\n let prop = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n styleOpts[\"options\"][prop] = value;\n });\n\n // Array option section (eg: gradient heatmap )\n this.querySelectorAllForEach(\"[data-array-options]\", element => {\n let prop = element.dataset[\"arrayOptions\"];\n let value = element.value;\n \n if (!M.utils.isArray(styleOpts[\"options\"][prop])) {\n styleOpts[\"options\"][prop] = [];\n }\n\n styleOpts[\"options\"][prop].push(value);\n\n });\n\n // Ranges cluster section\n this.querySelectorAllForEach(\"[data-ranges-id]\", element => {\n let id = element.dataset[\"rangesId\"];\n if (styleOpts[\"ranges\"][id] == undefined) {\n styleOpts[\"ranges\"][id] = {};\n }\n let path = element.dataset[\"rangesOptions\"];\n let value = element.value;\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n Binding.createObj(styleOpts[\"ranges\"][id], path, value);\n });\n return styleOpts;\n }\n\n /**\n * This function activate or deactivate the binding class.\n * @function\n * @param {boolean}\n */\n setActivated(flag) {\n this.activated_ = flag;\n if (flag === true) {\n this.activateButton_.classList.replace('check-selected', 'check-active');\n this.unhide();\n }\n\n if (flag === false) {\n this.activateButton_.classList.replace('check-active', 'check-selected');\n this.hide();\n }\n }\n\n /**\n * This function select or unselect the binding class.\n * @function\n * @param {boolean}\n */\n setSelected(flag) {\n this.selected_ = flag;\n this.selectButton_.checked = flag;\n }\n\n /**\n * This function disable or enable the binding class.\n * @function\n * @param {boolean}\n */\n setDisabled(flag) {\n this.disabled_ = flag;\n this.selectButton_.disabled = flag;\n if (flag === true) {\n this.activateButton_.classList.add('check-inactive');\n this.setSelected(!flag);\n this.setActivated(!flag);\n this.hide();\n }\n\n if (flag === false) {\n this.activateButton_.classList.remove('check-inactive');\n }\n }\n\n /**\n * This function hides the html view.\n * @function\n * @return {Binding}\n */\n hide() {\n this.getTemplate().classList.add('m-hidden');\n return this;\n }\n\n /**\n * This function shows the html view.\n * @function\n * @return {Binding}\n */\n unhide() {\n this.getTemplate().classList.remove('m-hidden');\n return this;\n }\n\n /**\n * This function gets the html template of binding class.\n * @function\n * @param {boolean}\n */\n getTemplate() {\n return this.htmlTemplate_;\n }\n\n /**\n * This function gets the html template of binding class.\n * @function\n * @param {boolean}\n */\n getParentTemplate() {\n return this.htmlParent_;\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelector(selector) {\n return this.getTemplate().querySelector(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAll(selector) {\n return this.getTemplate().querySelectorAll(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllForEach(selector, callback, scope = undefined) {\n Array.prototype.forEach.apply(this.querySelectorAll(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllMap(selector, callback, scope = undefined) {\n return Array.prototype.map.apply(this.querySelectorAll(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorParent(selector) {\n return this.getParentTemplate().querySelector(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllParent(selector) {\n return this.getParentTemplate().querySelectorAll(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllForEachParent(selector, callback, scope = undefined) {\n Array.prototype.forEach.apply(this.querySelectorAllParent(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllMapParent(selector, callback, scope = undefined) {\n return Array.prototype.map.apply(this.querySelectorAllParent(selector), [callback, scope]);\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer) {\n this.layer_ = layer;\n return this;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getActivateButton() {\n return this.activateButton_;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getSelectButton() {\n return this.selectButton_;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setIntegerAttributes() {\n let layer = this.layer_;\n if (layer instanceof M.layer.Vector) {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n this.compileTemplate(attributestemplate, {\n attributes: attributeNames\n }).then(html => {\n selectElement.innerHTML = html.innerHTML;\n if (attributeNames.length === 0) {\n this.deactivateBinding();\n } else {\n this.activateBinding();\n }\n });\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n filterAttributesFeature(type) {\n let attributes = this.getAllFeaturesAttributes();\n let attributeNames = Object.keys(attributes);\n switch (type) {\n case \"string\":\n attributeNames = attributeNames.filter(element => isNaN(parseFloat(attributes[element])));\n break;\n case \"number\":\n attributeNames = attributeNames.filter(element => !isNaN(parseFloat(attributes[element])));\n break;\n default:\n }\n return attributeNames;\n }\n\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getFeaturesAttributes() {\n return this.layer_.getFeatures()[0].getAttributes();\n }\n\n /**\n * This function search all attributes of each feature.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getAllFeaturesAttributes() {\n let allFeatures = this.getFeaturesAttributes();\n this.layer_.getFeatures().reverse().forEach(fs => {\n Object.keys(fs.getAttributes()).forEach((k, v) => {\n // Keep a value if the next is null so we can check attribute type later.\n if (v != null && allFeatures[k] == null) allFeatures[k] = v;\n });\n });\n return allFeatures;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n hideAllOptionsSections() {\n this.querySelectorAllForEach(\".styles-row\", element => {\n element.classList.add(\"m-hidden\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n hideOptionSection(option) {\n let optionsSection = this.querySelector(`[data-id=${option}]`);\n optionsSection.classList.add(\"m-hidden\");\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n showOptionSection(option) {\n let optionsSection = this.querySelector(`[data-id=${option}]`);\n optionsSection.classList.remove(\"m-hidden\");\n }\n\n /**\n * This function adds an event listener for all HTMLInputElement and HTMLSelectElement.\n * @function\n * @param {function}\n */\n addInputListener(callback) {\n this.querySelectorAllForEach(\"input\", element => {\n element.addEventListener(\"change\", callback);\n });\n\n this.querySelectorAllForEach(\"select\", element => {\n element.addEventListener(\"change\", callback);\n });\n }\n\n /**\n * This function deactivate all html options of a binding class.\n * @function\n */\n deactivateBinding() {\n this.querySelectorAllForEach(\"input,select:not([data-options='attributeName']),label,span,.subtitle\", element => {\n element.classList.add(\"m-hidden\");\n });\n\n this.querySelector(\"[data-options='attributeName']\").disabled = true;\n let option = document.createElement(\"option\");\n option.value = \"\";\n option.innerText = \"No existen atributos\";\n this.querySelector(\"[data-options='attributeName']\").add(option);\n this.querySelector(\"span\").classList.remove(\"m-hidden\");\n }\n\n /**\n * This function deactivate all html options of a binding class.\n * @function\n */\n activateBinding() {\n this.querySelectorAllForEach(\"input,select:not([data-options='attributeName']),label,span,.subtitle\", element => {\n element.classList.remove(\"m-hidden\");\n });\n\n this.querySelector(\"[data-options='attributeName']\").disabled = false;\n }\n\n /**\n * @function\n */\n destroy() {\n this.htmlParent_.removeChild(this.htmlTemplate_);\n }\n\n /**\n * This function\n * @static\n * @function\n * @param {object}\n * @param {string}\n * @param {number|string|object}\n */\n static createObj(obj, path, value) {\n let keys = M.utils.isArray(path) ? path : path.split('.');\n let keyLength = keys.length;\n let key = keys[0];\n if (keyLength === 1) { // base case\n if (M.utils.isArray(value)) {\n value = [...value];\n } else if (M.utils.isObject(value)) {\n value = Object.assign({}, value);\n }\n obj[key] = value;\n } else if (keyLength > 1) { // recursive case\n if (M.utils.isNullOrEmpty(obj[key])) {\n obj[key] = {};\n }\n Binding.createObj(obj[key], keys.slice(1, keyLength), value);\n }\n }\n}\n","import * as chroma from 'chroma-js';\nimport buttonoptions from 'templates/buttonoptions';\nimport { Binding } from './binding';\nexport class SimpleBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, controller) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.controller_ = controller;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer, refresh = true) {\n this.layer_ = layer;\n if (refresh === true) {\n this.refreshTemplate();\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @param {string}\n * @return {SimpleBinding}\n */\n setGeometry(geometry) {\n if (SimpleBinding.GEOMETRIES.includes(geometry)) {\n this.geometry_ = geometry;\n } else {\n this.geometry_ = 'point';\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * This function refresh the html template.\n * @function\n */\n refreshTemplate() {\n let geometry = this.getGeometry();\n let hiddenGeometries = SimpleBinding.GEOMETRIES.filter(section => section !== geometry);\n\n hiddenGeometries.forEach(geometry => {\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.add('m-hidden'));\n });\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.remove('m-hidden'));\n this.refreshOptionsButtons();\n this.addLabelPathListener();\n }\n\n /**\n * This function refresh the html options buttons template.\n * @function\n */\n refreshOptionsButtons() {\n let options = SimpleBinding.OPTIONS_POINT_SUBMENU;\n\n if (this.getGeometry() !== \"point\") {\n options = SimpleBinding.OPTIONS_SUBMENU;\n }\n\n this.addOptionsButtons(options, () => {\n this.compatibleSectionListener(\"icon\", \"form\");\n this.compatibleSectionListener(\"form\", \"icon\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addOptionsButtons(options, callback = null) {\n let parentHtml = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n this.hideAllOptionsSections();\n this.addTemplate(buttonoptions, parentHtml, {\n buttonsParams: options\n }, () => {\n options.forEach(option => {\n this.toggleCheckOptionSection(option.id);\n this.activateOptionSection(option.id);\n if (typeof callback === \"function\") {\n callback();\n }\n });\n this.activateOptionsStyle();\n this.addEventCheckFromSubmenu();\n });\n }\n\n addEventCheckFromSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option] input\", input => {\n input.addEventListener(\"change\", () => {\n this.controller_.selectPanel(\"stylesimple\");\n });\n });\n }\n\n /**\n * This functions initialize the submenu view of each option of Style simple\n * @function\n */\n activateOptionsStyle() {\n let style = this.style_;\n let iconSelect = this.querySelector(\"#select-icon\");\n iconSelect.replaceWith(iconSelect.cloneNode(true));\n iconSelect = this.querySelector(\"#select-icon\");\n iconSelect.addEventListener('click', this.eventOpenIconSelector);\n let iconDialog = document.querySelector(\".style-grid-container\");\n iconDialog.addEventListener('click', this.eventSelectIcon);\n let familySelect = this.querySelector(\"[data-style-options='form.class']\");\n familySelect.addEventListener('change', this.changeFamilyFont);\n let famSelector = this.querySelector(\".style-col-2 > select[data-style-options = 'form.class']\");\n let fmSIcon = famSelector.dataset.icon;\n if (fmSIcon !== '') {\n let fmSIconArray = fmSIcon.split('-');\n let fam = fmSIconArray[0] == 'g' ? 'g-cartografia' : fmSIconArray[0] == 'fa' ? 'fa' : '';\n famSelector.querySelector(`option[value=\"${fam}\"]`).selected = true;\n famSelector.dispatchEvent(new Event('change'));\n document.querySelector('#select-icon').classList = (fam == 'fa' ? 'fa ' : '') + fmSIcon;\n document.querySelector(`.style-grid-item${fam == 'fa' ? '.fa' : ''}.${fmSIcon}`).classList.add('selected');\n }\n\n if (style != null) {\n let options = style.getOptions();\n if (options[\"fill\"] != null) {\n let valuesFill = Object.values(options.fill).filter(value => value != undefined);\n if (valuesFill.length > 0) {\n this.checkOptionSection(\"fill\");\n }\n }\n\n if (options[\"stroke\"] != undefined) {\n this.checkOptionSection(\"stroke\");\n }\n\n if (options[\"label\"] != undefined) {\n this.checkOptionSection(\"label\");\n }\n\n if (options[\"icon\"] != undefined) {\n if (options[\"icon\"].hasOwnProperty(\"src\")) {\n this.checkOptionSection(\"icon\");\n this.disableOption(\"form\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"form\")) {\n\n this.checkOptionSection(\"form\");\n this.disableOption(\"icon\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"class\")) {\n familySelect.value = options[\"icon\"][\"class\"];\n }\n }\n\n }\n\n }\n\n /**\n * @function\n */\n eventOpenIconSelector(ev) {\n let iconDialog = document.querySelector(\".style-grid-container\");\n if (iconDialog.classList.toString() === 'style-grid-container active') { iconDialog.classList.remove('active'); }\n else { iconDialog.classList.add('active'); }\n }\n\n /**\n * @function\n */\n eventSelectIcon(ev) {\n if (!ev.target.classList.contains('selected') && ev.target.classList.contains('style-grid-item')) {\n let selected = document.querySelector('.style-grid-item.selected');\n if (selected) { selected.classList.remove('selected'); }\n ev.target.classList.add(\"selected\");\n let iconSelected = ev.target.classList.toString().replace('selected', '').replace('style-grid-item', '').trim();\n document.querySelector(\"[data-style-options='form.class']\").dataset.icon = iconSelected.replace('fa', '').trim();\n document.querySelector('#select-icon').classList = iconSelected;\n }\n }\n\n /**\n * @function\n */\n changeFamilyFont(ev) {\n if (ev.target.value === '') {\n document.querySelector('#select-icon').style.display = 'none';\n document.querySelector(\".style-grid-container\").classList.remove('active');\n } else {\n document.querySelector('#select-icon').style.display = 'inherit';\n }\n let childs = document.querySelectorAll(`.style-grid-item`);\n childs.forEach(elem => {\n elem.style.display = \"none\";\n });\n let childsSelected = document.querySelectorAll(`.style-grid-item[class*='${ev.target.value}']`);\n childsSelected.forEach(elem => {\n elem.style.display = \"inherit\";\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addLabelPathListener() {\n let pathCheck = this.querySelector(\"[data-style-options='label.path']\");\n pathCheck.addEventListener(\"change\", () => {\n this.togglePathSection(!pathCheck.checked);\n });\n }\n\n /**\n * @function\n */\n togglePathSection(flag) {\n this.querySelectorAllForEach(\"[data-textpath]\", element => {\n element.disabled = flag === true ? flag : false;\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n toggleCheckOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n clickable.addEventListener(\"change\", (event) => {\n this.toggleCheckOptSectionListener(option, event);\n });\n }\n\n /**\n * @function\n */\n toggleCheckOptSectionListener(option, event) {\n if (event.target.checked === true) {\n this.activateOption(option);\n }\n }\n\n /**\n * @function\n */\n checkOptionSection(option) {\n let inputSection = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n this.activateOption(option);\n inputSection.checked = true;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] [data-label=\"${option}\"]`);\n clickable.addEventListener(\"click\", () => {\n this.activateOption(option);\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding} \n */\n activateOption(option) {\n let label = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n let checkbox = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n if (checkbox != null && checkbox.disabled === false) {\n this.activateLabel(label);\n this.displaySectionOption(option);\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateLabel(label) {\n this.querySelectorAllForEachParent(`[data-selector]`, (element) => {\n element.classList.remove(\"check-active\");\n element.classList.add('check-selected');\n });\n label.classList.add(\"check-active\");\n label.classList.remove('check-selected');\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n displaySectionOption(option) {\n this.hideAllOptionsSections();\n this.showOptionSection(option);\n }\n\n /**\n * This function generates the style simple options.\n * @return {object}\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n\n this.querySelectorAllForEach('[data-style-options]', element => {\n let path = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (path == \"form.class\" && value !== '') {\n value = this.querySelector(\"[data-style-options='form.class']\").dataset.icon;\n }\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n if (isNaN(value)) {\n value = 0;\n }\n }\n\n let target = element.dataset[\"target\"];\n if (target !== undefined) {\n let value2 = parseFloat(this.querySelector(`[data-id=\"${target}\"]`).value);\n if (isNaN(value2)) {\n value2 = 0;\n }\n value = [value, value2];\n }\n\n Binding.createObj(styleOpts[\"options\"], path, value);\n\n });\n\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n let opt = element.dataset[\"apply\"];\n if (element.checked === false) {\n Binding.createObj(styleOpts[\"options\"], opt, undefined);\n }\n });\n\n\n let fontSize = this.querySelector(\"[data-font-size]\").value || 12;\n let fontFamily = this.querySelector(\"[data-font-family]\").value;\n let font = `${fontSize}px ${fontFamily}`;\n\n let icon = document.querySelector(\"[data-apply='icon']\");\n let iconOpts = icon !== null && icon.checked === true ?\n styleOpts[\"options\"].src : styleOpts[\"options\"].form;\n \n let labelOpt;\n if (styleOpts[\"options\"][\"label\"] != null && styleOpts[\"options\"][\"label\"][\"text\"] != null) {\n labelOpt = styleOpts[\"options\"][\"label\"];\n }\n\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: labelOpt,\n icon: iconOpts,\n radius: styleOpts[\"options\"].radius\n };\n\n if (this.getGeometry() === \"line\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n\n delete styleOpts[\"options\"][\"fill\"][\"pattern\"];\n if (Object.keys(styleOpts[\"options\"][\"fill\"]).length === 0) {\n delete styleOpts[\"options\"][\"fill\"];\n }\n }\n\n if (this.getGeometry() === \"polygon\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n }\n\n if (styleOpts[\"options\"][\"label\"] != undefined) {\n styleOpts[\"options\"][\"label\"][\"font\"] = font;\n }\n\n return this.processOptions(styleOpts);\n }\n\n /**\n * This function process de style generate options\n * @function\n */\n processOptions(styleOpts) {\n let styleOptsClone = M.utils.extends({}, styleOpts);\n let checkedFill = this.isChecked(\"fill\");\n let checkedStroke = this.isChecked(\"stroke\");\n let checkedLabel = this.isChecked(\"label\");\n let checkedIcon = this.isChecked(\"icon\");\n let checkedForm = this.isChecked(\"form\");\n styleOptsClone[\"options\"][\"fill\"] = checkedFill === true ? styleOptsClone[\"options\"][\"fill\"] : undefined;\n styleOptsClone[\"options\"][\"stroke\"] = checkedStroke === true ? styleOptsClone[\"options\"][\"stroke\"] : undefined;\n styleOptsClone[\"options\"][\"label\"] = checkedLabel === true ? styleOptsClone[\"options\"][\"label\"] : undefined;\n styleOptsClone[\"options\"][\"icon\"] = checkedIcon === true || checkedForm === true ? styleOptsClone[\"options\"][\"icon\"] : undefined;\n return styleOptsClone;\n }\n\n /**\n * @function\n */\n isChecked(option) {\n let checked = false;\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply='${option}'`);\n if (input != null) {\n checked = input.checked;\n }\n return checked;\n }\n\n /**\n * This function generates the style simple.\n * @return {M.style.Simple}\n */\n generateStyle() {\n let undefineStyle = true;\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n if (element.checked === true) {\n undefineStyle = false;\n }\n });\n\n let style;\n let geometry = this.getGeometry();\n let styleOptions = this.generateOptions().options;\n\n\n switch (geometry) {\n case \"point\":\n style = new M.style.Point(styleOptions);\n break;\n case \"line\":\n style = new M.style.Line(styleOptions);\n break;\n case \"polygon\":\n style = new M.style.Polygon(styleOptions);\n break;\n\n default:\n M.dialog.error(\"Geometría no soportada\", \"Error\");\n\n }\n\n return style;\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let input = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]`);\n if (input != null) {\n input.addEventListener(\"change\", () => {\n if (input.checked === true) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n input.disabled = true;\n input.checked = false;\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n clickable.classList.remove(\"check-inactive\");\n input.disabled = false;\n }\n\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = SimpleBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n if (this.style_.get(\"fill.pattern\") != null) {\n options[\"patternflag\"] = true;\n }\n options = M.utils.extends({}, this.style_.getOptions());\n options = M.utils.extends(options, SimpleBinding.DEFAULT_OPTIONS_STYLE);\n }\n\n // transform color options to hex color for value inputs color\n options[\"fill\"][\"color\"] = chroma(options[\"fill\"][\"color\"]).hex();\n options[\"stroke\"][\"color\"] = chroma(options[\"stroke\"][\"color\"]).hex();\n options[\"label\"][\"fill\"][\"color\"] = chroma(options[\"label\"][\"fill\"][\"color\"]).hex();\n options[\"label\"][\"stroke\"][\"color\"] = options[\"label\"][\"stroke\"][\"color\"] === \"no-color\" ? \"no-color\" : chroma(options[\"label\"][\"stroke\"][\"color\"]).hex();\n options[\"fill\"][\"pattern\"][\"color\"] = chroma(options[\"fill\"][\"pattern\"][\"color\"]).hex();\n options[\"icon\"][\"fill\"] = chroma(options[\"icon\"][\"fill\"]).hex();\n options[\"icon\"][\"color\"] = chroma(options[\"icon\"][\"color\"]).hex();\n // --\n\n let patternValids = Object.keys(M.style.pattern).filter(name => name != \"ICON\" && name != \"IMAGE\");\n let alignValues = Object.values(M.style.align);\n let baselineValues = Object.values(M.style.baseline);\n let formValues = Object.values(M.style.form).filter(name => name != null);\n\n //transform array options to data template option\n options[\"patternlist\"] = SimpleBinding.arrayDataToTemplate(options[\"fill\"][\"pattern\"][\"name\"], patternValids, patternValids);\n options[\"linecapstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"linecaplabelstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinlabelstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"alignlist\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"align\"], alignValues, [\"Centro\", \"Justificado\", \"Izquierda\", \"Derecha\"]);\n options[\"baselinelist\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"baseline\"], baselineValues, [\"Alfabetico\", \"Abajo\", \"Colgando\", \"Ideografico\", \"Arriba\", \"Centro\",]);\n options[\"formlist\"] = SimpleBinding.arrayDataToTemplate(options[\"icon\"][\"form\"], formValues, formValues);\n if (this.layer_ != null) {\n let labelTextValues = Object.keys(this.getFeaturesAttributes());\n let labelTextSelected = options[\"label\"] != null ? options[\"label\"][\"text\"] : \"\";\n options[\"featuresAttr\"] = SimpleBinding.arrayDataToTemplate(labelTextSelected, labelTextValues.map(name => `{{${name}}}`), labelTextValues);\n }\n\n\n return options;\n }\n\n set imgId(id) {\n this.imgId_ = id;\n }\n\n get imgId() {\n return this.imgId_;\n }\n\n toggleDisplaySubmenu(flag) {\n let buttonOptions = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n let funct = flag === true ? \"add\" : \"remove\";\n buttonOptions.classList[funct](\"m-hidden\");\n }\n\n /**\n * @function\n * @param {function}\n */\n refreshLegend(element, flag = false) {\n let id = this.imgId_;\n let style = this.generateStyle();\n if (flag === true) {\n style = this.style_;\n }\n if (style != null) {\n style = style.clone();\n if (style instanceof M.style.Point) {\n style.set('radius', SimpleBinding.RADIUS_OPTION);\n if (style.get(\"icon.radius\") != null) {\n style.set(\"icon.radius\", SimpleBinding.ICON_RADIUS_OPTION);\n }\n }\n let img = this.htmlParent_.querySelector(`img[id='img-${id}']`);\n style.updateCanvas();\n let dataURL = style.toImage();\n if (img != null) {\n img.src = dataURL;\n }\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get RADIUS_OPTION() {\n return 10;\n }\n\n\n /**\n * TODO\n * @const\n */\n static get ICON_RADIUS_OPTION() {\n return 10;\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Fuente\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * Array of allowed geometries.\n * @const {Array}\n */\n static get GEOMETRIES() {\n return ['point', 'line', 'polygon'];\n }\n\n /**\n * @function\n */\n static arrayDataToTemplate(selected, arrayId, arrayName) {\n return arrayId.map((id, index) => {\n return {\n id: id,\n name: arrayName[index],\n selected: selected\n };\n });\n };\n\n /**\n * @const\n */\n static get DEFAULT_OPTIONS_STYLE() {\n return {\n radius: 10,\n fill: {\n color: \"#e5008a\",\n opacity: 1,\n width: 2,\n pattern: {\n color: 'red',\n name: \"HATCH\",\n size: 1,\n spacing: 2,\n scale: 3,\n offset: 5,\n rotation: 0\n }\n },\n stroke: {\n color: \"#000000\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n label: {\n fill: {\n color: '#ff0000',\n },\n stroke: {\n color: \"no-color\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n scale: 2,\n text: \"Texto de prueba\",\n font: \"14px serif\",\n align: \"center\",\n baseline: \"top\",\n rotate: false,\n rotation: 0,\n offset: [0, 0]\n },\n icon: {\n src: \"\",\n form: \"\",\n size: [40, 40],\n anchor: [0, 0],\n scale: 1,\n offset: [0, 0],\n rotate: false,\n rotation: 0,\n opacity: 1,\n form: \"CIRCLE\",\n class: \"g-cartografia-info\",\n fill: \"#ffffff\",\n color: \"#e07e18\"\n }\n };\n }\n}\n","import {\n Binding\n}\nfrom './binding';\n\nexport class ProportionalBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n // this.setIntegerAttributes();\n return this;\n }\n\n /**\n * This function generates the cluster style from GUI Options.\n *\n * @function\n * @returns {M.style.Cluster}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Proportional(opts.attributeName, opts.minRadius, opts.maxRadius);\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ProportionalBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options = {\n attributeName: this.style_.getAttributeName(),\n minRadius: this.style_.getMinRadius(),\n maxRadius: this.style_.getMaxRadius()\n };\n this.setSelected(true);\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attributeName);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n}\n\nProportionalBinding.DEFAULT_OPTIONS_STYLE = {\n attributeName: \"\",\n minRadius: 12,\n maxRadius: 25,\n};\n","import * as chroma from 'chroma-js';\nimport {\n Binding\n}\nfrom './binding';\n\nexport class ClusterBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.compilePromise_.then(() => {\n this.addEventRangeListener();\n this.addPaginationListener();\n });\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n return this;\n }\n\n /**\n * This function generates the options style from his own html form.\n *\n * @function\n * @api stable\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n styleOpts[\"ranges\"] = {};\n\n // styleOpts.options section\n this.querySelectorAllForEach(\"[data-style-options]\", element => {\n let prop = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n if (prop === \"label.color\") {\n styleOpts[\"options\"][\"label\"] = {};\n styleOpts[\"options\"][\"label\"][\"color\"] = value;\n\n } else {\n styleOpts[\"options\"][prop] = value;\n }\n\n });\n\n // Ranges cluster section\n this.querySelectorAllForEach(\"[data-ranges-id][data-apply-range]\", element => {\n let id = element.dataset[\"rangesId\"];\n if (styleOpts[\"ranges\"][id] == undefined) {\n styleOpts[\"ranges\"][id] = {};\n }\n let path = element.dataset[\"rangesOptions\"];\n let value = element.value;\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n Binding.createObj(styleOpts[\"ranges\"][id], path, value);\n });\n\n styleOpts[\"ranges\"] = Object.values(styleOpts[\"ranges\"]).filter(option => !isNaN(option[\"minRange\"]) && !isNaN(option[\"maxRange\"]));\n return styleOpts;\n }\n\n /**\n * This function generates the cluster style from GUI Options.\n *\n * @function\n * @returns {M.style.Cluster}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let optsRanges = [...opts.ranges];\n let ranges = optsRanges.map(obj => {\n return {\n min: obj[\"minRange\"],\n max: obj[\"maxRange\"],\n style: new M.style.Point(obj[\"style\"])\n };\n });\n opts.options[\"ranges\"] = ranges;\n return new M.style.Cluster(opts.options, {\n distanceSelectFeatures: opts.options.distanceSelectFeatures\n });\n }\n\n /**\n * This function sets the number of cluster ranges.\n *\n * @function\n */\n setRanges() {\n let rangesInput = this.querySelector(\"[data-number-ranges]\");\n let numRanges = parseInt(rangesInput.value);\n if (numRanges > 0 && numRanges < ClusterBinding.NUMBER_RANGES) {\n\n for (let i = 1; i < numRanges + 1; i++) {\n let pagerElement = this.querySelector(`[data-page-selector=\"${i}\"]`);\n pagerElement.classList.remove(\"m-hidden\");\n this.querySelectorAllForEach(`[data-ranges-id=\"${i}\"]`, element => {\n element.setAttribute(\"data-apply-range\", \"\");\n });\n }\n\n for (let i = numRanges + 1; i < ClusterBinding.NUMBER_RANGES; i++) {\n let pagerElement = this.querySelector(`[data-page-selector=\"${i}\"]`);\n pagerElement.classList.add(\"m-hidden\");\n this.querySelectorAllForEach(`[data-ranges-id=\"${i}\"]`, element => {\n element.removeAttribute(\"data-apply-range\");\n });\n }\n\n let pagerElement = this.querySelector(`[data-page-selector=\"${numRanges}\"]`);\n this.paginationListener(pagerElement)();\n\n }\n }\n\n /**\n * This function activate the page selector passed by parameter.\n *\n * @function\n * @param {HTMLElement}\n */\n paginationListener(element) {\n return () => {\n let oldElement = this.querySelector(\"[data-page-active]\");\n if (oldElement != null) {\n oldElement.removeAttribute(\"data-page-active\");\n oldElement.classList.remove('m-page-active');\n let oldId = oldElement.dataset[\"pageSelector\"];\n let oldRange = this.querySelector(`[data-page='${oldId}']`);\n if (oldRange != null) {\n oldRange.classList.add('m-hidden');\n }\n }\n\n if (element != null) {\n element.classList.add('m-page-active');\n element.dataset[\"pageActive\"] = \"\";\n let id = element.dataset[\"pageSelector\"];\n let newRange = this.querySelector(`[data-page='${id}']`);\n newRange.classList.remove('m-hidden');\n }\n };\n }\n\n /**\n * TODO\n */\n addEventRangeListener() {\n let rangesInput = this.querySelector(\"[data-number-ranges]\");\n rangesInput.addEventListener('input', this.setRanges.bind(this));\n }\n\n /**\n * TODO\n */\n addPaginationListener() {\n this.querySelectorAllForEach(\"[data-page-selector]\", element => {\n element.addEventListener('click', this.paginationListener(element).bind(this));\n });\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = Object.assign({}, ClusterBinding.DEFAULT_OPTIONS_STYLE);\n if (this.style_ != null) {\n options = Object.assign({}, this.style_.getOptions());\n let ranges = options[\"ranges\"].filter(range => !isNaN(range[\"min\"])).map(rangeOpt => {\n let obj = {};\n let style = rangeOpt[\"style\"];\n obj[\"min\"] = rangeOpt[\"min\"];\n obj[\"max\"] = rangeOpt[\"max\"];\n obj[\"fill\"] = style.get(\"fill.color\");\n obj[\"stroke\"] = style.get(\"stroke.color\");\n obj[\"width\"] = style.get(\"stroke.width\");\n obj[\"opacity\"] = style.get(\"fill.opacity\") == null ? 1 : style.get(\"fill.opacity\");\n obj[\"radius\"] = style.get(\"radius\");\n return obj;\n });\n options[\"ranges\"] = ranges;\n }\n\n //generator function\n const range = (n, m, lastRange) => {\n const ranges = [];\n let max = lastRange;\n for (let i = n; i < m; i++) {\n let min = max + 1;\n max = min + 200;\n const obj = {\n id: i,\n min: min,\n max: max,\n fill: chroma.random().hex(),\n stroke: chroma.random().hex()\n };\n ranges.push(obj);\n }\n return ranges;\n };\n\n // generates\n let lastRange = options[\"ranges\"].slice(-1)[0][\"max\"];\n options[\"pages\"] = [];\n const ranges = range(options[\"ranges\"].length + 1, ClusterBinding.NUMBER_RANGES, lastRange);\n ranges.forEach((element, index) => {\n options[\"pages\"].push(element);\n });\n return options;\n }\n}\n\n/**\n * Maximum number of cluster ranges allowed.\n *\n * @const\n */\nClusterBinding.NUMBER_RANGES = 13;\n\n/**\n *\n * @const\n */\nClusterBinding.DEFAULT_OPTIONS_STYLE = {\n hoverInteraction: true,\n displayAmount: true,\n selectInteraction: true,\n animated: true,\n distance: 30,\n label: {\n color: \"#4dfeef\"\n },\n maxFeaturesToSelect: 20,\n distanceSelectFeatures: 15,\n ranges: [{\n min: 2,\n max: 30,\n fill: \"#ff00ff\",\n stroke: \"#00fef0\",\n width: 2,\n opacity: 1\n }]\n};\n","import {\n Binding\n}\nfrom './binding';\n\nexport class HeatmapBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.style_ = null;\n this.compilePromise_.then(() => {\n this.removeGradientListener();\n this.addGradientListener();\n });\n this.numberAddedColors_ = 6;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer) {\n this.layer_ = layer;\n this.style_ = null;\n // this.setIntegerAttributes();\n return this;\n\n }\n\n /**\n * This function adds the event listener to remove gradient color option.\n * @function\n */\n removeGradientListener() {\n this.querySelectorAllForEach('.m-removable-input-color .m-close', element => {\n element.addEventListener('click', () => {\n let rootElement = element.parentElement.parentElement;\n rootElement.removeChild(element.parentElement);\n this.numberAddedColors_--;\n });\n });\n }\n\n /**\n * This function adds the event listener to add gradient color option.\n * @function\n */\n addGradientListener() {\n let parent = this.querySelector(\"[data-parent='gradient']\");\n this.querySelector(\"[data-add]\").addEventListener('click', () => {\n this.compileTemplate(\"gradientheatmap.html\", {}).then((html) => {\n if (this.numberAddedColors_ < HeatmapBinding.MAX_NUMBER_COLORS) {\n parent.appendChild(html);\n this.setRandomColor(html);\n html.querySelector('.m-close').addEventListener('click', () => {\n let rootElement = html.parentElement;\n rootElement.removeChild(html);\n this.numberAddedColors_--;\n });\n this.numberAddedColors_++;\n }\n else {\n M.dialog.info(\"Ha llegado al número máximo de colores permitidos\", \"Información\");\n }\n });\n });\n }\n\n /**\n * @function\n */\n setRandomColor(html) {\n let inputColor = html.querySelector(\"input\");\n let randomColor = chroma.random().hex();\n inputColor.value = randomColor;\n }\n\n /**\n * This function generates the heatmap style.\n * @function\n * @returns {M.style.Heatmap}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Heatmap(opts.attributeName, opts.options);\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = HeatmapBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options[\"attribute\"] = this.style_.getAttributeName();\n options[\"radius\"] = this.style_.getRadius();\n options[\"blur\"] = this.style_.getBlurSize();\n options[\"gradient\"] = this.style_.getGradient();\n\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attribute);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n}\n\n/**\n * @const\n */\nHeatmapBinding.DEFAULT_OPTIONS_STYLE = {\n attribute: \"\",\n gradient: [\"#0000ff\", \"#00ffff\", \"#00ff00\", \"#ffff00\", \"#ffb619\", \"#ff0000\"],\n blur: 12,\n radius: 22\n};\n\n/**\n * @const\n */\nHeatmapBinding.MAX_NUMBER_COLORS = 30;\n","import {\n Binding\n}\nfrom './binding';\n\nexport class ChoroplethBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n }\n\n\n setLayer(layer) {\n this.layer_ = layer;\n // this.setIntegerAttributes();\n return this;\n }\n\n setRanges() {\n let rangesButton = this.querySelector(\"[data-number-ranges]\");\n let number = parseInt(rangesButton.value);\n let ranges = [];\n\n for (var i = 1; i <= number; i++) {\n ranges.push({\n number: i\n });\n }\n let parent = this.querySelector(\"[data-parent]\");\n this.addTemplate('choroplethstyles.html', parent, {\n ranges: ranges\n });\n }\n\n\n addEventRangeListener() {\n let rangesButton = this.querySelector(\"[data-number-ranges]\");\n rangesButton.addEventListener('input', this.setRanges.bind(this));\n }\n\n generateStyle() {\n let opts = this.generateOptions();\n let ranges = opts.ranges;\n let colors = opts.options.colors;\n let quantification = opts.quantification === \"JENKS\" ? M.style.quantification.JENKS : M.style.quantification.QUANTILE;\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Choropleth(opts.attributeName, colors, quantification(ranges));\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ChoroplethBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n let startColor = this.style_.getChoroplethStyles()[0].get(\"fill.color\");\n let endColor = this.style_.getChoroplethStyles().slice(-1)[0].get(\"fill.color\");\n startColor = startColor || this.style_.getChoroplethStyles()[0].get(\"stroke.color\");\n endColor = endColor || this.style_.getChoroplethStyles().slice(-1)[0].get(\"stroke.color\");\n\n options = {\n attribute: this.style_.getAttributeName(),\n ranges: this.style_.getChoroplethStyles().length,\n quantification: this.style_.getQuantification().name,\n startColor: startColor,\n endColor: endColor\n };\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attribute);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n\n}\n\nChoroplethBinding.DEFAULT_OPTIONS_STYLE = {\n attribute: \"\",\n quantification: \"JENKS\",\n ranges: 4,\n startColor: \"#F8FF25\",\n endColor: \"#4400FD\"\n};\n","import * as chroma from 'chroma-js';\nimport {\n Binding\n}\n from './binding';\n\nexport class SimpleCategoryBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, binding) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.fill_ = false;\n this.stroke_ = false;\n this.label_ = false;\n this.form_ = false;\n this.icon_ = false;\n if (styleParams != null) {\n this.fill_ = styleParams.getOptions().fill != undefined;\n this.stroke_ = styleParams.getOptions().stroke != undefined;\n this.label_ = styleParams.getOptions().label != undefined;\n this.icon_ = styleParams.get(\"icon.src\") != undefined;\n this.form_ = styleParams.get(\"icon.form\") != undefined;\n }\n\n this.binding_ = binding;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer, refresh = true) {\n this.layer_ = layer;\n if (refresh === true) {\n this.refreshTemplate();\n }\n return this;\n }\n\n getOptions() {\n return {\n fill: this.fill_,\n stroke: this.stroke_,\n label: this.label_,\n form: this.form_,\n icon: this.icon_\n };\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @param {string}\n * @return {SimpleCategoryBinding}\n */\n setGeometry(geometry) {\n if (SimpleCategoryBinding.GEOMETRIES.includes(geometry)) {\n this.geometry_ = geometry;\n } else {\n this.geometry_ = 'point';\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * This function refresh the html template.\n * @function\n */\n refreshTemplate() {\n let geometry = this.getGeometry();\n let hiddenGeometries = SimpleCategoryBinding.GEOMETRIES.filter(section => section !== geometry);\n\n hiddenGeometries.forEach(geometry => {\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.add('m-hidden'));\n });\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.remove('m-hidden'));\n this.addLabelPathListener();\n }\n\n /**\n * This functions initialize the submenu view of each option of Style simple\n * @function\n */\n activateOptionsStyle() {\n let style = this.style_;\n if (style != null) {\n let options = style.getOptions();\n if (options[\"fill\"] != null) {\n let valuesFill = Object.values(options.fill).filter(value => value != undefined);\n if (valuesFill.length > 0) {\n this.checkOptionSection(\"fill\");\n }\n }\n\n if (options[\"stroke\"] != undefined) {\n this.checkOptionSection(\"stroke\");\n }\n\n if (options[\"label\"] != undefined) {\n this.checkOptionSection(\"label\");\n }\n\n if (options[\"icon\"] != undefined) {\n if (options[\"icon\"].hasOwnProperty(\"src\")) {\n this.checkOptionSection(\"icon\");\n this.disableOption(\"form\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"form\")) {\n this.checkOptionSection(\"form\");\n this.disableOption(\"icon\");\n }\n }\n\n }\n }\n\n showCompatibleSections() {\n this.binding_.enableOption(\"form\");\n this.binding_.enableOption(\"icon\");\n if (this.icon_ === true) {\n this.binding_.disableOption(\"form\");\n }\n\n if (this.form_ === true) {\n this.binding_.disableOption(\"icon\");\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addLabelPathListener() {\n let pathCheck = this.querySelector(\"[data-style-options='label.path']\");\n pathCheck.addEventListener(\"change\", () => {\n this.togglePathSection(!pathCheck.checked);\n });\n }\n\n /**\n * @function\n */\n togglePathSection(flag) {\n this.querySelectorAllForEach(\"[data-textpath]\", element => {\n element.disabled = flag === true ? flag : false;\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n toggleCheckOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n clickable.addEventListener(\"change\", (event) => {\n this.toggleCheckOptSectionListener(option, event);\n });\n }\n\n /**\n * @function\n */\n toggleCheckOptSectionListener(option, event) {\n if (event.target.checked === true) {\n this.activateOption(option);\n }\n }\n\n /**\n * @function\n */\n checkOptionSection(option) {\n let inputSection = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n this.activateOption(option);\n inputSection.checked = true;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] [data-label=\"${option}\"]`);\n clickable.addEventListener(\"click\", () => {\n this.activateOption(option);\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOption(option) {\n let label = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n let checkbox = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n if (checkbox != null && checkbox.disabled === false) {\n this.activateLabel(label);\n this.displaySectionOption(option);\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateLabel(label) {\n this.querySelectorAllForEachParent(`[data-selector]`, (element) => {\n element.classList.remove(\"check-active\");\n element.classList.add('check-selected');\n });\n label.classList.add(\"check-active\");\n label.classList.remove('check-selected');\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n displaySectionOption(option) {\n this.hideAllOptionsSections();\n this.showOptionSection(option);\n }\n\n /**\n * This function generates the style simple options.\n * @return {object}\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n\n this.querySelectorAllForEach('[data-style-options]', element => {\n let path = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n if (isNaN(value)) {\n value = 0;\n }\n }\n\n let target = element.dataset[\"target\"];\n if (target !== undefined) {\n let value2 = parseFloat(this.querySelector(`[data-id=\"${target}\"]`).value);\n if (isNaN(value2)) {\n value2 = 0;\n }\n value = [value, value2];\n }\n Binding.createObj(styleOpts[\"options\"], path, value);\n });\n\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n let opt = element.dataset[\"apply\"];\n if (element.checked === false) {\n Binding.createObj(styleOpts[\"options\"], opt, undefined);\n }\n });\n\n\n let fontSize = this.querySelector(\"[data-font-size]\").value || 12;\n let fontFamily = this.querySelector(\"[data-font-family]\").value;\n\n let font = `${fontSize}px ${fontFamily}`;\n\n let iconOpts = this.icon === true ? styleOpts[\"options\"].src : styleOpts[\"options\"].form;\n\n let labelOpt;\n if (styleOpts[\"options\"][\"label\"] != null && styleOpts[\"options\"][\"label\"][\"text\"] != null) {\n labelOpt = styleOpts[\"options\"][\"label\"];\n }\n\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: labelOpt,\n icon: iconOpts,\n radius: styleOpts[\"options\"].radius\n };\n\n if (this.getGeometry() === \"line\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n\n delete styleOpts[\"options\"][\"fill\"][\"pattern\"];\n if (Object.keys(styleOpts[\"options\"][\"fill\"]).length === 0) {\n delete styleOpts[\"options\"][\"fill\"];\n }\n }\n\n if (this.getGeometry() === \"polygon\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n }\n\n if (styleOpts[\"options\"][\"label\"] != undefined) {\n styleOpts[\"options\"][\"label\"][\"font\"] = font;\n }\n\n return this.processOptions(styleOpts);\n }\n\n /**\n * This function process de style generate options\n * @function\n */\n processOptions(styleOpts) {\n let styleOptsClone = M.utils.extends({}, styleOpts);\n let checkedFill = this.isChecked(\"fill\");\n let checkedStroke = this.isChecked(\"stroke\");\n let checkedLabel = this.isChecked(\"label\");\n let checkedIcon = this.isChecked(\"icon\");\n let checkedForm = this.isChecked(\"form\");\n styleOptsClone[\"options\"][\"fill\"] = checkedFill === true ? styleOptsClone[\"options\"][\"fill\"] : undefined;\n styleOptsClone[\"options\"][\"stroke\"] = checkedStroke === true ? styleOptsClone[\"options\"][\"stroke\"] : undefined;\n styleOptsClone[\"options\"][\"label\"] = checkedLabel === true ? styleOptsClone[\"options\"][\"label\"] : undefined;\n styleOptsClone[\"options\"][\"icon\"] = checkedIcon === true || checkedForm === true ? styleOptsClone[\"options\"][\"icon\"] : undefined;\n return styleOptsClone;\n }\n\n /**\n * @function\n */\n isChecked(option) {\n let checked = false;\n let input = this.getParentTemplate().parentElement.querySelector(`[data-buttons-option-category] input[data-apply='${option}'`);\n if (input != null) {\n checked = input.checked;\n }\n return checked;\n }\n\n /**\n * This function generates the style simple.\n * @return {M.style.Simple}\n */\n generateStyle() {\n let undefineStyle = true;\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n if (element.checked === true) {\n undefineStyle = false;\n }\n });\n\n let style;\n let geometry = this.getGeometry();\n let styleOptions = this.generateOptions().options;\n\n\n switch (geometry) {\n case \"point\":\n style = new M.style.Point(styleOptions);\n break;\n case \"line\":\n style = new M.style.Line(styleOptions);\n break;\n case \"polygon\":\n style = new M.style.Polygon(styleOptions);\n break;\n\n default:\n M.dialog.error(\"Geometría no soportada\", \"Error\");\n\n }\n\n return style;\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let clickable = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]+label`);\n let input = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]`);\n if (clickable != null) {\n clickable.addEventListener(\"click\", () => {\n if (input.checked === false) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n input.disabled = true;\n input.checked = false;\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n clickable.classList.remove(\"check-inactive\");\n input.disabled = false;\n }\n\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = SimpleCategoryBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n if (this.style_.get(\"fill.pattern\") != null) {\n options[\"patternflag\"] = true;\n }\n options = M.utils.extends({}, this.style_.getOptions());\n options = M.utils.extends(options, SimpleCategoryBinding.DEFAULT_OPTIONS_STYLE);\n }\n\n // transform color options to hex color for value inputs color\n options[\"fill\"][\"color\"] = chroma(options[\"fill\"][\"color\"]).hex();\n options[\"stroke\"][\"color\"] = chroma(options[\"stroke\"][\"color\"]).hex();\n options[\"label\"][\"fill\"][\"color\"] = chroma(options[\"label\"][\"fill\"][\"color\"]).hex();\n options[\"label\"][\"stroke\"][\"color\"] = options[\"label\"][\"stroke\"][\"color\"] === \"no-color\" ? \"no-color\" : chroma(options[\"label\"][\"stroke\"][\"color\"]).hex();\n options[\"fill\"][\"pattern\"][\"color\"] = chroma(options[\"fill\"][\"pattern\"][\"color\"]).hex();\n options[\"icon\"][\"fill\"] = chroma(options[\"icon\"][\"fill\"]).hex();\n options[\"icon\"][\"gradientcolor\"] = chroma(options[\"icon\"][\"gradientcolor\"]).hex();\n // --\n\n let patternValids = Object.keys(M.style.pattern).filter(name => name != \"ICON\" && name != \"IMAGE\");\n let alignValues = Object.values(M.style.align);\n let baselineValues = Object.values(M.style.baseline);\n let formValues = Object.values(M.style.form).filter(name => name != null);\n\n //transform array options to data template option\n options[\"patternlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"fill\"][\"pattern\"][\"name\"], patternValids, patternValids);\n options[\"linecapstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"linecaplabelstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinlabelstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"alignlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"align\"], alignValues, alignValues);\n options[\"baselinelist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"baseline\"], baselineValues, baselineValues);\n options[\"formlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"icon\"][\"form\"], formValues, formValues);\n if (this.layer_ != null) {\n let labelTextValues = Object.keys(this.getFeaturesAttributes());\n let labelTextSelected = options[\"label\"] != null ? options[\"label\"][\"text\"] : \"\";\n options[\"featuresAttr\"] = SimpleCategoryBinding.arrayDataToTemplate(labelTextSelected, labelTextValues.map(name => `{{${name}}}`), labelTextValues);\n }\n return options;\n }\n\n set imgId(id) {\n this.imgId_ = id;\n }\n\n get imgId() {\n return this.imgId_;\n }\n\n set fill(bool) {\n this.fill_ = bool;\n }\n\n set stroke(bool) {\n this.stroke_ = bool;\n }\n\n set label(bool) {\n this.label_ = bool;\n }\n\n set form(bool) {\n this.form_ = bool;\n }\n\n set icon(bool) {\n this.icon_ = bool;\n }\n\n get fill() {\n return this.fill_;\n }\n\n get stroke() {\n return this.stroke_;\n }\n\n get label() {\n return this.label_;\n }\n\n get form() {\n return this.form_;\n }\n\n get icon() {\n return this.icon_;\n }\n\n toggleDisplaySubmenu(flag) {\n let buttonOptions = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n let funct = flag === true ? \"add\" : \"remove\";\n buttonOptions.classList[funct](\"m-hidden\");\n }\n\n addLegendListener() {\n this.querySelectorAllForEach(\"input,select,div.m-boxes\", element => {\n if (element instanceof HTMLDivElement) {\n element.addEventListener(\"click\", () => {\n this.refreshLegend(element);\n });\n } else {\n if (element instanceof HTMLSelectElement) {\n element.addEventListener(\"change\", () => {\n this.refreshLegend(element);\n });\n } else {\n element.addEventListener(\"input\", () => {\n this.refreshLegend(element);\n });\n }\n }\n });\n }\n\n /**\n * @function\n * @param {function}\n */\n refreshLegend(element, flag) {\n let id = this.imgId_;\n let style = this.generateStyle();\n if (flag === true) {\n style = this.style_;\n }\n if (style != null) {\n this.style_ = style;\n style = style.clone();\n if (style instanceof M.style.Point) {\n style.set('radius', SimpleCategoryBinding.RADIUS_OPTION);\n if (style.get(\"icon.radius\") != null) {\n style.set(\"icon.radius\", SimpleCategoryBinding.ICON_RADIUS_OPTION);\n }\n }\n let img = this.htmlParent_.querySelector(`img[id='img-${id}']`);\n style.updateCanvas();\n let dataURL = style.toImage();\n if (img != null) {\n img.src = dataURL;\n }\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get RADIUS_OPTION() {\n return 10;\n }\n\n\n /**\n * TODO\n * @const\n */\n static get ICON_RADIUS_OPTION() {\n return 10;\n }\n\n get style() {\n\n return this.style_;\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Familia\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * Array of allowed geometries.\n * @const {Array}\n */\n static get GEOMETRIES() {\n return ['point', 'line', 'polygon'];\n }\n\n /**\n * @function\n */\n static arrayDataToTemplate(selected, arrayId, arrayName) {\n return arrayId.map((id, index) => {\n return {\n id: id,\n name: arrayName[index],\n selected: selected\n };\n });\n };\n\n /**\n * @const\n */\n static get DEFAULT_OPTIONS_STYLE() {\n return {\n radius: 10,\n fill: {\n color: \"#e5008a\",\n opacity: 1,\n width: 2,\n pattern: {\n color: 'red',\n name: \"HATCH\",\n size: 1,\n spacing: 2,\n scale: 3,\n offset: 5,\n rotation: 0\n }\n },\n stroke: {\n color: \"#000000\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n label: {\n fill: {\n color: '#ff0000',\n },\n stroke: {\n color: \"no-color\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n scale: 2,\n text: \"Texto de prueba\",\n font: \"14px serif\",\n align: \"center\",\n baseline: \"top\",\n rotate: false,\n rotation: 0,\n offset: [0, 0]\n },\n icon: {\n src: \"\",\n form: \"\",\n size: [40, 40],\n anchor: [0, 0],\n scale: 1,\n offset: [0, 0],\n rotation: 0,\n opacity: 1,\n form: \"CIRCLE\",\n fill: \"#ffffff\",\n gradientcolor: \"#e07e18\"\n }\n };\n }\n}\n","import buttonoptions2 from 'templates/buttonoptions2';\nimport simpleoptions from 'templates/simpleoptions';\nimport stylesimple from 'templates/stylesimple';\nimport attributestemplate from 'templates/attributestemplate';\nimport categorystyles from 'templates/categorystyles';\nimport {\n Binding\n}\nfrom './binding';\nimport {\n SimpleCategoryBinding\n}\nfrom './simplecategorybinding';\n\nexport class CategoryBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, controller) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.styleCategories_ = {};\n\n this.compilePromise_.then(() => {\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n selectElement.addEventListener('input', () => {\n this.renderAttributeOptions();\n });\n });\n this.selectedCategory_ = null;\n this.clickedOnTable_ = false;\n this.controller_ = controller;\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n this.setAttributes();\n this.refreshOptionsButtons();\n return this;\n }\n\n /**\n * This function shows the html view.\n * @function\n * @return {Binding}\n */\n unhide() {\n this.getTemplate().classList.remove('m-hidden');\n this.getParentTemplate().querySelector(\"[data-buttons-option-category]\").classList.remove(\"m-hidden\");\n return this;\n }\n\n /**\n * This function hides the html view.\n * @function\n * @return {Binding}\n */\n hide() {\n this.getTemplate().classList.add('m-hidden');\n this.getParentTemplate().querySelector(\"[data-buttons-option-category]\").classList.add(\"m-hidden\");\n return this;\n }\n\n /**\n * @function\n */\n addEventClickListener() {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n element.addEventListener(\"click\", () => {\n this.toggleCategory(element.id);\n });\n });\n }\n\n /**\n * This function refresh the html options buttons template.\n * @function\n */\n refreshOptionsButtons() {\n let options = SimpleCategoryBinding.OPTIONS_POINT_SUBMENU;\n\n if (this.getGeometry() !== \"point\") {\n options = SimpleCategoryBinding.OPTIONS_SUBMENU;\n }\n\n this.addOptionsButtons(options, () => {\n this.compatibleSectionListener(\"icon\", \"form\");\n this.compatibleSectionListener(\"form\", \"icon\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addOptionsButtons(options, callback = null) {\n let parentHtml = this.getParentTemplate().querySelector(\"[data-buttons-option-category]\");\n this.addTemplate(buttonoptions2, parentHtml, {\n buttonsParams: options\n }, (html) => {\n if (typeof callback === \"function\") {\n callback();\n }\n options.forEach(option => this.addEventOptionListener(option, options));\n options.forEach(option => this.addEventCheckListener(option, options));\n this.deactivateSubmenu();\n this.addEventCheckFromSubmenu();\n });\n }\n\n addEventCheckFromSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => {\n input.addEventListener(\"change\", () => {\n this.controller_.selectPanel(\"stylecategory\");\n this.controller_.setCompatibleStylePanels(\"stylecategory\");\n this.controller_.showActivePanel(\"stylecategory\");\n\n });\n });\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let input = this.querySelectorParent(`[data-buttons-option-category] input[data-apply=\"${optionEnable}\"]`);\n if (input != null) {\n input.addEventListener(\"change\", () => {\n if (input.checked === true) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n if (clickable != null) {\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n }\n if (input != null) {\n input.disabled = true;\n input.checked = false;\n }\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]+label`);\n if (clickable != null) {\n clickable.classList.remove(\"check-inactive\");\n }\n if (input != null) {\n input.disabled = false;\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Fuente\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * TODO\n * @function\n */\n toggleCategory(id) {\n Object.values(this.styleCategories_).forEach(simpleBinding => {\n simpleBinding.hide();\n });\n if (this.clickedOnTable_ === false) {\n this.activateSubmenu();\n this.clickedOnTable_ = true;\n }\n let simpleBinding = this.styleCategories_[id];\n this.selectedCategory_ = simpleBinding;\n let options = this.selectedCategory_.getOptions();\n this.checkInput(\"fill\", options[\"fill\"]);\n this.checkInput(\"stroke\", options[\"stroke\"]);\n this.checkInput(\"label\", options[\"label\"]);\n this.checkInput(\"form\", options[\"form\"]);\n this.checkInput(\"icon\", options[\"icon\"]);\n if (simpleBinding != null) {\n simpleBinding.unhide();\n simpleBinding.showCompatibleSections();\n }\n Object.values(this.styleCategories_).forEach(simpleBinding => {\n simpleBinding.setLayer(this.layer_, false);\n });\n }\n\n /**\n * TODO\n * @function\n */\n renderAttributeOptions(flag = false) {\n let selectButton = this.querySelector(\"[data-options='attributeName']\");\n let value = selectButton.value;\n if (this.style_ != null && flag === true) {\n value = this.style_.getAttributeName();\n }\n let attributeExists = !M.utils.isNullOrEmpty(value);\n let values = this.getAllValuesAttribute(value)\n .filter(value => !(M.utils.isNullOrEmpty(value)))\n .map(value => {\n return {\n name: value\n };\n }).splice(0, CategoryBinding.MAXNUMBER_CATEGORIES);\n\n this.removeCategories();\n this.createCategories(values);\n this.addCategoriesView(values, attributeExists);\n }\n\n /**\n * TODO\n * @function\n */\n addCategoriesView(values, attributeExists) {\n let parent = this.querySelector(\"[data-options='values']\");\n this.compileTemplate(categorystyles, {\n values: values,\n attributeExists: attributeExists\n }).then(html => {\n parent.innerHTML = html.innerHTML;\n Object.values(this.styleCategories_).forEach(binding => {\n binding.refreshTemplate();\n binding.hide();\n });\n this.addEventClickListener();\n this.addEventSelectedListener();\n this.addLegendListenerAll();\n });\n }\n\n /**\n * TODO\n * @function\n */\n createCategories(values) {\n let categoriesStyle = this.style_ == null ? null : this.style_.getCategories();\n values.forEach(value => {\n let categoryStyle = categoriesStyle == null ? null : categoriesStyle[value.name];\n this.styleCategories_[value.name] = new SimpleCategoryBinding(simpleoptions, this.htmlTemplate_, \"stylesimple\", categoryStyle, this.layer_, this);\n this.styleCategories_[value.name].compilePromise_.then(() => {\n this.styleCategories_[value.name].refreshLegend(value.name, true);\n });\n this.setGeometryCategory(this.styleCategories_[value.name]);\n\n });\n\n let otherCategory = categoriesStyle == null ? null : categoriesStyle[\"other\"];\n this.styleCategories_[\"other\"] = new SimpleCategoryBinding(stylesimple, this.htmlTemplate_, \"stylesimple\", otherCategory, this.layer_, this);\n this.styleCategories_[\"other\"].compilePromise_.then(() => {\n this.styleCategories_[\"other\"].refreshLegend(\"other\", true);\n });\n this.setGeometryCategory(this.styleCategories_[\"other\"]);\n }\n\n /**\n * TODO\n * @function\n */\n removeCategories() {\n Object.values(this.styleCategories_).forEach(binding => binding.destroy());\n this.styleCategories_ = {};\n }\n\n /**\n * TODO\n * @function\n */\n setAttributes() {\n let layer = this.layer_;\n if (layer instanceof M.layer.Vector) {\n let selected = this.style_ == null ? \"\" : this.style_.getAttributeName();\n let attributeNames = this.filterAttributesFeature(\"string\").map(element => {\n return {\n name: element,\n selected: selected\n };\n });\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n this.compileTemplate(attributestemplate, {\n attributes: attributeNames\n }).then(html => {\n selectElement.innerHTML = html.innerHTML;\n this.renderAttributeOptions(true);\n if (attributeNames.length === 0) {\n this.deactivateBinding();\n } else {\n this.activateBinding();\n }\n });\n }\n }\n\n /**\n * TODO\n * @function\n */\n setGeometryCategory(category) {\n let geometry = this.layer_.getFeatures()[0].getGeometry().type;\n switch (geometry) {\n case \"Point\":\n case \"MultiPoint\":\n category.geometry_ = 'point';\n break;\n case \"LineString\":\n case \"MultiLineString\":\n category.geometry_ = 'line';\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n category.geometry_ = 'polygon';\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n }\n\n /**\n * @function\n */\n showSection(option) {\n this.querySelectorAllForEach(`[data-id='${option}']`, element => {\n element.classList.remove(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n hideSection(option) {\n this.querySelectorAllForEach(`[data-id='${option}']`, element => {\n element.classList.add(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n addEventOptionListener(option, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] [data-label='${option.id}']`);\n let input = this.querySelectorParent(`[data-buttons-option-category] input[data-apply='${option.id}']`);\n element.addEventListener(\"click\", () => {\n if (input.disabled === false) {\n options.forEach(option => this.hideSection(option.id));\n this.showSection(option.id);\n this.activeSection(option.id);\n }\n });\n }\n\n /**\n * @function\n */\n addEventCheckListener(option, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] input[data-apply='${option.id}']`);\n element.addEventListener(\"click\", () => {\n this.checkSection(option.id, options);\n });\n }\n\n /**\n * @function\n */\n activeSection(id) {\n let selector = this.querySelectorParent(`[data-buttons-option-category] [data-selector='${id}']`);\n this.querySelectorAllForEachParent(`[data-buttons-option-category] [data-selector]`, element => {\n element.classList.remove(\"check-active\");\n element.classList.add(\"check-selected\");\n });\n selector.classList.remove(\"check-selected\");\n selector.classList.add(\"check-active\");\n }\n\n /**\n * @function\n */\n setSelectedRow(id) {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n element.classList.remove(\"m-table-cell-selected\");\n });\n this.querySelector(`[id='${id}']`).classList.add(\"m-table-cell-selected\");\n }\n\n addEventSelectedListener() {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n let id = element.id;\n element.addEventListener(\"click\", () => this.setSelectedRow(id));\n });\n }\n\n\n /**\n * @function\n */\n checkSection(id, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] #cat-${id}`);\n if (element.checked === true) {\n if (this.selectedCategory_ != null) {\n this.selectedCategory_[id] = true;\n }\n options.forEach(option => this.hideSection(option.id));\n this.showSection(id);\n this.activeSection(id);\n } else {\n if (this.selectedCategory_ != null) {\n this.selectedCategory_[id] = false;\n }\n }\n this.selectedCategory_.refreshLegend();\n }\n\n /**\n * @function\n */\n checkInput(id, flag) {\n let element = this.querySelectorParent(`[data-buttons-option-category] #cat-${id}`);\n if (element != null) {\n element.checked = flag;\n }\n }\n\n /**\n * @function\n */\n activateSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => input.disabled = false);\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] label[data-selector]\", label => {\n label.classList.remove(\"check-inactive\");\n label.classList.add(\"check-selected\");\n });\n }\n\n /**\n * @function\n */\n deactivateSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => input.disabled = true);\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] label[data-selector]\", label => {\n label.classList.add(\"check-inactive\");\n label.classList.remove(\"check-selected\");\n });\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n let geometry = this.layer_.getFeatures()[0].getGeometry().type;\n switch (geometry) {\n case \"Point\":\n case \"MultiPoint\":\n geometry = 'point';\n break;\n case \"LineString\":\n case \"MultiLineString\":\n geometry = 'line';\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n geometry = 'polygon';\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n return geometry;\n }\n\n /**\n * TODO\n * @function\n */\n getAllValuesAttribute(attribute) {\n let features = this.layer_.getFeatures();\n return features.map(feature => feature.getAttribute(attribute)).filter((elem, pos, arr) => arr.indexOf(elem) == pos);\n }\n\n /**\n * TODO\n * @function\n */\n generateOptions() {\n let styleOptions = {};\n let styleCategories = {};\n styleOptions[\"attributeName\"] = this.querySelector(\"[data-options='attributeName']\").value;\n\n Object.keys(this.styleCategories_).forEach(value => {\n let simpleBinding = this.styleCategories_[value];\n let options = this.styleCategories_[value].generateOptions().options;\n let fill = simpleBinding.fill;\n let stroke = simpleBinding.stroke;\n let icon = simpleBinding.icon || simpleBinding.form;\n let label = simpleBinding.label;\n let valuesFill = options.fill != null ? Object.values(options.fill).filter(value => value != null) : [];\n if (fill || stroke || icon || label) {\n styleCategories[value] = this.styleCategories_[value].style;\n }\n }, this);\n\n styleOptions[\"options\"] = styleCategories;\n\n return styleOptions;\n }\n\n /**\n * TODO\n * @function\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName !== \"\") {\n style = new M.style.Category(opts.attributeName, opts.options);\n }\n return style;\n }\n\n /**\n * This function adds an event listener for all HTMLInputElement and HTMLSelectElement.\n * @function\n * @param {function}\n */\n addLegendListenerAll() {\n Object.keys(this.styleCategories_).forEach(category => {\n let binding = this.styleCategories_[category];\n binding.imgId = category;\n binding.addLegendListener();\n });\n }\n\n /**\n * TODO\n * @const\n */\n static get MAXNUMBER_CATEGORIES() {\n return 30;\n }\n}\n","import variablechart from 'templates/variablechart';\nimport paginationchart from 'templates/paginationchart';\nimport attributeschart from 'templates/attributeschart';\nimport {\n Binding\n}\nfrom './binding';\n\nexport class ChartBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.variables_ = [];\n if (styleParams != null) {\n this.variables_ = styleParams.getOptions().variables.map(variable => variable.attribute);\n }\n this.compilePromise_.then(() => {\n this.addKeyEnterListener();\n this.addRenderCompatibleListener();\n this.addAttributeListener();\n this.refreshVariables();\n });\n }\n\n setLayer(layer) {\n this.layer_ = layer;\n this.renderAttributes();\n return this;\n }\n\n /**\n * @function\n * @param {string}\n */\n addAttribute(attr) {\n this.variables_.push(attr);\n }\n\n /**\n * @function\n * @param {string}\n */\n removeAttribute(attr) {\n this.variables_ = this.variables_.filter(attr2 => attr2 != attr);\n }\n\n addAttributeFromParamenter(attribute) {\n this.addAttribute(attribute);\n this.addVariableTemplate(attribute);\n this.refreshPagination();\n }\n\n /**\n * @function\n */\n addAttributeFromInput() {\n let inputAttribute = this.querySelector(\"[data-attribute]\");\n let attribute = inputAttribute.value;\n if (attribute !== \"\") {\n if (this.variables_.includes(attribute)) {\n M.dialog.info(\"El atributo ya ha sido agregado.\", \"Nombre de variable repetida\");\n } else {\n let allowedAttrs = this.layer_.getFeatures()[0].getAttributes();\n if (allowedAttrs.hasOwnProperty(attribute)) {\n this.addAttributeFromParamenter(attribute);\n } else {\n M.dialog.info(\"No existe ninguna variable con ese nombre.\", \"Nombre de variable incorrecto.\");\n }\n }\n } else {\n M.dialog.info(\"No está permitido introducir una cadena vacía.\", \"Nombre de variable vacía.\");\n\n }\n }\n\n /**\n * @function\n */\n removeAttributeFromInput() {\n let inputAttribute = this.querySelector(\"[data-attribute]\");\n let attribute = inputAttribute.value;\n this.removeAttribute(attribute);\n }\n\n /**\n * @function\n */\n addAttributeListener() {\n let button = this.querySelector(\"[data-add]\");\n button.addEventListener(\"click\", () => {\n this.addAttributeFromInput();\n });\n }\n\n /**\n * @function\n */\n addKeyEnterListener() {\n let inputElement = this.querySelector(\"[data-attribute]\");\n inputElement.addEventListener(\"keydown\", this.keyEnterListener());\n }\n\n /**\n * @function\n */\n keyEnterListener() {\n return (evt) => {\n if (evt.key === \"Enter\") {\n this.addAttributeFromInput();\n }\n };\n }\n\n /**\n * @function\n */\n addVariableTemplate(attribute) {\n let parent = this.querySelector(\"[data-variables]\");\n let variables = [];\n let variable;\n let legend = ChartBinding.DEFAULT_OPTIONS_VARIABLE.legend;\n let label = ChartBinding.DEFAULT_OPTIONS_VARIABLE.label;\n if (this.style_ != null) {\n variables = this.style_.getOptions().variables;\n }\n if (variables.length !== 0) {\n variable = variables.find(variable => variable.attribute === attribute);\n if (variable != null) {\n legend = variable.legend;\n label = variable.label;\n }\n }\n this.compileTemplate(variablechart, {\n attribute: attribute,\n legend: legend,\n label: label\n }).then(html => {\n parent.append(...html.children);\n let removeElement = this.querySelector(`[data-remove=\"${attribute}\"]`);\n if (removeElement != null) {\n this.addRemoveVarSectionListener(removeElement);\n this.addLabelOptionListener(attribute);\n }\n });\n }\n\n /**\n * @function\n */\n removeVariableTemplate(selector) {\n let parent = this.querySelector(\".m-chart-variables\");\n this.querySelectorAllForEach(`.m-chart-variables [data-delete=\"${selector}\"]`, element => {\n parent.removeChild(element);\n });\n }\n\n /**\n * @function\n */\n removeVariableSection(attr) {\n this.removeAttribute(attr);\n this.removeVariableTemplate(attr);\n this.refreshPagination();\n }\n\n /**\n * @function\n */\n refreshVariables() {\n let variables = [...this.variables_];\n variables.forEach(variable => {\n this.removeVariableSection(variable);\n this.addAttributeFromParamenter(variable);\n });\n }\n\n /**\n * @function\n */\n addRemoveVarSectionListener(element) {\n element.addEventListener(\"click\", this.removeVarSectionListener(element).bind(this));\n }\n\n /**\n * @function\n */\n removeVarSectionListener(element) {\n let attribute = element.dataset[\"remove\"];\n return () => {\n this.removeVariableSection(attribute);\n };\n }\n\n /**\n * @function\n */\n refreshPagination() {\n let options = this.variables_.map((attribute, index) => {\n let option = {\n attribute: attribute,\n number: index + 1\n };\n return option;\n });\n\n let parent = this.querySelector(\"[data-pagination]\");\n this.compileTemplate(paginationchart, {\n ranges: options\n }).then(html => {\n parent.innerHTML = html.innerHTML;\n this.addClickPagerListener();\n let firstAttr = this.variables_.slice(-1)[0];\n if (firstAttr != null) {\n this.showVariableSection(firstAttr)();\n }\n });\n }\n\n /**\n * @function\n */\n addClickPagerListener() {\n this.querySelectorAllForEach(\"[data-page-selector]\", element => {\n let selector = element.dataset[\"pageSelector\"];\n element.addEventListener(\"click\", this.showVariableSection(selector).bind(this));\n });\n }\n\n /**\n * @function\n */\n clickPagerListener(selector) {\n this.querySelectorAllForEach(\"[data-target]\", element => {\n element.classList.add(\"m-hidden\");\n });\n\n this.querySelectorAllForEach(`[data-target=\"${selector}\"]`, element => {\n element.classList.remove(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n activePageListener(selector) {\n this.querySelectorAllForEach(\"[data-page-selector]\", element2 => {\n element2.classList.remove(\"m-page-active\");\n });\n let element = this.querySelector(`[data-page-selector=\"${selector}\"]`);\n if (element != null) {\n element.classList.add(\"m-page-active\");\n }\n }\n\n /**\n * @function\n */\n showVariableSection(selector) {\n return () => {\n this.clickPagerListener(selector);\n this.activePageListener(selector);\n };\n }\n\n /**\n * @function\n */\n renderCompatibleOpts(type) {\n this.querySelectorAllForEach(\"[data-type]\", element => {\n let types = element.dataset[\"type\"].split(\",\");\n if (!types.includes(type)) {\n element.classList.add(\"m-hidden\");\n } else {\n element.classList.remove(\"m-hidden\");\n }\n });\n }\n\n /**\n * @function\n */\n renderCompatibleListener() {\n let selectElement = this.querySelector(\"[data-style-options='type']\");\n let selectType = selectElement.selectedOptions[0].value;\n this.renderCompatibleOpts(selectType);\n }\n\n /**\n * @function\n */\n addRenderCompatibleListener() {\n let selectElement = this.querySelector(\"[data-style-options='type']\");\n selectElement.addEventListener(\"change\", this.renderCompatibleListener.bind(this));\n }\n\n /**\n * @function\n */\n renderAttributes() {\n let attributes = this.layer_.getFeatures()[0].getAttributes();\n let keys = Object.keys(attributes);\n keys = keys.filter(key => {\n return !isNaN(parseFloat(attributes[key]));\n });\n\n this.compileTemplate(attributeschart, {\n attributes: keys\n }).then(html => {\n this.querySelector(\"[data-attribute]\").innerHTML = html.innerHTML;\n });\n }\n\n /**\n * @function\n */\n toggleLabelOptions(name) {\n let element = this.querySelector(`[data-label-target=\"${name}\"]`);\n let classList = element.classList;\n let result = classList.contains(\"m-hidden\") === true ? classList.remove(\"m-hidden\") : classList.add(\"m-hidden\");\n }\n\n /**\n * @function\n */\n addLabelOptionListener(name) {\n let checkbox = this.querySelector(`[data-variable-option=\"${name}.labelshow\"]`);\n checkbox.addEventListener(\"change\", () => {\n this.toggleLabelOptions(name);\n });\n }\n\n /**\n * @function\n */\n generateVariableOptions() {\n let obj = {};\n\n this.querySelectorAllForEach(\"input[data-variable-option]\", element => {\n let path = element.dataset[\"variableOption\"];\n let value = element.value;\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n Binding.createObj(obj, path, value);\n });\n\n let optVars = this.variables_.map(attribute => {\n obj[attribute][\"attribute\"] = attribute;\n\n return obj[attribute];\n });\n\n optVars = optVars.map(option => {\n // options text label, show the % of data\n if (option.labelshow === true) {\n option[\"label\"][\"text\"] = (value, values) => {\n return Math.round(value / values.reduce((tot, curr) => tot + curr) * 100) + '%';\n };\n }\n // delete every option label\n else {\n option[\"label\"] = undefined;\n }\n return option;\n });\n\n return optVars;\n }\n\n /**\n * @function\n */\n generateStyle() {\n let options = this.generateOptions().options;\n let varsOpts = this.generateVariableOptions();\n let scheme = M.style.chart.schemes[options.scheme];\n\n let style = new M.style.Chart({\n type: options.type,\n scheme: scheme,\n radius: options.radius,\n donutRadio: options.donutRadius,\n offsetX: options.offsetX,\n offsetY: options.offsetY,\n variables: varsOpts.length === 0 ? [new M.style.chart.Variable({\n attribute: \"default\"\n })] : varsOpts,\n fill3DColor: options.fill3DColor\n });\n\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ChartBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options = this.style_.getOptions();\n options[\"scheme\"] = this.getSchemeName();\n // parse variable options\n\n }\n return options;\n }\n\n /**\n * @function\n */\n getSchemeName() {\n\n const arrayEquals = (array, array2) => {\n let include = false;\n let include2 = false;\n if (array instanceof Array && array2 instanceof Array) {\n include = array.every((element, index) => element === array2[index]);\n include2 = array2.every((element, index) => element === array[index]);\n }\n return include && include2;\n };\n\n if (this.style_ != null) {\n let scheme = this.style_.getOptions()[\"scheme\"];\n let schemesChart = M.style.chart.schemes;\n name = Object.keys(schemesChart).find(name => arrayEquals(scheme, schemesChart[name]));\n\n }\n return name;\n }\n}\n\n/**\n * @const\n */\nChartBinding.DEFAULT_OPTIONS_STYLE = {\n donutRatio: 4,\n fill3DColor: \"#ff00f0\",\n offsetX: 0,\n offsetY: 0,\n radius: 12,\n rotateWithView: false,\n scheme: [\"#ffa500\", \"blue\", \"red\", \"green\", \"cyan\", \"magenta\", \"yellow\", \"#0f0\"],\n type: \"pie\"\n};\n\n/**\n * @const\n */\nChartBinding.DEFAULT_OPTIONS_VARIABLE = {\n legend: \"Ejemplo de leyenda\",\n label: {\n fill: \"#ff0000\",\n scale: 1,\n text: (value, values) => {\n return Math.round(value / values.reduce((tot, curr) => tot + curr) * 100) + '%';\n },\n radiusIncrement: 2,\n stroke: {\n color: \"#000000\",\n width: 1\n }\n }\n};\n","import stylesimple from 'templates/stylesimple';\nimport styleproportional from 'templates/styleproportional';\nimport stylecluster from 'templates/stylecluster';\nimport stylechoropleth from 'templates/stylechoropleth';\nimport stylecategory from 'templates/stylecategory';\nimport styleheatmap from 'templates/styleheatmap';\nimport stylechart from 'templates/stylechart';\nimport {\n SimpleBinding\n}\nfrom './binding/simplebinding';\nimport {\n ProportionalBinding\n}\nfrom './binding/proportionalbinding';\nimport {\n ClusterBinding\n}\nfrom './binding/clusterbinding';\nimport {\n HeatmapBinding\n}\nfrom './binding/heatmapbinding';\nimport {\n ChoroplethBinding\n}\nfrom './binding/choroplethbinding';\nimport {\n CategoryBinding\n}\nfrom './binding/categorybinding';\nimport {\n ChartBinding\n}\nfrom './binding/chartbinding';\n\n\n\nexport default class BindingController {\n constructor(htmlParent) {\n this.layer_ = null;\n this.activePanel_ = null;\n this.selectedPanels_ = [];\n this.html_ = htmlParent;\n this.renderViews(null);\n }\n\n getStyles(layer, styleType) {\n let styleBinding = null;\n if (layer != null) {\n let style = layer.getStyle();\n\n if (style instanceof styleType) {\n styleBinding = style;\n } else if (style instanceof M.style.Composite) {\n let styles = style.getStyles();\n styleBinding = styles.find(style => style instanceof styleType);\n }\n }\n return styleBinding;\n }\n\n renderViews(layer) {\n\n this.bindings_ = {};\n this.bindings_['stylesimple'] = new SimpleBinding(stylesimple, this.html_, 'stylesimple', this.getStyles(layer, M.style.Simple), layer, this);\n this.bindings_['styleproportional'] = new ProportionalBinding(styleproportional, this.html_, 'styleproportional', this.getStyles(layer, M.style.Proportional), layer);\n this.bindings_['stylecluster'] = new ClusterBinding(stylecluster, this.html_, 'stylecluster', this.getStyles(layer, M.style.Cluster), layer);\n this.bindings_['stylechoropleth'] = new ChoroplethBinding(stylechoropleth, this.html_, 'stylechoropleth', this.getStyles(layer, M.style.Choropleth), layer);\n this.bindings_['stylecategory'] = new CategoryBinding(stylecategory, this.html_, 'stylecategory', this.getStyles(layer, M.style.Category), layer, this);\n this.bindings_['styleheatmap'] = new HeatmapBinding(styleheatmap, this.html_, 'styleheatmap', this.getStyles(layer, M.style.Heatmap), layer);\n this.bindings_['stylechart'] = new ChartBinding(stylechart, this.html_, 'stylechart', this.getStyles(layer, M.style.Chart), layer);\n this.bindings_[\"stylesimple\"].getCompilePromise().then(() => {\n this.addSelectOnChangeListener();\n });\n this.allCompilePromises_ = this.getBindings().map(binding => binding.getCompilePromise());\n }\n\n getAllCompilePromises() {\n return this.allCompilePromises_;\n }\n\n renderViewsPromise() {\n let promises = Object.values(this.bindings_).map(binding => binding.getCompilePromise());\n return Promise.all(promises);\n }\n\n destroyViews() {\n Object.values(this.bindings_).forEach(binding => binding.destroy());\n }\n\n /**\n * @function\n */\n getActivePanel() {\n return this.activePanel_;\n }\n\n /**\n * @function\n */\n setActivePanel(style) {\n Object.values(this.bindings_).forEach(binding => binding.setActivated(false));\n this.activePanel_ = this.bindings_[style];\n this.activePanel_.setActivated(true);\n if (style === \"stylesimple\") {\n this.bindings_[\"stylesimple\"].toggleDisplaySubmenu(false);\n } else {\n this.bindings_[\"stylesimple\"].toggleDisplaySubmenu(true);\n }\n }\n\n /**\n * @function\n */\n getSelectedPanels() {\n return this.selectedPanels_.map(selected => this.bindings_[selected]);\n }\n\n /**\n * @function\n */\n addSelectedPanel(style) {\n if (!this.selectedPanels_.includes(style)) {\n this.selectedPanels_.push(style);\n this.bindings_[style].setSelected(true);\n }\n }\n\n selectPanel(style) {\n this.html_.querySelector(`[data-checkbox='${style}']`).checked = true;\n this.addSelectedPanel(style);\n }\n\n /**\n * @function\n */\n removeSelectedPanel(style) {\n this.selectedPanels_ = this.selectedPanels_.filter(style2 => style2 !== style);\n this.bindings_[style].setSelected(false);\n }\n\n /**\n * @function\n */\n disablePanel(style) {\n let binding = this.bindings_[style];\n if (binding != null) {\n binding.setDisabled(true);\n }\n }\n\n /**\n * @function\n */\n enablePanel(style) {\n let binding = this.bindings_[style];\n if (binding != null) {\n binding.setDisabled(false);\n }\n }\n\n /**\n * @function\n */\n setGeometry(geometry) {\n this.geometry_ = geometry;\n }\n\n /**\n * @function\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * @function\n */\n change(layer) {\n this.destroyViews();\n this.renderViews(layer);\n\n this.renderViewsPromise().then(() => {\n this.setLayer(layer);\n this.resetOptions();\n this.setCompatiblePanels();\n this.initBindings(layer);\n });\n\n }\n\n /**\n * @function\n */\n setLayer(layer) {\n if (this.layer_ === null) {\n this.addActiveListener();\n this.addSelectListener();\n }\n this.layer_ = layer;\n let geometry = layer.getFeatures()[0].getGeometry().type;\n switch (geometry) {\n case \"Point\":\n case \"MultiPoint\":\n this.setGeometry('point');\n break;\n case \"LineString\":\n case \"MultiLineString\":\n this.setGeometry('line');\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n this.setGeometry('polygon');\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n }\n\n /**\n * @function\n */\n getKeysBindings() {\n return Object.keys(this.bindings_);\n }\n\n /**\n * @function\n */\n getBindings() {\n return Object.values(this.bindings_);\n }\n\n /**\n * @function\n */\n deactivateAll() {\n this.getBindings().forEach(binding => binding.setActivated(false));\n this.activePanel_ = null;\n }\n\n /**\n * @function\n */\n unselectAll() {\n this.getBindings().forEach(binding => binding.setSelected(false));\n this.selectedPanels_ = [];\n }\n\n /**\n * @function\n */\n enableAll() {\n this.getKeysBindings().forEach(binding => this.enablePanel(binding));\n }\n\n /**\n * @function\n */\n disableAll() {\n this.getKeysBindings().forEach(binding => this.disablePanel(binding));\n }\n\n /**\n * @function\n */\n bindLayer(binding) {\n this.bindings_[binding].setLayer(this.layer_);\n this.bindings_[binding].setDisabled(false);\n }\n\n /**\n * @function\n */\n resetOptions() {\n this.deactivateAll();\n this.unselectAll();\n }\n\n /**\n * @function\n */\n initBindings(layer) {\n this.bindings_['stylesimple'].setGeometry(this.geometry_).setLayer(this.layer_);\n let styles = [layer.getStyle()];\n if (styles[0] instanceof M.style.Composite) {\n styles.push(...styles[0].getStyles());\n }\n let styleNames = styles.map(style => BindingController.parseStyleToName(style));\n styleNames.forEach(style => {\n this.showCompatiblePanel(style);\n this.activeLastSelected(style);\n });\n }\n\n /**\n * @function\n */\n setCompatiblePanels() {\n let styles = BindingController.GEOMETRY_COMPATIBLE_OPTIONS[this.geometry_];\n this.getKeysBindings().forEach(binding => {\n if (styles.includes(binding)) {\n this.bindLayer(binding);\n } else {\n this.disablePanel(binding);\n }\n });\n this.deactivateAll();\n }\n\n /**\n * @function\n */\n setCompatibleStylePanels(style) {\n this.disableAll();\n this.getCompatibles().forEach(style2 => {\n if (this.compatibleGeometry(style2)) {\n this.enablePanel(style2);\n }\n });\n this.selectedPanels_.forEach(style => {\n this.bindings_[style].setSelected(true);\n });\n }\n\n /**\n * @function\n */\n showActivePanel(style) {\n this.deactivateAll();\n this.setActivePanel(style);\n }\n\n /**\n * @function\n */\n activeLastSelected(style) {\n let lastSelected = this.selectedPanels_.slice(-1)[0];\n if (lastSelected == undefined) {\n lastSelected = style;\n }\n this.showActivePanel(lastSelected);\n }\n\n /**\n * @function\n */\n showCompatiblePanel(style) {\n if (this.selectedPanels_.includes(style)) {\n this.removeSelectedPanel(style);\n } else {\n this.addSelectedPanel(style);\n }\n this.setCompatibleStylePanels(style);\n }\n\n /**\n * @function\n */\n addActiveListener() {\n this.getKeysBindings().forEach(binding => {\n let bindingStyle = this.bindings_[binding];\n let selectButton = bindingStyle.getSelectButton();\n let activeButton = bindingStyle.getActivateButton();\n let label = this.html_.querySelector(`[data-flap='${binding}']+label`);\n label.addEventListener('click', () => {\n if (selectButton.disabled === false) {\n let style = activeButton.dataset.flap;\n this.toggleDisplaySubmenu(style !== \"stylesimple\");\n this.showActivePanel(style);\n }\n });\n });\n }\n\n /**\n * @function\n */\n addSelectListener() {\n this.getKeysBindings().forEach(binding => {\n let bindingStyle = this.bindings_[binding];\n let selectButton = bindingStyle.getSelectButton();\n selectButton.addEventListener('change', () => {\n let style = selectButton.dataset.checkbox;\n this.toggleDisplaySubmenu(style !== \"stylesimple\");\n this.showCompatiblePanel(style);\n this.activeLastSelected(style);\n });\n });\n }\n\n /**\n * @function\n */\n getStyle() {\n let style;\n if (this.getSelectedPanels().length === 0) {\n M.dialog.info(\"Debe elegir al menos un estilo\", \"Elija estilo\");\n } else if (this.getSelectedPanels().length === 1) {\n style = this.getSelectedPanels()[0].generateStyle();\n } else {\n let mainStyle = this.getMainStyle();\n let styles = this.getIndividualStyles();\n mainStyle.add(styles);\n style = mainStyle;\n }\n return style;\n }\n\n /**\n * @function\n */\n getMainStyle() {\n return this.getSelectedPanels().map(binding => binding.generateStyle()).find(style => style instanceof M.style.Composite);\n }\n\n /**\n * @function\n */\n getIndividualStyles() {\n let mainStyle = this.getMainStyle();\n return this.getSelectedPanels()\n .filter(style => style != null)\n .map(binding => binding.generateStyle()).filter(style => !style.equals(mainStyle));\n }\n\n /**\n * @function\n */\n getCompatibles() {\n let compatibles = ['stylesimple', 'stylecluster', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth', 'styleheatmap'];\n return compatibles.filter(style => this.isCompatibleAll(this.selectedPanels_, style));\n\n }\n\n toggleDisplaySubmenu(flag) {\n this.bindings_['stylesimple'].toggleDisplaySubmenu(flag);\n }\n\n /**\n * @function\n */\n isCompatible(style, style2) {\n return BindingController.STYLE_COMPATIBLE_OPTIONS[style].includes(style2);\n }\n\n /**\n * @function\n */\n isCompatibleAll(styles, style) {\n let isCompatible = true;\n styles.forEach(style2 => {\n if (!this.isCompatible(style2, style)) {\n isCompatible = false;\n }\n });\n return isCompatible;\n }\n\n /**\n * @function\n */\n compatibleGeometry(style) {\n return BindingController.GEOMETRY_COMPATIBLE_OPTIONS[this.geometry_].includes(style);\n }\n\n /**\n * @function\n */\n addSelectOnChangeListener() {\n this.bindings_[\"stylesimple\"].querySelectorAllForEach(\"*\", element => {\n element.addEventListener(\"click\", () => {\n this.addSelectedPanel(\"stylesimple\");\n });\n });\n }\n\n /**\n * @const\n * @static\n */\n static get STYLE_COMPATIBLE_OPTIONS() {\n return {\n 'stylesimple': ['styleproportional', 'stylecluster', 'stylesimple'],\n 'styleproportional': ['stylesimple', 'stylecluster', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth'],\n 'stylechoropleth': ['styleproportional', 'stylecluster', 'stylechoropleth'],\n 'stylecategory': ['styleproportional', 'stylecluster', 'stylecategory'],\n 'stylecluster': ['stylesimple', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth', 'stylecluster'],\n 'styleheatmap': ['styleheatmap'],\n 'stylechart': ['stylecluster', 'styleproportional', 'stylechart']\n };\n }\n\n /**\n * @const\n * @static\n */\n static get GEOMETRY_COMPATIBLE_OPTIONS() {\n return {\n \"point\": ['styleproportional', 'stylecluster', 'stylechoropleth', 'stylecategory',\n 'styleheatmap', 'stylechart', 'stylesimple'\n ],\n \"line\": ['stylechoropleth', 'stylecategory', 'stylesimple'],\n \"polygon\": ['stylechoropleth', 'stylecategory', 'stylesimple', \"styleproportional\"]\n };\n }\n\n /**\n * @function\n * @static\n */\n static parseStyleToName(style) {\n let name = \"\";\n if (style instanceof M.style.Simple) {\n name = \"stylesimple\";\n } else if (style instanceof M.style.Cluster) {\n name = \"stylecluster\";\n } else if (style instanceof M.style.Heatmap) {\n name = \"styleheatmap\";\n } else if (style instanceof M.style.Choropleth) {\n name = \"stylechoropleth\";\n } else if (style instanceof M.style.Category) {\n name = \"stylecategory\";\n } else if (style instanceof M.style.Chart) {\n name = \"stylechart\";\n } else if (style instanceof M.style.Proportional) {\n name = \"styleproportional\";\n }\n return name;\n };\n}\n","import stylemanager from 'templates/stylemanager';\nimport StyleManagerImplControl from 'impl/stylemanagerControl';\nimport BindingController from './bindingcontroller';\n\nexport default class StyleManagerControl extends M.Control {\n\n /**\n * @classdesc\n * Main constructor of the class. Creates a PluginControl\n * control\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor(layer) {\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(StyleManagerImplControl)) {\n M.exception('La implementación usada no puede crear controles PluginControl');\n }\n\n // 2. implementation of this control\n let impl = new StyleManagerImplControl();\n super(impl, \"StyleManager\");\n this.layer_ = layer;\n }\n /**\n * This function creates the view\n *\n * @public\n * @function\n * @param {M.Map} map to add the control\n * @api stable\n */\n createView(map) {\n this.facadeMap_ = map;\n let layers = map.getWFS().concat(map.getKML().concat(map.getLayers().filter(layer => layer.type === \"GeoJSON\")));\n return new Promise((success, fail) => {\n const html = M.template.compileSync(stylemanager, {\n 'jsonp': true,\n vars: {\n layers: layers\n }\n })\n let htmlSelect = html.querySelector('#m-stylemanager-select');\n let container = html.querySelector('.m-stylemanager-container-select');\n this.bindinController_ = new BindingController(container);\n this.addSelectListener(htmlSelect, html);\n this.subscribeAddedLayer(htmlSelect);\n this.addApplyBtnListener(html);\n this.addClearBtnListener(html);\n this.renderOptionsLayerParam(htmlSelect, html, layers);\n success(html);\n this.loadFonts(html);\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n renderOptionsLayerParam(htmlSelect, html, layers) {\n if (this.layer_ instanceof M.layer.Vector) {\n Promise.all(this.bindinController_.getAllCompilePromises()).then(() => {\n this.renderOptions(htmlSelect, html, this.layer_);\n M.template.compile(\"selectlayer.html\", {\n vars: {\n layers: layers.map(layer => {\n return {\n name: layer.name,\n selected: this.layer_.name\n };\n }),\n }\n }).then(html => {\n htmlSelect.innerHTML = html.innerHTML;\n });\n });\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addOpenAttribute(html) {\n let containerSelect = html.querySelector(\".m-stylemanager-container-select\");\n containerSelect.setAttribute(\"open-select\", \"\");\n\n\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addApplyBtnListener(html) {\n let buttonApply = html.querySelector(\"[data-apply-style]\");\n buttonApply.addEventListener('click', this.applyStyle.bind(this));\n\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addClearBtnListener(html) {\n let buttonClear = html.querySelector(\"[data-clear-style]\");\n buttonClear.addEventListener('click', this.clearStyle.bind(this));\n }\n\n /** \n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addSelectListener(htmlSelect, html) {\n htmlSelect.addEventListener('change', () => {\n this.renderOptions(htmlSelect, html);\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n subscribeAddedLayer(htmlSelect) {\n this.facadeMap_.on(M.evt.ADDED_LAYER, (layers) => {\n if (Array.isArray(layers)) {\n layers.filter(layer => layer instanceof M.layer.Vector).forEach(layer => this.addLayerOption(htmlSelect, layer.name));\n } else if (layers instanceof M.layer.Vector) {\n const _layer = { ...layers };\n this.addLayerOption(htmlSelect, _layer);\n }\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n getActivationButton(html) {\n return html.querySelector('button.m-panel-btn');\n }\n\n /**\n * @function\n */\n addLayerOption(htmlSelect, name) {\n if (name != \"cluster_cover\") {\n if (this.isNotAdded(name, htmlSelect) === true) {\n let htmlOption = document.createElement(\"option\");\n htmlOption.setAttribute(\"name\", name);\n htmlOption.innerText = name;\n htmlSelect.add(htmlOption);\n }\n }\n }\n\n /**\n * @function\n */\n isNotAdded(layerName, htmlSelect) {\n const aChildren = [...htmlSelect.children];\n return !aChildren.some(o => o.innerHTML === layerName);\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n renderOptions(htmlSelect, html, layer = null) {\n let layerName = htmlSelect.value;\n this.layer_ = this.getLayerByName(layerName);\n if (layer != null) {\n this.layer_ = layer;\n }\n if (this.layer_ instanceof M.layer.Vector) {\n let features = this.layer_.getFeatures();\n if (features.length === 0) {\n M.dialog.error('La capa no tiene features o aún no se han cargado.', 'Error');\n htmlSelect.selectedIndex = 0;\n } else {\n this.bindinController_.change(this.layer_);\n this.showBoxes(html);\n this.addOpenAttribute(html);\n }\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n getLayerByName(layerName) {\n let layers = this.facadeMap_.getWFS()\n .concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(layer => layer.type === \"GeoJSON\")));\n return layers.find(layer => layer.name === layerName);\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n showBoxes(htmlParent) {\n htmlParent.querySelector(\".m-boxes\").classList.remove(\"m-hidden\");\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n applyStyle() {\n if (this.layer_ instanceof M.layer.Vector) {\n this.layer_.setStyle(null);\n let style = this.bindinController_.getStyle();\n this.layer_.setStyle(style);\n } else {\n M.dialog.info(\"Tiene que elegir una capa.\", \"Elija capa\");\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n clearStyle() {\n if (this.layer_ instanceof M.layer.Vector) {\n this.layer_.clearStyle();\n } else {\n M.dialog.info(\"Tiene que elegir una capa.\", \"Elija capa\");\n }\n }\n /**\n * @function\n */\n loadFonts() {\n M.style.Font.addSymbol({\n \"font\": \"FontAwesome\",\n \"name\": \"FontAwesome\",\n \"copyright\": \"SIL OFL 1.1\",\n \"prefix\": \"fa\"\n }, {\n \"fa-glass\": \"\\uf000\",\n \"fa-music\": \"\\uf001\",\n \"fa-search\": \"\\uf002\",\n \"fa-envelope-o\": \"\\uf003\",\n \"fa-heart\": \"\\uf004\",\n \"fa-star\": \"\\uf005\",\n \"fa-star-o\": \"\\uf006\",\n \"fa-user\": \"\\uf007\",\n \"fa-film\": \"\\uf008\",\n \"fa-th-large\": \"\\uf009\",\n \"fa-th\": \"\\uf00a\",\n \"fa-th-list\": \"\\uf00b\",\n \"fa-check\": \"\\uf00c\",\n \"fa-remove\": \"\\uf00d\",\n \"fa-close\": \"\\uf00d\",\n \"fa-times\": \"\\uf00d\",\n \"fa-search-plus\": \"\\uf00e\",\n \"fa-search-minus\": \"\\uf010\",\n \"fa-power-off\": \"\\uf011\",\n \"fa-signal\": \"\\uf012\",\n \"fa-gear\": \"\\uf013\",\n \"fa-cog\": \"\\uf013\",\n \"fa-trash-o\": \"\\uf014\",\n \"fa-home\": \"\\uf015\",\n \"fa-file-o\": \"\\uf016\",\n \"fa-clock-o\": \"\\uf017\",\n \"fa-road\": \"\\uf018\",\n \"fa-download\": \"\\uf019\",\n \"fa-arrow-circle-o-down\": \"\\uf01a\",\n \"fa-arrow-circle-o-up\": \"\\uf01b\",\n \"fa-inbox\": \"\\uf01c\",\n \"fa-play-circle-o\": \"\\uf01d\",\n \"fa-rotate-right\": \"\\uf01e\",\n \"fa-repeat\": \"\\uf01e\",\n \"fa-refresh\": \"\\uf021\",\n \"fa-list-alt\": \"\\uf022\",\n \"fa-lock\": \"\\uf023\",\n \"fa-flag\": \"\\uf024\",\n \"fa-headphones\": \"\\uf025\",\n \"fa-volume-off\": \"\\uf026\",\n \"fa-volume-down\": \"\\uf027\",\n \"fa-volume-up\": \"\\uf028\",\n \"fa-qrcode\": \"\\uf029\",\n \"fa-barcode\": \"\\uf02a\",\n \"fa-tag\": \"\\uf02b\",\n \"fa-tags\": \"\\uf02c\",\n \"fa-book\": \"\\uf02d\",\n \"fa-bookmark\": \"\\uf02e\",\n \"fa-print\": \"\\uf02f\",\n \"fa-camera\": \"\\uf030\",\n \"fa-font\": \"\\uf031\",\n \"fa-bold\": \"\\uf032\",\n \"fa-italic\": \"\\uf033\",\n \"fa-text-height\": \"\\uf034\",\n \"fa-text-width\": \"\\uf035\",\n \"fa-align-left\": \"\\uf036\",\n \"fa-align-center\": \"\\uf037\",\n \"fa-align-right\": \"\\uf038\",\n \"fa-align-justify\": \"\\uf039\",\n \"fa-list\": \"\\uf03a\",\n \"fa-dedent\": \"\\uf03b\",\n \"fa-outdent\": \"\\uf03b\",\n \"fa-indent\": \"\\uf03c\",\n \"fa-video-camera\": \"\\uf03d\",\n \"fa-photo\": \"\\uf03e\",\n \"fa-image\": \"\\uf03e\",\n \"fa-picture-o\": \"\\uf03e\",\n \"fa-pencil\": \"\\uf040\",\n \"fa-map-marker\": \"\\uf041\",\n \"fa-adjust\": \"\\uf042\",\n \"fa-tint\": \"\\uf043\",\n \"fa-edit\": \"\\uf044\",\n \"fa-pencil-square-o\": \"\\uf044\",\n \"fa-share-square-o\": \"\\uf045\",\n \"fa-check-square-o\": \"\\uf046\",\n \"fa-arrows\": \"\\uf047\",\n \"fa-step-backward\": \"\\uf048\",\n \"fa-fast-backward\": \"\\uf049\",\n \"fa-backward\": \"\\uf04a\",\n \"fa-play\": \"\\uf04b\",\n \"fa-pause\": \"\\uf04c\",\n \"fa-stop\": \"\\uf04d\",\n \"fa-forward\": \"\\uf04e\",\n \"fa-fast-forward\": \"\\uf050\",\n \"fa-step-forward\": \"\\uf051\",\n \"fa-eject\": \"\\uf052\",\n \"fa-chevron-left\": \"\\uf053\",\n \"fa-chevron-right\": \"\\uf054\",\n \"fa-plus-circle\": \"\\uf055\",\n \"fa-minus-circle\": \"\\uf056\",\n \"fa-times-circle\": \"\\uf057\",\n \"fa-check-circle\": \"\\uf058\",\n \"fa-question-circle\": \"\\uf059\",\n \"fa-info-circle\": \"\\uf05a\",\n \"fa-crosshairs\": \"\\uf05b\",\n \"fa-times-circle-o\": \"\\uf05c\",\n \"fa-check-circle-o\": \"\\uf05d\",\n \"fa-ban\": \"\\uf05e\",\n \"fa-arrow-left\": \"\\uf060\",\n \"fa-arrow-right\": \"\\uf061\",\n \"fa-arrow-up\": \"\\uf062\",\n \"fa-arrow-down\": \"\\uf063\",\n \"fa-mail-forward\": \"\\uf064\",\n \"fa-share\": \"\\uf064\",\n \"fa-expand\": \"\\uf065\",\n \"fa-compress\": \"\\uf066\",\n \"fa-plus\": \"\\uf067\",\n \"fa-minus\": \"\\uf068\",\n \"fa-asterisk\": \"\\uf069\",\n \"fa-exclamation-circle\": \"\\uf06a\",\n \"fa-gift\": \"\\uf06b\",\n \"fa-leaf\": \"\\uf06c\",\n \"fa-fire\": \"\\uf06d\",\n \"fa-eye\": \"\\uf06e\",\n \"fa-eye-slash\": \"\\uf070\",\n \"fa-warning\": \"\\uf071\",\n \"fa-exclamation-triangle\": \"\\uf071\",\n \"fa-plane\": \"\\uf072\",\n \"fa-calendar\": \"\\uf073\",\n \"fa-random\": \"\\uf074\",\n \"fa-comment\": \"\\uf075\",\n \"fa-magnet\": \"\\uf076\",\n \"fa-chevron-up\": \"\\uf077\",\n \"fa-chevron-down\": \"\\uf078\",\n \"fa-retweet\": \"\\uf079\",\n \"fa-shopping-cart\": \"\\uf07a\",\n \"fa-folder\": \"\\uf07b\",\n \"fa-folder-open\": \"\\uf07c\",\n \"fa-arrows-v\": \"\\uf07d\",\n \"fa-arrows-h\": \"\\uf07e\",\n \"fa-bar-t-o\": \"\\uf080\",\n \"fa-bar-t\": \"\\uf080\",\n \"fa-twitter-square\": \"\\uf081\",\n \"fa-facebook-square\": \"\\uf082\",\n \"fa-camera-retro\": \"\\uf083\",\n \"fa-key\": \"\\uf084\",\n \"fa-gears\": \"\\uf085\",\n \"fa-cogs\": \"\\uf085\",\n \"fa-comments\": \"\\uf086\",\n });\n\n\n }\n /**\n * This function compares controls\n *\n * @public\n * @function\n * @param {M.Control} control to compare\n * @api stable\n */\n equals(control) {\n return control instanceof StyleManagerControl;\n }\n}\n","export class ColorPickerPolyfill {\n static apply(window) {\n var document = window.document,\n nativeColorPicker = {\n // initialized flag\n started: false,\n\n // start color\n color: '#000000',\n\n // inputs where plugin was initialized\n inputs: {},\n\n // flag to know if color input is supported\n hasNativeColorSupport: false,\n\n // inits the plugin on specified input\n init: function(inputId) {\n // start the plugin\n this.start();\n\n if (this.hasNativeColorSupport) {\n return;\n }\n\n if (typeof inputId !== 'string') {\n throw 'inputId have to be a string id selector';\n }\n\n // set the input\n this.input = (this.inputs[inputId] = this.inputs[inputId]) || document.getElementById(inputId);\n\n if (!this.input) {\n throw 'There was no input found with id: \"' + inputId + '\"';\n }\n\n // input defaults\n this.input.value = this.color;\n this.input.unselectable = 'on';\n this.css(this.input, {\n backgroundColor: this.color,\n borderWidth: '0.4em 0.3em',\n width: '3em',\n cursor: 'default'\n });\n\n // register input event\n this.input.onfocus = function() {\n nativeColorPicker.onFocus(this.id);\n };\n },\n\n // initialize once\n start: function() {\n // is already started\n if (this.started) {\n return;\n }\n\n // test if browser has native support for color input\n try {\n this.hasNativeColorSupport = !!(document.createElement('input').type = 'color');\n } catch (e) {};\n\n // no native support...\n if (!this.hasNativeColorSupport) {\n // create object element\n var object_element = document.createElement('object');\n object_element.classid = 'clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b';\n // set attributes\n object_element.id = 'colorHelperObj';\n this.css(object_element, {\n width: '0',\n height: '0'\n });\n document.body.appendChild(object_element);\n }\n // mark as started\n this.started = true;\n },\n\n // destroys the plugin\n destroy: function(inputId) {\n var i;\n // destroy one input or all the plugin if no input id\n if (typeof inputId === 'string') {\n this.off(this.inputs[inputId]);\n } else {\n // remove helper object\n document.body.removeChild(document.getElementById('colorHelperObj'));\n // remove input events and styles\n for (i in this.inputs) {\n this.off(this.inputs[i]);\n }\n // mark not started\n this.started = false;\n }\n },\n\n off: function(input) {\n input.onfocus = null;\n this.css(input, {\n backgroundColor: '',\n borderWidth: '',\n width: '',\n cursor: ''\n });\n },\n\n // input focus function\n onFocus: function(inputId) {\n this.input = this.inputs[inputId];\n this.color = this.getColor();\n this.input.value = this.color;\n nativeColorPicker.css(this.input, {\n backgroundColor: this.color,\n color: this.color\n });\n this.input.blur();\n },\n\n // gets the color from the object\n // and normalize it\n getColor: function() {\n // get decimal color, (passing the previous one)\n // and change to hex\n let colorHelperObj = document.getElementById('colorHelperObj');\n var hex = colorHelperObj.ChooseColorDlg(this.color.replace(/#/, '')).toString(16);\n\n // add extra zeroes if hex number is less than 6 digits\n if (hex.length < 6) {\n var tmpstr = '000000'.substring(0, 6 - hex.length);\n hex = tmpstr.concat(hex);\n }\n\n return '#' + hex;\n },\n\n // set css properties\n css: function(el, props) {\n for (var prop in props) {\n el.style[prop] = props[prop];\n }\n }\n };\n\n // expose to global\n window.nativeColorPicker = nativeColorPicker;\n };\n}\n","/**\n * @module M/plugin/StyleManager\n */\nimport 'css/stylemanager.css';\nimport 'css/font-awesome.min.css';\nimport StyleManagerControl from './stylemanagerControl.js';\nimport {\n ColorPickerPolyfill\n}\n from './utils/colorpicker';\nimport 'templates/categorystyles.html';\nimport api from '../../api.json';\n\nexport default class StyleManager extends M.Plugin {\n\n /**\n * @classdesc\n * Main facade plugin object. This class creates a plugin\n * object which has an implementation Object\n *\n * @constructor\n * @extends {M.Plugin}\n * @param {Object} impl implementation object\n * @api stable\n */\n constructor(layer = null) {\n\n super();\n /**\n * Facade of the map\n * @private\n * @type {M.Map}\n */\n this.map_ = null;\n\n /**\n * Array of controls\n * @private\n * @type {Array}\n */\n this.controls_ = [];\n\n /**\n * Metadata from api.json\n * @private\n * @type {Object}\n */\n this.metadata_ = api.metadata;\n\n /**\n * @private\n * @type {M.ui.Panel}\n */\n this.panel_ = null;\n\n /**\n * @private\n * @type {M.layer.Vector}\n */\n this.layer_ = layer;\n\n ColorPickerPolyfill.apply(window);\n\n\n //helpers handlebars\n Handlebars.registerHelper('sum', function (n1, n2) {\n return n1 + n2;\n });\n\n Handlebars.registerHelper('neq', function (arg1, arg2, options) {\n if (!Object.equals(arg1, arg2)) {\n return options.fn(this);\n }\n return options.inverse(this);\n });\n\n Handlebars.registerHelper('unless', function (arg1, options) {\n if (!arg1) {\n return options.fn(this);\n }\n return options.inverse(this);\n });\n\n Handlebars.registerHelper('get', function (index, array) {\n return array[index];\n });\n\n Handlebars.registerHelper('uppercase', function (string) {\n return string.toUpperCase();\n });\n\n Handlebars.registerHelper('lowercase', function (string) {\n return string.toLowerCase();\n });\n\n M.utils.extends = M.utils.extendsObj;\n }\n\n /**\n * This function adds this plugin into the map\n *\n * @public\n * @function\n * @param {M.Map} map the map to add the plugin\n * @api stable\n */\n addTo(map) {\n this.controls_.push(new StyleManagerControl(this.layer_));\n this.map_ = map;\n this.panel_ = new M.ui.Panel(StyleManager.NAME, {\n 'collapsible': true,\n 'className': 'm-stylemanager',\n 'collapsedButtonClass': 'g-sigc-palette',\n 'position': M.ui.position.TL\n });\n this.panel_.addControls(this.controls_);\n map.addPanels(this.panel_);\n }\n\n /**\n * TODO\n */\n destroy() {\n this.map_.removeControls(this.controls_);\n [this.control_, this.panel_, this.map_] = [null, null, null];\n }\n\n get name() {\n return \"stylemanager\";\n }\n\n /**\n * This function gets metadata plugin\n *\n * @public\n * @function\n * @api stable\n */\n getMetadata(){\n return this.metadata_;\n }\n}\n","import M$plugin$StyleManager from './/facade/js/stylemanager';\n\nif (!window.M.plugin) window.M.plugin = {};\nwindow.M.plugin.StyleManager = M$plugin$StyleManager;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/stylemanager-2.0.5.ol.min.css b/dist/stylemanager.ol.min.css similarity index 100% rename from dist/stylemanager-2.0.5.ol.min.css rename to dist/stylemanager.ol.min.css diff --git a/dist/stylemanager.ol.min.js b/dist/stylemanager.ol.min.js new file mode 100644 index 0000000..38b7c39 --- /dev/null +++ b/dist/stylemanager.ol.min.js @@ -0,0 +1,59 @@ +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){ +/** + * chroma.js - JavaScript library for color conversions + * + * Copyright (c) 2011-2018, Gregor Aisch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name Gregor Aisch may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ------------------------------------------------------- + * + * chroma.js includes colors from colorbrewer2.org, which are released under + * the following license: + * + * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, + * and The Pennsylvania State University. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + * + * ------------------------------------------------------ + * + * Named colors are taken from X11 Color Names. + * http://www.w3.org/TR/css3-color/#svg-color + * + * @preserve + */ +e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),en?n:e},t={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:s,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==s(e[0])&&t?t.split("").filter(function(t){return void 0!==e[0][t]}).map(function(t){return e[0][t]}):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==s(e[t])?e[t].toLowerCase():null},PI:r,TWOPI:2*r,PITHIRD:r/3,DEG2RAD:r/180,RAD2DEG:180/r},o={format:{},autodetect:[]},c=l.last,d=l.clip_rgb,u=l.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if("object"===u(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=c(e),a=!1;if(!n){a=!0,o.sorted||(o.autodetect=o.autodetect.sort(function(e,t){return t.p-e.p}),o.sorted=!0);for(var i=0,s=o.autodetect;i4?e[4]:1;return 1===s?[0,0,0,r]:[n>=1?0:255*(1-n)*(1-s),a>=1?0:255*(1-a)*(1-s),i>=1?0:255*(1-i)*(1-s),r]},S=l.unpack,w=l.type;p.prototype.cmyk=function(){return m(this._rgb)},y.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["cmyk"])))},o.format.cmyk=k,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===w(e)&&4===e.length)return"cmyk"}});var _=l.unpack,O=l.last,L=function(e){return Math.round(100*e)/100},x=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=_(e,"hsla"),a=O(e)||"lsa";return n[0]=L(n[0]||0),n[1]=L(100*n[1])+"%",n[2]=L(100*n[2])+"%","hsla"===a||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,a="hsla"):n.length=3,a+"("+n.join(",")+")"},E=l.unpack,P=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=E(e,"rgba"))[0],a=e[1],i=e[2];n/=255,a/=255,i/=255;var s,r,l=Math.min(n,a,i),o=Math.max(n,a,i),c=(o+l)/2;return o===l?(s=0,r=Number.NaN):s=c<.5?(o-l)/(o+l):(o-l)/(2-o-l),n==o?r=(a-i)/(o-l):a==o?r=2+(i-n)/(o-l):i==o&&(r=4+(n-a)/(o-l)),(r*=60)<0&&(r+=360),e.length>3&&void 0!==e[3]?[r,s,c,e[3]]:[r,s,c]},q=l.unpack,A=l.last,T=Math.round,C=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=q(e,"rgba"),a=A(e)||"rgb";return"hsl"==a.substr(0,3)?x(P(n),a):(n[0]=T(n[0]),n[1]=T(n[1]),n[2]=T(n[2]),("rgba"===a||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,a="rgba"),a+"("+n.slice(0,"rgb"===a?3:4).join(",")+")")},M=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,j=/^#?([A-Fa-f0-9]{8})$/,N=function(e){if(e.match(M)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16),n=t>>16,a=t>>8&255,i=255&t;return[n,a,i,1]}if(e.match(j)){9===e.length&&(e=e.substr(1));var s=parseInt(e,16),r=s>>24&255,l=s>>16&255,o=s>>8&255,c=Math.round((255&s)/255*100)/100;return[r,l,o,c]}throw new Error("unknown hex color: "+e)},F=l.unpack,I=Math.round,R=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var a,i,s,r=(t=F(t,"hsl"))[0],l=t[1],o=t[2];if(0===l)a=i=s=255*o;else{var c=[0,0,0],d=[0,0,0],u=o<.5?o*(1+l):o+l-o*l,f=2*o-u,p=r/360;c[0]=p+1/3,c[1]=p,c[2]=p-1/3;for(var v=0;v<3;v++)c[v]<0&&(c[v]+=1),c[v]>1&&(c[v]-=1),6*c[v]<1?d[v]=f+6*(u-f)*c[v]:2*c[v]<1?d[v]=u:3*c[v]<2?d[v]=f+(u-f)*(2/3-c[v])*6:d[v]=f;e=[I(255*d[0]),I(255*d[1]),I(255*d[2])],a=e[0],i=e[1],s=e[2]}return t.length>3?[a,i,s,t[3]]:[a,i,s,1]},D={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},B=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,z=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,G=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,U=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,V=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,H=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Y=Math.round,K=function(e){if(e=e.toLowerCase().trim(),D[e])return N(D[e]);var t;if(t=e.match(B)){for(var n=t.slice(1,4),a=0;a<3;a++)n[a]=+n[a];return n[3]=1,n}if(t=e.match(z)){for(var i=t.slice(1,5),s=0;s<4;s++)i[s]=+i[s];return i}if(t=e.match(G)){for(var r=t.slice(1,4),l=0;l<3;l++)r[l]=Y(2.55*r[l]);return r[3]=1,r}if(t=e.match(U)){for(var o=t.slice(1,5),c=0;c<3;c++)o[c]=Y(2.55*o[c]);return o[3]=+o[3],o}if(t=e.match(V)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var u=R(d);return u[3]=1,u}if(t=e.match(H)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=R(f);return p[3]=+t[4],p}};K.test=function(e){return B.test(e)||z.test(e)||G.test(e)||U.test(e)||V.test(e)||H.test(e)};var X=K,J=l.type;p.prototype.css=function(e){return C(this._rgb,e)},y.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["css"])))},o.format.css=X,o.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===J(e)&&X.test(e))return"css"}});var W=l.unpack;o.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=W(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},y.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["gl"])))},p.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var $=l.unpack,Q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=$(e,"rgb"),i=a[0],s=a[1],r=a[2],l=Math.min(i,s,r),o=Math.max(i,s,r),c=o-l,d=100*c/255,u=l/(255-c)*100;return 0===c?n=Number.NaN:(i===o&&(n=(s-r)/c),s===o&&(n=2+(r-i)/c),r===o&&(n=4+(i-s)/c),(n*=60)<0&&(n+=360)),[n,d,u]},Z=l.unpack,ee=Math.floor,te=function(){for(var e,t,n,a,i,s,r=[],l=arguments.length;l--;)r[l]=arguments[l];var o,c,d,u=(r=Z(r,"hcg"))[0],f=r[1],p=r[2];p*=255;var v=255*f;if(0===f)o=c=d=p;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var y=ee(u/=60),g=u-y,h=p*(1-f),m=h+v*(1-g),b=h+v*g,k=h+v;switch(y){case 0:o=(e=[k,b,h])[0],c=e[1],d=e[2];break;case 1:o=(t=[m,k,h])[0],c=t[1],d=t[2];break;case 2:o=(n=[h,k,b])[0],c=n[1],d=n[2];break;case 3:o=(a=[h,m,k])[0],c=a[1],d=a[2];break;case 4:o=(i=[b,h,k])[0],c=i[1],d=i[2];break;case 5:o=(s=[k,h,m])[0],c=s[1],d=s[2]}}return[o,c,d,r.length>3?r[3]:1]},ne=l.unpack,ae=l.type;p.prototype.hcg=function(){return Q(this._rgb)},y.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcg"])))},o.format.hcg=te,o.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ne(e,"hcg"),"array"===ae(e)&&3===e.length)return"hcg"}});var ie=l.unpack,se=l.last,re=Math.round,le=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ie(e,"rgba"),a=n[0],i=n[1],s=n[2],r=n[3],l=se(e)||"auto";void 0===r&&(r=1),"auto"===l&&(l=r<1?"rgba":"rgb"),a=re(a),i=re(i),s=re(s);var o=a<<16|i<<8|s,c="000000"+o.toString(16);c=c.substr(c.length-6);var d="0"+re(255*r).toString(16);switch(d=d.substr(d.length-2),l.toLowerCase()){case"rgba":return"#"+c+d;case"argb":return"#"+d+c;default:return"#"+c}},oe=l.type;p.prototype.hex=function(e){return le(this._rgb,e)},y.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},o.format.hex=N,o.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===oe(e)&&[3,4,6,7,8,9].includes(e.length))return"hex"}});var ce=l.unpack,de=l.TWOPI,ue=Math.min,fe=Math.sqrt,pe=Math.acos,ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=ce(e,"rgb"),i=a[0],s=a[1],r=a[2],l=ue(i/=255,s/=255,r/=255),o=(i+s+r)/3,c=o>0?1-l/o:0;return 0===c?n=NaN:(n=(i-s+(i-r))/2,n/=fe((i-s)*(i-s)+(i-r)*(s-r)),n=pe(n),r>s&&(n=de-n),n/=de),[360*n,c,o]},ye=l.unpack,ge=l.limit,he=l.TWOPI,me=l.PITHIRD,be=Math.cos,ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s=(e=ye(e,"hsi"))[0],r=e[1],l=e[2];return isNaN(s)&&(s=0),isNaN(r)&&(r=0),s>360&&(s-=360),s<0&&(s+=360),(s/=360)<1/3?(i=(1-r)/3,n=(1+r*be(he*s)/be(me-he*s))/3,a=1-(i+n)):s<2/3?(n=(1-r)/3,a=(1+r*be(he*(s-=1/3))/be(me-he*s))/3,i=1-(n+a)):(a=(1-r)/3,i=(1+r*be(he*(s-=2/3))/be(me-he*s))/3,n=1-(a+i)),n=ge(l*n*3),a=ge(l*a*3),i=ge(l*i*3),[255*n,255*a,255*i,e.length>3?e[3]:1]},Se=l.unpack,we=l.type;p.prototype.hsi=function(){return ve(this._rgb)},y.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsi"])))},o.format.hsi=ke,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Se(e,"hsi"),"array"===we(e)&&3===e.length)return"hsi"}});var _e=l.unpack,Oe=l.type;p.prototype.hsl=function(){return P(this._rgb)},y.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsl"])))},o.format.hsl=R,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=_e(e,"hsl"),"array"===Oe(e)&&3===e.length)return"hsl"}});var Le=l.unpack,xe=Math.min,Ee=Math.max,Pe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s=(e=Le(e,"rgb"))[0],r=e[1],l=e[2],o=xe(s,r,l),c=Ee(s,r,l),d=c-o;return i=c/255,0===c?(n=Number.NaN,a=0):(a=d/c,s===c&&(n=(r-l)/d),r===c&&(n=2+(l-s)/d),l===c&&(n=4+(s-r)/d),(n*=60)<0&&(n+=360)),[n,a,i]},qe=l.unpack,Ae=Math.floor,Te=function(){for(var e,t,n,a,i,s,r=[],l=arguments.length;l--;)r[l]=arguments[l];var o,c,d,u=(r=qe(r,"hsv"))[0],f=r[1],p=r[2];if(p*=255,0===f)o=c=d=p;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var v=Ae(u/=60),y=u-v,g=p*(1-f),h=p*(1-f*y),m=p*(1-f*(1-y));switch(v){case 0:o=(e=[p,m,g])[0],c=e[1],d=e[2];break;case 1:o=(t=[h,p,g])[0],c=t[1],d=t[2];break;case 2:o=(n=[g,p,m])[0],c=n[1],d=n[2];break;case 3:o=(a=[g,h,p])[0],c=a[1],d=a[2];break;case 4:o=(i=[m,g,p])[0],c=i[1],d=i[2];break;case 5:o=(s=[p,g,h])[0],c=s[1],d=s[2]}}return[o,c,d,r.length>3?r[3]:1]},Ce=l.unpack,Me=l.type;p.prototype.hsv=function(){return Pe(this._rgb)},y.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsv"])))},o.format.hsv=Te,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ce(e,"hsv"),"array"===Me(e)&&3===e.length)return"hsv"}});var je={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ne=l.unpack,Fe=Math.pow,Ie=function(e){return(e/=255)<=.04045?e/12.92:Fe((e+.055)/1.055,2.4)},Re=function(e){return e>je.t3?Fe(e,1/3):e/je.t2+je.t0},De=function(e,t,n){e=Ie(e),t=Ie(t),n=Ie(n);var a=Re((.4124564*e+.3575761*t+.1804375*n)/je.Xn),i=Re((.2126729*e+.7151522*t+.072175*n)/je.Yn),s=Re((.0193339*e+.119192*t+.9503041*n)/je.Zn);return[a,i,s]},Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ne(e,"rgb"),a=n[0],i=n[1],s=n[2],r=De(a,i,s),l=r[0],o=r[1],c=r[2],d=116*o-16;return[d<0?0:d,500*(l-o),200*(o-c)]},ze=l.unpack,Ge=Math.pow,Ue=function(e){return 255*(e<=.00304?12.92*e:1.055*Ge(e,1/2.4)-.055)},Ve=function(e){return e>je.t1?e*e*e:je.t2*(e-je.t0)},He=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,i,s,r,l,o=(e=ze(e,"lab"))[0],c=e[1],d=e[2];return a=(o+16)/116,n=isNaN(c)?a:a+c/500,i=isNaN(d)?a:a-d/200,a=je.Yn*Ve(a),n=je.Xn*Ve(n),i=je.Zn*Ve(i),s=Ue(3.2404542*n-1.5371385*a-.4985314*i),r=Ue(-.969266*n+1.8760108*a+.041556*i),l=Ue(.0556434*n-.2040259*a+1.0572252*i),[s,r,l,e.length>3?e[3]:1]},Ye=l.unpack,Ke=l.type;p.prototype.lab=function(){return Be(this._rgb)},y.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lab"])))},o.format.lab=He,o.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ye(e,"lab"),"array"===Ke(e)&&3===e.length)return"lab"}});var Xe=l.unpack,Je=l.RAD2DEG,We=Math.sqrt,$e=Math.atan2,Qe=Math.round,Ze=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Xe(e,"lab"),a=n[0],i=n[1],s=n[2],r=We(i*i+s*s),l=($e(s,i)*Je+360)%360;return 0===Qe(1e4*r)&&(l=Number.NaN),[a,r,l]},et=l.unpack,tt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"rgb"),a=n[0],i=n[1],s=n[2],r=Be(a,i,s),l=r[0],o=r[1],c=r[2];return Ze(l,o,c)},nt=l.unpack,at=l.DEG2RAD,it=Math.sin,st=Math.cos,rt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=nt(e,"lch"),a=n[0],i=n[1],s=n[2];return isNaN(s)&&(s=0),[a,st(s*=at)*i,it(s)*i]},lt=l.unpack,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=lt(e,"lch"))[0],a=e[1],i=e[2],s=rt(n,a,i),r=s[0],l=s[1],o=s[2],c=He(r,l,o),d=c[0],u=c[1],f=c[2];return[d,u,f,e.length>3?e[3]:1]},ct=l.unpack,dt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ct(e,"hcl").reverse();return ot.apply(void 0,n)},ut=l.unpack,ft=l.type;p.prototype.lch=function(){return tt(this._rgb)},p.prototype.hcl=function(){return tt(this._rgb).reverse()},y.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lch"])))},y.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcl"])))},o.format.lch=ot,o.format.hcl=dt,["lch","hcl"].forEach(function(e){return o.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=ut(t,e),"array"===ft(t)&&3===t.length)return e}})});var pt=l.type;p.prototype.name=function(){for(var e=le(this._rgb,"rgb"),t=0,n=Object.keys(D);t0;)t[n]=arguments[n+1];if(!t.length&&"string"===pt(e)&&D[e.toLowerCase()])return"named"}});var vt=l.unpack,yt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=vt(e,"rgb"),a=n[0],i=n[1],s=n[2];return(a<<16)+(i<<8)+s},gt=l.type,ht=function(e){if("number"==gt(e)&&e>=0&&e<=16777215){var t=e>>16,n=e>>8&255,a=255&e;return[t,n,a,1]}throw new Error("unknown num color: "+e)},mt=l.type;p.prototype.num=function(){return yt(this._rgb)},y.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},o.format.num=ht,o.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===mt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var bt=l.unpack,kt=l.type,St=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(St)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map(function(t,n){return n<3?!1===e?t:St(t):t})},y.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},o.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=bt(e,"rgba");return void 0===n[3]&&(n[3]=1),n},o.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=bt(e,"rgba"),"array"===kt(e)&&(3===e.length||4===e.length&&"number"==kt(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var wt=Math.log,_t=function(e){var t,n,a,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*wt(n),a=i<20?0:.8274096064007395*(a=i-10)-254.76935184120902+115.67994401066147*wt(a)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*wt(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*wt(n),a=255),[t,n,a,1]},Ot=l.unpack,Lt=Math.round,xt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,a=Ot(e,"rgb"),i=a[0],s=a[2],r=1e3,l=4e4;l-r>.4;){var o=_t(n=.5*(l+r));o[2]/o[0]>=s/i?l=n:r=n}return Lt(n)};p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return xt(this._rgb)},y.temp=y.kelvin=y.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},o.format.temp=o.format.kelvin=o.format.temperature=_t;var Et=l.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Et(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=je.Kn*e,new p(t,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),n=t[0],a=t[1],i=this[n]();if(a){var s=n.indexOf(a);if(s>-1)return i[s];throw new Error("unknown channel "+a+" in mode "+n)}return i};var Pt=l.type,qt=Math.pow;p.prototype.luminance=function(e){if(void 0!==e&&"number"===Pt(e)){if(0===e)return new p([0,0,0,this._rgb[3]],"rgb");if(1===e)return new p([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,a=function(t,i){var s=t.interpolate(i,.5,"rgb"),r=s.luminance();return Math.abs(e-r)<1e-7||!n--?s:r>e?a(t,s):a(s,i)},i=(t>e?a(new p([0,0,0]),this):a(this,new p([255,255,255]))).rgb();return new p(i.concat([this._rgb[3]]))}return At.apply(void 0,this._rgb.slice(0,3))};var At=function(e,t,n){return e=Tt(e),t=Tt(t),n=Tt(n),.2126*e+.7152*t+.0722*n},Tt=function(e){return(e/=255)<=.03928?e/12.92:qt((e+.055)/1.055,2.4)},Ct={},Mt=l.type,jt=function(e,t,n){void 0===n&&(n=.5);for(var a=[],i=arguments.length-3;i-- >0;)a[i]=arguments[i+3];var s=a[0]||"lrgb";if(Ct[s]||a.length||(s=Object.keys(Ct)[0]),!Ct[s])throw new Error("interpolation mode "+s+" is not defined");return"object"!==Mt(e)&&(e=new p(e)),"object"!==Mt(t)&&(t=new p(t)),Ct[s](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};p.prototype.mix=p.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],a=arguments.length-2;a-- >0;)n[a]=arguments[a+2];return jt.apply(void 0,[this,e,t].concat(n))},p.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new p([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},p.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=je.Kn*e,t[1]<0&&(t[1]=0),new p(t,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Nt=l.type;p.prototype.set=function(e,t,n){void 0===n&&(n=!1);var a=e.split("."),i=a[0],s=a[1],r=this[i]();if(s){var l=i.indexOf(s);if(l>-1){if("string"==Nt(t))switch(t.charAt(0)){case"+":case"-":r[l]+=+t;break;case"*":r[l]*=+t.substr(1);break;case"/":r[l]/=+t.substr(1);break;default:r[l]=+t}else{if("number"!==Nt(t))throw new Error("unsupported value for Color.set");r[l]=t}var o=new p(r,i);return n?(this._rgb=o._rgb,this):o}throw new Error("unknown channel "+s+" in mode "+i)}return r},Ct.rgb=function(e,t,n){var a=e._rgb,i=t._rgb;return new p(a[0]+n*(i[0]-a[0]),a[1]+n*(i[1]-a[1]),a[2]+n*(i[2]-a[2]),"rgb")};var Ft=Math.sqrt,It=Math.pow;Ct.lrgb=function(e,t,n){var a=e._rgb,i=a[0],s=a[1],r=a[2],l=t._rgb,o=l[0],c=l[1],d=l[2];return new p(Ft(It(i,2)*(1-n)+It(o,2)*n),Ft(It(s,2)*(1-n)+It(c,2)*n),Ft(It(r,2)*(1-n)+It(d,2)*n),"rgb")},Ct.lab=function(e,t,n){var a=e.lab(),i=t.lab();return new p(a[0]+n*(i[0]-a[0]),a[1]+n*(i[1]-a[1]),a[2]+n*(i[2]-a[2]),"lab")};var Rt=function(e,t,n,a){var i,s,r,l,o,c,d,u,f,v,y,g;return"hsl"===a?(r=e.hsl(),l=t.hsl()):"hsv"===a?(r=e.hsv(),l=t.hsv()):"hcg"===a?(r=e.hcg(),l=t.hcg()):"hsi"===a?(r=e.hsi(),l=t.hsi()):"lch"!==a&&"hcl"!==a||(a="hcl",r=e.hcl(),l=t.hcl()),"h"===a.substr(0,1)&&(o=(i=r)[0],d=i[1],f=i[2],c=(s=l)[0],u=s[1],v=s[2]),isNaN(o)||isNaN(c)?isNaN(o)?isNaN(c)?g=Number.NaN:(g=c,1!=f&&0!=f||"hsv"==a||(y=u)):(g=o,1!=v&&0!=v||"hsv"==a||(y=d)):g=o+n*(c>o&&c-o>180?c-(o+360):c180?c+360-o:c-o),void 0===y&&(y=d+n*(u-d)),new p([g,y,f+n*(v-f)],a)},Dt=function(e,t,n){return Rt(e,t,n,"lch")};Ct.lch=Dt,Ct.hcl=Dt,Ct.num=function(e,t,n){var a=e.num(),i=t.num();return new p(a+n*(i-a),"num")},Ct.hcg=function(e,t,n){return Rt(e,t,n,"hcg")},Ct.hsi=function(e,t,n){return Rt(e,t,n,"hsi")},Ct.hsl=function(e,t,n){return Rt(e,t,n,"hsl")},Ct.hsv=function(e,t,n){return Rt(e,t,n,"hsv")};var Bt=l.clip_rgb,zt=Math.pow,Gt=Math.sqrt,Ut=Math.PI,Vt=Math.cos,Ht=Math.sin,Yt=Math.atan2,Kt=function(e){for(var t=e.length,n=1/t,a=[0,0,0,0],i=0,s=e;i.9999999&&(a[3]=1),new p(Bt(a))},Xt=l.type,Jt=Math.pow,Wt=function(e){var t="rgb",n=y("#ccc"),a=0,i=[0,1],s=[],r=[0,0],l=!1,o=[],c=!1,d=0,u=1,f=!1,p={},v=!0,g=1,h=function(e){if((e=e||["#fff","#000"])&&"string"===Xt(e)&&y.brewer&&y.brewer[e.toLowerCase()]&&(e=y.brewer[e.toLowerCase()]),"array"===Xt(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2){var f=function(e){if(null!=l){for(var t=l.length-1,n=0;n=l[n];)n++;return n-1}return 0}(e);c=f/(l.length-2)}else c=u!==d?(e-d)/(u-d):1;a||(c=m(c)),1!==g&&(c=Jt(c,g)),c=r[0]+c*(1-r[0]-r[1]),c=Math.min(1,Math.max(0,c));var h=Math.floor(1e4*c);if(v&&p[h])i=p[h];else{if("array"===Xt(o))for(var b=0;b=k&&b===s.length-1){i=o[b];break}if(c>k&&cn,i=b(e,!0).lab()[0],s=t+(n-t)*e,r=i-s,l=0,o=1,c=20;Math.abs(r)>.01&&c-- >0;)a&&(r*=-1),r<0?(l=e,e+=.5*(o-e)):(o=e,e+=.5*(l-e)),i=b(e,!0).lab()[0],r=i-s;return e}:function(e){return e},S},S.padding=function(e){return null!=e?("number"===Xt(e)&&(e=[e,e]),r=e,S):r},S.colors=function(t,n){arguments.length<2&&(n="hex");var a=[];if(0===arguments.length)a=o.slice(0);else if(1===t)a=[S(.5)];else if(t>1){var s=i[0],r=i[1]-s;a=function(e,t,n){for(var a=[],i=es;i?r++:r--)a.push(r);return a}(0,t,!1).map(function(e){return S(s+e/(t-1)*r)})}else{e=[];var c=[];if(l&&l.length>2)for(var d=1,u=l.length,f=1<=u;f?du;f?d++:d--)c.push(.5*(l[d-1]+l[d]));else c=i;a=c.map(function(e){return S(e)})}return y[n]&&(a=a.map(function(e){return e[n]()})),a},S.cache=function(e){return null!=e?(v=e,S):v},S.gamma=function(e){return null!=e?(g=e,S):g},S.nodata=function(e){return null!=e?(n=y(e),S):n},S},$t=function(e){var t,n,a,i,s,r,l;if(2===(e=e.map(function(e){return new p(e)})).length)t=e.map(function(e){return e.lab()}),s=t[0],r=t[1],i=function(e){var t=[0,1,2].map(function(t){return s[t]+e*(r[t]-s[t])});return new p(t,"lab")};else if(3===e.length)n=e.map(function(e){return e.lab()}),s=n[0],r=n[1],l=n[2],i=function(e){var t=[0,1,2].map(function(t){return(1-e)*(1-e)*s[t]+2*(1-e)*e*r[t]+e*e*l[t]});return new p(t,"lab")};else if(4===e.length){var o;a=e.map(function(e){return e.lab()}),s=a[0],r=a[1],l=a[2],o=a[3],i=function(e){var t=[0,1,2].map(function(t){return(1-e)*(1-e)*(1-e)*s[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*l[t]+e*e*e*o[t]});return new p(t,"lab")}}else if(5===e.length){var c=$t(e.slice(0,3)),d=$t(e.slice(2,5));i=function(e){return e<.5?c(2*e):d(2*(e-.5))}}return i},Qt=function(e,t,n){if(!Qt[n])throw new Error("unknown blend mode "+n);return Qt[n](e,t)},Zt=function(e){return function(t,n){var a=y(n).rgb(),i=y(t).rgb();return y.rgb(e(a,i))}},en=function(e){return function(t,n){var a=[];return a[0]=e(t[0],n[0]),a[1]=e(t[1],n[1]),a[2]=e(t[2],n[2]),a}};Qt.normal=Zt(en(function(e){return e})),Qt.multiply=Zt(en(function(e,t){return e*t/255})),Qt.screen=Zt(en(function(e,t){return 255*(1-(1-e/255)*(1-t/255))})),Qt.overlay=Zt(en(function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))})),Qt.darken=Zt(en(function(e,t){return e>t?t:e})),Qt.lighten=Zt(en(function(e,t){return e>t?e:t})),Qt.dodge=Zt(en(function(e,t){return 255===e?255:(e=t/255*255/(1-e/255))>255?255:e})),Qt.burn=Zt(en(function(e,t){return 255*(1-(1-t/255)/(e/255))}));for(var tn=Qt,nn=l.type,an=l.clip_rgb,sn=l.TWOPI,rn=Math.pow,ln=Math.sin,on=Math.cos,cn=Math.floor,dn=Math.random,un=Math.log,fn=Math.pow,pn=Math.floor,vn=Math.abs,yn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===s(e)&&(e=Object.values(e)),e.forEach(function(e){t&&"object"===s(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,en.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=function(e,t){return gn(n,e,t)},n},gn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==s(e)&&(e=yn(e));var a=e.min,i=e.max,r=e.values.sort(function(e,t){return e-t});if(1===n)return[a,i];var l=[];if("c"===t.substr(0,1)&&(l.push(a),l.push(i)),"e"===t.substr(0,1)){l.push(a);for(var o=1;o 0");var c=Math.LOG10E*un(a),d=Math.LOG10E*un(i);l.push(a);for(var u=1;u200&&(k=!1)}for(var F={},I=0;I=360;)f-=360;i[u]=f}else i[u]=i[u]/s[u];return d/=n,new p(i,t).alpha(d>.99999?1:d,!0)},y.bezier=function(e){var t=$t(e);return t.scale=function(){return Wt(t)},t},y.blend=tn,y.cubehelix=function(e,t,n,a,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===a&&(a=1),void 0===i&&(i=[0,1]);var s,r=0;"array"===nn(i)?s=i[1]-i[0]:(s=0,i=[i,i]);var l=function(l){var o=sn*((e+120)/360+t*l),c=rn(i[0]+s*l,a),d=0!==r?n[0]+l*r:n,u=d*c*(1-c)/2,f=on(o),p=ln(o),v=c+u*(-.14861*f+1.78277*p),g=c+u*(-.29227*f-.90649*p),h=c+u*(1.97294*f);return y(an([255*v,255*g,255*h,1]))};return l.start=function(t){return null==t?e:(e=t,l)},l.rotations=function(e){return null==e?t:(t=e,l)},l.gamma=function(e){return null==e?a:(a=e,l)},l.hue=function(e){return null==e?n:("array"===nn(n=e)?0==(r=n[1]-n[0])&&(n=n[1]):r=0,l)},l.lightness=function(e){return null==e?i:("array"===nn(e)?(i=e,s=e[1]-e[0]):(i=[e,e],s=0),l)},l.scale=function(){return y.scale(l)},l.hue(n),l},y.mix=y.interpolate=jt,y.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(cn(16*dn()));return new p(e,"hex")},y.scale=Wt,y.analyze=hn.analyze,y.contrast=function(e,t){e=new p(e),t=new p(t);var n=e.luminance(),a=t.luminance();return n>a?(n+.05)/(a+.05):(a+.05)/(n+.05)},y.deltaE=function(e,t,n,a){void 0===n&&(n=1),void 0===a&&(a=1),e=new p(e),t=new p(t);for(var i=Array.from(e.lab()),s=i[0],r=i[1],l=i[2],o=Array.from(t.lab()),c=o[0],d=o[1],u=o[2],f=mn(r*r+l*l),v=mn(d*d+u*u),y=s<16?.511:.040975*s/(1+.01765*s),g=.0638*f/(1+.0131*f)+.638,h=f<1e-6?0:180*bn(l,r)/wn;h<0;)h+=360;for(;h>=360;)h-=360;var m=h>=164&&h<=345?.56+kn(.2*Sn(wn*(h+168)/180)):.36+kn(.4*Sn(wn*(h+35)/180)),b=f*f*f*f,k=mn(b/(b+1900)),S=g*(k*m+1-k),w=f-v,_=r-d,O=l-u,L=(s-c)/(n*y),x=w/(a*g);return mn(L*L+x*x+(_*_+O*O-w*w)/(S*S))},y.distance=function(e,t,n){void 0===n&&(n="lab"),e=new p(e),t=new p(t);var a=e.get(n),i=t.get(n),s=0;for(var r in a){var l=(a[r]||0)-(i[r]||0);s+=l*l}return Math.sqrt(s)},y.limits=hn.limits,y.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(p,[null].concat(e))),!0}catch(e){return!1}},y.scales=_n,y.colors=D,y.brewer=Pn,y}()},function(e,t){e.exports='
\n \x3c!-- Fill options --\x3e\n
\n
Opciones generales
\n
\n\n
\n
\n Color:\n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
Opciones de punto
\n\n
\n
\n Radio:\n \n
\n
\n\n
Opciones de línea
\n\n
\n
\n Ancho:\n \n
\n
\n \x3c!-- Polygon Pattern --\x3e\n
Opciones de patrón de polígono
\n\n
\n
\n Patrón\n \n
\n
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Tamaño:\n \n
\n\n
\n Espacio:\n \n
\n
\n\n
\n
\n Rotación:\n \n
\n\n
\n Escala:\n \n
\n
\n
\n
\n Offset:\n \n
\n
\n
\n
\n\n \x3c!-- Stroke options --\x3e\n
\n
Opciones
\n
\n
\n
\n Color:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Linedash:\n \n  \n \n
\n\n
\n Linedash Offset:\n \n
\n
\n\n
\n\n
\n Line Cap\n \n
\n\n
\n Line Join:\n \n
\n\n
\n
\n
\n\n \x3c!-- Label options --\x3e\n
\n
Opciones
\n
\n
\n
\n Color\n \n
\n
\n Texto:\n \n
\n
\n\n
\n
\n Fuente:\n \n
\n
\n Tamaño:\n \n
\n
\n\n
\n
\n Alineación horizontal:\n \n
\n\n
\n Alineación vertical:\n \n
\n\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación\n \n
\n\n
\n\n
\n\n
\n Escala:\n \n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n\n \x3c!-- TextPath Options --\x3e\n\n
\n\n
\n Ajustar a geometría\n \n
\n\n
\n Ancho Mínimo:\n \n
\n\n
\n\n
\n\n
\n Suavizar\n \n
\n\n
\n Desbordar:\n \n
\n\n
\n\n \x3c!-- Stroke Label --\x3e\n
Trazo de etiqueta:
\n
\n\n
\n Trazo\n \n
\n\n
\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n\n
\n Line Dash:\n \n  \n \n
\n\n
\n Offset:\n \n
\n\n
\n\n
\n\n
\n Line Cap:\n \n
\n\n
\n Line Join:\n \n
\n
\n\n
\n
\n\n \x3c!-- Icon Options --\x3e\n
\n
Opciones
\n
\n \x3c!-- Point Icon --\x3e\n
\n
\n URL:\n \n
\n
\n Tamaño:\n \n  \n \n
\n
\n\n
\n
\n Snap to pixel\n \n
\n
\n\n
\n
\n Anclaje:\n \n  \n \n
\n
\n Escala:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n\n \x3c!-- Form Options --\x3e\n
\n
Opciones
\n
\n\n \x3c!-- Point Font --\x3e\n
\n\n
\n bkColor:\n \n
\n\n
\n\n
\n\n
\n Forma:\n \n
\n\n
\n Familia:\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n\n
\n\n
\n Radio:\n \n
\n\n
\n Tamaño icono:\n \n
\n\n\n
\n\n
\n\n
\n Gradiente\n \n
\n\n
\n Color de icono:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n
\n\n'},function(e,t){e.exports='
\n {{#each attributes}}\n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n \n \n \n \n \n {{#each values}}\n \n \n \n \n {{/each}} {{#if attributeExists}}\n \n \n \n \n {{/if}}\n
Valor de atributoPrevisualización
{{this.name}}
Otros
\n
\n'},function(e,t){e.exports='
\n
\n
    \n
  • \n
    \n \n \n \n
    \n
  • \n
\n\n
\n \n \n \n\n \x3c!-- submenu --\x3e\n
\n
\n\n \x3c!-- fin submenu --\x3e\n\n \n \n \n\n \n \n \n\n \n \n \n\n
\n
\n\n \n \n \n\n \n \n \n\n \n \n \n
\n\n\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n
\n Atributos:\n \n
\n
\n
\n
\n Radio mínimo:\n \n
\n
\n Radio máximo:\n \n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n \x3c!-- Ranges Options --\x3e\n
\n
Rangos
\n
\n\n
\n
\n Número de rangos:\n \n
\n
\n
\n {{#each ranges}}\n
\n
Rango {{#sum @index 1}}{{/sum}}
\n
\n
\n Desde:\n \n
\n
\n Hasta:\n \n
\n
\n
\n
\n Relleno:\n \n
\n
\n Opacidad:\n \n
\n
\n
\n
\n Borde:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n
\n {{/each}} {{#pages}}\n
\n
Rango {{id}}
\n
\n
\n Desde:\n \n
\n
\n Hasta:\n \n
\n
\n
\n
\n Relleno:\n \n
\n
\n Opacidad:\n \n
\n
\n
\n
\n Borde:\n \n
\n
\n Ancho:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n
\n {{/pages}}\n
\n\n
\n
    \n {{#each ranges}}\n
  • {{#sum @index 1}}{{/sum}}
  • \n {{/each}} {{#each pages}}\n
  • {{id}}
  • \n {{/each}}\n\n
\n
\n\n
\n
\n \x3c!-- Vendor Options --\x3e\n
\n
Opciones
\n
\n\n
\n
\n Envoltura\n \n
\n
\n Cantidad\n \n
\n
\n\n
\n
\n Seleccionable\n \n
\n
\n Animado\n \n
\n
\n\n
\n
\n Distancia:\n \n
\n
\n Puntos:\n \n
\n
\n\n
\n
\n Distancia de abanico:\n \n
\n
\n Color de texto:\n \n
\n
\n\n
\n
\n
'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n\n
\n\n
\n Atributos:\n \n
\n\n
\n
\n\n
\n Algoritmo:\n \n
\n\n
\n Rangos:\n \n
\n
\n
Rampa de color
\n
\n
\n Inicial:\n \n
\n
\n Final:\n \n
\n
\n\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n\n
\n Atributo:\n \n
\n
\n\n
\n\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n
\n
\n Atributo:\n \n
\n
\n
\n
\n Gradiente:\n
\n {{#each gradient}}\n
\n \n \n
\n {{/each}}\n
\n
\n
\n \n \n
\n
\n\n
\n
\n Difuminado:\n \n
\n\n
\n Radio:\n \n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Eje X:\n \n
\n\n
\n Eje Y:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n\n
\n Radio de donut:\n \n
\n
\n\n
\n
\n Color 3D:\n \n
\n
\n\n
\n
\n
Atributos
\n
\n\n
\n Atributo:\n \n
\n\n
\n \n \n
\n
\n
\n
\n\n
\n
\n\n
\n
\n'},function(e,t){e.exports='
\n {{#each buttonsParams}}\n \n \n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n \n \n
\n'},function(e,t){e.exports='
\n {{#each buttonsParams}}\n \n \n {{/each}}\n
\n'},function(e,t){e.exports='
\n
\n
Opciones
\n
\n\n
\n
\n Color:\n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n
\n Radio:\n \n
\n
\n\n
\n
\n Ancho:\n \n
\n
\n \x3c!-- Polygon Pattern --\x3e\n
Opciones de patrón
\n\n
\n
\n Patrón\n \n
\n
\n\n
\n
\n Tipo:\n \n
\n\n
\n Color:\n \n
\n
\n\n
\n
\n Tamaño:\n \n
\n\n
\n Espacio:\n \n
\n
\n\n
\n
\n Rotación:\n \n
\n\n
\n Escala:\n \n
\n
\n
\n
\n Offset:\n \n
\n
\n
\n
\n\n \x3c!-- Stroke options --\x3e\n
\n
Opciones
\n
\n\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n
\n Linedash:\n \n  \n \n
\n\n
\n Linedash Offset:\n \n
\n
\n\n
\n\n
\n Line Cap\n \n
\n\n
\n Line Join\n \n
\n\n
\n
\n
\n\n \x3c!-- Label options --\x3e\n
\n
Opciones
\n
\n\n
\n\n
\n Color\n \n
\n\n
\n Texto:\n \n
\n
\n\n
\n\n
\n Fuente:\n \n
\n\n
\n Tamaño:\n \n
\n
\n\n
\n\n
\n Alineación horizontal:\n \n
\n\n
\n Alineación vertical:\n \n
\n\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n\n
\n Escala:\n \n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n\n \x3c!-- TextPath Options --\x3e\n\n
\n\n
\n Ajustar\n \n
\n\n
\n Ancho Mínimo:\n \n
\n\n
\n\n
\n\n
\n Suavizar\n \n
\n\n
\n Desbordar:\n \n
\n\n
\n\n \x3c!-- Stroke Label --\x3e\n
Trazo de etiqueta:
\n
\n\n
\n Trazo\n \n
\n\n
\n
\n\n
\n Color:\n \n
\n\n
\n Ancho:\n \n
\n\n
\n\n
\n\n
\n Line Dash:\n \n  \n \n
\n\n
\n Line Dash Offset:\n \n
\n\n
\n\n
\n\n
\n Line Cap:\n \n
\n\n
\n Line Join:\n \n
\n
\n\n
\n
\n\n \x3c!-- Icon Options --\x3e\n
\n
Opciones
\n\n
\n\n\n \x3c!-- Point Icon --\x3e\n
\n\n
\n URL\n \n
\n
\n Tamaño:\n \n  \n \n
\n\n\n
\n\n
\n\n\n
\n Snap to pixel\n \n
\n\n
\n\n
\n\n
\n Anclaje:\n \n  \n \n
\n\n
\n Escala:\n \n
\n
\n\n\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n\n \x3c!-- Form Options --\x3e\n
\n
Opciones
\n
\n\n \x3c!-- Point Font --\x3e\n
\n\n
\n bkColor:\n \n
\n\n
\n\n
\n\n
\n Forma:\n \n
\n\n
\n Familia:\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n\n
\n\n
\n Radio:\n \n
\n\n
\n Tamaño icono:\n \n
\n\n\n
\n\n
\n\n
\n Gradiente\n \n
\n\n
\n Color de icono:\n \n
\n
\n\n \x3c!-- Common --\x3e\n
\n\n
\n Offset:\n \n  \n \n
\n\n
\n Opacidad:\n \n
\n
\n\n
\n\n
\n Habilitar rotación con el mapa\n \n
\n\n
\n Rotación:\n \n
\n\n
\n\n
\n
\n
\n'},function(e,t){e.exports='
\n\n
Variable: {{attribute}}
\n
\n\n
\n Leyenda:\n \n
\n\n
\n Mostrar etiqueta\n \n
\n\n
\n\n
\n\n
\n\n
\n Relleno:\n \n
\n\n
\n Tamaño:\n \n
\n\n
\n\n
\n\n
\n Borde:\n \n
\n\n
\n Grosor:\n \n
\n
\n\n
\n\n
\n Espacio:\n \n
\n
\n
\n
\n
\n
\n'},function(e,t){e.exports='
\n
    \n {{#each ranges}}\n
  • {{this.number}}
  • \n {{/each}}\n
\n
\n'},function(e,t){e.exports='
\n {{#each attributes}}\n \n {{/each}}\n
\n'},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(18),n(19);var a=n(4),i=n.n(a);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n1&&(M.utils.isNullOrEmpty(t[r])&&(t[r]={}),e.createObj(t[r],i.slice(1,s),a))}}],(n=[{key:"compileTemplate",value:function(e,t){return new Promise(function(n){n(M.template.compileSync(e,{vars:t}))})}},{key:"getCompilePromise",value:function(){return this.compilePromise_}},{key:"initializeView",value:function(e,t){var n=this,a=this.getOptionsTemplate();return this.compileTemplate(e,a).then(function(e){t.appendChild(e),n.htmlTemplate_=e})}},{key:"getOptionsTemplate",value:function(){}},{key:"addTemplate",value:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.compileTemplate(e,n).then(function(e){t.innerHTML=e.innerHTML,"function"==typeof a&&a()})}},{key:"appendTemplate",value:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.compileTemplate(e,n).then(function(e){t.appendChild(e),"function"==typeof a&&a()})}},{key:"generateOptions",value:function(){var t={options:{},ranges:{}};return this.querySelectorAllForEach("[data-options]",function(e){var n=e.dataset.options,a=e.value;"checkbox"===e.type&&(a=e.checked),"number"===e.type&&(a=parseFloat(a)),t[n]=a}),this.querySelectorAllForEach("[data-style-options]",function(e){var n=e.dataset.styleOptions,a=e.value;"checkbox"===e.type&&(a=e.checked),"number"===e.type&&(a=parseFloat(a)),t.options[n]=a}),this.querySelectorAllForEach("[data-array-options]",function(e){var n=e.dataset.arrayOptions,a=e.value;M.utils.isArray(t.options[n])||(t.options[n]=[]),t.options[n].push(a)}),this.querySelectorAllForEach("[data-ranges-id]",function(n){var a=n.dataset.rangesId;null==t.ranges[a]&&(t.ranges[a]={});var i=n.dataset.rangesOptions,s=n.value;"number"===n.type&&(s=parseFloat(s)),e.createObj(t.ranges[a],i,s)}),t}},{key:"setActivated",value:function(e){this.activated_=e,!0===e&&(this.activateButton_.classList.replace("check-selected","check-active"),this.unhide()),!1===e&&(this.activateButton_.classList.replace("check-active","check-selected"),this.hide())}},{key:"setSelected",value:function(e){this.selected_=e,this.selectButton_.checked=e}},{key:"setDisabled",value:function(e){this.disabled_=e,this.selectButton_.disabled=e,!0===e&&(this.activateButton_.classList.add("check-inactive"),this.setSelected(!e),this.setActivated(!e),this.hide()),!1===e&&this.activateButton_.classList.remove("check-inactive")}},{key:"hide",value:function(){return this.getTemplate().classList.add("m-hidden"),this}},{key:"unhide",value:function(){return this.getTemplate().classList.remove("m-hidden"),this}},{key:"getTemplate",value:function(){return this.htmlTemplate_}},{key:"getParentTemplate",value:function(){return this.htmlParent_}},{key:"querySelector",value:function(e){return this.getTemplate().querySelector(e)}},{key:"querySelectorAll",value:function(e){return this.getTemplate().querySelectorAll(e)}},{key:"querySelectorAllForEach",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Array.prototype.forEach.apply(this.querySelectorAll(e),[t,n])}},{key:"querySelectorAllMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Array.prototype.map.apply(this.querySelectorAll(e),[t,n])}},{key:"querySelectorParent",value:function(e){return this.getParentTemplate().querySelector(e)}},{key:"querySelectorAllParent",value:function(e){return this.getParentTemplate().querySelectorAll(e)}},{key:"querySelectorAllForEachParent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Array.prototype.forEach.apply(this.querySelectorAllParent(e),[t,n])}},{key:"querySelectorAllMapParent",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Array.prototype.map.apply(this.querySelectorAllParent(e),[t,n])}},{key:"setLayer",value:function(e){return this.layer_=e,this}},{key:"getActivateButton",value:function(){return this.activateButton_}},{key:"getSelectButton",value:function(){return this.selectButton_}},{key:"setIntegerAttributes",value:function(){var e=this;if(this.layer_ instanceof M.layer.Vector){var t=this.filterAttributesFeature("number").map(function(e){return{name:e}}),n=this.getTemplate().querySelector("[data-options='attributeName']");this.compileTemplate(A.a,{attributes:t}).then(function(a){n.innerHTML=a.innerHTML,0===t.length?e.deactivateBinding():e.activateBinding()})}}},{key:"filterAttributesFeature",value:function(e){var t=this.getAllFeaturesAttributes(),n=Object.keys(t);switch(e){case"string":n=n.filter(function(e){return isNaN(parseFloat(t[e]))});break;case"number":n=n.filter(function(e){return!isNaN(parseFloat(t[e]))})}return n}},{key:"getFeaturesAttributes",value:function(){return this.layer_.getFeatures()[0].getAttributes()}},{key:"getAllFeaturesAttributes",value:function(){var e=this.getFeaturesAttributes();return this.layer_.getFeatures().reverse().forEach(function(t){Object.keys(t.getAttributes()).forEach(function(t,n){null!=n&&null==e[t]&&(e[t]=n)})}),e}},{key:"hideAllOptionsSections",value:function(){this.querySelectorAllForEach(".styles-row",function(e){e.classList.add("m-hidden")})}},{key:"hideOptionSection",value:function(e){this.querySelector("[data-id=".concat(e,"]")).classList.add("m-hidden")}},{key:"showOptionSection",value:function(e){this.querySelector("[data-id=".concat(e,"]")).classList.remove("m-hidden")}},{key:"addInputListener",value:function(e){this.querySelectorAllForEach("input",function(t){t.addEventListener("change",e)}),this.querySelectorAllForEach("select",function(t){t.addEventListener("change",e)})}},{key:"deactivateBinding",value:function(){this.querySelectorAllForEach("input,select:not([data-options='attributeName']),label,span,.subtitle",function(e){e.classList.add("m-hidden")}),this.querySelector("[data-options='attributeName']").disabled=!0;var e=document.createElement("option");e.value="",e.innerText="No existen atributos",this.querySelector("[data-options='attributeName']").add(e),this.querySelector("span").classList.remove("m-hidden")}},{key:"activateBinding",value:function(){this.querySelectorAllForEach("input,select:not([data-options='attributeName']),label,span,.subtitle",function(e){e.classList.remove("m-hidden")}),this.querySelector("[data-options='attributeName']").disabled=!1}},{key:"destroy",value:function(){this.htmlParent_.removeChild(this.htmlTemplate_)}}])&&C(t.prototype,n),a&&C(t,a),e}();function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return this.layer_=e,!0===t&&this.refreshTemplate(),this}},{key:"setGeometry",value:function(e){return t.GEOMETRIES.includes(e)?this.geometry_=e:this.geometry_="point",this}},{key:"getGeometry",value:function(){return this.geometry_}},{key:"refreshTemplate",value:function(){this.querySelectorAllForEach("[data-geometry]",function(e){return e.classList.remove("m-hidden")}),this.refreshOptionsButtons(),this.addLabelPathListener()}},{key:"refreshOptionsButtons",value:function(){var e=this,n=t.OPTIONS_POINT_SUBMENU;this.addOptionsButtons(n,function(){e.compatibleSectionListener("icon","form"),e.compatibleSectionListener("form","icon")})}},{key:"addOptionsButtons",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=this.getParentTemplate().querySelector("[data-buttons-option]");this.hideAllOptionsSections(),this.addTemplate(P.a,a,{buttonsParams:e},function(){e.forEach(function(e){t.toggleCheckOptionSection(e.id),t.activateOptionSection(e.id),"function"==typeof n&&n()}),t.activateOptionsStyle(),t.addEventCheckFromSubmenu()})}},{key:"addEventCheckFromSubmenu",value:function(){var e=this;this.querySelectorAllForEachParent("[data-buttons-option] input",function(t){t.addEventListener("change",function(){e.controller_.selectPanel("stylesimple")})})}},{key:"activateOptionsStyle",value:function(){var e=this.style_,t=this.querySelector("#select-icon");t.replaceWith(t.cloneNode(!0)),(t=this.querySelector("#select-icon")).addEventListener("click",this.eventOpenIconSelector),document.querySelector(".style-grid-container").addEventListener("click",this.eventSelectIcon);var n=this.querySelector("[data-style-options='form.class']");n.addEventListener("change",this.changeFamilyFont);var a=this.querySelector(".style-col-2 > select[data-style-options = 'form.class']"),i=a.dataset.icon;if(""!==i){var s=i.split("-"),r="g"==s[0]?"g-cartografia":"fa"==s[0]?"fa":"";a.querySelector('option[value="'.concat(r,'"]')).selected=!0,a.dispatchEvent(new Event("change")),document.querySelector("#select-icon").classList=("fa"==r?"fa ":"")+i,document.querySelector(".style-grid-item".concat("fa"==r?".fa":"",".").concat(i)).classList.add("selected")}if(null!=e){var l=e.getOptions();if(null!=l.fill)Object.values(l.fill).filter(function(e){return null!=e}).length>0&&this.checkOptionSection("fill");null!=l.stroke&&this.checkOptionSection("stroke"),null!=l.label&&this.checkOptionSection("label"),null!=l.icon&&(l.icon.hasOwnProperty("src")&&(this.checkOptionSection("icon"),this.disableOption("form")),l.icon.hasOwnProperty("form")&&(this.checkOptionSection("form"),this.disableOption("icon")),l.icon.hasOwnProperty("class")&&(n.value=l.icon.class))}}},{key:"eventOpenIconSelector",value:function(e){var t=document.querySelector(".style-grid-container");"style-grid-container active"===t.classList.toString()?t.classList.remove("active"):t.classList.add("active")}},{key:"eventSelectIcon",value:function(e){if(!e.target.classList.contains("selected")&&e.target.classList.contains("style-grid-item")){var t=document.querySelector(".style-grid-item.selected");t&&t.classList.remove("selected"),e.target.classList.add("selected");var n=e.target.classList.toString().replace("selected","").replace("style-grid-item","").trim();document.querySelector("[data-style-options='form.class']").dataset.icon=n.replace("fa","").trim(),document.querySelector("#select-icon").classList=n}}},{key:"changeFamilyFont",value:function(e){""===e.target.value?(document.querySelector("#select-icon").style.display="none",document.querySelector(".style-grid-container").classList.remove("active")):document.querySelector("#select-icon").style.display="inherit",document.querySelectorAll(".style-grid-item").forEach(function(e){e.style.display="none"}),document.querySelectorAll(".style-grid-item[class*='".concat(e.target.value,"']")).forEach(function(e){e.style.display="inherit"})}},{key:"addLabelPathListener",value:function(){var e=this,t=this.querySelector("[data-style-options='label.path']");t.addEventListener("change",function(){e.togglePathSection(!t.checked)})}},{key:"togglePathSection",value:function(e){this.querySelectorAllForEach("[data-textpath]",function(t){t.disabled=!0===e&&e})}},{key:"toggleCheckOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')).addEventListener("change",function(n){t.toggleCheckOptSectionListener(e,n)})}},{key:"toggleCheckOptSectionListener",value:function(e,t){!0===t.target.checked&&this.activateOption(e)}},{key:"checkOptionSection",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.activateOption(e),t.checked=!0}},{key:"activateOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] [data-label="'.concat(e,'"]')).addEventListener("click",function(){t.activateOption(e)})}},{key:"activateOption",value:function(e){var t=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),n=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=n&&!1===n.disabled&&(this.activateLabel(t),this.displaySectionOption(e))}},{key:"activateLabel",value:function(e){this.querySelectorAllForEachParent("[data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),e.classList.add("check-active"),e.classList.remove("check-selected")}},{key:"displaySectionOption",value:function(e){this.hideAllOptionsSections(),this.showOptionSection(e)}},{key:"generateOptions",value:function(){var e=this,t={options:{}};this.querySelectorAllForEach("[data-style-options]",function(n){var a=n.dataset.styleOptions,i=n.value;"form.class"==a&&""!==i&&(i=e.querySelector("[data-style-options='form.class']").dataset.icon),"checkbox"===n.type&&(i=n.checked),"number"===n.type&&(i=parseFloat(i),isNaN(i)&&(i=0));var s=n.dataset.target;if(void 0!==s){var r=parseFloat(e.querySelector('[data-id="'.concat(s,'"]')).value);isNaN(r)&&(r=0),i=[i,r]}j.createObj(t.options,a,i)}),this.querySelectorAllForEach("[data-apply]",function(e){var n=e.dataset.apply;!1===e.checked&&j.createObj(t.options,n,void 0)});var n,a=this.querySelector("[data-font-size]").value||12,i=this.querySelector("[data-font-family]").value,s="".concat(a,"px ").concat(i),r=document.querySelector("[data-apply='icon']"),l=null!==r&&!0===r.checked?t.options.src:t.options.form;return null!=t.options.label&&null!=t.options.label.text&&(n=t.options.label),t.options={fill:t.options.fill,stroke:t.options.stroke,label:n,icon:l,radius:t.options.radius},null!=t.options.label&&(t.options.label.font=s),this.processOptions(t)}},{key:"processOptions",value:function(e){var t=M.utils.extends({},e),n=this.isChecked("fill"),a=this.isChecked("stroke"),i=this.isChecked("label"),s=this.isChecked("icon"),r=this.isChecked("form");return t.options.fill=!0===n?t.options.fill:void 0,t.options.stroke=!0===a?t.options.stroke:void 0,t.options.label=!0===i?t.options.label:void 0,t.options.icon=!0===s||!0===r?t.options.icon:void 0,t.point={fill:t.options.fill,radius:t.options.radius,stroke:t.options.stroke,label:t.options.label,icon:t.options.icon},t.line={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label},t.polygon={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label},delete t.options,t}},{key:"isChecked",value:function(e){var t=!1,n=this.getParentTemplate().querySelector("[data-buttons-option] input[data-apply='".concat(e,"'"));return null!=n&&(t=n.checked),t}},{key:"generateStyle",value:function(){this.querySelectorAllForEach("[data-apply]",function(e){!0===e.checked&&!1});var e=this.generateOptions();return new M.style.Generic(e)}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("change",function(){!0===a.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active"),t.disabled=!0,t.checked=!1}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')).classList.remove("check-inactive"),t.disabled=!1}},{key:"getOptionsTemplate",value:function(){var e=t.DEFAULT_OPTIONS_STYLE;null!=this.style_&&(null!=this.style_.get("fill.pattern")&&(e.patternflag=!0),e=M.utils.extends({},this.style_.getOptions()),e=M.utils.extends(e,t.DEFAULT_OPTIONS_STYLE)),e.fill.color=x(e.fill.color).hex(),e.stroke.color=x(e.stroke.color).hex(),e.label.fill.color=x(e.label.fill.color).hex(),e.label.stroke.color="no-color"===e.label.stroke.color?"no-color":x(e.label.stroke.color).hex(),e.fill.pattern.color=x(e.fill.pattern.color).hex(),e.icon.fill=x(e.icon.fill).hex(),e.icon.color=x(e.icon.color).hex();var n=Object.keys(M.style.pattern).filter(function(e){return"ICON"!=e&&"IMAGE"!=e}),a=Object.values(M.style.align),i=Object.values(M.style.baseline),s=Object.values(M.style.form).filter(function(e){return null!=e});if(e.patternlist=t.arrayDataToTemplate(e.fill.pattern.name,n,n),e.linecapstroke=t.arrayDataToTemplate(e.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinstroke=t.arrayDataToTemplate(e.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.linecaplabelstroke=t.arrayDataToTemplate(e.label.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinlabelstroke=t.arrayDataToTemplate(e.label.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.alignlist=t.arrayDataToTemplate(e.label.align,a,["Centro","Justificado","Izquierda","Derecha"]),e.baselinelist=t.arrayDataToTemplate(e.label.baseline,i,["Alfabetico","Abajo","Colgando","Ideografico","Arriba","Centro"]),e.formlist=t.arrayDataToTemplate(e.icon.form,s,s),null!=this.layer_){var r=Object.keys(this.getFeaturesAttributes()),l=null!=e.label?e.label.text:"";e.featuresAttr=t.arrayDataToTemplate(l,r.map(function(e){return"{{".concat(e,"}}")}),r)}return e}},{key:"toggleDisplaySubmenu",value:function(e){var t=!0===e?"add":"remove";this.getParentTemplate().querySelector("[data-buttons-option]").classList[t]("m-hidden")}},{key:"refreshLegend",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.imgId_,i=this.generateStyle();if(!0===n&&(i=this.style_),null!=i){(i=i.clone())instanceof M.style.Point&&(i.set("radius",t.RADIUS_OPTION),null!=i.get("icon.radius")&&i.set("icon.radius",t.ICON_RADIUS_OPTION));var s=this.htmlParent_.querySelector("img[id='img-".concat(a,"']"));i.updateCanvas();var r=i.toImage();null!=s&&(s.src=r)}}},{key:"imgId",set:function(e){this.imgId_=e},get:function(){return this.imgId_}}])&&I(n.prototype,a),i&&I(n,i),t}();function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var n=0;n0&&n1&&void 0!==arguments[1])||arguments[1];return this.layer_=e,!0===t&&this.refreshTemplate(),this}},{key:"getOptions",value:function(){return{fill:this.fill_,stroke:this.stroke_,label:this.label_,form:this.form_,icon:this.icon_}}},{key:"setGeometry",value:function(e){return t.GEOMETRIES.includes(e)?this.geometry_=e:this.geometry_="point",this}},{key:"getGeometry",value:function(){return this.geometry_}},{key:"refreshTemplate",value:function(){var e=this,n=this.getGeometry();t.GEOMETRIES.filter(function(e){return e!==n}).forEach(function(t){e.querySelectorAllForEach('[data-geometry="'.concat(t,'"]'),function(e){return e.classList.add("m-hidden")})}),this.querySelectorAllForEach('[data-geometry="'.concat(n,'"]'),function(e){return e.classList.remove("m-hidden")}),this.addLabelPathListener()}},{key:"activateOptionsStyle",value:function(){var e=this.style_;if(null!=e){var t=e.getOptions();if(null!=t.fill)Object.values(t.fill).filter(function(e){return null!=e}).length>0&&this.checkOptionSection("fill");null!=t.stroke&&this.checkOptionSection("stroke"),null!=t.label&&this.checkOptionSection("label"),null!=t.icon&&(t.icon.hasOwnProperty("src")&&(this.checkOptionSection("icon"),this.disableOption("form")),t.icon.hasOwnProperty("form")&&(this.checkOptionSection("form"),this.disableOption("icon")))}}},{key:"showCompatibleSections",value:function(){this.binding_.enableOption("form"),this.binding_.enableOption("icon"),!0===this.icon_&&this.binding_.disableOption("form"),!0===this.form_&&this.binding_.disableOption("icon")}},{key:"addLabelPathListener",value:function(){var e=this,t=this.querySelector("[data-style-options='label.path']");t.addEventListener("change",function(){e.togglePathSection(!t.checked)})}},{key:"togglePathSection",value:function(e){this.querySelectorAllForEach("[data-textpath]",function(t){t.disabled=!0===e&&e})}},{key:"toggleCheckOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')).addEventListener("change",function(n){t.toggleCheckOptSectionListener(e,n)})}},{key:"toggleCheckOptSectionListener",value:function(e,t){!0===t.target.checked&&this.activateOption(e)}},{key:"checkOptionSection",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.activateOption(e),t.checked=!0}},{key:"activateOptionSection",value:function(e){var t=this;this.getParentTemplate().querySelector('[data-buttons-option] [data-label="'.concat(e,'"]')).addEventListener("click",function(){t.activateOption(e)})}},{key:"activateOption",value:function(e){var t=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),n=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=n&&!1===n.disabled&&(this.activateLabel(t),this.displaySectionOption(e))}},{key:"activateLabel",value:function(e){this.querySelectorAllForEachParent("[data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),e.classList.add("check-active"),e.classList.remove("check-selected")}},{key:"displaySectionOption",value:function(e){this.hideAllOptionsSections(),this.showOptionSection(e)}},{key:"generateOptions",value:function(){var e=this,t={options:{}};this.querySelectorAllForEach("[data-style-options]",function(n){var a=n.dataset.styleOptions,i=n.value;"checkbox"===n.type&&(i=n.checked),"number"===n.type&&(i=parseFloat(i),isNaN(i)&&(i=0));var s=n.dataset.target;if(void 0!==s){var r=parseFloat(e.querySelector('[data-id="'.concat(s,'"]')).value);isNaN(r)&&(r=0),i=[i,r]}j.createObj(t.options,a,i)}),this.querySelectorAllForEach("[data-apply]",function(e){var n=e.dataset.apply;!1===e.checked&&j.createObj(t.options,n,void 0)});var n,a=this.querySelector("[data-font-size]").value||12,i=this.querySelector("[data-font-family]").value,s="".concat(a,"px ").concat(i),r=!0===this.icon?t.options.src:t.options.form;return null!=t.options.label&&null!=t.options.label.text&&(n=t.options.label),t.options={fill:t.options.fill,stroke:t.options.stroke,label:n,icon:r,radius:t.options.radius},"line"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label},delete t.options.fill.pattern,0===Object.keys(t.options.fill).length&&delete t.options.fill),"polygon"===this.getGeometry()&&(t.options={fill:t.options.fill,stroke:t.options.stroke,label:t.options.label}),null!=t.options.label&&(t.options.label.font=s),this.processOptions(t)}},{key:"processOptions",value:function(e){var t=M.utils.extends({},e),n=this.isChecked("fill"),a=this.isChecked("stroke"),i=this.isChecked("label"),s=this.isChecked("icon"),r=this.isChecked("form");return t.options.fill=!0===n?t.options.fill:void 0,t.options.stroke=!0===a?t.options.stroke:void 0,t.options.label=!0===i?t.options.label:void 0,t.options.icon=!0===s||!0===r?t.options.icon:void 0,t}},{key:"isChecked",value:function(e){var t=!1,n=this.getParentTemplate().parentElement.querySelector("[data-buttons-option-category] input[data-apply='".concat(e,"'"));return null!=n&&(t=n.checked),t}},{key:"generateStyle",value:function(){var e;this.querySelectorAllForEach("[data-apply]",function(e){!0===e.checked&&!1});var t=this.getGeometry(),n=this.generateOptions().options;switch(t){case"point":e=new M.style.Point(n);break;case"line":e=new M.style.Line(n);break;case"polygon":e=new M.style.Polygon(n);break;default:M.dialog.error("Geometría no soportada","Error")}return e}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')),i=this.querySelectorParent('[data-buttons-option] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("click",function(){!1===i.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active"),t.disabled=!0,t.checked=!1}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]'));this.getParentTemplate().querySelector('[data-buttons-option] input[data-apply="'.concat(e,'"]+label')).classList.remove("check-inactive"),t.disabled=!1}},{key:"getOptionsTemplate",value:function(){var e=t.DEFAULT_OPTIONS_STYLE;null!=this.style_&&(null!=this.style_.get("fill.pattern")&&(e.patternflag=!0),e=M.utils.extends({},this.style_.getOptions()),e=M.utils.extends(e,t.DEFAULT_OPTIONS_STYLE)),e.fill.color=x(e.fill.color).hex(),e.stroke.color=x(e.stroke.color).hex(),e.label.fill.color=x(e.label.fill.color).hex(),e.label.stroke.color="no-color"===e.label.stroke.color?"no-color":x(e.label.stroke.color).hex(),e.fill.pattern.color=x(e.fill.pattern.color).hex(),e.icon.fill=x(e.icon.fill).hex(),e.icon.gradientcolor=x(e.icon.gradientcolor).hex();var n=Object.keys(M.style.pattern).filter(function(e){return"ICON"!=e&&"IMAGE"!=e}),a=Object.values(M.style.align),i=Object.values(M.style.baseline),s=Object.values(M.style.form).filter(function(e){return null!=e});if(e.patternlist=t.arrayDataToTemplate(e.fill.pattern.name,n,n),e.linecapstroke=t.arrayDataToTemplate(e.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinstroke=t.arrayDataToTemplate(e.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.linecaplabelstroke=t.arrayDataToTemplate(e.label.stroke.linecap,["butt","square","round"],["Extremo","Cuadrado","Redondeado"]),e.linejoinlabelstroke=t.arrayDataToTemplate(e.label.stroke.linejoin,["bevel","miter","round"],["Bisel","Inglete","Redondeado"]),e.alignlist=t.arrayDataToTemplate(e.label.align,a,a),e.baselinelist=t.arrayDataToTemplate(e.label.baseline,i,i),e.formlist=t.arrayDataToTemplate(e.icon.form,s,s),null!=this.layer_){var r=Object.keys(this.getFeaturesAttributes()),l=null!=e.label?e.label.text:"";e.featuresAttr=t.arrayDataToTemplate(l,r.map(function(e){return"{{".concat(e,"}}")}),r)}return e}},{key:"toggleDisplaySubmenu",value:function(e){var t=!0===e?"add":"remove";this.getParentTemplate().querySelector("[data-buttons-option]").classList[t]("m-hidden")}},{key:"addLegendListener",value:function(){var e=this;this.querySelectorAllForEach("input,select,div.m-boxes",function(t){t instanceof HTMLDivElement?t.addEventListener("click",function(){e.refreshLegend(t)}):t instanceof HTMLSelectElement?t.addEventListener("change",function(){e.refreshLegend(t)}):t.addEventListener("input",function(){e.refreshLegend(t)})})}},{key:"refreshLegend",value:function(e,n){var a=this.imgId_,i=this.generateStyle();if(!0===n&&(i=this.style_),null!=i){this.style_=i,(i=i.clone())instanceof M.style.Point&&(i.set("radius",t.RADIUS_OPTION),null!=i.get("icon.radius")&&i.set("icon.radius",t.ICON_RADIUS_OPTION));var s=this.htmlParent_.querySelector("img[id='img-".concat(a,"']"));i.updateCanvas();var r=i.toImage();null!=s&&(s.src=r)}}},{key:"imgId",set:function(e){this.imgId_=e},get:function(){return this.imgId_}},{key:"fill",set:function(e){this.fill_=e},get:function(){return this.fill_}},{key:"stroke",set:function(e){this.stroke_=e},get:function(){return this.stroke_}},{key:"label",set:function(e){this.label_=e},get:function(){return this.label_}},{key:"form",set:function(e){this.form_=e},get:function(){return this.form_}},{key:"icon",set:function(e){this.icon_=e},get:function(){return this.icon_}},{key:"style",get:function(){return this.style_}}])&&we(n.prototype,a),i&&we(n,i),t}();function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,a=this.getParentTemplate().querySelector("[data-buttons-option-category]");this.addTemplate(ye.a,a,{buttonsParams:e},function(a){"function"==typeof n&&n(),e.forEach(function(n){return t.addEventOptionListener(n,e)}),e.forEach(function(n){return t.addEventCheckListener(n,e)}),t.deactivateSubmenu(),t.addEventCheckFromSubmenu()})}},{key:"addEventCheckFromSubmenu",value:function(){var e=this;this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(t){t.addEventListener("change",function(){e.controller_.selectPanel("stylecategory"),e.controller_.setCompatibleStylePanels("stylecategory"),e.controller_.showActivePanel("stylecategory")})})}},{key:"compatibleSectionListener",value:function(e,t){var n=this,a=this.querySelectorParent('[data-buttons-option-category] input[data-apply="'.concat(e,'"]'));null!=a&&a.addEventListener("change",function(){!0===a.checked?n.disableOption(t):n.enableOption(t)})}},{key:"disableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]+label'));this.hideOptionSection(e),null!=n&&(n.classList.add("check-inactive"),n.classList.add("check-selected"),n.classList.remove("m-option-active")),null!=t&&(t.disabled=!0,t.checked=!1)}},{key:"enableOption",value:function(e){var t=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]')),n=this.getParentTemplate().querySelector('[data-buttons-option-category] input[data-apply="'.concat(e,'"]+label'));null!=n&&n.classList.remove("check-inactive"),null!=t&&(t.disabled=!1)}},{key:"toggleCategory",value:function(e){var t=this;Object.values(this.styleCategories_).forEach(function(e){e.hide()}),!1===this.clickedOnTable_&&(this.activateSubmenu(),this.clickedOnTable_=!0);var n=this.styleCategories_[e];this.selectedCategory_=n;var a=this.selectedCategory_.getOptions();this.checkInput("fill",a.fill),this.checkInput("stroke",a.stroke),this.checkInput("label",a.label),this.checkInput("form",a.form),this.checkInput("icon",a.icon),null!=n&&(n.unhide(),n.showCompatibleSections()),Object.values(this.styleCategories_).forEach(function(e){e.setLayer(t.layer_,!1)})}},{key:"renderAttributeOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.querySelector("[data-options='attributeName']").value;null!=this.style_&&!0===e&&(n=this.style_.getAttributeName());var a=!M.utils.isNullOrEmpty(n),i=this.getAllValuesAttribute(n).filter(function(e){return!M.utils.isNullOrEmpty(e)}).map(function(e){return{name:e}}).splice(0,t.MAXNUMBER_CATEGORIES);this.removeCategories(),this.createCategories(i),this.addCategoriesView(i,a)}},{key:"addCategoriesView",value:function(e,t){var n=this,a=this.querySelector("[data-options='values']");this.compileTemplate(be.a,{values:e,attributeExists:t}).then(function(e){a.innerHTML=e.innerHTML,Object.values(n.styleCategories_).forEach(function(e){e.refreshTemplate(),e.hide()}),n.addEventClickListener(),n.addEventSelectedListener(),n.addLegendListenerAll()})}},{key:"createCategories",value:function(e){var t=this,n=null==this.style_?null:this.style_.getCategories();e.forEach(function(e){var a=null==n?null:n[e.name];t.styleCategories_[e.name]=new xe(he.a,t.htmlTemplate_,"stylesimple",a,t.layer_,t),t.styleCategories_[e.name].compilePromise_.then(function(){t.styleCategories_[e.name].refreshLegend(e.name,!0)}),t.setGeometryCategory(t.styleCategories_[e.name])});var a=null==n?null:n.other;this.styleCategories_.other=new xe(p.a,this.htmlTemplate_,"stylesimple",a,this.layer_,this),this.styleCategories_.other.compilePromise_.then(function(){t.styleCategories_.other.refreshLegend("other",!0)}),this.setGeometryCategory(this.styleCategories_.other)}},{key:"removeCategories",value:function(){Object.values(this.styleCategories_).forEach(function(e){return e.destroy()}),this.styleCategories_={}}},{key:"setAttributes",value:function(){var e=this;if(this.layer_ instanceof M.layer.Vector){var t=null==this.style_?"":this.style_.getAttributeName(),n=this.filterAttributesFeature("string").map(function(e){return{name:e,selected:t}}),a=this.getTemplate().querySelector("[data-options='attributeName']");this.compileTemplate(A.a,{attributes:n}).then(function(t){a.innerHTML=t.innerHTML,e.renderAttributeOptions(!0),0===n.length?e.deactivateBinding():e.activateBinding()})}}},{key:"setGeometryCategory",value:function(e){switch(this.layer_.getFeatures()[0].getGeometry().type){case"Point":case"MultiPoint":e.geometry_="point";break;case"LineString":case"MultiLineString":e.geometry_="line";break;case"Polygon":case"MultiPolygon":e.geometry_="polygon";break;default:M.dialog.error("Geometria no soportada","Error")}}},{key:"showSection",value:function(e){this.querySelectorAllForEach("[data-id='".concat(e,"']"),function(e){e.classList.remove("m-hidden")})}},{key:"hideSection",value:function(e){this.querySelectorAllForEach("[data-id='".concat(e,"']"),function(e){e.classList.add("m-hidden")})}},{key:"addEventOptionListener",value:function(e,t){var n=this,a=this.querySelectorParent("[data-buttons-option-category] [data-label='".concat(e.id,"']")),i=this.querySelectorParent("[data-buttons-option-category] input[data-apply='".concat(e.id,"']"));a.addEventListener("click",function(){!1===i.disabled&&(t.forEach(function(e){return n.hideSection(e.id)}),n.showSection(e.id),n.activeSection(e.id))})}},{key:"addEventCheckListener",value:function(e,t){var n=this;this.querySelectorParent("[data-buttons-option-category] input[data-apply='".concat(e.id,"']")).addEventListener("click",function(){n.checkSection(e.id,t)})}},{key:"activeSection",value:function(e){var t=this.querySelectorParent("[data-buttons-option-category] [data-selector='".concat(e,"']"));this.querySelectorAllForEachParent("[data-buttons-option-category] [data-selector]",function(e){e.classList.remove("check-active"),e.classList.add("check-selected")}),t.classList.remove("check-selected"),t.classList.add("check-active")}},{key:"setSelectedRow",value:function(e){this.querySelectorAllForEach("td:first-child",function(e){e.classList.remove("m-table-cell-selected")}),this.querySelector("[id='".concat(e,"']")).classList.add("m-table-cell-selected")}},{key:"addEventSelectedListener",value:function(){var e=this;this.querySelectorAllForEach("td:first-child",function(t){var n=t.id;t.addEventListener("click",function(){return e.setSelectedRow(n)})})}},{key:"checkSection",value:function(e,t){var n=this;!0===this.querySelectorParent("[data-buttons-option-category] #cat-".concat(e)).checked?(null!=this.selectedCategory_&&(this.selectedCategory_[e]=!0),t.forEach(function(e){return n.hideSection(e.id)}),this.showSection(e),this.activeSection(e)):null!=this.selectedCategory_&&(this.selectedCategory_[e]=!1),this.selectedCategory_.refreshLegend()}},{key:"checkInput",value:function(e,t){var n=this.querySelectorParent("[data-buttons-option-category] #cat-".concat(e));null!=n&&(n.checked=t)}},{key:"activateSubmenu",value:function(){this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(e){return e.disabled=!1}),this.querySelectorAllForEachParent("[data-buttons-option-category] label[data-selector]",function(e){e.classList.remove("check-inactive"),e.classList.add("check-selected")})}},{key:"deactivateSubmenu",value:function(){this.querySelectorAllForEachParent("[data-buttons-option-category] input",function(e){return e.disabled=!0}),this.querySelectorAllForEachParent("[data-buttons-option-category] label[data-selector]",function(e){e.classList.add("check-inactive"),e.classList.remove("check-selected")})}},{key:"getGeometry",value:function(){var e=this.layer_.getFeatures()[0].getGeometry().type;switch(e){case"Point":case"MultiPoint":e="point";break;case"LineString":case"MultiLineString":e="line";break;case"Polygon":case"MultiPolygon":e="polygon";break;default:M.dialog.error("Geometria no soportada","Error")}return e}},{key:"getAllValuesAttribute",value:function(e){return this.layer_.getFeatures().map(function(t){return t.getAttribute(e)}).filter(function(e,t,n){return n.indexOf(e)==t})}},{key:"generateOptions",value:function(){var e=this,t={},n={};return t.attributeName=this.querySelector("[data-options='attributeName']").value,Object.keys(this.styleCategories_).forEach(function(t){var a=e.styleCategories_[t],i=e.styleCategories_[t].generateOptions().options,s=a.fill,r=a.stroke,l=a.icon||a.form,o=a.label;null!=i.fill&&Object.values(i.fill).filter(function(e){return null!=e});(s||r||l||o)&&(n[t]=e.styleCategories_[t].style)},this),t.options=n,t}},{key:"generateStyle",value:function(){var e=this.generateOptions(),t=null;return""!==e.attributeName&&(t=new M.style.Category(e.attributeName,e.options)),t}},{key:"addLegendListenerAll",value:function(){var e=this;Object.keys(this.styleCategories_).forEach(function(t){var n=e.styleCategories_[t];n.imgId=t,n.addLegendListener()})}}])&&Pe(n.prototype,a),i&&Pe(n,i),t}(),Me=n(15),je=n.n(Me),Ne=n(16),Fe=n.n(Ne),Ie=n(17),Re=n.n(Ie);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Be(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:null,a=e.value;(this.layer_=this.getLayerByName(a),null!=n&&(this.layer_=n),this.layer_ instanceof M.layer.Vector)&&(0===this.layer_.getFeatures().length?(M.dialog.error("La capa no tiene features o aún no se han cargado.","Error"),e.selectedIndex=0):(this.bindinController_.change(this.layer_),this.showBoxes(t),this.addOpenAttribute(t)))}},{key:"getLayerByName",value:function(e){return this.facadeMap_.getWFS().concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(function(e){return"GeoJSON"===e.type}))).filter(function(e){return"selectLayer"!==e.name}).find(function(t){return t.name===e})}},{key:"showBoxes",value:function(e){e.querySelector(".m-boxes").classList.remove("m-hidden")}},{key:"applyStyle",value:function(){if(this.layer_ instanceof M.layer.Vector){this.layer_.clearStyle();var e=this.bindinController_.getStyle();this.layer_.setStyle(e)}else M.dialog.info("Tiene que elegir una capa.","Elija capa")}},{key:"clearStyle",value:function(){this.layer_ instanceof M.layer.Vector?this.layer_.setStyle(M.layer.Vector.DEFAULT_OPTIONS_STYLE):M.dialog.info("Tiene que elegir una capa.","Elija capa")}},{key:"loadFonts",value:function(){M.style.Font.addSymbol({font:"FontAwesome",name:"FontAwesome",copyright:"SIL OFL 1.1",prefix:"fa"},{"fa-glass":"","fa-music":"","fa-search":"","fa-envelope-o":"","fa-heart":"","fa-star":"","fa-star-o":"","fa-user":"","fa-film":"","fa-th-large":"","fa-th":"","fa-th-list":"","fa-check":"","fa-remove":"","fa-close":"","fa-times":"","fa-search-plus":"","fa-search-minus":"","fa-power-off":"","fa-signal":"","fa-gear":"","fa-cog":"","fa-trash-o":"","fa-home":"","fa-file-o":"","fa-clock-o":"","fa-road":"","fa-download":"","fa-arrow-circle-o-down":"","fa-arrow-circle-o-up":"","fa-inbox":"","fa-play-circle-o":"","fa-rotate-right":"","fa-repeat":"","fa-refresh":"","fa-list-alt":"","fa-lock":"","fa-flag":"","fa-headphones":"","fa-volume-off":"","fa-volume-down":"","fa-volume-up":"","fa-qrcode":"","fa-barcode":"","fa-tag":"","fa-tags":"","fa-book":"","fa-bookmark":"","fa-print":"","fa-camera":"","fa-font":"","fa-bold":"","fa-italic":"","fa-text-height":"","fa-text-width":"","fa-align-left":"","fa-align-center":"","fa-align-right":"","fa-align-justify":"","fa-list":"","fa-dedent":"","fa-outdent":"","fa-indent":"","fa-video-camera":"","fa-photo":"","fa-image":"","fa-picture-o":"","fa-pencil":"","fa-map-marker":"","fa-adjust":"","fa-tint":"","fa-edit":"","fa-pencil-square-o":"","fa-share-square-o":"","fa-check-square-o":"","fa-arrows":"","fa-step-backward":"","fa-fast-backward":"","fa-backward":"","fa-play":"","fa-pause":"","fa-stop":"","fa-forward":"","fa-fast-forward":"","fa-step-forward":"","fa-eject":"","fa-chevron-left":"","fa-chevron-right":"","fa-plus-circle":"","fa-minus-circle":"","fa-times-circle":"","fa-check-circle":"","fa-question-circle":"","fa-info-circle":"","fa-crosshairs":"","fa-times-circle-o":"","fa-check-circle-o":"","fa-ban":"","fa-arrow-left":"","fa-arrow-right":"","fa-arrow-up":"","fa-arrow-down":"","fa-mail-forward":"","fa-share":"","fa-expand":"","fa-compress":"","fa-plus":"","fa-minus":"","fa-asterisk":"","fa-exclamation-circle":"","fa-gift":"","fa-leaf":"","fa-fire":"","fa-eye":"","fa-eye-slash":"","fa-warning":"","fa-exclamation-triangle":"","fa-plane":"","fa-calendar":"","fa-random":"","fa-comment":"","fa-magnet":"","fa-chevron-up":"","fa-chevron-down":"","fa-retweet":"","fa-shopping-cart":"","fa-folder":"","fa-folder-open":"","fa-arrows-v":"","fa-arrows-h":"","fa-bar-t-o":"","fa-bar-t":"","fa-twitter-square":"","fa-facebook-square":"","fa-camera-retro":"","fa-key":"","fa-gears":"","fa-cogs":"","fa-comments":""})}},{key:"equals",value:function(e){return e instanceof t}}])&&Qe(n.prototype,a),s&&Qe(n,s),t}();function at(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=lt(this,ot(t).call(this))).map_=null,e.controls_=[],e.panel_=null,e.layer_=n,it.apply(window),Handlebars.registerHelper("sum",function(e,t){return e+t}),Handlebars.registerHelper("neq",function(e,t,n){return Object.equals(e,t)?n.inverse(this):n.fn(this)}),Handlebars.registerHelper("unless",function(e,t){return e?t.inverse(this):t.fn(this)}),Handlebars.registerHelper("get",function(e,t){return t[e]}),Handlebars.registerHelper("uppercase",function(e){return e.toUpperCase()}),Handlebars.registerHelper("lowercase",function(e){return e.toLowerCase()}),M.utils.extends=M.utils.extendsObj,e}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(t,M.Plugin),n=t,(a=[{key:"addTo",value:function(e){this.controls_.push(new nt(this.layer_)),this.map_=e,this.panel_=new M.ui.Panel(t.NAME,{collapsible:!0,className:"m-stylemanager",collapsedButtonClass:"g-sigc-palette",position:M.ui.position.TL,tooltip:"Simbología"}),this.panel_.addControls(this.controls_),e.addPanels(this.panel_)}},{key:"destroy",value:function(){this.map_.removeControls(this.controls_);var e=[null,null,null];this.control_=e[0],this.panel_=e[1],this.map_=e[2]}},{key:"name",get:function(){return"stylemanager"}}])&&rt(n.prototype,a),i&&rt(n,i),t}();window.M.plugin||(window.M.plugin={}),window.M.plugin.StyleManager=dt}]); +//# sourceMappingURL=stylemanager.ol.min.js.map \ No newline at end of file diff --git a/dist/stylemanager.ol.min.js.map b/dist/stylemanager.ol.min.js.map new file mode 100644 index 0000000..ec8ea43 --- /dev/null +++ b/dist/stylemanager.ol.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/chroma-js/chroma.js","webpack:///./src/templates/stylesimple.html","webpack:///./src/templates/attributestemplate.html","webpack:///./src/templates/categorystyles.html","webpack:///./src/templates/stylemanager.html","webpack:///./src/templates/styleproportional.html","webpack:///./src/templates/stylecluster.html","webpack:///./src/templates/stylechoropleth.html","webpack:///./src/templates/stylecategory.html","webpack:///./src/templates/styleheatmap.html","webpack:///./src/templates/stylechart.html","webpack:///./src/templates/buttonoptions.html","webpack:///./src/templates/gradientheatmap.html","webpack:///./src/templates/buttonoptions2.html","webpack:///./src/templates/simpleoptions.html","webpack:///./src/templates/variablechart.html","webpack:///./src/templates/paginationchart.html","webpack:///./src/templates/attributeschart.html","webpack:///./src/impl/ol/js/stylemanagerControl.js","webpack:///./src/facade/js/binding/binding.js","webpack:///./src/facade/js/binding/simplebinding.js","webpack:///./src/facade/js/binding/proportionalbinding.js","webpack:///./src/facade/js/binding/clusterbinding.js","webpack:///./src/facade/js/binding/heatmapbinding.js","webpack:///./src/facade/js/binding/choroplethbinding.js","webpack:///./src/facade/js/binding/simplecategorybinding.js","webpack:///./src/facade/js/binding/categorybinding.js","webpack:///./src/facade/js/binding/chartbinding.js","webpack:///./src/facade/js/bindingcontroller.js","webpack:///./src/facade/js/stylemanagerControl.js","webpack:///./src/facade/js/utils/colorpicker.js","webpack:///./src/facade/js/stylemanager.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","limit","x","min","max","classToType","list","length","toLowerCase","type","obj","toString","PI","Math","utils","clip_rgb","rgb","_clipped","_unclipped","slice","unpack","args","keyOrder","Array","split","filter","k","undefined","map","last","TWOPI","PITHIRD","DEG2RAD","RAD2DEG","input","format","autodetect","last$1","clip_rgb$1","type$1","Color","len","arguments","constructor","this","sorted","sort","a","b","chk","test","apply","Error","_rgb","push","hex","join","Color_1","chroma","Function","concat","version","chroma_1","unpack$1","rgb2cmyk_1","ref","g","f","y","unpack$2","cmyk2rgb_1","alpha","unpack$3","type$2","cmyk","unpack$4","last$2","rnd","round","hsl2css_1","hsla","unpack$5","rgb2hsl_1","h","Number","NaN","unpack$6","last$3","rgb2css_1","rgba","substr","RE_HEX","RE_HEXA","hex2rgb_1","match","u","parseInt","u$1","r$1","g$1","b$1","unpack$7","round$1","hsl2rgb_1","assign","t3","t2","t1","h_","w3cx11_1","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflower","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","laserlemon","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrod","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","maroon2","maroon3","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","purple2","purple3","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","RE_RGB","RE_RGBA","RE_RGB_PCT","RE_RGBA_PCT","RE_HSL","RE_HSLA","round$2","css2rgb","css","trim","rgb$1","i$1","rgb$2","i$2","rgb$3","i$3","hsl","rgb$4","hsl$1","rgb$5","css2rgb_1","type$3","rest","unpack$8","gl","unpack$9","rgb2hcg_1","delta","_g","unpack$a","floor","hcg2rgb_1","assign$1","assign$2","assign$3","assign$4","assign$5","_c","q","v","unpack$b","type$4","hcg","unpack$c","last$4","round$3","rgb2hex_1","str","hxa","type$5","includes","unpack$d","sqrt","acos","rgb2hsi_1","min_","unpack$e","limit$1","TWOPI$1","cos","hsi2rgb_1","isNaN","unpack$f","type$6","hsi","unpack$g","type$7","unpack$h","min$1","max$1","rgb2hsv","max_","unpack$i","floor$1","hsv2rgb_1","unpack$j","type$8","hsv","labConstants","Kn","Xn","Yn","Zn","t0","unpack$k","pow","rgb_xyz","xyz_lab","rgb2xyz","z","rgb2lab_1","ref$1","unpack$l","pow$1","xyz_rgb","lab_xyz","lab2rgb_1","b_","unpack$m","type$9","lab","unpack$n","sqrt$1","atan2","round$4","lab2lch_1","unpack$o","rgb2lch_1","unpack$p","sin","cos$1","lch2lab_1","unpack$q","lch2rgb_1","L","unpack$r","hcl2rgb_1","hcl","reverse","unpack$s","type$a","lch","forEach","type$b","keys","named","unpack$t","rgb2num_1","type$c","num2rgb_1","num","type$d","unpack$u","type$e","round$5","log","temperature2rgb_1","kelvin","temp","unpack$v","round$6","rgb2temperature_1","minTemp","maxTemp","temperature","type$f","mutate","clipped","darken","amount","brighten","darker","brighter","mc","channel","src","indexOf","type$g","pow$2","luminance","lum","cur_lum","max_iter","low","high","mid","interpolate","lm","abs","rgb2luminance","luminance_x","interpolator","type$h","mix","col1","col2","premultiply","saturate","desaturate","type$i","set","charAt","out","xyz0","xyz1","sqrt$2","pow$3","lrgb","x1","y1","z1","x2","y2","z2","_hsx","hue0","hue1","sat0","sat1","lbv0","lbv1","sat","hue","lch$1","c1","c2","clip_rgb$2","pow$4","sqrt$3","PI$1","cos$2","sin$1","atan2$1","_average_lrgb","colors","xyz","col","type$j","pow$5","scale","_mode","_nacol","_spread","_domain","_pos","_padding","_classes","_colors","_out","_min","_max","_correctLightness","_colorCache","_useCache","_gamma","setColors","brewer","c$1","resetCache","tmap","getColor","val","bypassMap","getClass","classes","analyze","limits","domain","from","_m","range","_o","spread","correctLightness","L0","L1","pol","L_actual","L_ideal","L_diff","padding","numColors","result","dm","dd","left","right","inclusive","ascending","end","__range__","samples","asc","cache","gamma","nodata","bezier","I","lab0","lab1","lab2","lab3","I0","I1","blend","bottom","top","blend_f","c0","each","normal","multiply","screen","overlay","lighten","dodge","burn","blend_1","type$k","clip_rgb$3","TWOPI$2","pow$6","sin$2","cos$3","floor$2","random","log$1","pow$7","floor$3","data","MAX_VALUE","sum","values","count","min_log","LOG10E","max_log","pb","pr","cluster","assignments","clusterSizes","repeat","nb_iters","centroids","j","i$4","mindist","best","j$1","dist","newCentroids","j$2","i$5","j$3","j$4","kClusters","j$5","i$6","tmpKMeansBreaks","j$6","i$7","analyze_1","sqrt$4","atan2$2","abs$1","cos$4","PI$2","scales","cool","hot","colorbrewer","OrRd","PuBu","BuPu","Oranges","BuGn","YlOrBr","YlGn","Reds","RdPu","Greens","YlGnBu","Purples","GnBu","Greys","YlOrRd","PuRd","Blues","PuBuGn","Viridis","Spectral","RdYlGn","RdBu","PiYG","PRGn","RdYlBu","BrBG","RdGy","PuOr","Set2","Accent","Set1","Set3","Dark2","Paired","Pastel2","Pastel1","list$1","colorbrewer_1","average","first","shift","cnt","dx","dy","A","xyz2","A$1","cubehelix","start","rotations","lightness","dl","dh","fract","amp","cos_a","sin_a","code","contrast","l1","l2","deltaE","C","a1","b1","L2","a2","b2","sl","sc","h1","c4","sh","delC","delA","delB","v1","v2","distance","sum_sq","valid","e","factory","StyleManagerControl","_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","M","impl","Control","html","_get","dialog","info","Binding","htmlParent","styleType","style","layer","binding_classCallCheck","htmlParent_","htmlTemplate_","html_","activated_","selected_","disabled_","layer_","activateButton_","querySelector","selectButton_","style_","styleType_","compilePromise_","initializeView","path","isArray","keyLength","_toConsumableArray","isObject","isNullOrEmpty","createObj","htmlName","options","Promise","resolve","template","compileSync","vars","_this","optsTemplate","getOptionsTemplate","compileTemplate","then","appendChild","callback","innerHTML","styleOpts","querySelectorAllForEach","element","prop","dataset","checked","parseFloat","id","flag","classList","replace","unhide","hide","disabled","add","setSelected","setActivated","remove","getTemplate","selector","querySelectorAll","scope","getParentTemplate","querySelectorAllParent","_this2","Vector","attributeNames","filterAttributesFeature","selectElement","attributestemplate","attributes","deactivateBinding","activateBinding","getAllFeaturesAttributes","getFeatures","getAttributes","allFeatures","getFeaturesAttributes","fs","option","addEventListener","document","createElement","innerText","removeChild","SimpleBinding","_Binding","styleParams","controller","simplebinding_classCallCheck","simplebinding_possibleConstructorReturn","simplebinding_getPrototypeOf","controller_","simplebinding_inherits","selected","arrayId","arrayName","index","_icon","radius","fill","color","opacity","width","pattern","size","spacing","offset","rotation","stroke","linedash","linedashoffset","linecap","linejoin","label","text","font","align","baseline","rotate","icon","form","anchor","_defineProperty","refresh","refreshTemplate","geometry","GEOMETRIES","geometry_","node","refreshOptionsButtons","addLabelPathListener","OPTIONS_POINT_SUBMENU","addOptionsButtons","compatibleSectionListener","_this3","parentHtml","hideAllOptionsSections","addTemplate","buttonoptions","buttonsParams","toggleCheckOptionSection","activateOptionSection","activateOptionsStyle","addEventCheckFromSubmenu","_this4","querySelectorAllForEachParent","selectPanel","iconSelect","replaceWith","cloneNode","eventOpenIconSelector","eventSelectIcon","familySelect","changeFamilyFont","famSelector","fmSIcon","fmSIconArray","fam","dispatchEvent","Event","getOptions","checkOptionSection","disableOption","ev","iconDialog","target","contains","iconSelected","display","elem","_this5","pathCheck","togglePathSection","_this6","event","toggleCheckOptSectionListener","activateOption","inputSection","_this7","querySelectorParent","checkbox","activateLabel","displaySectionOption","showOptionSection","_this8","value2","opt","labelOpt","fontSize","fontFamily","iconOpts","processOptions","styleOptsClone","extends","checkedFill","isChecked","checkedStroke","checkedLabel","checkedIcon","checkedForm","styleOptions","generateOptions","Generic","optionEnable","optionDisable","_this9","enableOption","clickable","hideOptionSection","DEFAULT_OPTIONS_STYLE","patternValids","alignValues","baselineValues","formValues","arrayDataToTemplate","labelTextValues","labelTextSelected","funct","imgId_","generateStyle","clone","Point","RADIUS_OPTION","ICON_RADIUS_OPTION","img","updateCanvas","dataURL","toImage","ProportionalBinding","proportionalbinding_classCallCheck","proportionalbinding_possibleConstructorReturn","proportionalbinding_getPrototypeOf","proportionalbinding_inherits","opts","attributeName","Proportional","minRadius","maxRadius","getAttributeName","getMinRadius","getMaxRadius","attribute","ClusterBinding","clusterbinding_classCallCheck","clusterbinding_possibleConstructorReturn","clusterbinding_getPrototypeOf","addEventRangeListener","addPaginationListener","clusterbinding_inherits","ranges","clusterbinding_toConsumableArray","Cluster","distanceSelectFeatures","rangesInput","numRanges","NUMBER_RANGES","setAttribute","removeAttribute","pagerElement","paginationListener","oldElement","oldId","oldRange","setRanges","rangeOpt","lastRange","hoverInteraction","displayAmount","selectInteraction","animated","maxFeaturesToSelect","HeatmapBinding","heatmapbinding_classCallCheck","heatmapbinding_possibleConstructorReturn","heatmapbinding_getPrototypeOf","removeGradientListener","addGradientListener","numberAddedColors_","heatmapbinding_inherits","parentElement","parent","htmlgradient","MAX_NUMBER_COLORS","setRandomColor","inputColor","randomColor","Heatmap","getRadius","getBlurSize","getGradient","gradient","blur","ChoroplethBinding","choroplethbinding_classCallCheck","choroplethbinding_possibleConstructorReturn","choroplethbinding_getPrototypeOf","choroplethbinding_inherits","rangesButton","number","quantification","JENKS","QUANTILE","Choropleth","startColor","getChoroplethStyles","endColor","getQuantification","SimpleCategoryBinding","binding","simplecategorybinding_classCallCheck","simplecategorybinding_possibleConstructorReturn","simplecategorybinding_getPrototypeOf","fill_","stroke_","label_","form_","icon_","binding_","simplecategorybinding_inherits","simplecategorybinding_defineProperty","getGeometry","section","Line","Polygon","error","HTMLDivElement","refreshLegend","HTMLSelectElement","bool","CategoryBinding","categorybinding_classCallCheck","categorybinding_possibleConstructorReturn","categorybinding_getPrototypeOf","styleCategories_","renderAttributeOptions","selectedCategory_","clickedOnTable_","categorybinding_inherits","setAttributes","toggleCategory","OPTIONS_SUBMENU","buttonoptions2","addEventOptionListener","addEventCheckListener","deactivateSubmenu","setCompatibleStylePanels","showActivePanel","simpleBinding","activateSubmenu","checkInput","showCompatibleSections","setLayer","attributeExists","getAllValuesAttribute","splice","MAXNUMBER_CATEGORIES","removeCategories","createCategories","addCategoriesView","categorystyles","addEventClickListener","addEventSelectedListener","addLegendListenerAll","categoriesStyle","getCategories","categoryStyle","simpleoptions","setGeometryCategory","otherCategory","stylesimple","destroy","_this10","category","_this11","hideSection","showSection","activeSection","_this12","checkSection","_this13","setSelectedRow","_this14","feature","getAttribute","pos","arr","_this15","styleCategories","Category","_this16","imgId","addLegendListener","ChartBinding","chartbinding_classCallCheck","chartbinding_possibleConstructorReturn","chartbinding_getPrototypeOf","variables_","variables","variable","addKeyEnterListener","addRenderCompatibleListener","addAttributeListener","refreshVariables","chartbinding_inherits","renderAttributes","attr","attr2","addAttribute","addVariableTemplate","refreshPagination","addAttributeFromParamenter","addAttributeFromInput","keyEnterListener","evt","legend","DEFAULT_OPTIONS_VARIABLE","find","variablechart","append","chartbinding_toConsumableArray","children","removeElement","addRemoveVarSectionListener","addLabelOptionListener","removeVariableTemplate","removeVariableSection","removeVarSectionListener","paginationchart","addClickPagerListener","firstAttr","showVariableSection","element2","clickPagerListener","activePageListener","selectType","selectedOptions","renderCompatibleOpts","renderCompatibleListener","attributeschart","toggleLabelOptions","optVars","labelshow","reduce","tot","curr","varsOpts","generateVariableOptions","scheme","chart","schemes","Chart","donutRadio","donutRadius","offsetX","offsetY","Variable","fill3DColor","getSchemeName","schemesChart","array","array2","include","include2","every","donutRatio","rotateWithView","radiusIncrement","BindingController","bindingcontroller_classCallCheck","activePanel_","selectedPanels_","renderViews","Simple","styleproportional","stylechoropleth","stylecategory","stylecluster","styleheatmap","stylechart","point","line","polygon","styleBinding","getStyle","Composite","getStyles","bindings_","getCompilePromise","addSelectOnChangeListener","allCompilePromises_","getBindings","promises","all","toggleDisplaySubmenu","addSelectedPanel","style2","setDisabled","destroyViews","renderViewsPromise","resetOptions","setCompatiblePanels","initBindings","addActiveListener","addSelectListener","setGeometry","getKeysBindings","enablePanel","disablePanel","deactivateAll","unselectAll","styles","bindingcontroller_toConsumableArray","parseStyleToName","showCompatiblePanel","activeLastSelected","GEOMETRY_COMPATIBLE_OPTIONS","bindLayer","disableAll","getCompatibles","compatibleGeometry","setActivePanel","lastSelected","removeSelectedPanel","bindingStyle","selectButton","getSelectButton","activeButton","getActivateButton","flap","getSelectedPanels","mainStyle","getMainStyle","getIndividualStyles","equals","isCompatibleAll","STYLE_COMPATIBLE_OPTIONS","isCompatible","stylemanagerControl_classCallCheck","isUndefined","StyleManagerImplControl","exception","stylemanagerControl_possibleConstructorReturn","stylemanagerControl_getPrototypeOf","facadeMap_","layers","getWFS","getKML","getLayers","success","fail","stylemanager","jsonp","htmlSelect","container","bindinController_","subscribeAddedLayer","addApplyBtnListener","addClearBtnListener","renderOptionsLayerParam","loadFonts","getAllCompilePromises","renderOptions","compile","applyStyle","clearStyle","on","ADDED_LAYER","addLayerOption","_layer","_objectSpread","isNotAdded","htmlOption","layerName","stylemanagerControl_toConsumableArray","some","getLayerByName","selectedIndex","change","showBoxes","addOpenAttribute","setStyle","Font","addSymbol","copyright","prefix","fa-glass","fa-music","fa-search","fa-envelope-o","fa-heart","fa-star","fa-star-o","fa-user","fa-film","fa-th-large","fa-th","fa-th-list","fa-check","fa-remove","fa-close","fa-times","fa-search-plus","fa-search-minus","fa-power-off","fa-signal","fa-gear","fa-cog","fa-trash-o","fa-home","fa-file-o","fa-clock-o","fa-road","fa-download","fa-arrow-circle-o-down","fa-arrow-circle-o-up","fa-inbox","fa-play-circle-o","fa-rotate-right","fa-repeat","fa-refresh","fa-list-alt","fa-lock","fa-flag","fa-headphones","fa-volume-off","fa-volume-down","fa-volume-up","fa-qrcode","fa-barcode","fa-tag","fa-tags","fa-book","fa-bookmark","fa-print","fa-camera","fa-font","fa-bold","fa-italic","fa-text-height","fa-text-width","fa-align-left","fa-align-center","fa-align-right","fa-align-justify","fa-list","fa-dedent","fa-outdent","fa-indent","fa-video-camera","fa-photo","fa-image","fa-picture-o","fa-pencil","fa-map-marker","fa-adjust","fa-tint","fa-edit","fa-pencil-square-o","fa-share-square-o","fa-check-square-o","fa-arrows","fa-step-backward","fa-fast-backward","fa-backward","fa-play","fa-pause","fa-stop","fa-forward","fa-fast-forward","fa-step-forward","fa-eject","fa-chevron-left","fa-chevron-right","fa-plus-circle","fa-minus-circle","fa-times-circle","fa-check-circle","fa-question-circle","fa-info-circle","fa-crosshairs","fa-times-circle-o","fa-check-circle-o","fa-ban","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrow-down","fa-mail-forward","fa-share","fa-expand","fa-compress","fa-plus","fa-minus","fa-asterisk","fa-exclamation-circle","fa-gift","fa-leaf","fa-fire","fa-eye","fa-eye-slash","fa-warning","fa-exclamation-triangle","fa-plane","fa-calendar","fa-random","fa-comment","fa-magnet","fa-chevron-up","fa-chevron-down","fa-retweet","fa-shopping-cart","fa-folder","fa-folder-open","fa-arrows-v","fa-arrows-h","fa-bar-t-o","fa-bar-t","fa-twitter-square","fa-facebook-square","fa-camera-retro","fa-key","fa-gears","fa-cogs","fa-comments","control","ColorPickerPolyfill","colorpicker_classCallCheck","window","nativeColorPicker","started","inputs","hasNativeColorSupport","init","inputId","getElementById","unselectable","backgroundColor","borderWidth","cursor","onfocus","onFocus","object_element","classid","height","body","off","ChooseColorDlg","substring","el","props","StyleManager","stylemanager_classCallCheck","stylemanager_possibleConstructorReturn","stylemanager_getPrototypeOf","map_","controls_","panel_","Handlebars","registerHelper","n1","n2","arg1","arg2","inverse","fn","string","toUpperCase","extendsObj","Plugin","ui","Panel","NAME","collapsible","className","collapsedButtonClass","position","TL","tooltip","addControls","addPanels","removeControls","_ref","control_","plugin","M$plugin$StyleManager"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QA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AA,GAEqB36C,KAAKg5C,KAF1B2B,EAAA,gCAMR,MAAO,sDCvHNtD,OAAOjuB,EAAEyxB,SAAQxD,OAAOjuB,EAAEyxB,OAAS,IACxCxD,OAAOjuB,EAAEyxB,OAAOjC,aAAekC","file":"stylemanager.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","/**\n * chroma.js - JavaScript library for color conversions\n *\n * Copyright (c) 2011-2018, Gregor Aisch\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. The name Gregor Aisch may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * -------------------------------------------------------\n *\n * chroma.js includes colors from colorbrewer2.org, which are released under\n * the following license:\n *\n * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,\n * and The Pennsylvania State University.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n * ------------------------------------------------------\n *\n * Named colors are taken from X11 Color Names.\n * http://www.w3.org/TR/css3-color/#svg-color\n *\n * @preserve\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.chroma = factory());\n}(this, (function () { 'use strict';\n\n var limit = function (x, min, max) {\n if ( min === void 0 ) min=0;\n if ( max === void 0 ) max=1;\n\n return x < min ? min : x > max ? max : x;\n };\n\n var clip_rgb = function (rgb) {\n rgb._clipped = false;\n rgb._unclipped = rgb.slice(0);\n for (var i=0; i<=3; i++) {\n if (i < 3) {\n if (rgb[i] < 0 || rgb[i] > 255) { rgb._clipped = true; }\n rgb[i] = limit(rgb[i], 0, 255);\n } else if (i === 3) {\n rgb[i] = limit(rgb[i], 0, 1);\n }\n }\n return rgb;\n };\n\n // ported from jQuery's $.type\n var classToType = {};\n for (var i = 0, list = ['Boolean', 'Number', 'String', 'Function', 'Array', 'Date', 'RegExp', 'Undefined', 'Null']; i < list.length; i += 1) {\n var name = list[i];\n\n classToType[(\"[object \" + name + \"]\")] = name.toLowerCase();\n }\n var type = function(obj) {\n return classToType[Object.prototype.toString.call(obj)] || \"object\";\n };\n\n var unpack = function (args, keyOrder) {\n if ( keyOrder === void 0 ) keyOrder=null;\n\n \t// if called with more than 3 arguments, we return the arguments\n if (args.length >= 3) { return Array.prototype.slice.call(args); }\n // with less than 3 args we check if first arg is object\n // and use the keyOrder string to extract and sort properties\n \tif (type(args[0]) == 'object' && keyOrder) {\n \t\treturn keyOrder.split('')\n \t\t\t.filter(function (k) { return args[0][k] !== undefined; })\n \t\t\t.map(function (k) { return args[0][k]; });\n \t}\n \t// otherwise we just return the first argument\n \t// (which we suppose is an array of args)\n return args[0];\n };\n\n var last = function (args) {\n if (args.length < 2) { return null; }\n var l = args.length-1;\n if (type(args[l]) == 'string') { return args[l].toLowerCase(); }\n return null;\n };\n\n var PI = Math.PI;\n\n var utils = {\n \tclip_rgb: clip_rgb,\n \tlimit: limit,\n \ttype: type,\n \tunpack: unpack,\n \tlast: last,\n \tPI: PI,\n \tTWOPI: PI*2,\n \tPITHIRD: PI/3,\n \tDEG2RAD: PI / 180,\n \tRAD2DEG: 180 / PI\n };\n\n var input = {\n \tformat: {},\n \tautodetect: []\n };\n\n var last$1 = utils.last;\n var clip_rgb$1 = utils.clip_rgb;\n var type$1 = utils.type;\n\n\n var Color = function Color() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var me = this;\n if (type$1(args[0]) === 'object' &&\n args[0].constructor &&\n args[0].constructor === this.constructor) {\n // the argument is already a Color instance\n return args[0];\n }\n\n // last argument could be the mode\n var mode = last$1(args);\n var autodetect = false;\n\n if (!mode) {\n autodetect = true;\n if (!input.sorted) {\n input.autodetect = input.autodetect.sort(function (a,b) { return b.p - a.p; });\n input.sorted = true;\n }\n // auto-detect format\n for (var i = 0, list = input.autodetect; i < list.length; i += 1) {\n var chk = list[i];\n\n mode = chk.test.apply(chk, args);\n if (mode) { break; }\n }\n }\n\n if (input.format[mode]) {\n var rgb = input.format[mode].apply(null, autodetect ? args : args.slice(0,-1));\n me._rgb = clip_rgb$1(rgb);\n } else {\n throw new Error('unknown format: '+args);\n }\n\n // add alpha channel\n if (me._rgb.length === 3) { me._rgb.push(1); }\n };\n\n Color.prototype.toString = function toString () {\n if (type$1(this.hex) == 'function') { return this.hex(); }\n return (\"[\" + (this._rgb.join(',')) + \"]\");\n };\n\n var Color_1 = Color;\n\n var chroma = function () {\n \tvar args = [], len = arguments.length;\n \twhile ( len-- ) args[ len ] = arguments[ len ];\n\n \treturn new (Function.prototype.bind.apply( chroma.Color, [ null ].concat( args) ));\n };\n\n chroma.Color = Color_1;\n chroma.version = '2.0.3';\n\n var chroma_1 = chroma;\n\n var unpack$1 = utils.unpack;\n var max = Math.max;\n\n var rgb2cmyk = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$1(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r = r / 255;\n g = g / 255;\n b = b / 255;\n var k = 1 - max(r,max(g,b));\n var f = k < 1 ? 1 / (1-k) : 0;\n var c = (1-r-k) * f;\n var m = (1-g-k) * f;\n var y = (1-b-k) * f;\n return [c,m,y,k];\n };\n\n var rgb2cmyk_1 = rgb2cmyk;\n\n var unpack$2 = utils.unpack;\n\n var cmyk2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$2(args, 'cmyk');\n var c = args[0];\n var m = args[1];\n var y = args[2];\n var k = args[3];\n var alpha = args.length > 4 ? args[4] : 1;\n if (k === 1) { return [0,0,0,alpha]; }\n return [\n c >= 1 ? 0 : 255 * (1-c) * (1-k), // r\n m >= 1 ? 0 : 255 * (1-m) * (1-k), // g\n y >= 1 ? 0 : 255 * (1-y) * (1-k), // b\n alpha\n ];\n };\n\n var cmyk2rgb_1 = cmyk2rgb;\n\n var unpack$3 = utils.unpack;\n var type$2 = utils.type;\n\n\n\n Color_1.prototype.cmyk = function() {\n return rgb2cmyk_1(this._rgb);\n };\n\n chroma_1.cmyk = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['cmyk']) ));\n };\n\n input.format.cmyk = cmyk2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$3(args, 'cmyk');\n if (type$2(args) === 'array' && args.length === 4) {\n return 'cmyk';\n }\n }\n });\n\n var unpack$4 = utils.unpack;\n var last$2 = utils.last;\n var rnd = function (a) { return Math.round(a*100)/100; };\n\n /*\n * supported arguments:\n * - hsl2css(h,s,l)\n * - hsl2css(h,s,l,a)\n * - hsl2css([h,s,l], mode)\n * - hsl2css([h,s,l,a], mode)\n * - hsl2css({h,s,l,a}, mode)\n */\n var hsl2css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hsla = unpack$4(args, 'hsla');\n var mode = last$2(args) || 'lsa';\n hsla[0] = rnd(hsla[0] || 0);\n hsla[1] = rnd(hsla[1]*100) + '%';\n hsla[2] = rnd(hsla[2]*100) + '%';\n if (mode === 'hsla' || (hsla.length > 3 && hsla[3]<1)) {\n hsla[3] = hsla.length > 3 ? hsla[3] : 1;\n mode = 'hsla';\n } else {\n hsla.length = 3;\n }\n return (mode + \"(\" + (hsla.join(',')) + \")\");\n };\n\n var hsl2css_1 = hsl2css;\n\n var unpack$5 = utils.unpack;\n\n /*\n * supported arguments:\n * - rgb2hsl(r,g,b)\n * - rgb2hsl(r,g,b,a)\n * - rgb2hsl([r,g,b])\n * - rgb2hsl([r,g,b,a])\n * - rgb2hsl({r,g,b,a})\n */\n var rgb2hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$5(args, 'rgba');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n\n r /= 255;\n g /= 255;\n b /= 255;\n\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n\n var l = (max + min) / 2;\n var s, h;\n\n if (max === min){\n s = 0;\n h = Number.NaN;\n } else {\n s = l < 0.5 ? (max - min) / (max + min) : (max - min) / (2 - max - min);\n }\n\n if (r == max) { h = (g - b) / (max - min); }\n else if (g == max) { h = 2 + (b - r) / (max - min); }\n else if (b == max) { h = 4 + (r - g) / (max - min); }\n\n h *= 60;\n if (h < 0) { h += 360; }\n if (args.length>3 && args[3]!==undefined) { return [h,s,l,args[3]]; }\n return [h,s,l];\n };\n\n var rgb2hsl_1 = rgb2hsl;\n\n var unpack$6 = utils.unpack;\n var last$3 = utils.last;\n\n\n var round = Math.round;\n\n /*\n * supported arguments:\n * - rgb2css(r,g,b)\n * - rgb2css(r,g,b,a)\n * - rgb2css([r,g,b], mode)\n * - rgb2css([r,g,b,a], mode)\n * - rgb2css({r,g,b,a}, mode)\n */\n var rgb2css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$6(args, 'rgba');\n var mode = last$3(args) || 'rgb';\n if (mode.substr(0,3) == 'hsl') {\n return hsl2css_1(rgb2hsl_1(rgba), mode);\n }\n rgba[0] = round(rgba[0]);\n rgba[1] = round(rgba[1]);\n rgba[2] = round(rgba[2]);\n if (mode === 'rgba' || (rgba.length > 3 && rgba[3]<1)) {\n rgba[3] = rgba.length > 3 ? rgba[3] : 1;\n mode = 'rgba';\n }\n return (mode + \"(\" + (rgba.slice(0,mode==='rgb'?3:4).join(',')) + \")\");\n };\n\n var rgb2css_1 = rgb2css;\n\n var RE_HEX = /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;\n var RE_HEXA = /^#?([A-Fa-f0-9]{8})$/;\n\n var hex2rgb = function (hex) {\n if (hex.match(RE_HEX)) {\n // remove optional leading #\n if (hex.length === 4 || hex.length === 7) {\n hex = hex.substr(1);\n }\n // expand short-notation to full six-digit\n if (hex.length === 3) {\n hex = hex.split('');\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n var u = parseInt(hex, 16);\n var r = u >> 16;\n var g = u >> 8 & 0xFF;\n var b = u & 0xFF;\n return [r,g,b,1];\n }\n\n // match rgba hex format, eg #FF000077\n if (hex.match(RE_HEXA)) {\n if (hex.length === 9) {\n // remove optional leading #\n hex = hex.substr(1);\n }\n var u$1 = parseInt(hex, 16);\n var r$1 = u$1 >> 24 & 0xFF;\n var g$1 = u$1 >> 16 & 0xFF;\n var b$1 = u$1 >> 8 & 0xFF;\n var a = Math.round((u$1 & 0xFF) / 0xFF * 100) / 100;\n return [r$1,g$1,b$1,a];\n }\n\n // we used to check for css colors here\n // if _input.css? and rgb = _input.css hex\n // return rgb\n\n throw new Error((\"unknown hex color: \" + hex));\n };\n\n var hex2rgb_1 = hex2rgb;\n\n var unpack$7 = utils.unpack;\n var round$1 = Math.round;\n\n var hsl2rgb = function () {\n var assign;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$7(args, 'hsl');\n var h = args[0];\n var s = args[1];\n var l = args[2];\n var r,g,b;\n if (s === 0) {\n r = g = b = l*255;\n } else {\n var t3 = [0,0,0];\n var c = [0,0,0];\n var t2 = l < 0.5 ? l * (1+s) : l+s-l*s;\n var t1 = 2 * l - t2;\n var h_ = h / 360;\n t3[0] = h_ + 1/3;\n t3[1] = h_;\n t3[2] = h_ - 1/3;\n for (var i=0; i<3; i++) {\n if (t3[i] < 0) { t3[i] += 1; }\n if (t3[i] > 1) { t3[i] -= 1; }\n if (6 * t3[i] < 1)\n { c[i] = t1 + (t2 - t1) * 6 * t3[i]; }\n else if (2 * t3[i] < 1)\n { c[i] = t2; }\n else if (3 * t3[i] < 2)\n { c[i] = t1 + (t2 - t1) * ((2 / 3) - t3[i]) * 6; }\n else\n { c[i] = t1; }\n }\n (assign = [round$1(c[0]*255),round$1(c[1]*255),round$1(c[2]*255)], r = assign[0], g = assign[1], b = assign[2]);\n }\n if (args.length > 3) {\n // keep alpha channel\n return [r,g,b,args[3]];\n }\n return [r,g,b,1];\n };\n\n var hsl2rgb_1 = hsl2rgb;\n\n /**\n \tX11 color names\n\n \thttp://www.w3.org/TR/css3-color/#svg-color\n */\n\n var w3cx11 = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflower: '#6495ed',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n laserlemon: '#ffff54',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrod: '#fafad2',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n maroon2: '#7f0000',\n maroon3: '#b03060',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n purple2: '#7f007f',\n purple3: '#a020f0',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n };\n\n var w3cx11_1 = w3cx11;\n\n var RE_RGB = /^rgb\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\)$/;\n var RE_RGBA = /^rgba\\(\\s*(-?\\d+),\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_RGB_PCT = /^rgb\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_RGBA_PCT = /^rgba\\(\\s*(-?\\d+(?:\\.\\d+)?)%,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n var RE_HSL = /^hsl\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*\\)$/;\n var RE_HSLA = /^hsla\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/;\n\n var round$2 = Math.round;\n\n var css2rgb = function (css) {\n css = css.toLowerCase().trim();\n // named X11 colors\n if (w3cx11_1[css]) {\n return hex2rgb_1(w3cx11_1[css]);\n }\n var m;\n\n // rgb(250,20,0)\n if ((m = css.match(RE_RGB))) {\n var rgb = m.slice(1,4);\n for (var i=0; i<3; i++) {\n rgb[i] = +rgb[i];\n }\n rgb[3] = 1; // default alpha\n return rgb;\n }\n\n // rgba(250,20,0,0.4)\n if ((m = css.match(RE_RGBA))) {\n var rgb$1 = m.slice(1,5);\n for (var i$1=0; i$1<4; i$1++) {\n rgb$1[i$1] = +rgb$1[i$1];\n }\n return rgb$1;\n }\n\n // rgb(100%,0%,0%)\n if ((m = css.match(RE_RGB_PCT))) {\n var rgb$2 = m.slice(1,4);\n for (var i$2=0; i$2<3; i$2++) {\n rgb$2[i$2] = round$2(rgb$2[i$2] * 2.55);\n }\n rgb$2[3] = 1; // default alpha\n return rgb$2;\n }\n\n // rgba(100%,0%,0%,0.4)\n if ((m = css.match(RE_RGBA_PCT))) {\n var rgb$3 = m.slice(1,5);\n for (var i$3=0; i$3<3; i$3++) {\n rgb$3[i$3] = round$2(rgb$3[i$3] * 2.55);\n }\n rgb$3[3] = +rgb$3[3];\n return rgb$3;\n }\n\n // hsl(0,100%,50%)\n if ((m = css.match(RE_HSL))) {\n var hsl = m.slice(1,4);\n hsl[1] *= 0.01;\n hsl[2] *= 0.01;\n var rgb$4 = hsl2rgb_1(hsl);\n rgb$4[3] = 1;\n return rgb$4;\n }\n\n // hsla(0,100%,50%,0.5)\n if ((m = css.match(RE_HSLA))) {\n var hsl$1 = m.slice(1,4);\n hsl$1[1] *= 0.01;\n hsl$1[2] *= 0.01;\n var rgb$5 = hsl2rgb_1(hsl$1);\n rgb$5[3] = +m[4]; // default alpha = 1\n return rgb$5;\n }\n };\n\n css2rgb.test = function (s) {\n return RE_RGB.test(s) ||\n RE_RGBA.test(s) ||\n RE_RGB_PCT.test(s) ||\n RE_RGBA_PCT.test(s) ||\n RE_HSL.test(s) ||\n RE_HSLA.test(s);\n };\n\n var css2rgb_1 = css2rgb;\n\n var type$3 = utils.type;\n\n\n\n\n Color_1.prototype.css = function(mode) {\n return rgb2css_1(this._rgb, mode);\n };\n\n chroma_1.css = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['css']) ));\n };\n\n input.format.css = css2rgb_1;\n\n input.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$3(h) === 'string' && css2rgb_1.test(h)) {\n return 'css';\n }\n }\n });\n\n var unpack$8 = utils.unpack;\n\n input.format.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$8(args, 'rgba');\n rgb[0] *= 255;\n rgb[1] *= 255;\n rgb[2] *= 255;\n return rgb;\n };\n\n chroma_1.gl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['gl']) ));\n };\n\n Color_1.prototype.gl = function() {\n var rgb = this._rgb;\n return [rgb[0]/255, rgb[1]/255, rgb[2]/255, rgb[3]];\n };\n\n var unpack$9 = utils.unpack;\n\n var rgb2hcg = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$9(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var delta = max - min;\n var c = delta * 100 / 255;\n var _g = min / (255 - delta) * 100;\n var h;\n if (delta === 0) {\n h = Number.NaN;\n } else {\n if (r === max) { h = (g - b) / delta; }\n if (g === max) { h = 2+(b - r) / delta; }\n if (b === max) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, c, _g];\n };\n\n var rgb2hcg_1 = rgb2hcg;\n\n var unpack$a = utils.unpack;\n var floor = Math.floor;\n\n /*\n * this is basically just HSV with some minor tweaks\n *\n * hue.. [0..360]\n * chroma .. [0..1]\n * grayness .. [0..1]\n */\n\n var hcg2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$a(args, 'hcg');\n var h = args[0];\n var c = args[1];\n var _g = args[2];\n var r,g,b;\n _g = _g * 255;\n var _c = c * 255;\n if (c === 0) {\n r = g = b = _g;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n var i = floor(h);\n var f = h - i;\n var p = _g * (1 - c);\n var q = p + _c * (1 - f);\n var t = p + _c * f;\n var v = p + _c;\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var hcg2rgb_1 = hcg2rgb;\n\n var unpack$b = utils.unpack;\n var type$4 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hcg = function() {\n return rgb2hcg_1(this._rgb);\n };\n\n chroma_1.hcg = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hcg']) ));\n };\n\n input.format.hcg = hcg2rgb_1;\n\n input.autodetect.push({\n p: 1,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$b(args, 'hcg');\n if (type$4(args) === 'array' && args.length === 3) {\n return 'hcg';\n }\n }\n });\n\n var unpack$c = utils.unpack;\n var last$4 = utils.last;\n var round$3 = Math.round;\n\n var rgb2hex = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$c(args, 'rgba');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var a = ref[3];\n var mode = last$4(args) || 'auto';\n if (a === undefined) { a = 1; }\n if (mode === 'auto') {\n mode = a < 1 ? 'rgba' : 'rgb';\n }\n r = round$3(r);\n g = round$3(g);\n b = round$3(b);\n var u = r << 16 | g << 8 | b;\n var str = \"000000\" + u.toString(16); //#.toUpperCase();\n str = str.substr(str.length - 6);\n var hxa = '0' + round$3(a * 255).toString(16);\n hxa = hxa.substr(hxa.length - 2);\n switch (mode.toLowerCase()) {\n case 'rgba': return (\"#\" + str + hxa);\n case 'argb': return (\"#\" + hxa + str);\n default: return (\"#\" + str);\n }\n };\n\n var rgb2hex_1 = rgb2hex;\n\n var type$5 = utils.type;\n\n\n\n\n Color_1.prototype.hex = function(mode) {\n return rgb2hex_1(this._rgb, mode);\n };\n\n chroma_1.hex = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hex']) ));\n };\n\n input.format.hex = hex2rgb_1;\n input.autodetect.push({\n p: 4,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$5(h) === 'string' && [3,4,6,7,8,9].includes(h.length)) {\n return 'hex';\n }\n }\n });\n\n var unpack$d = utils.unpack;\n var TWOPI = utils.TWOPI;\n var min = Math.min;\n var sqrt = Math.sqrt;\n var acos = Math.acos;\n\n var rgb2hsi = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/rgb2hsi.cpp\n */\n var ref = unpack$d(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var h;\n var min_ = min(r,g,b);\n var i = (r+g+b) / 3;\n var s = i > 0 ? 1 - min_/i : 0;\n if (s === 0) {\n h = NaN;\n } else {\n h = ((r-g)+(r-b)) / 2;\n h /= sqrt((r-g)*(r-g) + (r-b)*(g-b));\n h = acos(h);\n if (b > g) {\n h = TWOPI - h;\n }\n h /= TWOPI;\n }\n return [h*360,s,i];\n };\n\n var rgb2hsi_1 = rgb2hsi;\n\n var unpack$e = utils.unpack;\n var limit$1 = utils.limit;\n var TWOPI$1 = utils.TWOPI;\n var PITHIRD = utils.PITHIRD;\n var cos = Math.cos;\n\n /*\n * hue [0..360]\n * saturation [0..1]\n * intensity [0..1]\n */\n var hsi2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n borrowed from here:\n http://hummer.stanford.edu/museinfo/doc/examples/humdrum/keyscape2/hsi2rgb.cpp\n */\n args = unpack$e(args, 'hsi');\n var h = args[0];\n var s = args[1];\n var i = args[2];\n var r,g,b;\n\n if (isNaN(h)) { h = 0; }\n if (isNaN(s)) { s = 0; }\n // normalize hue\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 360;\n if (h < 1/3) {\n b = (1-s)/3;\n r = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n g = 1 - (b+r);\n } else if (h < 2/3) {\n h -= 1/3;\n r = (1-s)/3;\n g = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n b = 1 - (r+g);\n } else {\n h -= 2/3;\n g = (1-s)/3;\n b = (1+s*cos(TWOPI$1*h)/cos(PITHIRD-TWOPI$1*h))/3;\n r = 1 - (g+b);\n }\n r = limit$1(i*r*3);\n g = limit$1(i*g*3);\n b = limit$1(i*b*3);\n return [r*255, g*255, b*255, args.length > 3 ? args[3] : 1];\n };\n\n var hsi2rgb_1 = hsi2rgb;\n\n var unpack$f = utils.unpack;\n var type$6 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsi = function() {\n return rgb2hsi_1(this._rgb);\n };\n\n chroma_1.hsi = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsi']) ));\n };\n\n input.format.hsi = hsi2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$f(args, 'hsi');\n if (type$6(args) === 'array' && args.length === 3) {\n return 'hsi';\n }\n }\n });\n\n var unpack$g = utils.unpack;\n var type$7 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsl = function() {\n return rgb2hsl_1(this._rgb);\n };\n\n chroma_1.hsl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsl']) ));\n };\n\n input.format.hsl = hsl2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$g(args, 'hsl');\n if (type$7(args) === 'array' && args.length === 3) {\n return 'hsl';\n }\n }\n });\n\n var unpack$h = utils.unpack;\n var min$1 = Math.min;\n var max$1 = Math.max;\n\n /*\n * supported arguments:\n * - rgb2hsv(r,g,b)\n * - rgb2hsv([r,g,b])\n * - rgb2hsv({r,g,b})\n */\n var rgb2hsl$1 = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$h(args, 'rgb');\n var r = args[0];\n var g = args[1];\n var b = args[2];\n var min_ = min$1(r, g, b);\n var max_ = max$1(r, g, b);\n var delta = max_ - min_;\n var h,s,v;\n v = max_ / 255.0;\n if (max_ === 0) {\n h = Number.NaN;\n s = 0;\n } else {\n s = delta / max_;\n if (r === max_) { h = (g - b) / delta; }\n if (g === max_) { h = 2+(b - r) / delta; }\n if (b === max_) { h = 4+(r - g) / delta; }\n h *= 60;\n if (h < 0) { h += 360; }\n }\n return [h, s, v]\n };\n\n var rgb2hsv = rgb2hsl$1;\n\n var unpack$i = utils.unpack;\n var floor$1 = Math.floor;\n\n var hsv2rgb = function () {\n var assign, assign$1, assign$2, assign$3, assign$4, assign$5;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n args = unpack$i(args, 'hsv');\n var h = args[0];\n var s = args[1];\n var v = args[2];\n var r,g,b;\n v *= 255;\n if (s === 0) {\n r = g = b = v;\n } else {\n if (h === 360) { h = 0; }\n if (h > 360) { h -= 360; }\n if (h < 0) { h += 360; }\n h /= 60;\n\n var i = floor$1(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - s * f);\n var t = v * (1 - s * (1 - f));\n\n switch (i) {\n case 0: (assign = [v, t, p], r = assign[0], g = assign[1], b = assign[2]); break\n case 1: (assign$1 = [q, v, p], r = assign$1[0], g = assign$1[1], b = assign$1[2]); break\n case 2: (assign$2 = [p, v, t], r = assign$2[0], g = assign$2[1], b = assign$2[2]); break\n case 3: (assign$3 = [p, q, v], r = assign$3[0], g = assign$3[1], b = assign$3[2]); break\n case 4: (assign$4 = [t, p, v], r = assign$4[0], g = assign$4[1], b = assign$4[2]); break\n case 5: (assign$5 = [v, p, q], r = assign$5[0], g = assign$5[1], b = assign$5[2]); break\n }\n }\n return [r,g,b,args.length > 3?args[3]:1];\n };\n\n var hsv2rgb_1 = hsv2rgb;\n\n var unpack$j = utils.unpack;\n var type$8 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.hsv = function() {\n return rgb2hsv(this._rgb);\n };\n\n chroma_1.hsv = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hsv']) ));\n };\n\n input.format.hsv = hsv2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$j(args, 'hsv');\n if (type$8(args) === 'array' && args.length === 3) {\n return 'hsv';\n }\n }\n });\n\n var labConstants = {\n // Corresponds roughly to RGB brighter/darker\n Kn: 18,\n\n // D65 standard referent\n Xn: 0.950470,\n Yn: 1,\n Zn: 1.088830,\n\n t0: 0.137931034, // 4 / 29\n t1: 0.206896552, // 6 / 29\n t2: 0.12841855, // 3 * t1 * t1\n t3: 0.008856452, // t1 * t1 * t1\n };\n\n var unpack$k = utils.unpack;\n var pow = Math.pow;\n\n var rgb2lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$k(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2xyz(r,g,b);\n var x = ref$1[0];\n var y = ref$1[1];\n var z = ref$1[2];\n var l = 116 * y - 16;\n return [l < 0 ? 0 : l, 500 * (x - y), 200 * (y - z)];\n };\n\n var rgb_xyz = function (r) {\n if ((r /= 255) <= 0.04045) { return r / 12.92; }\n return pow((r + 0.055) / 1.055, 2.4);\n };\n\n var xyz_lab = function (t) {\n if (t > labConstants.t3) { return pow(t, 1 / 3); }\n return t / labConstants.t2 + labConstants.t0;\n };\n\n var rgb2xyz = function (r,g,b) {\n r = rgb_xyz(r);\n g = rgb_xyz(g);\n b = rgb_xyz(b);\n var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / labConstants.Xn);\n var y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / labConstants.Yn);\n var z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / labConstants.Zn);\n return [x,y,z];\n };\n\n var rgb2lab_1 = rgb2lab;\n\n var unpack$l = utils.unpack;\n var pow$1 = Math.pow;\n\n /*\n * L* [0..100]\n * a [-100..100]\n * b [-100..100]\n */\n var lab2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$l(args, 'lab');\n var l = args[0];\n var a = args[1];\n var b = args[2];\n var x,y,z, r,g,b_;\n\n y = (l + 16) / 116;\n x = isNaN(a) ? y : y + a / 500;\n z = isNaN(b) ? y : y - b / 200;\n\n y = labConstants.Yn * lab_xyz(y);\n x = labConstants.Xn * lab_xyz(x);\n z = labConstants.Zn * lab_xyz(z);\n\n r = xyz_rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z); // D65 -> sRGB\n g = xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z);\n b_ = xyz_rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z);\n\n return [r,g,b_,args.length > 3 ? args[3] : 1];\n };\n\n var xyz_rgb = function (r) {\n return 255 * (r <= 0.00304 ? 12.92 * r : 1.055 * pow$1(r, 1 / 2.4) - 0.055)\n };\n\n var lab_xyz = function (t) {\n return t > labConstants.t1 ? t * t * t : labConstants.t2 * (t - labConstants.t0)\n };\n\n var lab2rgb_1 = lab2rgb;\n\n var unpack$m = utils.unpack;\n var type$9 = utils.type;\n\n\n\n\n\n\n Color_1.prototype.lab = function() {\n return rgb2lab_1(this._rgb);\n };\n\n chroma_1.lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['lab']) ));\n };\n\n input.format.lab = lab2rgb_1;\n\n input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$m(args, 'lab');\n if (type$9(args) === 'array' && args.length === 3) {\n return 'lab';\n }\n }\n });\n\n var unpack$n = utils.unpack;\n var RAD2DEG = utils.RAD2DEG;\n var sqrt$1 = Math.sqrt;\n var atan2 = Math.atan2;\n var round$4 = Math.round;\n\n var lab2lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$n(args, 'lab');\n var l = ref[0];\n var a = ref[1];\n var b = ref[2];\n var c = sqrt$1(a * a + b * b);\n var h = (atan2(b, a) * RAD2DEG + 360) % 360;\n if (round$4(c*10000) === 0) { h = Number.NaN; }\n return [l, c, h];\n };\n\n var lab2lch_1 = lab2lch;\n\n var unpack$o = utils.unpack;\n\n\n\n var rgb2lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$o(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n var ref$1 = rgb2lab_1(r,g,b);\n var l = ref$1[0];\n var a = ref$1[1];\n var b_ = ref$1[2];\n return lab2lch_1(l,a,b_);\n };\n\n var rgb2lch_1 = rgb2lch;\n\n var unpack$p = utils.unpack;\n var DEG2RAD = utils.DEG2RAD;\n var sin = Math.sin;\n var cos$1 = Math.cos;\n\n var lch2lab = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n /*\n Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n These formulas were invented by David Dalrymple to obtain maximum contrast without going\n out of gamut if the parameters are in the range 0-1.\n\n A saturation multiplier was added by Gregor Aisch\n */\n var ref = unpack$p(args, 'lch');\n var l = ref[0];\n var c = ref[1];\n var h = ref[2];\n if (isNaN(h)) { h = 0; }\n h = h * DEG2RAD;\n return [l, cos$1(h) * c, sin(h) * c]\n };\n\n var lch2lab_1 = lch2lab;\n\n var unpack$q = utils.unpack;\n\n\n\n var lch2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$q(args, 'lch');\n var l = args[0];\n var c = args[1];\n var h = args[2];\n var ref = lch2lab_1 (l,c,h);\n var L = ref[0];\n var a = ref[1];\n var b_ = ref[2];\n var ref$1 = lab2rgb_1 (L,a,b_);\n var r = ref$1[0];\n var g = ref$1[1];\n var b = ref$1[2];\n return [r, g, b, args.length > 3 ? args[3] : 1];\n };\n\n var lch2rgb_1 = lch2rgb;\n\n var unpack$r = utils.unpack;\n\n\n var hcl2rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var hcl = unpack$r(args, 'hcl').reverse();\n return lch2rgb_1.apply(void 0, hcl);\n };\n\n var hcl2rgb_1 = hcl2rgb;\n\n var unpack$s = utils.unpack;\n var type$a = utils.type;\n\n\n\n\n\n\n Color_1.prototype.lch = function() { return rgb2lch_1(this._rgb); };\n Color_1.prototype.hcl = function() { return rgb2lch_1(this._rgb).reverse(); };\n\n chroma_1.lch = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['lch']) ));\n };\n chroma_1.hcl = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['hcl']) ));\n };\n\n input.format.lch = lch2rgb_1;\n input.format.hcl = hcl2rgb_1;\n\n ['lch','hcl'].forEach(function (m) { return input.autodetect.push({\n p: 2,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$s(args, m);\n if (type$a(args) === 'array' && args.length === 3) {\n return m;\n }\n }\n }); });\n\n var type$b = utils.type;\n\n\n\n\n\n Color_1.prototype.name = function() {\n var hex = rgb2hex_1(this._rgb, 'rgb');\n for (var i = 0, list = Object.keys(w3cx11_1); i < list.length; i += 1) {\n var n = list[i];\n\n if (w3cx11_1[n] === hex) { return n.toLowerCase(); }\n }\n return hex;\n };\n\n input.format.named = function (name) {\n name = name.toLowerCase();\n if (w3cx11_1[name]) { return hex2rgb_1(w3cx11_1[name]); }\n throw new Error('unknown color name: '+name);\n };\n\n input.autodetect.push({\n p: 5,\n test: function (h) {\n var rest = [], len = arguments.length - 1;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 1 ];\n\n if (!rest.length && type$b(h) === 'string' && w3cx11_1[h.toLowerCase()]) {\n return 'named';\n }\n }\n });\n\n var unpack$t = utils.unpack;\n\n var rgb2num = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var ref = unpack$t(args, 'rgb');\n var r = ref[0];\n var g = ref[1];\n var b = ref[2];\n return (r << 16) + (g << 8) + b;\n };\n\n var rgb2num_1 = rgb2num;\n\n var type$c = utils.type;\n\n var num2rgb = function (num) {\n if (type$c(num) == \"number\" && num >= 0 && num <= 0xFFFFFF) {\n var r = num >> 16;\n var g = (num >> 8) & 0xFF;\n var b = num & 0xFF;\n return [r,g,b,1];\n }\n throw new Error(\"unknown num color: \"+num);\n };\n\n var num2rgb_1 = num2rgb;\n\n var type$d = utils.type;\n\n\n\n Color_1.prototype.num = function() {\n return rgb2num_1(this._rgb);\n };\n\n chroma_1.num = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['num']) ));\n };\n\n input.format.num = num2rgb_1;\n\n input.autodetect.push({\n p: 5,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (args.length === 1 && type$d(args[0]) === 'number' && args[0] >= 0 && args[0] <= 0xFFFFFF) {\n return 'num';\n }\n }\n });\n\n var unpack$u = utils.unpack;\n var type$e = utils.type;\n var round$5 = Math.round;\n\n Color_1.prototype.rgb = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n if (rnd === false) { return this._rgb.slice(0,3); }\n return this._rgb.slice(0,3).map(round$5);\n };\n\n Color_1.prototype.rgba = function(rnd) {\n if ( rnd === void 0 ) rnd=true;\n\n return this._rgb.slice(0,4).map(function (v,i) {\n return i<3 ? (rnd === false ? v : round$5(v)) : v;\n });\n };\n\n chroma_1.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['rgb']) ));\n };\n\n input.format.rgb = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgba = unpack$u(args, 'rgba');\n if (rgba[3] === undefined) { rgba[3] = 1; }\n return rgba;\n };\n\n input.autodetect.push({\n p: 3,\n test: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args = unpack$u(args, 'rgba');\n if (type$e(args) === 'array' && (args.length === 3 ||\n args.length === 4 && type$e(args[3]) == 'number' && args[3] >= 0 && args[3] <= 1)) {\n return 'rgb';\n }\n }\n });\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n */\n\n var log = Math.log;\n\n var temperature2rgb = function (kelvin) {\n var temp = kelvin / 100;\n var r,g,b;\n if (temp < 66) {\n r = 255;\n g = -155.25485562709179 - 0.44596950469579133 * (g = temp-2) + 104.49216199393888 * log(g);\n b = temp < 20 ? 0 : -254.76935184120902 + 0.8274096064007395 * (b = temp-10) + 115.67994401066147 * log(b);\n } else {\n r = 351.97690566805693 + 0.114206453784165 * (r = temp-55) - 40.25366309332127 * log(r);\n g = 325.4494125711974 + 0.07943456536662342 * (g = temp-50) - 28.0852963507957 * log(g);\n b = 255;\n }\n return [r,g,b,1];\n };\n\n var temperature2rgb_1 = temperature2rgb;\n\n /*\n * Based on implementation by Neil Bartlett\n * https://github.com/neilbartlett/color-temperature\n **/\n\n\n var unpack$v = utils.unpack;\n var round$6 = Math.round;\n\n var rgb2temperature = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var rgb = unpack$v(args, 'rgb');\n var r = rgb[0], b = rgb[2];\n var minTemp = 1000;\n var maxTemp = 40000;\n var eps = 0.4;\n var temp;\n while (maxTemp - minTemp > eps) {\n temp = (maxTemp + minTemp) * 0.5;\n var rgb$1 = temperature2rgb_1(temp);\n if ((rgb$1[2] / rgb$1[0]) >= (b / r)) {\n maxTemp = temp;\n } else {\n minTemp = temp;\n }\n }\n return round$6(temp);\n };\n\n var rgb2temperature_1 = rgb2temperature;\n\n Color_1.prototype.temp =\n Color_1.prototype.kelvin =\n Color_1.prototype.temperature = function() {\n return rgb2temperature_1(this._rgb);\n };\n\n chroma_1.temp =\n chroma_1.kelvin =\n chroma_1.temperature = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return new (Function.prototype.bind.apply( Color_1, [ null ].concat( args, ['temp']) ));\n };\n\n input.format.temp =\n input.format.kelvin =\n input.format.temperature = temperature2rgb_1;\n\n var type$f = utils.type;\n\n Color_1.prototype.alpha = function(a, mutate) {\n if ( mutate === void 0 ) mutate=false;\n\n if (a !== undefined && type$f(a) === 'number') {\n if (mutate) {\n this._rgb[3] = a;\n return this;\n }\n return new Color_1([this._rgb[0], this._rgb[1], this._rgb[2], a], 'rgb');\n }\n return this._rgb[3];\n };\n\n Color_1.prototype.clipped = function() {\n return this._rgb._clipped || false;\n };\n\n Color_1.prototype.darken = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lab = me.lab();\n \tlab[0] -= labConstants.Kn * amount;\n \treturn new Color_1(lab, 'lab').alpha(me.alpha(), true);\n };\n\n Color_1.prototype.brighten = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.darken(-amount);\n };\n\n Color_1.prototype.darker = Color_1.prototype.darken;\n Color_1.prototype.brighter = Color_1.prototype.brighten;\n\n Color_1.prototype.get = function(mc) {\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel);\n if (i > -1) { return src[i]; }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var type$g = utils.type;\n var pow$2 = Math.pow;\n\n var EPS = 1e-7;\n var MAX_ITER = 20;\n\n Color_1.prototype.luminance = function(lum) {\n if (lum !== undefined && type$g(lum) === 'number') {\n if (lum === 0) {\n // return pure black\n return new Color_1([0,0,0,this._rgb[3]], 'rgb');\n }\n if (lum === 1) {\n // return pure white\n return new Color_1([255,255,255,this._rgb[3]], 'rgb');\n }\n // compute new color using...\n var cur_lum = this.luminance();\n var mode = 'rgb';\n var max_iter = MAX_ITER;\n\n var test = function (low, high) {\n var mid = low.interpolate(high, 0.5, mode);\n var lm = mid.luminance();\n if (Math.abs(lum - lm) < EPS || !max_iter--) {\n // close enough\n return mid;\n }\n return lm > lum ? test(low, mid) : test(mid, high);\n };\n\n var rgb = (cur_lum > lum ? test(new Color_1([0,0,0]), this) : test(this, new Color_1([255,255,255]))).rgb();\n return new Color_1(rgb.concat( [this._rgb[3]]));\n }\n return rgb2luminance.apply(void 0, (this._rgb).slice(0,3));\n };\n\n\n var rgb2luminance = function (r,g,b) {\n // relative luminance\n // see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n r = luminance_x(r);\n g = luminance_x(g);\n b = luminance_x(b);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n };\n\n var luminance_x = function (x) {\n x /= 255;\n return x <= 0.03928 ? x/12.92 : pow$2((x+0.055)/1.055, 2.4);\n };\n\n var interpolator = {};\n\n var type$h = utils.type;\n\n\n var mix = function (col1, col2, f) {\n if ( f === void 0 ) f=0.5;\n var rest = [], len = arguments.length - 3;\n while ( len-- > 0 ) rest[ len ] = arguments[ len + 3 ];\n\n var mode = rest[0] || 'lrgb';\n if (!interpolator[mode] && !rest.length) {\n // fall back to the first supported mode\n mode = Object.keys(interpolator)[0];\n }\n if (!interpolator[mode]) {\n throw new Error((\"interpolation mode \" + mode + \" is not defined\"));\n }\n if (type$h(col1) !== 'object') { col1 = new Color_1(col1); }\n if (type$h(col2) !== 'object') { col2 = new Color_1(col2); }\n return interpolator[mode](col1, col2, f)\n .alpha(col1.alpha() + f * (col2.alpha() - col1.alpha()));\n };\n\n Color_1.prototype.mix =\n Color_1.prototype.interpolate = function(col2, f) {\n \tif ( f === void 0 ) f=0.5;\n \tvar rest = [], len = arguments.length - 2;\n \twhile ( len-- > 0 ) rest[ len ] = arguments[ len + 2 ];\n\n \treturn mix.apply(void 0, [ this, col2, f ].concat( rest ));\n };\n\n Color_1.prototype.premultiply = function(mutate) {\n \tif ( mutate === void 0 ) mutate=false;\n\n \tvar rgb = this._rgb;\n \tvar a = rgb[3];\n \tif (mutate) {\n \t\tthis._rgb = [rgb[0]*a, rgb[1]*a, rgb[2]*a, a];\n \t\treturn this;\n \t} else {\n \t\treturn new Color_1([rgb[0]*a, rgb[1]*a, rgb[2]*a, a], 'rgb');\n \t}\n };\n\n Color_1.prototype.saturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \tvar me = this;\n \tvar lch = me.lch();\n \tlch[1] += labConstants.Kn * amount;\n \tif (lch[1] < 0) { lch[1] = 0; }\n \treturn new Color_1(lch, 'lch').alpha(me.alpha(), true);\n };\n\n Color_1.prototype.desaturate = function(amount) {\n \tif ( amount === void 0 ) amount=1;\n\n \treturn this.saturate(-amount);\n };\n\n var type$i = utils.type;\n\n Color_1.prototype.set = function(mc, value, mutate) {\n if ( mutate === void 0 ) mutate=false;\n\n var ref = mc.split('.');\n var mode = ref[0];\n var channel = ref[1];\n var src = this[mode]();\n if (channel) {\n var i = mode.indexOf(channel);\n if (i > -1) {\n if (type$i(value) == 'string') {\n switch(value.charAt(0)) {\n case '+': src[i] += +value; break;\n case '-': src[i] += +value; break;\n case '*': src[i] *= +(value.substr(1)); break;\n case '/': src[i] /= +(value.substr(1)); break;\n default: src[i] = +value;\n }\n } else if (type$i(value) === 'number') {\n src[i] = value;\n } else {\n throw new Error(\"unsupported value for Color.set\");\n }\n var out = new Color_1(src, mode);\n if (mutate) {\n this._rgb = out._rgb;\n return this;\n }\n return out;\n }\n throw new Error((\"unknown channel \" + channel + \" in mode \" + mode));\n } else {\n return src;\n }\n };\n\n var rgb$1 = function (col1, col2, f) {\n var xyz0 = col1._rgb;\n var xyz1 = col2._rgb;\n return new Color_1(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator.rgb = rgb$1;\n\n var sqrt$2 = Math.sqrt;\n var pow$3 = Math.pow;\n\n var lrgb = function (col1, col2, f) {\n var ref = col1._rgb;\n var x1 = ref[0];\n var y1 = ref[1];\n var z1 = ref[2];\n var ref$1 = col2._rgb;\n var x2 = ref$1[0];\n var y2 = ref$1[1];\n var z2 = ref$1[2];\n return new Color_1(\n sqrt$2(pow$3(x1,2) * (1-f) + pow$3(x2,2) * f),\n sqrt$2(pow$3(y1,2) * (1-f) + pow$3(y2,2) * f),\n sqrt$2(pow$3(z1,2) * (1-f) + pow$3(z2,2) * f),\n 'rgb'\n )\n };\n\n // register interpolator\n interpolator.lrgb = lrgb;\n\n var lab$1 = function (col1, col2, f) {\n var xyz0 = col1.lab();\n var xyz1 = col2.lab();\n return new Color_1(\n xyz0[0] + f * (xyz1[0]-xyz0[0]),\n xyz0[1] + f * (xyz1[1]-xyz0[1]),\n xyz0[2] + f * (xyz1[2]-xyz0[2]),\n 'lab'\n )\n };\n\n // register interpolator\n interpolator.lab = lab$1;\n\n var _hsx = function (col1, col2, f, m) {\n var assign, assign$1;\n\n var xyz0, xyz1;\n if (m === 'hsl') {\n xyz0 = col1.hsl();\n xyz1 = col2.hsl();\n } else if (m === 'hsv') {\n xyz0 = col1.hsv();\n xyz1 = col2.hsv();\n } else if (m === 'hcg') {\n xyz0 = col1.hcg();\n xyz1 = col2.hcg();\n } else if (m === 'hsi') {\n xyz0 = col1.hsi();\n xyz1 = col2.hsi();\n } else if (m === 'lch' || m === 'hcl') {\n m = 'hcl';\n xyz0 = col1.hcl();\n xyz1 = col2.hcl();\n }\n\n var hue0, hue1, sat0, sat1, lbv0, lbv1;\n if (m.substr(0, 1) === 'h') {\n (assign = xyz0, hue0 = assign[0], sat0 = assign[1], lbv0 = assign[2]);\n (assign$1 = xyz1, hue1 = assign$1[0], sat1 = assign$1[1], lbv1 = assign$1[2]);\n }\n\n var sat, hue, lbv, dh;\n\n if (!isNaN(hue0) && !isNaN(hue1)) {\n // both colors have hue\n if (hue1 > hue0 && hue1 - hue0 > 180) {\n dh = hue1-(hue0+360);\n } else if (hue1 < hue0 && hue0 - hue1 > 180) {\n dh = hue1+360-hue0;\n } else{\n dh = hue1 - hue0;\n }\n hue = hue0 + f * dh;\n } else if (!isNaN(hue0)) {\n hue = hue0;\n if ((lbv1 == 1 || lbv1 == 0) && m != 'hsv') { sat = sat0; }\n } else if (!isNaN(hue1)) {\n hue = hue1;\n if ((lbv0 == 1 || lbv0 == 0) && m != 'hsv') { sat = sat1; }\n } else {\n hue = Number.NaN;\n }\n\n if (sat === undefined) { sat = sat0 + f * (sat1 - sat0); }\n lbv = lbv0 + f * (lbv1-lbv0);\n return new Color_1([hue, sat, lbv], m);\n };\n\n var lch$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'lch');\n };\n\n // register interpolator\n interpolator.lch = lch$1;\n interpolator.hcl = lch$1;\n\n var num$1 = function (col1, col2, f) {\n var c1 = col1.num();\n var c2 = col2.num();\n return new Color_1(c1 + f * (c2-c1), 'num')\n };\n\n // register interpolator\n interpolator.num = num$1;\n\n var hcg$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hcg');\n };\n\n // register interpolator\n interpolator.hcg = hcg$1;\n\n var hsi$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsi');\n };\n\n // register interpolator\n interpolator.hsi = hsi$1;\n\n var hsl$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsl');\n };\n\n // register interpolator\n interpolator.hsl = hsl$1;\n\n var hsv$1 = function (col1, col2, f) {\n \treturn _hsx(col1, col2, f, 'hsv');\n };\n\n // register interpolator\n interpolator.hsv = hsv$1;\n\n var clip_rgb$2 = utils.clip_rgb;\n var pow$4 = Math.pow;\n var sqrt$3 = Math.sqrt;\n var PI$1 = Math.PI;\n var cos$2 = Math.cos;\n var sin$1 = Math.sin;\n var atan2$1 = Math.atan2;\n\n var average = function (colors, mode) {\n if ( mode === void 0 ) mode='lrgb';\n\n var l = colors.length;\n // convert colors to Color objects\n colors = colors.map(function (c) { return new Color_1(c); });\n if (mode === 'lrgb') {\n return _average_lrgb(colors)\n }\n var first = colors.shift();\n var xyz = first.get(mode);\n var cnt = [];\n var dx = 0;\n var dy = 0;\n // initial color\n for (var i=0; i= 360) { A$1 -= 360; }\n xyz[i$1] = A$1;\n } else {\n xyz[i$1] = xyz[i$1]/cnt[i$1];\n }\n }\n alpha /= l;\n return (new Color_1(xyz, mode)).alpha(alpha > 0.99999 ? 1 : alpha, true);\n };\n\n\n var _average_lrgb = function (colors) {\n var l = colors.length;\n var f = 1/l;\n var xyz = [0,0,0,0];\n for (var i = 0, list = colors; i < list.length; i += 1) {\n var col = list[i];\n\n var rgb = col._rgb;\n xyz[0] += pow$4(rgb[0],2) * f;\n xyz[1] += pow$4(rgb[1],2) * f;\n xyz[2] += pow$4(rgb[2],2) * f;\n xyz[3] += rgb[3] * f;\n }\n xyz[0] = sqrt$3(xyz[0]);\n xyz[1] = sqrt$3(xyz[1]);\n xyz[2] = sqrt$3(xyz[2]);\n if (xyz[3] > 0.9999999) { xyz[3] = 1; }\n return new Color_1(clip_rgb$2(xyz));\n };\n\n // minimal multi-purpose interface\n\n // @requires utils color analyze\n\n\n var type$j = utils.type;\n\n var pow$5 = Math.pow;\n\n var scale = function(colors) {\n\n // constructor\n var _mode = 'rgb';\n var _nacol = chroma_1('#ccc');\n var _spread = 0;\n // const _fixed = false;\n var _domain = [0, 1];\n var _pos = [];\n var _padding = [0,0];\n var _classes = false;\n var _colors = [];\n var _out = false;\n var _min = 0;\n var _max = 1;\n var _correctLightness = false;\n var _colorCache = {};\n var _useCache = true;\n var _gamma = 1;\n\n // private methods\n\n var setColors = function(colors) {\n colors = colors || ['#fff', '#000'];\n if (colors && type$j(colors) === 'string' && chroma_1.brewer &&\n chroma_1.brewer[colors.toLowerCase()]) {\n colors = chroma_1.brewer[colors.toLowerCase()];\n }\n if (type$j(colors) === 'array') {\n // handle single color\n if (colors.length === 1) {\n colors = [colors[0], colors[0]];\n }\n // make a copy of the colors\n colors = colors.slice(0);\n // convert to chroma classes\n for (var c=0; c= _classes[i]) {\n i++;\n }\n return i-1;\n }\n return 0;\n };\n\n var tmap = function (t) { return t; };\n\n // const classifyValue = function(value) {\n // let val = value;\n // if (_classes.length > 2) {\n // const n = _classes.length-1;\n // const i = getClass(value);\n // const minc = _classes[0] + ((_classes[1]-_classes[0]) * (0 + (_spread * 0.5))); // center of 1st class\n // const maxc = _classes[n-1] + ((_classes[n]-_classes[n-1]) * (1 - (_spread * 0.5))); // center of last class\n // val = _min + ((((_classes[i] + ((_classes[i+1] - _classes[i]) * 0.5)) - minc) / (maxc-minc)) * (_max - _min));\n // }\n // return val;\n // };\n\n var getColor = function(val, bypassMap) {\n var col, t;\n if (bypassMap == null) { bypassMap = false; }\n if (isNaN(val) || (val === null)) { return _nacol; }\n if (!bypassMap) {\n if (_classes && (_classes.length > 2)) {\n // find the class\n var c = getClass(val);\n t = c / (_classes.length-2);\n } else if (_max !== _min) {\n // just interpolate between min/max\n t = (val - _min) / (_max - _min);\n } else {\n t = 1;\n }\n } else {\n t = val;\n }\n\n if (!bypassMap) {\n t = tmap(t); // lightness correction\n }\n\n if (_gamma !== 1) { t = pow$5(t, _gamma); }\n\n t = _padding[0] + (t * (1 - _padding[0] - _padding[1]));\n\n t = Math.min(1, Math.max(0, t));\n\n var k = Math.floor(t * 10000);\n\n if (_useCache && _colorCache[k]) {\n col = _colorCache[k];\n } else {\n if (type$j(_colors) === 'array') {\n //for i in [0.._pos.length-1]\n for (var i=0; i<_pos.length; i++) {\n var p = _pos[i];\n if (t <= p) {\n col = _colors[i];\n break;\n }\n if ((t >= p) && (i === (_pos.length-1))) {\n col = _colors[i];\n break;\n }\n if (t > p && t < _pos[i+1]) {\n t = (t-p)/(_pos[i+1]-p);\n col = chroma_1.interpolate(_colors[i], _colors[i+1], t, _mode);\n break;\n }\n }\n } else if (type$j(_colors) === 'function') {\n col = _colors(t);\n }\n if (_useCache) { _colorCache[k] = col; }\n }\n return col;\n };\n\n var resetCache = function () { return _colorCache = {}; };\n\n setColors(colors);\n\n // public interface\n\n var f = function(v) {\n var c = chroma_1(getColor(v));\n if (_out && c[_out]) { return c[_out](); } else { return c; }\n };\n\n f.classes = function(classes) {\n if (classes != null) {\n if (type$j(classes) === 'array') {\n _classes = classes;\n _domain = [classes[0], classes[classes.length-1]];\n } else {\n var d = chroma_1.analyze(_domain);\n if (classes === 0) {\n _classes = [d.min, d.max];\n } else {\n _classes = chroma_1.limits(d, 'e', classes);\n }\n }\n return f;\n }\n return _classes;\n };\n\n\n f.domain = function(domain) {\n if (!arguments.length) {\n return _domain;\n }\n _min = domain[0];\n _max = domain[domain.length-1];\n _pos = [];\n var k = _colors.length;\n if ((domain.length === k) && (_min !== _max)) {\n // update positions\n for (var i = 0, list = Array.from(domain); i < list.length; i += 1) {\n var d = list[i];\n\n _pos.push((d-_min) / (_max-_min));\n }\n } else {\n for (var c=0; c L1;\n var L_actual = getColor(t, true).lab()[0];\n var L_ideal = L0 + ((L1 - L0) * t);\n var L_diff = L_actual - L_ideal;\n var t0 = 0;\n var t1 = 1;\n var max_iter = 20;\n while ((Math.abs(L_diff) > 1e-2) && (max_iter-- > 0)) {\n (function() {\n if (pol) { L_diff *= -1; }\n if (L_diff < 0) {\n t0 = t;\n t += (t1 - t) * 0.5;\n } else {\n t1 = t;\n t += (t0 - t) * 0.5;\n }\n L_actual = getColor(t, true).lab()[0];\n return L_diff = L_actual - L_ideal;\n })();\n }\n return t;\n };\n } else {\n tmap = function (t) { return t; };\n }\n return f;\n };\n\n f.padding = function(p) {\n if (p != null) {\n if (type$j(p) === 'number') {\n p = [p,p];\n }\n _padding = p;\n return f;\n } else {\n return _padding;\n }\n };\n\n f.colors = function(numColors, out) {\n // If no arguments are given, return the original colors that were provided\n if (arguments.length < 2) { out = 'hex'; }\n var result = [];\n\n if (arguments.length === 0) {\n result = _colors.slice(0);\n\n } else if (numColors === 1) {\n result = [f(0.5)];\n\n } else if (numColors > 1) {\n var dm = _domain[0];\n var dd = _domain[1] - dm;\n result = __range__(0, numColors, false).map(function (i) { return f( dm + ((i/(numColors-1)) * dd) ); });\n\n } else { // returns all colors based on the defined classes\n colors = [];\n var samples = [];\n if (_classes && (_classes.length > 2)) {\n for (var i = 1, end = _classes.length, asc = 1 <= end; asc ? i < end : i > end; asc ? i++ : i--) {\n samples.push((_classes[i-1]+_classes[i])*0.5);\n }\n } else {\n samples = _domain;\n }\n result = samples.map(function (v) { return f(v); });\n }\n\n if (chroma_1[out]) {\n result = result.map(function (c) { return c[out](); });\n }\n return result;\n };\n\n f.cache = function(c) {\n if (c != null) {\n _useCache = c;\n return f;\n } else {\n return _useCache;\n }\n };\n\n f.gamma = function(g) {\n if (g != null) {\n _gamma = g;\n return f;\n } else {\n return _gamma;\n }\n };\n\n f.nodata = function(d) {\n if (d != null) {\n _nacol = chroma_1(d);\n return f;\n } else {\n return _nacol;\n }\n };\n\n return f;\n };\n\n function __range__(left, right, inclusive) {\n var range = [];\n var ascending = left < right;\n var end = !inclusive ? right : ascending ? right + 1 : right - 1;\n for (var i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {\n range.push(i);\n }\n return range;\n }\n\n //\n // interpolates between a set of colors uzing a bezier spline\n //\n\n // @requires utils lab\n\n\n\n\n var bezier = function(colors) {\n var assign, assign$1, assign$2;\n\n var I, lab0, lab1, lab2;\n colors = colors.map(function (c) { return new Color_1(c); });\n if (colors.length === 2) {\n // linear interpolation\n (assign = colors.map(function (c) { return c.lab(); }), lab0 = assign[0], lab1 = assign[1]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return lab0[i] + (t * (lab1[i] - lab0[i])); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 3) {\n // quadratic bezier interpolation\n (assign$1 = colors.map(function (c) { return c.lab(); }), lab0 = assign$1[0], lab1 = assign$1[1], lab2 = assign$1[2]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t) * lab0[i]) + (2 * (1-t) * t * lab1[i]) + (t * t * lab2[i]); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 4) {\n // cubic bezier interpolation\n var lab3;\n (assign$2 = colors.map(function (c) { return c.lab(); }), lab0 = assign$2[0], lab1 = assign$2[1], lab2 = assign$2[2], lab3 = assign$2[3]);\n I = function(t) {\n var lab = ([0, 1, 2].map(function (i) { return ((1-t)*(1-t)*(1-t) * lab0[i]) + (3 * (1-t) * (1-t) * t * lab1[i]) + (3 * (1-t) * t * t * lab2[i]) + (t*t*t * lab3[i]); }));\n return new Color_1(lab, 'lab');\n };\n } else if (colors.length === 5) {\n var I0 = bezier(colors.slice(0, 3));\n var I1 = bezier(colors.slice(2, 5));\n I = function(t) {\n if (t < 0.5) {\n return I0(t*2);\n } else {\n return I1((t-0.5)*2);\n }\n };\n }\n return I;\n };\n\n var bezier_1 = function (colors) {\n var f = bezier(colors);\n f.scale = function () { return scale(f); };\n return f;\n };\n\n /*\n * interpolates between a set of colors uzing a bezier spline\n * blend mode formulas taken from http://www.venture-ware.com/kevin/coding/lets-learn-math-photoshop-blend-modes/\n */\n\n\n\n\n var blend = function (bottom, top, mode) {\n if (!blend[mode]) {\n throw new Error('unknown blend mode ' + mode);\n }\n return blend[mode](bottom, top);\n };\n\n var blend_f = function (f) { return function (bottom,top) {\n var c0 = chroma_1(top).rgb();\n var c1 = chroma_1(bottom).rgb();\n return chroma_1.rgb(f(c0, c1));\n }; };\n\n var each = function (f) { return function (c0, c1) {\n var out = [];\n out[0] = f(c0[0], c1[0]);\n out[1] = f(c0[1], c1[1]);\n out[2] = f(c0[2], c1[2]);\n return out;\n }; };\n\n var normal = function (a) { return a; };\n var multiply = function (a,b) { return a * b / 255; };\n var darken$1 = function (a,b) { return a > b ? b : a; };\n var lighten = function (a,b) { return a > b ? a : b; };\n var screen = function (a,b) { return 255 * (1 - (1-a/255) * (1-b/255)); };\n var overlay = function (a,b) { return b < 128 ? 2 * a * b / 255 : 255 * (1 - 2 * (1 - a / 255 ) * ( 1 - b / 255 )); };\n var burn = function (a,b) { return 255 * (1 - (1 - b / 255) / (a/255)); };\n var dodge = function (a,b) {\n if (a === 255) { return 255; }\n a = 255 * (b / 255) / (1 - a / 255);\n return a > 255 ? 255 : a\n };\n\n // # add = (a,b) ->\n // # if (a + b > 255) then 255 else a + b\n\n blend.normal = blend_f(each(normal));\n blend.multiply = blend_f(each(multiply));\n blend.screen = blend_f(each(screen));\n blend.overlay = blend_f(each(overlay));\n blend.darken = blend_f(each(darken$1));\n blend.lighten = blend_f(each(lighten));\n blend.dodge = blend_f(each(dodge));\n blend.burn = blend_f(each(burn));\n // blend.add = blend_f(each(add));\n\n var blend_1 = blend;\n\n // cubehelix interpolation\n // based on D.A. Green \"A colour scheme for the display of astronomical intensity images\"\n // http://astron-soc.in/bulletin/11June/289392011.pdf\n\n var type$k = utils.type;\n var clip_rgb$3 = utils.clip_rgb;\n var TWOPI$2 = utils.TWOPI;\n var pow$6 = Math.pow;\n var sin$2 = Math.sin;\n var cos$3 = Math.cos;\n\n\n var cubehelix = function(start, rotations, hue, gamma, lightness) {\n if ( start === void 0 ) start=300;\n if ( rotations === void 0 ) rotations=-1.5;\n if ( hue === void 0 ) hue=1;\n if ( gamma === void 0 ) gamma=1;\n if ( lightness === void 0 ) lightness=[0,1];\n\n var dh = 0, dl;\n if (type$k(lightness) === 'array') {\n dl = lightness[1] - lightness[0];\n } else {\n dl = 0;\n lightness = [lightness, lightness];\n }\n\n var f = function(fract) {\n var a = TWOPI$2 * (((start+120)/360) + (rotations * fract));\n var l = pow$6(lightness[0] + (dl * fract), gamma);\n var h = dh !== 0 ? hue[0] + (fract * dh) : hue;\n var amp = (h * l * (1-l)) / 2;\n var cos_a = cos$3(a);\n var sin_a = sin$2(a);\n var r = l + (amp * ((-0.14861 * cos_a) + (1.78277* sin_a)));\n var g = l + (amp * ((-0.29227 * cos_a) - (0.90649* sin_a)));\n var b = l + (amp * (+1.97294 * cos_a));\n return chroma_1(clip_rgb$3([r*255,g*255,b*255,1]));\n };\n\n f.start = function(s) {\n if ((s == null)) { return start; }\n start = s;\n return f;\n };\n\n f.rotations = function(r) {\n if ((r == null)) { return rotations; }\n rotations = r;\n return f;\n };\n\n f.gamma = function(g) {\n if ((g == null)) { return gamma; }\n gamma = g;\n return f;\n };\n\n f.hue = function(h) {\n if ((h == null)) { return hue; }\n hue = h;\n if (type$k(hue) === 'array') {\n dh = hue[1] - hue[0];\n if (dh === 0) { hue = hue[1]; }\n } else {\n dh = 0;\n }\n return f;\n };\n\n f.lightness = function(h) {\n if ((h == null)) { return lightness; }\n if (type$k(h) === 'array') {\n lightness = h;\n dl = h[1] - h[0];\n } else {\n lightness = [h,h];\n dl = 0;\n }\n return f;\n };\n\n f.scale = function () { return chroma_1.scale(f); };\n\n f.hue(hue);\n\n return f;\n };\n\n var digits = '0123456789abcdef';\n\n var floor$2 = Math.floor;\n var random = Math.random;\n\n var random_1 = function () {\n var code = '#';\n for (var i=0; i<6; i++) {\n code += digits.charAt(floor$2(random() * 16));\n }\n return new Color_1(code, 'hex');\n };\n\n var log$1 = Math.log;\n var pow$7 = Math.pow;\n var floor$3 = Math.floor;\n var abs = Math.abs;\n\n\n var analyze = function (data, key) {\n if ( key === void 0 ) key=null;\n\n var r = {\n min: Number.MAX_VALUE,\n max: Number.MAX_VALUE*-1,\n sum: 0,\n values: [],\n count: 0\n };\n if (type(data) === 'object') {\n data = Object.values(data);\n }\n data.forEach(function (val) {\n if (key && type(val) === 'object') { val = val[key]; }\n if (val !== undefined && val !== null && !isNaN(val)) {\n r.values.push(val);\n r.sum += val;\n if (val < r.min) { r.min = val; }\n if (val > r.max) { r.max = val; }\n r.count += 1;\n }\n });\n\n r.domain = [r.min, r.max];\n\n r.limits = function (mode, num) { return limits(r, mode, num); };\n\n return r;\n };\n\n\n var limits = function (data, mode, num) {\n if ( mode === void 0 ) mode='equal';\n if ( num === void 0 ) num=7;\n\n if (type(data) == 'array') {\n data = analyze(data);\n }\n var min = data.min;\n var max = data.max;\n var values = data.values.sort(function (a,b) { return a-b; });\n\n if (num === 1) { return [min,max]; }\n\n var limits = [];\n\n if (mode.substr(0,1) === 'c') { // continuous\n limits.push(min);\n limits.push(max);\n }\n\n if (mode.substr(0,1) === 'e') { // equal interval\n limits.push(min);\n for (var i=1; i 0');\n }\n var min_log = Math.LOG10E * log$1(min);\n var max_log = Math.LOG10E * log$1(max);\n limits.push(min);\n for (var i$1=1; i$1 pb\n var pr = p - pb;\n limits.push((values[pb]*(1-pr)) + (values[pb+1]*pr));\n }\n }\n limits.push(max);\n\n }\n\n else if (mode.substr(0,1) === 'k') { // k-means clustering\n /*\n implementation based on\n http://code.google.com/p/figue/source/browse/trunk/figue.js#336\n simplified for 1-d input values\n */\n var cluster;\n var n = values.length;\n var assignments = new Array(n);\n var clusterSizes = new Array(num);\n var repeat = true;\n var nb_iters = 0;\n var centroids = null;\n\n // get seed values\n centroids = [];\n centroids.push(min);\n for (var i$3=1; i$3 200) {\n repeat = false;\n }\n }\n\n // finished k-means clustering\n // the next part is borrowed from gabrielflor.it\n var kClusters = {};\n for (var j$5=0; j$5 l2 ? (l1 + 0.05) / (l2 + 0.05) : (l2 + 0.05) / (l1 + 0.05);\n };\n\n var sqrt$4 = Math.sqrt;\n var atan2$2 = Math.atan2;\n var abs$1 = Math.abs;\n var cos$4 = Math.cos;\n var PI$2 = Math.PI;\n\n var deltaE = function(a, b, L, C) {\n if ( L === void 0 ) L=1;\n if ( C === void 0 ) C=1;\n\n // Delta E (CMC)\n // see http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CMC.html\n a = new Color_1(a);\n b = new Color_1(b);\n var ref = Array.from(a.lab());\n var L1 = ref[0];\n var a1 = ref[1];\n var b1 = ref[2];\n var ref$1 = Array.from(b.lab());\n var L2 = ref$1[0];\n var a2 = ref$1[1];\n var b2 = ref$1[2];\n var c1 = sqrt$4((a1 * a1) + (b1 * b1));\n var c2 = sqrt$4((a2 * a2) + (b2 * b2));\n var sl = L1 < 16.0 ? 0.511 : (0.040975 * L1) / (1.0 + (0.01765 * L1));\n var sc = ((0.0638 * c1) / (1.0 + (0.0131 * c1))) + 0.638;\n var h1 = c1 < 0.000001 ? 0.0 : (atan2$2(b1, a1) * 180.0) / PI$2;\n while (h1 < 0) { h1 += 360; }\n while (h1 >= 360) { h1 -= 360; }\n var t = (h1 >= 164.0) && (h1 <= 345.0) ? (0.56 + abs$1(0.2 * cos$4((PI$2 * (h1 + 168.0)) / 180.0))) : (0.36 + abs$1(0.4 * cos$4((PI$2 * (h1 + 35.0)) / 180.0)));\n var c4 = c1 * c1 * c1 * c1;\n var f = sqrt$4(c4 / (c4 + 1900.0));\n var sh = sc * (((f * t) + 1.0) - f);\n var delL = L1 - L2;\n var delC = c1 - c2;\n var delA = a1 - a2;\n var delB = b1 - b2;\n var dH2 = ((delA * delA) + (delB * delB)) - (delC * delC);\n var v1 = delL / (L * sl);\n var v2 = delC / (C * sc);\n var v3 = sh;\n return sqrt$4((v1 * v1) + (v2 * v2) + (dH2 / (v3 * v3)));\n };\n\n // simple Euclidean distance\n var distance = function(a, b, mode) {\n if ( mode === void 0 ) mode='lab';\n\n // Delta E (CIE 1976)\n // see http://www.brucelindbloom.com/index.html?Equations.html\n a = new Color_1(a);\n b = new Color_1(b);\n var l1 = a.get(mode);\n var l2 = b.get(mode);\n var sum_sq = 0;\n for (var i in l1) {\n var d = (l1[i] || 0) - (l2[i] || 0);\n sum_sq += d*d;\n }\n return Math.sqrt(sum_sq);\n };\n\n var valid = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n try {\n new (Function.prototype.bind.apply( Color_1, [ null ].concat( args) ));\n return true;\n } catch (e) {\n return false;\n }\n };\n\n // some pre-defined color scales:\n\n\n\n\n var scales = {\n \tcool: function cool() { return scale([chroma_1.hsl(180,1,.9), chroma_1.hsl(250,.7,.4)]) },\n \thot: function hot() { return scale(['#000','#f00','#ff0','#fff'], [0,.25,.75,1]).mode('rgb') }\n };\n\n /**\n ColorBrewer colors for chroma.js\n\n Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The\n Pennsylvania State University.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software distributed\n under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n CONDITIONS OF ANY KIND, either express or implied. See the License for the\n specific language governing permissions and limitations under the License.\n */\n\n var colorbrewer = {\n // sequential\n OrRd: ['#fff7ec', '#fee8c8', '#fdd49e', '#fdbb84', '#fc8d59', '#ef6548', '#d7301f', '#b30000', '#7f0000'],\n PuBu: ['#fff7fb', '#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0', '#045a8d', '#023858'],\n BuPu: ['#f7fcfd', '#e0ecf4', '#bfd3e6', '#9ebcda', '#8c96c6', '#8c6bb1', '#88419d', '#810f7c', '#4d004b'],\n Oranges: ['#fff5eb', '#fee6ce', '#fdd0a2', '#fdae6b', '#fd8d3c', '#f16913', '#d94801', '#a63603', '#7f2704'],\n BuGn: ['#f7fcfd', '#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', '#41ae76', '#238b45', '#006d2c', '#00441b'],\n YlOrBr: ['#ffffe5', '#fff7bc', '#fee391', '#fec44f', '#fe9929', '#ec7014', '#cc4c02', '#993404', '#662506'],\n YlGn: ['#ffffe5', '#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443', '#006837', '#004529'],\n Reds: ['#fff5f0', '#fee0d2', '#fcbba1', '#fc9272', '#fb6a4a', '#ef3b2c', '#cb181d', '#a50f15', '#67000d'],\n RdPu: ['#fff7f3', '#fde0dd', '#fcc5c0', '#fa9fb5', '#f768a1', '#dd3497', '#ae017e', '#7a0177', '#49006a'],\n Greens: ['#f7fcf5', '#e5f5e0', '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45', '#006d2c', '#00441b'],\n YlGnBu: ['#ffffd9', '#edf8b1', '#c7e9b4', '#7fcdbb', '#41b6c4', '#1d91c0', '#225ea8', '#253494', '#081d58'],\n Purples: ['#fcfbfd', '#efedf5', '#dadaeb', '#bcbddc', '#9e9ac8', '#807dba', '#6a51a3', '#54278f', '#3f007d'],\n GnBu: ['#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4', '#4eb3d3', '#2b8cbe', '#0868ac', '#084081'],\n Greys: ['#ffffff', '#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252', '#252525', '#000000'],\n YlOrRd: ['#ffffcc', '#ffeda0', '#fed976', '#feb24c', '#fd8d3c', '#fc4e2a', '#e31a1c', '#bd0026', '#800026'],\n PuRd: ['#f7f4f9', '#e7e1ef', '#d4b9da', '#c994c7', '#df65b0', '#e7298a', '#ce1256', '#980043', '#67001f'],\n Blues: ['#f7fbff', '#deebf7', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#08519c', '#08306b'],\n PuBuGn: ['#fff7fb', '#ece2f0', '#d0d1e6', '#a6bddb', '#67a9cf', '#3690c0', '#02818a', '#016c59', '#014636'],\n Viridis: ['#440154', '#482777', '#3f4a8a', '#31678e', '#26838f', '#1f9d8a', '#6cce5a', '#b6de2b', '#fee825'],\n\n // diverging\n\n Spectral: ['#9e0142', '#d53e4f', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#e6f598', '#abdda4', '#66c2a5', '#3288bd', '#5e4fa2'],\n RdYlGn: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b', '#ffffbf', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837'],\n RdBu: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#f7f7f7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],\n PiYG: ['#8e0152', '#c51b7d', '#de77ae', '#f1b6da', '#fde0ef', '#f7f7f7', '#e6f5d0', '#b8e186', '#7fbc41', '#4d9221', '#276419'],\n PRGn: ['#40004b', '#762a83', '#9970ab', '#c2a5cf', '#e7d4e8', '#f7f7f7', '#d9f0d3', '#a6dba0', '#5aae61', '#1b7837', '#00441b'],\n RdYlBu: ['#a50026', '#d73027', '#f46d43', '#fdae61', '#fee090', '#ffffbf', '#e0f3f8', '#abd9e9', '#74add1', '#4575b4', '#313695'],\n BrBG: ['#543005', '#8c510a', '#bf812d', '#dfc27d', '#f6e8c3', '#f5f5f5', '#c7eae5', '#80cdc1', '#35978f', '#01665e', '#003c30'],\n RdGy: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#ffffff', '#e0e0e0', '#bababa', '#878787', '#4d4d4d', '#1a1a1a'],\n PuOr: ['#7f3b08', '#b35806', '#e08214', '#fdb863', '#fee0b6', '#f7f7f7', '#d8daeb', '#b2abd2', '#8073ac', '#542788', '#2d004b'],\n\n // qualitative\n\n Set2: ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3'],\n Accent: ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f', '#bf5b17', '#666666'],\n Set1: ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33', '#a65628', '#f781bf', '#999999'],\n Set3: ['#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9', '#bc80bd', '#ccebc5', '#ffed6f'],\n Dark2: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],\n Paired: ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', '#e31a1c', '#fdbf6f', '#ff7f00', '#cab2d6', '#6a3d9a', '#ffff99', '#b15928'],\n Pastel2: ['#b3e2cd', '#fdcdac', '#cbd5e8', '#f4cae4', '#e6f5c9', '#fff2ae', '#f1e2cc', '#cccccc'],\n Pastel1: ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4', '#fed9a6', '#ffffcc', '#e5d8bd', '#fddaec', '#f2f2f2'],\n };\n\n // add lowercase aliases for case-insensitive matches\n for (var i$1 = 0, list$1 = Object.keys(colorbrewer); i$1 < list$1.length; i$1 += 1) {\n var key = list$1[i$1];\n\n colorbrewer[key.toLowerCase()] = colorbrewer[key];\n }\n\n var colorbrewer_1 = colorbrewer;\n\n // feel free to comment out anything to rollup\n // a smaller chroma.js built\n\n // io --> convert colors\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // operators --> modify existing Colors\n\n\n\n\n\n\n\n\n\n\n // interpolators\n\n\n\n\n\n\n\n\n\n\n // generators -- > create new colors\n chroma_1.average = average;\n chroma_1.bezier = bezier_1;\n chroma_1.blend = blend_1;\n chroma_1.cubehelix = cubehelix;\n chroma_1.mix = chroma_1.interpolate = mix;\n chroma_1.random = random_1;\n chroma_1.scale = scale;\n\n // other utility methods\n chroma_1.analyze = analyze_1.analyze;\n chroma_1.contrast = contrast;\n chroma_1.deltaE = deltaE;\n chroma_1.distance = distance;\n chroma_1.limits = analyze_1.limits;\n chroma_1.valid = valid;\n\n // scale\n chroma_1.scales = scales;\n\n // colors\n chroma_1.colors = w3cx11_1;\n chroma_1.brewer = colorbrewer_1;\n\n var chroma_js = chroma_1;\n\n return chroma_js;\n\n})));\n","module.exports = \"
\\n \\n
\\n
Opciones generales
\\n
\\n\\n
\\n
\\n Color:\\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
Opciones de punto
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n\\n
Opciones de línea
\\n\\n
\\n
\\n Ancho:\\n \\n
\\n
\\n \\n
Opciones de patrón de polígono
\\n\\n
\\n
\\n Patrón\\n \\n
\\n
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n\\n
\\n
\\n Rotación:\\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n
\\n
\\n Offset:\\n \\n
\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n
\\n
\\n Color:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Linedash:\\n \\n  \\n \\n
\\n\\n
\\n Linedash Offset:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Line Cap\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n
\\n
\\n Color\\n \\n
\\n
\\n Texto:\\n \\n
\\n
\\n\\n
\\n
\\n Fuente:\\n \\n
\\n
\\n Tamaño:\\n \\n
\\n
\\n\\n
\\n
\\n Alineación horizontal:\\n \\n
\\n\\n
\\n Alineación vertical:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Escala:\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n\\n \\n\\n
\\n\\n
\\n Ajustar a geometría\\n \\n
\\n\\n
\\n Ancho Mínimo:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Suavizar\\n \\n
\\n\\n
\\n Desbordar:\\n \\n
\\n\\n
\\n\\n \\n
Trazo de etiqueta:
\\n
\\n\\n
\\n Trazo\\n \\n
\\n\\n
\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Dash:\\n \\n  \\n \\n
\\n\\n
\\n Offset:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Cap:\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n \\n
\\n
\\n URL:\\n \\n
\\n
\\n Tamaño:\\n \\n  \\n \\n
\\n
\\n\\n
\\n
\\n Snap to pixel\\n \\n
\\n
\\n\\n
\\n
\\n Anclaje:\\n \\n  \\n \\n
\\n
\\n Escala:\\n \\n
\\n
\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n \\n
\\n\\n
\\n bkColor:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Forma:\\n \\n
\\n\\n
\\n Familia:\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n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
\\n\\n\";","module.exports = \"
\\n {{#each attributes}}\\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n \\n \\n \\n \\n \\n {{#each values}}\\n \\n \\n \\n \\n {{/each}} {{#if attributeExists}}\\n \\n \\n \\n \\n {{/if}}\\n
Valor de atributoPrevisualización
{{this.name}}\\\"\\\"
Otros\\\"\\\"
\\n
\\n\";","module.exports = \"
\\n
\\n
    \\n
  • \\n
    \\n \\n \\n \\n
    \\n
  • \\n
\\n\\n
\\n \\n \\n \\n\\n \\n
\\n
\\n\\n \\n\\n \\n \\n \\n\\n \\n \\n \\n\\n \\n \\n \\n\\n
\\n
\\n\\n \\n \\n \\n\\n \\n \\n \\n\\n \\n \\n \\n
\\n\\n\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n
\\n Atributos:\\n \\n
\\n
\\n
\\n
\\n Radio mínimo:\\n \\n
\\n
\\n Radio máximo:\\n \\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n \\n
\\n
Rangos
\\n
\\n\\n
\\n
\\n Número de rangos:\\n \\n
\\n
\\n
\\n {{#each ranges}}\\n
\\n
Rango {{#sum @index 1}}{{/sum}}
\\n
\\n
\\n Desde:\\n \\n
\\n
\\n Hasta:\\n \\n
\\n
\\n
\\n
\\n Relleno:\\n \\n
\\n
\\n Opacidad:\\n \\n
\\n
\\n
\\n
\\n Borde:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n
\\n {{/each}} {{#pages}}\\n
\\n
Rango {{id}}
\\n
\\n
\\n Desde:\\n \\n
\\n
\\n Hasta:\\n \\n
\\n
\\n
\\n
\\n Relleno:\\n \\n
\\n
\\n Opacidad:\\n \\n
\\n
\\n
\\n
\\n Borde:\\n \\n
\\n
\\n Ancho:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n
\\n {{/pages}}\\n
\\n\\n
\\n
    \\n {{#each ranges}}\\n
  • {{#sum @index 1}}{{/sum}}
  • \\n {{/each}} {{#each pages}}\\n
  • {{id}}
  • \\n {{/each}}\\n\\n
\\n
\\n\\n
\\n
\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n
\\n Envoltura\\n \\n
\\n
\\n Cantidad\\n \\n
\\n
\\n\\n
\\n
\\n Seleccionable\\n \\n
\\n
\\n Animado\\n \\n
\\n
\\n\\n
\\n
\\n Distancia:\\n \\n
\\n
\\n Puntos:\\n \\n
\\n
\\n\\n
\\n
\\n Distancia de abanico:\\n \\n
\\n
\\n Color de texto:\\n \\n
\\n
\\n\\n
\\n
\\n
\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Atributos:\\n \\n
\\n\\n
\\n
\\n\\n
\\n Algoritmo:\\n \\n
\\n\\n
\\n Rangos:\\n \\n
\\n
\\n
Rampa de color
\\n
\\n
\\n Inicial:\\n \\n
\\n
\\n Final:\\n \\n
\\n
\\n\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n\\n
\\n Atributo:\\n \\n
\\n
\\n\\n
\\n\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n
\\n
\\n Atributo:\\n \\n
\\n
\\n
\\n
\\n Gradiente:\\n
\\n {{#each gradient}}\\n
\\n \\n \\n
\\n {{/each}}\\n
\\n
\\n
\\n \\n \\n
\\n
\\n\\n
\\n
\\n Difuminado:\\n \\n
\\n\\n
\\n Radio:\\n \\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Eje X:\\n \\n
\\n\\n
\\n Eje Y:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n\\n
\\n Radio de donut:\\n \\n
\\n
\\n\\n
\\n
\\n Color 3D:\\n \\n
\\n
\\n\\n
\\n
\\n
Atributos
\\n
\\n\\n
\\n Atributo:\\n \\n
\\n\\n
\\n \\n \\n
\\n
\\n
\\n
\\n\\n
\\n
\\n\\n
\\n
\\n\";","module.exports = \"
\\n {{#each buttonsParams}}\\n \\n \\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n \\n \\n
\\n\";","module.exports = \"
\\n {{#each buttonsParams}}\\n \\n \\n {{/each}}\\n
\\n\";","module.exports = \"
\\n
\\n
Opciones
\\n
\\n\\n
\\n
\\n Color:\\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n
\\n Radio:\\n \\n
\\n
\\n\\n
\\n
\\n Ancho:\\n \\n
\\n
\\n \\n
Opciones de patrón
\\n\\n
\\n
\\n Patrón\\n \\n
\\n
\\n\\n
\\n
\\n Tipo:\\n \\n
\\n\\n
\\n Color:\\n \\n
\\n
\\n\\n
\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n\\n
\\n
\\n Rotación:\\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n
\\n
\\n Offset:\\n \\n
\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n
\\n Linedash:\\n \\n  \\n \\n
\\n\\n
\\n Linedash Offset:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Line Cap\\n \\n
\\n\\n
\\n Line Join\\n \\n
\\n\\n
\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n
\\n\\n
\\n Color\\n \\n
\\n\\n
\\n Texto:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Fuente:\\n \\n
\\n\\n
\\n Tamaño:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Alineación horizontal:\\n \\n
\\n\\n
\\n Alineación vertical:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Escala:\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n\\n \\n\\n
\\n\\n
\\n Ajustar\\n \\n
\\n\\n
\\n Ancho Mínimo:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Suavizar\\n \\n
\\n\\n
\\n Desbordar:\\n \\n
\\n\\n
\\n\\n \\n
Trazo de etiqueta:
\\n
\\n\\n
\\n Trazo\\n \\n
\\n\\n
\\n
\\n\\n
\\n Color:\\n \\n
\\n\\n
\\n Ancho:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Dash:\\n \\n  \\n \\n
\\n\\n
\\n Line Dash Offset:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Line Cap:\\n \\n
\\n\\n
\\n Line Join:\\n \\n
\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n\\n
\\n\\n\\n \\n
\\n\\n
\\n URL\\n \\n
\\n
\\n Tamaño:\\n \\n  \\n \\n
\\n\\n\\n
\\n\\n
\\n\\n\\n
\\n Snap to pixel\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Anclaje:\\n \\n  \\n \\n
\\n\\n
\\n Escala:\\n \\n
\\n
\\n\\n\\n\\n \\n
\\n\\n
\\n Offset:\\n \\n  \\n \\n
\\n\\n
\\n Opacidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n\\n \\n
\\n
Opciones
\\n
\\n\\n \\n
\\n\\n
\\n bkColor:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Forma:\\n \\n
\\n\\n
\\n Familia:\\n \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
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acidad:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Habilitar rotación con el mapa\\n \\n
\\n\\n
\\n Rotación:\\n \\n
\\n\\n
\\n\\n
\\n
\\n
\\n\";","module.exports = \"
\\n\\n
Variable: {{attribute}}
\\n
\\n\\n
\\n Leyenda:\\n \\n
\\n\\n
\\n Mostrar etiqueta\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n\\n
\\n Relleno:\\n \\n
\\n\\n
\\n Tamaño:\\n \\n
\\n\\n
\\n\\n
\\n\\n
\\n Borde:\\n \\n
\\n\\n
\\n Grosor:\\n \\n
\\n
\\n\\n
\\n\\n
\\n Espacio:\\n \\n
\\n
\\n
\\n
\\n
\\n
\\n\";","module.exports = \"
\\n
    \\n {{#each ranges}}\\n
  • {{this.number}}
  • \\n {{/each}}\\n
\\n
\\n\";","module.exports = \"
\\n {{#each attributes}}\\n \\n {{/each}}\\n
\\n\";","export default class StyleManagerControl extends M.impl.Control {\n /**\n * @classdesc\n * Main constructor of the StyleManagerControl.\n *\n * @constructor\n * @extends {M.impl.Control}\n * @api stable\n */\n constructor() {\n super();\n }\n /**\n * This function adds the control to the specified map\n *\n * @public\n * @function\n * @param {M.Map} map to add the plugin\n * @param {HTMLElement} html of the plugin\n * @api stable\n */\n addTo(map, html) {\n // specific code\n\n // super addTo\n super.addTo(map, html);\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n activate() {\n M.dialog.info('Hello World!');\n }\n\n /**\n *\n * @public\n * @function\n * @api stable\n */\n deactivate() {\n M.dialog.info('Bye World!');\n }\n}\n","import attributestemplate from 'templates/attributestemplate';\nexport class Binding {\n\n constructor(html, htmlParent, styleType, style, layer) {\n this.htmlParent_ = htmlParent;\n this.htmlTemplate_ = null;\n this.html_ = html;\n this.activated_ = true;\n this.selected_ = false;\n this.disabled_ = false;\n this.layer_ = layer;\n this.activateButton_ = htmlParent.querySelector(`[data-role=\"botonera\"] [data-flap=\"${styleType}\"]`);\n this.selectButton_ = htmlParent.querySelector(`[data-role=\"botonera\"] [data-checkbox=\"${styleType}\"]`);\n this.style_ = style;\n this.styleType_ = styleType;\n this.compilePromise_ = this.initializeView(this.html_, this.htmlParent_);\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n * @return {Promise}\n */\n compileTemplate(htmlName, options) {\n return new Promise((resolve) => {\n const html = M.template.compileSync(htmlName, {\n vars: options\n });\n resolve(html);\n });\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n * @return {Promise}\n */\n getCompilePromise() {\n return this.compilePromise_;\n }\n\n /**\n * This function compile with handlebars a html template.\n *\n * @function\n */\n initializeView(htmlName, htmlParent) {\n let optsTemplate = this.getOptionsTemplate();\n return this.compileTemplate(htmlName, optsTemplate).then((html) => {\n htmlParent.appendChild(html);\n this.htmlTemplate_ = html;\n });\n }\n\n /**\n * @function\n * @protected\n */\n getOptionsTemplate() {}\n\n /**\n * This function add the html template to html parent.\n *\n * @function\n */\n addTemplate(htmlName, htmlParent, options, callback = null) {\n this.compileTemplate(htmlName, options).then((html) => {\n htmlParent.innerHTML = html.innerHTML;\n if (typeof callback === 'function') {\n callback();\n }\n });\n }\n\n /**\n * This function compile with handlerbars a html template.\n *\n * @function\n */\n appendTemplate(htmlName, htmlParent, options, callback = null) {\n this.compileTemplate(htmlName, options).then((html) => {\n htmlParent.appendChild(html);\n if (typeof callback === 'function') {\n callback();\n }\n });\n }\n\n\n /**\n * This function generates the options style from his own html form.\n *\n * @function\n * @api stable\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n styleOpts[\"ranges\"] = {};\n\n // styleOpts section\n this.querySelectorAllForEach('[data-options]', element => {\n let prop = element.dataset[\"options\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n styleOpts[prop] = value;\n });\n\n // styleOpts.options section\n this.querySelectorAllForEach(\"[data-style-options]\", element => {\n let prop = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n styleOpts[\"options\"][prop] = value;\n });\n\n // Array option section (eg: gradient heatmap )\n this.querySelectorAllForEach(\"[data-array-options]\", element => {\n let prop = element.dataset[\"arrayOptions\"];\n let value = element.value;\n \n if (!M.utils.isArray(styleOpts[\"options\"][prop])) {\n styleOpts[\"options\"][prop] = [];\n }\n\n styleOpts[\"options\"][prop].push(value);\n\n });\n\n // Ranges cluster section\n this.querySelectorAllForEach(\"[data-ranges-id]\", element => {\n let id = element.dataset[\"rangesId\"];\n if (styleOpts[\"ranges\"][id] == undefined) {\n styleOpts[\"ranges\"][id] = {};\n }\n let path = element.dataset[\"rangesOptions\"];\n let value = element.value;\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n Binding.createObj(styleOpts[\"ranges\"][id], path, value);\n });\n return styleOpts;\n }\n\n /**\n * This function activate or deactivate the binding class.\n * @function\n * @param {boolean}\n */\n setActivated(flag) {\n this.activated_ = flag;\n if (flag === true) {\n this.activateButton_.classList.replace('check-selected', 'check-active');\n this.unhide();\n }\n\n if (flag === false) {\n this.activateButton_.classList.replace('check-active', 'check-selected');\n this.hide();\n }\n }\n\n /**\n * This function select or unselect the binding class.\n * @function\n * @param {boolean}\n */\n setSelected(flag) {\n this.selected_ = flag;\n this.selectButton_.checked = flag;\n }\n\n /**\n * This function disable or enable the binding class.\n * @function\n * @param {boolean}\n */\n setDisabled(flag) {\n this.disabled_ = flag;\n this.selectButton_.disabled = flag;\n if (flag === true) {\n this.activateButton_.classList.add('check-inactive');\n this.setSelected(!flag);\n this.setActivated(!flag);\n this.hide();\n }\n\n if (flag === false) {\n this.activateButton_.classList.remove('check-inactive');\n }\n }\n\n /**\n * This function hides the html view.\n * @function\n * @return {Binding}\n */\n hide() {\n this.getTemplate().classList.add('m-hidden');\n return this;\n }\n\n /**\n * This function shows the html view.\n * @function\n * @return {Binding}\n */\n unhide() {\n this.getTemplate().classList.remove('m-hidden');\n return this;\n }\n\n /**\n * This function gets the html template of binding class.\n * @function\n * @param {boolean}\n */\n getTemplate() {\n return this.htmlTemplate_;\n }\n\n /**\n * This function gets the html template of binding class.\n * @function\n * @param {boolean}\n */\n getParentTemplate() {\n return this.htmlParent_;\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelector(selector) {\n return this.getTemplate().querySelector(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAll(selector) {\n return this.getTemplate().querySelectorAll(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllForEach(selector, callback, scope = undefined) {\n Array.prototype.forEach.apply(this.querySelectorAll(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllMap(selector, callback, scope = undefined) {\n return Array.prototype.map.apply(this.querySelectorAll(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorParent(selector) {\n return this.getParentTemplate().querySelector(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllParent(selector) {\n return this.getParentTemplate().querySelectorAll(selector);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllForEachParent(selector, callback, scope = undefined) {\n Array.prototype.forEach.apply(this.querySelectorAllParent(selector), [callback, scope]);\n }\n\n /**\n * TODO\n * @function\n * @param {string}\n */\n querySelectorAllMapParent(selector, callback, scope = undefined) {\n return Array.prototype.map.apply(this.querySelectorAllParent(selector), [callback, scope]);\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer) {\n this.layer_ = layer;\n return this;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getActivateButton() {\n return this.activateButton_;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getSelectButton() {\n return this.selectButton_;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setIntegerAttributes() {\n let layer = this.layer_;\n if (layer instanceof M.layer.Vector) {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n this.compileTemplate(attributestemplate, {\n attributes: attributeNames\n }).then(html => {\n selectElement.innerHTML = html.innerHTML;\n if (attributeNames.length === 0) {\n this.deactivateBinding();\n } else {\n this.activateBinding();\n }\n });\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n filterAttributesFeature(type) {\n let attributes = this.getAllFeaturesAttributes();\n let attributeNames = Object.keys(attributes);\n switch (type) {\n case \"string\":\n attributeNames = attributeNames.filter(element => isNaN(parseFloat(attributes[element])));\n break;\n case \"number\":\n attributeNames = attributeNames.filter(element => !isNaN(parseFloat(attributes[element])));\n break;\n default:\n }\n return attributeNames;\n }\n\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getFeaturesAttributes() {\n return this.layer_.getFeatures()[0].getAttributes();\n }\n\n /**\n * This function search all attributes of each feature.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n getAllFeaturesAttributes() {\n let allFeatures = this.getFeaturesAttributes();\n this.layer_.getFeatures().reverse().forEach(fs => {\n Object.keys(fs.getAttributes()).forEach((k, v) => {\n // Keep a value if the next is null so we can check attribute type later.\n if (v != null && allFeatures[k] == null) allFeatures[k] = v;\n });\n });\n return allFeatures;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n hideAllOptionsSections() {\n this.querySelectorAllForEach(\".styles-row\", element => {\n element.classList.add(\"m-hidden\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n hideOptionSection(option) {\n let optionsSection = this.querySelector(`[data-id=${option}]`);\n optionsSection.classList.add(\"m-hidden\");\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n showOptionSection(option) {\n let optionsSection = this.querySelector(`[data-id=${option}]`);\n optionsSection.classList.remove(\"m-hidden\");\n }\n\n /**\n * This function adds an event listener for all HTMLInputElement and HTMLSelectElement.\n * @function\n * @param {function}\n */\n addInputListener(callback) {\n this.querySelectorAllForEach(\"input\", element => {\n element.addEventListener(\"change\", callback);\n });\n\n this.querySelectorAllForEach(\"select\", element => {\n element.addEventListener(\"change\", callback);\n });\n }\n\n /**\n * This function deactivate all html options of a binding class.\n * @function\n */\n deactivateBinding() {\n this.querySelectorAllForEach(\"input,select:not([data-options='attributeName']),label,span,.subtitle\", element => {\n element.classList.add(\"m-hidden\");\n });\n\n this.querySelector(\"[data-options='attributeName']\").disabled = true;\n let option = document.createElement(\"option\");\n option.value = \"\";\n option.innerText = \"No existen atributos\";\n this.querySelector(\"[data-options='attributeName']\").add(option);\n this.querySelector(\"span\").classList.remove(\"m-hidden\");\n }\n\n /**\n * This function deactivate all html options of a binding class.\n * @function\n */\n activateBinding() {\n this.querySelectorAllForEach(\"input,select:not([data-options='attributeName']),label,span,.subtitle\", element => {\n element.classList.remove(\"m-hidden\");\n });\n\n this.querySelector(\"[data-options='attributeName']\").disabled = false;\n }\n\n /**\n * @function\n */\n destroy() {\n this.htmlParent_.removeChild(this.htmlTemplate_);\n }\n\n /**\n * This function\n * @static\n * @function\n * @param {object}\n * @param {string}\n * @param {number|string|object}\n */\n static createObj(obj, path, value) {\n let keys = M.utils.isArray(path) ? path : path.split('.');\n let keyLength = keys.length;\n let key = keys[0];\n if (keyLength === 1) { // base case\n if (M.utils.isArray(value)) {\n value = [...value];\n } else if (M.utils.isObject(value)) {\n value = Object.assign({}, value);\n }\n obj[key] = value;\n } else if (keyLength > 1) { // recursive case\n if (M.utils.isNullOrEmpty(obj[key])) {\n obj[key] = {};\n }\n Binding.createObj(obj[key], keys.slice(1, keyLength), value);\n }\n }\n}\n","import * as chroma from 'chroma-js';\nimport buttonoptions from 'templates/buttonoptions';\nimport { Binding } from './binding';\nexport class SimpleBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, controller) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.controller_ = controller;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer, refresh = true) {\n this.layer_ = layer;\n if (refresh === true) {\n this.refreshTemplate();\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @param {string}\n * @return {SimpleBinding}\n */\n setGeometry(geometry) {\n if (SimpleBinding.GEOMETRIES.includes(geometry)) {\n this.geometry_ = geometry;\n } else {\n this.geometry_ = 'point';\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * This function refresh the html template.\n * @function\n */\n refreshTemplate() {\n this.querySelectorAllForEach(`[data-geometry]`, node => node.classList.remove('m-hidden'));\n this.refreshOptionsButtons();\n this.addLabelPathListener();\n }\n\n /**\n * This function refresh the html options buttons template.\n * @function\n */\n refreshOptionsButtons() {\n let options = SimpleBinding.OPTIONS_POINT_SUBMENU;\n\n this.addOptionsButtons(options, () => {\n this.compatibleSectionListener(\"icon\", \"form\");\n this.compatibleSectionListener(\"form\", \"icon\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addOptionsButtons(options, callback = null) {\n let parentHtml = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n this.hideAllOptionsSections();\n this.addTemplate(buttonoptions, parentHtml, {\n buttonsParams: options\n }, () => {\n options.forEach(option => {\n this.toggleCheckOptionSection(option.id);\n this.activateOptionSection(option.id);\n if (typeof callback === \"function\") {\n callback();\n }\n });\n this.activateOptionsStyle();\n this.addEventCheckFromSubmenu();\n });\n }\n\n addEventCheckFromSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option] input\", input => {\n input.addEventListener(\"change\", () => {\n this.controller_.selectPanel(\"stylesimple\");\n });\n });\n }\n\n /**\n * This functions initialize the submenu view of each option of Style simple\n * @function\n */\n activateOptionsStyle() {\n let style = this.style_;\n let iconSelect = this.querySelector(\"#select-icon\");\n iconSelect.replaceWith(iconSelect.cloneNode(true));\n iconSelect = this.querySelector(\"#select-icon\");\n iconSelect.addEventListener('click', this.eventOpenIconSelector);\n let iconDialog = document.querySelector(\".style-grid-container\");\n iconDialog.addEventListener('click', this.eventSelectIcon);\n let familySelect = this.querySelector(\"[data-style-options='form.class']\");\n familySelect.addEventListener('change', this.changeFamilyFont);\n let famSelector = this.querySelector(\".style-col-2 > select[data-style-options = 'form.class']\");\n let fmSIcon = famSelector.dataset.icon;\n if (fmSIcon !== '') {\n let fmSIconArray = fmSIcon.split('-');\n let fam = fmSIconArray[0] == 'g' ? 'g-cartografia' : fmSIconArray[0] == 'fa' ? 'fa' : '';\n famSelector.querySelector(`option[value=\"${fam}\"]`).selected = true;\n famSelector.dispatchEvent(new Event('change'));\n document.querySelector('#select-icon').classList = (fam == 'fa' ? 'fa ' : '') + fmSIcon;\n document.querySelector(`.style-grid-item${fam == 'fa' ? '.fa' : ''}.${fmSIcon}`).classList.add('selected');\n }\n\n if (style != null) {\n let options = style.getOptions();\n if (options[\"fill\"] != null) {\n let valuesFill = Object.values(options.fill).filter(value => value != undefined);\n if (valuesFill.length > 0) {\n this.checkOptionSection(\"fill\");\n }\n }\n\n if (options[\"stroke\"] != undefined) {\n this.checkOptionSection(\"stroke\");\n }\n\n if (options[\"label\"] != undefined) {\n this.checkOptionSection(\"label\");\n }\n\n if (options[\"icon\"] != undefined) {\n if (options[\"icon\"].hasOwnProperty(\"src\")) {\n this.checkOptionSection(\"icon\");\n this.disableOption(\"form\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"form\")) {\n\n this.checkOptionSection(\"form\");\n this.disableOption(\"icon\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"class\")) {\n familySelect.value = options[\"icon\"][\"class\"];\n }\n }\n\n }\n\n }\n\n /**\n * @function\n */\n eventOpenIconSelector(ev) {\n let iconDialog = document.querySelector(\".style-grid-container\");\n if (iconDialog.classList.toString() === 'style-grid-container active') { iconDialog.classList.remove('active'); } else { iconDialog.classList.add('active'); }\n }\n\n /**\n * @function\n */\n eventSelectIcon(ev) {\n if (!ev.target.classList.contains('selected') && ev.target.classList.contains('style-grid-item')) {\n let selected = document.querySelector('.style-grid-item.selected');\n if (selected) { selected.classList.remove('selected'); }\n ev.target.classList.add(\"selected\");\n let iconSelected = ev.target.classList.toString().replace('selected', '').replace('style-grid-item', '').trim();\n document.querySelector(\"[data-style-options='form.class']\").dataset.icon = iconSelected.replace('fa', '').trim();\n document.querySelector('#select-icon').classList = iconSelected;\n }\n }\n\n /**\n * @function\n */\n changeFamilyFont(ev) {\n if (ev.target.value === '') {\n document.querySelector('#select-icon').style.display = 'none';\n document.querySelector(\".style-grid-container\").classList.remove('active');\n } else {\n document.querySelector('#select-icon').style.display = 'inherit';\n }\n let childs = document.querySelectorAll(`.style-grid-item`);\n childs.forEach(elem => {\n elem.style.display = \"none\";\n });\n let childsSelected = document.querySelectorAll(`.style-grid-item[class*='${ev.target.value}']`);\n childsSelected.forEach(elem => {\n elem.style.display = \"inherit\";\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addLabelPathListener() {\n let pathCheck = this.querySelector(\"[data-style-options='label.path']\");\n pathCheck.addEventListener(\"change\", () => {\n this.togglePathSection(!pathCheck.checked);\n });\n }\n\n /**\n * @function\n */\n togglePathSection(flag) {\n this.querySelectorAllForEach(\"[data-textpath]\", element => {\n element.disabled = flag === true ? flag : false;\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n toggleCheckOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n clickable.addEventListener(\"change\", (event) => {\n this.toggleCheckOptSectionListener(option, event);\n });\n }\n\n /**\n * @function\n */\n toggleCheckOptSectionListener(option, event) {\n if (event.target.checked === true) {\n this.activateOption(option);\n }\n }\n\n /**\n * @function\n */\n checkOptionSection(option) {\n let inputSection = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n this.activateOption(option);\n inputSection.checked = true;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] [data-label=\"${option}\"]`);\n clickable.addEventListener(\"click\", () => {\n this.activateOption(option);\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding} \n */\n activateOption(option) {\n let label = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n let checkbox = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n if (checkbox != null && checkbox.disabled === false) {\n this.activateLabel(label);\n this.displaySectionOption(option);\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateLabel(label) {\n this.querySelectorAllForEachParent(`[data-selector]`, (element) => {\n element.classList.remove(\"check-active\");\n element.classList.add('check-selected');\n });\n label.classList.add(\"check-active\");\n label.classList.remove('check-selected');\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n displaySectionOption(option) {\n this.hideAllOptionsSections();\n this.showOptionSection(option);\n }\n\n /**\n * This function generates the style simple options.\n * @return {object}\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n\n this.querySelectorAllForEach('[data-style-options]', element => {\n let path = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (path == \"form.class\" && value !== '') {\n value = this.querySelector(\"[data-style-options='form.class']\").dataset.icon;\n }\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n if (isNaN(value)) {\n value = 0;\n }\n }\n\n let target = element.dataset[\"target\"];\n if (target !== undefined) {\n let value2 = parseFloat(this.querySelector(`[data-id=\"${target}\"]`).value);\n if (isNaN(value2)) {\n value2 = 0;\n }\n value = [value, value2];\n }\n\n Binding.createObj(styleOpts[\"options\"], path, value);\n\n });\n\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n let opt = element.dataset[\"apply\"];\n if (element.checked === false) {\n Binding.createObj(styleOpts[\"options\"], opt, undefined);\n }\n });\n\n let fontSize = this.querySelector(\"[data-font-size]\").value || 12;\n let fontFamily = this.querySelector(\"[data-font-family]\").value;\n let font = `${fontSize}px ${fontFamily}`;\n\n let icon = document.querySelector(\"[data-apply='icon']\");\n let iconOpts = icon !== null && icon.checked === true ?\n styleOpts[\"options\"].src : styleOpts[\"options\"].form;\n\n let labelOpt;\n if (styleOpts[\"options\"][\"label\"] != null && styleOpts[\"options\"][\"label\"][\"text\"] != null) {\n labelOpt = styleOpts[\"options\"][\"label\"];\n }\n\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: labelOpt,\n icon: iconOpts,\n radius: styleOpts[\"options\"].radius\n };\n\n // if (this.getGeometry() === \"line\") {\n // styleOpts[\"options\"] = {\n // fill: styleOpts[\"options\"].fill,\n // stroke: styleOpts[\"options\"].stroke,\n // label: styleOpts[\"options\"].label\n // };\n\n\n //MIRARLO\n // delete styleOpts[\"options\"][\"fill\"][\"pattern\"];\n // if (Object.keys(styleOpts[\"options\"][\"fill\"]).length === 0) {\n // delete styleOpts[\"options\"][\"fill\"];\n // }\n // }\n\n // if (this.getGeometry() === \"polygon\") {\n // styleOpts[\"options\"] = {\n // fill: styleOpts[\"options\"].fill,\n // stroke: styleOpts[\"options\"].stroke,\n // label: styleOpts[\"options\"].label\n // };\n // }\n\n if (styleOpts[\"options\"][\"label\"] != undefined) {\n styleOpts[\"options\"][\"label\"][\"font\"] = font;\n }\n\n return this.processOptions(styleOpts);\n }\n\n /**\n * This function process de style generate options\n * @function\n */\n processOptions(styleOpts) {\n let styleOptsClone = M.utils.extends({}, styleOpts);\n let checkedFill = this.isChecked(\"fill\");\n let checkedStroke = this.isChecked(\"stroke\");\n let checkedLabel = this.isChecked(\"label\");\n let checkedIcon = this.isChecked(\"icon\");\n let checkedForm = this.isChecked(\"form\");\n styleOptsClone[\"options\"][\"fill\"] = checkedFill === true ? styleOptsClone[\"options\"][\"fill\"] : undefined;\n styleOptsClone[\"options\"][\"stroke\"] = checkedStroke === true ? styleOptsClone[\"options\"][\"stroke\"] : undefined;\n styleOptsClone[\"options\"][\"label\"] = checkedLabel === true ? styleOptsClone[\"options\"][\"label\"] : undefined;\n styleOptsClone[\"options\"][\"icon\"] = checkedIcon === true || checkedForm === true ? styleOptsClone[\"options\"][\"icon\"] : undefined;\n\n styleOptsClone[\"point\"] = {\n fill: styleOptsClone[\"options\"].fill,\n radius: styleOptsClone[\"options\"].radius,\n stroke: styleOptsClone[\"options\"].stroke,\n label: styleOptsClone[\"options\"].label,\n icon: styleOptsClone[\"options\"].icon\n }\n\n styleOptsClone[\"line\"] = {\n fill: styleOptsClone[\"options\"].fill,\n stroke: styleOptsClone[\"options\"].stroke,\n label: styleOptsClone[\"options\"].label\n }\n\n styleOptsClone[\"polygon\"] = {\n fill: styleOptsClone[\"options\"].fill,\n stroke: styleOptsClone[\"options\"].stroke,\n label: styleOptsClone[\"options\"].label\n }\n delete styleOptsClone[\"options\"];\n\n return styleOptsClone;\n }\n\n /**\n * @function\n */\n isChecked(option) {\n let checked = false;\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply='${option}'`);\n if (input != null) {\n checked = input.checked;\n }\n return checked;\n }\n\n /**\n * This function generates the style simple.\n * @return {M.style.Simple}\n */\n generateStyle() {\n let undefineStyle = true;\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n if (element.checked === true) {\n undefineStyle = false;\n }\n });\n\n let style;\n //let geometry = this.getGeometry();\n let styleOptions = this.generateOptions();\n\n // switch (geometry) {\n // case \"point\":\n // style = new M.style.Generic(styleOptions);\n // break;\n // case \"line\":\n // style = new M.style.Line(styleOptions);\n // break;\n // case \"polygon\":\n // style = new M.style.Polygon(styleOptions);\n // break;\n\n // default:\n // M.dialog.error(\"Geometría no soportada\", \"Error\");\n\n // }\n\n style = new M.style.Generic(styleOptions);\n\n return style;\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let input = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]`);\n if (input != null) {\n input.addEventListener(\"change\", () => {\n if (input.checked === true) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n input.disabled = true;\n input.checked = false;\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n clickable.classList.remove(\"check-inactive\");\n input.disabled = false;\n }\n\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = SimpleBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n if (this.style_.get(\"fill.pattern\") != null) {\n options[\"patternflag\"] = true;\n }\n options = M.utils.extends({}, this.style_.getOptions());\n options = M.utils.extends(options, SimpleBinding.DEFAULT_OPTIONS_STYLE);\n }\n\n // transform color options to hex color for value inputs color\n options[\"fill\"][\"color\"] = chroma(options[\"fill\"][\"color\"]).hex();\n options[\"stroke\"][\"color\"] = chroma(options[\"stroke\"][\"color\"]).hex();\n options[\"label\"][\"fill\"][\"color\"] = chroma(options[\"label\"][\"fill\"][\"color\"]).hex();\n options[\"label\"][\"stroke\"][\"color\"] = options[\"label\"][\"stroke\"][\"color\"] === \"no-color\" ? \"no-color\" : chroma(options[\"label\"][\"stroke\"][\"color\"]).hex();\n options[\"fill\"][\"pattern\"][\"color\"] = chroma(options[\"fill\"][\"pattern\"][\"color\"]).hex();\n options[\"icon\"][\"fill\"] = chroma(options[\"icon\"][\"fill\"]).hex();\n options[\"icon\"][\"color\"] = chroma(options[\"icon\"][\"color\"]).hex();\n // --\n\n let patternValids = Object.keys(M.style.pattern).filter(name => name != \"ICON\" && name != \"IMAGE\");\n let alignValues = Object.values(M.style.align);\n let baselineValues = Object.values(M.style.baseline);\n let formValues = Object.values(M.style.form).filter(name => name != null);\n\n //transform array options to data template option\n options[\"patternlist\"] = SimpleBinding.arrayDataToTemplate(options[\"fill\"][\"pattern\"][\"name\"], patternValids, patternValids);\n options[\"linecapstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"linecaplabelstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinlabelstroke\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"alignlist\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"align\"], alignValues, [\"Centro\", \"Justificado\", \"Izquierda\", \"Derecha\"]);\n options[\"baselinelist\"] = SimpleBinding.arrayDataToTemplate(options[\"label\"][\"baseline\"], baselineValues, [\"Alfabetico\", \"Abajo\", \"Colgando\", \"Ideografico\", \"Arriba\", \"Centro\", ]);\n options[\"formlist\"] = SimpleBinding.arrayDataToTemplate(options[\"icon\"][\"form\"], formValues, formValues);\n if (this.layer_ != null) {\n let labelTextValues = Object.keys(this.getFeaturesAttributes());\n let labelTextSelected = options[\"label\"] != null ? options[\"label\"][\"text\"] : \"\";\n options[\"featuresAttr\"] = SimpleBinding.arrayDataToTemplate(labelTextSelected, labelTextValues.map(name => `{{${name}}}`), labelTextValues);\n }\n\n\n return options;\n }\n\n set imgId(id) {\n this.imgId_ = id;\n }\n\n get imgId() {\n return this.imgId_;\n }\n\n toggleDisplaySubmenu(flag) {\n let buttonOptions = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n let funct = flag === true ? \"add\" : \"remove\";\n buttonOptions.classList[funct](\"m-hidden\");\n }\n\n /**\n * @function\n * @param {function}\n */\n refreshLegend(element, flag = false) {\n let id = this.imgId_;\n let style = this.generateStyle();\n if (flag === true) {\n style = this.style_;\n }\n if (style != null) {\n style = style.clone();\n if (style instanceof M.style.Point) {\n style.set('radius', SimpleBinding.RADIUS_OPTION);\n if (style.get(\"icon.radius\") != null) {\n style.set(\"icon.radius\", SimpleBinding.ICON_RADIUS_OPTION);\n }\n }\n let img = this.htmlParent_.querySelector(`img[id='img-${id}']`);\n style.updateCanvas();\n let dataURL = style.toImage();\n if (img != null) {\n img.src = dataURL;\n }\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get RADIUS_OPTION() {\n return 10;\n }\n\n\n /**\n * TODO\n * @const\n */\n static get ICON_RADIUS_OPTION() {\n return 10;\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Fuente\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * Array of allowed geometries.\n * @const {Array}\n */\n static get GEOMETRIES() {\n return ['point', 'line', 'polygon'];\n }\n\n /**\n * @function\n */\n static arrayDataToTemplate(selected, arrayId, arrayName) {\n return arrayId.map((id, index) => {\n return {\n id: id,\n name: arrayName[index],\n selected: selected\n };\n });\n };\n\n /**\n * @const\n */\n static get DEFAULT_OPTIONS_STYLE() {\n return {\n radius: 10,\n fill: {\n color: \"#e5008a\",\n opacity: 1,\n width: 2,\n pattern: {\n color: 'red',\n name: \"HATCH\",\n size: 1,\n spacing: 2,\n scale: 3,\n offset: 5,\n rotation: 0\n }\n },\n stroke: {\n color: \"#000000\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n label: {\n fill: {\n color: '#ff0000',\n },\n stroke: {\n color: \"no-color\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n scale: 2,\n text: \"Texto de prueba\",\n font: \"14px serif\",\n align: \"center\",\n baseline: \"top\",\n rotate: false,\n rotation: 0,\n offset: [0, 0]\n },\n icon: {\n src: \"\",\n form: \"\",\n size: [40, 40],\n anchor: [0, 0],\n scale: 1,\n offset: [0, 0],\n rotate: false,\n rotation: 0,\n opacity: 1,\n form: \"CIRCLE\",\n class: \"g-cartografia-info\",\n fill: \"#ffffff\",\n color: \"#e07e18\"\n }\n };\n }\n}\n","import {\n Binding\n}\nfrom './binding';\n\nexport class ProportionalBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n // this.setIntegerAttributes();\n return this;\n }\n\n /**\n * This function generates the cluster style from GUI Options.\n *\n * @function\n * @returns {M.style.Cluster}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Proportional(opts.attributeName, opts.minRadius, opts.maxRadius);\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ProportionalBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options = {\n attributeName: this.style_.getAttributeName(),\n minRadius: this.style_.getMinRadius(),\n maxRadius: this.style_.getMaxRadius()\n };\n this.setSelected(true);\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attributeName);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n}\n\nProportionalBinding.DEFAULT_OPTIONS_STYLE = {\n attributeName: \"\",\n minRadius: 12,\n maxRadius: 25,\n};\n","import * as chroma from 'chroma-js';\nimport {\n Binding\n}\nfrom './binding';\n\nexport class ClusterBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.compilePromise_.then(() => {\n this.addEventRangeListener();\n this.addPaginationListener();\n });\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n return this;\n }\n\n /**\n * This function generates the options style from his own html form.\n *\n * @function\n * @api stable\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n styleOpts[\"ranges\"] = {};\n\n // styleOpts.options section\n this.querySelectorAllForEach(\"[data-style-options]\", element => {\n let prop = element.dataset[\"styleOptions\"];\n let value = element.value;\n\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n if (prop === \"label.color\") {\n styleOpts[\"options\"][\"label\"] = {};\n styleOpts[\"options\"][\"label\"][\"color\"] = value;\n\n } else {\n styleOpts[\"options\"][prop] = value;\n }\n\n });\n\n // Ranges cluster section\n this.querySelectorAllForEach(\"[data-ranges-id][data-apply-range]\", element => {\n let id = element.dataset[\"rangesId\"];\n if (styleOpts[\"ranges\"][id] == undefined) {\n styleOpts[\"ranges\"][id] = {};\n }\n let path = element.dataset[\"rangesOptions\"];\n let value = element.value;\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n Binding.createObj(styleOpts[\"ranges\"][id], path, value);\n });\n\n styleOpts[\"ranges\"] = Object.values(styleOpts[\"ranges\"]).filter(option => !isNaN(option[\"minRange\"]) && !isNaN(option[\"maxRange\"]));\n return styleOpts;\n }\n\n /**\n * This function generates the cluster style from GUI Options.\n *\n * @function\n * @returns {M.style.Cluster}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let optsRanges = [...opts.ranges];\n let ranges = optsRanges.map(obj => {\n return {\n min: obj[\"minRange\"],\n max: obj[\"maxRange\"],\n style: new M.style.Point(obj[\"style\"])\n };\n });\n opts.options[\"ranges\"] = ranges;\n return new M.style.Cluster(opts.options, {\n distanceSelectFeatures: opts.options.distanceSelectFeatures\n });\n }\n\n /**\n * This function sets the number of cluster ranges.\n *\n * @function\n */\n setRanges() {\n let rangesInput = this.querySelector(\"[data-number-ranges]\");\n let numRanges = parseInt(rangesInput.value);\n if (numRanges > 0 && numRanges < ClusterBinding.NUMBER_RANGES) {\n\n for (let i = 1; i < numRanges + 1; i++) {\n let pagerElement = this.querySelector(`[data-page-selector=\"${i}\"]`);\n pagerElement.classList.remove(\"m-hidden\");\n this.querySelectorAllForEach(`[data-ranges-id=\"${i}\"]`, element => {\n element.setAttribute(\"data-apply-range\", \"\");\n });\n }\n\n for (let i = numRanges + 1; i < ClusterBinding.NUMBER_RANGES; i++) {\n let pagerElement = this.querySelector(`[data-page-selector=\"${i}\"]`);\n pagerElement.classList.add(\"m-hidden\");\n this.querySelectorAllForEach(`[data-ranges-id=\"${i}\"]`, element => {\n element.removeAttribute(\"data-apply-range\");\n });\n }\n\n let pagerElement = this.querySelector(`[data-page-selector=\"${numRanges}\"]`);\n this.paginationListener(pagerElement)();\n\n }\n }\n\n /**\n * This function activate the page selector passed by parameter.\n *\n * @function\n * @param {HTMLElement}\n */\n paginationListener(element) {\n return () => {\n let oldElement = this.querySelector(\"[data-page-active]\");\n if (oldElement != null) {\n oldElement.removeAttribute(\"data-page-active\");\n oldElement.classList.remove('m-page-active');\n let oldId = oldElement.dataset[\"pageSelector\"];\n let oldRange = this.querySelector(`[data-page='${oldId}']`);\n if (oldRange != null) {\n oldRange.classList.add('m-hidden');\n }\n }\n\n if (element != null) {\n element.classList.add('m-page-active');\n element.dataset[\"pageActive\"] = \"\";\n let id = element.dataset[\"pageSelector\"];\n let newRange = this.querySelector(`[data-page='${id}']`);\n newRange.classList.remove('m-hidden');\n }\n };\n }\n\n /**\n * TODO\n */\n addEventRangeListener() {\n let rangesInput = this.querySelector(\"[data-number-ranges]\");\n rangesInput.addEventListener('input', this.setRanges.bind(this));\n }\n\n /**\n * TODO\n */\n addPaginationListener() {\n this.querySelectorAllForEach(\"[data-page-selector]\", element => {\n element.addEventListener('click', this.paginationListener(element).bind(this));\n });\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = Object.assign({}, ClusterBinding.DEFAULT_OPTIONS_STYLE);\n if (this.style_ != null) {\n options = Object.assign({}, this.style_.getOptions());\n let ranges = options[\"ranges\"].filter(range => !isNaN(range[\"min\"])).map(rangeOpt => {\n let obj = {};\n let style = rangeOpt[\"style\"];\n obj[\"min\"] = rangeOpt[\"min\"];\n obj[\"max\"] = rangeOpt[\"max\"];\n obj[\"fill\"] = style.get(\"fill.color\");\n obj[\"stroke\"] = style.get(\"stroke.color\");\n obj[\"width\"] = style.get(\"stroke.width\");\n obj[\"opacity\"] = style.get(\"fill.opacity\") == null ? 1 : style.get(\"fill.opacity\");\n obj[\"radius\"] = style.get(\"radius\");\n return obj;\n });\n options[\"ranges\"] = ranges;\n }\n\n //generator function\n const range = (n, m, lastRange) => {\n const ranges = [];\n let max = lastRange;\n for (let i = n; i < m; i++) {\n let min = max + 1;\n max = min + 200;\n const obj = {\n id: i,\n min: min,\n max: max,\n fill: chroma.random().hex(),\n stroke: chroma.random().hex()\n };\n ranges.push(obj);\n }\n return ranges;\n };\n\n // generates\n let lastRange = options[\"ranges\"].slice(-1)[0][\"max\"];\n options[\"pages\"] = [];\n const ranges = range(options[\"ranges\"].length + 1, ClusterBinding.NUMBER_RANGES, lastRange);\n ranges.forEach((element, index) => {\n options[\"pages\"].push(element);\n });\n\n return options;\n }\n}\n\n/**\n * Maximum number of cluster ranges allowed.\n *\n * @const\n */\nClusterBinding.NUMBER_RANGES = 13;\n\n/**\n *\n * @const\n */\nClusterBinding.DEFAULT_OPTIONS_STYLE = {\n hoverInteraction: true,\n displayAmount: true,\n selectInteraction: true,\n animated: true,\n distance: 30,\n label: {\n color: \"#4dfeef\"\n },\n maxFeaturesToSelect: 20,\n distanceSelectFeatures: 15,\n ranges: [{\n min: 2,\n max: 30,\n fill: \"#ff00ff\",\n stroke: \"#00fef0\",\n width: 2,\n opacity: 1\n }]\n};\n","import {\n Binding\n}\nfrom './binding';\n\nimport * as htmlgradient from '../../../templates/gradientheatmap'\nimport * as chroma from 'chroma-js';\n\nexport class HeatmapBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.style_ = null;\n this.compilePromise_.then(() => {\n this.removeGradientListener();\n this.addGradientListener();\n });\n this.numberAddedColors_ = 6;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer) {\n this.layer_ = layer;\n this.style_ = null;\n // this.setIntegerAttributes();\n return this;\n\n }\n\n /**\n * This function adds the event listener to remove gradient color option.\n * @function\n */\n removeGradientListener() {\n this.querySelectorAllForEach('.m-removable-input-color .m-close', element => {\n element.addEventListener('click', () => {\n let rootElement = element.parentElement.parentElement;\n rootElement.removeChild(element.parentElement);\n this.numberAddedColors_--;\n });\n });\n }\n\n /**\n * This function adds the event listener to add gradient color option.\n * @function\n */\n addGradientListener() {\n let parent = this.querySelector(\"[data-parent='gradient']\");\n this.querySelector(\"[data-add]\").addEventListener('click', () => {\n this.compileTemplate(htmlgradient, {}).then((htmlgradient) => {\n if (this.numberAddedColors_ < HeatmapBinding.MAX_NUMBER_COLORS) {\n parent.appendChild(htmlgradient);\n this.setRandomColor(htmlgradient);\n htmlgradient.querySelector('.m-close').addEventListener('click', () => {\n let rootElement = htmlgradient.parentElement;\n rootElement.removeChild(htmlgradient);\n this.numberAddedColors_--;\n });\n this.numberAddedColors_++;\n } else {\n M.dialog.info(\"Ha llegado al número máximo de colores permitidos\", \"Información\");\n }\n });\n });\n }\n\n /**\n * @function\n */\n setRandomColor(html) {\n let inputColor = html.querySelector(\"input\");\n let randomColor = chroma.random().hex();\n inputColor.value = randomColor;\n }\n\n /**\n * This function generates the heatmap style.\n * @function\n * @returns {M.style.Heatmap}\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Heatmap(opts.attributeName, opts.options);\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = HeatmapBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options[\"attribute\"] = this.style_.getAttributeName();\n options[\"radius\"] = this.style_.getRadius();\n options[\"blur\"] = this.style_.getBlurSize();\n options[\"gradient\"] = this.style_.getGradient();\n\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attribute);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n}\n\n/**\n * @const\n */\nHeatmapBinding.DEFAULT_OPTIONS_STYLE = {\n attribute: \"\",\n gradient: [\"#0000ff\", \"#00ffff\", \"#00ff00\", \"#ffff00\", \"#ffb619\", \"#ff0000\"],\n blur: 12,\n radius: 22\n};\n\n/**\n * @const\n */\nHeatmapBinding.MAX_NUMBER_COLORS = 30;\n","import {\n Binding\n}\nfrom './binding';\n\nexport class ChoroplethBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n }\n\n\n setLayer(layer) {\n this.layer_ = layer;\n // this.setIntegerAttributes();\n return this;\n }\n\n setRanges() {\n let rangesButton = this.querySelector(\"[data-number-ranges]\");\n let number = parseInt(rangesButton.value);\n let ranges = [];\n\n for (var i = 1; i <= number; i++) {\n ranges.push({\n number: i\n });\n }\n let parent = this.querySelector(\"[data-parent]\");\n this.addTemplate('choroplethstyles.html', parent, {\n ranges: ranges\n });\n }\n\n\n addEventRangeListener() {\n let rangesButton = this.querySelector(\"[data-number-ranges]\");\n rangesButton.addEventListener('input', this.setRanges.bind(this));\n }\n\n generateStyle() {\n let opts = this.generateOptions();\n let ranges = opts.ranges;\n let colors = opts.options.colors;\n let quantification = opts.quantification === \"JENKS\" ? M.style.quantification.JENKS : M.style.quantification.QUANTILE;\n let style = null;\n if (opts.attributeName != \"\") {\n style = new M.style.Choropleth(opts.attributeName, colors, quantification(ranges));\n }\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ChoroplethBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n let startColor = this.style_.getChoroplethStyles()[0].get(\"fill.color\");\n let endColor = this.style_.getChoroplethStyles().slice(-1)[0].get(\"fill.color\");\n startColor = startColor || this.style_.getChoroplethStyles()[0].get(\"stroke.color\");\n endColor = endColor || this.style_.getChoroplethStyles().slice(-1)[0].get(\"stroke.color\");\n\n options = {\n attribute: this.style_.getAttributeName(),\n ranges: this.style_.getChoroplethStyles().length,\n quantification: this.style_.getQuantification().name,\n startColor: startColor,\n endColor: endColor\n };\n }\n if (this.layer_ != null) {\n options[\"attributes\"] = this.getAttributes();\n options[\"attributes\"].forEach(attribute => attribute[\"selected\"] = options.attribute);\n }\n return options;\n }\n\n /**\n * @function\n */\n getAttributes() {\n let attributeNames = this.filterAttributesFeature(\"number\").map(element => {\n return {\n name: element\n };\n });\n return attributeNames;\n }\n\n}\n\nChoroplethBinding.DEFAULT_OPTIONS_STYLE = {\n attribute: \"\",\n quantification: \"JENKS\",\n ranges: 4,\n startColor: \"#F8FF25\",\n endColor: \"#4400FD\"\n};\n","import * as chroma from 'chroma-js';\nimport {\n Binding\n}\n from './binding';\n\nexport class SimpleCategoryBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, binding) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.fill_ = false;\n this.stroke_ = false;\n this.label_ = false;\n this.form_ = false;\n this.icon_ = false;\n if (styleParams != null) {\n this.fill_ = styleParams.getOptions().fill != undefined;\n this.stroke_ = styleParams.getOptions().stroke != undefined;\n this.label_ = styleParams.getOptions().label != undefined;\n this.icon_ = styleParams.get(\"icon.src\") != undefined;\n this.form_ = styleParams.get(\"icon.form\") != undefined;\n }\n\n this.binding_ = binding;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n setLayer(layer, refresh = true) {\n this.layer_ = layer;\n if (refresh === true) {\n this.refreshTemplate();\n }\n return this;\n }\n\n getOptions() {\n return {\n fill: this.fill_,\n stroke: this.stroke_,\n label: this.label_,\n form: this.form_,\n icon: this.icon_\n };\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @param {string}\n * @return {SimpleCategoryBinding}\n */\n setGeometry(geometry) {\n if (SimpleCategoryBinding.GEOMETRIES.includes(geometry)) {\n this.geometry_ = geometry;\n } else {\n this.geometry_ = 'point';\n }\n return this;\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * This function refresh the html template.\n * @function\n */\n refreshTemplate() {\n let geometry = this.getGeometry();\n let hiddenGeometries = SimpleCategoryBinding.GEOMETRIES.filter(section => section !== geometry);\n\n hiddenGeometries.forEach(geometry => {\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.add('m-hidden'));\n });\n this.querySelectorAllForEach(`[data-geometry=\"${geometry}\"]`, node => node.classList.remove('m-hidden'));\n this.addLabelPathListener();\n }\n\n /**\n * This functions initialize the submenu view of each option of Style simple\n * @function\n */\n activateOptionsStyle() {\n let style = this.style_;\n if (style != null) {\n let options = style.getOptions();\n if (options[\"fill\"] != null) {\n let valuesFill = Object.values(options.fill).filter(value => value != undefined);\n if (valuesFill.length > 0) {\n this.checkOptionSection(\"fill\");\n }\n }\n\n if (options[\"stroke\"] != undefined) {\n this.checkOptionSection(\"stroke\");\n }\n\n if (options[\"label\"] != undefined) {\n this.checkOptionSection(\"label\");\n }\n\n if (options[\"icon\"] != undefined) {\n if (options[\"icon\"].hasOwnProperty(\"src\")) {\n this.checkOptionSection(\"icon\");\n this.disableOption(\"form\");\n }\n\n if (options[\"icon\"].hasOwnProperty(\"form\")) {\n this.checkOptionSection(\"form\");\n this.disableOption(\"icon\");\n }\n }\n\n }\n }\n\n showCompatibleSections() {\n this.binding_.enableOption(\"form\");\n this.binding_.enableOption(\"icon\");\n if (this.icon_ === true) {\n this.binding_.disableOption(\"form\");\n }\n\n if (this.form_ === true) {\n this.binding_.disableOption(\"icon\");\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addLabelPathListener() {\n let pathCheck = this.querySelector(\"[data-style-options='label.path']\");\n pathCheck.addEventListener(\"change\", () => {\n this.togglePathSection(!pathCheck.checked);\n });\n }\n\n /**\n * @function\n */\n togglePathSection(flag) {\n this.querySelectorAllForEach(\"[data-textpath]\", element => {\n element.disabled = flag === true ? flag : false;\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n toggleCheckOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n clickable.addEventListener(\"change\", (event) => {\n this.toggleCheckOptSectionListener(option, event);\n });\n }\n\n /**\n * @function\n */\n toggleCheckOptSectionListener(option, event) {\n if (event.target.checked === true) {\n this.activateOption(option);\n }\n }\n\n /**\n * @function\n */\n checkOptionSection(option) {\n let inputSection = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n this.activateOption(option);\n inputSection.checked = true;\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOptionSection(option) {\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] [data-label=\"${option}\"]`);\n clickable.addEventListener(\"click\", () => {\n this.activateOption(option);\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateOption(option) {\n let label = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n let checkbox = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n if (checkbox != null && checkbox.disabled === false) {\n this.activateLabel(label);\n this.displaySectionOption(option);\n }\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n activateLabel(label) {\n this.querySelectorAllForEachParent(`[data-selector]`, (element) => {\n element.classList.remove(\"check-active\");\n element.classList.add('check-selected');\n });\n label.classList.add(\"check-active\");\n label.classList.remove('check-selected');\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n * @param {M.layer.Vector}\n * @returns {Binding}\n */\n displaySectionOption(option) {\n this.hideAllOptionsSections();\n this.showOptionSection(option);\n }\n\n /**\n * This function generates the style simple options.\n * @return {object}\n */\n generateOptions() {\n let styleOpts = {};\n styleOpts[\"options\"] = {};\n\n this.querySelectorAllForEach('[data-style-options]', element => {\n let path = element.dataset[\"styleOptions\"];\n let value = element.value;\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n\n if (element.type === \"number\") {\n value = parseFloat(value);\n if (isNaN(value)) {\n value = 0;\n }\n }\n\n let target = element.dataset[\"target\"];\n if (target !== undefined) {\n let value2 = parseFloat(this.querySelector(`[data-id=\"${target}\"]`).value);\n if (isNaN(value2)) {\n value2 = 0;\n }\n value = [value, value2];\n }\n Binding.createObj(styleOpts[\"options\"], path, value);\n });\n\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n let opt = element.dataset[\"apply\"];\n if (element.checked === false) {\n Binding.createObj(styleOpts[\"options\"], opt, undefined);\n }\n });\n\n\n let fontSize = this.querySelector(\"[data-font-size]\").value || 12;\n let fontFamily = this.querySelector(\"[data-font-family]\").value;\n\n let font = `${fontSize}px ${fontFamily}`;\n\n let iconOpts = this.icon === true ? styleOpts[\"options\"].src : styleOpts[\"options\"].form;\n\n let labelOpt;\n if (styleOpts[\"options\"][\"label\"] != null && styleOpts[\"options\"][\"label\"][\"text\"] != null) {\n labelOpt = styleOpts[\"options\"][\"label\"];\n }\n\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: labelOpt,\n icon: iconOpts,\n radius: styleOpts[\"options\"].radius\n };\n\n if (this.getGeometry() === \"line\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n\n delete styleOpts[\"options\"][\"fill\"][\"pattern\"];\n if (Object.keys(styleOpts[\"options\"][\"fill\"]).length === 0) {\n delete styleOpts[\"options\"][\"fill\"];\n }\n }\n\n if (this.getGeometry() === \"polygon\") {\n styleOpts[\"options\"] = {\n fill: styleOpts[\"options\"].fill,\n stroke: styleOpts[\"options\"].stroke,\n label: styleOpts[\"options\"].label\n };\n }\n\n if (styleOpts[\"options\"][\"label\"] != undefined) {\n styleOpts[\"options\"][\"label\"][\"font\"] = font;\n }\n\n return this.processOptions(styleOpts);\n }\n\n /**\n * This function process de style generate options\n * @function\n */\n processOptions(styleOpts) {\n let styleOptsClone = M.utils.extends({}, styleOpts);\n let checkedFill = this.isChecked(\"fill\");\n let checkedStroke = this.isChecked(\"stroke\");\n let checkedLabel = this.isChecked(\"label\");\n let checkedIcon = this.isChecked(\"icon\");\n let checkedForm = this.isChecked(\"form\");\n styleOptsClone[\"options\"][\"fill\"] = checkedFill === true ? styleOptsClone[\"options\"][\"fill\"] : undefined;\n styleOptsClone[\"options\"][\"stroke\"] = checkedStroke === true ? styleOptsClone[\"options\"][\"stroke\"] : undefined;\n styleOptsClone[\"options\"][\"label\"] = checkedLabel === true ? styleOptsClone[\"options\"][\"label\"] : undefined;\n styleOptsClone[\"options\"][\"icon\"] = checkedIcon === true || checkedForm === true ? styleOptsClone[\"options\"][\"icon\"] : undefined;\n return styleOptsClone;\n }\n\n /**\n * @function\n */\n isChecked(option) {\n let checked = false;\n let input = this.getParentTemplate().parentElement.querySelector(`[data-buttons-option-category] input[data-apply='${option}'`);\n if (input != null) {\n checked = input.checked;\n }\n return checked;\n }\n\n /**\n * This function generates the style simple.\n * @return {M.style.Simple}\n */\n generateStyle() {\n let undefineStyle = true;\n this.querySelectorAllForEach(\"[data-apply]\", element => {\n if (element.checked === true) {\n undefineStyle = false;\n }\n });\n\n let style;\n let geometry = this.getGeometry();\n let styleOptions = this.generateOptions().options;\n\n\n switch (geometry) {\n case \"point\":\n style = new M.style.Point(styleOptions);\n break;\n case \"line\":\n style = new M.style.Line(styleOptions);\n break;\n case \"polygon\":\n style = new M.style.Polygon(styleOptions);\n break;\n\n default:\n M.dialog.error(\"Geometría no soportada\", \"Error\");\n\n }\n\n return style;\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let clickable = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]+label`);\n let input = this.querySelectorParent(`[data-buttons-option] input[data-apply=\"${optionEnable}\"]`);\n if (clickable != null) {\n clickable.addEventListener(\"click\", () => {\n if (input.checked === false) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n input.disabled = true;\n input.checked = false;\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option] input[data-apply=\"${option}\"]+label`);\n clickable.classList.remove(\"check-inactive\");\n input.disabled = false;\n }\n\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = SimpleCategoryBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n if (this.style_.get(\"fill.pattern\") != null) {\n options[\"patternflag\"] = true;\n }\n options = M.utils.extends({}, this.style_.getOptions());\n options = M.utils.extends(options, SimpleCategoryBinding.DEFAULT_OPTIONS_STYLE);\n }\n\n // transform color options to hex color for value inputs color\n options[\"fill\"][\"color\"] = chroma(options[\"fill\"][\"color\"]).hex();\n options[\"stroke\"][\"color\"] = chroma(options[\"stroke\"][\"color\"]).hex();\n options[\"label\"][\"fill\"][\"color\"] = chroma(options[\"label\"][\"fill\"][\"color\"]).hex();\n options[\"label\"][\"stroke\"][\"color\"] = options[\"label\"][\"stroke\"][\"color\"] === \"no-color\" ? \"no-color\" : chroma(options[\"label\"][\"stroke\"][\"color\"]).hex();\n options[\"fill\"][\"pattern\"][\"color\"] = chroma(options[\"fill\"][\"pattern\"][\"color\"]).hex();\n options[\"icon\"][\"fill\"] = chroma(options[\"icon\"][\"fill\"]).hex();\n options[\"icon\"][\"gradientcolor\"] = chroma(options[\"icon\"][\"gradientcolor\"]).hex();\n // --\n\n let patternValids = Object.keys(M.style.pattern).filter(name => name != \"ICON\" && name != \"IMAGE\");\n let alignValues = Object.values(M.style.align);\n let baselineValues = Object.values(M.style.baseline);\n let formValues = Object.values(M.style.form).filter(name => name != null);\n\n //transform array options to data template option\n options[\"patternlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"fill\"][\"pattern\"][\"name\"], patternValids, patternValids);\n options[\"linecapstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"linecaplabelstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linecap\"], [\"butt\", \"square\", \"round\"], [\"Extremo\", \"Cuadrado\", \"Redondeado\"]);\n options[\"linejoinlabelstroke\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"stroke\"][\"linejoin\"], [\"bevel\", \"miter\", \"round\"], [\"Bisel\", \"Inglete\", \"Redondeado\"]);\n options[\"alignlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"align\"], alignValues, alignValues);\n options[\"baselinelist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"label\"][\"baseline\"], baselineValues, baselineValues);\n options[\"formlist\"] = SimpleCategoryBinding.arrayDataToTemplate(options[\"icon\"][\"form\"], formValues, formValues);\n if (this.layer_ != null) {\n let labelTextValues = Object.keys(this.getFeaturesAttributes());\n let labelTextSelected = options[\"label\"] != null ? options[\"label\"][\"text\"] : \"\";\n options[\"featuresAttr\"] = SimpleCategoryBinding.arrayDataToTemplate(labelTextSelected, labelTextValues.map(name => `{{${name}}}`), labelTextValues);\n }\n return options;\n }\n\n set imgId(id) {\n this.imgId_ = id;\n }\n\n get imgId() {\n return this.imgId_;\n }\n\n set fill(bool) {\n this.fill_ = bool;\n }\n\n set stroke(bool) {\n this.stroke_ = bool;\n }\n\n set label(bool) {\n this.label_ = bool;\n }\n\n set form(bool) {\n this.form_ = bool;\n }\n\n set icon(bool) {\n this.icon_ = bool;\n }\n\n get fill() {\n return this.fill_;\n }\n\n get stroke() {\n return this.stroke_;\n }\n\n get label() {\n return this.label_;\n }\n\n get form() {\n return this.form_;\n }\n\n get icon() {\n return this.icon_;\n }\n\n toggleDisplaySubmenu(flag) {\n let buttonOptions = this.getParentTemplate().querySelector(\"[data-buttons-option]\");\n let funct = flag === true ? \"add\" : \"remove\";\n buttonOptions.classList[funct](\"m-hidden\");\n }\n\n addLegendListener() {\n this.querySelectorAllForEach(\"input,select,div.m-boxes\", element => {\n if (element instanceof HTMLDivElement) {\n element.addEventListener(\"click\", () => {\n this.refreshLegend(element);\n });\n } else {\n if (element instanceof HTMLSelectElement) {\n element.addEventListener(\"change\", () => {\n this.refreshLegend(element);\n });\n } else {\n element.addEventListener(\"input\", () => {\n this.refreshLegend(element);\n });\n }\n }\n });\n }\n\n /**\n * @function\n * @param {function}\n */\n refreshLegend(element, flag) {\n let id = this.imgId_;\n let style = this.generateStyle();\n if (flag === true) {\n style = this.style_;\n }\n if (style != null) {\n this.style_ = style;\n style = style.clone();\n if (style instanceof M.style.Point) {\n style.set('radius', SimpleCategoryBinding.RADIUS_OPTION);\n if (style.get(\"icon.radius\") != null) {\n style.set(\"icon.radius\", SimpleCategoryBinding.ICON_RADIUS_OPTION);\n }\n }\n let img = this.htmlParent_.querySelector(`img[id='img-${id}']`);\n style.updateCanvas();\n let dataURL = style.toImage();\n if (img != null) {\n img.src = dataURL;\n }\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get RADIUS_OPTION() {\n return 10;\n }\n\n\n /**\n * TODO\n * @const\n */\n static get ICON_RADIUS_OPTION() {\n return 10;\n }\n\n get style() {\n\n return this.style_;\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Familia\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * Array of allowed geometries.\n * @const {Array}\n */\n static get GEOMETRIES() {\n return ['point', 'line', 'polygon'];\n }\n\n /**\n * @function\n */\n static arrayDataToTemplate(selected, arrayId, arrayName) {\n return arrayId.map((id, index) => {\n return {\n id: id,\n name: arrayName[index],\n selected: selected\n };\n });\n };\n\n /**\n * @const\n */\n static get DEFAULT_OPTIONS_STYLE() {\n return {\n radius: 10,\n fill: {\n color: \"#e5008a\",\n opacity: 1,\n width: 2,\n pattern: {\n color: 'red',\n name: \"HATCH\",\n size: 1,\n spacing: 2,\n scale: 3,\n offset: 5,\n rotation: 0\n }\n },\n stroke: {\n color: \"#000000\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n label: {\n fill: {\n color: '#ff0000',\n },\n stroke: {\n color: \"no-color\",\n width: 2,\n linedash: [0, 0],\n linedashoffset: 0,\n linecap: \"none\",\n linejoin: \"none\"\n },\n scale: 2,\n text: \"Texto de prueba\",\n font: \"14px serif\",\n align: \"center\",\n baseline: \"top\",\n rotate: false,\n rotation: 0,\n offset: [0, 0]\n },\n icon: {\n src: \"\",\n form: \"\",\n size: [40, 40],\n anchor: [0, 0],\n scale: 1,\n offset: [0, 0],\n rotation: 0,\n opacity: 1,\n form: \"CIRCLE\",\n fill: \"#ffffff\",\n gradientcolor: \"#e07e18\"\n }\n };\n }\n}\n","import buttonoptions2 from 'templates/buttonoptions2';\nimport simpleoptions from 'templates/simpleoptions';\nimport stylesimple from 'templates/stylesimple';\nimport attributestemplate from 'templates/attributestemplate';\nimport categorystyles from 'templates/categorystyles';\nimport {\n Binding\n}\nfrom './binding';\nimport {\n SimpleCategoryBinding\n}\nfrom './simplecategorybinding';\n\nexport class CategoryBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer, controller) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.styleCategories_ = {};\n\n this.compilePromise_.then(() => {\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n selectElement.addEventListener('input', () => {\n this.renderAttributeOptions();\n });\n });\n this.selectedCategory_ = null;\n this.clickedOnTable_ = false;\n this.controller_ = controller;\n }\n\n /**\n * This function sets the attribute layer to the binding.\n * @function\n * @param {M.layer.Vector}\n */\n setLayer(layer) {\n this.layer_ = layer;\n this.setAttributes();\n this.refreshOptionsButtons();\n return this;\n }\n\n /**\n * This function shows the html view.\n * @function\n * @return {Binding}\n */\n unhide() {\n this.getTemplate().classList.remove('m-hidden');\n this.getParentTemplate().querySelector(\"[data-buttons-option-category]\").classList.remove(\"m-hidden\");\n return this;\n }\n\n /**\n * This function hides the html view.\n * @function\n * @return {Binding}\n */\n hide() {\n this.getTemplate().classList.add('m-hidden');\n this.getParentTemplate().querySelector(\"[data-buttons-option-category]\").classList.add(\"m-hidden\");\n return this;\n }\n\n /**\n * @function\n */\n addEventClickListener() {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n element.addEventListener(\"click\", () => {\n this.toggleCategory(element.id);\n });\n });\n }\n\n /**\n * This function refresh the html options buttons template.\n * @function\n */\n refreshOptionsButtons() {\n let options = SimpleCategoryBinding.OPTIONS_POINT_SUBMENU;\n\n if (this.getGeometry() !== \"point\") {\n options = SimpleCategoryBinding.OPTIONS_SUBMENU;\n }\n\n this.addOptionsButtons(options, () => {\n this.compatibleSectionListener(\"icon\", \"form\");\n this.compatibleSectionListener(\"form\", \"icon\");\n });\n }\n\n /**\n * This function sets the layer of a binding class.\n * @function\n */\n addOptionsButtons(options, callback = null) {\n let parentHtml = this.getParentTemplate().querySelector(\"[data-buttons-option-category]\");\n this.addTemplate(buttonoptions2, parentHtml, {\n buttonsParams: options\n }, (html) => {\n if (typeof callback === \"function\") {\n callback();\n }\n options.forEach(option => this.addEventOptionListener(option, options));\n options.forEach(option => this.addEventCheckListener(option, options));\n this.deactivateSubmenu();\n this.addEventCheckFromSubmenu();\n });\n }\n\n addEventCheckFromSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => {\n input.addEventListener(\"change\", () => {\n this.controller_.selectPanel(\"stylecategory\");\n this.controller_.setCompatibleStylePanels(\"stylecategory\");\n this.controller_.showActivePanel(\"stylecategory\");\n\n });\n });\n }\n\n /**\n * This function adds the listener click event that shows the compatible sections buttons.\n * @param {string}\n * @param {string}\n */\n compatibleSectionListener(optionEnable, optionDisable) {\n let input = this.querySelectorParent(`[data-buttons-option-category] input[data-apply=\"${optionEnable}\"]`);\n if (input != null) {\n input.addEventListener(\"change\", () => {\n if (input.checked === true) {\n this.disableOption(optionDisable);\n } else {\n this.enableOption(optionDisable);\n }\n });\n }\n }\n\n /**\n * This function disable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n disableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]+label`);\n this.hideOptionSection(option);\n if (clickable != null) {\n clickable.classList.add(\"check-inactive\");\n clickable.classList.add(\"check-selected\");\n clickable.classList.remove(\"m-option-active\");\n }\n if (input != null) {\n input.disabled = true;\n input.checked = false;\n }\n }\n\n /**\n * This function enable a button options passed by paramenter.\n * @function\n * @param {string}\n */\n enableOption(option) {\n let input = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]`);\n let clickable = this.getParentTemplate().querySelector(`[data-buttons-option-category] input[data-apply=\"${option}\"]+label`);\n if (clickable != null) {\n clickable.classList.remove(\"check-inactive\");\n }\n if (input != null) {\n input.disabled = false;\n }\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_POINT_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }, {\n id: \"icon\",\n name: \"Icono\"\n }, {\n id: \"form\",\n name: \"Fuente\"\n }];\n }\n\n /**\n * TODO\n * @const\n */\n static get OPTIONS_SUBMENU() {\n return [{\n id: \"fill\",\n name: \"Relleno\"\n }, {\n id: \"stroke\",\n name: \"Trazo\"\n }, {\n id: \"label\",\n name: \"Etiqueta\"\n }];\n }\n\n /**\n * TODO\n * @function\n */\n toggleCategory(id) {\n Object.values(this.styleCategories_).forEach(simpleBinding => {\n simpleBinding.hide();\n });\n if (this.clickedOnTable_ === false) {\n this.activateSubmenu();\n this.clickedOnTable_ = true;\n }\n let simpleBinding = this.styleCategories_[id];\n this.selectedCategory_ = simpleBinding;\n let options = this.selectedCategory_.getOptions();\n this.checkInput(\"fill\", options[\"fill\"]);\n this.checkInput(\"stroke\", options[\"stroke\"]);\n this.checkInput(\"label\", options[\"label\"]);\n this.checkInput(\"form\", options[\"form\"]);\n this.checkInput(\"icon\", options[\"icon\"]);\n if (simpleBinding != null) {\n simpleBinding.unhide();\n simpleBinding.showCompatibleSections();\n }\n Object.values(this.styleCategories_).forEach(simpleBinding => {\n simpleBinding.setLayer(this.layer_, false);\n });\n }\n\n /**\n * TODO\n * @function\n */\n renderAttributeOptions(flag = false) {\n let selectButton = this.querySelector(\"[data-options='attributeName']\");\n let value = selectButton.value;\n if (this.style_ != null && flag === true) {\n value = this.style_.getAttributeName();\n }\n let attributeExists = !M.utils.isNullOrEmpty(value);\n let values = this.getAllValuesAttribute(value)\n .filter(value => !(M.utils.isNullOrEmpty(value)))\n .map(value => {\n return {\n name: value\n };\n }).splice(0, CategoryBinding.MAXNUMBER_CATEGORIES);\n\n this.removeCategories();\n this.createCategories(values);\n this.addCategoriesView(values, attributeExists);\n }\n\n /**\n * TODO\n * @function\n */\n addCategoriesView(values, attributeExists) {\n let parent = this.querySelector(\"[data-options='values']\");\n this.compileTemplate(categorystyles, {\n values: values,\n attributeExists: attributeExists\n }).then(html => {\n parent.innerHTML = html.innerHTML;\n Object.values(this.styleCategories_).forEach(binding => {\n binding.refreshTemplate();\n binding.hide();\n });\n this.addEventClickListener();\n this.addEventSelectedListener();\n this.addLegendListenerAll();\n });\n }\n\n /**\n * TODO\n * @function\n */\n createCategories(values) {\n let categoriesStyle = this.style_ == null ? null : this.style_.getCategories();\n values.forEach(value => {\n let categoryStyle = categoriesStyle == null ? null : categoriesStyle[value.name];\n this.styleCategories_[value.name] = new SimpleCategoryBinding(simpleoptions, this.htmlTemplate_, \"stylesimple\", categoryStyle, this.layer_, this);\n this.styleCategories_[value.name].compilePromise_.then(() => {\n this.styleCategories_[value.name].refreshLegend(value.name, true);\n });\n this.setGeometryCategory(this.styleCategories_[value.name]);\n\n });\n\n let otherCategory = categoriesStyle == null ? null : categoriesStyle[\"other\"];\n this.styleCategories_[\"other\"] = new SimpleCategoryBinding(stylesimple, this.htmlTemplate_, \"stylesimple\", otherCategory, this.layer_, this);\n this.styleCategories_[\"other\"].compilePromise_.then(() => {\n this.styleCategories_[\"other\"].refreshLegend(\"other\", true);\n });\n this.setGeometryCategory(this.styleCategories_[\"other\"]);\n }\n\n /**\n * TODO\n * @function\n */\n removeCategories() {\n Object.values(this.styleCategories_).forEach(binding => binding.destroy());\n this.styleCategories_ = {};\n }\n\n /**\n * TODO\n * @function\n */\n setAttributes() {\n let layer = this.layer_;\n if (layer instanceof M.layer.Vector) {\n let selected = this.style_ == null ? \"\" : this.style_.getAttributeName();\n let attributeNames = this.filterAttributesFeature(\"string\").map(element => {\n return {\n name: element,\n selected: selected\n };\n });\n let selectElement = this.getTemplate().querySelector(\"[data-options='attributeName']\");\n this.compileTemplate(attributestemplate, {\n attributes: attributeNames\n }).then(html => {\n selectElement.innerHTML = html.innerHTML;\n this.renderAttributeOptions(true);\n if (attributeNames.length === 0) {\n this.deactivateBinding();\n } else {\n this.activateBinding();\n }\n });\n }\n }\n\n /**\n * TODO\n * @function\n */\n setGeometryCategory(category) {\n let geometry = this.layer_.getFeatures()[0].getGeometry().type;\n switch (geometry) {\n case \"Point\":\n case \"MultiPoint\":\n category.geometry_ = 'point';\n break;\n case \"LineString\":\n case \"MultiLineString\":\n category.geometry_ = 'line';\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n category.geometry_ = 'polygon';\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n }\n\n /**\n * @function\n */\n showSection(option) {\n this.querySelectorAllForEach(`[data-id='${option}']`, element => {\n element.classList.remove(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n hideSection(option) {\n this.querySelectorAllForEach(`[data-id='${option}']`, element => {\n element.classList.add(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n addEventOptionListener(option, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] [data-label='${option.id}']`);\n let input = this.querySelectorParent(`[data-buttons-option-category] input[data-apply='${option.id}']`);\n element.addEventListener(\"click\", () => {\n if (input.disabled === false) {\n options.forEach(option => this.hideSection(option.id));\n this.showSection(option.id);\n this.activeSection(option.id);\n }\n });\n }\n\n /**\n * @function\n */\n addEventCheckListener(option, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] input[data-apply='${option.id}']`);\n element.addEventListener(\"click\", () => {\n this.checkSection(option.id, options);\n });\n }\n\n /**\n * @function\n */\n activeSection(id) {\n let selector = this.querySelectorParent(`[data-buttons-option-category] [data-selector='${id}']`);\n this.querySelectorAllForEachParent(`[data-buttons-option-category] [data-selector]`, element => {\n element.classList.remove(\"check-active\");\n element.classList.add(\"check-selected\");\n });\n selector.classList.remove(\"check-selected\");\n selector.classList.add(\"check-active\");\n }\n\n /**\n * @function\n */\n setSelectedRow(id) {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n element.classList.remove(\"m-table-cell-selected\");\n });\n this.querySelector(`[id='${id}']`).classList.add(\"m-table-cell-selected\");\n }\n\n addEventSelectedListener() {\n this.querySelectorAllForEach(\"td:first-child\", element => {\n let id = element.id;\n element.addEventListener(\"click\", () => this.setSelectedRow(id));\n });\n }\n\n\n /**\n * @function\n */\n checkSection(id, options) {\n let element = this.querySelectorParent(`[data-buttons-option-category] #cat-${id}`);\n if (element.checked === true) {\n if (this.selectedCategory_ != null) {\n this.selectedCategory_[id] = true;\n }\n options.forEach(option => this.hideSection(option.id));\n this.showSection(id);\n this.activeSection(id);\n } else {\n if (this.selectedCategory_ != null) {\n this.selectedCategory_[id] = false;\n }\n }\n this.selectedCategory_.refreshLegend();\n }\n\n /**\n * @function\n */\n checkInput(id, flag) {\n let element = this.querySelectorParent(`[data-buttons-option-category] #cat-${id}`);\n if (element != null) {\n element.checked = flag;\n }\n }\n\n /**\n * @function\n */\n activateSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => input.disabled = false);\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] label[data-selector]\", label => {\n label.classList.remove(\"check-inactive\");\n label.classList.add(\"check-selected\");\n });\n }\n\n /**\n * @function\n */\n deactivateSubmenu() {\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] input\", input => input.disabled = true);\n this.querySelectorAllForEachParent(\"[data-buttons-option-category] label[data-selector]\", label => {\n label.classList.add(\"check-inactive\");\n label.classList.remove(\"check-selected\");\n });\n }\n\n /**\n * This function sets the geometry of binding class.\n * @function\n * @return {string}\n */\n getGeometry() {\n let geometry = this.layer_.getFeatures()[0].getGeometry().type;\n switch (geometry) {\n case \"Point\":\n case \"MultiPoint\":\n geometry = 'point';\n break;\n case \"LineString\":\n case \"MultiLineString\":\n geometry = 'line';\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n geometry = 'polygon';\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n return geometry;\n }\n\n /**\n * TODO\n * @function\n */\n getAllValuesAttribute(attribute) {\n let features = this.layer_.getFeatures();\n return features.map(feature => feature.getAttribute(attribute)).filter((elem, pos, arr) => arr.indexOf(elem) == pos);\n }\n\n /**\n * TODO\n * @function\n */\n generateOptions() {\n let styleOptions = {};\n let styleCategories = {};\n styleOptions[\"attributeName\"] = this.querySelector(\"[data-options='attributeName']\").value;\n\n Object.keys(this.styleCategories_).forEach(value => {\n let simpleBinding = this.styleCategories_[value];\n let options = this.styleCategories_[value].generateOptions().options;\n let fill = simpleBinding.fill;\n let stroke = simpleBinding.stroke;\n let icon = simpleBinding.icon || simpleBinding.form;\n let label = simpleBinding.label;\n let valuesFill = options.fill != null ? Object.values(options.fill).filter(value => value != null) : [];\n if (fill || stroke || icon || label) {\n styleCategories[value] = this.styleCategories_[value].style;\n }\n }, this);\n\n styleOptions[\"options\"] = styleCategories;\n\n return styleOptions;\n }\n\n /**\n * TODO\n * @function\n */\n generateStyle() {\n let opts = this.generateOptions();\n let style = null;\n if (opts.attributeName !== \"\") {\n style = new M.style.Category(opts.attributeName, opts.options);\n }\n return style;\n }\n\n /**\n * This function adds an event listener for all HTMLInputElement and HTMLSelectElement.\n * @function\n * @param {function}\n */\n addLegendListenerAll() {\n Object.keys(this.styleCategories_).forEach(category => {\n let binding = this.styleCategories_[category];\n binding.imgId = category;\n binding.addLegendListener();\n });\n }\n\n /**\n * TODO\n * @const\n */\n static get MAXNUMBER_CATEGORIES() {\n return 30;\n }\n}\n","import variablechart from 'templates/variablechart';\nimport paginationchart from 'templates/paginationchart';\nimport attributeschart from 'templates/attributeschart';\nimport {\n Binding\n}\nfrom './binding';\n\nexport class ChartBinding extends Binding {\n constructor(html, htmlParent, styleType, styleParams, layer) {\n super(html, htmlParent, styleType, styleParams, layer);\n this.variables_ = [];\n if (styleParams != null) {\n this.variables_ = styleParams.getOptions().variables.map(variable => variable.attribute);\n }\n this.compilePromise_.then(() => {\n this.addKeyEnterListener();\n this.addRenderCompatibleListener();\n this.addAttributeListener();\n this.refreshVariables();\n });\n }\n\n setLayer(layer) {\n this.layer_ = layer;\n this.renderAttributes();\n return this;\n }\n\n /**\n * @function\n * @param {string}\n */\n addAttribute(attr) {\n this.variables_.push(attr);\n }\n\n /**\n * @function\n * @param {string}\n */\n removeAttribute(attr) {\n this.variables_ = this.variables_.filter(attr2 => attr2 != attr);\n }\n\n addAttributeFromParamenter(attribute) {\n this.addAttribute(attribute);\n this.addVariableTemplate(attribute);\n this.refreshPagination();\n }\n\n /**\n * @function\n */\n addAttributeFromInput() {\n let inputAttribute = this.querySelector(\"[data-attribute]\");\n let attribute = inputAttribute.value;\n if (attribute !== \"\") {\n if (this.variables_.includes(attribute)) {\n M.dialog.info(\"El atributo ya ha sido agregado.\", \"Nombre de variable repetida\");\n } else {\n let allowedAttrs = this.layer_.getFeatures()[0].getAttributes();\n if (allowedAttrs.hasOwnProperty(attribute)) {\n this.addAttributeFromParamenter(attribute);\n } else {\n M.dialog.info(\"No existe ninguna variable con ese nombre.\", \"Nombre de variable incorrecto.\");\n }\n }\n } else {\n M.dialog.info(\"No está permitido introducir una cadena vacía.\", \"Nombre de variable vacía.\");\n\n }\n }\n\n /**\n * @function\n */\n removeAttributeFromInput() {\n let inputAttribute = this.querySelector(\"[data-attribute]\");\n let attribute = inputAttribute.value;\n this.removeAttribute(attribute);\n }\n\n /**\n * @function\n */\n addAttributeListener() {\n let button = this.querySelector(\"[data-add]\");\n button.addEventListener(\"click\", () => {\n this.addAttributeFromInput();\n });\n }\n\n /**\n * @function\n */\n addKeyEnterListener() {\n let inputElement = this.querySelector(\"[data-attribute]\");\n inputElement.addEventListener(\"keydown\", this.keyEnterListener());\n }\n\n /**\n * @function\n */\n keyEnterListener() {\n return (evt) => {\n if (evt.key === \"Enter\") {\n this.addAttributeFromInput();\n }\n };\n }\n\n /**\n * @function\n */\n addVariableTemplate(attribute) {\n let parent = this.querySelector(\"[data-variables]\");\n let variables = [];\n let variable;\n let legend = ChartBinding.DEFAULT_OPTIONS_VARIABLE.legend;\n let label = ChartBinding.DEFAULT_OPTIONS_VARIABLE.label;\n if (this.style_ != null) {\n variables = this.style_.getOptions().variables;\n }\n if (variables.length !== 0) {\n variable = variables.find(variable => variable.attribute === attribute);\n if (variable != null) {\n legend = variable.legend;\n label = variable.label;\n }\n }\n this.compileTemplate(variablechart, {\n attribute: attribute,\n legend: legend,\n label: label\n }).then(html => {\n parent.append(...html.children);\n let removeElement = this.querySelector(`[data-remove=\"${attribute}\"]`);\n if (removeElement != null) {\n this.addRemoveVarSectionListener(removeElement);\n this.addLabelOptionListener(attribute);\n }\n });\n }\n\n /**\n * @function\n */\n removeVariableTemplate(selector) {\n let parent = this.querySelector(\".m-chart-variables\");\n this.querySelectorAllForEach(`.m-chart-variables [data-delete=\"${selector}\"]`, element => {\n parent.removeChild(element);\n });\n }\n\n /**\n * @function\n */\n removeVariableSection(attr) {\n this.removeAttribute(attr);\n this.removeVariableTemplate(attr);\n this.refreshPagination();\n }\n\n /**\n * @function\n */\n refreshVariables() {\n let variables = [...this.variables_];\n variables.forEach(variable => {\n this.removeVariableSection(variable);\n this.addAttributeFromParamenter(variable);\n });\n }\n\n /**\n * @function\n */\n addRemoveVarSectionListener(element) {\n element.addEventListener(\"click\", this.removeVarSectionListener(element).bind(this));\n }\n\n /**\n * @function\n */\n removeVarSectionListener(element) {\n let attribute = element.dataset[\"remove\"];\n return () => {\n this.removeVariableSection(attribute);\n };\n }\n\n /**\n * @function\n */\n refreshPagination() {\n let options = this.variables_.map((attribute, index) => {\n let option = {\n attribute: attribute,\n number: index + 1\n };\n return option;\n });\n\n let parent = this.querySelector(\"[data-pagination]\");\n this.compileTemplate(paginationchart, {\n ranges: options\n }).then(html => {\n parent.innerHTML = html.innerHTML;\n this.addClickPagerListener();\n let firstAttr = this.variables_.slice(-1)[0];\n if (firstAttr != null) {\n this.showVariableSection(firstAttr)();\n }\n });\n }\n\n /**\n * @function\n */\n addClickPagerListener() {\n this.querySelectorAllForEach(\"[data-page-selector]\", element => {\n let selector = element.dataset[\"pageSelector\"];\n element.addEventListener(\"click\", this.showVariableSection(selector).bind(this));\n });\n }\n\n /**\n * @function\n */\n clickPagerListener(selector) {\n this.querySelectorAllForEach(\"[data-target]\", element => {\n element.classList.add(\"m-hidden\");\n });\n\n this.querySelectorAllForEach(`[data-target=\"${selector}\"]`, element => {\n element.classList.remove(\"m-hidden\");\n });\n }\n\n /**\n * @function\n */\n activePageListener(selector) {\n this.querySelectorAllForEach(\"[data-page-selector]\", element2 => {\n element2.classList.remove(\"m-page-active\");\n });\n let element = this.querySelector(`[data-page-selector=\"${selector}\"]`);\n if (element != null) {\n element.classList.add(\"m-page-active\");\n }\n }\n\n /**\n * @function\n */\n showVariableSection(selector) {\n return () => {\n this.clickPagerListener(selector);\n this.activePageListener(selector);\n };\n }\n\n /**\n * @function\n */\n renderCompatibleOpts(type) {\n this.querySelectorAllForEach(\"[data-type]\", element => {\n let types = element.dataset[\"type\"].split(\",\");\n if (!types.includes(type)) {\n element.classList.add(\"m-hidden\");\n } else {\n element.classList.remove(\"m-hidden\");\n }\n });\n }\n\n /**\n * @function\n */\n renderCompatibleListener() {\n let selectElement = this.querySelector(\"[data-style-options='type']\");\n let selectType = selectElement.selectedOptions[0].value;\n this.renderCompatibleOpts(selectType);\n }\n\n /**\n * @function\n */\n addRenderCompatibleListener() {\n let selectElement = this.querySelector(\"[data-style-options='type']\");\n selectElement.addEventListener(\"change\", this.renderCompatibleListener.bind(this));\n }\n\n /**\n * @function\n */\n renderAttributes() {\n let attributes = this.layer_.getFeatures()[0].getAttributes();\n let keys = Object.keys(attributes);\n keys = keys.filter(key => {\n return !isNaN(parseFloat(attributes[key]));\n });\n\n this.compileTemplate(attributeschart, {\n attributes: keys\n }).then(html => {\n this.querySelector(\"[data-attribute]\").innerHTML = html.innerHTML;\n });\n }\n\n /**\n * @function\n */\n toggleLabelOptions(name) {\n let element = this.querySelector(`[data-label-target=\"${name}\"]`);\n let classList = element.classList;\n let result = classList.contains(\"m-hidden\") === true ? classList.remove(\"m-hidden\") : classList.add(\"m-hidden\");\n }\n\n /**\n * @function\n */\n addLabelOptionListener(name) {\n let checkbox = this.querySelector(`[data-variable-option=\"${name}.labelshow\"]`);\n checkbox.addEventListener(\"change\", () => {\n this.toggleLabelOptions(name);\n });\n }\n\n /**\n * @function\n */\n generateVariableOptions() {\n let obj = {};\n\n this.querySelectorAllForEach(\"input[data-variable-option]\", element => {\n let path = element.dataset[\"variableOption\"];\n let value = element.value;\n if (element.type === \"number\") {\n value = parseFloat(value);\n }\n\n if (element.type === \"checkbox\") {\n value = element.checked;\n }\n Binding.createObj(obj, path, value);\n });\n\n let optVars = this.variables_.map(attribute => {\n obj[attribute][\"attribute\"] = attribute;\n\n return obj[attribute];\n });\n\n optVars = optVars.map(option => {\n // options text label, show the % of data\n if (option.labelshow === true) {\n option[\"label\"][\"text\"] = (value, values) => {\n return Math.round(value / values.reduce((tot, curr) => tot + curr) * 100) + '%';\n };\n }\n // delete every option label\n else {\n option[\"label\"] = undefined;\n }\n return option;\n });\n\n return optVars;\n }\n\n /**\n * @function\n */\n generateStyle() {\n let options = this.generateOptions().options;\n let varsOpts = this.generateVariableOptions();\n let scheme = M.style.chart.schemes[options.scheme];\n\n let style = new M.style.Chart({\n type: options.type,\n scheme: scheme,\n radius: options.radius,\n donutRadio: options.donutRadius,\n offsetX: options.offsetX,\n offsetY: options.offsetY,\n variables: varsOpts.length === 0 ? [new M.style.chart.Variable({\n attribute: \"default\"\n })] : varsOpts,\n fill3DColor: options.fill3DColor\n });\n\n return style;\n }\n\n /**\n * @function\n *\n */\n getOptionsTemplate() {\n let options = ChartBinding.DEFAULT_OPTIONS_STYLE;\n if (this.style_ != null) {\n options = this.style_.getOptions();\n options[\"scheme\"] = this.getSchemeName();\n // parse variable options\n\n }\n return options;\n }\n\n /**\n * @function\n */\n getSchemeName() {\n\n const arrayEquals = (array, array2) => {\n let include = false;\n let include2 = false;\n if (array instanceof Array && array2 instanceof Array) {\n include = array.every((element, index) => element === array2[index]);\n include2 = array2.every((element, index) => element === array[index]);\n }\n return include && include2;\n };\n\n if (this.style_ != null) {\n let scheme = this.style_.getOptions()[\"scheme\"];\n let schemesChart = M.style.chart.schemes;\n name = Object.keys(schemesChart).find(name => arrayEquals(scheme, schemesChart[name]));\n\n }\n return name;\n }\n}\n\n/**\n * @const\n */\nChartBinding.DEFAULT_OPTIONS_STYLE = {\n donutRatio: 4,\n fill3DColor: \"#ff00f0\",\n offsetX: 0,\n offsetY: 0,\n radius: 12,\n rotateWithView: false,\n scheme: [\"#ffa500\", \"blue\", \"red\", \"green\", \"cyan\", \"magenta\", \"yellow\", \"#0f0\"],\n type: \"pie\"\n};\n\n/**\n * @const\n */\nChartBinding.DEFAULT_OPTIONS_VARIABLE = {\n legend: \"Ejemplo de leyenda\",\n label: {\n fill: \"#ff0000\",\n scale: 1,\n text: (value, values) => {\n return Math.round(value / values.reduce((tot, curr) => tot + curr) * 100) + '%';\n },\n radiusIncrement: 2,\n stroke: {\n color: \"#000000\",\n width: 1\n }\n }\n};\n","import stylesimple from 'templates/stylesimple';\nimport styleproportional from 'templates/styleproportional';\nimport stylecluster from 'templates/stylecluster';\nimport stylechoropleth from 'templates/stylechoropleth';\nimport stylecategory from 'templates/stylecategory';\nimport styleheatmap from 'templates/styleheatmap';\nimport stylechart from 'templates/stylechart';\nimport {\n SimpleBinding\n}\nfrom './binding/simplebinding';\nimport {\n ProportionalBinding\n}\nfrom './binding/proportionalbinding';\nimport {\n ClusterBinding\n}\nfrom './binding/clusterbinding';\nimport {\n HeatmapBinding\n}\nfrom './binding/heatmapbinding';\nimport {\n ChoroplethBinding\n}\nfrom './binding/choroplethbinding';\nimport {\n CategoryBinding\n}\nfrom './binding/categorybinding';\nimport {\n ChartBinding\n}\nfrom './binding/chartbinding';\n\n\n\nexport default class BindingController {\n constructor(htmlParent) {\n this.layer_ = null;\n this.activePanel_ = null;\n this.selectedPanels_ = [];\n this.html_ = htmlParent;\n this.renderViews(null);\n }\n\n getStyles(layer, styleType) {\n let styleBinding = null;\n if (layer != null) {\n let style = layer.getStyle();\n\n if (style instanceof styleType) {\n styleBinding = style;\n } else if (style instanceof M.style.Composite) {\n let styles = style.getStyles();\n styleBinding = styles.find(style => style instanceof styleType);\n }\n }\n return styleBinding;\n }\n\n renderViews(layer) {\n\n this.bindings_ = {};\n this.bindings_['stylesimple'] = new SimpleBinding(stylesimple, this.html_, 'stylesimple', this.getStyles(layer, M.style.Simple), layer, this);\n this.bindings_['styleproportional'] = new ProportionalBinding(styleproportional, this.html_, 'styleproportional', this.getStyles(layer, M.style.Proportional), layer);\n this.bindings_['stylecluster'] = new ClusterBinding(stylecluster, this.html_, 'stylecluster', this.getStyles(layer, M.style.Cluster), layer);\n this.bindings_['stylechoropleth'] = new ChoroplethBinding(stylechoropleth, this.html_, 'stylechoropleth', this.getStyles(layer, M.style.Choropleth), layer);\n this.bindings_['stylecategory'] = new CategoryBinding(stylecategory, this.html_, 'stylecategory', this.getStyles(layer, M.style.Category), layer, this);\n this.bindings_['styleheatmap'] = new HeatmapBinding(styleheatmap, this.html_, 'styleheatmap', this.getStyles(layer, M.style.Heatmap), layer);\n this.bindings_['stylechart'] = new ChartBinding(stylechart, this.html_, 'stylechart', this.getStyles(layer, M.style.Chart), layer);\n this.bindings_[\"stylesimple\"].getCompilePromise().then(() => {\n this.addSelectOnChangeListener();\n });\n this.allCompilePromises_ = this.getBindings().map(binding => binding.getCompilePromise());\n }\n\n getAllCompilePromises() {\n return this.allCompilePromises_;\n }\n\n renderViewsPromise() {\n let promises = Object.values(this.bindings_).map(binding => binding.getCompilePromise());\n return Promise.all(promises);\n }\n\n destroyViews() {\n Object.values(this.bindings_).forEach(binding => binding.destroy());\n }\n\n /**\n * @function\n */\n getActivePanel() {\n return this.activePanel_;\n }\n\n /**\n * @function\n */\n setActivePanel(style) {\n Object.values(this.bindings_).forEach(binding => binding.setActivated(false));\n this.activePanel_ = this.bindings_[style];\n this.activePanel_.setActivated(true);\n if (style === \"stylesimple\") {\n this.bindings_[\"stylesimple\"].toggleDisplaySubmenu(false);\n } else {\n this.bindings_[\"stylesimple\"].toggleDisplaySubmenu(true);\n }\n }\n\n /**\n * @function\n */\n getSelectedPanels() {\n return this.selectedPanels_.map(selected => this.bindings_[selected]);\n }\n\n /**\n * @function\n */\n addSelectedPanel(style) {\n if (!this.selectedPanels_.includes(style)) {\n this.selectedPanels_.push(style);\n this.bindings_[style].setSelected(true);\n }\n }\n\n selectPanel(style) {\n this.html_.querySelector(`[data-checkbox='${style}']`).checked = true;\n this.addSelectedPanel(style);\n }\n\n /**\n * @function\n */\n removeSelectedPanel(style) {\n this.selectedPanels_ = this.selectedPanels_.filter(style2 => style2 !== style);\n this.bindings_[style].setSelected(false);\n }\n\n /**\n * @function\n */\n disablePanel(style) {\n let binding = this.bindings_[style];\n if (binding != null) {\n binding.setDisabled(true);\n }\n }\n\n /**\n * @function\n */\n enablePanel(style) {\n let binding = this.bindings_[style];\n if (binding != null) {\n binding.setDisabled(false);\n }\n }\n\n /**\n * @function\n */\n setGeometry(geometry) {\n this.geometry_ = geometry;\n }\n\n /**\n * @function\n */\n getGeometry() {\n return this.geometry_;\n }\n\n /**\n * @function\n */\n change(layer) {\n this.destroyViews();\n this.renderViews(layer);\n\n this.renderViewsPromise().then(() => {\n this.setLayer(layer);\n this.resetOptions();\n this.setCompatiblePanels();\n this.initBindings(layer);\n });\n\n }\n\n /**\n * @function\n */\n setLayer(layer) {\n if (this.layer_ === null) {\n this.addActiveListener();\n this.addSelectListener();\n }\n this.layer_ = layer;\n\n // for (let feature of layer.getFeatures()) {\n let type;\n\n // // Establece correspondencia entre tipo de feature y tipo de geometria\n switch (layer.getFeatures()[0].getGeometry().type) {\n case \"Point\":\n case \"MultiPoint\":\n type = 'point';\n break;\n case \"LineString\":\n case \"MultiLineString\":\n type = 'line';\n break;\n case \"Polygon\":\n case \"MultiPolygon\":\n type = 'polygon';\n break;\n default:\n M.dialog.error('Geometria no soportada', 'Error');\n }\n\n // // Establece la geometria\n // this.setGeometry(type);\n\n // // Entro si tengo una lista de puntos o que contiene puntos\n // if (type == \"point\") {\n // break;\n // }\n\n this.setGeometry(type);\n\n // }\n\n //this.setGeometry(\"generic\");\n }\n\n /**\n * @function\n */\n getKeysBindings() {\n return Object.keys(this.bindings_);\n }\n\n /**\n * @function\n */\n getBindings() {\n return Object.values(this.bindings_);\n }\n\n /**\n * @function\n */\n deactivateAll() {\n this.getBindings().forEach(binding => binding.setActivated(false));\n this.activePanel_ = null;\n }\n\n /**\n * @function\n */\n unselectAll() {\n this.getBindings().forEach(binding => binding.setSelected(false));\n this.selectedPanels_ = [];\n }\n\n /**\n * @function\n */\n enableAll() {\n this.getKeysBindings().forEach(binding => this.enablePanel(binding));\n }\n\n /**\n * @function\n */\n disableAll() {\n this.getKeysBindings().forEach(binding => this.disablePanel(binding));\n }\n\n /**\n * @function\n */\n bindLayer(binding) {\n this.bindings_[binding].setLayer(this.layer_);\n this.bindings_[binding].setDisabled(false);\n }\n\n /**\n * @function\n */\n resetOptions() {\n this.deactivateAll();\n this.unselectAll();\n }\n\n /**\n * @function\n */\n initBindings(layer) {\n this.bindings_['stylesimple'].setGeometry(this.geometry_).setLayer(this.layer_);\n let styles = [layer.getStyle()];\n if (styles[0] instanceof M.style.Composite) {\n styles.push(...styles[0].getStyles());\n }\n let styleNames = styles.map(style => BindingController.parseStyleToName(style));\n styleNames.forEach(style => {\n this.showCompatiblePanel(style);\n this.activeLastSelected(style);\n });\n }\n\n /**\n * @function\n */\n setCompatiblePanels() {\n let styles = BindingController.GEOMETRY_COMPATIBLE_OPTIONS[this.geometry_];\n this.getKeysBindings().forEach(binding => {\n if (styles.includes(binding)) {\n this.bindLayer(binding);\n } else {\n this.disablePanel(binding);\n }\n });\n this.deactivateAll();\n }\n\n /**\n * @function\n */\n setCompatibleStylePanels(style) {\n this.disableAll();\n this.getCompatibles().forEach(style2 => {\n if (this.compatibleGeometry(style2)) {\n this.enablePanel(style2);\n }\n });\n this.selectedPanels_.forEach(style => {\n this.bindings_[style].setSelected(true);\n });\n }\n\n /**\n * @function\n */\n showActivePanel(style) {\n this.deactivateAll();\n this.setActivePanel(style);\n }\n\n /**\n * @function\n */\n activeLastSelected(style) {\n let lastSelected = this.selectedPanels_.slice(-1)[0];\n if (lastSelected == undefined) {\n lastSelected = style;\n }\n this.showActivePanel(lastSelected);\n }\n\n /**\n * @function\n */\n showCompatiblePanel(style) {\n if (this.selectedPanels_.includes(style)) {\n this.removeSelectedPanel(style);\n } else {\n this.addSelectedPanel(style);\n }\n this.setCompatibleStylePanels(style);\n }\n\n /**\n * @function\n */\n addActiveListener() {\n this.getKeysBindings().forEach(binding => {\n let bindingStyle = this.bindings_[binding];\n let selectButton = bindingStyle.getSelectButton();\n let activeButton = bindingStyle.getActivateButton();\n let label = this.html_.querySelector(`[data-flap='${binding}']+label`);\n label.addEventListener('click', () => {\n if (selectButton.disabled === false) {\n let style = activeButton.dataset.flap;\n this.toggleDisplaySubmenu(style !== \"stylesimple\");\n this.showActivePanel(style);\n }\n });\n });\n }\n\n /**\n * @function\n */\n addSelectListener() {\n this.getKeysBindings().forEach(binding => {\n let bindingStyle = this.bindings_[binding];\n let selectButton = bindingStyle.getSelectButton();\n selectButton.addEventListener('change', () => {\n let style = selectButton.dataset.checkbox;\n this.toggleDisplaySubmenu(style !== \"stylesimple\");\n this.showCompatiblePanel(style);\n this.activeLastSelected(style);\n });\n });\n }\n\n /**\n * @function\n */\n getStyle() {\n let style;\n if (this.getSelectedPanels().length === 0) {\n M.dialog.info(\"Debe elegir al menos un estilo\", \"Elija estilo\");\n } else if (this.getSelectedPanels().length === 1) {\n style = this.getSelectedPanels()[0].generateStyle();\n } else {\n let mainStyle = this.getMainStyle();\n let styles = this.getIndividualStyles();\n mainStyle.add(styles);\n style = mainStyle;\n }\n return style;\n }\n\n /**\n * @function\n */\n getMainStyle() {\n return this.getSelectedPanels().map(binding => binding.generateStyle()).find(style => style instanceof M.style.Composite);\n }\n\n /**\n * @function\n */\n getIndividualStyles() {\n let mainStyle = this.getMainStyle();\n return this.getSelectedPanels()\n .filter(style => style != null)\n .map(binding => binding.generateStyle()).filter(style => !style.equals(mainStyle));\n }\n\n /**\n * @function\n */\n getCompatibles() {\n let compatibles = ['stylesimple', 'stylecluster', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth', 'styleheatmap'];\n return compatibles.filter(style => this.isCompatibleAll(this.selectedPanels_, style));\n\n }\n\n toggleDisplaySubmenu(flag) {\n this.bindings_['stylesimple'].toggleDisplaySubmenu(flag);\n }\n\n /**\n * @function\n */\n isCompatible(style, style2) {\n return BindingController.STYLE_COMPATIBLE_OPTIONS[style].includes(style2);\n }\n\n /**\n * @function\n */\n isCompatibleAll(styles, style) {\n let isCompatible = true;\n styles.forEach(style2 => {\n if (!this.isCompatible(style2, style)) {\n isCompatible = false;\n }\n });\n return isCompatible;\n }\n\n /**\n * @function\n */\n compatibleGeometry(style) {\n return BindingController.GEOMETRY_COMPATIBLE_OPTIONS[this.geometry_].includes(style);\n }\n\n /**\n * @function\n */\n addSelectOnChangeListener() {\n this.bindings_[\"stylesimple\"].querySelectorAllForEach(\"*\", element => {\n element.addEventListener(\"click\", () => {\n this.addSelectedPanel(\"stylesimple\");\n });\n });\n }\n\n /**\n * @const\n * @static\n */\n static get STYLE_COMPATIBLE_OPTIONS() {\n return {\n 'stylesimple': ['styleproportional', 'stylecluster', 'stylesimple'],\n 'styleproportional': ['stylesimple', 'stylecluster', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth'],\n 'stylechoropleth': ['styleproportional', 'stylecluster', 'stylechoropleth'],\n 'stylecategory': ['styleproportional', 'stylecluster', 'stylecategory'],\n 'stylecluster': ['stylesimple', 'stylechart', 'styleproportional', 'stylecategory', 'stylechoropleth', 'stylecluster'],\n 'styleheatmap': ['styleheatmap'],\n 'stylechart': ['stylecluster', 'styleproportional', 'stylechart']\n };\n }\n\n /**\n * @const\n * @static\n */\n static get GEOMETRY_COMPATIBLE_OPTIONS() {\n return {\n \"point\": ['styleproportional', 'stylecluster', 'stylechoropleth', 'stylecategory',\n 'styleheatmap', 'stylechart', 'stylesimple'\n ],\n \"line\": ['stylechoropleth', 'stylecategory', 'stylesimple'],\n \"polygon\": ['stylechoropleth', 'stylecategory', 'stylesimple', \"styleproportional\"]\n };\n }\n\n /**\n * @function\n * @static\n */\n static parseStyleToName(style) {\n let name = \"\";\n if (style instanceof M.style.Simple) {\n name = \"stylesimple\";\n } else if (style instanceof M.style.Cluster) {\n name = \"stylecluster\";\n } else if (style instanceof M.style.Heatmap) {\n name = \"styleheatmap\";\n } else if (style instanceof M.style.Choropleth) {\n name = \"stylechoropleth\";\n } else if (style instanceof M.style.Category) {\n name = \"stylecategory\";\n } else if (style instanceof M.style.Chart) {\n name = \"stylechart\";\n } else if (style instanceof M.style.Proportional) {\n name = \"styleproportional\";\n }\n return name;\n };\n}\n","import stylemanager from 'templates/stylemanager';\nimport StyleManagerImplControl from 'impl/stylemanagerControl';\nimport BindingController from './bindingcontroller';\n\nexport default class StyleManagerControl extends M.Control {\n\n /**\n * @classdesc\n * Main constructor of the class. Creates a PluginControl\n * control\n *\n * @constructor\n * @extends {M.Control}\n * @api stable\n */\n constructor(layer) {\n // 1. checks if the implementation can create PluginControl\n if (M.utils.isUndefined(StyleManagerImplControl)) {\n M.exception('La implementación usada no puede crear controles PluginControl');\n }\n\n // 2. implementation of this control\n let impl = new StyleManagerImplControl();\n super(impl, \"StyleManager\");\n this.layer_ = layer;\n }\n /**\n * This function creates the view\n *\n * @public\n * @function\n * @param {M.Map} map to add the control\n * @api stable\n */\n createView(map) {\n this.facadeMap_ = map;\n const layers = map.getWFS().concat(map.getKML().concat(map.getLayers().filter(layer => layer.type === \"GeoJSON\"))).filter((layer) => {\n return layer.name !== 'selectLayer';\n });\n\n return new Promise((success, fail) => {\n const html = M.template.compileSync(stylemanager, {\n 'jsonp': true,\n vars: {\n layers: layers\n }\n })\n let htmlSelect = html.querySelector('#m-stylemanager-select');\n let container = html.querySelector('.m-stylemanager-container-select');\n this.bindinController_ = new BindingController(container);\n this.addSelectListener(htmlSelect, html);\n this.subscribeAddedLayer(htmlSelect);\n this.addApplyBtnListener(html);\n this.addClearBtnListener(html);\n this.renderOptionsLayerParam(htmlSelect, html, layers);\n success(html);\n this.loadFonts(html);\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n renderOptionsLayerParam(htmlSelect, html, layers) {\n if (this.layer_ instanceof M.layer.Vector) {\n Promise.all(this.bindinController_.getAllCompilePromises()).then(() => {\n this.renderOptions(htmlSelect, html, this.layer_);\n M.template.compile(\"selectlayer.html\", {\n vars: {\n layers: layers.map(layer => {\n return {\n name: layer.name,\n selected: this.layer_.name\n };\n }),\n }\n }).then(html => {\n htmlSelect.innerHTML = html.innerHTML;\n });\n });\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addOpenAttribute(html) {\n let containerSelect = html.querySelector(\".m-stylemanager-container-select\");\n containerSelect.setAttribute(\"open-select\", \"\");\n\n\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addApplyBtnListener(html) {\n let buttonApply = html.querySelector(\"[data-apply-style]\");\n buttonApply.addEventListener('click', this.applyStyle.bind(this));\n\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addClearBtnListener(html) {\n let buttonClear = html.querySelector(\"[data-clear-style]\");\n buttonClear.addEventListener('click', this.clearStyle.bind(this));\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n addSelectListener(htmlSelect, html) {\n htmlSelect.addEventListener('change', () => {\n this.renderOptions(htmlSelect, html);\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n subscribeAddedLayer(htmlSelect) {\n this.facadeMap_.on(M.evt.ADDED_LAYER, (layers) => {\n if (Array.isArray(layers)) {\n layers.filter(layer => (layer instanceof M.layer.Vector && layer.name !== 'selectLayer')).forEach(layer => this.addLayerOption(htmlSelect, layer.name));\n } else if (layers instanceof M.layer.Vector) {\n const _layer = { ...layers };\n this.addLayerOption(htmlSelect, _layer);\n }\n });\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n getActivationButton(html) {\n return html.querySelector('button.m-panel-btn');\n }\n\n /**\n * @function\n */\n addLayerOption(htmlSelect, name) {\n if (name != \"cluster_cover\") {\n if (this.isNotAdded(name, htmlSelect) === true) {\n let htmlOption = document.createElement(\"option\");\n htmlOption.setAttribute(\"name\", name);\n htmlOption.innerText = name;\n htmlSelect.add(htmlOption);\n }\n }\n }\n\n /**\n * @function\n */\n isNotAdded(layerName, htmlSelect) {\n const aChildren = [...htmlSelect.children];\n return !aChildren.some(o => o.innerHTML === layerName);\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n renderOptions(htmlSelect, html, layer = null) {\n let layerName = htmlSelect.value;\n this.layer_ = this.getLayerByName(layerName);\n if (layer != null) {\n this.layer_ = layer;\n }\n if (this.layer_ instanceof M.layer.Vector) {\n let features = this.layer_.getFeatures();\n if (features.length === 0) {\n M.dialog.error('La capa no tiene features o aún no se han cargado.', 'Error');\n htmlSelect.selectedIndex = 0;\n } else {\n this.bindinController_.change(this.layer_);\n this.showBoxes(html);\n this.addOpenAttribute(html);\n }\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n getLayerByName(layerName) {\n let layers = this.facadeMap_.getWFS().concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(layer => layer.type === \"GeoJSON\"))).filter((layer) => {\n return layer.name !== 'selectLayer';\n });\n\n return layers.find(layer => layer.name === layerName);\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n showBoxes(htmlParent) {\n htmlParent.querySelector(\".m-boxes\").classList.remove(\"m-hidden\");\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n applyStyle() {\n if (this.layer_ instanceof M.layer.Vector) {\n this.layer_.clearStyle();\n let style = this.bindinController_.getStyle();\n this.layer_.setStyle(style);\n } else {\n M.dialog.info(\"Tiene que elegir una capa.\", \"Elija capa\");\n }\n }\n\n /**\n * @public\n * @function\n * @param {HTMLElement} html to add the plugin\n * @api stable\n */\n clearStyle() {\n if (this.layer_ instanceof M.layer.Vector) {\n this.layer_.setStyle(M.layer.Vector.DEFAULT_OPTIONS_STYLE);\n } else {\n M.dialog.info(\"Tiene que elegir una capa.\", \"Elija capa\");\n }\n }\n /**\n * @function\n */\n loadFonts() {\n M.style.Font.addSymbol({\n \"font\": \"FontAwesome\",\n \"name\": \"FontAwesome\",\n \"copyright\": \"SIL OFL 1.1\",\n \"prefix\": \"fa\"\n }, {\n \"fa-glass\": \"\\uf000\",\n \"fa-music\": \"\\uf001\",\n \"fa-search\": \"\\uf002\",\n \"fa-envelope-o\": \"\\uf003\",\n \"fa-heart\": \"\\uf004\",\n \"fa-star\": \"\\uf005\",\n \"fa-star-o\": \"\\uf006\",\n \"fa-user\": \"\\uf007\",\n \"fa-film\": \"\\uf008\",\n \"fa-th-large\": \"\\uf009\",\n \"fa-th\": \"\\uf00a\",\n \"fa-th-list\": \"\\uf00b\",\n \"fa-check\": \"\\uf00c\",\n \"fa-remove\": \"\\uf00d\",\n \"fa-close\": \"\\uf00d\",\n \"fa-times\": \"\\uf00d\",\n \"fa-search-plus\": \"\\uf00e\",\n \"fa-search-minus\": \"\\uf010\",\n \"fa-power-off\": \"\\uf011\",\n \"fa-signal\": \"\\uf012\",\n \"fa-gear\": \"\\uf013\",\n \"fa-cog\": \"\\uf013\",\n \"fa-trash-o\": \"\\uf014\",\n \"fa-home\": \"\\uf015\",\n \"fa-file-o\": \"\\uf016\",\n \"fa-clock-o\": \"\\uf017\",\n \"fa-road\": \"\\uf018\",\n \"fa-download\": \"\\uf019\",\n \"fa-arrow-circle-o-down\": \"\\uf01a\",\n \"fa-arrow-circle-o-up\": \"\\uf01b\",\n \"fa-inbox\": \"\\uf01c\",\n \"fa-play-circle-o\": \"\\uf01d\",\n \"fa-rotate-right\": \"\\uf01e\",\n \"fa-repeat\": \"\\uf01e\",\n \"fa-refresh\": \"\\uf021\",\n \"fa-list-alt\": \"\\uf022\",\n \"fa-lock\": \"\\uf023\",\n \"fa-flag\": \"\\uf024\",\n \"fa-headphones\": \"\\uf025\",\n \"fa-volume-off\": \"\\uf026\",\n \"fa-volume-down\": \"\\uf027\",\n \"fa-volume-up\": \"\\uf028\",\n \"fa-qrcode\": \"\\uf029\",\n \"fa-barcode\": \"\\uf02a\",\n \"fa-tag\": \"\\uf02b\",\n \"fa-tags\": \"\\uf02c\",\n \"fa-book\": \"\\uf02d\",\n \"fa-bookmark\": \"\\uf02e\",\n \"fa-print\": \"\\uf02f\",\n \"fa-camera\": \"\\uf030\",\n \"fa-font\": \"\\uf031\",\n \"fa-bold\": \"\\uf032\",\n \"fa-italic\": \"\\uf033\",\n \"fa-text-height\": \"\\uf034\",\n \"fa-text-width\": \"\\uf035\",\n \"fa-align-left\": \"\\uf036\",\n \"fa-align-center\": \"\\uf037\",\n \"fa-align-right\": \"\\uf038\",\n \"fa-align-justify\": \"\\uf039\",\n \"fa-list\": \"\\uf03a\",\n \"fa-dedent\": \"\\uf03b\",\n \"fa-outdent\": \"\\uf03b\",\n \"fa-indent\": \"\\uf03c\",\n \"fa-video-camera\": \"\\uf03d\",\n \"fa-photo\": \"\\uf03e\",\n \"fa-image\": \"\\uf03e\",\n \"fa-picture-o\": \"\\uf03e\",\n \"fa-pencil\": \"\\uf040\",\n \"fa-map-marker\": \"\\uf041\",\n \"fa-adjust\": \"\\uf042\",\n \"fa-tint\": \"\\uf043\",\n \"fa-edit\": \"\\uf044\",\n \"fa-pencil-square-o\": \"\\uf044\",\n \"fa-share-square-o\": \"\\uf045\",\n \"fa-check-square-o\": \"\\uf046\",\n \"fa-arrows\": \"\\uf047\",\n \"fa-step-backward\": \"\\uf048\",\n \"fa-fast-backward\": \"\\uf049\",\n \"fa-backward\": \"\\uf04a\",\n \"fa-play\": \"\\uf04b\",\n \"fa-pause\": \"\\uf04c\",\n \"fa-stop\": \"\\uf04d\",\n \"fa-forward\": \"\\uf04e\",\n \"fa-fast-forward\": \"\\uf050\",\n \"fa-step-forward\": \"\\uf051\",\n \"fa-eject\": \"\\uf052\",\n \"fa-chevron-left\": \"\\uf053\",\n \"fa-chevron-right\": \"\\uf054\",\n \"fa-plus-circle\": \"\\uf055\",\n \"fa-minus-circle\": \"\\uf056\",\n \"fa-times-circle\": \"\\uf057\",\n \"fa-check-circle\": \"\\uf058\",\n \"fa-question-circle\": \"\\uf059\",\n \"fa-info-circle\": \"\\uf05a\",\n \"fa-crosshairs\": \"\\uf05b\",\n \"fa-times-circle-o\": \"\\uf05c\",\n \"fa-check-circle-o\": \"\\uf05d\",\n \"fa-ban\": \"\\uf05e\",\n \"fa-arrow-left\": \"\\uf060\",\n \"fa-arrow-right\": \"\\uf061\",\n \"fa-arrow-up\": \"\\uf062\",\n \"fa-arrow-down\": \"\\uf063\",\n \"fa-mail-forward\": \"\\uf064\",\n \"fa-share\": \"\\uf064\",\n \"fa-expand\": \"\\uf065\",\n \"fa-compress\": \"\\uf066\",\n \"fa-plus\": \"\\uf067\",\n \"fa-minus\": \"\\uf068\",\n \"fa-asterisk\": \"\\uf069\",\n \"fa-exclamation-circle\": \"\\uf06a\",\n \"fa-gift\": \"\\uf06b\",\n \"fa-leaf\": \"\\uf06c\",\n \"fa-fire\": \"\\uf06d\",\n \"fa-eye\": \"\\uf06e\",\n \"fa-eye-slash\": \"\\uf070\",\n \"fa-warning\": \"\\uf071\",\n \"fa-exclamation-triangle\": \"\\uf071\",\n \"fa-plane\": \"\\uf072\",\n \"fa-calendar\": \"\\uf073\",\n \"fa-random\": \"\\uf074\",\n \"fa-comment\": \"\\uf075\",\n \"fa-magnet\": \"\\uf076\",\n \"fa-chevron-up\": \"\\uf077\",\n \"fa-chevron-down\": \"\\uf078\",\n \"fa-retweet\": \"\\uf079\",\n \"fa-shopping-cart\": \"\\uf07a\",\n \"fa-folder\": \"\\uf07b\",\n \"fa-folder-open\": \"\\uf07c\",\n \"fa-arrows-v\": \"\\uf07d\",\n \"fa-arrows-h\": \"\\uf07e\",\n \"fa-bar-t-o\": \"\\uf080\",\n \"fa-bar-t\": \"\\uf080\",\n \"fa-twitter-square\": \"\\uf081\",\n \"fa-facebook-square\": \"\\uf082\",\n \"fa-camera-retro\": \"\\uf083\",\n \"fa-key\": \"\\uf084\",\n \"fa-gears\": \"\\uf085\",\n \"fa-cogs\": \"\\uf085\",\n \"fa-comments\": \"\\uf086\",\n });\n\n\n }\n /**\n * This function compares controls\n *\n * @public\n * @function\n * @param {M.Control} control to compare\n * @api stable\n */\n equals(control) {\n return control instanceof StyleManagerControl;\n }\n}\n","export class ColorPickerPolyfill {\n static apply(window) {\n var document = window.document,\n nativeColorPicker = {\n // initialized flag\n started: false,\n\n // start color\n color: '#000000',\n\n // inputs where plugin was initialized\n inputs: {},\n\n // flag to know if color input is supported\n hasNativeColorSupport: false,\n\n // inits the plugin on specified input\n init: function(inputId) {\n // start the plugin\n this.start();\n\n if (this.hasNativeColorSupport) {\n return;\n }\n\n if (typeof inputId !== 'string') {\n throw 'inputId have to be a string id selector';\n }\n\n // set the input\n this.input = (this.inputs[inputId] = this.inputs[inputId]) || document.getElementById(inputId);\n\n if (!this.input) {\n throw 'There was no input found with id: \"' + inputId + '\"';\n }\n\n // input defaults\n this.input.value = this.color;\n this.input.unselectable = 'on';\n this.css(this.input, {\n backgroundColor: this.color,\n borderWidth: '0.4em 0.3em',\n width: '3em',\n cursor: 'default'\n });\n\n // register input event\n this.input.onfocus = function() {\n nativeColorPicker.onFocus(this.id);\n };\n },\n\n // initialize once\n start: function() {\n // is already started\n if (this.started) {\n return;\n }\n\n // test if browser has native support for color input\n try {\n this.hasNativeColorSupport = !!(document.createElement('input').type = 'color');\n } catch (e) {};\n\n // no native support...\n if (!this.hasNativeColorSupport) {\n // create object element\n var object_element = document.createElement('object');\n object_element.classid = 'clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b';\n // set attributes\n object_element.id = 'colorHelperObj';\n this.css(object_element, {\n width: '0',\n height: '0'\n });\n document.body.appendChild(object_element);\n }\n // mark as started\n this.started = true;\n },\n\n // destroys the plugin\n destroy: function(inputId) {\n var i;\n // destroy one input or all the plugin if no input id\n if (typeof inputId === 'string') {\n this.off(this.inputs[inputId]);\n } else {\n // remove helper object\n document.body.removeChild(document.getElementById('colorHelperObj'));\n // remove input events and styles\n for (i in this.inputs) {\n this.off(this.inputs[i]);\n }\n // mark not started\n this.started = false;\n }\n },\n\n off: function(input) {\n input.onfocus = null;\n this.css(input, {\n backgroundColor: '',\n borderWidth: '',\n width: '',\n cursor: ''\n });\n },\n\n // input focus function\n onFocus: function(inputId) {\n this.input = this.inputs[inputId];\n this.color = this.getColor();\n this.input.value = this.color;\n nativeColorPicker.css(this.input, {\n backgroundColor: this.color,\n color: this.color\n });\n this.input.blur();\n },\n\n // gets the color from the object\n // and normalize it\n getColor: function() {\n // get decimal color, (passing the previous one)\n // and change to hex\n let colorHelperObj = document.getElementById('colorHelperObj');\n var hex = colorHelperObj.ChooseColorDlg(this.color.replace(/#/, '')).toString(16);\n\n // add extra zeroes if hex number is less than 6 digits\n if (hex.length < 6) {\n var tmpstr = '000000'.substring(0, 6 - hex.length);\n hex = tmpstr.concat(hex);\n }\n\n return '#' + hex;\n },\n\n // set css properties\n css: function(el, props) {\n for (var prop in props) {\n el.style[prop] = props[prop];\n }\n }\n };\n\n // expose to global\n window.nativeColorPicker = nativeColorPicker;\n };\n}\n","/**\n * @module M/plugin/StyleManager\n */\nimport 'css/stylemanager.css';\nimport 'css/font-awesome.min.css';\nimport StyleManagerControl from './stylemanagerControl.js';\nimport {\n ColorPickerPolyfill\n}\n from './utils/colorpicker';\nimport 'templates/categorystyles.html';\n\nexport default class StyleManager extends M.Plugin {\n\n /**\n * @classdesc\n * Main facade plugin object. This class creates a plugin\n * object which has an implementation Object\n *\n * @constructor\n * @extends {M.Plugin}\n * @param {Object} impl implementation object\n * @api stable\n */\n constructor(layer = null) {\n\n super();\n /**\n * Facade of the map\n * @private\n * @type {M.Map}\n */\n this.map_ = null;\n\n /**\n * Array of controls\n * @private\n * @type {Array}\n */\n this.controls_ = [];\n\n /**\n * @private\n * @type {M.ui.Panel}\n */\n this.panel_ = null;\n\n /**\n * @private\n * @type {M.layer.Vector}\n */\n this.layer_ = layer;\n\n ColorPickerPolyfill.apply(window);\n\n\n //helpers handlebars\n Handlebars.registerHelper('sum', function (n1, n2) {\n return n1 + n2;\n });\n\n Handlebars.registerHelper('neq', function (arg1, arg2, options) {\n if (!Object.equals(arg1, arg2)) {\n return options.fn(this);\n }\n return options.inverse(this);\n });\n\n Handlebars.registerHelper('unless', function (arg1, options) {\n if (!arg1) {\n return options.fn(this);\n }\n return options.inverse(this);\n });\n\n Handlebars.registerHelper('get', function (index, array) {\n return array[index];\n });\n\n Handlebars.registerHelper('uppercase', function (string) {\n return string.toUpperCase();\n });\n\n Handlebars.registerHelper('lowercase', function (string) {\n return string.toLowerCase();\n });\n\n M.utils.extends = M.utils.extendsObj;\n }\n\n /**\n * This function adds this plugin into the map\n *\n * @public\n * @function\n * @param {M.Map} map the map to add the plugin\n * @api stable\n */\n addTo(map) {\n this.controls_.push(new StyleManagerControl(this.layer_));\n this.map_ = map;\n this.panel_ = new M.ui.Panel(StyleManager.NAME, {\n 'collapsible': true,\n 'className': 'm-stylemanager',\n 'collapsedButtonClass': 'g-sigc-palette',\n 'position': M.ui.position.TL,\n 'tooltip': 'Simbología',\n });\n this.panel_.addControls(this.controls_);\n map.addPanels(this.panel_);\n }\n\n /**\n * TODO\n */\n destroy() {\n this.map_.removeControls(this.controls_);\n [this.control_, this.panel_, this.map_] = [null, null, null];\n }\n\n get name() {\n return \"stylemanager\";\n }\n}\n","import M$plugin$StyleManager from './/facade/js/stylemanager';\n\nif (!window.M.plugin) window.M.plugin = {};\nwindow.M.plugin.StyleManager = M$plugin$StyleManager;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 973c7c3..6974a79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "StyleManager", - "version": "2.0.3", + "version": "2.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 73626aa..6117758 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "StyleManager", - "version": "2.0.5", + "version": "3.0.0", "description": "", "keywords": [ "map", diff --git a/src/api.json b/src/api.json index 45334b5..e53fb6d 100644 --- a/src/api.json +++ b/src/api.json @@ -22,8 +22,8 @@ "name": "stylemanager", "description": "Gestión del estilo de la simbología de las capas vectoriales del mapa", "text": "Plugin de Mapea para la gestión de la simbología de las capas vectoriales del mapa.", - "version": "2.0.5", - "date": "Marzo, 2021", + "version": "3.0.0", + "date": "Junio, 2020", "author": "", "org": "Consejería de Hacienda, Industria y Energía. Junta de Andalucía", "tags": "mapea,plugin", diff --git a/src/facade/assets/fonts/sigc.eot b/src/facade/assets/fonts/sigc.eot deleted file mode 100644 index 0721f2c7093a47251f66d7bed5a64af40e5a13a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4068 zcmahMZEPIHb!KNjZtr&Qc5grLe7@Ve^X=I_f86(-V-rUXgajOthQtXJ(%8nBfMXjc zv<_5(wh^VMf}{%2R!Bvy)b>wX+WsjtQKL#wXc4qj1yxZi@u3QY)FKK6srcMCyJvDi zK<92|-h11Au`#nZr)0DSNK^wDML6~Jj9m|r-4^W*vQf7FoSzZu%xw{#Oq|(%Udz zzXb@wljM&G$-RL0+;ZgDY8l}l13n4(*uv86bXZq!0Q^3{og>q$%b@rz?k0?k1K&#)C77E%*ntHBj?TF`r7(BodhuQV7&gC z#lpPKbuq%g73rYCfoP0)EEoCyAMFbCG&#%s7OaJG88?sJYNKAZL=26o3pk9k43=%N zwW4WSJ&LFCA*}{rYelrBr^O(CAX=yBV?d`2t(73P7eU7QyX0@=6zn&Rz>iu+2xEaa zbSsH1vr=ws#*KQdnjgY>H_N5fw3_R}uNQJ|Q&Cl=>E;RrH#ed{8OgZ?Jc}Q0-P(Hf zl~?h@bkyxHxWEYo;6guz)llm&e&lX^Z|hEwk5P2}J@Pg=jljRTtXhRNGQ6RFA_N1v zSxJ{cA2&;0NbB;+uy)dKwJ^Zxu%?B{qq45c4cteO*2_$ZqH8aZ5!!$FJ1tD#+Cd$hW`>0tA!_yH~Mlr49J0I9Ww*@sWGzKTz*{k!!g#s>Hia(eB4Y~UGu z?m+8&>sL?U9jyx&5aN-v{w(=`JPx*8K&$A7=$GgT*y3kdR0F?(H-~VeR?$tcd8J$j zlfwpqR=~ARG@IeUH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cSs5fra@I78 z@p#cNvw(Ks6ZaB^A=iNvmLn!Z2m>NL`5X(n&~t&&q4oceACL#oRq!QLt&d_jm7n+> z2xg^8h+ai*mD&v~+wGZ;`U57>Gz6#FyY^~_Bymxc4Sjp5SZ@@I+YKn&i^WFBlHgL6 zxeGjhfs=V&kgU-D$;sQ(P;Q@`+&|^P_}g&Lh@JC1SZA241V}c7eTa|p53#VJkgyeF zC%rN`IW@KO;xgWMH+*NuX776c3z4z+P>7|wMKAq#-~Nkz`^$|!mONv?2+Z-`3h<#w z3;DoX$%ETX#2@i7It}nEpc+u4Q0q`7s0paqHoOgb5$YjtRuJiM#;-#6qi4|D_+94j z?!HLCK&jdy`oJgKp$+wEWp>dVGdq^ zQXA%hKGKGRkPmK#EQVQ#L9m7QmI0V%ipe&e0KL?PS%43=VGiCVRvYGlepwq1qAI%Q z=;8U_+n?c8+-2qSQCA1SN<%OIGJNV4< EKay%zegFUf diff --git a/src/facade/assets/fonts/sigc.svg b/src/facade/assets/fonts/sigc.svg deleted file mode 100644 index 3eedf93..0000000 --- a/src/facade/assets/fonts/sigc.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/facade/assets/fonts/sigc.ttf b/src/facade/assets/fonts/sigc.ttf deleted file mode 100644 index fba7e50a791a70eb12c2ee7bdd11b7e256569dcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3916 zcmahMZEPIHb!KNjZtr&Qc5grLe7@Ve^X=I_`+VPbj!hgn5E5`m8WJZ^NMjr01RUEq zp>=2#phc9T3P=^8t&oaZsqLS(wEa_PqDGaV&?0E53aX-30;&px)FKKkQt`QOcF*Km z0iC;}1Uc;Ic65H`CRP4>A41aGFy1%{1mP+2TZH6(!26CKKe<*x z`1^oQ0Y1LCJU0{8)f)i64{+!B%-RYv(Rsju2RTbK$LDAJe*XsG&w`HGmE{vB!A>ZV zAv%r-`2&6kaR@QrV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KHZ4A`!o>H|0z^=~RB3?F>rm%bIR8V!vgj2p{FlMm*6c zfQ>|ztx_nYTCB+FZglvXJ%)3)u5oZObZymx53 z#Vo{ncy7p!^>BRQkX})!ja6v%_AN?9*Lg*$YS7aA^wJ$L04L>>vwu$K;ULs&4M^q& zOz4w+B>rOyoA4*yi#XXrJPEp9{Pz9PF^QxOtTb= zmrOGw%aSB}cs%CgvMdjLnc)fHnd=!SmJhe){obN9oVk3GOOIKZP{>F*mFik1V^!{C zRas6)@0-o};>MebgTy zMAHzQX7AdoACbf*Q8x6Q@1aUP}ZR1EMdpc+u4 zP#aJss0paq4!i?;5$X|7Du{GA<5!{k(X;4n{4Von@(z1BdzRbFo%6Is(9a=WY1y>O zLpn_u{jg&b_KftuCK!0lUeTcwpbvLo7U1hUFb7|NQU~UNKH7nUkPmK#EQVQ#LD&oL zTLxg7DW*Df0`zhRW&u9jfjRg#u{tmh^vgPM5Y^CKCyp)5p%dsBT0nEt^Q$M0EiXCc zVhK&7d9>;cETbjlz{EvV>SpeS_suWdzBsdr_JPm>x*cBGGYF=-H1m$-rIXIW{L=jD z%*pwioY_;(uDRvi%gakev;$EECqcymNH2M6X8@l^Hvw%Hoq~23ngg!gP$@6uL|DNm Gmj3|BG)O4` diff --git a/src/facade/assets/fonts/sigc.woff b/src/facade/assets/fonts/sigc.woff deleted file mode 100644 index 98b909d497dc94f0fec53eb620e62f9800e6ad86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3992 zcmai1eQX@X6`$GJkK5bbyWQK*JD>0N?tFW(&pzMxof8vB4wwWSl7_?y6w=tnI045t zPACbjLO&2~Q3a$5AFYszTB+?nZE5>Yp@|w*g_agUOIuJCwGvQOAfy&iXpxG~eY1Ne zZUuDi-pud4`FJz)=DnG{WB0@a!U$6I5hVHLWWZDW-)Z-?!&QWE2&9K8MPs};du)0c zWJiGCN6DUg;mrK>aVk3pJZ(!!onJV0Gsu39kaUvL<9}W0KQcFc6GF-;)Hf+<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pF=l+YzCczd?%WPR=a>`TZoCUf{#r90d)IJssI20 diff --git a/src/facade/js/binding/clusterbinding.js b/src/facade/js/binding/clusterbinding.js index e723c0d..006f293 100644 --- a/src/facade/js/binding/clusterbinding.js +++ b/src/facade/js/binding/clusterbinding.js @@ -38,6 +38,7 @@ export class ClusterBinding extends Binding { this.querySelectorAllForEach("[data-style-options]", element => { let prop = element.dataset["styleOptions"]; let value = element.value; + if (element.type === "checkbox") { value = element.checked; } @@ -225,6 +226,7 @@ export class ClusterBinding extends Binding { ranges.forEach((element, index) => { options["pages"].push(element); }); + return options; } } diff --git a/src/facade/js/binding/heatmapbinding.js b/src/facade/js/binding/heatmapbinding.js index 3da8e95..ed1b6f3 100644 --- a/src/facade/js/binding/heatmapbinding.js +++ b/src/facade/js/binding/heatmapbinding.js @@ -3,6 +3,9 @@ import { } from './binding'; +import * as htmlgradient from '../../../templates/gradientheatmap' +import * as chroma from 'chroma-js'; + export class HeatmapBinding extends Binding { constructor(html, htmlParent, styleType, styleParams, layer) { super(html, htmlParent, styleType, styleParams, layer); @@ -49,18 +52,17 @@ export class HeatmapBinding extends Binding { addGradientListener() { let parent = this.querySelector("[data-parent='gradient']"); this.querySelector("[data-add]").addEventListener('click', () => { - this.compileTemplate("gradientheatmap.html", {}).then((html) => { + this.compileTemplate(htmlgradient, {}).then((htmlgradient) => { if (this.numberAddedColors_ < HeatmapBinding.MAX_NUMBER_COLORS) { - parent.appendChild(html); - this.setRandomColor(html); - html.querySelector('.m-close').addEventListener('click', () => { - let rootElement = html.parentElement; - rootElement.removeChild(html); + parent.appendChild(htmlgradient); + this.setRandomColor(htmlgradient); + htmlgradient.querySelector('.m-close').addEventListener('click', () => { + let rootElement = htmlgradient.parentElement; + rootElement.removeChild(htmlgradient); this.numberAddedColors_--; }); this.numberAddedColors_++; - } - else { + } else { M.dialog.info("Ha llegado al número máximo de colores permitidos", "Información"); } }); diff --git a/src/facade/js/binding/simplebinding.js b/src/facade/js/binding/simplebinding.js index fc21257..55beebd 100644 --- a/src/facade/js/binding/simplebinding.js +++ b/src/facade/js/binding/simplebinding.js @@ -50,13 +50,7 @@ export class SimpleBinding extends Binding { * @function */ refreshTemplate() { - let geometry = this.getGeometry(); - let hiddenGeometries = SimpleBinding.GEOMETRIES.filter(section => section !== geometry); - - hiddenGeometries.forEach(geometry => { - this.querySelectorAllForEach(`[data-geometry="${geometry}"]`, node => node.classList.add('m-hidden')); - }); - this.querySelectorAllForEach(`[data-geometry="${geometry}"]`, node => node.classList.remove('m-hidden')); + this.querySelectorAllForEach(`[data-geometry]`, node => node.classList.remove('m-hidden')); this.refreshOptionsButtons(); this.addLabelPathListener(); } @@ -68,10 +62,6 @@ export class SimpleBinding extends Binding { refreshOptionsButtons() { let options = SimpleBinding.OPTIONS_POINT_SUBMENU; - if (this.getGeometry() !== "point") { - options = SimpleBinding.OPTIONS_SUBMENU; - } - this.addOptionsButtons(options, () => { this.compatibleSectionListener("icon", "form"); this.compatibleSectionListener("form", "icon"); @@ -176,8 +166,7 @@ export class SimpleBinding extends Binding { */ eventOpenIconSelector(ev) { let iconDialog = document.querySelector(".style-grid-container"); - if (iconDialog.classList.toString() === 'style-grid-container active') { iconDialog.classList.remove('active'); } - else { iconDialog.classList.add('active'); } + if (iconDialog.classList.toString() === 'style-grid-container active') { iconDialog.classList.remove('active'); } else { iconDialog.classList.add('active'); } } /** @@ -364,7 +353,6 @@ export class SimpleBinding extends Binding { } }); - let fontSize = this.querySelector("[data-font-size]").value || 12; let fontFamily = this.querySelector("[data-font-family]").value; let font = `${fontSize}px ${fontFamily}`; @@ -372,7 +360,7 @@ export class SimpleBinding extends Binding { let icon = document.querySelector("[data-apply='icon']"); let iconOpts = icon !== null && icon.checked === true ? styleOpts["options"].src : styleOpts["options"].form; - + let labelOpt; if (styleOpts["options"]["label"] != null && styleOpts["options"]["label"]["text"] != null) { labelOpt = styleOpts["options"]["label"]; @@ -386,26 +374,28 @@ export class SimpleBinding extends Binding { radius: styleOpts["options"].radius }; - if (this.getGeometry() === "line") { - styleOpts["options"] = { - fill: styleOpts["options"].fill, - stroke: styleOpts["options"].stroke, - label: styleOpts["options"].label - }; - - delete styleOpts["options"]["fill"]["pattern"]; - if (Object.keys(styleOpts["options"]["fill"]).length === 0) { - delete styleOpts["options"]["fill"]; - } - } - - if (this.getGeometry() === "polygon") { - styleOpts["options"] = { - fill: styleOpts["options"].fill, - stroke: styleOpts["options"].stroke, - label: styleOpts["options"].label - }; - } + // if (this.getGeometry() === "line") { + // styleOpts["options"] = { + // fill: styleOpts["options"].fill, + // stroke: styleOpts["options"].stroke, + // label: styleOpts["options"].label + // }; + + + //MIRARLO + // delete styleOpts["options"]["fill"]["pattern"]; + // if (Object.keys(styleOpts["options"]["fill"]).length === 0) { + // delete styleOpts["options"]["fill"]; + // } + // } + + // if (this.getGeometry() === "polygon") { + // styleOpts["options"] = { + // fill: styleOpts["options"].fill, + // stroke: styleOpts["options"].stroke, + // label: styleOpts["options"].label + // }; + // } if (styleOpts["options"]["label"] != undefined) { styleOpts["options"]["label"]["font"] = font; @@ -429,6 +419,28 @@ export class SimpleBinding extends Binding { styleOptsClone["options"]["stroke"] = checkedStroke === true ? styleOptsClone["options"]["stroke"] : undefined; styleOptsClone["options"]["label"] = checkedLabel === true ? styleOptsClone["options"]["label"] : undefined; styleOptsClone["options"]["icon"] = checkedIcon === true || checkedForm === true ? styleOptsClone["options"]["icon"] : undefined; + + styleOptsClone["point"] = { + fill: styleOptsClone["options"].fill, + radius: styleOptsClone["options"].radius, + stroke: styleOptsClone["options"].stroke, + label: styleOptsClone["options"].label, + icon: styleOptsClone["options"].icon + } + + styleOptsClone["line"] = { + fill: styleOptsClone["options"].fill, + stroke: styleOptsClone["options"].stroke, + label: styleOptsClone["options"].label + } + + styleOptsClone["polygon"] = { + fill: styleOptsClone["options"].fill, + stroke: styleOptsClone["options"].stroke, + label: styleOptsClone["options"].label + } + delete styleOptsClone["options"]; + return styleOptsClone; } @@ -457,25 +469,26 @@ export class SimpleBinding extends Binding { }); let style; - let geometry = this.getGeometry(); - let styleOptions = this.generateOptions().options; + //let geometry = this.getGeometry(); + let styleOptions = this.generateOptions(); + // switch (geometry) { + // case "point": + // style = new M.style.Generic(styleOptions); + // break; + // case "line": + // style = new M.style.Line(styleOptions); + // break; + // case "polygon": + // style = new M.style.Polygon(styleOptions); + // break; - switch (geometry) { - case "point": - style = new M.style.Point(styleOptions); - break; - case "line": - style = new M.style.Line(styleOptions); - break; - case "polygon": - style = new M.style.Polygon(styleOptions); - break; + // default: + // M.dialog.error("Geometría no soportada", "Error"); - default: - M.dialog.error("Geometría no soportada", "Error"); + // } - } + style = new M.style.Generic(styleOptions); return style; } @@ -563,7 +576,7 @@ export class SimpleBinding extends Binding { options["linecaplabelstroke"] = SimpleBinding.arrayDataToTemplate(options["label"]["stroke"]["linecap"], ["butt", "square", "round"], ["Extremo", "Cuadrado", "Redondeado"]); options["linejoinlabelstroke"] = SimpleBinding.arrayDataToTemplate(options["label"]["stroke"]["linejoin"], ["bevel", "miter", "round"], ["Bisel", "Inglete", "Redondeado"]); options["alignlist"] = SimpleBinding.arrayDataToTemplate(options["label"]["align"], alignValues, ["Centro", "Justificado", "Izquierda", "Derecha"]); - options["baselinelist"] = SimpleBinding.arrayDataToTemplate(options["label"]["baseline"], baselineValues, ["Alfabetico", "Abajo", "Colgando", "Ideografico", "Arriba", "Centro",]); + options["baselinelist"] = SimpleBinding.arrayDataToTemplate(options["label"]["baseline"], baselineValues, ["Alfabetico", "Abajo", "Colgando", "Ideografico", "Arriba", "Centro", ]); options["formlist"] = SimpleBinding.arrayDataToTemplate(options["icon"]["form"], formValues, formValues); if (this.layer_ != null) { let labelTextValues = Object.keys(this.getFeaturesAttributes()); diff --git a/src/facade/js/bindingcontroller.js b/src/facade/js/bindingcontroller.js index c558a11..e83d6ef 100644 --- a/src/facade/js/bindingcontroller.js +++ b/src/facade/js/bindingcontroller.js @@ -199,23 +199,41 @@ export default class BindingController { this.addSelectListener(); } this.layer_ = layer; - let geometry = layer.getFeatures()[0].getGeometry().type; - switch (geometry) { + + // for (let feature of layer.getFeatures()) { + let type; + + // // Establece correspondencia entre tipo de feature y tipo de geometria + switch (layer.getFeatures()[0].getGeometry().type) { case "Point": case "MultiPoint": - this.setGeometry('point'); + type = 'point'; break; case "LineString": case "MultiLineString": - this.setGeometry('line'); + type = 'line'; break; case "Polygon": case "MultiPolygon": - this.setGeometry('polygon'); + type = 'polygon'; break; default: M.dialog.error('Geometria no soportada', 'Error'); } + + // // Establece la geometria + // this.setGeometry(type); + + // // Entro si tengo una lista de puntos o que contiene puntos + // if (type == "point") { + // break; + // } + + this.setGeometry(type); + + // } + + //this.setGeometry("generic"); } /** diff --git a/src/facade/js/stylemanager.js b/src/facade/js/stylemanager.js index 3f5c9ae..9385459 100644 --- a/src/facade/js/stylemanager.js +++ b/src/facade/js/stylemanager.js @@ -9,7 +9,6 @@ import { } from './utils/colorpicker'; import 'templates/categorystyles.html'; -import api from '../../api.json'; export default class StyleManager extends M.Plugin { @@ -40,13 +39,6 @@ export default class StyleManager extends M.Plugin { */ this.controls_ = []; - /** - * Metadata from api.json - * @private - * @type {Object} - */ - this.metadata_ = api.metadata; - /** * @private * @type {M.ui.Panel} @@ -111,7 +103,8 @@ export default class StyleManager extends M.Plugin { 'collapsible': true, 'className': 'm-stylemanager', 'collapsedButtonClass': 'g-sigc-palette', - 'position': M.ui.position.TL + 'position': M.ui.position.TL, + 'tooltip': 'Simbología', }); this.panel_.addControls(this.controls_); map.addPanels(this.panel_); @@ -128,15 +121,4 @@ export default class StyleManager extends M.Plugin { get name() { return "stylemanager"; } - - /** - * This function gets metadata plugin - * - * @public - * @function - * @api stable - */ - getMetadata(){ - return this.metadata_; - } } diff --git a/src/facade/js/stylemanagerControl.js b/src/facade/js/stylemanagerControl.js index a568e36..9482f41 100644 --- a/src/facade/js/stylemanagerControl.js +++ b/src/facade/js/stylemanagerControl.js @@ -34,7 +34,10 @@ export default class StyleManagerControl extends M.Control { */ createView(map) { this.facadeMap_ = map; - let layers = map.getWFS().concat(map.getKML().concat(map.getLayers().filter(layer => layer.type === "GeoJSON"))); + const layers = map.getWFS().concat(map.getKML().concat(map.getLayers().filter(layer => layer.type === "GeoJSON"))).filter((layer) => { + return layer.name !== 'selectLayer'; + }); + return new Promise((success, fail) => { const html = M.template.compileSync(stylemanager, { 'jsonp': true, @@ -117,7 +120,7 @@ export default class StyleManagerControl extends M.Control { buttonClear.addEventListener('click', this.clearStyle.bind(this)); } - /** + /** * @public * @function * @param {HTMLElement} html to add the plugin @@ -138,7 +141,7 @@ export default class StyleManagerControl extends M.Control { subscribeAddedLayer(htmlSelect) { this.facadeMap_.on(M.evt.ADDED_LAYER, (layers) => { if (Array.isArray(layers)) { - layers.filter(layer => layer instanceof M.layer.Vector).forEach(layer => this.addLayerOption(htmlSelect, layer.name)); + layers.filter(layer => (layer instanceof M.layer.Vector && layer.name !== 'selectLayer')).forEach(layer => this.addLayerOption(htmlSelect, layer.name)); } else if (layers instanceof M.layer.Vector) { const _layer = { ...layers }; this.addLayerOption(htmlSelect, _layer); @@ -210,8 +213,10 @@ export default class StyleManagerControl extends M.Control { * @api stable */ getLayerByName(layerName) { - let layers = this.facadeMap_.getWFS() - .concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(layer => layer.type === "GeoJSON"))); + let layers = this.facadeMap_.getWFS().concat(this.facadeMap_.getKML().concat(this.facadeMap_.getLayers().filter(layer => layer.type === "GeoJSON"))).filter((layer) => { + return layer.name !== 'selectLayer'; + }); + return layers.find(layer => layer.name === layerName); } @@ -233,7 +238,7 @@ export default class StyleManagerControl extends M.Control { */ applyStyle() { if (this.layer_ instanceof M.layer.Vector) { - this.layer_.setStyle(null); + this.layer_.clearStyle(); let style = this.bindinController_.getStyle(); this.layer_.setStyle(style); } else { @@ -249,7 +254,7 @@ export default class StyleManagerControl extends M.Control { */ clearStyle() { if (this.layer_ instanceof M.layer.Vector) { - this.layer_.clearStyle(); + this.layer_.setStyle(M.layer.Vector.DEFAULT_OPTIONS_STYLE); } else { M.dialog.info("Tiene que elegir una capa.", "Elija capa"); } diff --git a/src/templates/stylesimple.html b/src/templates/stylesimple.html index 8f3b305..83320d2 100644 --- a/src/templates/stylesimple.html +++ b/src/templates/stylesimple.html @@ -1,7 +1,7 @@
-
Opciones
+
Opciones generales
@@ -16,6 +16,8 @@
+
Opciones de punto
+
Radio: @@ -23,6 +25,8 @@
+
Opciones de línea
+
Ancho: @@ -30,7 +34,7 @@
-
Opciones de patrón
+
Opciones de patrón de polígono
diff --git a/test/dev.html b/test/dev.html index 8a6e076..89c870c 100644 --- a/test/dev.html +++ b/test/dev.html @@ -7,7 +7,7 @@ StyleManager TEST - +