Exporting Tosca from UI
Change-Id: Ie7e58ac5bd51a56d028daa1c1e2577e7723a8297
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/Networkstemplates.js b/views/ngXosLib/xosHelpers/src/services/rest/Networkstemplates.js
new file mode 100644
index 0000000..961d5d8
--- /dev/null
+++ b/views/ngXosLib/xosHelpers/src/services/rest/Networkstemplates.js
@@ -0,0 +1,15 @@
+(function() {
+ 'use strict';
+
+ angular.module('xos.helpers')
+ /**
+ * @ngdoc service
+ * @name xos.helpers.Networkstemplates
+ * @description Angular resource to fetch /api/core/networktemplates/:id/
+ **/
+ .service('Networkstemplates', function($resource){
+ return $resource('/api/core/networktemplates/:id/', { id: '@id' }, {
+ update: { method: 'PUT' }
+ });
+ })
+})();
diff --git a/views/ngXosViews/serviceGrid/bower.json b/views/ngXosViews/serviceGrid/bower.json
index bae4e4d..18bd401 100644
--- a/views/ngXosViews/serviceGrid/bower.json
+++ b/views/ngXosViews/serviceGrid/bower.json
@@ -15,6 +15,9 @@
"tests"
],
"dependencies": {
+ "js-yaml": "~3.6.1",
+ "jszip": "Stuk/jszip#~3.0.0",
+ "file-saver": "eligrey/FileSaver.js#~1.3.2"
},
"devDependencies": {
"jquery": "2.1.4",
@@ -27,6 +30,7 @@
"lodash": "~4.11.1",
"bootstrap-css": "3.3.6",
"angular-chart.js": "~0.10.2",
- "d3": "~3.5.17"
+ "d3": "~3.5.17",
+ "angular-recursion": "~1.0.5"
}
}
diff --git a/views/ngXosViews/serviceGrid/karma.conf.js b/views/ngXosViews/serviceGrid/karma.conf.js
index 4123be9..44283c8 100644
--- a/views/ngXosViews/serviceGrid/karma.conf.js
+++ b/views/ngXosViews/serviceGrid/karma.conf.js
@@ -28,6 +28,7 @@
files: bowerComponents.concat([
'../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
'../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
+ 'src/js/main.js',
'src/js/**/*.js',
'spec/**/*.mock.js',
'spec/**/*.test.js',
diff --git a/views/ngXosViews/serviceGrid/mocks/data/flavors.json b/views/ngXosViews/serviceGrid/mocks/data/flavors.json
new file mode 100644
index 0000000..251ccb6
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/flavors.json
@@ -0,0 +1,216 @@
+[
+ {
+ "humanReadableName": "m1.large",
+ "validators": {
+ "default": [],
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "description": [],
+ "no_policy": [],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "flavor": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "order": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 3,
+ "created": "2016-06-20T21:33:32.126894Z",
+ "updated": "2016-06-20T21:33:36.066908Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": true,
+ "no_policy": false,
+ "name": "m1.large",
+ "description": null,
+ "flavor": "m1.large",
+ "order": 0,
+ "default": false,
+ "deployments": [
+ 1
+ ]
+ },
+ {
+ "humanReadableName": "m1.medium",
+ "validators": {
+ "default": [],
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "description": [],
+ "no_policy": [],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "flavor": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "order": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 2,
+ "created": "2016-06-20T21:33:32.035528Z",
+ "updated": "2016-06-20T21:33:36.089834Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": true,
+ "no_policy": false,
+ "name": "m1.medium",
+ "description": null,
+ "flavor": "m1.medium",
+ "order": 0,
+ "default": false,
+ "deployments": [
+ 1
+ ]
+ },
+ {
+ "humanReadableName": "m1.small",
+ "validators": {
+ "default": [],
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "description": [],
+ "no_policy": [],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "flavor": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "order": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:33:31.974383Z",
+ "updated": "2016-06-20T21:33:36.106941Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": true,
+ "no_policy": false,
+ "name": "m1.small",
+ "description": null,
+ "flavor": "m1.small",
+ "order": 0,
+ "default": false,
+ "deployments": [
+ 1
+ ]
+ },
+ {
+ "humanReadableName": "m1.xlarge",
+ "validators": {
+ "default": [],
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "description": [],
+ "no_policy": [],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "flavor": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "order": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 4,
+ "created": "2016-06-20T21:33:36.234266Z",
+ "updated": "2016-06-20T21:33:36.234121Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": true,
+ "no_policy": false,
+ "name": "m1.xlarge",
+ "description": null,
+ "flavor": "m1.xlarge",
+ "order": 0,
+ "default": false,
+ "deployments": []
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/images.json b/views/ngXosViews/serviceGrid/mocks/data/images.json
new file mode 100644
index 0000000..8a4fd83
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/images.json
@@ -0,0 +1,114 @@
+[
+ {
+ "humanReadableName": "trusty-server-multi-nic",
+ "validators": {
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "container_format": [
+ "notBlank"
+ ],
+ "no_policy": [],
+ "disk_format": [
+ "notBlank"
+ ],
+ "kind": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "tag": [],
+ "path": [],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 2,
+ "created": "2016-06-20T21:29:37.969117Z",
+ "updated": "2016-06-20T21:29:37.968740Z",
+ "enacted": "2016-06-20T21:29:38.057186Z",
+ "policed": "2016-06-20T21:29:39.144781Z",
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458178.081831, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "trusty-server-multi-nic",
+ "kind": "vm",
+ "disk_format": "raw",
+ "container_format": "bare",
+ "path": "/opt/xos/images/trusty-server-multi-nic.img",
+ "tag": null,
+ "deployments": []
+ },
+ {
+ "humanReadableName": "vsg-1.0",
+ "validators": {
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "container_format": [
+ "notBlank"
+ ],
+ "no_policy": [],
+ "disk_format": [
+ "notBlank"
+ ],
+ "kind": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "tag": [],
+ "path": [],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:29:37.949039Z",
+ "updated": "2016-06-20T21:36:36.196635Z",
+ "enacted": "2016-06-20T21:36:56.463927Z",
+ "policed": "2016-06-20T21:36:37.125141Z",
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458616.491853, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "vsg-1.0",
+ "kind": "vm",
+ "disk_format": "raw",
+ "container_format": "bare",
+ "path": "/opt/xos/images/vsg-1.0.img",
+ "tag": null,
+ "deployments": []
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/instances.json b/views/ngXosViews/serviceGrid/mocks/data/instances.json
new file mode 100644
index 0000000..68a9620
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/instances.json
@@ -0,0 +1,89 @@
+[
+ {
+ "humanReadableName": "mysite_vsg-1",
+ "validators": {
+ "policed": [],
+ "creator": [],
+ "ip": [],
+ "image": [
+ "notBlank"
+ ],
+ "backend_register": [
+ "notBlank"
+ ],
+ "flavor": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "instance_name": [],
+ "slice": [
+ "notBlank"
+ ],
+ "no_sync": [],
+ "node": [
+ "notBlank"
+ ],
+ "userData": [],
+ "updated": [
+ "notBlank"
+ ],
+ "parent": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "deployment": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "instance_uuid": [],
+ "numberCores": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "isolation": [
+ "notBlank"
+ ],
+ "no_policy": [],
+ "instance_id": [],
+ "volumes": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:36:36.599139Z",
+ "updated": "2016-06-20T21:36:38.654961Z",
+ "enacted": "2016-06-20T21:37:09.416303Z",
+ "policed": "2016-06-20T21:36:40.179041Z",
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458656.696624, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "instance_id": "instance-00000001",
+ "instance_uuid": "6cdf8d0b-0468-4ce2-af07-b8d35e0e14cf",
+ "name": "mysite_vsg",
+ "instance_name": "mysite_vsg-1",
+ "ip": "192.168.122.140",
+ "image": 1,
+ "creator": 1,
+ "slice": 2,
+ "deployment": 1,
+ "node": 1,
+ "numberCores": 0,
+ "flavor": 1,
+ "userData": null,
+ "isolation": "vm",
+ "volumes": "/etc/dnsmasq.d,/etc/ufw",
+ "parent": null,
+ "networks": [
+ 1,
+ 2
+ ]
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/networks.json b/views/ngXosViews/serviceGrid/mocks/data/networks.json
new file mode 100644
index 0000000..e581298
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/networks.json
@@ -0,0 +1,166 @@
+[
+ {
+ "humanReadableName": "management",
+ "validators": {
+ "router_id": [],
+ "policed": [],
+ "labels": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "start_ip": [],
+ "owner": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "subnet": [],
+ "subnet_id": [],
+ "end_ip": [],
+ "template": [
+ "notBlank"
+ ],
+ "no_sync": [],
+ "permit_all_slices": [],
+ "updated": [
+ "notBlank"
+ ],
+ "controller_url": [],
+ "controller_parameters": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "autoconnect": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "network_id": [],
+ "topology_parameters": [],
+ "ports": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:36:32.006043Z",
+ "updated": "2016-06-20T21:36:32.039571Z",
+ "enacted": null,
+ "policed": "2016-06-20T21:36:32.389397Z",
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "management",
+ "template": 4,
+ "subnet": "172.27.0.0/24",
+ "ports": null,
+ "labels": null,
+ "owner": 1,
+ "guaranteed_bandwidth": 0,
+ "permit_all_slices": true,
+ "topology_parameters": null,
+ "controller_url": null,
+ "controller_parameters": null,
+ "network_id": null,
+ "router_id": null,
+ "subnet_id": null,
+ "autoconnect": false,
+ "slices": [
+ 2
+ ],
+ "instances": [
+ 1
+ ],
+ "routers": []
+ },
+ {
+ "humanReadableName": "mysite_vsg-access",
+ "validators": {
+ "router_id": [],
+ "policed": [],
+ "labels": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "start_ip": [],
+ "owner": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "subnet": [],
+ "subnet_id": [],
+ "end_ip": [],
+ "template": [
+ "notBlank"
+ ],
+ "no_sync": [],
+ "permit_all_slices": [],
+ "updated": [
+ "notBlank"
+ ],
+ "controller_url": [],
+ "controller_parameters": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "autoconnect": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "network_id": [],
+ "topology_parameters": [],
+ "ports": []
+ },
+ "id": 2,
+ "created": "2016-06-20T21:36:36.439706Z",
+ "updated": "2016-06-20T21:36:36.456977Z",
+ "enacted": null,
+ "policed": "2016-06-20T21:36:37.419444Z",
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "mysite_vsg-access",
+ "template": 2,
+ "subnet": "",
+ "ports": null,
+ "labels": null,
+ "owner": 2,
+ "guaranteed_bandwidth": 0,
+ "permit_all_slices": true,
+ "topology_parameters": null,
+ "controller_url": null,
+ "controller_parameters": null,
+ "network_id": null,
+ "router_id": null,
+ "subnet_id": null,
+ "autoconnect": false,
+ "slices": [
+ 2
+ ],
+ "instances": [
+ 1
+ ],
+ "routers": []
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/networktemplates.json b/views/ngXosViews/serviceGrid/mocks/data/networktemplates.json
new file mode 100644
index 0000000..c36a401
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/networktemplates.json
@@ -0,0 +1,262 @@
+[
+ {
+ "humanReadableName": "Public shared IPv4",
+ "validators": {
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "access": [],
+ "shared_network_name": [],
+ "controller_kind": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "visibility": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "translation": [
+ "notBlank"
+ ],
+ "topology_kind": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "no_sync": [],
+ "shared_network_id": []
+ },
+ "id": 1,
+ "created": "2016-06-23T20:14:16.126918Z",
+ "updated": "2016-06-23T20:14:16.126754Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "Public shared IPv4",
+ "description": null,
+ "guaranteed_bandwidth": 0,
+ "visibility": "private",
+ "translation": "NAT",
+ "access": null,
+ "shared_network_name": "nat-net",
+ "shared_network_id": null,
+ "topology_kind": "bigswitch",
+ "controller_kind": null
+ },
+ {
+ "humanReadableName": "Public dedicated IPv4",
+ "validators": {
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "access": [],
+ "shared_network_name": [],
+ "controller_kind": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "visibility": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "translation": [
+ "notBlank"
+ ],
+ "topology_kind": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "no_sync": [],
+ "shared_network_id": []
+ },
+ "id": 3,
+ "created": "2016-06-23T20:14:16.202765Z",
+ "updated": "2016-06-23T20:14:16.202562Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "Public dedicated IPv4",
+ "description": null,
+ "guaranteed_bandwidth": 0,
+ "visibility": "public",
+ "translation": "none",
+ "access": null,
+ "shared_network_name": "ext-net",
+ "shared_network_id": null,
+ "topology_kind": "bigswitch",
+ "controller_kind": null
+ },
+ {
+ "humanReadableName": "management_template",
+ "validators": {
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "access": [],
+ "shared_network_name": [],
+ "controller_kind": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "visibility": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "translation": [
+ "notBlank"
+ ],
+ "topology_kind": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "no_sync": [],
+ "shared_network_id": []
+ },
+ "id": 4,
+ "created": "2016-06-23T20:18:19.778090Z",
+ "updated": "2016-06-23T20:18:19.777887Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "management_template",
+ "description": null,
+ "guaranteed_bandwidth": 0,
+ "visibility": "private",
+ "translation": "none",
+ "access": null,
+ "shared_network_name": null,
+ "shared_network_id": null,
+ "topology_kind": "bigswitch",
+ "controller_kind": null
+ },
+ {
+ "humanReadableName": "Private",
+ "validators": {
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "access": [],
+ "shared_network_name": [],
+ "controller_kind": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "visibility": [
+ "notBlank"
+ ],
+ "lazy_blocked": [],
+ "guaranteed_bandwidth": [
+ "notBlank"
+ ],
+ "translation": [
+ "notBlank"
+ ],
+ "topology_kind": [
+ "notBlank"
+ ],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "no_sync": [],
+ "shared_network_id": []
+ },
+ "id": 2,
+ "created": "2016-06-23T20:14:16.178408Z",
+ "updated": "2016-06-23T20:18:24.072523Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "Private",
+ "description": null,
+ "guaranteed_bandwidth": 0,
+ "visibility": "private",
+ "translation": "none",
+ "access": null,
+ "shared_network_name": null,
+ "shared_network_id": null,
+ "topology_kind": "bigswitch",
+ "controller_kind": null
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/node.json b/views/ngXosViews/serviceGrid/mocks/data/node.json
new file mode 100644
index 0000000..b92923f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/node.json
@@ -0,0 +1,48 @@
+[
+ {
+ "humanReadableName": "nova-compute-1",
+ "validators": {
+ "updated": [
+ "notBlank"
+ ],
+ "policed": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "deleted": [],
+ "no_policy": [],
+ "site": [],
+ "lazy_blocked": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "write_protect": [],
+ "site_deployment": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_sync": [],
+ "enacted": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:33:43.532833Z",
+ "updated": "2016-06-20T21:37:46.435545Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": true,
+ "no_policy": false,
+ "name": "nova-compute-1",
+ "site_deployment": 1,
+ "site": 1,
+ "nodelabels": []
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/services.json b/views/ngXosViews/serviceGrid/mocks/data/services.json
new file mode 100644
index 0000000..f961a3c
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/services.json
@@ -0,0 +1,514 @@
+[
+ {
+ "humanReadableName": "fabric",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 3,
+ "created": "2016-06-20T21:35:56.788935Z",
+ "updated": "2016-06-20T21:35:56.788499Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "fabric",
+ "name": "fabric",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/fabric/fabricservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": null
+ },
+ {
+ "humanReadableName": "ONOS_Fabric",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 4,
+ "created": "2016-06-20T21:35:56.810806Z",
+ "updated": "2016-06-20T21:35:56.810649Z",
+ "enacted": "2016-06-20T21:36:04.658726Z",
+ "policed": null,
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458564.69207, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "onos",
+ "name": "ONOS_Fabric",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/onos/onosservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"no_container\": true, \"rest_hostname\": \"onos-fabric\"}"
+ },
+ {
+ "humanReadableName": "vrouter",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 5,
+ "created": "2016-06-20T21:36:36.240269Z",
+ "updated": "2016-06-20T21:36:36.240062Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "vROUTER",
+ "name": "vrouter",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/vrouter/vrouterservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": null
+ },
+ {
+ "humanReadableName": "vsg",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 6,
+ "created": "2016-06-20T21:36:36.262734Z",
+ "updated": "2016-06-20T21:36:36.262503Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "vCPE",
+ "name": "vsg",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/cord/vsgservice/$id$/",
+ "icon_url": null,
+ "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl1k9r1G491+ClISp6JOKlNmgBSV5YAvw2Ulh5Mj7XUgLatjHIBID2Ue54kAbCP48LVIAhqVFClPC7PtfVQY9+3mKi+LUJCgkkjR+6IlK/8eVzr1i3BvhLbtifrhKCvdL+d/5Tzxl8C8qCWfnJhVTqGRmVGBDFf4SukCjxF5CMG1naSlkgrINlMNc34IfQ2UAxRSscsEaMiijDQFBwGhJLQzef0r9vfIycnv3Ua/xQ5Pjqtcy/Go6K849wsNNUQ4yMgaUWZ8tmwFuqu4nFC2lI/H8EZN4NBejjMnJs3F6IMb0xe45/r7TXvWEpZ1c/nNwrvOPi/U44VkwMgp/EcRgV smbaker@node.smbaker-xos-test.xos-pg0.wisc.cloudlab.us\n",
+ "private_key_fn": "/opt/xos/services/vsg/keys/vsg_rsa",
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"backend_network_label\": \"hpc_client\"}"
+ },
+ {
+ "humanReadableName": "volt",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 7,
+ "created": "2016-06-20T21:36:36.468811Z",
+ "updated": "2016-06-20T21:36:36.468645Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "vOLT",
+ "name": "volt",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/cord/voltservice/$id$/",
+ "icon_url": null,
+ "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl1k9r1G491+ClISp6JOKlNmgBSV5YAvw2Ulh5Mj7XUgLatjHIBID2Ue54kAbCP48LVIAhqVFClPC7PtfVQY9+3mKi+LUJCgkkjR+6IlK/8eVzr1i3BvhLbtifrhKCvdL+d/5Tzxl8C8qCWfnJhVTqGRmVGBDFf4SukCjxF5CMG1naSlkgrINlMNc34IfQ2UAxRSscsEaMiijDQFBwGhJLQzef0r9vfIycnv3Ua/xQ5Pjqtcy/Go6K849wsNNUQ4yMgaUWZ8tmwFuqu4nFC2lI/H8EZN4NBejjMnJs3F6IMb0xe45/r7TXvWEpZ1c/nNwrvOPi/U44VkwMgp/EcRgV smbaker@node.smbaker-xos-test.xos-pg0.wisc.cloudlab.us\n",
+ "private_key_fn": "/opt/xos/services/volt/keys/volt_rsa",
+ "service_specific_id": null,
+ "service_specific_attribute": null
+ },
+ {
+ "humanReadableName": "vtr",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 8,
+ "created": "2016-06-20T21:36:37.129713Z",
+ "updated": "2016-06-20T21:36:37.129433Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "vTR",
+ "name": "vtr",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/vtr/vtrservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": null
+ },
+ {
+ "humanReadableName": "vtn",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 2,
+ "created": "2016-06-20T21:35:51.964599Z",
+ "updated": "2016-06-20T21:37:46.469766Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "VTN",
+ "name": "vtn",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/vtn/vtnservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"sshUser\": \"root\", \"xosEndpoint\": \"http://xos/\", \"xosPassword\": \"letmein\", \"sshKeyFile\": \"/root/node_key\", \"xosUser\": \"padmin@vicci.org\", \"ovsdbPort\": \"6641\", \"sshPort\": \"22\", \"localManagementIp\": \"172.27.0.1/24\", \"privateGatewayMac\": \"00:00:00:00:00:01\"}"
+ },
+ {
+ "humanReadableName": "ONOS_CORD",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "view_url": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "private_key_fn": [],
+ "icon_url": [],
+ "no_sync": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "lazy_blocked": [],
+ "versionNumber": [],
+ "service_specific_id": [],
+ "enacted": [],
+ "public_key": [],
+ "kind": [
+ "notBlank"
+ ],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "controller": [],
+ "published": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:35:51.892027Z",
+ "updated": "2016-06-20T21:37:46.417265Z",
+ "enacted": "2016-06-20T21:37:54.037851Z",
+ "policed": null,
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458674.061194, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "description": null,
+ "enabled": true,
+ "kind": "onos",
+ "name": "ONOS_CORD",
+ "versionNumber": null,
+ "published": true,
+ "view_url": "/admin/onos/onosservice/$id$/",
+ "icon_url": null,
+ "public_key": null,
+ "private_key_fn": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"no_container\": true, \"rest_hostname\": \"onos-cord\"}"
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/sites.json b/views/ngXosViews/serviceGrid/mocks/data/sites.json
new file mode 100644
index 0000000..bd0ba95
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/sites.json
@@ -0,0 +1,72 @@
+[
+ {
+ "humanReadableName": "mysite",
+ "validators": {
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "site_url": [
+ "url"
+ ],
+ "location": [
+ "notBlank"
+ ],
+ "hosts_nodes": [],
+ "no_sync": [],
+ "abbreviated_name": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "latitude": [],
+ "is_public": [],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "longitude": [],
+ "hosts_users": [],
+ "login_base": [
+ "notBlank"
+ ]
+ },
+ "id": 1,
+ "created": "2016-06-20T21:33:36.116579Z",
+ "updated": "2016-06-20T21:36:36.210629Z",
+ "enacted": null,
+ "policed": "2016-06-20T21:36:37.091400Z",
+ "backend_register": "{}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "mysite",
+ "site_url": "http://xosproject.org/",
+ "enabled": true,
+ "hosts_nodes": true,
+ "hosts_users": true,
+ "location": null,
+ "longitude": null,
+ "latitude": null,
+ "login_base": "mysite",
+ "is_public": true,
+ "abbreviated_name": "",
+ "deployments": [
+ 1
+ ]
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/slices.json b/views/ngXosViews/serviceGrid/mocks/data/slices.json
new file mode 100644
index 0000000..2f4d00c
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/slices.json
@@ -0,0 +1,163 @@
+[
+ {
+ "humanReadableName": "mysite_management",
+ "validators": {
+ "default_flavor": [],
+ "policed": [],
+ "creator": [],
+ "site": [
+ "notBlank"
+ ],
+ "max_instances": [
+ "notBlank"
+ ],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "network": [],
+ "service": [],
+ "default_isolation": [
+ "notBlank"
+ ],
+ "no_sync": [],
+ "exposed_ports": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "slice_url": [
+ "url"
+ ],
+ "serviceClass": [],
+ "lazy_blocked": [],
+ "omf_friendly": [],
+ "mount_data_sets": [],
+ "default_node": [],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "default_image": []
+ },
+ "id": 1,
+ "created": "2016-06-20T21:36:31.979507Z",
+ "updated": "2016-06-20T21:36:38.635976Z",
+ "enacted": null,
+ "policed": "2016-06-20T21:36:38.787528Z",
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "mysite_management",
+ "enabled": true,
+ "omf_friendly": false,
+ "description": "",
+ "slice_url": "",
+ "site": 1,
+ "max_instances": 10,
+ "service": null,
+ "network": "noauto",
+ "exposed_ports": null,
+ "serviceClass": null,
+ "creator": 1,
+ "default_flavor": null,
+ "default_image": null,
+ "mount_data_sets": "GenBank",
+ "default_isolation": "vm",
+ "networks": []
+ },
+ {
+ "humanReadableName": "mysite_vsg",
+ "validators": {
+ "default_flavor": [],
+ "policed": [],
+ "creator": [],
+ "site": [
+ "notBlank"
+ ],
+ "max_instances": [
+ "notBlank"
+ ],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "network": [],
+ "service": [],
+ "default_isolation": [
+ "notBlank"
+ ],
+ "no_sync": [],
+ "exposed_ports": [],
+ "updated": [
+ "notBlank"
+ ],
+ "description": [],
+ "deleted": [],
+ "slice_url": [
+ "url"
+ ],
+ "serviceClass": [],
+ "lazy_blocked": [],
+ "omf_friendly": [],
+ "mount_data_sets": [],
+ "default_node": [],
+ "enacted": [],
+ "name": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "no_policy": [],
+ "enabled": [],
+ "default_image": []
+ },
+ "id": 2,
+ "created": "2016-06-20T21:36:36.290539Z",
+ "updated": "2016-06-20T21:36:38.625760Z",
+ "enacted": null,
+ "policed": "2016-06-20T21:36:40.119502Z",
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "name": "mysite_vsg",
+ "enabled": true,
+ "omf_friendly": false,
+ "description": "",
+ "slice_url": "",
+ "site": 1,
+ "max_instances": 10,
+ "service": 6,
+ "network": "noauto",
+ "exposed_ports": null,
+ "serviceClass": null,
+ "creator": 1,
+ "default_flavor": null,
+ "default_image": 1,
+ "mount_data_sets": "GenBank",
+ "default_isolation": "vm",
+ "networks": [
+ 2,
+ 1
+ ]
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/data/tenants.json b/views/ngXosViews/serviceGrid/mocks/data/tenants.json
new file mode 100644
index 0000000..2739c9a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/data/tenants.json
@@ -0,0 +1,612 @@
+[
+ {
+ "humanReadableName": "coarse-tenant-3",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 3,
+ "created": "2016-06-20T21:36:36.274049Z",
+ "updated": "2016-06-20T21:36:36.273883Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "coarse",
+ "provider_service": 5,
+ "subscriber_service": 6,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": null,
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "coarse-tenant-4",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 4,
+ "created": "2016-06-20T21:36:36.477159Z",
+ "updated": "2016-06-20T21:36:36.477018Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "coarse",
+ "provider_service": 6,
+ "subscriber_service": 7,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": null,
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "vOLT-tenant-6",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 6,
+ "created": "2016-06-20T21:36:36.533209Z",
+ "updated": "2016-06-20T21:36:36.533060Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{}",
+ "backend_status": "0 - Provisioning in progress",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "vOLT",
+ "provider_service": 7,
+ "subscriber_service": null,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": 1,
+ "subscriber_network": null,
+ "service_specific_id": "123",
+ "service_specific_attribute": null,
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "vCPE-tenant-7",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 7,
+ "created": "2016-06-20T21:36:36.556180Z",
+ "updated": "2016-06-20T21:36:37.277167Z",
+ "enacted": "2016-06-20T21:43:30.075930Z",
+ "policed": null,
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466459040.216983, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "vCPE",
+ "provider_service": 6,
+ "subscriber_service": null,
+ "subscriber_tenant": 6,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"instance_id\": 1, \"creator_id\": 1, \"last_ansible_hash\": \"30d35de441b1e87e7e6a4fc79834ac56\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "vROUTER-tenant-9",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 9,
+ "created": "2016-06-20T21:36:36.677067Z",
+ "updated": "2016-06-20T21:36:36.677678Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{\"next_run\": 1466494205.83568, \"last_failure\": 1466465405.835683, \"last_success\": 1466458621.14023, \"exponent\": 209, \"failures\": 209}",
+ "backend_status": "2 - Exception('Expecting object: line 1 column 1 (char 0) // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/network/configuration/hosts',)",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "vROUTER",
+ "provider_service": 5,
+ "subscriber_service": null,
+ "subscriber_tenant": 7,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"public_ip\": \"10.168.0.3\", \"address_pool_id\": 2, \"public_mac\": \"02:42:0a:a8:00:03\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "vROUTER-tenant-8",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 8,
+ "created": "2016-06-20T21:36:36.664628Z",
+ "updated": "2016-06-20T21:36:36.665255Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{\"next_run\": 1466494206.981866, \"last_failure\": 1466465406.981868, \"last_success\": 1466458619.671976, \"exponent\": 209, \"failures\": 209}",
+ "backend_status": "2 - Exception('Expecting object: line 1 column 1 (char 0) // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/network/configuration/hosts',)",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "vROUTER",
+ "provider_service": 5,
+ "subscriber_service": 6,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"public_ip\": \"10.168.0.2\", \"tenant_for_instance_id\": 1, \"address_pool_id\": 2, \"public_mac\": \"02:42:0a:a8:00:02\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "onos-tenant-1",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 1,
+ "created": "2016-06-20T21:35:52.080746Z",
+ "updated": "2016-06-20T21:37:46.517157Z",
+ "enacted": "2016-06-20T21:37:55.377495Z",
+ "policed": null,
+ "backend_register": "{\"next_run\": 0, \"last_success\": 1466458677.529692, \"exponent\": 0}",
+ "backend_status": "1 - OK",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "onos",
+ "provider_service": 1,
+ "subscriber_service": 2,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"creator_id\": 1, \"dependencies\": \"org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base, org.onosproject.dhcp, org.onosproject.cordvtn, org.onosproject.olt, org.onosproject.igmp, org.onosproject.cordmcast\", \"name\": \"VTN_ONOS_app\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "onos-tenant-5",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 5,
+ "created": "2016-06-20T21:36:36.499094Z",
+ "updated": "2016-06-20T21:36:36.498928Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{\"next_run\": 1466494235.874574, \"failures\": 732, \"last_success\": 1466458599.686363, \"exponent\": 732, \"last_failure\": 1466465435.874577}",
+ "backend_status": "2 - Exception('Ansible playbook failed. // Status code was not [200] // Status code was not [200]',)",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "onos",
+ "provider_service": 1,
+ "subscriber_service": 7,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"creator_id\": 1, \"dependencies\": \"org.onosproject.openflow-base, org.onosproject.olt, org.ciena.onos.ext_notifier, org.ciena.onos.volt_event_publisher\", \"name\": \"vOLT_ONOS_app\", \"install_dependencies\": \"onos-ext-notifier-1.0-SNAPSHOT.oar, onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "onos-tenant-10",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 10,
+ "created": "2016-06-20T21:36:37.094935Z",
+ "updated": "2016-06-20T21:36:37.094764Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{\"next_run\": 1466494237.018397, \"failures\": 732, \"last_success\": 1466458602.833531, \"exponent\": 732, \"last_failure\": 1466465437.0184}",
+ "backend_status": "2 - Exception('Ansible playbook failed. // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/active',)",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "onos",
+ "provider_service": 4,
+ "subscriber_service": 5,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"creator_id\": 1, \"dependencies\": \"org.onosproject.vrouter\", \"name\": \"vRouter_ONOS_app\"}",
+ "connect_method": "na"
+ },
+ {
+ "humanReadableName": "onos-tenant-2",
+ "validators": {
+ "service_specific_attribute": [],
+ "policed": [],
+ "backend_register": [
+ "notBlank"
+ ],
+ "backend_status": [
+ "notBlank"
+ ],
+ "id": [],
+ "no_policy": [],
+ "subscriber_service": [],
+ "subscriber_tenant": [],
+ "no_sync": [],
+ "connect_method": [
+ "notBlank"
+ ],
+ "updated": [
+ "notBlank"
+ ],
+ "deleted": [],
+ "lazy_blocked": [],
+ "service_specific_id": [],
+ "subscriber_root": [],
+ "subscriber_user": [],
+ "enacted": [],
+ "kind": [
+ "notBlank"
+ ],
+ "created": [],
+ "write_protect": [],
+ "subscriber_network": [],
+ "provider_service": [
+ "notBlank"
+ ]
+ },
+ "id": 2,
+ "created": "2016-06-20T21:35:56.835440Z",
+ "updated": "2016-06-20T21:35:56.835274Z",
+ "enacted": null,
+ "policed": null,
+ "backend_register": "{\"next_run\": 1466494229.282132, \"failures\": 736, \"last_success\": 1466458566.347982, \"exponent\": 736, \"last_failure\": 1466465429.282135}",
+ "backend_status": "2 - Exception('Ansible playbook failed. // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.lldpprovider/active // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.hostprovider/active // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.openflow-base/active // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.openflow/active // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.drivers/active // Socket error: [Errno 111] Connection refused to http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active',)",
+ "deleted": false,
+ "write_protect": false,
+ "lazy_blocked": false,
+ "no_sync": false,
+ "no_policy": false,
+ "kind": "onos",
+ "provider_service": 4,
+ "subscriber_service": 3,
+ "subscriber_tenant": null,
+ "subscriber_user": null,
+ "subscriber_root": null,
+ "subscriber_network": null,
+ "service_specific_id": null,
+ "service_specific_attribute": "{\"creator_id\": 1, \"dependencies\": \"org.onosproject.lldpprovider, org.onosproject.hostprovider, org.onosproject.openflow-base, org.onosproject.openflow, org.onosproject.drivers, org.onosproject.segmentrouting\", \"name\": \"Fabric_ONOS_app\"}",
+ "connect_method": "na"
+ }
+]
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/mocks/diagnostic.conf.json b/views/ngXosViews/serviceGrid/mocks/diagnostic.conf.json
new file mode 100644
index 0000000..70c3337
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/mocks/diagnostic.conf.json
@@ -0,0 +1,52 @@
+{
+ "endpoints": [
+ {
+ "url": "images",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "instances",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "networks",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "networktemplates",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "services",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "sites",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "slices",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ },
+ {
+ "url": "tenants",
+ "base": "api/core/",
+ "methods": ["GET"],
+ "param": "id"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/package.json b/views/ngXosViews/serviceGrid/package.json
index c33c615..130737b 100644
--- a/views/ngXosViews/serviceGrid/package.json
+++ b/views/ngXosViews/serviceGrid/package.json
@@ -9,7 +9,8 @@
"build": "gulp",
"test": "karma start",
"test:ci": "karma start --single-run",
- "lint": "eslint src/js/"
+ "lint": "eslint src/js/",
+ "server": "easy-mocker -c ./mocks/diagnostic.conf.json -d ./mocks/data"
},
"keywords": [
"XOS",
diff --git a/views/ngXosViews/serviceGrid/spec/sample.test.js b/views/ngXosViews/serviceGrid/spec/sample.test.js
deleted file mode 100644
index c026149..0000000
--- a/views/ngXosViews/serviceGrid/spec/sample.test.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-describe('The User List', () => {
-
- var scope, element, isolatedScope, httpBackend;
-
- beforeEach(module('xos.serviceGrid'));
- beforeEach(module('templates'));
-
- beforeEach(inject(function($httpBackend, $compile, $rootScope){
-
- httpBackend = $httpBackend;
- // Setting up mock request
- $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
- {
- email: 'teo@onlab.us',
- firstname: 'Matteo',
- lastname: 'Scandolo'
- }
- ]);
-
- scope = $rootScope.$new();
- element = angular.element('<users-list></users-list>');
- $compile(element)(scope);
- scope.$digest();
- isolatedScope = element.isolateScope().vm;
- }));
-
- xit('should load 1 users', () => {
- httpBackend.flush();
- expect(isolatedScope.users.length).toBe(1);
- expect(isolatedScope.users[0].email).toEqual('teo@onlab.us');
- expect(isolatedScope.users[0].firstname).toEqual('Matteo');
- expect(isolatedScope.users[0].lastname).toEqual('Scandolo');
- });
-
-});
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/spec/services_encoder.test.js b/views/ngXosViews/serviceGrid/spec/services_encoder.test.js
new file mode 100644
index 0000000..3107b7f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/spec/services_encoder.test.js
@@ -0,0 +1,223 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+ describe('The Services Encoder Service', () => {
+
+ var service, rootScope, ArchiveManagerSpy, toscaBase;
+
+ const toscaBaseDefault = {
+ topology_template: {
+ node_templates: {}
+ }
+ };
+
+ beforeEach(module('xos.serviceGrid'));
+ beforeEach(module('templates'));
+
+ beforeEach(inject(($rootScope, ArchiveManager, ServiceEncoder) => {
+ rootScope = $rootScope;
+ toscaBase = angular.copy(toscaBaseDefault);
+
+ ArchiveManagerSpy = ArchiveManager;
+ spyOn(ArchiveManagerSpy, 'createArchive');
+ spyOn(ArchiveManagerSpy, 'addFile');
+ service = ServiceEncoder;
+ }));
+
+ describe('the formatServiceProperties method', () => {
+
+ it('should return only the existing properties', (done) => {
+ service.formatServiceProperties({name: 'test', kind: 'vCPE'}, toscaBase)
+ .then(res => {
+ expect(res).toEqual({
+ topology_template:{
+ node_templates: {
+ 'service#test': {
+ type: 'tosca.nodes.VSGService',
+ properties: {kind: 'vCPE'}
+ }
+ }
+ }
+ });
+ done();
+ });
+ rootScope.$apply();
+ });
+
+ it('should return all properties', (done) => {
+ service.formatServiceProperties({
+ name: 'test',
+ kind: 'vCPE',
+ view_url: 'view_url',
+ icon_url: 'icon_url',
+ private_key_fn: 'private_key_fn'
+ }, toscaBase)
+ .then(res => {
+ expect(res).toEqual({
+ topology_template:{
+ node_templates: {
+ 'service#test': {
+ type: 'tosca.nodes.VSGService',
+ properties: {
+ kind: 'vCPE',
+ view_url: 'view_url',
+ icon_url: 'icon_url',
+ private_key_fn: 'private_key_fn'
+ }
+ }
+ }
+ }
+ });
+ done();
+ });
+ rootScope.$apply();
+ });
+
+ describe('when a public key is provided', () => {
+ it('should add public_key and artifacts properties', (done) => {
+
+ let expected = {
+ topology_template:{
+ node_templates: {
+ 'service#test': {
+ type: 'tosca.nodes.VSGService',
+ properties: {
+ kind: 'vCPE',
+ public_key: '{ get_artifact: [ SELF, pubkey, LOCAL_FILE] }'
+ },
+ artifacts: {
+ pubkey: '/opt/xos/tosca/test/test_rsa.pub'
+ }
+ }
+ }
+ }
+ };
+
+ service.formatServiceProperties({
+ kind: 'vCPE',
+ public_key: 'pkey',
+ name: 'test'
+ }, toscaBase)
+ .then(res => {
+ expect(res).toEqual(expected);
+ done();
+ });
+ rootScope.$apply();
+ });
+
+ it('should add public_key file to the archive', (done) => {
+ service.formatServiceProperties({
+ kind: 'vCPE',
+ public_key: 'pkey',
+ name: 'test'
+ }, toscaBase)
+ .then(res => {
+ expect(ArchiveManagerSpy.addFile).toHaveBeenCalledWith('test_rsa.pub', 'pkey');
+ done();
+ });
+ rootScope.$apply();
+ });
+ });
+ });
+
+ describe('the getServiceRequirements method', () => {
+ let TenantSpy, ServiceSpy, tenantQueryPromise;
+ beforeEach(inject(function(Tenants, Services, $q){
+
+ tenantQueryPromise= $q.defer();
+
+ TenantSpy = Tenants;
+ spyOn(TenantSpy, 'query').and.callFake(function(){
+ return {$promise: tenantQueryPromise.promise};
+ });
+
+ ServiceSpy = Services;
+ spyOn(ServiceSpy, 'get').and.callFake(function(p){
+ let d = $q.defer();
+ d.resolve({name: `deps_${p.id}`});
+ return {$promise: d.promise};
+ });
+ }));
+
+ it('should call the tenants service with correct params', () => {
+ service.getServiceRequirements({id: 1});
+ expect(TenantSpy.query).toHaveBeenCalledWith({subscriber_service: 1});
+ });
+
+ it('should not add requirements if the current service has no dependency', (done) => {
+ service.getServiceRequirements({id: 1}, {})
+ .then(res => {
+ expect(res).toEqual({});
+ done();
+ });
+ tenantQueryPromise.resolve();
+ rootScope.$apply();
+ });
+
+ it('should return a list of required service', () => {
+ service.getServiceRequirements({id: 1, name: 'test'}, {topology_template: {node_templates: {'service#test': {}}}})
+ .then(res => {
+ expect(res.topology_template.node_templates['service#test'].requirements).toEqual([
+ {
+ deps_3_tenant: {
+ node: 'service#deps_3',
+ relationship: 'tosca.relationships.TenantOfService'
+ }
+ },
+ {
+ deps_4_tenant: {
+ node: 'service#deps_4',
+ relationship: 'tosca.relationships.TenantOfService'
+ }
+ }
+ ]);
+ });
+ tenantQueryPromise.resolve([
+ {
+ subscriber_service: 1,
+ provider_service: 3
+ },
+ {
+ subscriber_service: 1,
+ provider_service: 4
+ }
+ ]);
+ rootScope.$apply();
+ });
+
+ it('should return a list of unique required service', () => {
+ service.getServiceRequirements({id: 1, name: 'test'}, {topology_template: {node_templates: {'service#test': {}}}})
+ .then(res => {
+ expect(res.topology_template.node_templates['service#test'].requirements).toEqual([
+ {
+ deps_3_tenant: {
+ node: 'service#deps_3',
+ relationship: 'tosca.relationships.TenantOfService'
+ }
+ }
+ ]);
+ });
+ tenantQueryPromise.resolve([
+ {
+ subscriber_service: 1,
+ provider_service: 3
+ },
+ {
+ subscriber_service: 1,
+ provider_service: 3
+ }
+ ]);
+ rootScope.$apply();
+ });
+ });
+ });
+
+})();
+
diff --git a/views/ngXosViews/serviceGrid/spec/site_encoder.test.js b/views/ngXosViews/serviceGrid/spec/site_encoder.test.js
new file mode 100644
index 0000000..fdc6d50
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/spec/site_encoder.test.js
@@ -0,0 +1,62 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+ describe('The Site Encoder service', () => {
+ let service, toscaBase, siteGetPromise, SiteSpy, rootScope;
+
+ const toscaBaseDefault = {
+ topology_template: {
+ node_templates: {}
+ }
+ };
+
+ const siteResponse = {
+ name: 'MySite'
+ };
+
+ const expected = [{
+ topology_template: {
+ node_templates: {
+ 'MySite': {
+ type: 'tosca.nodes.Site',
+ }
+ }
+ }
+ }, siteResponse];
+
+ beforeEach(module('xos.serviceGrid'));
+ beforeEach(module('templates'));
+
+ beforeEach(inject((SiteEncoder, Sites, $q, $rootScope) => {
+ toscaBase = angular.copy(toscaBaseDefault);
+ service = SiteEncoder;
+ rootScope = $rootScope;
+
+ siteGetPromise= $q.defer();
+ SiteSpy = Sites;
+ spyOn(SiteSpy, 'get').and.callFake(function(){
+ return {$promise: siteGetPromise.promise};
+ });
+ }));
+
+ describe('given a Site Id', () => {
+ it('should return the correct JSON structure', (done) => {
+ service.buildTosca({id: 1}, toscaBase)
+ .then(res => {
+ expect(res).toEqual(expected);
+ done();
+ });
+ siteGetPromise.resolve(siteResponse);
+ rootScope.$apply();
+ });
+ });
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/spec/slices_encoder.test.js b/views/ngXosViews/serviceGrid/spec/slices_encoder.test.js
new file mode 100644
index 0000000..f32bc9a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/spec/slices_encoder.test.js
@@ -0,0 +1,103 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ describe('The Slices Encoder service', () => {
+
+ let service, toscaBase, sliceQueryPromise, SliceSpy, rootScope;
+
+ const toscaBaseDefault = {
+ topology_template: {
+ node_templates: {}
+ }
+ };
+
+ const slicesArray = [
+ {
+ name: 'Slice1',
+ description: 'Description1',
+ network: 'noauto'
+ },
+ {
+ name: 'Slice2',
+ description: 'Description2',
+ network: 'noauto'
+ }
+ ];
+
+ const expected = {
+ topology_template: {
+ node_templates: {
+ Slice1: {
+ description: 'Description1',
+ type: 'tosca.nodes.Slice',
+ properties: {
+ network: 'noauto'
+ },
+ requirements: [
+ {management: {node: 'management', relationship: 'tosca.relationships.ConnectsToNetwork'}},
+ {test_service: {node: 'service#test', relationship: 'tosca.relationships.MemberOfService'}}
+ ]
+ },
+ Slice2: {
+ description: 'Description2',
+ type: 'tosca.nodes.Slice',
+ properties: {
+ network: 'noauto'
+ },
+ requirements: [
+ {management: {node: 'management', relationship: 'tosca.relationships.ConnectsToNetwork'}},
+ {test_service: {node: 'service#test', relationship: 'tosca.relationships.MemberOfService'}}
+ ]
+ }
+ }
+ }
+ };
+
+ beforeEach(module('xos.serviceGrid'));
+ beforeEach(module('templates'));
+
+ beforeEach(inject((SlicesEncoder, Slices, $q, $rootScope) => {
+ toscaBase = angular.copy(toscaBaseDefault);
+ service = SlicesEncoder;
+ rootScope = $rootScope;
+
+ sliceQueryPromise= $q.defer();
+ SliceSpy = Slices;
+ spyOn(SliceSpy, 'query').and.callFake(function(){
+ return {$promise: sliceQueryPromise.promise};
+ });
+ }));
+
+ describe('given a Slices array ', () => {
+ it('should return the correct JSON structure', (done) => {
+ service.buildTosca(slicesArray, toscaBase, 'test')
+ .then(res => {
+ expect(res).toEqual(expected);
+ done();
+ });
+ rootScope.$apply();
+ });
+ });
+
+ describe('given a service', () => {
+ it('should return the JSON structure for all related slices', (done) => {
+ service.getServiceSlices({id : 1, name: 'test'}, toscaBase)
+ .then(res => {
+ expect(res).toEqual(expected);
+ done();
+ });
+ sliceQueryPromise.resolve(slicesArray);
+ rootScope.$apply();
+ });
+ });
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/spec/tosca_encoder.test.js b/views/ngXosViews/serviceGrid/spec/tosca_encoder.test.js
new file mode 100644
index 0000000..d968419
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/spec/tosca_encoder.test.js
@@ -0,0 +1,234 @@
+(function () {
+ 'use strict';
+ describe('The Tosca Encoder Service', () => {
+
+ var service, httpBackend, rootScope, ArchiveManagerSpy, toscaBase;
+
+ const serviceData = {
+ id: 1,
+ name: 'vsg',
+ kind: 'vCPE'
+ };
+
+ const toscaBaseDefault = {
+ topology_template: {
+ node_templates: {}
+ }
+ };
+
+ beforeEach(module('xos.serviceGrid'));
+ beforeEach(module('templates'));
+
+ beforeEach(inject(function($httpBackend, $rootScope, ToscaEncoder, ArchiveManager){
+
+ httpBackend = $httpBackend;
+ rootScope = $rootScope;
+ toscaBase = angular.copy(toscaBaseDefault);
+ service = ToscaEncoder;
+ ArchiveManagerSpy = ArchiveManager;
+ spyOn(ArchiveManagerSpy, 'createArchive');
+ spyOn(ArchiveManagerSpy, 'addFile');
+ spyOn(ArchiveManagerSpy, 'download');
+ }));
+
+ describe('the serviceToTosca method', () => {
+
+ const fakePropertiesDefault = {
+ tosca_definitions_version: 'tosca_simple_yaml_1_0',
+ description: 'Just enough Tosca to get the vSG slice running on the CORD POD',
+ imports: [
+ 'custom_types/xos.yaml'
+ ],
+ topology_template:{
+ node_templates: {
+ 'service#vsg': {
+ type: 'tosca.nodes.VSGService',
+ properties: {
+ view_url: 'viewUrl',
+ icon_url: 'iconUrl',
+ kind: 'vCPE'
+ }
+ }
+ }
+ }
+ };
+
+ const fakeRequirements = {
+ tosca_definitions_version: 'tosca_simple_yaml_1_0',
+ description: 'Just enough Tosca to get the vSG slice running on the CORD POD',
+ imports: [
+ 'custom_types/xos.yaml'
+ ],
+ topology_template:{
+ node_templates: {
+ 'service#vsg': {
+ type: 'tosca.nodes.VSGService',
+ properties: {
+ view_url: 'viewUrl',
+ icon_url: 'iconUrl',
+ kind: 'vCPE'
+ },
+ requirements: [
+ {
+ node: 'service#vrouter',
+ relationship: 'tosca.relationships.TenantOfService'
+ },
+ {
+ node: 'service#volt',
+ relationship: 'tosca.relationships.TenantOfService'
+ }
+ ]
+ }
+ }
+ }
+ };
+
+ const expectedWithoutRequirements = `tosca_definitions_version: tosca_simple_yaml_1_0
+description: Just enough Tosca to get the vSG slice running on the CORD POD
+imports:
+ - custom_types/xos.yaml
+topology_template:
+ node_templates:
+ service#vsg:
+ type: tosca.nodes.VSGService
+ properties:
+ view_url: viewUrl
+ icon_url: iconUrl
+ kind: vCPE
+`;
+
+ const expectedWithRequirements = `tosca_definitions_version: tosca_simple_yaml_1_0
+description: Just enough Tosca to get the vSG slice running on the CORD POD
+imports:
+ - custom_types/xos.yaml
+topology_template:
+ node_templates:
+ service#vsg:
+ type: tosca.nodes.VSGService
+ properties:
+ view_url: viewUrl
+ icon_url: iconUrl
+ kind: vCPE
+ requirements:
+ - node: service#vrouter
+ relationship: tosca.relationships.TenantOfService
+ - node: service#volt
+ relationship: tosca.relationships.TenantOfService
+`;
+
+ const expectedWithSlices = `tosca_definitions_version: tosca_simple_yaml_1_0
+description: Just enough Tosca to get the vSG slice running on the CORD POD
+imports:
+ - custom_types/xos.yaml
+topology_template:
+ node_templates:
+ service#vsg:
+ type: tosca.nodes.VSGService
+ properties:
+ view_url: viewUrl
+ icon_url: iconUrl
+ kind: vCPE
+ service_slice:
+ description: A service slice
+ type: tosca.nodes.Slice
+ properties:
+ network: noauto
+`;
+
+ let formatPromise, requirementPromise, slicesPromise, fakeProperties, serviceEncoderSpy, slicesEncoderSpy;
+
+ beforeEach(inject(($q, ServiceEncoder, SlicesEncoder) => {
+
+ serviceEncoderSpy = ServiceEncoder;
+ slicesEncoderSpy = SlicesEncoder;
+
+ // clone the base property for mock
+ fakeProperties = angular.copy(fakePropertiesDefault);
+
+ // create the promises
+ // this will be resolved in the single IT block,
+ // to allow different resolutions
+ formatPromise = $q.defer();
+ requirementPromise = $q.defer();
+ slicesPromise = $q.defer();
+
+ // mock functions and return promises
+ spyOn(serviceEncoderSpy, 'formatServiceProperties').and.callFake(function(){
+ return formatPromise.promise;
+ });
+ spyOn(serviceEncoderSpy, 'getServiceRequirements').and.callFake(function(){
+ return requirementPromise.promise;
+ });
+ spyOn(slicesEncoderSpy, 'getServiceSlices').and.callFake(function(){
+ return slicesPromise.promise;
+ });
+ }));
+
+ it('should create a new archive', () => {
+ service.serviceToTosca(serviceData);
+ expect(ArchiveManagerSpy.createArchive).toHaveBeenCalled();
+ });
+
+ it('should add the service file to the archive', (done) => {
+ service.serviceToTosca(serviceData)
+ .then(() => {
+ expect(ArchiveManagerSpy.addFile).toHaveBeenCalledWith('vsg_service.yaml', expectedWithoutRequirements);
+ expect(ArchiveManagerSpy.download).toHaveBeenCalledWith('vsg');
+ done();
+ });
+ formatPromise.resolve(fakeProperties);
+ requirementPromise.resolve(fakeProperties);
+ slicesPromise.resolve(fakeProperties);
+ rootScope.$apply();
+ });
+
+ // IS IT REALLY USEFULL TO TEST THE CONVERTION TO YAML?
+ xit('should create a tosca spec with no requirements', (done) => {
+ service.serviceToTosca(serviceData)
+ .then(res => {
+ expect(res).toEqual(expectedWithoutRequirements);
+ done();
+ });
+ formatPromise.resolve(fakeProperties);
+ requirementPromise.resolve(fakeProperties);
+ slicesPromise.resolve(fakeProperties);
+ rootScope.$apply();
+ });
+
+ xit('should create a tosca spec with requirements', (done) => {
+ service.serviceToTosca(serviceData)
+ .then(res => {
+ expect(res).toEqual(expectedWithRequirements);
+ done();
+ });
+ formatPromise.resolve(fakeProperties);
+ requirementPromise.resolve(fakeRequirements);
+ slicesPromise.resolve(fakeProperties);
+ rootScope.$apply();
+ });
+
+ xit('should create a tosca spec with additional slices', (done) => {
+
+ // this is dirty, we are changing an object and shouldn't be done in tests
+ angular.extend(
+ fakeProperties.topology_template.node_templates, {service_slice: {
+ description: 'A service slice',
+ type: 'tosca.nodes.Slice',
+ properties: {
+ network: 'noauto'
+ }
+ }});
+
+ service.serviceToTosca(serviceData)
+ .then(res => {
+ expect(res).toEqual(expectedWithSlices);
+ done();
+ });
+ formatPromise.resolve(fakeProperties);
+ requirementPromise.resolve(fakeProperties);
+ slicesPromise.resolve(fakeProperties);
+ rootScope.$apply();
+ });
+ });
+ });
+}());
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/index.html b/views/ngXosViews/serviceGrid/src/index.html
index d9e7fec..8f95e59 100644
--- a/views/ngXosViews/serviceGrid/src/index.html
+++ b/views/ngXosViews/serviceGrid/src/index.html
@@ -14,6 +14,9 @@
</div>
<!-- bower:js -->
+<script src="vendor/js-yaml/dist/js-yaml.js"></script>
+<script src="vendor/jszip/dist/jszip.js"></script>
+<script src="vendor/file-saver/FileSaver.js"></script>
<script src="vendor/jquery/dist/jquery.js"></script>
<script src="vendor/angular/angular.js"></script>
<script src="vendor/angular-mocks/angular-mocks.js"></script>
@@ -26,10 +29,19 @@
<script src="vendor/Chart.js/Chart.js"></script>
<script src="vendor/angular-chart.js/dist/angular-chart.js"></script>
<script src="vendor/d3/d3.js"></script>
+<script src="vendor/angular-recursion/angular-recursion.js"></script>
<!-- endbower -->
<!-- endjs -->
<!-- inject:js -->
<script src="/../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js"></script>
<script src="/.tmp/main.js"></script>
+<script src="/.tmp/tosca_encoder.service.js"></script>
+<script src="/.tmp/slices_encorder.service.js"></script>
+<script src="/.tmp/site_encode.service.js"></script>
+<script src="/.tmp/service_encorder.service.js"></script>
<script src="/.tmp/service-graph.js"></script>
+<script src="/.tmp/networks_encoder.service.js"></script>
+<script src="/.tmp/network_template_encoder.service.js"></script>
+<script src="/.tmp/image_encoder.service.js"></script>
+<script src="/.tmp/archive_manager.service.js"></script>
<!-- endinject -->
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/js/archive_manager.service.js b/views/ngXosViews/serviceGrid/src/js/archive_manager.service.js
new file mode 100644
index 0000000..92681ee
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/archive_manager.service.js
@@ -0,0 +1,39 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.ArchiveManager.serviceGrid
+ **/
+
+ angular.module('xos.serviceGrid')
+ .service('ArchiveManager', function(){
+ this.createArchive = () => {
+ this.archive = new JSZip();
+ };
+
+ this.addFile = (fileName, content) => {
+ this.archive.file(fileName, content);
+ };
+
+ this.download = (name) => {
+ console.log(this.archive);
+ this.archive.generateAsync({type: 'blob'})
+ .then(function(content) {
+ saveAs(content, `${name}.zip`);
+ })
+ .catch(e => {
+ console.log(e);
+ });
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/image_encoder.service.js b/views/ngXosViews/serviceGrid/src/js/image_encoder.service.js
new file mode 100644
index 0000000..972023c
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/image_encoder.service.js
@@ -0,0 +1,40 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.ImageEncoder.serviceGrid
+ **/
+
+ // TODO write tests
+ angular.module('xos.serviceGrid')
+ .service('ImageEncoder', function($q, Images){
+
+ this.buildTosca = (imageId, toscaSpec) => {
+ const d = $q.defer();
+
+ Images.get({id: imageId}).$promise
+ .then(image => {
+ const toscaObj = {};
+ toscaObj[`image#${image.name}`] = {
+ type: 'tosca.nodes.Image'
+ };
+ angular.extend(toscaSpec.topology_template.node_templates, toscaObj);
+ d.resolve([toscaSpec, image]);
+ })
+ .catch(d.reject);
+
+
+ return d.promise;
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/main.js b/views/ngXosViews/serviceGrid/src/js/main.js
index 88a0f95..fc75b2f 100644
--- a/views/ngXosViews/serviceGrid/src/js/main.js
+++ b/views/ngXosViews/serviceGrid/src/js/main.js
@@ -27,7 +27,7 @@
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/service-grid.tpl.html',
- controller: function(Services, _){
+ controller: function(Services, ToscaEncoder, _){
this.tableConfig = {
columns: [
@@ -65,7 +65,21 @@
filter: 'field',
order: {
field: 'name'
- }
+ },
+ actions: [
+ {
+ label: 'export',
+ icon: 'export',
+ cb: service => {
+ this.tosca = '';
+ ToscaEncoder.serviceToTosca(service)
+ .then(tosca => {
+ this.showFeedback = true;
+ this.tosca = tosca;
+ });
+ }
+ }
+ ]
};
// retrieving user list
diff --git a/views/ngXosViews/serviceGrid/src/js/network_template_encoder.service.js b/views/ngXosViews/serviceGrid/src/js/network_template_encoder.service.js
new file mode 100644
index 0000000..1784d90
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/network_template_encoder.service.js
@@ -0,0 +1,40 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.NetworkTemplateEncoder.serviceGrid
+ **/
+
+ // TODO write tests
+ angular.module('xos.serviceGrid')
+ .service('NetworkTemplateEncoder', function($q, Networkstemplates){
+
+ this.buildTosca = (templateId, toscaSpec) => {
+ const d = $q.defer();
+ Networkstemplates.get({id: templateId}).$promise
+ .then(template => {
+ const toscaObj = {};
+ toscaObj[`network_template#${template.name}`] = {
+ type: 'tosca.nodes.NetworkTemplate'
+ };
+ angular.extend(toscaSpec.topology_template.node_templates, toscaObj);
+ d.resolve([toscaSpec, template]);
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+
+ return d.promise;
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/networks_encoder.service.js b/views/ngXosViews/serviceGrid/src/js/networks_encoder.service.js
new file mode 100644
index 0000000..1e6adee
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/networks_encoder.service.js
@@ -0,0 +1,132 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.NetworkEncoder.serviceGrid
+ **/
+
+ // TODO write tests
+ angular.module('xos.serviceGrid')
+ .service('NetworkEncoder', function($q, Networks, NetworkTemplateEncoder){
+
+ this.buildTosca = (networks, toscaSpec) => {
+
+ const apiNetworks = angular.copy(networks);
+
+ // store here the promise that will build the dependency structure
+ let dependency = {
+ };
+
+ const d = $q.defer();
+
+ try {
+ networks = _.reduce(networks, (obj, n) => {
+ obj[`network#${n.name}`] = {
+ type: 'tosca.nodes.network.Network.XOS',
+ requirements: []
+ };
+
+ // for each network slice, add requirement
+ if(angular.isDefined(n.slices)) {
+ _.forEach(n.slices, s => {
+ let owner = {
+ owner: {
+ node: s.name,
+ relationship: 'tosca.relationships.MemberOfSlice'
+ }
+ };
+
+ let conn = {
+ connection: {
+ node: s.name,
+ relationship: 'tosca.relationships.ConnectsToSlice'
+ }
+ };
+ obj[`network#${n.name}`].requirements.push(owner, conn);
+ });
+
+ if(angular.isDefined(n.template)){
+ dependency[n.name] = NetworkTemplateEncoder.buildTosca(n.template, toscaSpec);
+ }
+ }
+
+ return obj;
+
+ }, {});
+
+ // if we have dependency wait for them
+ if(Object.keys(dependency).length > 0){
+ $q.all(dependency)
+ .then(deps => {
+ // NOTE how to make this readable??
+ if(deps){
+
+ // for each property in deps
+ for(let k of Object.keys(deps)){
+ let [tosca, template] = deps[k];
+ networks[`network#${k}`].requirements.push({
+ network_template: {
+ node: `network_template#${template.name}`,
+ relationship: 'tosca.relationships.UsesNetworkTemplate'
+ }
+ });
+ angular.extend(toscaSpec, tosca);
+ }
+ }
+ angular.extend(toscaSpec.topology_template.node_templates, networks);
+ d.resolve([toscaSpec, apiNetworks]);
+ })
+ .catch(e => {
+ throw new Error(e);
+ });
+ }
+ //else resolve directly
+ else {
+ angular.extend(toscaSpec.topology_template.node_templates, networks);
+ d.resolve([toscaSpec, apiNetworks]);
+ }
+ }
+ catch(e){
+ d.reject(e);
+ }
+
+ return d.promise;
+ };
+
+ this.getSliceNetworks = (slice, toscaSpec) => {
+ const d = $q.defer();
+ Networks.query({owner: slice.id}).$promise
+ .then((networks) => {
+ // check that all the network this slice own are listed in the slice
+ // does this make sense?
+ networks = _.filter(networks, n => {
+ return slice.networks.indexOf(n.id) !== -1;
+ });
+
+ // denormalize slice inside network
+ networks = networks.map(n => {
+ let idx = n.slices.indexOf(slice.id);
+ n.slices[idx] = slice;
+ return n;
+ });
+
+ this.buildTosca(networks, toscaSpec)
+ .then(d.resolve)
+ .catch(d.reject);
+
+ });
+
+ return d.promise;
+ }
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/service_encorder.service.js b/views/ngXosViews/serviceGrid/src/js/service_encorder.service.js
new file mode 100644
index 0000000..485d46a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/service_encorder.service.js
@@ -0,0 +1,125 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.toscaExporter.serviceGrid
+ **/
+
+ angular.module('xos.serviceGrid')
+ .service('ServiceEncoder', function($q, ArchiveManager, Tenants, Services){
+
+ const serviceTypes = {
+ fabric: 'tosca.nodes.FabricService',
+ onos: 'tosca.nodes.ONOSService',
+ vCPE: 'tosca.nodes.VSGService',
+ vOLT: 'tosca.nodes.VOLTService',
+ vROUTER: 'tosca.nodes.VRouterService',
+ VTN: 'tosca.nodes.VTNService',
+ vTR: 'tosca.nodes.Service'
+ };
+
+ this.formatServiceProperties = (service, toscaSpec) => {
+ const d = $q.defer();
+ const serviceName = `service#${service.name}`;
+ // create the structure to hold the service
+ toscaSpec.topology_template.node_templates[serviceName] = {};
+ toscaSpec.topology_template.node_templates[serviceName].type = serviceTypes[service.kind] || 'tosca.nodes.Service';
+
+ const res = {
+ properties: {
+ kind: service.kind
+ }
+ };
+
+ if(angular.isDefined(service.view_url)){
+ res.properties.view_url = service.view_url;
+ }
+
+ if(angular.isDefined(service.icon_url)){
+ res.properties.icon_url = service.icon_url;
+ }
+
+ if(angular.isDefined(service.private_key_fn)){
+ res.properties.private_key_fn = service.private_key_fn;
+ }
+
+ if(angular.isDefined(service.public_key)){
+ ArchiveManager.addFile(`${service.name}_rsa.pub`, service.public_key);
+ res.properties.public_key = '{ get_artifact: [ SELF, pubkey, LOCAL_FILE] }'
+ res['artifacts'] = {
+ pubkey: `/opt/xos/tosca/${service.name}/${service.name}_rsa.pub`
+ };
+ toscaSpec.topology_template.node_templates[serviceName].artifacts = res.artifacts;
+ }
+
+ toscaSpec.topology_template.node_templates[serviceName].properties = res.properties;
+ d.resolve(toscaSpec);
+ return d.promise;
+ };
+
+ this.getServiceRequirements = (service, toscaSpec) => {
+ const d = $q.defer();
+
+ Tenants.query({subscriber_service: service.id}).$promise
+ .then(tenants => {
+ const services = [];
+ // avoid multiple request for the same service
+ tenants = _.uniqBy(tenants, 'provider_service');
+
+ _.forEach(tenants, t => {
+ services.push(Services.get({id: t.provider_service}).$promise);
+ });
+
+ return $q.all(services)
+ })
+ .then((deps) => {
+ // Get the provider service and create an array of unique names
+ let requirements = _.reduce(deps, (list, d) => list.concat(d.name), []);
+
+ // create a object for requirements, later will parsed in Yaml
+ requirements = _.reduce(requirements, (list, r) => {
+ let name = `${r}_tenant`;
+ let obj = {};
+ obj[name] = {
+ node: `service#${r}`,
+ relationship: 'tosca.relationships.TenantOfService'
+ };
+ return list.concat(obj);
+ }, []);
+
+ if(requirements.length > 0){
+
+ // NOTE set a reference to the requirements in tosca
+ _.forEach(requirements, r => {
+ let reqName = r[Object.keys(r)[0]].node;
+ toscaSpec.topology_template.node_templates[reqName] = {
+ type: 'tosca.nodes.Service',
+ properties: {
+ 'no-create': true,
+ 'no-delete': true,
+ 'no-update': true
+ }
+ };
+ });
+
+ const serviceName = `service#${service.name}`;
+ toscaSpec.topology_template.node_templates[serviceName].requirements = requirements;
+ }
+
+ d.resolve(toscaSpec);
+ });
+
+ return d.promise;
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/site_encode.service.js b/views/ngXosViews/serviceGrid/src/js/site_encode.service.js
new file mode 100644
index 0000000..6bb1d99
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/site_encode.service.js
@@ -0,0 +1,39 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.SiteEncoder.serviceGrid
+ **/
+
+ angular.module('xos.serviceGrid')
+ .service('SiteEncoder', function($q, Sites){
+
+ this.buildTosca = (siteId, toscaSpec) => {
+ const d = $q.defer();
+
+ Sites.get({id: siteId}).$promise
+ .then(site => {
+ const toscaObj = {};
+ toscaObj[`${site.name}`] = {
+ type: 'tosca.nodes.Site'
+ };
+ angular.extend(toscaSpec.topology_template.node_templates, toscaObj);
+ d.resolve([toscaSpec, site]);
+ })
+ .catch(d.reject);
+
+
+ return d.promise;
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/slices_encorder.service.js b/views/ngXosViews/serviceGrid/src/js/slices_encorder.service.js
new file mode 100644
index 0000000..f900d98
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/slices_encorder.service.js
@@ -0,0 +1,159 @@
+/**
+ * © OpenCORD
+ *
+ * Visit http://guide.xosproject.org/devguide/addview/ for more information
+ *
+ * Created by teone on 6/22/16.
+ */
+
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.SlicesEncoder.serviceGrid
+ **/
+
+ angular.module('xos.serviceGrid')
+ .service('SlicesEncoder', function($q, _, Slices, SiteEncoder, ImageEncoder, NetworkEncoder){
+
+ this.buildTosca = (slices, toscaSpec, serviceName) => {
+ // store here the promise that will build the dependency structure
+ let dependency = {};
+
+ const d = $q.defer();
+ slices = _.reduce(slices, (obj, s) => {
+ obj[s.name] = {
+ type: 'tosca.nodes.Slice',
+ properties: {
+ network: s.network
+ },
+ requirements: [
+ // by default slices are connected to management network
+ {
+ management: {
+ node: 'management',
+ relationship: 'tosca.relationships.ConnectsToNetwork'
+ }
+ },
+ ]
+ };
+
+ if(angular.isDefined(serviceName)){
+ let service = {};
+ service[`${serviceName}_service`] = {
+ node: `service#${serviceName}`,
+ relationship: 'tosca.relationships.MemberOfService'
+ };
+ obj[s.name].requirements.push(service);
+ }
+
+ if(angular.isDefined(s.description)){
+ obj[s.name].description = s.description;
+ }
+
+ if(angular.isDefined(s.site)){
+ dependency[`${s.name}#site`] = SiteEncoder.buildTosca(s.site, toscaSpec);
+ }
+ if(angular.isDefined(s.default_image)){
+ dependency[`${s.name}#image`] = ImageEncoder.buildTosca(s.default_image, toscaSpec);
+ }
+ if(angular.isDefined(s.networks) && s.networks.length > 0){
+ dependency[`${s.name}#management`] = NetworkEncoder.getSliceNetworks(s, toscaSpec);
+ }
+
+ return obj;
+ }, {});
+
+ // if we have dependency wait for them
+ if(Object.keys(dependency).length > 0){
+
+ let relationMap = {
+ site: 'tosca.relationships.MemberOfSite',
+ image: 'tosca.relationships.DefaultImage'
+ };
+
+ // NOTE create a reference to the management network
+ toscaSpec.topology_template.node_templates['management'] = {
+ type: 'tosca.nodes.network.Network.XOS',
+ properties: {
+ 'no-create': true,
+ 'no-delete': true,
+ 'no-update': true
+ }
+ };
+
+ $q.all(dependency)
+ .then(deps => {
+
+ for(let k of Object.keys(deps)){
+
+ // this is UGLY!!!
+ // we are passing the requirement type inside the object key
+ // in which the promise is stored.
+ // This let us build the requirements array
+ let [sliceName, requirementType] = k.split('#');
+
+ if(angular.isDefined(relationMap[requirementType])){
+
+ if(!slices[sliceName].requirements){
+ slices[sliceName].requirements = [];
+ }
+
+ let [tosca, resource] = deps[k];
+
+ let requirementObj = {};
+
+ let reqName;
+
+ // NOTE site have problem with prefixing
+ if(requirementType === 'site'){
+ reqName = resource.name;
+ }
+ else{
+ reqName = `${requirementType}#${resource.name}`;
+ }
+
+ requirementObj[requirementType] = {
+ node: reqName,
+ relationship: relationMap[requirementType]
+ };
+
+ slices[sliceName].requirements.push(requirementObj);
+
+ angular.extend(toscaSpec, tosca);
+ }
+
+ }
+ // here we add slices to tosca
+ angular.extend(toscaSpec.topology_template.node_templates, slices);
+ d.resolve(toscaSpec);
+ })
+ .catch(e => {
+ throw new Error(e);
+ });
+ }
+ //else resolve directly
+ else {
+ angular.extend(toscaSpec.topology_template.node_templates, slices);
+ d.resolve(toscaSpec);
+ }
+
+ return d.promise;
+ };
+
+ this.getServiceSlices = (service, toscaSpec) => {
+ const d = $q.defer();
+ Slices.query({service: service.id}).$promise
+ .then(slices => {
+ return this.buildTosca(slices, toscaSpec, service.name)
+ })
+ .then(slicesTosca => {
+ d.resolve(slicesTosca);
+ });
+
+ return d.promise;
+ };
+ });
+})();
+
diff --git a/views/ngXosViews/serviceGrid/src/js/tosca_encoder.service.js b/views/ngXosViews/serviceGrid/src/js/tosca_encoder.service.js
new file mode 100644
index 0000000..5798aca
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/js/tosca_encoder.service.js
@@ -0,0 +1,79 @@
+(function () {
+ 'use strict';
+
+ /**
+ * @ngdoc service
+ * @name xos.toscaExporter.serviceGrid
+ **/
+
+ angular.module('xos.serviceGrid')
+ .service('ToscaEncoder', function($q, _, ArchiveManager, ServiceEncoder, SlicesEncoder){
+
+ let toscaSpec = {
+ tosca_definitions_version: 'tosca_simple_yaml_1_0',
+ description: '',
+ imports: [
+ 'custom_types/xos.yaml'
+ ],
+ topology_template:{
+ node_templates: {}
+ }
+ };
+
+ /**
+ * @ngdoc method
+ * @name xos.serviceGrid.ToscaEncoder#$toYml
+ * @methodOf xos.serviceGrid.ToscaEncoder
+ * @description
+ * Convert a Json data structure to Yaml, use https://github.com/nodeca/js-yaml
+ * @param {Object} item A Json object to be converted
+ * @returns {string} The Yaml representation of the Json input
+ **/
+
+ this.toYml = (item) => {
+ return jsyaml.dump(item).replace(/'/g, '');
+ };
+
+ this.export = (service) => {
+ ArchiveManager.download(service.name);
+ const file = this.toYml(toscaSpec);
+ return file;
+ };
+
+ this.serviceToTosca = service => {
+
+ ArchiveManager.createArchive();
+ //clean
+ toscaSpec.topology_template.node_templates = {};
+
+ toscaSpec.description = `Just enough Tosca to get the ${service.humanReadableName} service up and running`;
+
+ const d = $q.defer();
+
+ // build service properties
+ ServiceEncoder.formatServiceProperties(service, toscaSpec)
+ .then(spec => {
+ return SlicesEncoder.getServiceSlices(service, spec);
+ })
+ // add required slices (and it will all the slice requirements)
+ .then((spec) => {
+ return ServiceEncoder.getServiceRequirements(service, spec);
+ })
+ // add required services (provider services)
+ .then((spec) => {
+ ArchiveManager.addFile(`${service.name}_service.yaml`, this.toYml(spec));
+
+ this.export(service);
+
+ d.resolve(this.toYml(spec));
+ })
+ .catch(e => {
+ d.reject(e);
+ });
+ return d.promise;
+
+ }
+
+ });
+
+}());
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/templates/service-grid.tpl.html b/views/ngXosViews/serviceGrid/src/templates/service-grid.tpl.html
index fa324b4..8e88e38 100644
--- a/views/ngXosViews/serviceGrid/src/templates/service-grid.tpl.html
+++ b/views/ngXosViews/serviceGrid/src/templates/service-grid.tpl.html
@@ -11,4 +11,16 @@
Tenancy Graph
</a> -->
</div>
-</div>
\ No newline at end of file
+</div>
+
+<div class="row">
+ <div class="col-xs-12">
+ <div class="alert alert-info" ng-show="vm.showFeedback">
+ Remember that you should copy any key artifact inside the container in <pre>/opt/xos/tosca</pre>!
+ </div>
+ </div>
+</div>
+
+<pre ng-show="vm.tosca">
+{{vm.tosca}}
+</pre>
\ No newline at end of file
diff --git a/xos/configurations/frontend/Vagrantfile b/xos/configurations/frontend/Vagrantfile
index 747c209..4c772d8 100644
--- a/xos/configurations/frontend/Vagrantfile
+++ b/xos/configurations/frontend/Vagrantfile
@@ -10,7 +10,7 @@
# increase RAM
config.vm.provider :virtualbox do |vb|
- vb.customize ['modifyvm', :id,'--memory', '2048']
+ vb.customize ['modifyvm', :id,'--memory', '4096']
end
# make the frontend config
diff --git a/xos/configurations/frontend/xos.yaml b/xos/configurations/frontend/xos.yaml
index 021eb49..763f31a 100644
--- a/xos/configurations/frontend/xos.yaml
+++ b/xos/configurations/frontend/xos.yaml
@@ -70,6 +70,17 @@
node: xos
relationship: tosca.relationships.UsedByXOS
+ # TOSCA Folder
+ /opt/xos/tosca:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../../tosca/, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS
+
# View Folder
/opt/xos/core/xoslib/static:
type: tosca.nodes.XOSVolume
diff --git a/xos/core/migrations/0001_initial.py b/xos/core/migrations/0001_initial.py
deleted file mode 100644
index c55a8bf..0000000
--- a/xos/core/migrations/0001_initial.py
+++ /dev/null
@@ -1,1953 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-import core.models.instance
-import core.models.network
-import core.models.serviceclass
-import django.utils.timezone
-import encrypted_fields.fields
-import geoposition.fields
-import timezones.fields
-from django.conf import settings
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('contenttypes', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='User',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('password', models.CharField(
- max_length=128, verbose_name='password')),
- ('last_login', models.DateTimeField(
- default=django.utils.timezone.now, verbose_name='last login')),
- ('email', models.EmailField(unique=True, max_length=255,
- verbose_name=b'email address', db_index=True)),
- ('username', models.CharField(default=b'Something', max_length=255)),
- ('firstname', models.CharField(
- help_text=b"person's given name", max_length=200)),
- ('lastname', models.CharField(
- help_text=b"person's surname", max_length=200)),
- ('phone', models.CharField(help_text=b'phone number contact',
- max_length=100, null=True, blank=True)),
- ('user_url', models.URLField(null=True, blank=True)),
- ('public_key', models.TextField(
- help_text=b'Public key string', max_length=1024, null=True, blank=True)),
- ('is_active', models.BooleanField(default=True)),
- ('is_admin', models.BooleanField(default=True)),
- ('is_staff', models.BooleanField(default=True)),
- ('is_readonly', models.BooleanField(default=False)),
- ('created', models.DateTimeField(auto_now_add=True)),
- ('updated', models.DateTimeField(auto_now=True)),
- ('enacted', models.DateTimeField(default=None, null=True)),
- ('policed', models.DateTimeField(default=None, null=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('timezone', timezones.fields.TimeZoneField(default=b'America/New_York', max_length=100, choices=[(b'Pacific/Midway', b'(GMT-1100) Pacific/Midway'), (b'Pacific/Niue', b'(GMT-1100) Pacific/Niue'), (b'Pacific/Pago_Pago', b'(GMT-1100) Pacific/Pago_Pago'), (b'America/Adak', b'(GMT-1000) America/Adak'), (b'Pacific/Honolulu', b'(GMT-1000) Pacific/Honolulu'), (b'Pacific/Johnston', b'(GMT-1000) Pacific/Johnston'), (b'Pacific/Rarotonga', b'(GMT-1000) Pacific/Rarotonga'), (b'Pacific/Tahiti', b'(GMT-1000) Pacific/Tahiti'), (b'US/Hawaii', b'(GMT-1000) US/Hawaii'), (b'Pacific/Marquesas', b'(GMT-0930) Pacific/Marquesas'), (b'America/Anchorage', b'(GMT-0900) America/Anchorage'), (b'America/Juneau', b'(GMT-0900) America/Juneau'), (b'America/Nome', b'(GMT-0900) America/Nome'), (b'America/Sitka', b'(GMT-0900) America/Sitka'), (b'America/Yakutat', b'(GMT-0900) America/Yakutat'), (b'Pacific/Gambier', b'(GMT-0900) Pacific/Gambier'), (b'US/Alaska', b'(GMT-0900) US/Alaska'), (b'America/Dawson', b'(GMT-0800) America/Dawson'), (b'America/Los_Angeles', b'(GMT-0800) America/Los_Angeles'), (b'America/Metlakatla', b'(GMT-0800) America/Metlakatla'), (b'America/Santa_Isabel', b'(GMT-0800) America/Santa_Isabel'), (b'America/Tijuana', b'(GMT-0800) America/Tijuana'), (b'America/Vancouver', b'(GMT-0800) America/Vancouver'), (b'America/Whitehorse', b'(GMT-0800) America/Whitehorse'), (b'Canada/Pacific', b'(GMT-0800) Canada/Pacific'), (b'Pacific/Pitcairn', b'(GMT-0800) Pacific/Pitcairn'), (b'US/Pacific', b'(GMT-0800) US/Pacific'), (b'America/Boise', b'(GMT-0700) America/Boise'), (b'America/Cambridge_Bay', b'(GMT-0700) America/Cambridge_Bay'), (b'America/Chihuahua', b'(GMT-0700) America/Chihuahua'), (b'America/Creston', b'(GMT-0700) America/Creston'), (b'America/Dawson_Creek', b'(GMT-0700) America/Dawson_Creek'), (b'America/Denver', b'(GMT-0700) America/Denver'), (b'America/Edmonton', b'(GMT-0700) America/Edmonton'), (b'America/Hermosillo', b'(GMT-0700) America/Hermosillo'), (b'America/Inuvik', b'(GMT-0700) America/Inuvik'), (b'America/Mazatlan', b'(GMT-0700) America/Mazatlan'), (b'America/Ojinaga', b'(GMT-0700) America/Ojinaga'), (b'America/Phoenix', b'(GMT-0700) America/Phoenix'), (b'America/Shiprock', b'(GMT-0700) America/Shiprock'), (b'America/Yellowknife', b'(GMT-0700) America/Yellowknife'), (b'Canada/Mountain', b'(GMT-0700) Canada/Mountain'), (b'US/Arizona', b'(GMT-0700) US/Arizona'), (b'US/Mountain', b'(GMT-0700) US/Mountain'), (b'America/Bahia_Banderas', b'(GMT-0600) America/Bahia_Banderas'), (b'America/Belize', b'(GMT-0600) America/Belize'), (b'America/Cancun', b'(GMT-0600) America/Cancun'), (b'America/Chicago', b'(GMT-0600) America/Chicago'), (b'America/Costa_Rica', b'(GMT-0600) America/Costa_Rica'), (b'America/El_Salvador', b'(GMT-0600) America/El_Salvador'), (b'America/Guatemala', b'(GMT-0600) America/Guatemala'), (b'America/Indiana/Knox', b'(GMT-0600) America/Indiana/Knox'), (b'America/Indiana/Tell_City', b'(GMT-0600) America/Indiana/Tell_City'), (b'America/Managua', b'(GMT-0600) America/Managua'), (b'America/Matamoros', b'(GMT-0600) America/Matamoros'), (b'America/Menominee', b'(GMT-0600) America/Menominee'), (b'America/Merida', b'(GMT-0600) America/Merida'), (b'America/Mexico_City', b'(GMT-0600) America/Mexico_City'), (b'America/Monterrey', b'(GMT-0600) America/Monterrey'), (b'America/North_Dakota/Beulah', b'(GMT-0600) America/North_Dakota/Beulah'), (b'America/North_Dakota/Center', b'(GMT-0600) America/North_Dakota/Center'), (b'America/North_Dakota/New_Salem', b'(GMT-0600) America/North_Dakota/New_Salem'), (b'America/Rainy_River', b'(GMT-0600) America/Rainy_River'), (b'America/Rankin_Inlet', b'(GMT-0600) America/Rankin_Inlet'), (b'America/Regina', b'(GMT-0600) America/Regina'), (b'America/Resolute', b'(GMT-0600) America/Resolute'), (b'America/Swift_Current', b'(GMT-0600) America/Swift_Current'), (b'America/Tegucigalpa', b'(GMT-0600) America/Tegucigalpa'), (b'America/Winnipeg', b'(GMT-0600) America/Winnipeg'), (b'Canada/Central', b'(GMT-0600) Canada/Central'), (b'Pacific/Galapagos', b'(GMT-0600) Pacific/Galapagos'), (b'US/Central', b'(GMT-0600) US/Central'), (b'America/Atikokan', b'(GMT-0500) America/Atikokan'), (b'America/Bogota', b'(GMT-0500) America/Bogota'), (b'America/Cayman', b'(GMT-0500) America/Cayman'), (b'America/Detroit', b'(GMT-0500) America/Detroit'), (b'America/Eirunepe', b'(GMT-0500) America/Eirunepe'), (b'America/Grand_Turk', b'(GMT-0500) America/Grand_Turk'), (b'America/Guayaquil', b'(GMT-0500) America/Guayaquil'), (b'America/Havana', b'(GMT-0500) America/Havana'), (b'America/Indiana/Indianapolis', b'(GMT-0500) America/Indiana/Indianapolis'), (b'America/Indiana/Marengo', b'(GMT-0500) America/Indiana/Marengo'), (b'America/Indiana/Petersburg', b'(GMT-0500) America/Indiana/Petersburg'), (b'America/Indiana/Vevay', b'(GMT-0500) America/Indiana/Vevay'), (b'America/Indiana/Vincennes', b'(GMT-0500) America/Indiana/Vincennes'), (b'America/Indiana/Winamac', b'(GMT-0500) America/Indiana/Winamac'), (b'America/Iqaluit', b'(GMT-0500) America/Iqaluit'), (b'America/Jamaica', b'(GMT-0500) America/Jamaica'), (b'America/Kentucky/Louisville', b'(GMT-0500) America/Kentucky/Louisville'), (b'America/Kentucky/Monticello', b'(GMT-0500) America/Kentucky/Monticello'), (b'America/Lima', b'(GMT-0500) America/Lima'), (b'America/Montreal', b'(GMT-0500) America/Montreal'), (b'America/Nassau', b'(GMT-0500) America/Nassau'), (b'America/New_York', b'(GMT-0500) America/New_York'), (b'America/Nipigon', b'(GMT-0500) America/Nipigon'), (b'America/Panama', b'(GMT-0500) America/Panama'), (b'America/Pangnirtung', b'(GMT-0500) America/Pangnirtung'), (b'America/Port-au-Prince', b'(GMT-0500) America/Port-au-Prince'), (b'America/Rio_Branco', b'(GMT-0500) America/Rio_Branco'), (b'America/Thunder_Bay', b'(GMT-0500) America/Thunder_Bay'), (b'America/Toronto', b'(GMT-0500) America/Toronto'), (b'Canada/Eastern', b'(GMT-0500) Canada/Eastern'), (b'Pacific/Easter', b'(GMT-0500) Pacific/Easter'), (b'US/Eastern', b'(GMT-0500) US/Eastern'), (b'America/Caracas', b'(GMT-0430) America/Caracas'), (b'America/Anguilla', b'(GMT-0400) America/Anguilla'), (b'America/Antigua', b'(GMT-0400) America/Antigua'), (b'America/Aruba', b'(GMT-0400) America/Aruba'), (b'America/Barbados', b'(GMT-0400) America/Barbados'), (b'America/Blanc-Sablon', b'(GMT-0400) America/Blanc-Sablon'), (b'America/Boa_Vista', b'(GMT-0400) America/Boa_Vista'), (b'America/Curacao', b'(GMT-0400) America/Curacao'), (b'America/Dominica', b'(GMT-0400) America/Dominica'), (b'America/Glace_Bay', b'(GMT-0400) America/Glace_Bay'), (b'America/Goose_Bay', b'(GMT-0400) America/Goose_Bay'), (b'America/Grenada', b'(GMT-0400) America/Grenada'), (b'America/Guadeloupe', b'(GMT-0400) America/Guadeloupe'), (b'America/Guyana', b'(GMT-0400) America/Guyana'), (b'America/Halifax', b'(GMT-0400) America/Halifax'), (b'America/Kralendijk', b'(GMT-0400) America/Kralendijk'), (b'America/La_Paz', b'(GMT-0400) America/La_Paz'), (b'America/Lower_Princes', b'(GMT-0400) America/Lower_Princes'), (b'America/Manaus', b'(GMT-0400) America/Manaus'), (b'America/Marigot', b'(GMT-0400) America/Marigot'), (b'America/Martinique', b'(GMT-0400) America/Martinique'), (b'America/Moncton', b'(GMT-0400) America/Moncton'), (b'America/Montserrat', b'(GMT-0400) America/Montserrat'), (b'America/Port_of_Spain', b'(GMT-0400) America/Port_of_Spain'), (b'America/Porto_Velho', b'(GMT-0400) America/Porto_Velho'), (b'America/Puerto_Rico', b'(GMT-0400) America/Puerto_Rico'), (b'America/Santo_Domingo', b'(GMT-0400) America/Santo_Domingo'), (b'America/St_Barthelemy', b'(GMT-0400) America/St_Barthelemy'), (b'America/St_Kitts', b'(GMT-0400) America/St_Kitts'), (b'America/St_Lucia', b'(GMT-0400) America/St_Lucia'), (b'America/St_Thomas', b'(GMT-0400) America/St_Thomas'), (b'America/St_Vincent', b'(GMT-0400) America/St_Vincent'), (b'America/Thule', b'(GMT-0400) America/Thule'), (b'America/Tortola', b'(GMT-0400) America/Tortola'), (b'Atlantic/Bermuda', b'(GMT-0400) Atlantic/Bermuda'), (b'Canada/Atlantic', b'(GMT-0400) Canada/Atlantic'), (b'America/St_Johns', b'(GMT-0330) America/St_Johns'), (b'Canada/Newfoundland', b'(GMT-0330) Canada/Newfoundland'), (b'America/Araguaina', b'(GMT-0300) America/Araguaina'), (b'America/Argentina/Buenos_Aires', b'(GMT-0300) America/Argentina/Buenos_Aires'), (b'America/Argentina/Catamarca', b'(GMT-0300) America/Argentina/Catamarca'), (b'America/Argentina/Cordoba', b'(GMT-0300) America/Argentina/Cordoba'), (b'America/Argentina/Jujuy', b'(GMT-0300) America/Argentina/Jujuy'), (b'America/Argentina/La_Rioja', b'(GMT-0300) America/Argentina/La_Rioja'), (b'America/Argentina/Mendoza', b'(GMT-0300) America/Argentina/Mendoza'), (b'America/Argentina/Rio_Gallegos', b'(GMT-0300) America/Argentina/Rio_Gallegos'), (b'America/Argentina/Salta', b'(GMT-0300) America/Argentina/Salta'), (b'America/Argentina/San_Juan', b'(GMT-0300) America/Argentina/San_Juan'), (b'America/Argentina/San_Luis', b'(GMT-0300) America/Argentina/San_Luis'), (b'America/Argentina/Tucuman', b'(GMT-0300) America/Argentina/Tucuman'), (b'America/Argentina/Ushuaia', b'(GMT-0300) America/Argentina/Ushuaia'), (b'America/Asuncion', b'(GMT-0300) America/Asuncion'), (b'America/Bahia', b'(GMT-0300) America/Bahia'), (b'America/Belem', b'(GMT-0300) America/Belem'), (b'America/Campo_Grande', b'(GMT-0300) America/Campo_Grande'), (b'America/Cayenne', b'(GMT-0300) America/Cayenne'), (b'America/Cuiaba', b'(GMT-0300) America/Cuiaba'), (b'America/Fortaleza', b'(GMT-0300) America/Fortaleza'), (b'America/Godthab', b'(GMT-0300) America/Godthab'), (b'America/Maceio', b'(GMT-0300) America/Maceio'), (b'America/Miquelon', b'(GMT-0300) America/Miquelon'), (b'America/Paramaribo', b'(GMT-0300) America/Paramaribo'), (b'America/Recife', b'(GMT-0300) America/Recife'), (b'America/Santarem', b'(GMT-0300) America/Santarem'), (b'America/Santiago', b'(GMT-0300) America/Santiago'), (b'Antarctica/Palmer', b'(GMT-0300) Antarctica/Palmer'), (b'Antarctica/Rothera', b'(GMT-0300) Antarctica/Rothera'), (b'Atlantic/Stanley', b'(GMT-0300) Atlantic/Stanley'), (b'America/Montevideo', b'(GMT-0200) America/Montevideo'), (b'America/Noronha', b'(GMT-0200) America/Noronha'), (b'America/Sao_Paulo', b'(GMT-0200) America/Sao_Paulo'), (b'Atlantic/South_Georgia', b'(GMT-0200) Atlantic/South_Georgia'), (b'America/Scoresbysund', b'(GMT-0100) America/Scoresbysund'), (b'Atlantic/Azores', b'(GMT-0100) Atlantic/Azores'), (b'Atlantic/Cape_Verde', b'(GMT-0100) Atlantic/Cape_Verde'), (b'Africa/Abidjan', b'(GMT+0000) Africa/Abidjan'), (b'Africa/Accra', b'(GMT+0000) Africa/Accra'), (b'Africa/Bamako', b'(GMT+0000) Africa/Bamako'), (b'Africa/Banjul', b'(GMT+0000) Africa/Banjul'), (b'Africa/Bissau', b'(GMT+0000) Africa/Bissau'), (b'Africa/Casablanca', b'(GMT+0000) Africa/Casablanca'), (b'Africa/Conakry', b'(GMT+0000) Africa/Conakry'), (b'Africa/Dakar', b'(GMT+0000) Africa/Dakar'), (b'Africa/El_Aaiun', b'(GMT+0000) Africa/El_Aaiun'), (b'Africa/Freetown', b'(GMT+0000) Africa/Freetown'), (b'Africa/Lome', b'(GMT+0000) Africa/Lome'), (b'Africa/Monrovia', b'(GMT+0000) Africa/Monrovia'), (b'Africa/Nouakchott', b'(GMT+0000) Africa/Nouakchott'), (b'Africa/Ouagadougou', b'(GMT+0000) Africa/Ouagadougou'), (b'Africa/Sao_Tome', b'(GMT+0000) Africa/Sao_Tome'), (b'America/Danmarkshavn', b'(GMT+0000) America/Danmarkshavn'), (b'Atlantic/Canary', b'(GMT+0000) Atlantic/Canary'), (b'Atlantic/Faroe', b'(GMT+0000) Atlantic/Faroe'), (b'Atlantic/Madeira', b'(GMT+0000) Atlantic/Madeira'), (b'Atlantic/Reykjavik', b'(GMT+0000) Atlantic/Reykjavik'), (b'Atlantic/St_Helena', b'(GMT+0000) Atlantic/St_Helena'), (b'Europe/Dublin', b'(GMT+0000) Europe/Dublin'), (b'Europe/Guernsey', b'(GMT+0000) Europe/Guernsey'), (
- b'Europe/Isle_of_Man', b'(GMT+0000) Europe/Isle_of_Man'), (b'Europe/Jersey', b'(GMT+0000) Europe/Jersey'), (b'Europe/Lisbon', b'(GMT+0000) Europe/Lisbon'), (b'Europe/London', b'(GMT+0000) Europe/London'), (b'GMT', b'(GMT+0000) GMT'), (b'UTC', b'(GMT+0000) UTC'), (b'Africa/Algiers', b'(GMT+0100) Africa/Algiers'), (b'Africa/Bangui', b'(GMT+0100) Africa/Bangui'), (b'Africa/Brazzaville', b'(GMT+0100) Africa/Brazzaville'), (b'Africa/Ceuta', b'(GMT+0100) Africa/Ceuta'), (b'Africa/Douala', b'(GMT+0100) Africa/Douala'), (b'Africa/Kinshasa', b'(GMT+0100) Africa/Kinshasa'), (b'Africa/Lagos', b'(GMT+0100) Africa/Lagos'), (b'Africa/Libreville', b'(GMT+0100) Africa/Libreville'), (b'Africa/Luanda', b'(GMT+0100) Africa/Luanda'), (b'Africa/Malabo', b'(GMT+0100) Africa/Malabo'), (b'Africa/Ndjamena', b'(GMT+0100) Africa/Ndjamena'), (b'Africa/Niamey', b'(GMT+0100) Africa/Niamey'), (b'Africa/Porto-Novo', b'(GMT+0100) Africa/Porto-Novo'), (b'Africa/Tunis', b'(GMT+0100) Africa/Tunis'), (b'Arctic/Longyearbyen', b'(GMT+0100) Arctic/Longyearbyen'), (b'Europe/Amsterdam', b'(GMT+0100) Europe/Amsterdam'), (b'Europe/Andorra', b'(GMT+0100) Europe/Andorra'), (b'Europe/Belgrade', b'(GMT+0100) Europe/Belgrade'), (b'Europe/Berlin', b'(GMT+0100) Europe/Berlin'), (b'Europe/Bratislava', b'(GMT+0100) Europe/Bratislava'), (b'Europe/Brussels', b'(GMT+0100) Europe/Brussels'), (b'Europe/Budapest', b'(GMT+0100) Europe/Budapest'), (b'Europe/Copenhagen', b'(GMT+0100) Europe/Copenhagen'), (b'Europe/Gibraltar', b'(GMT+0100) Europe/Gibraltar'), (b'Europe/Ljubljana', b'(GMT+0100) Europe/Ljubljana'), (b'Europe/Luxembourg', b'(GMT+0100) Europe/Luxembourg'), (b'Europe/Madrid', b'(GMT+0100) Europe/Madrid'), (b'Europe/Malta', b'(GMT+0100) Europe/Malta'), (b'Europe/Monaco', b'(GMT+0100) Europe/Monaco'), (b'Europe/Oslo', b'(GMT+0100) Europe/Oslo'), (b'Europe/Paris', b'(GMT+0100) Europe/Paris'), (b'Europe/Podgorica', b'(GMT+0100) Europe/Podgorica'), (b'Europe/Prague', b'(GMT+0100) Europe/Prague'), (b'Europe/Rome', b'(GMT+0100) Europe/Rome'), (b'Europe/San_Marino', b'(GMT+0100) Europe/San_Marino'), (b'Europe/Sarajevo', b'(GMT+0100) Europe/Sarajevo'), (b'Europe/Skopje', b'(GMT+0100) Europe/Skopje'), (b'Europe/Stockholm', b'(GMT+0100) Europe/Stockholm'), (b'Europe/Tirane', b'(GMT+0100) Europe/Tirane'), (b'Europe/Vaduz', b'(GMT+0100) Europe/Vaduz'), (b'Europe/Vatican', b'(GMT+0100) Europe/Vatican'), (b'Europe/Vienna', b'(GMT+0100) Europe/Vienna'), (b'Europe/Warsaw', b'(GMT+0100) Europe/Warsaw'), (b'Europe/Zagreb', b'(GMT+0100) Europe/Zagreb'), (b'Europe/Zurich', b'(GMT+0100) Europe/Zurich'), (b'Africa/Blantyre', b'(GMT+0200) Africa/Blantyre'), (b'Africa/Bujumbura', b'(GMT+0200) Africa/Bujumbura'), (b'Africa/Cairo', b'(GMT+0200) Africa/Cairo'), (b'Africa/Gaborone', b'(GMT+0200) Africa/Gaborone'), (b'Africa/Harare', b'(GMT+0200) Africa/Harare'), (b'Africa/Johannesburg', b'(GMT+0200) Africa/Johannesburg'), (b'Africa/Kigali', b'(GMT+0200) Africa/Kigali'), (b'Africa/Lubumbashi', b'(GMT+0200) Africa/Lubumbashi'), (b'Africa/Lusaka', b'(GMT+0200) Africa/Lusaka'), (b'Africa/Maputo', b'(GMT+0200) Africa/Maputo'), (b'Africa/Maseru', b'(GMT+0200) Africa/Maseru'), (b'Africa/Mbabane', b'(GMT+0200) Africa/Mbabane'), (b'Africa/Tripoli', b'(GMT+0200) Africa/Tripoli'), (b'Africa/Windhoek', b'(GMT+0200) Africa/Windhoek'), (b'Asia/Amman', b'(GMT+0200) Asia/Amman'), (b'Asia/Beirut', b'(GMT+0200) Asia/Beirut'), (b'Asia/Damascus', b'(GMT+0200) Asia/Damascus'), (b'Asia/Gaza', b'(GMT+0200) Asia/Gaza'), (b'Asia/Hebron', b'(GMT+0200) Asia/Hebron'), (b'Asia/Jerusalem', b'(GMT+0200) Asia/Jerusalem'), (b'Asia/Nicosia', b'(GMT+0200) Asia/Nicosia'), (b'Europe/Athens', b'(GMT+0200) Europe/Athens'), (b'Europe/Bucharest', b'(GMT+0200) Europe/Bucharest'), (b'Europe/Chisinau', b'(GMT+0200) Europe/Chisinau'), (b'Europe/Helsinki', b'(GMT+0200) Europe/Helsinki'), (b'Europe/Istanbul', b'(GMT+0200) Europe/Istanbul'), (b'Europe/Kiev', b'(GMT+0200) Europe/Kiev'), (b'Europe/Mariehamn', b'(GMT+0200) Europe/Mariehamn'), (b'Europe/Riga', b'(GMT+0200) Europe/Riga'), (b'Europe/Sofia', b'(GMT+0200) Europe/Sofia'), (b'Europe/Tallinn', b'(GMT+0200) Europe/Tallinn'), (b'Europe/Uzhgorod', b'(GMT+0200) Europe/Uzhgorod'), (b'Europe/Vilnius', b'(GMT+0200) Europe/Vilnius'), (b'Europe/Zaporozhye', b'(GMT+0200) Europe/Zaporozhye'), (b'Africa/Addis_Ababa', b'(GMT+0300) Africa/Addis_Ababa'), (b'Africa/Asmara', b'(GMT+0300) Africa/Asmara'), (b'Africa/Dar_es_Salaam', b'(GMT+0300) Africa/Dar_es_Salaam'), (b'Africa/Djibouti', b'(GMT+0300) Africa/Djibouti'), (b'Africa/Juba', b'(GMT+0300) Africa/Juba'), (b'Africa/Kampala', b'(GMT+0300) Africa/Kampala'), (b'Africa/Khartoum', b'(GMT+0300) Africa/Khartoum'), (b'Africa/Mogadishu', b'(GMT+0300) Africa/Mogadishu'), (b'Africa/Nairobi', b'(GMT+0300) Africa/Nairobi'), (b'Antarctica/Syowa', b'(GMT+0300) Antarctica/Syowa'), (b'Asia/Aden', b'(GMT+0300) Asia/Aden'), (b'Asia/Baghdad', b'(GMT+0300) Asia/Baghdad'), (b'Asia/Bahrain', b'(GMT+0300) Asia/Bahrain'), (b'Asia/Kuwait', b'(GMT+0300) Asia/Kuwait'), (b'Asia/Qatar', b'(GMT+0300) Asia/Qatar'), (b'Asia/Riyadh', b'(GMT+0300) Asia/Riyadh'), (b'Europe/Kaliningrad', b'(GMT+0300) Europe/Kaliningrad'), (b'Europe/Minsk', b'(GMT+0300) Europe/Minsk'), (b'Indian/Antananarivo', b'(GMT+0300) Indian/Antananarivo'), (b'Indian/Comoro', b'(GMT+0300) Indian/Comoro'), (b'Indian/Mayotte', b'(GMT+0300) Indian/Mayotte'), (b'Asia/Tehran', b'(GMT+0330) Asia/Tehran'), (b'Asia/Baku', b'(GMT+0400) Asia/Baku'), (b'Asia/Dubai', b'(GMT+0400) Asia/Dubai'), (b'Asia/Muscat', b'(GMT+0400) Asia/Muscat'), (b'Asia/Tbilisi', b'(GMT+0400) Asia/Tbilisi'), (b'Asia/Yerevan', b'(GMT+0400) Asia/Yerevan'), (b'Europe/Moscow', b'(GMT+0400) Europe/Moscow'), (b'Europe/Samara', b'(GMT+0400) Europe/Samara'), (b'Europe/Simferopol', b'(GMT+0400) Europe/Simferopol'), (b'Europe/Volgograd', b'(GMT+0400) Europe/Volgograd'), (b'Indian/Mahe', b'(GMT+0400) Indian/Mahe'), (b'Indian/Mauritius', b'(GMT+0400) Indian/Mauritius'), (b'Indian/Reunion', b'(GMT+0400) Indian/Reunion'), (b'Asia/Kabul', b'(GMT+0430) Asia/Kabul'), (b'Antarctica/Mawson', b'(GMT+0500) Antarctica/Mawson'), (b'Asia/Aqtau', b'(GMT+0500) Asia/Aqtau'), (b'Asia/Aqtobe', b'(GMT+0500) Asia/Aqtobe'), (b'Asia/Ashgabat', b'(GMT+0500) Asia/Ashgabat'), (b'Asia/Dushanbe', b'(GMT+0500) Asia/Dushanbe'), (b'Asia/Karachi', b'(GMT+0500) Asia/Karachi'), (b'Asia/Oral', b'(GMT+0500) Asia/Oral'), (b'Asia/Samarkand', b'(GMT+0500) Asia/Samarkand'), (b'Asia/Tashkent', b'(GMT+0500) Asia/Tashkent'), (b'Indian/Kerguelen', b'(GMT+0500) Indian/Kerguelen'), (b'Indian/Maldives', b'(GMT+0500) Indian/Maldives'), (b'Asia/Colombo', b'(GMT+0530) Asia/Colombo'), (b'Asia/Kolkata', b'(GMT+0530) Asia/Kolkata'), (b'Asia/Kathmandu', b'(GMT+0545) Asia/Kathmandu'), (b'Antarctica/Vostok', b'(GMT+0600) Antarctica/Vostok'), (b'Asia/Almaty', b'(GMT+0600) Asia/Almaty'), (b'Asia/Bishkek', b'(GMT+0600) Asia/Bishkek'), (b'Asia/Dhaka', b'(GMT+0600) Asia/Dhaka'), (b'Asia/Qyzylorda', b'(GMT+0600) Asia/Qyzylorda'), (b'Asia/Thimphu', b'(GMT+0600) Asia/Thimphu'), (b'Asia/Yekaterinburg', b'(GMT+0600) Asia/Yekaterinburg'), (b'Indian/Chagos', b'(GMT+0600) Indian/Chagos'), (b'Asia/Rangoon', b'(GMT+0630) Asia/Rangoon'), (b'Indian/Cocos', b'(GMT+0630) Indian/Cocos'), (b'Antarctica/Davis', b'(GMT+0700) Antarctica/Davis'), (b'Asia/Bangkok', b'(GMT+0700) Asia/Bangkok'), (b'Asia/Ho_Chi_Minh', b'(GMT+0700) Asia/Ho_Chi_Minh'), (b'Asia/Hovd', b'(GMT+0700) Asia/Hovd'), (b'Asia/Jakarta', b'(GMT+0700) Asia/Jakarta'), (b'Asia/Novokuznetsk', b'(GMT+0700) Asia/Novokuznetsk'), (b'Asia/Novosibirsk', b'(GMT+0700) Asia/Novosibirsk'), (b'Asia/Omsk', b'(GMT+0700) Asia/Omsk'), (b'Asia/Phnom_Penh', b'(GMT+0700) Asia/Phnom_Penh'), (b'Asia/Pontianak', b'(GMT+0700) Asia/Pontianak'), (b'Asia/Vientiane', b'(GMT+0700) Asia/Vientiane'), (b'Indian/Christmas', b'(GMT+0700) Indian/Christmas'), (b'Antarctica/Casey', b'(GMT+0800) Antarctica/Casey'), (b'Asia/Brunei', b'(GMT+0800) Asia/Brunei'), (b'Asia/Choibalsan', b'(GMT+0800) Asia/Choibalsan'), (b'Asia/Chongqing', b'(GMT+0800) Asia/Chongqing'), (b'Asia/Harbin', b'(GMT+0800) Asia/Harbin'), (b'Asia/Hong_Kong', b'(GMT+0800) Asia/Hong_Kong'), (b'Asia/Kashgar', b'(GMT+0800) Asia/Kashgar'), (b'Asia/Krasnoyarsk', b'(GMT+0800) Asia/Krasnoyarsk'), (b'Asia/Kuala_Lumpur', b'(GMT+0800) Asia/Kuala_Lumpur'), (b'Asia/Kuching', b'(GMT+0800) Asia/Kuching'), (b'Asia/Macau', b'(GMT+0800) Asia/Macau'), (b'Asia/Makassar', b'(GMT+0800) Asia/Makassar'), (b'Asia/Manila', b'(GMT+0800) Asia/Manila'), (b'Asia/Shanghai', b'(GMT+0800) Asia/Shanghai'), (b'Asia/Singapore', b'(GMT+0800) Asia/Singapore'), (b'Asia/Taipei', b'(GMT+0800) Asia/Taipei'), (b'Asia/Ulaanbaatar', b'(GMT+0800) Asia/Ulaanbaatar'), (b'Asia/Urumqi', b'(GMT+0800) Asia/Urumqi'), (b'Australia/Perth', b'(GMT+0800) Australia/Perth'), (b'Australia/Eucla', b'(GMT+0845) Australia/Eucla'), (b'Asia/Dili', b'(GMT+0900) Asia/Dili'), (b'Asia/Irkutsk', b'(GMT+0900) Asia/Irkutsk'), (b'Asia/Jayapura', b'(GMT+0900) Asia/Jayapura'), (b'Asia/Pyongyang', b'(GMT+0900) Asia/Pyongyang'), (b'Asia/Seoul', b'(GMT+0900) Asia/Seoul'), (b'Asia/Tokyo', b'(GMT+0900) Asia/Tokyo'), (b'Pacific/Palau', b'(GMT+0900) Pacific/Palau'), (b'Australia/Darwin', b'(GMT+0930) Australia/Darwin'), (b'Antarctica/DumontDUrville', b'(GMT+1000) Antarctica/DumontDUrville'), (b'Asia/Yakutsk', b'(GMT+1000) Asia/Yakutsk'), (b'Australia/Brisbane', b'(GMT+1000) Australia/Brisbane'), (b'Australia/Lindeman', b'(GMT+1000) Australia/Lindeman'), (b'Pacific/Chuuk', b'(GMT+1000) Pacific/Chuuk'), (b'Pacific/Guam', b'(GMT+1000) Pacific/Guam'), (b'Pacific/Port_Moresby', b'(GMT+1000) Pacific/Port_Moresby'), (b'Pacific/Saipan', b'(GMT+1000) Pacific/Saipan'), (b'Australia/Adelaide', b'(GMT+1030) Australia/Adelaide'), (b'Australia/Broken_Hill', b'(GMT+1030) Australia/Broken_Hill'), (b'Antarctica/Macquarie', b'(GMT+1100) Antarctica/Macquarie'), (b'Asia/Sakhalin', b'(GMT+1100) Asia/Sakhalin'), (b'Asia/Vladivostok', b'(GMT+1100) Asia/Vladivostok'), (b'Australia/Currie', b'(GMT+1100) Australia/Currie'), (b'Australia/Hobart', b'(GMT+1100) Australia/Hobart'), (b'Australia/Lord_Howe', b'(GMT+1100) Australia/Lord_Howe'), (b'Australia/Melbourne', b'(GMT+1100) Australia/Melbourne'), (b'Australia/Sydney', b'(GMT+1100) Australia/Sydney'), (b'Pacific/Efate', b'(GMT+1100) Pacific/Efate'), (b'Pacific/Guadalcanal', b'(GMT+1100) Pacific/Guadalcanal'), (b'Pacific/Kosrae', b'(GMT+1100) Pacific/Kosrae'), (b'Pacific/Noumea', b'(GMT+1100) Pacific/Noumea'), (b'Pacific/Pohnpei', b'(GMT+1100) Pacific/Pohnpei'), (b'Pacific/Norfolk', b'(GMT+1130) Pacific/Norfolk'), (b'Asia/Anadyr', b'(GMT+1200) Asia/Anadyr'), (b'Asia/Kamchatka', b'(GMT+1200) Asia/Kamchatka'), (b'Asia/Magadan', b'(GMT+1200) Asia/Magadan'), (b'Pacific/Fiji', b'(GMT+1200) Pacific/Fiji'), (b'Pacific/Funafuti', b'(GMT+1200) Pacific/Funafuti'), (b'Pacific/Kwajalein', b'(GMT+1200) Pacific/Kwajalein'), (b'Pacific/Majuro', b'(GMT+1200) Pacific/Majuro'), (b'Pacific/Nauru', b'(GMT+1200) Pacific/Nauru'), (b'Pacific/Tarawa', b'(GMT+1200) Pacific/Tarawa'), (b'Pacific/Wake', b'(GMT+1200) Pacific/Wake'), (b'Pacific/Wallis', b'(GMT+1200) Pacific/Wallis'), (b'Antarctica/McMurdo', b'(GMT+1300) Antarctica/McMurdo'), (b'Antarctica/South_Pole', b'(GMT+1300) Antarctica/South_Pole'), (b'Pacific/Auckland', b'(GMT+1300) Pacific/Auckland'), (b'Pacific/Enderbury', b'(GMT+1300) Pacific/Enderbury'), (b'Pacific/Fakaofo', b'(GMT+1300) Pacific/Fakaofo'), (b'Pacific/Tongatapu', b'(GMT+1300) Pacific/Tongatapu'), (b'Pacific/Chatham', b'(GMT+1345) Pacific/Chatham'), (b'Pacific/Apia', b'(GMT+1400) Pacific/Apia'), (b'Pacific/Kiritimati', b'(GMT+1400) Pacific/Kiritimati')])),
- ],
- options={
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Account',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Charge',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('kind', models.CharField(default=b'besteffort', max_length=30, choices=[
- (b'besteffort', b'besteffort'), (b'reservation', b'reservation'), (b'monthlyfee', b'monthlyfee')])),
- ('state', models.CharField(default=b'pending', max_length=30, choices=[
- (b'pending', b'pending'), (b'invoiced', b'invoiced')])),
- ('date', models.DateTimeField()),
- ('amount', models.FloatField(default=0.0)),
- ('coreHours', models.FloatField(default=0.0)),
- ('account', models.ForeignKey(
- related_name=b'charges', to='core.Account')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Controller',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name of the Controller', unique=True, max_length=200)),
- ('backend_type', models.CharField(
- help_text=b'Type of compute controller, e.g. EC2, OpenStack, or OpenStack version', max_length=200)),
- ('version', models.CharField(
- help_text=b'Controller version', max_length=200)),
- ('auth_url', models.CharField(
- help_text=b'Auth url for the compute controller', max_length=200, null=True, blank=True)),
- ('admin_user', models.CharField(
- help_text=b'Username of an admin user at this controller', max_length=200, null=True, blank=True)),
- ('admin_password', models.CharField(
- help_text=b'Password of theadmin user at this controller', max_length=200, null=True, blank=True)),
- ('admin_tenant', models.CharField(
- help_text=b'Name of the tenant the admin user belongs to', max_length=200, null=True, blank=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerCredential',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The credential type, e.g. ec2', max_length=128)),
- ('key_id', models.CharField(
- help_text=b'The backend id of this credential', max_length=1024)),
- ('enc_value', encrypted_fields.fields.EncryptedCharField(
- help_text=b'The key value of this credential', max_length=1024)),
- ('controller', models.ForeignKey(related_name=b'controllercredentials',
- to='core.Controller', help_text=b'The User this credential is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerDashboardView',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('enabled', models.BooleanField(default=True)),
- ('url', models.CharField(help_text=b'URL of Dashboard', max_length=1024)),
- ('controller', models.ForeignKey(
- related_name=b'controllerdashboardviews', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerImages',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('glance_image_id', models.CharField(
- help_text=b'Glance image id', max_length=200, null=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllerimages', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerNetwork',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('net_id', models.CharField(help_text=b'Quantum network',
- max_length=256, null=True, blank=True)),
- ('router_id', models.CharField(help_text=b'Quantum router id',
- max_length=256, null=True, blank=True)),
- ('subnet_id', models.CharField(help_text=b'Quantum subnet id',
- max_length=256, null=True, blank=True)),
- ('subnet', models.CharField(max_length=32, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllernetworks', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True,
- max_length=30, choices=[(b'admin', b'Admin')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerSite',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('tenant_id', models.CharField(help_text=b'Keystone tenant id',
- max_length=200, null=True, db_index=True, blank=True)),
- ('controller', models.ForeignKey(related_name=b'controllersite',
- blank=True, to='core.Controller', null=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerSitePrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role_id', models.CharField(help_text=b'Keystone id',
- max_length=200, null=True, db_index=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllersiteprivileges', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerSlice',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('tenant_id', models.CharField(
- help_text=b'Keystone tenant id', max_length=200, null=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllerslices', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerSlicePrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role_id', models.CharField(help_text=b'Keystone id',
- max_length=200, null=True, db_index=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllersliceprivileges', to='core.Controller')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ControllerUser',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('kuser_id', models.CharField(help_text=b'Keystone user id',
- max_length=200, null=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'controllersusers', to='core.Controller')),
- ('user', models.ForeignKey(
- related_name=b'controllerusers', to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='DashboardView',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name of the View', unique=True, max_length=200)),
- ('url', models.CharField(help_text=b'URL of Dashboard', max_length=1024)),
- ('enabled', models.BooleanField(default=True)),
- ('controllers', models.ManyToManyField(related_name=b'dashboardviews',
- through='core.ControllerDashboardView', to='core.Controller', blank=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Deployment',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name of the Deployment', unique=True, max_length=200)),
- ('accessControl', models.TextField(default=b'allow all',
- help_text=b'Access control list that specifies which sites/users may use nodes in this deployment', max_length=200)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='DeploymentPrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('deployment', models.ForeignKey(
- related_name=b'deploymentprivileges', to='core.Deployment')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='DeploymentRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True,
- max_length=30, choices=[(b'admin', b'Admin')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Flavor',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'name of this flavor, as displayed to users', max_length=32)),
- ('description', models.CharField(
- max_length=1024, null=True, blank=True)),
- ('flavor', models.CharField(
- help_text=b'flavor string used to configure deployments', max_length=32)),
- ('order', models.IntegerField(default=0,
- help_text=b'used to order flavors when displayed in a list')),
- ('default', models.BooleanField(default=False,
- help_text=b'make this a default flavor to use when creating new instances')),
- ('deployments', models.ManyToManyField(
- related_name=b'flavors', to='core.Deployment', blank=True)),
- ],
- options={
- 'ordering': ('order', 'name'),
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Image',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(unique=True, max_length=256)),
- ('disk_format', models.CharField(max_length=256)),
- ('container_format', models.CharField(max_length=256)),
- ('path', models.CharField(help_text=b'Path to image on local disk',
- max_length=256, null=True, blank=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ImageDeployments',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('deployment', models.ForeignKey(
- related_name=b'imagedeployments', to='core.Deployment')),
- ('image', models.ForeignKey(
- related_name=b'imagedeployments', to='core.Image')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Invoice',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('date', models.DateTimeField()),
- ('account', models.ForeignKey(
- related_name=b'invoices', to='core.Account')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Network',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=32)),
- ('subnet', models.CharField(max_length=32, blank=True)),
- ('ports', models.CharField(blank=True, max_length=1024,
- null=True, validators=[core.models.network.ValidateNatList])),
- ('labels', models.CharField(max_length=1024, null=True, blank=True)),
- ('guaranteed_bandwidth', models.IntegerField(default=0)),
- ('permit_all_slices', models.BooleanField(default=False)),
- ('topology_parameters', models.TextField(null=True, blank=True)),
- ('controller_url', models.CharField(
- max_length=1024, null=True, blank=True)),
- ('controller_parameters', models.TextField(null=True, blank=True)),
- ('network_id', models.CharField(help_text=b'Quantum network',
- max_length=256, null=True, blank=True)),
- ('router_id', models.CharField(help_text=b'Quantum router id',
- max_length=256, null=True, blank=True)),
- ('subnet_id', models.CharField(help_text=b'Quantum subnet id',
- max_length=256, null=True, blank=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='NetworkParameter',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('value', models.CharField(
- help_text=b'The value of this parameter', max_length=1024)),
- ('object_id', models.PositiveIntegerField()),
- ('content_type', models.ForeignKey(to='contenttypes.ContentType')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='NetworkParameterType',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The name of this parameter', max_length=128)),
- ('description', models.CharField(max_length=1024)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='NetworkSlice',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('network', models.ForeignKey(
- related_name=b'networkslices', to='core.Network')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='NetworkInstance',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('ip', models.GenericIPAddressField(
- help_text=b'Instance ip address', null=True, blank=True)),
- ('port_id', models.CharField(help_text=b'Quantum port id',
- max_length=256, null=True, blank=True)),
- ('network', models.ForeignKey(
- related_name=b'networkinstances', to='core.Network')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='NetworkTemplate',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=32)),
- ('description', models.CharField(
- max_length=1024, null=True, blank=True)),
- ('guaranteed_bandwidth', models.IntegerField(default=0)),
- ('visibility', models.CharField(default=b'private', max_length=30,
- choices=[(b'public', b'public'), (b'private', b'private')])),
- ('translation', models.CharField(default=b'none', max_length=30,
- choices=[(b'none', b'none'), (b'NAT', b'NAT')])),
- ('shared_network_name', models.CharField(
- max_length=30, null=True, blank=True)),
- ('shared_network_id', models.CharField(
- help_text=b'Quantum network', max_length=256, null=True, blank=True)),
- ('topology_kind', models.CharField(default=b'BigSwitch', max_length=30, choices=[
- (b'bigswitch', b'BigSwitch'), (b'physical', b'Physical'), (b'custom', b'Custom')])),
- ('controller_kind', models.CharField(default=None, max_length=30, null=True,
- blank=True, choices=[(None, b'None'), (b'onos', b'ONOS'), (b'custom', b'Custom')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Node',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name of the Node', unique=True, max_length=200)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Payment',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('amount', models.FloatField(default=0.0)),
- ('date', models.DateTimeField(default=django.utils.timezone.now)),
- ('account', models.ForeignKey(
- related_name=b'payments', to='core.Account')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='PlanetStack',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('description', models.CharField(default=b'PlanetStack',
- help_text=b'Used for scoping of roles at the PlanetStack Application level', unique=True, max_length=200)),
- ],
- options={
- 'verbose_name_plural': 'PlanetStack',
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='PlanetStackPrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('planetstack', models.ForeignKey(
- related_name=b'planetstackprivileges', default=1, to='core.PlanetStack')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='PlanetStackRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True,
- max_length=30, choices=[(b'admin', b'Admin')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Project',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name of Project', unique=True, max_length=200)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Reservation',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('startTime', models.DateTimeField()),
- ('duration', models.IntegerField(default=1)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ReservedResource',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('quantity', models.IntegerField(default=1)),
- ('reservationSet', models.ForeignKey(
- related_name=b'reservedresources', to='core.Reservation')),
- ],
- options={
- 'abstract': False,
- 'verbose_name_plural': 'Reserved Resources',
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Role',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role_type', models.CharField(max_length=80, verbose_name=b'Name')),
- ('role', models.CharField(max_length=80, null=True,
- verbose_name=b'Keystone role id', blank=True)),
- ('description', models.CharField(
- max_length=120, verbose_name=b'Description')),
- ('content_type', models.ForeignKey(
- verbose_name=b'Role Scope', to='contenttypes.ContentType')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Router',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=32)),
- ('networks', models.ManyToManyField(
- related_name=b'routers', to='core.Network', blank=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Service',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('description', models.TextField(
- help_text=b'Description of Service', max_length=254, null=True, blank=True)),
- ('enabled', models.BooleanField(default=True)),
- ('name', models.CharField(help_text=b'Service Name', max_length=30)),
- ('versionNumber', models.CharField(
- help_text=b'Version of Service Definition', max_length=30)),
- ('published', models.BooleanField(default=True)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ServiceAttribute',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(help_text=b'Attribute Name', max_length=128)),
- ('value', models.CharField(
- help_text=b'Attribute Value', max_length=1024)),
- ('service', models.ForeignKey(related_name=b'serviceattributes',
- to='core.Service', help_text=b'The Service this attribute is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ServiceClass',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=32)),
- ('description', models.CharField(max_length=255)),
- ('commitment', models.IntegerField(default=365)),
- ('membershipFee', models.IntegerField(default=0)),
- ('membershipFeeMonths', models.IntegerField(default=12)),
- ('upgradeRequiresApproval', models.BooleanField(default=False)),
- ('upgradeFrom', models.ManyToManyField(
- related_name='upgradeFrom_rel_+', null=True, to='core.ServiceClass', blank=True)),
- ],
- options={
- 'abstract': False,
- 'verbose_name_plural': 'Service classes',
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='ServiceResource',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=32)),
- ('maxUnitsDeployment', models.IntegerField(default=1)),
- ('maxUnitsNode', models.IntegerField(default=1)),
- ('maxDuration', models.IntegerField(default=1)),
- ('bucketInRate', models.IntegerField(default=0)),
- ('bucketMaxSize', models.IntegerField(default=0)),
- ('cost', models.IntegerField(default=0)),
- ('calendarReservable', models.BooleanField(default=True)),
- ('serviceClass', models.ForeignKey(
- related_name=b'serviceresources', to='core.ServiceClass')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Site',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'Name for this Site', max_length=200)),
- ('site_url', models.URLField(help_text=b"Site's Home URL Page",
- max_length=512, null=True, blank=True)),
- ('enabled', models.BooleanField(
- default=True, help_text=b'Status for this Site')),
- ('location', geoposition.fields.GeopositionField(max_length=42)),
- ('longitude', models.FloatField(null=True, blank=True)),
- ('latitude', models.FloatField(null=True, blank=True)),
- ('login_base', models.CharField(
- help_text=b'Prefix for Slices associated with this Site', unique=True, max_length=50)),
- ('is_public', models.BooleanField(
- default=True, help_text=b'Indicates the visibility of this site to other members')),
- ('abbreviated_name', models.CharField(max_length=80)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SiteCredential',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The credential type, e.g. ec2', max_length=128)),
- ('key_id', models.CharField(
- help_text=b'The backend id of this credential', max_length=1024)),
- ('enc_value', encrypted_fields.fields.EncryptedCharField(
- help_text=b'The key value of this credential', max_length=1024)),
- ('site', models.ForeignKey(related_name=b'sitecredentials', to='core.Site',
- help_text=b'The User this credential is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SiteDeployment',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('availability_zone', models.CharField(
- help_text=b'OpenStack availability zone', max_length=200, null=True, blank=True)),
- ('controller', models.ForeignKey(
- related_name=b'sitedeployments', blank=True, to='core.Controller', null=True)),
- ('deployment', models.ForeignKey(
- related_name=b'sitedeployments', to='core.Deployment')),
- ('site', models.ForeignKey(
- related_name=b'sitedeployments', to='core.Site')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SitePrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SiteRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True, max_length=30, choices=[
- (b'admin', b'Admin'), (b'pi', b'PI'), (b'tech', b'Tech'), (b'billing', b'Billing')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Slice',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(
- help_text=b'The Name of the Slice', unique=True, max_length=80)),
- ('enabled', models.BooleanField(
- default=True, help_text=b'Status for this Slice')),
- ('omf_friendly', models.BooleanField(default=False)),
- ('description', models.TextField(
- help_text=b'High level description of the slice and expected activities', max_length=1024, blank=True)),
- ('slice_url', models.URLField(max_length=512, blank=True)),
- ('max_instances', models.IntegerField(default=10)),
- ('network', models.CharField(default=b'Private Only',
- max_length=256, null=True, blank=True)),
- ('mount_data_sets', models.CharField(
- default=b'GenBank', max_length=256, null=True, blank=True)),
- ('creator', models.ForeignKey(related_name=b'slices',
- blank=True, to=settings.AUTH_USER_MODEL, null=True)),
- ('default_flavor', models.ForeignKey(
- related_name=b'slices', blank=True, to='core.Flavor', null=True)),
- ('default_image', models.ForeignKey(
- related_name=b'slices', blank=True, to='core.Image', null=True)),
- ('service', models.ForeignKey(related_name=b'service',
- blank=True, to='core.Service', null=True)),
- ('serviceClass', models.ForeignKey(related_name=b'slices',
- default=core.models.serviceclass.get_default_serviceclass, to='core.ServiceClass', null=True)),
- ('site', models.ForeignKey(related_name=b'slices',
- to='core.Site', help_text=b'The Site this Slice belongs to')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SliceCredential',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The credential type, e.g. ec2', max_length=128)),
- ('key_id', models.CharField(
- help_text=b'The backend id of this credential', max_length=1024)),
- ('enc_value', encrypted_fields.fields.EncryptedCharField(
- help_text=b'The key value of this credential', max_length=1024)),
- ('slice', models.ForeignKey(related_name=b'slicecredentials',
- to='core.Slice', help_text=b'The User this credential is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SlicePrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SliceRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True, max_length=30,
- choices=[(b'admin', b'Admin'), (b'default', b'Default')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='SliceTag',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(help_text=b'The name of this tag', max_length=30, choices=[
- (b'privatekey', b'Private Key'), (b'publickey', b'Public Key')])),
- ('value', models.CharField(
- help_text=b'The value of this tag', max_length=1024)),
- ('slice', models.ForeignKey(
- related_name=b'slicetags', to='core.Slice')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Instance',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('instance_id', models.CharField(
- help_text=b'Nova instance id', max_length=200, null=True, blank=True)),
- ('instance_uuid', models.CharField(
- help_text=b'Nova instance uuid', max_length=200, null=True, blank=True)),
- ('name', models.CharField(help_text=b'Instance name', max_length=200)),
- ('instance_name', models.CharField(
- help_text=b'OpenStack generated name', max_length=200, null=True, blank=True)),
- ('ip', models.GenericIPAddressField(
- help_text=b'Instance ip address', null=True, blank=True)),
- ('numberCores', models.IntegerField(
- default=0, help_text=b'Number of cores for instance', verbose_name=b'Number of Cores')),
- ('userData', models.TextField(
- help_text=b'user_data passed to instance during creation', null=True, blank=True)),
- ('creator', models.ForeignKey(related_name=b'instances',
- blank=True, to=settings.AUTH_USER_MODEL, null=True)),
- ('deployment', models.ForeignKey(related_name=b'instance_deployment',
- verbose_name=b'deployment', to='core.Deployment')),
- ('flavor', models.ForeignKey(default=core.models.instance.get_default_flavor,
- to='core.Flavor', help_text=b'Flavor of this instance')),
- ('image', models.ForeignKey(
- related_name=b'instances', to='core.Image')),
- ('node', models.ForeignKey(related_name=b'instances', to='core.Node')),
- ('slice', models.ForeignKey(
- related_name=b'instances', to='core.Slice')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='Tag',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The name of this tag', max_length=128)),
- ('value', models.CharField(
- help_text=b'The value of this tag', max_length=1024)),
- ('object_id', models.PositiveIntegerField()),
- ('content_type', models.ForeignKey(to='contenttypes.ContentType')),
- ('service', models.ForeignKey(related_name=b'tags', to='core.Service',
- help_text=b'The Service this Tag is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='UsableObject',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.CharField(max_length=1024)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='UserCredential',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('name', models.SlugField(
- help_text=b'The credential type, e.g. ec2', max_length=128)),
- ('key_id', models.CharField(
- help_text=b'The backend id of this credential', max_length=1024)),
- ('enc_value', encrypted_fields.fields.EncryptedCharField(
- help_text=b'The key value of this credential', max_length=1024)),
- ('user', models.ForeignKey(related_name=b'usercredentials', to=settings.AUTH_USER_MODEL,
- help_text=b'The User this credential is associated with')),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='UserDashboardView',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('order', models.IntegerField(default=0)),
- ('dashboardView', models.ForeignKey(
- related_name=b'userdashboardviews', to='core.DashboardView')),
- ('user', models.ForeignKey(
- related_name=b'userdashboardviews', to=settings.AUTH_USER_MODEL)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='TenantPrivilege',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.CreateModel(
- name='TenantRole',
- fields=[
- ('id', models.AutoField(verbose_name='ID',
- serialize=False, auto_created=True, primary_key=True)),
- ('created', models.DateTimeField(
- default=django.utils.timezone.now, auto_now_add=True)),
- ('updated', models.DateTimeField(
- default=django.utils.timezone.now, auto_now=True)),
- ('enacted', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('policed', models.DateTimeField(
- default=None, null=True, blank=True)),
- ('backend_status', models.CharField(
- default=b'Provisioning in progress', max_length=140)),
- ('deleted', models.BooleanField(default=False)),
- ('role', models.CharField(unique=True, max_length=30,
- choices=[(b'admin', b'Admin'), (b'access', b'Access')])),
- ],
- options={
- 'abstract': False,
- },
- bases=(models.Model,),
- ),
- migrations.AddField(
- model_name='sliceprivilege',
- name='role',
- field=models.ForeignKey(
- related_name=b'sliceprivileges', to='core.SliceRole'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='sliceprivilege',
- name='slice',
- field=models.ForeignKey(
- related_name=b'sliceprivileges', to='core.Slice'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='sliceprivilege',
- name='user',
- field=models.ForeignKey(
- related_name=b'sliceprivileges', to=settings.AUTH_USER_MODEL),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='siteprivilege',
- name='role',
- field=models.ForeignKey(
- related_name=b'siteprivileges', to='core.SiteRole'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='siteprivilege',
- name='site',
- field=models.ForeignKey(
- related_name=b'siteprivileges', to='core.Site'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='siteprivilege',
- name='user',
- field=models.ForeignKey(
- related_name=b'siteprivileges', to=settings.AUTH_USER_MODEL),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='site',
- name='deployments',
- field=models.ManyToManyField(help_text=b'Select which sites are allowed to host nodes in this deployment',
- related_name=b'sites', through='core.SiteDeployment', to='core.Deployment', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='router',
- name='owner',
- field=models.ForeignKey(related_name=b'routers', to='core.Slice'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='router',
- name='permittedNetworks',
- field=models.ManyToManyField(
- related_name=b'availableRouters', to='core.Network', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='reservedresource',
- name='resource',
- field=models.ForeignKey(
- related_name=b'reservedresources', to='core.ServiceResource'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='reservedresource',
- name='instance',
- field=models.ForeignKey(
- related_name=b'reservedresources', to='core.Instance'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='reservation',
- name='slice',
- field=models.ForeignKey(
- related_name=b'reservations', to='core.Slice'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='planetstackprivilege',
- name='role',
- field=models.ForeignKey(to='core.PlanetStackRole'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='planetstackprivilege',
- name='user',
- field=models.ForeignKey(
- related_name=b'planetstackprivileges', to=settings.AUTH_USER_MODEL),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='node',
- name='site',
- field=models.ForeignKey(
- related_name=b'nodes', blank=True, to='core.Site', null=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='node',
- name='site_deployment',
- field=models.ForeignKey(
- related_name=b'nodes', to='core.SiteDeployment'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='networkinstance',
- name='instance',
- field=models.ForeignKey(
- related_name=b'networkinstances', to='core.Instance'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='networkslice',
- name='slice',
- field=models.ForeignKey(
- related_name=b'networkslices', to='core.Slice'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='networkparameter',
- name='parameter',
- field=models.ForeignKey(related_name=b'networkparameters',
- to='core.NetworkParameterType', help_text=b'The type of the parameter'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='network',
- name='owner',
- field=models.ForeignKey(related_name=b'ownedNetworks', to='core.Slice',
- help_text=b'Slice that owns control of this Network'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='network',
- name='permitted_slices',
- field=models.ManyToManyField(
- related_name=b'availableNetworks', to='core.Slice', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='network',
- name='slices',
- field=models.ManyToManyField(
- related_name=b'networks', through='core.NetworkSlice', to='core.Slice', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='network',
- name='instances',
- field=models.ManyToManyField(
- related_name=b'networks', through='core.NetworkInstance', to='core.Instance', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='network',
- name='template',
- field=models.ForeignKey(to='core.NetworkTemplate'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='image',
- name='deployments',
- field=models.ManyToManyField(help_text=b'Select which images should be instantiated on this deployment',
- related_name=b'images', through='core.ImageDeployments', to='core.Deployment', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='deploymentprivilege',
- name='role',
- field=models.ForeignKey(
- related_name=b'deploymentprivileges', to='core.DeploymentRole'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='deploymentprivilege',
- name='user',
- field=models.ForeignKey(
- related_name=b'deploymentprivileges', to=settings.AUTH_USER_MODEL),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllersliceprivilege',
- name='slice_privilege',
- field=models.ForeignKey(
- related_name=b'controllersliceprivileges', to='core.SlicePrivilege'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllerslice',
- name='slice',
- field=models.ForeignKey(
- related_name=b'controllerslices', to='core.Slice'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllersiteprivilege',
- name='site_privilege',
- field=models.ForeignKey(
- related_name=b'controllersiteprivileges', to='core.SitePrivilege'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllersite',
- name='site',
- field=models.ForeignKey(
- related_name=b'controllersite', to='core.Site'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllernetwork',
- name='network',
- field=models.ForeignKey(
- related_name=b'controllernetworks', to='core.Network'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllerimages',
- name='image',
- field=models.ForeignKey(
- related_name=b'controllerimages', to='core.Image'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='controllerdashboardview',
- name='dashboardView',
- field=models.ForeignKey(
- related_name=b'controllerdashboardviews', to='core.DashboardView'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='charge',
- name='invoice',
- field=models.ForeignKey(
- related_name=b'charges', blank=True, to='core.Invoice', null=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='charge',
- name='object',
- field=models.ForeignKey(to='core.UsableObject'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='charge',
- name='slice',
- field=models.ForeignKey(
- related_name=b'charges', blank=True, to='core.Slice', null=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='account',
- name='site',
- field=models.ForeignKey(
- related_name=b'accounts', to='core.Site', help_text=b'Site for this account'),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='user',
- name='dashboards',
- field=models.ManyToManyField(
- to='core.DashboardView', through='core.UserDashboardView', blank=True),
- preserve_default=True,
- ),
- migrations.AddField(
- model_name='user',
- name='site',
- field=models.ForeignKey(related_name=b'users', to='core.Site',
- help_text=b'Site this user will be homed too', null=True),
- preserve_default=True,
- ),
- ]
diff --git a/xos/core/migrations/0011_sliver_instance_uuid.py b/xos/core/migrations/0011_sliver_instance_uuid.py
deleted file mode 100644
index 3320158..0000000
--- a/xos/core/migrations/0011_sliver_instance_uuid.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django.db import models, migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('core', '0010_auto_20150118_1926'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='instance',
- name='instance_uuid',
- field=models.CharField(help_text=b'Nova instance uuid', max_length=200, null=True, blank=True),
- preserve_default=True,
- ),
- ]
diff --git a/xos/core/migrations/__init__.py b/xos/core/migrations/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/xos/core/migrations/__init__.py
+++ /dev/null
diff --git a/xos/core/xoslib/dashboards/xosServiceGrid.html b/xos/core/xoslib/dashboards/xosServiceGrid.html
index c0d58dc..ea89ca8 100644
--- a/xos/core/xoslib/dashboards/xosServiceGrid.html
+++ b/xos/core/xoslib/dashboards/xosServiceGrid.html
@@ -1,8 +1,5 @@
<!-- browserSync -->
-<!-- bower:css -->
-<link rel="stylesheet" href="vendor/bootstrap-css/css/bootstrap.min.css" />
-<link rel="stylesheet" href="vendor/angular-chart.js/dist/angular-chart.css" />
-<!-- endbower -->
+
<!-- endcss -->
<!-- inject:css -->
<link rel="stylesheet" href="/static/css/xosServiceGrid.css">
@@ -12,21 +9,9 @@
<div ui-view></div>
</div>
-<!-- bower:js -->
-<script src="vendor/jquery/dist/jquery.js"></script>
-<script src="vendor/angular/angular.js"></script>
-<script src="vendor/angular-mocks/angular-mocks.js"></script>
-<script src="vendor/angular-ui-router/release/angular-ui-router.js"></script>
-<script src="vendor/angular-cookies/angular-cookies.js"></script>
-<script src="vendor/angular-animate/angular-animate.js"></script>
-<script src="vendor/angular-resource/angular-resource.js"></script>
-<script src="vendor/lodash/lodash.js"></script>
-<script src="vendor/bootstrap-css/js/bootstrap.min.js"></script>
-<script src="vendor/Chart.js/Chart.js"></script>
-<script src="vendor/angular-chart.js/dist/angular-chart.js"></script>
-<script src="vendor/d3/d3.js"></script>
-<!-- endbower -->
+
<!-- endjs -->
<!-- inject:js -->
+<script src="/static/js/vendor/xosServiceGridVendor.js"></script>
<script src="/static/js/xosServiceGrid.js"></script>
<!-- endinject -->
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
index 0c7a22a..7ddde03 100644
--- a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
+++ b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
@@ -1,2 +1,2 @@
-"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var n=0,o=Array(e.length);n<e.length;n++)o[n]=e[n];return o}return Array.from(e)}!function(){angular.module("xos.uiComponents",["chart.js","RecursionHelper"])}(),function(){angular.module("xos.uiComponents").directive("xosForm",function(){return{restrict:"E",scope:{config:"=",ngModel:"="},template:'\n <form name="vm.{{vm.config.formName || \'form\'}}" novalidate>\n <div class="form-group" ng-repeat="(name, field) in vm.formField">\n <xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>\n <xos-validation field="vm[vm.config.formName || \'form\'][name]" form = "vm[vm.config.formName || \'form\']"></xos-validation>\n <div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>\n </div>\n <div class="form-group" ng-if="vm.config.actions">\n <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>\n\n <button role="button" href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(vm.ngModel, vm[vm.config.formName || \'form\'])"\n class="btn btn-{{action.class}}"\n title="{{action.label}}">\n <i class="glyphicon glyphicon-{{action.icon}}"></i>\n {{action.label}}\n </button>\n </div>\n </form>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope","$log","_","XosFormHelpers",function(e,n,o,i){var t=this;if(!this.config)throw new Error('[xosForm] Please provide a configuration via the "config" attribute');if(!this.config.actions)throw new Error("[xosForm] Please provide an action list in the configuration");this.config.feedback||(this.config.feedback={show:!1,message:"Form submitted successfully !!!",type:"success"}),this.excludedField=["id","validators","created","updated","deleted","backend_status"],this.config&&this.config.exclude&&(this.excludedField=this.excludedField.concat(this.config.exclude)),this.formField=[],e.$watch(function(){return t.config},function(){if(t.ngModel){var e=o.difference(Object.keys(t.ngModel),t.excludedField),n=i.parseModelField(e);t.formField=i.buildFormStructure(n,t.config.fields,t.ngModel)}},!0),e.$watch(function(){return t.ngModel},function(e){if(t.formField={},e){var n=o.difference(Object.keys(e),t.excludedField),r=i.parseModelField(n);t.formField=i.buildFormStructure(r,t.config.fields,e)}})}]}})}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){angular.module("xos.uiComponents").directive("xosSmartTable",function(){return{restrict:"E",scope:{config:"="},template:'\n <div class="row" ng-show="vm.data.length > 0">\n <div class="col-xs-12 text-right">\n <a href="" class="btn btn-success" ng-click="vm.createItem()">\n Add\n </a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-12 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.data"></xos-table>\n </div>\n </div>\n <div class="panel panel-default" ng-show="vm.detailedItem">\n <div class="panel-heading">\n <div class="row">\n <div class="col-xs-11">\n <h3 class="panel-title" ng-show="vm.detailedItem.id">Update {{vm.config.resource}} {{vm.detailedItem.id}}</h3>\n <h3 class="panel-title" ng-show="!vm.detailedItem.id">Create {{vm.config.resource}} item</h3>\n </div>\n <div class="col-xs-1">\n <a href="" ng-click="vm.cleanForm()">\n <i class="glyphicon glyphicon-remove pull-right"></i>\n </a>\n </div>\n </div>\n </div>\n <div class="panel-body">\n <xos-form config="vm.formConfig" ng-model="vm.detailedItem"></xos-form>\n </div>\n </div>\n <xos-alert config="{type: \'success\', closeBtn: true}" show="vm.responseMsg">{{vm.responseMsg}}</xos-alert>\n <xos-alert config="{type: \'danger\', closeBtn: true}" show="vm.responseErr">{{vm.responseErr}}</xos-alert>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","LabelFormatter","_","XosFormHelpers",function(e,n,o,i){var t=this;this.responseMsg=!1,this.responseErr=!1,this.tableConfig={columns:[],actions:[{label:"delete",icon:"remove",cb:function(e){t.Resource["delete"]({id:e.id}).$promise.then(function(){o.remove(t.data,function(n){return n.id===e.id}),t.responseMsg=t.config.resource+" with id "+e.id+" successfully deleted"})["catch"](function(n){t.responseErr=n.data.detail||"Error while deleting "+t.config.resource+" with id "+e.id})},color:"red"},{label:"details",icon:"search",cb:function(e){t.detailedItem=e}}],classes:"table table-striped table-bordered table-responsive",filter:"field",order:!0,pagination:{pageSize:10}},this.formConfig={exclude:this.config.hiddenFields,fields:{},formName:this.config.resource+"Form",actions:[{label:"Save",icon:"ok",cb:function(e){var n=void 0,o=!0;e.id?(n=e.$update(),o=!1):n=e.$save(),n.then(function(n){o&&t.data.push(angular.copy(n)),delete t.detailedItem,t.responseMsg=t.config.resource+" with id "+e.id+" successfully saved"})["catch"](function(n){t.responseErr=n.data.detail||"Error while saving "+t.config.resource+" with id "+e.id})},"class":"success"}]},this.cleanForm=function(){delete t.detailedItem},this.createItem=function(){t.detailedItem=new t.Resource},this.Resource=e.get(this.config.resource);var r=function(){t.Resource.query().$promise.then(function(e){if(!e[0])return void(t.data=e);var r=e[0],a=Object.keys(r);o.remove(a,function(e){return"id"===e||"validators"===e}),angular.isArray(t.config.hiddenFields)&&(a=o.difference(a,t.config.hiddenFields));var s=a.map(function(e){return n.format(e)});a.forEach(function(e,n){var o={label:s[n],prop:e};angular.isString(r[e])&&"undefined"!=typeof r[e]&&(o.type=_typeof(r[e])),t.tableConfig.columns.push(o)}),a.forEach(function(e,o){t.formConfig.fields[e]={label:n.format(s[o]).replace(":",""),type:i._getFieldFormat(r[e])}}),t.data=e})};r()}]}})}(),function(){angular.module("xos.uiComponents").directive("xosValidation",function(){return{restrict:"E",scope:{field:"=",form:"="},template:'\n <div ng-cloak>\n <xos-alert config="vm.config" show="vm.field.$error.required !== undefined && vm.field.$error.required !== false && (vm.field.$touched || vm.form.$submitted)">\n Field required\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.email !== undefined && vm.field.$error.email !== false && (vm.field.$touched || vm.form.$submitted)">\n This is not a valid email\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.minlength !== undefined && vm.field.$error.minlength !== false && (vm.field.$touched || vm.form.$submitted)">\n Too short\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.maxlength !== undefined && vm.field.$error.maxlength !== false && (vm.field.$touched || vm.form.$submitted)">\n Too long\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.custom !== undefined && vm.field.$error.custom !== false && (vm.field.$touched || vm.form.$submitted)">\n Field invalid\n </xos-alert>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:function(){this.config={type:"danger"}}}})}(),function(){angular.module("xos.uiComponents").directive("xosSmartPie",function(){return{restrict:"E",scope:{config:"="},template:'\n <canvas\n class="chart chart-pie {{vm.config.classes}}"\n chart-data="vm.data" chart-labels="vm.labels"\n chart-legend="{{vm.config.legend}}">\n </canvas>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","$interval","$scope","$timeout","_",function(e,n,o,i,t){var r=this;if(!this.config.resource&&!this.config.data)throw new Error("[xosSmartPie] Please provide a resource or an array of data in the configuration");var a=function(e){return t.groupBy(e,r.config.groupBy)},s=function(e){return t.reduce(Object.keys(e),function(n,o){return n.concat(e[o].length)},[])},l=function(e){return angular.isFunction(r.config.labelFormatter)?r.config.labelFormatter(Object.keys(e)):Object.keys(e)},c=function(e){var n=a(e);r.data=s(n),r.labels=l(n)};this.config.resource?!function(){r.Resource=e.get(r.config.resource);var o=function(){r.Resource.query().$promise.then(function(e){e[0]&&c(e)})};o(),r.config.poll&&n(function(){o()},1e3*r.config.poll)}():o.$watch(function(){return r.config.data},function(e){e&&c(r.config.data)},!0),o.$on("create",function(e,n){console.log("create: "+n.id)}),o.$on("destroy",function(e,n){console.log("destroy: "+n.id)})}]}})}(),function(){angular.module("xos.uiComponents").directive("xosTable",function(){return{restrict:"E",scope:{data:"=",config:"="},template:'\n <div ng-show="vm.data.length > 0 && vm.loader == false">\n <div class="row" ng-if="vm.config.filter == \'fulltext\'">\n <div class="col-xs-12">\n <input\n class="form-control"\n placeholder="Type to search.."\n type="text"\n ng-model="vm.query"/>\n </div>\n </div>\n <table ng-class="vm.classes" ng-hide="vm.data.length == 0">\n <thead>\n <tr>\n <th ng-repeat="col in vm.columns">\n {{col.label}}\n <span ng-if="vm.config.order">\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = false">\n <i class="glyphicon glyphicon-chevron-up"></i>\n </a>\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = true">\n <i class="glyphicon glyphicon-chevron-down"></i>\n </a>\n </span>\n </th>\n <th ng-if="vm.config.actions">Actions:</th>\n </tr>\n </thead>\n <tbody ng-if="vm.config.filter == \'field\'">\n <tr>\n <td ng-repeat="col in vm.columns">\n <input\n ng-if="col.type !== \'boolean\' && col.type !== \'array\' && col.type !== \'object\' && col.type !== \'custom\'"\n class="form-control"\n placeholder="Type to search by {{col.label}}"\n type="text"\n ng-model="vm.query[col.prop]"/>\n <select\n ng-if="col.type === \'boolean\'"\n class="form-control"\n ng-model="vm.query[col.prop]">\n <option value="">-</option>\n <option value="true">True</option>\n <option value="false">False</option>\n </select>\n </td>\n <td ng-if="vm.config.actions"></td>\n </tr>\n </tbody>\n <tbody>\n <tr ng-repeat="item in vm.data | filter:vm.query:vm.comparator | orderBy:vm.orderBy:vm.reverse | pagination:vm.currentPage * vm.config.pagination.pageSize | limitTo: (vm.config.pagination.pageSize || vm.data.length) track by $index">\n <td ng-repeat="col in vm.columns" xos-link-wrapper>\n <span ng-if="!col.type">{{item[col.prop]}}</span>\n <span ng-if="col.type === \'boolean\'">\n <i class="glyphicon"\n ng-class="{\'glyphicon-ok\': item[col.prop], \'glyphicon-remove\': !item[col.prop]}">\n </i>\n </span>\n <span ng-if="col.type === \'date\'">\n {{item[col.prop] | date:\'H:mm MMM d, yyyy\'}}\n </span>\n <span ng-if="col.type === \'array\'">\n {{item[col.prop] | arrayToList}}\n </span>\n <span ng-if="col.type === \'object\'">\n <dl class="dl-horizontal">\n <span ng-repeat="(k,v) in item[col.prop]">\n <dt>{{k}}</dt>\n <dd>{{v}}</dd>\n </span>\n </dl>\n </span>\n <span ng-if="col.type === \'custom\'">\n {{col.formatter(item)}}\n </span>\n <span ng-if="col.type === \'icon\'">\n <i class="glyphicon glyphicon-{{col.formatter(item)}}">\n </i>\n </span>\n </td>\n <td ng-if="vm.config.actions">\n <a href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(item)"\n title="{{action.label}}">\n <i\n class="glyphicon glyphicon-{{action.icon}}"\n style="color: {{action.color}};"></i>\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <xos-pagination\n ng-if="vm.config.pagination"\n page-size="vm.config.pagination.pageSize"\n total-elements="vm.data.length"\n change="vm.goToPage">\n </xos-pagination>\n </div>\n <div ng-show="(vm.data.length == 0 || !vm.data) && vm.loader == false">\n <xos-alert config="{type: \'info\'}">\n No data to show.\n </xos-alert>\n </div>\n <div ng-show="vm.loader == true">\n <div class="loader"></div>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["_","$scope","Comparator",function(e,n,o){var i=this;if(this.comparator=o,this.loader=!0,n.$watch(function(){return i.data},function(e){angular.isDefined(e)&&(i.loader=!1)}),!this.config)throw new Error('[xosTable] Please provide a configuration via the "config" attribute');if(!this.config.columns)throw new Error("[xosTable] Please provide a columns list in the configuration");this.config.order&&angular.isObject(this.config.order)&&(this.reverse=this.config.order.reverse||!1,this.orderBy=this.config.order.field||"id");var t=e.filter(this.config.columns,{type:"custom"});angular.isArray(t)&&t.length>0&&e.forEach(t,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided a custom field type, a formatter function should provided too.")});var r=e.filter(this.config.columns,{type:"icon"});angular.isArray(r)&&r.length>0&&e.forEach(r,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided an icon field type, a formatter function should provided too.")});var a=e.filter(this.config.columns,function(e){return angular.isDefined(e.link)});angular.isArray(a)&&a.length>0&&e.forEach(a,function(e){if(!angular.isFunction(e.link))throw new Error("[xosTable] The link property should be a function.")}),this.columns=this.config.columns,this.classes=this.config.classes||"table table-striped table-bordered",this.config.actions,this.config.pagination&&(this.currentPage=0,this.goToPage=function(e){i.currentPage=e})}]}}).filter("arrayToList",function(){return function(e){return angular.isArray(e)?e.join(", "):e}}).directive("xosLinkWrapper",function(){return{restrict:"A",transclude:!0,template:'\n <a ng-if="col.link" href="{{col.link(item)}}">\n <div ng-transclude></div>\n </a>\n <div ng-transclude ng-if="!col.link"></div>\n '}})}(),function(){angular.module("xos.uiComponents").directive("xosPagination",function(){return{restrict:"E",scope:{pageSize:"=",totalElements:"=",change:"="},template:'\n <div class="row" ng-if="vm.pageList.length > 1">\n <div class="col-xs-12 text-center">\n <ul class="pagination">\n <li\n ng-click="vm.goToPage(vm.currentPage - 1)"\n ng-class="{disabled: vm.currentPage == 0}">\n <a href="" aria-label="Previous">\n <span aria-hidden="true">«</span>\n </a>\n </li>\n <li ng-repeat="i in vm.pageList" ng-class="{active: i === vm.currentPage}">\n <a href="" ng-click="vm.goToPage(i)">{{i + 1}}</a>\n </li>\n <li\n ng-click="vm.goToPage(vm.currentPage + 1)"\n ng-class="{disabled: vm.currentPage == vm.pages - 1}">\n <a href="" aria-label="Next">\n <span aria-hidden="true">»</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope",function(e){var n=this;this.currentPage=0,this.goToPage=function(e){0>e||e===n.pages||(n.currentPage=e,n.change(e))},this.createPages=function(e){for(var n=[],o=0;e>o;o++)n.push(o);return n},e.$watch(function(){return n.totalElements},function(){n.totalElements&&(n.pages=Math.ceil(n.totalElements/n.pageSize),n.pageList=n.createPages(n.pages))})}]}}).filter("pagination",function(){return function(e,n){return e&&angular.isArray(e)?(n=parseInt(n,10),e.slice(n)):e}})}(),function(){angular.module("xos.uiComponents").directive("xosField",["RecursionHelper",function(e){return{restrict:"E",scope:{name:"=",field:"=",ngModel:"="},template:'\n <label ng-if="vm.field.type !== \'object\'">{{vm.field.label}}</label>\n <input\n xos-custom-validator custom-validator="vm.field.validators.custom || null"\n ng-if="vm.field.type !== \'boolean\' && vm.field.type !== \'object\' && vm.field.type !== \'select\'"\n type="{{vm.field.type}}"\n name="{{vm.name}}"\n class="form-control"\n ng-model="vm.ngModel"\n ng-minlength="vm.field.validators.minlength || 0"\n ng-maxlength="vm.field.validators.maxlength || 2000"\n ng-required="vm.field.validators.required || false" />\n <select class="form-control" ng-if ="vm.field.type === \'select\'"\n name = "{{vm.name}}"\n ng-options="item.id as item.label for item in vm.field.options"\n ng-model="vm.ngModel"\n ng-required="vm.field.validators.required || false">\n </select>\n <span class="boolean-field" ng-if="vm.field.type === \'boolean\'">\n <a href="#"\n class="btn btn-success"\n ng-show="vm.ngModel"\n ng-click="vm.ngModel = false">\n <i class="glyphicon glyphicon-ok"></i>\n </a>\n <a href="#"\n class="btn btn-danger"\n ng-show="!vm.ngModel"\n ng-click="vm.ngModel = true">\n <i class="glyphicon glyphicon-remove"></i>\n </a>\n </span>\n <div\n class="panel panel-default object-field"\n ng-if="vm.field.type == \'object\' && (!vm.isEmptyObject(vm.ngModel) || !vm.isEmptyObject(vm.field.properties))"\n >\n <div class="panel-heading">{{vm.field.label}}</div>\n <div class="panel-body">\n <div ng-if="!vm.field.properties" ng-repeat="(k, v) in vm.ngModel">\n <xos-field\n name="k"\n field="{label: vm.formatLabel(k), type: vm.getType(v)}"\n ng-model="v">\n </xos-field>\n </div>\n <div ng-if="vm.field.properties" ng-repeat="(k, v) in vm.field.properties">\n <xos-field\n name="k"\n field="{\n label: v.label || vm.formatLabel(k),\n type: v.type,\n validators: v.validators\n }"\n ng-model="vm.ngModel[k]">\n </xos-field>\n </div>\n </div>\n </div>\n ',bindToController:!0,controllerAs:"vm",compile:function(n){return e.compile(n)},controller:["$attrs","XosFormHelpers","LabelFormatter",function(e,n,o){if(!this.name)throw new Error("[xosField] Please provide a field name");if(!this.field)throw new Error("[xosField] Please provide a field definition");if(!this.field.type)throw new Error("[xosField] Please provide a type in the field definition");if(!e.ngModel)throw new Error("[xosField] Please provide an ng-model");this.getType=n._getFieldFormat,this.formatLabel=o.format,this.isEmptyObject=function(e){return e?0===Object.keys(e).length:!0}}]}}]).directive("xosCustomValidator",function(){return{restrict:"A",scope:{fn:"=customValidator"},require:"ngModel",link:function(e,n,o,i){function t(n){var o=e.fn(n);return angular.isArray(o)?i.$setValidity.apply(i,_toConsumableArray(o)):i.$setValidity("customValidation",o),n}angular.isFunction(e.fn)&&i.$parsers.push(t)}}})}(),function(){angular.module("xos.uiComponents").directive("xosAlert",function(){return{restrict:"E",scope:{config:"=",show:"=?"},template:'\n <div ng-cloak class="alert alert-{{vm.config.type}}" ng-hide="!vm.show">\n <button type="button" class="close" ng-if="vm.config.closeBtn" ng-click="vm.dismiss()">\n <span aria-hidden="true">×</span>\n </button>\n <p ng-transclude></p>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:["$timeout",function(e){var n=this;if(!this.config)throw new Error('[xosAlert] Please provide a configuration via the "config" attribute');this.show=this.show!==!1,this.dismiss=function(){n.show=!1},this.config.autoHide&&!function(){var o=e(function(){n.dismiss(),e.cancel(o)},n.config.autoHide)}()}]}})}(),function(){function e(){var e=function(e){return e.split("_").join(" ").trim()},n=function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()}).join(" ")},o=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)},i=function(i){return i=e(i),i=n(i),i=o(i).replace(/\s\s+/g," ")+":",i.replace("::",":")};return{_formatByUnderscore:e,_formatByUppercase:n,_capitalize:o,format:i}}angular.module("xos.uiComponents").factory("LabelFormatter",e)}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){angular.module("xos.uiComponents").service("XosFormHelpers",["_","LabelFormatter",function(e,n){var o=this;this._isEmail=function(e){var n=/(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;return n.test(e)},this._getFieldFormat=function(n){return angular.isArray(n)?"array":e.isDate(n)||!Number.isNaN(Date.parse(n))&&new Date(n).getTime()>6311808e5?"date":"boolean"==typeof n?"boolean":o._isEmail(n)?"email":angular.isString(n)||null===n?"text":"undefined"==typeof n?"undefined":_typeof(n)},this.buildFormStructure=function(i,t,r){return i=angular.extend(i,t),t=t||{},e.reduce(Object.keys(i),function(e,i){return e[i]={label:t[i]&&t[i].label?t[i].label+":":n.format(i),type:t[i]&&t[i].type?t[i].type:o._getFieldFormat(r[i]),validators:t[i]&&t[i].validators?t[i].validators:{},hint:t[i]&&t[i].hint?t[i].hint:""},t[i]&&t[i].options&&(e[i].options=t[i].options),t[i]&&t[i].properties&&(e[i].properties=t[i].properties),"date"===e[i].type&&(r[i]=new Date(r[i])),"number"===e[i].type&&(r[i]=parseInt(r[i],10)),e},{})},this.parseModelField=function(n){return e.reduce(n,function(e,n){return e[n]={},e},{})}}])}(),function(){function e(){return function(e,n){if(angular.isUndefined(e))return!1;if(null===e||null===n)return e===n;if(angular.isObject(n)||angular.isObject(e))return angular.equals(n,e);if(_.isBoolean(e)||_.isBoolean(n))return 0!==e&&1!==e||(e=!!e),angular.equals(n,e);if(!angular.isString(e)||!angular.isString(n)){if(!angular.isDefined(e.toString)||!angular.isDefined(n.toString))return e===n;e=e.toString(),n=n.toString()}return e=e.toLowerCase()+"",n=n.toLowerCase()+"",-1!==e.indexOf(n)}}angular.module("xos.uiComponents").factory("Comparator",e)}(),function(){function e(e,n,o){e.interceptors.push("SetCSRFToken"),n.startSymbol("{$"),n.endSymbol("$}"),o.defaults.stripTrailingSlashes=!1}e.$inject=["$httpProvider","$interpolateProvider","$resourceProvider"],angular.module("xos.helpers",["ngCookies","ngResource","ngAnimate","xos.uiComponents"]).config(e).factory("_",["$window",function(e){return e._}])}(),function(){angular.module("xos.helpers").service("vSG-Collection",["$resource",function(e){return e("/api/service/vsg/")}])}(),function(){angular.module("xos.helpers").service("vOLT-Collection",["$resource",function(e){return e("/api/tenant/cord/volt/:volt_id/",{volt_id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Login",["$resource",function(e){return e("/api/utility/login/")}]).service("Logout",["$resource",function(e){return e("/api/utility/logout/")}])}(),function(){angular.module("xos.helpers").service("Users",["$resource",function(e){return e("/api/core/users/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Truckroll",["$resource",function(e){return e("/api/tenant/truckroll/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Tenants",["$resource",function(e){return e("/api/core/tenants/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Subscribers",["$resource",function(e){return e("/api/tenant/cord/subscriber/:id/",{id:"@id"},{update:{method:"PUT"},"View-a-Subscriber-Features-Detail":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/"},"Read-Subscriber-uplink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Update-Subscriber-uplink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Read-Subscriber-downlink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Update-Subscriber-downlink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Read-Subscriber-cdn":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Update-Subscriber-cdn":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Read-Subscriber-uverse":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Update-Subscriber-uverse":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Read-Subscriber-status":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"},"Update-Subscriber-status":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"}})}])}(),function(){angular.module("xos.helpers").service("SlicesPlus",["$http","$q",function(e,n){this.query=function(o){var i=n.defer();return e.get("/api/utility/slicesplus/",{params:o}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e.data)}),{$promise:i.promise}},this.get=function(o,i){var t=n.defer();return e.get("/api/utility/slicesplus/"+o,{params:i}).then(function(e){t.resolve(e.data)})["catch"](function(e){t.reject(e.data)}),{$promise:t.promise}}}])}(),function(){angular.module("xos.helpers").service("Slices",["$resource",function(e){return e("/api/core/slices/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Sites",["$resource",function(e){return e("/api/core/sites/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Services",["$resource",function(e){return e("/api/core/services/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("ONOS-Services-Collection",["$resource",function(e){return e("/api/service/onos/")}])}(),function(){angular.module("xos.helpers").service("ONOS-App-Collection",["$resource",function(e){return e("/api/tenant/onos/app/")}])}(),function(){angular.module("xos.helpers").service("Nodes",["$resource",function(e){return e("/api/core/nodes/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Networkstemplates",["$resource",function(e){return e("/api/core/networktemplates/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Networks",["$resource",function(e){return e("/api/core/networks/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Instances",["$resource",function(e){return e("/api/core/instances/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Images",["$resource",function(e){return e("/api/core/images/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Flavors",["$resource",function(e){return e("/api/core/flavors/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Example-Services-Collection",["$resource",function(e){return e("/api/service/exampleservice/")}])}(),function(){angular.module("xos.helpers").service("Deployments",["$resource",function(e){return e("/api/core/deployments/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("XosUserPrefs",["$cookies",function(e){var n=this,o=e.get("xosUserPrefs")?angular.fromJson(e.get("xosUserPrefs")):{};this.getAll=function(){return o=e.get("xosUserPrefs")?angular.fromJson(e.get("xosUserPrefs")):{}},this.setAll=function(n){e.put("xosUserPrefs",angular.toJson(n))},this.getSynchronizerNotificationStatus=function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];return e?n.getAll().synchronizers.notification[e]:n.getAll().synchronizers.notification},this.setSynchronizerNotificationStatus=function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],o=arguments[1];if(!e)throw new Error("[XosUserPrefs] When updating a synchronizer is mandatory to provide a name.");var i=n.getAll();i.synchronizers||(i.synchronizers={notification:{}}),i.synchronizers.notification[e]=o,n.setAll(i)}}])}(),function(){angular.module("xos.helpers").service("GraphService",["$q","Tenants","Services",function(e,n,o){var i=this;this.loadCoarseData=function(){var i=void 0,t=e.defer();return o.query().$promise.then(function(e){return i=e,n.query({kind:"coarse"}).$promise}).then(function(e){t.resolve({tenants:e,services:i})}),t.promise},this.getCoarseGraph=function(){return i.loadCoarseData().then(function(e){console.log(e)}),"ciao"}}])}(),function(){angular.module("xos.helpers").factory("Notification",function(){return window.Notification}).service("xosNotification",["$q","$log","Notification",function(e,n,o){var i=this;this.checkPermission=function(){var n=e.defer();return o.requestPermission().then(function(e){"granted"===e?n.resolve(e):n.reject(e)}),n.promise},this.sendNotification=function(e,i){var t=new o(e,i);t.onerror=function(e){n.error(e)}},this.notify=function(e,t){
+"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var n=0,o=Array(e.length);n<e.length;n++)o[n]=e[n];return o}return Array.from(e)}!function(){angular.module("xos.uiComponents",["chart.js","RecursionHelper"])}(),function(){function e(){var e=function(e){return e.split("_").join(" ").trim()},n=function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()}).join(" ")},o=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)},i=function(i){return i=e(i),i=n(i),i=o(i).replace(/\s\s+/g," ")+":",i.replace("::",":")};return{_formatByUnderscore:e,_formatByUppercase:n,_capitalize:o,format:i}}angular.module("xos.uiComponents").factory("LabelFormatter",e)}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){angular.module("xos.uiComponents").service("XosFormHelpers",["_","LabelFormatter",function(e,n){var o=this;this._isEmail=function(e){var n=/(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;return n.test(e)},this._getFieldFormat=function(n){return angular.isArray(n)?"array":e.isDate(n)||!Number.isNaN(Date.parse(n))&&new Date(n).getTime()>6311808e5?"date":"boolean"==typeof n?"boolean":o._isEmail(n)?"email":angular.isString(n)||null===n?"text":"undefined"==typeof n?"undefined":_typeof(n)},this.buildFormStructure=function(i,t,r){return i=angular.extend(i,t),t=t||{},e.reduce(Object.keys(i),function(e,i){return e[i]={label:t[i]&&t[i].label?t[i].label+":":n.format(i),type:t[i]&&t[i].type?t[i].type:o._getFieldFormat(r[i]),validators:t[i]&&t[i].validators?t[i].validators:{},hint:t[i]&&t[i].hint?t[i].hint:""},t[i]&&t[i].options&&(e[i].options=t[i].options),t[i]&&t[i].properties&&(e[i].properties=t[i].properties),"date"===e[i].type&&(r[i]=new Date(r[i])),"number"===e[i].type&&(r[i]=parseInt(r[i],10)),e},{})},this.parseModelField=function(n){return e.reduce(n,function(e,n){return e[n]={},e},{})}}])}(),function(){function e(){return function(e,n){if(angular.isUndefined(e))return!1;if(null===e||null===n)return e===n;if(angular.isObject(n)||angular.isObject(e))return angular.equals(n,e);if(_.isBoolean(e)||_.isBoolean(n))return 0!==e&&1!==e||(e=!!e),angular.equals(n,e);if(!angular.isString(e)||!angular.isString(n)){if(!angular.isDefined(e.toString)||!angular.isDefined(n.toString))return e===n;e=e.toString(),n=n.toString()}return e=e.toLowerCase()+"",n=n.toLowerCase()+"",-1!==e.indexOf(n)}}angular.module("xos.uiComponents").factory("Comparator",e)}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){angular.module("xos.uiComponents").directive("xosSmartTable",function(){return{restrict:"E",scope:{config:"="},template:'\n <div class="row" ng-show="vm.data.length > 0">\n <div class="col-xs-12 text-right">\n <a href="" class="btn btn-success" ng-click="vm.createItem()">\n Add\n </a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-12 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.data"></xos-table>\n </div>\n </div>\n <div class="panel panel-default" ng-show="vm.detailedItem">\n <div class="panel-heading">\n <div class="row">\n <div class="col-xs-11">\n <h3 class="panel-title" ng-show="vm.detailedItem.id">Update {{vm.config.resource}} {{vm.detailedItem.id}}</h3>\n <h3 class="panel-title" ng-show="!vm.detailedItem.id">Create {{vm.config.resource}} item</h3>\n </div>\n <div class="col-xs-1">\n <a href="" ng-click="vm.cleanForm()">\n <i class="glyphicon glyphicon-remove pull-right"></i>\n </a>\n </div>\n </div>\n </div>\n <div class="panel-body">\n <xos-form config="vm.formConfig" ng-model="vm.detailedItem"></xos-form>\n </div>\n </div>\n <xos-alert config="{type: \'success\', closeBtn: true}" show="vm.responseMsg">{{vm.responseMsg}}</xos-alert>\n <xos-alert config="{type: \'danger\', closeBtn: true}" show="vm.responseErr">{{vm.responseErr}}</xos-alert>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","LabelFormatter","_","XosFormHelpers",function(e,n,o,i){var t=this;this.responseMsg=!1,this.responseErr=!1,this.tableConfig={columns:[],actions:[{label:"delete",icon:"remove",cb:function(e){t.Resource["delete"]({id:e.id}).$promise.then(function(){o.remove(t.data,function(n){return n.id===e.id}),t.responseMsg=t.config.resource+" with id "+e.id+" successfully deleted"})["catch"](function(n){t.responseErr=n.data.detail||"Error while deleting "+t.config.resource+" with id "+e.id})},color:"red"},{label:"details",icon:"search",cb:function(e){t.detailedItem=e}}],classes:"table table-striped table-bordered table-responsive",filter:"field",order:!0,pagination:{pageSize:10}},this.formConfig={exclude:this.config.hiddenFields,fields:{},formName:this.config.resource+"Form",actions:[{label:"Save",icon:"ok",cb:function(e){var n=void 0,o=!0;e.id?(n=e.$update(),o=!1):n=e.$save(),n.then(function(n){o&&t.data.push(angular.copy(n)),delete t.detailedItem,t.responseMsg=t.config.resource+" with id "+e.id+" successfully saved"})["catch"](function(n){t.responseErr=n.data.detail||"Error while saving "+t.config.resource+" with id "+e.id})},"class":"success"}]},this.cleanForm=function(){delete t.detailedItem},this.createItem=function(){t.detailedItem=new t.Resource},this.Resource=e.get(this.config.resource);var r=function(){t.Resource.query().$promise.then(function(e){if(!e[0])return void(t.data=e);var r=e[0],a=Object.keys(r);o.remove(a,function(e){return"id"===e||"validators"===e}),angular.isArray(t.config.hiddenFields)&&(a=o.difference(a,t.config.hiddenFields));var s=a.map(function(e){return n.format(e)});a.forEach(function(e,n){var o={label:s[n],prop:e};angular.isString(r[e])&&"undefined"!=typeof r[e]&&(o.type=_typeof(r[e])),t.tableConfig.columns.push(o)}),a.forEach(function(e,o){t.formConfig.fields[e]={label:n.format(s[o]).replace(":",""),type:i._getFieldFormat(r[e])}}),t.data=e})};r()}]}})}(),function(){angular.module("xos.uiComponents").directive("xosSmartPie",function(){return{restrict:"E",scope:{config:"="},template:'\n <canvas\n class="chart chart-pie {{vm.config.classes}}"\n chart-data="vm.data" chart-labels="vm.labels"\n chart-legend="{{vm.config.legend}}">\n </canvas>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","$interval","$scope","$timeout","_",function(e,n,o,i,t){var r=this;if(!this.config.resource&&!this.config.data)throw new Error("[xosSmartPie] Please provide a resource or an array of data in the configuration");var a=function(e){return t.groupBy(e,r.config.groupBy)},s=function(e){return t.reduce(Object.keys(e),function(n,o){return n.concat(e[o].length)},[])},l=function(e){return angular.isFunction(r.config.labelFormatter)?r.config.labelFormatter(Object.keys(e)):Object.keys(e)},c=function(e){var n=a(e);r.data=s(n),r.labels=l(n)};this.config.resource?!function(){r.Resource=e.get(r.config.resource);var o=function(){r.Resource.query().$promise.then(function(e){e[0]&&c(e)})};o(),r.config.poll&&n(function(){o()},1e3*r.config.poll)}():o.$watch(function(){return r.config.data},function(e){e&&c(r.config.data)},!0),o.$on("create",function(e,n){console.log("create: "+n.id)}),o.$on("destroy",function(e,n){console.log("destroy: "+n.id)})}]}})}(),function(){angular.module("xos.uiComponents").directive("xosValidation",function(){return{restrict:"E",scope:{field:"=",form:"="},template:'\n <div ng-cloak>\n <xos-alert config="vm.config" show="vm.field.$error.required !== undefined && vm.field.$error.required !== false && (vm.field.$touched || vm.form.$submitted)">\n Field required\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.email !== undefined && vm.field.$error.email !== false && (vm.field.$touched || vm.form.$submitted)">\n This is not a valid email\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.minlength !== undefined && vm.field.$error.minlength !== false && (vm.field.$touched || vm.form.$submitted)">\n Too short\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.maxlength !== undefined && vm.field.$error.maxlength !== false && (vm.field.$touched || vm.form.$submitted)">\n Too long\n </xos-alert>\n <xos-alert config="vm.config" show="vm.field.$error.custom !== undefined && vm.field.$error.custom !== false && (vm.field.$touched || vm.form.$submitted)">\n Field invalid\n </xos-alert>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:function(){this.config={type:"danger"}}}})}(),function(){angular.module("xos.uiComponents").directive("xosTable",function(){return{restrict:"E",scope:{data:"=",config:"="},template:'\n <div ng-show="vm.data.length > 0 && vm.loader == false">\n <div class="row" ng-if="vm.config.filter == \'fulltext\'">\n <div class="col-xs-12">\n <input\n class="form-control"\n placeholder="Type to search.."\n type="text"\n ng-model="vm.query"/>\n </div>\n </div>\n <table ng-class="vm.classes" ng-hide="vm.data.length == 0">\n <thead>\n <tr>\n <th ng-repeat="col in vm.columns">\n {{col.label}}\n <span ng-if="vm.config.order">\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = false">\n <i class="glyphicon glyphicon-chevron-up"></i>\n </a>\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = true">\n <i class="glyphicon glyphicon-chevron-down"></i>\n </a>\n </span>\n </th>\n <th ng-if="vm.config.actions">Actions:</th>\n </tr>\n </thead>\n <tbody ng-if="vm.config.filter == \'field\'">\n <tr>\n <td ng-repeat="col in vm.columns">\n <input\n ng-if="col.type !== \'boolean\' && col.type !== \'array\' && col.type !== \'object\' && col.type !== \'custom\'"\n class="form-control"\n placeholder="Type to search by {{col.label}}"\n type="text"\n ng-model="vm.query[col.prop]"/>\n <select\n ng-if="col.type === \'boolean\'"\n class="form-control"\n ng-model="vm.query[col.prop]">\n <option value="">-</option>\n <option value="true">True</option>\n <option value="false">False</option>\n </select>\n </td>\n <td ng-if="vm.config.actions"></td>\n </tr>\n </tbody>\n <tbody>\n <tr ng-repeat="item in vm.data | filter:vm.query:vm.comparator | orderBy:vm.orderBy:vm.reverse | pagination:vm.currentPage * vm.config.pagination.pageSize | limitTo: (vm.config.pagination.pageSize || vm.data.length) track by $index">\n <td ng-repeat="col in vm.columns" xos-link-wrapper>\n <span ng-if="!col.type">{{item[col.prop]}}</span>\n <span ng-if="col.type === \'boolean\'">\n <i class="glyphicon"\n ng-class="{\'glyphicon-ok\': item[col.prop], \'glyphicon-remove\': !item[col.prop]}">\n </i>\n </span>\n <span ng-if="col.type === \'date\'">\n {{item[col.prop] | date:\'H:mm MMM d, yyyy\'}}\n </span>\n <span ng-if="col.type === \'array\'">\n {{item[col.prop] | arrayToList}}\n </span>\n <span ng-if="col.type === \'object\'">\n <dl class="dl-horizontal">\n <span ng-repeat="(k,v) in item[col.prop]">\n <dt>{{k}}</dt>\n <dd>{{v}}</dd>\n </span>\n </dl>\n </span>\n <span ng-if="col.type === \'custom\'">\n {{col.formatter(item)}}\n </span>\n <span ng-if="col.type === \'icon\'">\n <i class="glyphicon glyphicon-{{col.formatter(item)}}">\n </i>\n </span>\n </td>\n <td ng-if="vm.config.actions">\n <a href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(item)"\n title="{{action.label}}">\n <i\n class="glyphicon glyphicon-{{action.icon}}"\n style="color: {{action.color}};"></i>\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <xos-pagination\n ng-if="vm.config.pagination"\n page-size="vm.config.pagination.pageSize"\n total-elements="vm.data.length"\n change="vm.goToPage">\n </xos-pagination>\n </div>\n <div ng-show="(vm.data.length == 0 || !vm.data) && vm.loader == false">\n <xos-alert config="{type: \'info\'}">\n No data to show.\n </xos-alert>\n </div>\n <div ng-show="vm.loader == true">\n <div class="loader"></div>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["_","$scope","Comparator",function(e,n,o){var i=this;if(this.comparator=o,this.loader=!0,n.$watch(function(){return i.data},function(e){angular.isDefined(e)&&(i.loader=!1)}),!this.config)throw new Error('[xosTable] Please provide a configuration via the "config" attribute');if(!this.config.columns)throw new Error("[xosTable] Please provide a columns list in the configuration");this.config.order&&angular.isObject(this.config.order)&&(this.reverse=this.config.order.reverse||!1,this.orderBy=this.config.order.field||"id");var t=e.filter(this.config.columns,{type:"custom"});angular.isArray(t)&&t.length>0&&e.forEach(t,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided a custom field type, a formatter function should provided too.")});var r=e.filter(this.config.columns,{type:"icon"});angular.isArray(r)&&r.length>0&&e.forEach(r,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided an icon field type, a formatter function should provided too.")});var a=e.filter(this.config.columns,function(e){return angular.isDefined(e.link)});angular.isArray(a)&&a.length>0&&e.forEach(a,function(e){if(!angular.isFunction(e.link))throw new Error("[xosTable] The link property should be a function.")}),this.columns=this.config.columns,this.classes=this.config.classes||"table table-striped table-bordered",this.config.actions,this.config.pagination&&(this.currentPage=0,this.goToPage=function(e){i.currentPage=e})}]}}).filter("arrayToList",function(){return function(e){return angular.isArray(e)?e.join(", "):e}}).directive("xosLinkWrapper",function(){return{restrict:"A",transclude:!0,template:'\n <a ng-if="col.link" href="{{col.link(item)}}">\n <div ng-transclude></div>\n </a>\n <div ng-transclude ng-if="!col.link"></div>\n '}})}(),function(){angular.module("xos.uiComponents").directive("xosPagination",function(){return{restrict:"E",scope:{pageSize:"=",totalElements:"=",change:"="},template:'\n <div class="row" ng-if="vm.pageList.length > 1">\n <div class="col-xs-12 text-center">\n <ul class="pagination">\n <li\n ng-click="vm.goToPage(vm.currentPage - 1)"\n ng-class="{disabled: vm.currentPage == 0}">\n <a href="" aria-label="Previous">\n <span aria-hidden="true">«</span>\n </a>\n </li>\n <li ng-repeat="i in vm.pageList" ng-class="{active: i === vm.currentPage}">\n <a href="" ng-click="vm.goToPage(i)">{{i + 1}}</a>\n </li>\n <li\n ng-click="vm.goToPage(vm.currentPage + 1)"\n ng-class="{disabled: vm.currentPage == vm.pages - 1}">\n <a href="" aria-label="Next">\n <span aria-hidden="true">»</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope",function(e){var n=this;this.currentPage=0,this.goToPage=function(e){0>e||e===n.pages||(n.currentPage=e,n.change(e))},this.createPages=function(e){for(var n=[],o=0;e>o;o++)n.push(o);return n},e.$watch(function(){return n.totalElements},function(){n.totalElements&&(n.pages=Math.ceil(n.totalElements/n.pageSize),n.pageList=n.createPages(n.pages))})}]}}).filter("pagination",function(){return function(e,n){return e&&angular.isArray(e)?(n=parseInt(n,10),e.slice(n)):e}})}(),function(){angular.module("xos.uiComponents").directive("xosForm",function(){return{restrict:"E",scope:{config:"=",ngModel:"="},template:'\n <form name="vm.{{vm.config.formName || \'form\'}}" novalidate>\n <div class="form-group" ng-repeat="(name, field) in vm.formField">\n <xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>\n <xos-validation field="vm[vm.config.formName || \'form\'][name]" form = "vm[vm.config.formName || \'form\']"></xos-validation>\n <div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>\n </div>\n <div class="form-group" ng-if="vm.config.actions">\n <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>\n\n <button role="button" href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(vm.ngModel, vm[vm.config.formName || \'form\'])"\n class="btn btn-{{action.class}}"\n title="{{action.label}}">\n <i class="glyphicon glyphicon-{{action.icon}}"></i>\n {{action.label}}\n </button>\n </div>\n </form>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope","$log","_","XosFormHelpers",function(e,n,o,i){var t=this;if(!this.config)throw new Error('[xosForm] Please provide a configuration via the "config" attribute');if(!this.config.actions)throw new Error("[xosForm] Please provide an action list in the configuration");this.config.feedback||(this.config.feedback={show:!1,message:"Form submitted successfully !!!",type:"success"}),this.excludedField=["id","validators","created","updated","deleted","backend_status"],this.config&&this.config.exclude&&(this.excludedField=this.excludedField.concat(this.config.exclude)),this.formField=[],e.$watch(function(){return t.config},function(){if(t.ngModel){var e=o.difference(Object.keys(t.ngModel),t.excludedField),n=i.parseModelField(e);t.formField=i.buildFormStructure(n,t.config.fields,t.ngModel)}},!0),e.$watch(function(){return t.ngModel},function(e){if(t.formField={},e){var n=o.difference(Object.keys(e),t.excludedField),r=i.parseModelField(n);t.formField=i.buildFormStructure(r,t.config.fields,e)}})}]}})}(),function(){angular.module("xos.uiComponents").directive("xosField",["RecursionHelper",function(e){return{restrict:"E",scope:{name:"=",field:"=",ngModel:"="},template:'\n <label ng-if="vm.field.type !== \'object\'">{{vm.field.label}}</label>\n <input\n xos-custom-validator custom-validator="vm.field.validators.custom || null"\n ng-if="vm.field.type !== \'boolean\' && vm.field.type !== \'object\' && vm.field.type !== \'select\'"\n type="{{vm.field.type}}"\n name="{{vm.name}}"\n class="form-control"\n ng-model="vm.ngModel"\n ng-minlength="vm.field.validators.minlength || 0"\n ng-maxlength="vm.field.validators.maxlength || 2000"\n ng-required="vm.field.validators.required || false" />\n <select class="form-control" ng-if ="vm.field.type === \'select\'"\n name = "{{vm.name}}"\n ng-options="item.id as item.label for item in vm.field.options"\n ng-model="vm.ngModel"\n ng-required="vm.field.validators.required || false">\n </select>\n <span class="boolean-field" ng-if="vm.field.type === \'boolean\'">\n <a href="#"\n class="btn btn-success"\n ng-show="vm.ngModel"\n ng-click="vm.ngModel = false">\n <i class="glyphicon glyphicon-ok"></i>\n </a>\n <a href="#"\n class="btn btn-danger"\n ng-show="!vm.ngModel"\n ng-click="vm.ngModel = true">\n <i class="glyphicon glyphicon-remove"></i>\n </a>\n </span>\n <div\n class="panel panel-default object-field"\n ng-if="vm.field.type == \'object\' && (!vm.isEmptyObject(vm.ngModel) || !vm.isEmptyObject(vm.field.properties))"\n >\n <div class="panel-heading">{{vm.field.label}}</div>\n <div class="panel-body">\n <div ng-if="!vm.field.properties" ng-repeat="(k, v) in vm.ngModel">\n <xos-field\n name="k"\n field="{label: vm.formatLabel(k), type: vm.getType(v)}"\n ng-model="v">\n </xos-field>\n </div>\n <div ng-if="vm.field.properties" ng-repeat="(k, v) in vm.field.properties">\n <xos-field\n name="k"\n field="{\n label: v.label || vm.formatLabel(k),\n type: v.type,\n validators: v.validators\n }"\n ng-model="vm.ngModel[k]">\n </xos-field>\n </div>\n </div>\n </div>\n ',bindToController:!0,controllerAs:"vm",compile:function(n){return e.compile(n)},controller:["$attrs","XosFormHelpers","LabelFormatter",function(e,n,o){if(!this.name)throw new Error("[xosField] Please provide a field name");if(!this.field)throw new Error("[xosField] Please provide a field definition");if(!this.field.type)throw new Error("[xosField] Please provide a type in the field definition");if(!e.ngModel)throw new Error("[xosField] Please provide an ng-model");this.getType=n._getFieldFormat,this.formatLabel=o.format,this.isEmptyObject=function(e){return e?0===Object.keys(e).length:!0}}]}}]).directive("xosCustomValidator",function(){return{restrict:"A",scope:{fn:"=customValidator"},require:"ngModel",link:function(e,n,o,i){function t(n){var o=e.fn(n);return angular.isArray(o)?i.$setValidity.apply(i,_toConsumableArray(o)):i.$setValidity("customValidation",o),n}angular.isFunction(e.fn)&&i.$parsers.push(t)}}})}(),function(){angular.module("xos.uiComponents").directive("xosAlert",function(){return{restrict:"E",scope:{config:"=",show:"=?"},template:'\n <div ng-cloak class="alert alert-{{vm.config.type}}" ng-hide="!vm.show">\n <button type="button" class="close" ng-if="vm.config.closeBtn" ng-click="vm.dismiss()">\n <span aria-hidden="true">×</span>\n </button>\n <p ng-transclude></p>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:["$timeout",function(e){var n=this;if(!this.config)throw new Error('[xosAlert] Please provide a configuration via the "config" attribute');this.show=this.show!==!1,this.dismiss=function(){n.show=!1},this.config.autoHide&&!function(){var o=e(function(){n.dismiss(),e.cancel(o)},n.config.autoHide)}()}]}})}(),function(){function e(e,n,o){e.interceptors.push("SetCSRFToken"),n.startSymbol("{$"),n.endSymbol("$}"),o.defaults.stripTrailingSlashes=!1}e.$inject=["$httpProvider","$interpolateProvider","$resourceProvider"],angular.module("xos.helpers",["ngCookies","ngResource","ngAnimate","xos.uiComponents"]).config(e).factory("_",["$window",function(e){return e._}])}(),function(){angular.module("xos.helpers").service("vSG-Collection",["$resource",function(e){return e("/api/service/vsg/")}])}(),function(){angular.module("xos.helpers").service("vOLT-Collection",["$resource",function(e){return e("/api/tenant/cord/volt/:volt_id/",{volt_id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Login",["$resource",function(e){return e("/api/utility/login/")}]).service("Logout",["$resource",function(e){return e("/api/utility/logout/")}])}(),function(){angular.module("xos.helpers").service("Users",["$resource",function(e){return e("/api/core/users/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Truckroll",["$resource",function(e){return e("/api/tenant/truckroll/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Tenants",["$resource",function(e){return e("/api/core/tenants/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Subscribers",["$resource",function(e){return e("/api/tenant/cord/subscriber/:id/",{id:"@id"},{update:{method:"PUT"},"View-a-Subscriber-Features-Detail":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/"},"Read-Subscriber-uplink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Update-Subscriber-uplink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Read-Subscriber-downlink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Update-Subscriber-downlink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Read-Subscriber-cdn":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Update-Subscriber-cdn":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Read-Subscriber-uverse":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Update-Subscriber-uverse":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Read-Subscriber-status":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"},"Update-Subscriber-status":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"}})}])}(),function(){angular.module("xos.helpers").service("SlicesPlus",["$http","$q",function(e,n){this.query=function(o){var i=n.defer();return e.get("/api/utility/slicesplus/",{params:o}).then(function(e){i.resolve(e.data)})["catch"](function(e){i.reject(e.data)}),{$promise:i.promise}},this.get=function(o,i){var t=n.defer();return e.get("/api/utility/slicesplus/"+o,{params:i}).then(function(e){t.resolve(e.data)})["catch"](function(e){t.reject(e.data)}),{$promise:t.promise}}}])}(),function(){angular.module("xos.helpers").service("Slices",["$resource",function(e){return e("/api/core/slices/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Sites",["$resource",function(e){return e("/api/core/sites/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Services",["$resource",function(e){return e("/api/core/services/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("ONOS-Services-Collection",["$resource",function(e){return e("/api/service/onos/")}])}(),function(){angular.module("xos.helpers").service("ONOS-App-Collection",["$resource",function(e){return e("/api/tenant/onos/app/")}])}(),function(){angular.module("xos.helpers").service("Nodes",["$resource",function(e){return e("/api/core/nodes/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Networkstemplates",["$resource",function(e){return e("/api/core/networktemplates/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Networks",["$resource",function(e){return e("/api/core/networks/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Instances",["$resource",function(e){return e("/api/core/instances/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Images",["$resource",function(e){return e("/api/core/images/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Flavors",["$resource",function(e){return e("/api/core/flavors/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Example-Services-Collection",["$resource",function(e){return e("/api/service/exampleservice/")}])}(),function(){angular.module("xos.helpers").service("Deployments",["$resource",function(e){return e("/api/core/deployments/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("XosUserPrefs",["$cookies",function(e){var n=this,o=e.get("xosUserPrefs")?angular.fromJson(e.get("xosUserPrefs")):{};this.getAll=function(){return o=e.get("xosUserPrefs")?angular.fromJson(e.get("xosUserPrefs")):{}},this.setAll=function(n){e.put("xosUserPrefs",angular.toJson(n))},this.getSynchronizerNotificationStatus=function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];return e?n.getAll().synchronizers.notification[e]:n.getAll().synchronizers.notification},this.setSynchronizerNotificationStatus=function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],o=arguments[1];if(!e)throw new Error("[XosUserPrefs] When updating a synchronizer is mandatory to provide a name.");var i=n.getAll();i.synchronizers||(i.synchronizers={notification:{}}),i.synchronizers.notification[e]=o,n.setAll(i)}}])}(),function(){angular.module("xos.helpers").service("GraphService",["$q","Tenants","Services",function(e,n,o){var i=this;this.loadCoarseData=function(){var i=void 0,t=e.defer();return o.query().$promise.then(function(e){return i=e,n.query({kind:"coarse"}).$promise}).then(function(e){t.resolve({tenants:e,services:i})}),t.promise},this.getCoarseGraph=function(){return i.loadCoarseData().then(function(e){console.log(e)}),"ciao"}}])}(),function(){angular.module("xos.helpers").factory("Notification",function(){return window.Notification}).service("xosNotification",["$q","$log","Notification",function(e,n,o){var i=this;this.checkPermission=function(){var n=e.defer();return o.requestPermission().then(function(e){"granted"===e?n.resolve(e):n.reject(e)}),n.promise},this.sendNotification=function(e,i){var t=new o(e,i);t.onerror=function(e){n.error(e)}},this.notify=function(e,t){
"Notification"in window?"granted"!==o.permission?i.checkPermission().then(function(){return i.sendNotification(e,t)}):"granted"===o.permission&&i.sendNotification(e,t):n.info("This browser does not support desktop notification")}}])}(),function(){function e(){return{request:function(e){return-1===e.url.indexOf(".html")&&(e.url+="?no_hyperlinks=1"),e}}}angular.module("xos.helpers").factory("NoHyperlinks",e)}(),angular.module("xos.helpers").config(["$provide",function(e){e.decorator("$log",["$delegate",function(e){var n=function(){return window.location.href.indexOf("debug=true")>=0},o=e.log,i=e.info,t=e.warn,r=e.debug,a=function(o){return function(){if(n()){var i=[].slice.call(arguments),t=new Date;return i[0]="["+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+"] "+i[0],!angular.isFunction(e.reset)||e.debug.logs instanceof Array||e.reset(),o.apply(null,i)}}};return e.info=a(i),e.log=a(o),e.warn=a(t),e.debug=a(r),e}])}]),function(){function e(){var e=function(e){return e.split("_").join(" ").trim()},n=function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()}).join(" ")},o=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)},i=function(i){return i=e(i),i=n(i),i=o(i).replace(/\s\s+/g," ")+":",i.replace("::",":")};return{_formatByUnderscore:e,_formatByUppercase:n,_capitalize:o,format:i}}angular.module("xos.uiComponents").factory("LabelFormatter",e)}(),function(){function e(e){return{request:function(n){return"GET"!==n.method&&(n.headers["X-CSRFToken"]=e.get("xoscsrftoken")),n}}}e.$inject=["$cookies"],angular.module("xos.helpers").factory("SetCSRFToken",e)}();
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/vendor/xosServiceGridVendor.js b/xos/core/xoslib/static/js/vendor/xosServiceGridVendor.js
new file mode 100644
index 0000000..14009a2
--- /dev/null
+++ b/xos/core/xoslib/static/js/vendor/xosServiceGridVendor.js
@@ -0,0 +1,5 @@
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.jsyaml=t()}}(function(){return function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};e[s][0].call(c.exports,function(t){var r=e[s][1][t];return i(r?r:t)},c,c.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";function n(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}var i=t("./js-yaml/loader"),a=t("./js-yaml/dumper");e.exports.Type=t("./js-yaml/type"),e.exports.Schema=t("./js-yaml/schema"),e.exports.FAILSAFE_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.JSON_SCHEMA=t("./js-yaml/schema/json"),e.exports.CORE_SCHEMA=t("./js-yaml/schema/core"),e.exports.DEFAULT_SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_FULL_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=a.dump,e.exports.safeDump=a.safeDump,e.exports.YAMLException=t("./js-yaml/exception"),e.exports.MINIMAL_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.scan=n("scan"),e.exports.parse=n("parse"),e.exports.compose=n("compose"),e.exports.addConstructor=n("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(t,e,r){"use strict";function n(t){return"undefined"==typeof t||null===t}function i(t){return"object"==typeof t&&null!==t}function a(t){return Array.isArray(t)?t:n(t)?[]:[t]}function s(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;n>r;r+=1)i=a[r],t[i]=e[i];return t}function o(t,e){var r,n="";for(r=0;e>r;r+=1)n+=t;return n}function u(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}e.exports.isNothing=n,e.exports.isObject=i,e.exports.toArray=a,e.exports.repeat=o,e.exports.isNegativeZero=u,e.exports.extend=s},{}],3:[function(t,e,r){"use strict";function n(t,e){var r,n,i,a,s,o,u;if(null===e)return{};for(r={},n=Object.keys(e),i=0,a=n.length;a>i;i+=1)s=n[i],o=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),u=t.compiledTypeMap[s],u&&D.call(u.styleAliases,o)&&(o=u.styleAliases[o]),r[s]=o;return r}function i(t){var e,r,n;if(e=t.toString(16).toUpperCase(),255>=t)r="x",n=2;else if(65535>=t)r="u",n=4;else{if(!(4294967295>=t))throw new T("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+z.repeat("0",n-e.length)+e}function a(t){this.schema=t.schema||F,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=z.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=n(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function s(t,e){for(var r,n=z.repeat(" ",e),i=0,a=-1,s="",o=t.length;o>i;)a=t.indexOf("\n",i),-1===a?(r=t.slice(i),i=o):(r=t.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(s+=n),s+=r;return s}function o(t,e){return"\n"+z.repeat(" ",t.indent*e)}function u(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;n>r;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function l(t){return t===L||t===j}function c(t){return t>=32&&126>=t||t>=161&&55295>=t&&8232!==t&&8233!==t||t>=57344&&65533>=t&&65279!==t||t>=65536&&1114111>=t}function f(t){return c(t)&&65279!==t&&t!==G&&t!==$&&t!==Q&&t!==et&&t!==nt&&t!==q&&t!==M}function h(t){return c(t)&&65279!==t&&!l(t)&&t!==K&&t!==X&&t!==q&&t!==G&&t!==$&&t!==Q&&t!==et&&t!==nt&&t!==M&&t!==Z&&t!==Y&&t!==U&&t!==rt&&t!==V&&t!==H&&t!==P&&t!==W&&t!==J&&t!==tt}function d(t,e,r,n,i){var a,s,o=!1,u=!1,d=-1!==n,p=-1,m=h(t.charCodeAt(0))&&!l(t.charCodeAt(t.length-1));if(e)for(a=0;a<t.length;a++){if(s=t.charCodeAt(a),!c(s))return ct;m=m&&f(s)}else{for(a=0;a<t.length;a++){if(s=t.charCodeAt(a),s===R)o=!0,d&&(u=u||a-p-1>n&&" "!==t[p+1],p=a);else if(!c(s))return ct;m=m&&f(s)}u=u||d&&a-p-1>n&&" "!==t[p+1]}return o||u?" "===t[0]&&r>9?ct:u?lt:ut:m&&!i(t)?st:ot}function p(t,e,r,n){t.dump=function(){function i(e){return u(t,e)}if(0===e.length)return"''";if(!t.noCompatMode&&-1!==at.indexOf(e))return"'"+e+"'";var a=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;switch(d(e,l,t.indent,o,i)){case st:return e;case ot:return"'"+e.replace(/'/g,"''")+"'";case ut:return"|"+m(e,t.indent)+g(s(e,a));case lt:return">"+m(e,t.indent)+g(s(_(e,o),a));case ct:return'"'+v(e,o)+'"';default:throw new T("impossible error: invalid scalar style")}}()}function m(t,e){var r=" "===t[0]?String(e):"",n="\n"===t[t.length-1],i=n&&("\n"===t[t.length-2]||"\n"===t),a=i?"+":n?"":"-";return r+a+"\n"}function g(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function _(t,e){for(var r,n,i=/(\n+)([^\n]*)/g,a=function(){var r=t.indexOf("\n");return r=-1!==r?r:t.length,i.lastIndex=r,y(t.slice(0,r),e)}(),s="\n"===t[0]||" "===t[0];n=i.exec(t);){var o=n[1],u=n[2];r=" "===u[0],a+=o+(s||r||""===u?"":"\n")+y(u,e),s=r}return a}function y(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o=0,u="";r=i.exec(t);)o=r.index,o-a>e&&(n=s>a?s:o,u+="\n"+t.slice(a,n),a=n+1),s=o;return u+="\n",u+=t.length-a>e&&s>a?t.slice(a,s)+"\n"+t.slice(s+1):t.slice(a),u.slice(1)}function v(t){for(var e,r,n="",a=0;a<t.length;a++)e=t.charCodeAt(a),r=it[e],n+=!r&&c(e)?t[a]:r||i(e);return n}function w(t,e,r){var n,i,a="",s=t.tag;for(n=0,i=r.length;i>n;n+=1)S(t,e,r[n],!1,!1)&&(0!==n&&(a+=", "),a+=t.dump);t.tag=s,t.dump="["+a+"]"}function b(t,e,r,n){var i,a,s="",u=t.tag;for(i=0,a=r.length;a>i;i+=1)S(t,e+1,r[i],!0,!0)&&(n&&0===i||(s+=o(t,e)),s+="- "+t.dump);t.tag=u,t.dump=s||"[]"}function k(t,e,r){var n,i,a,s,o,u="",l=t.tag,c=Object.keys(r);for(n=0,i=c.length;i>n;n+=1)o="",0!==n&&(o+=", "),a=c[n],s=r[a],S(t,e,a,!1,!1)&&(t.dump.length>1024&&(o+="? "),o+=t.dump+": ",S(t,e,s,!1,!1)&&(o+=t.dump,u+=o));t.tag=l,t.dump="{"+u+"}"}function x(t,e,r,n){var i,a,s,u,l,c,f="",h=t.tag,d=Object.keys(r);if(t.sortKeys===!0)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new T("sortKeys must be a boolean or a function");for(i=0,a=d.length;a>i;i+=1)c="",n&&0===i||(c+=o(t,e)),s=d[i],u=r[s],S(t,e+1,s,!0,!0,!0)&&(l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,l&&(c+=t.dump&&R===t.dump.charCodeAt(0)?"?":"? "),c+=t.dump,l&&(c+=o(t,e)),S(t,e+1,u,!0,l)&&(c+=t.dump&&R===t.dump.charCodeAt(0)?":":": ",c+=t.dump,f+=c));t.tag=h,t.dump=f||"{}"}function A(t,e,r){var n,i,a,s,o,u;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;s>a;a+=1)if(o=i[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||"object"==typeof e&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(t.tag=r?o.tag:"?",o.represent){if(u=t.styleMap[o.tag]||o.defaultStyle,"[object Function]"===N.call(o.represent))n=o.represent(e,u);else{if(!D.call(o.represent,u))throw new T("!<"+o.tag+'> tag resolver accepts not "'+u+'" style');n=o.represent[u](e,u)}t.dump=n}return!0}return!1}function S(t,e,r,n,i,a){t.tag=null,t.dump=r,A(t,r,!1)||A(t,r,!0);var s=N.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var o,u,l="[object Object]"===s||"[object Array]"===s;if(l&&(o=t.duplicates.indexOf(r),u=-1!==o),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[o])t.dump="*ref_"+o;else{if(l&&u&&!t.usedDuplicates[o]&&(t.usedDuplicates[o]=!0),"[object Object]"===s)n&&0!==Object.keys(t.dump).length?(x(t,e,t.dump,i),u&&(t.dump="&ref_"+o+t.dump)):(k(t,e,t.dump),u&&(t.dump="&ref_"+o+" "+t.dump));else if("[object Array]"===s)n&&0!==t.dump.length?(b(t,e,t.dump,i),u&&(t.dump="&ref_"+o+t.dump)):(w(t,e,t.dump),u&&(t.dump="&ref_"+o+" "+t.dump));else{if("[object String]"!==s){if(t.skipInvalid)return!1;throw new T("unacceptable kind of an object to dump "+s)}"?"!==t.tag&&p(t,t.dump,e,a)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function C(t,e){var r,n,i=[],a=[];for(E(t,i,a),r=0,n=a.length;n>r;r+=1)e.duplicates.push(i[a[r]]);e.usedDuplicates=new Array(n)}function E(t,e,r){var n,i,a;if(null!==t&&"object"==typeof t)if(i=e.indexOf(t),-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;a>i;i+=1)E(t[i],e,r);else for(n=Object.keys(t),i=0,a=n.length;a>i;i+=1)E(t[n[i]],e,r)}function I(t,e){e=e||{};var r=new a(e);return r.noRefs||C(t,r),S(r,0,t,!0,!0)?r.dump+"\n":""}function O(t,e){return I(t,z.extend({schema:B},e))}var z=t("./common"),T=t("./exception"),F=t("./schema/default_full"),B=t("./schema/default_safe"),N=Object.prototype.toString,D=Object.prototype.hasOwnProperty,j=9,R=10,L=32,U=33,P=34,M=35,W=37,Z=38,H=39,Y=42,G=44,K=45,q=58,V=62,X=63,J=64,$=91,Q=93,tt=96,et=123,rt=124,nt=125,it={};it[0]="\\0",it[7]="\\a",it[8]="\\b",it[9]="\\t",it[10]="\\n",it[11]="\\v",it[12]="\\f",it[13]="\\r",it[27]="\\e",it[34]='\\"',it[92]="\\\\",it[133]="\\N",it[160]="\\_",it[8232]="\\L",it[8233]="\\P";var at=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],st=1,ot=2,ut=3,lt=4,ct=5;e.exports.dump=I,e.exports.safeDump=O},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(t,e,r){"use strict";function n(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},e.exports=n},{}],5:[function(t,e,r){"use strict";function n(t){return 10===t||13===t}function i(t){return 9===t||32===t}function a(t){return 9===t||32===t||10===t||13===t}function s(t){return 44===t||91===t||93===t||123===t||125===t}function o(t){var e;return t>=48&&57>=t?t-48:(e=32|t,e>=97&&102>=e?e-97+10:-1)}function u(t){return 120===t?2:117===t?4:85===t?8:0}function l(t){return t>=48&&57>=t?t-48:-1}function c(t){return 48===t?"\x00":97===t?"":98===t?"\b":116===t?" ":9===t?" ":110===t?"\n":118===t?"\x0B":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"Â…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function f(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function h(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||H,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(t,e){return new M(e,new W(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function p(t,e){throw d(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,d(t,e))}function g(t,e,r,n){var i,a,s,o;if(r>e){if(o=t.input.slice(e,r),n)for(i=0,a=o.length;a>i;i+=1)s=o.charCodeAt(i),9===s||s>=32&&1114111>=s||p(t,"expected valid JSON character");else Q.test(o)&&p(t,"the stream contains non-printable characters");t.result+=o}}function _(t,e,r,n){var i,a,s,o;for(P.isObject(r)||p(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,o=i.length;o>s;s+=1)a=i[s],Y.call(e,a)||(e[a]=r[a],n[a]=!0)}function y(t,e,r,n,i,a){var s,o;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(s=0,o=a.length;o>s;s+=1)_(t,e,a[s],r);else _(t,e,a,r);else t.json||Y.call(r,i)||!Y.call(e,i)||p(t,"duplicated mapping key"),e[i]=a,delete r[i];return e}function v(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):p(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function w(t,e,r){for(var a=0,s=t.input.charCodeAt(t.position);0!==s;){for(;i(s);)s=t.input.charCodeAt(++t.position);if(e&&35===s)do s=t.input.charCodeAt(++t.position);while(10!==s&&13!==s&&0!==s);if(!n(s))break;for(v(t),s=t.input.charCodeAt(t.position),a++,t.lineIndent=0;32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position)}return-1!==r&&0!==a&&t.lineIndent<r&&m(t,"deficient indentation"),a}function b(t){var e,r=t.position;return e=t.input.charCodeAt(r),(45===e||46===e)&&e===t.input.charCodeAt(r+1)&&e===t.input.charCodeAt(r+2)&&(r+=3,e=t.input.charCodeAt(r),0===e||a(e))}function k(t,e){1===e?t.result+=" ":e>1&&(t.result+=P.repeat("\n",e-1))}function x(t,e,r){var o,u,l,c,f,h,d,p,m,_=t.kind,y=t.result;if(m=t.input.charCodeAt(t.position),a(m)||s(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=t.input.charCodeAt(t.position+1),a(u)||r&&s(u)))return!1;for(t.kind="scalar",t.result="",l=c=t.position,f=!1;0!==m;){if(58===m){if(u=t.input.charCodeAt(t.position+1),a(u)||r&&s(u))break}else if(35===m){if(o=t.input.charCodeAt(t.position-1),a(o))break}else{if(t.position===t.lineStart&&b(t)||r&&s(m))break;if(n(m)){if(h=t.line,d=t.lineStart,p=t.lineIndent,w(t,!1,-1),t.lineIndent>=e){f=!0,m=t.input.charCodeAt(t.position);continue}t.position=c,t.line=h,t.lineStart=d,t.lineIndent=p;break}}f&&(g(t,l,c,!1),k(t,t.line-h),l=c=t.position,f=!1),i(m)||(c=t.position+1),m=t.input.charCodeAt(++t.position)}return g(t,l,c,!1),t.result?!0:(t.kind=_,t.result=y,!1)}function A(t,e){var r,i,a;if(r=t.input.charCodeAt(t.position),39!==r)return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(g(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),39!==r)return!0;i=a=t.position,t.position++}else n(r)?(g(t,i,a,!0),k(t,w(t,!1,e)),i=a=t.position):t.position===t.lineStart&&b(t)?p(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);p(t,"unexpected end of the stream within a single quoted scalar")}function S(t,e){var r,i,a,s,l,c;if(c=t.input.charCodeAt(t.position),34!==c)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(c=t.input.charCodeAt(t.position));){if(34===c)return g(t,r,t.position,!0),t.position++,!0;if(92===c){if(g(t,r,t.position,!0),c=t.input.charCodeAt(++t.position),n(c))w(t,!1,e);else if(256>c&&it[c])t.result+=at[c],t.position++;else if((l=u(c))>0){for(a=l,s=0;a>0;a--)c=t.input.charCodeAt(++t.position),(l=o(c))>=0?s=(s<<4)+l:p(t,"expected hexadecimal character");t.result+=f(s),t.position++}else p(t,"unknown escape sequence");r=i=t.position}else n(c)?(g(t,r,i,!0),k(t,w(t,!1,e)),r=i=t.position):t.position===t.lineStart&&b(t)?p(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}p(t,"unexpected end of the stream within a double quoted scalar")}function C(t,e){var r,n,i,s,o,u,l,c,f,h,d,m=!0,g=t.tag,_=t.anchor,v={};if(d=t.input.charCodeAt(t.position),91===d)s=93,l=!1,n=[];else{if(123!==d)return!1;s=125,l=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),d=t.input.charCodeAt(++t.position);0!==d;){if(w(t,!0,e),d=t.input.charCodeAt(t.position),d===s)return t.position++,t.tag=g,t.anchor=_,t.kind=l?"mapping":"sequence",t.result=n,!0;m||p(t,"missed comma between flow collection entries"),f=c=h=null,o=u=!1,63===d&&(i=t.input.charCodeAt(t.position+1),a(i)&&(o=u=!0,t.position++,w(t,!0,e))),r=t.line,B(t,e,G,!1,!0),f=t.tag,c=t.result,w(t,!0,e),d=t.input.charCodeAt(t.position),!u&&t.line!==r||58!==d||(o=!0,d=t.input.charCodeAt(++t.position),w(t,!0,e),B(t,e,G,!1,!0),h=t.result),l?y(t,n,v,f,c,h):o?n.push(y(t,null,v,f,c,h)):n.push(c),w(t,!0,e),d=t.input.charCodeAt(t.position),44===d?(m=!0,d=t.input.charCodeAt(++t.position)):m=!1}p(t,"unexpected end of the stream within a flow collection")}function E(t,e){var r,a,s,o,u=X,c=!1,f=!1,h=e,d=0,m=!1;if(o=t.input.charCodeAt(t.position),124===o)a=!1;else{if(62!==o)return!1;a=!0}for(t.kind="scalar",t.result="";0!==o;)if(o=t.input.charCodeAt(++t.position),43===o||45===o)X===u?u=43===o?$:J:p(t,"repeat of a chomping mode identifier");else{if(!((s=l(o))>=0))break;0===s?p(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):f?p(t,"repeat of an indentation width identifier"):(h=e+s-1,f=!0)}if(i(o)){do o=t.input.charCodeAt(++t.position);while(i(o));if(35===o)do o=t.input.charCodeAt(++t.position);while(!n(o)&&0!==o)}for(;0!==o;){for(v(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!f||t.lineIndent<h)&&32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position);if(!f&&t.lineIndent>h&&(h=t.lineIndent),n(o))d++;else{if(t.lineIndent<h){u===$?t.result+=P.repeat("\n",c?1+d:d):u===X&&c&&(t.result+="\n");break}for(a?i(o)?(m=!0,t.result+=P.repeat("\n",c?1+d:d)):m?(m=!1,t.result+=P.repeat("\n",d+1)):0===d?c&&(t.result+=" "):t.result+=P.repeat("\n",d):t.result+=P.repeat("\n",c?1+d:d),c=!0,f=!0,d=0,r=t.position;!n(o)&&0!==o;)o=t.input.charCodeAt(++t.position);g(t,r,t.position,!1)}}return!0}function I(t,e){var r,n,i,s=t.tag,o=t.anchor,u=[],l=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),i=t.input.charCodeAt(t.position);0!==i&&45===i&&(n=t.input.charCodeAt(t.position+1),a(n));)if(l=!0,t.position++,w(t,!0,-1)&&t.lineIndent<=e)u.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,B(t,e,q,!1,!0),u.push(t.result),w(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)p(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return l?(t.tag=s,t.anchor=o,t.kind="sequence",t.result=u,!0):!1}function O(t,e,r){var n,s,o,u,l=t.tag,c=t.anchor,f={},h={},d=null,m=null,g=null,_=!1,v=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=f),u=t.input.charCodeAt(t.position);0!==u;){if(n=t.input.charCodeAt(t.position+1),o=t.line,63!==u&&58!==u||!a(n)){if(!B(t,r,K,!1,!0))break;if(t.line===o){for(u=t.input.charCodeAt(t.position);i(u);)u=t.input.charCodeAt(++t.position);if(58===u)u=t.input.charCodeAt(++t.position),a(u)||p(t,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(y(t,f,h,d,m,null),d=m=g=null),v=!0,_=!1,s=!1,d=t.tag,m=t.result;else{if(!v)return t.tag=l,t.anchor=c,!0;p(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=l,t.anchor=c,!0;p(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===u?(_&&(y(t,f,h,d,m,null),d=m=g=null),v=!0,_=!0,s=!0):_?(_=!1,s=!0):p(t,"incomplete explicit mapping pair; a key node is missed"),t.position+=1,u=n;if((t.line===o||t.lineIndent>e)&&(B(t,e,V,!0,s)&&(_?m=t.result:g=t.result),_||(y(t,f,h,d,m,g),d=m=g=null),w(t,!0,-1),u=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==u)p(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return _&&y(t,f,h,d,m,null),v&&(t.tag=l,t.anchor=c,t.kind="mapping",t.result=f),v}function z(t){var e,r,n,i,s=!1,o=!1;if(i=t.input.charCodeAt(t.position),33!==i)return!1;if(null!==t.tag&&p(t,"duplication of a tag property"),i=t.input.charCodeAt(++t.position),60===i?(s=!0,i=t.input.charCodeAt(++t.position)):33===i?(o=!0,r="!!",i=t.input.charCodeAt(++t.position)):r="!",e=t.position,s){do i=t.input.charCodeAt(++t.position);while(0!==i&&62!==i);t.position<t.length?(n=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):p(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!a(i);)33===i&&(o?p(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),rt.test(r)||p(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),et.test(n)&&p(t,"tag suffix cannot contain flow indicator characters")}return n&&!nt.test(n)&&p(t,"tag name cannot contain such characters: "+n),s?t.tag=n:Y.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:p(t,'undeclared tag handle "'+r+'"'),!0}function T(t){var e,r;if(r=t.input.charCodeAt(t.position),38!==r)return!1;for(null!==t.anchor&&p(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!a(r)&&!s(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&p(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function F(t){var e,r,n;if(n=t.input.charCodeAt(t.position),42!==n)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!a(n)&&!s(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&p(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(r)||p(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],w(t,!0,-1),!0}function B(t,e,r,n,i){var a,s,o,u,l,c,f,h,d=1,m=!1,g=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=V===r||q===r,n&&w(t,!0,-1)&&(m=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;z(t)||T(t);)w(t,!0,-1)?(m=!0,o=a,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):o=!1;if(o&&(o=m||i),1!==d&&V!==r||(f=G===r||K===r?e:e+1,h=t.position-t.lineStart,1===d?o&&(I(t,h)||O(t,h,f))||C(t,f)?g=!0:(s&&E(t,f)||A(t,f)||S(t,f)?g=!0:F(t)?(g=!0,null===t.tag&&null===t.anchor||p(t,"alias node should not have any properties")):x(t,f,G===r)&&(g=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===d&&(g=o&&I(t,h))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(u=0,l=t.implicitTypes.length;l>u;u+=1)if(c=t.implicitTypes[u],c.resolve(t.result)){t.result=c.construct(t.result),t.tag=c.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else Y.call(t.typeMap,t.tag)?(c=t.typeMap[t.tag],null!==t.result&&c.kind!==t.kind&&p(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+c.kind+'", not "'+t.kind+'"'),c.resolve(t.result)?(t.result=c.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):p(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):p(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function N(t){var e,r,s,o,u=t.position,l=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(o=t.input.charCodeAt(t.position))&&(w(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(l=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!a(o);)o=t.input.charCodeAt(++t.position);for(r=t.input.slice(e,t.position),s=[],r.length<1&&p(t,"directive name must not be less than one character in length");0!==o;){for(;i(o);)o=t.input.charCodeAt(++t.position);if(35===o){do o=t.input.charCodeAt(++t.position);while(0!==o&&!n(o));break}if(n(o))break;for(e=t.position;0!==o&&!a(o);)o=t.input.charCodeAt(++t.position);s.push(t.input.slice(e,t.position))}0!==o&&v(t),Y.call(ot,r)?ot[r](t,r,s):m(t,'unknown document directive "'+r+'"')}return w(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,w(t,!0,-1)):l&&p(t,"directives end mark is expected"),B(t,t.lineIndent-1,V,!1,!0),w(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(u,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&b(t)?void(46===t.input.charCodeAt(t.position)&&(t.position+=3,w(t,!0,-1))):void(t.position<t.length-1&&p(t,"end of the stream or a document separator is expected"))}function D(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new h(t,e);for(r.input+="\x00";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)N(r);return r.documents}function j(t,e,r){var n,i,a=D(t,r);for(n=0,i=a.length;i>n;n+=1)e(a[n])}function R(t,e){var r=D(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new M("expected a single document in the stream, but found more")}}function L(t,e,r){j(t,e,P.extend({schema:Z},r))}function U(t,e){return R(t,P.extend({schema:Z},e))}for(var P=t("./common"),M=t("./exception"),W=t("./mark"),Z=t("./schema/default_safe"),H=t("./schema/default_full"),Y=Object.prototype.hasOwnProperty,G=1,K=2,q=3,V=4,X=1,J=2,$=3,Q=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,rt=/^(?:!|!!|![a-z\-]+!)$/i,nt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,it=new Array(256),at=new Array(256),st=0;256>st;st++)it[st]=c(st)?1:0,at[st]=c(st);var ot={YAML:function(t,e,r){var n,i,a;null!==t.version&&p(t,"duplication of %YAML directive"),1!==r.length&&p(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),null===n&&p(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&p(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=2>a,1!==a&&2!==a&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,r){var n,i;2!==r.length&&p(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],rt.test(n)||p(t,"ill-formed tag handle (first argument) of the TAG directive"),Y.call(t.tagMap,n)&&p(t,'there is a previously declared suffix for "'+n+'" tag handle'),nt.test(i)||p(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=i}};e.exports.loadAll=j,e.exports.load=R,e.exports.safeLoadAll=L,e.exports.safeLoad=U},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.name=t,this.buffer=e,this.position=r,this.line=n,this.column=i}var i=t("./common");n.prototype.getSnippet=function(t,e){var r,n,a,s,o;if(!this.buffer)return null;for(t=t||4,e=e||75,r="",n=this.position;n>0&&-1==="\x00\r\nÂ…\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(n-=1,this.position-n>e/2-1){r=" ... ",n+=5;break}for(a="",s=this.position;s<this.buffer.length&&-1==="\x00\r\nÂ…\u2028\u2029".indexOf(this.buffer.charAt(s));)if(s+=1,s-this.position>e/2-1){a=" ... ",s-=5;break}return o=this.buffer.slice(n,s),i.repeat(" ",t)+r+o+a+"\n"+i.repeat(" ",t+this.position-n+r.length)+"^"},n.prototype.toString=function(t){var e,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet(),e&&(r+=":\n"+e)),r},e.exports=n},{"./common":2}],7:[function(t,e,r){"use strict";function n(t,e,r){var i=[];return t.include.forEach(function(t){r=n(t,e,r)}),t[e].forEach(function(t){r.forEach(function(e,r){e.tag===t.tag&&i.push(r)}),r.push(t)}),r.filter(function(t,e){return-1===i.indexOf(e)})}function i(){function t(t){n[t.tag]=t}var e,r,n={};for(e=0,r=arguments.length;r>e;e+=1)arguments[e].forEach(t);return n}function a(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=n(this,"implicit",[]),this.compiledExplicit=n(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var s=t("./common"),o=t("./exception"),u=t("./type");a.DEFAULT=null,a.create=function(){var t,e;switch(arguments.length){case 1:t=a.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new o("Wrong number of arguments for Schema.create function")}if(t=s.toArray(t),e=s.toArray(e),!t.every(function(t){return t instanceof a}))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof u}))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:t,explicit:e})},e.exports=a},{"./common":2,"./exception":4,"./type":13}],8:[function(t,e,r){"use strict";var n=t("../schema");e.exports=new n({include:[t("./json")]})},{"../schema":7,"./json":12}],9:[function(t,e,r){"use strict";var n=t("../schema");e.exports=n.DEFAULT=new n({include:[t("./default_safe")],explicit:[t("../type/js/undefined"),t("../type/js/regexp"),t("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(t,e,r){"use strict";var n=t("../schema");e.exports=new n({include:[t("./core")],implicit:[t("../type/timestamp"),t("../type/merge")],explicit:[t("../type/binary"),t("../type/omap"),t("../type/pairs"),t("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(t,e,r){"use strict";var n=t("../schema");e.exports=new n({explicit:[t("../type/str"),t("../type/seq"),t("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(t,e,r){"use strict";var n=t("../schema");e.exports=new n({include:[t("./failsafe")],implicit:[t("../type/null"),t("../type/bool"),t("../type/int"),t("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(t,e,r){"use strict";function n(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function i(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===s.indexOf(e))throw new a('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=n(e.styleAliases||null),-1===o.indexOf(this.kind))throw new a('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var a=t("./exception"),s=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=i},{"./exception":4}],14:[function(t,e,r){"use strict";function n(t){if(null===t)return!1;var e,r,n=0,i=t.length,a=f;for(r=0;i>r;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(0>e)return!1;n+=6}return n%8===0}function i(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=f,s=0,u=[];for(e=0;i>e;e++)e%4===0&&e&&(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,0===r?(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)):18===r?(u.push(s>>10&255),u.push(s>>2&255)):12===r&&u.push(s>>4&255),o?new o(u):u}function a(t){var e,r,n="",i=0,a=t.length,s=f;for(e=0;a>e;e++)e%3===0&&e&&(n+=s[i>>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]),i=(i<<8)+t[e];return r=a%3,0===r?(n+=s[i>>18&63],n+=s[i>>12&63],n+=s[i>>6&63],n+=s[63&i]):2===r?(n+=s[i>>10&63],n+=s[i>>4&63],n+=s[i<<2&63],n+=s[64]):1===r&&(n+=s[i>>2&63],n+=s[i<<4&63],n+=s[64],n+=s[64]),n}function s(t){return o&&o.isBuffer(t)}var o;try{var u=t;o=u("buffer").Buffer;
+}catch(l){}var c=t("../type"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:a})},{"../type":13}],15:[function(t,e,r){"use strict";function n(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function i(t){return"true"===t||"True"===t||"TRUE"===t}function a(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var s=t("../type");e.exports=new s("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:a,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(t,e,r){"use strict";function n(t){return null===t?!1:!!l.test(t)}function i(t){var e,r,n,i;return e=t.replace(/_/g,"").toLowerCase(),r="-"===e[0]?-1:1,i=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),e=0,n=1,i.forEach(function(t){e+=t*n,n*=60}),r*e):r*parseFloat(e,10)}function a(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(t))return"-0.0";return r=t.toString(10),c.test(r)?r.replace("e",".e"):r}function s(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!==0||o.isNegativeZero(t))}var o=t("../common"),u=t("../type"),l=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),c=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:a,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(t,e,r){"use strict";function n(t){return t>=48&&57>=t||t>=65&&70>=t||t>=97&&102>=t}function i(t){return t>=48&&55>=t}function a(t){return t>=48&&57>=t}function s(t){if(null===t)return!1;var e,r=t.length,s=0,o=!1;if(!r)return!1;if(e=t[s],"-"!==e&&"+"!==e||(e=t[++s]),"0"===e){if(s+1===r)return!0;if(e=t[++s],"b"===e){for(s++;r>s;s++)if(e=t[s],"_"!==e){if("0"!==e&&"1"!==e)return!1;o=!0}return o}if("x"===e){for(s++;r>s;s++)if(e=t[s],"_"!==e){if(!n(t.charCodeAt(s)))return!1;o=!0}return o}for(;r>s;s++)if(e=t[s],"_"!==e){if(!i(t.charCodeAt(s)))return!1;o=!0}return o}for(;r>s;s++)if(e=t[s],"_"!==e){if(":"===e)break;if(!a(t.charCodeAt(s)))return!1;o=!0}return o?":"!==e?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(s)):!1}function o(t){var e,r,n=t,i=1,a=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),e=n[0],"-"!==e&&"+"!==e||("-"===e&&(i=-1),n=n.slice(1),e=n[0]),"0"===n?0:"0"===e?"b"===n[1]?i*parseInt(n.slice(2),2):"x"===n[1]?i*parseInt(n,16):i*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(t){a.unshift(parseInt(t,10))}),n=0,r=1,a.forEach(function(t){n+=t*r,r*=60}),i*n):i*parseInt(n,10)}function u(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1===0&&!l.isNegativeZero(t)}var l=t("../common"),c=t("../type");e.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:o,predicate:u,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(t,e,r){"use strict";function n(t){if(null===t)return!1;try{var e="("+t+")",r=o.parse(e,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&"FunctionExpression"===r.body[0].expression.type}catch(n){return!1}}function i(t){var e,r="("+t+")",n=o.parse(r,{range:!0}),i=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(t){i.push(t.name)}),e=n.body[0].expression.body.range,new Function(i,r.slice(e[0]+1,e[1]-1))}function a(t){return t.toString()}function s(t){return"[object Function]"===Object.prototype.toString.call(t)}var o;try{var u=t;o=u("esprima")}catch(l){"undefined"!=typeof window&&(o=window.esprima)}var c=t("../../type");e.exports=new c("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:a})},{"../../type":13}],19:[function(t,e,r){"use strict";function n(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,r=/\/([gim]*)$/.exec(t),n="";if("/"===e[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==e[e.length-n.length-1])return!1}return!0}function i(t){var e=t,r=/\/([gim]*)$/.exec(t),n="";return"/"===e[0]&&(r&&(n=r[1]),e=e.slice(1,e.length-n.length-1)),new RegExp(e,n)}function a(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function s(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var o=t("../../type");e.exports=new o("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:a})},{"../../type":13}],20:[function(t,e,r){"use strict";function n(){return!0}function i(){}function a(){return""}function s(t){return"undefined"==typeof t}var o=t("../../type");e.exports=new o("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:a})},{"../../type":13}],21:[function(t,e,r){"use strict";var n=t("../type");e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},{"../type":13}],22:[function(t,e,r){"use strict";function n(t){return"<<"===t||null===t}var i=t("../type");e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})},{"../type":13}],23:[function(t,e,r){"use strict";function n(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function i(){return null}function a(t){return null===t}var s=t("../type");e.exports=new s("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(t,e,r){"use strict";function n(t){if(null===t)return!0;var e,r,n,i,a,u=[],l=t;for(e=0,r=l.length;r>e;e+=1){if(n=l[e],a=!1,"[object Object]"!==o.call(n))return!1;for(i in n)if(s.call(n,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(t){return null!==t?t:[]}var a=t("../type"),s=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i})},{"../type":13}],25:[function(t,e,r){"use strict";function n(t){if(null===t)return!0;var e,r,n,i,a,o=t;for(a=new Array(o.length),e=0,r=o.length;r>e;e+=1){if(n=o[e],"[object Object]"!==s.call(n))return!1;if(i=Object.keys(n),1!==i.length)return!1;a[e]=[i[0],n[i[0]]]}return!0}function i(t){if(null===t)return[];var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;r>e;e+=1)n=s[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a}var a=t("../type"),s=Object.prototype.toString;e.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:i})},{"../type":13}],26:[function(t,e,r){"use strict";var n=t("../type");e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},{"../type":13}],27:[function(t,e,r){"use strict";function n(t){if(null===t)return!0;var e,r=t;for(e in r)if(s.call(r,e)&&null!==r[e])return!1;return!0}function i(t){return null!==t?t:{}}var a=t("../type"),s=Object.prototype.hasOwnProperty;e.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:i})},{"../type":13}],28:[function(t,e,r){"use strict";var n=t("../type");e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},{"../type":13}],29:[function(t,e,r){"use strict";function n(t){return null===t?!1:null!==o.exec(t)?!0:null!==u.exec(t)}function i(t){var e,r,n,i,a,s,l,c,f,h,d=0,p=null;if(e=o.exec(t),null===e&&(e=u.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(d=e[7].slice(0,3);d.length<3;)d+="0";d=+d}return e[9]&&(c=+e[10],f=+(e[11]||0),p=6e4*(60*c+f),"-"===e[9]&&(p=-p)),h=new Date(Date.UTC(r,n,i,a,s,l,d)),p&&h.setTime(h.getTime()-p),h}function a(t){return t.toISOString()}var s=t("../type"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:a})},{"../type":13}],"/":[function(t,e,r){"use strict";var n=t("./lib/js-yaml.js");e.exports=n},{"./lib/js-yaml.js":1}]},{},[])("/")}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.JSZip=t()}}(function(){var t;return function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,o,u,l,c=[],f=0,h=t.length,d=h,p="string"!==n.getTypeOf(t);f<t.length;)d=h-f,p?(e=t[f++],r=h>f?t[f++]:0,i=h>f?t[f++]:0):(e=t.charCodeAt(f++),r=h>f?t.charCodeAt(f++):0,i=h>f?t.charCodeAt(f++):0),s=e>>2,o=(3&e)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,l=d>2?63&i:64,c.push(a.charAt(s)+a.charAt(o)+a.charAt(u)+a.charAt(l));return c.join("")},r.decode=function(t){var e,r,n,s,o,u,l,c=0,f=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");var h=3*t.length/4;t.charAt(t.length-1)===a.charAt(64)&&h--,t.charAt(t.length-2)===a.charAt(64)&&h--;var d;for(d=i.uint8array?new Uint8Array(h):new Array(h);c<t.length;)s=a.indexOf(t.charAt(c++)),o=a.indexOf(t.charAt(c++)),u=a.indexOf(t.charAt(c++)),l=a.indexOf(t.charAt(c++)),e=s<<2|o>>4,r=(15&o)<<4|u>>2,n=(3&u)<<6|l,d[f++]=e,64!==u&&(d[f++]=r),64!==l&&(d[f++]=n);return d}},{"./support":27,"./utils":29}],2:[function(t,e,r){"use strict";function n(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}var i=t("./external"),a=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");n.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=n},{"./external":6,"./stream/Crc32Probe":22,"./stream/DataLengthProbe":23,"./stream/DataWorker":24}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\x00\x00",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":25}],4:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e[s])];return-1^t}function a(t,e,r,n){var i=o,a=n+r;t=-1^t;for(var s=n;a>s;s++)t=t>>>8^i[255&(t^e.charCodeAt(s))];return-1^t}var s=t("./utils"),o=n();e.exports=function(t,e){if("undefined"==typeof t||!t.length)return 0;var r="string"!==s.getTypeOf(t);return r?i(0|e,t,t.length,0):a(0|e,t,t.length,0)}},{"./utils":29}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n=t("es6-promise").Promise;e.exports={Promise:n}},{"es6-promise":37}],7:[function(t,e,r){"use strict";function n(t,e){o.call(this,"FlateWorker/"+t),this._pako=new a[t]({raw:!0,level:e.level||-1}),this.meta={};var r=this;this._pako.onData=function(t){r.push({data:t,meta:r.meta})}}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),s=t("./utils"),o=t("./stream/GenericWorker"),u=i?"uint8array":"array";r.magic="\b\x00",s.inherits(n,o),n.prototype.processChunk=function(t){this.meta=t.meta,this._pako.push(s.transformTo(u,t.data),!1)},n.prototype.flush=function(){o.prototype.flush.call(this),this._pako.push([],!0)},n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},r.compressWorker=function(t){return new n("Deflate",t)},r.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":25,"./utils":29,pako:38}],8:[function(t,e,r){"use strict";function n(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var i=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),o=t("../crc32"),u=t("../signature"),l=function(t,e){var r,n="";for(r=0;e>r;r++)n+=String.fromCharCode(255&t),t>>>=8;return n},c=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16},f=function(t,e){return 63&(t||0)},h=function(t,e,r,n,a,h){var d,p,m=t.file,g=t.compression,_=h!==s.utf8encode,y=i.transformTo("string",h(m.name)),v=i.transformTo("string",s.utf8encode(m.name)),w=m.comment,b=i.transformTo("string",h(w)),k=i.transformTo("string",s.utf8encode(w)),x=v.length!==m.name.length,A=k.length!==w.length,S="",C="",E="",I=m.dir,O=m.date,z={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(z.crc32=t.crc32,z.compressedSize=t.compressedSize,z.uncompressedSize=t.uncompressedSize);var T=0;e&&(T|=8),_||!x&&!A||(T|=2048);var F=0,B=0;I&&(F|=16),"UNIX"===a?(B=798,F|=c(m.unixPermissions,I)):(B=20,F|=f(m.dosPermissions,I)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(C=l(1,1)+l(o(y),4)+v,S+="up"+l(C.length,2)+C),A&&(E=l(1,1)+l(o(b),4)+k,S+="uc"+l(E.length,2)+E);var N="";N+="\n\x00",N+=l(T,2),N+=g.magic,N+=l(d,2),N+=l(p,2),N+=l(z.crc32,4),N+=l(z.compressedSize,4),N+=l(z.uncompressedSize,4),N+=l(y.length,2),N+=l(S.length,2);var D=u.LOCAL_FILE_HEADER+N+y+S,j=u.CENTRAL_FILE_HEADER+l(B,2)+N+l(b.length,2)+"\x00\x00\x00\x00"+l(F,4)+l(n,4)+y+S+b;return{fileRecord:D,dirRecord:j}},d=function(t,e,r,n,a){var s="",o=i.transformTo("string",a(n));return s=u.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+l(t,2)+l(t,2)+l(e,4)+l(r,4)+l(o.length,2)+o},p=function(t){var e="";return e=u.DATA_DESCRIPTOR+l(t.crc32,4)+l(t.compressedSize,4)+l(t.uncompressedSize,4)};i.inherits(n,a),n.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},n.prototype.openedSource=function(t){if(this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name,this.streamFiles&&!t.file.dir){var e=h(t,this.streamFiles,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(t){this.accumulate=!1;var e=h(t,this.streamFiles,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),this.streamFiles&&!t.file.dir)this.push({data:p(t),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,n=d(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},n.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},n.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},n.prototype.resume=function(){return a.prototype.resume.call(this)?!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0):!1},n.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},n.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=n},{"../crc32":4,"../signature":20,"../stream/GenericWorker":25,"../utf8":28,"../utils":29}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker"),a=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};r.generateWorker=function(t,e,r){var n=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach(function(t,r){s++;var i=a(r.options.compression,e.compression),o=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,l=r.date;r._compressWorker(i,o).withStreamInfo("file",{name:t,dir:u,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(n)}),n.entriesCount=s}catch(o){n.error(o)}return n}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}n.prototype=t("./object"),n.prototype.loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":13,"./support":27}],11:[function(t,e,r){"use strict";function n(t){return new a.Promise(function(e,r){var n=t.decompressed.getContentWorker().pipe(new u);n.on("error",function(t){r(t)}).on("end",function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}var i=t("./utils"),a=t("./external"),s=t("./utf8"),i=t("./utils"),o=t("./zipEntries"),u=t("./stream/Crc32Probe"),l=t("./nodejsUtils");e.exports=function(t,e){var r=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(t)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var r=new o(e);return r.load(t),r}).then(function(t){var r=[a.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var s=0;s<i.length;s++)r.push(n(i[s]));return a.Promise.all(r)}).then(function(t){for(var n=t.shift(),i=n.files,a=0;a<i.length;a++){var s=i[a];r.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r})}},{"./external":6,"./nodejsUtils":12,"./stream/Crc32Probe":22,"./utf8":28,"./utils":29,"./zipEntries":30}],12:[function(t,e,r){(function(t){"use strict";e.exports={isNode:"undefined"!=typeof t,newBuffer:function(e,r){return new t(e,r)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],13:[function(t,e,r){"use strict";function n(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var i=t("./utf8"),a=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),u=t("./defaults"),l=t("./compressedObject"),c=t("./zipObject"),f=t("./generate"),h=t("./nodejsUtils"),d=t("./nodejs/NodejsStreamInputAdapter"),p=function(t,e,r){var n,i=a.getTypeOf(e);r=a.extend(r||{},u),r.date=r.date||new Date,null!==r.compression&&(r.compression=r.compression.toUpperCase()),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(t=g(t)),r.createFolders&&(n=m(t))&&_.call(this,n,!0);var o="string"===i&&r.binary===!1&&r.base64===!1;r.binary=!o;var f=e instanceof l&&0===e.uncompressedSize;(f||r.dir||!e||0===e.length)&&(r.base64=!1,r.binary=!0,e="",r.compression="STORE",i="string");var p=null;p=e instanceof l||e instanceof s?e:h.isNode&&h.isStream(e)?new d(t,e):a.prepareContent(t,e,r.binary,r.optimizedBinaryString,r.base64);var y=new c(t,p,r);this.files[t]=y},m=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},g=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},_=function(t,e){return e="undefined"!=typeof e?e:u.createFolders,t=g(t),this.files[t]||p.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]},y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],r=e.slice(this.root.length,e.length),r&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach(function(r,n){t(r,n)&&e.push(n)}),e},file:function(t,e,r){if(1===arguments.length){if(n(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var a=this.files[this.root+t];return a&&!a.dir?a:null}return t=this.root+t,p.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(n(t))return this.filter(function(e,r){return r.dir&&t.test(e)});var e=this.root+t,r=_.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(e,r){return r.name.slice(0,t.length)===t}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if(r=a.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");a.checkSupport(r.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(u){e=new s("error"),e.error(u)}return new o(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return t=t||{},t.type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":35,"./nodejsUtils":12,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28,"./utils":29,"./zipObject":32}],14:[function(t,e,r){"use strict";function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===e&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),a=this.readData(4);return e===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],15:[function(t,e,r){"use strict";function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}var i=t("../utils");n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||0>t)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":29}],16:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./Uint8ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./Uint8ArrayReader":18}],17:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./DataReader"),a=t("../utils");a.inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){var e=this.readData(4);return t===e},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./DataReader":15}],18:[function(t,e,r){"use strict";function n(t){i.call(this,t)}var i=t("./ArrayReader"),a=t("../utils");a.inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":29,"./ArrayReader":14}],19:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),a=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new u(n.transformTo("uint8array",t)):new a(n.transformTo("array",t)):new s(t)}},{"../support":27,"../utils":29,"./ArrayReader":14,"./NodeBufferReader":16,"./StringReader":17,"./Uint8ArrayReader":18}],20:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],21:[function(t,e,r){"use strict";function n(t){i.call(this,"ConvertWorker to "+t),this.destType=t}var i=t("./GenericWorker"),a=t("../utils");a.inherits(n,i),n.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=n},{"../utils":29,"./GenericWorker":25}],22:[function(t,e,r){"use strict";function n(){i.call(this,"Crc32Probe")}var i=t("./GenericWorker"),a=t("../crc32"),s=t("../utils");s.inherits(n,i),n.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=n},{"../crc32":4,"../utils":29,"./GenericWorker":25}],23:[function(t,e,r){"use strict";function n(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}var i=t("../utils"),a=t("./GenericWorker");i.inherits(n,a),n.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}a.prototype.processChunk.call(this,t)},e.exports=n},{"../utils":29,"./GenericWorker":25}],24:[function(t,e,r){"use strict";function n(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}var i=t("../utils"),a=t("./GenericWorker"),s=16384;i.inherits(n,a),n.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return a.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0):!1},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=s,e=null,r=Math.min(this.max,this.index+t);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,r);break;case"uint8array":e=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":e=this.data.slice(this.index,r)}return this.index=r,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":29,"./GenericWorker":25
+}],25:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return this.isFinished?!1:(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var t=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],26:[function(t,e,r){(function(r){"use strict";function n(t,e,r){switch(t){case"blob":return o.newBlob(o.transformTo("arraybuffer",e),r);case"base64":return c.encode(e);default:return o.transformTo(t,e)}}function i(t,e){var n,i=0,a=null,s=0;for(n=0;n<e.length;n++)s+=e[n].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(a=new Uint8Array(s),n=0;n<e.length;n++)a.set(e[n],i),i+=e[n].length;return a;case"nodebuffer":return r.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}function a(t,e){return new h.Promise(function(r,a){var s=[],o=t._internalType,u=t._outputType,l=t._mimeType;t.on("data",function(t,r){s.push(t),e&&e(r)}).on("error",function(t){s=[],a(t)}).on("end",function(){try{var t=n(u,i(o,s),l);r(t)}catch(e){a(e)}s=[]}).resume()})}function s(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,o.checkSupport(n),this._worker=t.pipe(new u(n)),t.lock()}catch(i){this._worker=new l("error"),this._worker.error(i)}}var o=t("../utils"),u=t("./ConvertWorker"),l=t("./GenericWorker"),c=t("../base64"),f=t("../nodejs/NodejsStreamOutputAdapter"),h=t("../external");s.prototype={accumulate:function(t){return a(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta)}):this._worker.on(t,function(){o.delay(e,arguments,r)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(o.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=s}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":35,"../utils":29,"./ConvertWorker":21,"./GenericWorker":25}],27:[function(t,e,r){(function(e){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof e,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(i){try{var a=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new a;s.append(n),r.blob=0===s.getBlob("application/zip").size}catch(i){r.blob=!1}}}r.nodestream=!!t("./nodejs/NodejsStreamOutputAdapter").prototype}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{"./nodejs/NodejsStreamOutputAdapter":35}],28:[function(t,e,r){"use strict";function n(){u.call(this,"utf-8 decode"),this.leftOver=null}function i(){u.call(this,"utf-8 encode")}for(var a=t("./utils"),s=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),l=new Array(256),c=0;256>c;c++)l[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;l[254]=l[254]=1;var f=function(t){var e,r,n,i,a,o=t.length,u=0;for(i=0;o>i;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=s.uint8array?new Uint8Array(u):new Array(u),a=0,i=0;u>a;i++)r=t.charCodeAt(i),55296===(64512&r)&&o>i+1&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),128>r?e[a++]=r:2048>r?(e[a++]=192|r>>>6,e[a++]=128|63&r):65536>r?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},h=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+l[t[r]]>e?r:e},d=function(t){var e,r,n,i,s=t.length,o=new Array(2*s);for(r=0,e=0;s>e;)if(n=t[e++],128>n)o[r++]=n;else if(i=l[n],i>4)o[r++]=65533,e+=i-1;else{for(n&=2===i?31:3===i?15:7;i>1&&s>e;)n=n<<6|63&t[e++],i--;i>1?o[r++]=65533:65536>n?o[r++]=n:(n-=65536,o[r++]=55296|n>>10&1023,o[r++]=56320|1023&n)}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),a.applyFromCharCode(o)};r.utf8encode=function(t){return s.nodebuffer?o.newBuffer(t,"utf-8"):f(t)},r.utf8decode=function(t){return s.nodebuffer?a.transformTo("nodebuffer",t).toString("utf-8"):(t=a.transformTo(s.uint8array?"uint8array":"array",t),d(t))},a.inherits(n,u),n.prototype.processChunk=function(t){var e=a.transformTo(s.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var n=e;e=new Uint8Array(n.length+this.leftOver.length),e.set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=h(e),o=e;i!==e.length&&(s.uint8array?(o=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(o=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:r.utf8decode(o),meta:t.meta})},n.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=n,a.inherits(i,u),i.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=i},{"./nodejsUtils":12,"./stream/GenericWorker":25,"./support":27,"./utils":29}],29:[function(t,e,r){"use strict";function n(t){var e=null;return e=u.uint8array?new Uint8Array(t.length):new Array(t.length),a(t,e)}function i(t){return t}function a(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}function s(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=d.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=d.applyCanBeUsed.nodebuffer),i)for(;e>1;)try{return d.stringifyByChunk(t,n,e)}catch(a){e=Math.floor(e/2)}return d.stringifyByChar(t)}function o(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}var u=t("./support"),l=t("./base64"),c=t("./nodejsUtils"),f=t("asap"),h=t("./external");r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(n){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,a=new i;return a.append(t),a.getBlob(e)}catch(n){throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(t,e,r){var n=[],i=0,a=t.length;if(r>=a)return String.fromCharCode.apply(null,t);for(;a>i;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,a)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,a)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&1===String.fromCharCode.apply(null,c.newBuffer(1)).length}catch(t){return!1}}()}};r.applyFromCharCode=s;var p={};p.string={string:i,array:function(t){return a(t,new Array(t.length))},arraybuffer:function(t){return p.string.uint8array(t).buffer},uint8array:function(t){return a(t,new Uint8Array(t.length))},nodebuffer:function(t){return a(t,c.newBuffer(t.length))}},p.array={string:s,array:i,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return c.newBuffer(t)}},p.arraybuffer={string:function(t){return s(new Uint8Array(t))},array:function(t){return o(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:i,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return c.newBuffer(new Uint8Array(t))}},p.uint8array={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:i,nodebuffer:function(t){return c.newBuffer(t)}},p.nodebuffer={string:s,array:function(t){return o(t,new Array(t.length))},arraybuffer:function(t){return p.nodebuffer.uint8array(t).buffer},uint8array:function(t){return o(t,new Uint8Array(t.length))},nodebuffer:i},r.transformTo=function(t,e){if(e||(e=""),!t)return e;r.checkSupport(t);var n=r.getTypeOf(e),i=p[n][t](e);return i},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":u.nodebuffer&&c.isBuffer(t)?"nodebuffer":u.uint8array&&t instanceof Uint8Array?"uint8array":u.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){var e=u[t.toLowerCase()];if(!e)throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)e=t.charCodeAt(r),n+="\\x"+(16>e?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){f(function(){t.apply(r||null,e||[])})},r.inherits=function(t,e){var r=function(){};r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&"undefined"==typeof r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,i,a,s){var o=null;return o=u.blob&&e instanceof Blob&&"undefined"!=typeof FileReader?new h.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(e)}):h.Promise.resolve(e),o.then(function(e){var o=r.getTypeOf(e);return o?("arraybuffer"===o?e=r.transformTo("uint8array",e):"string"===o&&(s?e=l.decode(e):i&&a!==!0&&(e=n(e))),e):h.Promise.reject(new Error("The data of '"+t+"' is in an unsupported format !"))})}},{"./base64":1,"./external":6,"./nodejsUtils":12,"./support":27,asap:33}],30:[function(t,e,r){"use strict";function n(t){this.files=[],this.loadOptions=t}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./signature"),o=t("./zipEntry"),u=(t("./utf8"),t("./support"));n.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug : unexpected signature ("+a.pretty(e)+", expected "+a.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4),i=n===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=u.uint8array?"uint8array":"array",r=a.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,n=this.zip64EndOfCentralSize-44,i=0;n>i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)t=new o({zip64:this.zip64},this.loadOptions),t.readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(0>t){var e=!this.isSignature(0,s.LOCAL_FILE_HEADER);throw e?new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(t);var r=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>t)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip : can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=r-n;if(i>0)this.isSignature(r,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(0>i)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=n},{"./reader/readerFor":19,"./signature":20,"./support":27,"./utf8":28,"./utils":29,"./zipEntry":31}],31:[function(t,e,r){"use strict";function n(t,e){this.options=t,this.loadOptions=e}var i=t("./reader/readerFor"),a=t("./utils"),s=t("./compressedObject"),o=t("./crc32"),u=t("./utf8"),l=t("./compressions"),c=t("./support"),f=0,h=3,d=function(t){for(var e in l)if(l.hasOwnProperty(e)&&l[e].magic===t)return l[e];return null};n.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(e=d(this.compressionMethod),null===e)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),t===f&&(this.dosPermissions=63&this.externalFileAttributes),t===h&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n}},handleUTF8:function(){var t=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=a.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=a.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileName)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:o(this.fileComment)!==e.readInt(4)?null:u.utf8decode(e.readData(t.length-5))}return null}},e.exports=n},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":19,"./support":27,"./utf8":28,"./utils":29}],32:[function(t,e,r){"use strict";var n=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),a=t("./utf8"),s=t("./compressedObject"),o=t("./stream/GenericWorker"),u=function(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};u.prototype={internalStream:function(t){var e=t.toLowerCase(),r="string"===e||"text"===e;"binarystring"!==e&&"text"!==e||(e="string");var i=this._decompressWorker(),s=!this._dataBinary;return s&&!r&&(i=i.pipe(new a.Utf8EncodeWorker)),!s&&r&&(i=i.pipe(new a.Utf8DecodeWorker)),new n(i,e,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof s&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof o?this._data:new i(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<l.length;f++)u.prototype[l[f]]=c;e.exports=u},{"./compressedObject":2,"./stream/DataWorker":24,"./stream/GenericWorker":25,"./stream/StreamHelper":26,"./utf8":28}],33:[function(t,e,r){"use strict";function n(){if(u.length)throw u.shift()}function i(t){var e;e=o.length?o.pop():new a,e.task=t,s(e)}function a(){this.task=null}var s=t("./raw"),o=[],u=[],l=s.makeRequestCallFromTimer(n);e.exports=i,a.prototype.call=function(){try{this.task.call()}catch(t){i.onerror?i.onerror(t):(u.push(t),l())}finally{this.task=null,o[o.length]=this}}},{"./raw":34}],34:[function(t,e,r){(function(t){"use strict";function r(t){o.length||(s(),u=!0),o[o.length]=t}function n(){for(;l<o.length;){var t=l;if(l+=1,o[t].call(),l>c){for(var e=0,r=o.length-l;r>e;e++)o[e]=o[e+l];o.length-=l,l=0}}o.length=0,l=0,u=!1}function i(t){var e=1,r=new f(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}function a(t){return function(){function e(){clearTimeout(r),clearInterval(n),t()}var r=setTimeout(e,0),n=setInterval(e,50)}}e.exports=r;var s,o=[],u=!1,l=0,c=1024,f=t.MutationObserver||t.WebKitMutationObserver;s="function"==typeof f?i(n):a(n),r.requestFlush=s,r.makeRequestCallFromTimer=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(t,e,r){},{}],36:[function(t,e,r){function n(){c=!1,o.length?l=o.concat(l):f=-1,l.length&&i()}function i(){if(!c){var t=setTimeout(n);c=!0;for(var e=l.length;e;){for(o=l,l=[];++f<e;)o&&o[f].run();f=-1,e=l.length}o=null,c=!1,clearTimeout(t)}}function a(t,e){this.fun=t,this.array=e}function s(){}var o,u=e.exports={},l=[],c=!1,f=-1;u.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new a(t,e)),1!==l.length||c||setTimeout(i,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(t){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(t){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],37:[function(e,r,n){(function(n,i){(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){G=t}function l(t){X=t}function c(){return function(){n.nextTick(m)}}function f(){return function(){Y(m)}}function h(){var t=0,e=new Q(m),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function d(){var t=new MessageChannel;return t.port1.onmessage=m,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(m,1)}}function m(){for(var t=0;V>t;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}V=0}function g(){try{var t=e,r=t("vertx");return Y=r.runOnLoop||r.runOnContext,f()}catch(n){return p()}}function _(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return st.error=e,st}}function b(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function k(t,e,r){X(function(t){var n=!1,i=b(r,e,function(r){n||(n=!0,e!==r?S(t,r):E(t,r))},function(e){n||(n=!0,I(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,I(t,i))},t)}function x(t,e){e._state===it?E(t,e._result):e._state===at?I(t,e._result):O(e,void 0,function(e){S(t,e)},function(e){I(t,e)})}function A(t,e){if(e.constructor===t.constructor)x(t,e);else{var r=w(e);r===st?I(t,st.error):void 0===r?E(t,e):s(r)?k(t,e,r):E(t,e)}}function S(t,e){t===e?I(t,y()):a(e)?A(t,e):E(t,e)}function C(t){t._onerror&&t._onerror(t._result),z(t)}function E(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&X(z,t))}function I(t,e){t._state===nt&&(t._state=at,t._result=e,X(C,t))}function O(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+it]=r,i[a+at]=n,0===a&&t._state&&X(z,t)}function z(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,a=t._result,s=0;s<e.length;s+=3)n=e[s],i=e[s+r],n?B(r,n,i,a):i(a);t._subscribers.length=0}}function T(){this.error=null}function F(t,e){try{return t(e)}catch(r){return ot.error=r,ot}}function B(t,e,r,n){var i,a,o,u,l=s(r);if(l){if(i=F(r,n),i===ot?(u=!0,a=i.error,i=null):o=!0,e===i)return void I(e,v())}else i=n,o=!0;e._state!==nt||(l&&o?S(e,i):u?I(e,a):t===it?E(e,i):t===at&&I(e,i))}function N(t,e){try{e(function(e){S(t,e)},function(e){I(t,e)})}catch(r){I(t,r)}}function D(t,e){var r=this;r._instanceConstructor=t,r.promise=new t(_),r._validateInput(e)?(r._input=e,r.length=e.length,r._remaining=e.length,r._init(),0===r.length?E(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&E(r.promise,r._result))):I(r.promise,r._validationError())}function j(t){return new ut(this,t).promise}function R(t){function e(t){S(i,t)}function r(t){I(i,t)}var n=this,i=new n(_);if(!q(t))return I(i,new TypeError("You must pass an array to race.")),i;for(var a=t.length,s=0;i._state===nt&&a>s;s++)O(n.resolve(t[s]),void 0,e,r);return i}function L(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(_);return S(r,t),r}function U(t){var e=this,r=new e(_);return I(r,t),r}function P(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function M(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function W(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],_!==t&&(s(t)||P(),this instanceof W||M(),N(this,t))}function Z(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(t.Promise=pt)}var H;H=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var Y,G,K,q=H,V=0,X=({}.toString,function(t,e){rt[V]=t,rt[V+1]=e,V+=2,2===V&&(G?G(m):K())}),J="undefined"!=typeof window?window:void 0,$=J||{},Q=$.MutationObserver||$.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);K=tt?c():Q?h():et?d():void 0===J&&"function"==typeof e?g():p();var nt=void 0,it=1,at=2,st=new T,ot=new T;D.prototype._validateInput=function(t){return q(t)},D.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},D.prototype._init=function(){this._result=new Array(this.length)};var ut=D;D.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},D.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;o(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},D.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===at?I(i,r):n._result[e]=r),0===n._remaining&&E(i,n._result)},D.prototype._willSettleAt=function(t,e){var r=this;O(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(at,e,t)})};var lt=j,ct=R,ft=L,ht=U,dt=0,pt=W;W.all=lt,W.race=ct,W.resolve=ft,W.reject=ht,W._setScheduler=u,W._setAsap=l,W._asap=X,W.prototype={constructor:W,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===at&&!e)return this;var i=new this.constructor(_),a=r._result;if(n){var s=arguments[n-1];X(function(){B(n,i,s,a)})}else O(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var mt=Z,gt={Promise:pt,polyfill:mt};"function"==typeof t&&t.amd?t(function(){return gt}):"undefined"!=typeof r&&r.exports?r.exports=gt:"undefined"!=typeof this&&(this.ES6Promise=gt),mt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:36}],38:[function(t,e,r){"use strict";var n=t("./lib/utils/common").assign,i=t("./lib/deflate"),a=t("./lib/inflate"),s=t("./lib/zlib/constants"),o={};n(o,i,a,s),e.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=u.assign({level:y,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==m)throw new Error(c[r]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?l.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=o.deflateSetDictionary(this.strm,i),r!==m)throw new Error(c[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}function s(t,e){return e=e||{},e.gzip=!0,i(t,e)}var o=t("./zlib/deflate"),u=t("./utils/common"),l=t("./utils/strings"),c=t("./zlib/messages"),f=t("./zlib/zstream"),h=Object.prototype.toString,d=0,p=4,m=0,g=1,_=2,y=-1,v=0,w=8;n.prototype.push=function(t,e){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?p:d,"string"==typeof t?i.input=l.string2buf(t):"[object ArrayBuffer]"===h.call(t)?i.input=new Uint8Array(t):i.input=t,
+i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new u.Buf8(a),i.next_out=0,i.avail_out=a),r=o.deflate(i,n),r!==g&&r!==m)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||n!==p&&n!==_)||("string"===this.options.to?this.onData(l.buf2binstring(u.shrinkBuf(i.output,i.next_out))):this.onData(u.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==g);return n===p?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m):n===_?(this.onEnd(m),i.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===m&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=a,r.gzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=s.inflateInit2(this.strm,e.windowBits);if(r!==l.Z_OK)throw new Error(c[r]);this.header=new h,s.inflateGetHeader(this.strm,this.header)}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}var s=t("./zlib/inflate"),o=t("./utils/common"),u=t("./utils/strings"),l=t("./zlib/constants"),c=t("./zlib/messages"),f=t("./zlib/zstream"),h=t("./zlib/gzheader"),d=Object.prototype.toString;n.prototype.push=function(t,e){var r,n,i,a,c,f,h=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;n=e===~~e?e:e===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof t?h.input=u.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new o.Buf8(p),h.next_out=0,h.avail_out=p),r=s.inflate(h,l.Z_NO_FLUSH),r===l.Z_NEED_DICT&&m&&(f="string"==typeof m?u.string2buf(m):"[object ArrayBuffer]"===d.call(m)?new Uint8Array(m):m,r=s.inflateSetDictionary(this.strm,f)),r===l.Z_BUF_ERROR&&g===!0&&(r=l.Z_OK,g=!1),r!==l.Z_STREAM_END&&r!==l.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==l.Z_STREAM_END&&(0!==h.avail_in||n!==l.Z_FINISH&&n!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(h.output,h.next_out),a=h.next_out-i,c=u.buf2string(h.output,i),h.next_out=a,h.avail_out=p-a,a&&o.arraySet(h.output,h.output,i,a,0),this.onData(c)):this.onData(o.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==l.Z_STREAM_END);return r===l.Z_STREAM_END&&(n=l.Z_FINISH),n===l.Z_FINISH?(r=s.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l.Z_OK):n===l.Z_SYNC_FLUSH?(this.onEnd(l.Z_OK),h.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===l.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=n,r.inflate=i,r.inflateRaw=a,r.ungzip=i},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,s;for(n=0,e=0,r=t.length;r>e;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;r>e;e++)a=t[e],s.set(a,i),i+=a.length;return s}},a={arraySet:function(t,e,r,n,i){for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",n=0;e>n;n++)r+=String.fromCharCode(t[n]);return r}var i=t("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var u=new i.Buf8(256),l=0;256>l;l++)u[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;u[254]=u[254]=1,r.string2buf=function(t){var e,r,n,a,s,o=t.length,u=0;for(a=0;o>a;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),u+=128>r?1:2048>r?2:65536>r?3:4;for(e=new i.Buf8(u),s=0,a=0;u>s;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),128>r?e[s++]=r:2048>r?(e[s++]=192|r>>>6,e[s++]=128|63&r):65536>r?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;n>r;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,a,s,o=e||t.length,l=new Array(2*o);for(i=0,r=0;o>r;)if(a=t[r++],128>a)l[i++]=a;else if(s=u[a],s>4)l[i++]=65533,r+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&o>r;)a=a<<6|63&t[r++],s--;s>1?l[i++]=65533:65536>a?l[i++]=a:(a-=65536,l[i++]=55296|a>>10&1023,l[i++]=56320|1023&a)}return n(l,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}e.exports=n},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=a,s=n+r;t^=-1;for(var o=n;s>o;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}var a=n();e.exports=i},{}],46:[function(t,e,r){"use strict";function n(t,e){return t.msg=N[e],e}function i(t){return(t<<1)-(t>4?9:0)}function a(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(z.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function o(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function l(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function c(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,z.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=F(t.adler,e,i,r):2===t.state.wrap&&(t.adler=B(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function f(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-ft?t.strstart-(t.w_size-ft):0,l=t.window,c=t.w_mask,f=t.prev,h=t.strstart+ct,d=l[a+s-1],p=l[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,l[r+s]===p&&l[r+s-1]===d&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do;while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&h>a);if(n=ct-(h-a),a=h-ct,n>s){if(t.match_start=e,s=n,n>=o)break;d=l[a+s-1],p=l[a+s]}}while((e=f[e&c])>u&&0!==--i);return s<=t.lookahead?s:t.lookahead}function h(t){var e,r,n,i,a,s=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-ft)){z.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,r=t.hash_size,e=r;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--r);r=s,e=r;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--r);i+=s}if(0===t.strm.avail_in)break;if(r=c(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=lt)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+lt-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<lt)););}while(t.lookahead<ft&&0!==t.strm.avail_in)}function d(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(h(t),0===t.lookahead&&e===D)return wt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,o(t,!1),0===t.strm.avail_out))return wt;if(t.strstart-t.block_start>=t.w_size-ft&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?wt:wt}function p(t,e){for(var r,n;;){if(t.lookahead<ft){if(h(t),t.lookahead<ft&&e===D)return wt;if(0===t.lookahead)break}if(r=0,t.lookahead>=lt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r)),t.match_length>=lt)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-lt),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=lt){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=t.strstart<lt-1?t.strstart:lt-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:bt}function m(t,e){for(var r,n,i;;){if(t.lookahead<ft){if(h(t),t.lookahead<ft&&e===D)return wt;if(0===t.lookahead)break}if(r=0,t.lookahead>=lt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=lt-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-ft&&(t.match_length=f(t,r),t.match_length<=5&&(t.strategy===G||t.match_length===lt&&t.strstart-t.match_start>4096)&&(t.match_length=lt-1)),t.prev_length>=lt&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-lt,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-lt),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!==--t.prev_length);if(t.match_available=0,t.match_length=lt-1,t.strstart++,n&&(o(t,!1),0===t.strm.avail_out))return wt}else if(t.match_available){if(n=T._tr_tally(t,0,t.window[t.strstart-1]),n&&o(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return wt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=T._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<lt-1?t.strstart:lt-1,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:bt}function g(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=ct){if(h(t),t.lookahead<=ct&&e===D)return wt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=lt&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+ct;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&a>i);t.match_length=ct-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=lt?(r=T._tr_tally(t,1,t.match_length-lt),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:bt}function _(t,e){for(var r;;){if(0===t.lookahead&&(h(t),0===t.lookahead)){if(e===D)return wt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(o(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(o(t,!0),0===t.strm.avail_out?kt:xt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?wt:bt}function y(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function v(t){t.window_size=2*t.w_size,a(t.head),t.max_lazy_match=O[t.level].max_lazy,t.good_match=O[t.level].good_length,t.nice_match=O[t.level].nice_length,t.max_chain_length=O[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=lt-1,t.match_available=0,t.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new z.Buf16(2*ot),this.dyn_dtree=new z.Buf16(2*(2*at+1)),this.bl_tree=new z.Buf16(2*(2*st+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new z.Buf16(ut+1),this.heap=new z.Buf16(2*it+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new z.Buf16(2*it+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function b(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=J,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?dt:yt,t.adler=2===e.wrap?0:1,e.last_flush=D,T._tr_init(e),P):n(t,W)}function k(t){var e=b(t);return e===P&&v(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?W:(t.state.gzhead=e,P):W}function A(t,e,r,i,a,s){if(!t)return W;var o=1;if(e===Y&&(e=6),0>i?(o=0,i=-i):i>15&&(o=2,i-=16),1>a||a>Q||r!==$||8>i||i>15||0>e||e>9||0>s||s>V)return n(t,W);8===i&&(i=9);var u=new w;return t.state=u,u.strm=t,u.wrap=o,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+lt-1)/lt),u.window=new z.Buf8(2*u.w_size),u.head=new z.Buf16(u.hash_size),u.prev=new z.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new z.Buf8(u.pending_buf_size),u.d_buf=u.lit_bufsize>>1,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,k(t)}function S(t,e){return A(t,e,$,tt,et,X)}function C(t,e){var r,o,c,f;if(!t||!t.state||e>U||0>e)return t?n(t,W):W;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===vt&&e!==L)return n(t,0===t.avail_out?H:W);if(o.strm=t,r=o.last_flush,o.last_flush=e,o.status===dt)if(2===o.wrap)t.adler=0,u(o,31),u(o,139),u(o,8),o.gzhead?(u(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),u(o,255&o.gzhead.time),u(o,o.gzhead.time>>8&255),u(o,o.gzhead.time>>16&255),u(o,o.gzhead.time>>24&255),u(o,9===o.level?2:o.strategy>=K||o.level<2?4:0),u(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(u(o,255&o.gzhead.extra.length),u(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=B(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=pt):(u(o,0),u(o,0),u(o,0),u(o,0),u(o,0),u(o,9===o.level?2:o.strategy>=K||o.level<2?4:0),u(o,At),o.status=yt);else{var h=$+(o.w_bits-8<<4)<<8,d=-1;d=o.strategy>=K||o.level<2?0:o.level<6?1:6===o.level?2:3,h|=d<<6,0!==o.strstart&&(h|=ht),h+=31-h%31,o.status=yt,l(o,h),0!==o.strstart&&(l(o,t.adler>>>16),l(o,65535&t.adler)),t.adler=1}if(o.status===pt)if(o.gzhead.extra){for(c=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),s(t),c=o.pending,o.pending!==o.pending_buf_size));)u(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=mt)}else o.status=mt;if(o.status===mt)if(o.gzhead.name){c=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),s(t),c=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),0===f&&(o.gzindex=0,o.status=gt)}else o.status=gt;if(o.status===gt)if(o.gzhead.comment){c=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),s(t),c=o.pending,o.pending===o.pending_buf_size)){f=1;break}f=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,u(o,f)}while(0!==f);o.gzhead.hcrc&&o.pending>c&&(t.adler=B(t.adler,o.pending_buf,o.pending-c,c)),0===f&&(o.status=_t)}else o.status=_t;if(o.status===_t&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(u(o,255&t.adler),u(o,t.adler>>8&255),t.adler=0,o.status=yt)):o.status=yt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,P}else if(0===t.avail_in&&i(e)<=i(r)&&e!==L)return n(t,H);if(o.status===vt&&0!==t.avail_in)return n(t,H);if(0!==t.avail_in||0!==o.lookahead||e!==D&&o.status!==vt){var p=o.strategy===K?_(o,e):o.strategy===q?g(o,e):O[o.level].func(o,e);if(p!==kt&&p!==xt||(o.status=vt),p===wt||p===kt)return 0===t.avail_out&&(o.last_flush=-1),P;if(p===bt&&(e===j?T._tr_align(o):e!==U&&(T._tr_stored_block(o,0,0,!1),e===R&&(a(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,P}return e!==L?P:o.wrap<=0?M:(2===o.wrap?(u(o,255&t.adler),u(o,t.adler>>8&255),u(o,t.adler>>16&255),u(o,t.adler>>24&255),u(o,255&t.total_in),u(o,t.total_in>>8&255),u(o,t.total_in>>16&255),u(o,t.total_in>>24&255)):(l(o,t.adler>>>16),l(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?P:M)}function E(t){var e;return t&&t.state?(e=t.state.status,e!==dt&&e!==pt&&e!==mt&&e!==gt&&e!==_t&&e!==yt&&e!==vt?n(t,W):(t.state=null,e===yt?n(t,Z):P)):W}function I(t,e){var r,n,i,s,o,u,l,c,f=e.length;if(!t||!t.state)return W;if(r=t.state,s=r.wrap,2===s||1===s&&r.status!==dt||r.lookahead)return W;for(1===s&&(t.adler=F(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new z.Buf8(r.w_size),z.arraySet(c,e,f-r.w_size,r.w_size,0),e=c,f=r.w_size),o=t.avail_in,u=t.next_in,l=t.input,t.avail_in=f,t.next_in=0,t.input=e,h(r);r.lookahead>=lt;){n=r.strstart,i=r.lookahead-(lt-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+lt-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--i);r.strstart=n,r.lookahead=lt-1,h(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=lt-1,r.match_available=0,t.next_in=u,t.input=l,t.avail_in=o,r.wrap=s,P}var O,z=t("../utils/common"),T=t("./trees"),F=t("./adler32"),B=t("./crc32"),N=t("./messages"),D=0,j=1,R=3,L=4,U=5,P=0,M=1,W=-2,Z=-3,H=-5,Y=-1,G=1,K=2,q=3,V=4,X=0,J=2,$=8,Q=9,tt=15,et=8,rt=29,nt=256,it=nt+1+rt,at=30,st=19,ot=2*it+1,ut=15,lt=3,ct=258,ft=ct+lt+1,ht=32,dt=42,pt=69,mt=73,gt=91,_t=103,yt=113,vt=666,wt=1,bt=2,kt=3,xt=4,At=3;O=[new y(0,0,0,0,d),new y(4,4,8,4,p),new y(4,5,16,8,p),new y(4,6,32,32,p),new y(4,4,16,16,m),new y(8,16,32,32,m),new y(8,16,128,128,m),new y(8,32,128,256,m),new y(32,128,258,1024,m),new y(32,258,258,4096,m)],r.deflateInit=S,r.deflateInit2=A,r.deflateReset=k,r.deflateResetKeep=b,r.deflateSetHeader=x,r.deflate=C,r.deflateEnd=E,r.deflateSetDictionary=I,r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=n},{}],48:[function(t,e,r){"use strict";var n=30,i=12;e.exports=function(t,e){var r,a,s,o,u,l,c,f,h,d,p,m,g,_,y,v,w,b,k,x,A,S,C,E,I;r=t.state,a=t.next_in,E=t.input,s=a+(t.avail_in-5),o=t.next_out,I=t.output,u=o-(e-t.avail_out),l=o+(t.avail_out-257),c=r.dmax,f=r.wsize,h=r.whave,d=r.wnext,p=r.window,m=r.hold,g=r.bits,_=r.lencode,y=r.distcode,v=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;t:do{15>g&&(m+=E[a++]<<g,g+=8,m+=E[a++]<<g,g+=8),b=_[m&v];e:for(;;){if(k=b>>>24,m>>>=k,g-=k,k=b>>>16&255,0===k)I[o++]=65535&b;else{if(!(16&k)){if(0===(64&k)){b=_[(65535&b)+(m&(1<<k)-1)];continue e}if(32&k){r.mode=i;break t}t.msg="invalid literal/length code",r.mode=n;break t}x=65535&b,k&=15,k&&(k>g&&(m+=E[a++]<<g,g+=8),x+=m&(1<<k)-1,m>>>=k,g-=k),15>g&&(m+=E[a++]<<g,g+=8,m+=E[a++]<<g,g+=8),b=y[m&w];r:for(;;){if(k=b>>>24,m>>>=k,g-=k,k=b>>>16&255,!(16&k)){if(0===(64&k)){b=y[(65535&b)+(m&(1<<k)-1)];continue r}t.msg="invalid distance code",r.mode=n;break t}if(A=65535&b,k&=15,k>g&&(m+=E[a++]<<g,g+=8,k>g&&(m+=E[a++]<<g,g+=8)),A+=m&(1<<k)-1,A>c){t.msg="invalid distance too far back",r.mode=n;break t}if(m>>>=k,g-=k,k=o-u,A>k){if(k=A-k,k>h&&r.sane){t.msg="invalid distance too far back",r.mode=n;break t}if(S=0,C=p,0===d){if(S+=f-k,x>k){x-=k;do I[o++]=p[S++];while(--k);S=o-A,C=I}}else if(k>d){if(S+=f+d-k,k-=d,x>k){x-=k;do I[o++]=p[S++];while(--k);if(S=0,x>d){k=d,x-=k;do I[o++]=p[S++];while(--k);S=o-A,C=I}}}else if(S+=d-k,x>k){x-=k;do I[o++]=p[S++];while(--k);S=o-A,C=I}for(;x>2;)I[o++]=C[S++],I[o++]=C[S++],I[o++]=C[S++],x-=3;x&&(I[o++]=C[S++],x>1&&(I[o++]=C[S++]))}else{S=o-A;do I[o++]=I[S++],I[o++]=I[S++],I[o++]=I[S++],x-=3;while(x>2);x&&(I[o++]=I[S++],x>1&&(I[o++]=I[S++]))}break}}break}}while(s>a&&l>o);x=g>>3,a-=x,g-=x<<3,m&=(1<<g)-1,t.next_in=a,t.next_out=o,t.avail_in=s>a?5+(s-a):5-(a-s),t.avail_out=l>o?257+(l-o):257-(o-l),r.hold=m,r.bits=g}},{}],49:[function(t,e,r){"use strict";function n(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new y.Buf16(320),this.work=new y.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=R,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new y.Buf32(mt),e.distcode=e.distdyn=new y.Buf32(gt),e.sane=1,e.back=-1,O):F}function s(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,a(t)):F}function o(t,e){var r,n;return t&&t.state?(n=t.state,0>e?(r=0,e=-e):(r=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?F:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,s(t))):F}function u(t,e){var r,n;return t?(n=new i,t.state=n,n.window=null,r=o(t,e),r!==O&&(t.state=null),r):F}function l(t){return u(t,yt)}function c(t){if(vt){var e;for(g=new y.Buf32(512),_=new y.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(k(A,t.lens,0,288,g,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;k(S,t.lens,0,32,_,0,t.work,{bits:5}),vt=!1}t.lencode=g,t.lenbits=9,t.distcode=_,t.distbits=5}function f(t,e,r,n){var i,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new y.Buf8(a.wsize)),n>=a.wsize?(y.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),y.arraySet(a.window,e,r-n,i,a.wnext),n-=i,n?(y.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function h(t,e){var r,i,a,s,o,u,l,h,d,p,m,g,_,mt,gt,_t,yt,vt,wt,bt,kt,xt,At,St,Ct=0,Et=new y.Buf8(4),It=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return F;r=t.state,r.mode===q&&(r.mode=V),o=t.next_out,a=t.output,l=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,h=r.hold,d=r.bits,p=u,m=l,xt=O;t:for(;;)switch(r.mode){case R:if(0===r.wrap){r.mode=V;break}for(;16>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(2&r.wrap&&35615===h){r.check=0,Et[0]=255&h,Et[1]=h>>>8&255,r.check=w(r.check,Et,2,0),h=0,d=0,r.mode=L;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",r.mode=ht;break}if((15&h)!==j){t.msg="unknown compression method",r.mode=ht;break}if(h>>>=4,d-=4,kt=(15&h)+8,0===r.wbits)r.wbits=kt;else if(kt>r.wbits){t.msg="invalid window size",r.mode=ht;break}r.dmax=1<<kt,t.adler=r.check=1,r.mode=512&h?G:q,h=0,d=0;break;case L:for(;16>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(r.flags=h,(255&r.flags)!==j){t.msg="unknown compression method",r.mode=ht;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=ht;break}r.head&&(r.head.text=h>>8&1),512&r.flags&&(Et[0]=255&h,Et[1]=h>>>8&255,r.check=w(r.check,Et,2,0)),h=0,d=0,r.mode=U;case U:for(;32>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.head&&(r.head.time=h),512&r.flags&&(Et[0]=255&h,Et[1]=h>>>8&255,Et[2]=h>>>16&255,Et[3]=h>>>24&255,r.check=w(r.check,Et,4,0)),h=0,d=0,r.mode=P;case P:for(;16>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.head&&(r.head.xflags=255&h,r.head.os=h>>8),512&r.flags&&(Et[0]=255&h,Et[1]=h>>>8&255,r.check=w(r.check,Et,2,0)),h=0,d=0,r.mode=M;case M:if(1024&r.flags){for(;16>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.length=h,r.head&&(r.head.extra_len=h),512&r.flags&&(Et[0]=255&h,Et[1]=h>>>8&255,r.check=w(r.check,Et,2,0)),h=0,d=0}else r.head&&(r.head.extra=null);r.mode=W;case W:if(1024&r.flags&&(g=r.length,g>u&&(g=u),g&&(r.head&&(kt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),y.arraySet(r.head.extra,i,s,g,kt)),512&r.flags&&(r.check=w(r.check,i,g,s)),u-=g,s+=g,r.length-=g),r.length))break t;r.length=0,r.mode=Z;case Z:if(2048&r.flags){if(0===u)break t;g=0;do kt=i[s+g++],r.head&&kt&&r.length<65536&&(r.head.name+=String.fromCharCode(kt));while(kt&&u>g);if(512&r.flags&&(r.check=w(r.check,i,g,s)),u-=g,s+=g,kt)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=H;case H:if(4096&r.flags){if(0===u)break t;g=0;do kt=i[s+g++],r.head&&kt&&r.length<65536&&(r.head.comment+=String.fromCharCode(kt));while(kt&&u>g);if(512&r.flags&&(r.check=w(r.check,i,g,s)),u-=g,s+=g,kt)break t}else r.head&&(r.head.comment=null);r.mode=Y;case Y:if(512&r.flags){for(;16>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(h!==(65535&r.check)){t.msg="header crc mismatch",r.mode=ht;break}h=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=q;break;case G:for(;32>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}t.adler=r.check=n(h),h=0,d=0,r.mode=K;case K:if(0===r.havedict)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=u,r.hold=h,r.bits=d,T;t.adler=r.check=1,r.mode=q;case q:if(e===E||e===I)break t;case V:if(r.last){h>>>=7&d,d-=7&d,r.mode=lt;break}for(;3>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}switch(r.last=1&h,h>>>=1,d-=1,3&h){case 0:r.mode=X;break;case 1:if(c(r),r.mode=rt,e===I){h>>>=2,d-=2;break t}break;case 2:r.mode=Q;break;case 3:t.msg="invalid block type",r.mode=ht}h>>>=2,d-=2;break;case X:for(h>>>=7&d,d-=7&d;32>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if((65535&h)!==(h>>>16^65535)){t.msg="invalid stored block lengths",r.mode=ht;break}if(r.length=65535&h,h=0,d=0,r.mode=J,e===I)break t;case J:r.mode=$;case $:if(g=r.length){if(g>u&&(g=u),g>l&&(g=l),0===g)break t;y.arraySet(a,i,s,g,o),u-=g,s+=g,l-=g,o+=g,r.length-=g;break}r.mode=q;break;case Q:for(;14>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(r.nlen=(31&h)+257,h>>>=5,d-=5,r.ndist=(31&h)+1,h>>>=5,d-=5,r.ncode=(15&h)+4,h>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ht;break}r.have=0,r.mode=tt;case tt:for(;r.have<r.ncode;){for(;3>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.lens[It[r.have++]]=7&h,h>>>=3,d-=3}for(;r.have<19;)r.lens[It[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,At={bits:r.lenbits},xt=k(x,r.lens,0,19,r.lencode,0,r.work,At),r.lenbits=At.bits,xt){t.msg="invalid code lengths set",r.mode=ht;break}r.have=0,r.mode=et;case et:for(;r.have<r.nlen+r.ndist;){for(;Ct=r.lencode[h&(1<<r.lenbits)-1],gt=Ct>>>24,_t=Ct>>>16&255,yt=65535&Ct,!(d>=gt);){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(16>yt)h>>>=gt,d-=gt,r.lens[r.have++]=yt;else{if(16===yt){for(St=gt+2;St>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(h>>>=gt,d-=gt,0===r.have){t.msg="invalid bit length repeat",r.mode=ht;break}kt=r.lens[r.have-1],g=3+(3&h),h>>>=2,d-=2}else if(17===yt){for(St=gt+3;St>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}h>>>=gt,d-=gt,kt=0,g=3+(7&h),h>>>=3,d-=3}else{for(St=gt+7;St>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}h>>>=gt,d-=gt,kt=0,g=11+(127&h),h>>>=7,d-=7}if(r.have+g>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ht;break}for(;g--;)r.lens[r.have++]=kt}}if(r.mode===ht)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ht;break}if(r.lenbits=9,At={bits:r.lenbits},xt=k(A,r.lens,0,r.nlen,r.lencode,0,r.work,At),r.lenbits=At.bits,xt){t.msg="invalid literal/lengths set",r.mode=ht;break}if(r.distbits=6,r.distcode=r.distdyn,At={bits:r.distbits},xt=k(S,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,At),r.distbits=At.bits,xt){t.msg="invalid distances set",r.mode=ht;break}if(r.mode=rt,e===I)break t;case rt:r.mode=nt;case nt:if(u>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=u,r.hold=h,r.bits=d,b(t,m),o=t.next_out,a=t.output,l=t.avail_out,s=t.next_in,i=t.input,u=t.avail_in,h=r.hold,d=r.bits,r.mode===q&&(r.back=-1);break}for(r.back=0;Ct=r.lencode[h&(1<<r.lenbits)-1],gt=Ct>>>24,_t=Ct>>>16&255,yt=65535&Ct,!(d>=gt);){if(0===u)break t;u--,h+=i[s++]<<d,
+d+=8}if(_t&&0===(240&_t)){for(vt=gt,wt=_t,bt=yt;Ct=r.lencode[bt+((h&(1<<vt+wt)-1)>>vt)],gt=Ct>>>24,_t=Ct>>>16&255,yt=65535&Ct,!(d>=vt+gt);){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}h>>>=vt,d-=vt,r.back+=vt}if(h>>>=gt,d-=gt,r.back+=gt,r.length=yt,0===_t){r.mode=ut;break}if(32&_t){r.back=-1,r.mode=q;break}if(64&_t){t.msg="invalid literal/length code",r.mode=ht;break}r.extra=15&_t,r.mode=it;case it:if(r.extra){for(St=r.extra;St>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.length+=h&(1<<r.extra)-1,h>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=at;case at:for(;Ct=r.distcode[h&(1<<r.distbits)-1],gt=Ct>>>24,_t=Ct>>>16&255,yt=65535&Ct,!(d>=gt);){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(0===(240&_t)){for(vt=gt,wt=_t,bt=yt;Ct=r.distcode[bt+((h&(1<<vt+wt)-1)>>vt)],gt=Ct>>>24,_t=Ct>>>16&255,yt=65535&Ct,!(d>=vt+gt);){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}h>>>=vt,d-=vt,r.back+=vt}if(h>>>=gt,d-=gt,r.back+=gt,64&_t){t.msg="invalid distance code",r.mode=ht;break}r.offset=yt,r.extra=15&_t,r.mode=st;case st:if(r.extra){for(St=r.extra;St>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}r.offset+=h&(1<<r.extra)-1,h>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ht;break}r.mode=ot;case ot:if(0===l)break t;if(g=m-l,r.offset>g){if(g=r.offset-g,g>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ht;break}g>r.wnext?(g-=r.wnext,_=r.wsize-g):_=r.wnext-g,g>r.length&&(g=r.length),mt=r.window}else mt=a,_=o-r.offset,g=r.length;g>l&&(g=l),l-=g,r.length-=g;do a[o++]=mt[_++];while(--g);0===r.length&&(r.mode=nt);break;case ut:if(0===l)break t;a[o++]=r.length,l--,r.mode=nt;break;case lt:if(r.wrap){for(;32>d;){if(0===u)break t;u--,h|=i[s++]<<d,d+=8}if(m-=l,t.total_out+=m,r.total+=m,m&&(t.adler=r.check=r.flags?w(r.check,a,m,o-m):v(r.check,a,m,o-m)),m=l,(r.flags?h:n(h))!==r.check){t.msg="incorrect data check",r.mode=ht;break}h=0,d=0}r.mode=ct;case ct:if(r.wrap&&r.flags){for(;32>d;){if(0===u)break t;u--,h+=i[s++]<<d,d+=8}if(h!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=ht;break}h=0,d=0}r.mode=ft;case ft:xt=z;break t;case ht:xt=B;break t;case dt:return N;case pt:default:return F}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=u,r.hold=h,r.bits=d,(r.wsize||m!==t.avail_out&&r.mode<ht&&(r.mode<lt||e!==C))&&f(t,t.output,t.next_out,m-t.avail_out)?(r.mode=dt,N):(p-=t.avail_in,m-=t.avail_out,t.total_in+=p,t.total_out+=m,r.total+=m,r.wrap&&m&&(t.adler=r.check=r.flags?w(r.check,a,m,t.next_out-m):v(r.check,a,m,t.next_out-m)),t.data_type=r.bits+(r.last?64:0)+(r.mode===q?128:0)+(r.mode===rt||r.mode===J?256:0),(0===p&&0===m||e===C)&&xt===O&&(xt=D),xt)}function d(t){if(!t||!t.state)return F;var e=t.state;return e.window&&(e.window=null),t.state=null,O}function p(t,e){var r;return t&&t.state?(r=t.state,0===(2&r.wrap)?F:(r.head=e,e.done=!1,O)):F}function m(t,e){var r,n,i,a=e.length;return t&&t.state?(r=t.state,0!==r.wrap&&r.mode!==K?F:r.mode===K&&(n=1,n=v(n,e,a,0),n!==r.check)?B:(i=f(t,e,a,a))?(r.mode=dt,N):(r.havedict=1,O)):F}var g,_,y=t("../utils/common"),v=t("./adler32"),w=t("./crc32"),b=t("./inffast"),k=t("./inftrees"),x=0,A=1,S=2,C=4,E=5,I=6,O=0,z=1,T=2,F=-2,B=-3,N=-4,D=-5,j=8,R=1,L=2,U=3,P=4,M=5,W=6,Z=7,H=8,Y=9,G=10,K=11,q=12,V=13,X=14,J=15,$=16,Q=17,tt=18,et=19,rt=20,nt=21,it=22,at=23,st=24,ot=25,ut=26,lt=27,ct=28,ft=29,ht=30,dt=31,pt=32,mt=852,gt=592,_t=15,yt=_t,vt=!0;r.inflateReset=s,r.inflateReset2=o,r.inflateResetKeep=a,r.inflateInit=l,r.inflateInit2=u,r.inflate=h,r.inflateEnd=d,r.inflateGetHeader=p,r.inflateSetDictionary=m,r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=15,a=852,s=592,o=0,u=1,l=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],d=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,p,m,g,_,y){var v,w,b,k,x,A,S,C,E,I=y.bits,O=0,z=0,T=0,F=0,B=0,N=0,D=0,j=0,R=0,L=0,U=null,P=0,M=new n.Buf16(i+1),W=new n.Buf16(i+1),Z=null,H=0;for(O=0;i>=O;O++)M[O]=0;for(z=0;p>z;z++)M[e[r+z]]++;for(B=I,F=i;F>=1&&0===M[F];F--);if(B>F&&(B=F),0===F)return m[g++]=20971520,m[g++]=20971520,y.bits=1,0;for(T=1;F>T&&0===M[T];T++);for(T>B&&(B=T),j=1,O=1;i>=O;O++)if(j<<=1,j-=M[O],0>j)return-1;if(j>0&&(t===o||1!==F))return-1;for(W[1]=0,O=1;i>O;O++)W[O+1]=W[O]+M[O];for(z=0;p>z;z++)0!==e[r+z]&&(_[W[e[r+z]]++]=z);if(t===o?(U=Z=_,A=19):t===u?(U=c,P-=257,Z=f,H-=257,A=256):(U=h,Z=d,A=-1),L=0,z=0,O=T,x=g,N=B,D=0,b=-1,R=1<<B,k=R-1,t===u&&R>a||t===l&&R>s)return 1;for(var Y=0;;){Y++,S=O-D,_[z]<A?(C=0,E=_[z]):_[z]>A?(C=Z[H+_[z]],E=U[P+_[z]]):(C=96,E=0),v=1<<O-D,w=1<<N,T=w;do w-=v,m[x+(L>>D)+w]=S<<24|C<<16|E|0;while(0!==w);for(v=1<<O-1;L&v;)v>>=1;if(0!==v?(L&=v-1,L+=v):L=0,z++,0===--M[O]){if(O===F)break;O=e[r+_[z]]}if(O>B&&(L&k)!==b){for(0===D&&(D=B),x+=T,N=O-D,j=1<<N;F>N+D&&(j-=M[N+D],!(0>=j));)N++,j<<=1;if(R+=1<<N,t===u&&R>a||t===l&&R>s)return 1;b=L&k,m[b]=B<<24|N<<16|x-g|0}}return 0!==L&&(m[x+L]=O-D<<24|64<<16|0),y.bits=B,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function a(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return 256>t?ut[t]:ut[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function u(t,e,r){t.bi_valid>V-r?(t.bi_buf|=e<<t.bi_valid&65535,o(t,t.bi_buf),t.bi_buf=e>>V-t.bi_valid,t.bi_valid+=r-V):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function l(t,e,r){u(t,r[2*e],r[2*e+1])}function c(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function f(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function h(t,e){var r,n,i,a,s,o,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,f=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;q>=a;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;K>r;r++)n=t.heap[r],a=u[2*u[2*n+1]+1]+1,a>p&&(a=p,m++),u[2*n+1]=a,n>l||(t.bl_count[a]++,s=0,n>=d&&(s=h[n-d]),o=u[2*n],t.opt_len+=o*(a+s),f&&(t.static_len+=o*(c[2*n+1]+s)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)i=t.heap[--r],i>l||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}function d(t,e,r){var n,i,a=new Array(q+1),s=0;for(n=1;q>=n;n++)a[n]=s=s+r[n-1]<<1;for(i=0;e>=i;i++){var o=t[2*i+1];0!==o&&(t[2*i]=c(a[o]++,o))}}function p(){var t,e,r,n,a,s=new Array(q+1);for(r=0,n=0;W-1>n;n++)for(ct[n]=r,t=0;t<1<<et[n];t++)lt[r++]=n;for(lt[r-1]=n,a=0,n=0;16>n;n++)for(ft[n]=a,t=0;t<1<<rt[n];t++)ut[a++]=n;for(a>>=7;Y>n;n++)for(ft[n]=a<<7,t=0;t<1<<rt[n]-7;t++)ut[256+a++]=n;for(e=0;q>=e;e++)s[e]=0;for(t=0;143>=t;)st[2*t+1]=8,t++,s[8]++;for(;255>=t;)st[2*t+1]=9,t++,s[9]++;for(;279>=t;)st[2*t+1]=7,t++,s[7]++;for(;287>=t;)st[2*t+1]=8,t++,s[8]++;for(d(st,H+1,s),t=0;Y>t;t++)ot[2*t+1]=5,ot[2*t]=c(t,5);ht=new i(st,et,Z+1,H,q),dt=new i(ot,rt,0,Y,q),pt=new i(new Array(0),nt,0,G,X)}function m(t){var e;for(e=0;H>e;e++)t.dyn_ltree[2*e]=0;for(e=0;Y>e;e++)t.dyn_dtree[2*e]=0;for(e=0;G>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*J]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function g(t){t.bi_valid>8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function _(t,e,r,n){g(t),n&&(o(t,r),o(t,~r)),F.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function y(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function v(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&y(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!y(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function w(t,e,r){var n,i,a,o,c=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?l(t,i,e):(a=lt[i],l(t,a+Z+1,e),o=et[a],0!==o&&(i-=ct[a],u(t,i,o)),n--,a=s(n),l(t,a,r),o=rt[a],0!==o&&(n-=ft[a],u(t,n,o)));while(c<t.last_lit);l(t,J,e)}function b(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=K,r=0;u>r;r++)0!==a[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>l?++l:0,a[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=l,r=t.heap_len>>1;r>=1;r--)v(t,a,r);i=u;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],v(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,v(t,a,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],h(t,e),d(a,l,t.bl_count)}function k(t,e,r){var n,i,a=-1,s=e[1],o=0,u=7,l=4;for(0===s&&(u=138,l=3),e[2*(r+1)+1]=65535,n=0;r>=n;n++)i=s,s=e[2*(n+1)+1],++o<u&&i===s||(l>o?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*$]++):10>=o?t.bl_tree[2*Q]++:t.bl_tree[2*tt]++,o=0,a=i,0===s?(u=138,l=3):i===s?(u=6,l=3):(u=7,l=4))}function x(t,e,r){var n,i,a=-1,s=e[1],o=0,c=7,f=4;for(0===s&&(c=138,f=3),n=0;r>=n;n++)if(i=s,s=e[2*(n+1)+1],!(++o<c&&i===s)){if(f>o){do l(t,i,t.bl_tree);while(0!==--o)}else 0!==i?(i!==a&&(l(t,i,t.bl_tree),o--),l(t,$,t.bl_tree),u(t,o-3,2)):10>=o?(l(t,Q,t.bl_tree),u(t,o-3,3)):(l(t,tt,t.bl_tree),u(t,o-11,7));o=0,a=i,0===s?(c=138,f=3):i===s?(c=6,f=3):(c=7,f=4)}}function A(t){var e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),b(t,t.bl_desc),e=G-1;e>=3&&0===t.bl_tree[2*it[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function S(t,e,r,n){var i;for(u(t,e-257,5),u(t,r-1,5),u(t,n-4,4),i=0;n>i;i++)u(t,t.bl_tree[2*it[i]+1],3);x(t,t.dyn_ltree,e-1),x(t,t.dyn_dtree,r-1)}function C(t){var e,r=4093624447;for(e=0;31>=e;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return N;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return D;for(e=32;Z>e;e++)if(0!==t.dyn_ltree[2*e])return D;return N}function E(t){mt||(p(),mt=!0),t.l_desc=new a(t.dyn_ltree,ht),t.d_desc=new a(t.dyn_dtree,dt),t.bl_desc=new a(t.bl_tree,pt),t.bi_buf=0,t.bi_valid=0,m(t)}function I(t,e,r,n){u(t,(R<<1)+(n?1:0),3),_(t,e,r,!0)}function O(t){u(t,L<<1,3),l(t,J,st),f(t)}function z(t,e,r,n){var i,a,s=0;t.level>0?(t.strm.data_type===j&&(t.strm.data_type=C(t)),b(t,t.l_desc),b(t,t.d_desc),s=A(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,i>=a&&(i=a)):i=a=r+5,i>=r+4&&-1!==e?I(t,e,r,n):t.strategy===B||a===i?(u(t,(L<<1)+(n?1:0),3),w(t,st,ot)):(u(t,(U<<1)+(n?1:0),3),S(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),w(t,t.dyn_ltree,t.dyn_dtree)),m(t),n&&g(t)}function T(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(lt[r]+Z+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var F=t("../utils/common"),B=4,N=0,D=1,j=2,R=0,L=1,U=2,P=3,M=258,W=29,Z=256,H=Z+1+W,Y=30,G=19,K=2*H+1,q=15,V=16,X=7,J=256,$=16,Q=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],rt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],at=512,st=new Array(2*(H+2));n(st);var ot=new Array(2*Y);n(ot);var ut=new Array(at);n(ut);var lt=new Array(M-P+1);n(lt);var ct=new Array(W);n(ct);var ft=new Array(Y);n(ft);var ht,dt,pt,mt=!1;r._tr_init=E,r._tr_stored_block=I,r._tr_flush_block=z,r._tr_tally=T,r._tr_align=O},{"../utils/common":41}],53:[function(t,e,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}]},{},[10])(10)});var saveAs=saveAs||function(t){"use strict";if(!("undefined"==typeof t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=t.document,r=function(){return t.URL||t.webkitURL||t},n=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in n,a=function(t){var e=new MouseEvent("click");t.dispatchEvent(e)},s=/constructor/i.test(t.HTMLElement),o=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},l="application/octet-stream",c=4e4,f=function(t){var e=function(){"string"==typeof t?r().revokeObjectURL(t):t.remove()};setTimeout(e,c)},h=function(t,e,r){e=[].concat(e);for(var n=e.length;n--;){var i=t["on"+e[n]];if("function"==typeof i)try{i.call(t,r||t)}catch(a){u(a)}}},d=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},p=function(e,u,c){c||(e=d(e));var p,m=this,g=e.type,_=g===l,y=function(){h(m,"writestart progress write writeend".split(" "))},v=function(){if((o||_&&s)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=o?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;"),r=t.open(e,"_blank");r||(t.location.href=e),e=void 0,m.readyState=m.DONE,y()},n.readAsDataURL(e),void(m.readyState=m.INIT)}if(p||(p=r().createObjectURL(e)),_)t.location.href=p;else{var i=t.open(p,"_blank");i||(t.location.href=p)}m.readyState=m.DONE,y(),f(p)};return m.readyState=m.INIT,i?(p=r().createObjectURL(e),void setTimeout(function(){n.href=p,n.download=u,a(n),y(),f(p),m.readyState=m.DONE})):void v()},m=p.prototype,g=function(t,e,r){return new p(t,e||t.name||"download",r)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,r){return e=e||t.name||"download",r||(t=d(t)),navigator.msSaveOrOpenBlob(t,e)}:(m.abort=function(){},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,g)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define([],function(){return saveAs});
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosServiceGrid.js b/xos/core/xoslib/static/js/xosServiceGrid.js
index 698d8ef..6c6acb1 100644
--- a/xos/core/xoslib/static/js/xosServiceGrid.js
+++ b/xos/core/xoslib/static/js/xosServiceGrid.js
@@ -1 +1 @@
-"use strict";angular.module("xos.serviceGrid",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("serviceGrid",{url:"/",template:"<service-grid></service-grid>"}).state("serviceGraph",{url:"/graph",template:"<service-graph></service-graph>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("serviceGrid",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-grid.tpl.html",controller:["Services","_",function(e,t){var n=this;this.tableConfig={columns:[{label:"Status",prop:"status",type:"icon",formatter:function(e){var t=parseInt(e.backend_status.match(/^[0-9]/)[0]);switch(t){case 0:return"time";case 1:return"ok";case 2:return"remove"}}},{label:"Name",prop:"name",link:function(e){return""+e.view_url.replace(/\$[a-z]+\$/,e.id)}},{label:"Kind",prop:"kind"},{label:"Enabled",prop:"enabled",type:"boolean"}],filter:"field",order:{field:"name"}},e.query().$promise.then(function(e){n.services=t.map(e,function(e){return e.status=0!==parseInt(e.backend_status.match(/^[0-9]/)[0]),e})})["catch"](function(e){throw new Error(e)})}]}}),angular.module("xos.serviceGrid").run(["$templateCache",function(e){e.put("templates/service-graph.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <h1>Graph</h1>\n <ul>\n <li>Use D3 to create a service chart based on coarse services?</li>\n </ul>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <a href="#/" class="btn btn-default btn-block">\n Service List\n </a>\n </div>\n</div>'),e.put("templates/service-grid.tpl.html",'<div class="row">\n <div class="col-md-10 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.services"></xos-table>\n </div>\n <div class="col-md-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <!-- <a href="#/graph" class="btn btn-default btn-block">\n Tenancy Graph\n </a> -->\n </div>\n</div>')}]),function(){angular.module("xos.serviceGrid").directive("serviceGraph",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-graph.tpl.html",controller:["$element","GraphService",function(e,t){var n=void 0,r=e[0],i=void 0,s=void 0,a=function(e){i.attr({transform:function(e){return"translate("+e.x+", "+e.y+")"}}),s.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})};t.loadCoarseData().then(function(e){e.tenants=e.tenants.map(function(e){return{source:e.provider_service,target:e.subscriber_service}}),e.services.push({name:"XOS","class":"xos",x:r.clientWidth/2,y:r.clientHeight/2,fixed:!0}),c(r);var t=d3.layout.force().nodes(e.services).links(e.tenants).charge(-1060).gravity(.1).linkDistance(200).size([r.clientWidth,r.clientHeight]).on("tick",a).start();s=n.selectAll(".link").data(e.tenants).enter().insert("line").attr("class","link"),i=n.selectAll(".node").data(e.services).enter().append("g").call(t.drag).on("mousedown",function(){d3.event.stopPropagation()}),i.append("circle").attr({"class":function(e){return"node "+(e["class"]||"")},r:10}),i.append("text").attr({"text-anchor":"middle"}).text(function(e){return e.name}),i.select("circle").attr({r:function(e){var t=d3.select(this).node().parentNode,n=d3.select(t).select("text").node().getBBox();return n.width/2+10}})});var c=function(e){d3.select(e).select("svg").remove(),n=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px")}}]}})}(),angular.module("xos.serviceGrid").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
+"use strict";angular.module("xos.serviceGrid",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("serviceGrid",{url:"/",template:"<service-grid></service-grid>"}).state("serviceGraph",{url:"/graph",template:"<service-graph></service-graph>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("serviceGrid",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-grid.tpl.html",controller:["Services","ToscaEncoder","_",function(e,t,r){var n=this;this.tableConfig={columns:[{label:"Status",prop:"status",type:"icon",formatter:function(e){var t=parseInt(e.backend_status.match(/^[0-9]/)[0]);switch(t){case 0:return"time";case 1:return"ok";case 2:return"remove"}}},{label:"Name",prop:"name",link:function(e){return""+e.view_url.replace(/\$[a-z]+\$/,e.id)}},{label:"Kind",prop:"kind"},{label:"Enabled",prop:"enabled",type:"boolean"}],filter:"field",order:{field:"name"},actions:[{label:"export",icon:"export",cb:function(e){n.tosca="",t.serviceToTosca(e).then(function(e){n.showFeedback=!0,n.tosca=e})}}]},e.query().$promise.then(function(e){n.services=r.map(e,function(e){return e.status=0!==parseInt(e.backend_status.match(/^[0-9]/)[0]),e})})["catch"](function(e){throw new Error(e)})}]}}),function(){angular.module("xos.serviceGrid").service("ToscaEncoder",["$q","_","ArchiveManager","ServiceEncoder","SlicesEncoder",function(e,t,r,n,i){var o=this,a={tosca_definitions_version:"tosca_simple_yaml_1_0",description:"",imports:["custom_types/xos.yaml"],topology_template:{node_templates:{}}};this.toYml=function(e){return jsyaml.dump(e).replace(/'/g,"")},this["export"]=function(e){r.download(e.name);var t=o.toYml(a);return t},this.serviceToTosca=function(t){r.createArchive(),a.topology_template.node_templates={},a.description="Just enough Tosca to get the "+t.humanReadableName+" service up and running";var s=e.defer();return n.formatServiceProperties(t,a).then(function(e){return i.getServiceSlices(t,e)}).then(function(e){return n.getServiceRequirements(t,e)}).then(function(e){r.addFile(t.name+"_service.yaml",o.toYml(e)),o["export"](t),s.resolve(o.toYml(e))})["catch"](function(e){s.reject(e)}),s.promise}}])}(),angular.module("xos.serviceGrid").run(["$templateCache",function(e){e.put("templates/service-graph.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <h1>Graph</h1>\n <ul>\n <li>Use D3 to create a service chart based on coarse services?</li>\n </ul>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <a href="#/" class="btn btn-default btn-block">\n Service List\n </a>\n </div>\n</div>'),e.put("templates/service-grid.tpl.html",'<div class="row">\n <div class="col-md-10 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.services"></xos-table>\n </div>\n <div class="col-md-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <!-- <a href="#/graph" class="btn btn-default btn-block">\n Tenancy Graph\n </a> -->\n </div>\n</div>\n\n<div class="row">\n <div class="col-xs-12">\n <div class="alert alert-info" ng-show="vm.showFeedback">\n Remember that you should copy any key artifact inside the container in <pre>/opt/xos/tosca</pre>!\n </div>\n </div>\n</div>\n\n<pre ng-show="vm.tosca">\n{{vm.tosca}}\n</pre>')}]);var _slicedToArray=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.serviceGrid").service("SlicesEncoder",["$q","_","Slices","SiteEncoder","ImageEncoder","NetworkEncoder",function(e,t,r,n,i,o){var a=this;this.buildTosca=function(r,a,s){var c={},l=e.defer();return r=t.reduce(r,function(e,t){if(e[t.name]={type:"tosca.nodes.Slice",properties:{network:t.network},requirements:[{management:{node:"management",relationship:"tosca.relationships.ConnectsToNetwork"}}]},angular.isDefined(s)){var r={};r[s+"_service"]={node:"service#"+s,relationship:"tosca.relationships.MemberOfService"},e[t.name].requirements.push(r)}return angular.isDefined(t.description)&&(e[t.name].description=t.description),angular.isDefined(t.site)&&(c[t.name+"#site"]=n.buildTosca(t.site,a)),angular.isDefined(t.default_image)&&(c[t.name+"#image"]=i.buildTosca(t.default_image,a)),angular.isDefined(t.networks)&&t.networks.length>0&&(c[t.name+"#management"]=o.getSliceNetworks(t,a)),e},{}),Object.keys(c).length>0?!function(){var t={site:"tosca.relationships.MemberOfSite",image:"tosca.relationships.DefaultImage"};a.topology_template.node_templates.management={type:"tosca.nodes.network.Network.XOS",properties:{"no-create":!0,"no-delete":!0,"no-update":!0}},e.all(c).then(function(e){var n=!0,i=!1,o=void 0;try{for(var s,c=Object.keys(e)[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var u=s.value,d=u.split("#"),p=_slicedToArray(d,2),v=p[0],m=p[1];if(angular.isDefined(t[m])){r[v].requirements||(r[v].requirements=[]);var f=_slicedToArray(e[u],2),h=f[0],g=f[1],y={},_=void 0;_="site"===m?g.name:m+"#"+g.name,y[m]={node:_,relationship:t[m]},r[v].requirements.push(y),angular.extend(a,h)}}}catch(b){i=!0,o=b}finally{try{!n&&c["return"]&&c["return"]()}finally{if(i)throw o}}angular.extend(a.topology_template.node_templates,r),l.resolve(a)})["catch"](function(e){throw new Error(e)})}():(angular.extend(a.topology_template.node_templates,r),l.resolve(a)),l.promise},this.getServiceSlices=function(t,n){var i=e.defer();return r.query({service:t.id}).$promise.then(function(e){return a.buildTosca(e,n,t.name)}).then(function(e){i.resolve(e)}),i.promise}}])}(),function(){angular.module("xos.serviceGrid").service("SiteEncoder",["$q","Sites",function(e,t){this.buildTosca=function(r,n){var i=e.defer();return t.get({id:r}).$promise.then(function(e){var t={};t[""+e.name]={type:"tosca.nodes.Site"},angular.extend(n.topology_template.node_templates,t),i.resolve([n,e])})["catch"](i.reject),i.promise}}])}(),function(){angular.module("xos.serviceGrid").service("ServiceEncoder",["$q","ArchiveManager","Tenants","Services",function(e,t,r,n){var i={fabric:"tosca.nodes.FabricService",onos:"tosca.nodes.ONOSService",vCPE:"tosca.nodes.VSGService",vOLT:"tosca.nodes.VOLTService",vROUTER:"tosca.nodes.VRouterService",VTN:"tosca.nodes.VTNService",vTR:"tosca.nodes.Service"};this.formatServiceProperties=function(r,n){var o=e.defer(),a="service#"+r.name;n.topology_template.node_templates[a]={},n.topology_template.node_templates[a].type=i[r.kind]||"tosca.nodes.Service";var s={properties:{kind:r.kind}};return angular.isDefined(r.view_url)&&(s.properties.view_url=r.view_url),angular.isDefined(r.icon_url)&&(s.properties.icon_url=r.icon_url),angular.isDefined(r.private_key_fn)&&(s.properties.private_key_fn=r.private_key_fn),angular.isDefined(r.public_key)&&(t.addFile(r.name+"_rsa.pub",r.public_key),s.properties.public_key="{ get_artifact: [ SELF, pubkey, LOCAL_FILE] }",s.artifacts={pubkey:"/opt/xos/tosca/"+r.name+"/"+r.name+"_rsa.pub"},n.topology_template.node_templates[a].artifacts=s.artifacts),n.topology_template.node_templates[a].properties=s.properties,o.resolve(n),o.promise},this.getServiceRequirements=function(t,i){var o=e.defer();return r.query({subscriber_service:t.id}).$promise.then(function(t){var r=[];return t=_.uniqBy(t,"provider_service"),_.forEach(t,function(e){r.push(n.get({id:e.provider_service}).$promise)}),e.all(r)}).then(function(e){var r=_.reduce(e,function(e,t){return e.concat(t.name)},[]);if(r=_.reduce(r,function(e,t){var r=t+"_tenant",n={};return n[r]={node:"service#"+t,relationship:"tosca.relationships.TenantOfService"},e.concat(n)},[]),r.length>0){_.forEach(r,function(e){var t=e[Object.keys(e)[0]].node;i.topology_template.node_templates[t]={type:"tosca.nodes.Service",properties:{"no-create":!0,"no-delete":!0,"no-update":!0}}});var n="service#"+t.name;i.topology_template.node_templates[n].requirements=r}o.resolve(i)}),o.promise}}])}(),function(){angular.module("xos.serviceGrid").directive("serviceGraph",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-graph.tpl.html",controller:["$element","GraphService",function(e,t){var r=void 0,n=e[0],i=void 0,o=void 0,a=function(e){i.attr({transform:function(e){return"translate("+e.x+", "+e.y+")"}}),o.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})};t.loadCoarseData().then(function(e){e.tenants=e.tenants.map(function(e){return{source:e.provider_service,target:e.subscriber_service}}),e.services.push({name:"XOS","class":"xos",x:n.clientWidth/2,y:n.clientHeight/2,fixed:!0}),s(n);var t=d3.layout.force().nodes(e.services).links(e.tenants).charge(-1060).gravity(.1).linkDistance(200).size([n.clientWidth,n.clientHeight]).on("tick",a).start();o=r.selectAll(".link").data(e.tenants).enter().insert("line").attr("class","link"),i=r.selectAll(".node").data(e.services).enter().append("g").call(t.drag).on("mousedown",function(){d3.event.stopPropagation()}),i.append("circle").attr({"class":function(e){return"node "+(e["class"]||"")},r:10}),i.append("text").attr({"text-anchor":"middle"}).text(function(e){return e.name}),i.select("circle").attr({r:function(e){var t=d3.select(this).node().parentNode,r=d3.select(t).select("text").node().getBBox();return r.width/2+10}})});var s=function(e){d3.select(e).select("svg").remove(),r=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px")}}]}})}();var _slicedToArray=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();!function(){angular.module("xos.serviceGrid").service("NetworkEncoder",["$q","Networks","NetworkTemplateEncoder",function(e,t,r){var n=this;this.buildTosca=function(t,n){var i=angular.copy(t),o={},a=e.defer();try{t=_.reduce(t,function(e,t){return e["network#"+t.name]={type:"tosca.nodes.network.Network.XOS",requirements:[]},angular.isDefined(t.slices)&&(_.forEach(t.slices,function(r){var n={owner:{node:r.name,relationship:"tosca.relationships.MemberOfSlice"}},i={connection:{node:r.name,relationship:"tosca.relationships.ConnectsToSlice"}};e["network#"+t.name].requirements.push(n,i)}),angular.isDefined(t.template)&&(o[t.name]=r.buildTosca(t.template,n))),e},{}),Object.keys(o).length>0?e.all(o).then(function(e){if(e){var r=!0,o=!1,s=void 0;try{for(var c,l=Object.keys(e)[Symbol.iterator]();!(r=(c=l.next()).done);r=!0){var u=c.value,d=_slicedToArray(e[u],2),p=d[0],v=d[1];t["network#"+u].requirements.push({network_template:{node:"network_template#"+v.name,relationship:"tosca.relationships.UsesNetworkTemplate"}}),angular.extend(n,p)}}catch(m){o=!0,s=m}finally{try{!r&&l["return"]&&l["return"]()}finally{if(o)throw s}}}angular.extend(n.topology_template.node_templates,t),a.resolve([n,i])})["catch"](function(e){throw new Error(e)}):(angular.extend(n.topology_template.node_templates,t),a.resolve([n,i]))}catch(s){a.reject(s)}return a.promise},this.getSliceNetworks=function(r,i){var o=e.defer();return t.query({owner:r.id}).$promise.then(function(e){e=_.filter(e,function(e){return-1!==r.networks.indexOf(e.id)}),e=e.map(function(e){var t=e.slices.indexOf(r.id);return e.slices[t]=r,e}),n.buildTosca(e,i).then(o.resolve)["catch"](o.reject)}),o.promise}}])}(),function(){angular.module("xos.serviceGrid").service("NetworkTemplateEncoder",["$q","Networkstemplates",function(e,t){this.buildTosca=function(r,n){var i=e.defer();return t.get({id:r}).$promise.then(function(e){var t={};t["network_template#"+e.name]={type:"tosca.nodes.NetworkTemplate"},angular.extend(n.topology_template.node_templates,t),i.resolve([n,e])})["catch"](function(e){i.reject(e)}),i.promise}}])}(),function(){angular.module("xos.serviceGrid").service("ImageEncoder",["$q","Images",function(e,t){this.buildTosca=function(r,n){var i=e.defer();return t.get({id:r}).$promise.then(function(e){var t={};t["image#"+e.name]={type:"tosca.nodes.Image"},angular.extend(n.topology_template.node_templates,t),i.resolve([n,e])})["catch"](i.reject),i.promise}}])}(),function(){angular.module("xos.serviceGrid").service("ArchiveManager",function(){var e=this;this.createArchive=function(){e.archive=new JSZip},this.addFile=function(t,r){e.archive.file(t,r)},this.download=function(t){console.log(e.archive),e.archive.generateAsync({type:"blob"}).then(function(e){saveAs(e,t+".zip")})["catch"](function(e){console.log(e)})}})}(),angular.module("xos.serviceGrid").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file