You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/03/17 12:00:14 UTC

[1/5] MARMOTTA-468: removed sgvizler webjar module from marmotta MARMOTTA-416: no more d3.js in the source

Repository: marmotta
Updated Branches:
  refs/heads/develop 7ab48b889 -> 93cd20a25


http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/sgvizler.js
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/sgvizler.js b/extras/webjars/sgvizler/src/main/resources/sgvizler.js
deleted file mode 100644
index d512d65..0000000
--- a/extras/webjars/sgvizler/src/main/resources/sgvizler.js
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*  Sgvizler JavaScript SPARQL result set visualizer, version 0.5.1
- *  (c) 2011--2012 Martin G. Skjæveland
- *
- *  Sgvizler is freely distributable under the terms of an MIT-style license.
- *  Sgvizler web site: https://code.google.com/p/sgvizler/
- *--------------------------------------------------------------------------*/
-(function (global) {
-    "use strict";
-
-    /*global google, $, jQuery */
-    /*jslint browser: true */
-
-    var sgvizler = {
-
-        go: function (callback) {
-            google.load('visualization',
-                        '1.0',
-                        {'packages':
-                         ['annotatedtimeline',
-                          'corechart',
-                          'gauge',
-                          'geomap',
-                          'geochart',
-                          'imagesparkline',
-                          'map',
-                          'orgchart',
-                          'table',
-                          'motionchart',
-                          'treemap'
-                         ]
-                        }
-                       );
-
-            google.setOnLoadCallback(function () {
-                sgvizler.charts.loadCharts();
-                sgvizler.drawFormQuery();
-                sgvizler.drawContainerQueries();
-                callback();
-            });
-        },
-
-        drawFormQuery: function () {
-            var query = new sgvizler.query(sgvizler.ui.id.chartCon),
-                params = sgvizler.ui.getUrlParams();
-            $.extend(query,
-                     sgvizler.option.query,
-                     { query: params.query, chart: params.chart });
-
-            if (sgvizler.ui.isElement(query.container) && query.query) {
-                $.extend(query.chartOptions,
-                         { width: params.width, height: params.height });
-                query.draw();
-            }
-            sgvizler.ui.displayUI(query);
-        },
-
-        drawContainerQueries: function () {
-            $('[' + this.ui.attr.prefix + 'query]').each(function () {
-                var query = new sgvizler.query();
-                $.extend(query,
-                         sgvizler.option.query,
-                         sgvizler.ui.getQueryOptionAttr(this));
-                $.extend(query.chartOptions,
-                         sgvizler.ui.getChartOptionAttr(this));
-                query.draw();
-            });
-        },
-
-        // kept in separate files:
-        option: {},   // settings, global variables.
-        chart: {},    // the set of user-defined rendering functions.
-        charts: {},   // functions for handling rendering functions.
-        parser: {},   // SPARQL results XML/JSON parser.
-        ui: {}       // html get/set functions.
-    };
-
-    jQuery.ajaxSetup({
-        accepts: {
-            xml:  "application/sparql-results+xml",
-            json: "application/sparql-results+json"
-        }
-    });
-    sgvizler.option = {
-
-        home: (window.location.href).replace(window.location.search, ""),
-        homefolder: "",
-        libfolder: "/lib/",
-
-        stylepath:"",
-
-        //// Prefixes included in queries:
-        namespace: {
-            'rdf' : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-            'rdfs': "http://www.w3.org/2000/01/rdf-schema#",
-            'owl' : "http://www.w3.org/2002/07/owl#",
-            'xsd' : "http://www.w3.org/2001/XMLSchema#"
-        },
-
-        query: {}, // holds options set by user in html file.
-        chart: {}  // ditto.
-    };
-    sgvizler.ui = {
-
-        //// #id's to html elements:
-        id: {
-            script:       'sgvzlr_script',    // #id to the script tag for this file
-            chartCon:     'sgvzlr_gchart',    // #id to the container to hold the chart
-            queryForm:    'sgvzlr_formQuery', //
-            queryTxt:     'sgvzlr_cQuery',    // query text area.
-            formQuery:    'sgvzlr_strQuery',  // hidden query string. "trick" taken from snorql.
-            formWidth:    'sgvzlr_strWidth',  //
-            formHeight:   'sgvzlr_strHeight', //
-            formChart:    'sgvzlr_optChart',  //
-            prefixCon:    'sgvzlr_cPrefix',   // print prefixes
-            messageCon:   'sgvzlr_cMessage'  // print messages
-        },
-
-        attr: {
-            prefix:      'data-sgvizler-',
-            prefixChart: 'data-sgvizler-chart-options',
-
-            valueAssign: '=',
-            valueSplit:  '|'
-        },
-
-        params: [ 'query', 'chart', 'width', 'height' ], // permissible URL parameters.
-
-        displayUI: function (queryOpt) {
-            this.displayPrefixes();
-            this.displayChartTypesMenu();
-            this.displayUserInput(queryOpt);
-        },
-        displayPrefixes: function () {
-            this.setElementText(this.id.prefixCon, sgvizler.query.prototype.getPrefixes());
-        },
-        displayUserInput: function (queryOpt) {
-            this.setElementValue(this.id.queryTxt, queryOpt.query);
-            this.setElementValue(this.id.formChart, queryOpt.chart);
-            this.setElementValue(this.id.formWidth, queryOpt.chartOptions.width);
-            this.setElementValue(this.id.formHeight, queryOpt.chartOptions.height);
-        },
-        displayChartTypesMenu: function () {
-            var chart,
-                i;
-            if (this.isElement(this.id.formChart)) {
-                chart = sgvizler.charts.all;
-                for (i = 0; i < chart.length; i += 1) {
-                    $('#' + this.id.formChart)
-                        .append($('<option/>')
-                                .val(chart[i].id)
-                                .html(chart[i].id));
-                }
-            }
-        },
-
-        displayFeedback: function (queryOpt, messageName) {
-            var message,
-                container = queryOpt.container;
-            if (queryOpt.container === this.id.chartCon && this.isElement(this.id.messageCon)) {
-                container = this.id.messageCon;
-            }
-
-            if (queryOpt.loglevel === 0) {
-                message = "";
-            } else if (queryOpt.loglevel === 1) {
-                if (messageName === "LOADING") {
-                    message = "Loading...";
-                } else if (messageName === "ERROR_ENDPOINT" || messageName === "ERROR_UNKNOWN") {
-                    message = "Error.";
-                }
-            } else {
-                if (messageName === "LOADING") {
-                    message = "Sending query...";
-                } else if (messageName === "ERROR_ENDPOINT") {
-                    message = "Error querying endpoint. Possible errors:" +
-                        this.html.ul(
-                            this.html.a(queryOpt.endpoint, "SPARQL endpoint") + " down? " +
-                                this.html.a(queryOpt.endpoint + queryOpt.endpoint_query_url + queryOpt.encodedQuery,
-                                            "Check if query runs at the endpoint") + ".",
-                            "Malformed SPARQL query? " +
-                                this.html.a(queryOpt.validator_query_url + queryOpt.encodedQuery, "Check if it validates") + ".",
-                            "CORS supported and enabled? Read more about " +
-                                this.html.a("http://code.google.com/p/sgvizler/wiki/Compatibility", "CORS and compatibility") + ".",
-                            "Is your " + this.html.a("http://code.google.com/p/sgvizler/wiki/Compatibility", "browser support") + "ed?",
-                            "Hmm.. it might be a bug! Please file a report to " +
-                                this.html.a("http://code.google.com/p/sgvizler/issues/", "the issues") + "."
-                        );
-                } else if (messageName === "ERROR_UNKNOWN") {
-                    message = "Unknown error.";
-                } else if (messageName === "NO_RESULTS") {
-                    message = "Query returned no results.";
-                } else if (messageName === "DRAWING") {
-                    message = "Received " + queryOpt.noRows + " rows. Drawing chart...<br/>" +
-                        this.html.a(queryOpt.endpoint + queryOpt.endpoint_query_url + queryOpt.encodedQuery,
-                                    "View query results", "target='_blank'") + " (in new window).";
-                }
-            }
-            this.setElementHTML(container, this.html.tag("p", message));
-        },
-
-        setElementValue: function (elementID, value) {
-            if (this.isElement(elementID)) {
-                $('#' + elementID).val(value);
-            }
-        },
-        setElementText: function (elementID, value) {
-            if (this.isElement(elementID)) {
-                $('#' + elementID).text(value);
-            }
-        },
-        setElementHTML: function (elementID, value) {
-            if (this.isElement(elementID)) {
-                $('#' + elementID).html(value);
-            }
-        },
-        isElement: function (elementID) {
-            return $('#' + elementID).length > 0;
-        },
-
-        getQueryOptionAttr: function (element) {
-            var i,
-                queryOpt = {container: $(element).attr('id')},
-                attr = element.attributes;
-            for (i = 0; i < attr.length; i += 1) {
-                if (attr[i].name.lastIndexOf(this.attr.prefix, 0) === 0) { // starts-with attr.prefix.
-                    queryOpt[attr[i].name.substring(this.attr.prefix.length)] = attr[i].value;
-                }
-            }
-            return queryOpt;
-        },
-        getChartOptionAttr: function (element) {
-            var i,
-                options,
-                assignment,
-                path,
-                o,
-                j,
-                chartOpt = {},
-                attrValue = $(element).attr(sgvizler.ui.attr.prefixChart);
-            if (typeof attrValue !== 'undefined') {
-                options = attrValue.split(this.attr.valueSplit);
-                for (i = 0; i < options.length; i += 1) {
-                    assignment = options[i].split(this.attr.valueAssign);
-                    path = assignment[0].split(".");
-                    o = chartOpt;
-                    for (j = 0; j < path.length - 1; j += 1) {
-                        if (typeof o[path[j]] === 'undefined') {
-                            o[path[j]] = {};
-                        }
-                        o = o[path[j]];
-                    }
-                    o[path[j]] = assignment[1];
-                }
-            }
-            // get width and heigth from css. take only numbers.
-            chartOpt.width = /(\d+)/.exec($(element).css('width'))[1];
-            chartOpt.height = /(\d+)/.exec($(element).css('height'))[1];
-            return chartOpt;
-        },
-
-        getUrlParams: function () {
-            /*jslint regexp: true */
-            var urlParams = {},
-                e,
-                r = /([^&=]+)=?([^&]*)/g, // parameter, value pairs.
-                d = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); }, // replace '+' with space.
-                q = window.location.search.substring(1); // URL query string part.
-
-            while ((e = r.exec(q))) {
-                if (e[2].length > 0 && this.params.indexOf(e[1]) !== -1) {
-                    urlParams[d(e[1])] = d(e[2]);
-                }
-            }
-            return urlParams;
-        },
-
-        resetPage: function () {
-            document.location = sgvizler.home;
-        },
-        submitQuery: function () {
-            $('#' + this.id.formQuery).val($('#' + this.id.queryTxt).val());
-            $('#' + this.id.queryForm).submit();
-        },
-
-        html: {
-            a: function (href, link, attr) {
-                if (typeof attr === 'undefined') { attr = ""; }
-                if (typeof href !== 'undefined' && typeof link !== 'undefined') {
-                    return "<a " + attr + " href='" + href + "'>" + link + "</a>";
-                }
-            },
-            ul: function () {
-                var i,
-                    txt;
-                if (arguments.length) {
-                    txt = "<ul>";
-                    for (i = 0; i < arguments.length; i += 1) {
-                        txt += "<li>" + arguments[i] + "</li>";
-                    }
-                    return txt + "</ul>";
-                }
-            },
-            tag: function (tag, content) {
-                return "<" + tag + ">" + content + "</" + tag + ">";
-            }
-        }
-    };
-
-    sgvizler.parser = {
-
-        // variable notation: xtable, xcol(s), xrow(s) -- x is 's'(parql) or 'g'(oogle).
-
-        defaultGDatatype: 'string',
-
-        countRowsSparqlXML: function (sxml) {
-            return $(sxml).find('sparql').find('results').find('result').length;
-        },
-
-        countRowsSparqlJSON: function (stable) {
-            if (typeof stable.results.bindings !== 'undefined') {
-                return stable.results.bindings.length;
-            }
-        },
-
-        SparqlXML2GoogleJSON: function (sxml) {
-            var c,
-                r,
-                gcols = [],
-                grows = [],
-                gdatatype = [], // for easy reference of datatypes
-                sresults = $(sxml).find('sparql').find('results').find('result');
-
-            // gcols
-            c = 0;
-            $(sxml).find('sparql').find('head').find('variable').each(function () {
-                var stype = null,
-                    sdatatype = null,
-                    name = $(this).attr('name'),
-                    scell = null,
-                    scells = $(sresults).find('binding[name="' + name + '"]');
-                if (scells.length) {
-                    scell = $(scells).first().children().first()[0]; // uri, literal element
-                    stype = scell.nodeName;
-                    sdatatype = $(scell).attr('datatype');
-                }
-                gdatatype[c] = sgvizler.parser.getGoogleJsonDatatype(stype, sdatatype);
-                gcols[c] = {'id': name, 'label': name, 'type': gdatatype[c]};
-                c += 1;
-            });
-
-            // grows
-            r = 0;
-            $(sresults).each(function () {
-                var gvalue,
-                    scells,
-                    scell,
-                    stype,
-                    svalue,
-                    grow = [];
-                for (c = 0; c < gcols.length; c += 1) {
-                    gvalue = null;
-                    scells = $(this).find('binding[name="' + gcols[c].id + '"]');
-                    if (scells.length &&
-                            typeof $(scells).first().children().first() !== 'undefined' &&
-                            $(scells).first().children().first().firstChild !== null) {
-                        scell = $(scells).first().children().first()[0]; // uri, literal element
-                        stype = scell.nodeName;
-                        svalue = $(scell).first().text();
-                        gvalue = sgvizler.parser.getGoogleJsonValue(svalue, gdatatype[c], stype);
-                    }
-                    grow[c] = {'v': gvalue};
-                }
-                grows[r] = {'c': grow};
-                r += 1;
-            });
-            return {'cols': gcols, 'rows': grows};
-        },
-
-        SparqlJSON2GoogleJSON: function (stable) {
-            var c,
-                r,
-                srow,
-                grow,
-                gvalue,
-                stype,
-                sdatatype,
-                gcols = [],
-                grows = [],
-                gdatatype = [], // for easy reference of datatypes
-                scols = stable.head.vars,
-                srows = stable.results.bindings;
-
-            for (c = 0; c < scols.length; c += 1) {
-                r = 0;
-                stype = null;
-                sdatatype = null;
-                // find a row where there is a value for this column
-                while (typeof srows[r][scols[c]] === 'undefined' && r + 1 < srows.length) { r += 1; }
-                if (typeof srows[r][scols[c]] !== 'undefined') {
-                    stype = srows[r][scols[c]].type;
-                    sdatatype = srows[r][scols[c]].datatype;
-                }
-                gdatatype[c] = this.getGoogleJsonDatatype(stype, sdatatype);
-                gcols[c] = {'id': scols[c], 'label': scols[c], 'type': gdatatype[c]};
-            }
-
-            // loop rows
-            for (r = 0; r < srows.length; r += 1) {
-                srow = srows[r];
-                grow = [];
-                // loop cells
-                for (c = 0; c < scols.length; c += 1) {
-                    gvalue = null;
-                    if (typeof srow[scols[c]] !== 'undefined' &&
-                            typeof srow[scols[c]].value !== 'undefined') {
-                        gvalue = this.getGoogleJsonValue(srow[scols[c]].value, gdatatype[c], srow[scols[c]].type);
-                    }
-                    grow[c] = { 'v': gvalue };
-                }
-                grows[r] = {'c': grow};
-            }
-            return {'cols': gcols, 'rows': grows};
-        },
-
-        getGoogleJsonValue: function (value, gdatatype, stype) {
-            var newvalue;
-            if (gdatatype === 'number') {
-                newvalue = Number(value);
-            } else if (gdatatype === 'date') {
-                //assume format yyyy-MM-dd
-                newvalue = new Date(value.substr(0, 4),
-                                value.substr(5, 2),
-                                value.substr(8, 2));
-            } else if (gdatatype === 'datetime') {
-                //assume format yyyy-MM-ddZHH:mm:ss
-                newvalue = new Date(value.substr(0, 4),
-                                value.substr(5, 2),
-                                value.substr(8, 2),
-                                value.substr(11, 2),
-                                value.substr(14, 2),
-                                value.substr(17, 2));
-            } else if (gdatatype === 'timeofday') {
-                //assume format HH:mm:ss
-                newvalue = [value.substr(0, 2),
-                        value.substr(3, 2),
-                        value.substr(6, 2)];
-            } else { // datatype === 'string' || datatype === 'boolean'
-                if (stype === 'uri') { // replace namespace with prefix
-                    newvalue = this.prefixify(value);
-                }
-                newvalue = value;
-            }
-            return newvalue;
-        },
-
-        getGoogleJsonDatatype: function (stype, sdatatype) {
-            var gdatatype = this.defaultGDatatype,
-                xsdns = sgvizler.option.namespace.xsd;
-            if (typeof stype !== 'undefined' && (stype === 'typed-literal' || stype === 'literal')) {
-                if (sdatatype === xsdns + "float"   ||
-                        sdatatype === xsdns + "double"  ||
-                        sdatatype === xsdns + "decimal" ||
-                        sdatatype === xsdns + "int"     ||
-                        sdatatype === xsdns + "long"    ||
-                        sdatatype === xsdns + "integer") {
-                    gdatatype =  'number';
-                } else if (sdatatype === xsdns + "boolean") {
-                    gdatatype =  'boolean';
-                } else if (sdatatype === xsdns + "date") {
-                    gdatatype =  'date';
-                } else if (sdatatype === xsdns + "dateTime") {
-                    gdatatype =  'datetime';
-                } else if (sdatatype === xsdns + "time") {
-                    gdatatype =  'timeofday';
-                }
-            }
-            return gdatatype;
-        },
-
-        prefixify: function (url) {
-            var ns;
-            for (ns in sgvizler.option.namespace) {
-                if (sgvizler.option.namespace.hasOwnProperty(ns) &&
-                        url.lastIndexOf(sgvizler.option.namespace[ns], 0) === 0) {
-                    return url.replace(sgvizler.option.namespace[ns], ns + ":");
-                }
-            }
-            return url;
-        },
-        unprefixify: function (qname) {
-            var ns;
-            for (ns in sgvizler.option.namespace) {
-                if (sgvizler.option.namespace.hasOwnProperty(ns) &&
-                        qname.lastIndexOf(ns + ":", 0) === 0) {
-                    return qname.replace(ns + ":", sgvizler.option.namespace[ns]);
-                }
-            }
-            return qname;
-        }
-    };
-
-
-    /*global XDomainRequest */
-
-    sgvizler.query = function (container) {
-        this.container = container;
-
-        //defaults
-        this.query = "SELECT ?class (count(?instance) AS ?noOfInstances)\nWHERE{ ?instance a ?class }\nGROUP BY ?class\nORDER BY ?class";
-        this.endpoint = "http://sws.ifi.uio.no/sparql/world";
-        this.endpoint_output = 'json';  // xml, json, jsonp
-        this.endpoint_query_url = "?output=text&amp;query=";
-        this.validator_query_url = "http://www.sparql.org/query-validator?languageSyntax=SPARQL&amp;outputFormat=sparql&amp;linenumbers=true&amp;query=";
-        this.chart = 'gLineChart';
-        this.loglevel = 2;
-
-        this.chartOptions = {
-            'width':           '800',
-            'height':          '400',
-            'chartArea':       { left: '5%', top: '5%', width: '75%', height: '80%' },
-            'gGeoMap': {
-                'dataMode':           'markers'
-            },
-            'gMap': {
-                'dataMode':           'markers'
-            },
-            'sMap': {
-                'dataMode':           'markers',
-                'showTip':            true,
-                'useMapTypeControl':  true
-            },
-            'gSparkline': {
-                'showAxisLines':      false
-            }
-        };
-    };
-
-    sgvizler.query.prototype.draw = function (listeners,options,callback) {
-        var that = this,
-            chartFunc = sgvizler.charts.getChart(this.container, this.chart);
-        this.setChartSpecificOptions();
-        this.insertFrom();
-        $.extend(this.chartOptions,options);
-        this.runQuery(function (data) {
-            var dataTable = new google.visualization.DataTable(that.processQueryResults(data));
-            for(var listener in listeners) {
-                google.visualization.events.addListener(chartFunc, listener, function(){
-                    listeners[listener](chartFunc,dataTable);
-                });
-            }
-            chartFunc.draw(dataTable,that.chartOptions);
-            if(callback)callback(dataTable);
-        });
-    };
-
-    sgvizler.query.prototype.runQuery = function (callback) {
-        var xdr,
-            url,
-            endpoint_output = this.endpoint_output;
-        sgvizler.ui.displayFeedback(this, "LOADING");
-        this.encodedQuery = encodeURIComponent(this.getPrefixes() + this.query);
-        if (this.endpoint_output !== 'jsonp' && $.browser.msie && window.XDomainRequest) {
-            xdr = new XDomainRequest();
-            url = this.endpoint +
-                "?query=" + this.encodedQuery +
-                "&output=" + this.endpoint_output;
-            xdr.open("GET", url);
-            xdr.onload = function () {
-                var data;
-                if (endpoint_output === "xml") {
-                    data = $.parseXML(xdr.responseText);
-                } else {
-                    data = $.parseJSON(xdr.responseText);
-                }
-                callback(data);
-            };
-            xdr.send();
-        } else {
-            $.get(this.endpoint,
-                  { query: this.getPrefixes() + this.query,
-                    output: (this.endpoint_output === 'jsonp') ? 'json' : this.endpoint_output },
-                  function (data) { callback(data); },
-                  this.endpoint_output)
-                .error(function () {
-                    sgvizler.ui.displayFeedback(this, "ERROR_ENDPOINT");
-                });
-        }
-    };
-
-    sgvizler.query.prototype.processQueryResults = function (data) {
-        this.setResultRowCount(data);
-        if (this.noRows === null) {
-            sgvizler.ui.displayFeedback(this, "ERROR_UNKNOWN");
-        } else if (this.noRows === 0) {
-            sgvizler.ui.displayFeedback(this, "NO_RESULTS");
-        } else {
-            sgvizler.ui.displayFeedback(this, "DRAWING");
-            return this.getGoogleJSON(data);
-        }
-    };
-
-    sgvizler.query.prototype.setResultRowCount = function (data) {
-        if (this.endpoint_output === 'xml') {
-            this.noRows = sgvizler.parser.countRowsSparqlXML(data);
-        } else {
-            this.noRows = sgvizler.parser.countRowsSparqlJSON(data);
-        }
-    };
-
-    sgvizler.query.prototype.getGoogleJSON = function (data) {
-        if (this.endpoint_output === 'xml') {
-            data = sgvizler.parser.SparqlXML2GoogleJSON(data);
-        } else {
-            data = sgvizler.parser.SparqlJSON2GoogleJSON(data);
-        }
-        return data;
-    };
-
-    sgvizler.query.prototype.insertFrom = function () {
-        if (typeof this.rdf !== 'undefined') {
-            var i,
-                froms = this.rdf.split(sgvizler.ui.attr.valueSplit),
-                from = "";
-            for (i = 0; i < froms.length; i += 1) {
-                from += 'FROM <' + froms[i] + '>\n';
-            }
-            this.query = this.query.replace(/(WHERE)?(\s)*\{/, '\n' + from + 'WHERE {');
-        }
-    };
-
-    sgvizler.query.prototype.getPrefixes = function () {
-        var prefix,
-            prefixes = "";
-        for (prefix in sgvizler.option.namespace) {
-            if (sgvizler.option.namespace.hasOwnProperty(prefix)) {
-                prefixes += "PREFIX " + prefix + ": <" + sgvizler.option.namespace[prefix] + ">\n";
-            }
-        }
-        return prefixes;
-    };
-
-    sgvizler.query.prototype.setChartSpecificOptions = function () {
-        var level1,
-            level2;
-        for (level1 in this.chartOptions) {
-            if (this.chartOptions.hasOwnProperty(level1) &&
-                    level1 === this.chart) {
-                for (level2 in this.chartOptions[level1]) {
-                    if (this.chartOptions[level1].hasOwnProperty(level2)) {
-                        this.chartOptions[level2] = this.chartOptions[level1][level2];
-                    }
-                }
-            }
-        }
-    };
-
-    sgvizler.charts = {
-        // Package for handling rendering functions. The rendering
-        // functions themselves are kept in sgvizler.chart.*
-
-        all: [],
-
-        loadCharts: function () {
-            var googlecharts = [
-                { 'id': "gLineChart",        'func': google.visualization.LineChart },
-                { 'id': "gAreaChart",        'func': google.visualization.AreaChart },
-                { 'id': "gSteppedAreaChart", 'func': google.visualization.SteppedAreaChart },
-                { 'id': "gPieChart",         'func': google.visualization.PieChart },
-                { 'id': "gBubbleChart",      'func': google.visualization.BubbleChart },
-                { 'id': "gColumnChart",      'func': google.visualization.ColumnChart },
-                { 'id': "gBarChart",         'func': google.visualization.BarChart },
-                { 'id': "gSparkline",        'func': google.visualization.ImageSparkLine },
-                { 'id': "gScatterChart",     'func': google.visualization.ScatterChart },
-                { 'id': "gCandlestickChart", 'func': google.visualization.CandlestickChart },
-                { 'id': "gGauge",            'func': google.visualization.Gauge },
-                { 'id': "gOrgChart",         'func': google.visualization.OrgChart },
-                { 'id': "gTreeMap",          'func': google.visualization.TreeMap },
-                { 'id': "gTimeline",         'func': google.visualization.AnnotatedTimeLine },
-                { 'id': "gMotionChart",      'func': google.visualization.MotionChart },
-                { 'id': "gGeoChart",         'func': google.visualization.GeoChart },
-                { 'id': "gGeoMap",           'func': google.visualization.GeoMap },
-                { 'id': "gMap",              'func': google.visualization.Map },
-                { 'id': "gTable",            'func': google.visualization.Table }
-            ],
-                chart;
-
-            $.merge(this.all, googlecharts);
-            for (chart in sgvizler.chart) {
-                if (sgvizler.chart.hasOwnProperty(chart)) {
-                    this.register(
-                        sgvizler.chart[chart].prototype.id,
-                        sgvizler.chart[chart]
-                    );
-                }
-            }
-        },
-
-        register: function (id, func) {
-            this.all.push({'id': id, 'func': func});
-        },
-
-        getChart: function (containerId, chartId) {
-            var i,
-                container = document.getElementById(containerId);
-            for (i = 0; i < this.all.length; i += 1) {
-                if (chartId === this.all[i].id) {
-                    return new this.all[i].func(container);
-                }
-            }
-        }
-    };
-
-
-    /*global d3 */
-    /** dForceGraph **
-
-
-        D3 force directed graph. Under development.
-    */
-    sgvizler.chart.dForceGraph = function (container) { this.container = container; };
-    sgvizler.chart.dForceGraph.prototype = {
-        id:   "dForceGraph",
-        draw: function (data, chartOpt) {
-            var noColumns = data.getNumberOfColumns(),
-                noRows = data.getNumberOfRows(),
-                opt = $.extend({'maxnodesize': 15, 'minnodesize': 2 }, chartOpt), // set defaults
-                colors = d3.scale.category20(),
-                w = chartOpt.width,
-                h = chartOpt.height,
-                isNumber = function (n) {  return !isNaN(parseFloat(n)) && isFinite(n); },
-
-                // build arrays of nodes and links.
-                nodes = [],
-                edges = [],
-                t_color = {},
-                t_size = {},
-                t_maxnodesize = 0,
-
-                r,
-                source,
-                target,
-
-                nodesizeratio,
-                i,
-                color,
-                size,
-
-                vis,
-                force,
-                link,
-                node,
-                ticks;
-
-            for (r = 0; r < noRows; r += 1) {
-                source = data.getValue(r, 0);
-                target = data.getValue(r, 1);
-                // nodes
-                if (source !== null && $.inArray(source, nodes) === -1) {
-                    nodes.push(source);
-                    t_size[source] = (noColumns > 2) ? Math.sqrt(data.getValue(r, 2)) : 0;
-                    t_color[source] = (noColumns > 3) ? data.getValue(r, 3) : 0;
-                    if (t_size[source] > t_maxnodesize) {
-                        t_maxnodesize = t_size[source];
-                    }
-                }
-                if (target !== null && $.inArray(target, nodes) === -1) {
-                    nodes.push(target);
-                }
-                // edges
-                if (source !== null && target !== null) {
-                    edges.push({'source': $.inArray(source, nodes),
-                                'target': $.inArray(target, nodes)
-                            }
-                        );
-                }
-            }
-            if (t_maxnodesize === 0) {
-                t_maxnodesize = 1;
-            }
-            nodesizeratio = opt.maxnodesize / t_maxnodesize;
-            for (i = 0; i < nodes.length; i += 1) {
-                color = typeof t_color[nodes[i]] !== 'undefined' ?
-                        t_color[nodes[i]] :
-                        1;
-                size = isNumber(t_size[nodes[i]]) ?
-                        opt.minnodesize + t_size[nodes[i]] * nodesizeratio :
-                        opt.minnodesize;
-
-                nodes[i] = {'name': nodes[i], 'color': color, 'size': size };
-            }
-
-            $(this.container).empty();
-
-            vis = d3.select(this.container)
-                .append("svg:svg")
-                .attr("width", w)
-                .attr("height", h)
-                .attr("pointer-events", "all")
-                .append('svg:g')
-                .call(d3.behavior.zoom().on("zoom", function () {
-                    vis.attr("transform", "translate(" + d3.event.translate + ")" +
-                         " scale(" + d3.event.scale + ")");
-                }))
-                .append('svg:g');
-
-            vis.append('svg:rect')
-                .attr('width', w)
-                .attr('height', h)
-                .attr('fill', 'white');
-
-            force = d3.layout.force()
-                .gravity(0.05)
-                .distance(100)
-                .charge(-100)
-                .nodes(nodes)
-                .links(edges)
-                .size([w, h])
-                .start();
-
-            link = vis.selectAll("line.link")
-                .data(edges)
-                .enter().append("svg:line")
-                .attr("class", "link")
-                //.style("stroke-width", function (d) { return Math.sqrt(d.value); })
-                .attr("x1", function (d) { return d.source.x; })
-                .attr("y1", function (d) { return d.source.y; })
-                .attr("x2", function (d) { return d.target.x; })
-                .attr("y2", function (d) { return d.target.y; });
-
-            node = vis.selectAll("g.node")
-                .data(nodes)
-                .enter().append("svg:g")
-                .attr("class", "node")
-                .call(force.drag);
-
-            node.append("svg:circle")
-                .style("fill", function (d) { return colors(d.color); })
-                .attr("class", "node")
-                .attr("r", function (d) { return d.size; });
-
-            node.append("svg:title")
-                .text(function (d) { return d.name; });
-
-            node.append("svg:text")
-                .attr("class", "nodetext")
-                .attr("dx", 12)
-                .attr("dy", ".35em")
-                .text(function (d) { return d.name; });
-
-            ticks = 0;
-            force.on("tick", function () {
-                ticks += 1;
-                if (ticks > 250) {
-                    force.stop();
-                    force.charge(0)
-                        .linkStrength(0)
-                        .linkDistance(0)
-                        .gravity(0)
-                        .start();
-                }
-
-                link.attr("x1", function (d) { return d.source.x; })
-                    .attr("y1", function (d) { return d.source.y; })
-                    .attr("x2", function (d) { return d.target.x; })
-                    .attr("y2", function (d) { return d.target.y; });
-
-                node.attr("transform", function (d) {
-                    return "translate(" + d.x + "," + d.y + ")";
-                });
-            });
-        }
-    };
-
-
-    /*global Graph */
-    /** rdGraph **
-
-      Original version written by Magnus Stuhr.
-
-      Draws a graph with clickable and movable nodes. 
-
-      Input format:
-      - 7 columns, last three are optional.
-      - each row represents a source node, a target node and an edge from source to target.
-      - the URIs are the id's for the nodes, and make the nodes clickable.
-      
-      1             2         3         4             5           6             7
-      sourceURI sourceLabel   targetURI targetLabel   edgeLabel   sourceColor   targetColor
-
-    */
-    sgvizler.chart.rdGraph = function (container) { this.container = container; };
-    sgvizler.chart.rdGraph.prototype = {
-        id: "rdGraph",
-        draw: function (data, chartOpt) {
-
-            var numberOfColumns = data.getNumberOfColumns(),
-                numberOfRows = data.getNumberOfRows(),
-
-                // set defaults.
-                opt = $.extend({
-                    noderadius: 0.5,
-                    nodefontsize: "10px",
-                    nodeheight: 20,
-                    nodestrokewidth: "1px",
-                    nodecornerradius: "1px",
-                    nodepadding: 7,
-                    nodecolor: "green",
-                    edgestroke: "blue",
-                    edgefill: "blue",
-                    edgestrokewidth: 1,
-                    edgefontsize: "10px",
-                    edgeseparator: ", "
-                }, chartOpt),
-
-                graph = new Graph(),
-                layouter,
-                renderer,
-                row,
-                i,
-                edge,
-                source,
-                target,
-                label,
-
-                // custom node rendering using Raphael.
-                nodeRenderer = function (color, URL) {
-                    return function (r, n) {
-                        return r.set()
-                            // rectangle
-                            .push(r.rect(n.point[0],
-                                        n.point[1],
-                                        n.label.length * opt.nodepadding,
-                                        opt.nodeheight)
-                                 .attr({"fill": color,
-                                        "stroke-width": opt.nodestrokewidth,
-                                        "r" : opt.nodecornerradius}))
-                           // label inside rectangle
-                            .push(r.text(n.point[0] + n.label.length * opt.nodepadding / 2,
-                                        n.point[1] + opt.nodeheight / 2,
-                                        n.label)
-                                 .attr({"font-size": opt.nodefontsize})
-                                 .click(function () { if (URL) { window.open(sgvizler.parser.unprefixify(URL)); } })
-                                );
-                    };
-                },
-
-                // helper function.
-                addNode = function (URL, name, color) {
-                    graph.addNode(URL, {label: name, render: nodeRenderer(color, URL)});
-                    //console.log("add node - name: " + name + ", URL: " + URL);
-                },
-                edges = {},
-                keys_edges = [];
-
-            for (row = 0; row < numberOfRows; row += 1) {
-                source = data.getValue(row, 0);
-                target = data.getValue(row, 2);
-
-                // add source node
-                // Note: dracula library takes care of duplicates?
-                if (source) {
-                    addNode(source,
-                            data.getValue(row, 1) || source,
-                            numberOfColumns > 5 ? data.getValue(row, 5) : opt.nodecolor);
-                }
-                // add target node
-                if (target) {
-                    addNode(target,
-                            data.getValue(row, 3) || target,
-                            numberOfColumns > 6 ? data.getValue(row, 6) : opt.nodecolor);
-                }
-
-                // collect edge labels. Only one edge per pair of nodes,
-                // so we concatinate labels of multiple edges into one.
-                if (source && target) {
-                    label = "";
-                    // test if source--target pair is seen before:
-                    if (typeof edges[source + target] !== 'undefined') {
-                        label = edges[source + target].label; // retrieve accumulated label.
-                    } else {
-                        keys_edges.push(source + target);
-                    }
-
-                    if (numberOfColumns > 4 && data.getValue(row, 4).length > 0) {
-                        if (label.length > 0) {
-                            label += opt.edgeseparator;
-                        }
-                        label += data.getValue(row, 4);
-                    }
-
-                    edges[source + target] = {
-                        'source': source,
-                        'target': target,
-                        'label': label
-                    };
-                }
-            }
-
-            // add edges
-            for (i = 0; i < keys_edges.length; i += 1) {
-                edge = edges[keys_edges[i]];
-                //console.log("add edge - source: " + edge.source + ", target " + edge.target);
-                graph.addEdge(edge.source, edge.target,
-                              { "stroke": opt.edgestroke,
-                                "fill": opt.edgefill,
-                                "label": edge.label,
-                                "width": opt.edgestrokewidth,
-                                "fontsize": opt.edgefontsize
-                              });
-            }
-
-            layouter = new Graph.Layout.Spring(graph);
-            layouter.layout();
-
-            $(this.container).empty();
-            renderer = new Graph.Renderer.Raphael(this.container, graph, opt.width, opt.height, {"noderadius": opt.nodeheight * opt.noderadius});
-            renderer.draw();
-        }
-    };    /** sDefList **
-
-
-     Make a html dt list.
-
-
-     Format, 2--N columns:
-     1. Term
-     2--N. Definition
-
-
-     Available options:
-     'cellSep'   :  string (can be html) to separate cells in definition columns. (default: ' ')
-     'termPrefix  :  string (can be html) to prefix each term with. (default: '')
-     'termPostfix :  string (can be html) to postfix each term with. (default: ':')
-     'definitionPrefix  :  string (can be html) to prefix each definition with. (default: '')
-     'definitionPostfix :  string (can be html) to postfix each definition with. (default: '')
-    */
-    sgvizler.chart.DefList = function (container) { this.container = container; };
-    sgvizler.chart.DefList.prototype = {
-        id:   "sDefList",
-        draw: function (data, chartOpt) {
-            var r,
-                c,
-                term,
-                definition,
-                noColumns = data.getNumberOfColumns(),
-                noRows = data.getNumberOfRows(),
-                opt = $.extend({ cellSep: ' ', termPrefix: '', termPostfix: ':', definitionPrefix: '', definitionPostfix: '' }, chartOpt),
-                list = $(document.createElement('dl'));
-
-
-            for (r = 0; r < noRows; r += 1) {
-                term = opt.termPrefix + data.getValue(r, 0) + opt.termPostfix;
-                list.append($(document.createElement('dt')).html(term));
-                definition = opt.definitionPrefix;
-                for (c = 1; c < noColumns; c += 1) {
-                    definition += data.getValue(r, c);
-                    if (c + 1 !== noColumns) {
-                        definition += opt.cellSep;
-                    }
-                }
-                definition += opt.definitionPostfix;
-                list.append($(document.createElement('dd')).html(definition));
-            }
-            $(this.container).empty();
-            $(this.container).append(list);
-        }
-    };
-    /** sList **
-
-
-     Make a html list, either numbered (ol) or bullets (ul). Each row
-     becomes a list item.
-
-
-     Any number of columns in any format. Everything is displayed as text.
-
-
-     Available options:
-     'list'      :  "ol" / "ul"  (default: "ul")
-     'cellSep'   :  string (can be html) to separate cells in row. (default: ', ')
-     'rowPrefix  :  string (can be html) to prefix each row with. (default: '')
-     'rowPostfix :  string (can be html) to postfix each row with. (default: '')
-    */
-    sgvizler.chart.List = function (container) { this.container = container; };
-    sgvizler.chart.List.prototype = {
-        id:   "sList",
-        draw: function (data, chartOpt) {
-            var noColumns = data.getNumberOfColumns(),
-                noRows = data.getNumberOfRows(),
-                opt = $.extend({ list: 'ul', cellSep: ', ', rowPrefix: '', rowPostfix: '' }, chartOpt),
-                list = $(document.createElement(opt.list)),
-                r,
-                c,
-                rowtext;
-
-
-            for (r = 0; r < noRows; r += 1) {
-                rowtext = opt.rowPrefix;
-                for (c = 0; c < noColumns; c += 1) {
-                    rowtext += data.getValue(r, c);
-                    if (c + 1 !== noColumns) {
-                        rowtext += opt.cellSep;
-                    }
-                }
-                rowtext += opt.rowPostfix;
-                list.append($(document.createElement('li')).html(rowtext));
-            }
-            $(this.container).empty();
-            $(this.container).append(list);
-        }
-    };
-
-
-    /** sMap **
-
-
-     Extends gMap in markers dataMode. Draws textboxes with heading,
-     paragraph, link and image. The idea is to put all columns > 2 into
-     the 3. column with html formatting.
-
-
-     - Data Format 2--6 columns:
-       1. lat
-       2. long
-       3. name  (optional)
-       4. text  (optional)
-       5. link  (optional)
-       6. image (optional)
-
-
-     - If < 4 columns, then behaves just as gMap
-     - Only 6 columns will be read, columns > 6 are ignored.
-    */
-    sgvizler.chart.sMap = function (container) { this.container = container; };
-    sgvizler.chart.sMap.prototype = {
-        id:   "sMap",
-        draw: function (data, chartOpt) {
-            var chart,
-                newData,
-                newValue,
-                noColumns = data.getNumberOfColumns(),
-                r,
-                c;
-
-
-            if (noColumns > 3) {
-                newData = data.clone();
-                // drop columns > 3 from new
-                for (c = noColumns - 1; c > 2; c -= 1) {
-                    newData.removeColumn(c);
-                }
-
-
-                // build new 3. column
-                for (r = 0; r < data.getNumberOfRows(); r += 1) {
-                    newValue = "<div class='sgvizler sgvizler-sMap'>";
-                    newValue += "<h1>" + data.getValue(r, 2) + "</h1>";
-                    if (5 < noColumns && data.getValue(r, 5) !== null) {
-                        newValue += "<div class='img'><img src='" + data.getValue(r, 5) + "'/></div>";
-                    }
-                    if (3 < noColumns && data.getValue(r, 3) !== null) {
-                        newValue += "<p class='text'>" + data.getValue(r, 3) + "</p>";
-                    }
-                    if (4 < noColumns && data.getValue(r, 4) !== null) {
-                        newValue += "<p class='link'><a href='" + sgvizler.parser.unprefixify(data.getValue(r, 4)) + "'>" + data.getValue(r, 4) + "</a></p>";
-                    }
-                    newValue += "</div>";
-                    newData.setCell(r, 2, newValue);
-                }
-            } else { // do nothing.
-                newData = data;
-            }
-
-
-            chart = new google.visualization.Map(this.container);
-            chart.draw(newData, chartOpt);
-        }
-    };
-
-
-    /** sTable **
-
-
-     Make a html table.
-
-
-     Available options:
-     'headings'   :  "true" / "false"  (default: "true")
-    */
-    sgvizler.chart.Table = function (container) { this.container = container; };
-    sgvizler.chart.Table.prototype = {
-        id:   "sTable",
-        draw: function (data, chartOpt) {
-            var noColumns = data.getNumberOfColumns(),
-                noRows = data.getNumberOfRows(),
-                opt = $.extend({'headings': true }, chartOpt),
-                table = $(document.createElement('table')),
-                c,
-                r,
-                row;
-
-
-            if (opt.headings) {
-                row = $(document.createElement('tr'));
-                for (c = 0; c < noColumns; c += 1) {
-                    row.append($(document.createElement('th')).html(data.getColumnLabel(c)));
-                }
-                table.append(row);
-            }
-
-
-            for (r = 0; r < noRows; r += 1) {
-                row = $(document.createElement('tr'));
-                for (c = 0; c < noColumns; c += 1) {
-                    row.append($(document.createElement('td')).html(data.getValue(r, c)));
-                }
-                table.append(row);
-            }
-            $(this.container).empty();
-            $(this.container).append(table);
-        }
-    };
-
-    /** sText **
-
-
-     Write text.
-
-
-     Any number of columns. Everything is displayed as text.
-
-
-     Available options:
-     'cellSep'       :  string (can be html) to separate cells in each column. (default: ', ')
-     'cellPrefix     :  string (can be html) to prefix each cell with. (default: '')
-     'cellPostfix    :  string (can be html) to postfix each cell  with. (default: '')
-     'rowPrefix      :  string (can be html) to prefix each row with. (default: '<p>')
-     'rowPostfix     :  string (can be html) to postfix each row with. (default: '</p>')
-     'resultsPrefix  :  string (can be html) to prefix the results with. (default: '<div>')
-     'resultsPostfix :  string (can be html) to postfix the results with. (default: '</div>')
-    */
-    sgvizler.chart.Text = function (container) { this.container = container; };
-    sgvizler.chart.Text.prototype = {
-        id:   "sText",
-        draw: function (data, chartOpt) {
-            var noColumns = data.getNumberOfColumns(),
-                noRows = data.getNumberOfRows(),
-                opt = $.extend({ cellSep: ', ',
-                                 cellPrefix: '', cellPostfix: '',
-                                 rowPrefix: '<p>', rowPostfix: '</p>',
-                                 resultsPrefix: '<div>', resultsPostfix: '</div>' },
-                               chartOpt),
-                text = opt.resultsPrefix,
-                r,
-                c,
-                row;
-
-
-            for (r = 0; r < noRows; r += 1) {
-                row = opt.rowPrefix;
-                for (c = 0; c < noColumns; c += 1) {
-                    row += opt.cellPrefix + data.getValue(r, c) + opt.cellPostfix;
-                    if (c + 1 !== noColumns) {
-                        row += opt.cellSep;
-                    }
-                }
-                text += row + opt.rowPostfix;
-            }
-            text += opt.resultsPostfix;
-
-
-            $(this.container).empty();
-            $(this.container).html(text);
-        }
-    };
-    global.sgvizler = sgvizler;
-}(window));


[4/5] git commit: MARMOTTA-468: removed sgvizler webjar module from marmotta MARMOTTA-416: no more d3.js in the source

Posted by ja...@apache.org.
MARMOTTA-468: removed sgvizler webjar module from marmotta
MARMOTTA-416: no more d3.js in the source


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/c4efc812
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/c4efc812
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/c4efc812

Branch: refs/heads/develop
Commit: c4efc8125362db932548f19d5a38885fd9e0c311
Parents: 7ab48b8
Author: Jakob Frank <ja...@apache.org>
Authored: Mon Mar 17 11:52:00 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Mon Mar 17 11:52:00 2014 +0100

----------------------------------------------------------------------
 extras/webjars/pom.xml                          |    1 -
 extras/webjars/sgvizler/pom.xml                 |   88 --
 .../webjars/sgvizler/src/main/resources/LICENSE |   16 -
 .../sgvizler/src/main/resources/REVISION        |    1 -
 .../src/main/resources/lib/d3.v2.min.js         |    4 -
 .../resources/lib/raphael-dracula.pack.min.js   |    7 -
 .../src/main/resources/sgvizler.chart.css       |   37 -
 .../sgvizler/src/main/resources/sgvizler.html   |  114 --
 .../sgvizler/src/main/resources/sgvizler.js     | 1277 ------------------
 9 files changed, 1545 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/pom.xml
----------------------------------------------------------------------
diff --git a/extras/webjars/pom.xml b/extras/webjars/pom.xml
index 05e6671..704280b 100644
--- a/extras/webjars/pom.xml
+++ b/extras/webjars/pom.xml
@@ -49,7 +49,6 @@
     <modules>
         <module>snorql</module>
         <module>codemirror</module>
-        <module>sgvizler</module>
         <module>strftime</module>
     </modules>
     

http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/pom.xml
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/pom.xml b/extras/webjars/sgvizler/pom.xml
deleted file mode 100644
index 93e99d9..0000000
--- a/extras/webjars/sgvizler/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.marmotta</groupId>
-        <artifactId>marmotta-parent</artifactId>
-        <version>3.2.0-SNAPSHOT</version>
-        <relativePath>../../../parent/</relativePath> 
-    </parent>
-
-    <name>Marmotta WebJar: sgvizler</name>
-    <groupId>org.apache.marmotta.webjars</groupId>
-    <artifactId>sgvizler</artifactId>
-    <packaging>jar</packaging>
-
-    <properties>
-        <webjar.version>0.5.1</webjar.version>
-    </properties>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.sonatype.plugins</groupId>
-                <artifactId>yuicompressor-maven-plugin</artifactId>
-                <version>1.0.0</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>aggregate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <nomunge>true</nomunge>
-                    <jswarn>false</jswarn>
-                    <sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
-                    <output>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${webjar.version}/sgvizler.js</output>
-                </configuration>
-            </plugin>
-            <plugin>
-                <!-- these are "extras", so they come from 3rd parties, no RAT check! -->
-                <groupId>org.apache.rat</groupId>
-                <artifactId>apache-rat-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>src/**</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.zeroturnaround</groupId>
-                <artifactId>jrebel-maven-plugin</artifactId>
-                <configuration>
-                    <relativePath>../../../</relativePath>
-                </configuration>
-            </plugin>
-        </plugins>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-                <excludes>
-                    <exclude>**/*.js</exclude>
-                </excludes>
-                <filtering>false</filtering>
-                <targetPath>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${webjar.version}</targetPath>
-            </resource>
-        </resources>
-     </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/LICENSE
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/LICENSE b/extras/webjars/sgvizler/src/main/resources/LICENSE
deleted file mode 100644
index 0e50dba..0000000
--- a/extras/webjars/sgvizler/src/main/resources/LICENSE
+++ /dev/null
@@ -1,16 +0,0 @@
-Copyright (c) 2011 Martin G. Skjæveland
-
-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 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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/REVISION
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/REVISION b/extras/webjars/sgvizler/src/main/resources/REVISION
deleted file mode 100644
index 4dc1283..0000000
--- a/extras/webjars/sgvizler/src/main/resources/REVISION
+++ /dev/null
@@ -1 +0,0 @@
-172:173


[2/5] MARMOTTA-468: removed sgvizler webjar module from marmotta MARMOTTA-416: no more d3.js in the source

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/lib/raphael-dracula.pack.min.js
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/lib/raphael-dracula.pack.min.js b/extras/webjars/sgvizler/src/main/resources/lib/raphael-dracula.pack.min.js
deleted file mode 100644
index 1bf619e..0000000
--- a/extras/webjars/sgvizler/src/main/resources/lib/raphael-dracula.pack.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Raphael 1.3.1 - JavaScript Vector Library
- *
- * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
- * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
- */function log(a){console.log&&console.log(a)}Raphael=function(){function Q(a,b,c){function d(){var e=Array[r].slice.call(arguments,0),f=e[p]("►"),g=d.cache=d.cache||{},h=d.count=d.count||[];return g[o](f)?c?c(g[f]):g[f]:(h[q]>=1e3&&delete g[h.shift()],h[B](f),g[f]=a[i](b,e),c?c(g[f]):g[f])}return d}function bE(){return this.x+l+this.y}function bO(a){return function(b,c,d,e){var g={back:a};return f.is(d,"function")?e=d:g.rot=d,b&&b.constructor==br&&(b=b.attrs.path),b&&(g.along=b),this.animate(g,c,e)}}var a=/[, ]+/,b=/^(circle|rect|path|ellipse|text|image)$/,c=document,d=window,e={was:"Raphael"in d,is:d.Raphael},f=function(){if(f.is(arguments[0],"array")){var a=arguments[0],c=by[i](f,a.splice(0,3+f.is(a[0],w))),d=c.set();for(var e=0,g=a[q];e<g;e++){var h=a[e]||{};b.test(h.type)&&d[B](c[h.type]().attr(h))}return d}return by[i](f,arguments)},g=function(){},h="appendChild",i="apply",j="concat",k="",l=" ",m="split",n="click dblclick mousedown mousemove mouseout mouseover mouseup"[m](l
 ),o="hasOwnProperty",p="join",q="length",r="prototype",s=String[r].toLowerCase,t=Math,u=t.max,v=t.min,w="number",x="toString",y=Object[r][x],z={},A=t.pow,B="push",C=/^(?=[\da-f]$)/,D=/^url\(['"]?([^\)]+)['"]?\)$/i,E=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,F=t.round,G="setAttribute",H=parseFloat,I=parseInt,J=String[r].toUpperCase,K={"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,targe
 t:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},L={along:"along","clip-rect":"csv",cx:w,cy:w,fill:"colour","fill-opacity":w,"font-size":w,height:w,opacity:w,path:"path",r:w,rotation:"csv",rx:w,ry:w,scale:"csv",stroke:"colour","stroke-opacity":w,"stroke-width":w,translation:"csv",width:w,x:w,y:w},M="replace";f.version="1.3.1",f.type=d.SVGAngle||c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(f.type=="VML"){var N=document.createElement("div");N.innerHTML="<!--[if vml]><br><br><![endif]-->";if(N.childNodes[q]!=2)return null}f.svg=!(f.vml=f.type=="VML"),g[r]=f[r],f._id=0,f._oid=0,f.fn={},f.is=function(a,b){return b=s.call(b),(b=="object"||b=="undefined")&&typeof a==b||a==null&&b=="null"||s.call(y.call(a).slice(8,-1))==b},f.setWindow=function(a){d=a,c=d.document};var O=function(a){if(f.vml){var b=/^\s+|\s+$/g;O=Q(function(a){var c;a=(a+k)[M](b,k);try{var d=new ActiveXObject("htmlfile");d.write("<bo
 dy>"),d.close(),c=d.body}catch(e){c=createPopup().document.body}var f=c.createTextRange();try{c.style.color=a;var g=f.queryCommandValue("ForeColor");return g=(g&255)<<16|g&65280|(g&16711680)>>>16,"#"+("000000"+g[x](16)).slice(-6)}catch(e){return"none"}})}else{var d=c.createElement("i");d.title="Raphaël Colour Picker",d.style.display="none",c.body[h](d),O=Q(function(a){return d.style.color=a,c.defaultView.getComputedStyle(d,k).getPropertyValue("color")})}return O(a)};f.hsb2rgb=Q(function(a,b,c){f.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h);var d,e,g;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1)a/=255,b/=255,c/=255;var h=~~(a*6),i=a*6-h,j=c*(1-b),k=c*(1-b*i),l=c*(1-b*(1-i));d=[c,k,j,j,l,c,c][h],e=[l,c,c,k,j,j,l][h],g=[j,j,l,c,c,k,j][h],d*=255,e*=255,g*=255;var m={r:d,g:e,b:g},n=(~~d)[x](16),o=(~~e)[x](16),p=(~~g)[x](16);return n=n[M](C,"0"),o=o[M](C,"0"),p=p[M](C,"0"),m.hex="#"+n+o+p,m},f),f.rgb2hsb=Q(function(a,b,c){f.is(a,"object")&&"r"in a&&"g"in a&&"
 b"in a&&(c=a.b,b=a.g,a=a.r);if(f.is(a,"string")){var d=f.getRGB(a);a=d.r,b=d.g,c=d.b}if(a>1||b>1||c>1)a/=255,b/=255,c/=255;var e=u(a,b,c),g=v(a,b,c),h,i,j=e;if(g==e)return{h:0,s:0,b:e};var k=e-g;return i=k/e,a==e?h=(b-c)/k:b==e?h=2+(c-a)/k:h=4+(a-b)/k,h/=6,h<0&&h++,h>1&&h--,{h:h,s:i,b:j}},f);var P=/,?([achlmqrstvxz]),?/gi;f._path2string=function(){return this.join(",")[M](P,"$1")},f.getRGB=Q(function(a){if(!a||!!((a+=k).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!{hs:1,rg:1}[o](a.substring(0,2))&&a.charAt()!="#"&&(a=O(a));var b,c,d,e,g,h=a.match(E);if(h){h[2]&&(e=I(h[2].substring(5),16),d=I(h[2].substring(3,5),16),c=I(h[2].substring(1,3),16)),h[3]&&(e=I((g=h[3].charAt(3))+g,16),d=I((g=h[3].charAt(2))+g,16),c=I((g=h[3].charAt(1))+g,16)),h[4]&&(h=h[4][m](/\s*,\s*/),c=H(h[0]),d=H(h[1]),e=H(h[2])),h[5]&&(h=h[5][m](/\s*,\s*/),c=H(h[0])*2.55,d=H(h[1])*2.55,e=H(h[2])*2.55);if(h[6])return h=h[6][m](/\s*,\s*/),c=H(h[0]),d=H(h[1]),
 e=H(h[2]),f.hsb2rgb(c,d,e);if(h[7])return h=h[7][m](/\s*,\s*/),c=H(h[0])*2.55,d=H(h[1])*2.55,e=H(h[2])*2.55,f.hsb2rgb(c,d,e);h={r:c,g:d,b:e};var i=(~~c)[x](16),j=(~~d)[x](16),l=(~~e)[x](16);return i=i[M](C,"0"),j=j[M](C,"0"),l=l[M](C,"0"),h.hex="#"+i+j+l,h}return{r:-1,g:-1,b:-1,hex:"none",error:1}},f),f.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},f.getColor.reset=function(){delete this.start},f.parsePathString=Q(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];return f.is(a,"array")&&f.is(a[0],"array")&&(c=S(a)),c[q]||(a+k)[M](/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(a,d,e){var f=[],g=s.call(d);e[M](/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(a,b){b&&f[B](+b)});while(f[q]>=b[g]){c[B]([d][j](f.splice(0,b[g])));if(!b[g])break}}),c[x]=f._path2string,c}),f.
 findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,l=A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h,m=a+2*i*(c-a)+i*i*(e-2*c+a),n=b+2*i*(d-b)+i*i*(f-2*d+b),o=c+2*i*(e-c)+i*i*(g-2*e+c),p=d+2*i*(f-d)+i*i*(h-2*f+d),q=(1-i)*a+i*c,r=(1-i)*b+i*d,s=(1-i)*e+i*g,u=(1-i)*f+i*h,v=90-t.atan((m-o)/(n-p))*180/t.PI;return(m>o||n<p)&&(v+=180),{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:u},alpha:v}};var R=Q(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=$(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a[q];g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d[B](b),e[B](c);else{var k=Z(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[j](k.min.x,k.max.x),e=e[j](k.min.y,k.max.y),b=f[5],c=f[6]}}var l=v[i](0,d),m=v[i](0,e);return{x:l,y:m,width:u[i](0,d)-l,height:u[i](0,e)-m}}),S=function(a){var b=[];if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);for(var c=0,d=a[q];c<d;c++){b[c]=[];for(var e=0,g=a[c][q];e<g;e++)b[c][e]=a[c][e]}return b[x]=f._path
 2string,b},T=Q(function(a){if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);var b=[],c=0,d=0,e=0,g=0,h=0;a[0][0]=="M"&&(c=a[0][1],d=a[0][2],e=c,g=d,h++,b[B](["M",c,d]));for(var i=h,j=a[q];i<j;i++){var k=b[i]=[],l=a[i];if(l[0]!=s.call(l[0])){k[0]=s.call(l[0]);switch(k[0]){case"a":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]-c).toFixed(3),k[7]=+(l[7]-d).toFixed(3);break;case"v":k[1]=+(l[1]-d).toFixed(3);break;case"m":e=l[1],g=l[2];default:for(var m=1,n=l[q];m<n;m++)k[m]=+(l[m]-(m%2?c:d)).toFixed(3)}}else{k=b[i]=[],l[0]=="m"&&(e=l[1]+c,g=l[2]+d);for(var o=0,p=l[q];o<p;o++)b[i][o]=l[o]}var r=b[i][q];switch(b[i][0]){case"z":c=e,d=g;break;case"h":c+=+b[i][r-1];break;case"v":d+=+b[i][r-1];break;default:c+=+b[i][r-2],d+=+b[i][r-1]}}return b[x]=f._path2string,b},0,S),U=Q(function(a){if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);var b=[],c=0,d=0,e=0,g=0,h=0;a[0][0]=="M"&&(c=+a[0][1],d=+a[0][2],e=c,g=d,h++,b[0]=["M",c,d]);for(var i=h,j=a[
 q];i<j;i++){var k=b[i]=[],l=a[i];if(l[0]!=J.call(l[0])){k[0]=J.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+c),k[7]=+(l[7]+d);break;case"V":k[1]=+l[1]+d;break;case"H":k[1]=+l[1]+c;break;case"M":e=+l[1]+c,g=+l[2]+d;default:for(var m=1,n=l[q];m<n;m++)k[m]=+l[m]+(m%2?c:d)}}else for(var o=0,p=l[q];o<p;o++)b[i][o]=l[o];switch(k[0]){case"Z":c=e,d=g;break;case"H":c=k[1];break;case"V":d=k[1];break;default:c=b[i][b[i][q]-2],d=b[i][b[i][q]-1]}}return b[x]=f._path2string,b},null,S),V=function(a,b,c,d){return[a,b,c,d,c,d]},W=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},X=function(a,b,c,d,e,f,g,h,i,k){var l=t.PI,n=l*120/180,o=l/180*(+e||0),r=[],s,v=Q(function(a,b,c){var d=a*t.cos(c)-b*t.sin(c),e=a*t.sin(c)+b*t.cos(c);return{x:d,y:e}});if(!k){s=v(a,b,-o),a=s.x,b=s.y,s=v(h,i,-o),h=s.x,i=s.y;var w=t.cos(l/180*e),x=t.sin(l/180*e),y=(a-h)/2,z=(b-i)/2;c=u(c,t.abs(y)),d=u(d,t.abs(z));var A=y*y/(c*c)+z*z/(d*d);A>1&&(c
 =t.sqrt(A)*c,d=t.sqrt(A)*d);var B=c*c,C=d*d,D=(f==g?-1:1)*t.sqrt(t.abs((B*C-B*z*z-C*y*y)/(B*z*z+C*y*y))),E=D*c*z/d+(a+h)/2,F=D*-d*y/c+(b+i)/2,G=t.asin(((b-F)/d).toFixed(7)),H=t.asin(((i-F)/d).toFixed(7));G=a<E?l-G:G,H=h<E?l-H:H,G<0&&(G=l*2+G),H<0&&(H=l*2+H),g&&G>H&&(G-=l*2),!g&&H>G&&(H-=l*2)}else G=k[0],H=k[1],E=k[2],F=k[3];var I=H-G;if(t.abs(I)>n){var J=H,K=h,L=i;H=G+n*(g&&H>G?1:-1),h=E+c*t.cos(H),i=F+d*t.sin(H),r=X(h,i,c,d,e,0,g,K,L,[H,J,E,F])}I=H-G;var M=t.cos(G),N=t.sin(G),O=t.cos(H),P=t.sin(H),R=t.tan(I/4),S=4/3*c*R,T=4/3*d*R,U=[a,b],V=[a+S*N,b-T*M],W=[h+S*P,i-T*O],Y=[h,i];V[0]=2*U[0]-V[0],V[1]=2*U[1]-V[1];if(k)return[V,W,Y][j](r);r=[V,W,Y][j](r)[p]()[m](",");var Z=[];for(var $=0,_=r[q];$<_;$++)Z[$]=$%2?v(r[$-1],r[$],o).y:v(r[$],r[$+1],o).x;return Z},Y=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},Z=Q(function(a,b,c,d,e,f,g,h){var j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+t.sqrt(k*k-4
 *j*l))/2/j,n=(-k-t.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g],q;return t.abs(m)>1e12&&(m=.5),t.abs(n)>1e12&&(n=.5),m>0&&m<1&&(q=Y(a,b,c,d,e,f,g,h,m),p[B](q.x),o[B](q.y)),n>0&&n<1&&(q=Y(a,b,c,d,e,f,g,h,n),p[B](q.x),o[B](q.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+t.sqrt(k*k-4*j*l))/2/j,n=(-k-t.sqrt(k*k-4*j*l))/2/j,t.abs(m)>1e12&&(m=.5),t.abs(n)>1e12&&(n=.5),m>0&&m<1&&(q=Y(a,b,c,d,e,f,g,h,m),p[B](q.x),o[B](q.y)),n>0&&n<1&&(q=Y(a,b,c,d,e,f,g,h,n),p[B](q.x),o[B](q.y)),{min:{x:v[i](0,p),y:v[i](0,o)},max:{x:u[i](0,p),y:u[i](0,o)}}}),$=Q(function(a,b){var c=U(a),d=b&&U(b),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][j](X[i](0,[b.x,b.y][j](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][j](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.
 x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][j](W(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][j](W(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][j](V(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][j](V(b.x,b.y,a[1],b.y));break;case"V":a=["C"][j](V(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][j](V(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b][q]>7){a[b].shift();var e=a[b];while(e[q])a.splice(b++,0,["C"][j](e.splice(0,6)));a.splice(b,1),m=u(c[q],d&&d[q]||0)}},k=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],m=u(c[q],d&&d[q]||0))};for(var l=0,m=u(c[q],d&&d[q]||0);l<m;l++){c[l]=g(c[l],e),h(c,l),d&&(d[l]=g(d[l],f)),d&&h(d,l),k(c,d,e,f,l),k(d,c,f,e,l);var n=c[l],o=d&&d[l],p=n[q],r=d&&o[q];e.x=n[p-2],e.y=n[p-1],e.bx=H(n[p-4])||e.x,e.by=H(n[p-3])||e.y,f.bx=d&&(H(o[r-4])||f.x),f.by=d&&(H(o[r-3])||f.y),f.x=d&&o[r-2],f.y=d&&o[r-1]}return d?[c,d]:c},null,S),_=Q(function(a){var b=[];for(var c=0,d=a
 [q];c<d;c++){var e={},g=a[c].match(/^([^:]*):?([\d\.]*)/);e.color=f.getRGB(g[1]);if(e.color.error)return null;e.color=e.color.hex,g[2]&&(e.offset=g[2]+"%"),b[B](e)}for(var c=1,d=b[q]-1;c<d;c++)if(!b[c].offset){var h=H(b[c-1].offset||0),i=0;for(var j=c+1;j<d;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=d),i=H(i);var k=(i-h)/(j-c+1);for(;c<j;c++)h+=k,b[c].offset=h+"%"}return b}),ba=function(){var a,b,d,e,g;if(f.is(arguments[0],"string")||f.is(arguments[0],"object")){f.is(arguments[0],"string")?a=c.getElementById(arguments[0]):a=arguments[0];if(a.tagName)return arguments[1]==null?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:arguments[1],height:arguments[2]}}else if(f.is(arguments[0],w)&&arguments[q]>3)return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]}},bb=function(a,b){var c=this;for(var d in b)if(b[o](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a==
 =c?b:function(){return b[i](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{},bb.call(this,a[d],b[d]);break;default:a[d]=b[d]}},bc=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bd=function(a,b){if(b.top===a)return;bc(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a},be=function(a,b){if(b.bottom===a)return;bc(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a},bf=function(a,b,c){bc(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bg=function(a,b,c){bc(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bh=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}},bi=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(f.svg){g[r].svgns="http://www.w3.org/2000/svg",g[r].xlink="http://www.w3.org/1999/xlink";var F=function(a){return+a+(~~a===a)*.5},bj=function(a){for(var b=0,c
 =a[q];b<c;b++)if(s.call(a[b][0])!="a")for(var d=1,e=a[b][q];d<e;d++)a[b][d]=F(a[b][d]);else a[b][6]=F(a[b][6]),a[b][7]=F(a[b][7]);return a},bk=function(a,b){if(!b)return c.createElementNS(g[r].svgns,a);for(var d in b)b[o](d)&&a[G](d,b[d])};f[x]=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bl=function(a,b){var c=bk("path");b.canvas&&b.canvas[h](c);var d=new br(c,b);return d.type="path",bo(d,{fill:"none",stroke:"#000",path:a}),d},bm=function(a,b,c){var d="linear",e=.5,g=.5,i=a.style;b=(b+k)[M](bi,function(a,b,c){d="radial";if(b&&c){e=H(b),g=H(c);var f=(g>.5)*2-1;A(e-.5,2)+A(g-.5,2)>.25&&(g=t.sqrt(.25-A(e-.5,2))*f+.5)&&g!=.5&&(g=g.toFixed(5)-1e-5*f)}return k}),b=b[m](/\s*\-\s*/);if(d=="linear"){var j=b.shift();j=-H(j);if(isNaN(j))return null;var l=[0,0,t.cos(j*t.PI/180),t.sin(j*t.PI/180)],n=1/(u(t.abs(l[2]),t.abs(l[3]))||1);l[2]*=n,l[3]*=n,l[2]<0&&(l[0]=-l[2],l[2]=0),l[3]<0&&(l[1]=-l[3],l[3]=0)}var o=_(b);if(!o)return null;var p=bk(d+"Gradi
 ent");p.id="r"+(f._id++)[x](36),bk(p,d=="radial"?{fx:e,fy:g}:{x1:l[0],y1:l[1],x2:l[2],y2:l[3]}),c.defs[h](p);for(var r=0,s=o[q];r<s;r++){var v=bk("stop");bk(v,{offset:o[r].offset?o[r].offset:r?"100%":"0%","stop-color":o[r].color||"#fff"}),p[h](v)}return bk(a,{fill:"url(#"+p.id+")",opacity:1,"fill-opacity":1}),i.fill=k,i.opacity=1,i.fillOpacity=1,1},bn=function(a){var b=a.getBBox();bk(a.pattern,{patternTransform:f.format("translate({0},{1})",b.x,b.y)})},bo=function(b,d){var e={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},g=b.node,i=b.attrs,j=b.rotate(),n=function(a,b){b=e[s.call(b)];if(b){var c=a.attrs["stroke-width"]||"1",f={round:c,square:c,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,h=[],i=b[q];while(i--)h[i]=b[i]*c+(i%2?1:-1)*f;bk(g,{"stroke-dasharray":h[p](",")})}};d[o]("rotation")&&(j=d.rotation);var r=(j+k)[m](a);r.length-1?(r[1]=+r[1],r[2]=+r[2]):r=n
 ull,H(j)&&b.rotate(0,!0);for(var t in d)if(d[o](t)){if(!K[o](t))continue;var u=d[t];i[t]=u;switch(t){case"rotation":b.rotate(u,!0);break;case"href":case"title":case"target":var v=g.parentNode;if(s.call(v.tagName)!="a"){var w=bk("a");v.insertBefore(w,g),w[h](g),v=w}v.setAttributeNS(b.paper.xlink,t,u);break;case"cursor":g.style.cursor=u;break;case"clip-rect":var y=(u+k)[m](a);if(y[q]==4){b.clip&&b.clip.parentNode.parentNode.removeChild(b.clip.parentNode);var z=bk("clipPath"),A=bk("rect");z.id="r"+(f._id++)[x](36),bk(A,{x:y[0],y:y[1],width:y[2],height:y[3]}),z[h](A),b.paper.defs[h](z),bk(g,{"clip-path":"url(#"+z.id+")"}),b.clip=A}if(!u){var B=c.getElementById(g.getAttribute("clip-path")[M](/(^url\(#|\)$)/g,k));B&&B.parentNode.removeChild(B),bk(g,{"clip-path":k}),delete b.clip}break;case"path":u&&b.type=="path"&&(i.path=bj(U(u)),bk(g,{d:i.path}));break;case"width":g[G](t,u);if(i.fx)t="x",u=i.x;else break;case"x":i.fx&&(u=-i.x-(i.width||0));case"rx":if(t=="rx"&&b.type=="rect")break;case"
 cx":r&&(t=="x"||t=="cx")&&(r[1]+=u-i[t]),g[G](t,F(u)),b.pattern&&bn(b);break;case"height":g[G](t,u);if(i.fy)t="y",u=i.y;else break;case"y":i.fy&&(u=-i.y-(i.height||0));case"ry":if(t=="ry"&&b.type=="rect")break;case"cy":r&&(t=="y"||t=="cy")&&(r[2]+=u-i[t]),g[G](t,F(u)),b.pattern&&bn(b);break;case"r":b.type=="rect"?bk(g,{rx:u,ry:u}):g[G](t,u);break;case"src":b.type=="image"&&g.setAttributeNS(b.paper.xlink,"href",u);break;case"stroke-width":g.style.strokeWidth=u,g[G](t,u),i["stroke-dasharray"]&&n(b,i["stroke-dasharray"]);break;case"stroke-dasharray":n(b,u);break;case"translation":var C=(u+k)[m](a);C[0]=+C[0]||0,C[1]=+C[1]||0,r&&(r[1]+=C[0],r[2]+=C[1]),bN.call(b,C[0],C[1]);break;case"scale":var C=(u+k)[m](a);b.scale(+C[0]||1,+C[1]||+C[0]||1,+C[2]||null,+C[3]||null);break;case"fill":var E=(u+k).match(D);if(E){var z=bk("pattern"),L=bk("image");z.id="r"+(f._id++)[x](36),bk(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),bk(L,{x:0,y:0}),L.setAttributeNS(b.paper.xlink,"href",E[1]
 ),z[h](L);var N=c.createElement("img");N.style.cssText="position:absolute;left:-9999em;top-9999em",N.onload=function(){bk(z,{width:this.offsetWidth,height:this.offsetHeight}),bk(L,{width:this.offsetWidth,height:this.offsetHeight}),c.body.removeChild(this),b.paper.safari()},c.body[h](N),N.src=E[1],b.paper.defs[h](z),g.style.fill="url(#"+z.id+")",bk(g,{fill:"url(#"+z.id+")"}),b.pattern=z,b.pattern&&bn(b);break}if(!f.getRGB(u).error)delete d.gradient,delete i.gradient,!f.is(i.opacity,"undefined")&&f.is(d.opacity,"undefined")&&bk(g,{opacity:i.opacity}),!f.is(i["fill-opacity"],"undefined")&&f.is(d["fill-opacity"],"undefined")&&bk(g,{"fill-opacity":i["fill-opacity"]});else if(({circle:1,ellipse:1}[o](b.type)||(u+k).charAt()!="r")&&bm(g,u,b.paper)){i.gradient=u,i.fill="none";break};case"stroke":g[G](t,f.getRGB(u).hex);break;case"gradient":((({circle:1,ellipse:1}))[o](b.type)||(u+k).charAt()!="r")&&bm(g,u,b.paper);break;case"opacity":case"fill-opacity":if(i.gradient){var O=c.getElementById(
 g.getAttribute("fill")[M](/^url\(#|\)$/g,k));if(O){var P=O.getElementsByTagName("stop");P[P[q]-1][G]("stop-opacity",u)}break};default:t=="font-size"&&(u=I(u,10)+"px");var Q=t[M](/(\-.)/g,function(a){return J.call(a.substring(1))});g.style[Q]=u,g[G](t,u)}}bq(b,d),r?b.rotate(r.join(l)):H(j)&&b.rotate(j,!0)},bp=1.2,bq=function(a,b){if(a.type!="text"||!(b[o]("text")||b[o]("font")||b[o]("font-size")||b[o]("x")||b[o]("y")))return;var d=a.attrs,e=a.node,f=e.firstChild?I(c.defaultView.getComputedStyle(e.firstChild,k).getPropertyValue("font-size"),10):10;if(b[o]("text")){d.text=b.text;while(e.firstChild)e.removeChild(e.firstChild);var g=(b.text+k)[m]("\n");for(var i=0,j=g[q];i<j;i++)if(g[i]){var l=bk("tspan");i&&bk(l,{dy:f*bp,x:d.x}),l[h](c.createTextNode(g[i])),e[h](l)}}else{var g=e.getElementsByTagName("tspan");for(var i=0,j=g[q];i<j;i++)i&&bk(g[i],{dy:f*bp,x:d.x})}bk(e,{y:d.y});var n=a.getBBox(),p=d.y-(n.y+n.height/2);p&&isFinite(p)&&bk(e,{y:d.y+p})},br=function(a,b){var c=0,d=0;this[0]=a
 ,this.id=f._oid++,this.node=a,a.raphael=this,this.paper=b,this.attrs=this.attrs||{},this.transformations=[],this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null};br[r].rotate=function(b,c,d){if(this.removed)return this;if(b==null)return this._.rt.cx?[this._.rt.deg,this._.rt.cx,this._.rt.cy][p](l):this._.rt.deg;var e=this.getBBox();return b=(b+k)[m](a),b[q]-1&&(c=H(b[1]),d=H(b[2])),b=H(b[0]),c!=null?this._.rt.deg=b:this._.rt.deg+=b,d==null&&(c=null),this._.rt.cx=c,this._.rt.cy=d,c=c==null?e.x+e.width/2:c,d=d==null?e.y+e.height/2:d,this._.rt.deg?(this.transformations[0]=f.format("rotate({0} {1} {2})",this._.rt.deg,c,d),this.clip&&bk(this.clip,{transform:f.format("rotate({0} {1} {2})",-this._.rt.deg,c,d)})):(this.transformations[0]=k,this.clip&&bk(this.clip,{transform:k})),bk(this.node,{transform:this.transformations[p](l)}),this},br[r].hide=function(){return!this.removed&&(this.node.style.displa
 y="none"),this},br[r].show=function(){return!this.removed&&(this.node.style.display=""),this},br[r].remove=function(){if(this.removed)return;bc(this,this.paper),this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=!0},br[r].getBBox=function(){if(this.removed)return this;if(this.type=="path")return R(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,e=this.node.getNumberOfChars();d<e;d++){var f=this.node.getExtentOfChar(d);f.y<b.y&&(b.y=f.y),f.y+f.height-b.y>b.height&&(b.height=f.y+f.height-b.y),f.x+f.width-b.x>b.width&&(b.width=f.x+f.width-b.x)}}return a&&this.hide(),b},br[r].attr=function(){if(this.removed)return this;if(arguments[q]==0){var a={};for(var b in this.attrs)this.attrs[o](b)&&(a[b]=this.attrs[b]);return this._.rt.deg&&(a.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(a.sc
 ale=this.scale()),a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient,a}if(arguments[q]==1&&f.is(arguments[0],"string"))return arguments[0]=="translation"?bN.call(this):arguments[0]=="rotation"?this.rotate():arguments[0]=="scale"?this.scale():arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient?this.attrs.gradient:this.attrs[arguments[0]];if(arguments[q]==1&&f.is(arguments[0],"array")){var c={};for(var d in arguments[0])arguments[0][o](d)&&(c[arguments[0][d]]=this.attrs[arguments[0][d]]);return c}if(arguments[q]==2){var e={};e[arguments[0]]=arguments[1],bo(this,e)}else arguments[q]==1&&f.is(arguments[0],"object")&&bo(this,arguments[0]);return this},br[r].toFront=function(){if(this.removed)return this;this.node.parentNode[h](this.node);var a=this.paper;return a.top!=this&&bd(this,a),this},br[r].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.first
 Child),be(this,this.paper);var a=this.paper}return this},br[r].insertAfter=function(a){if(this.removed)return this;var b=a.node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode[h](this.node),bf(this,a,this.paper),this},br[r].insertBefore=function(a){if(this.removed)return this;var b=a.node;return b.parentNode.insertBefore(this.node,b),bg(this,a,this.paper),this};var bs=function(a,b,c,d){b=F(b),c=F(c);var e=bk("circle");a.canvas&&a.canvas[h](e);var f=new br(e,a);return f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",bk(e,f.attrs),f},bt=function(a,b,c,d,e,f){b=F(b),c=F(c);var g=bk("rect");a.canvas&&a.canvas[h](g);var i=new br(g,a);return i.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},i.type="rect",bk(g,i.attrs),i},bu=function(a,b,c,d,e){b=F(b),c=F(c);var f=bk("ellipse");a.canvas&&a.canvas[h](f);var g=new br(f,a);return g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",bk(f
 ,g.attrs),g},bv=function(a,b,c,d,e,f){var g=bk("image");bk(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(a.xlink,"href",b),a.canvas&&a.canvas[h](g);var i=new br(g,a);return i.attrs={x:c,y:d,width:e,height:f,src:b},i.type="image",i},bw=function(a,b,c,d){var e=bk("text");bk(e,{x:b,y:c,"text-anchor":"middle"}),a.canvas&&a.canvas[h](e);var f=new br(e,a);return f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:K.font,stroke:"none",fill:"#000"},f.type="text",bo(f,f.attrs),f},bx=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas[G]("width",this.width),this.canvas[G]("height",this.height),this},by=function(){var a=ba[i](null,arguments),b=a&&a.container,d=a.x,e=a.y,j=a.width,k=a.height;if(!b)throw new Error("SVG container not found.");var l=bk("svg");return j=j||512,k=k||342,bk(l,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:j,height:k}),b==1?(l.style.cssText="position:absolute;left:"+d+"px;top:"+e+"px",c.body[h](l)):b.f
 irstChild?b.insertBefore(l,b.firstChild):b[h](l),b=new g,b.width=j,b.height=k,b.canvas=l,bb.call(b,b,f.fn),b.clear(),b};g[r].clear=function(){var a=this.canvas;while(a.firstChild)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=bk("desc"))[h](c.createTextNode("Created with Raphaël")),a[h](this.desc),a[h](this.defs=bk("defs"))},g[r].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bh(a)}}if(f.vml){var bz=function(a){var b=/[ahqstv]/ig,c=U;(a+k).match(b)&&(c=$),b=/[clmz]/g;if(c==U&&!(a+k).match(b)){var d={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},e=/([clmz]),?([^clmz]*)/gi,f=/-?[^,\s-]+/g,g=(a+k)[M](e,function(a,b,c){var e=[];return c[M](f,function(a){e[B](F(a))}),d[b]+e});return g}var h=c(a),i,g=[],j;for(var m=0,n=h[q];m<n;m++){i=h[m],j=s.call(h[m][0]),j=="z"&&(j="x");for(var o=1,r=i[q];o<r;o++)j+=F(i[o])+(o!=r-1?",":k);g[B](j)}return g[p](l)};f[x]=function(){return"Your browser doesn’t suppo
 rt SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var bl=function(a,b){var c=bA("group");c.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px",c.coordsize=b.coordsize,c.coordorigin=b.coordorigin;var d=bA("shape"),e=d.style;e.width=b.width+"px",e.height=b.height+"px",d.coordsize=this.coordsize,d.coordorigin=this.coordorigin,c[h](d);var f=new br(d,c,b);return f.isAbsolute=!0,f.type="path",f.path=[],f.Path=k,a&&bo(f,{fill:"none",stroke:"#000",path:a}),b.canvas[h](c),f},bo=function(b,d){b.attrs=b.attrs||{};var e=b.node,g=b.attrs,i=e.style,j,l=b;for(var n in d)d[o](n)&&(g[n]=d[n]);d.href&&(e.href=d.href),d.title&&(e.title=d.title),d.target&&(e.target=d.target),d.cursor&&(i.cursor=d.cursor),d.path&&b.type=="path"&&(g.path=d.path,e.path=bz(g.path)),d.rotation!=null&&b.rotate(d.rotation,!0),d.translation&&(j=(d.translation+k)[m](a),bN.call(b,j[0],j[1]),b._.rt.cx!=null&&(b._.rt.cx+=+j[0],b._.rt.cy+=+j[1],b.setBox(b.attrs,j[0],j[1]))),
 d.scale&&(j=(d.scale+k)[m](a),b.scale(+j[0]||1,+j[1]||+j[0]||1,+j[2]||null,+j[3]||null));if("clip-rect"in d){var p=(d["clip-rect"]+k)[m](a);if(p[q]==4){p[2]=+p[2]+ +p[0],p[3]=+p[3]+ +p[1];var r=e.clipRect||c.createElement("div"),s=r.style,t=e.parentNode;s.clip=f.format("rect({1}px {2}px {3}px {0}px)",p),e.clipRect||(s.position="absolute",s.top=0,s.left=0,s.width=b.paper.width+"px",s.height=b.paper.height+"px",t.parentNode.insertBefore(r,t),r[h](t),e.clipRect=r)}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=k)}b.type=="image"&&d.src&&(e.src=d.src),b.type=="image"&&d.opacity&&(e.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+d.opacity*100+")",i.filter=(e.filterMatrix||k)+(e.filterOpacity||k)),d.font&&(i.font=d.font),d["font-family"]&&(i.fontFamily='"'+d["font-family"][m](",")[0][M](/^['"]+|['"]+$/g,k)+'"'),d["font-size"]&&(i.fontSize=d["font-size"]),d["font-weight"]&&(i.fontWeight=d["font-weight"]),d["font-style"]&&(i.fontStyle=d["font-style"]);if(d.opacity!=nu
 ll||d["stroke-width"]!=null||d.fill!=null||d.stroke!=null||d["stroke-width"]!=null||d["stroke-opacity"]!=null||d["fill-opacity"]!=null||d["stroke-dasharray"]!=null||d["stroke-miterlimit"]!=null||d["stroke-linejoin"]!=null||d["stroke-linecap"]!=null){e=b.shape||e;var u=e.getElementsByTagName("fill")&&e.getElementsByTagName("fill")[0],v=!1;!u&&(v=u=bA("fill"));if("fill-opacity"in d||"opacity"in d){var w=((+g["fill-opacity"]+1||2)-1)*((+g.opacity+1||2)-1);w<0&&(w=0),w>1&&(w=1),u.opacity=w}d.fill&&(u.on=!0);if(u.on==null||d.fill=="none")u.on=!1;if(u.on&&d.fill){var x=d.fill.match(D);x?(u.src=x[1],u.type="tile"):(u.color=f.getRGB(d.fill).hex,u.src=k,u.type="solid",f.getRGB(d.fill).error&&(l.type in{circle:1,ellipse:1}||(d.fill+k).charAt()!="r")&&bm(l,d.fill)&&(g.fill="none",g.gradient=d.fill))}v&&e[h](u);var y=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],z=!1;!y&&(z=y=bA("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["st
 roke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])y.on=!0;(d.stroke=="none"||y.on==null||d.stroke==0||d["stroke-width"]==0)&&(y.on=!1),y.on&&d.stroke&&(y.color=f.getRGB(d.stroke).hex);var w=((+g["stroke-opacity"]+1||2)-1)*((+g.opacity+1||2)-1),A=(H(d["stroke-width"])||1)*.75;w<0&&(w=0),w>1&&(w=1),d["stroke-width"]==null&&(A=g["stroke-width"]),d["stroke-width"]&&(y.weight=A),A&&A<1&&(w*=A)&&(y.weight=1),y.opacity=w,d["stroke-linejoin"]&&(y.joinstyle=d["stroke-linejoin"]||"miter"),y.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(y.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var B={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};y.dashstyle=B[o](d["stroke-dasharray"])?B[d["stroke-dasharray"]]:k}z&&e[h](y)}if(l.type=="text"){var i=l.paper.span.st
 yle;g.font&&(i.font=g.font),g["font-family"]&&(i.fontFamily=g["font-family"]),g["font-size"]&&(i.fontSize=g["font-size"]),g["font-weight"]&&(i.fontWeight=g["font-weight"]),g["font-style"]&&(i.fontStyle=g["font-style"]),l.node.string&&(l.paper.span.innerHTML=(l.node.string+k)[M](/</g,"&#60;")[M](/&/g,"&#38;")[M](/\n/g,"<br>")),l.W=g.w=l.paper.span.offsetWidth,l.H=g.h=l.paper.span.offsetHeight,l.X=g.x,l.Y=g.y+F(l.H/2);switch(g["text-anchor"]){case"start":l.node.style["v-text-align"]="left",l.bbx=F(l.W/2);break;case"end":l.node.style["v-text-align"]="right",l.bbx=-F(l.W/2);break;default:l.node.style["v-text-align"]="center"}}},bm=function(a,b){a.attrs=a.attrs||{};var c=a.attrs,d=a.node.getElementsByTagName("fill"),e="linear",f=".5 .5";a.attrs.gradient=b,b=(b+k)[M](bi,function(a,b,c){return e="radial",b&&c&&(b=H(b),c=H(c),A(b-.5,2)+A(c-.5,2)>.25&&(c=t.sqrt(.25-A(b-.5,2))*((c>.5)*2-1)+.5),f=b+l+c),k}),b=b[m](/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-H(g);if(isNaN(g))return null}var 
 h=_(b);if(!h)return null;a=a.shape||a.node,d=d[0]||bA("fill");if(h[q]){d.on=!0,d.method="none",d.type=e=="radial"?"gradientradial":"gradient",d.color=h[0].color,d.color2=h[h[q]-1].color;var i=[];for(var j=0,n=h[q];j<n;j++)h[j].offset&&i[B](h[j].offset+l+h[j].color);d.colors&&(d.colors.value=i[q]?i[p](","):"0% "+d.color),e=="radial"?(d.focus="100%",d.focussize=f,d.focusposition=f):d.angle=(270-g)%360}return 1},br=function(a,b,c){var d=0,e=0,g=0,h=1;this[0]=a,this.id=f._oid++,this.node=a,a.raphael=this,this.X=0,this.Y=0,this.attrs={},this.Group=b,this.paper=c,this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null};br[r].rotate=function(b,c,d){return this.removed?this:b==null?this._.rt.cx?[this._.rt.deg,this._.rt.cx,this._.rt.cy][p](l):this._.rt.deg:(b=(b+k)[m](a),b[q]-1&&(c=H(b[1]),d=H(b[2])),b=H(b[0]),c!=null?this._.rt.deg=b:this._.rt.deg+=b,d==null&&(c=null),this._.rt.cx=c,this._.rt.cy=d,this.setBox(this.
 attrs,c,d),this.Group.style.rotation=this._.rt.deg,this)},br[r].setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,e=this.shape&&this.shape.style||this.node.style;a=a||{};for(var f in a)a[o](f)&&(this.attrs[f]=a[f]);b=b||this._.rt.cx,c=c||this._.rt.cy;var g=this.attrs,i,j,l,m;switch(this.type){case"circle":i=g.cx-g.r,j=g.cy-g.r,l=m=g.r*2;break;case"ellipse":i=g.cx-g.rx,j=g.cy-g.ry,l=g.rx*2,m=g.ry*2;break;case"rect":case"image":i=+g.x,j=+g.y,l=g.width||0,m=g.height||0;break;case"text":this.textpath.v=["m",F(g.x),", ",F(g.y-2),"l",F(g.x)+1,", ",F(g.y-2)][p](k),i=g.x-F(this.W/2),j=g.y-this.H/2,l=this.W,m=this.H;break;case"path":if(!this.attrs
-.path)i=0,j=0,l=this.paper.width,m=this.paper.height;else{var n=R(this.attrs.path);i=n.x,j=n.y,l=n.width,m=n.height}break;default:i=0,j=0,l=this.paper.width,m=this.paper.height}b=b==null?i+l/2:b,c=c==null?j+m/2:c;var r=b-this.paper.width/2,s=c-this.paper.height/2;if(this.type=="path"||this.type=="text")d.left!=r+"px"&&(d.left=r+"px"),d.top!=s+"px"&&(d.top=s+"px"),this.X=this.type=="text"?i:-r,this.Y=this.type=="text"?j:-s,this.W=l,this.H=m,e.left!=-r+"px"&&(e.left=-r+"px"),e.top!=-s+"px"&&(e.top=-s+"px");else{d.left!=r+"px"&&(d.left=r+"px"),d.top!=s+"px"&&(d.top=s+"px"),this.X=i,this.Y=j,this.W=l,this.H=m,d.width!=this.paper.width+"px"&&(d.width=this.paper.width+"px"),d.height!=this.paper.height+"px"&&(d.height=this.paper.height+"px"),e.left!=i-r+"px"&&(e.left=i-r+"px"),e.top!=j-s+"px"&&(e.top=j-s+"px"),e.width!=l+"px"&&(e.width=l+"px"),e.height!=m+"px"&&(e.height=m+"px");var t=(+a.r||0)/v(l,m);if(this.type=="rect"&&this.arcsize.toFixed(4)!=t.toFixed(4)&&(t||this.arcsize)){var u=bA(
 "roundrect"),w={},f=0,x=this.events&&this.events[q];u.arcsize=t,u.raphael=this,this.Group[h](u),this.Group.removeChild(this.node),this[0]=this.node=u,this.arcsize=t;for(var f in g)w[f]=g[f];delete w.scale,this.attr(w);if(this.events)for(;f<x;f++)this.events[f].unbind=bC(this.node,this.events[f].name,this.events[f].f,this)}}},br[r].hide=function(){return!this.removed&&(this.Group.style.display="none"),this},br[r].show=function(){return!this.removed&&(this.Group.style.display="block"),this},br[r].getBBox=function(){return this.removed?this:this.type=="path"?R(this.attrs.path):{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}},br[r].remove=function(){if(this.removed)return;bc(this,this.paper),this.node.parentNode.removeChild(this.node),this.Group.parentNode.removeChild(this.Group),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=!0},br[r].attr=function(){if(this.removed)return this;if(arguments[q]==0){var a={};for(var b 
 in this.attrs)this.attrs[o](b)&&(a[b]=this.attrs[b]);return this._.rt.deg&&(a.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(a.scale=this.scale()),a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient,a}if(arguments[q]==1&&f.is(arguments[0],"string"))return arguments[0]=="translation"?bN.call(this):arguments[0]=="rotation"?this.rotate():arguments[0]=="scale"?this.scale():arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient?this.attrs.gradient:this.attrs[arguments[0]];if(this.attrs&&arguments[q]==1&&f.is(arguments[0],"array")){var c={};for(var b=0,d=arguments[0][q];b<d;b++)c[arguments[0][b]]=this.attrs[arguments[0][b]];return c}var e;return arguments[q]==2&&(e={},e[arguments[0]]=arguments[1]),arguments[q]==1&&f.is(arguments[0],"object")&&(e=arguments[0]),e&&(e.text&&this.type=="text"&&(this.node.string=e.text),bo(this,e),e.gradient&&({circle:1,ellipse:1}[o](this.type)||(e.gradient+k).charAt()!="r")&&bm(this,e.gradient),(this.type!="path"||this._.rt.
 deg)&&this.setBox(this.attrs)),this},br[r].toFront=function(){return!this.removed&&this.Group.parentNode[h](this.Group),this.paper.top!=this&&bd(this,this.paper),this},br[r].toBack=function(){return this.removed?this:(this.Group.parentNode.firstChild!=this.Group&&(this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild),be(this,this.paper)),this)},br[r].insertAfter=function(a){return this.removed?this:(a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[h](this.Group),bf(this,a,this.paper),this)},br[r].insertBefore=function(a){return this.removed?this:(a.Group.parentNode.insertBefore(this.Group,a.Group),bg(this,a,this.paper),this)};var bs=function(a,b,c,d){var e=bA("group"),f=bA("oval"),g=f.style;e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",e.coordsize=a.coordsize,e.coordorigin=a.coordorigin,e[h](f);var i=new br(f,e,a);return i.type="circle",bo(i,{stroke:"#000",fil
 l:"none"}),i.attrs.cx=b,i.attrs.cy=c,i.attrs.r=d,i.setBox({x:b-d,y:c-d,width:d*2,height:d*2}),a.canvas[h](e),i},bt=function(a,b,c,d,e,f){var g=bA("group"),i=bA("roundrect"),j=(+f||0)/v(d,e);g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",g.coordsize=a.coordsize,g.coordorigin=a.coordorigin,g[h](i),i.arcsize=j;var k=new br(i,g,a);return k.type="rect",bo(k,{stroke:"#000"}),k.arcsize=j,k.setBox({x:b,y:c,width:d,height:e,r:f}),a.canvas[h](g),k},bu=function(a,b,c,d,e){var f=bA("group"),g=bA("oval"),i=g.style;f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",f.coordsize=a.coordsize,f.coordorigin=a.coordorigin,f[h](g);var j=new br(g,f,a);return j.type="ellipse",bo(j,{stroke:"#000"}),j.attrs.cx=b,j.attrs.cy=c,j.attrs.rx=d,j.attrs.ry=e,j.setBox({x:b-d,y:c-e,width:d*2,height:e*2}),a.canvas[h](f),j},bv=function(a,b,c,d,e,f){var g=bA("group"),i=bA("image"),j=i.style;g.style.cssText="position:absolute;left:0;top:0
 ;width:"+a.width+"px;height:"+a.height+"px",g.coordsize=a.coordsize,g.coordorigin=a.coordorigin,i.src=b,g[h](i);var k=new br(i,g,a);return k.type="image",k.attrs.src=b,k.attrs.x=c,k.attrs.y=d,k.attrs.w=e,k.attrs.h=f,k.setBox({x:c,y:d,width:e,height:f}),a.canvas[h](g),k},bw=function(a,b,c,d){var e=bA("group"),g=bA("shape"),i=g.style,j=bA("path"),l=j.style,m=bA("textpath");e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",e.coordsize=a.coordsize,e.coordorigin=a.coordorigin,j.v=f.format("m{0},{1}l{2},{1}",F(b),F(c),F(b)+1),j.textpathok=!0,i.width=a.width,i.height=a.height,m.string=d+k,m.on=!0,g[h](m),g[h](j),e[h](g);var n=new br(m,e,a);return n.shape=g,n.textpath=j,n.type="text",n.attrs.text=d,n.attrs.x=b,n.attrs.y=c,n.attrs.w=1,n.attrs.h=1,bo(n,{font:K.font,stroke:"none",fill:"#000"}),n.setBox(),a.canvas[h](e),n},bx=function(a,b){var c=this.canvas.style;return a==+a&&(a+="px"),b==+b&&(b+="px"),c.width=a,c.height=b,c.clip="rect(0 "+a+" "+b+" 0)"
 ,this},bA;c.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!c.namespaces.rvml&&c.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),bA=function(a){return c.createElement("<rvml:"+a+' class="rvml">')}}catch(bB){bA=function(a){return c.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}var by=function(){var a=ba[i](null,arguments),b=a.container,d=a.height,e,j=a.width,k=a.x,l=a.y;if(!b)throw new Error("VML container not found.");var m=new g,n=m.canvas=c.createElement("div"),o=n.style;return j=j||512,d=d||342,j==+j&&(j+="px"),d==+d&&(d+="px"),m.width=1e3,m.height=1e3,m.coordsize="1000 1000",m.coordorigin="0 0",m.span=c.createElement("span"),m.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",n[h](m.span),o.cssText=f.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",j,d),b==1?(c.body[h](n),o.left=k+"px",o.top=l+"px"):(b.style.width=j,b.st
 yle.height=d,b.firstChild?b.insertBefore(n,b.firstChild):b[h](n)),bb.call(m,m,f.fn),m};g[r].clear=function(){this.canvas.innerHTML=k,this.span=c.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas[h](this.span),this.bottom=this.top=null},g[r].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bh(a)}}/^Apple|^Google/.test(navigator.vendor)&&!(navigator.userAgent.indexOf("Version/4.0")+1)?g[r].safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){a.remove()})}:g[r].safari=function(){};var bC=function(){if(c.addEventListener)return function(a,b,c,d){var e=function(a){return c.call(d,a)};return a.addEventListener(b,e,!1),function(){return a.removeEventListener(b,e,!1),!0}};if(c.attachEvent)return function(a,b,c,e){var f=function(a){return c.call(e,a||d.event)};a.attachEvent("on"+b,f);var g=function(){return a
 .detachEvent("on"+b,f),!0};return g}}();for(var bD=n[q];bD--;)(function(a){br[r][a]=function(b){return f.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:bC(this.shape||this.node,a,b,this)})),this},br[r]["un"+a]=function(b){var c=this.events,d=c[q];while(d--)if(c[d].name==a&&c[d].f==b)return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}})(n[bD]);br[r].hover=function(a,b){return this.mouseover(a).mouseout(b)},br[r].unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},g[r].circle=function(a,b,c){return bs(this,a||0,b||0,c||0)},g[r].rect=function(a,b,c,d,e){return bt(this,a||0,b||0,c||0,d||0,e||0)},g[r].ellipse=function(a,b,c,d){return bu(this,a||0,b||0,c||0,d||0)},g[r].path=function(a){return a&&!f.is(a,"string")&&!f.is(a[0],"array")&&(a+=k),bl(f.format[i](f,arguments),this)},g[r].image=function(a,b,c,d,e){return bv(this,a||"about:blank",b||0,c||0,d||0,e||0)},g[r].text=function(a,b,c){return bw(this,a||0,b||0,c
 ||k)},g[r].set=function(a){return arguments[q]>1&&(a=Array[r].splice.call(arguments,0,arguments[q])),new bP(a)},g[r].setSize=bx,g[r].top=g[r].bottom=null,g[r].raphael=f,br[r].scale=function(a,b,c,d){if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:bE};b=b||a,!+b&&(b=a);var e,f,g,h,i=this.attrs;if(a!=0){var m=this.getBBox(),n=m.x+m.width/2,o=m.y+m.height/2,r=a/this._.sx,s=b/this._.sy;c=+c||c==0?c:n,d=+d||d==0?d:o;var u=~~(a/t.abs(a)),w=~~(b/t.abs(b)),x=this.node.style,y=c+(n-c)*r,z=d+(o-d)*s;switch(this.type){case"rect":case"image":var A=i.width*u*r,B=i.height*w*s;this.attr({height:B,r:i.r*v(u*r,w*s),width:A,x:y-A/2,y:z-B/2});break;case"circle":case"ellipse":this.attr({rx:i.rx*u*r,ry:i.ry*w*s,r:i.r*v(u*r,w*s),cx:y,cy:z});break;case"path":var C=T(i.path),D=!0;for(var E=0,F=C[q];E<F;E++){var H=C[E],I,K=J.call(H[0]);if(K=="M"&&D)continue;D=!1;if(K=="A")H[C[E][q]-2]*=r,H[C[E][q]-1]*=s,H[1]*=u*r,H[2]*=w*s,H[5]=+(u+w?!!+H[5]:!+H[5]);else if(K=="H")for(I=1,jj=H[q];I<jj;I++)H[I]*=
 r;else if(K=="V")for(I=1,jj=H[q];I<jj;I++)H[I]*=s;else for(I=1,jj=H[q];I<jj;I++)H[I]*=I%2?r:s}var L=R(C),e=y-L.x-L.width/2,f=z-L.y-L.height/2;C[0][1]+=e,C[0][2]+=f,this.attr({path:C})}this.type in{text:1,image:1}&&(u!=1||w!=1)?this.transformations?(this.transformations[2]="scale("[j](u,",",w,")"),this.node[G]("transform",this.transformations[p](l)),e=u==-1?-i.x-(A||0):i.x,f=w==-1?-i.y-(B||0):i.y,this.attr({x:e,y:f}),i.fx=u-1,i.fy=w-1):(this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[j](u,", M12=0, M21=0, M22=",w,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')"),x.filter=(this.node.filterMatrix||k)+(this.node.filterOpacity||k)):this.transformations?(this.transformations[2]=k,this.node[G]("transform",this.transformations[p](l)),i.fx=0,i.fy=0):(this.node.filterMatrix=k,x.filter=(this.node.filterMatrix||k)+(this.node.filterOpacity||k)),i.scale=[a,b,c,d][p](l),this._.sx=a,this._.sy=b}return this},br[r].clone=function(){var a=this.attr();return de
 lete a.scale,delete a.translation,this.paper[this.type]().attr(a)};var bF=function(a,b){return function(c,d,e){c=$(c);var g,h,i,j,k="",l={},m,n=0;for(var o=0,q=c.length;o<q;o++){i=c[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=bG(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>d){if(b&&!l.start){m=f.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],(d-n)/j),k+=["C",m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(e)return k;l.start=k,k=["M",m.x,m.y+"C",m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]][p](),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return m=f.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],(d-n)/j),{x:m.x,y:m.y,alpha:m.alpha}}n+=j,g=+i[5],h=+i[6]}k+=i}return l.end=k,m=a?n:b?l:f.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha}),m}},bG=Q(function(a,b,c,d,e,f,g,h){var i={x:0,y:0},j=0;for(var k=0;k<1.01;k+=.01){var l=Y(a,b,c,d,e,f,g,h,k);k&&(j+=t.sqrt(A(i.x-l.x,2)+A(i.y-l.y,2))),i=l}return j}),bH=bF(1),bI=bF(),bJ=bF(0,1);br[r].getTotalLength=functio
 n(){if(this.type!="path")return;return bH(this.attrs.path)},br[r].getPointAtLength=function(a){if(this.type!="path")return;return bI(this.attrs.path,a)},br[r].getSubpath=function(a,b){if(this.type!="path")return;if(t.abs(this.getTotalLength()-b)<1e-6)return bJ(this.attrs.path,a).end;var c=bJ(this.attrs.path,b,1);return a?bJ(c,a).end:c},f.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,3)},">":function(a){return A(a-1,3)+1},"<>":function(a){return a*=2,a<1?A(a,3)/2:(a-=2,(A(a,3)+2)/2)},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=.3,c=b/4;return A(2,-10*a)*t.sin((a-c)*2*t.PI/b)+1},bounce:function(a){var b=7.5625,c=2.75,d;return a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375),d}};var bK={length:0},bL=function(){var a=+(new Date);for(var b in bK)if(b!="length"&&bK[o](b)){var c=bK[
 b];if(c.stop){delete bK[b],bK[q]--;continue}var d=a-c.start,e=c.ms,g=c.easing,h=c.from,i=c.diff,j=c.to,m=c.t,n=c.prev||0,r=c.el,s=c.callback,t={},u;if(d<e){var v=f.easing_formulas[g]?f.easing_formulas[g](d/e):d/e;for(var w in h)if(h[o](w)){switch(L[w]){case"along":u=v*e*i[w],j.back&&(u=j.len-u);var x=bI(j[w],u);r.translate(i.sx-i.x||0,i.sy-i.y||0),i.x=x.x,i.y=x.y,r.translate(x.x-i.sx,x.y-i.sy),j.rot&&r.rotate(i.r+x.alpha,x.x,x.y);break;case"number":u=+h[w]+v*e*i[w];break;case"colour":u="rgb("+[bM(F(h[w].r+v*e*i[w].r)),bM(F(h[w].g+v*e*i[w].g)),bM(F(h[w].b+v*e*i[w].b))][p](",")+")";break;case"path":u=[];for(var y=0,z=h[w][q];y<z;y++){u[y]=[h[w][y][0]];for(var A=1,B=h[w][y][q];A<B;A++)u[y][A]=+h[w][y][A]+v*e*i[w][y][A];u[y]=u[y][p](l)}u=u[p](l);break;case"csv":switch(w){case"translation":var C=i[w][0]*(d-n),D=i[w][1]*(d-n);m.x+=C,m.y+=D,u=C+l+D;break;case"rotation":u=+h[w][0]+v*e*i[w][0],h[w][1]&&(u+=","+h[w][1]+","+h[w][2]);break;case"scale":u=[+h[w][0]+v*e*i[w][0],+h[w][1]+v*e*i[w][1
 ],2 in j[w]?j[w][2]:k,3 in j[w]?j[w][3]:k][p](l);break;case"clip-rect":u=[];var y=4;while(y--)u[y]=+h[w][y]+v*e*i[w][y]}}t[w]=u}r.attr(t),r._run&&r._run.call(r)}else{if(j.along){var x=bI(j.along,j.len*!j.back);r.translate(i.sx-(i.x||0)+x.x-i.sx,i.sy-(i.y||0)+x.y-i.sy),j.rot&&r.rotate(i.r+x.alpha,x.x,x.y)}(m.x||m.y)&&r.translate(-m.x,-m.y),j.scale&&(j.scale=j.scale+k),r.attr(j),delete bK[b],bK[q]--,r.in_animation=null,f.is(s,"function")&&s.call(r)}c.prev=d}f.svg&&r&&r.paper.safari(),bK[q]&&setTimeout(bL)},bM=function(a){return a>255?255:a<0?0:a},bN=function(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:bE};this._.tx+=+a,this._.ty+=+b;switch(this.type){case"circle":case"ellipse":this.attr({cx:+a+this.attrs.cx,cy:+b+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case"path":var c=T(this.attrs.path);c[0][1]+=+a,c[0][2]+=+b,this.attr({path:c})}return this};br[r].animateWith=function(a,b,c,d,e){return bK[a.id]&&(b.st
 art=bK[a.id].start),this.animate(b,c,d,e)},br[r].animateAlong=bO(),br[r].animateAlongBack=bO(1),br[r].onAnimation=function(a){return this._run=a||0,this},br[r].animate=function(b,c,d,e){if(f.is(d,"function")||!d)e=d||null;var g={},h={},i={};for(var j in b)if(b[o](j)&&L[o](j)){g[j]=this.attr(j),g[j]==null&&(g[j]=K[j]),h[j]=b[j];switch(L[j]){case"along":var l=bH(b[j]),n=bI(b[j],l*!!b.back),p=this.getBBox();i[j]=l/c,i.tx=p.x,i.ty=p.y,i.sx=n.x,i.sy=n.y,h.rot=b.rot,h.back=b.back,h.len=l,b.rot&&(i.r=H(this.rotate())||0);break;case"number":i[j]=(h[j]-g[j])/c;break;case"colour":g[j]=f.getRGB(g[j]);var r=f.getRGB(h[j]);i[j]={r:(r.r-g[j].r)/c,g:(r.g-g[j].g)/c,b:(r.b-g[j].b)/c};break;case"path":var s=$(g[j],h[j]);g[j]=s[0];var t=s[1];i[j]=[];for(var u=0,v=g[j][q];u<v;u++){i[j][u]=[0];for(var w=1,x=g[j][u][q];w<x;w++)i[j][u][w]=(t[u][w]-g[j][u][w])/c}break;case"csv":var y=(b[j]+k)[m](a),z=(g[j]+k)[m](a);switch(j){case"translation":g[j]=[0,0],i[j]=[y[0]/c,y[1]/c];break;case"rotation":g[j]=z[1]==
 y[1]&&z[2]==y[2]?z:[0,y[1],y[2]],i[j]=[(y[0]-g[j][0])/c,0,0];break;case"scale":b[j]=y,g[j]=(g[j]+k)[m](a),i[j]=[(y[0]-g[j][0])/c,(y[1]-g[j][1])/c,0,0];break;case"clip-rect":g[j]=(g[j]+k)[m](a),i[j]=[];var u=4;while(u--)i[j][u]=(y[u]-g[j][u])/c}h[j]=y}}return this.stop(),this.in_animation=1,bK[this.id]={start:b.start||+(new Date),ms:c,easing:d,from:g,diff:i,to:h,el:this,callback:e,t:{x:0,y:0}},++bK[q]==1&&bL(),this},br[r].stop=function(){return bK[this.id]&&bK[q]--,delete bK[this.id],this},br[r].translate=function(a,b){return this.attr({translation:a+" "+b})},br[r][x]=function(){return"Raphaël’s object"},f.ae=bK;var bP=function(a){this.items=[],this[q]=0;if(a)for(var b=0,c=a[q];b<c;b++)a[b]&&(a[b].constructor==br||a[b].constructor==bP)&&(this[this.items[q]]=this.items[this.items[q]]=a[b],this[q]++)};bP[r][B]=function(){var a,b;for(var c=0,d=arguments[q];c<d;c++)a=arguments[c],a&&(a.constructor==br||a.constructor==bP)&&(b=this.items[q],this[b]=this.items[b]=a,this[q]++);return this
 },bP[r].pop=function(){return delete this[this[q]--],this.items.pop()};for(var bQ in br[r])br[r][o](bQ)&&(bP[r][bQ]=function(a){return function(){for(var b=0,c=this.items[q];b<c;b++)this.items[b][a][i](this.items[b],arguments);return this}}(bQ));return bP[r].attr=function(a,b){if(a&&f.is(a,"array")&&f.is(a[0],"object"))for(var c=0,d=a[q];c<d;c++)this.items[c].attr(a[c]);else for(var e=0,g=this.items[q];e<g;e++)this.items[e].attr[i](this.items[e],arguments);return this},bP[r].animate=function(a,b,c,d){(f.is(c,"function")||!c)&&(d=c||null);var e=this.items[q],g=e,h=this,i;d&&(i=function(){!--e&&d.call(h)}),this.items[--g].animate(a,b,c||i,i);while(g--)this.items[g].animateWith(this.items[e-1],a,b,c||i,i);return this},bP[r].insertAfter=function(a){var b=this.items[q];while(b--)this.items[b].insertAfter(a);return this},bP[r].getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items[q];e--;){var f=this.items[e].getBBox();a[B](f.x),b[B](f.y),c[B](f.x+f.width),d[B](f.y+f.height)}retu
 rn a=v[i](0,a),b=v[i](0,b),{x:a,y:b,width:u[i](0,c)-a,height:u[i](0,d)-b}},f.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[o](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c][B](b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=I(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[o](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d[M](/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var g in f.k)f[o](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},g[r].getFont=function(a,b,c,d){d=d||"normal",c=c||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400;var e=f.fonts[a];if(!e){var g=new RegExp("(^|\\s)"+a[M](/[^\w\d\s+!~.:_-]/g,k)+"(\\s|$)","i");for(var h in f.fonts)if(f.fonts[o](h)&&g.test(h)){e=f.fonts[h];break}}var i;if(e)for(var j=0,l=e[q];j<l;j++){i=e[j];if(i.face["font-weight"]==b&&(i.face["f
 ont-style"]==c||!i.face["font-style"])&&i.face["font-stretch"]==d)break}return i},g[r].print=function(b,c,d,e,g,h){h=h||"middle";var i=this.set(),j=(d+k)[m](k),l=0,n=k,o;f.is(e,"string")&&(e=this.getFont(e));if(e){o=(g||16)/e.face["units-per-em"];var p=e.face.bbox.split(a),r=+p[0],s=+p[1]+(h=="baseline"?p[3]-p[1]+ +e.face.descent:(p[3]-p[1])/2);for(var t=0,u=j[q];t<u;t++){var v=t&&e.glyphs[j[t-1]]||{},w=e.glyphs[j[t]];l+=t?(v.w||e.w)+(v.k&&v.k[j[t]]||0):0,w&&w.d&&i[B](this.path(w.d).attr({fill:"#000",stroke:"none",translation:[l,0]}))}i.scale(o,o,r,s).translate(b-r,c-s)}return i},f.format=function(a){var b=f.is(arguments[1],"array")?[0][j](arguments[1]):arguments,c=/\{(\d+)\}/g;return a&&f.is(a,"string")&&b[q]-1&&(a=a[M](c,function(a,c){return b[++c]==null?k:b[c]})),a||k},f.ninja=function(){var a=Raphael;return e.was?Raphael=e.is:delete Raphael,a},f.el=br[r],f}();var Graph=function(){this.nodes=[],this.nodelist=[],this.edges=[],this.snapshots=[]};Graph.prototype={addNode:function(a,
 b){return this.nodes[a]==undefined&&(this.nodes[a]=new Graph.Node(a,b||{id:a}),this.nodelist.push(this.nodes[a])),this.nodes[a]},addEdge:function(a,b,c){var d=this.addNode(a),e=this.addNode(b),f={source:d,target:e,style:c,weight:c&&c.weight||1};d.edges.push(f),this.edges.push(f);if(!c||!c.directed){var g={source:e,target:d,style:c,weight:c&&c.weight||1,backedge:f};this.edges.push(g),e.edges.push(g)}},snapShot:function(a,b){var c=new Graph;jQuery.extend(!0,c.nodes,this.nodes),jQuery.extend(!0,c.nodelist,this.nodelist),jQuery.extend(!0,c.edges,this.edges),c.snapShot=null,this.snapshots.push({comment:a,graph:c})}},Graph.Node=function(a,b){return b.id=a,b.edges=[],b},Graph.Node.prototype={},Graph.Renderer={},Graph.Renderer.Raphael=function(a,b,c,d,e){this.width=c||400,this.height=d||400;var f=this;this.r=Raphael(a,this.width,this.height),this.radius=e&&e.noderadius?e.noderadius:40,this.graph=b,this.mouse_in=!1,this.graph.render||(this.graph.render=function(){return}),this.isDrag=!1,this
 .dragger=function(a){this.dx=a.clientX,this.dy=a.clientY,f.isDrag=this,this.set&&this.set.animate({"fill-opacity":.1},200)&&this.set.toFront(),a.preventDefault&&a.preventDefault()},document.onmousemove=function(a){a=a||window.event;if(f.isDrag){var b=f.isDrag.set.getBBox(),c=a.clientX-f.isDrag.dx+(b.x+b.width/2),d=a.clientY-f.isDrag.dy+(b.y+b.height/2),e=a.clientX-(c<20?c-20:c>f.width-20?c-f.width+20:0),g=a.clientY-(d<20?d-20:d>f.height-20?d-f.height+20:0);f.isDrag.set.translate(e-f.isDrag.dx,g-f.isDrag.dy);for(var h in f.graph.edges)f.graph.edges[h].connection&&f.graph.edges[h].connection.draw();f.isDrag.dx=e,f.isDrag.dy=g}},document.onmouseup=function(){f.isDrag&&f.isDrag.set.animate({"fill-opacity":.6},500),f.isDrag=!1}},Graph.Renderer.Raphael.prototype={translate:function(a){return[Math.round((a[0]-this.graph.layoutMinX)*this.factorX+this.radius),Math.round((a[1]-this.graph.layoutMinY)*this.factorY+this.radius)]},rotate:function(a,b,c){var d=b*Math.cos(c),e=b*Math.sin(c);return[
 a[0]+d,a[1]+e]},draw:function(){this.factorX=(this.width-10*this.radius)/(this.graph.layoutMaxX-this.graph.layoutMinX),this.factorY=(this.height-15*this.radius)/(this.graph.layoutMaxY-this.graph.layoutMinY);for(a in this.graph.nodes)this.drawNode(this.graph.nodes[a]);for(var a=0;a<this.graph.edges.length;a++)this.drawEdge(this.graph.edges[a])},drawNode:function(a){var b=this.translate([a.layoutPosX,a.layoutPosY]);a.point=b;if(a.shape){var c=a.shape.getBBox(),d=[c.x+Math.round(c.width/2),c.y+Math.round(c.height/2)];a.shape.translate(b[0]-d[0],b[1]-d[1]),this.r.safari();return}var e;if(a.render)e=a.render(this.r,a);else if(!a.shape){var f=Raphael.getColor();e=this.r.set().push(this.r.ellipse(b[0],b[1],30,20).attr({fill:f,stroke:f,"stroke-width":2})).push(this.r.text(b[0],b[1]+30,a.label||a.id))}e.attr({"fill-opacity":.6}),e.items.forEach(function(a){a.set=e,a.node.style.cursor="pointer"}),e.mousedown(this.dragger),a.shape=e},drawEdge:function(a){if(a.backedge)return;a.connection&&a.co
 nnection.draw(),a.connection||(a.style&&a.style.callback&&a.style.callback(a),a.connection=this.r.connection(a.source.shape,a.target.shape,a.style))}},Graph.Layout={},Graph.Layout.Spring=function(a){this.graph=a,this.iterations=500,this.maxRepulsiveForceDistance=6,this.k=2,this.c=.01,this.maxVertexMovement=.5},Graph.Layout.Spring.prototype={layout:function(){this.layoutPrepare();for(var a=0;a<this.iterations;a++)this.layoutIteration();this.layoutCalcBounds()},layoutPrepare:function(){for(i in this.graph.nodes){var a=this.graph.nodes[i];a.layoutPosX=0,a.layoutPosY=0,a.layoutForceX=0,a.layoutForceY=0}},layoutCalcBounds:function(){var a=Infinity,b=-Infinity,c=Infinity,d=-Infinity;for(i in this.graph.nodes){var e=this.graph.nodes[i].layoutPosX,f=this.graph.nodes[i].layoutPosY;e>b&&(b=e),e<a&&(a=e),f>d&&(d=f),f<c&&(c=f)}this.graph.layoutMinX=a,this.graph.layoutMaxX=b,this.graph.layoutMinY=c,this.graph.layoutMaxY=d},layoutIteration:function(){for(var a=0;a<this.graph.nodelist.length;a++){
 var b=this.graph.nodelist[a];for(var c=a+1;c<this.graph.nodelist.length;c++){var d=this.graph.nodelist[c];this.layoutRepulsive(b,d)}}for(var a=0;a<this.graph.edges.length;a++){var e=this.graph.edges[a];this.layoutAttractive(e)}for(a in this.graph.nodes){var f=this.graph.nodes[a],g=this.c*f.layoutForceX,h=this.c*f.layoutForceY,i=this.maxVertexMovement;g>i&&(g=i),g<-i&&(g=-i),h>i&&(h=i),h<-i&&(h=-i),f.layoutPosX+=g,f.layoutPosY+=h,f.layoutForceX=0,f.layoutForceY=0}},layoutRepulsive:function(a,b){var c=b.layoutPosX-a.layoutPosX,d=b.layoutPosY-a.layoutPosY,e=c*c+d*d;if(e<.01){c=.1*Math.random()+.1,d=.1*Math.random()+.1;var e=c*c+d*d}var f=Math.sqrt(e);if(f<this.maxRepulsiveForceDistance){var g=this.k*this.k/f;b.layoutForceX+=g*c/f,b.layoutForceY+=g*d/f,a.layoutForceX-=g*c/f,a.layoutForceY-=g*d/f}},layoutAttractive:function(a){var b=a.source,c=a.target,d=c.layoutPosX-b.layoutPosX,e=c.layoutPosY-b.layoutPosY,f=d*d+e*e;if(f<.01){d=.1*Math.random()+.1,e=.1*Math.random()+.1;var f=d*d+e*e}var
  g=Math.sqrt(f);g>this.maxRepulsiveForceDistance&&(g=this.maxRepulsiveForceDistance,f=g*g);var h=(f-this.k*this.k)/this.k;a.attraction==undefined&&(a.attraction=1),h*=Math.log(a.attraction)*.5+1,c.layoutForceX-=h*d/g,c.layoutForceY-=h*e/g,b.layoutForceX+=h*d/g,b.layoutForceY+=h*e/g}},Raphael.el.tooltip=function(a){return this.tp=a,this.tp.o={x:0,y:0},this.tp.hide(),this.hover(function(a){this.mousemove(function(a){this.tp.translate(a.clientX-this.tp.o.x,a.clientY-this.tp.o.y),this.tp.o={x:a.clientX,y:a.clientY}}),this.tp.show().toFront()},function(a){this.tp.hide(),this.unmousemove()}),this},Raphael.fn.connection=function(a,b,c){var d=this,e={draw:function(){var f=a.getBBox(),g=b.getBBox(),h=0,i=0,j=[{x:f.x+f.width/2,y:f.y-h},{x:f.x+f.width/2,y:f.y+f.height+h},{x:f.x-h,y:f.y+f.height/2},{x:f.x+f.width+h,y:f.y+f.height/2},{x:g.x+g.width/2,y:g.y-i},{x:g.x+g.width/2,y:g.y+g.height+i},{x:g.x-i,y:g.y+g.height/2},{x:g.x+g.width+i,y:g.y+g.height/2}],k={},l=[];for(var m=0;m<4;m++)for(var n=
 4;n<8;n++){var o=Math.abs(j[m].x-j[n].x),p=Math.abs(j[m].y-j[n].y);if(m==n-4||(m!=3&&n!=6||j[m].x<j[n].x)&&(m!=2&&n!=7||j[m].x>j[n].x)&&(m!=0&&n!=5||j[m].y>j[n].y)&&(m!=1&&n!=4||j[m].y<j[n].y))l.push(o+p),k[l[l.length-1].toFixed(3)]=[m,n]}var q=l.length==0?[0,4]:k[Math.min.apply(Math,l).toFixed(3)],r=j[q[0]].x,s=j[q[0]].y,t=j[q[1]].x,u=j[q[1]].y,o=Math.max(Math.abs(r-t)/2,10),p=Math.max(Math.abs(s-u)/2,10),v=[r,r,r-o,r+o][q[0]].toFixed(3),w=[s-p,s+p,s,s][q[0]].toFixed(3),x=[0,0,0,0,t,t,t-o,t+o][q[1]].toFixed(3),y=[0,0,0,0,s+p,s-p,u,u][q[1]].toFixed(3),z=["M",r.toFixed(3),s.toFixed(3),"C",v,w,x,y,t.toFixed(3),u.toFixed(3)].join(",");if(c&&c.directed){var A=Math.sqrt((u-y)*(u-y)+(t-x)*(t-x)),B=function(a,b){return-a*(b||5)/A},C=[{x:(B(t-x)+B(u-y)+t).toFixed(3),y:(B(u-y)+B(t-x)+u).toFixed(3)},{x:(B(t-x)-B(u-y)+t).toFixed(3),y:(B(u-y)-B(t-x)+u).toFixed(3)}];z=z+",M"+C[0].x+","+C[0].y+",L"+t+","+u+",L"+C[1].x+","+C[1].y}e.fg&&e.fg.attr({path:z})||(e.fg=d.path(z).attr({stroke:c&&c.stroke|
 |"#000",fill:"none"}).toBack()),e.bg&&e.bg.attr({path:z})||c&&c.fill&&(e.bg=c.fill.split&&d.path(z).attr({stroke:c.fill,fill:"none","stroke-width":c.width||3}).toBack()),c&&c.label&&(e.label&&e.label.attr({x:(r+t)/2,y:(s+u)/2})||(e.label=d.text((r+t)/2,(s+u)/2,c.label).attr({fill:"#000","font-size":c.fontsize||"12px"})))}};return e.draw(),e};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/sgvizler.chart.css
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/sgvizler.chart.css b/extras/webjars/sgvizler/src/main/resources/sgvizler.chart.css
deleted file mode 100644
index 3f0026e..0000000
--- a/extras/webjars/sgvizler/src/main/resources/sgvizler.chart.css
+++ /dev/null
@@ -1,37 +0,0 @@
-
-/*** sMap ***/
-
-div.sgvizler-sMap{
-    padding: 0;
-    margin: 0;
-    font-family: sans-serif;
-}
-div.sgvizler-sMap h1, div.sgvizler-sMap p{
-    font-size: 11pt;
-    margin: 2px 0 1px 0;
-}
-div.sgvizler-sMap p.text{
-    font-family: serif;
-}
-div.sgvizler-sMap div.img{
-    float: right;
-    padding: 10px;
-}
-
-/*** pForce ***/
-
-circle.node {
-  stroke: #999;
-  stroke-width: 0.5px;
-}
-
-line.link {
-  stroke: #999;
-  stroke-opacity: .6;
-}
-
-.nodetext { 
-    pointer-events: none; 
-    font: 10px sans-serif; 
-    color: black;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/sgvizler.html
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/sgvizler.html b/extras/webjars/sgvizler/src/main/resources/sgvizler.html
deleted file mode 100644
index a5e52a8..0000000
--- a/extras/webjars/sgvizler/src/main/resources/sgvizler.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE HTML>
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>Sgvizler</title>
-    <meta charset="UTF-8"/>
-    <link rel="shortcut icon" href="http://sgvizler.googlecode.com/svn/www/favicon.ico" />
-    <link rel="stylesheet" type="text/css" href="http://sgvizler.googlecode.com/svn/www/sgvizler.css" />
-    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
-    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
-    <script type="text/javascript" id="sgvzlr_script" src="http://sgvizler.googlecode.com/svn/release/0.5/sgvizler.js"></script>
-    <script type="text/javascript">
-      // CONFIGURATION Sgvizler 0.5: Set variables to fit your setup.
-      // NB! Do not let the last item in a list end with a comma.
-
-       //// Query settings. The defaults settings are listed.
-       sgvizler.option.query = {
-           // Default query. 
-           //'query':                "SELECT ?class (count(?instance) AS ?noOfInstances)\nWHERE{ ?instance a ?class }\nGROUP BY ?class\nORDER BY ?class",
-    
-           // Endpoint URL. 
-           //'endpoint':             "http://sws.ifi.uio.no/sparql/world",
-    
-           // Endpoint output format. 
-           //'endpoint_output':      'json',  // 'xml', 'json' or 'jsonp'
-    
-           // This string is appended the 'endpoint' variable and the query to it again to give a link to the "raw" query results.
-           //'endpoint_query_url':   "?output=text&amp;query=",
-    
-           // URL to SPARQL validation service. The query is appended to it. 
-           //'validator_query_url':  "http://www.sparql.org/query-validator?languageSyntax=SPARQL&amp;outputFormat=sparql&amp;linenumbers=true&amp;query=",
-    
-           // Default chart type. 
-           //'chart':                'gLineChart',
-    
-           // Default log level. Must be either 0, 1, or 2. 
-           //'loglevel':             2
-       };
-
-       //// Prefixes
-       // Add convenient prefixes for your dataset. rdf, rdfs, xsd, owl
-       // are already set.  Examples: 
-       sgvizler.option.namespace['wd'] = 'http://sws.ifi.uio.no/d2rq/resource/';
-       sgvizler.option.namespace['w']  = 'http://sws.ifi.uio.no/ont/world.owl#';
-
-       //// Your chart drawing preferences. The defaults are listed.
-       // See the Google visualization API for available options for
-       // Google charts, and the Sgvizler homepage for other
-       // options. Options applicable to all charts are put in the
-       // "root" of sgvizler.chartOptions. Chart specific options are
-       // put in a "child" with the chart's id as name,
-       // e.g. 'gGeoMap'. 
-       sgvizler.option.chart = { 
-           //'width':           '800',
-           //'height':          '400',
-           //'chartArea':       { left: '5%', top: '5%', width: '75%', height: '80%' },
-           //     'gGeoMap': {
-           //	 'dataMode':           'markers'
-           //     },
-           //     'gMap': {
-           //	 'dataMode':           'markers',
-           //     },
-           //     'sMap': {
-           //	 'dataMode':           'markers',
-           //	 'showTip':            true,
-           //	 'useMapTypeControl':  true
-           //     } 
-       };
-
-       //// Leave this as is. Ready, steady, GO!
-       $(document).ready(sgvizler.go());
-    </script>
-  </head>
-  <body>
-    <div id="logo">
-      <a href="http://code.google.com/p/sgvizler/">
-	<img src="http://sgvizler.googlecode.com/svn/www/mr.sgvizler.png" alt="mr.sgvizler.png"/>
-      </a><br/>Mr. Sgvizler
-    </div>
-    <h1>Sgvizler</h1>    
-
-    <h2>User Input</h2>
-
-    This section contains a input form where users can write and
-    execute their own SPARQL queries. The query is sent to Sgvizler
-    via the URL in GET parameters.
-
-    <div id="queryarea">
-      <pre id="sgvzlr_cPrefix"></pre>
-      <textarea id="sgvzlr_cQuery" rows="10" cols="80"></textarea>
-      <form method="get" id="sgvzlr_formQuery">
-	<p>
-	  <input type="hidden" value="" name="query" id="sgvzlr_strQuery"/>
-	  Width:  <input name="width" id="sgvzlr_strWidth" type="text" size="3"/>
-	  Height: <input name="height" id="sgvzlr_strHeight" type="text" size="3"/>
-	  Chart Type: <select name="chart" id="sgvzlr_optChart"></select>
-	  <input type="button" value="Reset" onclick="sgvizler.ui.resetPage()"/>
-	  <input type="button" value="GO!" onclick="sgvizler.ui.submitQuery()"/>
-	</p>
-      </form>
-      <div id="sgvzlr_cMessage"></div>
-    </div>
-    <div id="sgvzlr_gchart" style="width:800px; height:400px;"></div>
-    <div id="footer">
-      <!-- Please leave a link to the Sgvizler homepage --> 
-      <p>
-	Sgvizler visualizes the result of SPARQL SELECT queries using
-	javascript and the Google Visualization API. For more
-	information, see
-	the <a href="http://code.google.com/p/sgvizler/">Sgvizler</a>
-	homepage. (c) 2011 Martin G. Skj&#230;veland.
-      </p>
-    </div>
-  </body>
-</html>


[5/5] git commit: MARMOTTA-321: updated license files with the webjar changes in MARMOTTA-416, MARMOTTA-468

Posted by ja...@apache.org.
MARMOTTA-321: updated license files with the webjar changes in MARMOTTA-416, MARMOTTA-468


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/93cd20a2
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/93cd20a2
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/93cd20a2

Branch: refs/heads/develop
Commit: 93cd20a25b253f6fe3d203d0b48f70a97ccb6f47
Parents: c4efc81
Author: Jakob Frank <ja...@apache.org>
Authored: Mon Mar 17 11:57:13 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Mon Mar 17 11:57:13 2014 +0100

----------------------------------------------------------------------
 LICENSE.txt                                     | 85 --------------------
 .../src/main/resources/installer/LICENSE.txt    | 60 +++-----------
 2 files changed, 13 insertions(+), 132 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/93cd20a2/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
index 7779dd8..9e657aa 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -211,64 +211,6 @@ external projects with separate copyright notices and license terms. Your use of
 the code for the these subcomponents is subject to the terms and conditions of the 
 following licenses.
 
-For the D3.js component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/lib/
-
-    Copyright (c) 2013 Michael Bostock, http://d3js.org
-
-    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.
-
-
-For the Dracula Graph Library component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/lib/
-
-    Copyright (c) 2013 Johann Philipp Strathausen, http://www.graphdracula.net
-
-    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.
-
-
 For the strftime component,
 
     located at:
@@ -362,33 +304,6 @@ For the Prototype component,
     SOFTWARE.    
 
 
-For the Sgvizler component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/
-
-    Copyright (c) 2011 Martin G. Skjæveland, http://sgvizler.googlecode.com
-
-    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. 
-
-
-
 Apache Marmotta 3rd party source code:
 =====================================
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/93cd20a2/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
----------------------------------------------------------------------
diff --git a/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt b/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
index ac64adc..47d8139 100644
--- a/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
+++ b/launchers/marmotta-installer/src/main/resources/installer/LICENSE.txt
@@ -2342,19 +2342,7 @@ For the CodeMirror component,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
 
-
-Apache Marmotta code subcomponents:
-===================================
-
-The Apache Marmotta project includes the code of a number of subcomponents (libraries) 
-from external projects with separate copyright notices and license terms. Your use of 
-the code for the these subcomponents is subject to the terms and conditions of the 
-following licenses.
-
-For the D3.js component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/lib/
+For the D3js webjar,
 
     Copyright (c) 2013 Michael Bostock, http://d3js.org
 
@@ -2382,13 +2370,9 @@ For the D3.js component,
     NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+For the Sgvizler webjar,
 
-For the Dracula Graph Library component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/lib/
-
-    Copyright (c) 2013 Johann Philipp Strathausen, http://www.graphdracula.net
+    Copyright (c) 2011 Martin G. Skjæveland, http://sgvizler.googlecode.com
 
     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
@@ -2406,9 +2390,18 @@ For the Dracula Graph Library component,
     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.
+    SOFTWARE. 
 
 
+
+Apache Marmotta code subcomponents:
+===================================
+
+The Apache Marmotta project includes the code of a number of subcomponents (libraries) 
+from external projects with separate copyright notices and license terms. Your use of 
+the code for the these subcomponents is subject to the terms and conditions of the 
+following licenses.
+
 For the strftime component,
 
     located at:
@@ -2501,33 +2494,6 @@ For the Prototype component,
     SOFTWARE.    
 
 
-For the Sgvizler component,
-
-    located at:
-        extras/webjars/sgvizler/src/main/resources/
-
-    Copyright (c) 2011 Martin G. Skjæveland, http://sgvizler.googlecode.com
-
-    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. 
-
-
-
 Apache Marmotta 3rd party source code:
 =====================================
 


[3/5] MARMOTTA-468: removed sgvizler webjar module from marmotta MARMOTTA-416: no more d3.js in the source

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/marmotta/blob/c4efc812/extras/webjars/sgvizler/src/main/resources/lib/d3.v2.min.js
----------------------------------------------------------------------
diff --git a/extras/webjars/sgvizler/src/main/resources/lib/d3.v2.min.js b/extras/webjars/sgvizler/src/main/resources/lib/d3.v2.min.js
deleted file mode 100644
index 521c420..0000000
--- a/extras/webjars/sgvizler/src/main/resources/lib/d3.v2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){function e(a,b){try{for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}catch(d){a.prototype=b}}function g(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}function h(a){return Array.prototype.slice.call(a)}function k(){}function n(a){return a}function o(){return this}function p(){return!0}function q(a){return typeof a=="function"?a:function(){return a}}function r(a,b,c){return function(){var d=c.apply(b,arguments);return arguments.length?a:d}}function s(a){return a!=null&&!isNaN(a)}function t(a){return a.length}function v(a){return a==null}function w(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function x(a){var b=1;while(a*b%1)b*=10;return b}function A(){}function B(a){function d(){var c=b,d=-1,e=c.length,f;while(++d<e)(f=c[d].on)&&f.apply(this,arguments);return a}var b=[],c=new k;return d.on=function(d,e){var f=c.get(d),g;return arguments.length<2?f&&f.on:(f&&(f.on=null,b=b.slice(0,g=b.indexOf(f)).concat(b.slice(
 g+1)),c.remove(d)),e&&b.push(c.set(d,{on:e})),a)},d}function E(a,b){return b-(a?1+Math.floor(Math.log(a+Math.pow(10,1+Math.floor(Math.log(a)/Math.LN10)-b))/Math.LN10):1)}function F(a){return a+""}function G(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function I(a,b){return{scale:Math.pow(10,(8-b)*3),symbol:a}}function O(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function P(a){return function(b){return 1-a(1-b)}}function Q(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function R(a){return a}function S(a){return function(b){return Math.pow(b,a)}}function T(a){return 1-Math.cos(a*Math.PI/2)}function U(a){return Math.pow(2,10*(a-1))}function V(a){return 1-Math.sqrt(1-a*a)}function W(a,b){var c;return arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a),function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function X(a){re
 turn a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Y(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Z(){d3.event.stopPropagation(),d3.event.preventDefault()}function $(){var a=d3.event,b;while(b=a.sourceEvent)a=b;return a}function _(a){var b=new A,c=0,d=arguments.length;while(++c<d)b[arguments[c]]=B(b);return b.of=function(c,d){return function(e){try{var f=e.sourceEvent=d3.event;e.target=a,d3.event=e,b[e.type].apply(c,d)}finally{d3.event=f}}},b}function bb(a){return a=="transform"?d3.interpolateTransform:d3.interpolate}function bc(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return(c-a)*b}}function bd(a,b){return b=b-(a=+a)?1/(b-a):0,function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function be(a,b,c){return new bf(a,b,c)}function bf(a,b,c){this.r=a,this.g=b,this.b=c}function bg(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function bh(a,
 b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(bj(h[0]),bj(h[1]),bj(h[2]))}}return(i=bk.get(a))?b(i.r,i.g,i.b):(a!=null&&a.charAt(0)==="#"&&(a.length===4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length===7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16)),b(d,e,f))}function bi(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;return f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0,bl(g,h,i)}function bj(a){var b=parseFloat(a);return a.charAt(a.length-1)==="%"?Math.round(b*2.55):b}function bl(a,b,c){return new bm(a,b,c)}function bm(a,b,c){this.h=a,this.s=b,this.l=c}function bn(a,b,c){function f(a){return a>360?a-=360:a<0&&(a+=360),a<60?d+(e-d)*a/60:a<180?e:a<240?d+(e-d)*(240-a)/60:d}fu
 nction g(a){return Math.round(f(a)*255)}var d,e;return a%=360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e,be(g(a+120),g(a),g(a-120))}function bo(a){return j(a,bu),a}function bv(a){return function(){return bp(a,this)}}function bw(a){return function(){return bq(a,this)}}function by(a,b){function f(){if(b=this.classList)return b.add(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;c.lastIndex=0,c.test(e)||(e=w(e+" "+a),d?b.baseVal=e:this.className=e)}function g(){if(b=this.classList)return b.remove(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;e=w(e.replace(c," ")),d?b.baseVal=e:this.className=e}function h(){(b.apply(this,arguments)?f:g).call(this)}var c=new RegExp("(^|\\s+)"+d3.requote(a)+"(\\s+|$)","g");if(arguments.length<2){var d=this.node();if(e=d.classList)return e.contains(a);var e=d.className;return c.lastIndex=0,c.test(e.baseVal!=null?e.baseVal:e)}return this.each(typeof b=="function"?h:b?f:g)}function bz(a){return{__data_
 _:a}}function bA(a){return function(){return bt(this,a)}}function bB(a){return arguments.length||(a=d3.ascending),function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function bD(a){return j(a,bE),a}function bF(a,b,c){j(a,bJ);var d=new k,e=d3.dispatch("start","end"),f=bR;return a.id=b,a.time=c,a.tween=function(b,c){return arguments.length<2?d.get(b):(c==null?d.remove(b):d.set(b,c),a)},a.ease=function(b){return arguments.length?(f=typeof b=="function"?b:d3.ease.apply(d3,arguments),a):f},a.each=function(b,c){return arguments.length<2?bS.call(a,b):(e.on(b,c),a)},d3.timer(function(g){return a.each(function(h,i,j){function p(a){return o.active>b?r():(o.active=b,d.forEach(function(a,b){(b=b.call(l,h,i))&&k.push(b)}),e.start.call(l,h,i),q(a)||d3.timer(q,0,c),1)}function q(a){if(o.active!==b)return r();var c=(a-m)/n,d=f(c),g=k.length;while(g>0)k[--g].call(l,d);if(c>=1)return r(),bL=b,e.end.call(l,h,i),bL=0,1}function r(){return--o.count||delete l.__transition__,1}var k=[],l=this,m=a[j][i].d
 elay,n=a[j][i].duration,o=l.__transition__||(l.__transition__={active:0,count:0});++o.count,m<=g?p(g):d3.timer(p,m,c)}),1},0,c),a}function bH(a,b,c){return c!=""&&bG}function bI(a,b){function d(a,d,e){var f=b.call(this,a,d);return f==null?e!=""&&bG:e!=f&&c(e,f)}function e(a,d,e){return e!=b&&c(e,b)}var c=bb(a);return typeof b=="function"?d:b==null?bH:(b+="",e)}function bS(a){var b=bL,c=bR,d=bP,e=bQ;bL=this.id,bR=this.ease();for(var f=0,g=this.length;f<g;f++)for(var h=this[f],i=0,j=h.length;i<j;i++){var k=h[i];k&&(bP=this[f][i].delay,bQ=this[f][i].duration,a.call(k=k.node,k.__data__,i,f))}return bL=b,bR=c,bP=d,bQ=e,this}function bW(){var a,b=Date.now(),c=bT;while(c)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=bX()-b;d>24?(isFinite(d)&&(clearTimeout(bV),bV=setTimeout(bW,d)),bU=0):(bU=1,bY(bW))}function bX(){var a=null,b=bT,c=Infinity;while(b)b.flush?b=a?a.next=b.next:bT=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function bZ(a){var b=[a.a,a.b],c=[a.c,a
 .d],d=b_(b),e=b$(b,c),f=b_(ca(c,b,-e))||0;b[0]*c[1]<c[0]*b[1]&&(b[0]*=-1,b[1]*=-1,d*=-1,e*=-1),this.rotate=(d?Math.atan2(b[1],b[0]):Math.atan2(-c[0],c[1]))*cb,this.translate=[a.e,a.f],this.scale=[d,f],this.skew=f?Math.atan2(e,f)*cb:0}function b$(a,b){return a[0]*b[0]+a[1]*b[1]}function b_(a){var b=Math.sqrt(b$(a,a));return b&&(a[0]/=b,a[1]/=b),b}function ca(a,b,c){return a[0]+=c*b[0],a[1]+=c*b[1],a}function cd(a,b){var c=a.ownerSVGElement||a;if(c.createSVGPoint){var d=c.createSVGPoint();if(cc<0&&(window.scrollX||window.scrollY)){c=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var e=c[0][0].getScreenCTM();cc=!e.f&&!e.e,c.remove()}return cc?(d.x=b.pageX,d.y=b.pageY):(d.x=b.clientX,d.y=b.clientY),d=d.matrixTransform(a.getScreenCTM().inverse()),[d.x,d.y]}var f=a.getBoundingClientRect();return[b.clientX-f.left-a.clientLeft,b.clientY-f.top-a.clientTop]}function ce(){}function cf(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}funct
 ion cg(a){return a.rangeExtent?a.rangeExtent():cf(a.range())}function ch(a,b){var c=0,d=a.length-1,e=a[c],f=a[d],g;f<e&&(g=c,c=d,d=g,g=e,e=f,f=g);if(g=f-e)b=b(g),a[c]=b.floor(e),a[d]=b.ceil(f);return a}function ci(){return Math}function cj(a,b,c,d){function g(){var g=Math.min(a.length,b.length)>2?cq:cp,i=d?bd:bc;return e=g(a,b,i,c),f=g(b,a,i,d3.interpolate),h}function h(a){return e(a)}var e,f;return h.invert=function(a){return f(a)},h.domain=function(b){return arguments.length?(a=b.map(Number),g()):a},h.range=function(a){return arguments.length?(b=a,g()):b},h.rangeRound=function(a){return h.range(a).interpolate(d3.interpolateRound)},h.clamp=function(a){return arguments.length?(d=a,g()):d},h.interpolate=function(a){return arguments.length?(c=a,g()):c},h.ticks=function(b){return cn(a,b)},h.tickFormat=function(b){return co(a,b)},h.nice=function(){return ch(a,cl),g()},h.copy=function(){return cj(a,b,c,d)},g()}function ck(a,b){return d3.rebind(a,b,"range","rangeRound","interpolate","clam
 p")}function cl(a){return a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1),{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function cm(a,b){var c=cf(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+e*.5,c[2]=e,c}function cn(a,b){return d3.range.apply(d3,cm(a,b))}function co(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(cm(a,b)[2])/Math.LN10+.01))+"f")}function cp(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function cq(a,b,c,d){var e=[],f=[],g=0,h=Math.min(a.length,b.length)-1;a[h]<a[0]&&(a=a.slice().reverse(),b=b.slice().reverse());while(++g<=h)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,h)-1;return f[c](e[c](b))}}function cr(a,b){function d(c){return a(b(c))}var c=b.pow;return d.invert=function(b){return c(a.invert(b))},d.domain=fu
 nction(e){return arguments.length?(b=e[0]<0?cu:ct,c=b.pow,a.domain(e.map(b)),d):a.domain().map(c)},d.nice=function(){return a.domain(ch(a.domain(),ci)),d},d.ticks=function(){var d=cf(a.domain()),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=c(d[0]),i=c(d[1]);if(b===cu){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(a,e){arguments.length<2&&(e=cs);if(arguments.length<1)return e;var f=a/d.ticks().length,g=b===cu?(h=-1e-12,Math.floor):(h=1e-12,Math.ceil),h;return function(a){return a/c(g(b(a)+h))<f?e(a):""}},d.copy=function(){return cr(a.copy(),b)},ck(d,a)}function ct(a){return Math.log(a<0?0:a)/Math.LN10}function cu(a){return-Math.log(a>0?0:-a)/Math.LN10}function cv(a,b){function e(b){return a(c(b))}var c=cw(b),d=cw(1/b);return e.invert=function(b){return d(a.invert(b))},e.domain=function
 (b){return arguments.length?(a.domain(b.map(c)),e):a.domain().map(d)},e.ticks=function(a){return cn(e.domain(),a)},e.tickFormat=function(a){return co(e.domain(),a)},e.nice=function(){return e.domain(ch(e.domain(),cl))},e.exponent=function(a){if(!arguments.length)return b;var f=e.domain();return c=cw(b=a),d=cw(1/b),e.domain(f)},e.copy=function(){return cv(a.copy(),b)},ck(e,a)}function cw(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function cx(a,b){function f(b){return d[((c.get(b)||c.set(b,a.push(b)))-1)%d.length]}function g(b,c){return d3.range(a.length).map(function(a){return b+c*a})}var c,d,e;return f.domain=function(d){if(!arguments.length)return a;a=[],c=new k;var e=-1,g=d.length,h;while(++e<g)c.has(h=d[e])||c.set(h,a.push(h));return f[b.t](b.x,b.p)},f.range=function(a){return arguments.length?(d=a,e=0,b={t:"range",x:a},f):d},f.rangePoints=function(c,h){arguments.length<2&&(h=0);var i=c[0],j=c[1],k=(j-i)/(a.length-1+h);return d=g(a.length<2?(i+j)/2:i+k*h/2,k)
 ,e=0,b={t:"rangePoints",x:c,p:h},f},f.rangeBands=function(c,h){arguments.length<2&&(h=0);var i=c[1]<c[0],j=c[i-0],k=c[1-i],l=(k-j)/(a.length+h);return d=g(j+l*h,l),i&&d.reverse(),e=l*(1-h),b={t:"rangeBands",x:c,p:h},f},f.rangeRoundBands=function(c,h){arguments.length<2&&(h=0);var i=c[1]<c[0],j=c[i-0],k=c[1-i],l=Math.floor((k-j)/(a.length+h)),m=k-j-(a.length-h)*l;return d=g(j+Math.round(m/2),l),i&&d.reverse(),e=Math.round(l*(1-h)),b={t:"rangeRoundBands",x:c,p:h},f},f.rangeBand=function(){return e},f.rangeExtent=function(){return cf(b.x)},f.copy=function(){return cx(a,b)},f.domain(a)}function cC(a,b){function d(){var d=0,f=a.length,g=b.length;c=[];while(++d<g)c[d-1]=d3.quantile(a,d/g);return e}function e(a){return isNaN(a=+a)?NaN:b[d3.bisect(c,a)]}var c;return e.domain=function(b){return arguments.length?(a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),d()):a},e.range=function(a){return arguments.length?(b=a,d()):b},e.quantiles=function(){return c},e.copy=function(){return
  cC(a,b)},d()}function cD(a,b,c){function f(b){return c[Math.max(0,Math.min(e,Math.floor(d*(b-a))))]}function g(){return d=c.length/(b-a),e=c.length-1,f}var d,e;return f.domain=function(c){return arguments.length?(a=+c[0],b=+c[c.length-1],g()):[a,b]},f.range=function(a){return arguments.length?(c=a,g()):c},f.copy=function(){return cD(a,b,c)},g()}function cE(a){function b(a){return+a}return b.invert=b,b.domain=b.range=function(c){return arguments.length?(a=c.map(b),b):a},b.ticks=function(b){return cn(a,b)},b.tickFormat=function(b){return co(a,b)},b.copy=function(){return cE(a)},b}function cH(a){return a.innerRadius}function cI(a){return a.outerRadius}function cJ(a){return a.startAngle}function cK(a){return a.endAngle}function cL(a){function h(e){function o(){h.push("M",f(a(i),g))}var h=[],i=[],j=-1,k=e.length,l,m=q(b),n=q(c);while(++j<k)d.call(this,l=e[j],j)?i.push([+m.call(this,l,j),+n.call(this,l,j)]):i.length&&(o(),i=[]);return i.length&&o(),h.length?h.join(""):null}var b=cM,c=cN,
 d=p,e=cO,f=cQ,g=.7;return h.x=function(a){return arguments.length?(b=a,h):b},h.y=function(a){return arguments.length?(c=a,h):c},h.defined=function(a){return arguments.length?(d=a,h):d},h.interpolate=function(a){return arguments.length?(cP.has(a+="")||(a=cO),f=cP.get(e=a),h):e},h.tension=function(a){return arguments.length?(g=a,h):g},h}function cM(a){return a[0]}function cN(a){return a[1]}function cQ(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("L",(d=a[b])[0],",",d[1]);return e.join("")}function cR(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function cS(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function cT(a,b){return a.length<4?cQ(a):a[1]+cW(a.slice(1,a.length-1),cX(a,b))}function cU(a,b){return a.length<3?cQ(a):a[0]+cW((a.push(a[0]),a),cX([a[a.length-2]].concat(a,[a[1]]),b))}function cV(a,b,c){return a.length<3?cQ(a):a[0]+cW(a,c
 X(a,b))}function cW(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return cQ(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function cX(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function cY(a){if(a.length<3)return cQ(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];de(i,g,h);while(++b<c)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),de(i,g,h);b=-1;while(++b<2)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),de(i,g,h);return i.join("")}function cZ(a){i
 f(a.length<4)return cQ(a);var b=[],c=-1,d=a.length,e,f=[0],g=[0];while(++c<3)e=a[c],f.push(e[0]),g.push(e[1]);b.push(da(dd,f)+","+da(dd,g)),--c;while(++c<d)e=a[c],f.shift(),f.push(e[0]),g.shift(),g.push(e[1]),de(b,f,g);return b.join("")}function c$(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[da(dd,g),",",da(dd,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),de(b,g,h);return b.join("")}function c_(a,b){var c=a.length-1,d=a[0][0],e=a[0][1],f=a[c][0]-d,g=a[c][1]-e,h=-1,i,j;while(++h<=c)i=a[h],j=h/c,i[0]=b*i[0]+(1-b)*(d+j*f),i[1]=b*i[1]+(1-b)*(e+j*g);return cY(a)}function da(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function de(a,b,c){a.push("C",da(db,b),",",da(db,c),",",da(dc,b),",",da(dc,c),",",da(dd,b),",",da(dd,c))}function df(a,b){return(b[1]-a[1])/(b[0]-a[0])}function dg(a){var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=df(e,f);while(++b<c)d[b]=g+(g=df(e=f,f=a[b+1]));return d[b]=g,d}function dh(a
 ){var b=[],c,d,e,f,g=dg(a),h=-1,i=a.length-1;while(++h<i)c=df(a[h],a[h+1]),Math.abs(c)<1e-6?g[h]=g[h+1]=0:(d=g[h]/c,e=g[h+1]/c,f=d*d+e*e,f>9&&(f=c*3/Math.sqrt(f),g[h]=f*d,g[h+1]=f*e));h=-1;while(++h<=i)f=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),b.push([f||0,g[h]*f||0]);return b}function di(a){return a.length<3?cQ(a):a[0]+cW(a,dh(a))}function dj(a){var b,c=-1,d=a.length,e,f;while(++c<d)b=a[c],e=b[0],f=b[1]+cF,b[0]=e*Math.cos(f),b[1]=e*Math.sin(f);return a}function dk(a){function l(g){function y(){l.push("M",h(a(n),k),j,i(a(m.reverse()),k),"Z")}var l=[],m=[],n=[],o=-1,p=g.length,r,s=q(b),t=q(d),u=b===c?function(){return w}:q(c),v=d===e?function(){return x}:q(e),w,x;while(++o<p)f.call(this,r=g[o],o)?(m.push([w=+s.call(this,r,o),x=+t.call(this,r,o)]),n.push([+u.call(this,r,o),+v.call(this,r,o)])):m.length&&(y(),m=[],n=[]);return m.length&&y(),l.length?l.join(""):null}var b=cM,c=cM,d=0,e=cN,f=p,g=cO,h=cQ,i=cQ,j="L",k=.7;return l.x=function(a){return arguments.lengt
 h?(b=c=a,l):c},l.x0=function(a){return arguments.length?(b=a,l):b},l.x1=function(a){return arguments.length?(c=a,l):c},l.y=function(a){return arguments.length?(d=e=a,l):e},l.y0=function(a){return arguments.length?(d=a,l):d},l.y1=function(a){return arguments.length?(e=a,l):e},l.defined=function(a){return arguments.length?(f=a,l):f},l.interpolate=function(a){return arguments.length?(cP.has(a+="")||(a=cO),h=cP.get(g=a),i=h.reverse||h,j=/-closed$/.test(a)?"M":"L",l):g},l.tension=function(a){return arguments.length?(k=a,l):k},l}function dl(a){return a.source}function dm(a){return a.target}function dn(a){return a.radius}function dp(a){return a.startAngle}function dq(a){return a.endAngle}function dr(a){return[a.x,a.y]}function ds(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+cF;return[c*Math.cos(d),c*Math.sin(d)]}}function dt(){return 64}function du(){return"circle"}function dv(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,
 "+b+"Z"}function dz(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function dA(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function dB(a,b,c){e=[];if(c&&b.length>1){var d=cf(a.domain()),e,f=-1,g=b.length,h=(b[1]-b[0])/++c,i,j;while(++f<g)for(i=c;--i>0;)(j=+b[f]-i*h)>=d[0]&&e.push(j);for(--f,i=0;++i<c&&(j=+b[f]+i*h)<d[1];)e.push(j)}return e}function dG(){dE||(dE=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a=d3.event,b;try{dE.scrollTop=1e3,dE.dispatchEvent(a),b=1e3-dE.scrollTop}catch(c){b=a.wheelDelta||-a.detail*5}return b}function dH(a){var b=a.source,c=a.target,d=dJ(b,c),e=[b];while(b!==d)b=b.parent,e.push(b);var f=e.length;while(c!==d)e.splice(f,0,c),c=c.parent;return e}function dI(a){var b=[],c=a.parent;while(c!=null)b.push(a),a=c,c=c.parent;return b.push(a),b}function dJ(a,b){if(a
 ===b)return a;var c=dI(a),d=dI(b),e=c.pop(),f=d.pop(),g=null;while(e===f)g=e,e=c.pop(),f=d.pop();return g}function dM(a){a.fixed|=2}function dN(a){a!==dL&&(a.fixed&=1)}function dO(){dL.fixed&=1,dK=dL=null}function dP(){dL.px=d3.event.x,dL.py=d3.event.y,dK.resume()}function dQ(a,b,c){var d=0,e=0;a.charge=0;if(!a.leaf){var f=a.nodes,g=f.length,h=-1,i;while(++h<g){i=f[h];if(i==null)continue;dQ(i,b,c),a.charge+=i.charge,d+=i.charge*i.cx,e+=i.charge*i.cy}}if(a.point){a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5);var j=b*c[a.point.index];a.charge+=a.pointCharge=j,d+=j*a.point.x,e+=j*a.point.y}a.cx=d/a.charge,a.cy=e/a.charge}function dR(a){return 20}function dS(a){return 1}function dU(a){return a.x}function dV(a){return a.y}function dW(a,b,c){a.y0=b,a.y=c}function dZ(a){return d3.range(a.length)}function d$(a){var b=-1,c=a[0].length,d=[];while(++b<c)d[b]=0;return d}function d_(a){var b=1,c=0,d=a[0][1],e,f=a.length;for(;b<f;++b)(e=a[b][1])>d&&(c=b,d=e);return c}function 
 ea(a){return a.reduce(eb,0)}function eb(a,b){return a+b[1]}function ec(a,b){return ed(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ed(a,b){var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];while(++c<=b)f[c]=e*c+d;return f}function ee(a){return[d3.min(a),d3.max(a)]}function ef(a,b){return d3.rebind(a,b,"sort","children","value"),a.links=ej,a.nodes=function(b){return ek=!0,(a.nodes=a)(b)},a}function eg(a){return a.children}function eh(a){return a.value}function ei(a,b){return b.value-a.value}function ej(a){return d3.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function el(a,b){return a.value-b.value}function em(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function en(a,b){a._pack_next=b,b._pack_prev=a}function eo(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return e*e-c*c-d*d>.001}function ep(a){function l(a){b=Math.min(a.x-a.r,b),c=Math.max(a.x+a.r,c),d=Math.min(a.y-a.r,d),e=Math.max(a.y+a.r,e)}var b=Infinity,
 c=-Infinity,d=Infinity,e=-Infinity,f=a.length,g,h,i,j,k;a.forEach(eq),g=a[0],g.x=-g.r,g.y=0,l(g);if(f>1){h=a[1],h.x=h.r,h.y=0,l(h);if(f>2){i=a[2],eu(g,h,i),l(i),em(g,i),g._pack_prev=i,em(i,h),h=g._pack_next;for(var m=3;m<f;m++){eu(g,h,i=a[m]);var n=0,o=1,p=1;for(j=h._pack_next;j!==h;j=j._pack_next,o++)if(eo(j,i)){n=1;break}if(n==1)for(k=g._pack_prev;k!==j._pack_prev;k=k._pack_prev,p++)if(eo(k,i))break;n?(o<p||o==p&&h.r<g.r?en(g,h=j):en(g=k,h),m--):(em(g,i),h=i,l(i))}}}var q=(b+c)/2,r=(d+e)/2,s=0;for(var m=0;m<f;m++){var t=a[m];t.x-=q,t.y-=r,s=Math.max(s,t.r+Math.sqrt(t.x*t.x+t.y*t.y))}return a.forEach(er),s}function eq(a){a._pack_next=a._pack_prev=a}function er(a){delete a._pack_next,delete a._pack_prev}function es(a){var b=a.children;b&&b.length?(b.forEach(es),a.r=ep(b)):a.r=Math.sqrt(a.value)}function et(a,b,c,d){var e=a.children;a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d;if(e){var f=-1,g=e.length;while(++f<g)et(e[f],b,c,d)}}function eu(a,b,c){var d=a.r+c.r,e=b.x-a.x,f=b.y-a.y;if(d&&(e||f))
 {var g=b.r+c.r,h=Math.sqrt(e*e+f*f),i=Math.max(-1,Math.min(1,(d*d+h*h-g*g)/(2*d*h))),j=Math.acos(i),k=i*(d/=h),l=Math.sin(j)*d;c.x=a.x+k*e+l*f,c.y=a.y+k*f-l*e}else c.x=a.x+d,c.y=a.y}function ev(a){return 1+d3.max(a,function(a){return a.y})}function ew(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function ex(a){var b=a.children;return b&&b.length?ex(b[0]):a}function ey(a){var b=a.children,c;return b&&(c=b.length)?ey(b[c-1]):a}function ez(a,b){return a.parent==b.parent?1:2}function eA(a){var b=a.children;return b&&b.length?b[0]:a._tree.thread}function eB(a){var b=a.children,c;return b&&(c=b.length)?b[c-1]:a._tree.thread}function eC(a,b){var c=a.children;if(c&&(e=c.length)){var d,e,f=-1;while(++f<e)b(d=eC(c[f],b),a)>0&&(a=d)}return a}function eD(a,b){return a.x-b.x}function eE(a,b){return b.x-a.x}function eF(a,b){return a.depth-b.depth}function eG(a,b){function c(a,d){var e=a.children;if(e&&(i=e.length)){var f,g=null,h=-1,i;while(++h<i)f=e[h],c(f,g),g=f}b(a,d)}c(a,null)}f
 unction eH(a){var b=0,c=0,d=a.children,e=d.length,f;while(--e>=0)f=d[e]._tree,f.prelim+=b,f.mod+=b,b+=f.shift+(c+=f.change)}function eI(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function eJ(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function eK(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function eL(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function eM(a){return a.map(eN).join(",")}function eN(a){return/[",\n]/.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}function eP(a,b){return function(c){return c&&a.hasOwnProperty(c.type)?a[c.type](c):b}}function eQ(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+ -2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function eR(a,b){eS.hasOwnProperty(a.type)&&eS[a.type](a,b)}function eT(a,b){eR(a.geometry,b)}function eU(a,b){for(var c=a.features,d=0,e=c.length;d<e;d++)eR(c[d].geometry,b)}function eV(a,b
 ){for(var c=a.geometries,d=0,e=c.length;d<e;d++)eR(c[d],b)}function eW(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function eX(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function eY(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d][0],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function eZ(a,b){b.apply(null,a.coordinates)}function e$(a,b){for(var c=a.coordinates[0],d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function e_(a){return a.source}function fa(a){return a.target}function fb(a,b){function q(a){var b=Math.sin(o-(a*=o))/p,c=Math.sin(a)/p,f=b*g*d+c*m*j,i=b*g*e+c*m*k,l=b*h+c*n;return[Math.atan2(i,f)/eO,Math.atan2(l,Math.sqrt(f*f+i*i))/eO]}var c=a[0]*eO,d=Math.cos(c),e=Math.sin(c),f=a[1]*eO,g=Math.cos(f),h=Math.sin(f),i=b[0]*eO,j=Math.cos(i),k=Math.sin(i),l=b[1]*eO,m=Math.cos(l),n=Math.sin(l),o=q.d=Math.acos(Math.max(-1,Math.min(1,h*n+g*m*Math.cos(i-c)))),p=Math.sin(o);return q
 }function fe(a){var b=0,c=0;for(;;){if(a(b,c))return[b,c];b===0?(b=c+1,c=0):(b-=1,c+=1)}}function ff(a,b,c,d){var e,f,g,h,i,j,k;return e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1],(k-g)*(h-f)-(i-g)*(j-f)>0}function fg(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function fh(a,b,c,d){var e=a[0],f=b[0],g=c[0],h=d[0],i=a[1],j=b[1],k=c[1],l=d[1],m=e-g,n=f-e,o=h-g,p=i-k,q=j-i,r=l-k,s=(o*p-r*m)/(r*n-o*q);return[e+s*n,i+s*q]}function fj(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.
 leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));return b=b.l,b},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return a.edge==null?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return a.edge==null?c.bottomSite:a.edge.region[fi[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;return c.c=a.x*d+a.y*e+(d*d+e*e)*.5,f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e),c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f=(c.c*d.b-d.c*c.b)/e,g=(d.c*c.a-c.c*d.a)/e,h=c.region.r,i=d.region.r,j,k;h.y<i.y||h.y==i.y&&h.x<i.x?(j=a,k=c):(j=b,k=d);var l=f>=k.region.r.x;return l&&j.side==="l"||!l&&j.side==="r"?null:{x:f,y:g}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&a.side==="l")return 1;if(!e&&a.side==="r"
 )return 0;if(c.a===1){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1));if(!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return a.side==="l"?i:!i},endPoint:function(a,c,d){a.ep[c]=d;if(!a.ep[fi[c]])return;b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;d<g;d++){var h=e[d];if(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x)continue;break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;b<d&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return f.list.length===0},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;b<d;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.li
 st.shift();var g=c.list.shift(),h,i,j,k,l,m,n,o,p,q,r,s,t;for(;;){f.empty()||(h=f.min());if(g&&(f.empty()||g.y<h.y||g.y==h.y&&g.x<h.x))i=d.leftBound(g),j=d.right(i),n=d.rightRegion(i),s=e.bisect(n,g),m=d.createHalfEdge(s,"l"),d.insert(i,m),q=e.intersect(i,m),q&&(f.del(i),f.insert(i,q,e.distance(q,g))),i=m,m=d.createHalfEdge(s,"r"),d.insert(i,m),q=e.intersect(m,j),q&&f.insert(m,q,e.distance(q,g)),g=c.list.shift();else if(!f.empty())i=f.extractMin(),k=d.left(i),j=d.right(i),l=d.right(j),n=d.leftRegion(i),o=d.rightRegion(j),r=i.vertex,e.endPoint(i.edge,i.side,r),e.endPoint(j.edge,j.side,r),d.del(i),f.del(j),d.del(j),t="l",n.y>o.y&&(p=n,n=o,o=p,t="r"),s=e.bisect(n,o),m=d.createHalfEdge(s,t),d.insert(k,m),e.endPoint(s,fi[t],r),q=e.intersect(k,m),q&&(f.del(k),f.insert(k,q,e.distance(q,n))),q=e.intersect(m,l),q&&f.insert(m,q,e.distance(q,n));else break}for(i=d.right(d.leftEnd);i!=d.rightEnd;i=d.right(i))b(i.edge)}function fk(){return{leaf:!0,nodes:[],point:null}}function fl(a,b,c,d,e,f){if
 (!a(b,c,d,e,f)){var g=(c+e)*.5,h=(d+f)*.5,i=b.nodes;i[0]&&fl(a,i[0],c,d,g,h),i[1]&&fl(a,i[1],g,d,e,h),i[2]&&fl(a,i[2],c,h,g,f),i[3]&&fl(a,i[3],g,h,e,f)}}function fm(a){return{x:a[0],y:a[1]}}function fo(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function fq(a,b,c,d){var e,f,g=0,h=b.length,i=c.length;while(g<h){if(d>=i)return-1;e=b.charCodeAt(g++);if(e==37){f=fw[b.charAt(g++)];if(!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function fx(a,b,c){return fz.test(b.substring(c,c+=3))?c:-1}function fy(a,b,c){fA.lastIndex=0;var d=fA.exec(b.substring(c,c+10));return d?c+=d[0].length:-1}function fC(a,b,c){var d=fD.get(b.substring(c,c+=3).toLowerCase());return d==null?-1:(a.m=d,c)}function fE(a,b,c){fF.lastIndex=0;var d=fF.exec(b.substring(c,c+12));return d?(a.m=fG.get(d[0].toLowerCase()),c+=d[0].length):-1}function fI(a,b,c){return fq(a,fv.c.toString(),b,c)}function fJ(a,b,c){return fq(a,fv.x.toString(),b,c)}function fK(a,b,c)
 {return fq(a,fv.X.toString(),b,c)}function fL(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+4));return d?(a.y=+d[0],c+=d[0].length):-1}function fM(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.y=fN()+ +d[0],c+=d[0].length):-1}function fN(){return~~((new Date).getFullYear()/1e3)*1e3}function fO(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.m=d[0]-1,c+=d[0].length):-1}function fP(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.d=+d[0],c+=d[0].length):-1}function fQ(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.H=+d[0],c+=d[0].length):-1}function fR(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.M=+d[0],c+=d[0].length):-1}function fS(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+2));return d?(a.S=+d[0],c+=d[0].length):-1}function fT(a,b,c){fU.lastIndex=0;var d=fU.exec(b.substring(c,c+3));return d?(a.L=+d[0],c+=d[0].length):-1}function fV(a,b,c){var d=fW.get(b.substring
 (c,c+=2).toLowerCase());return d==null?-1:(a.p=d,c)}function fX(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=~~(Math.abs(b)/60),e=Math.abs(b)%60;return c+fr(d)+fr(e)}function fZ(a){return a.toISOString()}function f$(a,b,c){function d(b){var c=a(b),d=f(c,1);return b-c<d-b?c:d}function e(c){return b(c=a(new fn(c-1)),1),c}function f(a,c){return b(a=new fn(+a),c),a}function g(a,d,f){var g=e(a),h=[];if(f>1)while(g<d)c(g)%f||h.push(new Date(+g)),b(g,1);else while(g<d)h.push(new Date(+g)),b(g,1);return h}function h(a,b,c){try{fn=fo;var d=new fo;return d._=a,g(d,b,c)}finally{fn=Date}}a.floor=a,a.round=d,a.ceil=e,a.offset=f,a.range=g;var i=a.utc=f_(a);return i.floor=i,i.round=f_(d),i.ceil=f_(e),i.offset=f_(f),i.range=h,a}function f_(a){return function(b,c){try{fn=fo;var d=new fo;return d._=b,a(d,c)._}finally{fn=Date}}}function ga(a,b,c){function d(b){return a(
-b)}return d.invert=function(b){return gc(a.invert(b))},d.domain=function(b){return arguments.length?(a.domain(b),d):a.domain().map(gc)},d.nice=function(a){var b=gb(d.domain());return d.domain([a.floor(b[0]),a.ceil(b[1])])},d.ticks=function(c,e){var f=gb(d.domain());if(typeof c!="function"){var g=f[1]-f[0],h=g/c,i=d3.bisect(gg,h);if(i==gg.length)return b.year(f,c);if(!i)return a.ticks(c).map(gc);Math.log(h/gg[i-1])<Math.log(gg[i]/h)&&--i,c=b[i],e=c[1],c=c[0].range}return c(f[0],new Date(+f[1]+1),e)},d.tickFormat=function(){return c},d.copy=function(){return ga(a.copy(),b,c)},d3.rebind(d,a,"range","rangeRound","interpolate","clamp")}function gb(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function gc(a){return new Date(a)}function gd(a){return function(b){var c=a.length-1,d=a[c];while(!d[1](b))d=a[--c];return d[0](b)}}function ge(a){var b=new Date(a,0,1);return b.setFullYear(a),b}function gf(a){var b=a.getFullYear(),c=ge(b),d=ge(b+1);return b+(a-c)/(d-c)}function go(a){var b=n
 ew Date(Date.UTC(a,0,1));return b.setUTCFullYear(a),b}function gp(a){var b=a.getUTCFullYear(),c=go(b),d=go(b+1);return b+(a-c)/(d-c)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(a){var b=CSSStyleDeclaration.prototype,c=b.setProperty;b.setProperty=function(a,b,d){c.call(this,a,b+"",d)}}d3={version:"2.9.1"};var f=h;try{f(document.documentElement.childNodes)[0].nodeType}catch(i){f=g}var j=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.map=function(a){var b=new k;for(var c in a)b.set(c,a[c]);return b},e(k,{has:function(a){return l+a in this},get:function(a){return this[l+a]},set:function(a,b){return this[l+a]=b},remove:function(a){return a=l+a,a in this&&delete this[a]},keys:function(){var a=[];return this.forEach(function(b){a.push(b)}),a},values:function(){var a=[];return this.forEach(function(b,c){a.push(c)}),a},entries:function(){var a=[];return this.forEach(function
 (b,c){a.push({key:b,value:c})}),a},forEach:function(a){for(var b in this)b.charCodeAt(0)===m&&a.call(this,b.substring(1),this[b])}});var l="\0",m=l.charCodeAt(0);d3.functor=q,d3.rebind=function(a,b){var c=1,d=arguments.length,e;while(++c<d)a[e=arguments[c]]=r(a,b,b[e]);return a},d3.ascending=function(a,b){return a<b?-1:a>b?1:a>=b?0:NaN},d3.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},d3.mean=function(a,b){var c=a.length,d,e=0,f=-1,g=0;if(arguments.length===1)while(++f<c)s(d=a[f])&&(e+=(d-e)/++g);else while(++f<c)s(d=b.call(a,a[f],f))&&(e+=(d-e)/++g);return g?e:undefined},d3.median=function(a,b){return arguments.length>1&&(a=a.map(b)),a=a.filter(s),a.length?d3.quantile(a.sort(d3.ascending),.5):undefined},d3.min=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&e>f&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&e>f&&(e=f)
 }return e},d3.max=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&f>e&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&f>e&&(e=f)}return e},d3.extent=function(a,b){var c=-1,d=a.length,e,f,g;if(arguments.length===1){while(++c<d&&((e=g=a[c])==null||e!=e))e=g=undefined;while(++c<d)(f=a[c])!=null&&(e>f&&(e=f),g<f&&(g=f))}else{while(++c<d&&((e=g=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&(e>f&&(e=f),g<f&&(g=f))}return[e,g]},d3.random={normal:function(a,b){return arguments.length<2&&(b=1),arguments.length<1&&(a=0),function(){var c,d,e;do c=Math.random()*2-1,d=Math.random()*2-1,e=c*c+d*d;while(!e||e>1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}}},d3.sum=function(a,b){var c=0,d=a.length,e,f=-1;if(arguments.length===1)while(++f<d)isNaN(e=+a[f])||(c+=e);else while(++f<d)isNaN(e=+b.call(a,a[f],f))||(c+=e
 );return c},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.transpose=function(a){return d3.zip.apply(d3,a)},d3.zip=function(){if(!(e=arguments.length))return[];for(var a=-1,b=d3.min(arguments,t),c=new Array(b);++a<b;)for(var d=-1,e,f=c[a]=new Array(e);++d<e;)f[d]=arguments[d][a];return c},d3.bisector=function(a){return{left:function(b,c,d,e){arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);while(d<e){var f=d+e>>1;a.call(b,b[f],f)<c?d=f+1:e=f}return d},right:function(b,c,d,e){arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);while(d<e){var f=d+e>>1;c<a.call(b,b[f],f)?e=f:d=f+1}return d}}};var u=d3.bisector(function(a){return a});d3.bisectLeft=u.left,d3.bisect=d3.bisectRight=u.right,d3.first=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])>0&&(e=f);return e},d3.last=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending
 );while(++c<d)b.call(a,e,f=a[c])<=0&&(e=f);return e},d3.nest=function(){function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],l,m,n=new k,o,p={};while(++h<i)(o=n.get(l=j(m=c[h])))?o.push(m):n.set(l,[m]);return n.forEach(function(a){p[a]=f(n.get(a),g)}),p}function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});return f&&e.sort(function(a,b){return f(a.key,b.key)}),e}var a={},b=[],c=[],d,e;return a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){return b.push(c),a},a.sortKeys=function(d){return c[b.length-1]=d,a},a.sortValues=function(b){return d=b,a},a.rollup=function(b){return e=b,a},a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){var c=[],d=-1,e=b.length;whil
 e(++d<e)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],e,f=-1,g=a.length;arguments.length<2&&(b=v);while(++f<g)b.call(d,e=a[f],f)?d=[]:(d.length||c.push(d),d.push(e));return c},d3.range=function(a,b,c){arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0));if((b-a)/c===Infinity)throw new Error("infinite range");var d=[],e=x(Math.abs(c)),f=-1,g;a*=e,b*=e,c*=e;if(c<0)while((g=a+c*++f)>b)d.push(g/e);else while((g=a+c*++f)<b)d.push(g/e);return d},d3.requote=function(a){return a.replace(y,"\\$&")};var y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*(b=Math.pow(10,b)))/b:Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?(c=b,b=null):b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),b&&d.setRequestHeader("Accept",b),d.onreadystatechange=function(){if(d.readyState===4){var a=d.status;c(a>=200&&a<300||a===304?d:null)}},d.send(null)},d3.t
 ext=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)};var z={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:z,qualify:function(a){var b=a.indexOf(":"),c=a;return b>=0&&(c=a.substring(0,b),a=a.substring(b+1)),z.hasOwnProperty(c)?{space:z[c],local:a}:a}},d3.dispatch=function(){var a=new A,b=-1,c=arguments.length;while(++b<c)a[arguments[b]]=B(a);return a},A.prototype.on=function(a,b){var c=a.indexOf("."),d="";return c>0&&(d=a.subst
 ring(c+1),a=a.substring(0,c)),arguments.length<2?this[a].on(d):this[a].on(d,b)},d3.format=function(a){var b=C.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=1,k="",l=!1;h&&(h=+h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4)));switch(i){case"n":g=!0,i="g";break;case"%":j=100,k="%",i="f";break;case"p":j=100,k="%",i="r";break;case"d":l=!0,h=0;break;case"s":j=-1,i="r"}return i=="r"&&!h&&(i="g"),i=D.get(i)||F,function(a){if(l&&a%1)return"";var b=a<0&&(a=-a)?"−":d;if(j<0){var m=d3.formatPrefix(a,h);a*=m.scale,k=m.symbol}else a*=j;a=i(a,h);if(e){var n=a.length+b.length;n<f&&(a=(new Array(f-n+1)).join(c)+a),g&&(a=G(a)),a=b+a}else{g&&(a=G(a)),a=b+a;var n=a.length;n<f&&(a=(new Array(f-n+1)).join(c)+a)}return a+k}};var C=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,D=d3.map({g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return d3.round(a,b=E(a,b
 )).toFixed(Math.max(0,Math.min(20,b)))}}),H=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(I);d3.formatPrefix=function(a,b){var c=0;return a&&(a<0&&(a*=-1),b&&(a=d3.round(a,E(a,b))),c=1+Math.floor(1e-12+Math.log(a)/Math.LN10),c=Math.max(-24,Math.min(24,Math.floor((c<=0?c+1:c-1)/3)*3))),H[8+c/3]};var J=S(2),K=S(3),L=function(){return R},M=d3.map({linear:L,poly:S,quad:function(){return J},cubic:function(){return K},sin:function(){return T},exp:function(){return U},circle:function(){return V},elastic:W,back:X,bounce:function(){return Y}}),N=d3.map({"in":R,out:P,"in-out":Q,"out-in":function(a){return Q(P(a))}});d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return c=M.get(c)||L,d=N.get(d)||R,O(d(c.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.interpolate=function(a,b){var c=d3.interpolators.length,d;while(--c>=0&&!(d=d3.interpolators[c](a,b)));return d},d3.interpolateNumber=function(a,b
 ){return b-=a,function(c){return a+b*c}},d3.interpolateRound=function(a,b){return b-=a,function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;ba.lastIndex=0;for(d=0;c=ba.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=ba.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=ba.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;return h.length===1?h[0]==null?i[0].x:function(){return b}:function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.
 interpolateTransform=function(a,b){var c=[],d=[],e,f=d3.transform(a),g=d3.transform(b),h=f.translate,i=g.translate,j=f.rotate,k=g.rotate,l=f.skew,m=g.skew,n=f.scale,o=g.scale;return h[0]!=i[0]||h[1]!=i[1]?(c.push("translate(",null,",",null,")"),d.push({i:1,x:d3.interpolateNumber(h[0],i[0])},{i:3,x:d3.interpolateNumber(h[1],i[1])})):i[0]||i[1]?c.push("translate("+i+")"):c.push(""),j!=k?d.push({i:c.push(c.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(j,k)}):k&&c.push(c.pop()+"rotate("+k+")"),l!=m?d.push({i:c.push(c.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(l,m)}):m&&c.push(c.pop()+"skewX("+m+")"),n[0]!=o[0]||n[1]!=o[1]?(e=c.push(c.pop()+"scale(",null,",",null,")"),d.push({i:e-4,x:d3.interpolateNumber(n[0],o[0])},{i:e-2,x:d3.interpolateNumber(n[1],o[1])})):(o[0]!=1||o[1]!=1)&&c.push(c.pop()+"scale("+o+")"),e=d.length,function(a){var b=-1,f;while(++b<e)c[(f=d[b]).i]=f.x(a);return c.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.
 r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+bg(Math.round(c+f*a))+bg(Math.round(d+g*a))+bg(Math.round(e+h*a))}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return bn(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=bb(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var ba=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return(typeof a=="string"||typeof b=="string")&&d3.interpolateString(a+"",b+"")},function(a,b){return
 (typeof b=="string"?bk.has(b)||/^(#|rgb\(|hsl\()/.test(b):b instanceof bf||b instanceof bm)&&d3.interpolateRgb(a,b)},function(a,b){return!isNaN(a=+a)&&!isNaN(b=+b)&&d3.interpolateNumber(a,b)}],d3.rgb=function(a,b,c){return arguments.length===1?a instanceof bf?be(a.r,a.g,a.b):bh(""+a,be,bn):be(~~a,~~b,~~c)},bf.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;return!b&&!c&&!d?be(e,e,e):(b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e),be(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a))))},bf.prototype.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),be(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},bf.prototype.hsl=function(){return bi(this.r,this.g,this.b)},bf.prototype.toString=function(){return"#"+bg(this.r)+bg(this.g)+bg(this.b)};var bk=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#f
 fe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",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",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",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",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:"#8
 08000",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",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"});bk.forEach(function(a,b){bk.set(a,bh(b,be,bn))}),d3.hsl=function(a,b,c){return arguments.length===1?a instanceof bm?bl(a.h,a.s,a.l):bh(""+a,bi,bl):bl(+a,+b,+c)},bm.prototype.brighter=f
 unction(a){return a=Math.pow(.7,arguments.length?a:1),bl(this.h,this.s,this.l/a)},bm.prototype.darker=function(a){return a=Math.pow(.7,arguments.length?a:1),bl(this.h,this.s,a*this.l)},bm.prototype.rgb=function(){return bn(this.h,this.s,this.l)},bm.prototype.toString=function(){return this.rgb().toString()};var bp=function(a,b){return b.querySelector(a)},bq=function(a,b){return b.querySelectorAll(a)},br=document.documentElement,bs=br.matchesSelector||br.webkitMatchesSelector||br.mozMatchesSelector||br.msMatchesSelector||br.oMatchesSelector,bt=function(a,b){return bs.call(a,b)};typeof Sizzle=="function"&&(bp=function(a,b){return Sizzle(a,b)[0]},bq=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))},bt=Sizzle.matchesSelector);var bu=[];d3.selection=function(){return bC},d3.selection.prototype=bu,bu.select=function(a){var b=[],c,d,e,f;typeof a!="function"&&(a=bv(a));for(var g=-1,h=this.length;++g<h;){b.push(c=[]),c.parentNode=(e=this[g]).parentNode;for(var i=-1,j=e.length;++i<j;)(f=e[
 i])?(c.push(d=a.call(f,f.__data__,i)),d&&"__data__"in f&&(d.__data__=f.__data__)):c.push(null)}return bo(b)},bu.selectAll=function(a){var b=[],c,d;typeof a!="function"&&(a=bw(a));for(var e=-1,g=this.length;++e<g;)for(var h=this[e],i=-1,j=h.length;++i<j;)if(d=h[i])b.push(c=f(a.call(d,d.__data__,i))),c.parentNode=d;return bo(b)},bu.attr=function(a,b){function d(){this.removeAttribute(a)}function e(){this.removeAttributeNS(a.space,a.local)}function f(){this.setAttribute(a,b)}function g(){this.setAttributeNS(a.space,a.local,b)}function h(){var c=b.apply(this,arguments);c==null?this.removeAttribute(a):this.setAttribute(a,c)}function i(){var c=b.apply(this,arguments);c==null?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}a=d3.ns.qualify(a);if(arguments.length<2){var c=this.node();return a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}return this.each(b==null?a.local?e:d:typeof b=="function"?a.local?i:h:a.local?g:f)},bu.classed=function(a,b){var 
 c=a.split(bx),d=c.length,e=-1;if(arguments.length>1){while(++e<d)by.call(this,c[e],b);return this}while(++e<d)if(!by.call(this,c[e]))return!1;return!0};var bx=/\s+/g;bu.style=function(a,b,c){function d(){this.style.removeProperty(a)}function e(){this.style.setProperty(a,b,c)}function f(){var d=b.apply(this,arguments);d==null?this.style.removeProperty(a):this.style.setProperty(a,d,c)}return arguments.length<3&&(c=""),arguments.length<2?window.getComputedStyle(this.node(),null).getPropertyValue(a):this.each(b==null?d:typeof b=="function"?f:e)},bu.property=function(a,b){function c(){delete this[a]}function d(){this[a]=b}function e(){var c=b.apply(this,arguments);c==null?delete this[a]:this[a]=c}return arguments.length<2?this.node()[a]:this.each(b==null?c:typeof b=="function"?e:d)},bu.text=function(a){return arguments.length<1?this.node().textContent:this.each(typeof a=="function"?function(){var b=a.apply(this,arguments);this.textContent=b==null?"":b}:a==null?function(){this.textContent
 =""}:function(){this.textContent=a})},bu.html=function(a){return arguments.length<1?this.node().innerHTML:this.each(typeof a=="function"?function(){var b=a.apply(this,arguments);this.innerHTML=b==null?"":b}:a==null?function(){this.innerHTML=""}:function(){this.innerHTML=a})},bu.append=function(a){function b(){return this.appendChild(document.createElementNS(this.namespaceURI,a))}function c(){return this.appendChild(document.createElementNS(a.space,a.local))}return a=d3.ns.qualify(a),this.select(a.local?c:b)},bu.insert=function(a,b){function c(){return this.insertBefore(document.createElementNS(this.namespaceURI,a),bp(b,this))}function d(){return this.insertBefore(document.createElementNS(a.space,a.local),bp(b,this))}return a=d3.ns.qualify(a),this.select(a.local?d:c)},bu.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},bu.data=function(a,b){function g(a,c){var d,e=a.length,f=c.length,g=Math.min(e,f),l=Math.max(e,f),m=[],n=[],o=[],p,q;if(b)
 {var r=new k,s=[],t,u=c.length;for(d=-1;++d<e;)t=b.call(p=a[d],p.__data__,d),r.has(t)?o[u++]=p:r.set(t,p),s.push(t);for(d=-1;++d<f;)t=b.call(c,q=c[d],d),r.has(t)?(m[d]=p=r.get(t),p.__data__=q,n[d]=o[d]=null):(n[d]=bz(q),m[d]=o[d]=null),r.remove(t);for(d=-1;++d<e;)r.has(s[d])&&(o[d]=a[d])}else{for(d=-1;++d<g;)p=a[d],q=c[d],p?(p.__data__=q,m[d]=p,n[d]=o[d]=null):(n[d]=bz(q),m[d]=o[d]=null);for(;d<f;++d)n[d]=bz(c[d]),m[d]=o[d]=null;for(;d<l;++d)o[d]=a[d],n[d]=m[d]=null}n.update=m,n.parentNode=m.parentNode=o.parentNode=a.parentNode,h.push(n),i.push(m),j.push(o)}var c=-1,d=this.length,e,f;if(!arguments.length){a=new Array(d=(e=this[0]).length);while(++c<d)if(f=e[c])a[c]=f.__data__;return a}var h=bD([]),i=bo([]),j=bo([]);if(typeof a=="function")while(++c<d)g(e=this[c],a.call(e,e.parentNode.__data__,c));else while(++c<d)g(e=this[c],a);return i.enter=function(){return h},i.exit=function(){return j},i},bu.datum=bu.map=function(a){return arguments.length<1?this.property("__data__"):this.prope
 rty("__data__",a)},bu.filter=function(a){var b=[],c,d,e;typeof a!="function"&&(a=bA(a));for(var f=0,g=this.length;f<g;f++){b.push(c=[]),c.parentNode=(d=this[f]).parentNode;for(var h=0,i=d.length;h<i;h++)(e=d[h])&&a.call(e,e.__data__,h)&&c.push(e)}return bo(b)},bu.order=function(){for(var a=-1,b=this.length;++a<b;)for(var c=this[a],d=c.length-1,e=c[d],f;--d>=0;)if(f=c[d])e&&e!==f.nextSibling&&e.parentNode.insertBefore(f,e),e=f;return this},bu.sort=function(a){a=bB.apply(this,arguments);for(var b=-1,c=this.length;++b<c;)this[b].sort(a);return this.order()},bu.on=function(a,b,c){arguments.length<3&&(c=!1);var d="__on"+a,e=a.indexOf(".");return e>0&&(a=a.substring(0,e)),arguments.length<2?(e=this.node()[d])&&e._:this.each(function(e,f){function i(a){var c=d3.event;d3.event=a;try{b.call(g,g.__data__,f)}finally{d3.event=c}}var g=this,h=g[d];h&&(g.removeEventListener(a,h,h.$),delete g[d]),b&&(g.addEventListener(a,g[d]=i,i.$=c),i._=b)})},bu.each=function(a){for(var b=-1,c=this.length;++b<c;
 )for(var d=this[b],e=-1,f=d.length;++e<f;){var g=d[e];g&&a.call(g,g.__data__,e,b)}return this},bu.call=function(a){return a.apply(this,(arguments[0]=this,arguments)),this},bu.empty=function(){return!this.node()},bu.node=function(a){for(var b=0,c=this.length;b<c;b++)for(var d=this[b],e=0,f=d.length;e<f;e++){var g=d[e];if(g)return g}return null},bu.transition=function(){var a=[],b,c;for(var d=-1,e=this.length;++d<e;){a.push(b=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)b.push((c=f[g])?{node:c,delay:bP,duration:bQ}:null)}return bF(a,bL||++bK,Date.now())};var bC=bo([[document]]);bC[0].parentNode=br,d3.select=function(a){return typeof a=="string"?bC.select(a):bo([[a]])},d3.selectAll=function(a){return typeof a=="string"?bC.selectAll(a):bo([f(a)])};var bE=[];d3.selection.enter=bD,d3.selection.enter.prototype=bE,bE.append=bu.append,bE.insert=bu.insert,bE.empty=bu.empty,bE.node=bu.node,bE.select=function(a){var b=[],c,d,e,f,g;for(var h=-1,i=this.length;++h<i;){e=(f=this[h]).update,b.push(c
 =[]),c.parentNode=f.parentNode;for(var j=-1,k=f.length;++j<k;)(g=f[j])?(c.push(e[j]=d=a.call(f.parentNode,g.__data__,j)),d.__data__=g.__data__):c.push(null)}return bo(b)};var bG={},bJ=[],bK=0,bL=0,bM=0,bN=250,bO=d3.ease("cubic-in-out"),bP=bM,bQ=bN,bR=bO;bJ.call=bu.call,d3.transition=function(a){return arguments.length?bL?a.transition():a:bC.transition()},d3.transition.prototype=bJ,bJ.select=function(a){var b=[],c,d,e;typeof a!="function"&&(a=bv(a));for(var f=-1,g=this.length;++f<g;){b.push(c=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(e=h[i])&&(d=a.call(e.node,e.node.__data__,i))?("__data__"in e.node&&(d.__data__=e.node.__data__),c.push({node:d,delay:e.delay,duration:e.duration})):c.push(null)}return bF(b,this.id,this.time).ease(this.ease())},bJ.selectAll=function(a){var b=[],c,d,e;typeof a!="function"&&(a=bw(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(e=h[i]){d=a.call(e.node,e.node.__data__,i),b.push(c=[]);for(var k=-1,l=d.length;++k<l;)c.pus
 h({node:d[k],delay:e.delay,duration:e.duration})}return bF(b,this.id,this.time).ease(this.ease())},bJ.attr=function(a,b){return this.attrTween(a,bI(a,b))},bJ.attrTween=function(a,b){function d(a,d){var e=b.call(this,a,d,this.getAttribute(c));return e===bG?(this.removeAttribute(c),null):e&&function(a){this.setAttribute(c,e(a))}}function e(a,d){var e=b.call(this,a,d,this.getAttributeNS(c.space,c.local));return e===bG?(this.removeAttributeNS(c.space,c.local),null):e&&function(a){this.setAttributeNS(c.space,c.local,e(a))}}var c=d3.ns.qualify(a);return this.tween("attr."+a,c.local?e:d)},bJ.style=function(a,b,c){return arguments.length<3&&(c=""),this.styleTween(a,bI(a,b),c)},bJ.styleTween=function(a,b,c){return arguments.length<3&&(c=""),this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f===bG?(this.style.removeProperty(a),null):f&&function(b){this.style.setProperty(a,f(b),c)}})},bJ.text=function(a){return this.tween("
 text",function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a})},bJ.remove=function(){return this.each("end.transition",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},bJ.delay=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].delay=a.apply(this,arguments)|0}:(a|=0,function(c,d,e){b[e][d].delay=a}))},bJ.duration=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].duration=Math.max(1,a.apply(this,arguments)|0)}:(a=Math.max(1,a|0),function(c,d,e){b[e][d].duration=a}))},bJ.transition=function(){return this.select(o)};var bT=null,bU,bV;d3.timer=function(a,b,c){var d=!1,e,f=bT;if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(bT={callback:a,then:c,delay:b,next:bT}),bU||(bV=clearTimeout(bV),bU=1,bY(bW))},d3.timer.flush=function(){var a,b=Date.now(),c=bT;while(c)a=b-
 c.then,c.delay||(c.flush=c.callback(a)),c=c.next;bX()};var bY=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.transform=function(a){var b=document.createElementNS(d3.ns.prefix.svg,"g"),c={a:1,b:0,c:0,d:1,e:0,f:0};return(d3.transform=function(a){b.setAttribute("transform",a);var d=b.transform.baseVal.consolidate();return new bZ(d?d.matrix:c)})(a)},bZ.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var cb=180/Math.PI;d3.mouse=function(a){return cd(a,$())};var cc=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(a,b){return arguments.length<2&&(b=$().touches),b?f(b).map(function(b){var c=cd(a,b);return c.identifier=b.identifier,c}):[]},d3.scale={},d3.scale.linear=function(){return cj([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return cr
 (d3.scale.linear(),ct)};var cs=d3.format(".0e");ct.pow=function(a){return Math.pow(10,a)},cu.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return cv(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return cx([],{t:"range",x:[]})},d3.scale.category10=function(){return d3.scale.ordinal().range(cy)},d3.scale.category20=function(){return d3.scale.ordinal().range(cz)},d3.scale.category20b=function(){return d3.scale.ordinal().range(cA)},d3.scale.category20c=function(){return d3.scale.ordinal().range(cB)};var cy=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],cz=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],cA=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9
 e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],cB=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return cC([],[])},d3.scale.quantize=function(){return cD(0,1,[0,1])},d3.scale.identity=function(){return cE([0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+cF,h=d.apply(this,arguments)+cF,i=(h<g&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=cG?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*
 n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=cH,b=cI,c=cJ,d=cK;return e.innerRadius=function(b){return arguments.length?(a=q(b),e):a},e.outerRadius=function(a){return arguments.length?(b=q(a),e):b},e.startAngle=function(a){return arguments.length?(c=q(a),e):c},e.endAngle=function(a){return arguments.length?(d=q(a),e):d},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+cF;return[Math.cos(f)*e,Math.sin(f)*e]},e};var cF=-Math.PI/2,cG=2*Math.PI-1e-6;d3.svg.line=function(){return cL(n)};var cO="linear",cP=d3.map({linear:cQ,"step-before":cR,"step-after":cS,basis:cY,"basis-open":cZ,"basis-closed":c$,bundle:c_,cardinal:cV,"cardinal-open":cT,"cardinal-closed":cU,monotone:di}),db=[0,2/3,1/3,0],dc=[0,1/3,2/3,0],dd=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=cL(dj);return a.radius=a.x,delete a.x,a.angle=a.y,delete a.y,a},cR.reverse=cS
 ,cS.reverse=cR,d3.svg.area=function(){return dk(Object)},d3.svg.area.radial=function(){var a=dk(dj);return a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1,a},d3.svg.chord=function(){function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1,e.a1-e.a0)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1,f.a1-f.a0)+j(f.r,f.p1,e.r,e.p0))+"Z"}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+cF,k=e.call(a,h,g)+cF;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function i(a,b,c){return"A"+a+","+a+" 0 "+ +(c>Math.PI)+",1 "+b}function j(a,b,c,d){return"Q 0,0 "+d}var a=dl,b=dm,c=dn,d=cJ,e=cK;return f.radius=function(a){return arguments.length?(c=q(a),f):c},f.source=function(b){return arguments.length?(a=q(b),f):a},f.target=function(a){retur
 n arguments.length?(b=q(a),f):b},f.startAngle=function(a){return arguments.length?(d=q(a),f):d},f.endAngle=function(a){return arguments.length?(e=q(a),f):e},f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(c),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=dl,b=dm,c=dr;return d.source=function(b){return arguments.length?(a=q(b),d):a},d.target=function(a){return arguments.length?(b=q(a),d):b},d.projection=function(a){return arguments.length?(c=a,d):c},d},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=dr,c=a.projection;return a.projection=function(a){return arguments.length?c(ds(b=a)):b},a},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function c(c,d){return(dw.get(a.call(this,c,d))||dv)(b.call(this,c,d))}var a=du,b=dt;return c
-.type=function(b){return arguments.length?(a=q(b),c):a},c.size=function(a){return arguments.length?(b=q(a),c):b},c};var dw=d3.map({circle:dv,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*dy)),c=b*dy;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/dx),c=b*dx/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/dx),c=b*dx/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}});d3.svg.symbolTypes=dw.keys();var dx=Math.sqrt(3),dy=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function k(k){k.each(function(){var k=d3.select(this),l=h==null?a.ticks?a.ticks.apply(a,g):a.domain():h,m=i==null?a.tickFormat?a.tickFormat.apply(a,g):String:i,n=dB(a,l,j),o=k
 .selectAll(".minor").data(n,String),p=o.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),q=d3.transition(o.exit()).style("opacity",1e-6).remove(),r=d3.transition(o).style("opacity",1),s=k.selectAll("g").data(l,String),t=s.enter().insert("g","path").style("opacity",1e-6),u=d3.transition(s.exit()).style("opacity",1e-6).remove(),v=d3.transition(s).style("opacity",1),w,x=cg(a),y=k.selectAll(".domain").data([0]),z=y.enter().append("path").attr("class","domain"),A=d3.transition(y),B=a.copy(),C=this.__chart__||B;this.__chart__=B,t.append("line").attr("class","tick"),t.append("text"),v.select("text").text(m);switch(b){case"bottom":w=dz,p.attr("y2",d),r.attr("x2",0).attr("y2",d),t.select("line").attr("y2",c),t.select("text").attr("y",Math.max(c,0)+f),v.select("line").attr("x2",0).attr("y2",c),v.select("text").attr("x",0).attr("y",Math.max(c,0)+f).attr("dy",".71em").attr("text-anchor","middle"),A.attr("d","M"+x[0]+","+e+"V0H"+x[1]+"V"+e);break;case"top":w=dz,p.attr(
 "y2",-d),r.attr("x2",0).attr("y2",-d),t.select("line").attr("y2",-c),t.select("text").attr("y",-(Math.max(c,0)+f)),v.select("line").attr("x2",0).attr("y2",-c),v.select("text").attr("x",0).attr("y",-(Math.max(c,0)+f)).attr("dy","0em").attr("text-anchor","middle"),A.attr("d","M"+x[0]+","+ -e+"V0H"+x[1]+"V"+ -e);break;case"left":w=dA,p.attr("x2",-d),r.attr("x2",-d).attr("y2",0),t.select("line").attr("x2",-c),t.select("text").attr("x",-(Math.max(c,0)+f)),v.select("line").attr("x2",-c).attr("y2",0),v.select("text").attr("x",-(Math.max(c,0)+f)).attr("y",0).attr("dy",".32em").attr("text-anchor","end"),A.attr("d","M"+ -e+","+x[0]+"H0V"+x[1]+"H"+ -e);break;case"right":w=dA,p.attr("x2",d),r.attr("x2",d).attr("y2",0),t.select("line").attr("x2",c),t.select("text").attr("x",Math.max(c,0)+f),v.select("line").attr("x2",c).attr("y2",0),v.select("text").attr("x",Math.max(c,0)+f).attr("y",0).attr("dy",".32em").attr("text-anchor","start"),A.attr("d","M"+e+","+x[0]+"H0V"+x[1]+"H"+e)}if(a.ticks)t.call(w
 ,C),v.call(w,B),u.call(w,B),p.call(w,C),r.call(w,B),q.call(w,B);else{var D=B.rangeBand()/2,E=function(a){return B(a)+D};t.call(w,E),v.call(w,E)}})}var a=d3.scale.linear(),b="bottom",c=6,d=6,e=6,f=3,g=[10],h=null,i,j=0;return k.scale=function(b){return arguments.length?(a=b,k):a},k.orient=function(a){return arguments.length?(b=a,k):b},k.ticks=function(){return arguments.length?(g=arguments,k):g},k.tickValues=function(a){return arguments.length?(h=a,k):h},k.tickFormat=function(a){return arguments.length?(i=a,k):i},k.tickSize=function(a,b,f){if(!arguments.length)return c;var g=arguments.length-1;return c=+a,d=g>1?+b:c,e=g>0?+arguments[g]:c,k},k.tickPadding=function(a){return arguments.length?(f=+a,k):f},k.tickSubdivide=function(a){return arguments.length?(j=+a,k):j},k},d3.svg.brush=function(){function g(a){a.each(function(){var a=d3.select(this),e=a.selectAll(".background").data([0]),f=a.selectAll(".extent").data([0]),l=a.selectAll(".resize").data(d,String),m;a.style("pointer-events","
 all").on("mousedown.brush",k).on("touchstart.brush",k),e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),f.enter().append("rect").attr("class","extent").style("cursor","move"),l.enter().append("g").attr("class",function(a){return"resize "+a}).style("cursor",function(a){return dC[a]}).append("rect").attr("x",function(a){return/[ew]$/.test(a)?-3:null}).attr("y",function(a){return/^[ns]/.test(a)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),l.style("display",g.empty()?"none":null),l.exit().remove(),b&&(m=cg(b),e.attr("x",m[0]).attr("width",m[1]-m[0]),i(a)),c&&(m=cg(c),e.attr("y",m[0]).attr("height",m[1]-m[0]),j(a)),h(a)})}function h(a){a.selectAll(".resize").attr("transform",function(a){return"translate("+e[+/e$/.test(a)][0]+","+e[+/^s/.test(a)][1]+")"})}function i(a){a.select(".extent").attr("x",e[0][0]),a.selectAll(".extent,.n>rect,.s>rect").attr("width",e[1][0]-e[0][0])}function j(a){a.select(".exte
 nt").attr("y",e[0][1]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",e[1][1]-e[0][1])}function k(){function x(){var a=d3.event.changedTouches;return a?d3.touches(d,a)[0]:d3.mouse(d)}function y(){d3.event.keyCode==32&&(q||(r=null,s[0]-=e[1][0],s[1]-=e[1][1],q=2),Z())}function z(){d3.event.keyCode==32&&q==2&&(s[0]+=e[1][0],s[1]+=e[1][1],q=0,Z())}function A(){var a=x(),d=!1;t&&(a[0]+=t[0],a[1]+=t[1]),q||(d3.event.altKey?(r||(r=[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]),s[0]=e[+(a[0]<r[0])][0],s[1]=e[+(a[1]<r[1])][1]):r=null),o&&B(a,b,0)&&(i(m),d=!0),p&&B(a,c,1)&&(j(m),d=!0),d&&(h(m),l({type:"brush",mode:q?"move":"resize"}))}function B(a,b,c){var d=cg(b),g=d[0],h=d[1],i=s[c],j=e[1][c]-e[0][c],k,l;q&&(g-=i,h-=j+i),k=Math.max(g,Math.min(h,a[c])),q?l=(k+=i)+j:(r&&(i=Math.max(g,Math.min(h,2*r[c]-k))),i<k?(l=k,k=i):l=i);if(e[0][c]!==k||e[1][c]!==l)return f=null,e[0][c]=k,e[1][c]=l,!0}function C(){A(),m.style("pointer-events","all").selectAll(".resize").style("display",g.empty()?"none"
 :null),d3.select("body").style("cursor",null),u.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),l({type:"brushend"}),Z()}var d=this,k=d3.select(d3.event.target),l=a.of(d,arguments),m=d3.select(d),n=k.datum(),o=!/^(n|s)$/.test(n)&&b,p=!/^(e|w)$/.test(n)&&c,q=k.classed("extent"),r,s=x(),t,u=d3.select(window).on("mousemove.brush",A).on("mouseup.brush",C).on("touchmove.brush",A).on("touchend.brush",C).on("keydown.brush",y).on("keyup.brush",z);if(q)s[0]=e[0][0]-s[0],s[1]=e[0][1]-s[1];else if(n){var v=+/w$/.test(n),w=+/^n/.test(n);t=[e[1-v][0]-s[0],e[1-w][1]-s[1]],s[0]=e[v][0],s[1]=e[w][1]}else d3.event.altKey&&(r=s.slice());m.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",k.style("cursor")),l({type:"brushstart"}),A(),Z()}var a=_(g,"brushstart","brush","brushend"),b=null,c=null,d=dD[0],e=[[0,0],[0,0]],f;return g.x=function(a){
 return arguments.length?(b=a,d=dD[!b<<1|!c],g):b},g.y=function(a){return arguments.length?(c=a,d=dD[!b<<1|!c],g):c},g.extent=function(a){var d,h,i,j,k;return arguments.length?(f=[[0,0],[0,0]],b&&(d=a[0],h=a[1],c&&(d=d[0],h=h[0]),f[0][0]=d,f[1][0]=h,b.invert&&(d=b(d),h=b(h)),h<d&&(k=d,d=h,h=k),e[0][0]=d|0,e[1][0]=h|0),c&&(i=a[0],j=a[1],b&&(i=i[1],j=j[1]),f[0][1]=i,f[1][1]=j,c.invert&&(i=c(i),j=c(j)),j<i&&(k=i,i=j,j=k),e[0][1]=i|0,e[1][1]=j|0),g):(a=f||e,b&&(d=a[0][0],h=a[1][0],f||(d=e[0][0],h=e[1][0],b.invert&&(d=b.invert(d),h=b.invert(h)),h<d&&(k=d,d=h,h=k))),c&&(i=a[0][1],j=a[1][1],f||(i=e[0][1],j=e[1][1],c.invert&&(i=c.invert(i),j=c.invert(j)),j<i&&(k=i,i=j,j=k))),b&&c?[[d,i],[h,j]]:b?[d,h]:c&&[i,j])},g.clear=function(){return f=null,e[0][0]=e[0][1]=e[1][0]=e[1][1]=0,g},g.empty=function(){return b&&e[0][0]===e[1][0]||c&&e[0][1]===e[1][1]},d3.rebind(g,a,"on")};var dC={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw
 -resize"},dD=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function c(){this.on("mousedown.drag",d).on("touchstart.drag",d)}function d(){function j(){var a=c.parentNode,b=d3.event.changedTouches;return b?d3.touches(a,b)[0]:d3.mouse(a)}function k(){if(!c.parentNode)return l();var a=j(),b=a[0]-g[0],e=a[1]-g[1];h|=b|e,g=a,Z(),d({type:"drag",x:a[0]+f[0],y:a[1]+f[1],dx:b,dy:e})}function l(){d({type:"dragend"}),h&&(Z(),d3.event.target===e&&i.on("click.drag",m,!0)),i.on("mousemove.drag",null).on("touchmove.drag",null).on("mouseup.drag",null).on("touchend.drag",null)}function m(){Z(),i.on("click.drag",null)}var c=this,d=a.of(c,arguments),e=d3.event.target,f,g=j(),h=0,i=d3.select(window).on("mousemove.drag",k).on("touchmove.drag",k).on("mouseup.drag",l,!0).on("touchend.drag",l,!0);b?(f=b.apply(c,arguments),f=[f.x-g[0],f.y-g[1]]):f=[0,0],Z(),d({type:"dragstart"})}var a=_(c,"drag","dragstart","dragend"),b=null;return c.origin=function
 (a){return arguments.length?(b=a,c):b},d3.rebind(c,a,"on")},d3.behavior.zoom=function(){function l(){this.on("mousedown.zoom",r).on("mousewheel.zoom",s).on("mousemove.zoom",t).on("DOMMouseScroll.zoom",s).on("dblclick.zoom",u).on("touchstart.zoom",v).on("touchmove.zoom",w).on("touchend.zoom",v)}function m(b){return[(b[0]-a[0])/c,(b[1]-a[1])/c]}function n(b){return[b[0]*c+a[0],b[1]*c+a[1]]}function o(a){c=Math.max(e[0],Math.min(e[1],a))}function p(b,c){c=n(c),a[0]+=b[0]-c[0],a[1]+=b[1]-c[1]}function q(b){h&&h.domain(g.range().map(function(b){return(b-a[0])/c}).map(g.invert)),j&&j.domain(i.range().map(function(b){return(b-a[1])/c}).map(i.invert)),d3.event.preventDefault(),b({type:"zoom",scale:c,translate:a})}function r(){function h(){d=1,p(d3.mouse(a),g),q(b)}function i(){d&&Z(),e.on("mousemove.zoom",null).on("mouseup.zoom",null),d&&d3.event.target===c&&e.on("click.zoom",j,!0)}function j(){Z(),e.on("click.zoom",null)}var a=this,b=f.of(a,arguments),c=d3.event.target,d=0,e=d3.select(wind
 ow).on("mousemove.zoom",h).on("mouseup.zoom",i),g=m(d3.mouse(a));window.focus(),Z()}function s(){b||(b=m(d3.mouse(this))),o(Math.pow(2,dG()*.002)*c),p(d3.mouse(this),b),q(f.of(this,arguments))}function t(){b=null}function u(){var a=d3.mouse(this),b=m(a);o(d3.event.shiftKey?c/2:c*2),p(a,b),q(f.of(this,arguments))}function v(){var a=d3.touches(this),e=Date.now();d=c,b={},a.forEach(function(a){b[a.identifier]=m(a)}),Z();if(a.length===1&&e-k<500){var g=a[0],h=m(a[0]);o(c*2),p(g,h),q(f.of(this,arguments))}k=e}function w(){var a=d3.touches(this),c=a[0],e=b[c.identifier];if(g=a[1]){var g,h=b[g.identifier];c=[(c[0]+g[0])/2,(c[1]+g[1])/2],e=[(e[0]+h[0])/2,(e[1]+h[1])/2],o(d3.event.scale*d)}p(c,e),q(f.of(this,arguments))}var a=[0,0],b,c=1,d,e=dF,f=_(l,"zoom"),g,h,i,j,k;return l.translate=function(b){return arguments.length?(a=b.map(Number),l):a},l.scale=function(a){return arguments.length?(c=+a,l):c},l.scaleExtent=function(a){return arguments.length?(e=a==null?dF:a.map(Number),l):e},l.x=funct
 ion(a){return arguments.length?(h=a,g=a.copy(),l):h},l.y=function(a){return arguments.length?(j=a,i=a.copy(),l):j},d3.rebind(l,f,"on")};var dE,dF=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(a){var b=[],c=-1,d=a.length;while(++c<d)b.push(dH(a[c]));return b}},d3.layout.chord=function(){function j(){var a={},j=[],l=d3.range(e),m=[],n,o,p,q,r;b=[],c=[],n=0,q=-1;while(++q<e){o=0,r=-1;while(++r<e)o+=d[q][r];j.push(o),m.push(d3.range(e)),n+=o}g&&l.sort(function(a,b){return g(j[a],j[b])}),h&&m.forEach(function(a,b){a.sort(function(a,c){return h(d[b][a],d[b][c])})}),n=(2*Math.PI-f*e)/n,o=0,q=-1;while(++q<e){p=o,r=-1;while(++r<e){var s=l[q],t=m[s][r],u=d[s][t],v=o,w=o+=u*n;a[s+"-"+t]={index:s,subindex:t,startAngle:v,endAngle:w,value:u}}c[s]={index:s,startAngle:p,endAngle:o,value:(o-p)/n},o+=f}q=-1;while(++q<e){r=q-1;while(++r<e){var x=a[q+"-"+r],y=a[r+"-"+q];(x.value||y.value)&&b.push(x.value<y.value?{source:y,target:x}:{source:x,target:y})}}i&&k()}function k(){b.sor
 t(function(a,b){return i((a.source.value+a.target.value)/2,(b.source.value+b.target.value)/2)})}var a={},b,c,d,e,f=0,g,h,i;return a.matrix=function(f){return arguments.length?(e=(d=f)&&d.length,b=c=null,a):d},a.padding=function(d){return arguments.length?(f=d,b=c=null,a):f},a.sortGroups=function(d){return arguments.length?(g=d,b=c=null,a):g},a.sortSubgroups=function(c){return arguments.length?(h=c,b=null,a):h},a.sortChords=function(c){return arguments.length?(i=c,b&&k(),a):i},a.chords=function(){return b||j(),b},a.groups=function(){return c||j(),c},a},d3.layout.force=function(){function t(a){return function(b,c,d,e,f){if(b.point!==a){var g=b.cx-a.x,h=b.cy-a.y,i=1/Math.sqrt(g*g+h*h);if((e-c)*i<k){var j=b.charge*i*i;return a.px-=g*j,a.py-=h*j,!0}if(b.point&&isFinite(i)){var j=b.pointCharge*i*i;a.px-=g*j,a.py-=h*j}}return!b.charge}}function u(b){dM(dL=b),dK=a}var a={},b=d3.dispatch("start","tick","end"),c=[1,1],d,e,f=.9,g=dR,h=dS,i=-30,j=.1,k=.8,l,m=[],o=[],p,r,s;return a.tick=function
 (){if((e*=.99)<.005)return b.end({type:"end",alpha:e=0}),!0;var a=m.length,d=o.length,g,h,k,l,n,q,u,v,w;for(h=0;h<d;++h){k=o[h],l=k.source,n=k.target,v=n.x-l.x,w=n.y-l.y;if(q=v*v+w*w)q=e*r[h]*((q=Math.sqrt(q))-p[h])/q,v*=q,w*=q,n.x-=v*(u=l.weight/(n.weight+l.weight)),n.y-=w*u,l.x+=v*(u=1-u),l.y+=w*u}if(u=e*j){v=c[0]/2,w=c[1]/2,h=-1;if(u)while(++h<a)k=m[h],k.x+=(v-k.x)*u,k.y+=(w-k.y)*u}if(i){dQ(g=d3.geom.quadtree(m),e,s),h=-1;while(++h<a)(k=m[h]).fixed||g.visit(t(k))}h=-1;while(++h<a)k=m[h],k.fixed?(k.x=k.px,k.y=k.py):(k.x-=(k.px-(k.px=k.x))*f,k.y-=(k.py-(k.py=k.y))*f);b.tick({type:"tick",alpha:e})},a.nodes=function(b){return arguments.length?(m=b,a):m},a.links=function(b){return arguments.length?(o=b,a):o},a.size=function(b){return arguments.length?(c=b,a):c},a.linkDistance=function(b){return arguments.length?(g=q(b),a):g},a.distance=a.linkDistance,a.linkStrength=function(b){return arguments.length?(h=q(b),a):h},a.friction=function(b){return arguments.length?(f=b,a):f},a.charge=func
 tion(b){return arguments.length?(i=typeof b=="function"?b:+b,a):i},a.gravity=function(b){return arguments.length?(j=b,a):j},a.theta=function(b){return arguments.length?(k=b,a):k},a.alpha=function(c){return arguments.length?(e?c>0?e=c:e=0:c>0&&(b.start({type:"start",alpha:e=c}),d3.timer(a.tick)),a):e},a.start=function(){function q(a,c){var d=t(b),e=-1,f=d.length,g;while(++e<f)if(!isNaN(g=d[e][a]))return g;return Math.random()*c}function t(){if(!l){l=[];for(d=0;d<e;++d)l[d]=[];for(d=0;d<f;++d){var a=o[d];l[a.source.index].push(a.target),l[a.target.index].push(a.source)}}return l[b]}var b,d,e=m.length,f=o.length,j=c[0],k=c[1],l,n;for(b=0;b<e;++b)(n=m[b]).index=b,n.weight=0;p=[],r=[];for(b=0;b<f;++b)n=o[b],typeof n.source=="number"&&(n.source=m[n.source]),typeof n.target=="number"&&(n.target=m[n.target]),p[b]=g.call(this,n,b),r[b]=h.call(this,n,b),++n.source.weight,++n.target.weight;for(b=0;b<e;++b)n=m[b],isNaN(n.x)&&(n.x=q("x",j)),isNaN(n.y)&&(n.y=q("y",k)),isNaN(n.px)&&(n.px=n.x),isNa
 N(n.py)&&(n.py=n.y);s=[];if(typeof i=="function")for(b=0;b<e;++b)s[b]=+i.call(this,m[b],b);else for(b=0;b<e;++b)s[b]=i;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){d||(d=d3.behavior.drag().origin(n).on("dragstart",u).on("drag",dP).on("dragend",dO)),this.on("mouseover.force",dM).on("mouseout.force",dN).call(d)},d3.rebind(a,b,"on")};var dK,dL;d3.layout.partition=function(){function c(a,b,d,e){var f=a.children;a.x=b,a.y=a.depth*e,a.dx=d,a.dy=e;if(f&&(h=f.length)){var g=-1,h,i,j;d=a.value?d/a.value:0;while(++g<h)c(i=f[g],b,j=i.value*d,e),b+=j}}function d(a){var b=a.children,c=0;if(b&&(f=b.length)){var e=-1,f;while(++e<f)c=Math.max(c,d(b[e]))}return 1+c}function e(e,f){var g=a.call(this,e,f);return c(g[0],0,b[0],b[1]/d(g[0])),g}var a=d3.layout.hierarchy(),b=[1,1];return e.size=function(a){return arguments.length?(b=a,e):b},ef(e,a)},d3.layout.pie=function(){function f(g,h){var i=g.map(function(b,c){return+a.call(f,b,c)})
 ,j=+(typeof c=="function"?c.apply(this,arguments):c),k=((typeof e=="function"?e.apply(this,arguments):e)-c)/d3.sum(i),l=d3.range(g.length);b!=null&&l.sort(b===dT?function(a,b){return i[b]-i[a]}:function(a,c){return b(g[a],g[c])});var m=[];return l.forEach(function(a){m[a]={data:g[a],value:d=i[a],startAngle:j,endAngle:j+=d*k}}),m}var a=Number,b=dT,c=0,e=2*Math.PI;return f.value=function(b){return arguments.length?(a=b,f):a},f.sort=function(a){return arguments.length?(b=a,f):b},f.startAngle=function(a){return arguments.length?(c=a,f):c},f.endAngle=function(a){return arguments.length?(e=a,f):e},f};var dT={};d3.layout.stack=function(){function g(h,i){var j=h.map(function(b,c){return a.call(g,b,c)}),k=j.map(function(a,b){return a.map(function(a,b){return[e.call(g,a,b),f.call(g,a,b)]})}),l=b.call(g,k,i);j=d3.permute(j,l),k=d3.permute(k,l);var m=c.call(g,k,i),n=j.length,o=j[0].length,p,q,r;for(q=0;q<o;++q){d.call(g,j[0][q],r=m[q],k[0][q][1]);for(p=1;p<n;++p)d.call(g,j[p][q],r+=k[p-1][q][1]
 ,k[p][q][1])}return h}var a=n,b=dZ,c=d$,d=dW,e=dU,f=dV;return g.values=function(b){return arguments.length?(a=b,g):a},g.order=function(a){return arguments.length?(b=typeof a=="function"?a:dX.get(a)||dZ,g):b},g.offset=function(a){return arguments.length?(c=typeof a=="function"?a:dY.get(a)||d$,g):c},g.x=function(a){return arguments.length?(e=a,g):e},g.y=function(a){return arguments.length?(f=a,g):f},g.out=function(a){return arguments.length?(d=a,g):d},g};var dX=d3.map({"inside-out":function(a){var b=a.length,c,d,e=a.map(d_),f=a.map(ea),g=d3.range(b).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(c=0;c<b;++c)d=g[c],h<i?(h+=f[d],j.push(d)):(i+=f[d],k.push(d));return k.reverse().concat(j)},reverse:function(a){return d3.range(a.length).reverse()},"default":dZ}),dY=d3.map({silhouette:function(a){var b=a.length,c=a[0].length,d=[],e=0,f,g,h,i=[];for(g=0;g<c;++g){for(f=0,h=0;f<b;f++)h+=a[f][g][1];h>e&&(e=h),d.push(h)}for(g=0;g<c;++g)i[g]=(e-d[g])/2;return i},wiggle:function(a){va
 r b=a.length,c=a[0],d=c.length,e=0,f,g,h,i,j,k,l,m,n,o=[];o[0]=m=n=0;for(g=1;g<d;++g){for(f=0,i=0;f<b;++f)i+=a[f][g][1];for(f=0,j=0,l=c[g][0]-c[g-1][0];f<b;++f){for(h=0,k=(a[f][g][1]-a[f][g-1][1])/(2*l);h<f;++h)k+=(a[h][g][1]-a[h][g-1][1])/l;j+=k*a[f][g][1]}o[g]=m-=i?j/i*l:0,m<n&&(n=m)}for(g=0;g<d;++g)o[g]-=n;return o},expand:function(a){var b=a.length,c=a[0].length,d=1/b,e,f,g,h=[];for(f=0;f<c;++f){for(e=0,g=0;e<b;e++)g+=a[e][f][1];if(g)for(e=0;e<b;e++)a[e][f][1]/=g;else for(e=0;e<b;e++)a[e][f][1]=d}for(f=0;f<c;++f)h[f]=0;return h},zero:d$});d3.layout.histogram=function(){function e(e,f){var g=[],h=e.map(b,this),i=c.call(this,h,f),j=d.call(this,i,h,f),k,f=-1,l=h.length,m=j.length-1,n=a?1:1/l,o;while(++f<m)k=g[f]=[],k.dx=j[f+1]-(k.x=j[f]),k.y=0;if(m>0){f=-1;while(++f<l)o=h[f],o>=i[0]&&o<=i[1]&&(k=g[d3.bisect(j,o,1,m)-1],k.y+=n,k.push(e[f]))}return g}var a=!0,b=Number,c=ee,d=ec;return e.value=function(a){return arguments.length?(b=a,e):b},e.range=function(a){return arguments.length?(
 c=q(a),e):c},e.bins=function(a){return arguments.length?(d=typeof a=="number"?function(b){return ed(b,a)}:q(a),e):d},e.frequency=function(b){return arguments.length?(a=!!b,e):a},e},d3.layout.hierarchy=function(){function e(f,h,i){var j=b.call(g,f,h),k=ek?f:{data:f};k.depth=h,i.push(k);if(j&&(m=j.length)){var l=-1,m,n=k.children=[],o=0,p=h+1;while(++l<m)d=e(j[l],p,i),d.parent=k,n.push(d),o+=d.value;a&&n.sort(a),c&&(k.value=o)}else c&&(k.value=+c.call(g,f,h)||0);return k}function f(a,b){var d=a.children,e=0;if(d&&(i=d.length)){var h=-1,i,j=b+1;while(++h<i)e+=f(d[h],j)}else c&&(e=+c.call(g,ek?a:a.data,b)||0);return c&&(a.value=e),e}function g(a){var b=[];return e(a,0,b),b}var a=ei,b=eg,c=eh;return g.sort=function(b){return arguments.length?(a=b,g):a},g.children=function(a){return arguments.length?(b=a,g):b},g.value=function(a){return arguments.length?(c=a,g):c},g.revalue=function(a){return f(a,0),a},g};var ek=!1;d3.layout.pack=function(){function c(c,d){var e=a.call(this,c,d),f=e[0];f.
 x=0,f.y=0,es(f);var g=b[0],h=b[1],i=1/Math.max(2*f.r/g,2*f.r/h);return et(f,g/2,h/2,i),e}var a=d3.layout.hierarchy().sort(el),b=[1,1];return c.size=function(a){return arguments.length?(b=a,c):b},ef(c,a)},d3.layout.cluster=function(){function d(d,e){var f=a.call(this,d,e),g=f[0],h,i=0,j,k;eG(g,function(a){var c=a.children;c&&c.length?(a.x=ew(c),a.y=ev(c)):(a.x=h?i+=b(a,h):0,a.y=0,h=a)});var l=ex(g),m=ey(g),n=l.x-b(l,m)/2,o=m.x+b(m,l)/2;return eG(g,function(a){a.x=(a.x-n)/(o-n)*c[0],a.y=(1-(g.y?a.y/g.y:1))*c[1]}),f}var a=d3.layout.hierarchy().sort(null).value(null),b=ez,c=[1,1];return d.separation=function(a){return arguments.length?(b=a,d):b},d.size=function(a){return arguments.length?(c=a,d):c},ef(d,a)},d3.layout.tree=function(){function d(d,e){function h(a,c){var d=a.children,e=a._tree;if(d&&(f=d.length)){var f,g=d[0],i,k=g,l,m=-1;while(++m<f)l=d[m],h(l,i),k=j(l,i,k),i=l;eH(a);var n=.5*(g._tree.prelim+l._tree.prelim);c?(e.prelim=c._tree.prelim+b(a,c),e.mod=e.prelim-n):e.prelim=n}el
 se c&&(e.prelim=c._tree.prelim+b(a,c))}function i(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c&&(e=c.length)){var d=-1,e;b+=a._tree.mod;while(++d<e)i(c[d],b)}}function j(a,c,d){if(c){var e=a,f=a,g=c,h=a.parent.children[0],i=e._tree.mod,j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m;while(g=eB(g),e=eA(e),g&&e)h=eA(h),f=eB(f),f._tree.ancestor=a,m=g._tree.prelim+k-e._tree.prelim-i+b(g,e),m>0&&(eI(eJ(g,a,d),a,m),i+=m,j+=m),k+=g._tree.mod,i+=e._tree.mod,l+=h._tree.mod,j+=f._tree.mod;g&&!eB(f)&&(f._tree.thread=g,f._tree.mod+=k-j),e&&!eA(h)&&(h._tree.thread=e,h._tree.mod+=i-l,d=a)}return d}var f=a.call(this,d,e),g=f[0];eG(g,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),h(g),i(g,-g._tree.prelim);var k=eC(g,eE),l=eC(g,eD),m=eC(g,eF),n=k.x-b(k,l)/2,o=l.x+b(l,k)/2,p=m.depth||1;return eG(g,function(a){a.x=(a.x-n)/(o-n)*c[0],a.y=a.depth/p*c[1],delete a._tree}),f}var a=d3.layout.hierarchy().sort(null).value(null),b=ez,c=[1,1];return d.separation=
 function(a){return arguments.length?(b=a,d):b},d.size=function(a){return arguments.length?(c=a,d):c},ef(d,a)},d3.layout.treemap=function(){function i(a,b){var c=-1,d=a.length,e,f;while(++c<d)f=(e=a[c]).value*(b<0?0:b),e.area=isNaN(f)||f<=0?0:f}function j(a){var b=a.children;if(b&&b.length){var c=e(a),d=[],f=b.slice(),g,h=Infinity,k,n=Math.min(c.dx,c.dy),o;i(f,c.dx*c.dy/a.value),d.area=0;while((o=f.length)>0)d.push(g=f[o-1]),d.area+=g.area,(k=l(d,n))<=h?(f.pop(),h=k):(d.area-=d.pop().area,m(d,n,c,!1),n=Math.min(c.dx,c.dy),d.length=d.area=0,h=Infinity);d.length&&(m(d,n,c,!0),d.length=d.area=0),b.forEach(j)}}function k(a){var b=a.children;if(b&&b.length){var c=e(a),d=b.slice(),f,g=[];i(d,c.dx*c.dy/a.value),g.area=0;while(f=d.pop())g.push(f),g.area+=f.area,f.z!=null&&(m(g,f.z?c.dx:c.dy,c,!d.length),g.length=g.area=0);b.forEach(k)}}function l(a,b){var c=a.area,d,e=0,f=Infinity,g=-1,i=a.length;while(++g<i){if(!(d=a[g].area))continue;d<f&&(f=d),d>e&&(e=d)}return c*=c,b*=b,c?Math.max(b*e*h/
 c,c/(b*f*h)):Infinity}function m(a,c,d,e){var f=-1,g=a.length,h=d.x,i=d.y,j=c?b(a.area/c):0,k;if(c==d.dx){if(e||j>d.dy)j=d.dy;while(++f<g)k=a[f],k.x=h,k.y=i,k.dy=j,h+=k.dx=Math.min(d.x+d.dx-h,j?b(k.area/j):0);k.z=!0,k.dx+=d.x+d.dx-h,d.y+=j,d.dy-=j}else{if(e||j>d.dx)j=d.dx;while(++f<g)k=a[f],k.x=h,k.y=i,k.dx=j,i+=k.dy=Math.min(d.y+d.dy-i,j?b(k.area/j):0);k.z=!1,k.dy+=d.y+d.dy-i,d.x+=j,d.dx-=j}}function n(b){var d=g||a(b),e=d[0];return e.x=0,e.y=0,e.dx=c[0],e.dy=c[1],g&&a.revalue(e),i([e],e.dx*e.dy/e.value),(g?k:j)(e),f&&(g=d),d}var a=d3

<TRUNCATED>