canvasxpress
Version:
Program to run canvasXpress with node
299 lines • 3.47 MB
JavaScript
/**
*
* CanvasXpress 58.1 - JavaScript Canvas Library
*
* Copyright (c) 2009-2025 - license@canvasxpress.org
*
* Redistributions of the source code must retain this copyright
* notice and the following disclaimer.
*
* CanvasXpress is released as open source for personal and
* educational use with dual licensing for commercial purposes.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Please see a copy of the CanvasXpress License at
* https://www.canvasxpress.org/docs/license.html.
*
* Dual licensing:
* Commercial use may be granted to the extent that this source
* code does NOT become part of any other Open Source or
* Commercially licensed development library or toolkit without
* explicit permission from CanvasXpress.
*
*/
/**
*
* sprintf() for JavaScript v.0.4
*
* Copyright (c) 2007 Alexandru Marasteanu <http://alexei.417.ro/>
* Thanks to David Baird (unit test and patch).
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
*
***
*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
*
****
*
* jLouvain.js
* Author: Corneliu S. (github.com/upphiminn)
* This is a javascript implementation of the Louvain
* community detection algorithm (http://arxiv.org/abs/0803.0476)
* Based on https://bitbucket.org/taynaud/python-louvain/overview
*
****
*
* science.js
* Copyright (c) 2011, Jason Davies
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 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.
*
* The name Jason Davies 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 JASON DAVIES 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.
*
****
*
* Apache-Style Software License for ColorBrewer software and ColorBrewer Color
* Schemes
*
* 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions as source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes color
* specifications and designs developed by Cynthia Brewer
* (http://colorbrewer.org/)." Alternately, this acknowledgment may appear in the
* software itself, if and wherever such third-party acknowledgments normally
* appear.
*
* 4. The name "ColorBrewer" must not be used to endorse or promote products
* derived from this software without prior written permission. For written
* permission, please contact Cynthia Brewer at cbrewer@psu.edu.
*
* 5. Products derived from this software may not be called "ColorBrewer", nor
* may "ColorBrewer" appear in their name, without prior written permission of
* Cynthia Brewer.
*
****
*
* FileSaver.js
* Copyright © 2015 [Eli Grey][1].
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
****
*
* canvas-toBlob.js
* Copyright © 2011 Eli Grey and Devin Samarin.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
****
*
* Blob.js
* Copyright © 2014 Eli Grey.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
****
*
* jstat.js
* Copyright (c) 2013 jStat
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
****
*
* numeric.js
* Numeric Javascript
* Copyright (C) 2011 by Sébastien Loisel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
****
*
* Sankey.js
* Copyright (c) 2012, Michael Bostock
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * 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.
*
* * The name Michael Bostock 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 MICHAEL BOSTOCK 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.
*
****
*
* canvas2svg
* The MIT License (MIT)
*
* Copyright (c) 2014 Gliffy Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
(function(b,a){if(typeof exports==="object"){a(exports)}else{(a((b.CanvasXpress=b.CanvasXpress||{})))}}(this,(function(){CanvasXpress=typeof CanvasXpress!="undefined"&&CanvasXpress.ready?CanvasXpress:function(n,h,e,s,d,p,r,l){var k=this;var q=function(){k.init(n,h,e,s,d,p,r,l)};var c=function(i){if(i){k.init(i);if(r){r(i)}}else{k.init(n,h,e,s,d,p,r,l)}};var j=document.styleSheets;var b=false;for(var g=0;g<j.length;g++){if(j[g].href&&j[g].href.indexOf("canvasXpress.css")>-1){b=true;break}}if(e&&typeof e=="string"){e={prompt:e,llmBehaviour:"update",view:"table"}}else{if(n&&n.config&&n.config.prompt&&n.config.isR){n.config.llmBehaviour="update";n.config.view="table"}}if(!b){var o=document.createElement("link");o.rel="stylesheet";o.type="text/css";o.href="https://www.canvasxpress.org/dist/canvasXpress.css";document.getElementsByTagName("head")[0].appendChild(o);o.onload=function(){b=true;new CanvasXpress(n,h,e,s,d,p,r,l)}}else{if((e&&e.fonts)||(n&&n.config&&n.config.fonts)){if(e&&e.fonts){CanvasXpress.loadFonts(e.fonts,q)}else{CanvasXpress.loadFonts(n.config.fonts,q)}}else{if((e&&e.fontsExternal)||(n&&n.config&&n.config.fontsExternal)){if(e&&e.fontsExternal){CanvasXpress.loadFontsExternal(e.fontsExternal,q)}else{CanvasXpress.loadFontsExternal(n.config.fontsExternal,q)}}else{if((e&&e.topoJSON&&typeof e.topoJSON=="string")||(n&&n.config&&n.config.topoJSON&&typeof n.config.topoJSON=="string")||(e&&e.useLeaflet)||(n&&n.config&&n.config.useLeaflet)){if((e&&e.useLeaflet)||(n&&n.config&&n.config.useLeaflet)){var a=function(){if(e&&e.topoJSON){CanvasXpress.loadTopoJSON(e.topoJSON,e.mapId,q)}else{if(n&&n.config&&n.config.topoJSON){CanvasXpress.loadTopoJSON(n.config.topoJSON,n.config.mapId,q)}else{q()}}};CanvasXpress.loadLeaflet(a,k)}else{if(e&&e.topoJSON){CanvasXpress.loadTopoJSON(e.topoJSON,e.mapId,q)}else{CanvasXpress.loadTopoJSON(n.config.topoJSON,n.config.mapId,q)}}}else{if((h&&typeof h=="string")||(n&&n.data&&typeof n.data=="string")){if(h){CanvasXpress.loadRemoteData(n,h,e,s,c)}else{CanvasXpress.loadRemoteData(n.renderTo,n.data,n.config,n.events,c)}}else{if(e&&e.graphType&&e.graphType=="Map"&&e.mapId&&!e.topoJSON){if(CanvasXpress.maps.hasOwnProperty(e.mapId)){e.topoJSON="https://www.canvasxpress.org"+CanvasXpress.maps[e.mapId]}else{if(CanvasXpress.usa.hasOwnProperty(e.mapId)){e.topoJSON="https://www.canvasxpress.org/data/maps/"+e.mapId+".json"}else{if(CanvasXpress.countries.hasOwnProperty(e.mapId)){e.topoJSON="https://www.canvasxpress.org/data/maps/"+e.mapId+".json"}else{var f=e.mapId.toLowerCase();if(!e.topoJSON){for(var g in CanvasXpress.usa){if(CanvasXpress.usa[g][0].toLowerCase()==f){e.mapId=g;e.topoJSON="https://www.canvasxpress.org/data/maps/"+g+".json";break}}}if(!e.topoJSON){for(var g in CanvasXpress.countries){if(CanvasXpress.countries[g][0].toLowerCase()==f){e.mapId=g;e.topoJSON="https://www.canvasxpress.org/data/maps/"+g+".json";break}}}if(!e.topoJSON){e.topoJSON=CanvasXpress.geojson}}}}CanvasXpress.loadTopoJSON(e.topoJSON,e.mapId,q)}else{this.init(n,h,e,s,d,p,r,l)}}}}}}}})));(function(b,a){if(typeof exports==="object"&&typeof module!=="undefined"){a(exports)}else{(a((b.cxplot=b.cxplot||{})))}}(this,(function(){cxplot=function(x,y,k,a){if(typeof(x)=="object"&&x.isGGPlot){var n=function(g){if(Array.isArray(g)&&!g.length){return{}}else{var f={};for(var m in g){if(g[m]&&typeof g[m]==="string"){f[m]=g[m].replace(/^"(.+)"$/,"$1")}else{f[m]=g[m]}}return f}};var l=function(){if(x.order){x.aes.meta={};for(var f in x.order){x.aes.meta[f]=x.order[f]}}if(!x.aes.hasOwnProperty("x")||(x.aes.hasOwnProperty("x")&&x.data[0]&&!x.data[0].includes(x.aes.x))){for(var f=0;f<o.length;f++){var m=o[f];if(x.layers[m]&&x.layers[m].hasOwnProperty("x")&&x.data[0].includes(x.layers[m].x)){x.aes.x=x.layers[m].x;break}}}if(!x.aes.hasOwnProperty("y")||(x.aes.hasOwnProperty("y")&&x.data[0]&&!x.data[0].includes(x.aes.y))){for(var f=0;f<o.length;f++){var m=o[f];if(x.layers[m]&&x.layers[m].hasOwnProperty("y")&&x.data[0].includes(x.layers[m].y)){x.aes.y=x.layers[m].y;break}}}if(x.hasOwnProperty("meta")){x.aes.metaData=x.meta}if(x.hasOwnProperty("scales")&&x.scales.hasOwnProperty("sizes")){if(Array.isArray(x.scales.sizes)){x.aes.sizes=x.scales.sizes}}if(x.hasOwnProperty("isGGMatrix")){x.aes.isGGMatrix=x.isGGMatrix}return x.aes};var w=function(f){if(f&&f.hasOwnProperty("hoverTemplate")){f.hoverTemplate+="<br>"}return f};var j=function(f){if(f&&Array.isArray(f)&&f.length==0&&x.scales&&x.scales.hasOwnProperty("setMinX")&&x.scales.hasOwnProperty("setMaxX")&&x.scales.hasOwnProperty("setMinY")&&x.scales.hasOwnProperty("setMaxY")){f=[["min","max"],[x.scales.setMinX,x.scales.setMaxX],[x.scales.setMinY,x.scales.setMaxY]]}return f};delete (x.isGGPlot);var p=JSON.stringify(x);var o=Array.isArray(x.geoms)?x.geoms:[x.geoms];var d=new cxplot(x.renderTo,j(x.data),aes(l()),a);var e={};d.skipGeoms=false;d.meta.config.user.geoms=o;d.meta.config.user.layers=x.layers;d.meta.config.user.cxplot=p;for(var r=0;r<o.length;r++){var s=o[r];var q=e[s]?s+"."+e[s]:s;var t=s.toLowerCase().replace("geom","geom_").replace("2","_2").replace("filled","_filled").replace("_qql","_qq_l").replace("ridgesgradient","ridges_gradient").replace("ridges","_ridges").replace("repel","_repel").replace("npc","_npc").replace("pattern","_pattern");if(d[t]&&!d.skipGeoms){d[t](n(x.layers[q]))}e[s]=e[s]?e[s]+1:1}d.skipGeoms=false;d.tL(n(x.labels));d.Rc(n(x.scales));d.dc(n(x.coords));d.iX(n(x.theme));d.RN(n(x.facet));d.E8(w(x.config));d.skipRender=false;d.OA();return d}else{if(k){var b=["x","y"];for(var r=0;r<b.length;r++){if(k[b[r]]&&k[b[r]].match(/\*/)){var h=k[b[r]].split("*");h[0]=h[0].replace(/\s*$/,"");h[1]=Number(h[1].replace(/^\s*/,""));k[b[r]]=h[0];if(!isNaN(h[1])){k[b[r]]=h[0];k[b[r]+"AxisFactorValue"]=h[1]}}if(k[b[r]]&&y&&y[0]&&!y[0].includes(k[b[r]])){delete k[b[r]]}}}var v={aes:(k||{}),remoteTransitionEffect:"none",theme:"GGPlot",widthFactor:1.5,shapes:["circle","equilateral","rect","plus","minus","diamond","hexagon","octagon","star","pentagon"],isCxplot:true,isGGMatrix:(k&&k.isGGMatrix?k.isGGMatrix:false),legendStyleGgplot:true,skipRender:(k&&k.isR?true:false)};if(k&&k.hasOwnProperty("sizes")){if(Array.isArray(k.sizes)){v.sizes=k.sizes;while(v.sizes.length<10){var u=(v.sizes[v.sizes.length-1]-v.sizes[v.sizes.length-2])/2;v.sizes.push(Math.ceil(u+v.sizes[v.sizes.length-1]))}if(v.sizes[0]<4){var u=4-v.sizes[0];for(var r=0;r<v.sizes.length;r++){v.sizes[r]+=u}}}}if(k&&k.hasOwnProperty("metaData")){v.metaData=k.metaData}if(k.hasOwnProperty("xAxisFactorValue")){v.xAxisFactorValue=k.xAxisFactorValue}if(k.hasOwnProperty("yAxisFactorValue")){v.yAxisFactorValue=k.yAxisFactorValue}var c=new CanvasXpress(x,y,v,a);c.meta.ggplot.aes=k||{};c.meta.ggplot.data=y[0];c.meta.ggplot.order=k&&k.order?k.order:{};return c}}})));(function(b,a){if(typeof exports==="object"&&typeof module!=="undefined"){a(exports)}else{(a((b.aes=b.aes||{})))}}(this,(function(){aes=function(){var b=arguments;var f={};var e=["x","y","z","fill","color","shape","size","pattern"];var a=function(){if(!f.stringSampleFactors){f.stringSampleFactors=[]}if(!f.stringVariableFactors){f.stringVariableFactors=[]}if(!f.asSampleFactors){f.asSampleFactors=[]}if(!f.asVariableFactors){f.asVariableFactors=[]}};for(var c=0;c<b.length;c++){if(Array.isArray(b[c])&&Array.isArray(b[c][0])){f.data=b[c]}else{if(b[c] instanceof Object){for(var d in b[c]){f[d]=b[c][d];if(d=="factor"){a();f.stringSampleFactors.push(b[c][d]);f.stringVariableFactors.push(b[c][d]);f.asSampleFactors.push(b[c][d]);f.asVariableFactors.push(b[c][d]);if(b.length>1){if(c==0){f.x=b[c][d]}else{if(c==1){f.y=b[c][d]}else{if(c==2){f.z=b[c][d]}}}}}else{if(e.includes(d)){if(b[c][d] instanceof Object&&b[c][d].factor){a();f.stringSampleFactors.push(b[c][d].factor);f.stringVariableFactors.push(b[c][d].factor);f.asSampleFactors.push(b[c][d].factor);f.asVariableFactors.push(b[c][d].factor);f[d]=b[c][d].factor}else{if(b[c][d].toString().match(/^factor\(.+\)/)){f[d]=b[c][d].replace(/^factor\(/,"").replace(/\)$/,"");a();f.stringSampleFactors.push(f[d]);f.stringVariableFactors.push(f[d]);f.asSampleFactors.push(f[d]);f.asVariableFactors.push(f[d])}}}else{if(d=="sample"){f.x=b[c][d]}}}}}else{if(c==0){f.x=b[c]}else{if(c==1){f.y=b[c]}else{if(c==2){f.z=b[c]}}}f[b[c]]=b[c]}}}return f}})));CanvasXpress.onReady=function(){var f=[];var a=false;var d=false;var c=function(){if(!a){var g=CanvasXpress.instances[0];if(g){g.fo("canvasXpress JS ready");a=true;for(var h=0;h<f.length;h++){f[h].fn.call(window,f[h].ctx)}f=[]}}};var b=function(){if(window.document.readyState==="complete"){c()}};var e=function(){c()};window.onReady=function(h,g){if(a){setTimeout(function(){h(g)},1);return}else{f.push({fn:h,ctx:g})}if(window.document.readyState==="complete"){setTimeout(c,1)}else{if(!d){if(window.document.addEventListener){window.document.addEventListener("DOMContentLoaded",c,false);window.addEventListener("load",e,false)}else{window.document.attachEvent("onreadystatechange",b);window.attachEvent("onload",e)}d=true}}};return true}();CanvasXpress.loadLeaflet=function(c,d){var b=document.createElement("script");b.type="text/javascript";b.src="https://www.canvasxpress.org/assets/leaflet/leaflet.js";b.crossOrigin="anonymous";var a=document.createElement("link");a.type="text/css";a.rel="stylesheet";a.href="https://www.canvasxpress.org/assets/leaflet/leaflet.css";a.crossOrigin="anonymous";if(window.L){if(c){if(typeof(c)=="function"){c.call(d)}}}else{CanvasXpress.loadScripts([a,b],c,d)}};CanvasXpress.loadScripts=function(){var i=0;return function(files,callback,scope){var head=window.document.getElementsByTagName("head")[0];var loadScript=function(s,c){var t=s.type;if(t.match(/javascript/i)){s.onreadystatechange=function(){if(s.readyState==="loaded"||s.readyState==="complete"){s.onreadystatechange=null;c()}};s.onload=function(){c()};head.appendChild(s)}else{head.appendChild(s);c()}};var count=function(){if(i===files.length){i=0;if(callback){if(typeof(callback)=="function"){callback.call(scope)}else{if(typeof(callback)=="string"){eval("var fn = "+callback);fn()}}}}else{CanvasXpress.loadScripts(files,callback,scope)}};i++;if(files[i-1]){loadScript(files[i-1],count)}}}();CanvasXpress.transferDatasetAttributes=function(e,a,f){var d=JSON.parse(JSON.stringify(e.dataset));for(var c in d){if(d.hasOwnProperty(c)){if(f){a[c.replace(/^data-/,"")]=d[c]}else{var b="data-"+c.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase();a.setAttribute(b,d[c])}}}};CanvasXpress.initCanvas=function(g){var e=document.querySelectorAll("canvas.CanvasXpress");for(var d=0;d<e.length;d++){var h=e[d];if(h.id){var f=false;var a={};var b=CanvasXpress.getObject(h.id);if(h.hasAttribute("data-src")&&!b){f=h.getAttribute("data-src");CanvasXpress.transferDatasetAttributes(h,a,true);if(Object.keys(a).length){new CanvasXpress(h.id,f,a)}else{new CanvasXpress(h.id,f,false,false,false,false,g)}}}}};CanvasXpress.initImage=function(h){var j=document.querySelectorAll("img.CanvasXpress");for(var f=0;f<j.length;f++){var c=j[f];if(c.id){var d=CanvasXpress.getObject(c.id);var g=c.parentNode;if(!d){var e=c.src;var a=c.id;var b=window.document.createElement("canvas");b.width=c.width;b.height=c.height;CanvasXpress.transferDatasetAttributes(c,b);g.removeChild(c);b.id=a;g.appendChild(b);if(!h){h=function(){window.dispatchEvent(new Event("resize"))}}else{h=(function(i){return function(){i();window.dispatchEvent(new Event("resize"))}})(h)}new CanvasXpress(a,e,false,false,false,false,h)}}}};CanvasXpress.initTable=function(g){var c=document.querySelectorAll("table.CanvasXpress");for(var b=0;b<c.length;b++){var e=c[b];if(e.id){var h=CanvasXpress.getObject(e.id);var d=e.parentNode;if(!h){var f=e.id;var a=window.document.createElement("canvas");a.id="temp-table-id-"+e.id;a.width=e.hasAttribute("data-width")?e.getAttribute("data-width"):500;a.height=e.hasAttribute("data-height")?e.getAttribute("data-height"):500;CanvasXpress.transferDatasetAttributes(e,a);d.appendChild(a);new CanvasXpress("temp-table-id-"+e.id,f,false,false,false,false,g)}}}};CanvasXpress.pivot=function(f){var a=0;var m=1;var k=2;var l={};var h=[];var e=[];for(var g=0;g<f.length;g++){if(!l[f[g][a]]){l[f[g][a]]={}}l[f[g][a]][f[g][m]]=f[g][k];if(e.indexOf(f[g][m])==-1){e.push(f[g][m])}}e.sort();var n=[];n.push("Id");n.push.apply(n,e);h.push(n);for(var g in l){n=[];n.push(g);for(var b=0;b<e.length;b++){n.push(l[g][e[b]]?l[g][e[b]]:null)}h.push(n)}return h};CanvasXpress.getObject=function(f,b){if(f){while(CanvasXpress.chain.hasOwnProperty(f)){f=CanvasXpress.chain[f]}for(var a=0;a<CanvasXpress.instances.length;a++){if(CanvasXpress.instances[a].target==f){return CanvasXpress.instances[a]}}}else{if(b){var d=window.document.getElementById(f);if(!d){var e=window.document.createElement("canvas");e.id=f;e.width=100;e.height=100;window.document.body.appendChild(e);d=new CanvasXpress({renderTo:f})}return d}else{if(CanvasXpress.instances.length){return CanvasXpress.instances[0]}}}};CanvasXpress.json=function(a,c){var b=new XMLHttpRequest();b.open("GET",a,true);b.responseType="json";b.onload=function(){var d=b.status;if(d==200){c(null,b.response)}else{c(d)}};b.send()};CanvasXpress.csv=function(a,c){var b=new XMLHttpRequest();b.open("GET",a,true);b.responseType="text";b.onload=function(){var d=b.status;if(d==200){c(null,b.response)}else{c(d)}};b.send()};CanvasXpress.svg=function(a,d,c){var b=new XMLHttpRequest();b.open("GET",a,true);b.responseType="text";b.onload=function(){var e=b.status;if(e==200){c(b.responseText,d)}else{c(e)}};b.send()};CanvasXpress.$=function(b,a){return CanvasXpress.getObject(b,a)};CanvasXpress.destroy=function(b,a){if(CanvasXpress.instances.length>0){CanvasXpress.instances[0].destroy(b,a)}};CanvasXpress.create=function(c,b,a){CanvasXpress.inject(c);return new CanvasXpress(c,b,a)};CanvasXpress.createObject=function(f,d,b,c,e,h,g,a){if(!f){throw new Error("No target provided")}else{if(typeof(f)=="object"&&f.renderTo){d=f.tracks?{tracks:f.tracks}:f.nodes?{nodes:f.nodes}:f.venn?{venn:f.venn}:f.data?f.data:false;b=f.config||false;if(f.version){b.createVersion=f.version}if(f.factory){b.createFactory=f.factory}c=f.events||false;e=f.info?f.info.replace(/'/g,"'").replace(/"/g,"'"):false;h=f.afterRender||false;g=f.callback||false;a=f.noValidate?f.noValidate:b&&b.noValidate?b.noValidate:false;f=f.renderTo;CanvasXpress.inject(f)}else{if(typeof f==="string"||f instanceof String){CanvasXpress.inject(f)}}}return{target:f,data:d,config:b,events:c,info:e,afterRender:h,callback:g,noValidate:a}};CanvasXpress.inject=function(c){if(typeof c==="string"||c instanceof String){var b=document.getElementById(c);if(b!==null){if(b.tagName.toLowerCase()=="canvas"){if(!b.width){b.width=500}if(!b.height){b.height=500}}else{if(b.tagName.toLowerCase()=="div"){b.id=c+"-div";var a=document.createElement("canvas");a.id=c;a.width=500;a.height=500;b.appendChild(a)}}}else{var a=document.createElement("canvas");a.id=c;a.width=500;a.height=500;document.body.appendChild(a)}}};CanvasXpress.loadFonts=function(d,c){if(d&&d.length&&c){var b=false;for(var a=0;a<d.length;a++){if(!CanvasXpress.fonts.hasOwnProperty(d[a])){b=true;break}}WebFontConfig={google:{families:d},timeout:2000};if(c){WebFontConfig.active=c}(function(h){if(window.navigator.onLine&&b){var e=h.createElement("script");var g=h.scripts[0];e.src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js";e.async=true;g.parentNode.insertBefore(e,g);for(var f=0;f<d.length;f++){CanvasXpress.fonts[d[f]]=true}}else{c()}})(document)}};CanvasXpress.loadFontsExternal=function(c,b){if(c&&c.length&&b){var a=false;if(!CanvasXpress.fonts.hasOwnProperty(c[0].name)){a=true}(function(f){if(window.navigator.onLine&&a){var e=new XMLHttpRequest();e.addEventListener("readystatechange",function(g){if(e.readyState==2&&e.status==200){}else{if(e.readyState==3){}else{if(e.readyState==4){var d=new FontFace(c[0].name,e.response);document.fonts.add(d);CanvasXpress.fonts[c[0].name]=true;b()}}}});e.responseType="arraybuffer";e.open("get",c[0].url);e.send()}else{b()}})(document)}};CanvasXpress.loadTopoJSON=function(a,b,d){if(a&&d){var c=false;if(!b){b="cXMap"}if(!window.hasOwnProperty(b)){c=true}(function(f){if(window.navigator.onLine&&c){var e=new XMLHttpRequest();e.addEventListener("readystatechange",function(g){if(e.readyState==2&&e.status==200){}else{if(e.readyState==3){}else{if(e.readyState==4){window[b]=JSON.parse(e.response);d()}}}});e.open("get",a);e.send()}else{d()}})(document)}};CanvasXpress.loadRemoteData=function(j,c,f,m,l){if(c&&l){var n=CanvasXpress.prototype.initIO.apply(CanvasXpress);var d=function(r,s,e){if(!r.hasOwnProperty(s)){if(!r){r={}}if(!r.hasOwnProperty(s)){r[s]={}}r[s]=JSON.parse(JSON.stringify(e))}else{for(var q in e){r[s][q]=e[q]}}};var h=null;var g=window.document.getElementById(c);var o=n.isValidURL(c.replace(/^file:\/\//,""));var k=c.match(/\.pl$/)||c.match(/\.pl\?/)?true:false;if(g&&g.tagName.toLowerCase()=="table"&&g.classList.contains("CanvasXpress")&&g.id){h=n.HTMLTableToCX(g,f);h.renderTo=j||g.id;h.events=m;g.parentNode.removeChild(g);return l(h)}else{if(o){(function(p){if(window.navigator.onLine){if(!j){j="cX-data-url"}if(o==2&&!c.match(/^file:/)){c="file://"+c}var e=new XMLHttpRequest();e.open("get",c,true);e.onreadystatechange=function(){if(e.readyState==2&&e.status==200){}else{if(e.readyState==3){}else{if(e.readyState==4){if(c.match(/\.json$/)||k){h=n.parseJSON(e.response);if(Array.isArray(h)){var v=h[0][1];var u=[];for(var t=0;t<h.length;t++){u.push(h[t][0])}if(!f){f={}}f.remoteService=c;f.remoteData=h;f.remoteIds=u;CanvasXpress.loadRemoteData(j,v,f,m,l)}else{h.renderTo=j||h.renderTo;h.events=m||h.events;d(h,"config",f);l(h)}}else{if(c.match(/\.parquet$/)){h=n.Ny(e.response,f);h.renderTo=j||h.renderTo;h.events=m||h.events;d(h,"config",f);l(h)}else{if(c.match(/\.png$/)){h=n.PNGtoCX(e.response);h.renderTo=j||h.renderTo;h.events=m||h.events;d(h,"config",f);l(h)}else{if(c.match(/\.txt$/)||c.match(/\.csv$/)||c.match(/\.tsv$/)||c.match(/\.tab$/)){h=n.parseDelimited(e.response);if(f&&f.graphType=="Network"){h=n.arrayToCXNetwork(h,j,f,m)}else{h=n.arrayToCX(h,f,f&&f.isR);h.renderTo=j||h.renderTo;h.events=m||h.events}d(h,"config",f);l(h)}else{if(c.match(/\.svg$/)){h=n.SVGtoCX(e.response);d(h,"config",f);l(h)}else{if(c.match(/ml$/)||c.match(/ml\.bz2$/)||c.match(/\.gexf$/)){var s=c.match(/ml\.bz2$/)?n.parseXML(n.ws(e.response)):n.parseXML(e.response);var r=s.childNodes[0];var q=s.childNodes[2];if(r.tagName&&r.tagName.toLowerCase()=="gexf"){h=n.gexfToCX(s,j,f,m);l(h)}else{if(r.tagName&&r.tagName.toLowerCase()=="map"){h=n.metabaseToCX(s,j,f,m);l(h)}else{if(r.tagName&&r.tagName.toLowerCase()=="graph"){h=n.cytoscapeToCX(s,j,f,m);l(h)}else{if(r.tagName&&r.tagName.toLowerCase()=="pathway"){h=n.wikipathwayToCX(s,j,f,m);l(h)}else{if(q&&q.tagName&&q.tagName.toLowerCase()=="pathway"){n.keggToCX(s,j,f,m,l)}}}}}}else{l()}}}}}}}}}};if(c.match(/\.png$/)||c.match(/\.parquet$/)){e.responseType="arraybuffer"}else{if(c.match(/ml\.bz2$/)){e.responseType="binary"}else{e.responseType="text"}}e.send()}})(document)}else{try{h=JSON.parse(c);return l(h)}catch(i){h=null}var h=n.parseDelimited(c)||null;if(h){if(f&&f.graphType=="Network"){h=n.arrayToCXNetwork(h,j,f,m)}else{h=n.arrayToCX(h,f)}return l(h)}if(window.DOMParser){try{h=(new DOMParser()).parseFromString(c,"text/xml")}catch(i){h=null}}else{if(typeof window.ActiveXObject!="undefined"&&new window.ActiveXObject("Microsoft.XMLDOM")){try{h=new window.ActiveXObject("Microsoft.XMLDOM");h.async="false"}catch(i){h=null}}}if(h!=null&&h.getElementsByTagName("parsererror").length==0){var b=h.childNodes[0];var a=h.childNodes[2]||h.childNodes[1];if(b.tagName&&b.tagName.toLowerCase()=="gexf"){return l(n.gexfToCX(h,j,f,m))}else{if(b.tagName&&b.tagName.toLowerCase()=="map"){return l(n.metabaseToCX(h,j,f,m))}else{if(b.tagName&&b.tagName.toLowerCase()=="graph"){return l(n.cytoscapeToCX(h,j,f,m))}else{if(b.tagName&&b.tagName.toLowerCase()=="pathway"){return l(n.wikipathwayToCX(h,j,f,m))}else{if(a&&a.tagName&&a.tagName.toLowerCase()=="pathway"){return n.keggToCX(h,j,f,m,l)}}}}}}return null}}}};CanvasXpress.callbackPass=function(a){};CanvasXpress.callbackRDataset=function(d){event.stopPropagation();event.preventDefault();var f=d.split("/");var e=f[8];var b=f[9];var g=f[10].split(".")[0];var a=event.target.parentNode.parentNode.id.split("-cX-DataTable")[0];var c=CanvasXpress.getObject(a);if(e=="csv"){c.O5(d);c.Rdataset={library:b,dataset:g,url:c.RdatasetsURL+"json/"+b+"/"+g+"Info.json",info:false}}else{var h=function(k){var j={width:"500px",height:"500px",overflow:"auto",textWrap:"auto",position:"relative",zIndex:1000000,fontSize:"small"};var m="";for(var l in k.parameters){m+="<b>"+l+"</b>: "+k.parameters[l]+"<br><br>"}c.oU({ac:{x:100,y:100}},m,a,j)};c.fh(d,false,h,"json")}return false};CanvasXpress.parametersLLM=["llmServiceURL","llmModel","llmTopp","llmTemperature","llmPresencePenalty","llmFrequencyPenalty","llmMaxNewTokens","llmBehaviour","llmIconTransparency","llmIconSize","llmPrompt","llmUseDev","llmStack","llmHeader","llmUseCopilot","llmCodeExamples","loadLLMDatasets","llmCodeExamples","llmCodeMaxSentences","disableChat"];CanvasXpress.callbackRateLLM=function(b){var c=function(){var d=document.getElementById(b.target+"-cX-ChatInterfaceRateScript");if(d){document.body.removeChild(d)}};if(b&&b.success){var a=CanvasXpress.getObject(b.target);if(a){a.nR(100,100,b.text,3000)}else{alert("CanvasXpress Object: "+b.target+" - not found");c()}}else{alert(b.text)}};CanvasXpress.callbackLLM=function(a){var c=function(n,d){var h=document.createElement("canvas");h.width=n;h.height=d;h.id="cX-LLM-"+Date.now();return h};var l=function(x){var A=document.createElement("div");A.style.width=x+"px";A.style.height="100px";A.style.clear="both";A.style.position="relative";A.style.margin="auto";var n=document.createElement("span");n.innerHTML=a.datetime;n.style.cssFloat="right";var d=document.createElement("span");d.innerHTML=a.prompt;d.style.cssFloat="left";d.style.fontWeight="bold";var z=document.createElement("span");z.innerHTML=a.client;z.style.cssFloat="left";var y=document.createElement("br");var w=document.createElement("br");var h=document.createElement("br");A.appendChild(y);A.appendChild(z);A.appendChild(n);A.appendChild(w);A.appendChild(d);A.appendChild(h);return A};var e=function(h,d){var n=document.createElement("div");if(d){n.className=d}n.appendChild(h);return n};var j=function(y,h){var x=CanvasXpress.graphTypes.OneDGraphs;var w=CanvasXpress.graphTypes.Scatter2Graphs;var d=y.config.graphType;var A=h.data.y&&h.data.y.smps&&h.data.y.smps.length?h.data.y.smps:[];var z=h.data.y&&h.data.y.vars&&h.data.y.vars.length?h.data.y.vars:[];var n=y.config.xAxis&&y.config.xAxis.length?y.config.xAxis[0]:"foo";if(x.includes(d)&&A.includes(n)){h.Ho(false,true)}else{if(w.includes(d)&&z.includes(n)){h.Ho(false,true)}}};var k=function(x,h){var y=CanvasXpress.parametersLLM;h.CZ();var n=h.meta.config.user;var d={graphOrientation:true,graphType:true,isR:true,prompt:true};for(var w=0;w<y.length;w++){x.config[y[w]]=h[y[w]]}return;for(var w in n){if(!d[w]||x.config.hasOwnProperty(w)){x.config[w]=n[w]}}};var s=function(){var d=document.getElementById(a.target+"-cX-ChatInterfaceAskScript");if(d){document.body.removeChild(d)}};var g=function(){var d=CanvasXpress.getObject(a.target);if(d){d.rL();d.ye(true);d.Hj();d.isAskingLLM=false;d.Cy()}s()};if(a&&a.success){var f=CanvasXpress.getObject(a.target);if(f){j(a,f);k(a,f);var r=document.getElementById("container-"+a.target);if(r){a.config.isGraphTime=f.isGraphTime;a.config.xAxisTime=f.xAxisTime;a.config.yAxisTime=f.yAxisTime;a.config.view="canvas";delete a.config.xAxisTickFormat;delete a.config.yAxisTickFormat;f.graphType=a.config.graphType;var p=f.llmStack.length;var v=f.ib();var t=f.Qo();f.llmStack.push({header:t,prompt:a.prompt,n:p});if(f.llmBehaviour&&f.llmBehaviour=="update"){f.o7(f.target,true);var u={renderTo:f.target,data:v,config:a.config,callback:g};u.config.llmPrompt=a.prompt;f=new CanvasXpress(u)}else{var m=r.parentNode;var b=m.className;var o=l(f.width);var q=c(f.width,f.height);var i=q.id;if(m.parentNode&&m.parentNode.tagName.toLowerCase()=="div"){q=e(q,b);m.after(o);o.after(q)}else{m.appendChild(o);m.appendChild(q)}var u={renderTo:i,data:v,config:a.config,callback:g};u.config.llmPrompt=a.prompt;f.rL();f.ye(true);f.Hj();f.isAskingLLM=false;f.Cy();f=new CanvasXpress(u);r=document.getElementById("container-"+f.target);r.style.display="block"}}else{alert("CanvasXpress Container: container-"+a.target+" - not found");s()}}else{alert("CanvasXpress Object: "+a.target+" - not found");s()}}else{alert(a.text)}};CanvasXpress.setColorSchemes=function(){CanvasXpress.colorSchemes={YlGn:{3:"f7fcb9addd8e31a354",4:"ffffccc2e69978c679238443",5:"ffffccc2e69978c67931a354006837",6:"ffffccd9f0a3addd8e78c67931a354006837",7:"ffffccd9f0a3addd8e78c67941ab5d238443005a32",8:"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",9:"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"},YlGnBu:{3:"edf8b17fcdbb2c7fb8",4:"ffffcca1dab441b6c4225ea8",5:"ffffcca1dab441b6c42c7fb8253494",6:"ffffccc7e9b47fcdbb41b6c42c7fb8253494",7:"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",8:"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",9:"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"},GnBu:{3:"e0f3dba8ddb543a2ca",4:"f0f9e8bae4bc7bccc42b8cbe",5:"f0f9e8bae4bc7bccc443a2ca0868ac",6:"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",7:"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",8:"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",9:"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"},BuGn:{3:"e5f5f999d8c92ca25f",4:"edf8fbb2e2e266c2a4238b45",5:"edf8fbb2e2e266c2a42ca25f006d2c",6:"edf8fbccece699d8c966c2a42ca25f006d2c",7:"edf8fbccece699d8c966c2a441ae76238b45005824",8:"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",9:"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"},PuBuGn:{3:"ece2f0a6bddb1c9099",4:"f6eff7bdc9e167a9cf02818a",5:"f6eff7bdc9e167a9cf1c9099016c59",6:"f6eff7d0d1e6a6bddb67a9cf1c9099016c59",7:"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",8:"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",9:"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"},PuBu:{3:"ece7f2a6bddb2b8cbe",4:"f1eef6bdc9e174a9cf0570b0",5:"f1eef6bdc9e174a9cf2b8cbe045a8d",6:"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",7:"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",8:"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",9:"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"},BuPu:{3:"e0ecf49ebcda8856a7",4:"edf8fbb3cde38c96c688419d",5:"edf8fbb3cde38c96c68856a7810f7c",6:"edf8fbbfd3e69ebcda8c96c68856a7810f7c",7:"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",8:"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",9:"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"},RdPu:{3:"fde0ddfa9fb5c51b8a",4:"feebe2fbb4b9f768a1ae017e",5:"feebe2fbb4b9f768a1c51b8a7a0177",6:"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",7:"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",8:"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",9:"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"},PuRd:{3:"e7e1efc994c7dd1c77",4:"f1eef6d7b5d8df65b0ce1256",5:"f1eef6d7b5d8df65b0dd1c77980043",6:"f1eef6d4b9dac994c7df65b0dd1c77980043",7:"f1eef6d4b9dac994c7df65b0e7298ace125691003f",8:"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",9:"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"},OrRd:{3:"fee8c8fdbb84e34a33",4:"fef0d9fdcc8afc8d59d7301f",5:"fef0d9fdcc8afc8d59e34a33b30000",6:"fef0d9fdd49efdbb84fc8d59e34a33b30000",7:"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",8:"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",9:"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"},YlOrRd:{3:"ffeda0feb24cf03b20",4:"ffffb2fecc5cfd8d3ce31a1c",5:"ffffb2fecc5cfd8d3cf03b20bd0026",6:"ffffb2fed976feb24cfd8d3cf03b20bd0026",7:"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",8:"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",9:"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"},YlOrBr:{3:"fff7bcfec44fd95f0e",4:"ffffd4fed98efe9929cc4c02",5:"ffffd4fed98efe9929d95f0e993404",6:"ffffd4fee391fec44ffe9929d95f0e993404",7:"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",8:"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",9:"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"},Purples:{3:"efedf5bcbddc756bb1",4:"f2f0f7cbc9e29e9ac86a51a3",5:"f2f0f7cbc9e29e9ac8756bb154278f",6:"f2f0f7dadaebbcbddc9e9ac8756bb154278f",7:"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",8:"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",9:"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"},Blues:{3:"deebf79ecae13182bd",4:"eff3ffbdd7e76baed62171b5",5:"eff3ffbdd7e76baed63182bd08519c",6:"eff3ffc6dbef9ecae16baed63182bd08519c",7:"eff3ffc6dbef9ecae16baed64292c62171b5084594",8:"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",9:"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"},BluesDark:{2:"132B4356B1F7"},Greens:{3:"e5f5e0a1d99b31a354",4:"edf8e9bae4b374c476238b45",5:"edf8e9bae4b374c47631a354006d2c",6:"edf8e9c7e9c0a1d99b74c47631a354006d2c",7:"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",8:"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",9:"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"},Oranges:{3:"fee6cefdae6be6550d",4:"feeddefdbe85fd8d3cd94701",5:"feeddefdbe85fd8d3ce6550da63603",6:"feeddefdd0a2fdae6bfd8d3ce6550da63603",7:"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",8:"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",9:"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"},Reds:{3:"fee0d2fc9272de2d26",4:"fee5d9fcae91fb6a4acb181d",5:"fee5d9fcae91fb6a4ade2d26a50f15",6:"fee5d9fcbba1fc9272fb6a4ade2d26a50f15",7:"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",8:"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",9:"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"},Greys:{3:"f0f0f0bdbdbd636363",4:"f7f7f7cccccc969696525252",5:"f7f7f7cccccc969696636363252525",6:"f7f7f7d9d9d9bdbdbd969696636363252525",7:"f7f7f7d9d9d9bdbdbd969696737373525252252525",8:"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",9:"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000",256:"fffffffffffffefefefefefefdfdfdfdfdfdfcfcfcfcfcfcfbfbfbfbfbfbfafafafafafaf9f9f9f9f9f9f9f9f9f8f8f8f8f8f8f7f7f7f7f7f7f6f6f6f6f6f6f5f5f5f5f5f5f4f4f4f4f4f4f3f3f3f3f3f3f2f2f2f2f2f2f1f1f1f1f1f1f0f0f0f0f0f0efefefefefefeeeeeeeeeeeeededededededececececececebebebebebebeaeaeaeaeaeae9e9e9e9e9e9e8e8e8e8e8e8e7e7e7e7e7e7e6e6e6e6e6e6e5e5e5e5e5e5e4e4e4e4e4e4e3e3e3e3e3e3e2e2e2e2e2e2e1e1e1e1e1e1e0e0e0e0e0e0dfdfdfdfdfdfdedededddddddddddddcdcdcdcdcdcdbdbdbdbdbdbdadadadadadad9d9d9d9d9d9d8d8d8d7d7d7d7d7d7d6d6d6d6d6d6d5d5d5d5d5d5d4d4d4d4d4d4d3d3d3d2d2d2d2d2d2d1d1d1d1d1d1d0d0d0cfcfcfcfcfcfcececececececdcdcdcdcdcdcccccccbcbcbcbcbcbcacacacacacac9c9c9c8c8c8c8c8c8c7c7c7c7c7c7c6c6c6c5c5c5c5c5c5c4c4c4c3c3c3c3c3c3c2c2c2c2c2c2c1c1c1c0c0c0c0c0c0bfbfbfbebebebebebebdbdbdbcbcbcbcbcbcbbbbbbbabababababab9b9b9b8b8b8b8b8b8b7b7b7b6b6b6b6b6b6b5b5b5b4b4b4b4b4b4b3b3b3b2b2b2b2b2b2b1b1b1b0b0b0afafafafafafaeaeaeadadadadadadacacacabababaaaaaaaaaaaaa9a9a9a8a8a8a7a7a7a7a7a7a6a6a6a5a5a5a4a4a4a4a4a4a3a3a3a2a2a2a1a1a1a0a0a0a0a0a09f9f9f9e9e9e9d9d9d9c9c9c9c9c9c9b9b9b9a9a9a9999999898989797979797979696969595959494949393939292929191919090909090908f8f8f8e8e8e8d8d8d8c8c8c8b8b8b8a8a8a8989898888888787878686868585858484848383838282828181818080807f7f7f7e7e7e7d7d7d7c7c7c7b7b7b7a7a7a7878787777777676767575757474747373737272727070706f6f6f6e6e6e6d6d6d6b6b6b6a6a6a6969696767676666666565656363636262626060605f5f5f5d5d5d5c5c5c5a5a5a5959595757575555555454545252525050504e4e4e4c4c4c4a4a4a4848484646464444444242424040403d3d3d3b3b3b3838383535353232322e2e2e2b2b2b2727272222221c1c1c15151500000"},PuOr:{3:"f1a340f7f7f7998ec3",4:"e66101fdb863b2abd25e3c99",5:"e66101fdb863f7f7f7b2abd25e3c99",6:"b35806f1a340fee0b6d8daeb998ec3542788",7:"b35806f1a340fee0b6f7f7f7d8daeb998ec3542788",8:"b35806e08214fdb863fee0b6d8daebb2abd28073ac542788",9:"b35806e08214fdb863fee0b6f7f7f7d8daebb2abd28073ac542788",10:"7f3b08b35806e08214fdb863fee0b6d8daebb2abd28073ac5427882d004b",11:"7f3b08b35806e08214fdb863fee0b6f7f7f7d8daebb2abd28073ac5427882d004b"},BrBG:{3:"d8b365f5f5f55ab4ac",4:"a6611adfc27d80cdc1018571",5:"a6611adfc27df5f5f580cdc1018571",6:"8c510ad8b365f6e8c3c7eae55ab4ac01665e",7:"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",8:"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",9:"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",10:"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",11:"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"},PRGn:{3:"af8dc3f7f7f77fbf7b",4:"7b3294c2a5cfa6dba0008837",5:"7b3294c2a5cff7f7f7a6dba0008837",6:"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",7:"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",8:"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",9:"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",10:"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",11:"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"},PiYG:{3:"e9a3c9f7f7f7a1d76a",4:"d01c8bf1b6dab8e1864dac26",5:"d01c8bf1b6daf7f7f7b8e1864dac26",6:"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",7:"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",8:"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",9:"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",10:"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",11:"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"},RdBu:{3:"ef8a62f7f7f767a9cf",4:"ca0020f4a58292c5de0571b0",5:"ca0020f4a582f7f7f792c5de0571b0",6:"b2182bef8a62fddbc7d1e5f067a9cf2166ac",7:"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",8:"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",9:"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",10:"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",11:"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"},RdGy:{3:"ef8a62ffffff999999",4:"ca0020f4a582bababa404040",5:"ca0020f4a582ffffffbababa404040",6:"b2182bef8a62fddbc7e0e0e09999994d4d4d",7:"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",8:"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",9:"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",10:"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",11:"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"},RdYlBu:{3:"fc8d59ffffbf91bfdb",4:"d7191cfdae61abd9e92c7bb6",5:"d7191cfdae61ffffbfabd9e92c7bb6",6:"d73027fc8d59fee090e0f3f891bfdb4575b4",7:"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",8:"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",9:"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",10:"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",11:"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"},Spectral:{3:"fc8d59ffffbf99d594",4:"d7191cfdae61abdda42b83ba",5:"d7191cfdae61ffffbfabdda42b83ba",6:"d53e4ffc8d59fee08be6f59899d5943288bd",7:"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",8:"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",9:"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",10:"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",11:"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"},RdYlGn:{3:"fc8d59ffffbf91cf60",4:"d7191cfdae61a6d96a1a9641",5:"d7191cfdae61ffffbfa6d96a1a9641",6:"d73027fc8d59fee08bd9ef8b91cf601a9850",7:"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",8:"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",9:"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",10:"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",11:"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"},Accent:{3:"7fc97fbeaed4fdc086",4:"7fc97fbeaed4fdc086ffff99",5:"7fc97fbeaed4fdc086ffff99386cb0",6:"7fc97fbeaed4fdc086ffff99386cb0f0027f",7:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17",8:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"},Dark2:{3:"1b9e77d95f027570b3",4:"1b9e77d95f027570b3e7298a",5:"1b9e77d95f027570b3e7298a66a61e",6:"1b9e77d95f027570b3e7298a66a61ee6ab02",7:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d",8:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"},P