Builded diagnostic
diff --git a/views/ngXosViews/diagnostic/env/default.js b/views/ngXosViews/diagnostic/env/default.js
index 11ee777..e9ed236 100644
--- a/views/ngXosViews/diagnostic/env/default.js
+++ b/views/ngXosViews/diagnostic/env/default.js
@@ -7,7 +7,7 @@
 // (works only for local environment as both application are served on the same domain)
 
 module.exports = {
-  host: 'http://clnode078.clemson.cloudlab.us:9999/',
-  xoscsrftoken: 'nGSrDjG6Ryqho9Kl6eSXAcyPg2YudUZQ',
-  xossessionid: '2x7omv64a2mpb1f62vhcy40kq32swv75'
+  host: 'http://clnode067.clemson.cloudlab.us:9999/',
+  xoscsrftoken: 'ZhPiXOVgQH2S0QQtLTkx3DaESR7IOvQc',
+  xossessionid: '49cjbceeg483ife9rocex8h1st360ii3'
 };
diff --git a/views/ngXosViews/diagnostic/env/onlab_pod.js b/views/ngXosViews/diagnostic/env/onlab_pod.js
new file mode 100644
index 0000000..413bd04
--- /dev/null
+++ b/views/ngXosViews/diagnostic/env/onlab_pod.js
@@ -0,0 +1,13 @@
+// This is a default configuration for your development environment.
+// You can duplicate this configuration for any of your Backend Environments.
+// Different configurations are loaded setting a NODE_ENV variable that contain the config file name.
+// `NODE_ENV=local npm start`
+//
+// If xoscsrftoken or xossessionid are not specified the browser value are used
+// (works only for local environment as both application are served on the same domain)
+
+module.exports = {
+  host: 'http://10.90.0.132/',
+  xoscsrftoken: 'bDZaZNRDU6BwUanvjfcGfKJHohG3mlqb',
+  xossessionid: '3nww58wgrlscs7boy2xzw11tji8ywal5'
+};
diff --git a/views/ngXosViews/diagnostic/mocks/data/instances.json b/views/ngXosViews/diagnostic/mocks/data/instances.json
index ec0f598..d9814f3 100644
--- a/views/ngXosViews/diagnostic/mocks/data/instances.json
+++ b/views/ngXosViews/diagnostic/mocks/data/instances.json
@@ -234,7 +234,7 @@
         "lazy_blocked": false, 
         "no_sync": false, 
         "instance_id": "instance-00000004", 
-        "instance_uuid": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "instance_uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
         "name": "mysite_vsg", 
         "instance_name": "mysite_vsg-1", 
         "ip": "130.127.133.90", 
diff --git a/views/ngXosViews/diagnostic/mocks/data/meterstatistics.json b/views/ngXosViews/diagnostic/mocks/data/meterstatistics.json
index 7be26c4..8678222 100644
--- a/views/ngXosViews/diagnostic/mocks/data/meterstatistics.json
+++ b/views/ngXosViews/diagnostic/mocks/data/meterstatistics.json
@@ -1,310 +1,242 @@
 [
     {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Existence of instance", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "instance", 
-        "unit": "instance", 
-        "category": "Nova", 
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Existence of vcpe instance", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "vcpe", 
+        "unit": "vcpe", 
+        "category": "VCPE", 
         "slice": "mysite_vsg", 
         "name": "none", 
         "service": "service_vsg", 
         "value": 1.0, 
-        "time": "2016-02-17T22:19:00", 
+        "time": "2016-02-24T00:21:28", 
         "project_id": "718dd78532a24a74b0491437bbef398c"
     }, 
     {
-        "resource_name": "mysite_vsg-1", 
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Number of entries in DNS cache", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "vcpe.dns.cache.size", 
+        "unit": "entries", 
+        "category": "VCPE", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 150.0, 
+        "time": "2016-02-24T00:21:28", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Unexpired entries that were thrown out of cache", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "vcpe.dns.replaced_unexpired_entries", 
+        "unit": "entries", 
+        "category": "VCPE", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T00:21:28", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Number of cache hits", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "vcpe.dns.queries_answered_locally", 
+        "unit": "queries", 
+        "category": "VCPE", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T00:21:28", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Number of cache misses", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "vcpe.dns.queries_forwarded", 
+        "unit": "queries", 
+        "category": "VCPE", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T00:21:28", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
         "description": "Volume of RAM", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "resource_id": "vcpe-222-432", 
         "meter": "memory", 
         "unit": "MB", 
         "category": "Nova", 
         "slice": "mysite_vsg", 
         "name": "none", 
         "service": "service_vsg", 
-        "value": 2048.0, 
-        "time": "2016-02-17T22:19:00", 
+        "value": 2099.0, 
+        "time": "2016-02-24T00:21:28", 
         "project_id": "718dd78532a24a74b0491437bbef398c"
     }, 
     {
-        "resource_name": "mysite_vsg-1", 
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
         "description": "Volume of RAM used", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "resource_id": "vcpe-222-432", 
         "meter": "memory.usage", 
         "unit": "MB", 
         "category": "Nova", 
         "slice": "mysite_vsg", 
         "name": "none", 
         "service": "service_vsg", 
-        "value": 1754.0, 
-        "time": "2016-02-17T22:19:00", 
+        "value": 31.1625, 
+        "time": "2016-02-24T00:21:28", 
         "project_id": "718dd78532a24a74b0491437bbef398c"
     }, 
     {
-        "resource_name": "mysite_vsg-1", 
-        "description": "CPU time used", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "cpu", 
-        "unit": "ns", 
+        "resource_name": "vcpe-222-432", 
+        "resource": "vcpe-222-432", 
+        "description": "Average CPU utilization", 
+        "resource_id": "vcpe-222-432", 
+        "meter": "cpu_util", 
+        "unit": "%", 
         "category": "Nova", 
         "slice": "mysite_vsg", 
         "name": "none", 
         "service": "service_vsg", 
-        "value": 179260000000.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Number of VCPUs", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "vcpus", 
-        "unit": "vcpu", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 1.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Number of read requests", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.read.requests", 
-        "unit": "request", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 10444.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Number of write requests", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.write.requests", 
-        "unit": "request", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 58370.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Volume of reads", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.read.bytes", 
-        "unit": "B", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 317620030.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Volume of writes", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.write.bytes", 
-        "unit": "B", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 2818024448.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Size of root disk", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.root.size", 
-        "unit": "GB", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 20.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-1", 
-        "description": "Size of ephemeral disk", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
-        "meter": "disk.ephemeral.size", 
-        "unit": "GB", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 0.0, 
-        "time": "2016-02-17T22:19:00", 
+        "value": 4.845000000000001, 
+        "time": "2016-02-24T00:21:28", 
         "project_id": "718dd78532a24a74b0491437bbef398c"
     },
     {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Existence of instance", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "instance", 
-        "unit": "instance", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 1.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Volume of RAM", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "memory", 
-        "unit": "MB", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 2048.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Volume of RAM used", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "memory.usage", 
-        "unit": "MB", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 1534.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "CPU time used", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "cpu", 
-        "unit": "ns", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 134920000000.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Number of VCPUs", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "vcpus", 
-        "unit": "vcpu", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 1.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Number of read requests", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.read.requests", 
-        "unit": "request", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 10222.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Number of write requests", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.write.requests", 
-        "unit": "request", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 38570.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Volume of reads", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.read.bytes", 
-        "unit": "B", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 326340030.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Volume of writes", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.write.bytes", 
-        "unit": "B", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 2818024448.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Size of root disk", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.root.size", 
-        "unit": "GB", 
-        "category": "Nova", 
-        "slice": "mysite_vsg", 
-        "name": "none", 
-        "service": "service_vsg", 
-        "value": 20.0, 
-        "time": "2016-02-17T22:19:00", 
-        "project_id": "718dd78532a24a74b0491437bbef398c"
-    }, 
-    {
-        "resource_name": "mysite_vsg-2", 
-        "description": "Size of ephemeral disk", 
-        "resource": "075a3ae4-9e76-4198-8e6b-67c67b996746", 
-        "meter": "disk.ephemeral.size", 
-        "unit": "GB", 
+        "resource_name": "vcpe-222-432-eth0", 
+        "resource": "vcpe-222-432-eth0", 
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth0", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
         "category": "Nova", 
         "slice": "mysite_vsg", 
         "name": "none", 
         "service": "service_vsg", 
         "value": 0.0, 
-        "time": "2016-02-17T22:19:00", 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth0", 
+        "resource": "vcpe-222-432-eth0", 
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth0", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.00030304561114446413, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth0", 
+        "resource": "vcpe-222-432-eth0", 
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth0", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth0", 
+        "resource": "vcpe-222-432-eth0", 
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth0", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 4.714042840024997e-06, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    },
+     {
+        "resource_name": "vcpe-222-432-eth1", 
+        "resource": "vcpe-222-432-eth1", 
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth1", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth1", 
+        "resource": "vcpe-222-432-eth1", 
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth1", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.00030304561114446413, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth1", 
+        "resource": "vcpe-222-432-eth1", 
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth1", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0, 
+        "time": "2016-02-24T01:19:25", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "vcpe-222-432-eth1", 
+        "resource": "vcpe-222-432-eth1", 
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "vcpe-222-432-eth1", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 4.714042840024997e-06, 
+        "time": "2016-02-24T01:19:25", 
         "project_id": "718dd78532a24a74b0491437bbef398c"
     }
-]
\ No newline at end of file
+]
diff --git a/views/ngXosViews/diagnostic/mocks/data/tenants.json b/views/ngXosViews/diagnostic/mocks/data/tenants.json
index 5d6fb15..4e7557b 100644
--- a/views/ngXosViews/diagnostic/mocks/data/tenants.json
+++ b/views/ngXosViews/diagnostic/mocks/data/tenants.json
@@ -65,9 +65,8 @@
         "subscriber_user": null, 
         "subscriber_root": null, 
         "service_specific_id": null, 
-        "service_specific_attribute": "{\"instance_id\": 1, \"creator_id\": 1}", 
-        "connect_method": "na",
-        "wan_container_ip": "10.0.1.24"
+        "service_specific_attribute": "{\"instance_id\": 1, \"creator_id\": 1, \"wan_container_ip\": \"10.0.1.24\"}", 
+        "connect_method": "na"
     }, 
     {
         "humanReadableName": "ceilometer-tenant-8", 
diff --git a/views/ngXosViews/diagnostic/mocks/data/xos-instance-statistics.json b/views/ngXosViews/diagnostic/mocks/data/xos-instance-statistics.json
new file mode 100644
index 0000000..7b83f5d
--- /dev/null
+++ b/views/ngXosViews/diagnostic/mocks/data/xos-instance-statistics.json
@@ -0,0 +1,557 @@
+[
+    {
+        "resource_name": "mysite_vsg-1", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average CPU utilization", 
+        "resource_id": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "meter": "cpu_util", 
+        "unit": "%", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 34.39350127615451, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "mysite_vsg-1", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of VCPUs", 
+        "resource_id": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "meter": "vcpus", 
+        "unit": "vcpu", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1.0, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "mysite_vsg-1", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Volume of RAM", 
+        "resource_id": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "meter": "memory", 
+        "unit": "MB", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 2048.0, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "mysite_vsg-1", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "CPU time used", 
+        "resource_id": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "meter": "cpu", 
+        "unit": "ns", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 199610924583333.34, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "mysite_vsg-1", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Volume of RAM used", 
+        "resource_id": "075a3ae4-9e76-4198-8e6b-67c67b996745", 
+        "meter": "memory.usage", 
+        "unit": "MB", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1931.625, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.0001851851851851852, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.outgoing.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 14088.506944444445, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.015026113884266964, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.02625256131755716, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.incoming.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 66.71527777777777, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 9.25925925925926e-05, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.incoming.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 8747.979166666666, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapcf5721c4-c6", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapcf5721c4-c6", 
+        "meter": "network.outgoing.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 111.22222222222223, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1.603090277777778, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.outgoing.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1486894584.4722223, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1248.113658402975, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 143.5401912417864, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.incoming.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 12888749.868055556, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 1.5918200296505445, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.incoming.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 28949696952.67361, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap3f06c6d0-fb", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap3f06c6d0-fb", 
+        "meter": "network.outgoing.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 13835573.3125, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6.944444444444444e-05, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.outgoing.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6808.0, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.014062500000000002, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.013333333333333332, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.incoming.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 42.958333333333336, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6.944444444444444e-05, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.incoming.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 7230.0625, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tapb7ae5310-e2", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tapb7ae5310-e2", 
+        "meter": "network.outgoing.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 40.958333333333336, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.outgoing.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6.944444444444444e-05, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.outgoing.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6773.333333333333, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.incoming.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.014062500000000002, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of outgoing bytes on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.outgoing.bytes.rate", 
+        "unit": "B/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 0.013325938251063044, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.incoming.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 44.77777777777778, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Average rate per sec of incoming packets on a VM network interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.incoming.packets.rate", 
+        "unit": "packet/s", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 6.944444444444444e-05, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of incoming bytes on the network for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.incoming.bytes", 
+        "unit": "B", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 7365.5, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }, 
+    {
+        "resource_name": "tap38f1f5be-89", 
+        "instance-uuid": "075a3ae4-9e76-4198-8e6b-67c67b996746",
+        "description": "Number of outgoing packets for a VM interface", 
+        "resource_id": "instance-00000004-075a3ae4-9e76-4198-8e6b-67c67b996745-tap38f1f5be-89", 
+        "meter": "network.outgoing.packets", 
+        "unit": "packet", 
+        "category": "Nova", 
+        "slice": "mysite_vsg", 
+        "name": "none", 
+        "service": "service_vsg", 
+        "value": 40.77777777777778, 
+        "time": "2016-02-23T22:30:34", 
+        "project_id": "718dd78532a24a74b0491437bbef398c"
+    }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/diagnostic/mocks/diagnostic.conf.json b/views/ngXosViews/diagnostic/mocks/diagnostic.conf.json
index ba9dbb8..660c9f8 100644
--- a/views/ngXosViews/diagnostic/mocks/diagnostic.conf.json
+++ b/views/ngXosViews/diagnostic/mocks/diagnostic.conf.json
@@ -35,5 +35,10 @@
     "url": "meterstatistics",
     "base": "xoslib/",
     "methods": ["GET"]
+  },
+  {
+    "url": "xos-instance-statistics",
+    "base": "xoslib/",
+    "methods": ["GET"]
   }
 ]
\ No newline at end of file
diff --git a/views/ngXosViews/diagnostic/src/css/serviceTopology.css b/views/ngXosViews/diagnostic/src/css/serviceTopology.css
index 9d9aa60..66df573 100644
--- a/views/ngXosViews/diagnostic/src/css/serviceTopology.css
+++ b/views/ngXosViews/diagnostic/src/css/serviceTopology.css
@@ -47,27 +47,6 @@
     top: 0;
 }
 
-/* STATS */
-
-logic-topology > .instances-stats {
-    position: absolute;
-    top: 0;
-    z-index: 2;
-    width: 100%;
-}
-
-logic-topology > .instances-stats ul.list-group {
-    font-size: 10px !important;
-}
-
-logic-topology > .instances-stats ul.list-group li{
-    padding: 3px 15px;
-}
-
-logic-topology > .instances-stats ul.list-group .badge {
-    font-size: 8px;
-}
-
 /* CLOUDS */
 
 logic-topology .network .cloud {
@@ -133,7 +112,7 @@
 }
 
 /* CONTAINERS */
-logic-topology .node .container rect{
+logic-topology .node .instance .stats-container .container rect {
   fill: #eee;
   stroke: steelblue;
   stroke-width: 1px;
diff --git a/views/ngXosViews/diagnostic/src/js/chart_data_service.js b/views/ngXosViews/diagnostic/src/js/chart_data_service.js
index 444f046..1fd093a 100644
--- a/views/ngXosViews/diagnostic/src/js/chart_data_service.js
+++ b/views/ngXosViews/diagnostic/src/js/chart_data_service.js
@@ -2,7 +2,7 @@
   'use strict';
 
   angular.module('xos.serviceTopology')
-  .service('ChartData', function($rootScope, $q, lodash, Tenant, Node, serviceTopologyConfig, Ceilometer) {
+  .service('ChartData', function($rootScope, $q, lodash, Tenant, Node, serviceTopologyConfig, Ceilometer, Instances) {
     this.currentSubscriber = null;
     this.currentServiceChain = null;
 
@@ -82,7 +82,8 @@
     };
 
     this.getSubscriberIP = () => {
-      const ip = this.currentServiceChain.children[0].children[0].tenant.wan_container_ip;
+      const ip = JSON.parse(this.currentServiceChain.children[0].children[0].tenant.service_specific_attribute).wan_container_ip;
+      // const ip = this.currentServiceChain.children[0].children[0].tenant.wan_container_ip;
       this.logicTopologyData.children[0].subscriberIP = ip;
     };
 
@@ -145,26 +146,35 @@
           attr = null;
         }
         
-        // if no instances are associated to the container
+        // if no instances are associated to the subscriber
         if(!attr || !attr.instance_id){
           let d = $q.defer();
           d.resolve([]);
           p = d.promise;
         }
+        // if ther is an instance
         else{
-          let instances = [attr.instance_id];
-          p = Ceilometer.getInstancesStats(instances)
-          .then((instances) => {
-            instances.map(i => {
-              i.container = {
-                name: `vcpe-${this.currentSubscriber.tags.sTag}-${this.currentSubscriber.tags.cTag}`
-              };
-              return i;
-            });
+          let instance = {};
+          p = Instances.get({id: attr.instance_id}).$promise
+          .then(function(_instance){
+            instance = _instance;
+            return Ceilometer.getInstanceStats(instance.instance_uuid);
+          })
+          .then((stats) => {
+            instance.stats = stats;
+            const containerName = `vcpe-${this.currentSubscriber.tags.sTag}-${this.currentSubscriber.tags.cTag}`;
+            // append containers
+            instance.container = {
+              name: containerName
+            };
 
             // TODO fetch container stats
-
-            return instances;
+            return Ceilometer.getContainerStats(containerName);
+          })
+          .then((containerStats) => {
+            instance.container.stats = containerStats.stats;
+            instance.container.port = containerStats.port;
+            return [instance];
           });
         }
       }
diff --git a/views/ngXosViews/diagnostic/src/js/config.js b/views/ngXosViews/diagnostic/src/js/config.js
index 13f2172..f8d6bbf 100644
--- a/views/ngXosViews/diagnostic/src/js/config.js
+++ b/views/ngXosViews/diagnostic/src/js/config.js
@@ -41,7 +41,7 @@
     },
     container: {
       width: 60,
-      height: 30,
+      height: 130,
       margin: 5,
       x: -30,
       y: -15
diff --git a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
index 7480917..d172102 100644
--- a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
+++ b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
@@ -204,21 +204,117 @@
       }
     };
 
+    const drawContainer = (container, docker) => {
+
+      const containerBox = container.append('g')
+        .attr({
+          class: 'container',
+          transform: `translate(${serviceTopologyConfig.instance.margin}, 115)`
+        });
+
+      containerBox.append('rect')
+        .attr({
+          width: 250 - (serviceTopologyConfig.container.margin * 2),
+          height: serviceTopologyConfig.container.height,
+        });
+
+      containerBox.append('text')
+        .attr({
+          y: 20,
+          x: serviceTopologyConfig.instance.margin,
+          class: 'name'
+        })
+        .text(docker.name)
+
+      // add stats
+      const interestingMeters = ['memory', 'memory.usage', 'cpu_util'];
+
+      interestingMeters.forEach((m, i) => {
+        const meter = lodash.find(docker.stats, {meter: m});
+        // if there is no meter stats skip rendering
+        if(!angular.isDefined(meter)){
+          return;
+        }
+        containerBox.append('text')
+        .attr({
+          y: 40 + (i * 15),
+          x: serviceTopologyConfig.instance.margin,
+          opacity: 0
+        })
+        .text(`${meter.description}: ${Math.round(meter.value)} ${meter.unit}`)
+        .transition()
+        .duration(serviceTopologyConfig.duration)
+        .attr({
+          opacity: 1
+        });
+      });
+
+      // add port stats
+      const ports = ['eth0', 'eth1'];
+      const interestingPortMeters = [
+        {
+          meter: 'network.incoming.bytes.rate',
+          label: 'Incoming'
+        },
+        {
+          meter: 'network.outgoing.bytes.rate',
+          label: 'Outgoing'
+        }
+      ];
+      
+      ports.forEach((p, j) => {
+
+        // if there are no port stats skip rendering
+        if(docker.port[p].length === 0){
+          return;
+        }
+
+        containerBox.append('text')
+        .attr({
+          y: 90,
+          x: serviceTopologyConfig.instance.margin + (120 * j),
+          class: 'name'
+        })
+        .text(`${docker.name}-${p}`)
+
+        interestingPortMeters.forEach((m, i) => {
+
+          const meter = lodash.find(docker.port[p], {meter: m.meter});
+          // if there is no meter stats skip rendering
+          if(!angular.isDefined(meter)){
+            return;
+          }
+          containerBox.append('text')
+          .attr({
+            y: 105 + (i * 15),
+            x: serviceTopologyConfig.instance.margin + (120 * j),
+            opacity: 0
+          })
+          .text(`${m.label}: ${Math.round(meter.value)} ${meter.unit}`)
+          .transition()
+          .duration(serviceTopologyConfig.duration)
+          .attr({
+            opacity: 1
+          });
+        });
+      });
+    }
+
     const showInstanceStats = (container, instance) => {
 
       // NOTE this should be dinamically positioned
       // base on the number of element present
       const statsContainer = container.append('g')
         .attr({
-          transform: `translate(200, -32)`,
+          transform: `translate(200, -120)`,
           class: 'stats-container'
         });
 
 
       statsContainer.append('line')
         .attr({
-          x1: -120,
-          y1: 50,
+          x1: -160,
+          y1: 120,
           x2: 0,
           y2: 50,
           stroke: 'black',
@@ -232,7 +328,7 @@
 
       // NOTE rect should be dinamically sized base on the presence of a container
       let statsHeight = 110;
-      let statsWidth = 200;
+      let statsWidth = 250;
 
       if (instance.container){
         statsHeight += serviceTopologyConfig.container.height + (serviceTopologyConfig.container.margin * 2)
@@ -290,7 +386,7 @@
           x: serviceTopologyConfig.instance.margin,
           opacity: 0
         })
-        .text(`${meter.description}: ${meter.value} ${meter.unit}`)
+        .text(`${meter.description}: ${Math.round(meter.value)} ${meter.unit}`)
         .transition()
         .duration(serviceTopologyConfig.duration)
         .attr({
@@ -300,26 +396,7 @@
 
       if(instance.container){
         // draw container
-        
-        const containerBox = statsContainer.append('g')
-          .attr({
-            class: 'container',
-            transform: `translate(${serviceTopologyConfig.instance.margin}, 115)`
-          });
-
-        containerBox.append('rect')
-          .attr({
-            width: statsWidth - (serviceTopologyConfig.container.margin * 2),
-            height: serviceTopologyConfig.container.height,
-          });
-
-        containerBox.append('text')
-          .attr({
-            y: 20,
-            x: (statsWidth - (serviceTopologyConfig.container.margin * 2)) / 2,
-            'text-anchor': 'middle'
-          })
-          .text(instance.container.name)
+        drawContainer(statsContainer, instance.container);
       }
 
     };
diff --git a/views/ngXosViews/diagnostic/src/js/rest_services.js b/views/ngXosViews/diagnostic/src/js/rest_services.js
index d5e924f..311ea07 100644
--- a/views/ngXosViews/diagnostic/src/js/rest_services.js
+++ b/views/ngXosViews/diagnostic/src/js/rest_services.js
@@ -49,7 +49,7 @@
     this.getInstanceStats = (instanceUuid) => {
       let deferred = $q.defer();
 
-      $http.get('/xoslib/meterstatistics', {params:{resource: instanceUuid}})
+      $http.get('/xoslib/xos-instance-statistics', {params: {'instance-uuid': instanceUuid}})
       .then((res) => {
         deferred.resolve(res.data);
       })
@@ -95,6 +95,33 @@
 
       return deferred.promise;
     };
+
+    this.getContainerStats = (containerName) => {
+      const deferred = $q.defer();
+
+      let res = {};
+
+      $http.get('/xoslib/meterstatistics', {params: {'resource': containerName}})
+      .then((containerStats) => {
+        res.stats = containerStats.data;
+        return $http.get('/xoslib/meterstatistics', {params: {'resource': `${containerName}-eth0`}})
+      })
+      .then((portStats) => {
+        res.port = {
+          eth0: portStats.data
+        };
+        return $http.get('/xoslib/meterstatistics', {params: {'resource': `${containerName}-eth1`}})
+      })
+      .then((portStats) => {
+        res.port.eth1 = portStats.data;
+        deferred.resolve(res);
+      })
+      .catch((e) => {
+        deferred.reject(e);
+      })
+
+      return deferred.promise;
+    }
   })
   .service('Slice', function($resource){
     return $resource('/xos/slices', {id: '@id'});
diff --git a/xos/core/xoslib/dashboards/xosServiceTopology.html b/xos/core/xoslib/dashboards/xosServiceTopology.html
new file mode 100644
index 0000000..613f09d
--- /dev/null
+++ b/xos/core/xoslib/dashboards/xosServiceTopology.html
@@ -0,0 +1,16 @@
+<!-- browserSync -->
+
+<!-- inject:css -->
+<link rel="stylesheet" href="/css/dev.css">
+<link rel="stylesheet" href="/css/serviceTopology.css">
+<!-- endinject -->
+
+<div id="xosServiceTopology">
+    <div ui-view></div>
+</div>
+
+
+<!-- inject:js -->
+<script src="/../../../xos/core/xoslib/static/js/vendor/xosServiceTopologyVendor.js"></script>
+<script src="/../../../xos/core/xoslib/static/js/xosServiceTopology.js"></script>
+<!-- endinject -->
diff --git a/xos/core/xoslib/static/js/vendor/xosServiceTopologyVendor.js b/xos/core/xoslib/static/js/vendor/xosServiceTopologyVendor.js
new file mode 100644
index 0000000..3d7e6cc
--- /dev/null
+++ b/xos/core/xoslib/static/js/vendor/xosServiceTopologyVendor.js
@@ -0,0 +1,8 @@
+!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function r(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function e(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)<0?e=i+1:u=i}return e},right:function(t,r,e,u){for(arguments.length<3&&(e=0),arguments.length<4&&(u=t.length);u>e;){var i=e+u>>>1;n(t[i],r)>0?u=i:e=i+1}return e}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var r in t)Object.defineProperty(n.prototype,r,{value:t[r],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===Ma?Ma+n:n}function f(n){return(n+="")[0]===Ma?n.slice(1):n}function h(n){return s(n)in this._}function p(n){return(n=s(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function _(n,t,r){return function(){var e=r.apply(t,arguments);return e===t?n:e}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,e=ba.length;e>r;++r){var u=ba[r]+t;if(u in n)return u}}function M(){}function b(){}function w(n){function t(){for(var t,e=r,u=-1,i=e.length;++u<i;)(t=e[u].on)&&t.apply(this,arguments);return n}var r=[],e=new l;return t.on=function(t,u){var i,a=e.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,r=r.slice(0,i=r.indexOf(a)).concat(r.slice(i+1)),e.remove(t)),u&&r.push(e.set(t,{on:u})),n)},t}function k(){oa.event.preventDefault()}function C(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function A(n){for(var t=new b,r=0,e=arguments.length;++r<e;)t[arguments[r]]=w(t);return t.of=function(r,e){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(r,e)}finally{oa.event=i}}},t}function S(n){return ka(n,Ea),n}function E(n){return"function"==typeof n?n:function(){return Ca(n,this)}}function N(n){return"function"==typeof n?n:function(){return Aa(n,this)}}function $(n,t){function r(){this.removeAttribute(n)}function e(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var r=t.apply(this,arguments);null==r?this.removeAttribute(n):this.setAttribute(n,r)}function o(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}return n=oa.ns.qualify(n),null==t?n.local?e:r:"function"==typeof t?n.local?o:a:n.local?i:u}function j(n){return n.trim().replace(/\s+/g," ")}function D(n){return new RegExp("(?:^|\\s+)"+oa.requote(n)+"(?:\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\s+/)}function L(n,t){function r(){for(var r=-1;++r<u;)n[r](this,t)}function e(){for(var r=-1,e=t.apply(this,arguments);++r<u;)n[r](this,e)}n=T(n).map(R);var u=n.length;return"function"==typeof t?e:r}function R(n){var t=D(n);return function(r,e){if(u=r.classList)return e?u.add(n):u.remove(n);var u=r.getAttribute("class")||"";e?(t.lastIndex=0,t.test(u)||r.setAttribute("class",j(u+" "+n))):r.setAttribute("class",j(u.replace(t," ")))}}function O(n,t,r){function e(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,r)}function i(){var e=t.apply(this,arguments);null==e?this.style.removeProperty(n):this.style.setProperty(n,e,r)}return null==t?e:"function"==typeof t?i:u}function z(n,t){function r(){delete this[n]}function e(){this[n]=t}function u(){var r=t.apply(this,arguments);null==r?delete this[n]:this[n]=r}return null==t?r:"function"==typeof t?u:e}function q(n){function t(){var t=this.ownerDocument,r=this.namespaceURI;return r&&r!==t.documentElement.namespaceURI?t.createElementNS(r,n):t.createElement(n)}function r(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?r:t}function I(){var n=this.parentNode;n&&n.removeChild(this)}function P(n){return{__data__:n}}function U(n){return function(){return Sa(this,n)}}function F(n){return arguments.length||(n=r),function(t,r){return t&&r?n(t.__data__,r.__data__):!t-!r}}function H(n,t){for(var r=0,e=n.length;e>r;r++)for(var u,i=n[r],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,r);return n}function W(n){return ka(n,$a),n}function B(n){var t,r;return function(e,u,i){var a,o=n[i].update,c=o.length;for(i!=r&&(r=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<c;);return a}}function Y(n,t,r){function e(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=c(t,la(arguments));e.call(this),this.addEventListener(n,this[a]=u,u.$=r),u._=t}function i(){var t,r=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var e in this)if(t=e.match(r)){var u=this[e];this.removeEventListener(t[1],u,u.$),delete this[e]}}var a="__on"+n,o=n.indexOf("."),c=Z;o>0&&(n=n.slice(0,o));var l=ja.get(n);return l&&(n=l,c=V),o?t?u:e:t?M:i}function Z(n,t){return function(r){var e=oa.event;oa.event=r,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=e}}}function V(n,t){var r=Z(n,t);return function(n){var t=this,e=n.relatedTarget;e&&(e===t||8&e.compareDocumentPosition(t))||r.call(t,n)}}function X(r){var e=".dragsuppress-"+ ++Ta,u="click"+e,i=oa.select(t(r)).on("touchmove"+e,k).on("dragstart"+e,k).on("selectstart"+e,k);if(null==Da&&(Da="onselectstart"in r?!1:x(r.style,"userSelect")),Da){var a=n(r).style,o=a[Da];a[Da]="none"}return function(n){if(i.on(e,null),Da&&(a[Da]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){k(),t()},!0),setTimeout(t,0)}}}function K(n,r){r.changedTouches&&(r=r.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var u=e.createSVGPoint();if(0>La){var i=t(n);if(i.scrollX||i.scrollY){e=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=e[0][0].getScreenCTM();La=!(a.f||a.e),e.remove()}}return La?(u.x=r.pageX,u.y=r.pageY):(u.x=r.clientX,u.y=r.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[r.clientX-o.left-n.clientLeft,r.clientY-o.top-n.clientTop]}function J(){return oa.event.changedTouches[0].identifier}function Q(n){return n>0?1:0>n?-1:0}function G(n,t,r){return(t[0]-n[0])*(r[1]-n[1])-(t[1]-n[1])*(r[0]-n[0])}function nn(n){return n>1?0:-1>n?za:Math.acos(n)}function tn(n){return n>1?Pa:-1>n?-Pa:Math.asin(n)}function rn(n){return((n=Math.exp(n))-1/n)/2}function en(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function cn(n,t,r){return this instanceof cn?(this.h=+n,this.s=+t,void(this.l=+r)):arguments.length<2?n instanceof cn?new cn(n.h,n.s,n.l):bn(""+n,wn,cn):new cn(n,t,r)}function ln(n,t,r){function e(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*e(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,r=0>r?0:r>1?1:r,a=.5>=r?r*(1+t):r+t-r*t,i=2*r-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,r){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+r)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=kn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,r)}function fn(n,t,r){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(r,Math.cos(n*=Ua)*t,Math.sin(n)*t)}function hn(n,t,r){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+r)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):kn((n=yn(n)).r,n.g,n.b):new hn(n,t,r)}function pn(n,t,r){var e=(n+16)/116,u=e+t/500,i=e-r/200;return u=vn(u)*Qa,e=vn(e)*Ga,i=vn(i)*no,new yn(mn(3.2404542*u-1.5371385*e-.4985314*i),mn(-.969266*u+1.8760108*e+.041556*i),mn(.0556434*u-.2040259*e+1.0572252*i))}function gn(n,t,r){return n>0?new sn(Math.atan2(r,t)*Fa,Math.sqrt(t*t+r*r),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,r){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~r)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):bn(""+n,yn,ln):new yn(n,t,r)}function _n(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return _n(n)+""}function Mn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bn(n,t,r){var e,u,i,a=0,o=0,c=0;if(e=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(u=e[2].split(","),e[1]){case"hsl":return r(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(An(u[0]),An(u[1]),An(u[2]))}return(i=eo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,c=15&i,c=c<<4|c):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,c=255&i)),t(a,o,c))}function wn(n,t,r){var e,u,i=Math.min(n/=255,t/=255,r/=255),a=Math.max(n,t,r),o=a-i,c=(a+i)/2;return o?(u=.5>c?o/(a+i):o/(2-a-i),e=n==a?(t-r)/o+(r>t?6:0):t==a?(r-n)/o+2:(n-t)/o+4,e*=60):(e=NaN,u=c>0&&1>c?0:e),new cn(e,u,c)}function kn(n,t,r){n=Cn(n),t=Cn(t),r=Cn(r);var e=dn((.4124564*n+.3575761*t+.1804375*r)/Qa),u=dn((.2126729*n+.7151522*t+.072175*r)/Ga),i=dn((.0193339*n+.119192*t+.9503041*r)/no);return hn(116*u-16,500*(e-u),200*(u-i))}function Cn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function An(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Sn(n){return"function"==typeof n?n:function(){return n}}function En(n){return function(t,r,e){return 2===arguments.length&&"function"==typeof r&&(e=r,r=null),Nn(t,r,n,e)}}function Nn(n,t,r,e){function u(){var n,t=c.status;if(!t&&jn(c)||t>=200&&300>t||304===t){try{n=r.call(i,c)}catch(e){return void a.error.call(i,e)}a.load.call(i,n)}else a.error.call(i,c)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,c)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return r=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(la(arguments)))}}),i.send=function(r,e,u){if(2===arguments.length&&"function"==typeof e&&(u=e,e=null),c.open(r,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),c.setRequestHeader)for(var s in o)c.setRequestHeader(s,o[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,c),c.send(null==e?null:e),i},i.abort=function(){return c.abort(),i},oa.rebind(i,a,"on"),null==e?i:i.get($n(e))}function $n(n){return 1===n.length?function(t,r){n(null==t?r:null)}:n}function jn(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Dn(n,t,r){var e=arguments.length;2>e&&(t=0),3>e&&(r=Date.now());var u=r+t,i={c:n,t:u,n:null};return io?io.n=i:uo=i,io=i,ao||(oo=clearTimeout(oo),ao=1,co(Tn)),i}function Tn(){var n=Ln(),t=Rn()-n;t>24?(isFinite(t)&&(clearTimeout(oo),oo=setTimeout(Tn,t)),ao=0):(ao=1,co(Tn))}function Ln(){for(var n=Date.now(),t=uo;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Rn(){for(var n,t=uo,r=1/0;t;)t.c?(t.t<r&&(r=t.t),t=(n=t).n):t=n?n.n=t.n:uo=t.n;return io=n,r}function On(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function zn(n,t){var r=Math.pow(10,3*_a(8-t));return{scale:t>8?function(n){return n/r}:function(n){return n*r},symbol:n}}function qn(n){var t=n.decimal,r=n.thousands,e=n.grouping,u=n.currency,i=e&&r?function(n,t){for(var u=n.length,i=[],a=0,o=e[0],c=0;u>0&&o>0&&(c+o+1>t&&(o=Math.max(1,t-c)),i.push(n.substring(u-=o,u+o)),!((c+=o+1)>t));)o=e[a=(a+1)%e.length];return i.reverse().join(r)}:y;return function(n){var r=so.exec(n),e=r[1]||" ",a=r[2]||">",o=r[3]||"-",c=r[4]||"",l=r[5],s=+r[6],f=r[7],h=r[8],p=r[9],g=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===e&&"="===a)&&(l=e="0",a="="),p){case"n":f=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+p.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":g=-1,p="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):("e"==p||"f"==p)&&(h=Math.max(0,Math.min(20,h)))),p=fo.get(p)||In;var _=l&&f;return function(n){var r=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>g){var c=oa.formatPrefix(n,h);n=c.scale(n),r=c.symbol+d}else n*=g;n=p(n,h);var x,M,b=n.lastIndexOf(".");if(0>b){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,M=""):(x=n.substring(0,w),M=n.substring(w))}else x=n.substring(0,b),M=t+n.substring(b+1);!l&&f&&(x=i(x,1/0));var k=v.length+x.length+M.length+(_?0:u.length),C=s>k?new Array(k=s-k+1).join(e):"";return _&&(x=i(C+x,C.length?s-M.length:1/0)),u+=v,n=x+M,("<"===a?u+n+C:">"===a?C+u+n:"^"===a?C.substring(0,k>>=1)+u+n+C.substring(k):u+(_?n:C+n))+r}}}function In(n){return n+""}function Pn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Un(n,t,r){function e(t){var r=n(t),e=i(r,1);return e-t>t-r?r:e}function u(r){return t(r=n(new po(r-1)),1),r}function i(n,r){return t(n=new po(+n),r),n}function a(n,e,i){var a=u(n),o=[];if(i>1)for(;e>a;)r(a)%i||o.push(new Date(+a)),t(a,1);else for(;e>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,r){try{po=Pn;var e=new Pn;return e._=n,a(e,t,r)}finally{po=Date}}n.floor=n,n.round=e,n.ceil=u,n.offset=i,n.range=a;var c=n.utc=Fn(n);return c.floor=c,c.round=Fn(e),c.ceil=Fn(u),c.offset=Fn(i),c.range=o,n}function Fn(n){return function(t,r){try{po=Pn;var e=new Pn;return e._=t,n(e,r)._}finally{po=Date}}}function Hn(n){function t(n){function t(t){for(var r,u,i,a=[],o=-1,c=0;++o<e;)37===n.charCodeAt(o)&&(a.push(n.slice(c,o)),null!=(u=vo[r=n.charAt(++o)])&&(r=n.charAt(++o)),(i=E[r])&&(r=i(t,null==u?"e"===r?" ":"0":u)),a.push(r),c=o+1);return a.push(n.slice(c,o)),a.join("")}var e=n.length;return t.parse=function(t){var e={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=r(e,n,t,0);if(u!=t.length)return null;"p"in e&&(e.H=e.H%12+12*e.p);var i=null!=e.Z&&po!==Pn,a=new(i?Pn:po);return"j"in e?a.setFullYear(e.y,0,e.j):"W"in e||"U"in e?("w"in e||(e.w="W"in e?1:0),a.setFullYear(e.y,0,1),a.setFullYear(e.y,0,"W"in e?(e.w+6)%7+7*e.W-(a.getDay()+5)%7:e.w+7*e.U-(a.getDay()+6)%7)):a.setFullYear(e.y,e.m,e.d),a.setHours(e.H+(e.Z/100|0),e.M+e.Z%100,e.S,e.L),i?a._:a},t.toString=function(){return n},t}function r(n,t,r,e){for(var u,i,a,o=0,c=t.length,l=r.length;c>o;){if(e>=l)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=N[a in vo?t.charAt(o++):a],!i||(e=i(n,r,e))<0)return-1}else if(u!=r.charCodeAt(e++))return-1}return e}function e(n,t,r){b.lastIndex=0;var e=b.exec(t.slice(r));return e?(n.w=w.get(e[0].toLowerCase()),r+e[0].length):-1}function u(n,t,r){x.lastIndex=0;var e=x.exec(t.slice(r));return e?(n.w=M.get(e[0].toLowerCase()),r+e[0].length):-1}function i(n,t,r){A.lastIndex=0;var e=A.exec(t.slice(r));return e?(n.m=S.get(e[0].toLowerCase()),r+e[0].length):-1}function a(n,t,r){k.lastIndex=0;var e=k.exec(t.slice(r));return e?(n.m=C.get(e[0].toLowerCase()),r+e[0].length):-1}function o(n,t,e){return r(n,E.c.toString(),t,e)}function c(n,t,e){return r(n,E.x.toString(),t,e)}function l(n,t,e){return r(n,E.X.toString(),t,e)}function s(n,t,r){var e=_.get(t.slice(r,r+=2).toLowerCase());return null==e?-1:(n.p=e,r)}var f=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function r(n){try{po=Pn;var t=new po;return t._=n,e(t)}finally{po=Date}}var e=t(n);return r.parse=function(n){try{po=Pn;var t=e.parse(n);return t&&t._}finally{po=Date}},r.toString=e.toString,r},t.multi=t.utc.multi=lt;var _=oa.map(),x=Bn(v),M=Yn(v),b=Bn(d),w=Yn(d),k=Bn(m),C=Yn(m),A=Bn(y),S=Yn(y);g.forEach(function(n,t){_.set(n.toLowerCase(),t)});var E={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Wn(n.getDate(),t,2)},e:function(n,t){return Wn(n.getDate(),t,2)},H:function(n,t){return Wn(n.getHours(),t,2)},I:function(n,t){return Wn(n.getHours()%12||12,t,2)},j:function(n,t){return Wn(1+ho.dayOfYear(n),t,3)},L:function(n,t){return Wn(n.getMilliseconds(),t,3)},m:function(n,t){return Wn(n.getMonth()+1,t,2)},M:function(n,t){return Wn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Wn(n.getSeconds(),t,2)},U:function(n,t){return Wn(ho.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Wn(ho.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Wn(n.getFullYear()%100,t,2)},Y:function(n,t){return Wn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},N={a:e,A:u,b:i,B:a,c:o,d:tt,e:tt,H:et,I:et,j:rt,L:at,m:nt,M:ut,p:s,S:it,U:Vn,w:Zn,W:Xn,x:c,X:l,y:Jn,Y:Kn,Z:Qn,"%":ct};return t}function Wn(n,t,r){var e=0>n?"-":"",u=(e?-n:n)+"",i=u.length;return e+(r>i?new Array(r-i+1).join(t)+u:u)}function Bn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Yn(n){for(var t=new l,r=-1,e=n.length;++r<e;)t.set(n[r].toLowerCase(),r);return t}function Zn(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+1));return e?(n.w=+e[0],r+e[0].length):-1}function Vn(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r));return e?(n.U=+e[0],r+e[0].length):-1}function Xn(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r));return e?(n.W=+e[0],r+e[0].length):-1}function Kn(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+4));return e?(n.y=+e[0],r+e[0].length):-1}function Jn(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.y=Gn(+e[0]),r+e[0].length):-1}function Qn(n,t,r){return/^[+-]\d{4}$/.test(t=t.slice(r,r+5))?(n.Z=-t,r+5):-1}function Gn(n){return n+(n>68?1900:2e3)}function nt(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.m=e[0]-1,r+e[0].length):-1}function tt(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.d=+e[0],r+e[0].length):-1}function rt(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+3));return e?(n.j=+e[0],r+e[0].length):-1}function et(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.H=+e[0],r+e[0].length):-1}function ut(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.M=+e[0],r+e[0].length):-1}function it(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+2));return e?(n.S=+e[0],r+e[0].length):-1}function at(n,t,r){mo.lastIndex=0;var e=mo.exec(t.slice(r,r+3));return e?(n.L=+e[0],r+e[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),r=t>0?"-":"+",e=_a(t)/60|0,u=_a(t)%60;return r+Wn(e,"0",2)+Wn(u,"0",2)}function ct(n,t,r){yo.lastIndex=0;var e=yo.exec(t.slice(r,r+1));return e?r+e[0].length:-1}function lt(n){for(var t=n.length,r=-1;++r<t;)n[r][0]=this(n[r][0]);return function(t){for(var r=0,e=n[r];!e[1](t);)e=n[++r];return e[0](t)}}function st(){}function ft(n,t,r){var e=r.s=n+t,u=e-n,i=e-u;r.t=n-i+(t-u)}function ht(n,t){n&&bo.hasOwnProperty(n.type)&&bo[n.type](n,t)}function pt(n,t,r){var e,u=-1,i=n.length-r;for(t.lineStart();++u<i;)e=n[u],t.point(e[0],e[1],e[2]);t.lineEnd()}function gt(n,t){var r=-1,e=n.length;for(t.polygonStart();++r<e;)pt(n[r],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ua,t=t*Ua/2+za/4;var r=n-e,a=r>=0?1:-1,o=a*r,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),e=n,u=c,i=l}var t,r,e,u,i;Co.point=function(a,o){Co.point=n,e=(t=a)*Ua,u=Math.cos(o=(r=o)*Ua/2+za/4),i=Math.sin(o)},Co.lineEnd=function(){n(t,r)}}function dt(n){var t=n[0],r=n[1],e=Math.cos(r);return[e*Math.cos(t),e*Math.sin(t),Math.sin(r)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function _t(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Mt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function bt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return _a(n[0]-t[0])<Ra&&_a(n[1]-t[1])<Ra}function kt(n,t){n*=Ua;var r=Math.cos(t*=Ua);Ct(r*Math.cos(n),r*Math.sin(n),Math.sin(t))}function Ct(n,t,r){++Ao,Eo+=(n-Eo)/Ao,No+=(t-No)/Ao,$o+=(r-$o)/Ao}function At(){function n(n,u){n*=Ua;var i=Math.cos(u*=Ua),a=i*Math.cos(n),o=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=r*c-e*o)*l+(l=e*a-t*c)*l+(l=t*o-r*a)*l),t*a+r*o+e*c);So+=l,jo+=l*(t+(t=a)),Do+=l*(r+(r=o)),To+=l*(e+(e=c)),Ct(t,r,e)}var t,r,e;zo.point=function(u,i){u*=Ua;var a=Math.cos(i*=Ua);t=a*Math.cos(u),r=a*Math.sin(u),e=Math.sin(i),zo.point=n,Ct(t,r,e)}}function St(){zo.point=kt}function Et(){function n(n,t){n*=Ua;var r=Math.cos(t*=Ua),a=r*Math.cos(n),o=r*Math.sin(n),c=Math.sin(t),l=u*c-i*o,s=i*a-e*c,f=e*o-u*a,h=Math.sqrt(l*l+s*s+f*f),p=e*a+u*o+i*c,g=h&&-nn(p)/h,v=Math.atan2(h,p);Lo+=g*l,Ro+=g*s,Oo+=g*f,So+=v,jo+=v*(e+(e=a)),Do+=v*(u+(u=o)),To+=v*(i+(i=c)),Ct(e,u,i)}var t,r,e,u,i;zo.point=function(a,o){t=a,r=o,zo.point=n,a*=Ua;var c=Math.cos(o*=Ua);e=c*Math.cos(a),u=c*Math.sin(a),i=Math.sin(o),Ct(e,u,i)},zo.lineEnd=function(){n(t,r),zo.lineEnd=St,zo.point=kt}}function Nt(n,t){function r(r,e){return r=n(r,e),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,e){return r=t.invert(r,e),r&&n.invert(r[0],r[1])}),r}function $t(){return!0}function jt(n,t,r,e,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,r=n[0],e=n[t];if(wt(r,e)){u.lineStart();for(var o=0;t>o;++o)u.point((r=n[o])[0],r[1]);return void u.lineEnd()}var c=new Tt(r,n,null,!0),l=new Tt(r,null,c,!1);c.o=l,i.push(c),a.push(l),c=new Tt(e,n,null,!1),l=new Tt(e,null,c,!0),c.o=l,i.push(c),a.push(l)}}),a.sort(t),Dt(i),Dt(a),i.length){for(var o=0,c=r,l=a.length;l>o;++o)a[o].e=c=!c;for(var s,f,h=i[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;s=p.z,u.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var o=0,l=s.length;l>o;++o)u.point((f=s[o])[0],f[1]);else e(p.x,p.n.x,1,u);p=p.n}else{if(g){s=p.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else e(p.x,p.p.x,-1,u);p=p.p}p=p.o,s=p.z,g=!g}while(!p.v);u.lineEnd()}}}function Dt(n){if(t=n.length){for(var t,r,e=0,u=n[0];++e<t;)u.n=r=n[e],r.p=u,u=r;u.n=r=n[0],r.p=u}}function Tt(n,t,r,e){this.x=n,this.z=t,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function Lt(n,t,r,e){return function(u,i){function a(t,r){var e=u(t,r);n(t=e[0],r=e[1])&&i.point(t,r)}function o(n,t){var r=u(n,t);d.point(r[0],r[1])}function c(){y.point=o,d.lineStart()}function l(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var r=u(n,t);x.point(r[0],r[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),r=_.buffer(),e=r.length;if(v.pop(),g.push(v),v=null,e)if(1&t){n=r[0];var u,e=n.length-1,a=-1;if(e>0){for(M||(i.polygonStart(),M=!0),i.lineStart();++a<e;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else e>1&&2&t&&r.push(r.pop().concat(r.shift())),p.push(r.filter(Rt))}var p,g,v,d=t(i),m=u.invert(e[0],e[1]),y={point:a,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,p=[],g=[]},polygonEnd:function(){y.point=a,y.lineStart=c,y.lineEnd=l,p=oa.merge(p);var n=Ut(m,g);p.length?(M||(i.polygonStart(),M=!0),jt(p,zt,n,r,i)):n&&(M||(i.polygonStart(),M=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),M&&(i.polygonEnd(),M=!1),p=g=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}},_=Ot(),x=t(_),M=!1;return y}}function Rt(n){return n.length>1}function Ot(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,r){n.push([t,r])},lineEnd:M,buffer:function(){var r=t;return t=[],n=null,r},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function zt(n,t){return((n=n.x)[0]<0?n[1]-Pa-Ra:Pa-n[1])-((t=t.x)[0]<0?t[1]-Pa-Ra:Pa-t[1])}function qt(n){var t,r=NaN,e=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?za:-za,c=_a(i-r);_a(c-za)<Ra?(n.point(r,e=(e+a)/2>0?Pa:-Pa),n.point(u,e),n.lineEnd(),n.lineStart(),n.point(o,e),n.point(i,e),t=0):u!==o&&c>=za&&(_a(r-u)<Ra&&(r-=u*Ra),_a(i-o)<Ra&&(i-=o*Ra),e=It(r,e,i,a),n.point(u,e),n.lineEnd(),n.lineStart(),n.point(o,e),t=0),n.point(r=i,e=a),u=o},lineEnd:function(){n.lineEnd(),r=e=NaN},clean:function(){return 2-t}}}function It(n,t,r,e){var u,i,a=Math.sin(n-r);return _a(a)>Ra?Math.atan((Math.sin(t)*(i=Math.cos(e))*Math.sin(r)-Math.sin(e)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+e)/2}function Pt(n,t,r,e){var u;if(null==n)u=r*Pa,e.point(-za,u),e.point(0,u),e.point(za,u),e.point(za,0),e.point(za,-u),e.point(0,-u),e.point(-za,-u),e.point(-za,0),e.point(-za,u);else if(_a(n[0]-t[0])>Ra){var i=n[0]<t[0]?za:-za;u=r*i/2,e.point(-i,u),e.point(0,u),e.point(i,u)}else e.point(t[0],t[1])}function Ut(n,t){var r=n[0],e=n[1],u=[Math.sin(r),-Math.cos(r),0],i=0,a=0;ko.reset();for(var o=0,c=t.length;c>o;++o){var l=t[o],s=l.length;if(s)for(var f=l[0],h=f[0],p=f[1]/2+za/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+za/4,_=Math.sin(y),x=Math.cos(y),M=m-h,b=M>=0?1:-1,w=b*M,k=w>za,C=g*_;if(ko.add(Math.atan2(C*b*Math.sin(w),v*x+C*Math.cos(w))),i+=k?M+b*qa:M,k^h>=r^m>=r){var A=yt(dt(f),dt(n));Mt(A);var S=yt(u,A);Mt(S);var E=(k^M>=0?-1:1)*tn(S[2]);(e>E||e===E&&(A[0]||A[1]))&&(a+=k^M>=0?1:-1)}if(!d++)break;h=m,g=_,v=x,f=n}}return(-Ra>i||Ra>i&&0>ko)^1&a}function Ft(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function r(n){var r,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var p,g=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?za:-za),h):0;if(!r&&(l=c=v)&&n.lineStart(),v!==c&&(p=e(r,g),(wt(r,p)||wt(g,p))&&(g[0]+=Ra,g[1]+=Ra,v=t(g[0],g[1]))),v!==c)s=0,v?(n.lineStart(),p=e(g,r),n.point(p[0],p[1])):(p=e(r,g),n.point(p[0],p[1]),n.lineEnd()),r=p;else if(o&&r&&a^v){var m;d&i||!(m=e(g,r,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||r&&wt(r,g)||n.point(g[0],g[1]),r=g,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),r=null},clean:function(){return s|(l&&c)<<1}}}function e(n,t,r){var e=dt(n),u=dt(t),a=[1,0,0],o=yt(e,u),c=mt(o,o),l=o[0],s=c-l*l;if(!s)return!r&&n;var f=i*c/s,h=-i*l/s,p=yt(a,o),g=xt(a,f),v=xt(o,h);_t(g,v);var d=p,m=mt(g,d),y=mt(d,d),_=m*m-y*(mt(g,g)-1);if(!(0>_)){var x=Math.sqrt(_),M=xt(d,(-m-x)/y);if(_t(M,g),M=bt(M),!r)return M;var b,w=n[0],k=t[0],C=n[1],A=t[1];w>k&&(b=w,w=k,k=b);var S=k-w,E=_a(S-za)<Ra,N=E||Ra>S;if(!E&&C>A&&(b=C,C=A,A=b),N?E?C+A>0^M[1]<(_a(M[0]-w)<Ra?C:A):C<=M[1]&&M[1]<=A:S>za^(w<=M[0]&&M[0]<=k)){var $=xt(d,(-m+x)/y);return _t($,g),[M,bt($)]}}}function u(t,r){var e=a?n:za-n,u=0;return-e>t?u|=1:t>e&&(u|=2),-e>r?u|=4:r>e&&(u|=8),u}var i=Math.cos(n),a=i>0,o=_a(i)>Ra,c=vr(n,6*Ua);return Lt(t,r,c,a?[0,-n]:[-za,n-za])}function Ht(n,t,r,e){return function(u){var i,a=u.a,o=u.b,c=a.x,l=a.y,s=o.x,f=o.y,h=0,p=1,g=s-c,v=f-l;if(i=n-c,g||!(i>0)){if(i/=g,0>g){if(h>i)return;p>i&&(p=i)}else if(g>0){if(i>p)return;i>h&&(h=i)}if(i=r-c,g||!(0>i)){if(i/=g,0>g){if(i>p)return;i>h&&(h=i)}else if(g>0){if(h>i)return;p>i&&(p=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;p>i&&(p=i)}else if(v>0){if(i>p)return;i>h&&(h=i)}if(i=e-l,v||!(0>i)){if(i/=v,0>v){if(i>p)return;i>h&&(h=i)}else if(v>0){if(h>i)return;p>i&&(p=i)}return h>0&&(u.a={x:c+h*g,y:l+h*v}),1>p&&(u.b={x:c+p*g,y:l+p*v}),u}}}}}}function Wt(n,t,r,e){function u(e,u){return _a(e[0]-n)<Ra?u>0?0:3:_a(e[0]-r)<Ra?u>0?2:1:_a(e[1]-t)<Ra?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var r=u(n,1),e=u(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(o){function c(n){for(var t=0,r=d.length,e=n[1],u=0;r>u;++u)for(var i,a=1,o=d[u],c=o.length,l=o[0];c>a;++a)i=o[a],l[1]<=e?i[1]>e&&G(l,i,n)>0&&++t:i[1]<=e&&G(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,o,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(o,c))||a(i,o)<0^c>0){do l.point(0===s||3===s?n:r,s>1?e:t);while((s=(s+c+4)%4)!==f)}else l.point(o[0],o[1])}function s(u,i){return u>=n&&r>=u&&i>=t&&e>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){N.point=g,d&&d.push(m=[]),k=!0,w=!1,M=b=NaN}function p(){v&&(g(y,_),x&&w&&S.rejoin(),v.push(S.buffer())),N.point=f,w&&o.lineEnd()}function g(n,t){n=Math.max(-Io,Math.min(Io,n)),t=Math.max(-Io,Math.min(Io,t));var r=s(n,t);if(d&&m.push([n,t]),k)y=n,_=t,x=r,k=!1,r&&(o.lineStart(),o.point(n,t));else if(r&&w)o.point(n,t);else{var e={a:{x:M,y:b},b:{x:n,y:t}};E(e)?(w||(o.lineStart(),o.point(e.a.x,e.a.y)),o.point(e.b.x,e.b.y),r||o.lineEnd(),C=!1):r&&(o.lineStart(),o.point(n,t),C=!1)}M=n,b=t,w=r}var v,d,m,y,_,x,M,b,w,k,C,A=o,S=Ot(),E=Ht(n,t,r,e),N={point:f,lineStart:h,lineEnd:p,polygonStart:function(){o=S,v=[],d=[],C=!0},polygonEnd:function(){o=A,v=oa.merge(v);var t=c([n,e]),r=C&&t,u=v.length;(r||u)&&(o.polygonStart(),r&&(o.lineStart(),l(null,null,1,o),o.lineEnd()),u&&jt(v,i,t,l,o),o.polygonEnd()),v=d=m=null}};return N}}function Bt(n){var t=0,r=za/3,e=or(n),u=e(t,r);return u.parallels=function(n){return arguments.length?e(t=n[0]*za/180,r=n[1]*za/180):[t/za*180,r/za*180]},u}function Yt(n,t){function r(n,t){var r=Math.sqrt(i-2*u*Math.sin(t))/u;return[r*Math.sin(n*=u),a-r*Math.cos(n)]}var e=Math.sin(n),u=(e+Math.sin(t))/2,i=1+e*(2*u-e),a=Math.sqrt(i)/u;return r.invert=function(n,t){var r=a-t;return[Math.atan2(n,r)/u,tn((i-(n*n+r*r)*u*u)/(2*u))]},r}function Zt(){function n(n,t){Uo+=u*n-e*t,e=n,u=t}var t,r,e,u;Yo.point=function(i,a){Yo.point=n,t=e=i,r=u=a},Yo.lineEnd=function(){n(t,r)}}function Vt(n,t){Fo>n&&(Fo=n),n>Wo&&(Wo=n),Ho>t&&(Ho=t),t>Bo&&(Bo=t)}function Xt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=r}function r(n,t){a.push("L",n,",",t)}function e(){o.point=n}function u(){a.push("Z")}var i=Kt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:e,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=e,o.point=n},pointRadius:function(n){return i=Kt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Kt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Jt(n,t){Eo+=n,No+=t,++$o}function Qt(){function n(n,e){var u=n-t,i=e-r,a=Math.sqrt(u*u+i*i);jo+=a*(t+n)/2,Do+=a*(r+e)/2,To+=a,Jt(t=n,r=e)}var t,r;Vo.point=function(e,u){Vo.point=n,Jt(t=e,r=u)}}function Gt(){Vo.point=Jt}function nr(){function n(n,t){var r=n-e,i=t-u,a=Math.sqrt(r*r+i*i);jo+=a*(e+n)/2,Do+=a*(u+t)/2,To+=a,a=u*n-e*t,Lo+=a*(e+n),Ro+=a*(u+t),Oo+=3*a,Jt(e=n,u=t)}var t,r,e,u;Vo.point=function(i,a){Vo.point=n,Jt(t=e=i,r=u=a)},Vo.lineEnd=function(){n(t,r)}}function tr(n){function t(t,r){n.moveTo(t+a,r),n.arc(t,r,a,0,qa)}function r(t,r){n.moveTo(t,r),o.point=e}function e(t,r){n.lineTo(t,r)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=r},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:M};return o}function rr(n){function t(n){return(o?e:r)(n)}function r(t){return ir(t,function(r,e){r=n(r,e),t.point(r[0],r[1])})}function e(t){function r(r,e){r=n(r,e),t.point(r[0],r[1])}function e(){_=NaN,k.point=i,t.lineStart()}function i(r,e){var i=dt([r,e]),a=n(r,e);u(_,x,y,M,b,w,_=a[0],x=a[1],y=r,M=i[0],b=i[1],w=i[2],o,t),t.point(_,x)}function a(){k.point=r,t.lineEnd()}function c(){
+e(),k.point=l,k.lineEnd=s}function l(n,t){i(f=n,h=t),p=_,g=x,v=M,d=b,m=w,k.point=i}function s(){u(_,x,y,M,b,w,p,g,f,v,d,m,o,t),k.lineEnd=a,a()}var f,h,p,g,v,d,m,y,_,x,M,b,w,k={point:r,lineStart:e,lineEnd:a,polygonStart:function(){t.polygonStart(),k.lineStart=c},polygonEnd:function(){t.polygonEnd(),k.lineStart=e}};return k}function u(t,r,e,o,c,l,s,f,h,p,g,v,d,m){var y=s-t,_=f-r,x=y*y+_*_;if(x>4*i&&d--){var M=o+p,b=c+g,w=l+v,k=Math.sqrt(M*M+b*b+w*w),C=Math.asin(w/=k),A=_a(_a(w)-1)<Ra||_a(e-h)<Ra?(e+h)/2:Math.atan2(b,M),S=n(A,C),E=S[0],N=S[1],$=E-t,j=N-r,D=_*$-y*j;(D*D/x>i||_a((y*$+_*j)/x-.5)>.3||a>o*p+c*g+l*v)&&(u(t,r,e,o,c,l,E,N,A,M/=k,b/=k,w,d,m),m.point(E,N),u(E,N,A,M,b,w,s,f,h,p,g,v,d,m))}}var i=.5,a=Math.cos(30*Ua),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=rr(function(t,r){return n([t*Fa,r*Fa])});return function(n){return cr(t(n))}}function ur(n){this.stream=n}function ir(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ar(n){return or(function(){return n})()}function or(n){function t(n){return n=o(n[0]*Ua,n[1]*Ua),[n[0]*h+c,l-n[1]*h]}function r(n){return n=o.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Fa,n[1]*Fa]}function e(){o=Nt(a=fr(m,_,x),i);var n=i(v,d);return c=p-n[0]*h,l=g+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,c,l,s,f=rr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,m=0,_=0,x=0,M=qo,b=y,w=null,k=null;return t.stream=function(n){return s&&(s.valid=!1),s=cr(M(a,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(M=null==n?(w=n,qo):Ft((w=+n)*Ua),u()):w},t.clipExtent=function(n){return arguments.length?(k=n,b=n?Wt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):k},t.scale=function(n){return arguments.length?(h=+n,e()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],e()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Ua,d=n[1]%360*Ua,e()):[v*Fa,d*Fa]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ua,_=n[1]%360*Ua,x=n.length>2?n[2]%360*Ua:0,e()):[m*Fa,_*Fa,x*Fa]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&r,e()}}function cr(n){return ir(n,function(t,r){n.point(t*Ua,r*Ua)})}function lr(n,t){return[n,t]}function sr(n,t){return[n>za?n-qa:-za>n?n+qa:n,t]}function fr(n,t,r){return n?t||r?Nt(pr(n),gr(t,r)):pr(n):t||r?gr(t,r):sr}function hr(n){return function(t,r){return t+=n,[t>za?t-qa:-za>t?t+qa:t,r]}}function pr(n){var t=hr(n);return t.invert=hr(-n),t}function gr(n,t){function r(n,t){var r=Math.cos(t),o=Math.cos(n)*r,c=Math.sin(n)*r,l=Math.sin(t),s=l*e+o*u;return[Math.atan2(c*i-s*a,o*e-l*u),tn(s*i+c*a)]}var e=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return r.invert=function(n,t){var r=Math.cos(t),o=Math.cos(n)*r,c=Math.sin(n)*r,l=Math.sin(t),s=l*i-c*a;return[Math.atan2(c*i+l*a,o*e+s*u),tn(s*e-o*u)]},r}function vr(n,t){var r=Math.cos(n),e=Math.sin(n);return function(u,i,a,o){var c=a*t;null!=u?(u=dr(r,u),i=dr(r,i),(a>0?i>u:u>i)&&(u+=a*qa)):(u=n+a*qa,i=n-.5*c);for(var l,s=u;a>0?s>i:i>s;s-=c)o.point((l=bt([r,-e*Math.cos(s),-e*Math.sin(s)]))[0],l[1])}}function dr(n,t){var r=dt(t);r[0]-=n,Mt(r);var e=nn(-r[1]);return((-r[2]<0?-e:e)+2*Math.PI-Ra)%(2*Math.PI)}function mr(n,t,r){var e=oa.range(n,t-Ra,r).concat(t);return function(n){return e.map(function(t){return[n,t]})}}function yr(n,t,r){var e=oa.range(n,t-Ra,r).concat(t);return function(n){return e.map(function(t){return[t,n]})}}function _r(n){return n.source}function xr(n){return n.target}function Mr(n,t,r,e){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e),c=u*Math.cos(n),l=u*Math.sin(n),s=a*Math.cos(r),f=a*Math.sin(r),h=2*Math.asin(Math.sqrt(an(e-t)+u*a*an(r-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,r=Math.sin(h-n)*p,e=r*c+t*s,u=r*l+t*f,a=r*i+t*o;return[Math.atan2(u,e)*Fa,Math.atan2(a,Math.sqrt(e*e+u*u))*Fa]}:function(){return[n*Fa,t*Fa]};return g.distance=h,g}function br(){function n(n,u){var i=Math.sin(u*=Ua),a=Math.cos(u),o=_a((n*=Ua)-t),c=Math.cos(o);Xo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=e*i-r*a*c)*o),r*i+e*a*c),t=n,r=i,e=a}var t,r,e;Ko.point=function(u,i){t=u*Ua,r=Math.sin(i*=Ua),e=Math.cos(i),Ko.point=n},Ko.lineEnd=function(){Ko.point=Ko.lineEnd=M}}function wr(n,t){function r(t,r){var e=Math.cos(t),u=Math.cos(r),i=n(e*u);return[i*u*Math.sin(t),i*Math.sin(r)]}return r.invert=function(n,r){var e=Math.sqrt(n*n+r*r),u=t(e),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,e*a),Math.asin(e&&r*i/e)]},r}function kr(n,t){function r(n,t){a>0?-Pa+Ra>t&&(t=-Pa+Ra):t>Pa-Ra&&(t=Pa-Ra);var r=a/Math.pow(u(t),i);return[r*Math.sin(i*n),a-r*Math.cos(i*n)]}var e=Math.cos(n),u=function(n){return Math.tan(za/4+n/2)},i=n===t?Math.sin(n):Math.log(e/Math.cos(t))/Math.log(u(t)/u(n)),a=e*Math.pow(u(n),i)/i;return i?(r.invert=function(n,t){var r=a-t,e=Q(i)*Math.sqrt(n*n+r*r);return[Math.atan2(n,r)/i,2*Math.atan(Math.pow(a/e,1/i))-Pa]},r):Ar}function Cr(n,t){function r(n,t){var r=i-t;return[r*Math.sin(u*n),i-r*Math.cos(u*n)]}var e=Math.cos(n),u=n===t?Math.sin(n):(e-Math.cos(t))/(t-n),i=e/u+n;return _a(u)<Ra?lr:(r.invert=function(n,t){var r=i-t;return[Math.atan2(n,r)/u,i-Q(u)*Math.sqrt(n*n+r*r)]},r)}function Ar(n,t){return[n,Math.log(Math.tan(za/4+t/2))]}function Sr(n){var t,r=ar(n),e=r.scale,u=r.translate,i=r.clipExtent;return r.scale=function(){var n=e.apply(r,arguments);return n===r?t?r.clipExtent(null):r:n},r.translate=function(){var n=u.apply(r,arguments);return n===r?t?r.clipExtent(null):r:n},r.clipExtent=function(n){var a=i.apply(r,arguments);if(a===r){if(t=null==n){var o=za*e(),c=u();i([[c[0]-o,c[1]-o],[c[0]+o,c[1]+o]])}}else t&&(a=null);return a},r.clipExtent(null)}function Er(n,t){return[Math.log(Math.tan(za/4+t/2)),-n]}function Nr(n){return n[0]}function $r(n){return n[1]}function jr(n){for(var t=n.length,r=[0,1],e=2,u=2;t>u;u++){for(;e>1&&G(n[r[e-2]],n[r[e-1]],n[u])<=0;)--e;r[e++]=u}return r.slice(0,e)}function Dr(n,t){return n[0]-t[0]||n[1]-t[1]}function Tr(n,t,r){return(r[0]-t[0])*(n[1]-t[1])<(r[1]-t[1])*(n[0]-t[0])}function Lr(n,t,r,e){var u=n[0],i=r[0],a=t[0]-u,o=e[0]-i,c=n[1],l=r[1],s=t[1]-c,f=e[1]-l,h=(o*(c-l)-f*(u-i))/(f*a-o*s);return[u+h*a,c+h*s]}function Rr(n){var t=n[0],r=n[n.length-1];return!(t[0]-r[0]||t[1]-r[1])}function Or(){ee(this),this.edge=this.site=this.circle=null}function zr(n){var t=cc.pop()||new Or;return t.site=n,t}function qr(n){Vr(n),ic.remove(n),cc.push(n),ee(n)}function Ir(n){var t=n.circle,r=t.x,e=t.cy,u={x:r,y:e},i=n.P,a=n.N,o=[n];qr(n);for(var c=i;c.circle&&_a(r-c.circle.x)<Ra&&_a(e-c.circle.cy)<Ra;)i=c.P,o.unshift(c),qr(c),c=i;o.unshift(c),Vr(c);for(var l=a;l.circle&&_a(r-l.circle.x)<Ra&&_a(e-l.circle.cy)<Ra;)a=l.N,o.push(l),qr(l),l=a;o.push(l),Vr(l);var s,f=o.length;for(s=1;f>s;++s)l=o[s],c=o[s-1],ne(l.edge,c.site,l.site,u);c=o[0],l=o[f-1],l.edge=Qr(c.site,l.site,null,u),Zr(c),Zr(l)}function Pr(n){for(var t,r,e,u,i=n.x,a=n.y,o=ic._;o;)if(e=Ur(o,a)-i,e>Ra)o=o.L;else{if(u=i-Fr(o,a),!(u>Ra)){e>-Ra?(t=o.P,r=o):u>-Ra?(t=o,r=o.N):t=r=o;break}if(!o.R){t=o;break}o=o.R}var c=zr(n);if(ic.insert(t,c),t||r){if(t===r)return Vr(t),r=zr(t.site),ic.insert(c,r),c.edge=r.edge=Qr(t.site,c.site),Zr(t),void Zr(r);if(!r)return void(c.edge=Qr(t.site,c.site));Vr(t),Vr(r);var l=t.site,s=l.x,f=l.y,h=n.x-s,p=n.y-f,g=r.site,v=g.x-s,d=g.y-f,m=2*(h*d-p*v),y=h*h+p*p,_=v*v+d*d,x={x:(d*y-p*_)/m+s,y:(h*_-v*y)/m+f};ne(r.edge,l,g,x),c.edge=Qr(l,n,null,x),r.edge=Qr(n,g,null,x),Zr(t),Zr(r)}}function Ur(n,t){var r=n.site,e=r.x,u=r.y,i=u-t;if(!i)return e;var a=n.P;if(!a)return-(1/0);r=a.site;var o=r.x,c=r.y,l=c-t;if(!l)return o;var s=o-e,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+e:(e+o)/2}function Fr(n,t){var r=n.N;if(r)return Ur(r,t);var e=n.site;return e.y===t?e.x:1/0}function Hr(n){this.site=n,this.edges=[]}function Wr(n){for(var t,r,e,u,i,a,o,c,l,s,f=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=uc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,c=o.length,a=0;c>a;)s=o[a].end(),e=s.x,u=s.y,l=o[++a%c].start(),t=l.x,r=l.y,(_a(e-t)>Ra||_a(u-r)>Ra)&&(o.splice(a,0,new te(Gr(i.site,s,_a(e-f)<Ra&&g-u>Ra?{x:f,y:_a(t-f)<Ra?r:g}:_a(u-g)<Ra&&h-e>Ra?{x:_a(r-g)<Ra?t:h,y:g}:_a(e-h)<Ra&&u-p>Ra?{x:h,y:_a(t-h)<Ra?r:p}:_a(u-p)<Ra&&e-f>Ra?{x:_a(r-p)<Ra?t:f,y:p}:null),i.site,null)),++c)}function Br(n,t){return t.angle-n.angle}function Yr(){ee(this),this.x=this.y=this.arc=this.site=this.cy=null}function Zr(n){var t=n.P,r=n.N;if(t&&r){var e=t.site,u=n.site,i=r.site;if(e!==i){var a=u.x,o=u.y,c=e.x-a,l=e.y-o,s=i.x-a,f=i.y-o,h=2*(c*f-l*s);if(!(h>=-Oa)){var p=c*c+l*l,g=s*s+f*f,v=(f*p-l*g)/h,d=(c*g-s*p)/h,f=d+o,m=lc.pop()||new Yr;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,_=oc._;_;)if(m.y<_.y||m.y===_.y&&m.x<=_.x){if(!_.L){y=_.P;break}_=_.L}else{if(!_.R){y=_;break}_=_.R}oc.insert(y,m),y||(ac=m)}}}}function Vr(n){var t=n.circle;t&&(t.P||(ac=t.N),oc.remove(t),lc.push(t),ee(t),n.circle=null)}function Xr(n){for(var t,r=ec,e=Ht(n[0][0],n[0][1],n[1][0],n[1][1]),u=r.length;u--;)t=r[u],(!Kr(t,n)||!e(t)||_a(t.a.x-t.b.x)<Ra&&_a(t.a.y-t.b.y)<Ra)&&(t.a=t.b=null,r.splice(u,1))}function Kr(n,t){var r=n.b;if(r)return!0;var e,u,i=n.a,a=t[0][0],o=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,p=s.y,g=f.x,v=f.y,d=(h+g)/2,m=(p+v)/2;if(v===p){if(a>d||d>=o)return;if(h>g){if(i){if(i.y>=l)return}else i={x:d,y:c};r={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};r={x:d,y:c}}}else if(e=(h-g)/(v-p),u=m-e*d,-1>e||e>1)if(h>g){if(i){if(i.y>=l)return}else i={x:(c-u)/e,y:c};r={x:(l-u)/e,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/e,y:l};r={x:(c-u)/e,y:c}}else if(v>p){if(i){if(i.x>=o)return}else i={x:a,y:e*a+u};r={x:o,y:e*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:e*o+u};r={x:a,y:e*a+u}}return n.a=i,n.b=r,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Qr(n,t,r,e){var u=new Jr(n,t);return ec.push(u),r&&ne(u,n,t,r),e&&ne(u,t,n,e),uc[n.i].edges.push(new te(u,n,t)),uc[t.i].edges.push(new te(u,t,n)),u}function Gr(n,t,r){var e=new Jr(n,null);return e.a=t,e.b=r,ec.push(e),e}function ne(n,t,r,e){n.a||n.b?n.l===r?n.b=e:n.a=e:(n.a=e,n.l=t,n.r=r)}function te(n,t,r){var e=n.a,u=n.b;this.edge=n,this.site=t,this.angle=r?Math.atan2(r.y-t.y,r.x-t.x):n.l===t?Math.atan2(u.x-e.x,e.y-u.y):Math.atan2(e.x-u.x,u.y-e.y)}function re(){this._=null}function ee(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ue(n,t){var r=t,e=t.R,u=r.U;u?u.L===r?u.L=e:u.R=e:n._=e,e.U=u,r.U=e,r.R=e.L,r.R&&(r.R.U=r),e.L=r}function ie(n,t){var r=t,e=t.L,u=r.U;u?u.L===r?u.L=e:u.R=e:n._=e,e.U=u,r.U=e,r.L=e.R,r.L&&(r.L.U=r),e.R=r}function ae(n){for(;n.L;)n=n.L;return n}function oe(n,t){var r,e,u,i=n.sort(ce).pop();for(ec=[],uc=new Array(n.length),ic=new re,oc=new re;;)if(u=ac,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==r||i.y!==e)&&(uc[i.i]=new Hr(i),Pr(i),r=i.x,e=i.y),i=n.pop();else{if(!u)break;Ir(u.arc)}t&&(Xr(t),Wr(t));var a={cells:uc,edges:ec};return ic=oc=ec=uc=null,a}function ce(n,t){return t.y-n.y||t.x-n.x}function le(n,t,r){return(n.x-r.x)*(t.y-n.y)-(n.x-t.x)*(r.y-n.y)}function se(n){return n.x}function fe(n){return n.y}function he(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pe(n,t,r,e,u,i){if(!n(t,r,e,u,i)){var a=.5*(r+u),o=.5*(e+i),c=t.nodes;c[0]&&pe(n,c[0],r,e,a,o),c[1]&&pe(n,c[1],a,e,u,o),c[2]&&pe(n,c[2],r,o,a,i),c[3]&&pe(n,c[3],a,o,u,i)}}function ge(n,t,r,e,u,i,a){var o,c=1/0;return function l(n,s,f,h,p){if(!(s>i||f>a||e>h||u>p)){if(g=n.point){var g,v=t-n.x,d=r-n.y,m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);e=t-y,u=r-y,i=t+y,a=r+y,o=g}}for(var _=n.nodes,x=.5*(s+h),M=.5*(f+p),b=t>=x,w=r>=M,k=w<<1|b,C=k+4;C>k;++k)if(n=_[3&k])switch(3&k){case 0:l(n,s,f,x,M);break;case 1:l(n,x,f,h,M);break;case 2:l(n,s,M,x,p);break;case 3:l(n,x,M,h,p)}}}(n,e,u,i,a),o}function ve(n,t){n=oa.rgb(n),t=oa.rgb(t);var r=n.r,e=n.g,u=n.b,i=t.r-r,a=t.g-e,o=t.b-u;return function(n){return"#"+Mn(Math.round(r+i*n))+Mn(Math.round(e+a*n))+Mn(Math.round(u+o*n))}}function de(n,t){var r,e={},u={};for(r in n)r in t?e[r]=_e(n[r],t[r]):u[r]=n[r];for(r in t)r in n||(u[r]=t[r]);return function(n){for(r in e)u[r]=e[r](n);return u}}function me(n,t){return n=+n,t=+t,function(r){return n*(1-r)+t*r}}function ye(n,t){var r,e,u,i=fc.lastIndex=hc.lastIndex=0,a=-1,o=[],c=[];for(n+="",t+="";(r=fc.exec(n))&&(e=hc.exec(t));)(u=e.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(r=r[0])===(e=e[0])?o[a]?o[a]+=e:o[++a]=e:(o[++a]=null,c.push({i:a,x:me(r,e)})),i=hc.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var r,e=0;t>e;++e)o[(r=c[e]).i]=r.x(n);return o.join("")})}function _e(n,t){for(var r,e=oa.interpolators.length;--e>=0&&!(r=oa.interpolators[e](n,t)););return r}function xe(n,t){var r,e=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(r=0;o>r;++r)e.push(_e(n[r],t[r]));for(;i>r;++r)u[r]=n[r];for(;a>r;++r)u[r]=t[r];return function(n){for(r=0;o>r;++r)u[r]=e[r](n);return u}}function Me(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function be(n){return function(t){return 1-n(1-t)}}function we(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function ke(n){return n*n}function Ce(n){return n*n*n}function Ae(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,r=t*n;return 4*(.5>n?r:3*(n-t)+r-.75)}function Se(n){return function(t){return Math.pow(t,n)}}function Ee(n){return 1-Math.cos(n*Pa)}function Ne(n){return Math.pow(2,10*(n-1))}function $e(n){return 1-Math.sqrt(1-n*n)}function je(n,t){var r;return arguments.length<2&&(t=.45),arguments.length?r=t/qa*Math.asin(1/n):(n=1,r=t/4),function(e){return 1+n*Math.pow(2,-10*e)*Math.sin((e-r)*qa/t)}}function De(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Te(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Le(n,t){n=oa.hcl(n),t=oa.hcl(t);var r=n.h,e=n.c,u=n.l,i=t.h-r,a=t.c-e,o=t.l-u;return isNaN(a)&&(a=0,e=isNaN(e)?t.c:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(r+i*n,e+a*n,u+o*n)+""}}function Re(n,t){n=oa.hsl(n),t=oa.hsl(t);var r=n.h,e=n.s,u=n.l,i=t.h-r,a=t.s-e,o=t.l-u;return isNaN(a)&&(a=0,e=isNaN(e)?t.s:e),isNaN(i)?(i=0,r=isNaN(r)?t.h:r):i>180?i-=360:-180>i&&(i+=360),function(n){return ln(r+i*n,e+a*n,u+o*n)+""}}function Oe(n,t){n=oa.lab(n),t=oa.lab(t);var r=n.l,e=n.a,u=n.b,i=t.l-r,a=t.a-e,o=t.b-u;return function(n){return pn(r+i*n,e+a*n,u+o*n)+""}}function ze(n,t){return t-=n,function(r){return Math.round(n+t*r)}}function qe(n){var t=[n.a,n.b],r=[n.c,n.d],e=Pe(t),u=Ie(t,r),i=Pe(Ue(r,t,-u))||0;t[0]*r[1]<r[0]*t[1]&&(t[0]*=-1,t[1]*=-1,e*=-1,u*=-1),this.rotate=(e?Math.atan2(t[1],t[0]):Math.atan2(-r[0],r[1]))*Fa,this.translate=[n.e,n.f],this.scale=[e,i],this.skew=i?Math.atan2(u,i)*Fa:0}function Ie(n,t){return n[0]*t[0]+n[1]*t[1]}function Pe(n){var t=Math.sqrt(Ie(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Ue(n,t,r){return n[0]+=r*t[0],n[1]+=r*t[1],n}function Fe(n){return n.length?n.pop()+",":""}function He(n,t,r,e){if(n[0]!==t[0]||n[1]!==t[1]){var u=r.push("translate(",null,",",null,")");e.push({i:u-4,x:me(n[0],t[0])},{i:u-2,x:me(n[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}function We(n,t,r,e){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),e.push({i:r.push(Fe(r)+"rotate(",null,")")-2,x:me(n,t)})):t&&r.push(Fe(r)+"rotate("+t+")")}function Be(n,t,r,e){n!==t?e.push({i:r.push(Fe(r)+"skewX(",null,")")-2,x:me(n,t)}):t&&r.push(Fe(r)+"skewX("+t+")")}function Ye(n,t,r,e){if(n[0]!==t[0]||n[1]!==t[1]){var u=r.push(Fe(r)+"scale(",null,",",null,")");e.push({i:u-4,x:me(n[0],t[0])},{i:u-2,x:me(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(Fe(r)+"scale("+t+")")}function Ze(n,t){var r=[],e=[];return n=oa.transform(n),t=oa.transform(t),He(n.translate,t.translate,r,e),We(n.rotate,t.rotate,r,e),Be(n.skew,t.skew,r,e),Ye(n.scale,t.scale,r,e),n=t=null,function(n){for(var t,u=-1,i=e.length;++u<i;)r[(t=e[u]).i]=t.x(n);return r.join("")}}function Ve(n,t){return t=(t-=n=+n)||1/t,function(r){return(r-n)/t}}function Xe(n,t){return t=(t-=n=+n)||1/t,function(r){return Math.max(0,Math.min(1,(r-n)/t))}}function Ke(n){for(var t=n.source,r=n.target,e=Qe(t,r),u=[t];t!==e;)t=t.parent,u.push(t);for(var i=u.length;r!==e;)u.splice(i,0,r),r=r.parent;return u}function Je(n){for(var t=[],r=n.parent;null!=r;)t.push(n),n=r,r=r.parent;return t.push(n),t}function Qe(n,t){if(n===t)return n;for(var r=Je(n),e=Je(t),u=r.pop(),i=e.pop(),a=null;u===i;)a=u,u=r.pop(),i=e.pop();return a}function Ge(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ru(n){n.fixed&=-5}function eu(n,t,r){var e=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,c=-1;++c<o;)i=a[c],null!=i&&(eu(i,t,r),n.charge+=i.charge,e+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*r[n.point.index];n.charge+=n.pointCharge=l,e+=l*n.point.x,u+=l*n.point.y}n.cx=e/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var r=[n];null!=(n=r.pop());)if(t(n),(u=n.children)&&(e=u.length))for(var e,u;--e>=0;)r.push(u[e])}function au(n,t){for(var r=[n],e=[];null!=(n=r.pop());)if(e.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)r.push(i[a]);for(;null!=(n=e.pop());)t(n)}function ou(n){return n.children}function cu(n){return n.value}function lu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function pu(n,t,r){n.y0=t,n.y=r}function gu(n){return oa.range(n.length)}function vu(n){for(var t=-1,r=n[0].length,e=[];++t<r;)e[t]=0;return e}function du(n){for(var t,r=1,e=0,u=n[0][1],i=n.length;i>r;++r)(t=n[r][1])>u&&(e=r,u=t);return e}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function _u(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var r=-1,e=+n[0],u=(n[1]-e)/t,i=[];++r<=t;)i[r]=u*r+e;return i}function Mu(n){return[oa.min(n),oa.max(n)]}function bu(n,t){return n.value-t.value}function wu(n,t){var r=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=r,r._pack_prev=t}function ku(n,t){n._pack_next=t,t._pack_prev=n}function Cu(n,t){var r=t.x-n.x,e=t.y-n.y,u=n.r+t.r;return.999*u*u>r*r+e*e}function Au(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((r=n.children)&&(l=r.length)){var r,e,u,i,a,o,c,l,s=1/0,f=-(1/0),h=1/0,p=-(1/0);if(r.forEach(Su),e=r[0],e.x=-e.r,e.y=0,t(e),l>1&&(u=r[1],u.x=u.r,u.y=0,t(u),l>2))for(i=r[2],$u(e,u,i),t(i),wu(e,i),e._pack_prev=i,wu(i,u),u=e._pack_next,a=3;l>a;a++){$u(e,u,i=r[a]);var g=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(Cu(o,i)){g=1;break}if(1==g)for(c=e._pack_prev;c!==o._pack_prev&&!Cu(c,i);c=c._pack_prev,d++);g?(d>v||v==d&&u.r<e.r?ku(e,u=o):ku(e=c,u),a--):(wu(e,i),u=i,t(i))}var m=(s+f)/2,y=(h+p)/2,_=0;for(a=0;l>a;a++)i=r[a],i.x-=m,i.y-=y,_=Math.max(_,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=_,r.forEach(Eu)}}function Su(n){n._pack_next=n._pack_prev=n}function Eu(n){delete n._pack_next,delete n._pack_prev}function Nu(n,t,r,e){var u=n.children;if(n.x=t+=e*n.x,n.y=r+=e*n.y,n.r*=e,u)for(var i=-1,a=u.length;++i<a;)Nu(u[i],t,r,e)}function $u(n,t,r){var e=n.r+r.r,u=t.x-n.x,i=t.y-n.y;if(e&&(u||i)){var a=t.r+r.r,o=u*u+i*i;a*=a,e*=e;var c=.5+(e-a)/(2*o),l=Math.sqrt(Math.max(0,2*a*(e+o)-(e-=o)*e-a*a))/(2*o);r.x=n.x+c*u+l*i,r.y=n.y+c*i-l*u}else r.x=n.x+e,r.y=n.y}function ju(n,t){return n.parent==t.parent?1:2}function Du(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,r=n.children;return(t=r.length)?r[t-1]:n.t}function Lu(n,t,r){var e=r/(t.i-n.i);t.c-=e,t.s+=r,n.c+=e,t.z+=r,t.m+=r}function Ru(n){for(var t,r=0,e=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=r,t.m+=r,r+=t.s+(e+=t.c)}function Ou(n,t,r){return n.a.parent===t.parent?n.a:r}function zu(n){return 1+oa.max(n,function(n){return n.y})}function qu(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Iu(n){var t=n.children;return t&&t.length?Iu(t[0]):n}function Pu(n){var t,r=n.children;return r&&(t=r.length)?Pu(r[t-1]):n}function Uu(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Fu(n,t){var r=n.x+t[3],e=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(r+=u/2,u=0),0>i&&(e+=i/2,i=0),{x:r,y:e,dx:u,dy:i}}function Hu(n){var t=n[0],r=n[n.length-1];return r>t?[t,r]:[r,t]}function Wu(n){return n.rangeExtent?n.rangeExtent():Hu(n.range())}function Bu(n,t,r,e){var u=r(n[0],n[1]),i=e(t[0],t[1]);return function(n){return i(u(n))}}function Yu(n,t){var r,e=0,u=n.length-1,i=n[e],a=n[u];return i>a&&(r=e,e=u,u=r,r=i,i=a,a=r),n[e]=t.floor(i),n[u]=t.ceil(a),n}function Zu(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:wc}function Vu(n,t,r,e){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(r(n[a-1],n[a])),i.push(e(t[a-1],t[a]));return function(t){var r=oa.bisect(n,t,1,o)-1;return i[r](u[r](t))}}function Xu(n,t,r,e){function u(){var u=Math.min(n.length,t.length)>2?Vu:Bu,c=e?Xe:Ve;return a=u(n,t,c,r),o=u(t,n,c,_e),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(ze)},i.clamp=function(n){return arguments.length?(e=n,u()):e},i.interpolate=function(n){return arguments.length?(r=n,u()):r},i.ticks=function(t){return Gu(n,t)},i.tickFormat=function(t,r){return ni(n,t,r)},i.nice=function(t){return Ju(n,t),u()},i.copy=function(){return Xu(n,t,r,e)},u()}function Ku(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Ju(n,t){return Yu(n,Zu(Qu(n,t)[2])),Yu(n,Zu(Qu(n,t)[2])),n}function Qu(n,t){null==t&&(t=10);var r=Hu(n),e=r[1]-r[0],u=Math.pow(10,Math.floor(Math.log(e/t)/Math.LN10)),i=t/e*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),r[0]=Math.ceil(r[0]/u)*u,r[1]=Math.floor(r[1]/u)*u+.5*u,r[2]=u,r}function Gu(n,t){return oa.range.apply(oa,Qu(n,t))}function ni(n,t,r){var e=Qu(n,t);if(r){var u=so.exec(r);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(_a(e[0]),_a(e[1])));return u[7]||(u[7]="."+ti(i.scale(e[2]))),u[8]="f",r=oa.format(u.join("")),function(n){return r(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ri(u[8],e)),r=u.join("")}else r=",."+ti(e[2])+"f";return oa.format(r)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ri(n,t){var r=ti(t[2]);return n in kc?Math.abs(r-ti(Math.max(_a(t[0]),_a(t[1]))))+ +("e"!==n):r-2*("%"===n)}function ei(n,t,r,e){function u(n){return(r?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return r?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((e=t.map(Number)).map(u)),a):e},a.base=function(r){return arguments.length?(t=+r,n.domain(e.map(u)),a):t},a.nice=function(){var t=Yu(e.map(u),r?Math:Ac);return n.domain(t),e=t.map(i),a},a.ticks=function(){var n=Hu(e),a=[],o=n[0],c=n[1],l=Math.floor(u(o)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(r){for(;s>l;l++)for(var h=1;f>h;h++)a.push(i(l)*h);a.push(i(l))}else for(a.push(i(l));l++<s;)for(var h=f-1;h>0;h--)a.push(i(l)*h);for(l=0;a[l]<o;l++);for(s=a.length;a[s-1]>c;s--);a=a.slice(l,s)}return a},a.tickFormat=function(n,r){if(!arguments.length)return Cc;arguments.length<2?r=Cc:"function"!=typeof r&&(r=oa.format(r));var e=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),e>=a?r(n):""}},a.copy=function(){return ei(n.copy(),t,r,e)},Ku(a,n)}function ui(n,t,r){function e(t){return n(u(t))}var u=ii(t),i=ii(1/t);return e.invert=function(t){return i(n.invert(t))},e.domain=function(t){return arguments.length?(n.domain((r=t.map(Number)).map(u)),e):r},e.ticks=function(n){return Gu(r,n)},e.tickFormat=function(n,t){return ni(r,n,t)},e.nice=function(n){return e.domain(Ju(r,n))},e.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(r.map(u)),e):t},e.copy=function(){return ui(n.copy(),t,r)},Ku(e,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function r(r){return i[((u.get(r)||("range"===t.t?u.set(r,n.push(r)):NaN))-1)%i.length]}function e(t,r){return oa.range(n.length).map(function(n){return t+r*n})}var u,i,a;return r.domain=function(e){if(!arguments.length)return n;n=[],u=new l;for(var i,a=-1,o=e.length;++a<o;)u.has(i=e[a])||u.set(i,n.push(i));return r[t.t].apply(r,t.a)},r.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},r):i},r.rangePoints=function(u,o){arguments.length<2&&(o=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+o);return i=e(c+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},r},r.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):(l-c)/(n.length-1+o)|0;return i=e(c+Math.round(s*o/2+(l-c-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},r},r.rangeBands=function(u,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-o+2*c);return i=e(s+h*c,h),l&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},r},r.rangeRoundBands=function(u,o,c){arguments.length<2&&(o=0),arguments.length<3&&(c=o);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-o+2*c));return i=e(s+Math.round((f-s-(n.length-o)*h)/2),h),l&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},r},r.rangeBand=function(){return a},r.rangeExtent=function(){return Hu(t.a[0])},r.copy=function(){return ai(n,t)},r.domain(n)}function oi(n,t){function i(){var r=0,e=t.length;for(o=[];++r<e;)o[r-1]=oa.quantile(n,r/e);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(e).filter(u).sort(r),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(r){return r=t.indexOf(r),0>r?[NaN,NaN]:[r>0?o[r-1]:n[0],r<o.length?o[r]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function ci(n,t,r){function e(t){return r[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=r.length/(t-n),a=r.length-1,e}var i,a;return e.domain=function(r){return arguments.length?(n=+r[0],t=+r[r.length-1],u()):[n,t]},e.range=function(n){return arguments.length?(r=n,u()):r},e.invertExtent=function(t){return t=r.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},e.copy=function(){return ci(n,t,r)},u()}function li(n,t){function r(r){return r>=r?t[oa.bisect(n,r)]:void 0}return r.domain=function(t){return arguments.length?(n=t,r):n},r.range=function(n){return arguments.length?(t=n,r):t},r.invertExtent=function(r){return r=t.indexOf(r),[n[r-1],n[r]]},r.copy=function(){return li(n,t)},r}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(n=r.map(t),t):n},t.ticks=function(t){return Gu(n,t)},t.tickFormat=function(t,r){return ni(n,t,r)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function pi(n){return n.outerRadius}function gi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,r,e){return(n-r)*t-(t-e)*n>0?0:1}function yi(n,t,r,e,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?e:-e)/Math.sqrt(i*i+a*a),c=o*a,l=-o*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,p=t[1]+l,g=(s+h)/2,v=(f+p)/2,d=h-s,m=p-f,y=d*d+m*m,_=r-e,x=s*p-h*f,M=(0>m?-1:1)*Math.sqrt(Math.max(0,_*_*y-x*x)),b=(x*m-d*M)/y,w=(-x*d-m*M)/y,k=(x*m+d*M)/y,C=(-x*d+m*M)/y,A=b-g,S=w-v,E=k-g,N=C-v;return A*A+S*S>E*E+N*N&&(b=k,w=C),[[b-c,w-l],[b*r/_,w*r/_]]}function _i(n){function t(t){function a(){l.push("M",i(n(s),o))}for(var c,l=[],s=[],f=-1,h=t.length,p=Sn(r),g=Sn(e);++f<h;)u.call(this,c=t[f],f)?s.push([+p.call(this,c,f),+g.call(this,c,f)]):s.length&&(a(),s=[]);return s.length&&a(),l.length?l.join(""):null}var r=Nr,e=$r,u=$t,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(e=n,t):e},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Dc.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function Mi(n){return n.join("L")+"Z"}function bi(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("H",(e[0]+(e=n[t])[0])/2,"V",e[1]);return r>1&&u.push("H",e[0]),u.join("")}function wi(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("V",(e=n[t])[1],"H",e[0]);return u.join("")}function ki(n){for(var t=0,r=n.length,e=n[0],u=[e[0],",",e[1]];++t<r;)u.push("H",(e=n[t])[0],"V",e[1]);return u.join("")}function Ci(n,t){return n.length<4?xi(n):n[1]+Ei(n.slice(1,-1),Ni(n,t))}function Ai(n,t){return n.length<3?Mi(n):n[0]+Ei((n.push(n[0]),n),Ni([n[n.length-2]].concat(n,[n[1]]),t))}function Si(n,t){return n.length<3?xi(n):n[0]+Ei(n,Ni(n,t))}function Ei(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var r=n.length!=t.length,e="",u=n[0],i=n[1],a=t[0],o=a,c=1;if(r&&(e+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){o=t[1],i=n[c],c++,e+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],o=t[l],e+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(r){var s=n[c];e+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return e}function Ni(n,t){for(var r,e=[],u=(1-t)/2,i=n[0],a=n[1],o=1,c=n.length;++o<c;)r=i,i=a,a=n[o],e.push([u*(a[0]-r[0]),u*(a[1]-r[1])]);return e}function $i(n){if(n.length<3)return xi(n);var t=1,r=n.length,e=n[0],u=e[0],i=e[1],a=[u,u,u,(e=n[1])[0]],o=[i,i,i,e[1]],c=[u,",",i,"L",Li(Rc,a),",",Li(Rc,o)];for(n.push(n[r-1]);++t<=r;)e=n[t],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ri(c,a,o);return n.pop(),c.push("L",e),c.join("")}function ji(n){if(n.length<4)return xi(n);for(var t,r=[],e=-1,u=n.length,i=[0],a=[0];++e<3;)t=n[e],i.push(t[0]),a.push(t[1]);for(r.push(Li(Rc,i)+","+Li(Rc,a)),--e;++e<u;)t=n[e],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Ri(r,i,a);return r.join("")}function Di(n){for(var t,r,e=-1,u=n.length,i=u+4,a=[],o=[];++e<4;)r=n[e%u],a.push(r[0]),o.push(r[1]);for(t=[Li(Rc,a),",",Li(Rc,o)],--e;++e<i;)r=n[e%u],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Ri(t,a,o);return t.join("")}function Ti(n,t){var r=n.length-1;if(r)for(var e,u,i=n[0][0],a=n[0][1],o=n[r][0]-i,c=n[r][1]-a,l=-1;++l<=r;)e=n[l],u=l/r,e[0]=t*e[0]+(1-t)*(i+u*o),e[1]=t*e[1]+(1-t)*(a+u*c);return $i(n)}function Li(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Ri(n,t,r){n.push("C",Li(Tc,t),",",Li(Tc,r),",",Li(Lc,t),",",Li(Lc,r),",",Li(Rc,t),",",Li(Rc,r))}function Oi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function zi(n){for(var t=0,r=n.length-1,e=[],u=n[0],i=n[1],a=e[0]=Oi(u,i);++t<r;)e[t]=(a+(a=Oi(u=i,i=n[t+1])))/2;return e[t]=a,e}function qi(n){for(var t,r,e,u,i=[],a=zi(n),o=-1,c=n.length-1;++o<c;)t=Oi(n[o],n[o+1]),_a(t)<Ra?a[o]=a[o+1]=0:(r=a[o]/t,e=a[o+1]/t,u=r*r+e*e,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*r,a[o+1]=u*e));for(o=-1;++o<=c;)u=(n[Math.min(c,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Ii(n){return n.length<3?xi(n):n[0]+Ei(n,qi(n))}function Pi(n){for(var t,r,e,u=-1,i=n.length;++u<i;)t=n[u],r=t[0],e=t[1]-Pa,t[0]=r*Math.cos(e),t[1]=r*Math.sin(e);return n}function Ui(n){function t(t){function c(){v.push("M",o(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,p,g,v=[],d=[],m=[],y=-1,_=t.length,x=Sn(r),M=Sn(u),b=r===e?function(){
+return p}:Sn(e),w=u===i?function(){return g}:Sn(i);++y<_;)a.call(this,h=t[y],y)?(d.push([p=+x.call(this,h,y),g=+M.call(this,h,y)]),m.push([+b.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var r=Nr,e=Nr,u=0,i=$r,a=$t,o=xi,c=o.key,l=o,s="L",f=.7;return t.x=function(n){return arguments.length?(r=e=n,t):e},t.x0=function(n){return arguments.length?(r=n,t):r},t.x1=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?o=n:(o=Dc.get(n)||xi).key,l=o.reverse||o,s=o.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Fi(n){return n.radius}function Hi(n){return[n.x,n.y]}function Wi(n){return function(){var t=n.apply(this,arguments),r=t[0],e=t[1]-Pa;return[r*Math.cos(e),r*Math.sin(e)]}}function Bi(){return 64}function Yi(){return"circle"}function Zi(n){var t=Math.sqrt(n/za);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Vi(n){return function(){var t,r,e;(t=this[n])&&(e=t[r=t.active])&&(e.timer.c=null,e.timer.t=NaN,--t.count?delete t[r]:delete this[n],t.active+=.5,e.event&&e.event.interrupt.call(this,this.__data__,e.index))}}function Xi(n,t,r){return ka(n,Fc),n.namespace=t,n.id=r,n}function Ki(n,t,r,e){var u=n.id,i=n.namespace;return H(n,"function"==typeof r?function(n,a,o){n[i][u].tween.set(t,e(r.call(n,n.__data__,a,o)))}:(r=e(r),function(n){n[i][u].tween.set(t,r)}))}function Ji(n){return null==n&&(n=""),function(){this.textContent=n}}function Qi(n){return null==n?"__transition__":"__transition_"+n+"__"}function Gi(n,t,r,e,u){function i(n){var t=v.delay;return s.t=t+c,n>=t?a(n-t):void(s.c=a)}function a(r){var u=g.active,i=g[u];i&&(i.timer.c=null,i.timer.t=NaN,--g.count,delete g[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in g)if(e>+a){var l=g[a];l.timer.c=null,l.timer.t=NaN,--g.count,delete g[a]}s.c=o,Dn(function(){return s.c&&o(r||1)&&(s.c=null,s.t=NaN),1},0,c),g.active=e,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(r,e){(e=e.call(n,n.__data__,t))&&p.push(e)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=p.length;o>0;)p[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[e]:delete n[r],1):void 0}var c,s,f,h,p,g=n[r]||(n[r]={active:0,count:0}),v=g[e];v||(c=u.time,s=Dn(i,0,c),v=g[e]={tween:new l,time:c,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++g.count)}function na(n,t,r){n.attr("transform",function(n){var e=t(n);return"translate("+(isFinite(e)?e:r(n))+",0)"})}function ta(n,t,r){n.attr("transform",function(n){var e=t(n);return"translate(0,"+(isFinite(e)?e:r(n))+")"})}function ra(n){return n.toISOString()}function ea(n,t,r){function e(t){return n(t)}function u(n,r){var e=n[1]-n[0],u=e/r,i=oa.bisect(Jc,u);return i==Jc.length?[t.year,Qu(n.map(function(n){return n/31536e6}),r)[2]]:i?t[u/Jc[i-1]<Jc[i]/u?i-1:i]:[nl,Qu(n,r)[2]]}return e.invert=function(t){return ua(n.invert(t))},e.domain=function(t){return arguments.length?(n.domain(t),e):n.domain().map(ua)},e.nice=function(n,t){function r(r){return!isNaN(r)&&!n.range(r,ua(+r+1),t).length}var i=e.domain(),a=Hu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),e.domain(Yu(i,t>1?{floor:function(t){for(;r(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;r(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},e.ticks=function(n,t){var r=Hu(e.domain()),i=null==n?u(r,10):"number"==typeof n?u(r,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(r[0],ua(+r[1]+1),1>t?1:t)},e.tickFormat=function(){return r},e.copy=function(){return ea(n.copy(),t,r)},Ku(e,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.15"},ca=[].slice,la=function(n){return ca.call(n)},sa=this.document;if(sa)try{la(sa.documentElement.childNodes)[0].nodeType}catch(fa){la=function(n){for(var t=n.length,r=new Array(t);t--;)r[t]=n[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var pa=this.Element.prototype,ga=pa.setAttribute,va=pa.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;pa.setAttribute=function(n,t){ga.call(this,n,t+"")},pa.setAttributeNS=function(n,t,r){va.call(this,n,t,r+"")},da.setProperty=function(n,t,r){ma.call(this,n,t+"",r)}}oa.ascending=r,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var r,e,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(e=n[u])&&e>=e){r=e;break}for(;++u<i;)null!=(e=n[u])&&r>e&&(r=e)}else{for(;++u<i;)if(null!=(e=t.call(n,n[u],u))&&e>=e){r=e;break}for(;++u<i;)null!=(e=t.call(n,n[u],u))&&r>e&&(r=e)}return r},oa.max=function(n,t){var r,e,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(e=n[u])&&e>=e){r=e;break}for(;++u<i;)null!=(e=n[u])&&e>r&&(r=e)}else{for(;++u<i;)if(null!=(e=t.call(n,n[u],u))&&e>=e){r=e;break}for(;++u<i;)null!=(e=t.call(n,n[u],u))&&e>r&&(r=e)}return r},oa.extent=function(n,t){var r,e,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(e=n[i])&&e>=e){r=u=e;break}for(;++i<a;)null!=(e=n[i])&&(r>e&&(r=e),e>u&&(u=e))}else{for(;++i<a;)if(null!=(e=t.call(n,n[i],i))&&e>=e){r=u=e;break}for(;++i<a;)null!=(e=t.call(n,n[i],i))&&(r>e&&(r=e),e>u&&(u=e))}return[r,u]},oa.sum=function(n,t){var r,e=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(r=+n[a])&&(e+=r);else for(;++a<i;)u(r=+t.call(n,n[a],a))&&(e+=r);return e},oa.mean=function(n,t){var r,i=0,a=n.length,o=-1,c=a;if(1===arguments.length)for(;++o<a;)u(r=e(n[o]))?i+=r:--c;else for(;++o<a;)u(r=e(t.call(n,n[o],o)))?i+=r:--c;return c?i/c:void 0},oa.quantile=function(n,t){var r=(n.length-1)*t+1,e=Math.floor(r),u=+n[e-1],i=r-e;return i?u+i*(n[e]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,c=-1;if(1===arguments.length)for(;++c<o;)u(i=e(n[c]))&&a.push(i);else for(;++c<o;)u(i=e(t.call(n,n[c],c)))&&a.push(i);return a.length?oa.quantile(a.sort(r),.5):void 0},oa.variance=function(n,t){var r,i,a=n.length,o=0,c=0,l=-1,s=0;if(1===arguments.length)for(;++l<a;)u(r=e(n[l]))&&(i=r-o,o+=i/++s,c+=i*(r-o));else for(;++l<a;)u(r=e(t.call(n,n[l],l)))&&(i=r-o,o+=i/++s,c+=i*(r-o));return s>1?c/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(r);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,e){return r(n(t),e)}:n)},oa.shuffle=function(n,t,r){(i=arguments.length)<3&&(r=n.length,2>i&&(t=0));for(var e,u,i=r-t;i;)u=Math.random()*i--|0,e=n[i+t],n[i+t]=n[u+t],n[u+t]=e;return n},oa.permute=function(n,t){for(var r=t.length,e=new Array(r);r--;)e[r]=n[t[r]];return e},oa.pairs=function(n){for(var t,r=0,e=n.length-1,u=n[0],i=new Array(0>e?0:e);e>r;)i[r]=[t=u,u=n[++r]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,r=oa.min(n,a),e=new Array(r);++t<r;)for(var u,i=-1,o=e[t]=new Array(u);++i<u;)o[i]=n[i][t];return e},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var r in n)t.push(r);return t},oa.values=function(n){var t=[];for(var r in n)t.push(n[r]);return t},oa.entries=function(n){var t=[];for(var r in n)t.push({key:r,value:n[r]});return t},oa.merge=function(n){for(var t,r,e,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(r=new Array(a);--u>=0;)for(e=n[u],t=e.length;--t>=0;)r[--a]=e[t];return r};var _a=Math.abs;oa.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),(t-n)/r===1/0)throw new Error("infinite range");var e,u=[],i=o(_a(r)),a=-1;if(n*=i,t*=i,r*=i,0>r)for(;(e=n+r*++a)>t;)u.push(e/i);else for(;(e=n+r*++a)<t;)u.push(e/i);return u},oa.map=function(n,t){var r=new l;if(n instanceof l)n.forEach(function(n,t){r.set(n,t)});else if(Array.isArray(n)){var e,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)r.set(u,n[u]);else for(;++u<i;)r.set(t.call(n,e=n[u],u),e)}else for(var a in n)r.set(a,n[a]);return r};var xa="__proto__",Ma="\x00";c(l,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:p,keys:g,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return e?e.call(u,a):r?a.sort(r):a;for(var c,s,f,h,p=-1,g=a.length,v=i[o++],d=new l;++p<g;)(h=d.get(c=v(s=a[p])))?h.push(s):d.set(c,[s]);return t?(s=t(),f=function(r,e){s.set(r,n(t,e,o))}):(s={},f=function(r,e){s[r]=n(t,e,o)}),d.forEach(f),s}function t(n,r){if(r>=i.length)return n;var e=[],u=a[r++];return n.forEach(function(n,u){e.push({key:n,values:t(u,r)})}),u?e.sort(function(n,t){return u(n.key,t.key)}):e}var r,e,u={},i=[],a=[];return u.map=function(t,r){return n(r,t,0)},u.entries=function(r){return t(n(oa.map,r,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return r=n,u},u.rollup=function(n){return e=n,u},u},oa.set=function(n){var t=new m;if(n)for(var r=0,e=n.length;e>r;++r)t.add(n[r]);return t},c(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var r,e=1,u=arguments.length;++e<u;)n[r=arguments[e]]=_(n,t,t[r]);return n};var ba=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new b,t=-1,r=arguments.length;++t<r;)n[arguments[t]]=w(n);return n},b.prototype.on=function(n,t){var r=n.indexOf("."),e="";if(r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),n)return arguments.length<2?this[n].on(e):this[n].on(e,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(e,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\$&")};var wa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ka={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var r in t)n[r]=t[r]},Ca=function(n,t){return t.querySelector(n)},Aa=function(n,t){return t.querySelectorAll(n)},Sa=function(n,t){var r=n.matches||n[x(n,"matchesSelector")];return(Sa=function(n,t){return r.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Ca=function(n,t){return Sizzle(n,t)[0]||null},Aa=Sizzle,Sa=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Ea=oa.selection.prototype=[];Ea.select=function(n){var t,r,e,u,i=[];n=E(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(e=this[a]).parentNode;for(var c=-1,l=e.length;++c<l;)(u=e[c])?(t.push(r=n.call(u,u.__data__,c,a)),r&&"__data__"in u&&(r.__data__=u.__data__)):t.push(null)}return S(i)},Ea.selectAll=function(n){var t,r,e=[];n=N(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,c=a.length;++o<c;)(r=a[o])&&(e.push(t=la(n.call(r,r.__data__,o,u))),t.parentNode=r);return S(e)};var Na={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/"};oa.ns={prefix:Na,qualify:function(n){var t=n.indexOf(":"),r=n;return t>=0&&"xmlns"!==(r=n.slice(0,t))&&(n=n.slice(t+1)),Na.hasOwnProperty(r)?{space:Na[r],local:n}:n}},Ea.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var r=this.node();return n=oa.ns.qualify(n),n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}for(t in n)this.each($(t,n[t]));return this}return this.each($(n,t))},Ea.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var r=this.node(),e=(n=T(n)).length,u=-1;if(t=r.classList){for(;++u<e;)if(!t.contains(n[u]))return!1}else for(t=r.getAttribute("class");++u<e;)if(!D(n[u]).test(t))return!1;return!0}for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},Ea.style=function(n,r,e){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(r="");for(e in n)this.each(O(e,n[e],r));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}e=""}return this.each(O(n,r,e))},Ea.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Ea.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Ea.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Ea.append=function(n){return n=q(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Ea.insert=function(n,t){return n=q(n),t=E(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Ea.remove=function(){return this.each(I)},Ea.data=function(n,t){function r(n,r){var e,u,i,a=n.length,f=r.length,h=Math.min(a,f),p=new Array(f),g=new Array(f),v=new Array(a);if(t){var d,m=new l,y=new Array(a);for(e=-1;++e<a;)(u=n[e])&&(m.has(d=t.call(u,u.__data__,e))?v[e]=u:m.set(d,u),y[e]=d);for(e=-1;++e<f;)(u=m.get(d=t.call(r,i=r[e],e)))?u!==!0&&(p[e]=u,u.__data__=i):g[e]=P(i),m.set(d,!0);for(e=-1;++e<a;)e in y&&m.get(y[e])!==!0&&(v[e]=n[e])}else{for(e=-1;++e<h;)u=n[e],i=r[e],u?(u.__data__=i,p[e]=u):g[e]=P(i);for(;f>e;++e)g[e]=P(r[e]);for(;a>e;++e)v[e]=n[e]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,o.push(g),c.push(p),s.push(v)}var e,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(e=this[0]).length);++i<a;)(u=e[i])&&(n[i]=u.__data__);return n}var o=W([]),c=S([]),s=S([]);if("function"==typeof n)for(;++i<a;)r(e=this[i],n.call(e,e.parentNode.__data__,i));else for(;++i<a;)r(e=this[i],n);return c.enter=function(){return o},c.exit=function(){return s},c},Ea.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Ea.filter=function(n){var t,r,e,u=[];"function"!=typeof n&&(n=U(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var o=0,c=r.length;c>o;o++)(e=r[o])&&n.call(e,e.__data__,o,i)&&t.push(e)}return S(u)},Ea.order=function(){for(var n=-1,t=this.length;++n<t;)for(var r,e=this[n],u=e.length-1,i=e[u];--u>=0;)(r=e[u])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},Ea.sort=function(n){n=F.apply(this,arguments);for(var t=-1,r=this.length;++t<r;)this[t].sort(n);return this.order()},Ea.each=function(n){return H(this,function(t,r,e){n.call(t,t.__data__,r,e)})},Ea.call=function(n){var t=la(arguments);return n.apply(t[0]=this,t),this},Ea.empty=function(){return!this.node()},Ea.node=function(){for(var n=0,t=this.length;t>n;n++)for(var r=this[n],e=0,u=r.length;u>e;e++){var i=r[e];if(i)return i}return null},Ea.size=function(){var n=0;return H(this,function(){++n}),n};var $a=[];oa.selection.enter=W,oa.selection.enter.prototype=$a,$a.append=Ea.append,$a.empty=Ea.empty,$a.node=Ea.node,$a.call=Ea.call,$a.size=Ea.size,$a.select=function(n){for(var t,r,e,u,i,a=[],o=-1,c=this.length;++o<c;){e=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(e[l]=r=n.call(u.parentNode,i.__data__,l,o)),r.__data__=i.__data__):t.push(null)}return S(a)},$a.insert=function(n,t){return arguments.length<2&&(t=B(this)),Ea.insert.call(this,n,t)},oa.select=function(t){var r;return"string"==typeof t?(r=[Ca(t,sa)],r.parentNode=sa.documentElement):(r=[t],r.parentNode=n(t)),S([r])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=la(Aa(n,sa)),t.parentNode=sa.documentElement):(t=la(n),t.parentNode=null),S([t])},Ea.on=function(n,t,r){var e=arguments.length;if(3>e){if("string"!=typeof n){2>e&&(t=!1);for(r in n)this.each(Y(r,n[r],t));return this}if(2>e)return(e=this.node()["__on"+n])&&e._;r=!1}return this.each(Y(n,t,r))};var ja=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&ja.forEach(function(n){"on"+n in sa&&ja.remove(n)});var Da,Ta=0;oa.mouse=function(n){return K(n,C())};var La=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,r){if(arguments.length<3&&(r=t,t=C().changedTouches),t)for(var e,u=0,i=t.length;i>u;++u)if((e=t[u]).identifier===r)return K(n,e)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function r(n,t,r,i,a){return function(){function o(){var n,r,e=t(h,v);e&&(n=e[0]-_[0],r=e[1]-_[1],g|=n|r,_=e,p({type:"drag",x:e[0]+l[0],y:e[1]+l[1],dx:n,dy:r}))}function c(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(g),p({type:"dragend"}))}var l,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,p=e.of(s,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(r(f)).on(i+d,o).on(a+d,c),y=X(f),_=t(h,v);u?(l=u.apply(s,arguments),l=[l.x-_[0],l.y-_[1]]):l=[0,0],p({type:"dragstart"})}}var e=A(n,"drag","dragstart","dragend"),u=null,i=r(M,oa.mouse,t,"mousemove","mouseup"),a=r(J,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,e,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=C().touches),t?la(t).map(function(t){var r=K(n,t);return r.identifier=t.identifier,r}):[]};var Ra=1e-6,Oa=Ra*Ra,za=Math.PI,qa=2*za,Ia=qa-Ra,Pa=za/2,Ua=za/180,Fa=180/za,Ha=Math.SQRT2,Wa=2,Ba=4;oa.interpolateZoom=function(n,t){var r,e,u=n[0],i=n[1],a=n[2],o=t[0],c=t[1],l=t[2],s=o-u,f=c-i,h=s*s+f*f;if(Oa>h)e=Math.log(l/a)/Ha,r=function(n){return[u+n*s,i+n*f,a*Math.exp(Ha*n*e)]};else{var p=Math.sqrt(h),g=(l*l-a*a+Ba*h)/(2*a*Wa*p),v=(l*l-a*a-Ba*h)/(2*l*Wa*p),d=Math.log(Math.sqrt(g*g+1)-g),m=Math.log(Math.sqrt(v*v+1)-v);e=(m-d)/Ha,r=function(n){var t=n*e,r=en(d),o=a/(Wa*p)*(r*un(Ha*t+d)-rn(d));return[u+o*s,i+o*f,a*r/en(Ha*t+d)]}}return r.duration=1e3*e,r},oa.behavior.zoom=function(){function n(n){n.on(j,f).on(Za+".zoom",p).on("dblclick.zoom",g).on(L,h)}function r(n){return[(n[0]-C.x)/C.k,(n[1]-C.y)/C.k]}function e(n){return[n[0]*C.k+C.x,n[1]*C.k+C.y]}function u(n){C.k=Math.max(E[0],Math.min(E[1],n))}function i(n,t){t=e(t),C.x+=n[0]-t[0],C.y+=n[1]-t[1]}function a(t,r,e,a){t.__chart__={x:C.x,y:C.y,k:C.k},u(Math.pow(2,a)),i(d=r,e),t=oa.select(t),N>0&&(t=t.transition().duration(N)),t.call(n.event)}function o(){M&&M.domain(x.range().map(function(n){return(n-C.x)/C.k}).map(x.invert)),w&&w.domain(b.range().map(function(n){return(n-C.y)/C.k}).map(b.invert))}function c(n){$++||n({type:"zoomstart"})}function l(n){o(),n({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function s(n){--$||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),l(a)}function e(){f.on(D,null).on(T,null),p(o),s(a)}var u=this,a=R.of(u,arguments),o=0,f=oa.select(t(u)).on(D,n).on(T,e),h=r(oa.mouse(u)),p=X(u);Uc.call(u),c(a)}function h(){function n(){var n=oa.touches(g);return p=C.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=r(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,e).on(M,o),b.push(t);for(var r=oa.event.changedTouches,u=0,i=r.length;i>u;++u)d[r[u].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-_){var s=c[0];a(g,s,d[s.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),k()}_=l}else if(c.length>1){var s=c[0],f=c[1],h=s[0]-f[0],p=s[1]-f[1];m=h*h+p*p}}function e(){var n,t,r,e,a=oa.touches(g);Uc.call(g);for(var o=0,c=a.length;c>o;++o,e=null)if(r=a[o],e=d[r.identifier]){if(t)break;n=r,t=e}if(e){var s=(s=r[0]-n[0])*s+(s=r[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+r[0])/2,(n[1]+r[1])/2],t=[(t[0]+e[0])/2,(t[1]+e[1])/2],u(f*p)}_=null,i(n,t),l(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,r=0,e=t.length;e>r;++r)delete d[t[r].identifier];for(var u in d)return void n()}oa.selectAll(b).on(y,null),w.on(j,f).on(L,h),A(),s(v)}var p,g=this,v=R.of(g,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,M="touchend"+y,b=[],w=oa.select(g),A=X(g);t(),c(v),w.on(j,null).on(L,t)}function p(){var n=R.of(this,arguments);y?clearTimeout(y):(Uc.call(this),v=r(d=m||oa.mouse(this)),c(n)),y=setTimeout(function(){y=null,s(n)},50),k(),u(Math.pow(2,.002*Ya())*C.k),i(d,v),l(n)}function g(){var n=oa.mouse(this),t=Math.log(C.k)/Math.LN2;a(this,n,r(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,_,x,M,b,w,C={x:0,y:0,k:1},S=[960,500],E=Va,N=250,$=0,j="mousedown.zoom",D="mousemove.zoom",T="mouseup.zoom",L="touchstart.zoom",R=A(n,"zoomstart","zoom","zoomend");return Za||(Za="onwheel"in sa?(Ya=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?(Ya=function(){return oa.event.wheelDelta},"mousewheel"):(Ya=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=R.of(this,arguments),t=C;Ic?oa.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},c(n)}).tween("zoom:zoom",function(){var r=S[0],e=S[1],u=d?d[0]:r/2,i=d?d[1]:e/2,a=oa.interpolateZoom([(u-C.x)/C.k,(i-C.y)/C.k,r/C.k],[(u-t.x)/t.k,(i-t.y)/t.k,r/t.k]);return function(t){var e=a(t),o=r/e[2];this.__chart__=C={x:u-e[0]*o,y:i-e[1]*o,k:o},l(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=C,c(n),l(n),s(n))})},n.translate=function(t){return arguments.length?(C={x:+t[0],y:+t[1],k:C.k},o(),n):[C.x,C.y]},n.scale=function(t){return arguments.length?(C={x:C.x,y:C.y,k:null},u(+t),o(),n):C.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Va:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(S=t&&[+t[0],+t[1]],n):S},n.duration=function(t){return arguments.length?(N=+t,n):N},n.x=function(t){return arguments.length?(M=t,x=t.copy(),C={x:0,y:0,k:1},n):M},n.y=function(t){return arguments.length?(w=t,b=t.copy(),C={x:0,y:0,k:1},n):w},oa.rebind(n,R,"on")};var Ya,Za,Va=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=cn;var Xa=cn.prototype=new on;Xa.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,this.l/n)},Xa.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,n*this.l)},Xa.rgb=function(){return ln(this.h,this.s,this.l)},oa.hcl=sn;var Ka=sn.prototype=new on;Ka.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ja*(arguments.length?n:1)))},Ka.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ja*(arguments.length?n:1)))},Ka.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ja=18,Qa=.95047,Ga=1,no=1.08883,to=hn.prototype=new on;to.brighter=function(n){return new hn(Math.min(100,this.l+Ja*(arguments.length?n:1)),this.a,this.b)},to.darker=function(n){return new hn(Math.max(0,this.l-Ja*(arguments.length?n:1)),this.a,this.b)},to.rgb=function(){return pn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,r=this.g,e=this.b,u=30;return t||r||e?(t&&u>t&&(t=u),r&&u>r&&(r=u),e&&u>e&&(e=u),new yn(Math.min(255,t/n),Math.min(255,r/n),Math.min(255,e/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+Mn(this.r)+Mn(this.g)+Mn(this.b)};var eo=oa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});eo.forEach(function(n,t){eo.set(n,_n(t))}),oa.functor=Sn,oa.xhr=En(y),oa.dsv=function(n,t){function r(n,r,i){arguments.length<3&&(i=r,r=null);var a=Nn(n,t,null==r?e:u(r),i);return a.row=function(n){return arguments.length?a.response(null==(r=n)?e:u(n)):r},a}function e(n){return r.parse(n.responseText)}function u(n){return function(t){return r.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var o=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return r.parse=function(n,t){var e;return r.parseRows(n,function(n,r){if(e)return e(n,r-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");e=t?function(n,r){return t(u(n),r)}:u})},r.parseRows=function(n,t){function r(){if(s>=l)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var r=t;r++<l;)if(34===n.charCodeAt(r)){if(34!==n.charCodeAt(r+1))break;++r}s=r+2;var e=n.charCodeAt(r+1);return 13===e?(u=!0,10===n.charCodeAt(r+2)&&++s):10===e&&(u=!0),n.slice(t+1,r).replace(/""/g,'"')}for(;l>s;){var e=n.charCodeAt(s++),o=1;if(10===e)u=!0;else if(13===e)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(e!==c)continue;return n.slice(t,s-o)}return n.slice(t)}for(var e,u,i={},a={},o=[],l=n.length,s=0,f=0;(e=r())!==a;){for(var h=[];e!==i&&e!==a;)h.push(e),e=r();t&&null==(h=t(h,f++))||o.push(h)}return o},r.format=function(t){if(Array.isArray(t[0]))return r.formatRows(t);var e=new m,u=[];return t.forEach(function(n){for(var t in n)e.has(t)||u.push(e.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\n")},r.formatRows=function(n){return n.map(i).join("\n")},r},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("	","text/tab-separated-values");var uo,io,ao,oo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){Dn.apply(this,arguments)},oa.timer.flush=function(){Ln(),Rn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var lo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(zn);oa.formatPrefix=function(n,t){var r=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,On(n,t))),r=1+Math.floor(1e-12+Math.log(n)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),lo[8+r/3]};var so=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fo=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,On(n,t))).toFixed(Math.max(0,Math.min(20,On(n*(1+1e-15),t))))}}),ho=oa.time={},po=Date;Pn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){go.setUTCDate.apply(this._,arguments)},setDay:function(){go.setUTCDay.apply(this._,arguments)},setFullYear:function(){go.setUTCFullYear.apply(this._,arguments)},setHours:function(){go.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){go.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){go.setUTCMinutes.apply(this._,arguments)},setMonth:function(){go.setUTCMonth.apply(this._,arguments)},setSeconds:function(){go.setUTCSeconds.apply(this._,arguments)},setTime:function(){go.setTime.apply(this._,arguments)}};var go=Date.prototype;ho.year=Un(function(n){return n=ho.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ho.years=ho.year.range,ho.years.utc=ho.year.utc.range,ho.day=Un(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ho.days=ho.day.range,ho.days.utc=ho.day.utc.range,ho.dayOfYear=function(n){var t=ho.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var r=ho[n]=Un(function(n){return(n=ho.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var r=ho.year(n).getDay();return Math.floor((ho.dayOfYear(n)+(r+t)%7)/7)-(r!==t)});ho[n+"s"]=r.range,ho[n+"s"].utc=r.utc.range,ho[n+"OfYear"]=function(n){var r=ho.year(n).getDay();return Math.floor((ho.dayOfYear(n)+(r+t)%7)/7)}}),ho.week=ho.sunday,ho.weeks=ho.sunday.range,ho.weeks.utc=ho.sunday.utc.range,ho.weekOfYear=ho.sundayOfYear;var vo={"-":"",_:" ",0:"0"},mo=/^\s*\d+/,yo=/^%/;oa.locale=function(n){return{numberFormat:qn(n),timeFormat:Hn(n)}};var _o=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
+shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=_o.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,xo),ft(xo.s,this.s,this),this.s?this.t+=xo.t:this.s=xo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xo=new st;oa.geo.stream=function(n,t){n&&Mo.hasOwnProperty(n.type)?Mo[n.type](n,t):ht(n,t)};var Mo={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,u=r.length;++e<u;)ht(r[e].geometry,t)}},bo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)n=r[e],t.point(n[0],n[1],n[2])},LineString:function(n,t){pt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)pt(r[e],t,0)},Polygon:function(n,t){gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,e=-1,u=r.length;++e<u;)gt(r[e],t)},GeometryCollection:function(n,t){for(var r=n.geometries,e=-1,u=r.length;++e<u;)ht(r[e],t)}};oa.geo.area=function(n){return wo=0,oa.geo.stream(n,Co),wo};var wo,ko=new st,Co={sphere:function(){wo+=4*za},point:M,lineStart:M,lineEnd:M,polygonStart:function(){ko.reset(),Co.lineStart=vt},polygonEnd:function(){var n=2*ko;wo+=0>n?4*za+n:n,Co.lineStart=Co.lineEnd=Co.point=M}};oa.geo.bounds=function(){function n(n,t){_.push(x=[s=n,h=n]),f>t&&(f=t),t>p&&(p=t)}function t(t,r){var e=dt([t*Ua,r*Ua]);if(m){var u=yt(m,e),i=[u[1],-u[0],0],a=yt(i,u);Mt(a),a=bt(a);var c=t-g,l=c>0?1:-1,v=a[0]*Fa*l,d=_a(c)>180;if(d^(v>l*g&&l*t>v)){var y=a[1]*Fa;y>p&&(p=y)}else if(v=(v+360)%360-180,d^(v>l*g&&l*t>v)){var y=-a[1]*Fa;f>y&&(f=y)}else f>r&&(f=r),r>p&&(p=r);d?g>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>g?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,r);m=e,g=t}function r(){M.point=t}function e(){x[0]=s,x[1]=h,M.point=n,m=null}function u(n,r){if(m){var e=n-g;y+=_a(e)>180?e+(e>0?360:-360):e}else v=n,d=r;Co.point(n,r),t(n,r)}function i(){Co.lineStart()}function a(){u(v,d),Co.lineEnd(),_a(y)>Ra&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,p,g,v,d,m,y,_,x,M={point:n,lineStart:r,lineEnd:e,polygonStart:function(){M.point=u,M.lineStart=i,M.lineEnd=a,y=0,Co.polygonStart()},polygonEnd:function(){Co.polygonEnd(),M.point=n,M.lineStart=r,M.lineEnd=e,0>ko?(s=-(h=180),f=-(p=90)):y>Ra?p=90:-Ra>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){p=h=-(s=f=1/0),_=[],oa.geo.stream(n,M);var t=_.length;if(t){_.sort(c);for(var r,e=1,u=_[0],i=[u];t>e;++e)r=_[e],l(r[0],u)||l(r[1],u)?(o(u[0],r[1])>o(u[0],u[1])&&(u[1]=r[1]),o(r[0],u[1])>o(u[0],u[1])&&(u[0]=r[0])):i.push(u=r);for(var a,r,g=-(1/0),t=i.length-1,e=0,u=i[t];t>=e;u=r,++e)r=i[e],(a=o(u[1],r[0]))>g&&(g=a,s=r[0],h=u[1])}return _=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,p]]}}(),oa.geo.centroid=function(n){Ao=So=Eo=No=$o=jo=Do=To=Lo=Ro=Oo=0,oa.geo.stream(n,zo);var t=Lo,r=Ro,e=Oo,u=t*t+r*r+e*e;return Oa>u&&(t=jo,r=Do,e=To,Ra>So&&(t=Eo,r=No,e=$o),u=t*t+r*r+e*e,Oa>u)?[NaN,NaN]:[Math.atan2(r,t)*Fa,tn(e/Math.sqrt(u))*Fa]};var Ao,So,Eo,No,$o,jo,Do,To,Lo,Ro,Oo,zo={sphere:M,point:kt,lineStart:At,lineEnd:St,polygonStart:function(){zo.lineStart=Et},polygonEnd:function(){zo.lineStart=At}},qo=Lt($t,qt,Pt,[-za,-za/2]),Io=1e9;oa.geo.clipExtent=function(){var n,t,r,e,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Wt(n=+o[0][0],t=+o[0][1],r=+o[1][0],e=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[r,e]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Bt(Yt)}).raw=Yt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,r(i,a),t||(e(i,a),t)||u(i,a),t}var t,r,e,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,r){t=[n,r]}};return n.invert=function(n){var t=i.scale(),r=i.translate(),e=(n[0]-r[0])/t,u=(n[1]-r[1])/t;return(u>=.12&&.234>u&&e>=-.425&&-.214>e?a:u>=.166&&.234>u&&e>=-.214&&-.115>e?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),r=a.stream(n),e=o.stream(n);return{point:function(n,u){t.point(n,u),r.point(n,u),e.point(n,u)},sphere:function(){t.sphere(),r.sphere(),e.sphere()},lineStart:function(){t.lineStart(),r.lineStart(),e.lineStart()},lineEnd:function(){t.lineEnd(),r.lineEnd(),e.lineEnd()},polygonStart:function(){t.polygonStart(),r.polygonStart(),e.polygonStart()},polygonEnd:function(){t.polygonEnd(),r.polygonEnd(),e.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return r=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,e=a.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ra,f+.12*l+Ra],[s-.214*l-Ra,f+.234*l-Ra]]).stream(c).point,u=o.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ra,f+.166*l+Ra],[s-.115*l-Ra,f+.234*l-Ra]]).stream(c).point,n},n.scale(1070)};var Po,Uo,Fo,Ho,Wo,Bo,Yo={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Uo=0,Yo.lineStart=Zt},polygonEnd:function(){Yo.lineStart=Yo.lineEnd=Yo.point=M,Po+=_a(Uo/2)}},Zo={point:Vt,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Vo={point:Jt,lineStart:Qt,lineEnd:Gt,polygonStart:function(){Vo.lineStart=nr},polygonEnd:function(){Vo.point=Jt,Vo.lineStart=Qt,Vo.lineEnd=Gt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var r,e,u,i,a,o=4.5;return n.area=function(n){return Po=0,oa.geo.stream(n,u(Yo)),Po},n.centroid=function(n){return Eo=No=$o=jo=Do=To=Lo=Ro=Oo=0,oa.geo.stream(n,u(Vo)),Oo?[Lo/Oo,Ro/Oo]:To?[jo/To,Do/To]:$o?[Eo/$o,No/$o]:[NaN,NaN]},n.bounds=function(n){return Wo=Bo=-(Fo=Ho=1/0),oa.geo.stream(n,u(Zo)),[[Fo,Ho],[Wo,Bo]]},n.projection=function(n){return arguments.length?(u=(r=n)?n.stream||er(n):y,t()):r},n.context=function(n){return arguments.length?(i=null==(e=n)?new Xt:new tr(n),"function"!=typeof o&&i.pointRadius(o),t()):e},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var r=new ur(t);for(var e in n)r[e]=n[e];return r}}},ur.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ar,oa.geo.projectionMutator=or,(oa.geo.equirectangular=function(){return ar(lr)}).raw=lr.invert=lr,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ua,t[1]*Ua),t[0]*=Fa,t[1]*=Fa,t}return n=fr(n[0]%360*Ua,n[1]*Ua,n.length>2?n[2]*Ua:0),t.invert=function(t){return t=n.invert(t[0]*Ua,t[1]*Ua),t[0]*=Fa,t[1]*=Fa,t},t},sr.invert=lr,oa.geo.circle=function(){function n(){var n="function"==typeof e?e.apply(this,arguments):e,t=fr(-n[0]*Ua,-n[1]*Ua,0).invert,u=[];return r(null,null,1,{point:function(n,r){u.push(n=t(n,r)),n[0]*=Fa,n[1]*=Fa}}),{type:"Polygon",coordinates:[u]}}var t,r,e=[0,0],u=6;return n.origin=function(t){return arguments.length?(e=t,n):e},n.angle=function(e){return arguments.length?(r=vr((t=+e)*Ua,u*Ua),n):t},n.precision=function(e){return arguments.length?(r=vr(t*Ua,(u=+e)*Ua),n):u},n.angle(90)},oa.geo.distance=function(n,t){var r,e=(t[0]-n[0])*Ua,u=n[1]*Ua,i=t[1]*Ua,a=Math.sin(e),o=Math.cos(e),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((r=f*a)*r+(r=l*s-c*f*o)*r),c*s+l*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(l/m)*m,c,m).map(p)).concat(oa.range(Math.ceil(e/g)*g,r,g).filter(function(n){return _a(n%d)>Ra}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return _a(n%m)>Ra}).map(f))}var r,e,u,i,a,o,c,l,s,f,h,p,g=10,v=g,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(p(c).slice(1),h(u).reverse().slice(1),p(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(e=+t[0][0],r=+t[1][0],o=+t[0][1],a=+t[1][1],e>r&&(t=e,e=r,r=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[e,o],[r,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(y=+t,s=mr(o,a,90),f=yr(e,r,y),h=mr(l,c,90),p=yr(i,u,y),n):y},n.majorExtent([[-180,-90+Ra],[180,90-Ra]]).minorExtent([[-180,-80-Ra],[180,80+Ra]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),r||u.apply(this,arguments)]}}var t,r,e=_r,u=xr;return n.distance=function(){return oa.geo.distance(t||e.apply(this,arguments),r||u.apply(this,arguments))},n.source=function(r){return arguments.length?(e=r,t="function"==typeof r?null:r,n):e},n.target=function(t){return arguments.length?(u=t,r="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return Mr(n[0]*Ua,n[1]*Ua,t[0]*Ua,t[1]*Ua)},oa.geo.length=function(n){return Xo=0,oa.geo.stream(n,Ko),Xo};var Xo,Ko={sphere:M,point:M,lineStart:br,lineEnd:M,polygonStart:M,polygonEnd:M},Jo=wr(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ar(Jo)}).raw=Jo;var Qo=wr(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ar(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Bt(kr)}).raw=kr,(oa.geo.conicEquidistant=function(){return Bt(Cr)}).raw=Cr;var Go=wr(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ar(Go)}).raw=Go,Ar.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Pa]},(oa.geo.mercator=function(){return Sr(Ar)}).raw=Ar;var nc=wr(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ar(nc)}).raw=nc;var tc=wr(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ar(tc)}).raw=tc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Pa]},(oa.geo.transverseMercator=function(){var n=Sr(Er),t=n.center,r=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90])}).raw=Er,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Sn(r),i=Sn(e),a=n.length,o=[],c=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(Dr),t=0;a>t;t++)c.push([o[t][0],-o[t][1]]);var l=jr(o),s=jr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],p=[];for(t=l.length-1;t>=0;--t)p.push(n[o[l[t]][2]]);for(t=+f;t<s.length-h;++t)p.push(n[o[s[t]][2]]);return p}var r=Nr,e=$r;return arguments.length?t(n):(t.x=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(e=n,t):e},t)},oa.geom.polygon=function(n){return ka(n,rc),n};var rc=oa.geom.polygon.prototype=[];rc.area=function(){for(var n,t=-1,r=this.length,e=this[r-1],u=0;++t<r;)n=e,e=this[t],u+=n[1]*e[0]-n[0]*e[1];return.5*u},rc.centroid=function(n){var t,r,e=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++e<u;)t=o,o=this[e],r=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*r,a+=(t[1]+o[1])*r;return[i*n,a*n]},rc.clip=function(n){for(var t,r,e,u,i,a,o=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(e=t.length-o)-1],r=-1;++r<e;)a=t[r],Tr(a,s,u)?(Tr(i,s,u)||n.push(Lr(i,a,s,u)),n.push(a)):Tr(i,s,u)&&n.push(Lr(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ec,uc,ic,ac,oc,cc=[],lc=[];Hr.prototype.prepare=function(){for(var n,t=this.edges,r=t.length;r--;)n=t[r].edge,n.b&&n.a||t.splice(r,1);return t.sort(Br),t.length},te.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},re.prototype={insert:function(n,t){var r,e,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;r=n}else this._?(n=ae(this._),t.P=null,t.N=n,n.P=n.L=t,r=n):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,n=t;r&&r.C;)e=r.U,r===e.L?(u=e.R,u&&u.C?(r.C=u.C=!1,e.C=!0,n=e):(n===r.R&&(ue(this,r),n=r,r=n.U),r.C=!1,e.C=!0,ie(this,e))):(u=e.L,u&&u.C?(r.C=u.C=!1,e.C=!0,n=e):(n===r.L&&(ie(this,r),n=r,r=n.U),r.C=!1,e.C=!0,ue(this,e))),r=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,r,e,u=n.U,i=n.L,a=n.R;if(r=i?a?ae(a):i:a,u?u.L===n?u.L=r:u.R=r:this._=r,i&&a?(e=r.C,r.C=n.C,r.L=i,i.U=r,r!==a?(u=r.U,r.U=n.U,n=r.R,u.L=n,r.R=a,a.U=r):(r.U=u,u=r,n=r.R)):(e=n.C,n=r),n&&(n.U=u),!e){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ue(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ie(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ue(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ie(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ue(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ie(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),e=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return oe(r(n),o).cells.forEach(function(r,o){var c=r.edges,l=r.site,s=t[o]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=e&&l.x<=i&&l.y>=u&&l.y<=a?[[e,a],[i,a],[i,u],[e,u]]:[];s.point=n[o]}),t}function r(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ra)*Ra,y:Math.round(a(n,t)/Ra)*Ra,i:t}})}var e=Nr,u=$r,i=e,a=u,o=sc;return n?t(n):(t.links=function(n){return oe(r(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return oe(r(n)).cells.forEach(function(r,e){for(var u,i,a=r.site,o=r.edges.sort(Br),c=-1,l=o.length,s=o[l-1].edge,f=s.l===a?s.r:s.l;++c<l;)u=s,i=f,s=o[c].edge,f=s.l===a?s.r:s.l,e<i.i&&e<f.i&&le(a,i,f)<0&&t.push([n[e],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Sn(e=n),t):e},t.y=function(n){return arguments.length?(a=Sn(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?sc:n,t):o===sc?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===sc?null:o&&o[1]},t)};var sc=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,r,e,u){function i(n){function i(n,t,r,e,u,i,a,o){if(!isNaN(r)&&!isNaN(e))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(_a(c-r)+_a(s-e)<.01)l(n,t,r,e,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,a,o),l(n,t,r,e,u,i,a,o)}else n.x=r,n.y=e,n.point=t}else l(n,t,r,e,u,i,a,o)}function l(n,t,r,e,u,a,o,c){var l=.5*(u+o),s=.5*(a+c),f=r>=l,h=e>=s,p=h<<1|f;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=he()),f?u=l:o=l,h?a=s:c=s,i(n,t,r,e,u,a,o,c)}var s,f,h,p,g,v,d,m,y,_=Sn(o),x=Sn(c);if(null!=t)v=t,d=r,m=e,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],g=n.length,a)for(p=0;g>p;++p)s=n[p],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(p=0;g>p;++p){var M=+_(s=n[p],p),b=+x(s,p);v>M&&(v=M),d>b&&(d=b),M>m&&(m=M),b>y&&(y=b),f.push(M),h.push(b)}var w=m-v,k=y-d;w>k?y=d+w:m=v+k;var C=he();if(C.add=function(n){i(C,n,+_(n,++p),+x(n,p),v,d,m,y)},C.visit=function(n){pe(n,C,v,d,m,y)},C.find=function(n){return ge(C,n[0],n[1],v,d,m,y)},p=-1,null==t){for(;++p<g;)i(C,n[p],f[p],h[p],v,d,m,y);--p}else n.forEach(C.add);return f=h=n=s=null,C}var a,o=Nr,c=$r;return(a=arguments.length)?(o=se,c=fe,3===a&&(u=r,e=t,r=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=r=e=u=null:(t=+n[0][0],r=+n[0][1],e=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,r],[e,u]]},i.size=function(n){return arguments.length?(null==n?t=r=e=u=null:(t=r=0,e=+n[0],u=+n[1]),i):null==t?null:[e-t,u-r]},i)},oa.interpolateRgb=ve,oa.interpolateObject=de,oa.interpolateNumber=me,oa.interpolateString=ye;var fc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hc=new RegExp(fc.source,"g");oa.interpolate=_e,oa.interpolators=[function(n,t){var r=typeof t;return("string"===r?eo.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?ve:ye:t instanceof on?ve:Array.isArray(t)?xe:"object"===r&&isNaN(t)?de:me)(n,t)}],oa.interpolateArray=xe;var pc=function(){return y},gc=oa.map({linear:pc,poly:Se,quad:function(){return ke},cubic:function(){return Ce},sin:function(){return Ee},exp:function(){return Ne},circle:function(){return $e},elastic:je,back:De,bounce:function(){return Te}}),vc=oa.map({"in":y,out:be,"in-out":we,"out-in":function(n){return we(be(n))}});oa.ease=function(n){var t=n.indexOf("-"),r=t>=0?n.slice(0,t):n,e=t>=0?n.slice(t+1):"in";return r=gc.get(r)||pc,e=vc.get(e)||y,Me(e(r.apply(null,ca.call(arguments,1))))},oa.interpolateHcl=Le,oa.interpolateHsl=Re,oa.interpolateLab=Oe,oa.interpolateRound=ze,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var r=t.transform.baseVal.consolidate()}return new qe(r?r.matrix:dc)})(n)},qe.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var dc={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=Ze,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],r=-1,e=n.length;++r<e;)t.push(Ke(n[r]));return t}},oa.layout.chord=function(){function n(){var n,l,f,h,p,g={},v=[],d=oa.range(i),m=[];for(r=[],e=[],n=0,h=-1;++h<i;){for(l=0,p=-1;++p<i;)l+=u[h][p];v.push(l),m.push(oa.range(i)),n+=l}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,r){return o(u[t][n],u[t][r])})}),n=(qa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,p=-1;++p<i;){var y=d[h],_=m[y][p],x=u[y][_],M=l,b=l+=x*n;g[y+"-"+_]={index:y,subindex:_,startAngle:M,endAngle:b,value:x}}e[y]={index:y,startAngle:f,endAngle:l,value:v[y]},l+=s}for(h=-1;++h<i;)for(p=h-1;++p<i;){var w=g[h+"-"+p],k=g[p+"-"+h];(w.value||k.value)&&r.push(w.value<k.value?{source:k,target:w}:{source:w,target:k})}c&&t()}function t(){r.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var r,e,u,i,a,o,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,r=e=null,l):u},l.padding=function(n){return arguments.length?(s=n,r=e=null,l):s},l.sortGroups=function(n){return arguments.length?(a=n,r=e=null,l):a},l.sortSubgroups=function(n){return arguments.length?(o=n,r=null,l):o},l.sortChords=function(n){return arguments.length?(c=n,r&&t(),l):c},l.chords=function(){return r||n(),r},l.groups=function(){return e||n(),e},l},oa.layout.force=function(){function n(n){return function(t,r,e,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-r,c=i*i+a*a;if(c>o*o/m){if(v>c){var l=t.charge/c;n.px-=i*l,n.py-=a*l}return!0}if(t.point&&c&&v>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=a*l}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,c.resume()}var r,e,u,i,a,o,c={},l=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=mc,p=yc,g=-30,v=_c,d=.1,m=.64,_=[],x=[];return c.tick=function(){if((u*=.99)<.005)return r=null,l.end({type:"end",alpha:u=0}),!0;var t,e,c,h,p,v,m,y,M,b=_.length,w=x.length;for(e=0;w>e;++e)c=x[e],h=c.source,p=c.target,y=p.x-h.x,M=p.y-h.y,(v=y*y+M*M)&&(v=u*a[e]*((v=Math.sqrt(v))-i[e])/v,y*=v,M*=v,p.x-=y*(m=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=M*m,h.x+=y*(m=1-m),h.y+=M*m);if((m=u*d)&&(y=s[0]/2,M=s[1]/2,e=-1,m))for(;++e<b;)c=_[e],c.x+=(y-c.x)*m,c.y+=(M-c.y)*m;if(g)for(eu(t=oa.geom.quadtree(_),u,o),e=-1;++e<b;)(c=_[e]).fixed||t.visit(n(c));for(e=-1;++e<b;)c=_[e],c.fixed?(c.x=c.px,c.y=c.py):(c.x-=(c.px-(c.px=c.x))*f,c.y-=(c.py-(c.py=c.y))*f);l.tick({type:"tick",alpha:u})},c.nodes=function(n){return arguments.length?(_=n,c):_},c.links=function(n){return arguments.length?(x=n,c):x},c.size=function(n){return arguments.length?(s=n,c):s},c.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,c):h},c.distance=c.linkDistance,c.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,c):p},c.friction=function(n){return arguments.length?(f=+n,c):f},c.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,c):g},c.chargeDistance=function(n){return arguments.length?(v=n*n,c):Math.sqrt(v)},c.gravity=function(n){return arguments.length?(d=+n,c):d},c.theta=function(n){return arguments.length?(m=n*n,c):Math.sqrt(m)},c.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(r.c=null,r.t=NaN,r=null,l.end({type:"end",alpha:u=0})):n>0&&(l.start({type:"start",alpha:u=n}),r=Dn(c.tick)),c):u},c.start=function(){function n(n,e){if(!r){for(r=new Array(u),c=0;u>c;++c)r[c]=[];for(c=0;l>c;++c){var i=x[c];r[i.source.index].push(i.target),r[i.target.index].push(i.source)}}for(var a,o=r[t],c=-1,s=o.length;++c<s;)if(!isNaN(a=o[c][n]))return a;return Math.random()*e}var t,r,e,u=_.length,l=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(e=_[t]).index=t,e.weight=0;for(t=0;l>t;++t)e=x[t],"number"==typeof e.source&&(e.source=_[e.source]),"number"==typeof e.target&&(e.target=_[e.target]),++e.source.weight,++e.target.weight;for(t=0;u>t;++t)e=_[t],isNaN(e.x)&&(e.x=n("x",f)),isNaN(e.y)&&(e.y=n("y",v)),isNaN(e.px)&&(e.px=e.x),isNaN(e.py)&&(e.py=e.y);if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;l>t;++t)i[t]=h;if(a=[],"function"==typeof p)for(t=0;l>t;++t)a[t]=+p.call(this,x[t],t);else for(t=0;l>t;++t)a[t]=p;if(o=[],"function"==typeof g)for(t=0;u>t;++t)o[t]=+g.call(this,_[t],t);else for(t=0;u>t;++t)o[t]=g;return c.resume()},c.resume=function(){return c.alpha(.1)},c.stop=function(){return c.alpha(0)},c.drag=function(){return e||(e=oa.behavior.drag().origin(y).on("dragstart.force",Ge).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",ru).call(e):e},oa.rebind(c,l,"on")};var mc=20,yc=1,_c=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(l=r.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)a.push(s=l[c]),s.parent=i,s.depth=i.depth+1;e&&(i.value=0),i.children=l}else e&&(i.value=+e.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var r,u;t&&(r=n.children)&&r.sort(t),e&&(u=n.parent)&&(u.value+=n.value)}),o}var t=lu,r=ou,e=cu;return n.sort=function(r){return arguments.length?(t=r,n):t},n.children=function(t){return arguments.length?(r=t,n):r},n.value=function(t){return arguments.length?(e=t,n):e},n.revalue=function(t){return e&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var r;t.children||(t.value=+e.call(n,t,t.depth)||0),(r=t.parent)&&(r.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,r,e,u){var i=t.children;if(t.x=r,t.y=t.depth*u,t.dx=e,t.dy=u,i&&(a=i.length)){var a,o,c,l=-1;for(e=t.value?e/t.value:0;++l<a;)n(o=i[l],r,c=o.value*e,u),r+=c}}function t(n){var r=n.children,e=0;if(r&&(u=r.length))for(var u,i=-1;++i<u;)e=Math.max(e,t(r[i]));return 1+e}function r(r,i){var a=e.call(this,r,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var e=oa.layout.hierarchy(),u=[1,1];return r.size=function(n){return arguments.length?(u=n,r):u},uu(r,e)},oa.layout.pie=function(){function n(a){var o,c=a.length,l=a.map(function(r,e){return+t.call(n,r,e)}),s=+("function"==typeof e?e.apply(this,arguments):e),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),p=h*(0>f?-1:1),g=oa.sum(l),v=g?(f-c*p)/g:0,d=oa.range(c),m=[];return null!=r&&d.sort(r===xc?function(n,t){return l[t]-l[n]}:function(n,t){return r(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=l[n],startAngle:s,endAngle:s+=o*v+p,padAngle:h}}),m}var t=Number,r=xc,e=0,u=qa,i=0;return n.value=function(r){return arguments.length?(t=r,n):t},n.sort=function(t){return arguments.length?(r=t,n):r},n.startAngle=function(t){return arguments.length?(e=t,n):e},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var xc={};oa.layout.stack=function(){function n(o,c){if(!(h=o.length))return o;var l=o.map(function(r,e){return t.call(n,r,e)}),s=l.map(function(t){return t.map(function(t,r){return[i.call(n,t,r),a.call(n,t,r)]})}),f=r.call(n,s,c);l=oa.permute(l,f),s=oa.permute(s,f);var h,p,g,v,d=e.call(n,s,c),m=l[0].length;for(g=0;m>g;++g)for(u.call(n,l[0][g],v=d[g],s[0][g][1]),p=1;h>p;++p)u.call(n,l[p][g],v+=s[p-1][g][1],s[p][g][1]);return o}var t=y,r=gu,e=vu,u=pu,i=fu,a=hu;return n.values=function(r){return arguments.length?(t=r,n):t},n.order=function(t){return arguments.length?(r="function"==typeof t?t:Mc.get(t)||gu,n):r},n.offset=function(t){return arguments.length?(e="function"==typeof t?t:bc.get(t)||vu,n):e},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var Mc=oa.map({"inside-out":function(n){var t,r,e=n.length,u=n.map(du),i=n.map(mu),a=oa.range(e).sort(function(n,t){return u[n]-u[t]}),o=0,c=0,l=[],s=[];for(t=0;e>t;++t)r=a[t],c>o?(o+=i[r],l.push(r)):(c+=i[r],s.push(r));return s.reverse().concat(l)},reverse:function(n){return oa.range(n.length).reverse()},"default":gu}),bc=oa.map({silhouette:function(n){var t,r,e,u=n.length,i=n[0].length,a=[],o=0,c=[];for(r=0;i>r;++r){for(t=0,e=0;u>t;t++)e+=n[t][r][1];e>o&&(o=e),a.push(e)}for(r=0;i>r;++r)c[r]=(o-a[r])/2;return c},wiggle:function(n){var t,r,e,u,i,a,o,c,l,s=n.length,f=n[0],h=f.length,p=[];for(p[0]=c=l=0,r=1;h>r;++r){for(t=0,u=0;s>t;++t)u+=n[t][r][1];for(t=0,i=0,o=f[r][0]-f[r-1][0];s>t;++t){for(e=0,a=(n[t][r][1]-n[t][r-1][1])/(2*o);t>e;++e)a+=(n[e][r][1]-n[e][r-1][1])/o;i+=a*n[t][r][1]}p[r]=c-=u?i/u*o:0,l>c&&(l=c)}for(r=0;h>r;++r)p[r]-=l;return p},expand:function(n){var t,r,e,u=n.length,i=n[0].length,a=1/u,o=[];for(r=0;i>r;++r){for(t=0,e=0;u>t;t++)e+=n[t][r][1];if(e)for(t=0;u>t;t++)n[t][r][1]/=e;else for(t=0;u>t;t++)n[t][r][1]=a}for(r=0;i>r;++r)o[r]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,c=[],l=n.map(r,this),s=e.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,p=f.length-1,g=t?1:1/h;++i<p;)a=c[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(p>0)for(i=-1;++i<h;)o=l[i],o>=s[0]&&o<=s[1]&&(a=c[oa.bisect(f,o,1,p)-1],a.y+=g,a.push(n[i]));return c}var t=!0,r=Number,e=Mu,u=_u;return n.value=function(t){return arguments.length?(r=t,n):r},n.range=function(t){return arguments.length?(e=Sn(t),n):e},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:Sn(t),n):u},n.frequency=function(r){return arguments.length?(t=!!r,n):t},n},oa.layout.pack=function(){function n(n,i){var a=r.call(this,n,i),o=a[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Au),e){var f=e*(t?1:Math.max(2*o.r/c,2*o.r/l))/2;au(o,function(n){n.r+=f}),au(o,Au),au(o,function(n){n.r-=f})}return Nu(o,c/2,l/2,t?1:1/Math.max(2*o.r/c,2*o.r/l)),a}var t,r=oa.layout.hierarchy().sort(bu),e=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(r){return arguments.length?(t=null==r||"function"==typeof r?r:+r,n):t},n.padding=function(t){return arguments.length?(e=+t,n):e},uu(n,r)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,r),h.parent.m=-h.z,iu(h,e),l)iu(f,i);else{var p=f,g=f,v=f;iu(f,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>v.depth&&(v=n)});var d=o(p,g)/2-p.x,m=c[0]/(g.x+o(g,p)/2+d),y=c[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,r={A:null,children:[n]},e=[r];null!=(t=e.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)e.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return r.children[0]}function r(n){var t=n.children,r=n.parent.children,e=n.i?r[n.i-1]:null;if(t.length){Ru(n);var i=(t[0].z+t[t.length-1].z)/2;e?(n.z=e.z+o(n._,e._),n.m=n.z-i):n.z=i}else e&&(n.z=e.z+o(n._,e._));n.parent.A=u(n,e,n.parent.A||r[0])}function e(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,r){if(t){for(var e,u=n,i=n,a=t,c=u.parent.children[0],l=u.m,s=i.m,f=a.m,h=c.m;a=Tu(a),u=Du(u),a&&u;)c=Du(c),i=Tu(i),i.a=n,e=a.z+f-u.z-l+o(a._,u._),e>0&&(Lu(Ou(a,n,r),n,e),l+=e,s+=e),f+=a.m,l+=u.m,h+=c.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!Du(c)&&(c.t=u,c.m+=l-h,r=n)}return r}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=ju,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),c=o[0],l=0;au(c,function(n){var t=n.children;t&&t.length?(n.x=qu(t),n.y=zu(t)):(n.x=a?l+=r(n,a):0,n.y=0,a=n)});var s=Iu(c),f=Pu(c),h=s.x-r(s,f)/2,p=f.x+r(f,s)/2;return au(c,u?function(n){n.x=(n.x-c.x)*e[0],n.y=(c.y-n.y)*e[1]}:function(n){n.x=(n.x-h)/(p-h)*e[0],n.y=(1-(c.y?n.y/c.y:1))*e[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),r=ju,e=[1,1],u=!1;return n.separation=function(t){return arguments.length?(r=t,n):r},n.size=function(t){return arguments.length?(u=null==(e=t),n):u?null:e},n.nodeSize=function(t){return arguments.length?(u=null!=(e=t),n):u?e:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var r,e,u=-1,i=n.length;++u<i;)e=(r=n[u]).value*(0>t?0:t),r.area=isNaN(e)||0>=e?0:e}function t(r){var i=r.children;if(i&&i.length){var a,o,c,l=f(r),s=[],h=i.slice(),g=1/0,v="slice"===p?l.dx:"dice"===p?l.dy:"slice-dice"===p?1&r.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/r.value),s.area=0;(c=h.length)>0;)s.push(a=h[c-1]),s.area+=a.area,"squarify"!==p||(o=e(s,v))<=g?(h.pop(),g=o):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,g=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function r(t){var e=t.children;if(e&&e.length){var i,a=f(t),o=e.slice(),c=[];for(n(o,a.dx*a.dy/t.value),c.area=0;i=o.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?a.dx:a.dy,a,!o.length),c.length=c.area=0);e.forEach(r)}}function e(n,t){for(var r,e=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(r=n[a].area)&&(i>r&&(i=r),r>u&&(u=r));return e*=e,t*=t,e?Math.max(t*u*g/e,e/(t*i*g)):1/0}function u(n,t,r,e){var u,i=-1,a=n.length,o=r.x,l=r.y,s=t?c(n.area/t):0;
+if(t==r.dx){for((e||s>r.dy)&&(s=r.dy);++i<a;)u=n[i],u.x=o,u.y=l,u.dy=s,o+=u.dx=Math.min(r.x+r.dx-o,s?c(u.area/s):0);u.z=!0,u.dx+=r.x+r.dx-o,r.y+=s,r.dy-=s}else{for((e||s>r.dx)&&(s=r.dx);++i<a;)u=n[i],u.x=o,u.y=l,u.dx=s,l+=u.dy=Math.min(r.y+r.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=r.y+r.dy-l,r.x+=s,r.dx-=s}}function i(e){var u=a||o(e),i=u[0];return i.x=i.y=0,i.value?(i.dx=l[0],i.dy=l[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?r:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Uu,h=!1,p="squarify",g=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var r=n.call(i,t,t.depth);return null==r?Uu(t):Fu(t,"number"==typeof r?[r,r,r,r]:r)}function r(t){return Fu(t,n)}if(!arguments.length)return s;var e;return f=null==(s=n)?Uu:"function"==(e=typeof n)?t:"number"===e?(n=[n,n,n,n],r):r,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(g=n,i):g},i.mode=function(n){return arguments.length?(p=n+"",i):p},uu(i,o)},oa.random={normal:function(n,t){var r=arguments.length;return 2>r&&(t=1),1>r&&(n=0),function(){var r,e,u;do r=2*Math.random()-1,e=2*Math.random()-1,u=r*r+e*e;while(!u||u>1);return n+t*r*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,r=0;n>r;r++)t+=Math.random();return t}}},oa.scale={};var wc={floor:y,ceil:y};oa.scale.linear=function(){return Xu([0,1],[0,1],_e,!1)};var kc={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ei(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Cc=oa.format(".0e"),Ac={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Sc)},oa.scale.category20=function(){return oa.scale.ordinal().range(Ec)},oa.scale.category20b=function(){return oa.scale.ordinal().range(Nc)},oa.scale.category20c=function(){return oa.scale.ordinal().range($c)};var Sc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Ec=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),Nc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),$c=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return ci(0,1,[0,1])},oa.scale.threshold=function(){return li([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+r.apply(this,arguments)),l=Math.max(0,+e.apply(this,arguments)),s=a.apply(this,arguments)-Pa,f=o.apply(this,arguments)-Pa,h=Math.abs(f-s),p=s>f?0:1;if(n>l&&(g=l,l=n,n=g),h>=Ia)return t(l,p)+(n?t(n,1-p):"")+"Z";var g,v,d,m,y,_,x,M,b,w,k,C,A=0,S=0,E=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===jc?Math.sqrt(n*n+l*l):+i.apply(this,arguments),p||(S*=-1),l&&(S=tn(d/l*Math.sin(m))),n&&(A=tn(d/n*Math.sin(m)))),l){y=l*Math.cos(s+S),_=l*Math.sin(s+S),x=l*Math.cos(f-S),M=l*Math.sin(f-S);var N=Math.abs(f-s-2*S)<=za?0:1;if(S&&mi(y,_,x,M)===p^N){var $=(s+f)/2;y=l*Math.cos($),_=l*Math.sin($),x=M=null}}else y=_=0;if(n){b=n*Math.cos(f-A),w=n*Math.sin(f-A),k=n*Math.cos(s+A),C=n*Math.sin(s+A);var j=Math.abs(s-f+2*A)<=za?0:1;if(A&&mi(b,w,k,C)===1-p^j){var D=(s+f)/2;b=n*Math.cos(D),w=n*Math.sin(D),k=C=null}}else b=w=0;if(h>Ra&&(g=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^p?0:1;var T=g,L=g;if(za>h){var R=null==k?[b,w]:null==x?[y,_]:Lr([y,_],[k,C],[x,M],[b,w]),O=y-R[0],z=_-R[1],q=x-R[0],I=M-R[1],P=1/Math.sin(Math.acos((O*q+z*I)/(Math.sqrt(O*O+z*z)*Math.sqrt(q*q+I*I)))/2),U=Math.sqrt(R[0]*R[0]+R[1]*R[1]);L=Math.min(g,(n-U)/(P-1)),T=Math.min(g,(l-U)/(P+1))}if(null!=x){var F=yi(null==k?[b,w]:[k,C],[y,_],l,T,p),H=yi([x,M],[b,w],l,T,p);g===T?E.push("M",F[0],"A",T,",",T," 0 0,",v," ",F[1],"A",l,",",l," 0 ",1-p^mi(F[1][0],F[1][1],H[1][0],H[1][1]),",",p," ",H[1],"A",T,",",T," 0 0,",v," ",H[0]):E.push("M",F[0],"A",T,",",T," 0 1,",v," ",H[0])}else E.push("M",y,",",_);if(null!=k){var W=yi([y,_],[k,C],n,-L,p),B=yi([b,w],null==x?[y,_]:[x,M],n,-L,p);g===L?E.push("L",B[0],"A",L,",",L," 0 0,",v," ",B[1],"A",n,",",n," 0 ",p^mi(B[1][0],B[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",L,",",L," 0 0,",v," ",W[0]):E.push("L",B[0],"A",L,",",L," 0 0,",v," ",W[0])}else E.push("L",b,",",w)}else E.push("M",y,",",_),null!=x&&E.push("A",l,",",l," 0 ",N,",",p," ",x,",",M),E.push("L",b,",",w),null!=k&&E.push("A",n,",",n," 0 ",j,",",1-p," ",k,",",C);return E.push("Z"),E.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var r=hi,e=pi,u=fi,i=jc,a=gi,o=vi,c=di;return n.innerRadius=function(t){return arguments.length?(r=Sn(t),n):r},n.outerRadius=function(t){return arguments.length?(e=Sn(t),n):e},n.cornerRadius=function(t){return arguments.length?(u=Sn(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==jc?jc:Sn(t),n):i},n.startAngle=function(t){return arguments.length?(a=Sn(t),n):a},n.endAngle=function(t){return arguments.length?(o=Sn(t),n):o},n.padAngle=function(t){return arguments.length?(c=Sn(t),n):c},n.centroid=function(){var n=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Pa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var jc="auto";oa.svg.line=function(){return _i(y)};var Dc=oa.map({linear:xi,"linear-closed":Mi,step:bi,"step-before":wi,"step-after":ki,basis:$i,"basis-open":ji,"basis-closed":Di,bundle:Ti,cardinal:Si,"cardinal-open":Ci,"cardinal-closed":Ai,monotone:Ii});Dc.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Tc=[0,2/3,1/3,0],Lc=[0,1/3,2/3,0],Rc=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=_i(Pi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=ki,ki.reverse=wi,oa.svg.area=function(){return Ui(y)},oa.svg.area.radial=function(){var n=Ui(Pi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var c=t(this,i,n,o),l=t(this,a,n,o);return"M"+c.p0+e(c.r,c.p1,c.a1-c.a0)+(r(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+e(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,r,e){var u=t.call(n,r,e),i=o.call(n,u,e),a=c.call(n,u,e)-Pa,s=l.call(n,u,e)-Pa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function r(n,t){return n.a0==t.a0&&n.a1==t.a1}function e(n,t,r){return"A"+n+","+n+" 0 "+ +(r>za)+",1 "+t}function u(n,t,r,e){return"Q 0,0 "+e}var i=_r,a=xr,o=Fi,c=gi,l=vi;return n.radius=function(t){return arguments.length?(o=Sn(t),n):o},n.source=function(t){return arguments.length?(i=Sn(t),n):i},n.target=function(t){return arguments.length?(a=Sn(t),n):a},n.startAngle=function(t){return arguments.length?(c=Sn(t),n):c},n.endAngle=function(t){return arguments.length?(l=Sn(t),n):l},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=r.call(this,n,u),o=(i.y+a.y)/2,c=[i,{x:i.x,y:o},{x:a.x,y:o},a];return c=c.map(e),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=_r,r=xr,e=Hi;return n.source=function(r){return arguments.length?(t=Sn(r),n):t},n.target=function(t){return arguments.length?(r=Sn(t),n):r},n.projection=function(t){return arguments.length?(e=t,n):e},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Hi,r=n.projection;return n.projection=function(n){return arguments.length?r(Wi(t=n)):t},n},oa.svg.symbol=function(){function n(n,e){return(Oc.get(t.call(this,n,e))||Zi)(r.call(this,n,e))}var t=Yi,r=Bi;return n.type=function(r){return arguments.length?(t=Sn(r),n):t},n.size=function(t){return arguments.length?(r=Sn(t),n):r},n};var Oc=oa.map({circle:Zi,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*qc)),r=t*qc;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/zc),r=t*zc/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/zc),r=t*zc/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});oa.svg.symbolTypes=Oc.keys();var zc=Math.sqrt(3),qc=Math.tan(30*Ua);Ea.transition=function(n){for(var t,r,e=Ic||++Hc,u=Qi(n),i=[],a=Pc||{time:Date.now(),ease:Ae,delay:0,duration:250},o=-1,c=this.length;++o<c;){i.push(t=[]);for(var l=this[o],s=-1,f=l.length;++s<f;)(r=l[s])&&Gi(r,s,u,e,a),t.push(r)}return Xi(i,u,e)},Ea.interrupt=function(n){return this.each(null==n?Uc:Vi(Qi(n)))};var Ic,Pc,Uc=Vi(Qi()),Fc=[],Hc=0;Fc.call=Ea.call,Fc.empty=Ea.empty,Fc.node=Ea.node,Fc.size=Ea.size,oa.transition=function(n,t){return n&&n.transition?Ic?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Fc,Fc.select=function(n){var t,r,e,u=this.id,i=this.namespace,a=[];n=E(n);for(var o=-1,c=this.length;++o<c;){a.push(t=[]);for(var l=this[o],s=-1,f=l.length;++s<f;)(e=l[s])&&(r=n.call(e,e.__data__,s,o))?("__data__"in e&&(r.__data__=e.__data__),Gi(r,s,i,u,e[i][u]),t.push(r)):t.push(null)}return Xi(a,i,u)},Fc.selectAll=function(n){var t,r,e,u,i,a=this.id,o=this.namespace,c=[];n=N(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,p=f.length;++h<p;)if(e=f[h]){i=e[o][a],r=n.call(e,e.__data__,h,l),c.push(t=[]);for(var g=-1,v=r.length;++g<v;)(u=r[g])&&Gi(u,g,o,a,i),t.push(u)}return Xi(c,o,a)},Fc.filter=function(n){var t,r,e,u=[];"function"!=typeof n&&(n=U(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var r=this[i],o=0,c=r.length;c>o;o++)(e=r[o])&&n.call(e,e.__data__,o,i)&&t.push(e)}return Xi(u,this.namespace,this.id)},Fc.tween=function(n,t){var r=this.id,e=this.namespace;return arguments.length<2?this.node()[e][r].tween.get(n):H(this,null==t?function(t){t[e][r].tween.remove(n)}:function(u){u[e][r].tween.set(n,t)})},Fc.attr=function(n,t){function r(){this.removeAttribute(o)}function e(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?r:(n+="",function(){var t,r=this.getAttribute(o);return r!==n&&(t=a(r,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?e:(n+="",function(){var t,r=this.getAttributeNS(o.space,o.local);return r!==n&&(t=a(r,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?Ze:_e,o=oa.ns.qualify(n);return Ki(this,"attr."+n,t,o.local?i:u)},Fc.attrTween=function(n,t){function r(n,r){var e=t.call(this,n,r,this.getAttribute(u));return e&&function(n){this.setAttribute(u,e(n))}}function e(n,r){var e=t.call(this,n,r,this.getAttributeNS(u.space,u.local));return e&&function(n){this.setAttributeNS(u.space,u.local,e(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?e:r)},Fc.style=function(n,r,e){function u(){this.style.removeProperty(n)}function i(r){return null==r?u:(r+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==r&&(u=_e(i,r),function(t){this.style.setProperty(n,u(t),e)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(r="");for(e in n)this.style(e,n[e],r);return this}e=""}return Ki(this,"style."+n,r,i)},Fc.styleTween=function(n,r,e){function u(u,i){var a=r.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,u)},Fc.text=function(n){return Ki(this,"text",n,Ji)},Fc.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fc.ease=function(n){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),H(this,function(e){e[r][t].ease=n}))},Fc.delay=function(n){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].delay:H(this,"function"==typeof n?function(e,u,i){e[r][t].delay=+n.call(e,e.__data__,u,i)}:(n=+n,function(e){e[r][t].delay=n}))},Fc.duration=function(n){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].duration:H(this,"function"==typeof n?function(e,u,i){e[r][t].duration=Math.max(1,n.call(e,e.__data__,u,i))}:(n=Math.max(1,n),function(e){e[r][t].duration=n}))},Fc.each=function(n,t){var r=this.id,e=this.namespace;if(arguments.length<2){var u=Pc,i=Ic;try{Ic=r,H(this,function(t,u,i){Pc=t[e][r],n.call(t,t.__data__,u,i)})}finally{Pc=u,Ic=i}}else H(this,function(u){var i=u[e][r];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Fc.transition=function(){for(var n,t,r,e,u=this.id,i=++Hc,a=this.namespace,o=[],c=0,l=this.length;l>c;c++){o.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(r=t[s])&&(e=r[a][u],Gi(r,s,a,i,{time:e.time,ease:e.ease,delay:e.delay+e.duration,duration:e.duration})),n.push(r)}return Xi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,l=oa.select(this),s=this.__chart__||r,f=this.__chart__=r.copy(),h=null==c?f.ticks?f.ticks.apply(f,o):f.domain():c,p=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,g=l.selectAll(".tick").data(h,f),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Ra),d=oa.transition(g.exit()).style("opacity",Ra).remove(),m=oa.transition(g.order()).style("opacity",1),_=Math.max(u,0)+a,x=Wu(f),M=l.selectAll(".domain").data([0]),b=(M.enter().append("path").attr("class","domain"),oa.transition(M));v.append("line"),v.append("text");var w,k,C,A,S=v.select("line"),E=m.select("line"),N=g.select("text").text(p),$=v.select("text"),j=m.select("text"),D="top"===e||"left"===e?-1:1;if("bottom"===e||"top"===e?(n=na,w="x",C="y",k="x2",A="y2",N.attr("dy",0>D?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+x[0]+","+D*i+"V0H"+x[1]+"V"+D*i)):(n=ta,w="y",C="x",k="y2",A="x2",N.attr("dy",".32em").style("text-anchor",0>D?"end":"start"),b.attr("d","M"+D*i+","+x[0]+"H0V"+x[1]+"H"+D*i)),S.attr(A,D*u),$.attr(C,D*_),E.attr(k,0).attr(A,D*u),j.attr(w,0).attr(C,D*_),f.rangeBand){var T=f,L=T.rangeBand()/2;s=f=function(n){return T(n)+L}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,r=oa.scale.linear(),e=Wc,u=6,i=6,a=3,o=[10],c=null;return n.scale=function(t){return arguments.length?(r=t,n):r},n.orient=function(t){return arguments.length?(e=t in Bc?t+"":Wc,n):e},n.ticks=function(){return arguments.length?(o=la(arguments),n):o},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(r){return arguments.length?(t=r,n):t},n.tickSize=function(t){var r=arguments.length;return r?(u=+t,i=+arguments[r-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Wc="bottom",Bc={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Yc[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var c,f=oa.transition(t),h=oa.transition(a);l&&(c=Wu(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),e(f)),s&&(c=Wu(s),h.attr("y",c[0]).attr("height",c[1]-c[0]),u(f)),r(f)})}function r(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(N||(_=null,j[0]-=f[1],j[1]-=h[1],N=2),k())}function v(){32==oa.event.keyCode&&2==N&&(j[0]+=f[1],j[1]+=h[1],N=0,k())}function d(){var n=oa.mouse(M),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),N||(oa.event.altKey?(_||(_=[(f[0]+f[1])/2,(h[0]+h[1])/2]),j[0]=f[+(n[0]<_[0])],j[1]=h[+(n[1]<_[1])]):_=null),S&&m(n,l,0)&&(e(C),t=!0),E&&m(n,s,1)&&(u(C),t=!0),t&&(r(C),w({type:"brush",mode:N?"move":"resize"}))}function m(n,t,r){var e,u,i=Wu(t),c=i[0],l=i[1],s=j[r],v=r?h:f,d=v[1]-v[0];return N&&(c-=s,l-=d+s),e=(r?g:p)?Math.max(c,Math.min(l,n[r])):n[r],N?u=(e+=s)+d:(_&&(s=Math.max(c,Math.min(l,2*_[r]-e))),e>s?(u=e,e=s):u=s),v[0]!=e||v[1]!=u?(r?o=null:a=null,v[0]=e,v[1]=u,!0):void 0}function y(){d(),C.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),D.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),$(),w({type:"brushend"})}var _,x,M=this,b=oa.select(oa.event.target),w=c.of(M,arguments),C=oa.select(M),A=b.datum(),S=!/^(n|s)$/.test(A)&&l,E=!/^(e|w)$/.test(A)&&s,N=b.classed("extent"),$=X(M),j=oa.mouse(M),D=oa.select(t(M)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?D.on("touchmove.brush",d).on("touchend.brush",y):D.on("mousemove.brush",d).on("mouseup.brush",y),C.interrupt().selectAll("*").interrupt(),N)j[0]=f[0]-j[0],j[1]=h[0]-j[1];else if(A){var T=+/w$/.test(A),L=+/^n/.test(A);x=[f[1-T]-j[0],h[1-L]-j[1]],j[0]=f[T],j[1]=h[L]}else oa.event.altKey&&(_=j.slice());C.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),d()}var a,o,c=A(n,"brushstart","brush","brushend"),l=null,s=null,f=[0,0],h=[0,0],p=!0,g=!0,v=Zc[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:f,y:h,i:a,j:o},r=this.__chart__||t;this.__chart__=t,Ic?oa.select(this).transition().each("start.brush",function(){a=r.i,o=r.j,f=r.x,h=r.y,n({type:"brushstart"})}).tween("brush:brush",function(){var r=xe(f,t.x),e=xe(h,t.y);return a=o=null,function(u){f=t.x=r(u),h=t.y=e(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(l=t,v=Zc[!l<<1|!s],n):l},n.y=function(t){return arguments.length?(s=t,v=Zc[!l<<1|!s],n):s},n.clamp=function(t){return arguments.length?(l&&s?(p=!!t[0],g=!!t[1]):l?p=!!t:s&&(g=!!t),n):l&&s?[p,g]:l?p:s?g:null},n.extent=function(t){var r,e,u,i,c;return arguments.length?(l&&(r=t[0],e=t[1],s&&(r=r[0],e=e[0]),a=[r,e],l.invert&&(r=l(r),e=l(e)),r>e&&(c=r,r=e,e=c),(r!=f[0]||e!=f[1])&&(f=[r,e])),s&&(u=t[0],i=t[1],l&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(c=u,u=i,i=c),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(l&&(a?(r=a[0],e=a[1]):(r=f[0],e=f[1],l.invert&&(r=l.invert(r),e=l.invert(e)),r>e&&(c=r,r=e,e=c))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(c=u,u=i,i=c))),l&&s?[[r,u],[e,i]]:l?[r,e]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!l&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,c,"on")};var Yc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vc=ho.format=_o.timeFormat,Xc=Vc.utc,Kc=Xc("%Y-%m-%dT%H:%M:%S.%LZ");Vc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ra:Kc,ra.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ra.toString=Kc.toString,ho.second=Un(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ho.seconds=ho.second.range,ho.seconds.utc=ho.second.utc.range,ho.minute=Un(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ho.minutes=ho.minute.range,ho.minutes.utc=ho.minute.utc.range,ho.hour=Un(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ho.hours=ho.hour.range,ho.hours.utc=ho.hour.utc.range,ho.month=Un(function(n){return n=ho.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ho.months=ho.month.range,ho.months.utc=ho.month.utc.range;var Jc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Qc=[[ho.second,1],[ho.second,5],[ho.second,15],[ho.second,30],[ho.minute,1],[ho.minute,5],[ho.minute,15],[ho.minute,30],[ho.hour,1],[ho.hour,3],[ho.hour,6],[ho.hour,12],[ho.day,1],[ho.day,2],[ho.week,1],[ho.month,1],[ho.month,3],[ho.year,1]],Gc=Vc.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",$t]]),nl={range:function(n,t,r){return oa.range(Math.ceil(n/r)*r,+t,r).map(ua)},floor:y,ceil:y};Qc.year=ho.year,ho.scale=function(){return ea(oa.scale.linear(),Qc,Gc)};var tl=Qc.map(function(n){return[n[0].utc,n[1]]}),rl=Xc.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",$t]]);tl.year=ho.year.utc,ho.scale.utc=function(){return ea(oa.scale.linear(),tl,rl)},oa.text=En(function(n){return n.responseText}),oa.json=function(n,t){return Nn(n,"application/json",ia,t)},oa.html=function(n,t){return Nn(n,"text/html",aa,t)},oa.xml=En(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}(),function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){var e=r?r.length:0;switch(e){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t){for(var r=-1,e=n.length,u=-1,i=t.length,a=Array(e+i);++r<e;)a[r]=n[r];for(;++u<i;)a[r++]=t[u];return a}function u(n,t){for(var r=-1,e=n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function i(n,t){for(var r=n.length;r--&&t(n[r],r,n)!==!1;);return n}function a(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function o(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;){var a=n[r];t(a,r,n)&&(i[++u]=a)}return i}function c(n,t){return!!n.length&&y(n,t,0)>-1}function l(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function s(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function f(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function h(n,t,r,e){var u=-1,i=n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function g(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function v(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],a=t(i);if(null!=a&&(o===B?a===a:r(a,o)))var o=a,c=i}return c}function d(n,t,r,e){var u;return r(n,function(n,r,i){return t(n,r,i)?(u=e?r:n,!1):void 0}),u}function m(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function y(n,t,r){if(t!==t)return L(n,r);for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function _(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function x(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function M(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==B&&(r=r===B?i:r+i)}return r}function b(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function w(n,t){return s(t,function(t){return[t,n[t]]})}function k(n){return function(t){return n(t)}}function C(n,t){return s(t,function(t){return n[t]})}function A(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function S(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function E(n){return n&&n.Object===Object?n:null}function N(n,t){if(n!==t){var r=null===n,e=n===B,u=n===n,i=null===t,a=t===B,o=t===t;if(n>t&&!i||!u||r&&!a&&o||e&&o)return 1;if(t>n&&!r||!o||i&&!e&&u||a&&u)return-1}return 0}function $(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,a=u.length,o=r.length;++e<a;){var c=N(u[e],i[e]);if(c){if(e>=o)return c;var l=r[e];return c*("desc"==l?-1:1)}}return n.index-t.index}function j(n){return vr[n]}function D(n){return dr[n]}function T(n){return"\\"+_r[n]}function L(n,t,r){for(var e=n.length,u=t+(r?0:-1);r?u--:++u<e;){var i=n[u];if(i!==i)return u}return-1}function R(n){var t=!1;if(null!=n&&"function"!=typeof n.toString)try{t=!!(n+"")}catch(r){}return t}function O(n,t){return n="number"==typeof n||Mt.test(n)?+n:-1,t=null==t?mn:t,n>-1&&n%1==0&&t>n}function z(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function I(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;)n[r]===t&&(n[r]=wn,i[++u]=r);return i}function P(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function U(n){if(!n||!or.test(n))return n.length;for(var t=ar.lastIndex=0;ar.test(n);)t++;return t}function F(n){return n.match(ar)}function H(n){return mr[n]}function W(E){function qn(n){if(ba(n)&&!ns(n)&&!(n instanceof At)){if(n instanceof Ct)return n;if(Cc.call(n,"__wrapped__"))return Mu(n)}return new Ct(n)}function Mt(){}function Ct(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=B}function At(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xn,this.__views__=[]}function St(){var n=new At(this.__wrapped__);return n.__actions__=Ae(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ae(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ae(this.__views__),n}function Et(){if(this.__filtered__){var n=new At(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Nt(){var n=this.__wrapped__.value(),t=this.__dir__,r=ns(n),e=0>t,u=r?n.length:0,i=ru(0,u,this.__views__),a=i.start,o=i.end,c=o-a,l=e?o:a-1,s=this.__iteratees__,f=s.length,h=0,p=Vc(c,this.__takeCount__);if(!r||sn>u||u==c&&p==c)return de(n,this.__actions__);var g=[];n:for(;c--&&p>h;){l+=t;for(var v=-1,d=n[l];++v<f;){var m=s[v],y=m.iteratee,_=m.type,x=y(d);if(_==hn)d=x;else if(!x){if(_==fn)continue n;break n}}g[h++]=d}return g}function $t(){}function jt(n,t){return Tt(n,t)&&delete n[t]}function Dt(n,t){if(tl){var r=n[t];return r===vn?B:r}return Cc.call(n,t)?n[t]:B}function Tt(n,t){return tl?n[t]!==B:Cc.call(n,t)}function Lt(n,t,r){n[t]=tl&&r===B?vn:r}function Rt(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Ot(){this.__data__={hash:new $t,map:Qc?new Qc:[],string:new $t}}function zt(n){var t=this.__data__;return su(n)?jt("string"==typeof n?t.string:t.hash,n):Qc?t.map["delete"](n):Kt(t.map,n)}function qt(n){var t=this.__data__;return su(n)?Dt("string"==typeof n?t.string:t.hash,n):Qc?t.map.get(n):Jt(t.map,n)}function It(n){var t=this.__data__;return su(n)?Tt("string"==typeof n?t.string:t.hash,n):Qc?t.map.has(n):Qt(t.map,n)}function Pt(n,t){var r=this.__data__;return su(n)?Lt("string"==typeof n?r.string:r.hash,n,t):Qc?r.map.set(n,t):nr(r.map,n,t),this}function Ut(n){var t=-1,r=n?n.length:0;for(this.__data__=new Rt;++t<r;)this.push(n[t])}function Ft(n,t){var r=n.__data__;if(su(t)){var e=r.__data__,u="string"==typeof t?e.string:e.hash;return u[t]===vn}return r.has(t)}function Ht(n){var t=this.__data__;if(su(n)){var r=t.__data__,e="string"==typeof n?r.string:r.hash;e[n]=vn}else t.set(n,vn)}function Wt(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Bt(){this.__data__={array:[],map:null}}function Yt(n){var t=this.__data__,r=t.array;return r?Kt(r,n):t.map["delete"](n)}function Zt(n){var t=this.__data__,r=t.array;return r?Jt(r,n):t.map.get(n)}function Vt(n){var t=this.__data__,r=t.array;return r?Qt(r,n):t.map.has(n)}function Xt(n,t){var r=this.__data__,e=r.array;e&&(e.length<sn-1?nr(e,n,t):(r.array=null,r.map=new Rt(e)));var u=r.map;return u&&u.set(n,t),this}function Kt(n,t){var r=Gt(n,t);if(0>r)return!1;var e=n.length-1;return r==e?n.pop():Uc.call(n,r,1),!0}function Jt(n,t){var r=Gt(n,t);return 0>r?B:n[r][1]}function Qt(n,t){return Gt(n,t)>-1}function Gt(n,t){for(var r=n.length;r--;)if(ua(n[r][0],t))return r;return-1}function nr(n,t,r){var e=Gt(n,t);0>e?n.push([t,r]):n[e][1]=r}function tr(n,t,r,e){return n===B||ua(n,wc[r])&&!Cc.call(e,r)?t:n}function rr(n,t,r){(r!==B&&!ua(n[t],r)||"number"==typeof t&&r===B&&!(t in n))&&(n[t]=r)}function er(n,t,r){var e=n[t];(!ua(e,r)||ua(e,wc[t])&&!Cc.call(n,t)||r===B&&!(t in n))&&(n[t]=r)}function ur(n,t){return n&&Se(t,io(t),n)}function ar(n,t){for(var r=-1,e=null==n,u=t.length,i=Array(u);++r<u;)i[r]=e?B:to(n,t[r]);return i}function vr(n,t,r){return n===n&&(r!==B&&(n=r>=n?n:r),t!==B&&(n=n>=t?n:t)),n}function dr(n,t,r,e,i,a){var o;if(r&&(o=i?r(n,e,i,a):r(n)),o!==B)return o;if(!Ma(n))return n;var c=ns(n);if(c){if(o=uu(n),!t)return Ae(n,o)}else{var l=tu(n),s=l==Nn||l==$n;if(l!=Tn&&l!=kn&&(!s||i))return gr[l]?au(n,l,t):i?n:{};if(R(n))return i?n:{};if(o=iu(s?{}:n),!t)return Ne(n,ur(o,n))}a||(a=new Wt);var f=a.get(n);return f?f:(a.set(n,o),(c?u:Sr)(n,function(e,u){er(o,u,dr(e,t,r,u,n,a))}),c?o:Ne(n,o))}function mr(n){var t=io(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var i=t[u],a=n[i],o=e[i];if(o===B&&!(i in Object(e))||!a(o))return!1}return!0}}function yr(n,t,r){if("function"!=typeof n)throw new Mc(gn);return Pc(function(){n.apply(B,r)},t)}function _r(n,t,r,e){var u=-1,i=c,a=!0,o=n.length,f=[],h=t.length;if(!o)return f;r&&(t=s(t,k(r))),e?(i=l,a=!1):t.length>=sn&&(i=Ft,a=!1,t=new Ut(t));n:for(;++u<o;){var p=n[u],g=r?r(p):p;if(a&&g===g){for(var v=h;v--;)if(t[v]===g)continue n;f.push(p)}else i(t,g,e)||f.push(p)}return f}function br(n,t){var r=!0;return sl(n,function(n,e,u){return r=!!t(n,e,u)}),r}function wr(n,t,r,e){var u=n.length;for(r=Pa(r),
+0>r&&(r=-r>u?0:u+r),e=e===B||e>u?u:Pa(e),0>e&&(e+=u),e=r>e?0:Ua(e);e>r;)n[r++]=t;return n}function kr(n,t){var r=[];return sl(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function Cr(n,t,r,e){e||(e=[]);for(var u=-1,i=n.length;++u<i;){var a=n[u];la(a)&&(r||ns(a)||oa(a))?t?Cr(a,t,r,e):f(e,a):r||(e[e.length]=a)}return e}function Ar(n,t){return null==n?n:hl(n,t,ao)}function Sr(n,t){return n&&hl(n,t,io)}function Er(n,t){return n&&pl(n,t,io)}function jr(n,t){return o(t,function(t){return ya(n[t])})}function Dr(n,t){t=lu(t,n)?[t+""]:he(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:B}function Tr(n,t){return Cc.call(n,t)||"object"==typeof n&&t in n&&null===Oc(n)}function Lr(n,t){return t in Object(n)}function Rr(n,t,r){return n>=Vc(t,r)&&n<Zc(t,r)}function Or(n,t,r){for(var e=r?l:c,u=n.length,i=u,a=Array(u),o=[];i--;){var f=n[i];i&&t&&(f=s(f,k(t))),a[i]=!r&&(t||f.length>=120)?new Ut(i&&f):B}f=n[0];var h=-1,p=f.length,g=a[0];n:for(;++h<p;){var v=f[h],d=t?t(v):v;if(!(g?Ft(g,d):e(o,d,r))){for(var i=u;--i;){var m=a[i];if(!(m?Ft(m,d):e(n[i],d,r)))continue n}g&&g.push(d),o.push(v)}}return o}function zr(n,t,e){lu(t,n)||(t=he(t),n=du(n,t),t=Iu(t));var u=null==n?n:n[t];return null==u?B:r(u,n,e)}function qr(n,t,r,e,u){return n===t?!0:null==n||null==t||!Ma(n)&&!ba(t)?n!==n&&t!==t:Ir(n,t,qr,r,e,u)}function Ir(n,t,r,e,u,i){var a=ns(n),o=ns(t),c=Cn,l=Cn;a||(c=tu(n),c==kn?c=Tn:c!=Tn&&(a=Ra(n))),o||(l=tu(t),l==kn?l=Tn:l!=Tn&&(o=Ra(t)));var s=c==Tn&&!R(n),f=l==Tn&&!R(t),h=c==l;if(h&&!a&&!s)return Xe(n,t,c,r,e,u);var p=u&un;if(!p){var g=s&&Cc.call(n,"__wrapped__"),v=f&&Cc.call(t,"__wrapped__");if(g||v)return r(g?n.value():n,v?t.value():t,e,u,i)}return h?(i||(i=new Wt),(a?Ve:Ke)(n,t,r,e,u,i)):!1}function Pr(n,t,r,e){var u=r.length,i=u,a=!e;if(null==n)return!i;for(n=Object(n);u--;){var o=r[u];if(a&&o[2]?o[1]!==n[o[0]]:!(o[0]in n))return!1}for(;++u<i;){o=r[u];var c=o[0],l=n[c],s=o[1];if(a&&o[2]){if(l===B&&!(c in n))return!1}else{var f=new Wt,h=e?e(l,s,c,n,t,f):B;if(!(h===B?qr(s,l,e,en|un,f):h))return!1}}return!0}function Ur(n){var t=typeof n;return"function"==t?n:null==n?Xo:"object"==t?ns(n)?Yr(n[0],n[1]):Br(n):ec(n)}function Fr(n){return Yc(Object(n))}function Hr(n){n=null==n?n:Object(n);var t=[];for(var r in n)t.push(r);return t}function Wr(n,t){var r=-1,e=ca(n)?Array(n.length):[];return sl(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Br(n){var t=Ge(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?!1:n[r]===e&&(e!==B||r in Object(n))}}return function(r){return r===n||Pr(r,n,t)}}function Yr(n,t){return function(r){var e=to(r,n);return e===B&&e===t?eo(r,n):qr(t,e,B,en|un)}}function Zr(n,t,r,e,i){if(n!==t){var a=ns(t)||Ra(t)?B:ao(t);u(a||t,function(u,o){if(a&&(o=u,u=t[o]),Ma(u))i||(i=new Wt),Vr(n,t,o,r,Zr,e,i);else{var c=e?e(n[o],u,o+"",n,t,i):B;c===B&&(c=u),rr(n,o,c)}})}}function Vr(n,t,r,e,u,i,a){var o=n[r],c=t[r],l=a.get(c)||a.get(o);if(l)return void rr(n,r,l);var s=i?i(o,c,r+"",n,t,a):B,f=s===B;f&&(s=c,ns(c)||Ra(c)?s=ns(o)?e?Ae(o):o:la(o)?Ae(o):dr(c):$a(c)||oa(c)?s=oa(o)?Ha(o):!Ma(o)||e&&ya(o)?dr(c):e?dr(o):o:f=!1),a.set(c,s),f&&u(s,c,e,i,a),rr(n,r,s)}function Xr(n,t,r){var e=-1,u=Qe();t=s(t.length?t:Array(1),function(n){return u(n)});var i=Wr(n,function(n,r,u){var i=s(t,function(t){return t(n)});return{criteria:i,index:++e,value:n}});return x(i,function(n,t){return $(n,t,r)})}function Kr(n,t){return n=Object(n),h(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function Jr(n,t){var r={};return Ar(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Qr(n){return function(t){return null==t?B:t[n]}}function Gr(n){return function(t){return Dr(t,n)}}function ne(n,t){return te(n,t)}function te(n,t,r){var e=-1,u=t.length,i=n;for(r&&(i=s(n,function(n){return r(n)}));++e<u;)for(var a=0,o=t[e],c=r?r(o):o;(a=y(i,c,a))>-1;)i!==n&&Uc.call(i,a,1),Uc.call(n,a,1);return n}function re(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=i){var i=u;if(O(u))Uc.call(n,u,1);else if(lu(u,n))delete n[u];else{var a=he(u),o=du(n,a);null!=o&&delete o[Iu(a)]}}}return n}function ee(n,t){return n+Hc(Kc()*(t-n+1))}function ue(n,t,r,e){for(var u=-1,i=Zc(Fc((t-n)/(r||1)),0),a=Array(i);i--;)a[e?i:++u]=n,n+=r;return a}function ie(n,t,r,e){t=lu(t,n)?[t+""]:he(t);for(var u=-1,i=t.length,a=i-1,o=n;null!=o&&++u<i;){var c=t[u];if(Ma(o)){var l=r;if(u!=a){var s=o[c];l=e?e(s,c,o):B,l===B&&(l=null==s?O(t[u+1])?[]:{}:s)}er(o,c,l)}o=o[c]}return n}function ae(n,t,r){var e=-1,u=n.length;0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(u);++e<u;)i[e]=n[e+t];return i}function oe(n,t){var r;return sl(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function ce(n,t,r){var e=0,u=n?n.length:e;if("number"==typeof t&&t===t&&bn>=u){for(;u>e;){var i=e+u>>>1,a=n[i];(r?t>=a:t>a)&&null!==a?e=i+1:u=i}return u}return le(n,t,Xo,r)}function le(n,t,r,e){t=r(t);for(var u=0,i=n?n.length:0,a=t!==t,o=null===t,c=t===B;i>u;){var l=Hc((u+i)/2),s=r(n[l]),f=s!==B,h=s===s;if(a)var p=h||e;else p=o?h&&f&&(e||null!=s):c?h&&(e||f):null==s?!1:e?t>=s:t>s;p?u=l+1:i=l}return Vc(i,Mn)}function se(n){return fe(n)}function fe(n,t){for(var r=0,e=n.length,u=n[0],i=t?t(u):u,a=i,o=0,c=[u];++r<e;)u=n[r],i=t?t(u):u,ua(i,a)||(a=i,c[++o]=u);return c}function he(n){return ns(n)?n:yu(n)}function pe(n,t,r){var e=-1,u=c,i=n.length,a=!0,o=[],s=o;if(r)a=!1,u=l;else if(i>=sn){var f=t?null:vl(n);if(f)return P(f);a=!1,u=Ft,s=new Ut}else s=t?[]:o;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(a&&p===p){for(var g=s.length;g--;)if(s[g]===p)continue n;t&&s.push(p),o.push(h)}else u(s,p,r)||(s!==o&&s.push(p),o.push(h))}return o}function ge(n,t){t=lu(t,n)?[t+""]:he(t),n=du(n,t);var r=Iu(t);return null!=n&&ro(n,r)?delete n[r]:!0}function ve(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?ae(n,e?0:i,e?i+1:u):ae(n,e?i+1:0,e?u:i)}function de(n,t){var r=n;return r instanceof At&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,f([n],t.args))},r)}function me(n,t,r){for(var e=-1,u=n.length;++e<u;)var i=i?f(_r(i,n[e],t,r),_r(n[e],i,t,r)):n[e];return i&&i.length?pe(i,t,r):[]}function ye(n){var t=n.constructor,r=new t(n.byteLength),e=new Tc(r);return e.set(new Tc(n)),r}function _e(t){var r=t.constructor;return h(q(t),n,new r)}function xe(n){var t=n.constructor,r=new t(n.source,vt.exec(n));return r.lastIndex=n.lastIndex,r}function Me(n){var r=n.constructor;return h(P(n),t,new r)}function be(n){return Dc?Object(al.call(n)):{}}function we(n,t){var r=n.buffer,e=n.constructor;return new e(t?ye(r):r,n.byteOffset,n.length)}function ke(n,t,r){for(var e=r.length,u=-1,i=Zc(n.length-e,0),a=-1,o=t.length,c=Array(o+i);++a<o;)c[a]=t[a];for(;++u<e;)c[r[u]]=n[u];for(;i--;)c[a++]=n[u++];return c}function Ce(n,t,r){for(var e=-1,u=r.length,i=-1,a=Zc(n.length-u,0),o=-1,c=t.length,l=Array(a+c);++i<a;)l[i]=n[i];for(var s=i;++o<c;)l[s+o]=t[o];for(;++e<u;)l[s+r[e]]=n[i++];return l}function Ae(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function Se(n,t,r){return Ee(n,t,r)}function Ee(n,t,r,e){r||(r={});for(var u=-1,i=t.length;++u<i;){var a=t[u],o=e?e(r[a],n[a],a,r,n):n[a];er(r,a,o)}return r}function Ne(n,t){return Se(n,yl(n),t)}function $e(n,t){return function(r,e){var u=t?t():{};if(e=Qe(e),ns(r))for(var i=-1,a=r.length;++i<a;){var o=r[i];n(u,o,e(o),r)}else sl(r,function(t,r,i){n(u,t,e(t),i)});return u}}function je(n){return Xi(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:B,a=u>2?r[2]:B;for(i="function"==typeof i?(u--,i):B,a&&cu(r[0],r[1],a)&&(i=3>u?B:i,u=1),t=Object(t);++e<u;){var o=r[e];o&&n(t,o,e,i)}return t})}function De(n,t){return function(r,e){if(null==r)return r;if(!ca(r))return n(r,e);for(var u=r.length,i=t?u:-1,a=Object(r);(t?i--:++i<u)&&e(a[i],i,a)!==!1;);return r}}function Te(n){return function(t,r,e){for(var u=-1,i=Object(t),a=e(t),o=a.length;o--;){var c=a[n?o:++u];if(r(i[c],c,i)===!1)break}return t}}function Le(n,t,r){function e(){var t=this&&this!==Nr&&this instanceof e?i:n;return t.apply(u?r:this,arguments)}var u=t&Z,i=ze(n);return e}function Re(n){return function(t){t=Ba(t);var r=or.test(t)?F(t):B,e=r?r[0]:t.charAt(0),u=r?r.slice(1).join(""):t.slice(1);return e[n]()+u}}function Oe(n){return function(t){return h(Bo(Co(t)),n,"")}}function ze(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=ll(n.prototype),e=n.apply(r,t);return Ma(e)?e:r}}function qe(n,t,e){function u(){for(var a=arguments.length,o=a,c=Array(a),l=this&&this!==Nr&&this instanceof u?i:n,s=u.placeholder;o--;)c[o]=arguments[o];var f=3>a&&c[0]!==s&&c[a-1]!==s?[]:I(c,s);return a-=f.length,e>a?Be(n,t,Pe,s,B,c,f,B,B,e-a):r(l,this,c)}var i=ze(n);return u}function Ie(n){return Xi(function(t){t=Cr(t);var r=t.length,e=r,u=Ct.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new Mc(gn);if(u&&!a&&"wrapper"==Je(i))var a=new Ct([],!0)}for(e=a?e:r;++e<r;){i=t[e];var o=Je(i),c="wrapper"==o?dl(i):B;a=c&&fu(c[0])&&c[1]==(nn|K|Q|tn)&&!c[4].length&&1==c[9]?a[Je(c[0])].apply(a,c[3]):1==i.length&&fu(i)?a[o]():a.thru(i)}return function(){var n=arguments,e=n[0];if(a&&1==n.length&&ns(e)&&e.length>=sn)return a.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Pe(n,t,r,e,u,i,a,o,c,l){function s(){for(var y=arguments.length,_=y,x=Array(y);_--;)x[_]=arguments[_];if(e&&(x=ke(x,e,u)),i&&(x=Ce(x,i,a)),g||v){var M=s.placeholder,b=I(x,M);if(y-=b.length,l>y)return Be(n,t,Pe,M,r,x,b,o,c,l-y)}var w=h?r:this,k=p?w[n]:n;return o?x=mu(x,o):d&&x.length>1&&x.reverse(),f&&c<x.length&&(x.length=c),this&&this!==Nr&&this instanceof s&&(k=m||ze(k)),k.apply(w,x)}var f=t&nn,h=t&Z,p=t&V,g=t&K,v=t&J,d=t&rn,m=p?B:ze(n);return s}function Ue(n){return Xi(function(t){return t=s(Cr(t),Qe()),Xi(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function Fe(n,t,r){t=Pa(t);var e=U(n);if(!t||e>=t)return"";var u=t-e;r=r===B?" ":r+"";var i=To(r,Fc(u/U(r)));return or.test(r)?F(i).slice(0,u).join(""):i.slice(0,u)}function He(n,t,e,u){function i(){for(var t=-1,c=arguments.length,l=-1,s=u.length,f=Array(s+c),h=this&&this!==Nr&&this instanceof i?o:n;++l<s;)f[l]=u[l];for(;c--;)f[l++]=arguments[++t];return r(h,a?e:this,f)}var a=t&Z,o=ze(n);return i}function We(n){return function(t,r,e){return e&&"number"!=typeof e&&cu(t,r,e)&&(r=e=B),t=Fa(t),t=t===t?t:0,r===B?(r=t,t=0):r=Fa(r)||0,e=e===B?r>t?1:-1:Fa(e)||0,ue(t,r,e,n)}}function Be(n,t,r,e,u,i,a,o,c,l){var s=t&K,f=o?Ae(o):B,h=s?a:B,p=s?B:a,g=s?i:B,v=s?B:i;t|=s?Q:G,t&=~(s?G:Q),t&X||(t&=~(Z|V));var d=[n,t,u,g,h,v,p,f,c,l],m=r.apply(B,d);return fu(n)&&_l(m,d),m.placeholder=e,m}function Ye(n){var t=_c[n];return function(n,r){if(n=Fa(n),r=Pa(r)){var e=(Ba(n)+"e").split("e"),u=t(e[0]+"e"+(+e[1]+r));return e=(Ba(u)+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function Ze(n,t,r,e,u,i,a,o){var c=t&V;if(!c&&"function"!=typeof n)throw new Mc(gn);var l=e?e.length:0;if(l||(t&=~(Q|G),e=u=B),a=a===B?a:Zc(Pa(a),0),o=o===B?o:Pa(o),l-=u?u.length:0,t&G){var s=e,f=u;e=u=B}var h=c?B:dl(n),p=[n,t,r,e,u,s,f,i,a,o];if(h&&gu(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],o=p[9]=null==p[9]?c?0:n.length:Zc(p[9]-l,0),!o&&t&(K|J)&&(t&=~(K|J)),t&&t!=Z)g=t==K||t==J?qe(n,t,o):t!=Q&&t!=(Z|Q)||u.length?Pe.apply(B,p):He(n,t,r,e);else var g=Le(n,t,r);var v=h?gl:_l;return v(g,p)}function Ve(n,t,r,e,u,i){var a=-1,o=u&un,c=u&en,l=n.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var f=i.get(n);if(f)return f==t;var h=!0;for(i.set(n,t);++a<l;){var p=n[a],v=t[a];if(e)var d=o?e(v,p,a,t,n,i):e(p,v,a,n,t,i);if(d!==B){if(d)continue;h=!1;break}if(c){if(!g(t,function(n){return p===n||r(p,n,e,u,i)})){h=!1;break}}else if(p!==v&&!r(p,v,e,u,i)){h=!1;break}}return i["delete"](n),h}function Xe(n,t,r,e,u,i){switch(r){case In:return n.byteLength==t.byteLength&&e(new Tc(n),new Tc(t))?!0:!1;case An:case Sn:return+n==+t;case En:return n.name==t.name&&n.message==t.message;case Dn:return n!=+n?t!=+t:n==+t;case Ln:case On:return n==t+"";case jn:var a=q;case Rn:var o=i&un;return a||(a=P),(o||n.size==t.size)&&e(a(n),a(t),u,i|en);case zn:return!!Dc&&al.call(n)==al.call(t)}return!1}function Ke(n,t,r,e,u,i){var a=u&un,o=io(n),c=o.length,l=io(t),s=l.length;if(c!=s&&!a)return!1;for(var f=c;f--;){var h=o[f];if(!(a?h in t:Tr(t,h)))return!1}var p=i.get(n);if(p)return p==t;var g=!0;i.set(n,t);for(var v=a;++f<c;){h=o[f];var d=n[h],m=t[h];if(e)var y=a?e(m,d,h,t,n,i):e(d,m,h,n,t,i);if(!(y===B?d===m||r(d,m,e,u,i):y)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var _=n.constructor,x=t.constructor;_!=x&&"constructor"in n&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(g=!1)}return i["delete"](n),g}function Je(n){for(var t=n.name+"",r=cl[t],e=Cc.call(cl,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function Qe(){var n=qn.iteratee||Ko;return n=n===Ko?Ur:n,arguments.length?n(arguments[0],arguments[1]):n}function Ge(n){for(var t=go(n),r=t.length;r--;)t[r][2]=pu(t[r][1]);return t}function nu(n,t){var r=null==n?B:n[t];return Aa(r)?r:B}function tu(n){return Ec.call(n)}function ru(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],a=i.size;switch(i.type){case"drop":n+=a;break;case"dropRight":t-=a;break;case"take":t=Vc(t,n+a);break;case"takeRight":n=Zc(n,t-a)}}return{start:n,end:t}}function eu(n,t,r){if(null==n)return!1;var e=r(n,t);return e||lu(t)||(t=he(t),n=du(n,t),null!=n&&(t=Iu(t),e=r(n,t))),e||xa(n&&n.length)&&O(t,n.length)&&(ns(n)||Ta(n)||oa(n))}function uu(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&Cc.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function iu(n){var t=n.constructor;return ll(ya(t)?t.prototype:B)}function au(n,t,r){var e=n.constructor;switch(t){case In:return ye(n);case An:case Sn:return new e(+n);case Pn:case Un:case Fn:case Hn:case Wn:case Bn:case Yn:case Zn:case Vn:return we(n,r);case jn:return _e(n);case Dn:case On:return new e(n);case Ln:return xe(n);case Rn:return Me(n);case zn:return be(n)}}function ou(n){var t=n?n.length:B;return xa(t)&&(ns(n)||Ta(n)||oa(n))?b(t,String):null}function cu(n,t,r){if(!Ma(r))return!1;var e=typeof t;return("number"==e?ca(r)&&O(t,r.length):"string"==e&&t in r)?ua(r[t],n):!1}function lu(n,t){return"number"==typeof n?!0:!ns(n)&&(at.test(n)||!it.test(n)||null!=t&&n in Object(t))}function su(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!==n||null==n}function fu(n){var t=Je(n),r=qn[t];if("function"!=typeof r||!(t in At.prototype))return!1;if(n===r)return!0;var e=dl(r);return!!e&&n===e[0]}function hu(n){var t=n&&n.constructor,r="function"==typeof t&&t.prototype||wc;return n===r}function pu(n){return n===n&&!Ma(n)}function gu(n,t){var r=n[1],e=t[1],u=r|e,i=(Z|V|nn)>u,a=e==nn&&r==K||e==nn&&r==tn&&n[7].length<=t[8]||e==(nn|tn)&&t[7].length<=t[8]&&r==K;if(!i&&!a)return n;e&Z&&(n[2]=t[2],u|=r&Z?0:X);var o=t[3];if(o){var c=n[3];n[3]=c?ke(c,o,t[4]):Ae(o),n[4]=c?I(n[3],wn):Ae(t[4])}return o=t[5],o&&(c=n[5],n[5]=c?Ce(c,o,t[6]):Ae(o),n[6]=c?I(n[5],wn):Ae(t[6])),o=t[7],o&&(n[7]=Ae(o)),e&nn&&(n[8]=null==n[8]?t[8]:Vc(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function vu(n,t,r,e,u,i){return Ma(n)&&Ma(t)&&(i.set(t,n),Zr(n,t,B,vu,i)),n}function du(n,t){return 1==t.length?n:to(n,ae(t,0,-1))}function mu(n,t){for(var r=n.length,e=Vc(t.length,r),u=Ae(n);e--;){var i=t[e];n[e]=O(i,r)?u[i]:B}return n}function yu(n){var t=[];return Ba(n).replace(ot,function(n,r,e,u){t.push(e?u.replace(pt,"$1"):r||n)}),t}function _u(n){return la(n)?n:[]}function xu(n){return"function"==typeof n?n:Xo}function Mu(n){if(n instanceof At)return n.clone();var t=new Ct(n.__wrapped__,n.__chain__);return t.__actions__=Ae(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function bu(n,t){t=Zc(Pa(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,i=Array(Fc(r/t));r>e;)i[++u]=ae(n,e,e+=t);return i}function wu(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var i=n[t];i&&(u[++e]=i)}return u}function ku(n,t,r){var e=n?n.length:0;return e?(t=r||t===B?1:Pa(t),ae(n,0>t?0:t,e)):[]}function Cu(n,t,r){var e=n?n.length:0;return e?(t=r||t===B?1:Pa(t),t=e-t,ae(n,0,0>t?0:t)):[]}function Au(n,t){return n&&n.length?ve(n,Qe(t,3),!0,!0):[]}function Su(n,t){return n&&n.length?ve(n,Qe(t,3),!0):[]}function Eu(n,t,r,e){var u=n?n.length:0;return u?(r&&"number"!=typeof r&&cu(n,t,r)&&(r=0,e=u),wr(n,t,r,e)):[]}function Nu(n,t){return n&&n.length?m(n,Qe(t,3)):-1}function $u(n,t){return n&&n.length?m(n,Qe(t,3),!0):-1}function ju(n,t){var r=n?n.length:0;return r?Cr(s(n,Qe(t,3))):[]}function Du(n){var t=n?n.length:0;return t?Cr(n):[]}function Tu(n){var t=n?n.length:0;return t?Cr(n,!0):[]}function Lu(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function Ru(n){return n?n[0]:B}function Ou(n,t,r){var e=n?n.length:0;return e?(r=Pa(r),0>r&&(r=Zc(e+r,0)),y(n,t,r)):-1}function zu(n){return Cu(n,1)}function qu(n,t){return n?Bc.call(n,t):""}function Iu(n){var t=n?n.length:0;return t?n[t-1]:B}function Pu(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==B&&(u=Pa(r),u=(0>u?Zc(e+u,0):Vc(u,e-1))+1),t!==t)return L(n,u,!0);for(;u--;)if(n[u]===t)return u;return-1}function Uu(n,t){return n&&n.length&&t&&t.length?ne(n,t):n}function Fu(n,t,r){return n&&n.length&&t&&t.length?te(n,t,Qe(r)):n}function Hu(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=Qe(t,3);++e<i;){var a=n[e];t(a,e,n)&&(r.push(a),u.push(e))}return re(n,u),r}function Wu(n){return n?Jc.call(n):n}function Bu(n,t,r){var e=n?n.length:0;return e?(r&&"number"!=typeof r&&cu(n,t,r)?(t=0,r=e):(t=null==t?0:Pa(t),r=r===B?e:Pa(r)),ae(n,t,r)):[]}function Yu(n,t){return ce(n,t)}function Zu(n,t,r){return le(n,t,Qe(r))}function Vu(n,t){var r=n?n.length:0;if(r){var e=ce(n,t);if(r>e&&ua(n[e],t))return e}return-1}function Xu(n,t){return ce(n,t,!0)}function Ku(n,t,r){return le(n,t,Qe(r),!0)}function Ju(n,t){var r=n?n.length:0;if(r){var e=ce(n,t,!0)-1;if(ua(n[e],t))return e}return-1}function Qu(n){return n&&n.length?se(n):[]}function Gu(n,t){return n&&n.length?fe(n,Qe(t)):[]}function ni(n){return ku(n,1)}function ti(n,t,r){return n&&n.length?(t=r||t===B?1:Pa(t),ae(n,0,0>t?0:t)):[]}function ri(n,t,r){var e=n?n.length:0;return e?(t=r||t===B?1:Pa(t),t=e-t,ae(n,0>t?0:t,e)):[]}function ei(n,t){return n&&n.length?ve(n,Qe(t,3),!1,!0):[]}function ui(n,t){return n&&n.length?ve(n,Qe(t,3)):[]}function ii(n){return n&&n.length?pe(n):[]}function ai(n,t){return n&&n.length?pe(n,Qe(t)):[]}function oi(n,t){return n&&n.length?pe(n,B,t):[]}function ci(n){if(!n||!n.length)return[];var t=0;return n=o(n,function(n){return la(n)?(t=Zc(n.length,t),!0):void 0}),b(t,function(t){return s(n,Qr(t))})}function li(n,t){if(!n||!n.length)return[];var e=ci(n);return null==t?e:s(e,function(n){return r(t,B,n)})}function si(n,t){for(var r=-1,e=n?n.length:0,u=t?t.length:0,i={};++r<e;)ie(i,n[r],u>r?t[r]:B);return i}function fi(n){var t=qn(n);return t.__chain__=!0,t}function hi(n,t){return t(n),n}function pi(n,t){return t(n)}function gi(){return fi(this)}function vi(){return new Ct(this.value(),this.__chain__)}function di(n){return this.map(n).flatten()}function mi(){this.__values__===B&&(this.__values__=Ia(this.value()));var n=this.__index__>=this.__values__.length,t=n?B:this.__values__[this.__index__++];return{done:n,value:t}}function yi(){return this}function _i(n){for(var t,r=this;r instanceof Mt;){var e=Mu(r);e.__index__=0,e.__values__=B,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function xi(){var n=this.__wrapped__;if(n instanceof At){var t=n;return this.__actions__.length&&(t=new At(this)),t=t.reverse(),t.__actions__.push({func:pi,args:[Wu],thisArg:B}),new Ct(t,this.__chain__)}return this.thru(Wu)}function Mi(){return de(this.__wrapped__,this.__actions__)}function bi(n,t,r){var e=ns(n)?a:br;return r&&cu(n,t,r)&&(t=B),e(n,Qe(t,3))}function wi(n,t){var r=ns(n)?o:kr;return r(n,Qe(t,3))}function ki(n,t){if(t=Qe(t,3),ns(n)){var r=m(n,t);return r>-1?n[r]:B}return d(n,t,sl)}function Ci(n,t){if(t=Qe(t,3),ns(n)){var r=m(n,t,!0);return r>-1?n[r]:B}return d(n,t,fl)}function Ai(n,t){return"function"==typeof t&&ns(n)?u(n,t):sl(n,xu(t))}function Si(n,t){return"function"==typeof t&&ns(n)?i(n,t):fl(n,xu(t))}function Ei(n,t,r,e){n=ca(n)?n:_o(n),r=r&&!e?Pa(r):0;var u=n.length;return 0>r&&(r=Zc(u+r,0)),Ta(n)?u>=r&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function Ni(n,t){var r=ns(n)?s:Wr;return r(n,Qe(t,3))}function $i(n,t,r,e){return null==n?[]:(ns(t)||(t=null==t?[]:[t]),r=e?B:r,ns(r)||(r=null==r?[]:[r]),Xr(n,t,r))}function ji(n,t,r){var e=ns(n)?h:_,u=arguments.length<3;return e(n,Qe(t,4),r,u,sl)}function Di(n,t,r){var e=ns(n)?p:_,u=arguments.length<3;return e(n,Qe(t,4),r,u,fl)}function Ti(n,t){var r=ns(n)?o:kr;return t=Qe(t,3),r(n,function(n,r,e){return!t(n,r,e)})}function Li(n){var t=ca(n)?n:_o(n),r=t.length;return r>0?t[ee(0,r-1)]:B}function Ri(n,t){var r=-1,e=Ia(n),u=e.length,i=u-1;for(t=vr(Pa(t),0,u);++r<t;){var a=ee(r,i),o=e[a];e[a]=e[r],e[r]=o}return e.length=t,e}function Oi(n){return Ri(n,xn)}function zi(n){if(null==n)return 0;if(ca(n)){var t=n.length;return t&&Ta(n)?U(n):t}return io(n).length}function qi(n,t,r){var e=ns(n)?g:oe;return r&&cu(n,t,r)&&(t=B),e(n,Qe(t,3))}function Ii(n,t){if("function"!=typeof t)throw new Mc(gn);return n=Pa(n),function(){return--n<1?t.apply(this,arguments):void 0}}function Pi(n,t,r){return t=r?B:t,t=n&&null==t?n.length:t,Ze(n,nn,B,B,B,B,t)}function Ui(n,t){var r;if("function"!=typeof t)throw new Mc(gn);return n=Pa(n),function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=B),r}}function Fi(n,t,r){t=r?B:t;var e=Ze(n,K,B,B,B,B,B,t);return e.placeholder=Fi.placeholder,e}function Hi(n,t,r){t=r?B:t;var e=Ze(n,J,B,B,B,B,B,t);return e.placeholder=Hi.placeholder,e}function Wi(n,t,r){function e(){g&&Lc(g),s&&Lc(s),d=0,l=s=p=g=v=B}function u(t,r){r&&Lc(r),s=g=v=B,t&&(d=Bl(),f=n.apply(p,l),g||s||(l=p=B))}function i(){var n=t-(Bl()-h);0>=n||n>t?u(v,s):g=Pc(i,n)}function a(){return(g&&v||s&&_)&&(f=n.apply(p,l)),e(),f}function o(){u(_,g)}function c(){if(l=arguments,h=Bl(),p=this,v=_&&(g||!m),y===!1)var r=m&&!g;else{s||m||(d=h);var e=y-(h-d),u=0>=e||e>y;u?(s&&(s=Lc(s)),d=h,f=n.apply(p,l)):s||(s=Pc(o,e))}return u&&g?g=Lc(g):g||t===y||(g=Pc(i,t)),r&&(u=!0,f=n.apply(p,l)),!u||g||s||(l=p=B),f}var l,s,f,h,p,g,v,d=0,m=!1,y=!1,_=!0;if("function"!=typeof n)throw new Mc(gn);return t=Fa(t)||0,Ma(r)&&(m=!!r.leading,y="maxWait"in r&&Zc(Fa(r.maxWait)||0,t),_="trailing"in r?!!r.trailing:_),c.cancel=e,c.flush=a,c}function Bi(n){return Ze(n,rn)}function Yi(n,t){if("function"!=typeof n||t&&"function"!=typeof t)throw new Mc(gn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var a=n.apply(this,e);return r.cache=i.set(u,a),a};return r.cache=new Yi.Cache,r}function Zi(n){if("function"!=typeof n)throw new Mc(gn);return function(){return!n.apply(this,arguments)}}function Vi(n){return Ui(2,n)}function Xi(n,t){if("function"!=typeof n)throw new Mc(gn);return t=Zc(t===B?n.length-1:Pa(t),0),function(){for(var e=arguments,u=-1,i=Zc(e.length-t,0),a=Array(i);++u<i;)a[u]=e[t+u];switch(t){case 0:return n.call(this,a);case 1:return n.call(this,e[0],a);case 2:return n.call(this,e[0],e[1],a)}var o=Array(t+1);for(u=-1;++u<t;)o[u]=e[u];return o[t]=a,r(n,this,o)}}function Ki(n){if("function"!=typeof n)throw new Mc(gn);return function(t){return r(n,this,t)}}function Ji(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Mc(gn);return Ma(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Wi(n,t,{leading:e,maxWait:t,trailing:u})}function Qi(n){return Pi(n,1)}function Gi(n,t){return t=null==t?Xo:t,Jl(t,n)}function na(n){return dr(n)}function ta(n,t){return dr(n,!1,t)}function ra(n){return dr(n,!0)}function ea(n,t){return dr(n,!0,t)}function ua(n,t){return n===t||n!==n&&t!==t}function ia(n,t){return n>t}function aa(n,t){return n>=t}function oa(n){return la(n)&&Cc.call(n,"callee")&&(!Ic.call(n,"callee")||Ec.call(n)==kn)}function ca(n){return null!=n&&!("function"==typeof n&&ya(n))&&xa(ml(n))}function la(n){return ba(n)&&ca(n)}function sa(n){return n===!0||n===!1||ba(n)&&Ec.call(n)==An}function fa(n){return ba(n)&&Ec.call(n)==Sn}function ha(n){return!!n&&1===n.nodeType&&ba(n)&&!$a(n)}function pa(n){return!ba(n)||ya(n.splice)?!zi(n):!io(n).length}function ga(n,t){return qr(n,t)}function va(n,t,r){r="function"==typeof r?r:B;var e=r?r(n,t):B;return e===B?qr(n,t,r):!!e}function da(n){return ba(n)&&"string"==typeof n.message&&Ec.call(n)==En}function ma(n){return"number"==typeof n&&Wc(n)}function ya(n){var t=Ma(n)?Ec.call(n):"";return t==Nn||t==$n}function _a(n){return"number"==typeof n&&n==Pa(n)}function xa(n){return"number"==typeof n&&n>-1&&n%1==0&&mn>=n}function Ma(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ba(n){return!!n&&"object"==typeof n}function wa(n,t){return n===t||Pr(n,t,Ge(t))}function ka(n,t,r){return r="function"==typeof r?r:B,Pr(n,t,Ge(t),r)}function Ca(n){return Na(n)&&n!=+n}function Aa(n){return null==n?!1:ya(n)?$c.test(kc.call(n)):ba(n)&&(R(n)?$c:_t).test(n)}function Sa(n){return null===n}function Ea(n){return null==n}function Na(n){return"number"==typeof n||ba(n)&&Ec.call(n)==Dn}function $a(n){if(!ba(n)||Ec.call(n)!=Tn||R(n))return!1;var t=wc;if("function"==typeof n.constructor&&(t=Oc(n)),null===t)return!0;var r=t.constructor;return"function"==typeof r&&r instanceof r&&kc.call(r)==Sc}function ja(n){return Ma(n)&&Ec.call(n)==Ln}function Da(n){return _a(n)&&n>=-mn&&mn>=n}function Ta(n){return"string"==typeof n||!ns(n)&&ba(n)&&Ec.call(n)==On}function La(n){return"symbol"==typeof n||ba(n)&&Ec.call(n)==zn}function Ra(n){return ba(n)&&xa(n.length)&&!!pr[Ec.call(n)]}function Oa(n){return n===B}function za(n,t){return t>n}function qa(n,t){return t>=n}function Ia(n){if(!n)return[];if(ca(n))return Ta(n)?F(n):Ae(n);if(qc&&n[qc])return z(n[qc]());var t=tu(n),r=t==jn?q:t==Rn?P:_o;return r(n)}function Pa(n){if(!n)return 0===n?n:0;if(n=Fa(n),n===dn||n===-dn){var t=0>n?-1:1;return t*yn}var r=n%1;return n===n?r?n-r:n:0}function Ua(n){return n?vr(Pa(n),0,xn):0}function Fa(n){if(Ma(n)){var t=ya(n.valueOf)?n.valueOf():n;n=Ma(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(st,"");var r=yt.test(n);return r||xt.test(n)?Mr(n.slice(2),r?2:8):mt.test(n)?_n:+n}function Ha(n){return Se(n,ao(n))}function Wa(n){return vr(Pa(n),-mn,mn)}function Ba(n){if("string"==typeof n)return n;if(null==n)return"";if(La(n))return Dc?ol.call(n):"";var t=n+"";return"0"==t&&1/n==-dn?"-0":t}function Ya(n,t){var r=ll(n);return t?ur(r,t):r}function Za(n,t){return d(n,Qe(t,3),Sr,!0)}function Va(n,t){return d(n,Qe(t,3),Er,!0)}function Xa(n,t){return null==n?n:hl(n,xu(t),ao)}function Ka(n,t){return null==n?n:pl(n,xu(t),ao)}function Ja(n,t){return n&&Sr(n,xu(t))}function Qa(n,t){return n&&Er(n,xu(t))}function Ga(n){return null==n?[]:jr(n,io(n))}function no(n){return null==n?[]:jr(n,ao(n))}function to(n,t,r){var e=null==n?B:Dr(n,t);return e===B?r:e}function ro(n,t){return eu(n,t,Tr)}function eo(n,t){return eu(n,t,Lr)}function uo(n,t,r){return h(io(n),function(e,u){var i=n[u];return t&&!r?Cc.call(e,i)?e[i].push(u):e[i]=[u]:e[i]=u,e},{})}function io(n){var t=hu(n);if(!t&&!ca(n))return Fr(n);var r=ou(n),e=!!r,u=r||[],i=u.length;for(var a in n)!Tr(n,a)||e&&("length"==a||O(a,i))||t&&"constructor"==a||u.push(a);return u}function ao(n){for(var t=-1,r=hu(n),e=Hr(n),u=e.length,i=ou(n),a=!!i,o=i||[],c=o.length;++t<u;){var l=e[t];a&&("length"==l||O(l,c))||"constructor"==l&&(r||!Cc.call(n,l))||o.push(l)}return o}function oo(n,t){var r={};return t=Qe(t,3),Sr(n,function(n,e,u){r[t(n,e,u)]=n}),r}function co(n,t){var r={};return t=Qe(t,3),Sr(n,function(n,e,u){r[e]=t(n,e,u)}),r}function lo(n,t){return t=Qe(t,2),Jr(n,function(n,r){return!t(n,r)})}function so(n,t){return null==n?{}:Jr(n,Qe(t,2))}function fo(n,t,r){if(lu(t,n))e=null==n?B:n[t];else{t=he(t);var e=to(n,t);n=du(n,t)}return e===B&&(e=r),ya(e)?e.call(n):e}function ho(n,t,r){return null==n?n:ie(n,t,r)}function po(n,t,r,e){return e="function"==typeof e?e:B,null==n?n:ie(n,t,r,e)}function go(n){return w(n,io(n))}function vo(n){return w(n,ao(n))}function mo(n,t,r){var e=ns(n)||Ra(n);if(t=Qe(t,4),null==r)if(e||Ma(n)){var i=n.constructor;r=e?ns(n)?new i:[]:ll(ya(i)?i.prototype:B)}else r={};return(e?u:Sr)(n,function(n,e,u){return t(r,n,e,u)}),r}function yo(n,t){return null==n?!0:ge(n,t)}function _o(n){return n?C(n,io(n)):[]}function xo(n){return null==n?C(n,ao(n)):[]}function Mo(n,t,r){return r===B&&(r=t,t=B),r!==B&&(r=Fa(r),r=r===r?r:0),t!==B&&(t=Fa(t),t=t===t?t:0),vr(Fa(n),t,r)}function bo(n,t,r){return t=Fa(t)||0,r===B?(r=t,t=0):r=Fa(r)||0,n=Fa(n),Rr(n,t,r)}function wo(n,t,r){if(r&&"boolean"!=typeof r&&cu(n,t,r)&&(t=r=B),r===B&&("boolean"==typeof t?(r=t,t=B):"boolean"==typeof n&&(r=n,n=B)),n===B&&t===B?(n=0,t=1):(n=Fa(n)||0,t===B?(t=n,n=0):t=Fa(t)||0),n>t){var e=n;n=t,t=e}if(r||n%1||t%1){var u=Kc();return Vc(n+u*(t-n+xr("1e-"+((u+"").length-1))),t)}return ee(n,t)}function ko(n){return ms(Ba(n).toLowerCase())}function Co(n){return n=Ba(n),n&&n.replace(bt,j).replace(ir,"")}function Ao(n,t,r){n=Ba(n),t="string"==typeof t?t:t+"";var e=n.length;return r=r===B?e:vr(Pa(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r}function So(n){return n=Ba(n),n&&tt.test(n)?n.replace(Gn,D):n}function Eo(n){return n=Ba(n),n&&lt.test(n)?n.replace(ct,"\\$&"):n}function No(n,t,r){n=Ba(n),t=Pa(t);var e=U(n);if(!t||e>=t)return n;var u=(t-e)/2,i=Hc(u),a=Fc(u);return Fe("",i,r)+n+Fe("",a,r)}function $o(n,t,r){return n=Ba(n),n+Fe(n,t,r)}function jo(n,t,r){return n=Ba(n),Fe(n,t,r)+n}function Do(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Ba(n).replace(st,""),Xc(n,t||(dt.test(n)?16:10))}function To(n,t){n=Ba(n),t=Pa(t);var r="";if(!n||1>t||t>mn)return r;do t%2&&(r+=n),t=Hc(t/2),n+=n;while(t);return r}function Lo(){var n=arguments,t=Ba(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function Ro(n,t,r){return Ba(n).split(t,r)}function Oo(n,t,r){return n=Ba(n),r=vr(Pa(r),0,n.length),n.lastIndexOf(t,r)==r}function zo(n,t,r){var e=qn.templateSettings;r&&cu(n,t,r)&&(t=B),n=Ba(n),t=es({},t,e,tr);var u,i,a=es({},t.imports,e.imports,tr),o=io(a),c=C(a,o),l=0,s=t.interpolate||wt,f="__p += '",h=xc((t.escape||wt).source+"|"+s.source+"|"+(s===ut?gt:wt).source+"|"+(t.evaluate||wt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++hr+"]")+"\n";n.replace(h,function(t,r,e,a,o,c){return e||(e=a),f+=n.slice(l,c).replace(kt,T),r&&(u=!0,f+="' +\n__e("+r+") +\n'"),o&&(i=!0,f+="';\n"+o+";\n__p += '"),e&&(f+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=c+t.length,t}),f+="';\n";var g=t.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(Xn,""):f).replace(Kn,"$1").replace(Jn,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Ms(function(){return Function(o,p+"return "+f).apply(B,c)});if(v.source=f,da(v))throw v;return v}function qo(n){return Ba(n).toLowerCase()}function Io(n){return Ba(n).toUpperCase()}function Po(n,t,r){if(n=Ba(n),!n)return n;if(r||t===B)return n.replace(st,"");if(t+="",!t)return n;var e=F(n),u=F(t);return e.slice(A(e,u),S(e,u)+1).join("")}function Uo(n,t,r){if(n=Ba(n),!n)return n;if(r||t===B)return n.replace(ht,"");if(t+="",!t)return n;var e=F(n);return e.slice(0,S(e,F(t))+1).join("")}function Fo(n,t,r){if(n=Ba(n),!n)return n;if(r||t===B)return n.replace(ft,"");if(t+="",!t)return n;var e=F(n);return e.slice(A(e,F(t))).join("")}function Ho(n,t){var r=an,e=on;if(Ma(t)){var u="separator"in t?t.separator:u;r="length"in t?Pa(t.length):r,e="omission"in t?Ba(t.omission):e}n=Ba(n);var i=n.length;if(or.test(n)){var a=F(n);i=a.length}if(r>=i)return n;var o=r-U(e);if(1>o)return e;var c=a?a.slice(0,o).join(""):n.slice(0,o);if(u===B)return c+e;
+if(a&&(o+=c.length-o),ja(u)){if(n.slice(o).search(u)){var l,s=c;for(u.global||(u=xc(u.source,Ba(vt.exec(u))+"g")),u.lastIndex=0;l=u.exec(s);)var f=l.index;c=c.slice(0,f===B?o:f)}}else if(n.indexOf(u,o)!=o){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Wo(n){return n=Ba(n),n&&nt.test(n)?n.replace(Qn,H):n}function Bo(n,t,r){return n=Ba(n),t=r?B:t,t===B&&(t=sr.test(n)?lr:cr),n.match(t)||[]}function Yo(n){var t=n?n.length:0,e=Qe();return n=t?s(n,function(n){if("function"!=typeof n[1])throw new Mc(gn);return[e(n[0]),n[1]]}):[],Xi(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})}function Zo(n){return mr(dr(n,!0))}function Vo(n){return function(){return n}}function Xo(n){return n}function Ko(n){return ba(n)&&!ns(n)?Jo(n):Ur(n)}function Jo(n){return Br(dr(n,!0))}function Qo(n,t){return Yr(n,dr(t,!0))}function Go(n,t,r){var e=io(t),i=jr(t,e);null!=r||Ma(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=jr(t,io(t)));var a=Ma(r)&&"chain"in r?r.chain:!0,o=ya(n);return u(i,function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=n(this.__wrapped__),u=r.__actions__=Ae(this.__actions__);return u.push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,f([this.value()],arguments))})}),n}function nc(){return Nr._===this&&(Nr._=Nc),this}function tc(){}function rc(n){return n=Pa(n),function(){return arguments[n]}}function ec(n){return lu(n)?Qr(n):Gr(n)}function uc(n){return function(t){return null==n?B:Dr(n,t)}}function ic(n,t){if(n=Pa(n),1>n||n>mn)return[];var r=xn,e=Vc(n,xn);t=xu(t),n-=xn;for(var u=b(e,t);++r<n;)t(r);return u}function ac(n){return ns(n)?s(n,String):yu(n)}function oc(n){var t=++Ac;return Ba(n)+t}function cc(n,t){var r;return n!==B&&(r=n),t!==B&&(r=r===B?t:r+t),r}function lc(n){return n&&n.length?v(n,Xo,ia):B}function sc(n,t){return n&&n.length?v(n,Qe(t),ia):B}function fc(n){return vc(n)/(n?n.length:0)}function hc(n){return n&&n.length?v(n,Xo,za):B}function pc(n,t){return n&&n.length?v(n,Qe(t),za):B}function gc(n,t){var r;return n!==B&&(r=n),t!==B&&(r=r===B?t:r-t),r}function vc(n){return n&&n.length?M(n,Xo):B}function dc(n,t){return n&&n.length?M(n,Qe(t)):B}E=E?$r.defaults({},E,$r.pick(Nr,fr)):Nr;var mc=E.Date,yc=E.Error,_c=E.Math,xc=E.RegExp,Mc=E.TypeError,bc=E.Array.prototype,wc=E.Object.prototype,kc=E.Function.prototype.toString,Cc=wc.hasOwnProperty,Ac=0,Sc=kc.call(Object),Ec=wc.toString,Nc=Nr._,$c=xc("^"+kc.call(Cc).replace(ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jc=E.Reflect,Dc=E.Symbol,Tc=E.Uint8Array,Lc=E.clearTimeout,Rc=jc?jc.enumerate:B,Oc=Object.getPrototypeOf,zc=Object.getOwnPropertySymbols,qc="symbol"==typeof(qc=Dc&&Dc.iterator)?qc:B,Ic=wc.propertyIsEnumerable,Pc=E.setTimeout,Uc=bc.splice,Fc=_c.ceil,Hc=_c.floor,Wc=E.isFinite,Bc=bc.join,Yc=Object.keys,Zc=_c.max,Vc=_c.min,Xc=E.parseInt,Kc=_c.random,Jc=bc.reverse,Qc=nu(E,"Map"),Gc=nu(E,"Set"),nl=nu(E,"WeakMap"),tl=nu(Object,"create"),rl=nl&&new nl,el=Qc?kc.call(Qc):"",ul=Gc?kc.call(Gc):"",il=Dc?Dc.prototype:B,al=Dc?il.valueOf:B,ol=Dc?il.toString:B,cl={};qn.templateSettings={escape:rt,evaluate:et,interpolate:ut,variable:"",imports:{_:qn}};var ll=function(){function n(){}return function(t){if(Ma(t)){n.prototype=t;var r=new n;n.prototype=B}return r||{}}}(),sl=De(Sr),fl=De(Er,!0),hl=Te(),pl=Te(!0);Rc&&!Ic.call({valueOf:1},"valueOf")&&(Hr=function(n){return z(Rc(n))});var gl=rl?function(n,t){return rl.set(n,t),n}:Xo,vl=Gc&&2===new Gc([1,2]).size?function(n){return new Gc(n)}:tc,dl=rl?function(n){return rl.get(n)}:tc,ml=Qr("length"),yl=zc||function(){return[]};(Qc&&tu(new Qc)!=jn||Gc&&tu(new Gc)!=Rn)&&(tu=function(n){var t=Ec.call(n),r=t==Tn?n.constructor:null,e="function"==typeof r?kc.call(r):"";if(e){if(e==el)return jn;if(e==ul)return Rn}return t});var _l=function(){var n=0,t=0;return function(r,e){var u=Bl(),i=ln-(u-t);if(t=u,i>0){if(++n>=cn)return r}else n=0;return gl(r,e)}}(),xl=Xi(function(n,t){return ns(n)||(n=null==n?[]:[Object(n)]),t=Cr(t),e(n,t)}),Ml=Xi(function(n,t){return la(n)?_r(n,Cr(t,!1,!0)):[]}),bl=Xi(function(n,t){var r=Iu(t);return la(r)&&(r=B),la(n)?_r(n,Cr(t,!1,!0),Qe(r)):[]}),wl=Xi(function(n,t){var r=Iu(t);return la(r)&&(r=B),la(n)?_r(n,Cr(t,!1,!0),B,r):[]}),kl=Xi(function(n){var t=s(n,_u);return t.length&&t[0]===n[0]?Or(t):[]}),Cl=Xi(function(n){var t=Iu(n),r=s(n,_u);return t===Iu(r)?t=B:r.pop(),r.length&&r[0]===n[0]?Or(r,Qe(t)):[]}),Al=Xi(function(n){var t=Iu(n),r=s(n,_u);return t===Iu(r)?t=B:r.pop(),r.length&&r[0]===n[0]?Or(r,B,t):[]}),Sl=Xi(Uu),El=Xi(function(n,t){t=s(Cr(t),String);var r=ar(n,t);return re(n,t.sort(N)),r}),Nl=Xi(function(n){return pe(Cr(n,!1,!0))}),$l=Xi(function(n){var t=Iu(n);return la(t)&&(t=B),pe(Cr(n,!1,!0),Qe(t))}),jl=Xi(function(n){var t=Iu(n);return la(t)&&(t=B),pe(Cr(n,!1,!0),B,t)}),Dl=Xi(function(n,t){return la(n)?_r(n,t):[]}),Tl=Xi(function(n){return me(o(n,la))}),Ll=Xi(function(n){var t=Iu(n);return la(t)&&(t=B),me(o(n,la),Qe(t))}),Rl=Xi(function(n){var t=Iu(n);return la(t)&&(t=B),me(o(n,la),B,t)}),Ol=Xi(ci),zl=Xi(function(n){var t=n.length,r=t>1?n[t-1]:B;return r="function"==typeof r?(n.pop(),r):B,li(n,r)}),ql=Xi(function(n){n=Cr(n);var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return ar(t,n)};return!(t>1||this.__actions__.length)&&e instanceof At&&O(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:pi,args:[u],thisArg:B}),new Ct(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(B),n})):this.thru(u)}),Il=$e(function(n,t,r){Cc.call(n,r)?++n[r]:n[r]=1}),Pl=$e(function(n,t,r){Cc.call(n,r)?n[r].push(t):n[r]=[t]}),Ul=Xi(function(n,t,e){var u=-1,i="function"==typeof t,a=lu(t),o=ca(n)?Array(n.length):[];return sl(n,function(n){var c=i?t:a&&null!=n?n[t]:B;o[++u]=c?r(c,n,e):zr(n,t,e)}),o}),Fl=$e(function(n,t,r){n[r]=t}),Hl=$e(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Wl=Xi(function(n,t){if(null==n)return[];var r=t.length;return r>1&&cu(n,t[0],t[1])?t=[]:r>2&&cu(t[0],t[1],t[2])&&(t.length=1),Xr(n,Cr(t),[])}),Bl=mc.now,Yl=Xi(function(n,t,r){var e=Z;if(r.length){var u=I(r,Yl.placeholder);e|=Q}return Ze(n,e,t,r,u)}),Zl=Xi(function(n,t,r){var e=Z|V;if(r.length){var u=I(r,Zl.placeholder);e|=Q}return Ze(t,e,n,r,u)}),Vl=Xi(function(n,t){return yr(n,1,t)}),Xl=Xi(function(n,t,r){return yr(n,Fa(t)||0,r)}),Kl=Xi(function(n,t){t=s(Cr(t),Qe());var e=t.length;return Xi(function(u){for(var i=-1,a=Vc(u.length,e);++i<a;)u[i]=t[i].call(this,u[i]);return r(n,this,u)})}),Jl=Xi(function(n,t){var r=I(t,Jl.placeholder);return Ze(n,Q,B,t,r)}),Ql=Xi(function(n,t){var r=I(t,Ql.placeholder);return Ze(n,G,B,t,r)}),Gl=Xi(function(n,t){return Ze(n,tn,B,B,B,Cr(t))}),ns=Array.isArray,ts=je(function(n,t){Se(t,io(t),n)}),rs=je(function(n,t){Se(t,ao(t),n)}),es=je(function(n,t,r,e){Ee(t,ao(t),n,e)}),us=je(function(n,t,r,e){Ee(t,io(t),n,e)}),is=Xi(function(n,t){return ar(n,Cr(t))}),as=Xi(function(n){return n.push(B,tr),r(es,B,n)}),os=Xi(function(n){return n.push(B,vu),r(ss,B,n)}),cs=Xi(zr),ls=je(function(n,t,r){Zr(n,t,r)}),ss=je(function(n,t,r,e){Zr(n,t,r,e)}),fs=Xi(function(n,t){return null==n?{}:(t=s(Cr(t),String),Kr(n,_r(ao(n),t)))}),hs=Xi(function(n,t){return null==n?{}:Kr(n,Cr(t))}),ps=Oe(function(n,t,r){return t=t.toLowerCase(),n+(r?ko(t):t)}),gs=Oe(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),vs=Oe(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),ds=Re("toLowerCase"),ms=Re("toUpperCase"),ys=Oe(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),_s=Oe(function(n,t,r){return n+(r?" ":"")+ko(t)}),xs=Oe(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Ms=Xi(function(n,t){try{return r(n,B,t)}catch(e){return da(e)?e:new yc(e)}}),bs=Xi(function(n,t){return u(Cr(t),function(t){n[t]=Yl(n[t],n)}),n}),ws=Ie(),ks=Ie(!0),Cs=Xi(function(n,t){return function(r){return zr(r,n,t)}}),As=Xi(function(n,t){return function(r){return zr(n,r,t)}}),Ss=Ue(s),Es=Ue(a),Ns=Ue(g),$s=We(),js=We(!0),Ds=Ye("ceil"),Ts=Ye("floor"),Ls=Ye("round");return qn.prototype=Mt.prototype,Ct.prototype=ll(Mt.prototype),Ct.prototype.constructor=Ct,At.prototype=ll(Mt.prototype),At.prototype.constructor=At,$t.prototype=tl?tl(null):wc,Rt.prototype.clear=Ot,Rt.prototype["delete"]=zt,Rt.prototype.get=qt,Rt.prototype.has=It,Rt.prototype.set=Pt,Ut.prototype.push=Ht,Wt.prototype.clear=Bt,Wt.prototype["delete"]=Yt,Wt.prototype.get=Zt,Wt.prototype.has=Vt,Wt.prototype.set=Xt,Yi.Cache=Rt,qn.after=Ii,qn.ary=Pi,qn.assign=ts,qn.assignIn=rs,qn.assignInWith=es,qn.assignWith=us,qn.at=is,qn.before=Ui,qn.bind=Yl,qn.bindAll=bs,qn.bindKey=Zl,qn.chain=fi,qn.chunk=bu,qn.compact=wu,qn.concat=xl,qn.cond=Yo,qn.conforms=Zo,qn.constant=Vo,qn.countBy=Il,qn.create=Ya,qn.curry=Fi,qn.curryRight=Hi,qn.debounce=Wi,qn.defaults=as,qn.defaultsDeep=os,qn.defer=Vl,qn.delay=Xl,qn.difference=Ml,qn.differenceBy=bl,qn.differenceWith=wl,qn.drop=ku,qn.dropRight=Cu,qn.dropRightWhile=Au,qn.dropWhile=Su,qn.fill=Eu,qn.filter=wi,qn.flatMap=ju,qn.flatten=Du,qn.flattenDeep=Tu,qn.flip=Bi,qn.flow=ws,qn.flowRight=ks,qn.fromPairs=Lu,qn.functions=Ga,qn.functionsIn=no,qn.groupBy=Pl,qn.initial=zu,qn.intersection=kl,qn.intersectionBy=Cl,qn.intersectionWith=Al,qn.invert=uo,qn.invokeMap=Ul,qn.iteratee=Ko,qn.keyBy=Fl,qn.keys=io,qn.keysIn=ao,qn.map=Ni,qn.mapKeys=oo,qn.mapValues=co,qn.matches=Jo,qn.matchesProperty=Qo,qn.memoize=Yi,qn.merge=ls,qn.mergeWith=ss,qn.method=Cs,qn.methodOf=As,qn.mixin=Go,qn.negate=Zi,qn.nthArg=rc,qn.omit=fs,qn.omitBy=lo,qn.once=Vi,qn.orderBy=$i,qn.over=Ss,qn.overArgs=Kl,qn.overEvery=Es,qn.overSome=Ns,qn.partial=Jl,qn.partialRight=Ql,qn.partition=Hl,qn.pick=hs,qn.pickBy=so,qn.property=ec,qn.propertyOf=uc,qn.pull=Sl,qn.pullAll=Uu,qn.pullAllBy=Fu,qn.pullAt=El,qn.range=$s,qn.rangeRight=js,qn.rearg=Gl,qn.reject=Ti,qn.remove=Hu,qn.rest=Xi,qn.reverse=Wu,qn.sampleSize=Ri,qn.set=ho,qn.setWith=po,qn.shuffle=Oi,qn.slice=Bu,qn.sortBy=Wl,qn.sortedUniq=Qu,qn.sortedUniqBy=Gu,qn.split=Ro,qn.spread=Ki,qn.tail=ni,qn.take=ti,qn.takeRight=ri,qn.takeRightWhile=ei,qn.takeWhile=ui,qn.tap=hi,qn.throttle=Ji,qn.thru=pi,qn.toArray=Ia,qn.toPairs=go,qn.toPairsIn=vo,qn.toPath=ac,qn.toPlainObject=Ha,qn.transform=mo,qn.unary=Qi,qn.union=Nl,qn.unionBy=$l,qn.unionWith=jl,qn.uniq=ii,qn.uniqBy=ai,qn.uniqWith=oi,qn.unset=yo,qn.unzip=ci,qn.unzipWith=li,qn.values=_o,qn.valuesIn=xo,qn.without=Dl,qn.words=Bo,qn.wrap=Gi,qn.xor=Tl,qn.xorBy=Ll,qn.xorWith=Rl,qn.zip=Ol,qn.zipObject=si,qn.zipWith=zl,qn.extend=rs,qn.extendWith=es,Go(qn,qn),qn.add=cc,qn.attempt=Ms,qn.camelCase=ps,qn.capitalize=ko,qn.ceil=Ds,qn.clamp=Mo,qn.clone=na,qn.cloneDeep=ra,qn.cloneDeepWith=ea,qn.cloneWith=ta,qn.deburr=Co,qn.endsWith=Ao,qn.eq=ua,qn.escape=So,qn.escapeRegExp=Eo,qn.every=bi,qn.find=ki,qn.findIndex=Nu,qn.findKey=Za,qn.findLast=Ci,qn.findLastIndex=$u,qn.findLastKey=Va,qn.floor=Ts,qn.forEach=Ai,qn.forEachRight=Si,qn.forIn=Xa,qn.forInRight=Ka,qn.forOwn=Ja,qn.forOwnRight=Qa,qn.get=to,qn.gt=ia,qn.gte=aa,qn.has=ro,qn.hasIn=eo,qn.head=Ru,qn.identity=Xo,qn.includes=Ei,qn.indexOf=Ou,qn.inRange=bo,qn.invoke=cs,qn.isArguments=oa,qn.isArray=ns,qn.isArrayLike=ca,qn.isArrayLikeObject=la,qn.isBoolean=sa,qn.isDate=fa,qn.isElement=ha,qn.isEmpty=pa,qn.isEqual=ga,qn.isEqualWith=va,qn.isError=da,qn.isFinite=ma,qn.isFunction=ya,qn.isInteger=_a,qn.isLength=xa,qn.isMatch=wa,qn.isMatchWith=ka,qn.isNaN=Ca,qn.isNative=Aa,qn.isNil=Ea,qn.isNull=Sa,qn.isNumber=Na,qn.isObject=Ma,qn.isObjectLike=ba,qn.isPlainObject=$a,qn.isRegExp=ja,qn.isSafeInteger=Da,qn.isString=Ta,qn.isSymbol=La,qn.isTypedArray=Ra,qn.isUndefined=Oa,qn.join=qu,qn.kebabCase=gs,qn.last=Iu,qn.lastIndexOf=Pu,qn.lowerCase=vs,qn.lowerFirst=ds,qn.lt=za,qn.lte=qa,qn.max=lc,qn.maxBy=sc,qn.mean=fc,qn.min=hc,qn.minBy=pc,qn.noConflict=nc,qn.noop=tc,qn.now=Bl,qn.pad=No,qn.padEnd=$o,qn.padStart=jo,qn.parseInt=Do,qn.random=wo,qn.reduce=ji,qn.reduceRight=Di,qn.repeat=To,qn.replace=Lo,qn.result=fo,qn.round=Ls,qn.runInContext=W,qn.sample=Li,qn.size=zi,qn.snakeCase=ys,qn.some=qi,qn.sortedIndex=Yu,qn.sortedIndexBy=Zu,qn.sortedIndexOf=Vu,qn.sortedLastIndex=Xu,qn.sortedLastIndexBy=Ku,qn.sortedLastIndexOf=Ju,qn.startCase=_s,qn.startsWith=Oo,qn.subtract=gc,qn.sum=vc,qn.sumBy=dc,qn.template=zo,qn.times=ic,qn.toInteger=Pa,qn.toLength=Ua,qn.toLower=qo,qn.toNumber=Fa,qn.toSafeInteger=Wa,qn.toString=Ba,qn.toUpper=Io,qn.trim=Po,qn.trimEnd=Uo,qn.trimStart=Fo,qn.truncate=Ho,qn.unescape=Wo,qn.uniqueId=oc,qn.upperCase=xs,qn.upperFirst=ms,qn.each=Ai,qn.eachRight=Si,qn.first=Ru,Go(qn,function(){var n={};return Sr(qn,function(t,r){Cc.call(qn.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),qn.VERSION=Y,u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){qn[n].placeholder=qn}),u(["drop","take"],function(n,t){At.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new At(this);r=r===B?1:Zc(Pa(r),0);var u=this.clone();return e?u.__takeCount__=Vc(r,u.__takeCount__):u.__views__.push({size:Vc(r,xn),type:n+(u.__dir__<0?"Right":"")}),u},At.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==fn||r==pn;At.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Qe(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");At.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");At.prototype[n]=function(){return this.__filtered__?new At(this):this[r](1)}}),At.prototype.compact=function(){return this.filter(Xo)},At.prototype.find=function(n){return this.filter(n).head()},At.prototype.findLast=function(n){return this.reverse().find(n)},At.prototype.invokeMap=Xi(function(n,t){return"function"==typeof n?new At(this):this.map(function(r){return zr(r,n,t)})}),At.prototype.reject=function(n){return n=Qe(n,3),this.filter(function(t){return!n(t)})},At.prototype.slice=function(n,t){n=Pa(n);var r=this;return r.__filtered__&&(n>0||0>t)?new At(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==B&&(t=Pa(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},At.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},At.prototype.toArray=function(){return this.take(xn)},Sr(At.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=qn[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(qn.prototype[t]=function(){var t=this.__wrapped__,a=e?[1]:arguments,o=t instanceof At,c=a[0],l=o||ns(t),s=function(n){var t=u.apply(qn,f([n],a));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(o=l=!1);var h=this.__chain__,p=!!this.__actions__.length,g=i&&!h,v=o&&!p;if(!i&&l){t=v?t:new At(this);var d=n.apply(t,a);return d.__actions__.push({func:pi,args:[s],thisArg:B}),new Ct(d,h)}return g&&v?n.apply(this,a):(d=this.thru(s),g?e?d.value()[0]:d.value():d)})}),u(["pop","push","shift","sort","splice","unshift"],function(n){var t=bc[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);qn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),Sr(At.prototype,function(n,t){var r=qn[t];if(r){var e=r.name+"",u=cl[e]||(cl[e]=[]);u.push({name:t,func:r})}}),cl[Pe(B,V).name]=[{name:"wrapper",func:B}],At.prototype.clone=St,At.prototype.reverse=Et,At.prototype.value=Nt,qn.prototype.at=ql,qn.prototype.chain=gi,qn.prototype.commit=vi,qn.prototype.flatMap=di,qn.prototype.next=mi,qn.prototype.plant=_i,qn.prototype.reverse=xi,qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=Mi,qc&&(qn.prototype[qc]=yi),qn}var B,Y="4.0.1",Z=1,V=2,X=4,K=8,J=16,Q=32,G=64,nn=128,tn=256,rn=512,en=1,un=2,an=30,on="...",cn=150,ln=16,sn=200,fn=1,hn=2,pn=3,gn="Expected a function",vn="__lodash_hash_undefined__",dn=1/0,mn=9007199254740991,yn=1.7976931348623157e308,_n=NaN,xn=4294967295,Mn=xn-1,bn=xn>>>1,wn="__lodash_placeholder__",kn="[object Arguments]",Cn="[object Array]",An="[object Boolean]",Sn="[object Date]",En="[object Error]",Nn="[object Function]",$n="[object GeneratorFunction]",jn="[object Map]",Dn="[object Number]",Tn="[object Object]",Ln="[object RegExp]",Rn="[object Set]",On="[object String]",zn="[object Symbol]",qn="[object WeakMap]",In="[object ArrayBuffer]",Pn="[object Float32Array]",Un="[object Float64Array]",Fn="[object Int8Array]",Hn="[object Int16Array]",Wn="[object Int32Array]",Bn="[object Uint8Array]",Yn="[object Uint8ClampedArray]",Zn="[object Uint16Array]",Vn="[object Uint32Array]",Xn=/\b__p \+= '';/g,Kn=/\b(__p \+=) '' \+/g,Jn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qn=/&(?:amp|lt|gt|quot|#39|#96);/g,Gn=/[&<>"'`]/g,nt=RegExp(Qn.source),tt=RegExp(Gn.source),rt=/<%-([\s\S]+?)%>/g,et=/<%([\s\S]+?)%>/g,ut=/<%=([\s\S]+?)%>/g,it=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,at=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ct=/[\\^$.*+?()[\]{}|]/g,lt=RegExp(ct.source),st=/^\s+|\s+$/g,ft=/^\s+/,ht=/\s+$/,pt=/\\(\\)?/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,dt=/^0x/i,mt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,Mt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,kt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe23",St="\\u20d0-\\u20f0",Et="\\u2700-\\u27bf",Nt="a-z\\xdf-\\xf6\\xf8-\\xff",$t="\\xac\\xb1\\xd7\\xf7",jt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dt="\\u2018\\u2019\\u201c\\u201d",Tt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="A-Z\\xc0-\\xd6\\xd8-\\xde",Rt="\\ufe0e\\ufe0f",Ot=$t+jt+Dt+Tt,zt="["+Ct+"]",qt="["+Ot+"]",It="["+At+St+"]",Pt="\\d+",Ut="["+Et+"]",Ft="["+Nt+"]",Ht="[^"+Ct+Ot+Pt+Et+Nt+Lt+"]",Wt="\\ud83c[\\udffb-\\udfff]",Bt="(?:"+It+"|"+Wt+")",Yt="[^"+Ct+"]",Zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+Lt+"]",Kt="\\u200d",Jt="(?:"+Ft+"|"+Ht+")",Qt="(?:"+Xt+"|"+Ht+")",Gt=Bt+"?",nr="["+Rt+"]?",tr="(?:"+Kt+"(?:"+[Yt,Zt,Vt].join("|")+")"+nr+Gt+")*",rr=nr+Gt+tr,er="(?:"+[Ut,Zt,Vt].join("|")+")"+rr,ur="(?:"+[Yt+It+"?",It,Zt,Vt,zt].join("|")+")",ir=RegExp(It,"g"),ar=RegExp(Wt+"(?="+Wt+")|"+ur+rr,"g"),or=RegExp("["+Kt+Ct+At+St+Rt+"]"),cr=/[a-zA-Z0-9]+/g,lr=RegExp([Xt+"?"+Ft+"+(?="+[qt,Xt,"$"].join("|")+")",Qt+"+(?="+[qt,Xt+Jt,"$"].join("|")+")",Xt+"?"+Jt+"+",Xt+"+",Pt,er].join("|"),"g"),sr=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fr=["Array","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hr=-1,pr={};pr[Pn]=pr[Un]=pr[Fn]=pr[Hn]=pr[Wn]=pr[Bn]=pr[Yn]=pr[Zn]=pr[Vn]=!0,pr[kn]=pr[Cn]=pr[In]=pr[An]=pr[Sn]=pr[En]=pr[Nn]=pr[jn]=pr[Dn]=pr[Tn]=pr[Ln]=pr[Rn]=pr[On]=pr[qn]=!1;var gr={};gr[kn]=gr[Cn]=gr[In]=gr[An]=gr[Sn]=gr[Pn]=gr[Un]=gr[Fn]=gr[Hn]=gr[Wn]=gr[jn]=gr[Dn]=gr[Tn]=gr[Ln]=gr[Rn]=gr[On]=gr[zn]=gr[Bn]=gr[Yn]=gr[Zn]=gr[Vn]=!0,gr[En]=gr[Nn]=gr[qn]=!1;var vr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},dr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},mr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},yr={"function":!0,object:!0},_r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xr=parseFloat,Mr=parseInt,br=yr[typeof exports]&&exports&&!exports.nodeType?exports:null,wr=yr[typeof module]&&module&&!module.nodeType?module:null,kr=E(br&&wr&&"object"==typeof global&&global),Cr=E(yr[typeof self]&&self),Ar=E(yr[typeof window]&&window),Sr=wr&&wr.exports===br?br:null,Er=E(yr[typeof this]&&this),Nr=kr||Ar!==(Er&&Er.window)&&Ar||Cr||Er||Function("return this")(),$r=W();(Ar||Cr||{})._=$r,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return $r}):br&&wr?(Sr&&((wr.exports=$r)._=$r),br._=$r):Nr._=$r}.call(this),function(n,t,r){"use strict";function e(n,t,r){if(!n)throw dn("areq","Argument '{0}' is {1}",t||"?",r||"required");return n}function u(n,t){return n||t?n?t?(H(n)&&(n=n.join(" ")),H(t)&&(t=t.join(" ")),n+" "+t):n:t:""}function i(n){var t={};return n&&(n.to||n.from)&&(t.to=n.to,t.from=n.from),t}function a(n,t,r){var e="";return n=H(n)?n:n&&W(n)&&n.length?n.split(/\s+/):[],F(n,function(n,u){n&&n.length>0&&(e+=u>0?" ":"",e+=r?t+n:n+t)}),e}function o(n,t){var r=n.indexOf(t);t>=0&&n.splice(r,1)}function c(n){if(n instanceof U)switch(n.length){case 0:return[];case 1:if(n[0].nodeType===K)return n;break;default:return U(l(n))}return n.nodeType===K?U(n):void 0}function l(n){if(!n[0])return n;for(var t=0;t<n.length;t++){var r=n[t];if(r.nodeType==K)return r}}function s(n,t,r){F(t,function(t){n.addClass(t,r)})}function f(n,t,r){F(t,function(t){n.removeClass(t,r)})}function h(n){return function(t,r){r.addClass&&(s(n,t,r.addClass),r.addClass=null),r.removeClass&&(f(n,t,r.removeClass),r.removeClass=null)}}function p(n){if(n=n||{},!n.$$prepared){var t=n.domOperation||q;n.domOperation=function(){n.$$domOperationFired=!0,t(),t=q},n.$$prepared=!0}return n}function g(n,t){v(n,t),d(n,t)}function v(n,t){t.from&&(n.css(t.from),t.from=null)}function d(n,t){t.to&&(n.css(t.to),t.to=null)}function m(n,t,r){var e=(t.addClass||"")+" "+(r.addClass||""),u=(t.removeClass||"")+" "+(r.removeClass||""),i=y(n.attr("class"),e,u);r.preparationClasses&&(t.preparationClasses=C(r.preparationClasses,t.preparationClasses),delete r.preparationClasses);var a=t.domOperation!==q?t.domOperation:null;return P(t,r),a&&(t.domOperation=a),i.addClass?t.addClass=i.addClass:t.addClass=null,i.removeClass?t.removeClass=i.removeClass:t.removeClass=null,t}function y(n,t,r){function e(n){W(n)&&(n=n.split(" "));var t={};return F(n,function(n){n.length&&(t[n]=!0)}),t}var u=1,i=-1,a={};n=e(n),t=e(t),F(t,function(n,t){a[t]=u}),r=e(r),F(r,function(n,t){a[t]=a[t]===u?null:i});var o={addClass:"",removeClass:""};return F(a,function(t,r){var e,a;t===u?(e="addClass",a=!n[r]):t===i&&(e="removeClass",a=n[r]),a&&(o[e].length&&(o[e]+=" "),o[e]+=r)}),o}function _(n){return n instanceof t.element?n[0]:n}function x(n,t,r){var e="";t&&(e=a(t,G,!0)),r.addClass&&(e=C(e,a(r.addClass,J))),r.removeClass&&(e=C(e,a(r.removeClass,Q))),e.length&&(r.preparationClasses=e,n.addClass(e))}function M(n,t){t.preparationClasses&&(n.removeClass(t.preparationClasses),t.preparationClasses=null),t.activeClasses&&(n.removeClass(t.activeClasses),t.activeClasses=null)}function b(n,t){var r=t?"-"+t+"s":"";return k(n,[gn,r]),[gn,r]}function w(n,t){var r=t?"paused":"",e=O+sn;return k(n,[e,r]),[e,r]}function k(n,t){var r=t[0],e=t[1];n.style[r]=e}function C(n,t){return n?t?n+" "+t:n:t}function A(n){return[pn,n+"s"]}function S(n,t){var r=t?hn:gn;return[r,n+"s"]}function E(n,t,r){var e=Object.create(null),u=n.getComputedStyle(t)||{};return F(r,function(n,t){var r=u[n];if(r){var i=r.charAt(0);("-"===i||"+"===i||i>=0)&&(r=N(r)),0===r&&(r=null),e[t]=r}}),e}function N(n){var t=0,r=n.split(/\s*,\s*/);return F(r,function(n){"s"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1)),n=parseFloat(n)||0,t=t?Math.max(n,t):n}),t}function $(n){return 0===n||null!=n}function j(n,t){var r=L,e=n+"s";return t?r+=un:e+=" linear all",[r,e]}function D(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(t){var r=n[t];return r?r.total:0},get:function(t){var r=n[t];return r&&r.value},put:function(t,r){n[t]?n[t].total++:n[t]={total:1,value:r}}}}function T(n,t,r){F(r,function(r){n[r]=Z(n[r])?n[r]:t.style.getPropertyValue(r)})}var L,R,O,z,q=t.noop,I=t.copy,P=t.extend,U=t.element,F=t.forEach,H=t.isArray,W=t.isString,B=t.isObject,Y=t.isUndefined,Z=t.isDefined,V=t.isFunction,X=t.isElement,K=1,J="-add",Q="-remove",G="ng-",nn="-active",tn="ng-animate",rn="$$ngAnimateChildren",en="";Y(n.ontransitionend)&&Z(n.onwebkittransitionend)?(en="-webkit-",L="WebkitTransition",R="webkitTransitionEnd transitionend"):(L="transition",R="transitionend"),Y(n.onanimationend)&&Z(n.onwebkitanimationend)?(en="-webkit-",O="WebkitAnimation",z="webkitAnimationEnd animationend"):(O="animation",z="animationend");var un="Duration",an="Property",on="Delay",cn="TimingFunction",ln="IterationCount",sn="PlayState",fn=9999,hn=O+on,pn=O+un,gn=L+on,vn=L+un,dn=t.$$minErr("ng"),mn=["$$rAF",function(n){function t(n){e=e.concat(n),r()}function r(){if(e.length){for(var t=e.shift(),i=0;i<t.length;i++)t[i]();u||n(function(){u||r()})}}var e,u;return e=t.queue=[],t.waitUntilQuiet=function(t){u&&u(),u=n(function(){u=null,t(),r()})},t}],yn=[function(){return function(n,r,e){var u=e.ngAnimateChildren;t.isString(u)&&0===u.length?r.data(rn,!0):e.$observe("ngAnimateChildren",function(n){n="on"===n||"true"===n,r.data(rn,n)})}}],_n="$$animateCss",xn=1e3,Mn=3,bn=1.5,wn={transitionDuration:vn,transitionDelay:gn,transitionProperty:L+an,animationDuration:pn,animationDelay:hn,animationIterationCount:O+ln},kn={transitionDuration:vn,transitionDelay:gn,animationDuration:pn,animationDelay:hn},Cn=["$animateProvider",function(n){var t=D(),r=D();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(n,e,u,c,l,s,f,m){function y(n,t){var r="$$ngAnimateParentKey",e=n.parentNode,u=e[r]||(e[r]=++P);return u+"-"+n.getAttribute("class")+"-"+t}function x(r,e,u,i){var a=t.get(u);return a||(a=E(n,r,i),"infinite"===a.animationIterationCount&&(a.animationIterationCount=1)),t.put(u,a),a}function M(u,i,o,c){var l;if(t.count(o)>0&&(l=r.get(o),!l)){var s=a(i,"-stagger");e.addClass(u,s),l=E(n,u,c),l.animationDuration=Math.max(l.animationDuration,0),l.transitionDuration=Math.max(l.transitionDuration,0),e.removeClass(u,s),r.put(o,l)}return l||{}}function C(n){U.push(n),f.waitUntilQuiet(function(){t.flush(),r.flush();for(var n=l(),e=0;e<U.length;e++)U[e](n);U.length=0})}function N(n,t,r){var e=x(n,t,r,wn),u=e.animationDelay,i=e.transitionDelay;return e.maxDelay=u&&i?Math.max(u,i):u||i,e.maxDuration=Math.max(e.animationDuration*e.animationIterationCount,e.transitionDuration),e}var D=h(e),P=0,U=[];return function(n,r){function l(){h()}function f(){h(!0)}function h(t){Z||X&&V||(Z=!0,V=!1,W.$$skipPreparationClasses||e.removeClass(n,wn),e.removeClass(n,An),w(Y,!1),b(Y,!1),F(sn,function(n){Y.style[n[0]]=""}),D(n,W),g(n,W),Object.keys(B).length&&F(B,function(n,t){n?Y.style.setProperty(t,n):Y.style.removeProperty(t)}),W.onDone&&W.onDone(),gn&&gn.length&&n.off(gn.join(" "),P),K&&K.complete(!t))}function x(n){Pn.blockTransition&&b(Y,n),Pn.blockKeyframeAnimation&&w(Y,!!n)}function E(){return K=new u({end:l,cancel:f}),C(q),h(),{$$willAnimate:!1,start:function(){return K},end:l}}function P(n){n.stopPropagation();var t=n.originalEvent||n,r=t.$manualTimeStamp||Date.now(),e=parseFloat(t.elapsedTime.toFixed(Mn));Math.max(r-ln,0)>=en&&e>=un&&(X=!0,h())}function U(){function t(){if(!Z){if(x(!1),F(sn,function(n){var t=n[0],r=n[1];Y.style[t]=r}),D(n,W),e.addClass(n,An),Pn.recalculateTimingStyles){if(Cn=Y.className+" "+wn,Nn=y(Y,Cn),qn=N(Y,Cn,Nn),In=qn.maxDelay,rn=Math.max(In,0),un=qn.maxDuration,0===un)return void h();Pn.hasTransitions=qn.transitionDuration>0,Pn.hasAnimations=qn.animationDuration>0}if(Pn.applyAnimationDelay&&(In="boolean"!=typeof W.delay&&$(W.delay)?parseFloat(W.delay):In,rn=Math.max(In,0),qn.animationDelay=In,Un=S(In,!0),sn.push(Un),Y.style[Un[0]]=Un[1]),en=rn*xn,on=un*xn,W.easing){var t,u=W.easing;Pn.hasTransitions&&(t=L+cn,sn.push([t,u]),Y.style[t]=u),Pn.hasAnimations&&(t=O+cn,sn.push([t,u]),Y.style[t]=u)}qn.transitionDuration&&gn.push(R),qn.animationDuration&&gn.push(z),ln=Date.now();var i=en+bn*on,a=ln+i,o=n.data(_n)||[],l=!0;if(o.length){var s=o[0];l=a>s.expectedEndTime,l?c.cancel(s.timer):o.push(h)}if(l){var f=c(r,i,!1);o[0]={timer:f,expectedEndTime:a},o.push(h),n.data(_n,o)}gn.length&&n.on(gn.join(" "),P),W.to&&(W.cleanupStyles&&T(B,Y,Object.keys(W.to)),d(n,W))}}function r(){var t=n.data(_n);if(t){for(var r=1;r<t.length;r++)t[r]();n.removeData(_n)}}if(!Z){if(!Y.parentNode)return void h();var u=function(n){if(X)V&&n&&(V=!1,h());else if(V=!n,qn.animationDuration){var t=w(Y,V);V?sn.push(t):o(sn,t)}},i=On>0&&(qn.transitionDuration&&0===$n.transitionDuration||qn.animationDuration&&0===$n.animationDuration)&&Math.max($n.animationDelay,$n.transitionDelay);i?c(t,Math.floor(i*On*xn),!1):t(),tn.resume=function(){u(!0)},tn.pause=function(){u(!1)}}}var W=r||{};W.$$prepared||(W=p(I(W)));var B={},Y=_(n);if(!Y||!Y.parentNode||!m.enabled())return E();var Z,V,X,K,tn,rn,en,un,on,ln,sn=[],hn=n.attr("class"),pn=i(W),gn=[];if(0===W.duration||!s.animations&&!s.transitions)return E();var vn=W.event&&H(W.event)?W.event.join(" "):W.event,dn=vn&&W.structural,mn="",yn="";dn?mn=a(vn,G,!0):vn&&(mn=vn),W.addClass&&(yn+=a(W.addClass,J)),W.removeClass&&(yn.length&&(yn+=" "),yn+=a(W.removeClass,Q)),W.applyClassesEarly&&yn.length&&D(n,W);var wn=[mn,yn].join(" ").trim(),Cn=hn+" "+wn,An=a(wn,nn),Sn=pn.to&&Object.keys(pn.to).length>0,En=(W.keyframeStyle||"").length>0;if(!En&&!Sn&&!wn)return E();var Nn,$n;if(W.stagger>0){var jn=parseFloat(W.stagger);$n={transitionDelay:jn,animationDelay:jn,transitionDuration:0,animationDuration:0}}else Nn=y(Y,Cn),$n=M(Y,wn,Nn,kn);W.$$skipPreparationClasses||e.addClass(n,wn);var Dn;if(W.transitionStyle){var Tn=[L,W.transitionStyle];k(Y,Tn),sn.push(Tn)}if(W.duration>=0){Dn=Y.style[L].length>0;var Ln=j(W.duration,Dn);k(Y,Ln),sn.push(Ln)}if(W.keyframeStyle){var Rn=[O,W.keyframeStyle];k(Y,Rn),sn.push(Rn)}var On=$n?W.staggerIndex>=0?W.staggerIndex:t.count(Nn):0,zn=0===On;zn&&!W.skipBlocking&&b(Y,fn);var qn=N(Y,Cn,Nn),In=qn.maxDelay;rn=Math.max(In,0),un=qn.maxDuration;var Pn={};if(Pn.hasTransitions=qn.transitionDuration>0,Pn.hasAnimations=qn.animationDuration>0,Pn.hasTransitionAll=Pn.hasTransitions&&"all"==qn.transitionProperty,Pn.applyTransitionDuration=Sn&&(Pn.hasTransitions&&!Pn.hasTransitionAll||Pn.hasAnimations&&!Pn.hasTransitions),Pn.applyAnimationDuration=W.duration&&Pn.hasAnimations,Pn.applyTransitionDelay=$(W.delay)&&(Pn.applyTransitionDuration||Pn.hasTransitions),Pn.applyAnimationDelay=$(W.delay)&&Pn.hasAnimations,Pn.recalculateTimingStyles=yn.length>0,(Pn.applyTransitionDuration||Pn.applyAnimationDuration)&&(un=W.duration?parseFloat(W.duration):un,Pn.applyTransitionDuration&&(Pn.hasTransitions=!0,qn.transitionDuration=un,Dn=Y.style[L+an].length>0,sn.push(j(un,Dn))),Pn.applyAnimationDuration&&(Pn.hasAnimations=!0,qn.animationDuration=un,sn.push(A(un)))),0===un&&!Pn.recalculateTimingStyles)return E();if(null!=W.delay){var Un;"boolean"!=typeof W.delay&&(Un=parseFloat(W.delay),rn=Math.max(Un,0)),Pn.applyTransitionDelay&&sn.push(S(Un)),Pn.applyAnimationDelay&&sn.push(S(Un,!0))}return null==W.duration&&qn.transitionDuration>0&&(Pn.recalculateTimingStyles=Pn.recalculateTimingStyles||zn),en=rn*xn,on=un*xn,W.skipBlocking||(Pn.blockTransition=qn.transitionDuration>0,Pn.blockKeyframeAnimation=qn.animationDuration>0&&$n.animationDelay>0&&0===$n.animationDuration),W.from&&(W.cleanupStyles&&T(B,Y,Object.keys(W.from)),v(n,W)),Pn.blockTransition||Pn.blockKeyframeAnimation?x(un):W.skipBlocking||b(Y,!1),{$$willAnimate:!0,end:l,start:function(){return Z?void 0:(tn={end:l,cancel:f,resume:null,pause:null},K=new u(tn),C(U),K)}}}}]}],An=["$$animationProvider",function(n){function t(n){return n.parentNode&&11===n.parentNode.nodeType}n.drivers.push("$$animateCssDriver");var r="ng-animate-shim",e="ng-anchor",u="ng-anchor-out",i="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(n,a,o,c,l,s,f){function p(n){return n.replace(/\bng-\S+\b/g,"");
+}function g(n,t){return W(n)&&(n=n.split(" ")),W(t)&&(t=t.split(" ")),n.filter(function(n){return-1===t.indexOf(n)}).join(" ")}function v(t,a,c){function l(n){var t={},r=_(n).getBoundingClientRect();return F(["width","height","top","left"],function(n){var e=r[n];switch(n){case"top":e+=y.scrollTop;break;case"left":e+=y.scrollLeft}t[n]=Math.floor(e)+"px"}),t}function s(){var t=n(d,{addClass:u,delay:!0,from:l(a)});return t.$$willAnimate?t:null}function f(n){return n.attr("class")||""}function h(){var t=p(f(c)),r=g(t,m),e=g(m,t),a=n(d,{to:l(c),addClass:i+" "+r,removeClass:u+" "+e,delay:!0});return a.$$willAnimate?a:null}function v(){d.remove(),a.removeClass(r),c.removeClass(r)}var d=U(_(a).cloneNode(!0)),m=p(f(d));a.addClass(r),c.addClass(r),d.addClass(e),M.append(d);var x,b=s();if(!b&&(x=h(),!x))return v();var w=b||x;return{start:function(){function n(){r&&r.end()}var t,r=w.start();return r.done(function(){return r=null,!x&&(x=h())?(r=x.start(),r.done(function(){r=null,v(),t.complete()}),r):(v(),void t.complete())}),t=new o({end:n,cancel:n})}}}function d(n,t,r,e){var u=m(n,q),i=m(t,q),a=[];return F(e,function(n){var t=n.out,e=n["in"],u=v(r,t,e);u&&a.push(u)}),u||i||0!==a.length?{start:function(){function n(){F(t,function(n){n.end()})}var t=[];u&&t.push(u.start()),i&&t.push(i.start()),F(a,function(n){t.push(n.start())});var r=new o({end:n,cancel:n});return o.all(t,function(n){r.complete(n)}),r}}:void 0}function m(t){var r=t.element,e=t.options||{};t.structural&&(e.event=t.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===t.event&&(e.onDone=e.domOperation)),e.preparationClasses&&(e.event=C(e.event,e.preparationClasses));var u=n(r,e);return u.$$willAnimate?u:null}if(!l.animations&&!l.transitions)return q;var y=f[0].body,x=_(c),M=U(t(x)||y.contains(x)?x:y);h(s);return function(n){return n.from&&n.to?d(n.from,n.to,n.classes,n.anchors):m(n)}}]}],Sn=["$animateProvider",function(n){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(t,r,e){function u(r){r=H(r)?r:r.split(" ");for(var e=[],u={},i=0;i<r.length;i++){var a=r[i],o=n.$$registeredAnimations[a];o&&!u[a]&&(e.push(t.get(o)),u[a]=!0)}return e}var i=h(e);return function(n,t,e,a){function o(){a.domOperation(),i(n,a)}function c(){h=!0,o(),g(n,a)}function l(n,t,e,u,i){var a;switch(e){case"animate":a=[t,u.from,u.to,i];break;case"setClass":a=[t,m,y,i];break;case"addClass":a=[t,m,i];break;case"removeClass":a=[t,y,i];break;default:a=[t,i]}a.push(u);var o=n.apply(n,a);if(o)if(V(o.start)&&(o=o.start()),o instanceof r)o.done(i);else if(V(o))return o;return q}function s(n,t,e,u,i){var a=[];return F(u,function(u){var o=u[i];o&&a.push(function(){var u,i,a=!1,c=function(n){a||(a=!0,(i||q)(n),u.complete(!n))};return u=new r({end:function(){c()},cancel:function(){c(!0)}}),i=l(o,n,t,e,function(n){var t=n===!1;c(t)}),u})}),a}function f(n,t,e,u,i){var a=s(n,t,e,u,i);if(0===a.length){var o,c;"beforeSetClass"===i?(o=s(n,"removeClass",e,u,"beforeRemoveClass"),c=s(n,"addClass",e,u,"beforeAddClass")):"setClass"===i&&(o=s(n,"removeClass",e,u,"removeClass"),c=s(n,"addClass",e,u,"addClass")),o&&(a=a.concat(o)),c&&(a=a.concat(c))}if(0!==a.length)return function(n){var t=[];return a.length&&F(a,function(n){t.push(n())}),t.length?r.all(t,n):n(),function(n){F(t,function(t){n?t.cancel():t.end()})}}}var h=!1;3===arguments.length&&B(e)&&(a=e,e=null),a=p(a),e||(e=n.attr("class")||"",a.addClass&&(e+=" "+a.addClass),a.removeClass&&(e+=" "+a.removeClass));var v,d,m=a.addClass,y=a.removeClass,_=u(e);if(_.length){var x,M;"leave"==t?(M="leave",x="afterLeave"):(M="before"+t.charAt(0).toUpperCase()+t.substr(1),x=t),"enter"!==t&&"move"!==t&&(v=f(n,t,a,_,M)),d=f(n,t,a,_,x)}if(v||d){var b;return{$$willAnimate:!0,end:function(){return b?b.end():(c(),b=new r,b.complete(!0)),b},start:function(){function n(n){c(n),b.complete(n)}function t(t){h||((e||q)(t),n(t))}if(b)return b;b=new r;var e,u=[];return v&&u.push(function(n){e=v(n)}),u.length?u.push(function(n){o(),n(!0)}):o(),d&&u.push(function(n){e=d(n)}),b.setHost({end:function(){t()},cancel:function(){t(!0)}}),r.chain(u,n),b}}}}}]}],En=["$$animationProvider",function(n){n.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(n,t){function r(t){var r=t.element,e=t.event,u=t.options,i=t.classes;return n(r,e,i,u)}return function(n){if(n.from&&n.to){var e=r(n.from),u=r(n.to);if(!e&&!u)return;return{start:function(){function n(){return function(){F(i,function(n){n.end()})}}function r(n){a.complete(n)}var i=[];e&&i.push(e.start()),u&&i.push(u.start()),t.all(i,r);var a=new t({end:n(),cancel:n()});return a}}}return r(n)}}]}],Nn="data-ng-animate",$n="$ngAnimatePin",jn=["$animateProvider",function(n){function t(n){if(!n)return null;var t=n.split(s),r=Object.create(null);return F(t,function(n){r[n]=!0}),r}function r(n,r){if(n&&r){var e=t(r);return n.split(s).some(function(n){return e[n]})}}function u(n,t,r,e){return f[n].some(function(n){return n(t,r,e)})}function i(n,t){n=n||{};var r=(n.addClass||"").length>0,e=(n.removeClass||"").length>0;return t?r&&e:r||e}var a=1,o=2,s=" ",f=this.rules={skip:[],cancel:[],join:[]};f.join.push(function(n,t,r){return!t.structural&&i(t.options)}),f.skip.push(function(n,t,r){return!t.structural&&!i(t.options)}),f.skip.push(function(n,t,r){return"leave"==r.event&&t.structural}),f.skip.push(function(n,t,r){return r.structural&&r.state===o&&!t.structural}),f.cancel.push(function(n,t,r){return r.structural&&t.structural}),f.cancel.push(function(n,t,r){return r.state===o&&t.structural}),f.cancel.push(function(n,t,e){var u=t.options.addClass,i=t.options.removeClass,a=e.options.addClass,o=e.options.removeClass;return Y(u)&&Y(i)||Y(a)&&Y(o)?!1:r(u,o)||r(i,a)}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(t,r,s,f,v,d,y,b,w,k){function C(){var n=!1;return function(t){n?t():r.$$postDigest(function(){n=!0,t()})}}function A(n,t){return m(n,t,{})}function S(n,t,r){var e=_(t),u=_(n),i=[],a=q[r];return a&&F(a,function(n){G.call(n.node,e)?i.push(n.callback):"leave"===r&&G.call(n.node,u)&&i.push(n.callback)}),i}function E(n,e,l){function s(r,e,u,i){E(function(){var r=S(b,n,e);r.length&&t(function(){F(r,function(t){t(n,u,i)})})}),r.progress(e,u,i)}function h(t){M(n,w),Q(n,w),g(n,w),w.domOperation(),k.complete(!t)}var v,b,w=I(l);n=c(n),n&&(v=_(n),b=n.parent()),w=p(w);var k=new y,E=C();if(H(w.addClass)&&(w.addClass=w.addClass.join(" ")),w.addClass&&!W(w.addClass)&&(w.addClass=null),H(w.removeClass)&&(w.removeClass=w.removeClass.join(" ")),w.removeClass&&!W(w.removeClass)&&(w.removeClass=null),w.from&&!B(w.from)&&(w.from=null),w.to&&!B(w.to)&&(w.to=null),!v)return h(),k;var j=[v.className,w.addClass,w.removeClass].join(" ");if(!J(j))return h(),k;var z=["enter","move","leave"].indexOf(e)>=0,q=!O||f[0].hidden||R.get(v),P=!q&&L.get(v)||{},U=!!P.state;if(q||U&&P.state==a||(q=!D(n,b,e)),q)return h(),k;z&&N(n);var Y={structural:z,element:n,event:e,close:h,options:w,runner:k};if(U){var Z=u("skip",n,Y,P);if(Z)return P.state===o?(h(),k):(m(n,P.options,w),P.runner);var V=u("cancel",n,Y,P);if(V)if(P.state===o)P.runner.end();else{if(!P.structural)return m(n,P.options,Y.options),P.runner;P.close()}else{var X=u("join",n,Y,P);if(X){if(P.state!==o)return x(n,z?e:null,w),e=Y.event=P.event,w=m(n,P.options,Y.options),P.runner;A(n,w)}}}else A(n,w);var K=Y.structural;if(K||(K="animate"===Y.event&&Object.keys(Y.options.to||{}).length>0||i(Y.options)),!K)return h(),$(n),k;var G=(P.counter||0)+1;return Y.counter=G,T(n,a,Y),r.$$postDigest(function(){var t=L.get(v),r=!t;t=t||{};var u=n.parent()||[],a=u.length>0&&("animate"===t.event||t.structural||i(t.options));if(r||t.counter!==G||!a)return r&&(Q(n,w),g(n,w)),(r||z&&t.event!==e)&&(w.domOperation(),k.end()),void(a||$(n));e=!t.structural&&i(t.options,!0)?"setClass":t.event,T(n,o);var c=d(n,e,t.options);c.done(function(t){h(!t);var r=L.get(v);r&&r.counter===G&&$(_(n)),s(k,e,"close",{})}),k.setHost(c),s(k,e,"start",{})}),k}function N(n){var t=_(n),r=t.querySelectorAll("["+Nn+"]");F(r,function(n){var t=parseInt(n.getAttribute(Nn)),r=L.get(n);if(r)switch(t){case o:r.runner.end();case a:L.remove(n)}})}function $(n){var t=_(n);t.removeAttribute(Nn),L.remove(t)}function j(n,t){return _(n)===_(t)}function D(n,t,r){var e,u=U(f[0].body),i=j(n,u)||"HTML"===n[0].nodeName,a=j(n,s),o=!1,c=R.get(_(n)),l=n.data($n);for(l&&(t=l);t&&t.length;){a||(a=j(t,s));var h=t[0];if(h.nodeType!==K)break;var p=L.get(h)||{};if(!o){var g=R.get(h);if(g===!0&&c!==!1){c=!0;break}g===!1&&(c=!1),o=p.structural}if(Y(e)||e===!0){var v=t.data(rn);Z(v)&&(e=v)}if(o&&e===!1)break;if(i||(i=j(t,u)),i&&a)break;t=a||!(l=t.data($n))?t.parent():l}var d=(!o||e)&&c!==!0;return d&&a&&i}function T(n,t,r){r=r||{},r.state=t;var e=_(n);e.setAttribute(Nn,t);var u=L.get(e),i=u?P(u,r):r;L.put(e,i)}var L=new v,R=new v,O=null,z=r.$watch(function(){return 0===b.totalPendingRequests},function(n){n&&(z(),r.$$postDigest(function(){r.$$postDigest(function(){null===O&&(O=!0)})}))}),q={},V=n.classNameFilter(),J=V?function(n){return V.test(n)}:function(){return!0},Q=h(w),G=Node.prototype.contains||function(n){return this===n||!!(16&this.compareDocumentPosition(n))};return{on:function(n,t,r){var e=l(t);q[n]=q[n]||[],q[n].push({node:e,callback:r})},off:function(n,t,r){function e(n,t,r){var e=l(t);return n.filter(function(n){var t=n.node===e&&(!r||n.callback===r);return!t})}var u=q[n];u&&(q[n]=1===arguments.length?null:e(u,t,r))},pin:function(n,t){e(X(n),"element","not an element"),e(X(t),"parentElement","not an element"),n.data($n,t)},push:function(n,t,r,e){return r=r||{},r.domOperation=e,E(n,t,r)},enabled:function(n,t){var r=arguments.length;if(0===r)t=!!O;else{var e=X(n);if(e){var u=_(n),i=R.get(u);1===r?t=!i:R.put(u,!t)}else t=O=!!n}return t}}}]}],Dn=["$animateProvider",function(n){function t(n,t){n.data(o,t)}function r(n){n.removeData(o)}function e(n){return n.data(o)}var i="ng-animate-ref",a=this.drivers=[],o="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(n,o,c,l,s,f){function v(n){function t(n){if(n.processed)return n;n.processed=!0;var r=n.domNode,e=r.parentNode;i.put(r,n);for(var a;e;){if(a=i.get(e)){a.processed||(a=t(a));break}e=e.parentNode}return(a||u).children.push(n),n}function r(n){var t,r=[],e=[];for(t=0;t<n.children.length;t++)e.push(n.children[t]);var u=e.length,i=0,a=[];for(t=0;t<e.length;t++){var o=e[t];0>=u&&(u=i,i=0,r.push(a),a=[]),a.push(o.fn),o.children.forEach(function(n){i++,e.push(n)}),u--}return a.length&&r.push(a),r}var e,u={children:[]},i=new s;for(e=0;e<n.length;e++){var a=n[e];i.put(a.domNode,n[e]={domNode:a.domNode,fn:a.fn,children:[]})}for(e=0;e<n.length;e++)t(n[e]);return r(u)}var d=[],m=h(n);return function(s,h,y){function x(n){var t="["+i+"]",r=n.hasAttribute(i)?[n]:n.querySelectorAll(t),e=[];return F(r,function(n){var t=n.getAttribute(i);t&&t.length&&e.push(n)}),e}function M(n){var t=[],r={};F(n,function(n,e){var u=n.element,a=_(u),o=n.event,c=["enter","move"].indexOf(o)>=0,l=n.structural?x(a):[];if(l.length){var s=c?"to":"from";F(l,function(n){var t=n.getAttribute(i);r[t]=r[t]||{},r[t][s]={animationID:e,element:U(n)}})}else t.push(n)});var e={},u={};return F(r,function(r,i){var a=r.from,o=r.to;if(!a||!o){var c=a?a.animationID:o.animationID,l=c.toString();return void(e[l]||(e[l]=!0,t.push(n[c])))}var s=n[a.animationID],f=n[o.animationID],h=a.animationID.toString();if(!u[h]){var p=u[h]={structural:!0,beforeStart:function(){s.beforeStart(),f.beforeStart()},close:function(){s.close(),f.close()},classes:b(s.classes,f.classes),from:s,to:f,anchors:[]};p.classes.length?t.push(p):(t.push(s),t.push(f))}u[h].anchors.push({out:a.element,"in":o.element})}),t}function b(n,t){n=n.split(" "),t=t.split(" ");for(var r=[],e=0;e<n.length;e++){var u=n[e];if("ng-"!==u.substring(0,3))for(var i=0;i<t.length;i++)if(u===t[i]){r.push(u);break}}return r.join(" ")}function w(n){for(var t=a.length-1;t>=0;t--){var r=a[t];if(c.has(r)){var e=c.get(r),u=e(n);if(u)return u}}}function k(){s.addClass(tn),j&&n.addClass(s,j)}function C(n,t){function r(n){e(n).setHost(t)}n.from&&n.to?(r(n.from.element),r(n.to.element)):r(n.element)}function A(){var n=e(s);!n||"leave"===h&&y.$$domOperationFired||n.end()}function S(t){s.off("$destroy",A),r(s),m(s,y),g(s,y),y.domOperation(),j&&n.removeClass(s,j),s.removeClass(tn),N.complete(!t)}y=p(y);var E=["enter","move","leave"].indexOf(h)>=0,N=new l({end:function(){S()},cancel:function(){S(!0)}});if(!a.length)return S(),N;t(s,N);var $=u(s.attr("class"),u(y.addClass,y.removeClass)),j=y.tempClasses;return j&&($+=" "+j,y.tempClasses=null),d.push({element:s,classes:$,event:h,structural:E,options:y,beforeStart:k,close:S}),s.on("$destroy",A),d.length>1?N:(o.$$postDigest(function(){var n=[];F(d,function(t){e(t.element)?n.push(t):t.close()}),d.length=0;var t=M(n),r=[];F(t,function(n){r.push({domNode:_(n.from?n.from.element:n.element),fn:function(){n.beforeStart();var t,r=n.close,u=n.anchors?n.from.element||n.to.element:n.element;if(e(u)){var i=w(n);i&&(t=i.start)}if(t){var a=t();a.done(function(n){r(!n)}),C(n,a)}else r()}})}),f(v(r))}),N)}}]}];t.module("ngAnimate",[]).directive("ngAnimateChildren",yn).factory("$$rAFScheduler",mn).provider("$$animateQueue",jn).provider("$$animation",Dn).provider("$animateCss",Cn).provider("$$animateCssDriver",An).provider("$$animateJs",Sn).provider("$$animateJsDriver",En)}(window,window.angular);
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosServiceTopology.js b/xos/core/xoslib/static/js/xosServiceTopology.js
new file mode 100644
index 0000000..5521bbf
--- /dev/null
+++ b/xos/core/xoslib/static/js/xosServiceTopology.js
@@ -0,0 +1 @@
+"use strict";angular.module("xos.serviceTopology",["ngResource","ngCookies","ngLodash","ngAnimate","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("home",{url:"/",template:"<diagnostic></diagnostic>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]),angular.module("xos.serviceTopology").run(["$templateCache",function(e){e.put("templates/diagnostic.tpl.html",'<div class="container-fluid">\n  <div ng-hide="vm.error && vm.loader">\n    <div class="onethird-height">\n      <service-topology service-chain="vm.serviceChain"></service-topology>\n    </div>\n    <div class="twothird-height">\n      <!-- <div class="panel panel-primary subscriber-select">\n        <div class="panel-heading">Select a subscriber:</div>\n        <div class="panel-body">\n          <select class="form-control" ng-options="s as s.name for s in vm.subscribers" ng-model="vm.selectedSubscriber">\n            <option value="">Select a subscriber...</option>\n          </select>\n        </div>\n      </div> -->\n      <logic-topology ng-if="vm.subscribers" subscribers="vm.subscribers" selected="vm.selectedSubscriber"></logic-topology>\n    </div>\n  </div>\n  <div class="row" ng-show="vm.error">\n    <div class="col-xs-12">\n      <div class="alert alert-danger">\n        {{vm.error}}\n      </div>\n    </div>\n  </div>\n  <div class="row" ng-show="vm.loader">\n    <div class="col-xs-12">\n      <div class="loader">Loading</div>\n    </div>\n  </div>\n</div>'),e.put("templates/logicTopology.tpl.html",'<subscriber-modal open="vm.subscriberModal" subscribers="vm.subscribers"></subscriber-modal>\n<div class="instances-stats animate" ng-hide="vm.hideInstanceStats">\n  <div class="row">\n    <div class="col-sm-3 col-sm-offset-8">\n      <div class="panel panel-primary" ng-repeat="instance in vm.selectedInstances">\n        <div class="panel-heading">\n          {{instance.humanReadableName}}\n        </div>\n          <ul class="list-group">\n            <li class="list-group-item">Backend Status: {{instance.backend_status}}</li>\n            <li class="list-group-item">IP Address: {{instance.ip}}</li>\n          </ul>\n          <ul class="list-group">\n            <li class="list-group-item" ng-repeat="stat in instance.stats">\n              <span class="badge">{{stat.value}}</span>\n              {{stat.meter}}\n            </li>\n          </ul>\n        </div>\n      </div>  \n    </div>\n  </div>\n</div>'),e.put("templates/subscriber-modal.tpl.html",'<div class="modal fade" ng-class="{in: vm.open}" tabindex="-1" role="dialog">\n  <div class="modal-dialog modal-sm">\n    <div class="modal-content">\n      <div class="modal-header">\n        <button ng-click="vm.close()"  type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\n        <h4 class="modal-title">Select a subscriber:</h4>\n      </div>\n      <div class="modal-body">\n        <select class="form-control" ng-options="s as s.humanReadableName for s in vm.subscribers" ng-model="vm.selected"></select>\n      </div>\n      <div class="modal-footer">\n        <button ng-click="vm.close()" type="button" class="btn btn-default" data-dismiss="modal">Close</button>\n        <button ng-click="vm.select(vm.selected)" type="button" class="btn btn-primary">Select</button>\n      </div>\n    </div><!-- /.modal-content -->\n  </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->')}]),angular.module("xos.serviceTopology").run(["$location",function(e){e.path("/")}]),angular.bootstrap(angular.element("#xosServiceTopology"),["xos.serviceTopology"]),function(){angular.module("xos.serviceTopology").directive("subscriberModal",function(){return{scope:{subscribers:"=",open:"="},bindToController:!0,restrict:"E",templateUrl:"templates/subscriber-modal.tpl.html",controllerAs:"vm",controller:["$rootScope",function(e){var t=this;this.close=function(){t.open=!1},this.select=function(n){e.$emit("subscriber.selected",n),t.close()}}]}})}(),function(){angular.module("xos.serviceTopology").service("ServiceTopologyHelper",["$rootScope","$window","$log","lodash","ServiceRelation","serviceTopologyConfig","d3",function(e,t,n,r,i,a,o){var c,s,u,l=function(e){var t=e.append("g").attr({"class":"legend"});t.append("rect").attr({transform:function(e){return"translate(10, 80)"},width:100,height:100});var n=t.append("g").attr({"class":"node service"});n.append("circle").attr({r:a.circle.radius,transform:function(e){return"translate(30, 100)"}}),n.append("text").attr({transform:function(e){return"translate(45, 100)"},dy:".35em"}).text("Service").style("fill-opacity",1);var r=t.append("g").attr({"class":"node slice"});r.append("rect").attr({width:20,height:20,x:-10,y:-10,transform:function(e){return"translate(30, 130)"}}),r.append("text").attr({transform:function(e){return"translate(45, 130)"},dy:".35em"}).text("Slices").style("fill-opacity",1);var i=t.append("g").attr({"class":"node instance"});i.append("rect").attr({width:20,height:20,x:-10,y:-10,transform:function(e){return"translate(30, 160)"}}),i.append("text").attr({transform:function(e){return"translate(45, 160)"},dy:".35em"}).text("Instances").style("fill-opacity",1)},d=0,p=function(e,n,r){c=e,s=n,u=r;var l=i.depthOf(r),p=o.svg.diagonal().projection(function(e){return[e.y,e.x]}),f=n.nodes(r).reverse(),g=n.links(f);f.forEach(function(e){var n=(t.innerWidth-2*a.widthMargin)/l;e.y=e.depth*n});var v=e.selectAll("g.node").data(f,function(e){return e.id||(e.id=++d)}),m=v.enter().append("g").attr({"class":function(e){return"node "+e.type},transform:function(e){return e.x&&e.y?"translate("+e.y+", "+e.x+")":"translate("+r.y0+", "+r.x0+")"}}),b=m.filter(".subscriber"),y=m.filter(".router"),x=m.filter(".service");b.append("rect").attr(a.square),y.append("rect").attr(a.square),x.append("circle").attr("r",1e-6).style("fill",function(e){return e._children?"lightsteelblue":"#fff"}).on("click",h),m.append("text").attr({x:function(e){return e.children?-a.circle.selectedRadius-3:a.circle.selectedRadius+3},dy:".35em",transform:function(e){return e.children&&e.parent?e.parent.x<e.x?"rotate(-30)":"rotate(30)":void 0},"text-anchor":function(e){return e.children?"end":"start"}}).text(function(e){return e.name}).style("fill-opacity",1e-6);var S=v.transition().duration(a.duration).attr({transform:function(e){return"translate("+e.y+","+e.x+")"}});S.select("circle").attr("r",function(e){return e.selected?a.circle.selectedRadius:a.circle.radius}).style("fill",function(e){return e.selected?"lightsteelblue":"#fff"}),S.select("text").style("fill-opacity",1);var T=v.exit().transition().duration(a.duration).remove();T.select("circle").attr("r",1e-6),T.select("text").style("fill-opacity",1e-6);var w=e.selectAll("path.link").data(g,function(e){return e.target.id});w.enter().insert("path","g").attr("class",function(e){return"link "+e.target.type+" "+(e.target.active?"":"active")}).attr("d",function(e){var t={x:r.x0,y:r.y0};return p({source:t,target:t})}),w.transition().duration(a.duration).attr("d",p),w.exit().transition().duration(a.duration).attr("d",function(e){var t={x:r.x,y:r.y};return p({source:t,target:t})}).remove(),f.forEach(function(e){e.x0=e.x,e.y0=e.y})},h=function(t){return t.selected?(t.selected=!t.selected,e.$emit("instance.detail.hide",{}),p(c,s,u)):(e.$emit("instance.detail",{name:t.name,service:t.service,tenant:t.tenant}),c.selectAll("circle").each(function(e){return e.selected=!1}),t.selected=!t.selected,void p(c,s,u))};this.updateTree=p,this.drawLegend=l}])}(),function(){angular.module("xos.serviceTopology").directive("serviceTopology",function(){return{restrict:"E",scope:{serviceChain:"="},bindToController:!0,controllerAs:"vm",template:"",controller:["$element","$window","$scope","d3","serviceTopologyConfig","ServiceRelation","Slice","Instances","Subscribers","ServiceTopologyHelper",function(e,t,n,r,i,a,o,c,s,u){var l=this,d=e[0];r.select(window).on("resize",function(){f(l.serviceChain)});var p,h,f=function(t){r.select(e[0]).select("svg").remove();var n=d.clientWidth-2*i.widthMargin,a=d.clientHeight-2*i.heightMargin,o=r.layout.tree().size([a,n]);h=r.select(e[0]).append("svg").style("width",d.clientWidth+"px").style("height",d.clientHeight+"px");var c=h.append("g").attr("transform","translate("+4*i.widthMargin+","+i.heightMargin+")");p=t,p.x0=a/2,p.y0=n/2,u.updateTree(c,o,p)};this.getInstances=function(e){c.query({slice:e.id}).$promise.then(function(t){l.selectedSlice=e,l.instances=t})["catch"](function(e){throw l.errors=e,new Error(e)})},n.$watch(function(){return l.serviceChain},function(e){e&&f(e)})}]}})}(),function(){angular.module("xos.serviceTopology").service("Services",["$resource",function(e){return e("/xos/services/:id",{id:"@id"})}]).service("Tenant",["$resource",function(e){return e("/xos/tenants",{id:"@id"},{queryVsgInstances:{method:"GET",isArray:!0,interceptor:{response:function(e){var t=[];return angular.forEach(e.data,function(e){var n=JSON.parse(e.service_specific_attribute);n&&n.instance_id&&t.push(n.instance_id)}),t}}},getSubscriberTag:{method:"GET",isArray:!0,interceptor:{response:function(e){return JSON.parse(e.data[0].service_specific_attribute)}}}})}]).service("Ceilometer",["$http","$q","Instances",function(e,t,n){var r=this;this.getInstanceStats=function(n){var r=t.defer();return e.get("/xoslib/xos-instance-statistics",{params:{"instance-uuid":n}}).then(function(e){r.resolve(e.data)})["catch"](function(e){r.reject(e)}),r.promise},this.getInstancesStats=function(e){var i=t.defer(),a=[],o=[];return e.forEach(function(e){a.push(n.get({id:e}).$promise)}),t.all(a).then(function(e){o=e;var n=[];return o.forEach(function(e){n.push(r.getInstanceStats(e.instance_uuid))}),t.all(n)}).then(function(e){o.map(function(t,n){t.stats=e[n]}),i.resolve(o)})["catch"](i.reject),i.promise},this.getContainerStats=function(n){var r=t.defer(),i={};return e.get("/xoslib/meterstatistics",{params:{resource:n}}).then(function(t){return i.stats=t.data,e.get("/xoslib/meterstatistics",{params:{resource:n+"-eth0"}})}).then(function(t){return i.port={eth0:t.data},e.get("/xoslib/meterstatistics",{params:{resource:n+"-eth1"}})}).then(function(e){i.port.eth1=e.data,r.resolve(i)})["catch"](function(e){r.reject(e)}),r.promise}}]).service("Slice",["$resource",function(e){return e("/xos/slices",{id:"@id"})}]).service("Instances",["$resource",function(e){return e("/xos/instances/:id",{id:"@id"})}]).service("Node",["$resource","$q","Instances",function(e,t,n){return e("/xos/nodes",{id:"@id"},{queryWithInstances:{method:"GET",isArray:!0,interceptor:{response:function(e){var r=t.defer(),i=[];return angular.forEach(e.data,function(e){i.push(n.query({node:e.id}).$promise)}),t.all(i).then(function(t){e.data.map(function(e,n){return e.instances=t[n],e}),r.resolve(e.data)}),r.promise}}}})}]).service("Subscribers",["$resource","$q","SubscriberDevice",function(e,t,n){return e("/xos/subscribers/:id",{id:"@id"},{queryWithDevices:{method:"GET",isArray:!0,interceptor:{response:function(e){var r=t.defer(),i=[];return angular.forEach(e.data,function(e){i.push(n.query({id:e.id}).$promise)}),t.all(i).then(function(t){e.data.map(function(e,n){return e.devices=t[n],e.type="subscriber",e.devices.map(function(e){return e.type="device"}),e}),r.resolve(e.data)}),r.promise}}},getWithDevices:{method:"GET",isArray:!1,interceptor:{response:function(e){var r=t.defer();return n.query({id:e.data.id}).$promise.then(function(t){t.map(function(e){return e.type="device"}),e.data.devices=t,e.data.type="subscriber",r.resolve(e.data)})["catch"](function(e){r.reject(e)}),r.promise}}}})}]).service("SubscriberDevice",["$resource",function(e){return e("/xoslib/rs/subscriber/:id/users/",{id:"@id"})}]).service("ServiceRelation",["$q","lodash","Services","Tenant","Slice","Instances",function(e,t,n,r,i,a){var o=function g(e){var t=0;return e.children&&e.children.forEach(function(e){var n=g(e);n>t&&(t=n)}),1+t},c=function(e,n){return t.filter(e,function(e){return e.subscriber_service===n})},s=function(e,n){var r,e=t.filter(e,function(e){return e.provider_service===n&&e.subscriber_tenant});return e.forEach(function(e){e.service_specific_attribute&&(r=JSON.parse(e.service_specific_attribute))}),r},u=function(e,n){var r=[];return t.forEach(e,function(e){var i=t.find(n,{id:e.provider_service});r.push(i)}),r},l=function v(e,n,r,i){var a=arguments.length<=4||void 0===arguments[4]?null:arguments[4],o=t.difference(n,[r]),l=c(e,r.id),d=u(l,n);o=t.difference(o,d),r.service_specific_attribute=s(e,r.id);var p={name:r.humanReadableName,parent:a,type:"service",service:r,tenant:i,children:[]};return t.forEach(d,function(n){var a=t.find(e,{subscriber_tenant:i.id,provider_service:n.id});p.children.push(v(e,o,n,a,r.humanReadableName))}),0===p.children.length&&p.children.push({name:"Router",type:"router",children:[]}),p},d=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{id:1,name:"fakeSubs"}:arguments[2],i=t.find(n,{subscriber_root:r.id}),a=t.find(e,{id:i.provider_service}),o=l(n,e,a,i);return{name:r.name,parent:null,type:"subscriber",children:[o]}},p=function(e,n){var r=function o(e,n,r){var i={type:"service",name:r.humanReadableName,service:r},a=t.find(n,{subscriber_service:r.id});if(a){var c=t.find(e,{id:a.provider_service});i.children=[o(e,n,c)]}else i.children=[{name:"Router",type:"router",children:[]}];return delete r.id,i},i=t.find(e,{id:3}),a={name:"Subscriber",type:"subscriber",parent:null,children:[r(e,n,i)]};return a},h=function(t){var i,a,o=e.defer();return n.query().$promise.then(function(e){return i=e,r.query().$promise}).then(function(e){a=e,o.resolve(d(i,a,t))})["catch"](function(e){throw new Error(e)}),o.promise},f=function(){var t,i,a=e.defer();return n.query().$promise.then(function(e){return t=e,r.query({kind:"coarse"}).$promise}).then(function(e){i=e,a.resolve(p(t,i))})["catch"](function(e){throw new Error(e)}),a.promise};return{get:f,buildServiceTree:p,getBySubscriber:h,buildLevel:l,buildSubscriberServiceTree:d,findLevelRelation:c,findLevelServices:u,depthOf:o,findSpecificInformation:s}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.serviceTopology").service("RackHelper",["serviceTopologyConfig","lodash",function(e,t){var n=this;this.getComputeNodeLabelSize=function(){return e.computeNode.labelHeight+2*e.instance.margin},this.getComputeNodeSize=t.memoize(function(t){var r=3*e.instance.margin+2*e.instance.width,i=Math.round(t.length/2),a=n.getComputeNodeLabelSize(),o=e.instance.height*i+e.instance.margin*(i+1)+a;return[r,o]}),this.getRackSize=function(r){var i=0,a=e.computeNode.margin;return t.forEach(r,function(t){var r=n.getComputeNodeSize(t.instances),o=_slicedToArray(r,2),c=o[0],s=o[1];i=c+2*e.computeNode.margin,a+=s+e.computeNode.margin}),[i,a]},this.getInstancePosition=function(t){var r=Math.floor(t/2),i=t%2?1:0,a=n.getComputeNodeLabelSize(),o=e.instance.margin+e.instance.width*i+e.instance.margin*i,c=a+e.instance.margin+e.instance.height*r+e.instance.margin*r;return[o,c]},this.getComputeNodePosition=function(r,i){var a=e.computeNode.margin,o=t.reduce(r.slice(0,i),function(e,t){return e+n.getComputeNodeSize(t.instances)[1]},0),c=e.computeNode.margin+e.computeNode.margin*i+o;return[a,c]}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){var e={cloud:" M 79.72 49.60 C 86.00 37.29 98.57 29.01 111.96 26.42 C 124.27 24.11 137.53 26.15 148.18 32.90 C 158.08 38.78 165.39 48.87 167.65 60.20 C 176.20 57.90 185.14 56.01 194.00 57.73 C 206.08 59.59 217.92 66.01 224.37 76.66 C 227.51 81.54 228.85 87.33 229.23 93.06 C 237.59 93.33 246.22 95.10 253.04 100.19 C 256.69 103.13 259.87 107.67 258.91 112.59 C 257.95 118.43 252.78 122.38 247.78 124.82 C 235.27 130.43 220.23 130.09 207.98 123.93 C 199.33 127.88 189.76 129.43 180.30 128.57 C 173.70 139.92 161.70 147.65 148.86 149.93 C 133.10 153.26 116.06 148.15 104.42 137.08 C 92.98 143.04 78.96 143.87 66.97 139.04 C 57.75 135.41 49.70 128.00 46.60 118.43 C 43.87 109.95 45.81 100.29 51.30 93.32 C 57.38 85.18 67.10 80.44 76.99 78.89 C 74.38 69.20 74.87 58.52 79.72 49.60 Z"},t=0,n=0;angular.module("xos.serviceTopology").service("NodeDrawer",["d3","serviceTopologyConfig","RackHelper","lodash",function(r,i,a,o){var c=this,s=this;this.addNetworks=function(t){t.append("path").attr({d:e.cloud,transform:"translate(-63, -52), scale(0.5)","class":"cloud"}),t.append("text").attr({"text-anchor":"middle"}).text(function(e){return e.name}),t.each(function(e){var t=r.select(this);"LAN"===e.name&&angular.isDefined(e.subscriberTag)&&(t.append("text").attr({"text-anchor":"middle",y:40}).text(function(){return"C-Tag: "+e.subscriberTag.cTag}),t.append("text").attr({"text-anchor":"middle",y:60}).text(function(){return"S-Tag: "+e.subscriberTag.sTag})),"WAN"===e.name&&angular.isDefined(e.subscriberIP)&&t.append("text").attr({"text-anchor":"middle",y:40}).text(function(){return"Public IP: "+e.subscriberIP})})},this.addRack=function(e){e.each(function(t){var n=a.getRackSize(t.computeNodes),r=_slicedToArray(n,2),o=r[0],s=r[1];e.select("g").remove();var u=e.append("g");u.attr({transform:"translate(0,0)"}).transition().duration(i.duration).attr({transform:function(){return"translate("+-(o/2)+", "+-(s/2)+")"}}),u.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:o,height:s}),u.append("text").attr({"text-anchor":"middle",y:-10,x:o/2,opacity:0}).text(function(e){return e.name}).transition().duration(i.duration).attr({opacity:1}),c.drawComputeNodes(u,t.computeNodes)})},this.drawComputeNodes=function(e,n){var o=e.selectAll(".compute-nodes").data(n,function(e){return angular.isString(e.d3Id)||(e.d3Id="compute-node-"+ ++t),e.d3Id}),c=e.node().getBoundingClientRect(),u=c.width,l=c.height,d=o.enter().append("g");d.attr({transform:"translate("+u/2+", "+l/2+")","class":"compute-node"}).transition().duration(i.duration).attr({transform:function(e){return"translate("+a.getComputeNodePosition(n,e.d3Id.replace("compute-node-","")-1)+")"}}),d.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:function(e){return a.getComputeNodeSize(e.instances)[0]},height:function(e){return a.getComputeNodeSize(e.instances)[1]}}),d.append("text").attr({"text-anchor":"start",y:15,x:10,opacity:0}).text(function(e){return e.humanReadableName.split(".")[0]}).transition().duration(i.duration).attr({opacity:1}),d.length>0&&d.each(function(e){s.drawInstances(r.select(this),e.instances)})};var u=function(e){return e.replace("app_","").replace("service_","").replace("mysite_","").replace("_instance","")},l=function(e){function t(e,t){return t.substring(0,e.length)===e}return t("0 - ",e.backend_status)?"provisioning":t("1 - ",e.backend_status)?"good":t("2 - ",e.backend_status)?"bad":""},d=function(e,t){var n=e.append("g").attr({"class":"container",transform:"translate("+i.instance.margin+", 115)"});n.append("rect").attr({width:250-2*i.container.margin,height:i.container.height}),n.append("text").attr({y:20,x:i.instance.margin,"class":"name"}).text(t.name);var r=["memory","memory.usage","cpu_util"];r.forEach(function(e,r){var a=o.find(t.stats,{meter:e});angular.isDefined(a)&&n.append("text").attr({y:40+15*r,x:i.instance.margin,opacity:0}).text(a.description+": "+Math.round(a.value)+" "+a.unit).transition().duration(i.duration).attr({opacity:1})});var a=["eth0","eth1"],c=[{meter:"network.incoming.bytes.rate",label:"Incoming"},{meter:"network.outgoing.bytes.rate",label:"Outgoing"}];a.forEach(function(e,r){0!==t.port[e].length&&(n.append("text").attr({y:90,x:i.instance.margin+120*r,"class":"name"}).text(t.name+"-"+e),c.forEach(function(a,c){var s=o.find(t.port[e],{meter:a.meter});angular.isDefined(s)&&n.append("text").attr({y:105+15*c,x:i.instance.margin+120*r,opacity:0}).text(a.label+": "+Math.round(s.value)+" "+s.unit).transition().duration(i.duration).attr({opacity:1})}))})},p=function(e,t){var n=e.append("g").attr({transform:"translate(200, -120)","class":"stats-container"});n.append("line").attr({x1:-160,y1:120,x2:0,y2:50,stroke:"black",opacity:0}).transition().duration(i.duration).attr({opacity:1});var r=110,a=250;t.container&&(r+=i.container.height+2*i.container.margin),n.append("rect").attr({width:a,height:r,opacity:0}).transition().duration(i.duration).attr({opacity:1}),n.append("text").attr({y:15,x:i.instance.margin,"class":"name",opacity:0}).text(t.humanReadableName).transition().duration(i.duration).attr({opacity:1}),n.append("text").attr({y:30,x:i.instance.margin,"class":"ip",opacity:0}).text(t.ip).transition().duration(i.duration).attr({opacity:1});var c=["memory","memory.usage","cpu","vcpus"];c.forEach(function(e,r){var a=o.find(t.stats,{meter:e});n.append("text").attr({y:55+15*r,x:i.instance.margin,opacity:0}).text(a.description+": "+Math.round(a.value)+" "+a.unit).transition().duration(i.duration).attr({opacity:1})}),t.container&&d(n,t.container)};this.drawInstances=function(e,t){var o=e.node().getBoundingClientRect(),c=o.width,s=o.height,d=e.selectAll(".instances").data(t,function(e){return angular.isString(e.d3Id)?e.d3Id:e.d3Id="instance-"+ ++n}),h=d.enter().append("g");h.attr({transform:"translate("+c/2+", "+s/2+")","class":function(e){return"instance "+(e.selected?"active":"")+" "+l(e)}}).transition().duration(i.duration).attr({transform:function(e,t){return"translate("+a.getInstancePosition(t)+")"}}),h.append("rect").attr({width:0,height:0}).transition().duration(i.duration).attr({width:i.instance.width,height:i.instance.height}),h.append("text").attr({"text-anchor":"middle",y:23,x:40,opacity:0}).text(function(e){return u(e.humanReadableName)}).transition().duration(i.duration).attr({opacity:1}),h.each(function(e,t){var n=r.select(this);angular.isDefined(e.stats)&&e.selected&&p(n,e,t)}),h.on("click",function(e){console.log("Draw vignette with stats for instance: "+e.name)})},this.addPhisical=function(e){e.append("rect").attr(i.square),e.append("text").attr({"text-anchor":"middle",y:i.square.y-10}).text(function(e){return e.name})},this.addDevice=function(e){e.append("circle").attr(i.circle),e.append("text").attr({"text-anchor":"end",x:-i.circle.r-10,y:i.circle.r/2}).text(function(e){return e.name||e.mac})}}])}();var _slicedToArray=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{!r&&c["return"]&&c["return"]()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.serviceTopology").service("LogicTopologyHelper",["$window","$log","$rootScope","lodash","serviceTopologyConfig","NodeDrawer","ChartData",function(e,t,n,r,i,a,o){var c,s,u,l,d,p,h=this,f=0,g=o.logicTopologyData;this.computeElementPosition=function(e){var t=[],n=r.reduce(i.elWidths,function(e,t){return t+e},0),a=e-n-2*i.widthMargin,o=a/(i.elWidths.length-1);return r.forEach(i.elWidths,function(n,a){var c=0;0!==a&&(c=r.reduce(i.elWidths.slice(0,a),function(e,t){return t+e},0));var s=i.widthMargin+o*a+n/2+c;t.push(e-s)}),t};var v=function(e){var t=p.nodes(e);t.forEach(function(e){e.y=h.computeElementPosition(l)[e.depth]});var n=p.links(t);return[t,n]},m=function(e,t){var r=e.selectAll("g.node").data(t,function(e){return angular.isString(e.d3Id)||(e.d3Id="tree-"+ ++f),e.d3Id});r.enter().append("g").attr({"class":function(e){return"node "+e.type},transform:"translate("+l/2+", "+d/2+")"});a.addNetworks(r.filter(".network")),a.addRack(r.filter(".rack")),a.addPhisical(r.filter(".router")),a.addPhisical(r.filter(".subscriber")),a.addDevice(r.filter(".device")),r.filter(".subscriber").on("click",function(){n.$emit("subscriber.modal.open")});r.transition().duration(i.duration).attr({transform:function(e){return"translate("+e.y+","+e.x+")"}}),r.exit().remove()},b=function(e,t){c=d3.svg.diagonal().projection(function(e){return[e.y,e.x]});var n=e.selectAll("path.link").data(t,function(e){return e.target.d3Id});n.enter().insert("path","g").attr("class",function(e){return"link "+e.target.type}).attr("d",function(e){var t={x:d/2,y:l/2};return c({source:t,target:t})}),n.transition().duration(i.duration).attr("d",c),n.exit().remove()};this.setupTree=function(e){l=e.node().getBoundingClientRect().width,d=e.node().getBoundingClientRect().height;var t=l-2*i.widthMargin,n=d-2*i.heightMargin;p=d3.layout.tree().size([n,t])},this.updateTree=function(e){var t=v(g),n=_slicedToArray(t,2);s=n[0],u=n[1],m(e,s),b(e,u)}}])}(),function(){angular.module("xos.serviceTopology").directive("logicTopology",function(){return{restrict:"E",scope:{subscribers:"=",selected:"="},bindToController:!0,controllerAs:"vm",templateUrl:"templates/logicTopology.tpl.html",controller:["$element","$log","$scope","$rootScope","$timeout","d3","LogicTopologyHelper","Node","Tenant","Ceilometer","serviceTopologyConfig","ChartData",function(e,t,n,r,i,a,o,c,s,u,l,d){var p=this;t.info("Logic Plane");var h;this.selectedInstances=[],this.hideInstanceStats=!0;var f=function(e){h=a.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px")};d.getLogicTree().then(function(e){o.updateTree(h)}),n.$watch(function(){return p.selected},function(e){e&&(d.selectSubscriber(e),o.updateTree(h))}),r.$on("instance.detail.hide",function(){p.hideInstanceStats=!0,i(function(){p.selectedInstances=[],d.highlightInstances([]),o.updateTree(h)},500)}),r.$on("instance.detail",function(e,t){d.getInstanceStatus(t).then(function(e){o.updateTree(h)})}),f(e[0]),o.setupTree(h),this.openSubscriberModal=function(){p.subscriberModal=!0,n.$apply()},r.$on("subscriber.modal.open",function(){p.openSubscriberModal()})}]}})}(),function(){angular.module("xos.serviceTopology").directive("diagnostic",function(){return{restrict:"E",templateUrl:"templates/diagnostic.tpl.html",controllerAs:"vm",controller:["ChartData","Subscribers","ServiceRelation","$rootScope",function(e,t,n,r){var i=this;this.loader=!0,this.error=!1,t.query().$promise.then(function(e){return i.subscribers=e,n.get()}).then(function(e){i.serviceChain=e})["catch"](function(e){throw new Error(e)})["finally"](function(){i.loader=!1}),r.$on("subscriber.selected",function(r,a){n.getBySubscriber(a).then(function(n){return i.serviceChain=n,e.currentServiceChain=n,t.getWithDevices({id:a.id}).$promise}).then(function(t){i.selectedSubscriber=t,e.currentSubscriber=t})})}]}})}(),function(){angular.module("xos.serviceTopology").factory("d3",["$window",function(e){return e.d3}])}(),function(){angular.module("xos.serviceTopology").constant("serviceTopologyConfig",{widthMargin:20,heightMargin:30,duration:750,elWidths:[20,104,105,104,20],circle:{radius:10,r:10,selectedRadius:15},square:{width:20,height:20,x:-10,y:-10},rack:{width:105,height:50,x:-30,y:-25},computeNode:{width:50,height:20,margin:5,labelHeight:10,x:-25,y:-10},instance:{width:80,height:36,margin:5,x:-40,y:-18},container:{width:60,height:130,margin:5,x:-30,y:-15}})}(),function(){angular.module("xos.serviceTopology").service("ChartData",["$rootScope","$q","lodash","Tenant","Node","serviceTopologyConfig","Ceilometer","Instances",function(e,t,n,r,i,a,o,c){var s=this;this.currentSubscriber=null,this.currentServiceChain=null,this.logicTopologyData={name:"Router",type:"router",children:[{name:"WAN",type:"network",children:[{name:"Rack",type:"rack",computeNodes:[],children:[{name:"LAN",type:"network",children:[{name:"Subscriber",type:"subscriber"}]}]}]}]},this.getLogicTree=function(){var e=t.defer();return i.queryWithInstances().$promise.then(function(t){s.logicTopologyData.children[0].children[0].computeNodes=t,e.resolve(s.logicTopologyData)}),e.promise},this.addSubscriberTag=function(e){s.logicTopologyData.children[0].children[0].children[0].subscriberTag={cTag:e.c_tag,sTag:e.s_tag}},this.addSubscriber=function(e){return e.children=e.devices,s.logicTopologyData.children[0].children[0].children[0].children=[e],s.logicTopologyData},this.getSubscriberTag=function(){var e=JSON.parse(s.currentServiceChain.children[0].tenant.service_specific_attribute);delete e.creator_id,s.addSubscriberTag(e),s.currentSubscriber.tags={cTag:e.c_tag,sTag:e.s_tag}},this.getSubscriberIP=function(){var e=JSON.parse(s.currentServiceChain.children[0].children[0].tenant.service_specific_attribute).wan_container_ip;s.logicTopologyData.children[0].subscriberIP=e},this.selectSubscriber=function(e){a.elWidths.push(160),s.addSubscriber(angular.copy(e)),s.highlightInstances([]),s.getSubscriberTag(),s.getSubscriberIP()},this.highlightInstances=function(e){var t=s.logicTopologyData.children[0].children[0].computeNodes;t.map(function(e){e.instances.map(function(e){return e.selected=!1,e})}),n.forEach(e,function(e){t.map(function(t){t.instances.map(function(t){return t.id===e.id&&(t.selected=!0,t.stats=e.stats,t.container=e.container),t})})})},this.getInstanceStatus=function(e){var n=t.defer(),i=void 0;if(s.currentSubscriber){var a=void 0;try{a=JSON.parse(e.tenant.service_specific_attribute)}catch(u){a=null}if(a&&a.instance_id)!function(){var e={};i=c.get({id:a.instance_id}).$promise.then(function(t){return e=t,o.getInstanceStats(e.instance_uuid)}).then(function(t){e.stats=t;var n="vcpe-"+s.currentSubscriber.tags.sTag+"-"+s.currentSubscriber.tags.cTag;return e.container={name:n},o.getContainerStats(n)}).then(function(t){return e.container.stats=t.stats,e.container.port=t.port,[e]})}();else{var l=t.defer();l.resolve([]),i=l.promise}}else{var d={service_vsg:{kind:"vCPE"},service_vbng:{kind:"vBNG"},service_volt:{kind:"vOLT"}};i=r.queryVsgInstances(d[e.name]).$promise.then(function(e){return o.getInstancesStats(e)})}return i.then(function(e){s.highlightInstances(e),n.resolve(e)})["catch"](function(e){n.reject(e)}),n.promise}}])}();
\ No newline at end of file
diff --git a/xos/services/ceilometer/templates/ceilometeradmin.html b/xos/services/ceilometer/templates/ceilometeradmin.html
index 8149666..40f57e8 100644
--- a/xos/services/ceilometer/templates/ceilometeradmin.html
+++ b/xos/services/ceilometer/templates/ceilometeradmin.html
@@ -1,6 +1,6 @@
-<div class = "left-nav">
-<ul>
-<li><a href="/admin/ceilometer/monitoringchannel/">Monitoring Channels</a></li>
-</ul>
+<div class = "row text-center">
+    <div class="col-xs-12">
+        <a class="btn btn-primary" href="/admin/ceilometer/monitoringchannel/">Monitoring Channels</a>
+    </div>
 </div>
 
diff --git a/xos/services/ceilometer/templates/sflowadmin.html b/xos/services/ceilometer/templates/sflowadmin.html
index da2a8dd..3cbb333 100644
--- a/xos/services/ceilometer/templates/sflowadmin.html
+++ b/xos/services/ceilometer/templates/sflowadmin.html
@@ -1,6 +1,6 @@
-<div class = "left-nav">
-<ul>
-<li><a href="/admin/ceilometer/sflowtenant/">sFlow Tenants</a></li>
-</ul>
+<div class = "row text-center">
+    <div class="col-xs-12">
+        <a class="btn btn-primary" href="/admin/ceilometer/sflowtenant/">sFlow Tenants</a>
+    </div>
 </div>
 
diff --git a/xos/services/onos/templates/onosadmin.html b/xos/services/onos/templates/onosadmin.html
index 1e8d42c..e50660e 100644
--- a/xos/services/onos/templates/onosadmin.html
+++ b/xos/services/onos/templates/onosadmin.html
@@ -1,6 +1,6 @@
-<div class = "left-nav">
-<ul>
-<li><a href="/admin/onos/onosapp/">ONOS Apps</a></li>
-</ul>
+<div class = "row text-center">
+    <div class="col-xs-12">
+        <a class="btn btn-primary" href="/admin/onos/onosapp/">ONOS Apps</a>
+    </div>
 </div>