diff --git a/dist/cli/Builder.js b/dist/cli/Builder.js
index f2879539..3ee0dc3b 100755
--- a/dist/cli/Builder.js
+++ b/dist/cli/Builder.js
@@ -4,14 +4,6 @@ var _fsExtra = require('fs-extra');
var _fsExtra2 = _interopRequireDefault(_fsExtra);
-var _extend = require('extend');
-
-var _extend2 = _interopRequireDefault(_extend);
-
-var _mkdirp = require('mkdirp');
-
-var _mkdirp2 = _interopRequireDefault(_mkdirp);
-
var _Save = require('./controllers/Save');
var _path = require('path');
diff --git a/dist/cli/Create.js b/dist/cli/Create.js
index d4016fe3..138f244c 100755
--- a/dist/cli/Create.js
+++ b/dist/cli/Create.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -27,43 +27,43 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Create = function () {
- function Create() {
- _classCallCheck(this, Create);
- }
-
- _createClass(Create, [{
- key: 'init',
- value: function init(path) {
- var _this = this;
-
- path = path.split('/');
- path[path.length - 1] = (0, _slugify2.default)(path[path.length - 1]);
- path = path.join('/');
- this.addFolder(path).then(function () {
- process.chdir(path);
- _this.addFolder(_.config.publish.url);
- _this.addFolder(_.config.templates.url);
- _this.addFolder(_.config.structure.url);
- _this.addFolder(_.config.reference.url);
- _this.addFolder(_.config.data.url);
- _this.addFolder(_.config.draft.url);
- }).catch(function (e) {
- console.error(e);
- });
- }
- }, {
- key: 'addFolder',
- value: function addFolder(folder) {
- var p = new _es6Promise.Promise(function (resolve, reject) {
- (0, _mkdirp2.default)(folder);
- resolve();
- });
-
- return p;
- }
- }]);
-
- return Create;
+ function Create() {
+ _classCallCheck(this, Create);
+ }
+
+ _createClass(Create, [{
+ key: 'init',
+ value: function init(path) {
+ var _this = this;
+
+ path = path.split('/');
+ path[path.length - 1] = (0, _slugify2.default)(path[path.length - 1]);
+ path = path.join('/');
+ this.addFolder(path).then(function () {
+ process.chdir(path);
+ _this.addFolder(_.config.publish.url);
+ _this.addFolder(_.config.templates.url);
+ _this.addFolder(_.config.structure.url);
+ _this.addFolder(_.config.reference.url);
+ _this.addFolder(_.config.data.url);
+ _this.addFolder(_.config.draft.url);
+ }).catch(function (e) {
+ console.error(e);
+ });
+ }
+ }, {
+ key: 'addFolder',
+ value: function addFolder(folder) {
+ var p = new _es6Promise.Promise(function (resolve, reject) {
+ (0, _mkdirp2.default)(folder);
+ resolve();
+ });
+
+ return p;
+ }
+ }]);
+
+ return Create;
}();
exports.default = Create;
\ No newline at end of file
diff --git a/dist/cli/config/abe-config.js b/dist/cli/config/abe-config.js
index 98380ae1..55fd5bc9 100755
--- a/dist/cli/config/abe-config.js
+++ b/dist/cli/config/abe-config.js
@@ -46,27 +46,27 @@ var config = {
},
security: true,
htmlWhiteList: {
- "blockquote": ["style"],
- "span": ["style"],
- "font": ["style", "color"],
- "div": ["style"],
- "sup": ["style"],
- "sub": ["style"],
- "ul": ["style"],
- "li": ["style"],
- "p": ["style"],
- "b": ["style"],
- "strong": ["style"],
- "i": ["style"],
- "u": ["style"],
- "a": ["style", "href"],
- "br": [],
- "h1": ["style"],
- "h2": ["style"],
- "h3": ["style"],
- "h4": ["style"],
- "pre": ["style"],
- "code": ["style"]
+ 'blockquote': ['style'],
+ 'span': ['style'],
+ 'font': ['style', 'color'],
+ 'div': ['style'],
+ 'sup': ['style'],
+ 'sub': ['style'],
+ 'ul': ['style'],
+ 'li': ['style'],
+ 'p': ['style'],
+ 'b': ['style'],
+ 'strong': ['style'],
+ 'i': ['style'],
+ 'u': ['style'],
+ 'a': ['style', 'href'],
+ 'br': [],
+ 'h1': ['style'],
+ 'h2': ['style'],
+ 'h3': ['style'],
+ 'h4': ['style'],
+ 'pre': ['style'],
+ 'code': ['style']
},
files: {
exclude: /^[.]/,
diff --git a/dist/cli/controllers/Save.js b/dist/cli/controllers/Save.js
index b670f9e4..b4fb8e0d 100755
--- a/dist/cli/controllers/Save.js
+++ b/dist/cli/controllers/Save.js
@@ -64,7 +64,7 @@ function checkRequired(text, json) {
} else {
complete++;
}
- } else {}
+ }
}
}
});
@@ -197,12 +197,6 @@ function save(url, tplPath) {
return p;
}
-function splitArray(ar, chunkSize) {
- return [].concat.apply([], ar.map(function (elem, i) {
- return i % chunkSize ? [] : [ar.slice(i, i + chunkSize)];
- }));
-}
-
function saveJsonAndHtml(templateId, obj, html) {
var page = new _.Page(templateId, html, obj.json.content, true);
@@ -226,7 +220,7 @@ function saveJson(url, json) {
var eachRecursive = function eachRecursive(obj) {
for (var k in obj) {
- if (_typeof(obj[k]) === "object" && obj[k] !== null) eachRecursive(obj[k]);else if (typeof obj[k] !== "undefined" && obj[k] !== null) obj[k] = (0, _xss2.default)(obj[k].toString().replace(/"/g, '"'), { "whiteList": _.config.htmlWhiteList });
+ if (_typeof(obj[k]) === 'object' && obj[k] !== null) eachRecursive(obj[k]);else if (typeof obj[k] !== 'undefined' && obj[k] !== null) obj[k] = (0, _xss2.default)(obj[k].toString().replace(/"/g, '"'), { 'whiteList': _.config.htmlWhiteList });
}
};
@@ -253,11 +247,8 @@ function dateIso(tplUrl) {
var newDateISO;
var dateISO;
- var validate;
-
var saveJsonFile = tplUrl.json.path;
var saveFile = tplUrl['draft'].path;
- var oldDateISO = _.fileAttr.get(saveFile).d;
switch (type) {
case 'draft':
diff --git a/dist/cli/handlebars/abe/abeEngine.js b/dist/cli/handlebars/abe/abeEngine.js
index e3d8adaf..c4ffe4d0 100755
--- a/dist/cli/handlebars/abe/abeEngine.js
+++ b/dist/cli/handlebars/abe/abeEngine.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
@@ -15,12 +15,12 @@ var abeEngine = function () {
function abeEngine(enforcer) {
_classCallCheck(this, abeEngine);
- if (enforcer != singletonEnforcer) throw "Cannot construct Json singleton";
+ if (enforcer != singletonEnforcer) throw 'Cannot construct Json singleton';
this._content = {};
}
_createClass(abeEngine, [{
- key: "content",
+ key: 'content',
get: function get() {
return this._content;
},
@@ -28,7 +28,7 @@ var abeEngine = function () {
this._content = content;
}
}], [{
- key: "instance",
+ key: 'instance',
get: function get() {
if (!this[singleton]) {
this[singleton] = new abeEngine(singletonEnforcer);
diff --git a/dist/cli/handlebars/abe/abeImport.js b/dist/cli/handlebars/abe/abeImport.js
index 5576a963..41c0d88d 100644
--- a/dist/cli/handlebars/abe/abeImport.js
+++ b/dist/cli/handlebars/abe/abeImport.js
@@ -26,8 +26,8 @@ function abeImport(file, config, ctx) {
var config = JSON.parse(config);
var intlData = config.intlData;
- var defaultPartials = __dirname.replace(/\/$/, "") + '/' + config.defaultPartials.replace(/\/$/, "");
- var custom = config.custom !== '' ? config.root.replace(/\/$/, "") + '/' + config.custom.replace(/\/$/, "") : defaultPartials;
+ var defaultPartials = __dirname.replace(/\/$/, '') + '/' + config.defaultPartials.replace(/\/$/, '');
+ var custom = config.custom !== '' ? config.root.replace(/\/$/, '') + '/' + config.custom.replace(/\/$/, '') : defaultPartials;
var pathToPartial = custom + '/' + file + '.html';
try {
var stat = _fsExtra2.default.statSync(pathToPartial);
diff --git a/dist/cli/handlebars/abe/compileAbe.js b/dist/cli/handlebars/abe/compileAbe.js
index 5af6facc..3c85dd23 100755
--- a/dist/cli/handlebars/abe/compileAbe.js
+++ b/dist/cli/handlebars/abe/compileAbe.js
@@ -44,12 +44,12 @@ function compileAbe() {
}
if (typeof hash.type !== 'undefined' && hash.type !== null && hash.type === 'rich') {
var testXSS = (0, _xss2.default)(value.replace(/"/g, '"'), {
- "whiteList": _.config.htmlWhiteList,
+ 'whiteList': _.config.htmlWhiteList,
stripIgnoreTag: true
});
return new _handlebars2.default.SafeString(testXSS);
}
- return value.replace(/%27/, "'");
+ return value.replace(/%27/, '\'');
}
var key = arguments[0].hash['key'].replace('.', '-');
@@ -62,10 +62,10 @@ function compileAbe() {
if (typeof hash.type !== 'undefined' && hash.type !== null && hash.type === 'rich') {
var testXSS = (0, _xss2.default)(value.replace(/"/g, '"'), {
- "whiteList": _.config.htmlWhiteList,
+ 'whiteList': _.config.htmlWhiteList,
stripIgnoreTag: true
});
return new _handlebars2.default.SafeString(testXSS);
}
- return value.replace(/%27/, "'");
+ return value.replace(/%27/, '\'');
}
\ No newline at end of file
diff --git a/dist/cli/handlebars/abe/folders.js b/dist/cli/handlebars/abe/folders.js
index 26453eb5..1b82a4af 100755
--- a/dist/cli/handlebars/abe/folders.js
+++ b/dist/cli/handlebars/abe/folders.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = folders;
@@ -12,13 +12,13 @@ var _recursiveFolder2 = _interopRequireDefault(_recursiveFolder);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function folders(obj, index, link) {
- var res;
- if (typeof link !== 'undefined' && link !== null && link !== 'null') {
- var links = link.replace(/^\//, '').split('/');
- links.pop();
- res = (0, _recursiveFolder2.default)(obj, 1, '', links);
- } else {
- res = (0, _recursiveFolder2.default)(obj, 1);
- }
- return res;
+ var res;
+ if (typeof link !== 'undefined' && link !== null && link !== 'null') {
+ var links = link.replace(/^\//, '').split('/');
+ links.pop();
+ res = (0, _recursiveFolder2.default)(obj, 1, '', links);
+ } else {
+ res = (0, _recursiveFolder2.default)(obj, 1);
+ }
+ return res;
}
\ No newline at end of file
diff --git a/dist/cli/handlebars/abe/listPage.js b/dist/cli/handlebars/abe/listPage.js
index 3eff6b44..e16c0c20 100755
--- a/dist/cli/handlebars/abe/listPage.js
+++ b/dist/cli/handlebars/abe/listPage.js
@@ -46,17 +46,21 @@ function listPage(file, index, text) {
var workflow = '';
workflow += '
';
- if (typeof file.publish === "undefined" || file.publish === null || file.publish && file.draft && file.publish.date < file.draft.date) {
- workflow += 'draft';
+ if (typeof file.draft !== 'undefined' && file.draft !== null) {
+ if (typeof file.publish === 'undefined' || file.publish === null || file.publish && file.publish.date < file.draft.date) {
+ workflow += 'draft';
+ } else {
+ workflow += 'draft';
+ }
} else {
- workflow += 'draft';
+ workflow += 'draft';
}
workflow += ' | ';
workflow += '';
if (file.publish) {
- workflow += '✔';
+ workflow += '✔';
}
workflow += ' | ';
diff --git a/dist/cli/handlebars/abe/printInput.js b/dist/cli/handlebars/abe/printInput.js
index 7bb17b0d..6a38b857 100755
--- a/dist/cli/handlebars/abe/printInput.js
+++ b/dist/cli/handlebars/abe/printInput.js
@@ -86,17 +86,17 @@ function printInput() {
res += '';
}
- } else if (params.type.indexOf("rich") >= 0) {
+ } else if (params.type.indexOf('rich') >= 0) {
commonParams = 'id="' + params.key + '"\n data-id="' + params.key + '"\n maxlength="' + params.maxLength + '"\n reload="' + params.reload + '"\n tabIndex="' + params.order + '"\n data-required="' + params.required + '"\n data-display="' + params.display + '"\n data-visible="' + params.visible + '"\n data-autocomplete="' + params.autocomplete + '"\n placeholder="' + params.placeholder + '"';
res += '';
- } else if (params.type.indexOf("file") >= 0) {
+ } else if (params.type.indexOf('file') >= 0) {
res += '\n \n ';
- } else if (params.type.indexOf("textarea") >= 0) {
+ } else if (params.type.indexOf('textarea') >= 0) {
res += '';
- } else if (params.type.indexOf("link") >= 0) {
+ } else if (params.type.indexOf('link') >= 0) {
res += '';
- } else if (params.type.indexOf("image") >= 0) {
+ } else if (params.type.indexOf('image') >= 0) {
res += '\n ';
} else {
res += '';
diff --git a/dist/cli/handlebars/abe/sourceAttr.js b/dist/cli/handlebars/abe/sourceAttr.js
index 75c834c1..ddc83143 100755
--- a/dist/cli/handlebars/abe/sourceAttr.js
+++ b/dist/cli/handlebars/abe/sourceAttr.js
@@ -15,7 +15,7 @@ function sourceAttr(val, params) {
var selected = '';
if ((typeof hiddenVal === 'undefined' ? 'undefined' : _typeof(hiddenVal)) === 'object' && Object.prototype.toString.call(hiddenVal) === '[object Object]') {
- hiddenVal = JSON.stringify(hiddenVal).replace(/'/g, "'");
+ hiddenVal = JSON.stringify(hiddenVal).replace(/'/g, ''');
try {
var displayVal = eval('val.' + params.display);
diff --git a/dist/cli/handlebars/utils/math.js b/dist/cli/handlebars/utils/math.js
index bf78fbc8..e398301f 100755
--- a/dist/cli/handlebars/utils/math.js
+++ b/dist/cli/handlebars/utils/math.js
@@ -1,18 +1,18 @@
-"use strict";
+'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = math;
function math(lvalue, operator, rvalue, options) {
- lvalue = parseFloat(lvalue);
- rvalue = parseFloat(rvalue);
+ lvalue = parseFloat(lvalue);
+ rvalue = parseFloat(rvalue);
- return {
- "+": lvalue + rvalue,
- "-": lvalue - rvalue,
- "*": lvalue * rvalue,
- "/": lvalue / rvalue,
- "%": lvalue % rvalue
- }[operator];
+ return {
+ '+': lvalue + rvalue,
+ '-': lvalue - rvalue,
+ '*': lvalue * rvalue,
+ '/': lvalue / rvalue,
+ '%': lvalue % rvalue
+ }[operator];
}
\ No newline at end of file
diff --git a/dist/cli/handlebars/utils/printJson.js b/dist/cli/handlebars/utils/printJson.js
index 1da22436..2dac2da6 100755
--- a/dist/cli/handlebars/utils/printJson.js
+++ b/dist/cli/handlebars/utils/printJson.js
@@ -1,7 +1,7 @@
-"use strict";
+'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = printJson;
@@ -9,9 +9,9 @@ exports.default = printJson;
* Handlebars helper, to print json object
*/
function printJson(obj, escapeString) {
- if (typeof obj !== 'undefined' && obj !== null) {
- return typeof escapeString !== null && escapeString !== null && escapeString === 1 ? escape(JSON.stringify(obj).replace(/'/g, "%27")) : JSON.stringify(obj).replace(/'/g, "%27");
- } else {
- return '{}';
- }
+ if (typeof obj !== 'undefined' && obj !== null) {
+ return typeof escapeString !== null && escapeString !== null && escapeString === 1 ? escape(JSON.stringify(obj).replace(/'/g, '%27')) : JSON.stringify(obj).replace(/'/g, '%27');
+ } else {
+ return '{}';
+ }
}
\ No newline at end of file
diff --git a/dist/cli/handlebars/utils/times.js b/dist/cli/handlebars/utils/times.js
index d493de33..d7832653 100644
--- a/dist/cli/handlebars/utils/times.js
+++ b/dist/cli/handlebars/utils/times.js
@@ -1,13 +1,13 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = times;
function times(n, block) {
- n = parseInt(n);
- var accum = '';
- for (var i = 0; i < n; ++i) {
- accum += block.fn(i);
- }return accum;
+ n = parseInt(n);
+ var accum = '';
+ for (var i = 0; i < n; ++i) {
+ accum += block.fn(i);
+ }return accum;
}
\ No newline at end of file
diff --git a/dist/cli/handlebars/utils/truncate.js b/dist/cli/handlebars/utils/truncate.js
index ffcbb869..0d3945c7 100644
--- a/dist/cli/handlebars/utils/truncate.js
+++ b/dist/cli/handlebars/utils/truncate.js
@@ -14,9 +14,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function truncate(str, len) {
if (typeof str !== 'undefined' && str.length > len) {
new_str = new _handlebars2.default.SafeString(str);
- var new_str = str + " ";
+ var new_str = str + ' ';
new_str = str.substr(0, len);
- new_str = str.substr(0, new_str.lastIndexOf(" "));
+ new_str = str.substr(0, new_str.lastIndexOf(' '));
new_str = new_str.length > 0 ? new_str : str.substr(0, len);
return new_str + '...';
diff --git a/dist/cli/helpers/abe-config.js b/dist/cli/helpers/abe-config.js
index 17369bca..37602301 100755
--- a/dist/cli/helpers/abe-config.js
+++ b/dist/cli/helpers/abe-config.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _fsExtra = require('fs-extra');
@@ -23,123 +23,123 @@ var _ = require('../');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var result = (0, _extend2.default)(true, _config.abeConfig, _config.abeConfigLocal);
-result.root = result.root.replace(/\/$/, "");
+result.root = result.root.replace(/\/$/, '');
var hintAbeJson = false;
var loadLocalConfig = function loadLocalConfig(result) {
- var website = result.root.replace(/\/$/, '');
- try {
- var stat = _fsExtra2.default.statSync(website);
- if (stat && stat.isDirectory()) {
- try {
- stat = _fsExtra2.default.statSync(website + '/abe.json');
- if (stat) {
- var json = _fsExtra2.default.readJsonSync(website + '/abe.json');
- var result = (0, _extend2.default)(true, result, json);
- }
- } catch (e) {
- if (!hintAbeJson) {
- hintAbeJson = true;
- console.log(_cliColor2.default.green('[ Hint ]'), 'create abe.json to config', _cliColor2.default.cyan.underline('https://github.com/AdFabConnect/abejs/blob/master/docs/abe-config.md'));
- }
- }
- }
- } catch (e) {}
+ var website = result.root.replace(/\/$/, '');
+ try {
+ var stat = _fsExtra2.default.statSync(website);
+ if (stat && stat.isDirectory()) {
+ try {
+ stat = _fsExtra2.default.statSync(website + '/abe.json');
+ if (stat) {
+ var json = _fsExtra2.default.readJsonSync(website + '/abe.json');
+ var result = (0, _extend2.default)(true, result, json);
+ }
+ } catch (e) {
+ if (!hintAbeJson) {
+ hintAbeJson = true;
+ console.log(_cliColor2.default.green('[ Hint ]'), 'create abe.json to config', _cliColor2.default.cyan.underline('https://github.com/AdFabConnect/abejs/blob/master/docs/abe-config.md'));
+ }
+ }
+ }
+ } catch (e) {}
};
loadLocalConfig(result);
result.exist = function (conf, json) {
- var c = conf.split('.');
- var current = json;
- if (typeof current !== 'undefined' && current !== null) {
- Array.prototype.forEach.call(c, function (c) {
- if (current !== false && typeof current[c] !== 'undefined' && current[c] !== null) {
- current = current[c];
- } else {
- current = false;
- return false;
- }
- });
- return current;
- } else {
- return false;
- }
+ var c = conf.split('.');
+ var current = json;
+ if (typeof current !== 'undefined' && current !== null) {
+ Array.prototype.forEach.call(c, function (c) {
+ if (current !== false && typeof current[c] !== 'undefined' && current[c] !== null) {
+ current = current[c];
+ } else {
+ current = false;
+ return false;
+ }
+ });
+ return current;
+ } else {
+ return false;
+ }
};
result.getDefault = function (conf) {
- return result[conf];
+ return result[conf];
};
result.get = function (conf, file) {
- return result.exist(conf, result);
+ return result.exist(conf, result);
- if (typeof file !== 'undefined' && file !== null && file !== '') {
- var website = file.replace(result.root, '');
- website = website.split('/')[0];
+ if (typeof file !== 'undefined' && file !== null && file !== '') {
+ var website = file.replace(result.root, '');
+ website = website.split('/')[0];
- var websiteConf = result.exist(conf, result.websites[website]);
- if (websiteConf !== false) {
- return websiteConf;
- }
- }
+ var websiteConf = result.exist(conf, result.websites[website]);
+ if (websiteConf !== false) {
+ return websiteConf;
+ }
+ }
- return result.exist(conf, result);
+ return result.exist(conf, result);
};
result.set = function (json) {
- (0, _extend2.default)(true, result, json);
- loadLocalConfig(result);
+ (0, _extend2.default)(true, result, json);
+ loadLocalConfig(result);
};
result.save = function (website, json) {
- (0, _extend2.default)(true, result, json);
+ (0, _extend2.default)(true, result, json);
- var confPath = result.root.replace(/\/$/, "") + '/abe.json';
- _fsExtra2.default.writeJsonSync(confPath, json, { space: 2, encoding: 'utf-8' });
+ var confPath = result.root.replace(/\/$/, '') + '/abe.json';
+ _fsExtra2.default.writeJsonSync(confPath, json, { space: 2, encoding: 'utf-8' });
};
result.getConfigByWebsite = function () {
- var defaultConfig = (0, _extend2.default)(true, {}, result);
- var configBySite = {
- default: {}
- };
-
- var localConfig = (0, _extend2.default)(true, {}, defaultConfig);
- for (var item in localConfig) {
- switch (item) {
- case 'intlData':
- configBySite.default.intlData = localConfig[item];
- break;
- case 'templates':
- configBySite.default.templates = localConfig[item];
- break;
- case 'structure':
- configBySite.default.structure = localConfig[item];
- break;
- case 'data':
- configBySite.default.data = localConfig[item];
- break;
- case 'draft':
- configBySite.default.draft = localConfig[item];
- break;
- case 'publish':
- configBySite.default.publish = localConfig[item];
- break;
- case 'files':
- configBySite.default.files = {
- templates: {
- extension: localConfig[item].templates.extension
- }
- };
- break;
- case 'upload':
- configBySite.default.upload = localConfig[item];
- break;
- }
- }
-
- return configBySite;
+ var defaultConfig = (0, _extend2.default)(true, {}, result);
+ var configBySite = {
+ default: {}
+ };
+
+ var localConfig = (0, _extend2.default)(true, {}, defaultConfig);
+ for (var item in localConfig) {
+ switch (item) {
+ case 'intlData':
+ configBySite.default.intlData = localConfig[item];
+ break;
+ case 'templates':
+ configBySite.default.templates = localConfig[item];
+ break;
+ case 'structure':
+ configBySite.default.structure = localConfig[item];
+ break;
+ case 'data':
+ configBySite.default.data = localConfig[item];
+ break;
+ case 'draft':
+ configBySite.default.draft = localConfig[item];
+ break;
+ case 'publish':
+ configBySite.default.publish = localConfig[item];
+ break;
+ case 'files':
+ configBySite.default.files = {
+ templates: {
+ extension: localConfig[item].templates.extension
+ }
+ };
+ break;
+ case 'upload':
+ configBySite.default.upload = localConfig[item];
+ break;
+ }
+ }
+
+ return configBySite;
};
exports.default = result;
\ No newline at end of file
diff --git a/dist/cli/helpers/abe-create.js b/dist/cli/helpers/abe-create.js
index 962a624a..1e690bbc 100644
--- a/dist/cli/helpers/abe-create.js
+++ b/dist/cli/helpers/abe-create.js
@@ -19,7 +19,7 @@ var create = function create(template, pathCreate, name, req) {
var p = new Promise(function (resolve, reject) {
_cli.Hooks.instance.trigger('beforeCreate', template, pathCreate, name, req, forceJson);
- var templatePath = _cli.fileUtils.getTemplatePath(template.replace(_cli.config.root, ""));
+ var templatePath = _cli.fileUtils.getTemplatePath(template.replace(_cli.config.root, ''));
var filePath = _path2.default.join(pathCreate, name);
filePath = (0, _cli.cleanSlug)(filePath);
filePath = _cli.fileUtils.getFilePath(filePath);
diff --git a/dist/cli/helpers/abe-hooks.js b/dist/cli/helpers/abe-hooks.js
index 201c4dcf..cbb533bc 100755
--- a/dist/cli/helpers/abe-hooks.js
+++ b/dist/cli/helpers/abe-hooks.js
@@ -43,7 +43,7 @@ var Hooks = function () {
function Hooks(enforcer) {
_classCallCheck(this, Hooks);
- if (enforcer != singletonEnforcer) throw "Cannot construct Json singleton";
+ if (enforcer != singletonEnforcer) throw 'Cannot construct Json singleton';
if (_.fileUtils.isFile(_path2.default.join(_.config.root, _.config.hooks.url, 'hooks.js'))) {
var h = require(_path2.default.join(_.config.root, _.config.hooks.url, 'hooks.js'));
diff --git a/dist/cli/helpers/abe-locales.js b/dist/cli/helpers/abe-locales.js
index c4edb5d5..40d1c50b 100755
--- a/dist/cli/helpers/abe-locales.js
+++ b/dist/cli/helpers/abe-locales.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -28,50 +28,50 @@ var singleton = Symbol();
var singletonEnforcer = Symbol();
var Locales = function () {
- function Locales(enforcer) {
- _classCallCheck(this, Locales);
-
- if (enforcer != singletonEnforcer) throw "Cannot construct Json singleton";
-
- this.i18n = this._getFiles();
- }
-
- _createClass(Locales, [{
- key: '_reloadLocales',
- value: function _reloadLocales() {
- this.i18n = this._getFiles();
- }
- }, {
- key: '_getFiles',
- value: function _getFiles() {
- var loc = {};
- var website = _.config.root;
-
- try {
- var localesFolder = _path2.default.join(website, 'locales');
- var stat = _fsExtra2.default.statSync(localesFolder);
- if (stat && stat.isDirectory()) {
- var files = _.FileParser.read(_.fileUtils.cleanPath(localesFolder), _.fileUtils.cleanPath(localesFolder), 'files', true, /\.json/, 0);
- Array.prototype.forEach.call(files, function (file) {
- var json = _fsExtra2.default.readJsonSync(file.path);
- loc[file.name.replace(/\.json/, '')] = json;
- });
- }
- } catch (e) {}
-
- return loc;
- }
- }], [{
- key: 'instance',
- get: function get() {
- if (!this[singleton]) {
- this[singleton] = new Locales(singletonEnforcer);
- }
- return this[singleton];
- }
- }]);
-
- return Locales;
+ function Locales(enforcer) {
+ _classCallCheck(this, Locales);
+
+ if (enforcer != singletonEnforcer) throw 'Cannot construct Json singleton';
+
+ this.i18n = this._getFiles();
+ }
+
+ _createClass(Locales, [{
+ key: '_reloadLocales',
+ value: function _reloadLocales() {
+ this.i18n = this._getFiles();
+ }
+ }, {
+ key: '_getFiles',
+ value: function _getFiles() {
+ var loc = {};
+ var website = _.config.root;
+
+ try {
+ var localesFolder = _path2.default.join(website, 'locales');
+ var stat = _fsExtra2.default.statSync(localesFolder);
+ if (stat && stat.isDirectory()) {
+ var files = _.FileParser.read(_.fileUtils.cleanPath(localesFolder), _.fileUtils.cleanPath(localesFolder), 'files', true, /\.json/, 0);
+ Array.prototype.forEach.call(files, function (file) {
+ var json = _fsExtra2.default.readJsonSync(file.path);
+ loc[file.name.replace(/\.json/, '')] = json;
+ });
+ }
+ } catch (e) {}
+
+ return loc;
+ }
+ }], [{
+ key: 'instance',
+ get: function get() {
+ if (!this[singleton]) {
+ this[singleton] = new Locales(singletonEnforcer);
+ }
+ return this[singleton];
+ }
+ }]);
+
+ return Locales;
}();
exports.default = Locales;
\ No newline at end of file
diff --git a/dist/cli/helpers/abe-logs.js b/dist/cli/helpers/abe-logs.js
index 93c15c74..2e55a218 100755
--- a/dist/cli/helpers/abe-logs.js
+++ b/dist/cli/helpers/abe-logs.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
@@ -43,131 +43,131 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Logs = function () {
- function Logs() {
- _classCallCheck(this, Logs);
- }
-
- _createClass(Logs, null, [{
- key: 'cleanPath',
- value: function cleanPath(pathClean) {
- if (typeof pathClean !== 'undefined' && pathClean !== null) {
- // console.log('cleanPath', path)
- pathClean = pathClean.replace(/\/$/, "");
- }
- return pathClean;
- }
- }, {
- key: 'removeLast',
- value: function removeLast(pathRemove) {
- return pathRemove.substring(0, Logs.cleanPath(pathRemove).lastIndexOf('/'));
- }
- }, {
- key: 'table',
- value: function table(arr) {
- var vertical = {};
-
- // instantiate
- var tab = new _cliTable2.default();
-
- var i = '0';
- Array.prototype.forEach.call(arr, function (value) {
- var obj = {};
- obj['item-' + i++] = value;
- tab.push(obj);
- });
-
- return tab.toString();
- }
- }, {
- key: 'json',
- value: function json(obj) {
- return _prettyjson2.default.render(obj);
- }
- }, {
- key: 'text',
- value: function text() {
- var res = '';
-
- if (arguments.length > 0) {
- var args = [].slice.call(arguments);
- args.shift();
-
- Array.prototype.forEach.call(args, function (arg) {
-
- if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && Object.prototype.toString.call(args) === '[object Array]') {
- res += JSON.stringify(arg, null, 2) + "\n";
- } else if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && Object.prototype.toString.call(args) === '[object Object]') {
- res += JSON.stringify(arg, null, 2) + "\n";
- } else {
- res += arg + "\n";
- }
- });
-
- return res;
- }
- }
- }, {
- key: 'getType',
- value: function getType() {
- var res = '';
-
- if (arguments.length > 0) {
- var args = [].slice.call(arguments);
- return args[0];
- }
- return 'default';
- }
- }, {
- key: 'error',
- value: function error() {
- var type = Logs.getType.apply(this, arguments);
- var msg = '[ ERROR ' + type + ' ]\n' + Logs.text.apply(this, arguments);
- console.log(_cliColor2.default.red(msg));
- var pathError = _path2.default.join(_.config.root, '/logs/ERROR-' + Logs.getType.apply(this, arguments) + '.log');
- Logs.writeFile(pathError, msg, 'a+');
- }
- }, {
- key: 'duration',
- value: function duration(str, time) {
- if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
- var pathDuration = _path2.default.join(_.config.root, '/logs/duration.log');
- var durationColor = '#B2FF59';
- if (time > 5) {
- durationColor = '#ff003b';
- } else if (time > 1) {
- durationColor = '#ffbc00';
- }
- Logs.writeFile(pathDuration, str + ' in ' + time + "\n", 'a+');
- }
- }
- }, {
- key: 'write',
- value: function write() {
- if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
- var pathWrite = _path2.default.join(_.config.root, '/logs/' + Logs.getType.apply(this, arguments) + '.log');
- Logs.writeFile(pathWrite, Logs.text.apply(this, arguments), 'a+');
- }
- }
- }, {
- key: 'delAndWrite',
- value: function delAndWrite() {
- if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
- var pathWrite = _path2.default.join(_.config.root, '/logs/' + Logs.getType.apply(this, arguments) + '.log');
- Logs.writeFile(pathWrite, Logs.text.apply(this, arguments), 'w');
- }
- }
- }, {
- key: 'writeFile',
- value: function writeFile(file, data, flag) {
- if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
- data = new Date().toString() + ' --- ' + data;
- _mkdirp2.default.sync(Logs.removeLast(file));
- _fs2.default.writeFileSync(file, data, { encoding: 'utf8', flag: flag });
- }
- }
- }]);
-
- return Logs;
+ function Logs() {
+ _classCallCheck(this, Logs);
+ }
+
+ _createClass(Logs, null, [{
+ key: 'cleanPath',
+ value: function cleanPath(pathClean) {
+ if (typeof pathClean !== 'undefined' && pathClean !== null) {
+ // console.log('cleanPath', path)
+ pathClean = pathClean.replace(/\/$/, '');
+ }
+ return pathClean;
+ }
+ }, {
+ key: 'removeLast',
+ value: function removeLast(pathRemove) {
+ return pathRemove.substring(0, Logs.cleanPath(pathRemove).lastIndexOf('/'));
+ }
+ }, {
+ key: 'table',
+ value: function table(arr) {
+ var vertical = {};
+
+ // instantiate
+ var tab = new _cliTable2.default();
+
+ var i = '0';
+ Array.prototype.forEach.call(arr, function (value) {
+ var obj = {};
+ obj['item-' + i++] = value;
+ tab.push(obj);
+ });
+
+ return tab.toString();
+ }
+ }, {
+ key: 'json',
+ value: function json(obj) {
+ return _prettyjson2.default.render(obj);
+ }
+ }, {
+ key: 'text',
+ value: function text() {
+ var res = '';
+
+ if (arguments.length > 0) {
+ var args = [].slice.call(arguments);
+ args.shift();
+
+ Array.prototype.forEach.call(args, function (arg) {
+
+ if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && Object.prototype.toString.call(args) === '[object Array]') {
+ res += JSON.stringify(arg, null, 2) + '\n';
+ } else if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && Object.prototype.toString.call(args) === '[object Object]') {
+ res += JSON.stringify(arg, null, 2) + '\n';
+ } else {
+ res += arg + '\n';
+ }
+ });
+
+ return res;
+ }
+ }
+ }, {
+ key: 'getType',
+ value: function getType() {
+ var res = '';
+
+ if (arguments.length > 0) {
+ var args = [].slice.call(arguments);
+ return args[0];
+ }
+ return 'default';
+ }
+ }, {
+ key: 'error',
+ value: function error() {
+ var type = Logs.getType.apply(this, arguments);
+ var msg = '[ ERROR ' + type + ' ]\n' + Logs.text.apply(this, arguments);
+ console.log(_cliColor2.default.red(msg));
+ var pathError = _path2.default.join(_.config.root, '/logs/ERROR-' + Logs.getType.apply(this, arguments) + '.log');
+ Logs.writeFile(pathError, msg, 'a+');
+ }
+ }, {
+ key: 'duration',
+ value: function duration(str, time) {
+ if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
+ var pathDuration = _path2.default.join(_.config.root, '/logs/duration.log');
+ var durationColor = '#B2FF59';
+ if (time > 5) {
+ durationColor = '#ff003b';
+ } else if (time > 1) {
+ durationColor = '#ffbc00';
+ }
+ Logs.writeFile(pathDuration, str + ' in ' + time + '\n', 'a+');
+ }
+ }
+ }, {
+ key: 'write',
+ value: function write() {
+ if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
+ var pathWrite = _path2.default.join(_.config.root, '/logs/' + Logs.getType.apply(this, arguments) + '.log');
+ Logs.writeFile(pathWrite, Logs.text.apply(this, arguments), 'a+');
+ }
+ }
+ }, {
+ key: 'delAndWrite',
+ value: function delAndWrite() {
+ if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
+ var pathWrite = _path2.default.join(_.config.root, '/logs/' + Logs.getType.apply(this, arguments) + '.log');
+ Logs.writeFile(pathWrite, Logs.text.apply(this, arguments), 'w');
+ }
+ }
+ }, {
+ key: 'writeFile',
+ value: function writeFile(file, data, flag) {
+ if (typeof _.config.logs !== 'undefined' && _.config.logs !== null && _.config.logs === true) {
+ data = new Date().toString() + ' --- ' + data;
+ _mkdirp2.default.sync(Logs.removeLast(file));
+ _fs2.default.writeFileSync(file, data, { encoding: 'utf8', flag: flag });
+ }
+ }
+ }]);
+
+ return Logs;
}();
exports.default = Logs;
\ No newline at end of file
diff --git a/dist/cli/helpers/abe-plugins.js b/dist/cli/helpers/abe-plugins.js
index 8ac4a3c3..23aa373b 100755
--- a/dist/cli/helpers/abe-plugins.js
+++ b/dist/cli/helpers/abe-plugins.js
@@ -35,7 +35,7 @@ var Plugins = function () {
function Plugins(enforcer) {
_classCallCheck(this, Plugins);
- if (enforcer != singletonEnforcer) throw "Cannot construct Plugins singleton";
+ if (enforcer != singletonEnforcer) throw 'Cannot construct Plugins singleton';
this._plugins = [];
this.fn = [];
var pluginsDir = _path2.default.join(_.config.root, _.config.plugins.url);
diff --git a/dist/cli/helpers/abe-sql.js b/dist/cli/helpers/abe-sql.js
index 0befe531..15202fc8 100755
--- a/dist/cli/helpers/abe-sql.js
+++ b/dist/cli/helpers/abe-sql.js
@@ -141,7 +141,7 @@ var Sql = function () {
str = str.replace(res, escapedFrom);
}
- str = str.replace(/``/g, "''");
+ str = str.replace(/``/g, '\'\'');
return str;
}
diff --git a/dist/cli/helpers/abe-template.js b/dist/cli/helpers/abe-template.js
index 644c19da..409f50c0 100755
--- a/dist/cli/helpers/abe-template.js
+++ b/dist/cli/helpers/abe-template.js
@@ -87,7 +87,7 @@ function translate(text) {
}
if (source.indexOf('{{') === -1) {
- source = '\'' + source.replace(/'/g, "\\'") + '\'';
+ source = '\'' + source.replace(/'/g, '\\\'') + '\'';
} else {
source = source.replace(/\{\{(.*?)\}\}/, '$1');
}
diff --git a/dist/cli/helpers/abe-time-mesure.js b/dist/cli/helpers/abe-time-mesure.js
index 1f1f3613..b60e5e90 100644
--- a/dist/cli/helpers/abe-time-mesure.js
+++ b/dist/cli/helpers/abe-time-mesure.js
@@ -34,11 +34,11 @@ var TimeMesure = function () {
minutes = parseInt(duration / (1000 * 60) % 60),
hours = parseInt(duration / (1000 * 60 * 60) % 24);
- hours = hours < 10 ? "0" + hours : hours;
- minutes = minutes < 10 ? "0" + minutes : minutes;
- seconds = seconds < 10 ? "0" + seconds : seconds;
+ hours = hours < 10 ? '0' + hours : hours;
+ minutes = minutes < 10 ? '0' + minutes : minutes;
+ seconds = seconds < 10 ? '0' + seconds : seconds;
- return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
+ return hours + ':' + minutes + ':' + seconds + '.' + milliseconds;
}
/**
@@ -53,7 +53,7 @@ var TimeMesure = function () {
if (typeof this._name === 'undefined' || this._name === null) {
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *');
}
- console.log((this._name ? 'end ' + this._name : "") + "(" + _cliColor2.default.green(this._msToTime(d)) + ") " + (str ? str : ""));
+ console.log((this._name ? 'end ' + this._name : '') + '(' + _cliColor2.default.green(this._msToTime(d)) + ') ' + (str ? str : ''));
}
}]);
diff --git a/dist/cli/helpers/abe-utils.js b/dist/cli/helpers/abe-utils.js
index 386a64fa..64376e92 100755
--- a/dist/cli/helpers/abe-utils.js
+++ b/dist/cli/helpers/abe-utils.js
@@ -72,7 +72,7 @@ var Utils = function () {
* @return {[type]} [description]
*/
value: function dontHaveKey(key) {
- return typeof this._key[key] === "undefined" || this._key[key] === null;
+ return typeof this._key[key] === 'undefined' || this._key[key] === null;
}
/**
@@ -263,15 +263,15 @@ var Utils = function () {
value: function escapeRegExp(str) {
var specials = [
// order matters for these
- "-", "[", "]"
+ '-', '[', ']'
// order doesn't matter for any of these
- , "/", "{", "}", "(", ")", "*", "+", "?", ".", "\\", "^", "$", "|"]
+ , '/', '{', '}', '(', ')', '*', '+', '?', '.', '\\', '^', '$', '|']
// I choose to escape every character with '\'
// even though only some strictly require it when inside of []
,
regex = RegExp('[' + specials.join('\\') + ']', 'g');
- return str.replace(regex, "\\$&");
+ return str.replace(regex, '\\$&');
}
}, {
key: 'addMetas',
@@ -553,7 +553,7 @@ var Utils = function () {
}, {
key: 'replaceUnwantedChar',
value: function replaceUnwantedChar(str) {
- var chars = { "’": '', "'": '', '\"': '', 'Š': 'S', 'š': 's', 'Ž': 'Z', 'ž': 'z', 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'A', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ý': 'Y', 'Þ': 'B', 'ß': 'Ss', 'à': 'a', 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'a', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'œ': 'oe', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'o', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ý': 'y', 'þ': 'b', 'ÿ': 'y' };
+ var chars = { '’': '', '\'': '', '\"': '', 'Š': 'S', 'š': 's', 'Ž': 'Z', 'ž': 'z', 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'A', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ý': 'Y', 'Þ': 'B', 'ß': 'Ss', 'à': 'a', 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'a', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'œ': 'oe', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'o', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ý': 'y', 'þ': 'b', 'ÿ': 'y' };
for (var prop in chars) {
str = str.replace(new RegExp(prop, 'g'), chars[prop]);
}return str;
diff --git a/dist/cli/helpers/file-attr.js b/dist/cli/helpers/file-attr.js
index 563918d8..ddb7fcb5 100755
--- a/dist/cli/helpers/file-attr.js
+++ b/dist/cli/helpers/file-attr.js
@@ -35,6 +35,7 @@ var Attr = function () {
* @param {String} str string to work with
* @return {void}
*/
+
function Attr(str) {
_classCallCheck(this, Attr);
@@ -237,20 +238,39 @@ var FileAttr = function () {
}
/**
- * Filter and array of file path and return the latest version of those files
- * @param {Object} urls object with path to file, filename etc ...
- * @param {String} type (draft|waiting|valid)
- * @return {Object} urls object filtered
+ * Return the revision from document html file path
+ * if the docPath contains abe revision [status]-[date] will try to return this revision
+ * else it will return the latest revision
+ * or null
+ *
+ * @param {String} html path
+ * @return {Object} file revision | null
*/
}, {
- key: 'getLatestVersion',
- value: function getLatestVersion(docPath) {
- var sameFiles = FileAttr.getVersions(docPath);
- if (sameFiles.length > 0) {
- return sameFiles[sameFiles.length - 1];
+ key: 'getDocumentRevision',
+ value: function getDocumentRevision(docPath) {
+ var result = null;
+ var documentPath = docPath;
+ var latest = true;
+ if (FileAttr.test(documentPath)) {
+ latest = false;
+ documentPath = FileAttr.delete(documentPath);
}
- return null;
+ var revisions = FileAttr.getVersions(documentPath);
+ if (latest && revisions.length >= 0) {
+ result = revisions[0];
+ } else if (!latest) {
+ Array.prototype.forEach.call(revisions, function (revision) {
+ if (revision.html === docPath) {
+ result = revision;
+ }
+ });
+ if (result === null && revisions.length >= 0) {
+ result = revisions[0];
+ }
+ }
+ return result;
}
/**
diff --git a/dist/cli/helpers/file-parser.js b/dist/cli/helpers/file-parser.js
index 28f12ce7..2a9f33c7 100755
--- a/dist/cli/helpers/file-parser.js
+++ b/dist/cli/helpers/file-parser.js
@@ -54,13 +54,13 @@ var FileParser = function () {
value: function getTemplate(path) {
var file = path.replace(_.config.root, '');
var file = path.replace(_.config.templates.url, '');
- return file.replace(/^\//, "");
+ return file.replace(/^\//, '');
}
}, {
key: 'getType',
value: function getType(path) {
var folders = path.replace(_.config.root, '');
- folders = folders.replace(/^\//, "");
+ folders = folders.replace(/^\//, '');
return folders.split('/')[0];
}
}, {
@@ -111,7 +111,7 @@ var FileParser = function () {
'cleanPathName': _.fileAttr.delete(path),
'cleanPath': path.replace(base + '/', ''),
date: date,
- cleanDate: fileDate.format("YYYY/MM/DD HH:MM:ss"),
+ cleanDate: fileDate.format('YYYY/MM/DD HH:MM:ss'),
duration: duration,
// status: status,
cleanName: cleanName,
@@ -454,8 +454,14 @@ var FileParser = function () {
var json = FileParser.getJson(file.path);
if (typeof json.abe_meta !== 'undefined' && json.abe_meta !== null) {
+ var date = null;
+ if (typeof json.abe_meta.latest.date !== 'undefined' && json.abe_meta.latest.date !== null) {
+ date = json.abe_meta.latest.date;
+ } else if (typeof json.abe_meta.date !== 'undefined' && json.abe_meta.date !== null) {
+ date = json.abe_meta.date;
+ }
cleanFile.abe_meta = {
- date: typeof json.abe_meta.date !== 'undefined' && json.abe_meta.date !== null ? json.abe_meta.date : null,
+ date: date,
type: typeof json.abe_meta.type !== 'undefined' && json.abe_meta.type !== null ? json.abe_meta.type : null,
link: typeof json.abe_meta.link !== 'undefined' && json.abe_meta.link !== null ? json.abe_meta.link : null,
template: typeof json.abe_meta.template !== 'undefined' && json.abe_meta.template !== null ? json.abe_meta.template : null,
diff --git a/dist/cli/helpers/file-utils.js b/dist/cli/helpers/file-utils.js
index 3623ebaf..29dc4f08 100755
--- a/dist/cli/helpers/file-utils.js
+++ b/dist/cli/helpers/file-utils.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -33,340 +33,344 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var FileUtils = function () {
- function FileUtils() {
- _classCallCheck(this, FileUtils);
- }
-
- /**
- * Prepend the path with the root path
- * @param {string} path The path to be prepended
- * @return {string} The path prepended with the root path
- */
-
-
- _createClass(FileUtils, null, [{
- key: 'pathWithRoot',
- value: function pathWithRoot(ppath) {
- if (typeof ppath === 'undefined' || ppath === null || ppath === '') ppath = '';
- return _path2.default.join(_.config.root, ppath.replace(_.config.root, '')).replace(/\/$/, "");
- }
-
- /**
- * [cleanPath remove the trailing slash in the path
- * @param {string} path The path to be cleaned
- * @return {string} The path with no trailing slash
+ function FileUtils() {
+ _classCallCheck(this, FileUtils);
+ }
+
+ /**
+ * Prepend the path with the root path
+ * @param {string} path The path to be prepended
+ * @return {string} The path prepended with the root path
*/
- }, {
- key: 'cleanPath',
- value: function cleanPath(cpath) {
- if (typeof cpath !== 'undefined' && cpath !== null) cpath = cpath.replace(/\/$/, "");
- return cpath;
- }
-
- /**
- * concatenate strings into a path. Each string being appended with a "/"
- * @param {array} array of strings to be concatenated
- * @return {string} path as the result of concatenation
- */
-
- }, {
- key: 'concatPath',
- value: function concatPath() {
- var cpath = '';
- Array.prototype.forEach.call([].slice.call(arguments), function (argument) {
- if (cpath !== '') argument = argument.replace(/^\//, "");
- if (argument !== '') cpath += FileUtils.cleanPath(argument) + '/';
- });
-
- cpath = FileUtils.cleanPath(cpath);
-
- return cpath;
- }
-
- /**
- * Remove the last segment of the path (ie. /the/path/to => /the/path)
- * @param {string} path the path
- * @return {string} The path with the last segment removed
- */
-
- }, {
- key: 'removeLast',
- value: function removeLast(pathRemove) {
-
- return pathRemove.substring(0, FileUtils.cleanPath(pathRemove).lastIndexOf('/'));
- }
-
- /**
- * Replace the extension in the path (ie. /the/path/to/file.txt => /the/path/to/file.json)
- * @param {string} path The path
- * @param {string} ext The extension to put as a replacement
- * @return {string} The path with the new extension
- */
-
- }, {
- key: 'replaceExtension',
- value: function replaceExtension(path, ext) {
-
- return path.substring(0, path.lastIndexOf('.')) + '.' + ext;
- }
-
- /**
- * Remove the extension from the path if any
- * @param {string} path The path
- * @return {string} The path without extension
- */
-
- }, {
- key: 'removeExtension',
- value: function removeExtension(path) {
- if (path.lastIndexOf('.') > -1) {
- return path.substring(0, path.lastIndexOf('.'));
- }
- return path;
- }
-
- /**
- * Extract the filename from the path (ie. /the/path/to/file.json => file.json)
- * @param {string} path The path
- * @return {string} The filename extracted from the path
- */
-
- }, {
- key: 'filename',
- value: function filename(path) {
-
- return FileUtils.cleanPath(path).substring(FileUtils.cleanPath(path).lastIndexOf('/') + 1);
- }
-
- /**
- * Check if the path given coreespond to an existing file
- * @param {string} path The path
- * @return {Boolean} Does the file exist
- */
-
- }, {
- key: 'isFile',
- value: function isFile(path) {
- try {
- var stat = _fsExtra2.default.statSync(path);
-
- return true;
- } catch (e) {
-
- return false;
- }
-
- return false;
- }
-
- /**
- * Create the directory if it doesn't exist and create the json file
- * @param {string} path The path
- * @param {string} json The Json data
- */
-
- }, {
- key: 'writeJson',
- value: function writeJson(path, json) {
- (0, _mkdirp2.default)(FileUtils.removeLast(path));
- _fsExtra2.default.writeJsonSync(path, json, { space: 2, encoding: 'utf-8' });
- }
- }, {
- key: 'removeFile',
- value: function removeFile(file) {
- _fsExtra2.default.removeSync(file);
- }
-
- /**
- * Check if the string given has an extension
- * @param {string} fileName the filename to check
- * @return {Boolean} Wether the filename has an extension or not
- */
-
- }, {
- key: 'isValidFile',
- value: function isValidFile(fileName) {
- var dotPosition = fileName.indexOf('.');
- if (dotPosition > 0) return true;
-
- return false;
- }
-
- /* TODO: put this method in the right helper */
-
- }, {
- key: 'cleanTplName',
- value: function cleanTplName(pathClean) {
- var cleanTplName = _.fileAttr.delete(pathClean);
- cleanTplName = cleanTplName.replace(_.config.root, '');
- cleanTplName = cleanTplName.split('/');
- cleanTplName.shift();
- return cleanTplName.join('/');
- }
-
- /* TODO: Remove this method and replace it with the previous one */
-
- }, {
- key: 'cleanFilePath',
- value: function cleanFilePath(pathClean) {
- var cleanFilePath = _.fileAttr.delete(pathClean);
- cleanFilePath = cleanFilePath.replace(_.config.root, '');
- cleanFilePath = cleanFilePath.split('/');
- cleanFilePath.shift();
- return cleanFilePath.join('/');
- }
-
- /* TODO: put this method in the right helper */
-
- }, {
- key: 'getFilePath',
- value: function getFilePath(pathFile) {
- var res = null;
- if (typeof pathFile !== 'undefined' && pathFile !== null && pathFile !== '') {
- res = pathFile.replace(_.config.root);
- res = _path2.default.join(_.config.root, _.config.draft.url, res);
- }
- return res;
- }
-
- /* TODO: refactor this method as Facade method to a method adding a fragment in a path */
-
- }, {
- key: 'getTemplatePath',
- value: function getTemplatePath(pathTemplate) {
- if (pathTemplate.indexOf('.') === -1) {
- // no extension add one
- pathTemplate = pathTemplate + '.' + _.config.files.templates.extension;
- }
-
- var res = null;
- if (typeof pathTemplate !== 'undefined' && pathTemplate !== null && pathTemplate !== '') {
- res = pathTemplate.replace(_.config.root);
- res = _path2.default.join(_.config.root, _.config.templates.url, res);
- }
- return res;
- }
-
- /**
- * This method checks that the path leads to a file and return the content as UTF-8 content
- * @param {string} path The path
- * @return {string} The content of the UTF-8 file
- */
- }, {
- key: 'getFileContent',
- value: function getFileContent(path) {
- var res = null;
- if (typeof path !== 'undefined' && path !== null && path !== '') {
- if (FileUtils.isFile(path)) {
- res = _fsExtra2.default.readFileSync(path, 'utf8');
- }
- }
- return res;
- }
-
- /* TODO: put this method in its right helper */
-
- }, {
- key: 'deleteOlderRevisionByType',
- value: function deleteOlderRevisionByType(fileName, type) {
- var folder = fileName.split('/');
- var file = folder.pop();
- var extension = file.replace(/.*?\./, '');
- folder = folder.join('/');
- var stat = _fsExtra2.default.statSync(folder);
- if (stat) {
- var files = _.FileParser.getFiles(folder, true, 1, new RegExp("\\." + extension));
- files.forEach(function (fileItem) {
- var fname = _.fileAttr.delete(fileItem.cleanPath);
- var ftype = _.fileAttr.get(fileItem.cleanPath).s;
- if (fname === file && ftype === type) {
- var fileDraft = fileItem.path.replace(/-abe-./, '-abe-d');
- _.FileParser.removeFile(fileItem.path, _.FileParser.changePathEnv(fileItem.path, _.config.data.url).replace(new RegExp("\\." + extension), '.json'));
- _.FileParser.removeFile(fileDraft, _.FileParser.changePathEnv(fileDraft, _.config.data.url).replace(new RegExp("\\." + extension), '.json'));
- }
- });
- }
- }
-
- /* TODO: put this method in its right helper */
-
- }, {
- key: 'getFilesMerged',
- value: function getFilesMerged(files) {
- var merged = {};
- var arMerged = [];
-
- Array.prototype.forEach.call(files, function (file) {
- var cleanFilePath = file.cleanFilePath;
-
- var fileStatusIsPublish = _.fileAttr.get(file.cleanPath);
- if (typeof fileStatusIsPublish.s !== 'undefined' && fileStatusIsPublish.s !== null) {
- file.abe_meta.status = 'draft';
- }
-
- file.html = _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension));
- if (file.abe_meta.status === 'publish') {
- file.htmlPath = _path2.default.join(_.config.root, _.config.publish.url, _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)));
- } else {
- file.htmlPath = _path2.default.join(_.config.root, _.config.draft.url, _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)));
- }
-
- if (typeof merged[cleanFilePath] === 'undefined' || merged[cleanFilePath] === null) {
- merged[cleanFilePath] = {
- name: _.fileAttr.delete(file.name),
- path: _.fileAttr.delete(file.path),
- html: _.fileAttr.delete(_path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension))),
- htmlPath: _path2.default.join(_.config.root, _.config.publish.url, _path2.default.join('/', _.fileAttr.delete(file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)))),
- cleanPathName: file.cleanPathName,
- cleanPath: file.cleanPath,
- cleanName: file.cleanName,
- cleanNameNoExt: file.cleanNameNoExt,
- cleanFilePath: file.cleanFilePath,
- filePath: _.fileAttr.delete(file.filePath),
- revisions: []
- };
- }
- merged[cleanFilePath].revisions.push(JSON.parse(JSON.stringify(file)));
- });
-
- // return merged
- Array.prototype.forEach.call(Object.keys(merged), function (key) {
- var revisions = merged[key].revisions;
- revisions.sort(_.FileParser.predicatBy('date', 1));
-
- Array.prototype.forEach.call(revisions, function (revision) {
-
- var status = revision.abe_meta.status;
-
- if (status === 'publish') {
- merged[key][status] = revision;
- } else {
- merged[key][status] = {};
- }
- merged[key][status].path = revision.path;
- merged[key][status].html = revision.html;
- merged[key][status].htmlPath = revision.htmlPath;
- merged[key][status].date = new Date(revision.date);
- merged[key][status].link = revision.abe_meta.link;
- });
-
- merged[key].revisions = revisions;
-
- merged[key].date = revisions[0].date;
- merged[key].cleanDate = revisions[0].cleanDate;
- merged[key].duration = revisions[0].duration;
- merged[key].abe_meta = revisions[0].abe_meta;
-
- arMerged.push(merged[key]);
- });
-
- return arMerged;
- }
- }]);
-
- return FileUtils;
+ _createClass(FileUtils, null, [{
+ key: 'pathWithRoot',
+ value: function pathWithRoot(ppath) {
+ if (typeof ppath === 'undefined' || ppath === null || ppath === '') ppath = '';
+ return _path2.default.join(_.config.root, ppath.replace(_.config.root, '')).replace(/\/$/, '');
+ }
+
+ /**
+ * [cleanPath remove the trailing slash in the path
+ * @param {string} path The path to be cleaned
+ * @return {string} The path with no trailing slash
+ */
+
+ }, {
+ key: 'cleanPath',
+ value: function cleanPath(cpath) {
+ if (typeof cpath !== 'undefined' && cpath !== null) cpath = cpath.replace(/\/$/, '');
+ return cpath;
+ }
+
+ /**
+ * concatenate strings into a path. Each string being appended with a "/"
+ * @param {array} array of strings to be concatenated
+ * @return {string} path as the result of concatenation
+ */
+
+ }, {
+ key: 'concatPath',
+ value: function concatPath() {
+ var cpath = '';
+ Array.prototype.forEach.call([].slice.call(arguments), function (argument) {
+ if (cpath !== '') argument = argument.replace(/^\//, '');
+ if (argument !== '') cpath += FileUtils.cleanPath(argument) + '/';
+ });
+
+ cpath = FileUtils.cleanPath(cpath);
+
+ return cpath;
+ }
+
+ /**
+ * Remove the last segment of the path (ie. /the/path/to => /the/path)
+ * @param {string} path the path
+ * @return {string} The path with the last segment removed
+ */
+
+ }, {
+ key: 'removeLast',
+ value: function removeLast(pathRemove) {
+
+ return pathRemove.substring(0, FileUtils.cleanPath(pathRemove).lastIndexOf('/'));
+ }
+
+ /**
+ * Replace the extension in the path (ie. /the/path/to/file.txt => /the/path/to/file.json)
+ * @param {string} path The path
+ * @param {string} ext The extension to put as a replacement
+ * @return {string} The path with the new extension
+ */
+
+ }, {
+ key: 'replaceExtension',
+ value: function replaceExtension(path, ext) {
+
+ return path.substring(0, path.lastIndexOf('.')) + '.' + ext;
+ }
+
+ /**
+ * Remove the extension from the path if any
+ * @param {string} path The path
+ * @return {string} The path without extension
+ */
+
+ }, {
+ key: 'removeExtension',
+ value: function removeExtension(path) {
+ if (path.lastIndexOf('.') > -1) {
+ return path.substring(0, path.lastIndexOf('.'));
+ }
+ return path;
+ }
+
+ /**
+ * Extract the filename from the path (ie. /the/path/to/file.json => file.json)
+ * @param {string} path The path
+ * @return {string} The filename extracted from the path
+ */
+
+ }, {
+ key: 'filename',
+ value: function filename(path) {
+
+ return FileUtils.cleanPath(path).substring(FileUtils.cleanPath(path).lastIndexOf('/') + 1);
+ }
+
+ /**
+ * Check if the path given coreespond to an existing file
+ * @param {string} path The path
+ * @return {Boolean} Does the file exist
+ */
+
+ }, {
+ key: 'isFile',
+ value: function isFile(path) {
+ try {
+ var stat = _fsExtra2.default.statSync(path);
+
+ return true;
+ } catch (e) {
+
+ return false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Create the directory if it doesn't exist and create the json file
+ * @param {string} path The path
+ * @param {string} json The Json data
+ */
+
+ }, {
+ key: 'writeJson',
+ value: function writeJson(path, json) {
+ (0, _mkdirp2.default)(FileUtils.removeLast(path));
+ _fsExtra2.default.writeJsonSync(path, json, { space: 2, encoding: 'utf-8' });
+ }
+ }, {
+ key: 'removeFile',
+ value: function removeFile(file) {
+ _fsExtra2.default.removeSync(file);
+ }
+
+ /**
+ * Check if the string given has an extension
+ * @param {string} fileName the filename to check
+ * @return {Boolean} Wether the filename has an extension or not
+ */
+
+ }, {
+ key: 'isValidFile',
+ value: function isValidFile(fileName) {
+ var dotPosition = fileName.indexOf('.');
+ if (dotPosition > 0) return true;
+
+ return false;
+ }
+
+ /* TODO: put this method in the right helper */
+
+ }, {
+ key: 'cleanTplName',
+ value: function cleanTplName(pathClean) {
+ var cleanTplName = _.fileAttr.delete(pathClean);
+ cleanTplName = cleanTplName.replace(_.config.root, '');
+ cleanTplName = cleanTplName.split('/');
+ cleanTplName.shift();
+ return cleanTplName.join('/');
+ }
+
+ /* TODO: Remove this method and replace it with the previous one */
+
+ }, {
+ key: 'cleanFilePath',
+ value: function cleanFilePath(pathClean) {
+ var cleanFilePath = _.fileAttr.delete(pathClean);
+ cleanFilePath = cleanFilePath.replace(_.config.root, '');
+ cleanFilePath = cleanFilePath.split('/');
+ cleanFilePath.shift();
+ return cleanFilePath.join('/');
+ }
+
+ /* TODO: put this method in the right helper */
+
+ }, {
+ key: 'getFilePath',
+ value: function getFilePath(pathFile) {
+ var res = null;
+ if (typeof pathFile !== 'undefined' && pathFile !== null && pathFile !== '') {
+ res = pathFile.replace(_.config.root);
+ res = _path2.default.join(_.config.root, _.config.draft.url, res);
+ }
+ return res;
+ }
+
+ /* TODO: refactor this method as Facade method to a method adding a fragment in a path */
+
+ }, {
+ key: 'getTemplatePath',
+ value: function getTemplatePath(pathTemplate) {
+ if (pathTemplate.indexOf('.') === -1) {
+ // no extension add one
+ pathTemplate = pathTemplate + '.' + _.config.files.templates.extension;
+ }
+
+ var res = null;
+ if (typeof pathTemplate !== 'undefined' && pathTemplate !== null && pathTemplate !== '') {
+ res = pathTemplate.replace(_.config.root);
+ res = _path2.default.join(_.config.root, _.config.templates.url, res);
+ }
+ return res;
+ }
+
+ /**
+ * This method checks that the path leads to a file and return the content as UTF-8 content
+ * @param {string} path The path
+ * @return {string} The content of the UTF-8 file
+ */
+
+ }, {
+ key: 'getFileContent',
+ value: function getFileContent(path) {
+ var res = null;
+ if (typeof path !== 'undefined' && path !== null && path !== '') {
+ if (FileUtils.isFile(path)) {
+ res = _fsExtra2.default.readFileSync(path, 'utf8');
+ }
+ }
+ return res;
+ }
+
+ /* TODO: put this method in its right helper */
+
+ }, {
+ key: 'deleteOlderRevisionByType',
+ value: function deleteOlderRevisionByType(fileName, type) {
+ var folder = fileName.split('/');
+ var file = folder.pop();
+ var extension = file.replace(/.*?\./, '');
+ folder = folder.join('/');
+ var stat = _fsExtra2.default.statSync(folder);
+ if (stat) {
+ var files = _.FileParser.getFiles(folder, true, 1, new RegExp('\\.' + extension));
+ files.forEach(function (fileItem) {
+ var fname = _.fileAttr.delete(fileItem.cleanPath);
+ var ftype = _.fileAttr.get(fileItem.cleanPath).s;
+ if (fname === file && ftype === type) {
+ var fileDraft = fileItem.path.replace(/-abe-./, '-abe-d');
+ _.FileParser.removeFile(fileItem.path, _.FileParser.changePathEnv(fileItem.path, _.config.data.url).replace(new RegExp('\\.' + extension), '.json'));
+ _.FileParser.removeFile(fileDraft, _.FileParser.changePathEnv(fileDraft, _.config.data.url).replace(new RegExp('\\.' + extension), '.json'));
+ }
+ });
+ }
+ }
+
+ /* TODO: put this method in its right helper */
+
+ }, {
+ key: 'getFilesMerged',
+ value: function getFilesMerged(files) {
+ var merged = {};
+ var arMerged = [];
+
+ Array.prototype.forEach.call(files, function (file) {
+ var cleanFilePath = file.cleanFilePath;
+
+ var fileStatusIsPublish = _.fileAttr.get(file.cleanPath);
+ if (typeof fileStatusIsPublish.s !== 'undefined' && fileStatusIsPublish.s !== null && file.abe_meta.status === 'publish') {
+ file.abe_meta.status = 'draft';
+ }
+
+ file.html = _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension));
+ if (file.abe_meta.status === 'publish') {
+ file.htmlPath = _path2.default.join(_.config.root, _.config.publish.url, _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)));
+ } else {
+ file.htmlPath = _path2.default.join(_.config.root, _.config.draft.url, _path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)));
+ }
+
+ if (typeof merged[cleanFilePath] === 'undefined' || merged[cleanFilePath] === null) {
+ merged[cleanFilePath] = {
+ name: _.fileAttr.delete(file.name),
+ path: _.fileAttr.delete(file.path),
+ html: _.fileAttr.delete(_path2.default.join('/', file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension))),
+ htmlPath: _path2.default.join(_.config.root, _.config.publish.url, _path2.default.join('/', _.fileAttr.delete(file.filePath.replace(/\.json/, '.' + _.config.files.templates.extension)))),
+ cleanPathName: file.cleanPathName,
+ cleanPath: file.cleanPath,
+ cleanName: file.cleanName,
+ cleanNameNoExt: file.cleanNameNoExt,
+ cleanFilePath: file.cleanFilePath,
+ filePath: _.fileAttr.delete(file.filePath),
+ revisions: []
+ };
+ }
+
+ merged[cleanFilePath].revisions.push(JSON.parse(JSON.stringify(file)));
+ });
+
+ // return merged
+ Array.prototype.forEach.call(Object.keys(merged), function (key) {
+ var revisions = merged[key].revisions;
+ revisions.sort(_.FileParser.predicatBy('date', -1));
+ if (typeof revisions[0] !== 'undefined' && revisions[0] !== null) {
+ merged[key].date = revisions[0].date;
+ }
+
+ Array.prototype.forEach.call(revisions, function (revision) {
+
+ var status = revision.abe_meta.status;
+
+ if (status === 'publish') {
+ merged[key][status] = revision;
+ } else {
+ merged[key][status] = {};
+ }
+ merged[key][status].path = revision.path;
+ merged[key][status].html = revision.html;
+ merged[key][status].htmlPath = revision.htmlPath;
+ merged[key][status].date = new Date(revision.date);
+ merged[key][status].link = revision.abe_meta.link;
+ });
+
+ merged[key].revisions = revisions;
+
+ merged[key].date = revisions[0].date;
+ merged[key].cleanDate = revisions[0].cleanDate;
+ merged[key].duration = revisions[0].duration;
+ merged[key].abe_meta = revisions[0].abe_meta;
+
+ arMerged.push(merged[key]);
+ });
+
+ return arMerged;
+ }
+ }]);
+
+ return FileUtils;
}();
exports.default = FileUtils;
\ No newline at end of file
diff --git a/dist/cli/helpers/folder-utils.js b/dist/cli/helpers/folder-utils.js
index 40721743..f83ab4ed 100755
--- a/dist/cli/helpers/folder-utils.js
+++ b/dist/cli/helpers/folder-utils.js
@@ -1,7 +1,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@@ -29,70 +29,70 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var FolderUtils = function () {
- function FolderUtils() {
- _classCallCheck(this, FolderUtils);
- }
-
- _createClass(FolderUtils, null, [{
- key: 'isFolder',
- value: function isFolder(path) {
- try {
- var stat = _fsExtra2.default.statSync(path);
-
- if (stat && stat.isDirectory()) {
- return true;
- }
- } catch (e) {
- return false;
- }
- return false;
- }
- }, {
- key: 'createFile',
- value: function createFile(path) {
- var content = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
-
- if (path.indexOf('.json') > -1) {
- _fsExtra2.default.writeJsonSync(path, content, { space: 2, encoding: 'utf-8' });
- }
- }
- }, {
- key: 'createFolder',
- value: function createFolder(path) {
- if (!FolderUtils.isFolder(path)) {
- _mkdirp2.default.sync(path);
- }
- }
- }, {
- key: 'getFolderPath',
- value: function getFolderPath(path) {
- var folders = path.replace(_.config.root, '');
- folders = folders.replace(/^\//, "");
- folders = folders.split('/');
- folders.shift();
- folders = folders.join('/');
- folders = _.fileUtils.removeLast(folders);
- return folders;
- }
- }, {
- key: 'folderInfos',
- value: function folderInfos(pathFolder) {
- var pathArr = pathFolder.split('/');
- var name = pathArr[pathArr.length - 1];
-
- var rootArr = _.config.root.split('/');
- var website = rootArr[pathArr.length - 1];
- return {
- 'name': name,
- 'path': pathFolder,
- 'website': website,
- 'cleanPath': _.fileUtils.cleanPath(pathFolder.replace(_.config.root, '')),
- 'type': 'folder'
- };
- }
- }]);
-
- return FolderUtils;
+ function FolderUtils() {
+ _classCallCheck(this, FolderUtils);
+ }
+
+ _createClass(FolderUtils, null, [{
+ key: 'isFolder',
+ value: function isFolder(path) {
+ try {
+ var stat = _fsExtra2.default.statSync(path);
+
+ if (stat && stat.isDirectory()) {
+ return true;
+ }
+ } catch (e) {
+ return false;
+ }
+ return false;
+ }
+ }, {
+ key: 'createFile',
+ value: function createFile(path) {
+ var content = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+ if (path.indexOf('.json') > -1) {
+ _fsExtra2.default.writeJsonSync(path, content, { space: 2, encoding: 'utf-8' });
+ }
+ }
+ }, {
+ key: 'createFolder',
+ value: function createFolder(path) {
+ if (!FolderUtils.isFolder(path)) {
+ _mkdirp2.default.sync(path);
+ }
+ }
+ }, {
+ key: 'getFolderPath',
+ value: function getFolderPath(path) {
+ var folders = path.replace(_.config.root, '');
+ folders = folders.replace(/^\//, '');
+ folders = folders.split('/');
+ folders.shift();
+ folders = folders.join('/');
+ folders = _.fileUtils.removeLast(folders);
+ return folders;
+ }
+ }, {
+ key: 'folderInfos',
+ value: function folderInfos(pathFolder) {
+ var pathArr = pathFolder.split('/');
+ var name = pathArr[pathArr.length - 1];
+
+ var rootArr = _.config.root.split('/');
+ var website = rootArr[pathArr.length - 1];
+ return {
+ 'name': name,
+ 'path': pathFolder,
+ 'website': website,
+ 'cleanPath': _.fileUtils.cleanPath(pathFolder.replace(_.config.root, '')),
+ 'type': 'folder'
+ };
+ }
+ }]);
+
+ return FolderUtils;
}();
exports.default = FolderUtils;
\ No newline at end of file
diff --git a/dist/cli/helpers/regex-helper.js b/dist/cli/helpers/regex-helper.js
index 0150d290..491656ee 100755
--- a/dist/cli/helpers/regex-helper.js
+++ b/dist/cli/helpers/regex-helper.js
@@ -35,14 +35,14 @@ function getAttr(str, attr) {
*/
function explodeTag(text, tag) {
var startWithTags = false;
- if (text.indexOf("<" + tag) === 0) {
+ if (text.indexOf('<' + tag) === 0) {
startWithTags = true;
}
- var tags = text.split("<" + tag);
+ var tags = text.split('<' + tag);
var i = 0;
var reconstruct = [];
- var wait = "";
+ var wait = '';
reconstruct.push(tags.shift());
Array.prototype.forEach.call(tags, function (ele) {
@@ -102,15 +102,15 @@ function querySelectorTags(text, tag) {
var matches = ele.match(escapeTextToRegex('<' + tag, 'g'));
if (typeof matches !== 'undefined' && matches !== null && matches.length > 1) {
- var tagLength = "<" + tag;
+ var tagLength = '<' + tag;
tagLength = tagLength.length;
// remove first tag
- var start = ele.indexOf("<" + tag);
+ var start = ele.indexOf('<' + tag);
ele = ele.substring(start + tagLength);
// remove end tag
- var end = ele.lastIndexOf("" + tag);
+ var end = ele.lastIndexOf('' + tag);
ele = ele.substring(0, end);
text += ele;
@@ -121,7 +121,7 @@ function querySelectorTags(text, tag) {
Array.prototype.forEach.call(res, function (ele) {
var matches = ele.match(escapeTextToRegex('<' + tag, 'g'));
if (typeof matches !== 'undefined' && matches !== null && matches.length > 0) {
- var finalEleReg = new RegExp("<" + tag + "([\\s\\S]*?)<\\/" + tag + ">(?![\\s\\S]*<\/" + tag + ">)");
+ var finalEleReg = new RegExp('<' + tag + '([\\s\\S]*?)<\\/' + tag + '>(?![\\s\\S]*<\/' + tag + '>)');
finalEleReg = finalEleReg.exec(ele);
if (typeof finalEleReg !== 'undefined' && finalEleReg !== null && finalEleReg.length > 0) {
finalRes.push(finalEleReg[0]);
diff --git a/dist/cli/models/Manager.js b/dist/cli/models/Manager.js
index 8c186b1e..9fa128c2 100644
--- a/dist/cli/models/Manager.js
+++ b/dist/cli/models/Manager.js
@@ -41,7 +41,7 @@ var Manager = function () {
function Manager(enforcer) {
_classCallCheck(this, Manager);
- if (enforcer != singletonEnforcer) throw "Cannot construct Json singleton";
+ if (enforcer != singletonEnforcer) throw 'Cannot construct Json singleton';
_handlebars2.default.templates = _handlebars2.default.templates || {};
this.loadHbsTemplates();
@@ -58,6 +58,16 @@ var Manager = function () {
return this._list;
}
+ }, {
+ key: 'setList',
+ value: function setList(list) {
+ if (_cli.config.redis.enable) {
+ redis.get().set('list', JSON.stringify(list));
+ }
+ this._list = list;
+
+ return this;
+ }
}, {
key: 'init',
value: function init() {
@@ -81,7 +91,7 @@ var Manager = function () {
key: 'updateList',
value: function updateList() {
this._list = _cli.FileParser.getAllFilesWithKeys(this._whereKeys);
- this._list.sort(_cli.FileParser.predicatBy('date'));
+ this._list.sort(_cli.FileParser.predicatBy('date', -1));
if (_cli.config.redis.enable) {
redis.get().set('list', JSON.stringify(this._list));
}
@@ -93,7 +103,7 @@ var Manager = function () {
key: 'addHbsTemplate',
value: function addHbsTemplate(templateId) {
var pathTemplate = _path2.default.join(_cli.config.root, _cli.config.templates.url, 'hbs', templateId) + '.hbs';
- var tmpl = eval("(function(){return " + _fsExtra2.default.readFileSync(pathTemplate) + "}());");
+ var tmpl = eval('(function(){return ' + _fsExtra2.default.readFileSync(pathTemplate) + '}());');
_handlebars2.default.templates[templateId] = _handlebars2.default.template(tmpl);
}
}, {
@@ -106,7 +116,7 @@ var Manager = function () {
}
_fsExtra2.default.readdirSync(pathTemplate).forEach(function (file) {
- if (file.indexOf(".hbs") > -1) {
+ if (file.indexOf('.hbs') > -1) {
var originalTemplatePath = _path2.default.join(_cli.config.root, _cli.config.templates.url) + '/' + file.replace('.hbs', '.' + _cli.config.files.templates.extension);
try {
@@ -120,7 +130,7 @@ var Manager = function () {
if (originalTemplateMdate > mdate) {
_fsExtra2.default.unlinkSync(_path2.default.join(pathTemplate, file));
} else {
- var tmpl = eval("(function(){return " + _fsExtra2.default.readFileSync(_path2.default.join(pathTemplate, file)) + "}());");
+ var tmpl = eval('(function(){return ' + _fsExtra2.default.readFileSync(_path2.default.join(pathTemplate, file)) + '}());');
_handlebars2.default.templates[file.replace('.hbs', '')] = _handlebars2.default.template(tmpl);
}
} catch (err) {
diff --git a/dist/cli/models/Page.js b/dist/cli/models/Page.js
index e57709c1..a7442622 100644
--- a/dist/cli/models/Page.js
+++ b/dist/cli/models/Page.js
@@ -24,6 +24,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
* Page class
* manage HTML generation for page template
*/
+
var Page = function () {
/**
@@ -34,6 +35,7 @@ var Page = function () {
* @param {Boolean} onlyHTML default = false, if true HTML content will contains abe attributes
* @return {String} HTML page as string
*/
+
function Page(templateId, template, json) {
var _this = this;
@@ -53,128 +55,128 @@ var Page = function () {
//console.log('precompile')
} else {
- var source;
- var keys;
- var i;
- var replaceEach;
- var patAttrSource;
- var patAttrSourceMatch;
- var patAttrSourceInside;
- var eachSource;
- var matches;
- var compiledTemplate;
-
- (function () {
-
- _this._onlyHTML = onlyHTML;
- _this.template = template;
- _this.HbsTemplatePath = _.fileUtils.getTemplatePath('hbs/' + templateId + '.hbs');
+ var source;
+ var keys;
+ var i;
+ var replaceEach;
+ var patAttrSource;
+ var patAttrSourceMatch;
+ var patAttrSourceInside;
+ var eachSource;
+ var matches;
+ var compiledTemplate;
- var util = new _.Util();
+ (function () {
- _.abeEngine.instance.content = json;
+ _this._onlyHTML = onlyHTML;
+ _this.template = template;
+ _this.HbsTemplatePath = _.fileUtils.getTemplatePath('hbs/' + templateId + '.hbs');
- // This pattern finds all abe tags which are not enclosed in a html tag attribute
- // it finds this one: {{abe type='text' key='meta_title' desc='Meta title' tab='Meta' order='4000'}}
- // it excludes this one: \s*(\{\{#each (\r|\t|\n|.)*?\/each\}\})/g;
+ // This pattern finds all abe tags which are not enclosed in a html tag attribute
+ // it finds this one: {{abe type='text' key='meta_title' desc='Meta title' tab='Meta' order='4000'}}
+ // it excludes this one: \s*(\{\{#each (\r|\t|\n|.)*?\/each\}\})/g;
- if (!_this._onlyHTML) {
+ // This pattern finds all {{#each ...}}...{{/each}} blocks
+ _this.blockPattern = /(\{\{#each.*\}\}[\s\S]*?\{\{\/each\}\})/g;
- // Surrounds each Abe tag (which are text/rich/textarea and not in html attribute) with tag
- // ie. {{abe type='text' key='meta_title' desc='Meta title' tab='Meta' order='4000'}}
- _this._encloseAbeTag();
- }
+ // Remove text with attribute "visible=false"
+ _this._removeHidden();
+
+ if (!_this._onlyHTML) {
+
+ // Surrounds each Abe tag (which are text/rich/textarea and not in html attribute) with tag
+ // ie. {{abe type='text' key='meta_title' desc='Meta title' tab='Meta' order='4000'}}
+ _this._encloseAbeTag();
+ }
- // je rajoute les index pour chaque bloc lié à un each
- _this._indexEachBlocks();
+ // je rajoute les index pour chaque bloc lié à un each
+ _this._indexEachBlocks();
- if (!_this._onlyHTML) {
+ if (!_this._onlyHTML) {
- // Je maj les attributs associés aux Abe qui sont dans des attributs de tag HTML
- _this._updateAbeAsAttribute();
+ // Je maj les attributs associés aux Abe qui sont dans des attributs de tag HTML
+ _this._updateAbeAsAttribute();
- // je rajoute les attributs pour les tags Abe (qui ne sont pas dans un attribut HTML)
- _this._updateAbeAsTag();
+ // je rajoute les attributs pour les tags Abe (qui ne sont pas dans un attribut HTML)
+ _this._updateAbeAsTag();
- // Don't know what it does...
- source = _.config.source.name;
+ // Don't know what it does...
+ source = _.config.source.name;
- if (typeof json[source] !== 'undefined' && json[source] !== null) {
- keys = Object.keys(json[source]);
+ if (typeof json[source] !== 'undefined' && json[source] !== null) {
+ keys = Object.keys(json[source]);
- for (i in keys) {
- replaceEach = new RegExp('', 'g');
+ for (i in keys) {
+ replaceEach = new RegExp('', 'g');
- _this.template = _this.template.replace(replaceEach, '');
+ _this.template = _this.template.replace(replaceEach, '');
- patAttrSource = new RegExp(' ([A-Za-z0-9\-\_]+)=["|\'].*?({{' + keys[i] + '}}).*?["|\']', 'g');
- patAttrSourceMatch = _this.template.match(patAttrSource);
+ patAttrSource = new RegExp(' ([A-Za-z0-9\-\_]+)=["|\'].*?({{' + keys[i] + '}}).*?["|\']', 'g');
+ patAttrSourceMatch = _this.template.match(patAttrSource);
- if (typeof patAttrSourceMatch !== 'undefined' && patAttrSourceMatch !== null) {
- patAttrSourceInside = new RegExp('(\\S+)=["\']?((?:.(?!["\']?\\s+(?:\\S+)=|[>"\']))+.)["\']?({{' + keys[i] + '}}).*?["|\']', 'g');
+ if (typeof patAttrSourceMatch !== 'undefined' && patAttrSourceMatch !== null) {
+ patAttrSourceInside = new RegExp('(\\S+)=["\']?((?:.(?!["\']?\\s+(?:\\S+)=|[>"\']))+.)["\']?({{' + keys[i] + '}}).*?["|\']', 'g');
- Array.prototype.forEach.call(patAttrSourceMatch, function (pat) {
- var patAttrSourceCheck = patAttrSourceInside.exec(pat);
- if (typeof patAttrSourceCheck !== 'undefined' && patAttrSourceCheck !== null) {
- var checkEscaped = /["|'](.*?)["|']/;
- checkEscaped = checkEscaped.exec(patAttrSourceCheck[0]);
- if (typeof checkEscaped !== 'undefined' && checkEscaped !== null && checkEscaped.length > 0) {
- checkEscaped = escape(checkEscaped[1]);
- _this.template = _this.template.replace(patAttrSourceCheck[0], ' data-abe-attr="' + patAttrSourceCheck[1] + '" data-abe-attr-escaped="' + checkEscaped + '" data-abe="' + keys[i] + '" ' + patAttrSourceCheck[0]);
+ Array.prototype.forEach.call(patAttrSourceMatch, function (pat) {
+ var patAttrSourceCheck = patAttrSourceInside.exec(pat);
+ if (typeof patAttrSourceCheck !== 'undefined' && patAttrSourceCheck !== null) {
+ var checkEscaped = /["|'](.*?)["|']/;
+ checkEscaped = checkEscaped.exec(patAttrSourceCheck[0]);
+ if (typeof checkEscaped !== 'undefined' && checkEscaped !== null && checkEscaped.length > 0) {
+ checkEscaped = escape(checkEscaped[1]);
+ _this.template = _this.template.replace(patAttrSourceCheck[0], ' data-abe-attr="' + patAttrSourceCheck[1] + '" data-abe-attr-escaped="' + checkEscaped + '" data-abe="' + keys[i] + '" ' + patAttrSourceCheck[0]);
+ }
}
- }
- });
- }
+ });
+ }
- eachSource = new RegExp('({{#each ' + keys[i] + '}[\\s\\S a-z]*?{{/each}})', 'g');
- matches = _this.template.match(eachSource);
+ eachSource = new RegExp('({{#each ' + keys[i] + '}[\\s\\S a-z]*?{{/each}})', 'g');
+ matches = _this.template.match(eachSource);
- if (typeof matches !== 'undefined' && matches !== null) {
- Array.prototype.forEach.call(matches, function (match) {
- _this.template = _this.template.replace(match, match + '');
- });
+ if (typeof matches !== 'undefined' && matches !== null) {
+ Array.prototype.forEach.call(matches, function (match) {
+ _this.template = _this.template.replace(match, match + '');
+ });
+ }
}
}
}
- }
- _this._addSource(json);
+ _this._addSource(json);
- // We remove the {{abe type=data ...}} from the text
- _this.template = _.Util.removeDataList(_this.template);
+ // We remove the {{abe type=data ...}} from the text
+ _this.template = _.Util.removeDataList(_this.template);
- // It's time to replace the [index] by {{@index}} (concerning each blocks)
- _this.template = _this.template.replace(/\[index\]\./g, '{{@index}}-');
+ // It's time to replace the [index] by {{@index}} (concerning each blocks)
+ _this.template = _this.template.replace(/\[index\]\./g, '{{@index}}-');
- if (_.config.files.templates.precompile) {
- // Let's persist the precompiled template for future use (kind of cache)
- _fsExtra2.default.writeFileSync(_this.HbsTemplatePath, _handlebars2.default.precompile(_this.template), 'utf8');
- _.Manager.instance.addHbsTemplate(templateId);
- }
+ if (_.config.files.templates.precompile) {
+ // Let's persist the precompiled template for future use (kind of cache)
+ _fsExtra2.default.writeFileSync(_this.HbsTemplatePath, _handlebars2.default.precompile(_this.template), 'utf8');
+ _.Manager.instance.addHbsTemplate(templateId);
+ }
- // I compile the text
- compiledTemplate = _handlebars2.default.compile(!_this._onlyHTML ? util.insertDebugtoolUtilities(_this.template) : _this.template);
+ // I compile the text
+ compiledTemplate = _handlebars2.default.compile(!_this._onlyHTML ? util.insertDebugtoolUtilities(_this.template) : _this.template);
- // I create the html page ! yeah !!!
+ // I create the html page ! yeah !!!
- _this.html = compiledTemplate(json, { data: { intl: _.config.intlData } });
- })();
- }
+ _this.html = compiledTemplate(json, { data: { intl: _.config.intlData } });
+ })();
+ }
if (this._onlyHTML) {
this.html = _.Hooks.instance.trigger('afterPageSaveCompile', this.html, json);
diff --git a/dist/cli/process/publish-all.js b/dist/cli/process/publish-all.js
index a8265199..ca1cb405 100644
--- a/dist/cli/process/publish-all.js
+++ b/dist/cli/process/publish-all.js
@@ -34,11 +34,11 @@ function msToTime(duration) {
minutes = parseInt(duration / (1000 * 60) % 60),
hours = parseInt(duration / (1000 * 60 * 60) % 24);
- hours = hours < 10 ? "0" + hours : hours;
- minutes = minutes < 10 ? "0" + minutes : minutes;
- seconds = seconds < 10 ? "0" + seconds : seconds;
+ hours = hours < 10 ? '0' + hours : hours;
+ minutes = minutes < 10 ? '0' + minutes : minutes;
+ seconds = seconds < 10 ? '0' + seconds : seconds;
- return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
+ return hours + ':' + minutes + ':' + seconds + '.' + milliseconds;
}
function publishNext(published, tt, cb) {
@@ -48,7 +48,7 @@ function publishNext(published, tt, cb) {
var pub = published.shift();
if (typeof pub !== 'undefined' && pub !== null) {
- var jsonPath = FileParser.changePathEnv(pub.path, config.data.url).replace(new RegExp("\\." + config.files.templates.extension), '.json');
+ var jsonPath = FileParser.changePathEnv(pub.path, config.data.url).replace(new RegExp('\\.' + config.files.templates.extension), '.json');
var json = FileParser.getJson(jsonPath);
if (typeof json.abe_meta !== 'undefined' && json.abe_meta !== null) {
i++;
@@ -113,7 +113,7 @@ if (typeof pConfig.ABE_WEBSITE !== 'undefined' && pConfig.ABE_WEBSITE !== null)
console.log('publish-all', 'started by < ' + pConfig.FILEPATH.replace(config.root, ''));
pConfig.FILEPATH = _path2.default.join(config.root, config.data.url, pConfig.FILEPATH.replace(config.root));
- var fileJson = FileParser.getJson(pConfig.FILEPATH.replace(new RegExp("\\." + config.files.templates.extension), '.json'));
+ var fileJson = FileParser.getJson(pConfig.FILEPATH.replace(new RegExp('\\.' + config.files.templates.extension), '.json'));
if (typeof fileJson !== 'undefined' && fileJson !== null) {
if (typeof fileJson.abe_meta !== 'undefined' && fileJson.abe_meta !== null) {
diff --git a/dist/cli/process/update-json.js b/dist/cli/process/update-json.js
index 501afa1f..c634c7a8 100644
--- a/dist/cli/process/update-json.js
+++ b/dist/cli/process/update-json.js
@@ -10,6 +10,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
// ./node_modules/.bin/babel-node src/cli/process/publish-all.js ABE_WEBSITE=/path/to/website
// ./node_modules/.bin/babel-node src/cli/process/publish-all.js FILEPATH=/path/to/website/path/to/file.html ABE_WEBSITE=/path/to/website
+
+
var pConfig = {};
Array.prototype.forEach.call(process.argv, function (item) {
if (item.indexOf('=') > -1) {
diff --git a/dist/hooks/hooks.js b/dist/hooks/hooks.js
index 3c7cbd72..8288cfc0 100755
--- a/dist/hooks/hooks.js
+++ b/dist/hooks/hooks.js
@@ -1,174 +1,174 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var hooks = {
- /***************** express *****************/
- beforeExpress: function beforeExpress(port, abe) {
- return port;
- },
- afterExpress: function afterExpress(app, express, abe) {
- return app;
- },
- beforeRoute: function beforeRoute(req, res, next, abe) {
- return req;
- },
- beforeAddRoute: function beforeAddRoute(router, abe) {
- return router;
- },
- afterAddRoute: function afterAddRoute(router, abe) {
- return router;
- },
+ /***************** express *****************/
+ beforeExpress: function beforeExpress(port, abe) {
+ return port;
+ },
+ afterExpress: function afterExpress(app, express, abe) {
+ return app;
+ },
+ beforeRoute: function beforeRoute(req, res, next, abe) {
+ return req;
+ },
+ beforeAddRoute: function beforeAddRoute(router, abe) {
+ return router;
+ },
+ afterAddRoute: function afterAddRoute(router, abe) {
+ return router;
+ },
- /***************** preview *****************/
- beforePreview: function beforePreview(html, req, res, next, abe) {
- return html;
- },
+ /***************** preview *****************/
+ beforePreview: function beforePreview(html, req, res, next, abe) {
+ return html;
+ },
- /***************** create *****************/
- beforeDeleteFile: function beforeDeleteFile(filePath, abe) {
- return filePath;
- },
- afterDeleteFile: function afterDeleteFile(path, json, abe) {
- return path;
- },
+ /***************** create *****************/
+ beforeDeleteFile: function beforeDeleteFile(filePath, abe) {
+ return filePath;
+ },
+ afterDeleteFile: function afterDeleteFile(path, json, abe) {
+ return path;
+ },
- /***************** create *****************/
- beforeCreate: function beforeCreate(filePath, template, path, name, req, forceJson, abe) {
- return filePath;
- },
- afterCreate: function afterCreate(json, text, path, name, req, forceJson, abe) {
- return json;
- },
+ /***************** create *****************/
+ beforeCreate: function beforeCreate(filePath, template, path, name, req, forceJson, abe) {
+ return filePath;
+ },
+ afterCreate: function afterCreate(json, text, path, name, req, forceJson, abe) {
+ return json;
+ },
- /***************** duplicate *****************/
- beforeDuplicate: function beforeDuplicate(oldFilePath, template, path, name, req, deleteFiles, abe) {
- // if deleteFiles this is an update not a duplicate
- return oldFilePath;
- },
- afterDuplicate: function afterDuplicate(json, oldFilePath, template, path, name, req, deleteFiles, abe) {
- return json;
- },
+ /***************** duplicate *****************/
+ beforeDuplicate: function beforeDuplicate(oldFilePath, template, path, name, req, deleteFiles, abe) {
+ // if deleteFiles this is an update not a duplicate
+ return oldFilePath;
+ },
+ afterDuplicate: function afterDuplicate(json, oldFilePath, template, path, name, req, deleteFiles, abe) {
+ return json;
+ },
- /***************** update *****************/
- beforeUpdate: function beforeUpdate(json, oldFilePath, template, path, name, req, deleteFiles, abe) {
- return json;
- },
+ /***************** update *****************/
+ beforeUpdate: function beforeUpdate(json, oldFilePath, template, path, name, req, deleteFiles, abe) {
+ return json;
+ },
- /***************** save *****************/
- beforeFirstSave: function beforeFirstSave(filePath, req, json, text, abe) {
- return {
- filePath: filePath,
- json: json,
- text: text
- };
- },
- beforeSave: function beforeSave(obj, abe) {
- return obj;
- },
- afterSave: function afterSave(obj, abe) {
- return obj;
- },
- beforeReject: function beforeReject(url, abe) {
- return url;
- },
- afterReject: function afterReject(url, abe) {
- return url;
- },
- beforeSaveImage: function beforeSaveImage(folderWebPath, req, abe) {
- return folderWebPath;
- },
- afterSaveImage: function afterSaveImage(resp, abe) {
- return resp;
- },
- afterPageSaveCompile: function afterPageSaveCompile(tmp, json, abe) {
- return tmp;
- },
- afterPageEditorCompile: function afterPageEditorCompile(tmp, json, abe) {
- return tmp;
- },
+ /***************** save *****************/
+ beforeFirstSave: function beforeFirstSave(filePath, req, json, text, abe) {
+ return {
+ filePath: filePath,
+ json: json,
+ text: text
+ };
+ },
+ beforeSave: function beforeSave(obj, abe) {
+ return obj;
+ },
+ afterSave: function afterSave(obj, abe) {
+ return obj;
+ },
+ beforeReject: function beforeReject(url, abe) {
+ return url;
+ },
+ afterReject: function afterReject(url, abe) {
+ return url;
+ },
+ beforeSaveImage: function beforeSaveImage(folderWebPath, req, abe) {
+ return folderWebPath;
+ },
+ afterSaveImage: function afterSaveImage(resp, abe) {
+ return resp;
+ },
+ afterPageSaveCompile: function afterPageSaveCompile(tmp, json, abe) {
+ return tmp;
+ },
+ afterPageEditorCompile: function afterPageEditorCompile(tmp, json, abe) {
+ return tmp;
+ },
- /***************** Manager *****************/
- beforeGetAllFilesDraft: function beforeGetAllFilesDraft(drafted, abe) {
- return drafted;
- },
- beforeGetAllFilesPublished: function beforeGetAllFilesPublished(published, abe) {
- return published;
- },
- afterGetAllFiles: function afterGetAllFiles(merged, abe) {
- return merged;
- },
+ /***************** Manager *****************/
+ beforeGetAllFilesDraft: function beforeGetAllFilesDraft(drafted, abe) {
+ return drafted;
+ },
+ beforeGetAllFilesPublished: function beforeGetAllFilesPublished(published, abe) {
+ return published;
+ },
+ afterGetAllFiles: function afterGetAllFiles(merged, abe) {
+ return merged;
+ },
- /***************** Editor *****************/
- beforeImport: function beforeImport(file, config, ctx, abe) {
- return file;
- },
- afterImport: function afterImport(res, file, config, ctx, abe) {
- return res;
- },
- afterHandlebarsHelpers: function afterHandlebarsHelpers(Handlebars, abe) {
- return Handlebars;
- },
- beforeEditorInput: function beforeEditorInput(params, abe) {
- return params;
- },
- afterEditorInput: function afterEditorInput(htmlString, params, abe) {
- return htmlString;
- },
+ /***************** Editor *****************/
+ beforeImport: function beforeImport(file, config, ctx, abe) {
+ return file;
+ },
+ afterImport: function afterImport(res, file, config, ctx, abe) {
+ return res;
+ },
+ afterHandlebarsHelpers: function afterHandlebarsHelpers(Handlebars, abe) {
+ return Handlebars;
+ },
+ beforeEditorInput: function beforeEditorInput(params, abe) {
+ return params;
+ },
+ afterEditorInput: function afterEditorInput(htmlString, params, abe) {
+ return htmlString;
+ },
- beforeAbeAttributes: function beforeAbeAttributes(str, json, abe) {
- return str;
- },
- afterAbeAttributes: function afterAbeAttributes(obj, str, json, abe) {
- return obj;
- },
- beforeEditorFormBlocks: function beforeEditorFormBlocks(json, abe) {
- return json;
- },
- afterEditorFormBlocks: function afterEditorFormBlocks(blocks, json, abe) {
- return blocks;
- },
- beforeListPage: function beforeListPage(file, index, text) {
- return file;
- },
- afterListPageDraft: function afterListPageDraft(workflow, file, index, text) {
- return workflow;
- },
- afterListPage: function afterListPage(res, file, index, text) {
- return res;
- },
- afterVariables: function afterVariables(EditorVariables, abe) {
- return EditorVariables;
- },
+ beforeAbeAttributes: function beforeAbeAttributes(str, json, abe) {
+ return str;
+ },
+ afterAbeAttributes: function afterAbeAttributes(obj, str, json, abe) {
+ return obj;
+ },
+ beforeEditorFormBlocks: function beforeEditorFormBlocks(json, abe) {
+ return json;
+ },
+ afterEditorFormBlocks: function afterEditorFormBlocks(blocks, json, abe) {
+ return blocks;
+ },
+ beforeListPage: function beforeListPage(file, index, text) {
+ return file;
+ },
+ afterListPageDraft: function afterListPageDraft(workflow, file, index, text) {
+ return workflow;
+ },
+ afterListPage: function afterListPage(res, file, index, text) {
+ return res;
+ },
+ afterVariables: function afterVariables(EditorVariables, abe) {
+ return EditorVariables;
+ },
- /***************** json *****************/
- beforeGetJson: function beforeGetJson(path, abe) {
- return path;
- },
- afterGetJson: function afterGetJson(json, abe) {
- return json;
- },
- beforeUpdateJson: function beforeUpdateJson(jsonFilesArray, abe) {
- return jsonFilesArray;
- },
+ /***************** json *****************/
+ beforeGetJson: function beforeGetJson(path, abe) {
+ return path;
+ },
+ afterGetJson: function afterGetJson(json, abe) {
+ return json;
+ },
+ beforeUpdateJson: function beforeUpdateJson(jsonFilesArray, abe) {
+ return jsonFilesArray;
+ },
- /***************** text *****************/
- beforeGetTemplate: function beforeGetTemplate(file, abe) {
- return file;
- },
- afterGetTemplate: function afterGetTemplate(text, abe) {
- return text;
- },
+ /***************** text *****************/
+ beforeGetTemplate: function beforeGetTemplate(file, abe) {
+ return file;
+ },
+ afterGetTemplate: function afterGetTemplate(text, abe) {
+ return text;
+ },
- /***************** Page *****************/
- afterAddSourcePage: function afterAddSourcePage(json, text, abe) {
- return json;
- },
+ /***************** Page *****************/
+ afterAddSourcePage: function afterAddSourcePage(json, text, abe) {
+ return json;
+ },
- beforePageJson: function beforePageJson(json, abe) {
- return json;
- }
+ beforePageJson: function beforePageJson(json, abe) {
+ return json;
+ }
};
exports.default = hooks;
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
index 4ec3ba50..e612ab55 100755
--- a/dist/index.js
+++ b/dist/index.js
@@ -59,370 +59,370 @@ var pm2Name = _commander2.default.pname;
var webport = _commander2.default.webport || 8081;
function addPlugin(dir, plugin) {
- var p = new _es6Promise.Promise(function (resolve, reject) {
-
- var pluginName = plugin.split('/');
- pluginName = pluginName[pluginName.length - 1].split('.')[0];
- var pluginDir = dir + '/plugins/' + pluginName;
- var command = 'git clone ' + plugin + ' ' + pluginDir;
-
- try {
- var stat = _fsExtra2.default.statSync(pluginDir);
- console.log(_cliColor2.default.green('remove plugin'), pluginName);
- _fsExtra2.default.removeSync(pluginDir);
- } catch (e) {}
- console.log(_cliColor2.default.green('mkdir'), _cliColor2.default.green(pluginDir));
- (0, _mkdirp2.default)(pluginDir);
-
- _gitExec2.default.clone(plugin, pluginDir, function (repo) {
- if (repo !== null) {
- try {
- console.log(_cliColor2.default.green('cd'), _cliColor2.default.green(pluginDir));
- process.chdir(pluginDir);
-
- console.log(_cliColor2.default.green('spawn'), _cliColor2.default.cyan('npm install'));
- // const npmInstall = spawn('npm', ['install', pluginDir]);
- var npmInstall = (0, _child_process.spawn)('npm', ['install']);
-
- npmInstall.stdout.on('data', function (data) {
- var str = data.toString(),
- lines = str.split(/(\r?\n)/g);
- for (var i = 0; i < lines.length; i++) {
- console.log(str);
- }
- });
-
- npmInstall.stderr.on('data', function (data) {
- var str = data.toString(),
- lines = str.split(/(\r?\n)/g);
- for (var i = 0; i < lines.length; i++) {
- console.log(str);
- }
- });
-
- npmInstall.on('close', function (code) {
- console.log(_cliColor2.default.cyan('child process exited with code'), code);
-
- var json = {};
- var abeJson = dir + '/abe.json';
-
- try {
- var stat = _fsExtra2.default.statSync(abeJson);
- if (stat) {
- json = _fsExtra2.default.readJsonSync(abeJson);
- }
- } catch (e) {
- console.log(e);
- console.log(_cliColor2.default.cyan('no abe.json creating'), abeJson);
- }
-
- if (typeof json.dependencies === 'undefined' || json.dependencies === null) {
- json.dependencies = [plugin];
- } else {
- var found = false;
- Array.prototype.forEach.call(json.dependencies, function (plugged) {
- if (plugin === plugged) {
- found = true;
- }
- });
- if (!found) {
- json.dependencies.push(plugin);
- }
- }
-
- _fsExtra2.default.writeJsonSync(abeJson, json, { space: 2, encoding: 'utf-8' });
- resolve();
- });
- } catch (err) {
- console.log(_cliColor2.default.cyan('chdir'), err);
- }
- } else {
- console.log(_cliColor2.default.red('clone error'));
- }
- });
- });
-
- return p;
+ var p = new _es6Promise.Promise(function (resolve, reject) {
+
+ var pluginName = plugin.split('/');
+ pluginName = pluginName[pluginName.length - 1].split('.')[0];
+ var pluginDir = dir + '/plugins/' + pluginName;
+ var command = 'git clone ' + plugin + ' ' + pluginDir;
+
+ try {
+ var stat = _fsExtra2.default.statSync(pluginDir);
+ console.log(_cliColor2.default.green('remove plugin'), pluginName);
+ _fsExtra2.default.removeSync(pluginDir);
+ } catch (e) {}
+ console.log(_cliColor2.default.green('mkdir'), _cliColor2.default.green(pluginDir));
+ (0, _mkdirp2.default)(pluginDir);
+
+ _gitExec2.default.clone(plugin, pluginDir, function (repo) {
+ if (repo !== null) {
+ try {
+ console.log(_cliColor2.default.green('cd'), _cliColor2.default.green(pluginDir));
+ process.chdir(pluginDir);
+
+ console.log(_cliColor2.default.green('spawn'), _cliColor2.default.cyan('npm install'));
+ // const npmInstall = spawn('npm', ['install', pluginDir]);
+ var npmInstall = (0, _child_process.spawn)('npm', ['install']);
+
+ npmInstall.stdout.on('data', function (data) {
+ var str = data.toString(),
+ lines = str.split(/(\r?\n)/g);
+ for (var i = 0; i < lines.length; i++) {
+ console.log(str);
+ }
+ });
+
+ npmInstall.stderr.on('data', function (data) {
+ var str = data.toString(),
+ lines = str.split(/(\r?\n)/g);
+ for (var i = 0; i < lines.length; i++) {
+ console.log(str);
+ }
+ });
+
+ npmInstall.on('close', function (code) {
+ console.log(_cliColor2.default.cyan('child process exited with code'), code);
+
+ var json = {};
+ var abeJson = dir + '/abe.json';
+
+ try {
+ var stat = _fsExtra2.default.statSync(abeJson);
+ if (stat) {
+ json = _fsExtra2.default.readJsonSync(abeJson);
+ }
+ } catch (e) {
+ console.log(e);
+ console.log(_cliColor2.default.cyan('no abe.json creating'), abeJson);
+ }
+
+ if (typeof json.dependencies === 'undefined' || json.dependencies === null) {
+ json.dependencies = [plugin];
+ } else {
+ var found = false;
+ Array.prototype.forEach.call(json.dependencies, function (plugged) {
+ if (plugin === plugged) {
+ found = true;
+ }
+ });
+ if (!found) {
+ json.dependencies.push(plugin);
+ }
+ }
+
+ _fsExtra2.default.writeJsonSync(abeJson, json, { space: 2, encoding: 'utf-8' });
+ resolve();
+ });
+ } catch (err) {
+ console.log(_cliColor2.default.cyan('chdir'), err);
+ }
+ } else {
+ console.log(_cliColor2.default.red('clone error'));
+ }
+ });
+ });
+
+ return p;
}
if (typeof userArgs[0] !== 'undefined' && userArgs[0] !== null) {
- switch (userArgs[0]) {
- case 'build':
- var dir = process.cwd();
- process.chdir(__dirname + '/../');
- var command = 'ROOT=' + dir + ' FOLDER=' + (_commander2.default.folder ? _commander2.default.folder : 'draft') + ' DEST=' + (_commander2.default.destination ? _commander2.default.destination : 'tmp') + ' FLOW=' + (_commander2.default.type ? _commander2.default.type : 'draft') + ' npm run build:folder';
- console.log("command : " + command);
- _childProcessPromise2.default.exec(command).then(function (result) {
- var stdout = result.stdout;
- var stderr = result.stderr;
- if (stdout) console.log('stdout: ', stdout);
- if (stderr) console.log('stderr: ', stderr);
- }).fail(function (err) {
- console.error('ERROR: ', err);
- }).progress(function (childProcess) {
- // console.log('childProcess.pid: ', childProcess.pid);
- });
- break;
- case 'create':
- var dir = userArgs[1];
- if (process.env.ROOT) {
- dir = process.env.ROOT + userArgs[1];
- }
- if (typeof dir !== 'undefined' && dir !== null) {
- create.init(dir);
- } else {
- console.error("Error: no project path specified");
- }
- break;
- case 'serve':
- var dir = process.cwd();
- if (process.env.ROOT) {
- dir = process.env.ROOT;
- }
- var environment = process.env;
- environment.ROOT = dir;
- environment.WEBPORT = webport;
- if (typeof port !== 'undefined' && port !== null) {
- environment.PORT = port;
- }
- var command = 'node --harmony ./dist/server/index.js';
- // if (interactive) command = 'OPENURL=1 ' + command
- process.chdir(__dirname + '/../');
- console.log('website started : ' + dir + (port ? ' on port :' + port : ''));
- var cp = (0, _child_process.exec)(command, {
- env: environment
- }, function (err, out, code) {
- if (err instanceof Error) throw err;
- process.stderr.write(err);
- process.stdout.write(out);
- process.exit(code);
- });
- cp.stderr.pipe(process.stderr);
- cp.stdout.pipe(process.stdout);
- break;
- case 'list':
- var dir = process.cwd();
- dir = dir.replace(/\/$/, '');
- _pm2.default.connect(function (err) {
- if (err instanceof Error) throw err;
-
- _pm2.default.list(function (err, list) {
- if (err instanceof Error) throw err;
- Array.prototype.forEach.call(list, function (item) {
- console.log('[ pm2 ]', '{', '"pid":', item.pid + ',', '"process":', '"' + item.name + '"', '}');
- });
- process.exit(0);
- });
- });
- break;
- case 'prod':
- var dir = process.cwd();
- if (process.env.ROOT) {
- dir = process.env.ROOT;
- }
- dir = dir.replace(/\/$/, '');
- var abeJson = require(dir + '/abe.json');
- var processName = abeJson.processName || 'abe';
- var processPort = abeJson.port || port;
- _pm2.default.connect(function (err) {
- if (err instanceof Error) throw err;
- var start = _pm2.default.start;
-
- _pm2.default.list(function (err, process_list) {
- var found = false;
-
- Array.prototype.forEach.call(process_list, function (process) {
- if (process.name === processName) {
- found = true;
- }
- });
-
- var cb = function cb() {
- var options = {
- 'name': processName,
- 'nodeArgs': ['--harmony'],
- env: {
- 'WEBPORT:': webport,
- 'PORT': processPort,
- 'ROOT': dir
- }
- };
- console.log('[ pm2 ] start', __dirname + '/server/index.js');
- _pm2.default.start(__dirname + '/server/index.js', options, function (err, proc) {
- if (err instanceof Error) throw err;
-
- _pm2.default.list(function (err, list) {
- if (err instanceof Error) throw err;
- Array.prototype.forEach.call(list, function (item) {
- console.log('[ pm2 ]', '{', '"pid":', item.pid + ',', '"process":', '"' + item.name + '"', '}');
- });
- process.exit(0);
- });
- });
- };
-
- if (!found) {
- cb();
- } else {
- console.log('[ pm2 ] stop ', processName);
- _pm2.default.delete(processName, function (err, proc) {
- if (err) throw new Error(err);
- console.log('[ pm2 ]', processName, 'server stopped');
- cb();
- });
- }
- });
- });
- break;
- case 'servenodemon':
- var dir = process.cwd();
- var command = 'WEBPORT=' + webport + ' ROOT=' + dir + ' npm run startdev --node-args="--debug"';
- if (interactive) command = 'OPENURL=1 ' + command;
- if (port) command = 'PORT=' + port + ' ' + command;
- process.chdir(__dirname + '/../');
- console.log('website started : ' + dir + (port ? ' on port :' + port : ''));
- var cp = (0, _child_process.exec)(command, function (err, out, code) {
- if (err instanceof Error) throw err;
- // process.stderr.write(err)
- // process.stdout.write(out)
- process.exit(code);
- });
- cp.stderr.pipe(process.stderr);
- cp.stdout.pipe(process.stdout);
- break;
- case 'stop':
- var dir = process.cwd();
- var abeJson = require(dir + '/abe.json');
- var processName = abeJson.processName || 'abe';
- var processPort = abeJson.port || port;
- _pm2.default.connect(function (err) {
- if (err instanceof Error) throw err;
- var start = _pm2.default.start;
-
- _pm2.default.list(function (err, process_list) {
- var found = false;
-
- Array.prototype.forEach.call(process_list, function (process) {
- if (process.name === processName) {
- found = true;
- }
- });
-
- if (found) {
- console.log('[ pm2 ] stop ', processName);
- _pm2.default.delete(processName, function (err, proc) {
- if (err) throw new Error(err);
- console.log('[ pm2 ]', processName, 'server stopped');
- process.exit(0);
- });
- }
- });
- });
- break;
- case 'publish-all':
- var dir = process.cwd();
- var customPath = '';
- if (typeof userArgs[1] !== 'undefined' && userArgs[1] !== null) {
- customPath = 'ABE_PATH=' + userArgs[1];
- }
- if (process.env.ROOT) {
- dir = process.env.ROOT.replace(/\/$/, '');
- }
-
- // var command = `node --harmony --debug ./cli/process/publish-all.js ABE_WEBSITE=${dir}`
- var publishAll = (0, _child_process.spawn)('node', ['--harmony', __dirname + '/cli/process/publish-all.js', 'ABE_WEBSITE=' + dir, customPath]);
-
- publishAll.stdout.on('data', function (data) {
- console.log(data.toString().replace(/\n/, ''));
- });
-
- publishAll.stderr.on('data', function (data) {
- console.log(data.toString().replace(/\n/, ''));
- });
-
- publishAll.on('close', function (code) {
- console.log(_cliColor2.default.cyan('child process exited with code') + ' ' + code);
- process.exit(0);
- });
-
- break;
- case 'update-json':
- var dir = process.cwd();
- if (process.env.ROOT) {
- dir = process.env.ROOT.replace(/\/$/, '');
- }
-
- var updateJson = (0, _child_process.spawn)('node', ['--harmony', __dirname + '/cli/process/update-json.js', 'ABE_WEBSITE=' + dir]);
-
- updateJson.stdout.on('data', function (data) {
- console.log(_cliColor2.default.cyan('stdout'), data.toString());
- });
-
- updateJson.stderr.on('data', function (data) {
- console.log(_cliColor2.default.red('stderr'), data.toString());
- });
-
- updateJson.on('close', function (code) {
- console.log(_cliColor2.default.cyan('child process exited with code'), code);
- process.exit(0);
- });
-
- break;
- case 'install':
- var dir = process.cwd();
- var plugin = userArgs[1];
- if (process.env.ROOT) {
- dir = process.env.ROOT.replace(/\/$/, '');
- }
-
- var json = {};
- var abeJson = dir + '/abe.json';
-
- try {
- var stat = _fsExtra2.default.statSync(abeJson);
- if (stat) {
- json = _fsExtra2.default.readJsonSync(abeJson);
- }
- } catch (e) {
- console.log(_cliColor2.default.cyan('no config'), abeJson);
- }
-
- var ps = [];
- if (typeof json.dependencies !== 'undefined' || json.dependencies !== null) {
- Array.prototype.forEach.call(json.dependencies, function (plugged) {
- ps.push(addPlugin(dir, plugged));
- });
- }
-
- _es6Promise.Promise.all(ps).then(function () {
- process.exit(0);
- });
- break;
- case 'add':
- // ROOT=[ PATH TO PROJECT ]/abe-test-os ./node_modules/.bin/babel-node src/index.js add [ GIT PROJECT ]
- var dir = process.cwd();
- var plugin = userArgs[1];
- if (process.env.ROOT) {
- dir = process.env.ROOT.replace(/\/$/, '');
- }
-
- if (typeof dir !== 'undefined' && dir !== null) {
- if (typeof plugin !== 'undefined' && plugin !== null) {
- addPlugin(dir, plugin).then(function () {
- process.exit(0);
- });
- } else {
- console.log(_cliColor2.default.red("Error: no project path specified"));
- }
- } else {
- console.log(_cliColor2.default.red("Error: no project path specified"));
- }
- break;
- default:
- console.log("Help: use `create` or `serve` command");
- break;
- }
+ switch (userArgs[0]) {
+ case 'build':
+ var dir = process.cwd();
+ process.chdir(__dirname + '/../');
+ var command = 'ROOT=' + dir + ' FOLDER=' + (_commander2.default.folder ? _commander2.default.folder : 'draft') + ' DEST=' + (_commander2.default.destination ? _commander2.default.destination : 'tmp') + ' FLOW=' + (_commander2.default.type ? _commander2.default.type : 'draft') + ' npm run build:folder';
+ console.log('command : ' + command);
+ _childProcessPromise2.default.exec(command).then(function (result) {
+ var stdout = result.stdout;
+ var stderr = result.stderr;
+ if (stdout) console.log('stdout: ', stdout);
+ if (stderr) console.log('stderr: ', stderr);
+ }).fail(function (err) {
+ console.error('ERROR: ', err);
+ }).progress(function (childProcess) {
+ // console.log('childProcess.pid: ', childProcess.pid);
+ });
+ break;
+ case 'create':
+ var dir = userArgs[1];
+ if (process.env.ROOT) {
+ dir = process.env.ROOT + userArgs[1];
+ }
+ if (typeof dir !== 'undefined' && dir !== null) {
+ create.init(dir);
+ } else {
+ console.error('Error: no project path specified');
+ }
+ break;
+ case 'serve':
+ var dir = process.cwd();
+ if (process.env.ROOT) {
+ dir = process.env.ROOT;
+ }
+ var environment = process.env;
+ environment.ROOT = dir;
+ environment.WEBPORT = webport;
+ if (typeof port !== 'undefined' && port !== null) {
+ environment.PORT = port;
+ }
+ var command = 'node --harmony ./dist/server/index.js';
+ // if (interactive) command = 'OPENURL=1 ' + command
+ process.chdir(__dirname + '/../');
+ console.log('website started : ' + dir + (port ? ' on port :' + port : ''));
+ var cp = (0, _child_process.exec)(command, {
+ env: environment
+ }, function (err, out, code) {
+ if (err instanceof Error) throw err;
+ process.stderr.write(err);
+ process.stdout.write(out);
+ process.exit(code);
+ });
+ cp.stderr.pipe(process.stderr);
+ cp.stdout.pipe(process.stdout);
+ break;
+ case 'list':
+ var dir = process.cwd();
+ dir = dir.replace(/\/$/, '');
+ _pm2.default.connect(function (err) {
+ if (err instanceof Error) throw err;
+
+ _pm2.default.list(function (err, list) {
+ if (err instanceof Error) throw err;
+ Array.prototype.forEach.call(list, function (item) {
+ console.log('[ pm2 ]', '{', '"pid":', item.pid + ',', '"process":', '"' + item.name + '"', '}');
+ });
+ process.exit(0);
+ });
+ });
+ break;
+ case 'prod':
+ var dir = process.cwd();
+ if (process.env.ROOT) {
+ dir = process.env.ROOT;
+ }
+ dir = dir.replace(/\/$/, '');
+ var abeJson = require(dir + '/abe.json');
+ var processName = abeJson.processName || 'abe';
+ var processPort = abeJson.port || port;
+ _pm2.default.connect(function (err) {
+ if (err instanceof Error) throw err;
+ var start = _pm2.default.start;
+
+ _pm2.default.list(function (err, process_list) {
+ var found = false;
+
+ Array.prototype.forEach.call(process_list, function (process) {
+ if (process.name === processName) {
+ found = true;
+ }
+ });
+
+ var cb = function cb() {
+ var options = {
+ 'name': processName,
+ 'nodeArgs': ['--harmony'],
+ env: {
+ 'WEBPORT:': webport,
+ 'PORT': processPort,
+ 'ROOT': dir
+ }
+ };
+ console.log('[ pm2 ] start', __dirname + '/server/index.js');
+ _pm2.default.start(__dirname + '/server/index.js', options, function (err, proc) {
+ if (err instanceof Error) throw err;
+
+ _pm2.default.list(function (err, list) {
+ if (err instanceof Error) throw err;
+ Array.prototype.forEach.call(list, function (item) {
+ console.log('[ pm2 ]', '{', '"pid":', item.pid + ',', '"process":', '"' + item.name + '"', '}');
+ });
+ process.exit(0);
+ });
+ });
+ };
+
+ if (!found) {
+ cb();
+ } else {
+ console.log('[ pm2 ] stop ', processName);
+ _pm2.default.delete(processName, function (err, proc) {
+ if (err) throw new Error(err);
+ console.log('[ pm2 ]', processName, 'server stopped');
+ cb();
+ });
+ }
+ });
+ });
+ break;
+ case 'servenodemon':
+ var dir = process.cwd();
+ var command = 'WEBPORT=' + webport + ' ROOT=' + dir + ' npm run startdev --node-args="--debug"';
+ if (interactive) command = 'OPENURL=1 ' + command;
+ if (port) command = 'PORT=' + port + ' ' + command;
+ process.chdir(__dirname + '/../');
+ console.log('website started : ' + dir + (port ? ' on port :' + port : ''));
+ var cp = (0, _child_process.exec)(command, function (err, out, code) {
+ if (err instanceof Error) throw err;
+ // process.stderr.write(err)
+ // process.stdout.write(out)
+ process.exit(code);
+ });
+ cp.stderr.pipe(process.stderr);
+ cp.stdout.pipe(process.stdout);
+ break;
+ case 'stop':
+ var dir = process.cwd();
+ var abeJson = require(dir + '/abe.json');
+ var processName = abeJson.processName || 'abe';
+ var processPort = abeJson.port || port;
+ _pm2.default.connect(function (err) {
+ if (err instanceof Error) throw err;
+ var start = _pm2.default.start;
+
+ _pm2.default.list(function (err, process_list) {
+ var found = false;
+
+ Array.prototype.forEach.call(process_list, function (process) {
+ if (process.name === processName) {
+ found = true;
+ }
+ });
+
+ if (found) {
+ console.log('[ pm2 ] stop ', processName);
+ _pm2.default.delete(processName, function (err, proc) {
+ if (err) throw new Error(err);
+ console.log('[ pm2 ]', processName, 'server stopped');
+ process.exit(0);
+ });
+ }
+ });
+ });
+ break;
+ case 'publish-all':
+ var dir = process.cwd();
+ var customPath = '';
+ if (typeof userArgs[1] !== 'undefined' && userArgs[1] !== null) {
+ customPath = 'ABE_PATH=' + userArgs[1];
+ }
+ if (process.env.ROOT) {
+ dir = process.env.ROOT.replace(/\/$/, '');
+ }
+
+ // var command = `node --harmony --debug ./cli/process/publish-all.js ABE_WEBSITE=${dir}`
+ var publishAll = (0, _child_process.spawn)('node', ['--harmony', __dirname + '/cli/process/publish-all.js', 'ABE_WEBSITE=' + dir, customPath]);
+
+ publishAll.stdout.on('data', function (data) {
+ console.log(data.toString().replace(/\n/, ''));
+ });
+
+ publishAll.stderr.on('data', function (data) {
+ console.log(data.toString().replace(/\n/, ''));
+ });
+
+ publishAll.on('close', function (code) {
+ console.log(_cliColor2.default.cyan('child process exited with code') + ' ' + code);
+ process.exit(0);
+ });
+
+ break;
+ case 'update-json':
+ var dir = process.cwd();
+ if (process.env.ROOT) {
+ dir = process.env.ROOT.replace(/\/$/, '');
+ }
+
+ var updateJson = (0, _child_process.spawn)('node', ['--harmony', __dirname + '/cli/process/update-json.js', 'ABE_WEBSITE=' + dir]);
+
+ updateJson.stdout.on('data', function (data) {
+ console.log(_cliColor2.default.cyan('stdout'), data.toString());
+ });
+
+ updateJson.stderr.on('data', function (data) {
+ console.log(_cliColor2.default.red('stderr'), data.toString());
+ });
+
+ updateJson.on('close', function (code) {
+ console.log(_cliColor2.default.cyan('child process exited with code'), code);
+ process.exit(0);
+ });
+
+ break;
+ case 'install':
+ var dir = process.cwd();
+ var plugin = userArgs[1];
+ if (process.env.ROOT) {
+ dir = process.env.ROOT.replace(/\/$/, '');
+ }
+
+ var json = {};
+ var abeJson = dir + '/abe.json';
+
+ try {
+ var stat = _fsExtra2.default.statSync(abeJson);
+ if (stat) {
+ json = _fsExtra2.default.readJsonSync(abeJson);
+ }
+ } catch (e) {
+ console.log(_cliColor2.default.cyan('no config'), abeJson);
+ }
+
+ var ps = [];
+ if (typeof json.dependencies !== 'undefined' || json.dependencies !== null) {
+ Array.prototype.forEach.call(json.dependencies, function (plugged) {
+ ps.push(addPlugin(dir, plugged));
+ });
+ }
+
+ _es6Promise.Promise.all(ps).then(function () {
+ process.exit(0);
+ });
+ break;
+ case 'add':
+ // ROOT=[ PATH TO PROJECT ]/abe-test-os ./node_modules/.bin/babel-node src/index.js add [ GIT PROJECT ]
+ var dir = process.cwd();
+ var plugin = userArgs[1];
+ if (process.env.ROOT) {
+ dir = process.env.ROOT.replace(/\/$/, '');
+ }
+
+ if (typeof dir !== 'undefined' && dir !== null) {
+ if (typeof plugin !== 'undefined' && plugin !== null) {
+ addPlugin(dir, plugin).then(function () {
+ process.exit(0);
+ });
+ } else {
+ console.log(_cliColor2.default.red('Error: no project path specified'));
+ }
+ } else {
+ console.log(_cliColor2.default.red('Error: no project path specified'));
+ }
+ break;
+ default:
+ console.log('Help: use `create` or `serve` command');
+ break;
+ }
} else {
- console.log("Help: use `create` or `serve` command");
+ console.log('Help: use `create` or `serve` command');
}
\ No newline at end of file
diff --git a/dist/server/app.js b/dist/server/app.js
index 6774a6a6..027c34bc 100755
--- a/dist/server/app.js
+++ b/dist/server/app.js
@@ -130,22 +130,23 @@ if (_cli.config.security === true) {
app.use((0, _helmet2.default)());
app.use(_helmet2.default.csp({
directives: {
- defaultSrc: ["'self'"],
- scriptSrc: ["'self'"].concat(_cli.config.csp.scriptSrc),
- styleSrc: ["'self'", "'unsafe-inline'"].concat(_cli.config.csp.styleSrc),
- imgSrc: ["'self'", 'data:'].concat(_cli.config.csp.imgSrc),
+ defaultSrc: ['\'self\''],
+ scriptSrc: ['\'self\''].concat(_cli.config.csp.scriptSrc),
+ styleSrc: ['\'self\'', '\'unsafe-inline\''].concat(_cli.config.csp.styleSrc),
+ imgSrc: ['\'self\'', 'data:'].concat(_cli.config.csp.imgSrc),
// frameSrc: ["'self'"],
- childSrc: ["'self'"].concat(_cli.config.csp.childSrc),
- frameAncestors: ["'self'"].concat(_cli.config.csp.frameAncestors),
- mediaSrc: ["'self'"].concat(_cli.config.csp.mediaSrc),
- fontSrc: ["'self'"].concat(_cli.config.csp.fontSrc),
- connectSrc: ["'self'"].concat(_cli.config.csp.connectSrc),
- sandbox: ['allow-same-origin', 'allow-scripts', "allow-modals", 'allow-popups', 'allow-forms'],
+ childSrc: ['\'self\''].concat(_cli.config.csp.childSrc),
+ frameAncestors: ['\'self\''].concat(_cli.config.csp.frameAncestors),
+ mediaSrc: ['\'self\''].concat(_cli.config.csp.mediaSrc),
+ fontSrc: ['\'self\''].concat(_cli.config.csp.fontSrc),
+ connectSrc: ['\'self\''].concat(_cli.config.csp.connectSrc),
+ sandbox: ['allow-same-origin', 'allow-scripts', 'allow-modals', 'allow-popups', 'allow-forms'],
reportUri: '/report-violation',
objectSrc: [] },
+ // An empty array allows nothing through
reportOnly: false, // Set to true if you only want browsers to report errors, not block them
setAllHeaders: false, // Set to true if you want to blindly set all headers: Content-Security-Policy, X-WebKit-CSP, and X-Content-Security-Policy.
- disableAndroid: false, // Set to true if you want to disable CSP on Android where it can be buggy.
+ disableAndroid: false, // Set to true if you want to disable CSP on Android where it can be buggy.
browserSniff: true // Set to false if you want to completely disable any user-agent sniffing. This may make the headers less compatible but it will be much faster. This defaults to `true`.
}));
}
@@ -164,7 +165,7 @@ app.use(_express2.default.static(__dirname + '/public'));
_cli.FileParser.copySiteAssets();
-var sites = _cli.FileParser.getFolders(_cli.config.root.replace(/\/$/, ""), false, 0);
+var sites = _cli.FileParser.getFolders(_cli.config.root.replace(/\/$/, ''), false, 0);
var publish = _path2.default.join(_cli.config.root, _cli.config.publish.url);
app.use(_express2.default.static(publish));
diff --git a/dist/server/controllers/editor.js b/dist/server/controllers/editor.js
index e883175e..53d98979 100755
--- a/dist/server/controllers/editor.js
+++ b/dist/server/controllers/editor.js
@@ -58,8 +58,8 @@ function addToForm(match, text, json, util, arrayBlock) {
if (obj.key.indexOf(keyArray + '.') >= 0 && realKey.length > 0) {
obj.keyArray = keyArray;
obj.realKey = realKey;
- obj.key = keyArray + "[" + i + "]." + realKey;
- obj.desc = obj.desc + " " + i, insertAbeEach(obj, text, json, util, arrayBlock);
+ obj.key = keyArray + '[' + i + '].' + realKey;
+ obj.desc = obj.desc + ' ' + i, insertAbeEach(obj, text, json, util, arrayBlock);
} else if (util.dontHaveKey(obj.key)) {
obj.value = json[obj.key];
json[obj.key] = add(obj, json, text, util);
@@ -81,7 +81,7 @@ function matchAttrAbe(text, json, util, arrayBlock) {
}
function insertAbeEach(obj, text, json, util, arrayBlock) {
- if (typeof arrayBlock[obj.keyArray][obj.realKey] === "undefined" || arrayBlock[obj.keyArray][obj.realKey] === null) {
+ if (typeof arrayBlock[obj.keyArray][obj.realKey] === 'undefined' || arrayBlock[obj.keyArray][obj.realKey] === null) {
arrayBlock[obj.keyArray][obj.realKey] = [];
}
var exist = false;
@@ -221,7 +221,7 @@ function orderBlock(util) {
return formTabsOrdered;
}
-function editor(fileName, tplUrl) {
+function editor(fileName, jsonPath, documentLink) {
var p = new _es6Promise.Promise(function (resolve, reject) {
var util = new _cli.Util();
var arrayBlock = [];
@@ -230,13 +230,13 @@ function editor(fileName, tplUrl) {
var tabIndex = 0;
json = {};
- if (_cli.fileUtils.isFile(tplUrl.json.path)) {
- json = _cli.FileParser.getJson(tplUrl.json.path, 'utf8');
+ if (_cli.fileUtils.isFile(jsonPath)) {
+ json = _cli.FileParser.getJson(jsonPath, 'utf8');
}
text = (0, _cli.getTemplate)(fileName);
- _cli.Util.getDataList(_cli.fileUtils.removeLast(tplUrl.publish.link), text, json, true).then(function () {
+ _cli.Util.getDataList(_cli.fileUtils.removeLast(documentLink), text, json, true).then(function () {
addSource(text, json, util, arrayBlock);
text = _cli.Util.removeDataList(text);
diff --git a/dist/server/public/libs/bootstrap.min.js b/dist/server/public/libs/bootstrap.min.js
index 2de5a21b..cd5f0102 100755
--- a/dist/server/public/libs/bootstrap.min.js
+++ b/dist/server/public/libs/bootstrap.min.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
@@ -7,19 +7,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
-if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");+function (a) {
- "use strict";
- var b = a.fn.jquery.split(" ")[0].split(".");if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher");
+if ('undefined' == typeof jQuery) throw new Error('Bootstrap\'s JavaScript requires jQuery');+function (a) {
+ 'use strict';
+ var b = a.fn.jquery.split(' ')[0].split('.');if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1) throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher');
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b() {
- var a = document.createElement("bootstrap"),
- b = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend" };for (var c in b) {
+ var a = document.createElement('bootstrap'),
+ b = { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd otransitionend', transition: 'transitionend' };for (var c in b) {
if (void 0 !== a.style[c]) return { end: b[c] };
}return !1;
}a.fn.emulateTransitionEnd = function (b) {
var c = !1,
- d = this;a(this).one("bsTransitionEnd", function () {
+ d = this;a(this).one('bsTransitionEnd', function () {
c = !0;
});var e = function e() {
c || a(d).trigger(a.support.transition.end);
@@ -30,64 +30,64 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir
} });
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var c = a(this),
- e = c.data("bs.alert");e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c);
+ e = c.data('bs.alert');e || c.data('bs.alert', e = new d(this)), 'string' == typeof b && e[b].call(c);
});
}var c = '[data-dismiss="alert"]',
d = function d(b) {
- a(b).on("click", c, this.close);
- };d.VERSION = "3.3.5", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
+ a(b).on('click', c, this.close);
+ };d.VERSION = '3.3.5', d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
function c() {
- g.detach().trigger("closed.bs.alert").remove();
+ g.detach().trigger('closed.bs.alert').remove();
}var e = a(this),
- f = e.attr("data-target");f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));var g = a(f);b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c());
+ f = e.attr('data-target');f || (f = e.attr('href'), f = f && f.replace(/.*(?=#[^\s]*$)/, ''));var g = a(f);b && b.preventDefault(), g.length || (g = e.closest('.alert')), g.trigger(b = a.Event('close.bs.alert')), b.isDefaultPrevented() || (g.removeClass('in'), a.support.transition && g.hasClass('fade') ? g.one('bsTransitionEnd', c).emulateTransitionEnd(d.TRANSITION_DURATION) : c());
};var e = a.fn.alert;a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () {
return a.fn.alert = e, this;
- }, a(document).on("click.bs.alert.data-api", c, d.prototype.close);
+ }, a(document).on('click.bs.alert.data-api', c, d.prototype.close);
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.button"),
- f = "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b;e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b);
+ e = d.data('bs.button'),
+ f = 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b;e || d.data('bs.button', e = new c(this, f)), 'toggle' == b ? e.toggle() : b && e.setState(b);
});
}var c = function c(b, d) {
this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1;
- };c.VERSION = "3.3.5", c.DEFAULTS = { loadingText: "loading..." }, c.prototype.setState = function (b) {
- var c = "disabled",
+ };c.VERSION = '3.3.5', c.DEFAULTS = { loadingText: 'loading...' }, c.prototype.setState = function (b) {
+ var c = 'disabled',
d = this.$element,
- e = d.is("input") ? "val" : "html",
- f = d.data();b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () {
- d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c));
+ e = d.is('input') ? 'val' : 'html',
+ f = d.data();b += 'Text', null == f.resetText && d.data('resetText', d[e]()), setTimeout(a.proxy(function () {
+ d[e](null == f[b] ? this.options[b] : f[b]), 'loadingText' == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c));
}, this), 0);
}, c.prototype.toggle = function () {
var a = !0,
b = this.$element.closest('[data-toggle="buttons"]');if (b.length) {
- var c = this.$element.find("input");"radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change");
- } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active");
+ var c = this.$element.find('input');'radio' == c.prop('type') ? (c.prop('checked') && (a = !1), b.find('.active').removeClass('active'), this.$element.addClass('active')) : 'checkbox' == c.prop('type') && (c.prop('checked') !== this.$element.hasClass('active') && (a = !1), this.$element.toggleClass('active')), c.prop('checked', this.$element.hasClass('active')), a && c.trigger('change');
+ } else this.$element.attr('aria-pressed', !this.$element.hasClass('active')), this.$element.toggleClass('active');
};var d = a.fn.button;a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () {
return a.fn.button = d, this;
- }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) {
- var d = a(c.target);d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault();
- }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) {
- a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type));
+ }, a(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (c) {
+ var d = a(c.target);d.hasClass('btn') || (d = d.closest('.btn')), b.call(d, 'toggle'), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault();
+ }).on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (b) {
+ a(b.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(b.type));
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.carousel"),
- f = a.extend({}, c.DEFAULTS, d.data(), "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b),
- g = "string" == typeof b ? b : f.slide;e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle();
+ e = d.data('bs.carousel'),
+ f = a.extend({}, c.DEFAULTS, d.data(), 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b),
+ g = 'string' == typeof b ? b : f.slide;e || d.data('bs.carousel', e = new c(this, f)), 'number' == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle();
});
}var c = function c(b, _c) {
- this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = _c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this));
- };c.VERSION = "3.3.5", c.TRANSITION_DURATION = 600, c.DEFAULTS = { interval: 5e3, pause: "hover", wrap: !0, keyboard: !0 }, c.prototype.keydown = function (a) {
+ this.$element = a(b), this.$indicators = this.$element.find('.carousel-indicators'), this.options = _c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on('keydown.bs.carousel', a.proxy(this.keydown, this)), 'hover' == this.options.pause && !('ontouchstart' in document.documentElement) && this.$element.on('mouseenter.bs.carousel', a.proxy(this.pause, this)).on('mouseleave.bs.carousel', a.proxy(this.cycle, this));
+ };c.VERSION = '3.3.5', c.TRANSITION_DURATION = 600, c.DEFAULTS = { interval: 5e3, pause: 'hover', wrap: !0, keyboard: !0 }, c.prototype.keydown = function (a) {
if (!/input|textarea/i.test(a.target.tagName)) {
switch (a.which) {case 37:
this.prev();break;case 39:
@@ -97,310 +97,310 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir
}, c.prototype.cycle = function (b) {
return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this;
}, c.prototype.getItemIndex = function (a) {
- return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active);
+ return this.$items = a.parent().children('.item'), this.$items.index(a || this.$active);
}, c.prototype.getItemForDirection = function (a, b) {
var c = this.getItemIndex(b),
- d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;if (d && !this.options.wrap) return b;var e = "prev" == a ? -1 : 1,
+ d = 'prev' == a && 0 === c || 'next' == a && c == this.$items.length - 1;if (d && !this.options.wrap) return b;var e = 'prev' == a ? -1 : 1,
f = (c + e) % this.$items.length;return this.$items.eq(f);
}, c.prototype.to = function (a) {
var b = this,
- c = this.getItemIndex(this.$active = this.$element.find(".item.active"));return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () {
+ c = this.getItemIndex(this.$active = this.$element.find('.item.active'));return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one('slid.bs.carousel', function () {
b.to(a);
- }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a));
+ }) : c == a ? this.pause().cycle() : this.slide(a > c ? 'next' : 'prev', this.$items.eq(a));
}, c.prototype.pause = function (b) {
- return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this;
+ return b || (this.paused = !0), this.$element.find('.next, .prev').length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this;
}, c.prototype.next = function () {
- return this.sliding ? void 0 : this.slide("next");
+ return this.sliding ? void 0 : this.slide('next');
}, c.prototype.prev = function () {
- return this.sliding ? void 0 : this.slide("prev");
+ return this.sliding ? void 0 : this.slide('prev');
}, c.prototype.slide = function (b, d) {
- var e = this.$element.find(".item.active"),
+ var e = this.$element.find('.item.active'),
f = d || this.getItemForDirection(b, e),
g = this.interval,
- h = "next" == b ? "left" : "right",
- i = this;if (f.hasClass("active")) return this.sliding = !1;var j = f[0],
- k = a.Event("slide.bs.carousel", { relatedTarget: j, direction: h });if (this.$element.trigger(k), !k.isDefaultPrevented()) {
+ h = 'next' == b ? 'left' : 'right',
+ i = this;if (f.hasClass('active')) return this.sliding = !1;var j = f[0],
+ k = a.Event('slide.bs.carousel', { relatedTarget: j, direction: h });if (this.$element.trigger(k), !k.isDefaultPrevented()) {
if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
- this.$indicators.find(".active").removeClass("active");var l = a(this.$indicators.children()[this.getItemIndex(f)]);l && l.addClass("active");
- }var m = a.Event("slid.bs.carousel", { relatedTarget: j, direction: h });return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () {
- f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function () {
+ this.$indicators.find('.active').removeClass('active');var l = a(this.$indicators.children()[this.getItemIndex(f)]);l && l.addClass('active');
+ }var m = a.Event('slid.bs.carousel', { relatedTarget: j, direction: h });return a.support.transition && this.$element.hasClass('slide') ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one('bsTransitionEnd', function () {
+ f.removeClass([b, h].join(' ')).addClass('active'), e.removeClass(['active', h].join(' ')), i.sliding = !1, setTimeout(function () {
i.$element.trigger(m);
}, 0);
- }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this;
+ }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass('active'), f.addClass('active'), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this;
}
};var d = a.fn.carousel;a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () {
return a.fn.carousel = d, this;
};var e = function e(c) {
var d,
e = a(this),
- f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));if (f.hasClass("carousel")) {
+ f = a(e.attr('data-target') || (d = e.attr('href')) && d.replace(/.*(?=#[^\s]+$)/, ''));if (f.hasClass('carousel')) {
var g = a.extend({}, f.data(), e.data()),
- h = e.attr("data-slide-to");h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault();
+ h = e.attr('data-slide-to');h && (g.interval = !1), b.call(f, g), h && f.data('bs.carousel').to(h), c.preventDefault();
}
- };a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () {
+ };a(document).on('click.bs.carousel.data-api', '[data-slide]', e).on('click.bs.carousel.data-api', '[data-slide-to]', e), a(window).on('load', function () {
a('[data-ride="carousel"]').each(function () {
var c = a(this);b.call(c, c.data());
});
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
var c,
- d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");return a(d);
+ d = b.attr('data-target') || (c = b.attr('href')) && c.replace(/.*(?=#[^\s]+$)/, '');return a(d);
}function c(b) {
return this.each(function () {
var c = a(this),
- e = c.data("bs.collapse"),
- f = a.extend({}, d.DEFAULTS, c.data(), "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b);!e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]();
+ e = c.data('bs.collapse'),
+ f = a.extend({}, d.DEFAULTS, c.data(), 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b);!e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data('bs.collapse', e = new d(this, f)), 'string' == typeof b && e[b]();
});
}var d = function d(b, c) {
this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle();
- };d.VERSION = "3.3.5", d.TRANSITION_DURATION = 350, d.DEFAULTS = { toggle: !0 }, d.prototype.dimension = function () {
- var a = this.$element.hasClass("width");return a ? "width" : "height";
+ };d.VERSION = '3.3.5', d.TRANSITION_DURATION = 350, d.DEFAULTS = { toggle: !0 }, d.prototype.dimension = function () {
+ var a = this.$element.hasClass('width');return a ? 'width' : 'height';
}, d.prototype.show = function () {
- if (!this.transitioning && !this.$element.hasClass("in")) {
+ if (!this.transitioning && !this.$element.hasClass('in')) {
var b,
- e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
- var f = a.Event("show.bs.collapse");if (this.$element.trigger(f), !f.isDefaultPrevented()) {
- e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));var g = this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;var h = function h() {
- this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse");
- };if (!a.support.transition) return h.call(this);var i = a.camelCase(["scroll", g].join("-"));this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i]);
+ e = this.$parent && this.$parent.children('.panel').children('.in, .collapsing');if (!(e && e.length && (b = e.data('bs.collapse'), b && b.transitioning))) {
+ var f = a.Event('show.bs.collapse');if (this.$element.trigger(f), !f.isDefaultPrevented()) {
+ e && e.length && (c.call(e, 'hide'), b || e.data('bs.collapse', null));var g = this.dimension();this.$element.removeClass('collapse').addClass('collapsing')[g](0).attr('aria-expanded', !0), this.$trigger.removeClass('collapsed').attr('aria-expanded', !0), this.transitioning = 1;var h = function h() {
+ this.$element.removeClass('collapsing').addClass('collapse in')[g](''), this.transitioning = 0, this.$element.trigger('shown.bs.collapse');
+ };if (!a.support.transition) return h.call(this);var i = a.camelCase(['scroll', g].join('-'));this.$element.one('bsTransitionEnd', a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i]);
}
}
}
}, d.prototype.hide = function () {
- if (!this.transitioning && this.$element.hasClass("in")) {
- var b = a.Event("hide.bs.collapse");if (this.$element.trigger(b), !b.isDefaultPrevented()) {
- var c = this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;var e = function e() {
- this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse");
- };return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this);
+ if (!this.transitioning && this.$element.hasClass('in')) {
+ var b = a.Event('hide.bs.collapse');if (this.$element.trigger(b), !b.isDefaultPrevented()) {
+ var c = this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded', !1), this.$trigger.addClass('collapsed').attr('aria-expanded', !1), this.transitioning = 1;var e = function e() {
+ this.transitioning = 0, this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse');
+ };return a.support.transition ? void this.$element[c](0).one('bsTransitionEnd', a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this);
}
}
}, d.prototype.toggle = function () {
- this[this.$element.hasClass("in") ? "hide" : "show"]();
+ this[this.$element.hasClass('in') ? 'hide' : 'show']();
}, d.prototype.getParent = function () {
return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) {
var e = a(d);this.addAriaAndCollapsedClass(b(e), e);
}, this)).end();
}, d.prototype.addAriaAndCollapsedClass = function (a, b) {
- var c = a.hasClass("in");a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c);
+ var c = a.hasClass('in');a.attr('aria-expanded', c), b.toggleClass('collapsed', !c).attr('aria-expanded', c);
};var e = a.fn.collapse;a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () {
return a.fn.collapse = e, this;
- }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) {
- var e = a(this);e.attr("data-target") || d.preventDefault();var f = b(e),
- g = f.data("bs.collapse"),
- h = g ? "toggle" : e.data();c.call(f, h);
+ }, a(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (d) {
+ var e = a(this);e.attr('data-target') || d.preventDefault();var f = b(e),
+ g = f.data('bs.collapse'),
+ h = g ? 'toggle' : e.data();c.call(f, h);
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
- var c = b.attr("data-target");c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));var d = c && a(c);return d && d.length ? d : b.parent();
+ var c = b.attr('data-target');c || (c = b.attr('href'), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ''));var d = c && a(c);return d && d.length ? d : b.parent();
}function c(c) {
c && 3 === c.which || (a(e).remove(), a(f).each(function () {
var d = a(this),
e = b(d),
- f = { relatedTarget: this };e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger("hidden.bs.dropdown", f))));
+ f = { relatedTarget: this };e.hasClass('open') && (c && 'click' == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event('hide.bs.dropdown', f)), c.isDefaultPrevented() || (d.attr('aria-expanded', 'false'), e.removeClass('open').trigger('hidden.bs.dropdown', f))));
}));
}function d(b) {
return this.each(function () {
var c = a(this),
- d = c.data("bs.dropdown");d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c);
+ d = c.data('bs.dropdown');d || c.data('bs.dropdown', d = new g(this)), 'string' == typeof b && d[b].call(c);
});
- }var e = ".dropdown-backdrop",
+ }var e = '.dropdown-backdrop',
f = '[data-toggle="dropdown"]',
g = function g(b) {
- a(b).on("click.bs.dropdown", this.toggle);
- };g.VERSION = "3.3.5", g.prototype.toggle = function (d) {
- var e = a(this);if (!e.is(".disabled, :disabled")) {
+ a(b).on('click.bs.dropdown', this.toggle);
+ };g.VERSION = '3.3.5', g.prototype.toggle = function (d) {
+ var e = a(this);if (!e.is('.disabled, :disabled')) {
var f = b(e),
- g = f.hasClass("open");if (c(), !g) {
- "ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);var h = { relatedTarget: this };if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger("shown.bs.dropdown", h);
+ g = f.hasClass('open');if (c(), !g) {
+ 'ontouchstart' in document.documentElement && !f.closest('.navbar-nav').length && a(document.createElement('div')).addClass('dropdown-backdrop').insertAfter(a(this)).on('click', c);var h = { relatedTarget: this };if (f.trigger(d = a.Event('show.bs.dropdown', h)), d.isDefaultPrevented()) return;e.trigger('focus').attr('aria-expanded', 'true'), f.toggleClass('open').trigger('shown.bs.dropdown', h);
}return !1;
}
}, g.prototype.keydown = function (c) {
if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
- var d = a(this);if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {
+ var d = a(this);if (c.preventDefault(), c.stopPropagation(), !d.is('.disabled, :disabled')) {
var e = b(d),
- g = e.hasClass("open");if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");var h = " li:not(.disabled):visible a",
- i = e.find(".dropdown-menu" + h);if (i.length) {
- var j = i.index(c.target);38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus");
+ g = e.hasClass('open');if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger('focus'), d.trigger('click');var h = ' li:not(.disabled):visible a',
+ i = e.find('.dropdown-menu' + h);if (i.length) {
+ var j = i.index(c.target);38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger('focus');
}
}
}
};var h = a.fn.dropdown;a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () {
return a.fn.dropdown = h, this;
- }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function (a) {
+ }, a(document).on('click.bs.dropdown.data-api', c).on('click.bs.dropdown.data-api', '.dropdown form', function (a) {
a.stopPropagation();
- }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown);
+ }).on('click.bs.dropdown.data-api', f, g.prototype.toggle).on('keydown.bs.dropdown.data-api', f, g.prototype.keydown).on('keydown.bs.dropdown.data-api', '.dropdown-menu', g.prototype.keydown);
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b, d) {
return this.each(function () {
var e = a(this),
- f = e.data("bs.modal"),
- g = a.extend({}, c.DEFAULTS, e.data(), "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b);f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d);
+ f = e.data('bs.modal'),
+ g = a.extend({}, c.DEFAULTS, e.data(), 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b);f || e.data('bs.modal', f = new c(this, g)), 'string' == typeof b ? f[b](d) : g.show && f.show(d);
});
}var c = function c(b, _c2) {
- this.options = _c2, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
- this.$element.trigger("loaded.bs.modal");
+ this.options = _c2, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find('.modal-dialog'), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find('.modal-content').load(this.options.remote, a.proxy(function () {
+ this.$element.trigger('loaded.bs.modal');
}, this));
- };c.VERSION = "3.3.5", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }, c.prototype.toggle = function (a) {
+ };c.VERSION = '3.3.5', c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }, c.prototype.toggle = function (a) {
return this.isShown ? this.hide() : this.show(a);
}, c.prototype.show = function (b) {
var d = this,
- e = a.Event("show.bs.modal", { relatedTarget: b });this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function () {
- d.$element.one("mouseup.dismiss.bs.modal", function (b) {
+ e = a.Event('show.bs.modal', { relatedTarget: b });this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass('modal-open'), this.escape(), this.resize(), this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on('mousedown.dismiss.bs.modal', function () {
+ d.$element.one('mouseup.dismiss.bs.modal', function (b) {
a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0);
});
}), this.backdrop(function () {
- var e = a.support.transition && d.$element.hasClass("fade");d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus();var f = a.Event("shown.bs.modal", { relatedTarget: b });e ? d.$dialog.one("bsTransitionEnd", function () {
- d.$element.trigger("focus").trigger(f);
- }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f);
+ var e = a.support.transition && d.$element.hasClass('fade');d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass('in'), d.enforceFocus();var f = a.Event('shown.bs.modal', { relatedTarget: b });e ? d.$dialog.one('bsTransitionEnd', function () {
+ d.$element.trigger('focus').trigger(f);
+ }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger('focus').trigger(f);
}));
}, c.prototype.hide = function (b) {
- b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal());
+ b && b.preventDefault(), b = a.Event('hide.bs.modal'), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off('focusin.bs.modal'), this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal'), this.$dialog.off('mousedown.dismiss.bs.modal'), a.support.transition && this.$element.hasClass('fade') ? this.$element.one('bsTransitionEnd', a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal());
}, c.prototype.enforceFocus = function () {
- a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
- this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus");
+ a(document).off('focusin.bs.modal').on('focusin.bs.modal', a.proxy(function (a) {
+ this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger('focus');
}, this));
}, c.prototype.escape = function () {
- this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
+ this.isShown && this.options.keyboard ? this.$element.on('keydown.dismiss.bs.modal', a.proxy(function (a) {
27 == a.which && this.hide();
- }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal");
+ }, this)) : this.isShown || this.$element.off('keydown.dismiss.bs.modal');
}, c.prototype.resize = function () {
- this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal");
+ this.isShown ? a(window).on('resize.bs.modal', a.proxy(this.handleUpdate, this)) : a(window).off('resize.bs.modal');
}, c.prototype.hideModal = function () {
var a = this;this.$element.hide(), this.backdrop(function () {
- a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal");
+ a.$body.removeClass('modal-open'), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger('hidden.bs.modal');
});
}, c.prototype.removeBackdrop = function () {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null;
}, c.prototype.backdrop = function (b) {
var d = this,
- e = this.$element.hasClass("fade") ? "fade" : "";if (this.isShown && this.options.backdrop) {
- var f = a.support.transition && e;if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function (a) {
- return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()));
- }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b();
+ e = this.$element.hasClass('fade') ? 'fade' : '';if (this.isShown && this.options.backdrop) {
+ var f = a.support.transition && e;if (this.$backdrop = a(document.createElement('div')).addClass('modal-backdrop ' + e).appendTo(this.$body), this.$element.on('click.dismiss.bs.modal', a.proxy(function (a) {
+ return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (a.target === a.currentTarget && ('static' == this.options.backdrop ? this.$element[0].focus() : this.hide()));
+ }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass('in'), !b) return;f ? this.$backdrop.one('bsTransitionEnd', b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b();
} else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass("in");var g = function g() {
+ this.$backdrop.removeClass('in');var g = function g() {
d.removeBackdrop(), b && b();
- };a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g();
+ };a.support.transition && this.$element.hasClass('fade') ? this.$backdrop.one('bsTransitionEnd', g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g();
} else b && b();
}, c.prototype.handleUpdate = function () {
this.adjustDialog();
}, c.prototype.adjustDialog = function () {
- var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;this.$element.css({ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "", paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : "" });
+ var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;this.$element.css({ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : '', paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : '' });
}, c.prototype.resetAdjustments = function () {
- this.$element.css({ paddingLeft: "", paddingRight: "" });
+ this.$element.css({ paddingLeft: '', paddingRight: '' });
}, c.prototype.checkScrollbar = function () {
var a = window.innerWidth;if (!a) {
var b = document.documentElement.getBoundingClientRect();a = b.right - Math.abs(b.left);
}this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar();
}, c.prototype.setScrollbar = function () {
- var a = parseInt(this.$body.css("padding-right") || 0, 10);this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth);
+ var a = parseInt(this.$body.css('padding-right') || 0, 10);this.originalBodyPad = document.body.style.paddingRight || '', this.bodyIsOverflowing && this.$body.css('padding-right', a + this.scrollbarWidth);
}, c.prototype.resetScrollbar = function () {
- this.$body.css("padding-right", this.originalBodyPad);
+ this.$body.css('padding-right', this.originalBodyPad);
}, c.prototype.measureScrollbar = function () {
- var a = document.createElement("div");a.className = "modal-scrollbar-measure", this.$body.append(a);var b = a.offsetWidth - a.clientWidth;return this.$body[0].removeChild(a), b;
+ var a = document.createElement('div');a.className = 'modal-scrollbar-measure', this.$body.append(a);var b = a.offsetWidth - a.clientWidth;return this.$body[0].removeChild(a), b;
};var d = a.fn.modal;a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () {
return a.fn.modal = d, this;
- }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) {
+ }, a(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (c) {
var d = a(this),
- e = d.attr("href"),
- f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
- g = f.data("bs.modal") ? "toggle" : a.extend({ remote: !/#/.test(e) && e }, f.data(), d.data());d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) {
- a.isDefaultPrevented() || f.one("hidden.bs.modal", function () {
- d.is(":visible") && d.trigger("focus");
+ e = d.attr('href'),
+ f = a(d.attr('data-target') || e && e.replace(/.*(?=#[^\s]+$)/, '')),
+ g = f.data('bs.modal') ? 'toggle' : a.extend({ remote: !/#/.test(e) && e }, f.data(), d.data());d.is('a') && c.preventDefault(), f.one('show.bs.modal', function (a) {
+ a.isDefaultPrevented() || f.one('hidden.bs.modal', function () {
+ d.is(':visible') && d.trigger('focus');
});
}), b.call(f, g, this);
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.tooltip"),
- f = "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b;(e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]());
+ e = d.data('bs.tooltip'),
+ f = 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b;(e || !/destroy|hide/.test(b)) && (e || d.data('bs.tooltip', e = new c(this, f)), 'string' == typeof b && e[b]());
});
}var c = function c(a, b) {
- this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b);
- };c.VERSION = "3.3.5", c.TRANSITION_DURATION = 150, c.DEFAULTS = { animation: !0, placement: "top", selector: !1, template: '', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1, viewport: { selector: "body", padding: 0 } }, c.prototype.init = function (b, c, d) {
- if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = { click: !1, hover: !1, focus: !1 }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
- var g = e[f];if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this));else if ("manual" != g) {
- var h = "hover" == g ? "mouseenter" : "focusin",
- i = "hover" == g ? "mouseleave" : "focusout";this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this));
+ this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init('tooltip', a, b);
+ };c.VERSION = '3.3.5', c.TRANSITION_DURATION = 150, c.DEFAULTS = { animation: !0, placement: 'top', selector: !1, template: '', trigger: 'hover focus', title: '', delay: 0, html: !1, container: !1, viewport: { selector: 'body', padding: 0 } }, c.prototype.init = function (b, c, d) {
+ if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = { click: !1, hover: !1, focus: !1 }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!');for (var e = this.options.trigger.split(' '), f = e.length; f--;) {
+ var g = e[f];if ('click' == g) this.$element.on('click.' + this.type, this.options.selector, a.proxy(this.toggle, this));else if ('manual' != g) {
+ var h = 'hover' == g ? 'mouseenter' : 'focusin',
+ i = 'hover' == g ? 'mouseleave' : 'focusout';this.$element.on(h + '.' + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + '.' + this.type, this.options.selector, a.proxy(this.leave, this));
}
- }this.options.selector ? this._options = a.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle();
+ }this.options.selector ? this._options = a.extend({}, this.options, { trigger: 'manual', selector: '' }) : this.fixTitle();
}, c.prototype.getDefaults = function () {
return c.DEFAULTS;
}, c.prototype.getOptions = function (b) {
- return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }), b;
+ return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && 'number' == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }), b;
}, c.prototype.getDelegateOptions = function () {
var b = {},
c = this.getDefaults();return this._options && a.each(this._options, function (a, d) {
c[a] != d && (b[a] = d);
}), b;
}, c.prototype.enter = function (b) {
- var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void (c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void (c.timeout = setTimeout(function () {
- "in" == c.hoverState && c.show();
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data('bs.' + this.type);return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data('bs.' + this.type, c)), b instanceof a.Event && (c.inState['focusin' == b.type ? 'focus' : 'hover'] = !0), c.tip().hasClass('in') || 'in' == c.hoverState ? void (c.hoverState = 'in') : (clearTimeout(c.timeout), c.hoverState = 'in', c.options.delay && c.options.delay.show ? void (c.timeout = setTimeout(function () {
+ 'in' == c.hoverState && c.show();
}, c.options.delay.show)) : c.show());
}, c.prototype.isInStateTrue = function () {
for (var a in this.inState) {
if (this.inState[a]) return !0;
}return !1;
}, c.prototype.leave = function (b) {
- var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void (c.timeout = setTimeout(function () {
- "out" == c.hoverState && c.hide();
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data('bs.' + this.type);return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data('bs.' + this.type, c)), b instanceof a.Event && (c.inState['focusout' == b.type ? 'focus' : 'hover'] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = 'out', c.options.delay && c.options.delay.hide ? void (c.timeout = setTimeout(function () {
+ 'out' == c.hoverState && c.hide();
}, c.options.delay.hide)) : c.hide());
}, c.prototype.show = function () {
- var b = a.Event("show.bs." + this.type);if (this.hasContent() && this.enabled) {
+ var b = a.Event('show.bs.' + this.type);if (this.hasContent() && this.enabled) {
this.$element.trigger(b);var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);if (b.isDefaultPrevented() || !d) return;var e = this,
f = this.tip(),
- g = this.getUID(this.type);this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
+ g = this.getUID(this.type);this.setContent(), f.attr('id', g), this.$element.attr('aria-describedby', g), this.options.animation && f.addClass('fade');var h = 'function' == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
i = /\s?auto?\s?/i,
- j = i.test(h);j && (h = h.replace(i, "") || "top"), f.detach().css({ top: 0, left: 0, display: "block" }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);var k = this.getPosition(),
+ j = i.test(h);j && (h = h.replace(i, '') || 'top'), f.detach().css({ top: 0, left: 0, display: 'block' }).addClass(h).data('bs.' + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger('inserted.bs.' + this.type);var k = this.getPosition(),
l = f[0].offsetWidth,
m = f[0].offsetHeight;if (j) {
var n = h,
- o = this.getPosition(this.$viewport);h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h);
+ o = this.getPosition(this.$viewport);h = 'bottom' == h && k.bottom + m > o.bottom ? 'top' : 'top' == h && k.top - m < o.top ? 'bottom' : 'right' == h && k.right + l > o.width ? 'left' : 'left' == h && k.left - l < o.left ? 'right' : h, f.removeClass(n).addClass(h);
}var p = this.getCalculatedOffset(h, k, l, m);this.applyPlacement(p, h);var q = function q() {
- var a = e.hoverState;e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e);
- };a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q();
+ var a = e.hoverState;e.$element.trigger('shown.bs.' + e.type), e.hoverState = null, 'out' == a && e.leave(e);
+ };a.support.transition && this.$tip.hasClass('fade') ? f.one('bsTransitionEnd', q).emulateTransitionEnd(c.TRANSITION_DURATION) : q();
}
}, c.prototype.applyPlacement = function (b, c) {
var d = this.tip(),
e = d[0].offsetWidth,
f = d[0].offsetHeight,
- g = parseInt(d.css("margin-top"), 10),
- h = parseInt(d.css("margin-left"), 10);isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({ using: function using(a) {
+ g = parseInt(d.css('margin-top'), 10),
+ h = parseInt(d.css('margin-left'), 10);isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({ using: function using(a) {
d.css({ top: Math.round(a.top), left: Math.round(a.left) });
- } }, b), 0), d.addClass("in");var i = d[0].offsetWidth,
- j = d[0].offsetHeight;"top" == c && j != f && (b.top = b.top + f - j);var k = this.getViewportAdjustedDelta(c, b, i, j);k.left ? b.left += k.left : b.top += k.top;var l = /top|bottom/.test(c),
+ } }, b), 0), d.addClass('in');var i = d[0].offsetWidth,
+ j = d[0].offsetHeight;'top' == c && j != f && (b.top = b.top + f - j);var k = this.getViewportAdjustedDelta(c, b, i, j);k.left ? b.left += k.left : b.top += k.top;var l = /top|bottom/.test(c),
m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
- n = l ? "offsetWidth" : "offsetHeight";d.offset(b), this.replaceArrow(m, d[0][n], l);
+ n = l ? 'offsetWidth' : 'offsetHeight';d.offset(b), this.replaceArrow(m, d[0][n], l);
}, c.prototype.replaceArrow = function (a, b, c) {
- this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "");
+ this.arrow().css(c ? 'left' : 'top', 50 * (1 - a / b) + '%').css(c ? 'top' : 'left', '');
}, c.prototype.setContent = function () {
var a = this.tip(),
- b = this.getTitle();a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right");
+ b = this.getTitle();a.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](b), a.removeClass('fade in top bottom left right');
}, c.prototype.hide = function (b) {
function d() {
- "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b();
+ 'in' != e.hoverState && f.detach(), e.$element.removeAttr('aria-describedby').trigger('hidden.bs.' + e.type), b && b();
}var e = this,
f = a(this.$tip),
- g = a.Event("hide.bs." + this.type);return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this);
+ g = a.Event('hide.bs.' + this.type);return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass('in'), a.support.transition && f.hasClass('fade') ? f.one('bsTransitionEnd', d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this);
}, c.prototype.fixTitle = function () {
- var a = this.$element;(a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "");
+ var a = this.$element;(a.attr('title') || 'string' != typeof a.attr('data-original-title')) && a.attr('data-original-title', a.attr('title') || '').attr('title', '');
}, c.prototype.hasContent = function () {
return this.getTitle();
}, c.prototype.getPosition = function (b) {
b = b || this.$element;var c = b[0],
- d = "BODY" == c.tagName,
+ d = 'BODY' == c.tagName,
e = c.getBoundingClientRect();null == e.width && (e = a.extend({}, e, { width: e.right - e.left, height: e.bottom - e.top }));var f = d ? { top: 0, left: 0 } : b.offset(),
g = { scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop() },
h = d ? { width: a(window).width(), height: a(window).height() } : null;return a.extend({}, e, g, h, f);
}, c.prototype.getCalculatedOffset = function (a, b, c, d) {
- return "bottom" == a ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : "top" == a ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : "left" == a ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width };
+ return 'bottom' == a ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : 'top' == a ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : 'left' == a ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width };
}, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
var e = { top: 0, left: 0 };if (!this.$viewport) return e;var f = this.options.viewport && this.options.viewport.padding || 0,
g = this.getPosition(this.$viewport);if (/right|left/.test(a)) {
@@ -413,15 +413,15 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir
}, c.prototype.getTitle = function () {
var a,
b = this.$element,
- c = this.options;return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title);
+ c = this.options;return a = b.attr('data-original-title') || ('function' == typeof c.title ? c.title.call(b[0]) : c.title);
}, c.prototype.getUID = function (a) {
do {
- a += ~~(1e6 * Math.random());
+ a += ~ ~(1e6 * Math.random());
} while (document.getElementById(a));return a;
}, c.prototype.tip = function () {
- if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");return this.$tip;
+ if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!');return this.$tip;
}, c.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow");
+ return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow');
}, c.prototype.enable = function () {
this.enabled = !0;
}, c.prototype.disable = function () {
@@ -429,59 +429,59 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir
}, c.prototype.toggleEnabled = function () {
this.enabled = !this.enabled;
}, c.prototype.toggle = function (b) {
- var c = this;b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c);
+ var c = this;b && (c = a(b.currentTarget).data('bs.' + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data('bs.' + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass('in') ? c.leave(c) : c.enter(c);
}, c.prototype.destroy = function () {
var a = this;clearTimeout(this.timeout), this.hide(function () {
- a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null;
+ a.$element.off('.' + a.type).removeData('bs.' + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null;
});
};var d = a.fn.tooltip;a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () {
return a.fn.tooltip = d, this;
};
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.popover"),
- f = "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b;(e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]());
+ e = d.data('bs.popover'),
+ f = 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b;(e || !/destroy|hide/.test(b)) && (e || d.data('bs.popover', e = new c(this, f)), 'string' == typeof b && e[b]());
});
}var c = function c(a, b) {
- this.init("popover", a, b);
- };if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");c.VERSION = "3.3.5", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, { placement: "right", trigger: "click", content: "", template: '' }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
+ this.init('popover', a, b);
+ };if (!a.fn.tooltip) throw new Error('Popover requires tooltip.js');c.VERSION = '3.3.5', c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, { placement: 'right', trigger: 'click', content: '', template: '' }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
return c.DEFAULTS;
}, c.prototype.setContent = function () {
var a = this.tip(),
b = this.getTitle(),
- c = this.getContent();a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide();
+ c = this.getContent();a.find('.popover-title')[this.options.html ? 'html' : 'text'](b), a.find('.popover-content').children().detach().end()[this.options.html ? 'string' == typeof c ? 'html' : 'append' : 'text'](c), a.removeClass('fade top bottom left right in'), a.find('.popover-title').html() || a.find('.popover-title').hide();
}, c.prototype.hasContent = function () {
return this.getTitle() || this.getContent();
}, c.prototype.getContent = function () {
var a = this.$element,
- b = this.options;return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content);
+ b = this.options;return a.attr('data-content') || ('function' == typeof b.content ? b.content.call(a[0]) : b.content);
}, c.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find(".arrow");
+ return this.$arrow = this.$arrow || this.tip().find('.arrow');
};var d = a.fn.popover;a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () {
return a.fn.popover = d, this;
};
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(c, d) {
- this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process();
+ this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || '') + ' .nav li > a', this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on('scroll.bs.scrollspy', a.proxy(this.process, this)), this.refresh(), this.process();
}function c(c) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.scrollspy"),
- f = "object" == (typeof c === "undefined" ? "undefined" : _typeof(c)) && c;e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]();
+ e = d.data('bs.scrollspy'),
+ f = 'object' == (typeof c === 'undefined' ? 'undefined' : _typeof(c)) && c;e || d.data('bs.scrollspy', e = new b(this, f)), 'string' == typeof c && e[c]();
});
- }b.VERSION = "3.3.5", b.DEFAULTS = { offset: 10 }, b.prototype.getScrollHeight = function () {
+ }b.VERSION = '3.3.5', b.DEFAULTS = { offset: 10 }, b.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight);
}, b.prototype.refresh = function () {
var b = this,
- c = "offset",
- d = 0;this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () {
+ c = 'offset',
+ d = 0;this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = 'position', d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () {
var b = a(this),
- e = b.data("target") || b.attr("href"),
- f = /^#./.test(e) && a(e);return f && f.length && f.is(":visible") && [[f[c]().top + d, e]] || null;
+ e = b.data('target') || b.attr('href'),
+ f = /^#./.test(e) && a(e);return f && f.length && f.is(':visible') && [[f[c]().top + d, e]] || null;
}).sort(function (a, b) {
return a[0] - b[0];
}).each(function () {
@@ -499,82 +499,82 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir
}
}, b.prototype.activate = function (b) {
this.activeTarget = b, this.clear();var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
- d = a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy");
+ d = a(c).parents('li').addClass('active');d.parent('.dropdown-menu').length && (d = d.closest('li.dropdown').addClass('active')), d.trigger('activate.bs.scrollspy');
}, b.prototype.clear = function () {
- a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active");
+ a(this.selector).parentsUntil(this.options.target, '.active').removeClass('active');
};var d = a.fn.scrollspy;a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () {
return a.fn.scrollspy = d, this;
- }, a(window).on("load.bs.scrollspy.data-api", function () {
+ }, a(window).on('load.bs.scrollspy.data-api', function () {
a('[data-spy="scroll"]').each(function () {
var b = a(this);c.call(b, b.data());
});
});
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.tab");e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]();
+ e = d.data('bs.tab');e || d.data('bs.tab', e = new c(this)), 'string' == typeof b && e[b]();
});
}var c = function c(b) {
this.element = a(b);
- };c.VERSION = "3.3.5", c.TRANSITION_DURATION = 150, c.prototype.show = function () {
+ };c.VERSION = '3.3.5', c.TRANSITION_DURATION = 150, c.prototype.show = function () {
var b = this.element,
- c = b.closest("ul:not(.dropdown-menu)"),
- d = b.data("target");if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
- var e = c.find(".active:last a"),
- f = a.Event("hide.bs.tab", { relatedTarget: b[0] }),
- g = a.Event("show.bs.tab", { relatedTarget: e[0] });if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
- var h = a(d);this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () {
- e.trigger({ type: "hidden.bs.tab", relatedTarget: b[0] }), b.trigger({ type: "shown.bs.tab", relatedTarget: e[0] });
+ c = b.closest('ul:not(.dropdown-menu)'),
+ d = b.data('target');if (d || (d = b.attr('href'), d = d && d.replace(/.*(?=#[^\s]*$)/, '')), !b.parent('li').hasClass('active')) {
+ var e = c.find('.active:last a'),
+ f = a.Event('hide.bs.tab', { relatedTarget: b[0] }),
+ g = a.Event('show.bs.tab', { relatedTarget: e[0] });if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
+ var h = a(d);this.activate(b.closest('li'), c), this.activate(h, h.parent(), function () {
+ e.trigger({ type: 'hidden.bs.tab', relatedTarget: b[0] }), b.trigger({ type: 'shown.bs.tab', relatedTarget: e[0] });
});
}
}
}, c.prototype.activate = function (b, d, e) {
function f() {
- g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e();
- }var g = d.find("> .active"),
- h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in");
+ g.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded', !1), b.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded', !0), h ? (b[0].offsetWidth, b.addClass('in')) : b.removeClass('fade'), b.parent('.dropdown-menu').length && b.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded', !0), e && e();
+ }var g = d.find('> .active'),
+ h = e && a.support.transition && (g.length && g.hasClass('fade') || !!d.find('> .fade').length);g.length && h ? g.one('bsTransitionEnd', f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass('in');
};var d = a.fn.tab;a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () {
return a.fn.tab = d, this;
};var e = function e(c) {
- c.preventDefault(), b.call(a(this), "show");
- };a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e);
+ c.preventDefault(), b.call(a(this), 'show');
+ };a(document).on('click.bs.tab.data-api', '[data-toggle="tab"]', e).on('click.bs.tab.data-api', '[data-toggle="pill"]', e);
}(jQuery), +function (a) {
- "use strict";
+ 'use strict';
function b(b) {
return this.each(function () {
var d = a(this),
- e = d.data("bs.affix"),
- f = "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b;e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]();
+ e = d.data('bs.affix'),
+ f = 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b;e || d.data('bs.affix', e = new c(this, f)), 'string' == typeof b && e[b]();
});
}var c = function c(b, d) {
- this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition();
- };c.VERSION = "3.3.5", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = { offset: 0, target: window }, c.prototype.getState = function (a, b, c, d) {
+ this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on('scroll.bs.affix.data-api', a.proxy(this.checkPosition, this)).on('click.bs.affix.data-api', a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition();
+ };c.VERSION = '3.3.5', c.RESET = 'affix affix-top affix-bottom', c.DEFAULTS = { offset: 0, target: window }, c.prototype.getState = function (a, b, c, d) {
var e = this.$target.scrollTop(),
f = this.$element.offset(),
- g = this.$target.height();if (null != c && "top" == this.affixed) return c > e ? "top" : !1;if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";var h = null == this.affixed,
+ g = this.$target.height();if (null != c && 'top' == this.affixed) return c > e ? 'top' : !1;if ('bottom' == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : 'bottom' : a - d >= e + g ? !1 : 'bottom';var h = null == this.affixed,
i = h ? e : f.top,
- j = h ? g : b;return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1;
+ j = h ? g : b;return null != c && c >= e ? 'top' : null != d && i + j >= a - d ? 'bottom' : !1;
}, c.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a = this.$target.scrollTop(),
+ if (this.pinnedOffset) return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass('affix');var a = this.$target.scrollTop(),
b = this.$element.offset();return this.pinnedOffset = b.top - a;
}, c.prototype.checkPositionWithEventLoop = function () {
setTimeout(a.proxy(this.checkPosition, this), 1);
}, c.prototype.checkPosition = function () {
- if (this.$element.is(":visible")) {
+ if (this.$element.is(':visible')) {
var b = this.$element.height(),
d = this.options.offset,
e = d.top,
f = d.bottom,
- g = Math.max(a(document).height(), a(document.body).height());"object" != (typeof d === "undefined" ? "undefined" : _typeof(d)) && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));var h = this.getState(g, b, e, f);if (this.affixed != h) {
- null != this.unpin && this.$element.css("top", "");var i = "affix" + (h ? "-" + h : ""),
- j = a.Event(i + ".bs.affix");if (this.$element.trigger(j), j.isDefaultPrevented()) return;this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix");
- }"bottom" == h && this.$element.offset({ top: g - b - f });
+ g = Math.max(a(document).height(), a(document.body).height());'object' != (typeof d === 'undefined' ? 'undefined' : _typeof(d)) && (f = e = d), 'function' == typeof e && (e = d.top(this.$element)), 'function' == typeof f && (f = d.bottom(this.$element));var h = this.getState(g, b, e, f);if (this.affixed != h) {
+ null != this.unpin && this.$element.css('top', '');var i = 'affix' + (h ? '-' + h : ''),
+ j = a.Event(i + '.bs.affix');if (this.$element.trigger(j), j.isDefaultPrevented()) return;this.affixed = h, this.unpin = 'bottom' == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace('affix', 'affixed') + '.bs.affix');
+ }'bottom' == h && this.$element.offset({ top: g - b - f });
}
};var d = a.fn.affix;a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () {
return a.fn.affix = d, this;
- }, a(window).on("load", function () {
+ }, a(window).on('load', function () {
a('[data-spy="affix"]').each(function () {
var c = a(this),
d = c.data();d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d);
diff --git a/dist/server/public/libs/dataTables.bootstrap.min.js b/dist/server/public/libs/dataTables.bootstrap.min.js
index 16bcd94d..c719ef83 100755
--- a/dist/server/public/libs/dataTables.bootstrap.min.js
+++ b/dist/server/public/libs/dataTables.bootstrap.min.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
@@ -7,13 +7,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
©2011-2015 SpryMedia Ltd - datatables.net/license
*/
(function (b) {
- "function" === typeof define && define.amd ? define(["jquery", "datatables.net"], function (a) {
+ 'function' === typeof define && define.amd ? define(['jquery', 'datatables.net'], function (a) {
return b(a, window, document);
- }) : "object" === (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? module.exports = function (a, d) {
- a || (a = window);if (!d || !d.fn.dataTable) d = require("datatables.net")(a, d).$;return b(d, a, a.document);
+ }) : 'object' === (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) ? module.exports = function (a, d) {
+ a || (a = window);if (!d || !d.fn.dataTable) d = require('datatables.net')(a, d).$;return b(d, a, a.document);
} : b(jQuery, window, document);
})(function (b, a, d) {
- var f = b.fn.dataTable;b.extend(!0, f.defaults, { dom: "<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>", renderer: "bootstrap" });b.extend(f.ext.classes, { sWrapper: "dataTables_wrapper form-inline dt-bootstrap", sFilterInput: "form-control input-sm", sLengthSelect: "form-control input-sm", sProcessing: "dataTables_processing panel panel-default" });f.ext.renderer.pageButton.bootstrap = function (a, h, r, m, j, n) {
+ var f = b.fn.dataTable;b.extend(!0, f.defaults, { dom: '<\'row\'<\'col-sm-6\'l><\'col-sm-6\'f>><\'row\'<\'col-sm-12\'tr>><\'row\'<\'col-sm-5\'i><\'col-sm-7\'p>>', renderer: 'bootstrap' });b.extend(f.ext.classes, { sWrapper: 'dataTables_wrapper form-inline dt-bootstrap', sFilterInput: 'form-control input-sm', sLengthSelect: 'form-control input-sm', sProcessing: 'dataTables_processing panel panel-default' });f.ext.renderer.pageButton.bootstrap = function (a, h, r, m, j, n) {
var o = new f.Api(a),
s = a.oClasses,
k = a.oLanguage.oPaginate,
@@ -27,23 +27,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
i,
c,
m = function m(a) {
- a.preventDefault();!b(a.currentTarget).hasClass("disabled") && o.page() != a.data.action && o.page(a.data.action).draw("page");
+ a.preventDefault();!b(a.currentTarget).hasClass('disabled') && o.page() != a.data.action && o.page(a.data.action).draw('page');
};
l = 0;for (h = f.length; l < h; l++) {
if (c = f[l], b.isArray(c)) q(d, c);else {
- g = e = "";switch (c) {case "ellipsis":
- e = "…";g = "disabled";break;case "first":
- e = k.sFirst;g = c + (0 < j ? "" : " disabled");break;case "previous":
- e = k.sPrevious;g = c + (0 < j ? "" : " disabled");break;case "next":
- e = k.sNext;g = c + (j < n - 1 ? "" : " disabled");break;case "last":
- e = k.sLast;g = c + (j < n - 1 ? "" : " disabled");break;default:
- e = c + 1, g = j === c ? "active" : "";}e && (i = b("", { "class": s.sPageButton + " " + g, id: 0 === r && "string" === typeof c ? a.sTableId + "_" + c : null }).append(b("", { href: "#",
- "aria-controls": a.sTableId, "aria-label": t[c], "data-dt-idx": p, tabindex: a.iTabIndex }).html(e)).appendTo(d), a.oApi._fnBindAction(i, { action: c }, m), p++);
+ g = e = '';switch (c) {case 'ellipsis':
+ e = '…';g = 'disabled';break;case 'first':
+ e = k.sFirst;g = c + (0 < j ? '' : ' disabled');break;case 'previous':
+ e = k.sPrevious;g = c + (0 < j ? '' : ' disabled');break;case 'next':
+ e = k.sNext;g = c + (j < n - 1 ? '' : ' disabled');break;case 'last':
+ e = k.sLast;g = c + (j < n - 1 ? '' : ' disabled');break;default:
+ e = c + 1, g = j === c ? 'active' : '';}e && (i = b('', { 'class': s.sPageButton + ' ' + g, id: 0 === r && 'string' === typeof c ? a.sTableId + '_' + c : null }).append(b('', { href: '#',
+ 'aria-controls': a.sTableId, 'aria-label': t[c], 'data-dt-idx': p, tabindex: a.iTabIndex }).html(e)).appendTo(d), a.oApi._fnBindAction(i, { action: c }, m), p++);
}
}
},
i;try {
- i = b(h).find(d.activeElement).data("dt-idx");
- } catch (u) {}q(b(h).empty().html('').children("ul"), m);i && b(h).find("[data-dt-idx=" + i + "]").focus();
+ i = b(h).find(d.activeElement).data('dt-idx');
+ } catch (u) {}q(b(h).empty().html('').children('ul'), m);i && b(h).find('[data-dt-idx=' + i + ']').focus();
};return f;
});
\ No newline at end of file
diff --git a/dist/server/public/libs/jquery-2.1.0.min.js b/dist/server/public/libs/jquery-2.1.0.min.js
index ec25d905..0a4021d3 100755
--- a/dist/server/public/libs/jquery-2.1.0.min.js
+++ b/dist/server/public/libs/jquery-2.1.0.min.js
@@ -1,13 +1,13 @@
-"use strict";
+'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function (a, b) {
- "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && "object" == _typeof(module.exports) ? module.exports = a.document ? b(a, !0) : function (a) {
- if (!a.document) throw new Error("jQuery requires a window with a document");return b(a);
+ 'object' == (typeof module === 'undefined' ? 'undefined' : _typeof(module)) && 'object' == _typeof(module.exports) ? module.exports = a.document ? b(a, !0) : function (a) {
+ if (!a.document) throw new Error('jQuery requires a window with a document');return b(a);
} : b(a);
-}("undefined" != typeof window ? window : undefined, function (a, b) {
+}('undefined' != typeof window ? window : undefined, function (a, b) {
var c = [],
d = c.slice,
e = c.concat,
@@ -16,10 +16,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
h = {},
i = h.toString,
j = h.hasOwnProperty,
- k = "".trim,
+ k = ''.trim,
l = {},
m = a.document,
- n = "2.1.0",
+ n = '2.1.0',
o = function o(a, b) {
return new o.fn.init(a, b);
},
@@ -27,7 +27,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
q = /-([\da-z])/gi,
r = function r(a, b) {
return b.toUpperCase();
- };o.fn = o.prototype = { jquery: n, constructor: o, selector: "", length: 0, toArray: function toArray() {
+ };o.fn = o.prototype = { jquery: n, constructor: o, selector: '', length: 0, toArray: function toArray() {
return d.call(this);
}, get: function get(a) {
return null != a ? 0 > a ? this[a + this.length] : this[a] : d.call(this);
@@ -60,22 +60,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
g = arguments[0] || {},
h = 1,
i = arguments.length,
- j = !1;for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == (typeof g === "undefined" ? "undefined" : _typeof(g)) || o.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++) {
+ j = !1;for ('boolean' == typeof g && (j = g, g = arguments[h] || {}, h++), 'object' == (typeof g === 'undefined' ? 'undefined' : _typeof(g)) || o.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++) {
if (null != (a = arguments[h])) for (b in a) {
c = g[b], d = a[b], g !== d && (j && d && (o.isPlainObject(d) || (e = o.isArray(d))) ? (e ? (e = !1, f = c && o.isArray(c) ? c : []) : f = c && o.isPlainObject(c) ? c : {}, g[b] = o.extend(j, f, d)) : void 0 !== d && (g[b] = d));
}
}return g;
- }, o.extend({ expando: "jQuery" + (n + Math.random()).replace(/\D/g, ""), isReady: !0, error: function error(a) {
+ }, o.extend({ expando: 'jQuery' + (n + Math.random()).replace(/\D/g, ''), isReady: !0, error: function error(a) {
throw new Error(a);
}, noop: function noop() {}, isFunction: function isFunction(a) {
- return "function" === o.type(a);
+ return 'function' === o.type(a);
}, isArray: Array.isArray, isWindow: function isWindow(a) {
return null != a && a === a.window;
}, isNumeric: function isNumeric(a) {
return a - parseFloat(a) >= 0;
}, isPlainObject: function isPlainObject(a) {
- if ("object" !== o.type(a) || a.nodeType || o.isWindow(a)) return !1;try {
- if (a.constructor && !j.call(a.constructor.prototype, "isPrototypeOf")) return !1;
+ if ('object' !== o.type(a) || a.nodeType || o.isWindow(a)) return !1;try {
+ if (a.constructor && !j.call(a.constructor.prototype, 'isPrototypeOf')) return !1;
} catch (b) {
return !1;
}return !0;
@@ -84,12 +84,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return !1;
}return !0;
}, type: function type(a) {
- return null == a ? a + "" : "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) || "function" == typeof a ? h[i.call(a)] || "object" : typeof a === "undefined" ? "undefined" : _typeof(a);
+ return null == a ? a + '' : 'object' == (typeof a === 'undefined' ? 'undefined' : _typeof(a)) || 'function' == typeof a ? h[i.call(a)] || 'object' : typeof a === 'undefined' ? 'undefined' : _typeof(a);
}, globalEval: function globalEval(a) {
var b,
- c = eval;a = o.trim(a), a && (1 === a.indexOf("use strict") ? (b = m.createElement("script"), b.text = a, m.head.appendChild(b).parentNode.removeChild(b)) : c(a));
+ c = eval;a = o.trim(a), a && (1 === a.indexOf('use strict') ? (b = m.createElement('script'), b.text = a, m.head.appendChild(b).parentNode.removeChild(b)) : c(a));
}, camelCase: function camelCase(a) {
- return a.replace(p, "ms-").replace(q, r);
+ return a.replace(p, 'ms-').replace(q, r);
}, nodeName: function nodeName(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase();
}, each: function each(a, b, c) {
@@ -112,9 +112,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (d = b.call(a[e], e, a[e]), d === !1) break;
}return a;
}, trim: function trim(a) {
- return null == a ? "" : k.call(a);
+ return null == a ? '' : k.call(a);
}, makeArray: function makeArray(a, b) {
- var c = b || [];return null != a && (s(Object(a)) ? o.merge(c, "string" == typeof a ? [a] : a) : f.call(c, a)), c;
+ var c = b || [];return null != a && (s(Object(a)) ? o.merge(c, 'string' == typeof a ? [a] : a) : f.call(c, a)), c;
}, inArray: function inArray(a, b, c) {
return null == b ? -1 : g.call(b, a, c);
}, merge: function merge(a, b) {
@@ -136,14 +136,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
d = b(a[f], f, c), null != d && i.push(d);
}return e.apply([], i);
}, guid: 1, proxy: function proxy(a, b) {
- var c, e, f;return "string" == typeof b && (c = a[b], b = a, a = c), o.isFunction(a) ? (e = d.call(arguments, 2), f = function f() {
+ var c, e, f;return 'string' == typeof b && (c = a[b], b = a, a = c), o.isFunction(a) ? (e = d.call(arguments, 2), f = function f() {
return a.apply(b || this, e.concat(d.call(arguments)));
}, f.guid = a.guid = a.guid || o.guid++, f) : void 0;
- }, now: Date.now, support: l }), o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (a, b) {
- h["[object " + b + "]"] = b.toLowerCase();
+ }, now: Date.now, support: l }), o.each('Boolean Number String Function Array Date RegExp Object Error'.split(' '), function (a, b) {
+ h['[object ' + b + ']'] = b.toLowerCase();
});function s(a) {
var b = a.length,
- c = o.type(a);return "function" === c || o.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a;
+ c = o.type(a);return 'function' === c || o.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : 'array' === c || 0 === b || 'number' == typeof b && b > 0 && b - 1 in a;
}var t = function (a) {
var b,
c,
@@ -162,7 +162,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
p,
q,
r,
- s = "sizzle" + -new Date(),
+ s = 'sizzle' + -new Date(),
t = a.document,
u = 0,
v = 0,
@@ -172,7 +172,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
z = function z(a, b) {
return a === b && (j = !0), 0;
},
- A = "undefined",
+ A = 'undefined',
B = 1 << 31,
C = {}.hasOwnProperty,
D = [],
@@ -185,28 +185,28 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (this[b] === a) return b;
}return -1;
},
- J = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- K = "[\\x20\\t\\r\\n\\f]",
- L = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
- M = L.replace("w", "w#"),
- N = "\\[" + K + "*(" + L + ")" + K + "*(?:([*^$|!~]?=)" + K + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + M + ")|)|)" + K + "*\\]",
- O = ":(" + L + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + N.replace(3, 8) + ")*)|.*)\\)|)",
- P = new RegExp("^" + K + "+|((?:^|[^\\\\])(?:\\\\.)*)" + K + "+$", "g"),
- Q = new RegExp("^" + K + "*," + K + "*"),
- R = new RegExp("^" + K + "*([>+~]|" + K + ")" + K + "*"),
- S = new RegExp("=" + K + "*([^\\]'\"]*?)" + K + "*\\]", "g"),
+ J = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
+ K = '[\\x20\\t\\r\\n\\f]',
+ L = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+',
+ M = L.replace('w', 'w#'),
+ N = '\\[' + K + '*(' + L + ')' + K + '*(?:([*^$|!~]?=)' + K + '*(?:([\'"])((?:\\\\.|[^\\\\])*?)\\3|(' + M + ')|)|)' + K + '*\\]',
+ O = ':(' + L + ')(?:\\((([\'"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|' + N.replace(3, 8) + ')*)|.*)\\)|)',
+ P = new RegExp('^' + K + '+|((?:^|[^\\\\])(?:\\\\.)*)' + K + '+$', 'g'),
+ Q = new RegExp('^' + K + '*,' + K + '*'),
+ R = new RegExp('^' + K + '*([>+~]|' + K + ')' + K + '*'),
+ S = new RegExp('=' + K + '*([^\\]\'"]*?)' + K + '*\\]', 'g'),
T = new RegExp(O),
- U = new RegExp("^" + M + "$"),
- V = { ID: new RegExp("^#(" + L + ")"), CLASS: new RegExp("^\\.(" + L + ")"), TAG: new RegExp("^(" + L.replace("w", "w*") + ")"), ATTR: new RegExp("^" + N), PSEUDO: new RegExp("^" + O), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + K + "*(even|odd|(([+-]|)(\\d*)n|)" + K + "*(?:([+-]|)" + K + "*(\\d+)|))" + K + "*\\)|)", "i"), bool: new RegExp("^(?:" + J + ")$", "i"), needsContext: new RegExp("^" + K + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + K + "*((?:-\\d)?\\d*)" + K + "*\\)|)(?=[^-]|$)", "i") },
+ U = new RegExp('^' + M + '$'),
+ V = { ID: new RegExp('^#(' + L + ')'), CLASS: new RegExp('^\\.(' + L + ')'), TAG: new RegExp('^(' + L.replace('w', 'w*') + ')'), ATTR: new RegExp('^' + N), PSEUDO: new RegExp('^' + O), CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + K + '*(even|odd|(([+-]|)(\\d*)n|)' + K + '*(?:([+-]|)' + K + '*(\\d+)|))' + K + '*\\)|)', 'i'), bool: new RegExp('^(?:' + J + ')$', 'i'), needsContext: new RegExp('^' + K + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + K + '*((?:-\\d)?\\d*)' + K + '*\\)|)(?=[^-]|$)', 'i') },
W = /^(?:input|select|textarea|button)$/i,
X = /^h\d$/i,
Y = /^[^{]+\{\s*\[native \w/,
Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
$ = /[+~]/,
_ = /'|\\/g,
- ab = new RegExp("\\\\([\\da-f]{1,6}" + K + "?|(" + K + ")|.)", "ig"),
+ ab = new RegExp('\\\\([\\da-f]{1,6}' + K + '?|(' + K + ')|.)', 'ig'),
bb = function bb(a, b, c) {
- var d = "0x" + b - 65536;return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320);
+ var d = '0x' + b - 65536;return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320);
};try {
G.apply(D = H.call(t.childNodes), t.childNodes), D[t.childNodes.length].nodeType;
} catch (cb) {
@@ -217,7 +217,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
d = 0;while (a[c++] = b[d++]) {}a.length = c - 1;
} };
}function db(a, b, d, e) {
- var f, g, h, i, j, m, p, q, u, v;if ((b ? b.ownerDocument || b : t) !== l && k(b), b = b || l, d = d || [], !a || "string" != typeof a) return d;if (1 !== (i = b.nodeType) && 9 !== i) return [];if (n && !e) {
+ var f, g, h, i, j, m, p, q, u, v;if ((b ? b.ownerDocument || b : t) !== l && k(b), b = b || l, d = d || [], !a || 'string' != typeof a) return d;if (1 !== (i = b.nodeType) && 9 !== i) return [];if (n && !e) {
if (f = Z.exec(a)) if (h = f[1]) {
if (9 === i) {
if (g = b.getElementById(h), !g || !g.parentNode) return d;if (g.id === h) return d.push(g), d;
@@ -225,25 +225,25 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
} else {
if (f[2]) return G.apply(d, b.getElementsByTagName(a)), d;if ((h = f[3]) && c.getElementsByClassName && b.getElementsByClassName) return G.apply(d, b.getElementsByClassName(h)), d;
}if (c.qsa && (!o || !o.test(a))) {
- if (q = p = s, u = b, v = 9 === i && a, 1 === i && "object" !== b.nodeName.toLowerCase()) {
- m = ob(a), (p = b.getAttribute("id")) ? q = p.replace(_, "\\$&") : b.setAttribute("id", q), q = "[id='" + q + "'] ", j = m.length;while (j--) {
+ if (q = p = s, u = b, v = 9 === i && a, 1 === i && 'object' !== b.nodeName.toLowerCase()) {
+ m = ob(a), (p = b.getAttribute('id')) ? q = p.replace(_, '\\$&') : b.setAttribute('id', q), q = '[id=\'' + q + '\'] ', j = m.length;while (j--) {
m[j] = q + pb(m[j]);
- }u = $.test(a) && mb(b.parentNode) || b, v = m.join(",");
+ }u = $.test(a) && mb(b.parentNode) || b, v = m.join(',');
}if (v) try {
return G.apply(d, u.querySelectorAll(v)), d;
} catch (w) {} finally {
- p || b.removeAttribute("id");
+ p || b.removeAttribute('id');
}
}
- }return xb(a.replace(P, "$1"), b, d, e);
+ }return xb(a.replace(P, '$1'), b, d, e);
}function eb() {
var a = [];function b(c, e) {
- return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e;
+ return a.push(c + ' ') > d.cacheLength && delete b[a.shift()], b[c + ' '] = e;
}return b;
}function fb(a) {
return a[s] = !0, a;
}function gb(a) {
- var b = l.createElement("div");try {
+ var b = l.createElement('div');try {
return !!a(b);
} catch (c) {
return !1;
@@ -251,7 +251,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
b.parentNode && b.parentNode.removeChild(b), b = null;
}
}function hb(a, b) {
- var c = a.split("|"),
+ var c = a.split('|'),
e = a.length;while (e--) {
d.attrHandle[c[e]] = b;
}
@@ -262,11 +262,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}return a ? 1 : -1;
}function jb(a) {
return function (b) {
- var c = b.nodeName.toLowerCase();return "input" === c && b.type === a;
+ var c = b.nodeName.toLowerCase();return 'input' === c && b.type === a;
};
}function kb(a) {
return function (b) {
- var c = b.nodeName.toLowerCase();return ("input" === c || "button" === c) && b.type === a;
+ var c = b.nodeName.toLowerCase();return ('input' === c || 'button' === c) && b.type === a;
};
}function lb(a) {
return fb(function (b) {
@@ -281,20 +281,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}function mb(a) {
return a && _typeof(a.getElementsByTagName) !== A && a;
}c = db.support = {}, f = db.isXML = function (a) {
- var b = a && (a.ownerDocument || a).documentElement;return b ? "HTML" !== b.nodeName : !1;
+ var b = a && (a.ownerDocument || a).documentElement;return b ? 'HTML' !== b.nodeName : !1;
}, k = db.setDocument = function (a) {
var b,
e = a ? a.ownerDocument || a : t,
- g = e.defaultView;return e !== l && 9 === e.nodeType && e.documentElement ? (l = e, m = e.documentElement, n = !f(e), g && g !== g.top && (g.addEventListener ? g.addEventListener("unload", function () {
+ g = e.defaultView;return e !== l && 9 === e.nodeType && e.documentElement ? (l = e, m = e.documentElement, n = !f(e), g && g !== g.top && (g.addEventListener ? g.addEventListener('unload', function () {
k();
- }, !1) : g.attachEvent && g.attachEvent("onunload", function () {
+ }, !1) : g.attachEvent && g.attachEvent('onunload', function () {
k();
})), c.attributes = gb(function (a) {
- return a.className = "i", !a.getAttribute("className");
+ return a.className = 'i', !a.getAttribute('className');
}), c.getElementsByTagName = gb(function (a) {
- return a.appendChild(e.createComment("")), !a.getElementsByTagName("*").length;
+ return a.appendChild(e.createComment('')), !a.getElementsByTagName('*').length;
}), c.getElementsByClassName = Y.test(e.getElementsByClassName) && gb(function (a) {
- return a.innerHTML = "", a.firstChild.className = "i", 2 === a.getElementsByClassName("i").length;
+ return a.innerHTML = '', a.firstChild.className = 'i', 2 === a.getElementsByClassName('i').length;
}), c.getById = gb(function (a) {
return m.appendChild(a).id = s, !e.getElementsByName || !e.getElementsByName(s).length;
}), c.getById ? (d.find.ID = function (a, b) {
@@ -303,11 +303,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}
}, d.filter.ID = function (a) {
var b = a.replace(ab, bb);return function (a) {
- return a.getAttribute("id") === b;
+ return a.getAttribute('id') === b;
};
}) : (delete d.find.ID, d.filter.ID = function (a) {
var b = a.replace(ab, bb);return function (a) {
- var c = _typeof(a.getAttributeNode) !== A && a.getAttributeNode("id");return c && c.value === b;
+ var c = _typeof(a.getAttributeNode) !== A && a.getAttributeNode('id');return c && c.value === b;
};
}), d.find.TAG = c.getElementsByTagName ? function (a, b) {
return _typeof(b.getElementsByTagName) !== A ? b.getElementsByTagName(a) : void 0;
@@ -315,7 +315,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
var c,
d = [],
e = 0,
- f = b.getElementsByTagName(a);if ("*" === a) {
+ f = b.getElementsByTagName(a);if ('*' === a) {
while (c = f[e++]) {
1 === c.nodeType && d.push(c);
}return d;
@@ -323,12 +323,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, d.find.CLASS = c.getElementsByClassName && function (a, b) {
return _typeof(b.getElementsByClassName) !== A && n ? b.getElementsByClassName(a) : void 0;
}, p = [], o = [], (c.qsa = Y.test(e.querySelectorAll)) && (gb(function (a) {
- a.innerHTML = "", a.querySelectorAll("[t^='']").length && o.push("[*^$]=" + K + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || o.push("\\[" + K + "*(?:value|" + J + ")"), a.querySelectorAll(":checked").length || o.push(":checked");
+ a.innerHTML = '', a.querySelectorAll('[t^=\'\']').length && o.push('[*^$]=' + K + '*(?:\'\'|"")'), a.querySelectorAll('[selected]').length || o.push('\\[' + K + '*(?:value|' + J + ')'), a.querySelectorAll(':checked').length || o.push(':checked');
}), gb(function (a) {
- var b = e.createElement("input");b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && o.push("name" + K + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || o.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), o.push(",.*:");
+ var b = e.createElement('input');b.setAttribute('type', 'hidden'), a.appendChild(b).setAttribute('name', 'D'), a.querySelectorAll('[name=d]').length && o.push('name' + K + '*[*^$|!~]?='), a.querySelectorAll(':enabled').length || o.push(':enabled', ':disabled'), a.querySelectorAll('*,:x'), o.push(',.*:');
})), (c.matchesSelector = Y.test(q = m.webkitMatchesSelector || m.mozMatchesSelector || m.oMatchesSelector || m.msMatchesSelector)) && gb(function (a) {
- c.disconnectedMatch = q.call(a, "div"), q.call(a, "[s!='']:x"), p.push("!=", O);
- }), o = o.length && new RegExp(o.join("|")), p = p.length && new RegExp(p.join("|")), b = Y.test(m.compareDocumentPosition), r = b || Y.test(m.contains) ? function (a, b) {
+ c.disconnectedMatch = q.call(a, 'div'), q.call(a, '[s!=\'\']:x'), p.push('!=', O);
+ }), o = o.length && new RegExp(o.join('|')), p = p.length && new RegExp(p.join('|')), b = Y.test(m.compareDocumentPosition), r = b || Y.test(m.contains) ? function (a, b) {
var c = 9 === a.nodeType ? a.documentElement : a,
d = b && b.parentNode;return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)));
} : function (a, b) {
@@ -354,7 +354,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, db.matches = function (a, b) {
return db(a, null, null, b);
}, db.matchesSelector = function (a, b) {
- if ((a.ownerDocument || a) !== l && k(a), b = b.replace(S, "='$1']"), !(!c.matchesSelector || !n || p && p.test(b) || o && o.test(b))) try {
+ if ((a.ownerDocument || a) !== l && k(a), b = b.replace(S, '=\'$1\']'), !(!c.matchesSelector || !n || p && p.test(b) || o && o.test(b))) try {
var d = q.call(a, b);if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d;
} catch (e) {}return db(b, l, null, [a]).length > 0;
}, db.contains = function (a, b) {
@@ -363,7 +363,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
(a.ownerDocument || a) !== l && k(a);var e = d.attrHandle[b.toLowerCase()],
f = e && C.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !n) : void 0;return void 0 !== f ? f : c.attributes || !n ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null;
}, db.error = function (a) {
- throw new Error("Syntax error, unrecognized expression: " + a);
+ throw new Error('Syntax error, unrecognized expression: ' + a);
}, db.uniqueSort = function (a) {
var b,
d = [],
@@ -377,42 +377,42 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}return i = null, a;
}, e = db.getText = function (a) {
var b,
- c = "",
+ c = '',
d = 0,
f = a.nodeType;if (f) {
if (1 === f || 9 === f || 11 === f) {
- if ("string" == typeof a.textContent) return a.textContent;for (a = a.firstChild; a; a = a.nextSibling) {
+ if ('string' == typeof a.textContent) return a.textContent;for (a = a.firstChild; a; a = a.nextSibling) {
c += e(a);
}
} else if (3 === f || 4 === f) return a.nodeValue;
} else while (b = a[d++]) {
c += e(b);
}return c;
- }, d = db.selectors = { cacheLength: 50, createPseudo: fb, match: V, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function ATTR(a) {
- return a[1] = a[1].replace(ab, bb), a[3] = (a[4] || a[5] || "").replace(ab, bb), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4);
+ }, d = db.selectors = { cacheLength: 50, createPseudo: fb, match: V, attrHandle: {}, find: {}, relative: { '>': { dir: 'parentNode', first: !0 }, ' ': { dir: 'parentNode' }, '+': { dir: 'previousSibling', first: !0 }, '~': { dir: 'previousSibling' } }, preFilter: { ATTR: function ATTR(a) {
+ return a[1] = a[1].replace(ab, bb), a[3] = (a[4] || a[5] || '').replace(ab, bb), '~=' === a[2] && (a[3] = ' ' + a[3] + ' '), a.slice(0, 4);
}, CHILD: function CHILD(a) {
- return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || db.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && db.error(a[0]), a;
+ return a[1] = a[1].toLowerCase(), 'nth' === a[1].slice(0, 3) ? (a[3] || db.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ('even' === a[3] || 'odd' === a[3])), a[5] = +(a[7] + a[8] || 'odd' === a[3])) : a[3] && db.error(a[0]), a;
}, PSEUDO: function PSEUDO(a) {
var b,
- c = !a[5] && a[2];return V.CHILD.test(a[0]) ? null : (a[3] && void 0 !== a[4] ? a[2] = a[4] : c && T.test(c) && (b = ob(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3));
+ c = !a[5] && a[2];return V.CHILD.test(a[0]) ? null : (a[3] && void 0 !== a[4] ? a[2] = a[4] : c && T.test(c) && (b = ob(c, !0)) && (b = c.indexOf(')', c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3));
} }, filter: { TAG: function TAG(a) {
- var b = a.replace(ab, bb).toLowerCase();return "*" === a ? function () {
+ var b = a.replace(ab, bb).toLowerCase();return '*' === a ? function () {
return !0;
} : function (a) {
return a.nodeName && a.nodeName.toLowerCase() === b;
};
}, CLASS: function CLASS(a) {
- var b = w[a + " "];return b || (b = new RegExp("(^|" + K + ")" + a + "(" + K + "|$)")) && w(a, function (a) {
- return b.test("string" == typeof a.className && a.className || _typeof(a.getAttribute) !== A && a.getAttribute("class") || "");
+ var b = w[a + ' '];return b || (b = new RegExp('(^|' + K + ')' + a + '(' + K + '|$)')) && w(a, function (a) {
+ return b.test('string' == typeof a.className && a.className || _typeof(a.getAttribute) !== A && a.getAttribute('class') || '');
});
}, ATTR: function ATTR(a, b, c) {
return function (d) {
- var e = db.attr(d, a);return null == e ? "!=" === b : b ? (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0;
+ var e = db.attr(d, a);return null == e ? '!=' === b : b ? (e += '', '=' === b ? e === c : '!=' === b ? e !== c : '^=' === b ? c && 0 === e.indexOf(c) : '*=' === b ? c && e.indexOf(c) > -1 : '$=' === b ? c && e.slice(-c.length) === c : '~=' === b ? (' ' + e + ' ').indexOf(c) > -1 : '|=' === b ? e === c || e.slice(0, c.length + 1) === c + '-' : !1) : !0;
};
}, CHILD: function CHILD(a, b, c, d, e) {
- var f = "nth" !== a.slice(0, 3),
- g = "last" !== a.slice(-4),
- h = "of-type" === b;return 1 === d && 0 === e ? function (a) {
+ var f = 'nth' !== a.slice(0, 3),
+ g = 'last' !== a.slice(-4),
+ h = 'of-type' === b;return 1 === d && 0 === e ? function (a) {
return !!a.parentNode;
} : function (b, c, i) {
var j,
@@ -421,7 +421,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
m,
n,
o,
- p = f !== g ? "nextSibling" : "previousSibling",
+ p = f !== g ? 'nextSibling' : 'previousSibling',
q = b.parentNode,
r = h && b.nodeName.toLowerCase(),
t = !i && !h;if (q) {
@@ -429,7 +429,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
while (p) {
l = b;while (l = l[p]) {
if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) return !1;
- }o = p = "only" === a && !o && "nextSibling";
+ }o = p = 'only' === a && !o && 'nextSibling';
}return !0;
}if (o = [g ? q.firstChild : q.lastChild], g && t) {
k = q[s] || (q[s] = {}), j = k[a] || [], n = j[0] === u && j[1], m = j[0] === u && j[2], l = n && q.childNodes[n];while (l = ++n && l && l[p] || (m = n = 0) || o.pop()) {
@@ -444,7 +444,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
};
}, PSEUDO: function PSEUDO(a, b) {
var c,
- e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || db.error("unsupported pseudo: " + a);return e[s] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? fb(function (a, c) {
+ e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || db.error('unsupported pseudo: ' + a);return e[s] ? e(b) : e.length > 1 ? (c = [a, a, '', b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? fb(function (a, c) {
var d,
f = e(a, b),
g = f.length;while (g--) {
@@ -456,7 +456,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
} }, pseudos: { not: fb(function (a) {
var b = [],
c = [],
- d = g(a.replace(P, "$1"));return d[s] ? fb(function (a, b, c, e) {
+ d = g(a.replace(P, '$1'));return d[s] ? fb(function (a, b, c, e) {
var f,
g = d(a, null, e, []),
h = a.length;while (h--) {
@@ -474,9 +474,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return (b.textContent || b.innerText || e(b)).indexOf(a) > -1;
};
}), lang: fb(function (a) {
- return U.test(a || "") || db.error("unsupported lang: " + a), a = a.replace(ab, bb).toLowerCase(), function (b) {
+ return U.test(a || '') || db.error('unsupported lang: ' + a), a = a.replace(ab, bb).toLowerCase(), function (b) {
var c;do {
- if (c = n ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-");
+ if (c = n ? b.lang : b.getAttribute('xml:lang') || b.getAttribute('lang')) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + '-');
} while ((b = b.parentNode) && 1 === b.nodeType);return !1;
};
}), target: function target(b) {
@@ -490,7 +490,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, disabled: function disabled(a) {
return a.disabled === !0;
}, checked: function checked(a) {
- var b = a.nodeName.toLowerCase();return "input" === b && !!a.checked || "option" === b && !!a.selected;
+ var b = a.nodeName.toLowerCase();return 'input' === b && !!a.checked || 'option' === b && !!a.selected;
}, selected: function selected(a) {
return a.parentNode && a.parentNode.selectedIndex, a.selected === !0;
}, empty: function empty(a) {
@@ -504,9 +504,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, input: function input(a) {
return W.test(a.nodeName);
}, button: function button(a) {
- var b = a.nodeName.toLowerCase();return "input" === b && "button" === a.type || "button" === b;
+ var b = a.nodeName.toLowerCase();return 'input' === b && 'button' === a.type || 'button' === b;
}, text: function text(a) {
- var b;return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase());
+ var b;return 'input' === a.nodeName.toLowerCase() && 'text' === a.type && (null == (b = a.getAttribute('type')) || 'text' === b.toLowerCase());
}, first: lb(function () {
return [0];
}), last: lb(function (a, b) {
@@ -541,18 +541,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
h,
i,
j,
- k = x[a + " "];if (k) return b ? 0 : k.slice(0);h = a, i = [], j = d.preFilter;while (h) {
- (!c || (e = Q.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = R.exec(h)) && (c = e.shift(), f.push({ value: c, type: e[0].replace(P, " ") }), h = h.slice(c.length));for (g in d.filter) {
+ k = x[a + ' '];if (k) return b ? 0 : k.slice(0);h = a, i = [], j = d.preFilter;while (h) {
+ (!c || (e = Q.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = R.exec(h)) && (c = e.shift(), f.push({ value: c, type: e[0].replace(P, ' ') }), h = h.slice(c.length));for (g in d.filter) {
!(e = V[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({ value: c, type: g, matches: e }), h = h.slice(c.length));
}if (!c) break;
}return b ? h.length : h ? db.error(a) : x(a, i).slice(0);
}function pb(a) {
- for (var b = 0, c = a.length, d = ""; c > b; b++) {
+ for (var b = 0, c = a.length, d = ''; c > b; b++) {
d += a[b].value;
}return d;
}function qb(a, b, c) {
var d = b.dir,
- e = c && "parentNode" === d,
+ e = c && 'parentNode' === d,
f = v++;return b.first ? function (b, c, f) {
while (b = b[d]) {
if (1 === b.nodeType || e) return a(b, c, f);
@@ -588,7 +588,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
m = [],
n = [],
o = g.length,
- p = f || wb(b || "*", h.nodeType ? [h] : h, []),
+ p = f || wb(b || '*', h.nodeType ? [h] : h, []),
q = !a || !f && b ? p : sb(p, m, a, h, i),
r = c ? e || (f ? a : o || d) ? [] : g : q;if (c && c(q, r, h, i), d) {
j = sb(r, n), d(j, [], h, i), k = j.length;while (k--) {
@@ -607,7 +607,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
} else r = sb(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : G.apply(g, r);
});
}function ub(a) {
- for (var b, c, e, f = a.length, g = d.relative[a[0].type], i = g || d.relative[" "], j = g ? 1 : 0, k = qb(function (a) {
+ for (var b, c, e, f = a.length, g = d.relative[a[0].type], i = g || d.relative[' '], j = g ? 1 : 0, k = qb(function (a) {
return a === b;
}, i, !0), l = qb(function (a) {
return I.call(b, a) > -1;
@@ -618,7 +618,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (c = d.filter[a[j].type].apply(null, a[j].matches), c[s]) {
for (e = ++j; f > e; e++) {
if (d.relative[a[e].type]) break;
- }return tb(j > 1 && rb(m), j > 1 && pb(a.slice(0, j - 1).concat({ value: " " === a[j - 2].type ? "*" : "" })).replace(P, "$1"), c, e > j && ub(a.slice(j, e)), f > e && ub(a = a.slice(e)), f > e && pb(a));
+ }return tb(j > 1 && rb(m), j > 1 && pb(a.slice(0, j - 1).concat({ value: ' ' === a[j - 2].type ? '*' : '' })).replace(P, '$1'), c, e > j && ub(a.slice(j, e)), f > e && ub(a = a.slice(e)), f > e && pb(a));
}m.push(c);
}
}return rb(m);
@@ -630,11 +630,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
n,
o,
p = 0,
- q = "0",
+ q = '0',
r = _f && [],
s = [],
t = h,
- v = _f || e && d.find.TAG("*", k),
+ v = _f || e && d.find.TAG('*', k),
w = u += null == t ? 1 : Math.random() || .1,
x = v.length;for (k && (h = g !== l && g); q !== x && null != (m = v[q]); q++) {
if (e && m) {
@@ -658,7 +658,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
var c,
d = [],
e = [],
- f = y[a + " "];if (!f) {
+ f = y[a + ' '];if (!f) {
b || (b = ob(a)), c = b.length;while (c--) {
f = ub(b[c]), f[s] ? d.push(f) : e.push(f);
}f = y(a, vb(e, d));
@@ -674,7 +674,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
k,
l,
m = ob(a);if (!f && 1 === m.length) {
- if (i = m[0] = m[0].slice(0), i.length > 2 && "ID" === (j = i[0]).type && c.getById && 9 === b.nodeType && n && d.relative[i[1].type]) {
+ if (i = m[0] = m[0].slice(0), i.length > 2 && 'ID' === (j = i[0]).type && c.getById && 9 === b.nodeType && n && d.relative[i[1].type]) {
if (b = (d.find.ID(j.matches[0].replace(ab, bb), b) || [])[0], !b) return e;a = a.slice(i.shift().value.length);
}h = V.needsContext.test(a) ? 0 : i.length;while (h--) {
if (j = i[h], d.relative[k = j.type]) break;if ((l = d.find[k]) && (f = l(j.matches[0].replace(ab, bb), $.test(i[0].type) && mb(b.parentNode) || b))) {
@@ -682,64 +682,64 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}
}
}return g(a, m)(f, b, !n, e, $.test(a) && mb(b.parentNode) || b), e;
- }return c.sortStable = s.split("").sort(z).join("") === s, c.detectDuplicates = !!j, k(), c.sortDetached = gb(function (a) {
- return 1 & a.compareDocumentPosition(l.createElement("div"));
+ }return c.sortStable = s.split('').sort(z).join('') === s, c.detectDuplicates = !!j, k(), c.sortDetached = gb(function (a) {
+ return 1 & a.compareDocumentPosition(l.createElement('div'));
}), gb(function (a) {
- return a.innerHTML = "", "#" === a.firstChild.getAttribute("href");
- }) || hb("type|href|height|width", function (a, b, c) {
- return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2);
+ return a.innerHTML = '', '#' === a.firstChild.getAttribute('href');
+ }) || hb('type|href|height|width', function (a, b, c) {
+ return c ? void 0 : a.getAttribute(b, 'type' === b.toLowerCase() ? 1 : 2);
}), c.attributes && gb(function (a) {
- return a.innerHTML = "", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value");
- }) || hb("value", function (a, b, c) {
- return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue;
+ return a.innerHTML = '', a.firstChild.setAttribute('value', ''), '' === a.firstChild.getAttribute('value');
+ }) || hb('value', function (a, b, c) {
+ return c || 'input' !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue;
}), gb(function (a) {
- return null == a.getAttribute("disabled");
+ return null == a.getAttribute('disabled');
}) || hb(J, function (a, b, c) {
var d;return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null;
}), db;
- }(a);o.find = t, o.expr = t.selectors, o.expr[":"] = o.expr.pseudos, o.unique = t.uniqueSort, o.text = t.getText, o.isXMLDoc = t.isXML, o.contains = t.contains;var u = o.expr.match.needsContext,
+ }(a);o.find = t, o.expr = t.selectors, o.expr[':'] = o.expr.pseudos, o.unique = t.uniqueSort, o.text = t.getText, o.isXMLDoc = t.isXML, o.contains = t.contains;var u = o.expr.match.needsContext,
v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
w = /^.[^:#\[\.,]*$/;function x(a, b, c) {
if (o.isFunction(b)) return o.grep(a, function (a, d) {
return !!b.call(a, d, a) !== c;
});if (b.nodeType) return o.grep(a, function (a) {
return a === b !== c;
- });if ("string" == typeof b) {
+ });if ('string' == typeof b) {
if (w.test(b)) return o.filter(b, a, c);b = o.filter(b, a);
}return o.grep(a, function (a) {
return g.call(b, a) >= 0 !== c;
});
}o.filter = function (a, b, c) {
- var d = b[0];return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? o.find.matchesSelector(d, a) ? [d] : [] : o.find.matches(a, o.grep(b, function (a) {
+ var d = b[0];return c && (a = ':not(' + a + ')'), 1 === b.length && 1 === d.nodeType ? o.find.matchesSelector(d, a) ? [d] : [] : o.find.matches(a, o.grep(b, function (a) {
return 1 === a.nodeType;
}));
}, o.fn.extend({ find: function find(a) {
var b,
c = this.length,
d = [],
- e = this;if ("string" != typeof a) return this.pushStack(o(a).filter(function () {
+ e = this;if ('string' != typeof a) return this.pushStack(o(a).filter(function () {
for (b = 0; c > b; b++) {
if (o.contains(e[b], this)) return !0;
}
}));for (b = 0; c > b; b++) {
o.find(a, e[b], d);
- }return d = this.pushStack(c > 1 ? o.unique(d) : d), d.selector = this.selector ? this.selector + " " + a : a, d;
+ }return d = this.pushStack(c > 1 ? o.unique(d) : d), d.selector = this.selector ? this.selector + ' ' + a : a, d;
}, filter: function filter(a) {
return this.pushStack(x(this, a || [], !1));
}, not: function not(a) {
return this.pushStack(x(this, a || [], !0));
}, is: function is(a) {
- return !!x(this, "string" == typeof a && u.test(a) ? o(a) : a || [], !1).length;
+ return !!x(this, 'string' == typeof a && u.test(a) ? o(a) : a || [], !1).length;
} });var y,
z = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
A = o.fn.init = function (a, b) {
- var c, d;if (!a) return this;if ("string" == typeof a) {
- if (c = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : z.exec(a), !c || !c[1] && b) return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a);if (c[1]) {
+ var c, d;if (!a) return this;if ('string' == typeof a) {
+ if (c = '<' === a[0] && '>' === a[a.length - 1] && a.length >= 3 ? [null, a, null] : z.exec(a), !c || !c[1] && b) return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a);if (c[1]) {
if (b = b instanceof o ? b[0] : b, o.merge(this, o.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : m, !0)), v.test(c[1]) && o.isPlainObject(b)) for (c in b) {
o.isFunction(this[c]) ? this[c](b[c]) : this.attr(c, b[c]);
}return this;
}return d = m.getElementById(c[2]), d && d.parentNode && (this.length = 1, this[0] = d), this.context = m, this.selector = a, this;
- }return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : o.isFunction(a) ? "undefined" != typeof y.ready ? y.ready(a) : a(o) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), o.makeArray(a, this));
+ }return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : o.isFunction(a) ? 'undefined' != typeof y.ready ? y.ready(a) : a(o) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), o.makeArray(a, this));
};A.prototype = o.fn, y = o(m);var B = /^(?:parents|prev(?:Until|All))/,
C = { children: !0, contents: !0, next: !0, prev: !0 };o.extend({ dir: function dir(a, b, c) {
var d = [],
@@ -760,7 +760,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}
});
}, closest: function closest(a, b) {
- for (var c, d = 0, e = this.length, f = [], g = u.test(a) || "string" != typeof a ? o(a, b || this.context) : 0; e > d; d++) {
+ for (var c, d = 0, e = this.length, f = [], g = u.test(a) || 'string' != typeof a ? o(a, b || this.context) : 0; e > d; d++) {
for (c = this[d]; c && c !== b; c = c.parentNode) {
if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && o.find.matchesSelector(c, a))) {
f.push(c);break;
@@ -768,7 +768,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}
}return this.pushStack(f.length > 1 ? o.unique(f) : f);
}, index: function index(a) {
- return a ? "string" == typeof a ? g.call(o(a), this[0]) : g.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
+ return a ? 'string' == typeof a ? g.call(o(a), this[0]) : g.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
}, add: function add(a, b) {
return this.pushStack(o.unique(o.merge(this.get(), o(a, b))));
}, addBack: function addBack(a) {
@@ -778,21 +778,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}o.each({ parent: function parent(a) {
var b = a.parentNode;return b && 11 !== b.nodeType ? b : null;
}, parents: function parents(a) {
- return o.dir(a, "parentNode");
+ return o.dir(a, 'parentNode');
}, parentsUntil: function parentsUntil(a, b, c) {
- return o.dir(a, "parentNode", c);
+ return o.dir(a, 'parentNode', c);
}, next: function next(a) {
- return D(a, "nextSibling");
+ return D(a, 'nextSibling');
}, prev: function prev(a) {
- return D(a, "previousSibling");
+ return D(a, 'previousSibling');
}, nextAll: function nextAll(a) {
- return o.dir(a, "nextSibling");
+ return o.dir(a, 'nextSibling');
}, prevAll: function prevAll(a) {
- return o.dir(a, "previousSibling");
+ return o.dir(a, 'previousSibling');
}, nextUntil: function nextUntil(a, b, c) {
- return o.dir(a, "nextSibling", c);
+ return o.dir(a, 'nextSibling', c);
}, prevUntil: function prevUntil(a, b, c) {
- return o.dir(a, "previousSibling", c);
+ return o.dir(a, 'previousSibling', c);
}, siblings: function siblings(a) {
return o.sibling((a.parentNode || {}).firstChild, a);
}, children: function children(a) {
@@ -801,7 +801,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return a.contentDocument || o.merge([], a.childNodes);
} }, function (a, b) {
o.fn[a] = function (c, d) {
- var e = o.map(this, b, c);return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = o.filter(d, e)), this.length > 1 && (C[a] || o.unique(e), B.test(a) && e.reverse()), this.pushStack(e);
+ var e = o.map(this, b, c);return 'Until' !== a.slice(-5) && (d = c), d && 'string' == typeof d && (e = o.filter(d, e)), this.length > 1 && (C[a] || o.unique(e), B.test(a) && e.reverse()), this.pushStack(e);
};
});var E = /\S+/g,
F = {};function G(a) {
@@ -809,7 +809,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
b[c] = !0;
}), b;
}o.Callbacks = function (a) {
- a = "string" == typeof a ? F[a] || G(a) : o.extend({}, a);var b,
+ a = 'string' == typeof a ? F[a] || G(a) : o.extend({}, a);var b,
c,
d,
e,
@@ -828,7 +828,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (h) {
var c = h.length;!function g(b) {
o.each(b, function (b, c) {
- var d = o.type(c);"function" === d ? a.unique && k.has(c) || h.push(c) : c && c.length && "string" !== d && g(c);
+ var d = o.type(c);'function' === d ? a.unique && k.has(c) || h.push(c) : c && c.length && 'string' !== d && g(c);
});
}(arguments), d ? f = h.length : b && (e = c, j(b));
}return this;
@@ -858,8 +858,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return !!c;
} };return k;
}, o.extend({ Deferred: function Deferred(a) {
- var b = [["resolve", "done", o.Callbacks("once memory"), "resolved"], ["reject", "fail", o.Callbacks("once memory"), "rejected"], ["notify", "progress", o.Callbacks("memory")]],
- c = "pending",
+ var b = [['resolve', 'done', o.Callbacks('once memory'), 'resolved'], ['reject', 'fail', o.Callbacks('once memory'), 'rejected'], ['notify', 'progress', o.Callbacks('memory')]],
+ c = 'pending',
d = { state: function state() {
return c;
}, always: function always() {
@@ -868,7 +868,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
var a = arguments;return o.Deferred(function (c) {
o.each(b, function (b, f) {
var g = o.isFunction(a[b]) && a[b];e[f[1]](function () {
- var a = g && g.apply(this, arguments);a && o.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments);
+ var a = g && g.apply(this, arguments);a && o.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f[0] + 'With'](this === d ? c.promise() : this, g ? [a] : arguments);
});
}), a = null;
}).promise();
@@ -880,8 +880,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
h = f[3];d[f[1]] = g.add, h && g.add(function () {
c = h;
}, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function () {
- return e[f[0] + "With"](this === e ? d : this, arguments), this;
- }, e[f[0] + "With"] = g.fireWith;
+ return e[f[0] + 'With'](this === e ? d : this, arguments), this;
+ }, e[f[0] + 'With'] = g.fireWith;
}), d.promise(e), a && a.call(e, e), e;
}, when: function when(a) {
var b = 0,
@@ -904,15 +904,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, o.extend({ isReady: !1, readyWait: 1, holdReady: function holdReady(a) {
a ? o.readyWait++ : o.ready(!0);
}, ready: function ready(a) {
- (a === !0 ? --o.readyWait : o.isReady) || (o.isReady = !0, a !== !0 && --o.readyWait > 0 || (H.resolveWith(m, [o]), o.fn.trigger && o(m).trigger("ready").off("ready")));
+ (a === !0 ? --o.readyWait : o.isReady) || (o.isReady = !0, a !== !0 && --o.readyWait > 0 || (H.resolveWith(m, [o]), o.fn.trigger && o(m).trigger('ready').off('ready')));
} });function I() {
- m.removeEventListener("DOMContentLoaded", I, !1), a.removeEventListener("load", I, !1), o.ready();
+ m.removeEventListener('DOMContentLoaded', I, !1), a.removeEventListener('load', I, !1), o.ready();
}o.ready.promise = function (b) {
- return H || (H = o.Deferred(), "complete" === m.readyState ? setTimeout(o.ready) : (m.addEventListener("DOMContentLoaded", I, !1), a.addEventListener("load", I, !1))), H.promise(b);
+ return H || (H = o.Deferred(), 'complete' === m.readyState ? setTimeout(o.ready) : (m.addEventListener('DOMContentLoaded', I, !1), a.addEventListener('load', I, !1))), H.promise(b);
}, o.ready.promise();var J = o.access = function (a, b, c, d, e, f, g) {
var h = 0,
i = a.length,
- j = null == c;if ("object" === o.type(c)) {
+ j = null == c;if ('object' === o.type(c)) {
e = !0;for (h in c) {
o.access(a, b, h, c[h], !0, f, g);
}
@@ -922,7 +922,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
}return e ? a : j ? b.call(a) : i ? b(a[0], c) : f;
};o.acceptData = function (a) {
- return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType;
+ return 1 === a.nodeType || 9 === a.nodeType || ! +a.nodeType;
};function K() {
Object.defineProperty(this.cache = {}, 0, { get: function get() {
return {};
@@ -939,13 +939,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, set: function set(a, b, c) {
var d,
e = this.key(a),
- f = this.cache[e];if ("string" == typeof b) f[b] = c;else if (o.isEmptyObject(f)) o.extend(this.cache[e], b);else for (d in b) {
+ f = this.cache[e];if ('string' == typeof b) f[b] = c;else if (o.isEmptyObject(f)) o.extend(this.cache[e], b);else for (d in b) {
f[d] = b[d];
}return f;
}, get: function get(a, b) {
var c = this.cache[this.key(a)];return void 0 === b ? c : c[b];
}, access: function access(a, b, c) {
- var d;return void 0 === b || b && "string" == typeof b && void 0 === c ? (d = this.get(a, b), void 0 !== d ? d : this.get(a, o.camelCase(b))) : (this.set(a, b, c), void 0 !== c ? c : b);
+ var d;return void 0 === b || b && 'string' == typeof b && void 0 === c ? (d = this.get(a, b), void 0 !== d ? d : this.get(a, o.camelCase(b))) : (this.set(a, b, c), void 0 !== c ? c : b);
}, remove: function remove(a, b) {
var c,
d,
@@ -964,9 +964,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
M = new K(),
N = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
O = /([A-Z])/g;function P(a, b, c) {
- var d;if (void 0 === c && 1 === a.nodeType) if (d = "data-" + b.replace(O, "-$1").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) {
+ var d;if (void 0 === c && 1 === a.nodeType) if (d = 'data-' + b.replace(O, '-$1').toLowerCase(), c = a.getAttribute(d), 'string' == typeof c) {
try {
- c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : N.test(c) ? o.parseJSON(c) : c;
+ c = 'true' === c ? !0 : 'false' === c ? !1 : 'null' === c ? null : +c + '' === c ? +c : N.test(c) ? o.parseJSON(c) : c;
} catch (e) {}M.set(a, b, c);
} else c = void 0;return c;
}o.extend({ hasData: function hasData(a) {
@@ -985,20 +985,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
e,
f = this[0],
g = f && f.attributes;if (void 0 === a) {
- if (this.length && (e = M.get(f), 1 === f.nodeType && !L.get(f, "hasDataAttrs"))) {
+ if (this.length && (e = M.get(f), 1 === f.nodeType && !L.get(f, 'hasDataAttrs'))) {
c = g.length;
while (c--) {
- d = g[c].name, 0 === d.indexOf("data-") && (d = o.camelCase(d.slice(5)), P(f, d, e[d]));
- }L.set(f, "hasDataAttrs", !0);
+ d = g[c].name, 0 === d.indexOf('data-') && (d = o.camelCase(d.slice(5)), P(f, d, e[d]));
+ }L.set(f, 'hasDataAttrs', !0);
}return e;
- }return "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) ? this.each(function () {
+ }return 'object' == (typeof a === 'undefined' ? 'undefined' : _typeof(a)) ? this.each(function () {
M.set(this, a);
}) : J(this, function (b) {
var c,
d = o.camelCase(a);if (f && void 0 === b) {
if (c = M.get(f, a), void 0 !== c) return c;if (c = M.get(f, d), void 0 !== c) return c;if (c = P(f, d, void 0), void 0 !== c) return c;
} else this.each(function () {
- var c = M.get(this, d);M.set(this, d, b), -1 !== a.indexOf("-") && void 0 !== c && M.set(this, a, b);
+ var c = M.get(this, d);M.set(this, d, b), -1 !== a.indexOf('-') && void 0 !== c && M.set(this, a, b);
});
}, null, b, arguments.length > 1, null, !0);
}, removeData: function removeData(a) {
@@ -1006,29 +1006,29 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
M.remove(this, a);
});
} }), o.extend({ queue: function queue(a, b, c) {
- var d;return a ? (b = (b || "fx") + "queue", d = L.get(a, b), c && (!d || o.isArray(c) ? d = L.access(a, b, o.makeArray(c)) : d.push(c)), d || []) : void 0;
+ var d;return a ? (b = (b || 'fx') + 'queue', d = L.get(a, b), c && (!d || o.isArray(c) ? d = L.access(a, b, o.makeArray(c)) : d.push(c)), d || []) : void 0;
}, dequeue: function dequeue(a, b) {
- b = b || "fx";var c = o.queue(a, b),
+ b = b || 'fx';var c = o.queue(a, b),
d = c.length,
e = c.shift(),
f = o._queueHooks(a, b),
g = function g() {
o.dequeue(a, b);
- };"inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire();
+ };'inprogress' === e && (e = c.shift(), d--), e && ('fx' === b && c.unshift('inprogress'), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire();
}, _queueHooks: function _queueHooks(a, b) {
- var c = b + "queueHooks";return L.get(a, c) || L.access(a, c, { empty: o.Callbacks("once memory").add(function () {
- L.remove(a, [b + "queue", c]);
+ var c = b + 'queueHooks';return L.get(a, c) || L.access(a, c, { empty: o.Callbacks('once memory').add(function () {
+ L.remove(a, [b + 'queue', c]);
}) });
} }), o.fn.extend({ queue: function queue(a, b) {
- var c = 2;return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? o.queue(this[0], a) : void 0 === b ? this : this.each(function () {
- var c = o.queue(this, a, b);o._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && o.dequeue(this, a);
+ var c = 2;return 'string' != typeof a && (b = a, a = 'fx', c--), arguments.length < c ? o.queue(this[0], a) : void 0 === b ? this : this.each(function () {
+ var c = o.queue(this, a, b);o._queueHooks(this, a), 'fx' === a && 'inprogress' !== c[0] && o.dequeue(this, a);
});
}, dequeue: function dequeue(a) {
return this.each(function () {
o.dequeue(this, a);
});
}, clearQueue: function clearQueue(a) {
- return this.queue(a || "fx", []);
+ return this.queue(a || 'fx', []);
}, promise: function promise(a, b) {
var c,
d = 1,
@@ -1037,18 +1037,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
g = this.length,
h = function h() {
--d || e.resolveWith(f, [f]);
- };"string" != typeof a && (b = a, a = void 0), a = a || "fx";while (g--) {
- c = L.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h));
+ };'string' != typeof a && (b = a, a = void 0), a = a || 'fx';while (g--) {
+ c = L.get(f[g], a + 'queueHooks'), c && c.empty && (d++, c.empty.add(h));
}return h(), e.promise(b);
} });var Q = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- R = ["Top", "Right", "Bottom", "Left"],
+ R = ['Top', 'Right', 'Bottom', 'Left'],
S = function S(a, b) {
- return a = b || a, "none" === o.css(a, "display") || !o.contains(a.ownerDocument, a);
+ return a = b || a, 'none' === o.css(a, 'display') || !o.contains(a.ownerDocument, a);
},
T = /^(?:checkbox|radio)$/i;!function () {
var a = m.createDocumentFragment(),
- b = a.appendChild(m.createElement("div"));b.innerHTML = "", l.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "", l.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue;
- }();var U = "undefined";l.focusinBubbles = "onfocusin" in a;var V = /^key/,
+ b = a.appendChild(m.createElement('div'));b.innerHTML = '', l.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = '', l.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue;
+ }();var U = 'undefined';l.focusinBubbles = 'onfocusin' in a;var V = /^key/,
W = /^(?:mouse|contextmenu)|click/,
X = /^(?:focusinfocus|focusoutblur)$/,
Y = /^([^.]*)(?:\.(.+)|)$/;function Z() {
@@ -1073,9 +1073,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
q,
r = L.get(a);if (r) {
c.handler && (f = c, c = f.handler, e = f.selector), c.guid || (c.guid = o.guid++), (i = r.events) || (i = r.events = {}), (g = r.handle) || (g = r.handle = function (b) {
- return (typeof o === "undefined" ? "undefined" : _typeof(o)) !== U && o.event.triggered !== b.type ? o.event.dispatch.apply(a, arguments) : void 0;
- }), b = (b || "").match(E) || [""], j = b.length;while (j--) {
- h = Y.exec(b[j]) || [], n = q = h[1], p = (h[2] || "").split(".").sort(), n && (l = o.event.special[n] || {}, n = (e ? l.delegateType : l.bindType) || n, l = o.event.special[n] || {}, k = o.extend({ type: n, origType: q, data: d, handler: c, guid: c.guid, selector: e, needsContext: e && o.expr.match.needsContext.test(e), namespace: p.join(".") }, f), (m = i[n]) || (m = i[n] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, p, g) !== !1 || a.addEventListener && a.addEventListener(n, g, !1)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), o.event.global[n] = !0);
+ return (typeof o === 'undefined' ? 'undefined' : _typeof(o)) !== U && o.event.triggered !== b.type ? o.event.dispatch.apply(a, arguments) : void 0;
+ }), b = (b || '').match(E) || [''], j = b.length;while (j--) {
+ h = Y.exec(b[j]) || [], n = q = h[1], p = (h[2] || '').split('.').sort(), n && (l = o.event.special[n] || {}, n = (e ? l.delegateType : l.bindType) || n, l = o.event.special[n] || {}, k = o.extend({ type: n, origType: q, data: d, handler: c, guid: c.guid, selector: e, needsContext: e && o.expr.match.needsContext.test(e), namespace: p.join('.') }, f), (m = i[n]) || (m = i[n] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, p, g) !== !1 || a.addEventListener && a.addEventListener(n, g, !1)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), o.event.global[n] = !0);
}
}
}, remove: function remove(a, b, c, d, e) {
@@ -1091,15 +1091,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
p,
q,
r = L.hasData(a) && L.get(a);if (r && (i = r.events)) {
- b = (b || "").match(E) || [""], j = b.length;while (j--) {
- if (h = Y.exec(b[j]) || [], n = q = h[1], p = (h[2] || "").split(".").sort(), n) {
- l = o.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = i[n] || [], h = h[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length;while (f--) {
- k = m[f], !e && q !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ("**" !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k));
+ b = (b || '').match(E) || [''], j = b.length;while (j--) {
+ if (h = Y.exec(b[j]) || [], n = q = h[1], p = (h[2] || '').split('.').sort(), n) {
+ l = o.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = i[n] || [], h = h[2] && new RegExp('(^|\\.)' + p.join('\\.(?:.*\\.|)') + '(\\.|$)'), g = f = m.length;while (f--) {
+ k = m[f], !e && q !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ('**' !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k));
}g && !m.length && (l.teardown && l.teardown.call(a, p, r.handle) !== !1 || o.removeEvent(a, n, r.handle), delete i[n]);
} else for (n in i) {
o.event.remove(a, n + b[j], c, d, !0);
}
- }o.isEmptyObject(i) && (delete r.handle, L.remove(a, "events"));
+ }o.isEmptyObject(i) && (delete r.handle, L.remove(a, 'events'));
}
}, trigger: function trigger(b, c, d, e) {
var f,
@@ -1110,14 +1110,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
l,
n,
p = [d || m],
- q = j.call(b, "type") ? b.type : b,
- r = j.call(b, "namespace") ? b.namespace.split(".") : [];if (g = h = d = d || m, 3 !== d.nodeType && 8 !== d.nodeType && !X.test(q + o.event.triggered) && (q.indexOf(".") >= 0 && (r = q.split("."), q = r.shift(), r.sort()), k = q.indexOf(":") < 0 && "on" + q, b = b[o.expando] ? b : new o.Event(q, "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b), b.isTrigger = e ? 2 : 3, b.namespace = r.join("."), b.namespace_re = b.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : o.makeArray(c, [b]), n = o.event.special[q] || {}, e || !n.trigger || n.trigger.apply(d, c) !== !1)) {
+ q = j.call(b, 'type') ? b.type : b,
+ r = j.call(b, 'namespace') ? b.namespace.split('.') : [];if (g = h = d = d || m, 3 !== d.nodeType && 8 !== d.nodeType && !X.test(q + o.event.triggered) && (q.indexOf('.') >= 0 && (r = q.split('.'), q = r.shift(), r.sort()), k = q.indexOf(':') < 0 && 'on' + q, b = b[o.expando] ? b : new o.Event(q, 'object' == (typeof b === 'undefined' ? 'undefined' : _typeof(b)) && b), b.isTrigger = e ? 2 : 3, b.namespace = r.join('.'), b.namespace_re = b.namespace ? new RegExp('(^|\\.)' + r.join('\\.(?:.*\\.|)') + '(\\.|$)') : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : o.makeArray(c, [b]), n = o.event.special[q] || {}, e || !n.trigger || n.trigger.apply(d, c) !== !1)) {
if (!e && !n.noBubble && !o.isWindow(d)) {
for (i = n.delegateType || q, X.test(i + q) || (g = g.parentNode); g; g = g.parentNode) {
p.push(g), h = g;
}h === (d.ownerDocument || m) && p.push(h.defaultView || h.parentWindow || a);
}f = 0;while ((g = p[f++]) && !b.isPropagationStopped()) {
- b.type = f > 1 ? i : n.bindType || q, l = (L.get(g, "events") || {})[b.type] && L.get(g, "handle"), l && l.apply(g, c), l = k && g[k], l && l.apply && o.acceptData(g) && (b.result = l.apply(g, c), b.result === !1 && b.preventDefault());
+ b.type = f > 1 ? i : n.bindType || q, l = (L.get(g, 'events') || {})[b.type] && L.get(g, 'handle'), l && l.apply(g, c), l = k && g[k], l && l.apply && o.acceptData(g) && (b.result = l.apply(g, c), b.result === !1 && b.preventDefault());
}return b.type = q, e || b.isDefaultPrevented() || n._default && n._default.apply(p.pop(), c) !== !1 || !o.acceptData(d) || k && o.isFunction(d[q]) && !o.isWindow(d) && (h = d[k], h && (d[k] = null), o.event.triggered = q, d[q](), o.event.triggered = void 0, h && (d[k] = h)), b.result;
}
}, dispatch: function dispatch(a) {
@@ -1128,7 +1128,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
g,
h = [],
i = d.call(arguments),
- j = (L.get(this, "events") || {})[a.type] || [],
+ j = (L.get(this, 'events') || {})[a.type] || [],
k = o.event.special[a.type] || {};if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) {
h = o.event.handlers.call(this, a, j), b = 0;while ((f = h[b++]) && !a.isPropagationStopped()) {
a.currentTarget = f.elem, c = 0;while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped()) {
@@ -1143,16 +1143,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
f,
g = [],
h = b.delegateCount,
- i = a.target;if (h && i.nodeType && (!a.button || "click" !== a.type)) for (; i !== this; i = i.parentNode || this) {
- if (i.disabled !== !0 || "click" !== a.type) {
+ i = a.target;if (h && i.nodeType && (!a.button || 'click' !== a.type)) for (; i !== this; i = i.parentNode || this) {
+ if (i.disabled !== !0 || 'click' !== a.type) {
for (d = [], c = 0; h > c; c++) {
- f = b[c], e = f.selector + " ", void 0 === d[e] && (d[e] = f.needsContext ? o(e, this).index(i) >= 0 : o.find(e, this, null, [i]).length), d[e] && d.push(f);
+ f = b[c], e = f.selector + ' ', void 0 === d[e] && (d[e] = f.needsContext ? o(e, this).index(i) >= 0 : o.find(e, this, null, [i]).length), d[e] && d.push(f);
}d.length && g.push({ elem: i, handlers: d });
}
}return h < b.length && g.push({ elem: this, handlers: b.slice(h) }), g;
- }, props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function filter(a, b) {
+ }, props: 'altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(' '), fixHooks: {}, keyHooks: { props: 'char charCode key keyCode'.split(' '), filter: function filter(a, b) {
return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a;
- } }, mouseHooks: { props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function filter(a, b) {
+ } }, mouseHooks: { props: 'button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement'.split(' '), filter: function filter(a, b) {
var c,
d,
e,
@@ -1168,12 +1168,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}return a.target || (a.target = m), 3 === a.target.nodeType && (a.target = a.target.parentNode), g.filter ? g.filter(a, f) : a;
}, special: { load: { noBubble: !0 }, focus: { trigger: function trigger() {
return this !== _() && this.focus ? (this.focus(), !1) : void 0;
- }, delegateType: "focusin" }, blur: { trigger: function trigger() {
+ }, delegateType: 'focusin' }, blur: { trigger: function trigger() {
return this === _() && this.blur ? (this.blur(), !1) : void 0;
- }, delegateType: "focusout" }, click: { trigger: function trigger() {
- return "checkbox" === this.type && this.click && o.nodeName(this, "input") ? (this.click(), !1) : void 0;
+ }, delegateType: 'focusout' }, click: { trigger: function trigger() {
+ return 'checkbox' === this.type && this.click && o.nodeName(this, 'input') ? (this.click(), !1) : void 0;
}, _default: function _default(a) {
- return o.nodeName(a.target, "a");
+ return o.nodeName(a.target, 'a');
} }, beforeunload: { postDispatch: function postDispatch(a) {
void 0 !== a.result && (a.originalEvent.returnValue = a.result);
} } }, simulate: function simulate(a, b, c, d) {
@@ -1188,14 +1188,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
var a = this.originalEvent;this.isPropagationStopped = Z, a && a.stopPropagation && a.stopPropagation();
}, stopImmediatePropagation: function stopImmediatePropagation() {
this.isImmediatePropagationStopped = Z, this.stopPropagation();
- } }, o.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function (a, b) {
+ } }, o.each({ mouseenter: 'mouseover', mouseleave: 'mouseout' }, function (a, b) {
o.event.special[a] = { delegateType: b, bindType: b, handle: function handle(a) {
var c,
d = this,
e = a.relatedTarget,
f = a.handleObj;return (!e || e !== d && !o.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c;
} };
- }), l.focusinBubbles || o.each({ focus: "focusin", blur: "focusout" }, function (a, b) {
+ }), l.focusinBubbles || o.each({ focus: 'focusin', blur: 'focusout' }, function (a, b) {
var c = function c(a) {
o.event.simulate(b, a.target, o.event.fix(a), !0);
};o.event.special[b] = { setup: function setup() {
@@ -1206,11 +1206,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
e = L.access(d, b) - 1;e ? L.access(d, b, e) : (d.removeEventListener(a, c, !0), L.remove(d, b));
} };
}), o.fn.extend({ on: function on(a, b, c, d, e) {
- var f, g;if ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a))) {
- "string" != typeof b && (c = c || b, b = void 0);for (g in a) {
+ var f, g;if ('object' == (typeof a === 'undefined' ? 'undefined' : _typeof(a))) {
+ 'string' != typeof b && (c = c || b, b = void 0);for (g in a) {
this.on(g, b, c, a[g], e);
}return this;
- }if (null == c && null == d ? (d = b, c = b = void 0) : null == d && ("string" == typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0)), d === !1) d = $;else if (!d) return this;return 1 === e && (f = d, d = function d(a) {
+ }if (null == c && null == d ? (d = b, c = b = void 0) : null == d && ('string' == typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0)), d === !1) d = $;else if (!d) return this;return 1 === e && (f = d, d = function d(a) {
return o().off(a), f.apply(this, arguments);
}, d.guid = f.guid || (f.guid = o.guid++)), this.each(function () {
o.event.add(this, a, d, c, b);
@@ -1218,11 +1218,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}, one: function one(a, b, c, d) {
return this.on(a, b, c, d, 1);
}, off: function off(a, b, c) {
- var d, e;if (a && a.preventDefault && a.handleObj) return d = a.handleObj, o(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;if ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a))) {
+ var d, e;if (a && a.preventDefault && a.handleObj) return d = a.handleObj, o(a.delegateTarget).off(d.namespace ? d.origType + '.' + d.namespace : d.origType, d.selector, d.handler), this;if ('object' == (typeof a === 'undefined' ? 'undefined' : _typeof(a))) {
for (e in a) {
this.off(e, b, a[e]);
}return this;
- }return (b === !1 || "function" == typeof b) && (c = b, b = void 0), c === !1 && (c = $), this.each(function () {
+ }return (b === !1 || 'function' == typeof b) && (c = b, b = void 0), c === !1 && (c = $), this.each(function () {
o.event.remove(this, a, c, b);
});
}, trigger: function trigger(a, b) {
@@ -1239,15 +1239,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
fb = /^$|\/(?:java|ecma)script/i,
gb = /^true\/(.*)/,
hb = /^\s*\s*$/g,
- ib = { option: [1, ""], thead: [1, ""], col: [2, ""], tr: [2, ""], td: [3, ""], _default: [0, "", ""] };ib.optgroup = ib.option, ib.tbody = ib.tfoot = ib.colgroup = ib.caption = ib.thead, ib.th = ib.td;function jb(a, b) {
- return o.nodeName(a, "table") && o.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a;
+ ib = { option: [1, ''], thead: [1, ''], col: [2, ''], tr: [2, ''], td: [3, ''], _default: [0, '', ''] };ib.optgroup = ib.option, ib.tbody = ib.tfoot = ib.colgroup = ib.caption = ib.thead, ib.th = ib.td;function jb(a, b) {
+ return o.nodeName(a, 'table') && o.nodeName(11 !== b.nodeType ? b : b.firstChild, 'tr') ? a.getElementsByTagName('tbody')[0] || a.appendChild(a.ownerDocument.createElement('tbody')) : a;
}function kb(a) {
- return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a;
+ return a.type = (null !== a.getAttribute('type')) + '/' + a.type, a;
}function lb(a) {
- var b = gb.exec(a.type);return b ? a.type = b[1] : a.removeAttribute("type"), a;
+ var b = gb.exec(a.type);return b ? a.type = b[1] : a.removeAttribute('type'), a;
}function mb(a, b) {
for (var c = 0, d = a.length; d > c; c++) {
- L.set(a[c], "globalEval", !b || L.get(b[c], "globalEval"));
+ L.set(a[c], 'globalEval', !b || L.get(b[c], 'globalEval'));
}
}function nb(a, b) {
var c, d, e, f, g, h, i, j;if (1 === b.nodeType) {
@@ -1260,9 +1260,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
}M.hasData(a) && (h = M.access(a), i = o.extend({}, h), M.set(b, i));
}
}function ob(a, b) {
- var c = a.getElementsByTagName ? a.getElementsByTagName(b || "*") : a.querySelectorAll ? a.querySelectorAll(b || "*") : [];return void 0 === b || b && o.nodeName(a, b) ? o.merge([a], c) : c;
+ var c = a.getElementsByTagName ? a.getElementsByTagName(b || '*') : a.querySelectorAll ? a.querySelectorAll(b || '*') : [];return void 0 === b || b && o.nodeName(a, b) ? o.merge([a], c) : c;
}function pb(a, b) {
- var c = b.nodeName.toLowerCase();"input" === c && T.test(a.type) ? b.checked = a.checked : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue);
+ var c = b.nodeName.toLowerCase();'input' === c && T.test(a.type) ? b.checked = a.checked : ('input' === c || 'textarea' === c) && (b.defaultValue = a.defaultValue);
}o.extend({ clone: function clone(a, b, c) {
var d,
e,
@@ -1273,18 +1273,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
pb(f[d], g[d]);
}if (b) if (c) for (f = f || ob(a), g = g || ob(h), d = 0, e = f.length; e > d; d++) {
nb(f[d], g[d]);
- } else nb(a, h);return g = ob(h, "script"), g.length > 0 && mb(g, !i && ob(a, "script")), h;
+ } else nb(a, h);return g = ob(h, 'script'), g.length > 0 && mb(g, !i && ob(a, 'script')), h;
}, buildFragment: function buildFragment(a, b, c, d) {
for (var e, f, g, h, i, j, k = b.createDocumentFragment(), l = [], m = 0, n = a.length; n > m; m++) {
- if (e = a[m], e || 0 === e) if ("object" === o.type(e)) o.merge(l, e.nodeType ? [e] : e);else if (cb.test(e)) {
- f = f || k.appendChild(b.createElement("div")), g = (bb.exec(e) || ["", ""])[1].toLowerCase(), h = ib[g] || ib._default, f.innerHTML = h[1] + e.replace(ab, "<$1>$2>") + h[2], j = h[0];while (j--) {
+ if (e = a[m], e || 0 === e) if ('object' === o.type(e)) o.merge(l, e.nodeType ? [e] : e);else if (cb.test(e)) {
+ f = f || k.appendChild(b.createElement('div')), g = (bb.exec(e) || ['', ''])[1].toLowerCase(), h = ib[g] || ib._default, f.innerHTML = h[1] + e.replace(ab, '<$1>$2>') + h[2], j = h[0];while (j--) {
f = f.lastChild;
- }o.merge(l, f.childNodes), f = k.firstChild, f.textContent = "";
+ }o.merge(l, f.childNodes), f = k.firstChild, f.textContent = '';
} else l.push(b.createTextNode(e));
- }k.textContent = "", m = 0;while (e = l[m++]) {
- if ((!d || -1 === o.inArray(e, d)) && (i = o.contains(e.ownerDocument, e), f = ob(k.appendChild(e), "script"), i && mb(f), c)) {
+ }k.textContent = '', m = 0;while (e = l[m++]) {
+ if ((!d || -1 === o.inArray(e, d)) && (i = o.contains(e.ownerDocument, e), f = ob(k.appendChild(e), 'script'), i && mb(f), c)) {
j = 0;while (e = f[j++]) {
- fb.test(e.type || "") && c.push(e);
+ fb.test(e.type || '') && c.push(e);
}
}
}return k;
@@ -1324,11 +1324,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
});
}, remove: function remove(a, b) {
for (var c, d = a ? o.filter(a, this) : this, e = 0; null != (c = d[e]); e++) {
- b || 1 !== c.nodeType || o.cleanData(ob(c)), c.parentNode && (b && o.contains(c.ownerDocument, c) && mb(ob(c, "script")), c.parentNode.removeChild(c));
+ b || 1 !== c.nodeType || o.cleanData(ob(c)), c.parentNode && (b && o.contains(c.ownerDocument, c) && mb(ob(c, 'script')), c.parentNode.removeChild(c));
}return this;
}, empty: function empty() {
for (var a, b = 0; null != (a = this[b]); b++) {
- 1 === a.nodeType && (o.cleanData(ob(a, !1)), a.textContent = "");
+ 1 === a.nodeType && (o.cleanData(ob(a, !1)), a.textContent = '');
}return this;
}, clone: function clone(a, b) {
return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function () {
@@ -1338,8 +1338,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return J(this, function (a) {
var b = this[0] || {},
c = 0,
- d = this.length;if (void 0 === a && 1 === b.nodeType) return b.innerHTML;if ("string" == typeof a && !db.test(a) && !ib[(bb.exec(a) || ["", ""])[1].toLowerCase()]) {
- a = a.replace(ab, "<$1>$2>");try {
+ d = this.length;if (void 0 === a && 1 === b.nodeType) return b.innerHTML;if ('string' == typeof a && !db.test(a) && !ib[(bb.exec(a) || ['', ''])[1].toLowerCase()]) {
+ a = a.replace(ab, '<$1>$2>');try {
for (; d > c; c++) {
b = this[c] || {}, 1 === b.nodeType && (o.cleanData(ob(b, !1)), b.innerHTML = a);
}b = 0;
@@ -1364,16 +1364,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
m = this,
n = k - 1,
p = a[0],
- q = o.isFunction(p);if (q || k > 1 && "string" == typeof p && !l.checkClone && eb.test(p)) return this.each(function (c) {
+ q = o.isFunction(p);if (q || k > 1 && 'string' == typeof p && !l.checkClone && eb.test(p)) return this.each(function (c) {
var d = m.eq(c);q && (a[0] = p.call(this, c, d.html())), d.domManip(a, b);
});if (k && (c = o.buildFragment(a, this[0].ownerDocument, !1, this), d = c.firstChild, 1 === c.childNodes.length && (c = d), d)) {
- for (f = o.map(ob(c, "script"), kb), g = f.length; k > j; j++) {
- h = c, j !== n && (h = o.clone(h, !0, !0), g && o.merge(f, ob(h, "script"))), b.call(this[j], h, j);
+ for (f = o.map(ob(c, 'script'), kb), g = f.length; k > j; j++) {
+ h = c, j !== n && (h = o.clone(h, !0, !0), g && o.merge(f, ob(h, 'script'))), b.call(this[j], h, j);
}if (g) for (i = f[f.length - 1].ownerDocument, o.map(f, lb), j = 0; g > j; j++) {
- h = f[j], fb.test(h.type || "") && !L.access(h, "globalEval") && o.contains(i, h) && (h.src ? o._evalUrl && o._evalUrl(h.src) : o.globalEval(h.textContent.replace(hb, "")));
+ h = f[j], fb.test(h.type || '') && !L.access(h, 'globalEval') && o.contains(i, h) && (h.src ? o._evalUrl && o._evalUrl(h.src) : o.globalEval(h.textContent.replace(hb, '')));
}
}return this;
- } }), o.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (a, b) {
+ } }), o.each({ appendTo: 'append', prependTo: 'prepend', insertBefore: 'before', insertAfter: 'after', replaceAll: 'replaceWith' }, function (a, b) {
o.fn[a] = function (a) {
for (var c, d = [], e = o(a), g = e.length - 1, h = 0; g >= h; h++) {
c = h === g ? this : this.clone(!0), o(e[h])[b](c), f.apply(d, c.get());
@@ -1382,12 +1382,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
});var qb,
rb = {};function sb(b, c) {
var d = o(c.createElement(b)).appendTo(c.body),
- e = a.getDefaultComputedStyle ? a.getDefaultComputedStyle(d[0]).display : o.css(d[0], "display");return d.detach(), e;
+ e = a.getDefaultComputedStyle ? a.getDefaultComputedStyle(d[0]).display : o.css(d[0], 'display');return d.detach(), e;
}function tb(a) {
var b = m,
- c = rb[a];return c || (c = sb(a, b), "none" !== c && c || (qb = (qb || o("")).appendTo(b.documentElement), b = qb[0].contentDocument, b.write(), b.close(), c = sb(a, b), qb.detach()), rb[a] = c), c;
+ c = rb[a];return c || (c = sb(a, b), 'none' !== c && c || (qb = (qb || o('